From 2623a412c42a81104b97ae8c81a5f66760fee4b6 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 19 Mar 2022 22:04:13 +0100 Subject: [PATCH] Update vendor (whatsapp) --- go.mod | 16 +- go.sum | 43 +- .../whatsmeow/store/clientpayload.go | 2 +- vendor/go.mau.fi/whatsmeow/update.go | 2 +- vendor/golang.org/x/crypto/ssh/certs.go | 93 +- vendor/golang.org/x/crypto/ssh/client.go | 25 +- vendor/golang.org/x/crypto/ssh/client_auth.go | 132 +- vendor/golang.org/x/crypto/ssh/common.go | 86 +- vendor/golang.org/x/crypto/ssh/handshake.go | 98 +- vendor/golang.org/x/crypto/ssh/kex.go | 186 +- vendor/golang.org/x/crypto/ssh/keys.go | 158 +- vendor/golang.org/x/crypto/ssh/messages.go | 21 +- vendor/golang.org/x/crypto/ssh/server.go | 22 +- vendor/golang.org/x/crypto/ssh/session.go | 1 + vendor/golang.org/x/crypto/ssh/transport.go | 10 +- vendor/modernc.org/cc/v3/Makefile | 4 +- vendor/modernc.org/cc/v3/abi_platforms.go | 55 +- vendor/modernc.org/ccgo/v3/lib/Makefile | 1 + vendor/modernc.org/libc/CONTRIBUTORS | 1 + vendor/modernc.org/libc/capi_linux_riscv64.go | 509 + .../libc/errno/capi_linux_riscv64.go | 5 + .../libc/errno/errno_linux_riscv64.go | 187 + .../libc/fcntl/capi_linux_riscv64.go | 5 + .../libc/fcntl/fcntl_linux_riscv64.go | 1346 + .../libc/fts/capi_linux_riscv64.go | 5 + .../modernc.org/libc/fts/fts_linux_riscv64.go | 2156 + .../libc/grp/capi_linux_riscv64.go | 5 + .../modernc.org/libc/grp/grp_linux_riscv64.go | 953 + .../libc/honnef.co/go/netdb/netdb.go | 5 +- .../libc/langinfo/capi_linux_riscv64.go | 5 + .../libc/langinfo/langinfo_linux_riscv64.go | 1195 + vendor/modernc.org/libc/libc64.go | 4 +- vendor/modernc.org/libc/libc_linux.go | 168 + vendor/modernc.org/libc/libc_linux_riscv64.go | 413 + .../libc/limits/capi_linux_riscv64.go | 5 + .../libc/limits/limits_linux_riscv64.go | 1153 + vendor/modernc.org/libc/musl_linux_riscv64.go | 6997 + .../libc/netdb/capi_linux_riscv64.go | 5 + .../libc/netdb/netdb_linux_riscv64.go | 3280 + .../libc/netinet/in/capi_linux_riscv64.go | 5 + .../libc/netinet/in/in_linux_riscv64.go | 2990 + .../libc/poll/capi_linux_riscv64.go | 5 + .../libc/poll/poll_linux_riscv64.go | 677 + .../libc/pthread/capi_linux_riscv64.go | 5 + .../libc/pthread/pthread_linux_riscv64.go | 2201 + .../libc/pwd/capi_linux_riscv64.go | 5 + .../modernc.org/libc/pwd/pwd_linux_riscv64.go | 958 + .../libc/signal/capi_linux_riscv64.go | 5 + .../libc/signal/more_linux_riscv64.go | 12 + .../libc/signal/signal_linux_riscv64.go | 2359 + .../libc/stdio/capi_linux_riscv64.go | 5 + .../libc/stdio/stdio_linux_riscv64.go | 589 + .../libc/stdlib/capi_linux_riscv64.go | 5 + .../libc/stdlib/stdlib_linux_riscv64.go | 1591 + .../libc/sys/socket/capi_linux_riscv64.go | 5 + .../libc/sys/socket/socket_linux_riscv64.go | 1909 + .../libc/sys/stat/capi_linux_riscv64.go | 5 + .../libc/sys/stat/stat_linux_riscv64.go | 1163 + .../libc/sys/types/capi_linux_riscv64.go | 5 + .../libc/sys/types/types_linux_riscv64.go | 1715 + .../libc/termios/capi_linux_riscv64.go | 5 + .../libc/termios/termios_linux_riscv64.go | 1194 + .../libc/time/capi_linux_riscv64.go | 5 + .../libc/time/time_linux_riscv64.go | 711 + .../libc/unistd/capi_linux_riscv64.go | 5 + .../libc/unistd/unistd_linux_riscv64.go | 1776 + .../libc/utime/capi_linux_riscv64.go | 5 + .../libc/utime/utime_linux_riscv64.go | 951 + .../libc/uuid/uuid/capi_linux_riscv64.go | 5 + .../libc/uuid/uuid/uuid_linux_riscv64.go | 1975 + .../libc/wctype/capi_linux_riscv64.go | 5 + .../libc/wctype/wctype_linux_riscv64.go | 1121 + vendor/modernc.org/memory/CONTRIBUTORS | 1 + vendor/modernc.org/memory/LICENSE-GO | 27 + vendor/modernc.org/memory/Makefile | 11 +- vendor/modernc.org/memory/counters.go | 1 + vendor/modernc.org/memory/memory32.go | 3 +- vendor/modernc.org/memory/memory64.go | 3 +- vendor/modernc.org/memory/mmap_fallback.go | 17 + vendor/modernc.org/memory/mmap_freebsd_32.go | 21 + vendor/modernc.org/memory/mmap_freebsd_64.go | 21 + vendor/modernc.org/memory/mmap_linux_32.go | 33 + vendor/modernc.org/memory/mmap_linux_64.go | 24 + vendor/modernc.org/memory/mmap_linux_s390x.go | 23 + vendor/modernc.org/memory/mmap_netbsd_32.go | 21 + vendor/modernc.org/memory/mmap_netbsd_64.go | 21 + vendor/modernc.org/memory/mmap_unix.go | 12 +- vendor/modernc.org/memory/nocounters.go | 1 + vendor/modernc.org/memory/trace_disabled.go | 1 + vendor/modernc.org/memory/trace_enabled.go | 1 + vendor/modernc.org/sqlite/Makefile | 9 + vendor/modernc.org/sqlite/doc.go | 21 +- vendor/modernc.org/sqlite/generator.go | 8 +- .../sqlite/lib/capi_darwin_amd64.go | 2 +- .../sqlite/lib/capi_darwin_arm64.go | 2 +- .../sqlite/lib/capi_freebsd_386.go | 2 +- .../sqlite/lib/capi_freebsd_amd64.go | 2 +- .../modernc.org/sqlite/lib/capi_linux_386.go | 2 +- .../sqlite/lib/capi_linux_amd64.go | 2 +- .../modernc.org/sqlite/lib/capi_linux_arm.go | 2 +- .../sqlite/lib/capi_linux_arm64.go | 2 +- .../sqlite/lib/capi_linux_riscv64.go | 1340 + .../sqlite/lib/capi_linux_s390x.go | 2 +- .../sqlite/lib/capi_openbsd_amd64.go | 2 +- .../sqlite/lib/capi_windows_amd64.go | 2 +- .../sqlite/lib/sqlite_darwin_amd64.go | 16494 +- .../sqlite/lib/sqlite_darwin_arm64.go | 16494 +- .../sqlite/lib/sqlite_freebsd_386.go | 16048 +- .../sqlite/lib/sqlite_freebsd_amd64.go | 16048 +- .../sqlite/lib/sqlite_linux_386.go | 16050 +- .../sqlite/lib/sqlite_linux_amd64.go | 16050 +- .../sqlite/lib/sqlite_linux_arm.go | 16050 +- .../sqlite/lib/sqlite_linux_arm64.go | 16050 +- .../sqlite/lib/sqlite_linux_riscv64.go | 196684 +++++++++++++++ .../sqlite/lib/sqlite_linux_s390x.go | 16052 +- .../sqlite/lib/sqlite_openbsd_amd64.go | 16028 +- .../sqlite/lib/sqlite_windows_amd64.go | 16120 +- vendor/modernc.org/sqlite/sqlite.go | 81 +- vendor/modules.txt | 18 +- 119 files changed, 330355 insertions(+), 88883 deletions(-) create mode 100644 vendor/modernc.org/libc/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/errno/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/errno/errno_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/fcntl/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/fts/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/fts/fts_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/grp/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/grp/grp_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/langinfo/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/langinfo/langinfo_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/libc_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/limits/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/limits/limits_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/musl_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/netdb/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/netinet/in/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/poll/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/poll/poll_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/pthread/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/pwd/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/signal/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/signal/more_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/signal/signal_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/stdio/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/stdlib/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/sys/socket/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/sys/stat/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/sys/types/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/sys/types/types_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/termios/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/termios/termios_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/time/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/time/time_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/unistd/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/utime/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/utime/utime_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/uuid/uuid/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/wctype/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go create mode 100644 vendor/modernc.org/memory/LICENSE-GO create mode 100644 vendor/modernc.org/memory/mmap_fallback.go create mode 100644 vendor/modernc.org/memory/mmap_freebsd_32.go create mode 100644 vendor/modernc.org/memory/mmap_freebsd_64.go create mode 100644 vendor/modernc.org/memory/mmap_linux_32.go create mode 100644 vendor/modernc.org/memory/mmap_linux_64.go create mode 100644 vendor/modernc.org/memory/mmap_linux_s390x.go create mode 100644 vendor/modernc.org/memory/mmap_netbsd_32.go create mode 100644 vendor/modernc.org/memory/mmap_netbsd_64.go create mode 100644 vendor/modernc.org/sqlite/lib/capi_linux_riscv64.go create mode 100644 vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go diff --git a/go.mod b/go.mod index dfcffbfd..53f9a53e 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/writeas/go-strip-markdown v2.0.1+incompatible github.com/yaegashi/msgraph.go v0.1.4 github.com/zfjagann/golang-ring v0.0.0-20210116075443-7c86fdb43134 - go.mau.fi/whatsmeow v0.0.0-20220312175208-0c4681a6ff52 + go.mau.fi/whatsmeow v0.0.0-20220319105109-ee347f8c0a14 golang.org/x/image v0.0.0-20220302094943-723b81ca9867 golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a golang.org/x/text v0.3.7 @@ -53,7 +53,7 @@ require ( google.golang.org/protobuf v1.27.1 gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376 layeh.com/gumble v0.0.0-20200818122324-146f9205029b - modernc.org/sqlite v1.14.8 + modernc.org/sqlite v1.15.2 ) require ( @@ -123,11 +123,11 @@ require ( github.com/wiggin77/cfg v1.0.2 // indirect github.com/wiggin77/merror v1.0.3 // indirect github.com/wiggin77/srslog v1.0.1 // indirect - go.mau.fi/libsignal v0.0.0-20220308120827-0d87a03fd7c7 // indirect + go.mau.fi/libsignal v0.0.0-20220315232917-871a40435d3b // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.17.0 // indirect - golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 // indirect + golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect golang.org/x/mod v0.5.1 // indirect golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect @@ -141,11 +141,11 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect lukechampine.com/uint128 v1.1.1 // indirect - modernc.org/cc/v3 v3.35.22 // indirect - modernc.org/ccgo/v3 v3.15.14 // indirect - modernc.org/libc v1.14.6 // indirect + modernc.org/cc/v3 v3.35.24 // indirect + modernc.org/ccgo/v3 v3.15.17 // indirect + modernc.org/libc v1.14.11 // indirect modernc.org/mathutil v1.4.1 // indirect - modernc.org/memory v1.0.5 // indirect + modernc.org/memory v1.0.6 // indirect modernc.org/opt v0.1.1 // indirect modernc.org/strutil v1.1.1 // indirect modernc.org/token v1.0.0 // indirect diff --git a/go.sum b/go.sum index eba09b53..5368c48b 100644 --- a/go.sum +++ b/go.sum @@ -1703,10 +1703,10 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3 go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= -go.mau.fi/libsignal v0.0.0-20220308120827-0d87a03fd7c7 h1:L09XYQRGJwC6KbJumz3cD/6JTUAPNZHfnu8hroqm1KE= -go.mau.fi/libsignal v0.0.0-20220308120827-0d87a03fd7c7/go.mod h1:LjEYzdnRUcRArJJUUHQUfMU1A+WzEM73qBTirXluuaY= -go.mau.fi/whatsmeow v0.0.0-20220312175208-0c4681a6ff52 h1:CVJ4dVzluwsUFI8zBLQBlrtYHuMcEYM6oLeAbplCrI4= -go.mau.fi/whatsmeow v0.0.0-20220312175208-0c4681a6ff52/go.mod h1:nH4IwHZf+Ks61nM5p71jZqLXiT0NpG+0uR/WqzCqHH8= +go.mau.fi/libsignal v0.0.0-20220315232917-871a40435d3b h1:BGm0ceth6OtoXgBksEyeruiCL2ngZCwt86DUmUI6TmQ= +go.mau.fi/libsignal v0.0.0-20220315232917-871a40435d3b/go.mod h1:XYWsswZT1LfDmguWKYDuj+OugtdGX6CP3iwTtOcAGt4= +go.mau.fi/whatsmeow v0.0.0-20220319105109-ee347f8c0a14 h1:ExTTrre0VoTljTf08nGeE24i2aqNF4CxQVnlFYEiQUg= +go.mau.fi/whatsmeow v0.0.0-20220319105109-ee347f8c0a14/go.mod h1:P7OA9XyJ/0dWHhUPKNESpC1wVOErnhY4pLEaMC1a8yg= go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.7.0/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= @@ -1788,8 +1788,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 h1:syTAU9FwmvzEoIYMqcPHOcVm4H3U5u90WsvuYgwpETU= -golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2529,8 +2529,9 @@ modernc.org/cc/v3 v3.35.16/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g modernc.org/cc/v3 v3.35.17/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= modernc.org/cc/v3 v3.35.18/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= modernc.org/cc/v3 v3.35.20/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.22 h1:BzShpwCAP7TWzFppM4k2t03RhXhgYqaibROWkrWq7lE= modernc.org/cc/v3 v3.35.22/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/cc/v3 v3.35.24 h1:vlCqjhVwX15t1uwlMPpOpNRC7JTjMZ9lT9DYHKQTFuA= +modernc.org/cc/v3 v3.35.24/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/ccgo/v3 v3.9.2/go.mod h1:gnJpy6NIVqkETT+L5zPsQFj7L2kkhfPMzOghRNv/CFo= modernc.org/ccgo/v3 v3.9.5/go.mod h1:umuo2EP2oDSBnD3ckjaVUXMrmeAw8C8OSICVa0iFf60= modernc.org/ccgo/v3 v3.10.0/go.mod h1:c0yBmkRFi7uW4J7fwx/JiijwOjeAeR2NoSaRVFPmjMw= @@ -2570,12 +2571,14 @@ modernc.org/ccgo/v3 v3.12.86/go.mod h1:dN7S26DLTgVSni1PVA3KxxHTcykyDurf3OgUzNqTS modernc.org/ccgo/v3 v3.12.90/go.mod h1:obhSc3CdivCRpYZmrvO88TXlW0NvoSVvdh/ccRjJYko= modernc.org/ccgo/v3 v3.12.92/go.mod h1:5yDdN7ti9KWPi5bRVWPl8UNhpEAtCjuEE7ayQnzzqHA= modernc.org/ccgo/v3 v3.13.1/go.mod h1:aBYVOUfIlcSnrsRVU8VRS35y2DIfpgkmVkYZ0tpIXi4= -modernc.org/ccgo/v3 v3.15.1/go.mod h1:md59wBwDT2LznX/OTCPoVS6KIsdRgY8xqQwBV+hkTH0= modernc.org/ccgo/v3 v3.15.9/go.mod h1:md59wBwDT2LznX/OTCPoVS6KIsdRgY8xqQwBV+hkTH0= modernc.org/ccgo/v3 v3.15.10/go.mod h1:wQKxoFn0ynxMuCLfFD09c8XPUCc8obfchoVR9Cn0fI8= modernc.org/ccgo/v3 v3.15.12/go.mod h1:VFePOWoCd8uDGRJpq/zfJ29D0EVzMSyID8LCMWYbX6I= -modernc.org/ccgo/v3 v3.15.14 h1:/Pcjoc5mPznDMH3CErDeX4mHLAAQyR5lzr3s2FpqDY0= modernc.org/ccgo/v3 v3.15.14/go.mod h1:144Sz2iBCKogb9OKwsu7hQEub3EVgOlyI8wMUPGKUXQ= +modernc.org/ccgo/v3 v3.15.15/go.mod h1:z5qltXjU4PJl0pE5nhYQCvA9DhPHiWsl5GWl89+NSYE= +modernc.org/ccgo/v3 v3.15.16/go.mod h1:XbKRMeMWMdq712Tr5ECgATYMrzJ+g9zAZEj2ktzBe24= +modernc.org/ccgo/v3 v3.15.17 h1:svaDk4rfh7XQPBwkqzjKK8bta/vK4VVL3JP6ZLbcr0w= +modernc.org/ccgo/v3 v3.15.17/go.mod h1:bofnFkpRFf5gLY+mBZIyTW6FEcp26xi2lgOFk2Rlvs0= modernc.org/ccorpus v1.11.1/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= @@ -2629,8 +2632,12 @@ modernc.org/libc v1.12.0/go.mod h1:2MH3DaF/gCU8i/UBiVE1VFRos4o523M7zipmwH8SIgQ= modernc.org/libc v1.14.1/go.mod h1:npFeGWjmZTjFeWALQLrvklVmAxv4m80jnG3+xI8FdJk= modernc.org/libc v1.14.2/go.mod h1:MX1GBLnRLNdvmK9azU9LCxZ5lMyhrbEMK8rG3X/Fe34= modernc.org/libc v1.14.3/go.mod h1:GPIvQVOVPizzlqyRX3l756/3ppsAgg1QgPxjr5Q4agQ= -modernc.org/libc v1.14.6 h1:SSiZiE5199iYsGM9gtkDj90xqcXVwubWG8CtoYE+Mnk= modernc.org/libc v1.14.6/go.mod h1:2PJHINagVxO4QW/5OQdRrvMYo+bm5ClpUFfyXCYl9ak= +modernc.org/libc v1.14.7/go.mod h1:f8xfWXW8LW41qb4X5+huVQo5dcfPlq7Cbny2TDheMv0= +modernc.org/libc v1.14.8/go.mod h1:9+JCLb1MWSY23smyOpIPbd5ED+rSS/ieiDWUpdyO3mo= +modernc.org/libc v1.14.10/go.mod h1:y1MtIWhwpJFpLYm6grAThtuXJKEsY6xkdZmXbRngIdo= +modernc.org/libc v1.14.11 h1:ivxNmUkfp5iSGAGMIjylvx5R53s6QTJW9qUru1yrnk4= +modernc.org/libc v1.14.11/go.mod h1:l5/Mz/GrZwOqzwRHA3abgSCnSeJzzTl+Ify0bAwKbAw= modernc.org/lldb v1.0.0/go.mod h1:jcRvJGWfCGodDZz8BPwiKMJxGJngQ/5DrRapkQnLob8= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= @@ -2639,28 +2646,28 @@ modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6 modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= -modernc.org/memory v1.0.5 h1:XRch8trV7GgvTec2i7jc33YlUI0RKVDBvZ5eZ5m8y14= modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM= +modernc.org/memory v1.0.6 h1:5IaT/LChMrMdxLCy/a4qmb+7SzGiU8/ozPgkEOrfvFw= +modernc.org/memory v1.0.6/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs= -modernc.org/sqlite v1.14.8 h1:2OOqfZAyU4x4qusilvHoRXXqsAgaZobi1o+mjQ5MUpw= -modernc.org/sqlite v1.14.8/go.mod h1:TFmXjym+/jR31fxc2B5eHnKMuJJGY7i1L/T5A0jzVww= +modernc.org/sqlite v1.15.2 h1:Es0SrEJUQHH7rt6uC/Zh2gHQ0AUhgB+F2RQqpXf3MNs= +modernc.org/sqlite v1.15.2/go.mod h1:2P9bWfawhYMpYsBELqKREE+LFZo4uPApOuqszlZ7QX8= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= modernc.org/tcl v1.5.2/go.mod h1:pmJYOLgpiys3oI4AeAafkcUfE+TKKilminxNyU/+Zlo= -modernc.org/tcl v1.11.0 h1:B/zzEYjINeaki38KcIqdQRQx7W3WE7TkrlTwGnbm2II= -modernc.org/tcl v1.11.0/go.mod h1:zsTUpbQ+NxQEjOjCUlImDLPv1sG8Ww0qp66ZvyOxCgw= +modernc.org/tcl v1.11.2 h1:mXpsx3AZqJt83uDiFu9UYQVBjNjaWKGCF1YDSlpCL6Y= +modernc.org/tcl v1.11.2/go.mod h1:BRzgpajcGdS2qTxniOx9c/dcxjlbA7p12eJNmiriQYo= modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.0.1-0.20210308123920-1f282aa71362/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= -modernc.org/z v1.3.0/go.mod h1:+mvgLH814oDjtATDdT3rs84JnUIpkvAF5B8AVkNlE2g= -modernc.org/z v1.3.1 h1:jd/XnJ5W82v0cEpDQOQPpDJSH7H8olKpMqPFKEcM49E= -modernc.org/z v1.3.1/go.mod h1:0RBFPpdFNiKpjTza1WYaB4+6ySjS6dLBoo09OQZ4E3w= +modernc.org/z v1.3.2 h1:4GWBVMa48UDC7KQ9tnaggN/yTlXg+CdCX9bhgHPQ9AM= +modernc.org/z v1.3.2/go.mod h1:PEU2oK2OEA1CfzDTd+8E908qEXhC9s0MfyKp5LZsd+k= modernc.org/zappy v1.0.0/go.mod h1:hHe+oGahLVII/aTTyWK/b53VDHMAGCBYYeZ9sn83HC4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/goversion v1.2.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo= diff --git a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go index 675719a2..6649de2a 100644 --- a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +++ b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go @@ -74,7 +74,7 @@ func (vc WAVersionContainer) ProtoAppVersion() *waProto.AppVersion { } // waVersion is the WhatsApp web client version -var waVersion = WAVersionContainer{2, 2208, 7} +var waVersion = WAVersionContainer{2, 2208, 14} // waVersionHash is the md5 hash of a dot-separated waVersion var waVersionHash [16]byte diff --git a/vendor/go.mau.fi/whatsmeow/update.go b/vendor/go.mau.fi/whatsmeow/update.go index ec94aa2f..00e35bfb 100644 --- a/vendor/go.mau.fi/whatsmeow/update.go +++ b/vendor/go.mau.fi/whatsmeow/update.go @@ -33,7 +33,7 @@ const CheckUpdateURL = "https://web.whatsapp.com/check-update" // CheckUpdate asks the WhatsApp servers if there is an update available // (using the HTTP client and proxy settings of this whatsmeow Client instance). func (cli *Client) CheckUpdate() (respData CheckUpdateResponse, err error) { - return CheckUpdate(http.DefaultClient) + return CheckUpdate(cli.http) } // CheckUpdate asks the WhatsApp servers if there is an update available. diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go index 6605bf64..a69e2249 100644 --- a/vendor/golang.org/x/crypto/ssh/certs.go +++ b/vendor/golang.org/x/crypto/ssh/certs.go @@ -14,8 +14,10 @@ import ( "time" ) -// These constants from [PROTOCOL.certkeys] represent the key algorithm names -// for certificate types supported by this package. +// Certificate algorithm names from [PROTOCOL.certkeys]. These values can appear +// in Certificate.Type, PublicKey.Type, and ClientConfig.HostKeyAlgorithms. +// Unlike key algorithm names, these are not passed to AlgorithmSigner and don't +// appear in the Signature.Format field. const ( CertAlgoRSAv01 = "ssh-rsa-cert-v01@openssh.com" CertAlgoDSAv01 = "ssh-dss-cert-v01@openssh.com" @@ -25,14 +27,21 @@ const ( CertAlgoSKECDSA256v01 = "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com" CertAlgoED25519v01 = "ssh-ed25519-cert-v01@openssh.com" CertAlgoSKED25519v01 = "sk-ssh-ed25519-cert-v01@openssh.com" + + // CertAlgoRSASHA256v01 and CertAlgoRSASHA512v01 can't appear as a + // Certificate.Type (or PublicKey.Type), but only in + // ClientConfig.HostKeyAlgorithms. + CertAlgoRSASHA256v01 = "rsa-sha2-256-cert-v01@openssh.com" + CertAlgoRSASHA512v01 = "rsa-sha2-512-cert-v01@openssh.com" ) -// These constants from [PROTOCOL.certkeys] represent additional signature -// algorithm names for certificate types supported by this package. const ( - CertSigAlgoRSAv01 = "ssh-rsa-cert-v01@openssh.com" - CertSigAlgoRSASHA2256v01 = "rsa-sha2-256-cert-v01@openssh.com" - CertSigAlgoRSASHA2512v01 = "rsa-sha2-512-cert-v01@openssh.com" + // Deprecated: use CertAlgoRSAv01. + CertSigAlgoRSAv01 = CertAlgoRSAv01 + // Deprecated: use CertAlgoRSASHA256v01. + CertSigAlgoRSASHA2256v01 = CertAlgoRSASHA256v01 + // Deprecated: use CertAlgoRSASHA512v01. + CertSigAlgoRSASHA2512v01 = CertAlgoRSASHA512v01 ) // Certificate types distinguish between host and user @@ -431,10 +440,14 @@ func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { } c.SignatureKey = authority.PublicKey() - if v, ok := authority.(AlgorithmSigner); ok { - if v.PublicKey().Type() == KeyAlgoRSA { - authority = &rsaSigner{v, SigAlgoRSASHA2512} + // Default to KeyAlgoRSASHA512 for ssh-rsa signers. + if v, ok := authority.(AlgorithmSigner); ok && v.PublicKey().Type() == KeyAlgoRSA { + sig, err := v.SignWithAlgorithm(rand, c.bytesForSigning(), KeyAlgoRSASHA512) + if err != nil { + return err } + c.Signature = sig + return nil } sig, err := authority.Sign(rand, c.bytesForSigning()) @@ -445,32 +458,40 @@ func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { return nil } -// certAlgoNames includes a mapping from signature algorithms to the -// corresponding certificate signature algorithm. When a key type (such -// as ED25516) is associated with only one algorithm, the KeyAlgo -// constant is used instead of the SigAlgo. -var certAlgoNames = map[string]string{ - SigAlgoRSA: CertSigAlgoRSAv01, - SigAlgoRSASHA2256: CertSigAlgoRSASHA2256v01, - SigAlgoRSASHA2512: CertSigAlgoRSASHA2512v01, - KeyAlgoDSA: CertAlgoDSAv01, - KeyAlgoECDSA256: CertAlgoECDSA256v01, - KeyAlgoECDSA384: CertAlgoECDSA384v01, - KeyAlgoECDSA521: CertAlgoECDSA521v01, - KeyAlgoSKECDSA256: CertAlgoSKECDSA256v01, - KeyAlgoED25519: CertAlgoED25519v01, - KeyAlgoSKED25519: CertAlgoSKED25519v01, +// certKeyAlgoNames is a mapping from known certificate algorithm names to the +// corresponding public key signature algorithm. +var certKeyAlgoNames = map[string]string{ + CertAlgoRSAv01: KeyAlgoRSA, + CertAlgoRSASHA256v01: KeyAlgoRSASHA256, + CertAlgoRSASHA512v01: KeyAlgoRSASHA512, + CertAlgoDSAv01: KeyAlgoDSA, + CertAlgoECDSA256v01: KeyAlgoECDSA256, + CertAlgoECDSA384v01: KeyAlgoECDSA384, + CertAlgoECDSA521v01: KeyAlgoECDSA521, + CertAlgoSKECDSA256v01: KeyAlgoSKECDSA256, + CertAlgoED25519v01: KeyAlgoED25519, + CertAlgoSKED25519v01: KeyAlgoSKED25519, } -// certToPrivAlgo returns the underlying algorithm for a certificate algorithm. -// Panics if a non-certificate algorithm is passed. -func certToPrivAlgo(algo string) string { - for privAlgo, pubAlgo := range certAlgoNames { - if pubAlgo == algo { - return privAlgo +// underlyingAlgo returns the signature algorithm associated with algo (which is +// an advertised or negotiated public key or host key algorithm). These are +// usually the same, except for certificate algorithms. +func underlyingAlgo(algo string) string { + if a, ok := certKeyAlgoNames[algo]; ok { + return a + } + return algo +} + +// certificateAlgo returns the certificate algorithms that uses the provided +// underlying signature algorithm. +func certificateAlgo(algo string) (certAlgo string, ok bool) { + for certName, algoName := range certKeyAlgoNames { + if algoName == algo { + return certName, true } } - panic("unknown cert algorithm") + return "", false } func (cert *Certificate) bytesForSigning() []byte { @@ -514,13 +535,13 @@ func (c *Certificate) Marshal() []byte { return result } -// Type returns the key name. It is part of the PublicKey interface. +// Type returns the certificate algorithm name. It is part of the PublicKey interface. func (c *Certificate) Type() string { - algo, ok := certAlgoNames[c.Key.Type()] + certName, ok := certificateAlgo(c.Key.Type()) if !ok { - panic("unknown cert key type " + c.Key.Type()) + panic("unknown certificate type for key type " + c.Key.Type()) } - return algo + return certName } // Verify verifies a signature against the certificate's public diff --git a/vendor/golang.org/x/crypto/ssh/client.go b/vendor/golang.org/x/crypto/ssh/client.go index ba8621a8..bdc356cb 100644 --- a/vendor/golang.org/x/crypto/ssh/client.go +++ b/vendor/golang.org/x/crypto/ssh/client.go @@ -113,25 +113,16 @@ func (c *connection) clientHandshake(dialAddress string, config *ClientConfig) e return c.clientAuthenticate(config) } -// verifyHostKeySignature verifies the host key obtained in the key -// exchange. +// verifyHostKeySignature verifies the host key obtained in the key exchange. +// algo is the negotiated algorithm, and may be a certificate type. func verifyHostKeySignature(hostKey PublicKey, algo string, result *kexResult) error { sig, rest, ok := parseSignatureBody(result.Signature) if len(rest) > 0 || !ok { return errors.New("ssh: signature parse error") } - // For keys, underlyingAlgo is exactly algo. For certificates, - // we have to look up the underlying key algorithm that SSH - // uses to evaluate signatures. - underlyingAlgo := algo - for sigAlgo, certAlgo := range certAlgoNames { - if certAlgo == algo { - underlyingAlgo = sigAlgo - } - } - if sig.Format != underlyingAlgo { - return fmt.Errorf("ssh: invalid signature algorithm %q, expected %q", sig.Format, underlyingAlgo) + if a := underlyingAlgo(algo); sig.Format != a { + return fmt.Errorf("ssh: invalid signature algorithm %q, expected %q", sig.Format, a) } return hostKey.Verify(result.H, sig) @@ -237,11 +228,11 @@ type ClientConfig struct { // be used for the connection. If empty, a reasonable default is used. ClientVersion string - // HostKeyAlgorithms lists the key types that the client will - // accept from the server as host key, in order of + // HostKeyAlgorithms lists the public key algorithms that the client will + // accept from the server for host key authentication, in order of // preference. If empty, a reasonable default is used. Any - // string returned from PublicKey.Type method may be used, or - // any of the CertAlgoXxxx and KeyAlgoXxxx constants. + // string returned from a PublicKey.Type method may be used, or + // any of the CertAlgo and KeyAlgo constants. HostKeyAlgorithms []string // Timeout is the maximum amount of time for the TCP connection to establish. diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go index c611aeb6..409b5ea1 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -9,6 +9,7 @@ import ( "errors" "fmt" "io" + "strings" ) type authResult int @@ -29,6 +30,33 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { if err != nil { return err } + // The server may choose to send a SSH_MSG_EXT_INFO at this point (if we + // advertised willingness to receive one, which we always do) or not. See + // RFC 8308, Section 2.4. + extensions := make(map[string][]byte) + if len(packet) > 0 && packet[0] == msgExtInfo { + var extInfo extInfoMsg + if err := Unmarshal(packet, &extInfo); err != nil { + return err + } + payload := extInfo.Payload + for i := uint32(0); i < extInfo.NumExtensions; i++ { + name, rest, ok := parseString(payload) + if !ok { + return parseError(msgExtInfo) + } + value, rest, ok := parseString(rest) + if !ok { + return parseError(msgExtInfo) + } + extensions[string(name)] = value + payload = rest + } + packet, err = c.transport.readPacket() + if err != nil { + return err + } + } var serviceAccept serviceAcceptMsg if err := Unmarshal(packet, &serviceAccept); err != nil { return err @@ -41,7 +69,7 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { sessionID := c.transport.getSessionID() for auth := AuthMethod(new(noneAuth)); auth != nil; { - ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand) + ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand, extensions) if err != nil { return err } @@ -93,7 +121,7 @@ type AuthMethod interface { // If authentication is not successful, a []string of alternative // method names is returned. If the slice is nil, it will be ignored // and the previous set of possible methods will be reused. - auth(session []byte, user string, p packetConn, rand io.Reader) (authResult, []string, error) + auth(session []byte, user string, p packetConn, rand io.Reader, extensions map[string][]byte) (authResult, []string, error) // method returns the RFC 4252 method name. method() string @@ -102,7 +130,7 @@ type AuthMethod interface { // "none" authentication, RFC 4252 section 5.2. type noneAuth int -func (n *noneAuth) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { +func (n *noneAuth) auth(session []byte, user string, c packetConn, rand io.Reader, _ map[string][]byte) (authResult, []string, error) { if err := c.writePacket(Marshal(&userAuthRequestMsg{ User: user, Service: serviceSSH, @@ -122,7 +150,7 @@ func (n *noneAuth) method() string { // a function call, e.g. by prompting the user. type passwordCallback func() (password string, err error) -func (cb passwordCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { +func (cb passwordCallback) auth(session []byte, user string, c packetConn, rand io.Reader, _ map[string][]byte) (authResult, []string, error) { type passwordAuthMsg struct { User string `sshtype:"50"` Service string @@ -189,7 +217,46 @@ func (cb publicKeyCallback) method() string { return "publickey" } -func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { +func pickSignatureAlgorithm(signer Signer, extensions map[string][]byte) (as AlgorithmSigner, algo string) { + keyFormat := signer.PublicKey().Type() + + // Like in sendKexInit, if the public key implements AlgorithmSigner we + // assume it supports all algorithms, otherwise only the key format one. + as, ok := signer.(AlgorithmSigner) + if !ok { + return algorithmSignerWrapper{signer}, keyFormat + } + + extPayload, ok := extensions["server-sig-algs"] + if !ok { + // If there is no "server-sig-algs" extension, fall back to the key + // format algorithm. + return as, keyFormat + } + + // The server-sig-algs extension only carries underlying signature + // algorithm, but we are trying to select a protocol-level public key + // algorithm, which might be a certificate type. Extend the list of server + // supported algorithms to include the corresponding certificate algorithms. + serverAlgos := strings.Split(string(extPayload), ",") + for _, algo := range serverAlgos { + if certAlgo, ok := certificateAlgo(algo); ok { + serverAlgos = append(serverAlgos, certAlgo) + } + } + + keyAlgos := algorithmsForKeyFormat(keyFormat) + algo, err := findCommon("public key signature algorithm", keyAlgos, serverAlgos) + if err != nil { + // If there is no overlap, try the key anyway with the key format + // algorithm, to support servers that fail to list all supported + // algorithms. + return as, keyFormat + } + return as, algo +} + +func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand io.Reader, extensions map[string][]byte) (authResult, []string, error) { // Authentication is performed by sending an enquiry to test if a key is // acceptable to the remote. If the key is acceptable, the client will // attempt to authenticate with the valid key. If not the client will repeat @@ -201,7 +268,10 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand } var methods []string for _, signer := range signers { - ok, err := validateKey(signer.PublicKey(), user, c) + pub := signer.PublicKey() + as, algo := pickSignatureAlgorithm(signer, extensions) + + ok, err := validateKey(pub, algo, user, c) if err != nil { return authFailure, nil, err } @@ -209,13 +279,13 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand continue } - pub := signer.PublicKey() pubKey := pub.Marshal() - sign, err := signer.Sign(rand, buildDataSignedForAuth(session, userAuthRequestMsg{ + data := buildDataSignedForAuth(session, userAuthRequestMsg{ User: user, Service: serviceSSH, Method: cb.method(), - }, []byte(pub.Type()), pubKey)) + }, algo, pubKey) + sign, err := as.SignWithAlgorithm(rand, data, underlyingAlgo(algo)) if err != nil { return authFailure, nil, err } @@ -229,7 +299,7 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand Service: serviceSSH, Method: cb.method(), HasSig: true, - Algoname: pub.Type(), + Algoname: algo, PubKey: pubKey, Sig: sig, } @@ -266,26 +336,25 @@ func containsMethod(methods []string, method string) bool { } // validateKey validates the key provided is acceptable to the server. -func validateKey(key PublicKey, user string, c packetConn) (bool, error) { +func validateKey(key PublicKey, algo string, user string, c packetConn) (bool, error) { pubKey := key.Marshal() msg := publickeyAuthMsg{ User: user, Service: serviceSSH, Method: "publickey", HasSig: false, - Algoname: key.Type(), + Algoname: algo, PubKey: pubKey, } if err := c.writePacket(Marshal(&msg)); err != nil { return false, err } - return confirmKeyAck(key, c) + return confirmKeyAck(key, algo, c) } -func confirmKeyAck(key PublicKey, c packetConn) (bool, error) { +func confirmKeyAck(key PublicKey, algo string, c packetConn) (bool, error) { pubKey := key.Marshal() - algoname := key.Type() for { packet, err := c.readPacket() @@ -302,14 +371,14 @@ func confirmKeyAck(key PublicKey, c packetConn) (bool, error) { if err := Unmarshal(packet, &msg); err != nil { return false, err } - if msg.Algo != algoname || !bytes.Equal(msg.PubKey, pubKey) { + if msg.Algo != algo || !bytes.Equal(msg.PubKey, pubKey) { return false, nil } return true, nil case msgUserAuthFailure: return false, nil default: - return false, unexpectedMessageError(msgUserAuthSuccess, packet[0]) + return false, unexpectedMessageError(msgUserAuthPubKeyOk, packet[0]) } } } @@ -330,6 +399,7 @@ func PublicKeysCallback(getSigners func() (signers []Signer, err error)) AuthMet // along with a list of remaining authentication methods to try next and // an error if an unexpected response was received. func handleAuthResponse(c packetConn) (authResult, []string, error) { + gotMsgExtInfo := false for { packet, err := c.readPacket() if err != nil { @@ -341,6 +411,12 @@ func handleAuthResponse(c packetConn) (authResult, []string, error) { if err := handleBannerResponse(c, packet); err != nil { return authFailure, nil, err } + case msgExtInfo: + // Ignore post-authentication RFC 8308 extensions, once. + if gotMsgExtInfo { + return authFailure, nil, unexpectedMessageError(msgUserAuthSuccess, packet[0]) + } + gotMsgExtInfo = true case msgUserAuthFailure: var msg userAuthFailureMsg if err := Unmarshal(packet, &msg); err != nil { @@ -380,10 +456,10 @@ func handleBannerResponse(c packetConn, packet []byte) error { // disabling echoing (e.g. for passwords), and return all the answers. // Challenge may be called multiple times in a single session. After // successful authentication, the server may send a challenge with no -// questions, for which the user and instruction messages should be +// questions, for which the name and instruction messages should be // printed. RFC 4256 section 3.3 details how the UI should behave for // both CLI and GUI environments. -type KeyboardInteractiveChallenge func(user, instruction string, questions []string, echos []bool) (answers []string, err error) +type KeyboardInteractiveChallenge func(name, instruction string, questions []string, echos []bool) (answers []string, err error) // KeyboardInteractive returns an AuthMethod using a prompt/response // sequence controlled by the server. @@ -395,7 +471,7 @@ func (cb KeyboardInteractiveChallenge) method() string { return "keyboard-interactive" } -func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { +func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packetConn, rand io.Reader, _ map[string][]byte) (authResult, []string, error) { type initiateMsg struct { User string `sshtype:"50"` Service string @@ -412,6 +488,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe return authFailure, nil, err } + gotMsgExtInfo := false for { packet, err := c.readPacket() if err != nil { @@ -425,6 +502,13 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe return authFailure, nil, err } continue + case msgExtInfo: + // Ignore post-authentication RFC 8308 extensions, once. + if gotMsgExtInfo { + return authFailure, nil, unexpectedMessageError(msgUserAuthInfoRequest, packet[0]) + } + gotMsgExtInfo = true + continue case msgUserAuthInfoRequest: // OK case msgUserAuthFailure: @@ -465,7 +549,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe return authFailure, nil, errors.New("ssh: extra data following keyboard-interactive pairs") } - answers, err := cb(msg.User, msg.Instruction, prompts, echos) + answers, err := cb(msg.Name, msg.Instruction, prompts, echos) if err != nil { return authFailure, nil, err } @@ -497,9 +581,9 @@ type retryableAuthMethod struct { maxTries int } -func (r *retryableAuthMethod) auth(session []byte, user string, c packetConn, rand io.Reader) (ok authResult, methods []string, err error) { +func (r *retryableAuthMethod) auth(session []byte, user string, c packetConn, rand io.Reader, extensions map[string][]byte) (ok authResult, methods []string, err error) { for i := 0; r.maxTries <= 0 || i < r.maxTries; i++ { - ok, methods, err = r.authMethod.auth(session, user, c, rand) + ok, methods, err = r.authMethod.auth(session, user, c, rand, extensions) if ok != authFailure || err != nil { // either success, partial success or error terminate return ok, methods, err } @@ -542,7 +626,7 @@ type gssAPIWithMICCallback struct { target string } -func (g *gssAPIWithMICCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { +func (g *gssAPIWithMICCallback) auth(session []byte, user string, c packetConn, rand io.Reader, _ map[string][]byte) (authResult, []string, error) { m := &userAuthRequestMsg{ User: user, Service: serviceSSH, diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go index 5ae22757..2a47a61d 100644 --- a/vendor/golang.org/x/crypto/ssh/common.go +++ b/vendor/golang.org/x/crypto/ssh/common.go @@ -44,11 +44,11 @@ var preferredCiphers = []string{ // supportedKexAlgos specifies the supported key-exchange algorithms in // preference order. var supportedKexAlgos = []string{ - kexAlgoCurve25519SHA256, + kexAlgoCurve25519SHA256, kexAlgoCurve25519SHA256LibSSH, // P384 and P521 are not constant-time yet, but since we don't // reuse ephemeral keys, using them for ECDH should be OK. kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521, - kexAlgoDH14SHA1, kexAlgoDH1SHA1, + kexAlgoDH14SHA256, kexAlgoDH14SHA1, kexAlgoDH1SHA1, } // serverForbiddenKexAlgos contains key exchange algorithms, that are forbidden @@ -61,21 +61,21 @@ var serverForbiddenKexAlgos = map[string]struct{}{ // preferredKexAlgos specifies the default preference for key-exchange algorithms // in preference order. var preferredKexAlgos = []string{ - kexAlgoCurve25519SHA256, + kexAlgoCurve25519SHA256, kexAlgoCurve25519SHA256LibSSH, kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521, - kexAlgoDH14SHA1, + kexAlgoDH14SHA256, kexAlgoDH14SHA1, } // supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods // of authenticating servers) in preference order. var supportedHostKeyAlgos = []string{ - CertSigAlgoRSASHA2512v01, CertSigAlgoRSASHA2256v01, - CertSigAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, + CertAlgoRSASHA512v01, CertAlgoRSASHA256v01, + CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, - SigAlgoRSASHA2512, SigAlgoRSASHA2256, - SigAlgoRSA, KeyAlgoDSA, + KeyAlgoRSASHA512, KeyAlgoRSASHA256, + KeyAlgoRSA, KeyAlgoDSA, KeyAlgoED25519, } @@ -89,23 +89,33 @@ var supportedMACs = []string{ var supportedCompressions = []string{compressionNone} -// hashFuncs keeps the mapping of supported algorithms to their respective -// hashes needed for signature verification. +// hashFuncs keeps the mapping of supported signature algorithms to their +// respective hashes needed for signing and verification. var hashFuncs = map[string]crypto.Hash{ - SigAlgoRSA: crypto.SHA1, - SigAlgoRSASHA2256: crypto.SHA256, - SigAlgoRSASHA2512: crypto.SHA512, - KeyAlgoDSA: crypto.SHA1, - KeyAlgoECDSA256: crypto.SHA256, - KeyAlgoECDSA384: crypto.SHA384, - KeyAlgoECDSA521: crypto.SHA512, - CertSigAlgoRSAv01: crypto.SHA1, - CertSigAlgoRSASHA2256v01: crypto.SHA256, - CertSigAlgoRSASHA2512v01: crypto.SHA512, - CertAlgoDSAv01: crypto.SHA1, - CertAlgoECDSA256v01: crypto.SHA256, - CertAlgoECDSA384v01: crypto.SHA384, - CertAlgoECDSA521v01: crypto.SHA512, + KeyAlgoRSA: crypto.SHA1, + KeyAlgoRSASHA256: crypto.SHA256, + KeyAlgoRSASHA512: crypto.SHA512, + KeyAlgoDSA: crypto.SHA1, + KeyAlgoECDSA256: crypto.SHA256, + KeyAlgoECDSA384: crypto.SHA384, + KeyAlgoECDSA521: crypto.SHA512, + // KeyAlgoED25519 doesn't pre-hash. + KeyAlgoSKECDSA256: crypto.SHA256, + KeyAlgoSKED25519: crypto.SHA256, +} + +// algorithmsForKeyFormat returns the supported signature algorithms for a given +// public key format (PublicKey.Type), in order of preference. See RFC 8332, +// Section 2. See also the note in sendKexInit on backwards compatibility. +func algorithmsForKeyFormat(keyFormat string) []string { + switch keyFormat { + case KeyAlgoRSA: + return []string{KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoRSA} + case CertAlgoRSAv01: + return []string{CertAlgoRSASHA256v01, CertAlgoRSASHA512v01, CertAlgoRSAv01} + default: + return []string{keyFormat} + } } // unexpectedMessageError results when the SSH message that we received didn't @@ -152,6 +162,11 @@ func (a *directionAlgorithms) rekeyBytes() int64 { return 1 << 30 } +var aeadCiphers = map[string]bool{ + gcmCipherID: true, + chacha20Poly1305ID: true, +} + type algorithms struct { kex string hostKey string @@ -187,14 +202,18 @@ func findAgreedAlgorithms(isClient bool, clientKexInit, serverKexInit *kexInitMs return } - ctos.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer) - if err != nil { - return + if !aeadCiphers[ctos.Cipher] { + ctos.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer) + if err != nil { + return + } } - stoc.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient) - if err != nil { - return + if !aeadCiphers[stoc.Cipher] { + stoc.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient) + if err != nil { + return + } } ctos.Compression, err = findCommon("client to server compression", clientKexInit.CompressionClientServer, serverKexInit.CompressionClientServer) @@ -278,8 +297,9 @@ func (c *Config) SetDefaults() { } // buildDataSignedForAuth returns the data that is signed in order to prove -// possession of a private key. See RFC 4252, section 7. -func buildDataSignedForAuth(sessionID []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte { +// possession of a private key. See RFC 4252, section 7. algo is the advertised +// algorithm, and may be a certificate type. +func buildDataSignedForAuth(sessionID []byte, req userAuthRequestMsg, algo string, pubKey []byte) []byte { data := struct { Session []byte Type byte @@ -287,7 +307,7 @@ func buildDataSignedForAuth(sessionID []byte, req userAuthRequestMsg, algo, pubK Service string Method string Sign bool - Algo []byte + Algo string PubKey []byte }{ sessionID, diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go index 05ad49c3..f815cdb4 100644 --- a/vendor/golang.org/x/crypto/ssh/handshake.go +++ b/vendor/golang.org/x/crypto/ssh/handshake.go @@ -455,21 +455,36 @@ func (t *handshakeTransport) sendKexInit() error { } io.ReadFull(rand.Reader, msg.Cookie[:]) - if len(t.hostKeys) > 0 { + isServer := len(t.hostKeys) > 0 + if isServer { for _, k := range t.hostKeys { - algo := k.PublicKey().Type() - switch algo { - case KeyAlgoRSA: - msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, []string{SigAlgoRSASHA2512, SigAlgoRSASHA2256, SigAlgoRSA}...) - case CertAlgoRSAv01: - msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, []string{CertSigAlgoRSASHA2512v01, CertSigAlgoRSASHA2256v01, CertSigAlgoRSAv01}...) - default: - msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, algo) + // If k is an AlgorithmSigner, presume it supports all signature algorithms + // associated with the key format. (Ideally AlgorithmSigner would have a + // method to advertise supported algorithms, but it doesn't. This means that + // adding support for a new algorithm is a breaking change, as we will + // immediately negotiate it even if existing implementations don't support + // it. If that ever happens, we'll have to figure something out.) + // If k is not an AlgorithmSigner, we can only assume it only supports the + // algorithms that matches the key format. (This means that Sign can't pick + // a different default.) + keyFormat := k.PublicKey().Type() + if _, ok := k.(AlgorithmSigner); ok { + msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, algorithmsForKeyFormat(keyFormat)...) + } else { + msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, keyFormat) } } } else { msg.ServerHostKeyAlgos = t.hostKeyAlgorithms + + // As a client we opt in to receiving SSH_MSG_EXT_INFO so we know what + // algorithms the server supports for public key authentication. See RFC + // 8303, Section 2.1. + msg.KexAlgos = make([]string, 0, len(t.config.KeyExchanges)+1) + msg.KexAlgos = append(msg.KexAlgos, t.config.KeyExchanges...) + msg.KexAlgos = append(msg.KexAlgos, "ext-info-c") } + packet := Marshal(msg) // writePacket destroys the contents, so save a copy. @@ -589,9 +604,9 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { var result *kexResult if len(t.hostKeys) > 0 { - result, err = t.server(kex, t.algorithms, &magics) + result, err = t.server(kex, &magics) } else { - result, err = t.client(kex, t.algorithms, &magics) + result, err = t.client(kex, &magics) } if err != nil { @@ -618,33 +633,52 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { return nil } -func (t *handshakeTransport) server(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { - var hostKey Signer - for _, k := range t.hostKeys { - kt := k.PublicKey().Type() - if kt == algs.hostKey { - hostKey = k - } else if signer, ok := k.(AlgorithmSigner); ok { - // Some signature algorithms don't show up as key types - // so we have to manually check for a compatible host key. - switch kt { - case KeyAlgoRSA: - if algs.hostKey == SigAlgoRSASHA2256 || algs.hostKey == SigAlgoRSASHA2512 { - hostKey = &rsaSigner{signer, algs.hostKey} - } - case CertAlgoRSAv01: - if algs.hostKey == CertSigAlgoRSASHA2256v01 || algs.hostKey == CertSigAlgoRSASHA2512v01 { - hostKey = &rsaSigner{signer, certToPrivAlgo(algs.hostKey)} - } +// algorithmSignerWrapper is an AlgorithmSigner that only supports the default +// key format algorithm. +// +// This is technically a violation of the AlgorithmSigner interface, but it +// should be unreachable given where we use this. Anyway, at least it returns an +// error instead of panicing or producing an incorrect signature. +type algorithmSignerWrapper struct { + Signer +} + +func (a algorithmSignerWrapper) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { + if algorithm != underlyingAlgo(a.PublicKey().Type()) { + return nil, errors.New("ssh: internal error: algorithmSignerWrapper invoked with non-default algorithm") + } + return a.Sign(rand, data) +} + +func pickHostKey(hostKeys []Signer, algo string) AlgorithmSigner { + for _, k := range hostKeys { + if algo == k.PublicKey().Type() { + return algorithmSignerWrapper{k} + } + k, ok := k.(AlgorithmSigner) + if !ok { + continue + } + for _, a := range algorithmsForKeyFormat(k.PublicKey().Type()) { + if algo == a { + return k } } } + return nil +} - r, err := kex.Server(t.conn, t.config.Rand, magics, hostKey) +func (t *handshakeTransport) server(kex kexAlgorithm, magics *handshakeMagics) (*kexResult, error) { + hostKey := pickHostKey(t.hostKeys, t.algorithms.hostKey) + if hostKey == nil { + return nil, errors.New("ssh: internal error: negotiated unsupported signature type") + } + + r, err := kex.Server(t.conn, t.config.Rand, magics, hostKey, t.algorithms.hostKey) return r, err } -func (t *handshakeTransport) client(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { +func (t *handshakeTransport) client(kex kexAlgorithm, magics *handshakeMagics) (*kexResult, error) { result, err := kex.Client(t.conn, t.config.Rand, magics) if err != nil { return nil, err @@ -655,7 +689,7 @@ func (t *handshakeTransport) client(kex kexAlgorithm, algs *algorithms, magics * return nil, err } - if err := verifyHostKeySignature(hostKey, algs.hostKey, result); err != nil { + if err := verifyHostKeySignature(hostKey, t.algorithms.hostKey, result); err != nil { return nil, err } diff --git a/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/golang.org/x/crypto/ssh/kex.go index 766e9293..927a90cd 100644 --- a/vendor/golang.org/x/crypto/ssh/kex.go +++ b/vendor/golang.org/x/crypto/ssh/kex.go @@ -20,12 +20,14 @@ import ( ) const ( - kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1" - kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1" - kexAlgoECDH256 = "ecdh-sha2-nistp256" - kexAlgoECDH384 = "ecdh-sha2-nistp384" - kexAlgoECDH521 = "ecdh-sha2-nistp521" - kexAlgoCurve25519SHA256 = "curve25519-sha256@libssh.org" + kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1" + kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1" + kexAlgoDH14SHA256 = "diffie-hellman-group14-sha256" + kexAlgoECDH256 = "ecdh-sha2-nistp256" + kexAlgoECDH384 = "ecdh-sha2-nistp384" + kexAlgoECDH521 = "ecdh-sha2-nistp521" + kexAlgoCurve25519SHA256LibSSH = "curve25519-sha256@libssh.org" + kexAlgoCurve25519SHA256 = "curve25519-sha256" // For the following kex only the client half contains a production // ready implementation. The server half only consists of a minimal @@ -75,8 +77,9 @@ func (m *handshakeMagics) write(w io.Writer) { // kexAlgorithm abstracts different key exchange algorithms. type kexAlgorithm interface { // Server runs server-side key agreement, signing the result - // with a hostkey. - Server(p packetConn, rand io.Reader, magics *handshakeMagics, s Signer) (*kexResult, error) + // with a hostkey. algo is the negotiated algorithm, and may + // be a certificate type. + Server(p packetConn, rand io.Reader, magics *handshakeMagics, s AlgorithmSigner, algo string) (*kexResult, error) // Client runs the client-side key agreement. Caller is // responsible for verifying the host key signature. @@ -86,6 +89,7 @@ type kexAlgorithm interface { // dhGroup is a multiplicative group suitable for implementing Diffie-Hellman key agreement. type dhGroup struct { g, p, pMinus1 *big.Int + hashFunc crypto.Hash } func (group *dhGroup) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, error) { @@ -96,8 +100,6 @@ func (group *dhGroup) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, } func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { - hashFunc := crypto.SHA1 - var x *big.Int for { var err error @@ -132,7 +134,7 @@ func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handsha return nil, err } - h := hashFunc.New() + h := group.hashFunc.New() magics.write(h) writeString(h, kexDHReply.HostKey) writeInt(h, X) @@ -146,12 +148,11 @@ func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handsha K: K, HostKey: kexDHReply.HostKey, Signature: kexDHReply.Signature, - Hash: crypto.SHA1, + Hash: group.hashFunc, }, nil } -func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { - hashFunc := crypto.SHA1 +func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv AlgorithmSigner, algo string) (result *kexResult, err error) { packet, err := c.readPacket() if err != nil { return @@ -179,7 +180,7 @@ func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handsha hostKeyBytes := priv.PublicKey().Marshal() - h := hashFunc.New() + h := group.hashFunc.New() magics.write(h) writeString(h, hostKeyBytes) writeInt(h, kexDHInit.X) @@ -193,7 +194,7 @@ func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handsha // H is already a hash, but the hostkey signing will apply its // own key-specific hash algorithm. - sig, err := signAndMarshal(priv, randSource, H) + sig, err := signAndMarshal(priv, randSource, H, algo) if err != nil { return nil, err } @@ -211,7 +212,7 @@ func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handsha K: K, HostKey: hostKeyBytes, Signature: sig, - Hash: crypto.SHA1, + Hash: group.hashFunc, }, err } @@ -314,7 +315,7 @@ func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool { return true } -func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { +func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv AlgorithmSigner, algo string) (result *kexResult, err error) { packet, err := c.readPacket() if err != nil { return nil, err @@ -359,7 +360,7 @@ func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, p // H is already a hash, but the hostkey signing will apply its // own key-specific hash algorithm. - sig, err := signAndMarshal(priv, rand, H) + sig, err := signAndMarshal(priv, rand, H, algo) if err != nil { return nil, err } @@ -384,39 +385,62 @@ func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, p }, nil } +// ecHash returns the hash to match the given elliptic curve, see RFC +// 5656, section 6.2.1 +func ecHash(curve elliptic.Curve) crypto.Hash { + bitSize := curve.Params().BitSize + switch { + case bitSize <= 256: + return crypto.SHA256 + case bitSize <= 384: + return crypto.SHA384 + } + return crypto.SHA512 +} + var kexAlgoMap = map[string]kexAlgorithm{} func init() { - // This is the group called diffie-hellman-group1-sha1 in RFC - // 4253 and Oakley Group 2 in RFC 2409. + // This is the group called diffie-hellman-group1-sha1 in + // RFC 4253 and Oakley Group 2 in RFC 2409. p, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF", 16) kexAlgoMap[kexAlgoDH1SHA1] = &dhGroup{ + g: new(big.Int).SetInt64(2), + p: p, + pMinus1: new(big.Int).Sub(p, bigOne), + hashFunc: crypto.SHA1, + } + + // This are the groups called diffie-hellman-group14-sha1 and + // diffie-hellman-group14-sha256 in RFC 4253 and RFC 8268, + // and Oakley Group 14 in RFC 3526. + p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16) + group14 := &dhGroup{ g: new(big.Int).SetInt64(2), p: p, pMinus1: new(big.Int).Sub(p, bigOne), } - // This is the group called diffie-hellman-group14-sha1 in RFC - // 4253 and Oakley Group 14 in RFC 3526. - p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16) - kexAlgoMap[kexAlgoDH14SHA1] = &dhGroup{ - g: new(big.Int).SetInt64(2), - p: p, - pMinus1: new(big.Int).Sub(p, bigOne), + g: group14.g, p: group14.p, pMinus1: group14.pMinus1, + hashFunc: crypto.SHA1, + } + kexAlgoMap[kexAlgoDH14SHA256] = &dhGroup{ + g: group14.g, p: group14.p, pMinus1: group14.pMinus1, + hashFunc: crypto.SHA256, } kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()} kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()} kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()} kexAlgoMap[kexAlgoCurve25519SHA256] = &curve25519sha256{} + kexAlgoMap[kexAlgoCurve25519SHA256LibSSH] = &curve25519sha256{} kexAlgoMap[kexAlgoDHGEXSHA1] = &dhGEXSHA{hashFunc: crypto.SHA1} kexAlgoMap[kexAlgoDHGEXSHA256] = &dhGEXSHA{hashFunc: crypto.SHA256} } -// curve25519sha256 implements the curve25519-sha256@libssh.org key -// agreement protocol, as described in -// https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt +// curve25519sha256 implements the curve25519-sha256 (formerly known as +// curve25519-sha256@libssh.org) key exchange method, as described in RFC 8731. type curve25519sha256 struct{} type curve25519KeyPair struct { @@ -486,7 +510,7 @@ func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handsh }, nil } -func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { +func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv AlgorithmSigner, algo string) (result *kexResult, err error) { packet, err := c.readPacket() if err != nil { return @@ -527,7 +551,7 @@ func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handsh H := h.Sum(nil) - sig, err := signAndMarshal(priv, rand, H) + sig, err := signAndMarshal(priv, rand, H, algo) if err != nil { return nil, err } @@ -553,7 +577,6 @@ func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handsh // diffie-hellman-group-exchange-sha256 key agreement protocols, // as described in RFC 4419 type dhGEXSHA struct { - g, p *big.Int hashFunc crypto.Hash } @@ -563,14 +586,7 @@ const ( dhGroupExchangeMaximumBits = 8192 ) -func (gex *dhGEXSHA) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, error) { - if theirPublic.Sign() <= 0 || theirPublic.Cmp(gex.p) >= 0 { - return nil, fmt.Errorf("ssh: DH parameter out of bounds") - } - return new(big.Int).Exp(theirPublic, myPrivate, gex.p), nil -} - -func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { +func (gex *dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { // Send GexRequest kexDHGexRequest := kexDHGexRequestMsg{ MinBits: dhGroupExchangeMinimumBits, @@ -587,35 +603,29 @@ func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshake return nil, err } - var kexDHGexGroup kexDHGexGroupMsg - if err = Unmarshal(packet, &kexDHGexGroup); err != nil { + var msg kexDHGexGroupMsg + if err = Unmarshal(packet, &msg); err != nil { return nil, err } // reject if p's bit length < dhGroupExchangeMinimumBits or > dhGroupExchangeMaximumBits - if kexDHGexGroup.P.BitLen() < dhGroupExchangeMinimumBits || kexDHGexGroup.P.BitLen() > dhGroupExchangeMaximumBits { - return nil, fmt.Errorf("ssh: server-generated gex p is out of range (%d bits)", kexDHGexGroup.P.BitLen()) + if msg.P.BitLen() < dhGroupExchangeMinimumBits || msg.P.BitLen() > dhGroupExchangeMaximumBits { + return nil, fmt.Errorf("ssh: server-generated gex p is out of range (%d bits)", msg.P.BitLen()) } - gex.p = kexDHGexGroup.P - gex.g = kexDHGexGroup.G - - // Check if g is safe by verifing that g > 1 and g < p - 1 - one := big.NewInt(1) - var pMinusOne = &big.Int{} - pMinusOne.Sub(gex.p, one) - if gex.g.Cmp(one) != 1 && gex.g.Cmp(pMinusOne) != -1 { + // Check if g is safe by verifying that 1 < g < p-1 + pMinusOne := new(big.Int).Sub(msg.P, bigOne) + if msg.G.Cmp(bigOne) <= 0 || msg.G.Cmp(pMinusOne) >= 0 { return nil, fmt.Errorf("ssh: server provided gex g is not safe") } // Send GexInit - var pHalf = &big.Int{} - pHalf.Rsh(gex.p, 1) + pHalf := new(big.Int).Rsh(msg.P, 1) x, err := rand.Int(randSource, pHalf) if err != nil { return nil, err } - X := new(big.Int).Exp(gex.g, x, gex.p) + X := new(big.Int).Exp(msg.G, x, msg.P) kexDHGexInit := kexDHGexInitMsg{ X: X, } @@ -634,13 +644,13 @@ func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshake return nil, err } - kInt, err := gex.diffieHellman(kexDHGexReply.Y, x) - if err != nil { - return nil, err + if kexDHGexReply.Y.Cmp(bigOne) <= 0 || kexDHGexReply.Y.Cmp(pMinusOne) >= 0 { + return nil, errors.New("ssh: DH parameter out of bounds") } + kInt := new(big.Int).Exp(kexDHGexReply.Y, x, msg.P) - // Check if k is safe by verifing that k > 1 and k < p - 1 - if kInt.Cmp(one) != 1 && kInt.Cmp(pMinusOne) != -1 { + // Check if k is safe by verifying that k > 1 and k < p - 1 + if kInt.Cmp(bigOne) <= 0 || kInt.Cmp(pMinusOne) >= 0 { return nil, fmt.Errorf("ssh: derived k is not safe") } @@ -650,8 +660,8 @@ func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshake binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMinimumBits)) binary.Write(h, binary.BigEndian, uint32(dhGroupExchangePreferredBits)) binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMaximumBits)) - writeInt(h, gex.p) - writeInt(h, gex.g) + writeInt(h, msg.P) + writeInt(h, msg.G) writeInt(h, X) writeInt(h, kexDHGexReply.Y) K := make([]byte, intLength(kInt)) @@ -670,7 +680,7 @@ func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshake // Server half implementation of the Diffie Hellman Key Exchange with SHA1 and SHA256. // // This is a minimal implementation to satisfy the automated tests. -func (gex dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { +func (gex dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv AlgorithmSigner, algo string) (result *kexResult, err error) { // Receive GexRequest packet, err := c.readPacket() if err != nil { @@ -681,35 +691,17 @@ func (gex dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshake return } - // smoosh the user's preferred size into our own limits - if kexDHGexRequest.PreferedBits > dhGroupExchangeMaximumBits { - kexDHGexRequest.PreferedBits = dhGroupExchangeMaximumBits - } - if kexDHGexRequest.PreferedBits < dhGroupExchangeMinimumBits { - kexDHGexRequest.PreferedBits = dhGroupExchangeMinimumBits - } - // fix min/max if they're inconsistent. technically, we could just pout - // and hang up, but there's no harm in giving them the benefit of the - // doubt and just picking a bitsize for them. - if kexDHGexRequest.MinBits > kexDHGexRequest.PreferedBits { - kexDHGexRequest.MinBits = kexDHGexRequest.PreferedBits - } - if kexDHGexRequest.MaxBits < kexDHGexRequest.PreferedBits { - kexDHGexRequest.MaxBits = kexDHGexRequest.PreferedBits - } - // Send GexGroup // This is the group called diffie-hellman-group14-sha1 in RFC // 4253 and Oakley Group 14 in RFC 3526. p, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16) - gex.p = p - gex.g = big.NewInt(2) + g := big.NewInt(2) - kexDHGexGroup := kexDHGexGroupMsg{ - P: gex.p, - G: gex.g, + msg := &kexDHGexGroupMsg{ + P: p, + G: g, } - if err := c.writePacket(Marshal(&kexDHGexGroup)); err != nil { + if err := c.writePacket(Marshal(msg)); err != nil { return nil, err } @@ -723,19 +715,19 @@ func (gex dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshake return } - var pHalf = &big.Int{} - pHalf.Rsh(gex.p, 1) + pHalf := new(big.Int).Rsh(p, 1) y, err := rand.Int(randSource, pHalf) if err != nil { return } + Y := new(big.Int).Exp(g, y, p) - Y := new(big.Int).Exp(gex.g, y, gex.p) - kInt, err := gex.diffieHellman(kexDHGexInit.X, y) - if err != nil { - return nil, err + pMinusOne := new(big.Int).Sub(p, bigOne) + if kexDHGexInit.X.Cmp(bigOne) <= 0 || kexDHGexInit.X.Cmp(pMinusOne) >= 0 { + return nil, errors.New("ssh: DH parameter out of bounds") } + kInt := new(big.Int).Exp(kexDHGexInit.X, y, p) hostKeyBytes := priv.PublicKey().Marshal() @@ -745,8 +737,8 @@ func (gex dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshake binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMinimumBits)) binary.Write(h, binary.BigEndian, uint32(dhGroupExchangePreferredBits)) binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMaximumBits)) - writeInt(h, gex.p) - writeInt(h, gex.g) + writeInt(h, p) + writeInt(h, g) writeInt(h, kexDHGexInit.X) writeInt(h, Y) @@ -758,7 +750,7 @@ func (gex dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshake // H is already a hash, but the hostkey signing will apply its // own key-specific hash algorithm. - sig, err := signAndMarshal(priv, randSource, H) + sig, err := signAndMarshal(priv, randSource, H, algo) if err != nil { return nil, err } diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index c67d3a31..1c7de1a6 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -30,8 +30,9 @@ import ( "golang.org/x/crypto/ssh/internal/bcrypt_pbkdf" ) -// These constants represent the algorithm names for key types supported by this -// package. +// Public key algorithms names. These values can appear in PublicKey.Type, +// ClientConfig.HostKeyAlgorithms, Signature.Format, or as AlgorithmSigner +// arguments. const ( KeyAlgoRSA = "ssh-rsa" KeyAlgoDSA = "ssh-dss" @@ -41,16 +42,21 @@ const ( KeyAlgoECDSA521 = "ecdsa-sha2-nistp521" KeyAlgoED25519 = "ssh-ed25519" KeyAlgoSKED25519 = "sk-ssh-ed25519@openssh.com" + + // KeyAlgoRSASHA256 and KeyAlgoRSASHA512 are only public key algorithms, not + // public key formats, so they can't appear as a PublicKey.Type. The + // corresponding PublicKey.Type is KeyAlgoRSA. See RFC 8332, Section 2. + KeyAlgoRSASHA256 = "rsa-sha2-256" + KeyAlgoRSASHA512 = "rsa-sha2-512" ) -// These constants represent non-default signature algorithms that are supported -// as algorithm parameters to AlgorithmSigner.SignWithAlgorithm methods. See -// [PROTOCOL.agent] section 4.5.1 and -// https://tools.ietf.org/html/draft-ietf-curdle-rsa-sha2-10 const ( - SigAlgoRSA = "ssh-rsa" - SigAlgoRSASHA2256 = "rsa-sha2-256" - SigAlgoRSASHA2512 = "rsa-sha2-512" + // Deprecated: use KeyAlgoRSA. + SigAlgoRSA = KeyAlgoRSA + // Deprecated: use KeyAlgoRSASHA256. + SigAlgoRSASHA2256 = KeyAlgoRSASHA256 + // Deprecated: use KeyAlgoRSASHA512. + SigAlgoRSASHA2512 = KeyAlgoRSASHA512 ) // parsePubKey parses a public key of the given algorithm. @@ -70,7 +76,7 @@ func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err err case KeyAlgoSKED25519: return parseSKEd25519(in) case CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoSKECDSA256v01, CertAlgoED25519v01, CertAlgoSKED25519v01: - cert, err := parseCert(in, certToPrivAlgo(algo)) + cert, err := parseCert(in, certKeyAlgoNames[algo]) if err != nil { return nil, nil, err } @@ -289,18 +295,21 @@ func MarshalAuthorizedKey(key PublicKey) []byte { return b.Bytes() } -// PublicKey is an abstraction of different types of public keys. +// PublicKey represents a public key using an unspecified algorithm. +// +// Some PublicKeys provided by this package also implement CryptoPublicKey. type PublicKey interface { - // Type returns the key's type, e.g. "ssh-rsa". + // Type returns the key format name, e.g. "ssh-rsa". Type() string - // Marshal returns the serialized key data in SSH wire format, - // with the name prefix. To unmarshal the returned data, use - // the ParsePublicKey function. + // Marshal returns the serialized key data in SSH wire format, with the name + // prefix. To unmarshal the returned data, use the ParsePublicKey function. Marshal() []byte - // Verify that sig is a signature on the given data using this - // key. This function will hash the data appropriately first. + // Verify that sig is a signature on the given data using this key. This + // method will hash the data appropriately first. sig.Format is allowed to + // be any signature algorithm compatible with the key type, the caller + // should check if it has more stringent requirements. Verify(data []byte, sig *Signature) error } @@ -311,25 +320,32 @@ type CryptoPublicKey interface { } // A Signer can create signatures that verify against a public key. +// +// Some Signers provided by this package also implement AlgorithmSigner. type Signer interface { - // PublicKey returns an associated PublicKey instance. + // PublicKey returns the associated PublicKey. PublicKey() PublicKey - // Sign returns raw signature for the given data. This method - // will apply the hash specified for the keytype to the data. + // Sign returns a signature for the given data. This method will hash the + // data appropriately first. The signature algorithm is expected to match + // the key format returned by the PublicKey.Type method (and not to be any + // alternative algorithm supported by the key format). Sign(rand io.Reader, data []byte) (*Signature, error) } -// A AlgorithmSigner is a Signer that also supports specifying a specific -// algorithm to use for signing. +// An AlgorithmSigner is a Signer that also supports specifying an algorithm to +// use for signing. +// +// An AlgorithmSigner can't advertise the algorithms it supports, so it should +// be prepared to be invoked with every algorithm supported by the public key +// format. type AlgorithmSigner interface { Signer - // SignWithAlgorithm is like Signer.Sign, but allows specification of a - // non-default signing algorithm. See the SigAlgo* constants in this - // package for signature algorithms supported by this package. Callers may - // pass an empty string for the algorithm in which case the AlgorithmSigner - // will use its default algorithm. + // SignWithAlgorithm is like Signer.Sign, but allows specifying a desired + // signing algorithm. Callers may pass an empty string for the algorithm in + // which case the AlgorithmSigner will use a default algorithm. This default + // doesn't currently control any behavior in this package. SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) } @@ -381,17 +397,11 @@ func (r *rsaPublicKey) Marshal() []byte { } func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error { - var hash crypto.Hash - switch sig.Format { - case SigAlgoRSA: - hash = crypto.SHA1 - case SigAlgoRSASHA2256: - hash = crypto.SHA256 - case SigAlgoRSASHA2512: - hash = crypto.SHA512 - default: + supportedAlgos := algorithmsForKeyFormat(r.Type()) + if !contains(supportedAlgos, sig.Format) { return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, r.Type()) } + hash := hashFuncs[sig.Format] h := hash.New() h.Write(data) digest := h.Sum(nil) @@ -466,7 +476,7 @@ func (k *dsaPublicKey) Verify(data []byte, sig *Signature) error { if sig.Format != k.Type() { return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) } - h := crypto.SHA1.New() + h := hashFuncs[sig.Format].New() h.Write(data) digest := h.Sum(nil) @@ -499,7 +509,7 @@ func (k *dsaPrivateKey) PublicKey() PublicKey { } func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) { - return k.SignWithAlgorithm(rand, data, "") + return k.SignWithAlgorithm(rand, data, k.PublicKey().Type()) } func (k *dsaPrivateKey) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { @@ -507,7 +517,7 @@ func (k *dsaPrivateKey) SignWithAlgorithm(rand io.Reader, data []byte, algorithm return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm) } - h := crypto.SHA1.New() + h := hashFuncs[k.PublicKey().Type()].New() h.Write(data) digest := h.Sum(nil) r, s, err := dsa.Sign(rand, k.PrivateKey, digest) @@ -603,19 +613,6 @@ func supportedEllipticCurve(curve elliptic.Curve) bool { return curve == elliptic.P256() || curve == elliptic.P384() || curve == elliptic.P521() } -// ecHash returns the hash to match the given elliptic curve, see RFC -// 5656, section 6.2.1 -func ecHash(curve elliptic.Curve) crypto.Hash { - bitSize := curve.Params().BitSize - switch { - case bitSize <= 256: - return crypto.SHA256 - case bitSize <= 384: - return crypto.SHA384 - } - return crypto.SHA512 -} - // parseECDSA parses an ECDSA key according to RFC 5656, section 3.1. func parseECDSA(in []byte) (out PublicKey, rest []byte, err error) { var w struct { @@ -671,7 +668,7 @@ func (k *ecdsaPublicKey) Verify(data []byte, sig *Signature) error { return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) } - h := ecHash(k.Curve).New() + h := hashFuncs[sig.Format].New() h.Write(data) digest := h.Sum(nil) @@ -775,7 +772,7 @@ func (k *skECDSAPublicKey) Verify(data []byte, sig *Signature) error { return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) } - h := ecHash(k.Curve).New() + h := hashFuncs[sig.Format].New() h.Write([]byte(k.application)) appDigest := h.Sum(nil) @@ -874,7 +871,7 @@ func (k *skEd25519PublicKey) Verify(data []byte, sig *Signature) error { return fmt.Errorf("invalid size %d for Ed25519 public key", l) } - h := sha256.New() + h := hashFuncs[sig.Format].New() h.Write([]byte(k.application)) appDigest := h.Sum(nil) @@ -939,15 +936,6 @@ func newDSAPrivateKey(key *dsa.PrivateKey) (Signer, error) { return &dsaPrivateKey{key}, nil } -type rsaSigner struct { - AlgorithmSigner - defaultAlgorithm string -} - -func (s *rsaSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { - return s.AlgorithmSigner.SignWithAlgorithm(rand, data, s.defaultAlgorithm) -} - type wrappedSigner struct { signer crypto.Signer pubKey PublicKey @@ -970,44 +958,20 @@ func (s *wrappedSigner) PublicKey() PublicKey { } func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { - return s.SignWithAlgorithm(rand, data, "") + return s.SignWithAlgorithm(rand, data, s.pubKey.Type()) } func (s *wrappedSigner) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { - var hashFunc crypto.Hash - - if _, ok := s.pubKey.(*rsaPublicKey); ok { - // RSA keys support a few hash functions determined by the requested signature algorithm - switch algorithm { - case "", SigAlgoRSA: - algorithm = SigAlgoRSA - hashFunc = crypto.SHA1 - case SigAlgoRSASHA2256: - hashFunc = crypto.SHA256 - case SigAlgoRSASHA2512: - hashFunc = crypto.SHA512 - default: - return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm) - } - } else { - // The only supported algorithm for all other key types is the same as the type of the key - if algorithm == "" { - algorithm = s.pubKey.Type() - } else if algorithm != s.pubKey.Type() { - return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm) - } - - switch key := s.pubKey.(type) { - case *dsaPublicKey: - hashFunc = crypto.SHA1 - case *ecdsaPublicKey: - hashFunc = ecHash(key.Curve) - case ed25519PublicKey: - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) - } + if algorithm == "" { + algorithm = s.pubKey.Type() } + supportedAlgos := algorithmsForKeyFormat(s.pubKey.Type()) + if !contains(supportedAlgos, algorithm) { + return nil, fmt.Errorf("ssh: unsupported signature algorithm %q for key format %q", algorithm, s.pubKey.Type()) + } + + hashFunc := hashFuncs[algorithm] var digest []byte if hashFunc != 0 { h := hashFunc.New() diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go index ac41a416..19bc67c4 100644 --- a/vendor/golang.org/x/crypto/ssh/messages.go +++ b/vendor/golang.org/x/crypto/ssh/messages.go @@ -141,6 +141,14 @@ type serviceAcceptMsg struct { Service string `sshtype:"6"` } +// See RFC 8308, section 2.3 +const msgExtInfo = 7 + +type extInfoMsg struct { + NumExtensions uint32 `sshtype:"7"` + Payload []byte `ssh:"rest"` +} + // See RFC 4252, section 5. const msgUserAuthRequest = 50 @@ -180,11 +188,11 @@ const msgUserAuthInfoRequest = 60 const msgUserAuthInfoResponse = 61 type userAuthInfoRequestMsg struct { - User string `sshtype:"60"` - Instruction string - DeprecatedLanguage string - NumPrompts uint32 - Prompts []byte `ssh:"rest"` + Name string `sshtype:"60"` + Instruction string + Language string + NumPrompts uint32 + Prompts []byte `ssh:"rest"` } // See RFC 4254, section 5.1. @@ -782,6 +790,8 @@ func decode(packet []byte) (interface{}, error) { msg = new(serviceRequestMsg) case msgServiceAccept: msg = new(serviceAcceptMsg) + case msgExtInfo: + msg = new(extInfoMsg) case msgKexInit: msg = new(kexInitMsg) case msgKexDHInit: @@ -843,6 +853,7 @@ var packetTypeNames = map[byte]string{ msgDisconnect: "disconnectMsg", msgServiceRequest: "serviceRequestMsg", msgServiceAccept: "serviceAcceptMsg", + msgExtInfo: "extInfoMsg", msgKexInit: "kexInitMsg", msgKexDHInit: "kexDHInitMsg", msgKexDHReply: "kexDHReplyMsg", diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index bf5364c3..70045bdf 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -120,7 +120,7 @@ type ServerConfig struct { } // AddHostKey adds a private key as a host key. If an existing host -// key exists with the same algorithm, it is overwritten. Each server +// key exists with the same public key format, it is replaced. Each server // config must have at least one host key. func (s *ServerConfig) AddHostKey(key Signer) { for i, k := range s.hostKeys { @@ -212,9 +212,10 @@ func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewCha } // signAndMarshal signs the data with the appropriate algorithm, -// and serializes the result in SSH wire format. -func signAndMarshal(k Signer, rand io.Reader, data []byte) ([]byte, error) { - sig, err := k.Sign(rand, data) +// and serializes the result in SSH wire format. algo is the negotiate +// algorithm and may be a certificate type. +func signAndMarshal(k AlgorithmSigner, rand io.Reader, data []byte, algo string) ([]byte, error) { + sig, err := k.SignWithAlgorithm(rand, data, underlyingAlgo(algo)) if err != nil { return nil, err } @@ -284,7 +285,7 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) func isAcceptableAlgo(algo string) bool { switch algo { - case SigAlgoRSA, SigAlgoRSASHA2256, SigAlgoRSASHA2512, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoSKECDSA256, KeyAlgoED25519, KeyAlgoSKED25519, + case KeyAlgoRSA, KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoSKECDSA256, KeyAlgoED25519, KeyAlgoSKED25519, CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoSKECDSA256v01, CertAlgoED25519v01, CertAlgoSKED25519v01: return true } @@ -553,6 +554,7 @@ userAuthLoop: if !ok || len(payload) > 0 { return nil, parseError(msgUserAuthRequest) } + // Ensure the public key algo and signature algo // are supported. Compare the private key // algorithm name that corresponds to algo with @@ -562,7 +564,12 @@ userAuthLoop: authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format) break } - signedData := buildDataSignedForAuth(sessionID, userAuthReq, algoBytes, pubKeyData) + if underlyingAlgo(algo) != sig.Format { + authErr = fmt.Errorf("ssh: signature %q not compatible with selected algorithm %q", sig.Format, algo) + break + } + + signedData := buildDataSignedForAuth(sessionID, userAuthReq, algo, pubKeyData) if err := pubKey.Verify(signedData, sig); err != nil { return nil, err @@ -694,7 +701,7 @@ type sshClientKeyboardInteractive struct { *connection } -func (c *sshClientKeyboardInteractive) Challenge(user, instruction string, questions []string, echos []bool) (answers []string, err error) { +func (c *sshClientKeyboardInteractive) Challenge(name, instruction string, questions []string, echos []bool) (answers []string, err error) { if len(questions) != len(echos) { return nil, errors.New("ssh: echos and questions must have equal length") } @@ -706,6 +713,7 @@ func (c *sshClientKeyboardInteractive) Challenge(user, instruction string, quest } if err := c.transport.writePacket(Marshal(&userAuthInfoRequestMsg{ + Name: name, Instruction: instruction, NumPrompts: uint32(len(questions)), Prompts: prompts, diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go index d3321f6b..eca31a22 100644 --- a/vendor/golang.org/x/crypto/ssh/session.go +++ b/vendor/golang.org/x/crypto/ssh/session.go @@ -85,6 +85,7 @@ const ( IXANY = 39 IXOFF = 40 IMAXBEL = 41 + IUTF8 = 42 // RFC 8160 ISIG = 50 ICANON = 51 XCASE = 52 diff --git a/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/golang.org/x/crypto/ssh/transport.go index 49ddc2e7..acf5a21b 100644 --- a/vendor/golang.org/x/crypto/ssh/transport.go +++ b/vendor/golang.org/x/crypto/ssh/transport.go @@ -238,15 +238,19 @@ var ( // (to setup server->client keys) or clientKeys (for client->server keys). func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (packetCipher, error) { cipherMode := cipherModes[algs.Cipher] - macMode := macModes[algs.MAC] iv := make([]byte, cipherMode.ivSize) key := make([]byte, cipherMode.keySize) - macKey := make([]byte, macMode.keySize) generateKeyMaterial(iv, d.ivTag, kex) generateKeyMaterial(key, d.keyTag, kex) - generateKeyMaterial(macKey, d.macKeyTag, kex) + + var macKey []byte + if !aeadCiphers[algs.Cipher] { + macMode := macModes[algs.MAC] + macKey = make([]byte, macMode.keySize) + generateKeyMaterial(macKey, d.macKeyTag, kex) + } return cipherModes[algs.Cipher].create(key, iv, macKey, algs) } diff --git a/vendor/modernc.org/cc/v3/Makefile b/vendor/modernc.org/cc/v3/Makefile index af921559..61962ecd 100644 --- a/vendor/modernc.org/cc/v3/Makefile +++ b/vendor/modernc.org/cc/v3/Makefile @@ -61,12 +61,14 @@ test_windows386: build_all_targets: GOOS=darwin GOARCH=amd64 go build -v ./... GOOS=darwin GOARCH=arm64 go build -v ./... - GOOS=freebsd GOARCH=amd64 go build -v ./... GOOS=freebsd GOARCH=386 go build -v ./... + GOOS=freebsd GOARCH=amd64 go build -v ./... GOOS=linux GOARCH=386 go build -v ./... GOOS=linux GOARCH=amd64 go build -v ./... GOOS=linux GOARCH=arm go build -v ./... GOOS=linux GOARCH=arm64 go build -v ./... + GOOS=linux GOARCH=riscv64 go build -v ./... + GOOS=linux GOARCH=s390x go build -v ./... GOOS=netbsd GOARCH=amd64 go build -v ./... GOOS=windows GOARCH=386 go build -v ./... GOOS=windows GOARCH=amd64 go build -v ./... diff --git a/vendor/modernc.org/cc/v3/abi_platforms.go b/vendor/modernc.org/cc/v3/abi_platforms.go index 24c8d762..b393c2da 100644 --- a/vendor/modernc.org/cc/v3/abi_platforms.go +++ b/vendor/modernc.org/cc/v3/abi_platforms.go @@ -5,17 +5,19 @@ import "encoding/binary" // abiByteOrders contains byte order information for known architectures. var ( abiByteOrders = map[string]binary.ByteOrder{ - "amd64": binary.LittleEndian, - "386": binary.LittleEndian, - "arm": binary.LittleEndian, - "arm64": binary.LittleEndian, - "s390x": binary.BigEndian, + "386": binary.LittleEndian, + "amd64": binary.LittleEndian, + "arm": binary.LittleEndian, + "arm64": binary.LittleEndian, + "riscv64": binary.LittleEndian, + "s390x": binary.BigEndian, } abiSignedChar = map[[2]string]bool{ - {"linux", "arm"}: false, - {"linux", "arm64"}: false, - {"linux", "s390x"}: false, + {"linux", "arm"}: false, + {"linux", "arm64"}: false, + {"linux", "s390x"}: false, + {"linux", "riscv64"}: false, {"darwin", "amd64"}: true, {"darwin", "arm64"}: true, @@ -487,4 +489,41 @@ var abiTypes = map[[2]string]map[Kind]ABIType{ Int128: {16, 16, 16}, UInt128: {16, 16, 16}, }, + // gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 + {"linux", "riscv64"}: { + Void: {1, 1, 1}, + Bool: {1, 1, 1}, + Char: {1, 1, 1}, + SChar: {1, 1, 1}, + UChar: {1, 1, 1}, + Short: {2, 2, 2}, + UShort: {2, 2, 2}, + Enum: {4, 4, 4}, + Int: {4, 4, 4}, + UInt: {4, 4, 4}, + Long: {8, 8, 8}, + ULong: {8, 8, 8}, + LongLong: {8, 8, 8}, + ULongLong: {8, 8, 8}, + Ptr: {8, 8, 8}, + Function: {8, 8, 8}, + Float: {4, 4, 4}, + Double: {8, 8, 8}, + LongDouble: {16, 16, 16}, + Int8: {1, 1, 1}, + UInt8: {1, 1, 1}, + Int16: {2, 2, 2}, + UInt16: {2, 2, 2}, + Int32: {4, 4, 4}, + UInt32: {4, 4, 4}, + Int64: {8, 8, 8}, + UInt64: {8, 8, 8}, + Int128: {16, 16, 16}, + UInt128: {16, 16, 16}, + Float32: {4, 4, 4}, + Float32x: {8, 8, 8}, + Float64: {8, 8, 8}, + Float64x: {16, 16, 16}, + Float128: {16, 16, 16}, + }, } diff --git a/vendor/modernc.org/ccgo/v3/lib/Makefile b/vendor/modernc.org/ccgo/v3/lib/Makefile index d8e07d0f..552a4284 100644 --- a/vendor/modernc.org/ccgo/v3/lib/Makefile +++ b/vendor/modernc.org/ccgo/v3/lib/Makefile @@ -80,6 +80,7 @@ build_all_targets: GOOS=linux GOARCH=amd64 go test -c -o /dev/null GOOS=linux GOARCH=arm go test -c -o /dev/null GOOS=linux GOARCH=arm64 go test -c -o /dev/null + GOOS=linux GOARCH=riscv64 go test -c -o /dev/null GOOS=linux GOARCH=s390x go test -c -o /dev/null GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null diff --git a/vendor/modernc.org/libc/CONTRIBUTORS b/vendor/modernc.org/libc/CONTRIBUTORS index 65a90f50..2bed7daf 100644 --- a/vendor/modernc.org/libc/CONTRIBUTORS +++ b/vendor/modernc.org/libc/CONTRIBUTORS @@ -14,3 +14,4 @@ Jason DeBettencourt Koichi Shiraishi Marius Orcsik Steffen Butzer +ZHU Zijia diff --git a/vendor/modernc.org/libc/capi_linux_riscv64.go b/vendor/modernc.org/libc/capi_linux_riscv64.go new file mode 100644 index 00000000..b6f3b2a0 --- /dev/null +++ b/vendor/modernc.org/libc/capi_linux_riscv64.go @@ -0,0 +1,509 @@ +// Code generated by 'go generate' - DO NOT EDIT. + +package libc // import "modernc.org/libc" + +var CAPI = map[string]struct{}{ + "_IO_putc": {}, + "___errno_location": {}, + "__assert_fail": {}, + "__builtin___memcpy_chk": {}, + "__builtin___memmove_chk": {}, + "__builtin___memset_chk": {}, + "__builtin___snprintf_chk": {}, + "__builtin___sprintf_chk": {}, + "__builtin___strcat_chk": {}, + "__builtin___strcpy_chk": {}, + "__builtin___strncpy_chk": {}, + "__builtin___vsnprintf_chk": {}, + "__builtin_abort": {}, + "__builtin_abs": {}, + "__builtin_add_overflowInt64": {}, + "__builtin_add_overflowUint32": {}, + "__builtin_add_overflowUint64": {}, + "__builtin_bswap16": {}, + "__builtin_bswap32": {}, + "__builtin_bswap64": {}, + "__builtin_bzero": {}, + "__builtin_clz": {}, + "__builtin_clzl": {}, + "__builtin_clzll": {}, + "__builtin_constant_p_impl": {}, + "__builtin_copysign": {}, + "__builtin_copysignf": {}, + "__builtin_copysignl": {}, + "__builtin_exit": {}, + "__builtin_expect": {}, + "__builtin_fabs": {}, + "__builtin_fabsf": {}, + "__builtin_fabsl": {}, + "__builtin_free": {}, + "__builtin_getentropy": {}, + "__builtin_huge_val": {}, + "__builtin_huge_valf": {}, + "__builtin_inf": {}, + "__builtin_inff": {}, + "__builtin_infl": {}, + "__builtin_isnan": {}, + "__builtin_isunordered": {}, + "__builtin_malloc": {}, + "__builtin_memcmp": {}, + "__builtin_memcpy": {}, + "__builtin_memset": {}, + "__builtin_mmap": {}, + "__builtin_mul_overflowInt64": {}, + "__builtin_mul_overflowUint128": {}, + "__builtin_mul_overflowUint64": {}, + "__builtin_nan": {}, + "__builtin_nanf": {}, + "__builtin_nanl": {}, + "__builtin_object_size": {}, + "__builtin_popcount": {}, + "__builtin_popcountl": {}, + "__builtin_prefetch": {}, + "__builtin_printf": {}, + "__builtin_snprintf": {}, + "__builtin_sprintf": {}, + "__builtin_strchr": {}, + "__builtin_strcmp": {}, + "__builtin_strcpy": {}, + "__builtin_strlen": {}, + "__builtin_sub_overflowInt64": {}, + "__builtin_trap": {}, + "__builtin_unreachable": {}, + "__ccgo_dmesg": {}, + "__ccgo_getMutexType": {}, + "__ccgo_in6addr_anyp": {}, + "__ccgo_pthreadAttrGetDetachState": {}, + "__ccgo_pthreadMutexattrGettype": {}, + "__ccgo_sqlite3_log": {}, + "__cmsg_nxthdr": {}, + "__ctype_b_loc": {}, + "__ctype_get_mb_cur_max": {}, + "__errno_location": {}, + "__floatscan": {}, + "__fpclassify": {}, + "__fpclassifyf": {}, + "__fpclassifyl": {}, + "__fsmu8": {}, + "__h_errno_location": {}, + "__inet_aton": {}, + "__intscan": {}, + "__isalnum_l": {}, + "__isalpha_l": {}, + "__isdigit_l": {}, + "__islower_l": {}, + "__isnan": {}, + "__isnanf": {}, + "__isnanl": {}, + "__isoc99_sscanf": {}, + "__isprint_l": {}, + "__isupper_l": {}, + "__isxdigit_l": {}, + "__lockfile": {}, + "__lookup_ipliteral": {}, + "__lookup_name": {}, + "__lookup_serv": {}, + "__shgetc": {}, + "__shlim": {}, + "__strncasecmp_l": {}, + "__sync_add_and_fetch_uint32": {}, + "__sync_sub_and_fetch_uint32": {}, + "__syscall1": {}, + "__syscall3": {}, + "__syscall4": {}, + "__toread": {}, + "__toread_needs_stdio_exit": {}, + "__uflow": {}, + "__unlockfile": {}, + "_exit": {}, + "_longjmp": {}, + "_obstack_begin": {}, + "_obstack_newchunk": {}, + "_setjmp": {}, + "abort": {}, + "abs": {}, + "accept": {}, + "access": {}, + "acos": {}, + "acosh": {}, + "alarm": {}, + "asin": {}, + "asinh": {}, + "atan": {}, + "atan2": {}, + "atanh": {}, + "atexit": {}, + "atof": {}, + "atoi": {}, + "atol": {}, + "backtrace": {}, + "backtrace_symbols_fd": {}, + "bind": {}, + "bsearch": {}, + "bzero": {}, + "calloc": {}, + "ceil": {}, + "ceilf": {}, + "cfgetospeed": {}, + "cfsetispeed": {}, + "cfsetospeed": {}, + "chdir": {}, + "chmod": {}, + "chown": {}, + "clock_gettime": {}, + "close": {}, + "closedir": {}, + "confstr": {}, + "connect": {}, + "copysign": {}, + "copysignf": {}, + "copysignl": {}, + "cos": {}, + "cosf": {}, + "cosh": {}, + "ctime": {}, + "ctime_r": {}, + "dlclose": {}, + "dlerror": {}, + "dlopen": {}, + "dlsym": {}, + "dup2": {}, + "endpwent": {}, + "environ": {}, + "execvp": {}, + "exit": {}, + "exp": {}, + "fabs": {}, + "fabsf": {}, + "fabsl": {}, + "fchmod": {}, + "fchown": {}, + "fclose": {}, + "fcntl": {}, + "fcntl64": {}, + "fdopen": {}, + "ferror": {}, + "fflush": {}, + "fgetc": {}, + "fgets": {}, + "fileno": {}, + "floor": {}, + "fmod": {}, + "fmodl": {}, + "fopen": {}, + "fopen64": {}, + "fork": {}, + "fprintf": {}, + "fputc": {}, + "fputs": {}, + "fread": {}, + "free": {}, + "freeaddrinfo": {}, + "frexp": {}, + "fscanf": {}, + "fseek": {}, + "fstat": {}, + "fstat64": {}, + "fstatfs": {}, + "fsync": {}, + "ftell": {}, + "ftruncate": {}, + "ftruncate64": {}, + "fts64_close": {}, + "fts64_open": {}, + "fts64_read": {}, + "fts_close": {}, + "fts_open": {}, + "fts_read": {}, + "fwrite": {}, + "gai_strerror": {}, + "getaddrinfo": {}, + "getc": {}, + "getcwd": {}, + "getegid": {}, + "getentropy": {}, + "getenv": {}, + "geteuid": {}, + "getgid": {}, + "getgrgid": {}, + "getgrgid_r": {}, + "getgrnam": {}, + "getgrnam_r": {}, + "gethostbyaddr": {}, + "gethostbyaddr_r": {}, + "gethostbyname": {}, + "gethostbyname2": {}, + "gethostbyname2_r": {}, + "gethostbyname_r": {}, + "gethostname": {}, + "getnameinfo": {}, + "getpeername": {}, + "getpid": {}, + "getpwnam": {}, + "getpwnam_r": {}, + "getpwuid": {}, + "getpwuid_r": {}, + "getrandom": {}, + "getresgid": {}, + "getresuid": {}, + "getrlimit": {}, + "getrlimit64": {}, + "getrusage": {}, + "getservbyname": {}, + "getsockname": {}, + "getsockopt": {}, + "gettimeofday": {}, + "getuid": {}, + "gmtime_r": {}, + "h_errno": {}, + "htonl": {}, + "htons": {}, + "hypot": {}, + "inet_ntoa": {}, + "inet_ntop": {}, + "inet_pton": {}, + "initstate": {}, + "initstate_r": {}, + "ioctl": {}, + "isalnum": {}, + "isalpha": {}, + "isascii": {}, + "isatty": {}, + "isdigit": {}, + "islower": {}, + "isnan": {}, + "isnanf": {}, + "isnanl": {}, + "isprint": {}, + "isupper": {}, + "iswalnum": {}, + "iswspace": {}, + "isxdigit": {}, + "kill": {}, + "ldexp": {}, + "link": {}, + "listen": {}, + "localeconv": {}, + "localtime": {}, + "localtime_r": {}, + "log": {}, + "log10": {}, + "longjmp": {}, + "lrand48": {}, + "lseek": {}, + "lseek64": {}, + "lstat": {}, + "lstat64": {}, + "malloc": {}, + "mblen": {}, + "mbrtowc": {}, + "mbsinit": {}, + "mbstowcs": {}, + "mbtowc": {}, + "memchr": {}, + "memcmp": {}, + "memcpy": {}, + "memmove": {}, + "memset": {}, + "mkdir": {}, + "mkfifo": {}, + "mknod": {}, + "mkostemp": {}, + "mkstemp": {}, + "mkstemp64": {}, + "mkstemps": {}, + "mkstemps64": {}, + "mktime": {}, + "mmap": {}, + "mmap64": {}, + "modf": {}, + "mremap": {}, + "munmap": {}, + "nanf": {}, + "nl_langinfo": {}, + "ntohs": {}, + "obstack_free": {}, + "obstack_vprintf": {}, + "open": {}, + "open64": {}, + "opendir": {}, + "openpty": {}, + "pathconf": {}, + "pause": {}, + "pclose": {}, + "perror": {}, + "pipe": {}, + "poll": {}, + "popen": {}, + "posix_fadvise": {}, + "pow": {}, + "printf": {}, + "pselect": {}, + "pthread_attr_destroy": {}, + "pthread_attr_getdetachstate": {}, + "pthread_attr_init": {}, + "pthread_attr_setdetachstate": {}, + "pthread_attr_setscope": {}, + "pthread_attr_setstacksize": {}, + "pthread_cond_broadcast": {}, + "pthread_cond_destroy": {}, + "pthread_cond_init": {}, + "pthread_cond_signal": {}, + "pthread_cond_timedwait": {}, + "pthread_cond_wait": {}, + "pthread_create": {}, + "pthread_detach": {}, + "pthread_equal": {}, + "pthread_exit": {}, + "pthread_getspecific": {}, + "pthread_join": {}, + "pthread_key_create": {}, + "pthread_key_delete": {}, + "pthread_mutex_destroy": {}, + "pthread_mutex_init": {}, + "pthread_mutex_lock": {}, + "pthread_mutex_trylock": {}, + "pthread_mutex_unlock": {}, + "pthread_mutexattr_destroy": {}, + "pthread_mutexattr_init": {}, + "pthread_mutexattr_settype": {}, + "pthread_self": {}, + "pthread_setspecific": {}, + "putc": {}, + "putchar": {}, + "puts": {}, + "pwrite": {}, + "qsort": {}, + "raise": {}, + "rand": {}, + "rand_r": {}, + "random": {}, + "random_r": {}, + "read": {}, + "readdir": {}, + "readdir64": {}, + "readlink": {}, + "readv": {}, + "realloc": {}, + "reallocarray": {}, + "realpath": {}, + "recv": {}, + "recvfrom": {}, + "recvmsg": {}, + "remove": {}, + "rename": {}, + "rewind": {}, + "rindex": {}, + "rint": {}, + "rmdir": {}, + "round": {}, + "scalbn": {}, + "scalbnl": {}, + "sched_yield": {}, + "select": {}, + "send": {}, + "sendmsg": {}, + "sendto": {}, + "setbuf": {}, + "setenv": {}, + "setjmp": {}, + "setlocale": {}, + "setrlimit": {}, + "setrlimit64": {}, + "setsid": {}, + "setsockopt": {}, + "setstate": {}, + "setvbuf": {}, + "shmat": {}, + "shmctl": {}, + "shmdt": {}, + "shutdown": {}, + "sigaction": {}, + "signal": {}, + "sin": {}, + "sinf": {}, + "sinh": {}, + "sleep": {}, + "snprintf": {}, + "socket": {}, + "sprintf": {}, + "sqrt": {}, + "srand48": {}, + "sscanf": {}, + "stat": {}, + "stat64": {}, + "stderr": {}, + "stdin": {}, + "stdout": {}, + "strcasecmp": {}, + "strcat": {}, + "strchr": {}, + "strcmp": {}, + "strcpy": {}, + "strcspn": {}, + "strdup": {}, + "strerror": {}, + "strerror_r": {}, + "strlcat": {}, + "strlcpy": {}, + "strlen": {}, + "strncasecmp": {}, + "strncat": {}, + "strncmp": {}, + "strncpy": {}, + "strnlen": {}, + "strpbrk": {}, + "strrchr": {}, + "strspn": {}, + "strstr": {}, + "strtod": {}, + "strtof": {}, + "strtoimax": {}, + "strtok": {}, + "strtol": {}, + "strtold": {}, + "strtoll": {}, + "strtoul": {}, + "strtoull": {}, + "strtoumax": {}, + "symlink": {}, + "sysconf": {}, + "system": {}, + "tan": {}, + "tanh": {}, + "tcgetattr": {}, + "tcsendbreak": {}, + "tcsetattr": {}, + "time": {}, + "tmpfile": {}, + "tolower": {}, + "toupper": {}, + "trunc": {}, + "tzset": {}, + "umask": {}, + "uname": {}, + "ungetc": {}, + "unlink": {}, + "unsetenv": {}, + "usleep": {}, + "utime": {}, + "utimes": {}, + "uuid_copy": {}, + "uuid_generate_random": {}, + "uuid_parse": {}, + "uuid_unparse": {}, + "vasprintf": {}, + "vfprintf": {}, + "vfscanf": {}, + "vprintf": {}, + "vsnprintf": {}, + "vsprintf": {}, + "vsscanf": {}, + "waitpid": {}, + "wcschr": {}, + "wctomb": {}, + "wcwidth": {}, + "write": {}, + "writev": {}, + "zero_struct_address": {}, +} diff --git a/vendor/modernc.org/libc/errno/capi_linux_riscv64.go b/vendor/modernc.org/libc/errno/capi_linux_riscv64.go new file mode 100644 index 00000000..630300a3 --- /dev/null +++ b/vendor/modernc.org/libc/errno/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_riscv64.go -pkgname errno', DO NOT EDIT. + +package errno + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/errno/errno_linux_riscv64.go b/vendor/modernc.org/libc/errno/errno_linux_riscv64.go new file mode 100644 index 00000000..6da77ca0 --- /dev/null +++ b/vendor/modernc.org/libc/errno/errno_linux_riscv64.go @@ -0,0 +1,187 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_riscv64.go -pkgname errno', DO NOT EDIT. + +package errno + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + E2BIG = 7 + EACCES = 13 + EADDRINUSE = 98 + EADDRNOTAVAIL = 99 + EADV = 68 + EAFNOSUPPORT = 97 + EAGAIN = 11 + EALREADY = 114 + EBADE = 52 + EBADF = 9 + EBADFD = 77 + EBADMSG = 74 + EBADR = 53 + EBADRQC = 56 + EBADSLT = 57 + EBFONT = 59 + EBUSY = 16 + ECANCELED = 125 + ECHILD = 10 + ECHRNG = 44 + ECOMM = 70 + ECONNABORTED = 103 + ECONNREFUSED = 111 + ECONNRESET = 104 + EDEADLK = 35 + EDEADLOCK = 35 + EDESTADDRREQ = 89 + EDOM = 33 + EDOTDOT = 73 + EDQUOT = 122 + EEXIST = 17 + EFAULT = 14 + EFBIG = 27 + EHOSTDOWN = 112 + EHOSTUNREACH = 113 + EHWPOISON = 133 + EIDRM = 43 + EILSEQ = 84 + EINPROGRESS = 115 + EINTR = 4 + EINVAL = 22 + EIO = 5 + EISCONN = 106 + EISDIR = 21 + EISNAM = 120 + EKEYEXPIRED = 127 + EKEYREJECTED = 129 + EKEYREVOKED = 128 + EL2HLT = 51 + EL2NSYNC = 45 + EL3HLT = 46 + EL3RST = 47 + ELIBACC = 79 + ELIBBAD = 80 + ELIBEXEC = 83 + ELIBMAX = 82 + ELIBSCN = 81 + ELNRNG = 48 + ELOOP = 40 + EMEDIUMTYPE = 124 + EMFILE = 24 + EMLINK = 31 + EMSGSIZE = 90 + EMULTIHOP = 72 + ENAMETOOLONG = 36 + ENAVAIL = 119 + ENETDOWN = 100 + ENETRESET = 102 + ENETUNREACH = 101 + ENFILE = 23 + ENOANO = 55 + ENOBUFS = 105 + ENOCSI = 50 + ENODATA = 61 + ENODEV = 19 + ENOENT = 2 + ENOEXEC = 8 + ENOKEY = 126 + ENOLCK = 37 + ENOLINK = 67 + ENOMEDIUM = 123 + ENOMEM = 12 + ENOMSG = 42 + ENONET = 64 + ENOPKG = 65 + ENOPROTOOPT = 92 + ENOSPC = 28 + ENOSR = 63 + ENOSTR = 60 + ENOSYS = 38 + ENOTBLK = 15 + ENOTCONN = 107 + ENOTDIR = 20 + ENOTEMPTY = 39 + ENOTNAM = 118 + ENOTRECOVERABLE = 131 + ENOTSOCK = 88 + ENOTSUP = 95 + ENOTTY = 25 + ENOTUNIQ = 76 + ENXIO = 6 + EOPNOTSUPP = 95 + EOVERFLOW = 75 + EOWNERDEAD = 130 + EPERM = 1 + EPFNOSUPPORT = 96 + EPIPE = 32 + EPROTO = 71 + EPROTONOSUPPORT = 93 + EPROTOTYPE = 91 + ERANGE = 34 + EREMCHG = 78 + EREMOTE = 66 + EREMOTEIO = 121 + ERESTART = 85 + ERFKILL = 132 + EROFS = 30 + ESHUTDOWN = 108 + ESOCKTNOSUPPORT = 94 + ESPIPE = 29 + ESRCH = 3 + ESRMNT = 69 + ESTALE = 116 + ESTRPIPE = 86 + ETIME = 62 + ETIMEDOUT = 110 + ETOOMANYREFS = 109 + ETXTBSY = 26 + EUCLEAN = 117 + EUNATCH = 49 + EUSERS = 87 + EWOULDBLOCK = 11 + EXDEV = 18 + EXFULL = 54 + X_ASM_GENERIC_ERRNO_BASE_H = 0 + X_ASM_GENERIC_ERRNO_H = 0 + X_ATFILE_SOURCE = 1 + X_BITS_ERRNO_H = 1 + X_DEFAULT_SOURCE = 1 + X_ERRNO_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/capi_linux_riscv64.go b/vendor/modernc.org/libc/fcntl/capi_linux_riscv64.go new file mode 100644 index 00000000..abbc7779 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_riscv64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go new file mode 100644 index 00000000..e3c1e192 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go @@ -0,0 +1,1346 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_riscv64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AT_EACCESS = 0x200 + AT_FDCWD = -100 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 + FAPPEND = 1024 + FASYNC = 8192 + FD_CLOEXEC = 1 + FFSYNC = 1052672 + FNDELAY = 2048 + FNONBLOCK = 2048 + F_DUPFD = 0 + F_DUPFD_CLOEXEC = 1030 + F_EXLCK = 4 + F_GETFD = 1 + F_GETFL = 3 + F_GETLK = 5 + F_GETLK64 = 5 + F_GETOWN = 9 + F_LOCK = 1 + F_OK = 0 + F_RDLCK = 0 + F_SETFD = 2 + F_SETFL = 4 + F_SETLK = 6 + F_SETLK64 = 6 + F_SETLKW = 7 + F_SETLKW64 = 7 + F_SETOWN = 8 + F_SHLCK = 8 + F_TEST = 3 + F_TLOCK = 2 + F_ULOCK = 0 + F_UNLCK = 2 + F_WRLCK = 1 + LOCK_EX = 2 + LOCK_NB = 4 + LOCK_SH = 1 + LOCK_UN = 8 + O_ACCMODE = 0003 + O_APPEND = 02000 + O_ASYNC = 020000 + O_CLOEXEC = 524288 + O_CREAT = 0100 + O_DIRECTORY = 65536 + O_DSYNC = 4096 + O_EXCL = 0200 + O_FSYNC = 1052672 + O_NDELAY = 2048 + O_NOCTTY = 0400 + O_NOFOLLOW = 131072 + O_NONBLOCK = 04000 + O_RDONLY = 00 + O_RDWR = 02 + O_RSYNC = 1052672 + O_SYNC = 04010000 + O_TRUNC = 01000 + O_WRONLY = 01 + POSIX_FADV_DONTNEED = 4 + POSIX_FADV_NOREUSE = 5 + POSIX_FADV_NORMAL = 0 + POSIX_FADV_RANDOM = 1 + POSIX_FADV_SEQUENTIAL = 2 + POSIX_FADV_WILLNEED = 3 + R_OK = 4 + SEEK_CUR = 1 + SEEK_END = 2 + SEEK_SET = 0 + S_IFBLK = 24576 + S_IFCHR = 8192 + S_IFDIR = 16384 + S_IFIFO = 4096 + S_IFLNK = 40960 + S_IFMT = 61440 + S_IFREG = 32768 + S_IFSOCK = 49152 + S_IRGRP = 32 + S_IROTH = 4 + S_IRUSR = 256 + S_IRWXG = 56 + S_IRWXO = 7 + S_IRWXU = 448 + S_ISGID = 1024 + S_ISUID = 2048 + S_ISVTX = 512 + S_IWGRP = 16 + S_IWOTH = 2 + S_IWUSR = 128 + S_IXGRP = 8 + S_IXOTH = 1 + S_IXUSR = 64 + UTIME_NOW = 1073741823 + UTIME_OMIT = 1073741822 + W_OK = 2 + X_OK = 1 + X_ATFILE_SOURCE = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_STAT_H = 1 + X_BITS_STRUCT_STAT_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_DEFAULT_SOURCE = 1 + X_FCNTL_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STATBUF_ST_BLKSIZE = 0 + X_STATBUF_ST_NSEC = 0 + X_STATBUF_ST_RDEV = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 6.5 File Control Operations + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// This must be early so can define types winningly. + +// Get __mode_t, __dev_t and __off_t . +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// Get the definitions of O_*, F_*, FD_*: all the +// numbers and flag bits for `open', `fcntl', et al. +// O_*, F_*, FD_* bit values for Linux / RISC-V. +// Copyright (C) 2011-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// In 64-bit ISA files are always with 64bit off_t and F_*LK64 are the same as +// non-64-bit versions. It will need to be revised for 128-bit. + +type Flock = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start X__off_t + Fl_len X__off_t + Fl_pid X__pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:36:1 */ + +// Include generic Linux declarations. +// O_*, F_*, FD_* bit values for Linux. +// Copyright (C) 2001-2021 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 +// . + +// This file contains shared definitions between Linux architectures +// and is included by to declare them. The various +// #ifndef cases allow the architecture specific file to define those +// values with different values. +// +// A minimal contains just: +// +// struct flock {...} +// #ifdef __USE_LARGEFILE64 +// struct flock64 {...} +// #endif +// #include + +// open/fcntl. + +// open file description locks. +// +// Usually record locks held by a process are released on *any* close and are +// not inherited across a fork. +// +// These cmd values will set locks that conflict with process-associated record +// locks, but are "owned" by the opened file description, not the process. +// This means that they are inherited across fork or clone with CLONE_FILES +// like BSD (flock) locks, and they are only released automatically when the +// last reference to the the file description against which they were acquired +// is put. + +// For now, Linux has no separate synchronicity options for read +// operations. We define O_RSYNC therefore as the same as O_SYNC +// since this is a superset. + +// Values for the second argument to `fcntl'. + +// For F_[GET|SET]FD. + +// For posix fcntl() and `l_type' field of a `struct flock' for lockf(). + +// For old implementation of BSD flock. + +// Operations for BSD flock, also used by the kernel implementation. + +// Define some more compatibility macros to be backward compatible with +// BSD systems which did not managed to hide these kernel macros. + +// Advise to `posix_fadvise'. + +// Values for `*at' functions. + +// Detect if open needs mode as a third argument (or for openat as a fourth +// argument). + +// POSIX.1-2001 specifies that these types are defined by . +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. +type Mode_t = X__mode_t /* fcntl.h:50:18 */ + +type Off_t = X__off64_t /* fcntl.h:58:19 */ + +type Pid_t = X__pid_t /* fcntl.h:69:17 */ + +// For XPG all symbols from should also be available. +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// RISC-V is little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +// Copyright (C) 1992-2021 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 +// . + +// Definition for struct stat. +// Copyright (C) 2020-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +type Stat = struct { + Fst_dev X__dev_t + Fst_ino X__ino64_t + Fst_mode X__mode_t + Fst_nlink X__nlink_t + Fst_uid X__uid_t + Fst_gid X__gid_t + Fst_rdev X__dev_t + F__pad1 X__dev_t + Fst_size X__off64_t + Fst_blksize X__blksize_t + F__pad2 int32 + Fst_blocks X__blkcnt64_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [2]int32 +} /* struct_stat.h:44:1 */ + +// Define some inlines helping to catch common problems. + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fts/capi_linux_riscv64.go b/vendor/modernc.org/libc/fts/capi_linux_riscv64.go new file mode 100644 index 00000000..76de2772 --- /dev/null +++ b/vendor/modernc.org/libc/fts/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_riscv64.go -pkgname fts', DO NOT EDIT. + +package fts + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fts/fts_linux_riscv64.go b/vendor/modernc.org/libc/fts/fts_linux_riscv64.go new file mode 100644 index 00000000..0332df86 --- /dev/null +++ b/vendor/modernc.org/libc/fts/fts_linux_riscv64.go @@ -0,0 +1,2156 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_riscv64.go -pkgname fts', DO NOT EDIT. + +package fts + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 + ALLPERMS = 4095 + BIG_ENDIAN = 4321 + BYTE_ORDER = 1234 + DEFFILEMODE = 438 + FD_SETSIZE = 1024 + FTS_AGAIN = 1 + FTS_COMFOLLOW = 0x0001 + FTS_D = 1 + FTS_DC = 2 + FTS_DEFAULT = 3 + FTS_DNR = 4 + FTS_DONTCHDIR = 0x01 + FTS_DOT = 5 + FTS_DP = 6 + FTS_ERR = 7 + FTS_F = 8 + FTS_FOLLOW = 2 + FTS_INIT = 9 + FTS_LOGICAL = 0x0002 + FTS_NAMEONLY = 0x0100 + FTS_NOCHDIR = 0x0004 + FTS_NOINSTR = 3 + FTS_NOSTAT = 0x0008 + FTS_NS = 10 + FTS_NSOK = 11 + FTS_OPTIONMASK = 0x00ff + FTS_PHYSICAL = 0x0010 + FTS_ROOTLEVEL = 0 + FTS_ROOTPARENTLEVEL = -1 + FTS_SEEDOT = 0x0020 + FTS_SKIP = 4 + FTS_SL = 12 + FTS_SLNONE = 13 + FTS_STOP = 0x0200 + FTS_SYMFOLLOW = 0x02 + FTS_W = 14 + FTS_WHITEOUT = 0x0080 + FTS_XDEV = 0x0040 + LITTLE_ENDIAN = 1234 + PDP_ENDIAN = 3412 + S_BLKSIZE = 512 + S_IEXEC = 64 + S_IFBLK = 24576 + S_IFCHR = 8192 + S_IFDIR = 16384 + S_IFIFO = 4096 + S_IFLNK = 40960 + S_IFMT = 61440 + S_IFREG = 32768 + S_IFSOCK = 49152 + S_IREAD = 256 + S_IRGRP = 32 + S_IROTH = 4 + S_IRUSR = 256 + S_IRWXG = 56 + S_IRWXO = 7 + S_IRWXU = 448 + S_ISGID = 1024 + S_ISUID = 2048 + S_ISVTX = 512 + S_IWGRP = 16 + S_IWOTH = 2 + S_IWRITE = 128 + S_IWUSR = 128 + S_IXGRP = 8 + S_IXOTH = 1 + S_IXUSR = 64 + UTIME_NOW = 1073741823 + UTIME_OMIT = 1073741822 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_STAT_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_STRUCT_STAT_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_ENDIAN_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_FTS_H = 1 + X_GCC_SIZE_T = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STATBUF_ST_BLKSIZE = 0 + X_STATBUF_ST_NSEC = 0 + X_STATBUF_ST_RDEV = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_STAT_H = 1 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2021 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2021 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 +// . + +// We don't use `memset' because this would require a prototype and +// the array isn't too big. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 5.6 File Characteristics + +// Copyright (C) 1991-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// NB: Include guard matches what uses. + +// The Single Unix specification says that some more types are +// available here. + +// Copyright (C) 1992-2021 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 +// . + +// Definition for struct stat. +// Copyright (C) 2020-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +type Stat = struct { + Fst_dev X__dev_t + Fst_ino X__ino64_t + Fst_mode X__mode_t + Fst_nlink X__nlink_t + Fst_uid X__uid_t + Fst_gid X__gid_t + Fst_rdev X__dev_t + F__pad1 X__dev_t + Fst_size X__off64_t + Fst_blksize X__blksize_t + F__pad2 int32 + Fst_blocks X__blkcnt64_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [2]int32 +} /* struct_stat.h:44:1 */ + +// File tree traversal functions declarations. +// Copyright (C) 1994-2021 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) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +// Copyright (C) 1991-2021 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-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +type X_ftsent = struct { + Ffts_cycle uintptr + Ffts_parent uintptr + Ffts_link uintptr + Ffts_number int64 + Ffts_pointer uintptr + Ffts_accpath uintptr + Ffts_path uintptr + Ffts_errno int32 + Ffts_symfd int32 + Ffts_pathlen uint16 + Ffts_namelen uint16 + F__ccgo_pad1 [4]byte + Ffts_ino Ino_t + Ffts_dev Dev_t + Ffts_nlink Nlink_t + Ffts_level int16 + Ffts_info uint16 + Ffts_flags uint16 + Ffts_instr uint16 + F__ccgo_pad2 [4]byte + Ffts_statp uintptr + Ffts_name [1]uint8 + F__ccgo_pad3 [7]byte +} /* fts.h:58:2 */ + +// File tree traversal functions declarations. +// Copyright (C) 1994-2021 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) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +// Copyright (C) 1991-2021 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-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +type FTS = struct { + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + Ffts_dev Dev_t + Ffts_path uintptr + Ffts_rfd int32 + Ffts_pathlen int32 + Ffts_nitems int32 + F__ccgo_pad1 [4]byte + Ffts_compar uintptr + Ffts_options int32 + F__ccgo_pad2 [4]byte +} /* fts.h:81:3 */ + +type FTSENT = X_ftsent /* fts.h:147:3 */ + +var _ uint8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/grp/capi_linux_riscv64.go b/vendor/modernc.org/libc/grp/capi_linux_riscv64.go new file mode 100644 index 00000000..be15deec --- /dev/null +++ b/vendor/modernc.org/libc/grp/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_riscv64.go -pkgname grp', DO NOT EDIT. + +package grp + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/grp/grp_linux_riscv64.go b/vendor/modernc.org/libc/grp/grp_linux_riscv64.go new file mode 100644 index 00000000..f5f68e96 --- /dev/null +++ b/vendor/modernc.org/libc/grp/grp_linux_riscv64.go @@ -0,0 +1,953 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_riscv64.go -pkgname grp', DO NOT EDIT. + +package grp + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + NSS_BUFLEN_GROUP = 1024 + X_ATFILE_SOURCE = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_GRP_H = 1 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SIZE_T_H = 0 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 9.2.1 Group Database Access + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// For the Single Unix specification we must define this type here. +type Gid_t = X__gid_t /* grp.h:37:17 */ + +// The group structure. +type Group = struct { + Fgr_name uintptr + Fgr_passwd uintptr + Fgr_gid X__gid_t + F__ccgo_pad1 [4]byte + Fgr_mem uintptr +} /* grp.h:42:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go b/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go index bca62b15..61f80522 100644 --- a/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go +++ b/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go @@ -751,7 +751,10 @@ func init() { portproto := strings.SplitN(fields[1], "/", 2) port, err := strconv.ParseInt(portproto[0], 10, 32) if err != nil { - panic(err) + // If we find lines that don't match the expected format we skip over them. + // The expected format is / [aliases ...] + // As we're using strings.Fields for splitting the line, failures can happen if the service name field contains white spaces. + continue } proto := portproto[1] diff --git a/vendor/modernc.org/libc/langinfo/capi_linux_riscv64.go b/vendor/modernc.org/libc/langinfo/capi_linux_riscv64.go new file mode 100644 index 00000000..8f1b023f --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o langinfo/langinfo_linux_riscv64.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/langinfo/langinfo_linux_riscv64.go b/vendor/modernc.org/libc/langinfo/langinfo_linux_riscv64.go new file mode 100644 index 00000000..afd34d3e --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/langinfo_linux_riscv64.go @@ -0,0 +1,1195 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o langinfo/langinfo_linux_riscv64.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + NL_CAT_LOCALE = 1 + NL_SETD = 1 + X_ATFILE_SOURCE = 1 + X_BITS_LOCALE_H = 1 + X_BITS_TYPES_LOCALE_T_H = 1 + X_BITS_TYPES___LOCALE_T_H = 1 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_LANGINFO_H = 1 + X_LP64 = 1 + X_NL_TYPES_H = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + Linux = 1 + Unix = 1 +) + +// Definition of locale category symbol values. +// Copyright (C) 2001-2021 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 +// . + +// Construct an `nl_item' value for `nl_langinfo' from a locale category +// (LC_*) and an item index within the category. Some code may depend on +// the item values within a category increasing monotonically with the +// indices. + +// Extract the category and item index from a constructed `nl_item' value. + +// Enumeration of locale items that can be queried with `nl_langinfo'. +const ( /* langinfo.h:41:1: */ + // LC_TIME category: date and time formatting. + + // Abbreviated days of the week. + ABDAY_1 = 131072 // Sun + ABDAY_2 = 131073 + ABDAY_3 = 131074 + ABDAY_4 = 131075 + ABDAY_5 = 131076 + ABDAY_6 = 131077 + ABDAY_7 = 131078 + + // Long-named days of the week. + DAY_1 = 131079 // Sunday + DAY_2 = 131080 // Monday + DAY_3 = 131081 // Tuesday + DAY_4 = 131082 // Wednesday + DAY_5 = 131083 // Thursday + DAY_6 = 131084 // Friday + DAY_7 = 131085 // Saturday + + // Abbreviated month names, in the grammatical form used when the month + // is a part of a complete date. + ABMON_1 = 131086 // Jan + ABMON_2 = 131087 + ABMON_3 = 131088 + ABMON_4 = 131089 + ABMON_5 = 131090 + ABMON_6 = 131091 + ABMON_7 = 131092 + ABMON_8 = 131093 + ABMON_9 = 131094 + ABMON_10 = 131095 + ABMON_11 = 131096 + ABMON_12 = 131097 + + // Long month names, in the grammatical form used when the month + // is a part of a complete date. + MON_1 = 131098 // January + MON_2 = 131099 + MON_3 = 131100 + MON_4 = 131101 + MON_5 = 131102 + MON_6 = 131103 + MON_7 = 131104 + MON_8 = 131105 + MON_9 = 131106 + MON_10 = 131107 + MON_11 = 131108 + MON_12 = 131109 + + AM_STR = 131110 // Ante meridiem string. + PM_STR = 131111 // Post meridiem string. + + D_T_FMT = 131112 // Date and time format for strftime. + D_FMT = 131113 // Date format for strftime. + T_FMT = 131114 // Time format for strftime. + T_FMT_AMPM = 131115 // 12-hour time format for strftime. + + ERA = 131116 // Alternate era. + X__ERA_YEAR = 131117 // Year in alternate era format. + ERA_D_FMT = 131118 // Date in alternate era format. + ALT_DIGITS = 131119 // Alternate symbols for digits. + ERA_D_T_FMT = 131120 // Date and time in alternate era format. + ERA_T_FMT = 131121 // Time in alternate era format. + + X_NL_TIME_ERA_NUM_ENTRIES = 131122 // Number entries in the era arrays. + X_NL_TIME_ERA_ENTRIES = 131123 // Structure with era entries in usable form. + + X_NL_WABDAY_1 = 131124 // Sun + X_NL_WABDAY_2 = 131125 + X_NL_WABDAY_3 = 131126 + X_NL_WABDAY_4 = 131127 + X_NL_WABDAY_5 = 131128 + X_NL_WABDAY_6 = 131129 + X_NL_WABDAY_7 = 131130 + + // Long-named days of the week. + X_NL_WDAY_1 = 131131 // Sunday + X_NL_WDAY_2 = 131132 // Monday + X_NL_WDAY_3 = 131133 // Tuesday + X_NL_WDAY_4 = 131134 // Wednesday + X_NL_WDAY_5 = 131135 // Thursday + X_NL_WDAY_6 = 131136 // Friday + X_NL_WDAY_7 = 131137 // Saturday + + // Abbreviated month names, in the grammatical form used when the month + // is a part of a complete date. + X_NL_WABMON_1 = 131138 // Jan + X_NL_WABMON_2 = 131139 + X_NL_WABMON_3 = 131140 + X_NL_WABMON_4 = 131141 + X_NL_WABMON_5 = 131142 + X_NL_WABMON_6 = 131143 + X_NL_WABMON_7 = 131144 + X_NL_WABMON_8 = 131145 + X_NL_WABMON_9 = 131146 + X_NL_WABMON_10 = 131147 + X_NL_WABMON_11 = 131148 + X_NL_WABMON_12 = 131149 + + // Long month names, in the grammatical form used when the month + // is a part of a complete date. + X_NL_WMON_1 = 131150 // January + X_NL_WMON_2 = 131151 + X_NL_WMON_3 = 131152 + X_NL_WMON_4 = 131153 + X_NL_WMON_5 = 131154 + X_NL_WMON_6 = 131155 + X_NL_WMON_7 = 131156 + X_NL_WMON_8 = 131157 + X_NL_WMON_9 = 131158 + X_NL_WMON_10 = 131159 + X_NL_WMON_11 = 131160 + X_NL_WMON_12 = 131161 + + X_NL_WAM_STR = 131162 // Ante meridiem string. + X_NL_WPM_STR = 131163 // Post meridiem string. + + X_NL_WD_T_FMT = 131164 // Date and time format for strftime. + X_NL_WD_FMT = 131165 // Date format for strftime. + X_NL_WT_FMT = 131166 // Time format for strftime. + X_NL_WT_FMT_AMPM = 131167 // 12-hour time format for strftime. + + X_NL_WERA_YEAR = 131168 // Year in alternate era format. + X_NL_WERA_D_FMT = 131169 // Date in alternate era format. + X_NL_WALT_DIGITS = 131170 // Alternate symbols for digits. + X_NL_WERA_D_T_FMT = 131171 // Date and time in alternate era format. + X_NL_WERA_T_FMT = 131172 // Time in alternate era format. + + X_NL_TIME_WEEK_NDAYS = 131173 + X_NL_TIME_WEEK_1STDAY = 131174 + X_NL_TIME_WEEK_1STWEEK = 131175 + X_NL_TIME_FIRST_WEEKDAY = 131176 + X_NL_TIME_FIRST_WORKDAY = 131177 + X_NL_TIME_CAL_DIRECTION = 131178 + X_NL_TIME_TIMEZONE = 131179 + + X_DATE_FMT = 131180 // strftime format for date. + X_NL_W_DATE_FMT = 131181 + + X_NL_TIME_CODESET = 131182 + + // Long month names, in the grammatical form used when the month + // is named by itself. + X__ALTMON_1 = 131183 // January + X__ALTMON_2 = 131184 + X__ALTMON_3 = 131185 + X__ALTMON_4 = 131186 + X__ALTMON_5 = 131187 + X__ALTMON_6 = 131188 + X__ALTMON_7 = 131189 + X__ALTMON_8 = 131190 + X__ALTMON_9 = 131191 + X__ALTMON_10 = 131192 + X__ALTMON_11 = 131193 + X__ALTMON_12 = 131194 + + // Long month names, in the grammatical form used when the month + // is named by itself. + X_NL_WALTMON_1 = 131195 // January + X_NL_WALTMON_2 = 131196 + X_NL_WALTMON_3 = 131197 + X_NL_WALTMON_4 = 131198 + X_NL_WALTMON_5 = 131199 + X_NL_WALTMON_6 = 131200 + X_NL_WALTMON_7 = 131201 + X_NL_WALTMON_8 = 131202 + X_NL_WALTMON_9 = 131203 + X_NL_WALTMON_10 = 131204 + X_NL_WALTMON_11 = 131205 + X_NL_WALTMON_12 = 131206 + + // Abbreviated month names, in the grammatical form used when the month + // is named by itself. + X_NL_ABALTMON_1 = 131207 // Jan + X_NL_ABALTMON_2 = 131208 + X_NL_ABALTMON_3 = 131209 + X_NL_ABALTMON_4 = 131210 + X_NL_ABALTMON_5 = 131211 + X_NL_ABALTMON_6 = 131212 + X_NL_ABALTMON_7 = 131213 + X_NL_ABALTMON_8 = 131214 + X_NL_ABALTMON_9 = 131215 + X_NL_ABALTMON_10 = 131216 + X_NL_ABALTMON_11 = 131217 + X_NL_ABALTMON_12 = 131218 + + // Abbreviated month names, in the grammatical form used when the month + // is named by itself. + X_NL_WABALTMON_1 = 131219 // Jan + X_NL_WABALTMON_2 = 131220 + X_NL_WABALTMON_3 = 131221 + X_NL_WABALTMON_4 = 131222 + X_NL_WABALTMON_5 = 131223 + X_NL_WABALTMON_6 = 131224 + X_NL_WABALTMON_7 = 131225 + X_NL_WABALTMON_8 = 131226 + X_NL_WABALTMON_9 = 131227 + X_NL_WABALTMON_10 = 131228 + X_NL_WABALTMON_11 = 131229 + X_NL_WABALTMON_12 = 131230 + + X_NL_NUM_LC_TIME = 131231 // Number of indices in LC_TIME category. + + // LC_COLLATE category: text sorting. + // This information is accessed by the strcoll and strxfrm functions. + // These `nl_langinfo' names are used only internally. + X_NL_COLLATE_NRULES = 196608 + X_NL_COLLATE_RULESETS = 196609 + X_NL_COLLATE_TABLEMB = 196610 + X_NL_COLLATE_WEIGHTMB = 196611 + X_NL_COLLATE_EXTRAMB = 196612 + X_NL_COLLATE_INDIRECTMB = 196613 + X_NL_COLLATE_GAP1 = 196614 + X_NL_COLLATE_GAP2 = 196615 + X_NL_COLLATE_GAP3 = 196616 + X_NL_COLLATE_TABLEWC = 196617 + X_NL_COLLATE_WEIGHTWC = 196618 + X_NL_COLLATE_EXTRAWC = 196619 + X_NL_COLLATE_INDIRECTWC = 196620 + X_NL_COLLATE_SYMB_HASH_SIZEMB = 196621 + X_NL_COLLATE_SYMB_TABLEMB = 196622 + X_NL_COLLATE_SYMB_EXTRAMB = 196623 + X_NL_COLLATE_COLLSEQMB = 196624 + X_NL_COLLATE_COLLSEQWC = 196625 + X_NL_COLLATE_CODESET = 196626 + X_NL_NUM_LC_COLLATE = 196627 + + // LC_CTYPE category: character classification. + // This information is accessed by the functions in . + // These `nl_langinfo' names are used only internally. + X_NL_CTYPE_CLASS = 0 + X_NL_CTYPE_TOUPPER = 1 + X_NL_CTYPE_GAP1 = 2 + X_NL_CTYPE_TOLOWER = 3 + X_NL_CTYPE_GAP2 = 4 + X_NL_CTYPE_CLASS32 = 5 + X_NL_CTYPE_GAP3 = 6 + X_NL_CTYPE_GAP4 = 7 + X_NL_CTYPE_GAP5 = 8 + X_NL_CTYPE_GAP6 = 9 + X_NL_CTYPE_CLASS_NAMES = 10 + X_NL_CTYPE_MAP_NAMES = 11 + X_NL_CTYPE_WIDTH = 12 + X_NL_CTYPE_MB_CUR_MAX = 13 + X_NL_CTYPE_CODESET_NAME = 14 + CODESET = 14 + X_NL_CTYPE_TOUPPER32 = 15 + X_NL_CTYPE_TOLOWER32 = 16 + X_NL_CTYPE_CLASS_OFFSET = 17 + X_NL_CTYPE_MAP_OFFSET = 18 + X_NL_CTYPE_INDIGITS_MB_LEN = 19 + X_NL_CTYPE_INDIGITS0_MB = 20 + X_NL_CTYPE_INDIGITS1_MB = 21 + X_NL_CTYPE_INDIGITS2_MB = 22 + X_NL_CTYPE_INDIGITS3_MB = 23 + X_NL_CTYPE_INDIGITS4_MB = 24 + X_NL_CTYPE_INDIGITS5_MB = 25 + X_NL_CTYPE_INDIGITS6_MB = 26 + X_NL_CTYPE_INDIGITS7_MB = 27 + X_NL_CTYPE_INDIGITS8_MB = 28 + X_NL_CTYPE_INDIGITS9_MB = 29 + X_NL_CTYPE_INDIGITS_WC_LEN = 30 + X_NL_CTYPE_INDIGITS0_WC = 31 + X_NL_CTYPE_INDIGITS1_WC = 32 + X_NL_CTYPE_INDIGITS2_WC = 33 + X_NL_CTYPE_INDIGITS3_WC = 34 + X_NL_CTYPE_INDIGITS4_WC = 35 + X_NL_CTYPE_INDIGITS5_WC = 36 + X_NL_CTYPE_INDIGITS6_WC = 37 + X_NL_CTYPE_INDIGITS7_WC = 38 + X_NL_CTYPE_INDIGITS8_WC = 39 + X_NL_CTYPE_INDIGITS9_WC = 40 + X_NL_CTYPE_OUTDIGIT0_MB = 41 + X_NL_CTYPE_OUTDIGIT1_MB = 42 + X_NL_CTYPE_OUTDIGIT2_MB = 43 + X_NL_CTYPE_OUTDIGIT3_MB = 44 + X_NL_CTYPE_OUTDIGIT4_MB = 45 + X_NL_CTYPE_OUTDIGIT5_MB = 46 + X_NL_CTYPE_OUTDIGIT6_MB = 47 + X_NL_CTYPE_OUTDIGIT7_MB = 48 + X_NL_CTYPE_OUTDIGIT8_MB = 49 + X_NL_CTYPE_OUTDIGIT9_MB = 50 + X_NL_CTYPE_OUTDIGIT0_WC = 51 + X_NL_CTYPE_OUTDIGIT1_WC = 52 + X_NL_CTYPE_OUTDIGIT2_WC = 53 + X_NL_CTYPE_OUTDIGIT3_WC = 54 + X_NL_CTYPE_OUTDIGIT4_WC = 55 + X_NL_CTYPE_OUTDIGIT5_WC = 56 + X_NL_CTYPE_OUTDIGIT6_WC = 57 + X_NL_CTYPE_OUTDIGIT7_WC = 58 + X_NL_CTYPE_OUTDIGIT8_WC = 59 + X_NL_CTYPE_OUTDIGIT9_WC = 60 + X_NL_CTYPE_TRANSLIT_TAB_SIZE = 61 + X_NL_CTYPE_TRANSLIT_FROM_IDX = 62 + X_NL_CTYPE_TRANSLIT_FROM_TBL = 63 + X_NL_CTYPE_TRANSLIT_TO_IDX = 64 + X_NL_CTYPE_TRANSLIT_TO_TBL = 65 + X_NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN = 66 + X_NL_CTYPE_TRANSLIT_DEFAULT_MISSING = 67 + X_NL_CTYPE_TRANSLIT_IGNORE_LEN = 68 + X_NL_CTYPE_TRANSLIT_IGNORE = 69 + X_NL_CTYPE_MAP_TO_NONASCII = 70 + X_NL_CTYPE_NONASCII_CASE = 71 + X_NL_CTYPE_EXTRA_MAP_1 = 72 + X_NL_CTYPE_EXTRA_MAP_2 = 73 + X_NL_CTYPE_EXTRA_MAP_3 = 74 + X_NL_CTYPE_EXTRA_MAP_4 = 75 + X_NL_CTYPE_EXTRA_MAP_5 = 76 + X_NL_CTYPE_EXTRA_MAP_6 = 77 + X_NL_CTYPE_EXTRA_MAP_7 = 78 + X_NL_CTYPE_EXTRA_MAP_8 = 79 + X_NL_CTYPE_EXTRA_MAP_9 = 80 + X_NL_CTYPE_EXTRA_MAP_10 = 81 + X_NL_CTYPE_EXTRA_MAP_11 = 82 + X_NL_CTYPE_EXTRA_MAP_12 = 83 + X_NL_CTYPE_EXTRA_MAP_13 = 84 + X_NL_CTYPE_EXTRA_MAP_14 = 85 + X_NL_NUM_LC_CTYPE = 86 + + // LC_MONETARY category: formatting of monetary quantities. + // These items each correspond to a member of `struct lconv', + // defined in . + X__INT_CURR_SYMBOL = 262144 + X__CURRENCY_SYMBOL = 262145 + X__MON_DECIMAL_POINT = 262146 + X__MON_THOUSANDS_SEP = 262147 + X__MON_GROUPING = 262148 + X__POSITIVE_SIGN = 262149 + X__NEGATIVE_SIGN = 262150 + X__INT_FRAC_DIGITS = 262151 + X__FRAC_DIGITS = 262152 + X__P_CS_PRECEDES = 262153 + X__P_SEP_BY_SPACE = 262154 + X__N_CS_PRECEDES = 262155 + X__N_SEP_BY_SPACE = 262156 + X__P_SIGN_POSN = 262157 + X__N_SIGN_POSN = 262158 + X_NL_MONETARY_CRNCYSTR = 262159 + X__INT_P_CS_PRECEDES = 262160 + X__INT_P_SEP_BY_SPACE = 262161 + X__INT_N_CS_PRECEDES = 262162 + X__INT_N_SEP_BY_SPACE = 262163 + X__INT_P_SIGN_POSN = 262164 + X__INT_N_SIGN_POSN = 262165 + X_NL_MONETARY_DUO_INT_CURR_SYMBOL = 262166 + X_NL_MONETARY_DUO_CURRENCY_SYMBOL = 262167 + X_NL_MONETARY_DUO_INT_FRAC_DIGITS = 262168 + X_NL_MONETARY_DUO_FRAC_DIGITS = 262169 + X_NL_MONETARY_DUO_P_CS_PRECEDES = 262170 + X_NL_MONETARY_DUO_P_SEP_BY_SPACE = 262171 + X_NL_MONETARY_DUO_N_CS_PRECEDES = 262172 + X_NL_MONETARY_DUO_N_SEP_BY_SPACE = 262173 + X_NL_MONETARY_DUO_INT_P_CS_PRECEDES = 262174 + X_NL_MONETARY_DUO_INT_P_SEP_BY_SPACE = 262175 + X_NL_MONETARY_DUO_INT_N_CS_PRECEDES = 262176 + X_NL_MONETARY_DUO_INT_N_SEP_BY_SPACE = 262177 + X_NL_MONETARY_DUO_P_SIGN_POSN = 262178 + X_NL_MONETARY_DUO_N_SIGN_POSN = 262179 + X_NL_MONETARY_DUO_INT_P_SIGN_POSN = 262180 + X_NL_MONETARY_DUO_INT_N_SIGN_POSN = 262181 + X_NL_MONETARY_UNO_VALID_FROM = 262182 + X_NL_MONETARY_UNO_VALID_TO = 262183 + X_NL_MONETARY_DUO_VALID_FROM = 262184 + X_NL_MONETARY_DUO_VALID_TO = 262185 + X_NL_MONETARY_CONVERSION_RATE = 262186 + X_NL_MONETARY_DECIMAL_POINT_WC = 262187 + X_NL_MONETARY_THOUSANDS_SEP_WC = 262188 + X_NL_MONETARY_CODESET = 262189 + X_NL_NUM_LC_MONETARY = 262190 + + // LC_NUMERIC category: formatting of numbers. + // These also correspond to members of `struct lconv'; see . + X__DECIMAL_POINT = 65536 + RADIXCHAR = 65536 + X__THOUSANDS_SEP = 65537 + THOUSEP = 65537 + X__GROUPING = 65538 + X_NL_NUMERIC_DECIMAL_POINT_WC = 65539 + X_NL_NUMERIC_THOUSANDS_SEP_WC = 65540 + X_NL_NUMERIC_CODESET = 65541 + X_NL_NUM_LC_NUMERIC = 65542 + + X__YESEXPR = 327680 // Regex matching ``yes'' input. + X__NOEXPR = 327681 // Regex matching ``no'' input. + X__YESSTR = 327682 // Output string for ``yes''. + X__NOSTR = 327683 // Output string for ``no''. + X_NL_MESSAGES_CODESET = 327684 + X_NL_NUM_LC_MESSAGES = 327685 + + X_NL_PAPER_HEIGHT = 458752 + X_NL_PAPER_WIDTH = 458753 + X_NL_PAPER_CODESET = 458754 + X_NL_NUM_LC_PAPER = 458755 + + X_NL_NAME_NAME_FMT = 524288 + X_NL_NAME_NAME_GEN = 524289 + X_NL_NAME_NAME_MR = 524290 + X_NL_NAME_NAME_MRS = 524291 + X_NL_NAME_NAME_MISS = 524292 + X_NL_NAME_NAME_MS = 524293 + X_NL_NAME_CODESET = 524294 + X_NL_NUM_LC_NAME = 524295 + + X_NL_ADDRESS_POSTAL_FMT = 589824 + X_NL_ADDRESS_COUNTRY_NAME = 589825 + X_NL_ADDRESS_COUNTRY_POST = 589826 + X_NL_ADDRESS_COUNTRY_AB2 = 589827 + X_NL_ADDRESS_COUNTRY_AB3 = 589828 + X_NL_ADDRESS_COUNTRY_CAR = 589829 + X_NL_ADDRESS_COUNTRY_NUM = 589830 + X_NL_ADDRESS_COUNTRY_ISBN = 589831 + X_NL_ADDRESS_LANG_NAME = 589832 + X_NL_ADDRESS_LANG_AB = 589833 + X_NL_ADDRESS_LANG_TERM = 589834 + X_NL_ADDRESS_LANG_LIB = 589835 + X_NL_ADDRESS_CODESET = 589836 + X_NL_NUM_LC_ADDRESS = 589837 + + X_NL_TELEPHONE_TEL_INT_FMT = 655360 + X_NL_TELEPHONE_TEL_DOM_FMT = 655361 + X_NL_TELEPHONE_INT_SELECT = 655362 + X_NL_TELEPHONE_INT_PREFIX = 655363 + X_NL_TELEPHONE_CODESET = 655364 + X_NL_NUM_LC_TELEPHONE = 655365 + + X_NL_MEASUREMENT_MEASUREMENT = 720896 + X_NL_MEASUREMENT_CODESET = 720897 + X_NL_NUM_LC_MEASUREMENT = 720898 + + X_NL_IDENTIFICATION_TITLE = 786432 + X_NL_IDENTIFICATION_SOURCE = 786433 + X_NL_IDENTIFICATION_ADDRESS = 786434 + X_NL_IDENTIFICATION_CONTACT = 786435 + X_NL_IDENTIFICATION_EMAIL = 786436 + X_NL_IDENTIFICATION_TEL = 786437 + X_NL_IDENTIFICATION_FAX = 786438 + X_NL_IDENTIFICATION_LANGUAGE = 786439 + X_NL_IDENTIFICATION_TERRITORY = 786440 + X_NL_IDENTIFICATION_AUDIENCE = 786441 + X_NL_IDENTIFICATION_APPLICATION = 786442 + X_NL_IDENTIFICATION_ABBREVIATION = 786443 + X_NL_IDENTIFICATION_REVISION = 786444 + X_NL_IDENTIFICATION_DATE = 786445 + X_NL_IDENTIFICATION_CATEGORY = 786446 + X_NL_IDENTIFICATION_CODESET = 786447 + X_NL_NUM_LC_IDENTIFICATION = 786448 + + // This marks the highest value used. + X_NL_NUM = 786449 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Access to locale-dependent parameters. +// Copyright (C) 1995-2021 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 +// . + +// Get the type definition. +// Copyright (C) 1996-2021 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-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// The default message set used by the gencat program. + +// Value for FLAG parameter of `catgets' to say we want XPG4 compliance. + +// Message catalog descriptor type. +type Nl_catd = uintptr /* nl_types.h:33:14 */ + +// Type used by `nl_langinfo'. +type Nl_item = int32 /* nl_types.h:36:13 */ + +// POSIX.1-2008 extended locale interface (see locale.h). +// Definition of locale_t. +// Copyright (C) 2017-2021 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 +// . + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper , 1997. +// +// 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 +// . + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/libc64.go b/vendor/modernc.org/libc/libc64.go index ff2e0e3d..28a958b9 100644 --- a/vendor/modernc.org/libc/libc64.go +++ b/vendor/modernc.org/libc/libc64.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build amd64 || arm64 || s390x -// +build amd64 arm64 s390x +//go:build amd64 || arm64 || riscv64 || s390x +// +build amd64 arm64 riscv64 s390x package libc // import "modernc.org/libc" diff --git a/vendor/modernc.org/libc/libc_linux.go b/vendor/modernc.org/libc/libc_linux.go index d594ab4a..0989c6d5 100644 --- a/vendor/modernc.org/libc/libc_linux.go +++ b/vendor/modernc.org/libc/libc_linux.go @@ -200,6 +200,18 @@ func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { return int32(n) } +// int openat(int dirfd, const char *pathname, int flags, mode_t mode); +func Xopenat(t *TLS, dirfd int32, pathname uintptr, flags int32, mode types.Mode_t) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + fd, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(dirfd), pathname, uintptr(flags), uintptr(mode), 0, 0) + if err != 0 { + t.setErrno(err) + return -1 + } + + return int32(fd) +} + // off_t lseek(int fd, off_t offset, int whence); func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { return types.Off_t(Xlseek64(t, fd, offset, whence)) @@ -347,6 +359,29 @@ func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 { return 0 } +// int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags); +func Xfchmodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, flags int32) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + // Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior + // and check the flags. Otherwise the mode would be applied to the symlink + // destination which is not what the user expects. + if flags&^unix.AT_SYMLINK_NOFOLLOW != 0 { + t.setErrno(unix.EINVAL) + return -1 + } else if flags&unix.AT_SYMLINK_NOFOLLOW != 0 { + t.setErrno(unix.EOPNOTSUPP) + return -1 + } + + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall(unix.SYS_FCHMODAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + // int fchown(int fd, uid_t owner, gid_t group); func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 { if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 { @@ -1421,3 +1456,136 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 { copy((*RawMem)(unsafe.Pointer(uu))[:unsafe.Sizeof(uuid.Uuid_t{})], r[:]) return 0 } + +// int mkdirat(int dirfd, const char *pathname, mode_t mode); +func Xmkdirat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall(unix.SYS_MKDIRAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int symlinkat(const char *target, int newdirfd, const char *linkpath); +func Xsymlinkat(t *TLS, target uintptr, newdirfd int32, linkpath uintptr) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall(unix.SYS_SYMLINKAT, target, uintptr(newdirfd), linkpath); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int utimensat(int dirfd, const char *pathname, const struct timespec times[2], int flags); +func Xutimensat(t *TLS, dirfd int32, pathname, times uintptr, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall6(unix.SYS_UTIMENSAT, uintptr(dirfd), pathname, times, uintptr(flags), 0, 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int unlinkat(int dirfd, const char *pathname, int flags); +func Xunlinkat(t *TLS, dirfd int32, pathname uintptr, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall(unix.SYS_UNLINKAT, uintptr(dirfd), pathname, uintptr(flags)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int faccessat(int dirfd, const char *pathname, int mode, int flags); +func Xfaccessat(t *TLS, dirfd int32, pathname uintptr, mode, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall(unix.SYS_FACCESSAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags); +func Xrenameat2(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall6(unix.SYS_RENAMEAT2, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int mknodat(int dirfd, const char *pathname, mode_t mode, dev_t dev); +func Xmknodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall6(unix.SYS_MKNODAT, uintptr(dirfd), pathname, uintptr(mode), uintptr(dev), 0, 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags); +func Xfchownat(t *TLS, dirfd int32, pathname uintptr, uid types.Uid_t, gid types.Gid_t, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall6(unix.SYS_FCHOWNAT, uintptr(dirfd), pathname, uintptr(uid), uintptr(gid), uintptr(flags), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags); +func Xlinkat(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall6(unix.SYS_LINKAT, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int pipe2(int pipefd[2], int flags); +func Xpipe2(t *TLS, pipefd uintptr, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall(unix.SYS_PIPE2, pipefd, uintptr(flags), 0); err != 0 { + t.setErrno(t) + return -1 + } + + return 0 +} + +// int dup3(int oldfd, int newfd, int flags); +func Xdup3(t *TLS, oldfd int32, newfd int32, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux.go + if _, _, err := unix.Syscall(unix.SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); +func Xreadlinkat(t *TLS, dirfd int32, pathname, buf uintptr, bufsiz types.Size_t) types.Ssize_t { + // From golang.org/x/sys/unix/zsyscall_linux.go + n, _, err := unix.Syscall6(unix.SYS_READLINKAT, uintptr(dirfd), pathname, buf, uintptr(bufsiz), 0, 0) + if err != 0 { + t.setErrno(err) + return -1 + } + + return types.Ssize_t(n) +} diff --git a/vendor/modernc.org/libc/libc_linux_riscv64.go b/vendor/modernc.org/libc/libc_linux_riscv64.go new file mode 100644 index 00000000..0efb296a --- /dev/null +++ b/vendor/modernc.org/libc/libc_linux_riscv64.go @@ -0,0 +1,413 @@ +// Copyright 2020 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "os" + "strings" + "unicode" + "unsafe" + + "golang.org/x/sys/unix" + "modernc.org/libc/errno" + "modernc.org/libc/fcntl" + "modernc.org/libc/signal" + "modernc.org/libc/sys/types" + "modernc.org/libc/utime" + "modernc.org/libc/wctype" +) + +// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + // musl/arch/x86_64/ksigaction.h + // + // struct k_sigaction { + // void (*handler)(int); + // unsigned long flags; + // void (*restorer)(void); + // unsigned mask[2]; + // }; + type k_sigaction struct { + handler uintptr + flags ulong + restorer uintptr + mask [2]uint32 + } + + var kact, koldact uintptr + if act != 0 { + sz := int(unsafe.Sizeof(k_sigaction{})) + kact = t.Alloc(sz) + defer t.Free(sz) + *(*k_sigaction)(unsafe.Pointer(kact)) = k_sigaction{ + handler: (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_handler.Fsa_handler, + flags: ulong((*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags), + restorer: (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_restorer, + } + Xmemcpy(t, kact+unsafe.Offsetof(k_sigaction{}.mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(k_sigaction{}.mask))) + } + if oldact != 0 { + panic(todo("")) + } + + if _, _, err := unix.Syscall6(unix.SYS_RT_SIGACTION, uintptr(signum), kact, koldact, unsafe.Sizeof(k_sigaction{}.mask), 0, 0); err != 0 { + t.setErrno(err) + return -1 + } + + if oldact != 0 { + panic(todo("")) + } + + return 0 +} + +// int fcntl(int fd, int cmd, ... /* arg */ ); +func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + if cmd == fcntl.F_SETFL { + arg |= unix.O_LARGEFILE + } + n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) + if err != 0 { + // if dmesgs { + // dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) + // } + t.setErrno(err) + return -1 + } + + // if dmesgs { + // dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) + // } + return int32(n) +} + +// int fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags); +func Xfstatat(t *TLS, dirfd int32, pathname, statbuf uintptr, flags int32) int32 { + // From golang.org/x/sys/unix/zsyscall_linux_riscv64.go + if _, _, err := unix.Syscall6(unix.SYS_FSTATAT, uintptr(dirfd), pathname, statbuf, uintptr(flags), 0, 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int lstat(const char *pathname, struct stat *statbuf); +func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux_riscv64.go + return Xfstatat(t, unix.AT_FDCWD, pathname, statbuf, unix.AT_SYMLINK_NOFOLLOW) +} + +// int stat(const char *pathname, struct stat *statbuf); +func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux_riscv64.go + return Xfstatat(t, unix.AT_FDCWD, pathname, statbuf, 0) +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 { + // if dmesgs { + // dmesg("%v: fd %d: %v", origin(1), fd, err) + // } + t.setErrno(err) + return -1 + } + + // if dmesgs { + // dmesg("%v: %d size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf))) + // } + return 0 +} + +func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { + return Xmmap64(t, addr, length, prot, flags, fd, offset) +} + +// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); +func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { + data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + if err != 0 { + // if dmesgs { + // dmesg("%v: %v", origin(1), err) + // } + t.setErrno(err) + return ^uintptr(0) // (void*)-1 + } + + // if dmesgs { + // dmesg("%v: %#x", origin(1), data) + // } + return data +} + +// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */); +func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + data, _, err := unix.Syscall6(unix.SYS_MREMAP, old_address, uintptr(old_size), uintptr(new_size), uintptr(flags), arg, 0) + if err != 0 { + // if dmesgs { + // dmesg("%v: %v", origin(1), err) + // } + t.setErrno(err) + return ^uintptr(0) // (void*)-1 + } + + // if dmesgs { + // dmesg("%v: %#x", origin(1), data) + // } + return data +} + +// int ftruncate(int fd, off_t length); +func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 { + if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 { + // if dmesgs { + // dmesg("%v: fd %d: %v", origin(1), fd, err) + // } + t.setErrno(err) + return -1 + } + + // if dmesgs { + // dmesg("%v: %d %#x: ok", origin(1), fd, length) + // } + return 0 +} + +// off64_t lseek64(int fd, off64_t offset, int whence); +func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { + n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + if err != 0 { + // if dmesgs { + // dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err) + // } + t.setErrno(err) + return -1 + } + + // if dmesgs { + // dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n) + // } + return types.Off_t(n) +} + +// From man utime executed on linux/riscv64: +// +// The utimbuf structure is: +// +// struct utimbuf { +// time_t actime; /* access time */ +// time_t modtime; /* modification time */ +// }; + +type utimbuf struct { + actime utime.Time_t + modtime utime.Time_t +} + +// int utime(const char *filename, const struct utimbuf *times); +func Xutime(t *TLS, filename, times uintptr) int32 { + if times == 0 { + return Xutimes(t, filename, 0) + } + + n := int(unsafe.Sizeof([2]types.Timeval{})) + p := t.Alloc(n) + defer t.Free(n) + *(*[2]types.Timeval)(unsafe.Pointer(p)) = [2]types.Timeval{ + {Ftv_sec: (*utimbuf)(unsafe.Pointer(times)).actime}, + {Ftv_sec: (*utimbuf)(unsafe.Pointer(times)).modtime}, + } + return Xutimes(t, filename, p) +} + +// unsigned int alarm(unsigned int seconds); +func Xalarm(t *TLS, seconds uint32) uint32 { + panic(todo("")) + // No alarm syscall on linux/riscv64. And cannot implement with setitimer as in musl, + // because of missing defination to constant ITIMER_REAL in types_linux_riscv64.go. +} + +// time_t time(time_t *tloc); +func Xtime(t *TLS, tloc uintptr) types.Time_t { + // From golang.org/x/sys/unix/syscall_linux_riscv64.go + var tv types.Timeval + if err := Xgettimeofday(t, uintptr(unsafe.Pointer(&tv)), 0); err != 0 { + t.setErrno(err) + return -1 + } + + if tloc != 0 { + *(*types.Time_t)(unsafe.Pointer(tloc)) = tv.Ftv_sec + } + return tv.Ftv_sec +} + +// int getrlimit(int resource, struct rlimit *rlim); +func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int mkdir(const char *path, mode_t mode); +func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xmkdirat(t, unix.AT_FDCWD, path, mode) +} + +// int symlink(const char *target, const char *linkpath); +func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xsymlinkat(t, target, unix.AT_FDCWD, linkpath) +} + +// int chmod(const char *pathname, mode_t mode) +func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xfchmodat(t, unix.AT_FDCWD, pathname, mode, 0) +} + +// int utimes(const char *filename, const struct timeval times[2]); +func Xutimes(t *TLS, filename, times uintptr) int32 { + return Xutimensat(t, unix.AT_FDCWD, filename, times, 0) +} + +// int unlink(const char *pathname); +func Xunlink(t *TLS, pathname uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xunlinkat(t, unix.AT_FDCWD, pathname, 0) +} + +// int access(const char *pathname, int mode); +func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xfaccessat(t, unix.AT_FDCWD, pathname, mode, 0) +} + +// int rmdir(const char *pathname); +func Xrmdir(t *TLS, pathname uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xunlinkat(t, unix.AT_FDCWD, pathname, unix.AT_REMOVEDIR) +} + +// int rename(const char *oldpath, const char *newpath); +func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xrenameat(t, unix.AT_FDCWD, oldpath, unix.AT_FDCWD, newpath) +} + +// int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); +func Xrenameat(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux_riscv64.go + return Xrenameat2(t, olddirfd, oldpath, newdirfd, newpath, 0) +} + +// int mknod(const char *pathname, mode_t mode, dev_t dev); +func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xmknodat(t, unix.AT_FDCWD, pathname, mode, dev) +} + +// int chown(const char *pathname, uid_t owner, gid_t group); +func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xfchownat(t, unix.AT_FDCWD, pathname, owner, group, 0) +} + +// int link(const char *oldpath, const char *newpath); +func Xlink(t *TLS, oldpath, newpath uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xlinkat(t, unix.AT_FDCWD, oldpath, unix.AT_FDCWD, newpath, 0) +} + +// int pipe(int pipefd[2]); +func Xpipe(t *TLS, pipefd uintptr) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xpipe2(t, pipefd, 0) +} + +// int dup2(int oldfd, int newfd); +func Xdup2(t *TLS, oldfd, newfd int32) int32 { + // From golang.org/x/sys/unix/syscall_linux.go + return Xdup3(t, oldfd, newfd, 0) +} + +// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); +func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { + // From golang.org/x/sys/unix/syscall_linux.go + return Xreadlinkat(t, unix.AT_FDCWD, path, buf, bufsize) +} + +// FILE *fopen64(const char *pathname, const char *mode); +func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { + m := strings.ReplaceAll(GoString(mode), "b", "") + var flags int + switch m { + case "r": + flags = os.O_RDONLY + case "r+": + flags = os.O_RDWR + case "w": + flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC + case "w+": + flags = os.O_RDWR | os.O_CREATE | os.O_TRUNC + case "a": + flags = os.O_WRONLY | os.O_CREATE | os.O_APPEND + case "a+": + flags = os.O_RDWR | os.O_CREATE | os.O_APPEND + default: + panic(m) + } + //TODO- flags |= fcntl.O_LARGEFILE + + // From golang.org/x/sys/unix/syscall_linux.go + fd := Xopenat(t, unix.AT_FDCWD, pathname, int32(flags|unix.O_LARGEFILE), 0666) + if fd == -1 { + return 0 + } + + if p := newFile(t, fd); p != 0 { + return p + } + + Xclose(t, fd) + t.setErrno(errno.ENOMEM) + return 0 +} + +// int iswspace(wint_t wc); +func Xiswspace(t *TLS, wc wctype.Wint_t) int32 { + return Bool32(unicode.IsSpace(rune(wc))) +} + +// int iswalnum(wint_t wc); +func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 { + return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc))) +} + +func __syscall1(t *TLS, trap, p1 long) long { + return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), 0, 0)) +} + +func __syscall3(t *TLS, trap, p1, p2, p3 long) long { + return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3))) +} + +func __syscall4(t *TLS, trap, p1, p2, p3, p4 long) long { + return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0)) +} diff --git a/vendor/modernc.org/libc/limits/capi_linux_riscv64.go b/vendor/modernc.org/libc/limits/capi_linux_riscv64.go new file mode 100644 index 00000000..0706f0d6 --- /dev/null +++ b/vendor/modernc.org/libc/limits/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o limits/limits_linux_riscv64.go -pkgname limits', DO NOT EDIT. + +package limits + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/limits/limits_linux_riscv64.go b/vendor/modernc.org/libc/limits/limits_linux_riscv64.go new file mode 100644 index 00000000..2a46b72f --- /dev/null +++ b/vendor/modernc.org/libc/limits/limits_linux_riscv64.go @@ -0,0 +1,1153 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o limits/limits_linux_riscv64.go -pkgname limits', DO NOT EDIT. + +package limits + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AIO_PRIO_DELTA_MAX = 20 + BC_BASE_MAX = 99 + BC_DIM_MAX = 2048 + BC_SCALE_MAX = 99 + BC_STRING_MAX = 1000 + CHARCLASS_NAME_MAX = 2048 + CHAR_BIT = 8 + CHAR_MAX = 255 + CHAR_MIN = 0 + COLL_WEIGHTS_MAX = 255 + DELAYTIMER_MAX = 2147483647 + EXPR_NEST_MAX = 32 + HOST_NAME_MAX = 64 + INT_MAX = 2147483647 + INT_MIN = -2147483648 + LINE_MAX = 2048 + LLONG_MAX = 9223372036854775807 + LLONG_MIN = -9223372036854775808 + LOGIN_NAME_MAX = 256 + LONG_MAX = 9223372036854775807 + LONG_MIN = -9223372036854775808 + MAX_CANON = 255 + MAX_INPUT = 255 + MB_LEN_MAX = 16 + MQ_PRIO_MAX = 32768 + NAME_MAX = 255 + NGROUPS_MAX = 65536 + PATH_MAX = 4096 + PIPE_BUF = 4096 + PTHREAD_DESTRUCTOR_ITERATIONS = 4 + PTHREAD_KEYS_MAX = 1024 + PTHREAD_STACK_MIN = 16384 + RE_DUP_MAX = 32767 + RTSIG_MAX = 32 + SCHAR_MAX = 127 + SCHAR_MIN = -128 + SEM_VALUE_MAX = 2147483647 + SHRT_MAX = 32767 + SHRT_MIN = -32768 + SSIZE_MAX = 9223372036854775807 + TTY_NAME_MAX = 32 + UCHAR_MAX = 255 + UINT_MAX = 4294967295 + ULLONG_MAX = 18446744073709551615 + ULONG_MAX = 18446744073709551615 + USHRT_MAX = 65535 + XATTR_LIST_MAX = 65536 + XATTR_NAME_MAX = 255 + XATTR_SIZE_MAX = 65536 + X_ATFILE_SOURCE = 1 + X_BITS_POSIX1_LIM_H = 1 + X_BITS_POSIX2_LIM_H = 1 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_LIMITS_H_ = 0 + X_LIBC_LIMITS_H_ = 1 + X_LIMITS_H___ = 0 + X_LINUX_LIMITS_H = 0 + X_LP64 = 1 + X_POSIX2_BC_BASE_MAX = 99 + X_POSIX2_BC_DIM_MAX = 2048 + X_POSIX2_BC_SCALE_MAX = 99 + X_POSIX2_BC_STRING_MAX = 1000 + X_POSIX2_CHARCLASS_NAME_MAX = 14 + X_POSIX2_COLL_WEIGHTS_MAX = 2 + X_POSIX2_EXPR_NEST_MAX = 32 + X_POSIX2_LINE_MAX = 2048 + X_POSIX2_RE_DUP_MAX = 255 + X_POSIX_AIO_LISTIO_MAX = 2 + X_POSIX_AIO_MAX = 1 + X_POSIX_ARG_MAX = 4096 + X_POSIX_CHILD_MAX = 25 + X_POSIX_CLOCKRES_MIN = 20000000 + X_POSIX_C_SOURCE = 200809 + X_POSIX_DELAYTIMER_MAX = 32 + X_POSIX_HOST_NAME_MAX = 255 + X_POSIX_LINK_MAX = 8 + X_POSIX_LOGIN_NAME_MAX = 9 + X_POSIX_MAX_CANON = 255 + X_POSIX_MAX_INPUT = 255 + X_POSIX_MQ_OPEN_MAX = 8 + X_POSIX_MQ_PRIO_MAX = 32 + X_POSIX_NAME_MAX = 14 + X_POSIX_NGROUPS_MAX = 8 + X_POSIX_OPEN_MAX = 20 + X_POSIX_PATH_MAX = 256 + X_POSIX_PIPE_BUF = 512 + X_POSIX_RE_DUP_MAX = 255 + X_POSIX_RTSIG_MAX = 8 + X_POSIX_SEM_NSEMS_MAX = 256 + X_POSIX_SEM_VALUE_MAX = 32767 + X_POSIX_SIGQUEUE_MAX = 32 + X_POSIX_SOURCE = 1 + X_POSIX_SSIZE_MAX = 32767 + X_POSIX_STREAM_MAX = 8 + X_POSIX_SYMLINK_MAX = 255 + X_POSIX_SYMLOOP_MAX = 8 + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 + X_POSIX_THREAD_KEYS_MAX = 128 + X_POSIX_THREAD_THREADS_MAX = 64 + X_POSIX_TIMER_MAX = 32 + X_POSIX_TTY_NAME_MAX = 9 + X_POSIX_TZNAME_MAX = 6 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1992-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 3, or (at your option) any later +// version. +// +// GCC 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 General Public License +// for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// This administrivia gets added to the beginning of limits.h +// if the system has its own version of limits.h. + +// We use _GCC_LIMITS_H_ because we want this not to match +// any macros that the system's limits.h uses for its own purposes. + +// Use "..." so that we find syslimits.h only in this same directory. +// syslimits.h stands for the system's own limits.h file. +// If we can use it ok unmodified, then we install this text. +// If fixincludes fixes it, then the fixed version is installed +// instead of this text. + +// Copyright (C) 1991-2021 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 +// . + +// ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types + +// Handle feature test macros at the start of a header. +// Copyright (C) 2016-2021 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 +// . + +// This header is internal to glibc and should not be included outside +// of glibc headers. Headers including it must define +// __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header +// cannot have multiple include guards because ISO C feature test +// macros depend on the definition of the macro when an affected +// header is included, not when the first system header is +// included. + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ +// macro. + +// ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ +// macro. Most but not all symbols enabled by that macro in TS +// 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in +// Annex F still require a new feature test macro +// __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define +// __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS +// 18661-1 are not included in C2X (and thus should depend on +// __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are +// enabled). +// +// __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS +// 18661-1 not included in C2X. +// +// __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS +// 18661-1 that are also included in C2X (with no feature test macro +// required in C2X). +// +// __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1 +// that are included in C2X but conditional on +// __STDC_WANT_IEC_60559_EXT__. (There are currently no features +// conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS +// 18661-1.) + +// ISO/IEC TS 18661-4:2015 defines the +// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction +// functions, the symbols from this TS are enabled unconditionally in +// C2X. + +// ISO/IEC TS 18661-3:2015 defines the +// __STDC_WANT_IEC_60559_TYPES_EXT__ macro. + +// Maximum length of any multibyte character in any locale. +// We define this value here since the gcc header does not define +// the correct value. + +// If we are not using GNU CC we have to define all the symbols ourself. +// Otherwise use gcc's definitions (see below). + +// Get the compiler's limits.h, which defines almost all the ISO constants. +// +// We put this #include_next outside the double inclusion check because +// it should be possible to include this file more than once and still get +// the definitions from gcc's header. + +// The files in some gcc versions don't define LLONG_MIN, +// LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for +// ages are available. + +// The integer width macros are not defined by GCC's before +// GCC 7, or if _GNU_SOURCE rather than +// __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. + +// The macros for _Bool are not defined by GCC's before GCC +// 11, or if _GNU_SOURCE is defined rather than enabling C2x support +// with -std. + +// POSIX adds things to . +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.9.2 Minimum Values Added to +// +// Never include this file directly; use instead. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// These are the standard-mandated minimum values. + +// Minimum number of operations in one list I/O call. + +// Minimal number of outstanding asynchronous I/O operations. + +// Maximum length of arguments to `execve', including environment. + +// Maximum simultaneous processes per real user ID. + +// Minimal number of timer expiration overruns. + +// Maximum length of a host name (not including the terminating null) +// as returned from the GETHOSTNAME function. + +// Maximum link count of a file. + +// Maximum length of login name. + +// Number of bytes in a terminal canonical input queue. + +// Number of bytes for which space will be +// available in a terminal input queue. + +// Maximum number of message queues open for a process. + +// Maximum number of supported message priorities. + +// Number of bytes in a filename. + +// Number of simultaneous supplementary group IDs per process. + +// Number of files one process can have open at once. + +// Number of bytes in a pathname. + +// Number of bytes than can be written atomically to a pipe. + +// The number of repeated occurrences of a BRE permitted by the +// REGEXEC and REGCOMP functions when using the interval notation. + +// Minimal number of realtime signals reserved for the application. + +// Number of semaphores a process can have. + +// Maximal value of a semaphore. + +// Number of pending realtime signals. + +// Largest value of a `ssize_t'. + +// Number of streams a process can have open at once. + +// The number of bytes in a symbolic link. + +// The number of symbolic links that can be traversed in the +// resolution of a pathname in the absence of a loop. + +// Number of timer for a process. + +// Maximum number of characters in a tty name. + +// Maximum length of a timezone name (element of `tzname'). + +// Maximum clock resolution in nanoseconds. + +// Get the implementation-specific values for the above. +// Minimum guaranteed maximum values for system limits. Linux version. +// Copyright (C) 1993-2021 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; see the file COPYING.LIB. If +// not, see . + +// The kernel header pollutes the namespace with the NR_OPEN symbol +// and defines LINK_MAX although filesystems have different maxima. A +// similar thing is true for OPEN_MAX: the limit can be changed at +// runtime and therefore the macro must not be defined. Remove this +// after including the header if necessary. + +// The kernel sources contain a file with all the needed information. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Have to remove NR_OPEN? +// Have to remove LINK_MAX? +// Have to remove OPEN_MAX? +// Have to remove ARG_MAX? + +// The number of data keys per process. +// This is the value this implementation supports. + +// Controlling the iterations of destructors for thread-specific data. +// Number of iterations this implementation does. + +// The number of threads per process. +// We have no predefined limit on the number of threads. + +// Maximum amount by which a process can descrease its asynchronous I/O +// priority level. + +// Arrange for the definition of PTHREAD_STACK_MIN. +// Definition of PTHREAD_STACK_MIN, possibly dynamic. +// Copyright (C) 2021 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 +// . + +// Definition of PTHREAD_STACK_MIN. Linux version. +// Copyright (C) 2021 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 +// . + +// Minimum size for a thread. We are free to choose a reasonable value. + +// Maximum number of timer expiration overruns. + +// Maximum tty name length. + +// Maximum login name length. This is arbitrary. + +// Maximum host name length. + +// Maximum message queue priority level. + +// Maximum value the semaphore can have. + +// ssize_t is not formally required to be the signed type +// corresponding to size_t, but it is for all configurations supported +// by glibc. + +// This value is a guaranteed minimum maximum. +// The current maximum can be got from `sysconf'. + +// Copyright (C) 1991-2021 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 +// . + +// Never include this file directly; include instead. + +// The maximum `ibase' and `obase' values allowed by the `bc' utility. + +// The maximum number of elements allowed in an array by the `bc' utility. + +// The maximum `scale' value allowed by the `bc' utility. + +// The maximum length of a string constant accepted by the `bc' utility. + +// The maximum number of weights that can be assigned to an entry of +// the LC_COLLATE `order' keyword in the locale definition file. + +// The maximum number of expressions that can be nested +// within parentheses by the `expr' utility. + +// The maximum length, in bytes, of an input line. + +// The maximum number of repeated occurrences of a regular expression +// permitted when using the interval notation `\{M,N\}'. + +// The maximum number of bytes in a character class name. We have no +// fixed limit, 2048 is a high number. + +// These values are implementation-specific, +// and may vary within the implementation. +// Their precise values can be obtained from sysconf. + +// This value is defined like this in regex.h. + +// Copyright (C) 1991-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 3, or (at your option) any later +// version. +// +// GCC 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 General Public License +// for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// Number of bits in a `char'. + +// Maximum length of a multibyte character. + +// Minimum and maximum values a `signed char' can hold. + +// Maximum value an `unsigned char' can hold. (Minimum is 0). + +// Minimum and maximum values a `char' can hold. + +// Minimum and maximum values a `signed short int' can hold. + +// Maximum value an `unsigned short int' can hold. (Minimum is 0). + +// Minimum and maximum values a `signed int' can hold. + +// Maximum value an `unsigned int' can hold. (Minimum is 0). + +// Minimum and maximum values a `signed long int' can hold. +// (Same as `int'). + +// Maximum value an `unsigned long int' can hold. (Minimum is 0). + +// Minimum and maximum values a `signed long long int' can hold. + +// Maximum value an `unsigned long long int' can hold. (Minimum is 0). + +// This administrivia gets added to the end of limits.h +// if the system has its own version of limits.h. + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/musl_linux_riscv64.go b/vendor/modernc.org/libc/musl_linux_riscv64.go new file mode 100644 index 00000000..57470023 --- /dev/null +++ b/vendor/modernc.org/libc/musl_linux_riscv64.go @@ -0,0 +1,6997 @@ +// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_riscv64.go -pkgname libc -static-locals-prefix _s -Iarch/riscv64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT. + +package libc + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +// musl as a whole is licensed under the following standard MIT license: +// +// ---------------------------------------------------------------------- +// Copyright © 2005-2020 Rich Felker, et al. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// ---------------------------------------------------------------------- +// +// Authors/contributors include: +// +// A. Wilcox +// Ada Worcester +// Alex Dowad +// Alex Suykov +// Alexander Monakov +// Andre McCurdy +// Andrew Kelley +// Anthony G. Basile +// Aric Belsito +// Arvid Picciani +// Bartosz Brachaczek +// Benjamin Peterson +// Bobby Bingham +// Boris Brezillon +// Brent Cook +// Chris Spiegel +// Clément Vasseur +// Daniel Micay +// Daniel Sabogal +// Daurnimator +// David Carlier +// David Edelsohn +// Denys Vlasenko +// Dmitry Ivanov +// Dmitry V. Levin +// Drew DeVault +// Emil Renner Berthing +// Fangrui Song +// Felix Fietkau +// Felix Janda +// Gianluca Anzolin +// Hauke Mehrtens +// He X +// Hiltjo Posthuma +// Isaac Dunham +// Jaydeep Patil +// Jens Gustedt +// Jeremy Huntwork +// Jo-Philipp Wich +// Joakim Sindholt +// John Spencer +// Julien Ramseier +// Justin Cormack +// Kaarle Ritvanen +// Khem Raj +// Kylie McClain +// Leah Neukirchen +// Luca Barbato +// Luka Perkov +// M Farkas-Dyck (Strake) +// Mahesh Bodapati +// Markus Wichmann +// Masanori Ogino +// Michael Clark +// Michael Forney +// Mikhail Kremnyov +// Natanael Copa +// Nicholas J. Kain +// orc +// Pascal Cuoq +// Patrick Oppenlander +// Petr Hosek +// Petr Skocik +// Pierre Carrier +// Reini Urban +// Rich Felker +// Richard Pennington +// Ryan Fairfax +// Samuel Holland +// Segev Finer +// Shiz +// sin +// Solar Designer +// Stefan Kristiansson +// Stefan O'Rear +// Szabolcs Nagy +// Timo Teräs +// Trutz Behn +// Valentin Ochs +// Will Dietz +// William Haddon +// William Pitcock +// +// Portions of this software are derived from third-party works licensed +// under terms compatible with the above MIT license: +// +// The TRE regular expression implementation (src/regex/reg* and +// src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +// under a 2-clause BSD license (license text in the source files). The +// included version has been heavily modified by Rich Felker in 2012, in +// the interests of size, simplicity, and namespace cleanliness. +// +// Much of the math library code (src/math/* and src/complex/*) is +// Copyright © 1993,2004 Sun Microsystems or +// Copyright © 2003-2011 David Schultz or +// Copyright © 2003-2009 Steven G. Kargl or +// Copyright © 2003-2009 Bruce D. Evans or +// Copyright © 2008 Stephen L. Moshier or +// Copyright © 2017-2018 Arm Limited +// and labelled as such in comments in the individual source files. All +// have been licensed under extremely permissive terms. +// +// The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +// The Android Open Source Project and is licensed under a two-clause BSD +// license. It was taken from Bionic libc, used on Android. +// +// The AArch64 memcpy and memset code (src/string/aarch64/*) are +// Copyright © 1999-2019, Arm Limited. +// +// The implementation of DES for crypt (src/crypt/crypt_des.c) is +// Copyright © 1994 David Burren. It is licensed under a BSD license. +// +// The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +// originally written by Solar Designer and placed into the public +// domain. The code also comes with a fallback permissive license for use +// in jurisdictions that may not recognize the public domain. +// +// The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +// Valentin Ochs and is licensed under an MIT-style license. +// +// The x86_64 port was written by Nicholas J. Kain and is licensed under +// the standard MIT terms. +// +// The mips and microblaze ports were originally written by Richard +// Pennington for use in the ellcc project. The original code was adapted +// by Rich Felker for build system and code conventions during upstream +// integration. It is licensed under the standard MIT terms. +// +// The mips64 port was contributed by Imagination Technologies and is +// licensed under the standard MIT terms. +// +// The powerpc port was also originally written by Richard Pennington, +// and later supplemented and integrated by John Spencer. It is licensed +// under the standard MIT terms. +// +// All other files which have no copyright comments are original works +// produced specifically for use as part of this library, written either +// by Rich Felker, the main author of the library, or by one or more +// contibutors listed above. Details on authorship of individual files +// can be found in the git version control history of the project. The +// omission of copyright and license comments in each file is in the +// interest of source tree size. +// +// In addition, permission is hereby granted for all public header files +// (include/* and arch/*/bits/*) and crt files intended to be linked into +// applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +// the copyright notice and permission notice otherwise required by the +// license, and to use these files without any requirement of +// attribution. These files include substantial contributions from: +// +// Bobby Bingham +// John Spencer +// Nicholas J. Kain +// Rich Felker +// Richard Pennington +// Stefan Kristiansson +// Szabolcs Nagy +// +// all of whom have explicitly granted such permission. +// +// This file previously contained text expressing a belief that most of +// the files covered by the above exception were sufficiently trivial not +// to be subject to copyright, resulting in confusion over whether it +// negated the permissions granted in the license. In the spirit of +// permissive licensing, and of not having licensing issues being an +// obstacle to adoption, that text has been removed. +const ( /* copyright.c:194:1: */ + __musl__copyright__ = 0 +) + +const ( /* nameser.h:117:1: */ + ns_uop_delete = 0 + ns_uop_add = 1 + ns_uop_max = 2 +) + +const ( /* nameser.h:147:1: */ + ns_t_invalid = 0 + ns_t_a = 1 + ns_t_ns = 2 + ns_t_md = 3 + ns_t_mf = 4 + ns_t_cname = 5 + ns_t_soa = 6 + ns_t_mb = 7 + ns_t_mg = 8 + ns_t_mr = 9 + ns_t_null = 10 + ns_t_wks = 11 + ns_t_ptr = 12 + ns_t_hinfo = 13 + ns_t_minfo = 14 + ns_t_mx = 15 + ns_t_txt = 16 + ns_t_rp = 17 + ns_t_afsdb = 18 + ns_t_x25 = 19 + ns_t_isdn = 20 + ns_t_rt = 21 + ns_t_nsap = 22 + ns_t_nsap_ptr = 23 + ns_t_sig = 24 + ns_t_key = 25 + ns_t_px = 26 + ns_t_gpos = 27 + ns_t_aaaa = 28 + ns_t_loc = 29 + ns_t_nxt = 30 + ns_t_eid = 31 + ns_t_nimloc = 32 + ns_t_srv = 33 + ns_t_atma = 34 + ns_t_naptr = 35 + ns_t_kx = 36 + ns_t_cert = 37 + ns_t_a6 = 38 + ns_t_dname = 39 + ns_t_sink = 40 + ns_t_opt = 41 + ns_t_apl = 42 + ns_t_tkey = 249 + ns_t_tsig = 250 + ns_t_ixfr = 251 + ns_t_axfr = 252 + ns_t_mailb = 253 + ns_t_maila = 254 + ns_t_any = 255 + ns_t_zxfr = 256 + ns_t_max = 65536 +) + +const ( /* nameser.h:210:1: */ + ns_c_invalid = 0 + ns_c_in = 1 + ns_c_2 = 2 + ns_c_chaos = 3 + ns_c_hs = 4 + ns_c_none = 254 + ns_c_any = 255 + ns_c_max = 65536 +) + +const ( /* nameser.h:221:1: */ + ns_kt_rsa = 1 + ns_kt_dh = 2 + ns_kt_dsa = 3 + ns_kt_private = 254 +) + +const ( /* nameser.h:228:1: */ + cert_t_pkix = 1 + cert_t_spki = 2 + cert_t_pgp = 3 + cert_t_url = 253 + cert_t_oid = 254 +) + +const ( /* nameser.h:28:1: */ + ns_s_qd = 0 + ns_s_zn = 0 + ns_s_an = 1 + ns_s_pr = 1 + ns_s_ns = 2 + ns_s_ud = 2 + ns_s_ar = 3 + ns_s_max = 4 +) + +const ( /* nameser.h:75:1: */ + ns_f_qr = 0 + ns_f_opcode = 1 + ns_f_aa = 2 + ns_f_tc = 3 + ns_f_rd = 4 + ns_f_ra = 5 + ns_f_z = 6 + ns_f_ad = 7 + ns_f_cd = 8 + ns_f_rcode = 9 + ns_f_max = 10 +) + +const ( /* nameser.h:89:1: */ + ns_o_query = 0 + ns_o_iquery = 1 + ns_o_status = 2 + ns_o_notify = 4 + ns_o_update = 5 + ns_o_max = 6 +) + +const ( /* nameser.h:98:1: */ + ns_r_noerror = 0 + ns_r_formerr = 1 + ns_r_servfail = 2 + ns_r_nxdomain = 3 + ns_r_notimpl = 4 + ns_r_refused = 5 + ns_r_yxdomain = 6 + ns_r_yxrrset = 7 + ns_r_nxrrset = 8 + ns_r_notauth = 9 + ns_r_notzone = 10 + ns_r_max = 11 + ns_r_badvers = 16 + ns_r_badsig = 16 + ns_r_badkey = 17 + ns_r_badtime = 18 +) + +const ( /* pthread_impl.h:58:1: */ + DT_EXITING = 0 + DT_JOINABLE = 1 + DT_DETACHED = 2 +) + +type ptrdiff_t = int64 /* :3:26 */ + +type size_t = uint64 /* :9:23 */ + +type wchar_t = int32 /* :15:24 */ + +type uint16_t = uint16 /* alltypes.h:124:25 */ + +type uint32_t = uint32 /* alltypes.h:129:25 */ + +type uint64_t = uint64 /* alltypes.h:134:25 */ + +func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */ + return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24 +} + +var table = [384]uint16{ + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x320/256 | 0x320*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x160/256 | 0x160*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), + uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), + uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), + uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), + uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), + uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), + uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), + uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), +} /* __ctype_b_loc.c:9:29 */ + +var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */ + +func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */ + return uintptr(unsafe.Pointer(&ptable)) +} + +func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ + return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) +} + +type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:341:9 */ + +type locale_t = uintptr /* alltypes.h:341:32 */ + +func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisalpha(tls, c) + } + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + }() != 0 || func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0) +} + +func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ + return Xisalnum(tls, c) +} + +func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) +} + +func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ + return Xisalpha(tls, c) +} + +func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ + return Bool32(uint32(c)-uint32('0') < uint32(10)) +} + +func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ + return Xisdigit(tls, c) +} + +func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */ + return Bool32(uint32(c)-uint32('a') < uint32(26)) +} + +func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ + return Xislower(tls, c) +} + +func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ + return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) +} + +func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ + return Xisprint(tls, c) +} + +func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */ + return Bool32(uint32(c)-uint32('A') < uint32(26)) +} + +func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */ + return Xisupper(tls, c) +} + +func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) +} + +func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ + return Xisxdigit(tls, c) +} + +type off_t = int64 /* alltypes.h:160:16 */ + +type ino_t = uint64 /* alltypes.h:165:25 */ + +type dirent = struct { + d_ino ino_t + d_off off_t + d_reclen uint16 + d_type uint8 + d_name [256]uint8 + _ [5]byte +} /* dirent.h:5:1 */ + +type __dirstream = struct { + tell off_t + fd int32 + buf_pos int32 + buf_end int32 + lock [1]int32 + buf [2048]uint8 +} /* dirent.h:20:9 */ + +type DIR = __dirstream /* dirent.h:20:28 */ + +type ssize_t = int64 /* alltypes.h:63:15 */ + +type intptr_t = int64 /* alltypes.h:68:15 */ + +type pid_t = int32 /* alltypes.h:233:13 */ + +type uid_t = uint32 /* alltypes.h:243:18 */ + +type gid_t = uint32 /* alltypes.h:248:18 */ + +type useconds_t = uint32 /* alltypes.h:258:18 */ + +type div_t = struct { + quot int32 + rem int32 +} /* stdlib.h:62:35 */ +type ldiv_t = struct { + quot int64 + rem int64 +} /* stdlib.h:63:36 */ +type lldiv_t = struct { + quot int64 + rem int64 +} /* stdlib.h:64:41 */ + +func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */ + var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd) + Xfree(tls, dir) + return ret +} + +type mode_t = uint32 /* alltypes.h:150:18 */ + +type iovec = struct { + iov_base uintptr + iov_len size_t +} /* alltypes.h:353:1 */ + +type flock = struct { + l_type int16 + l_whence int16 + _ [4]byte + l_start off_t + l_len off_t + l_pid pid_t + _ [4]byte +} /* fcntl.h:24:1 */ + +type file_handle = struct { + _ [0]uint32 + handle_bytes uint32 + handle_type int32 +} /* fcntl.h:167:1 */ + +type f_owner_ex = struct { + __type int32 + pid pid_t +} /* fcntl.h:172:1 */ + +// We don't have a clock_gettime function. +// #define VDSO_CGT_SYM "__vdso_clock_gettime" +// #define VDSO_CGT_VER "LINUX_2.6" + +type syscall_arg_t = int64 /* syscall.h:22:14 */ + +func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */ + var fd int32 + var dir uintptr + + if AssignInt32(&fd, Xopen(tls, name, 00|0200000|02000000, 0)) < 0 { + return uintptr(0) + } + if !(int32(AssignUintptr(&dir, Xcalloc(tls, uint64(1), uint64(unsafe.Sizeof(DIR{}))))) != 0) { + __syscall1(tls, int64(57), int64(fd)) + return uintptr(0) + } + (*DIR)(unsafe.Pointer(dir)).fd = fd + return dir +} + +type max_align_t = struct { + __ll int64 + __ld float64 +} /* alltypes.h:39:54 */ + +type dirstream_buf_alignment_check = [1]uint8 /* readdir.c:7:14 */ + +func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */ + var de uintptr + + if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end { + var len int32 = int32(__syscall3(tls, int64(61), int64((*DIR)(unsafe.Pointer(dir)).fd), int64(dir+24), int64(unsafe.Sizeof([2048]uint8{})))) + if len <= 0 { + if len < 0 && len != -2 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = -len + } + return uintptr(0) + } + (*DIR)(unsafe.Pointer(dir)).buf_end = len + (*DIR)(unsafe.Pointer(dir)).buf_pos = 0 + } + de = dir + 24 + uintptr((*DIR)(unsafe.Pointer(dir)).buf_pos) + *(*int32)(unsafe.Pointer(dir + 12)) += int32((*dirent)(unsafe.Pointer(de)).d_reclen) + (*DIR)(unsafe.Pointer(dir)).tell = (*dirent)(unsafe.Pointer(de)).d_off + return de +} + +type uintptr_t = uint64 /* alltypes.h:53:24 */ + +type int8_t = int8 /* alltypes.h:94:25 */ + +type int16_t = int16 /* alltypes.h:99:25 */ + +type int32_t = int32 /* alltypes.h:104:25 */ + +type int64_t = int64 /* alltypes.h:109:25 */ + +type intmax_t = int64 /* alltypes.h:114:25 */ + +type uint8_t = uint8 /* alltypes.h:119:25 */ + +type uintmax_t = uint64 /* alltypes.h:144:25 */ + +type int_fast8_t = int8_t /* stdint.h:22:16 */ +type int_fast64_t = int64_t /* stdint.h:23:17 */ + +type int_least8_t = int8_t /* stdint.h:25:17 */ +type int_least16_t = int16_t /* stdint.h:26:17 */ +type int_least32_t = int32_t /* stdint.h:27:17 */ +type int_least64_t = int64_t /* stdint.h:28:17 */ + +type uint_fast8_t = uint8_t /* stdint.h:30:17 */ +type uint_fast64_t = uint64_t /* stdint.h:31:18 */ + +type uint_least8_t = uint8_t /* stdint.h:33:18 */ +type uint_least16_t = uint16_t /* stdint.h:34:18 */ +type uint_least32_t = uint32_t /* stdint.h:35:18 */ +type uint_least64_t = uint64_t /* stdint.h:36:18 */ + +type int_fast16_t = int32_t /* stdint.h:1:17 */ +type int_fast32_t = int32_t /* stdint.h:2:17 */ +type uint_fast16_t = uint32_t /* stdint.h:3:18 */ +type uint_fast32_t = uint32_t /* stdint.h:4:18 */ + +type _IO_FILE = struct { + flags uint32 + _ [4]byte + rpos uintptr + rend uintptr + close uintptr + wend uintptr + wpos uintptr + mustbezero_1 uintptr + wbase uintptr + read uintptr + write uintptr + seek uintptr + buf uintptr + buf_size size_t + prev uintptr + next uintptr + fd int32 + pipe_pid int32 + lockcount int64 + mode int32 + lock int32 + lbf int32 + _ [4]byte + cookie uintptr + off off_t + getln_buf uintptr + mustbezero_2 uintptr + shend uintptr + shlim off_t + shcnt off_t + prev_locked uintptr + next_locked uintptr + locale uintptr +} /* alltypes.h:318:9 */ + +type FILE = _IO_FILE /* alltypes.h:318:25 */ + +type va_list = uintptr /* alltypes.h:324:27 */ + +type _G_fpos64_t = struct { + _ [0]uint64 + __opaque [16]uint8 +} /* stdio.h:54:9 */ + +type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ + +type float_t = float32 /* alltypes.h:28:15 */ + +type double_t = float64 /* alltypes.h:33:16 */ + +func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var __u struct {__f float32;} at bp, 4 + + *(*float32)(unsafe.Pointer(bp)) = __f + return *(*uint32)(unsafe.Pointer(bp)) +} + +func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var __u struct {__f float64;} at bp, 8 + + *(*float64)(unsafe.Pointer(bp)) = __f + return *(*uint64)(unsafe.Pointer(bp)) +} + +type __pthread = struct { + self uintptr + dtv uintptr + prev uintptr + next uintptr + sysinfo uintptr_t + canary uintptr_t + canary2 uintptr_t + tid int32 + errno_val int32 + detach_state int32 + cancel int32 + canceldisable uint8 + cancelasync uint8 + tsd_used uint8 /* unsigned char tsd_used: 1, unsigned char dlerror_flag: 1 */ + _ [5]byte + map_base uintptr + map_size size_t + stack uintptr + stack_size size_t + guard_size size_t + result uintptr + cancelbuf uintptr + tsd uintptr + robust_list struct { + head uintptr + off int64 + pending uintptr + } + timer_id int32 + _ [4]byte + locale locale_t + killlock [1]int32 + _ [4]byte + dlerror_buf uintptr + stdio_locks uintptr + canary_at_end uintptr_t + dtv_copy uintptr +} /* alltypes.h:271:9 */ + +func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ + var c int32 + var x int32 + var y int64 + var neg int32 = 0 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c == '+' || c == '-' { + neg = Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') >= 10 && pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + } + if uint32(c-'0') >= 10 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + return -0x7fffffffffffffff - int64(1) + } + for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + x = 10*x + c - '0' + } + for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + y = int64(10)*y + int64(c) - int64('0') + } + for ; uint32(c-'0') < 10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if neg != 0 { + return -y + } + return y +} + +func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var x [128]uint32_t at bp, 512 + + var i int32 + var j int32 + var k int32 + var a int32 + var z int32 + var lrp int64 = int64(0) + var dc int64 = int64(0) + var e10 int64 = int64(0) + var lnz int32 = 0 + var gotdig int32 = 0 + var gotrad int32 = 0 + var rp int32 + var e2 int32 + var emax int32 = -emin - bits + 3 + var denormal int32 = 0 + var y float64 + var frac float64 = float64(0) + var bias float64 = float64(0) + + j = 0 + k = 0 + + // Don't let leading zeros consume buffer space + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + if c == '.' { + gotrad = 1 + for c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }(); c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + lrp-- + } + } + + *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) + for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + gotrad = 1 + lrp = dc + } else if k < 128-3 { + dc++ + if c != '0' { + lnz = int32(dc) + } + if j != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') + } + if PreIncInt32(&j, 1) == 9 { + k++ + j = 0 + } + gotdig = 1 + } else { + dc++ + if c != '0' { + lnz = (128 - 4) * 9 + *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) + } + } + } + if !(gotrad != 0) { + lrp = dc + } + + if gotdig != 0 && c|32 == 'e' { + e10 = scanexp(tls, f, pok) + if e10 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e10 = int64(0) + } + lrp = lrp + e10 + } else if c >= 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + if !(gotdig != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + // Handle zero specially to avoid nasty special cases later + if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { + return float64(sign) * 0.0 + } + + // Optimize small integers (w/no exponent) and over/under-flow + if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if lrp > int64(-emin/2) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if lrp < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + // Align incomplete final B1B digit + if j != 0 { + for ; j < 9; j++ { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10) + } + k++ + j = 0 + } + + a = 0 + z = k + e2 = 0 + rp = int32(lrp) + + // Optimize small to mid-size integers (even in exp. notation) + if lnz < 9 && lnz <= rp && rp < 18 { + if rp == 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if rp < 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp]) + } + var bitlim int32 = bits - 3*(rp-9) + if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10]) + } + } + + // Drop trailing zeros + for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- { + } + + // Align radix point to B1B digit boundary + if rp%9 != 0 { + var rpm9 int32 + if rp >= 0 { + rpm9 = rp % 9 + } else { + rpm9 = rp%9 + 9 + } + var p10 int32 = _sp10s[8-rpm9] + var carry uint32_t = uint32_t(0) + for k = a; k != z; k++ { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry + carry = uint32_t(1000000000/p10) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + rp = rp - 9 + } + } + if carry != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry + } + rp = rp + (9 - rpm9) + } + + // Upscale until desired number of bits are left of radix point + for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] { + var carry uint32_t = uint32_t(0) + e2 = e2 - 29 + for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) { + var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry) + if tmp > uint64(1000000000) { + carry = uint32_t(tmp / uint64(1000000000)) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000)) + } else { + carry = uint32_t(0) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp) + } + if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + z = k + } + if k == a { + break + } + } + if carry != 0 { + rp = rp + 9 + a = (a - 1) & (128 - 1) + if a == z { + z = (z - 1) & (128 - 1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) + } + *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry + } + } + + // Downscale until exactly number of bits are left of radix point + for { + var carry uint32_t = uint32_t(0) + var sh int32 = 1 + for i = 0; i < 2; i++ { + k = (a + i) & (128 - 1) + if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] { + i = 2 + break + } + if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] { + break + } + } + if i == 2 && rp == 9*2 { + break + } + // FIXME: find a way to compute optimal sh + if rp > 9+9*2 { + sh = 9 + } + e2 = e2 + sh + for k = a; k != z; k = (k + 1) & (128 - 1) { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<>sh + carry + carry = uint32_t(int32(1000000000)>>sh) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + i-- + rp = rp - 9 + } + } + if carry != 0 { + if (z+1)&(128-1) != a { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry + z = (z + 1) & (128 - 1) + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1) + } + } + } + + // Assemble desired bits into floating point variable + for y = float64(AssignInt32(&i, 0)); i < 2; i++ { + if (a+i)&(128-1) == z { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0) + } + y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4))) + } + + y = y * float64(sign) + + // Limit precision for denormal results + if bits > 53+e2-emin { + bits = 53 + e2 - emin + if bits < 0 { + bits = 0 + } + denormal = 1 + } + + // Calculate bias term to force rounding, move out lower bits + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 2*53-bits-1), y) + frac = Xfmodl(tls, y, Xscalbn(tls, float64(1), 53-bits)) + y = y - frac + y = y + bias + } + + // Process tail of decimal input so it can affect rounding + if (a+i)&(128-1) != z { + var t uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) + if t < uint32_t(500000000) && (t != 0 || (a+i+1)&(128-1) != z) { + frac = frac + 0.25*float64(sign) + } else if t > uint32_t(500000000) { + frac = frac + 0.75*float64(sign) + } else if t == uint32_t(500000000) { + if (a+i+1)&(128-1) == z { + frac = frac + 0.5*float64(sign) + } else { + frac = frac + 0.75*float64(sign) + } + } + if 53-bits >= 2 && !(Xfmodl(tls, frac, float64(1)) != 0) { + frac += 1 + } + } + + y = y + frac + y = y - bias + + if (e2+53)&0x7fffffff > emax-5 { + if Xfabsl(tls, y) >= float64(float64(2))/2.22044604925031308085e-16 { + if denormal != 0 && bits == 53+e2-emin { + denormal = 0 + } + y = y * 0.5 + e2++ + } + if e2+53 > emax || denormal != 0 && frac != 0 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + } + + return Xscalbnl(tls, y, e2) +} + +var _sth = [2]uint32_t{uint32_t(9007199), uint32_t(254740991)} /* floatscan.c:67:24 */ +var _sp10s = [8]int32{10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000} /* floatscan.c:80:19 */ + +func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:315:20: */ + var x uint32_t = uint32_t(0) + var y float64 = float64(0) + var scale float64 = float64(1) + var bias float64 = float64(0) + var gottail int32 = 0 + var gotrad int32 = 0 + var gotdig int32 = 0 + var rp int64 = int64(0) + var dc int64 = int64(0) + var e2 int64 = int64(0) + var d int32 + var c int32 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + + // Skip leading zeros + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + + if c == '.' { + gotrad = 1 + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + // Count zeros after the radix point before significand + rp = int64(0) + __1: + if !(c == '0') { + goto __3 + } + gotdig = 1 + goto __2 + __2: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + rp-- + goto __1 + goto __3 + __3: + } + + for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + rp = dc + gotrad = 1 + } else { + gotdig = 1 + if c > '9' { + d = c | 32 + 10 - 'a' + } else { + d = c - '0' + } + if dc < int64(8) { + x = x*uint32_t(16) + uint32_t(d) + } else if dc < int64(53/4+1) { + y = y + float64(d)*AssignDivFloat64(&scale, float64(16)) + } else if d != 0 && !(gottail != 0) { + y = y + 0.5*scale + gottail = 1 + } + dc++ + } + } + if !(gotdig != 0) { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if gotrad != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + } else { + X__shlim(tls, f, int64(0)) + } + return float64(sign) * 0.0 + } + if !(gotrad != 0) { + rp = dc + } + for dc < int64(8) { + x = x * uint32_t(16) + dc++ + } + if c|32 == 'p' { + e2 = scanexp(tls, f, pok) + if e2 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e2 = int64(0) + } + } else { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + e2 = e2 + (int64(4)*rp - int64(32)) + + if !(x != 0) { + return float64(sign) * 0.0 + } + if e2 > int64(-emin) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if e2 < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + for x < 0x80000000 { + if y >= 0.5 { + x = x + (x + uint32_t(1)) + y = y + (y - float64(1)) + } else { + x = x + x + y = y + y + } + e2-- + } + + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) + if bits < 0 { + bits = 0 + } + } + + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 32+53-bits-1), float64(sign)) + } + + if bits < 32 && y != 0 && !(x&uint32_t(1) != 0) { + x++ + y = float64(0) + } + + y = bias + float64(sign)*float64(x) + float64(sign)*y + y = y - bias + + if !(y != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + + return Xscalbnl(tls, y, int32(e2)) +} + +func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */ + var sign int32 = 1 + var i size_t + var bits int32 + var emin int32 + var c int32 + + switch prec { + case 0: + bits = 24 + emin = -125 - bits + break + case 1: + bits = 53 + emin = -1021 - bits + break + case 2: + bits = 53 + emin = -1021 - bits + break + default: + return float64(0) + } + + for __isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0 { + } + + if c == '+' || c == '-' { + sign = sign - 2*Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + + for i = uint64(0); i < uint64(8) && c|32 == int32(*(*uint8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { + if i < uint64(7) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { + if i != uint64(8) { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if pok != 0 { + for ; i > uint64(3); i-- { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + } + } + return float64(float32(sign) * X__builtin_inff(tls)) + } + if !(i != 0) { + for i = uint64(0); i < uint64(3) && c|32 == int32(*(*uint8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { + if i < uint64(2) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + } + if i == uint64(3) { + if func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() != '(' { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + return float64(X__builtin_nanf(tls, ts+13)) + } + for i = uint64(1); ; i++ { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') < 10 || uint32(c-'A') < 26 || uint32(c-'a') < 26 || c == '_' { + continue + } + if c == ')' { + return float64(X__builtin_nanf(tls, ts+13)) + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(pok != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + for PostDecUint64(&i, 1) != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + return float64(X__builtin_nanf(tls, ts+13)) + } + return float64(X__builtin_nanf(tls, ts+13)) + } + + if i != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + if c == '0' { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c|32 == 'x' { + return hexfloat(tls, f, bits, emin, sign, pok) + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + c = '0' + } + + return decfloat(tls, f, c, bits, emin, sign, pok) +} + +// Lookup table for digit values. -1==255>=36 -> invalid +var table1 = [257]uint8{Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), +} /* intscan.c:7:28 */ + +func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */ + var val uintptr + var c int32 + var neg int32 + var x uint32 + var y uint64 + var bs int32 + val = uintptr(unsafe.Pointer(&table1)) + uintptr(1) + neg = 0 + if !(base > uint32(36) || base == uint32(1)) { + goto __1 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__1: + ; +__2: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __3 + } + goto __2 +__3: + ; + if !(c == '+' || c == '-') { + goto __4 + } + neg = -Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() +__4: + ; + if !((base == uint32(0) || base == uint32(16)) && c == '0') { + goto __5 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(c|32 == 'x') { + goto __7 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { + goto __9 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(pok != 0) { + goto __10 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + goto __11 +__10: + X__shlim(tls, f, int64(0)) +__11: + ; + return uint64(0) +__9: + ; + base = uint32(16) + goto __8 +__7: + if !(base == uint32(0)) { + goto __12 + } + base = uint32(8) +__12: + ; +__8: + ; + goto __6 +__5: + if !(base == uint32(0)) { + goto __13 + } + base = uint32(10) +__13: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { + goto __14 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + X__shlim(tls, f, int64(0)) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__14: + ; +__6: + ; + if !(base == uint32(10)) { + goto __15 + } + x = uint32(0) +__17: + if !(uint32(c-'0') < 10 && x <= 0xffffffff/uint32(10)-uint32(1)) { + goto __19 + } + x = x*uint32(10) + uint32(c-'0') + goto __18 +__18: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __17 + goto __19 +__19: + ; + y = uint64(x) +__20: + if !(uint32(c-'0') < 10 && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(10) && uint64(10)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(c-'0')) { + goto __22 + } + y = y*uint64(10) + uint64(c-'0') + goto __21 +__21: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __20 + goto __22 +__22: + ; + if !(uint32(c-'0') >= 10) { + goto __23 + } + goto done +__23: + ; + goto __16 +__15: + if !!(base&(base-uint32(1)) != 0) { + goto __24 + } + bs = int32(*(*uint8)(unsafe.Pointer(ts + 14 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + x = uint32(0) +__26: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { + goto __28 + } + x = x<>bs) { + goto __31 + } + y = y<= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(y >= lim) { + goto __43 + } + if !(!(lim&uint64(1) != 0) && !(neg != 0)) { + goto __44 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim - uint64(1) + goto __45 +__44: + if !(y > lim) { + goto __46 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim +__46: + ; +__45: + ; +__43: + ; + return y ^ uint64(neg) - uint64(neg) +} + +// The shcnt field stores the number of bytes read so far, offset by +// the value of buf-rpos at the last function call (__shlim or __shgetc), +// so that between calls the inline shcnt macro can add rpos-buf to get +// the actual count. + +func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ + (*FILE)(unsafe.Pointer(f)).shlim = lim + (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1 + // If lim is nonzero, rend must be a valid pointer. + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + } else { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + } +} + +func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ + var c int32 + var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 + if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + return -1 + } + cnt++ + if (*FILE)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > (*FILE)(unsafe.Pointer(f)).shlim-cnt { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt) + } else { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + } + (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + } + return c +} + +type lconv = struct { + decimal_point uintptr + thousands_sep uintptr + grouping uintptr + int_curr_symbol uintptr + currency_symbol uintptr + mon_decimal_point uintptr + mon_thousands_sep uintptr + mon_grouping uintptr + positive_sign uintptr + negative_sign uintptr + int_frac_digits uint8 + frac_digits uint8 + p_cs_precedes uint8 + p_sep_by_space uint8 + n_cs_precedes uint8 + n_sep_by_space uint8 + p_sign_posn uint8 + n_sign_posn uint8 + int_p_cs_precedes uint8 + int_p_sep_by_space uint8 + int_n_cs_precedes uint8 + int_n_sep_by_space uint8 + int_p_sign_posn uint8 + int_n_sign_posn uint8 + _ [2]byte +} /* locale.h:24:1 */ + +// Support signed or unsigned plain-char + +// Implementation choices... + +// Arbitrary numbers... + +// POSIX/SUS requirements follow. These numbers come directly +// from SUS and have nothing to do with the host system. + +var posix_lconv = lconv{decimal_point: ts + 23, thousands_sep: ts + 13, grouping: ts + 13, int_curr_symbol: ts + 13, currency_symbol: ts + 13, mon_decimal_point: ts + 13, mon_thousands_sep: ts + 13, mon_grouping: ts + 13, positive_sign: ts + 13, negative_sign: ts + 13, int_frac_digits: uint8(255), frac_digits: uint8(255), p_cs_precedes: uint8(255), p_sep_by_space: uint8(255), n_cs_precedes: uint8(255), n_sep_by_space: uint8(255), p_sign_posn: uint8(255), n_sign_posn: uint8(255), int_p_cs_precedes: uint8(255), int_p_sep_by_space: uint8(255), int_n_cs_precedes: uint8(255), int_n_sep_by_space: uint8(255), int_p_sign_posn: uint8(255), int_n_sign_posn: uint8(255)} /* localeconv.c:4:27 */ + +func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */ + return uintptr(unsafe.Pointer(&posix_lconv)) +} + +func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + if !(e != 0) { + if *(*uint64_t)(unsafe.Pointer(bp))<<1 != 0 { + return 3 + } + return 2 + } + if e == 0x7ff { + if *(*uint64_t)(unsafe.Pointer(bp))<<12 != 0 { + return 0 + } + return 1 + } + return 4 +} + +func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*struct{ f float32 })(unsafe.Pointer(bp)) = func() (r struct{ f float32 }) { + *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint32_t)(unsafe.Pointer(bp)) >> 23 & uint32_t(0xff)) + if !(e != 0) { + if *(*uint32_t)(unsafe.Pointer(bp))<<1 != 0 { + return 3 + } + return 2 + } + if e == 0xff { + if *(*uint32_t)(unsafe.Pointer(bp))<<9 != 0 { + return 0 + } + return 1 + } + return 4 +} + +func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */ + return X__fpclassify(tls, x) +} + +func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */ + return Xcopysign(tls, x, y) +} + +func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */ + return Xfabs(tls, x) +} + +func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */ + return Xfmod(tls, x, y) +} + +func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */ + return X__builtin_nanf(tls, ts+13) +} + +var toint double_t = float64(float64(1)) / 2.22044604925031308085e-16 /* rint.c:10:23 */ + +func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + var s int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 63) + var y double_t + + if e >= 0x3ff+52 { + return x + } + if s != 0 { + y = x - toint + toint + } else { + y = x + toint - toint + } + if y == float64(0) { + if s != 0 { + return -Float64FromFloat64(0.0) + } + return float64(0) + } + return y +} + +func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var u struct {f float64;} at bp, 8 + + var y double_t = x + + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + n = 1023 + } + } + } else if n < -1022 { + // make sure final n < -53 to avoid double + // rounding in the subnormal range + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + n = -1022 + } + } + } + *(*uint64_t)(unsafe.Pointer(bp)) = uint64_t(0x3ff+n) << 52 + x = y * *(*float64)(unsafe.Pointer(bp)) + return x +} + +func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ + return Xscalbn(tls, x, n) +} + +// Support signed or unsigned plain-char + +// Implementation choices... + +// Arbitrary numbers... + +// POSIX/SUS requirements follow. These numbers come directly +// from SUS and have nothing to do with the host system. + +type __locale_map = struct { + __map uintptr + map_size size_t + name [24]uint8 + next uintptr +} /* alltypes.h:341:9 */ + +type tls_module = struct { + next uintptr + image uintptr + len size_t + size size_t + align size_t + offset size_t +} /* libc.h:14:1 */ + +type __libc = struct { + can_do_threads uint8 + threaded uint8 + secure uint8 + need_locks int8 + threads_minus_1 int32 + auxv uintptr + tls_head uintptr + tls_size size_t + tls_align size_t + tls_cnt size_t + page_size size_t + global_locale struct{ cat [6]uintptr } +} /* libc.h:20:1 */ + +type time_t = int64 /* alltypes.h:83:16 */ + +type clockid_t = int32 /* alltypes.h:212:13 */ + +type timespec = struct { + tv_sec time_t + tv_nsec int64 +} /* alltypes.h:227:1 */ + +type pthread_t = uintptr /* alltypes.h:271:26 */ + +type pthread_once_t = int32 /* alltypes.h:277:13 */ + +type pthread_key_t = uint32 /* alltypes.h:282:18 */ + +type pthread_spinlock_t = int32 /* alltypes.h:287:13 */ + +type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:292:37 */ + +type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:297:37 */ + +type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:302:37 */ + +type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:307:40 */ + +type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:347:9 */ + +type sigset_t = __sigset_t /* alltypes.h:347:71 */ + +type pthread_attr_t = struct { + __u struct { + _ [0]uint64 + __i [14]int32 + } +} /* alltypes.h:370:147 */ + +type pthread_mutex_t = struct { + __u struct { + _ [0]uint64 + __i [10]int32 + } +} /* alltypes.h:375:157 */ + +type pthread_cond_t = struct { + __u struct { + _ [0]uint64 + __i [12]int32 + } +} /* alltypes.h:385:112 */ + +type pthread_rwlock_t = struct { + __u struct { + _ [0]uint64 + __i [14]int32 + } +} /* alltypes.h:395:139 */ + +type pthread_barrier_t = struct { + __u struct { + _ [0]uint64 + __i [8]int32 + } +} /* alltypes.h:400:137 */ + +type sched_param = struct { + sched_priority int32 + __reserved1 int32 + __reserved2 [2]struct { + __reserved1 time_t + __reserved2 int64 + } + __reserved3 int32 + _ [4]byte +} /* sched.h:19:1 */ + +type timer_t = uintptr /* alltypes.h:207:14 */ + +type clock_t = int64 /* alltypes.h:217:14 */ + +type tm = struct { + tm_sec int32 + tm_min int32 + tm_hour int32 + tm_mday int32 + tm_mon int32 + tm_year int32 + tm_wday int32 + tm_yday int32 + tm_isdst int32 + _ [4]byte + tm_gmtoff int64 + tm_zone uintptr +} /* time.h:38:1 */ + +type itimerspec = struct { + it_interval struct { + tv_sec time_t + tv_nsec int64 + } + it_value struct { + tv_sec time_t + tv_nsec int64 + } +} /* time.h:80:1 */ + +type sigevent = struct { + sigev_value struct { + _ [0]uint64 + sival_int int32 + _ [4]byte + } + sigev_signo int32 + sigev_notify int32 + sigev_notify_function uintptr + sigev_notify_attributes uintptr + __pad [32]uint8 +} /* time.h:107:1 */ + +type __ptcb = struct { + __f uintptr + __x uintptr + __next uintptr +} /* alltypes.h:271:9 */ + +type sigaltstack = struct { + ss_sp uintptr + ss_flags int32 + _ [4]byte + ss_size size_t +} /* signal.h:44:9 */ + +type stack_t = sigaltstack /* signal.h:44:28 */ + +type __riscv_mc_f_ext_state = struct { + __f [32]uint32 + __fcsr uint32 +} /* signal.h:11:1 */ + +type __riscv_mc_d_ext_state = struct { + __f [32]uint64 + __fcsr uint32 + _ [4]byte +} /* signal.h:16:1 */ + +type __riscv_mc_q_ext_state = struct { + __f [64]uint64 + __fcsr uint32 + __reserved [3]uint32 +} /* signal.h:21:1 */ + +type __riscv_mc_fp_state = struct { + _ [0]uint64 + __f struct { + __f [32]uint32 + __fcsr uint32 + } + _ [396]byte +} /* signal.h:27:1 */ + +type mcontext_t1 = struct { + __gregs [32]uint64 + __fpregs struct { + _ [0]uint64 + __f struct { + __f [32]uint32 + __fcsr uint32 + } + _ [396]byte + } +} /* signal.h:33:9 */ + +type mcontext_t = mcontext_t1 /* signal.h:36:3 */ + +type greg_t = uint64 /* signal.h:48:23 */ +type gregset_t = [32]uint64 /* signal.h:49:23 */ +type fpregset_t = __riscv_mc_fp_state /* signal.h:50:35 */ +type sigcontext = struct { + gregs gregset_t + fpregs fpregset_t +} /* signal.h:51:1 */ + +type ucontext_t1 = struct { + uc_flags uint64 + uc_link uintptr + uc_stack stack_t + uc_sigmask sigset_t + uc_mcontext mcontext_t +} /* signal.h:63:9 */ + +type ucontext_t = ucontext_t1 /* signal.h:70:3 */ + +type sigval = struct { + _ [0]uint64 + sival_int int32 + _ [4]byte +} /* time.h:107:1 */ + +type siginfo_t = struct { + si_signo int32 + si_errno int32 + si_code int32 + _ [4]byte + __si_fields struct { + _ [0]uint64 + __pad [112]uint8 + } +} /* signal.h:145:3 */ + +type sigaction = struct { + __sa_handler struct{ sa_handler uintptr } + sa_mask sigset_t + sa_flags int32 + _ [4]byte + sa_restorer uintptr +} /* signal.h:167:1 */ + +type sig_t = uintptr /* signal.h:251:14 */ + +type sig_atomic_t = int32 /* signal.h:269:13 */ + +func a_barrier(tls *TLS) { /* atomic_arch.h:2:20: */ + panic(`arch/riscv64/atomic_arch.h:4:2: assembler statements not supported`) +} + +func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:8:19: */ + var old int32 + var tmp int32 + _ = tmp + panic(`arch/riscv64/atomic_arch.h:11:2: assembler statements not supported`) + return old +} + +func a_swap(tls *TLS, p uintptr, v int32) int32 { /* atomic.h:108:19: */ + var old int32 + for __ccgo := true; __ccgo; __ccgo = a_cas(tls, p, old, v) != old { + old = *(*int32)(unsafe.Pointer(p)) + } + return old +} + +func a_fetch_add(tls *TLS, p uintptr, v int32) int32 { /* atomic.h:119:19: */ + var old int32 + for __ccgo := true; __ccgo; __ccgo = a_cas(tls, p, old, int32(uint32(old)+uint32(v))) != old { + old = *(*int32)(unsafe.Pointer(p)) + } + return old +} + +func a_fetch_and(tls *TLS, p uintptr, v int32) int32 { /* atomic.h:130:19: */ + var old int32 + for __ccgo := true; __ccgo; __ccgo = a_cas(tls, p, old, old&v) != old { + old = *(*int32)(unsafe.Pointer(p)) + } + return old +} + +func a_fetch_or(tls *TLS, p uintptr, v int32) int32 { /* atomic.h:140:19: */ + var old int32 + for __ccgo := true; __ccgo; __ccgo = a_cas(tls, p, old, old|v) != old { + old = *(*int32)(unsafe.Pointer(p)) + } + return old +} + +func a_and(tls *TLS, p uintptr, v int32) { /* atomic.h:151:20: */ + a_fetch_and(tls, p, v) +} + +func a_or(tls *TLS, p uintptr, v int32) { /* atomic.h:159:20: */ + a_fetch_or(tls, p, v) +} + +func a_or_64(tls *TLS, p uintptr, v uint64_t) { /* atomic.h:220:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ v uint64_t })(unsafe.Pointer(bp)) = func() (r struct{ v uint64_t }) { + *(*uint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = v + return r + }() + if *(*uint32_t)(unsafe.Pointer(bp)) != 0 { + a_or(tls, p, int32(*(*uint32_t)(unsafe.Pointer(bp)))) + } + if *(*uint32_t)(unsafe.Pointer(bp + 1*4)) != 0 { + a_or(tls, p+uintptr(1)*4, int32(*(*uint32_t)(unsafe.Pointer(bp + 1*4)))) + } +} + +func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic.h:256:19: */ + return int32(_sdebruijn328[x&-x*uint32_t(0x076be629)>>27]) +} + +var _sdebruijn328 = [32]uint8{ + uint8(0), uint8(1), uint8(23), uint8(2), uint8(29), uint8(24), uint8(19), uint8(3), uint8(30), uint8(27), uint8(25), uint8(11), uint8(20), uint8(8), uint8(4), uint8(13), + uint8(31), uint8(22), uint8(28), uint8(18), uint8(26), uint8(10), uint8(7), uint8(12), uint8(21), uint8(17), uint8(9), uint8(6), uint8(16), uint8(5), uint8(15), uint8(14), +} /* atomic.h:261:20 */ + +func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic.h:272:19: */ + if uint64(unsafe.Sizeof(int64(0))) < uint64(8) { + var y uint32_t = uint32_t(x) + if !(y != 0) { + y = uint32_t(x >> 32) + return 32 + a_ctz_32(tls, y) + } + return a_ctz_32(tls, y) + } + return int32(_sdebruijn648[uint64(x&-x)*0x022fdd63cc95386d>>58]) +} + +var _sdebruijn648 = [64]uint8{ + uint8(0), uint8(1), uint8(2), uint8(53), uint8(3), uint8(7), uint8(54), uint8(27), uint8(4), uint8(38), uint8(41), uint8(8), uint8(34), uint8(55), uint8(48), uint8(28), + uint8(62), uint8(5), uint8(39), uint8(46), uint8(44), uint8(42), uint8(22), uint8(9), uint8(24), uint8(35), uint8(59), uint8(56), uint8(49), uint8(18), uint8(29), uint8(11), + uint8(63), uint8(52), uint8(6), uint8(26), uint8(37), uint8(40), uint8(33), uint8(47), uint8(61), uint8(45), uint8(43), uint8(21), uint8(23), uint8(58), uint8(17), uint8(10), + uint8(51), uint8(25), uint8(36), uint8(32), uint8(60), uint8(20), uint8(57), uint8(16), uint8(50), uint8(31), uint8(19), uint8(15), uint8(30), uint8(14), uint8(13), uint8(12), +} /* atomic.h:274:20 */ + +type __timer = struct { + timerid int32 + _ [4]byte + thread pthread_t +} /* pthread_impl.h:64:1 */ + +func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */ + var tp uintptr + panic(`arch/riscv64/pthread_arch.h:4:2: assembler statements not supported`) + return tp - uintptr(uint64(unsafe.Sizeof(__pthread{}))) +} + +func __wake(tls *TLS, addr uintptr, cnt int32, priv int32) { /* pthread_impl.h:155:20: */ + if priv != 0 { + priv = 128 + } + if cnt < 0 { + cnt = 0x7fffffff + } + _ = Bool32(__syscall3(tls, int64(98), int64(addr), int64(1|priv), int64(cnt)) != int64(-38) || __syscall3(tls, int64(98), int64(addr), int64(1), int64(cnt)) != 0) +} + +func __futexwait(tls *TLS, addr uintptr, val int32, priv int32) { /* pthread_impl.h:162:20: */ + if priv != 0 { + priv = 128 + } + _ = Bool32(__syscall4(tls, int64(98), int64(addr), int64(0|priv), int64(val), int64(0)) != int64(-38) || __syscall4(tls, int64(98), int64(addr), int64(0), int64(val), int64(0)) != 0) +} + +var X__fsmu8 = [51]uint32_t{ + func() uint32 { + if 0x2 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x2) + }(), func() uint32 { + if 0x3 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x3) + }(), func() uint32 { + if 0x4 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x4) + }(), func() uint32 { + if 0x5 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x5) + }(), func() uint32 { + if 0x6 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x6) + }(), func() uint32 { + if 0x7 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x7) + }(), + func() uint32 { + if 0x8 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x8) + }(), func() uint32 { + if 0x9 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x9) + }(), func() uint32 { + if 0xa < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xa) + }(), func() uint32 { + if 0xb < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xb) + }(), func() uint32 { + if 0xc < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xc) + }(), func() uint32 { + if 0xd < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xd) + }(), func() uint32 { + if 0xe < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xe) + }(), func() uint32 { + if 0xf < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xf) + }(), + func() uint32 { + if 0x0+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x0+16) + }(), func() uint32 { + if 0x1+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x1+16) + }(), func() uint32 { + if 0x2+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x2+16) + }(), func() uint32 { + if 0x3+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x3+16) + }(), func() uint32 { + if 0x4+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x4+16) + }(), func() uint32 { + if 0x5+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x5+16) + }(), func() uint32 { + if 0x6+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x6+16) + }(), func() uint32 { + if 0x7+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x7+16) + }(), + func() uint32 { + if 0x8+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x8+16) + }(), func() uint32 { + if 0x9+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x9+16) + }(), func() uint32 { + if 0xa+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xa+16) + }(), func() uint32 { + if 0xb+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xb+16) + }(), func() uint32 { + if 0xc+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xc+16) + }(), func() uint32 { + if 0xd+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xd+16) + }(), func() uint32 { + if 0xe+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xe+16) + }(), func() uint32 { + if 0xf+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xf+16) + }(), + func() uint32 { + if 0x0 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x0 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x0), func() uint32 { + if 0x1 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x1 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x1), func() uint32 { + if 0x2 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x2 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x2), func() uint32 { + if 0x3 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x3 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x3), func() uint32 { + if 0x4 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x4 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x4), func() uint32 { + if 0x5 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x5 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x5), func() uint32 { + if 0x6 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x6 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x6), func() uint32 { + if 0x7 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x7 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x7), + func() uint32 { + if 0x8 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x8 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x8), func() uint32 { + if 0x9 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x9 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x9), func() uint32 { + if 0xa == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xa == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xa), func() uint32 { + if 0xb == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xb == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xb), func() uint32 { + if 0xc == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xc == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xc), func() uint32 { + if 0xd == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xd == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xd), func() uint32 { + if 0xe == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xe == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xe), func() uint32 { + if 0xf == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xf == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xf), + func() uint32 { + if 0x0 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x0 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x0 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x0), func() uint32 { + if 0x1 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x1 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x1 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x1), func() uint32 { + if 0x2 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x2 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x2 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x2), func() uint32 { + if 0x3 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x3 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x3 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x3), func() uint32 { + if 0x4 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x4 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x4 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x4), +} /* internal.c:18:16 */ + +type wint_t = uint32 /* alltypes.h:196:18 */ + +type wctype_t = uint64 /* alltypes.h:201:23 */ + +type __mbstate_t = struct { + __opaque1 uint32 + __opaque2 uint32 +} /* alltypes.h:335:9 */ + +type mbstate_t = __mbstate_t /* alltypes.h:335:63 */ + +func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var c uint32 + var s uintptr + var N uint32 + // var dummy wchar_t at bp, 4 + s = src + N = uint32(n) + + if !!(st != 0) { + goto __1 + } + st = uintptr(unsafe.Pointer(&_sinternal_state)) +__1: + ; + c = *(*uint32)(unsafe.Pointer(st)) + + if !!(s != 0) { + goto __2 + } + if !(c != 0) { + goto __4 + } + goto ilseq +__4: + ; + return uint64(0) + goto __3 +__2: + if !!(wc != 0) { + goto __5 + } + wc = bp /* &dummy */ +__5: + ; +__3: + ; + + if !!(n != 0) { + goto __6 + } + return Uint64FromInt32(-2) +__6: + ; + if !!(c != 0) { + goto __7 + } + if !(int32(*(*uint8)(unsafe.Pointer(s))) < 0x80) { + goto __8 + } + return BoolUint64(!!(AssignPtrInt32(wc, wchar_t(*(*uint8)(unsafe.Pointer(s)))) != 0)) +__8: + ; + if !(func() int32 { + if !!(int32(*(*uintptr)(unsafe.Pointer((*__pthread)(unsafe.Pointer(__pthread_self(tls))).locale))) != 0) { + return 4 + } + return 1 + }() == 1) { + goto __9 + } + *(*wchar_t)(unsafe.Pointer(wc)) = 0xdfff & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + return 1 +__9: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0xc2 > 0xf4-0xc2) { + goto __10 + } + goto ilseq +__10: + ; + c = X__fsmu8[uint32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0xc2] + n-- +__7: + ; + + if !(n != 0) { + goto __11 + } + if !((int32(*(*uint8)(unsafe.Pointer(s)))>>3-0x10|(int32(*(*uint8)(unsafe.Pointer(s)))>>3+int32_t(c)>>26))&CplInt32(7) != 0) { + goto __12 + } + goto ilseq +__12: + ; +loop: + c = c<<6 | uint32(int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0x80) + n-- + if !!(c&(uint32(1)<<31) != 0) { + goto __13 + } + *(*uint32)(unsafe.Pointer(st)) = uint32(0) + *(*wchar_t)(unsafe.Pointer(wc)) = wchar_t(c) + return size_t(N) - n +__13: + ; + if !(n != 0) { + goto __14 + } + if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0x80 >= uint32(0x40)) { + goto __15 + } + goto ilseq +__15: + ; + goto loop +__14: + ; +__11: + ; + + *(*uint32)(unsafe.Pointer(st)) = c + return Uint64FromInt32(-2) +ilseq: + *(*uint32)(unsafe.Pointer(st)) = uint32(0) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 84 + return Uint64FromInt32(-1) +} + +var _sinternal_state uint32 /* mbrtowc.c:8:18: */ + +func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */ + return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0)) +} + +type imaxdiv_t = struct { + quot intmax_t + rem intmax_t +} /* inttypes.h:14:40 */ + +type socklen_t = uint32 /* alltypes.h:359:18 */ + +type sa_family_t = uint16 /* alltypes.h:364:24 */ + +type msghdr = struct { + msg_name uintptr + msg_namelen socklen_t + _ [4]byte + msg_iov uintptr + msg_iovlen int32 + __pad1 int32 + msg_control uintptr + msg_controllen socklen_t + __pad2 int32 + msg_flags int32 + _ [4]byte +} /* socket.h:22:1 */ + +type cmsghdr = struct { + cmsg_len socklen_t + __pad1 int32 + cmsg_level int32 + cmsg_type int32 +} /* socket.h:44:1 */ + +type linger = struct { + l_onoff int32 + l_linger int32 +} /* socket.h:74:1 */ + +type sockaddr = struct { + sa_family sa_family_t + sa_data [14]uint8 +} /* socket.h:367:1 */ + +type sockaddr_storage = struct { + ss_family sa_family_t + __ss_padding [118]uint8 + __ss_align uint64 +} /* socket.h:372:1 */ + +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ + +type sockaddr_in = struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t +} /* in.h:16:1 */ + +type in6_addr = struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } +} /* in.h:23:1 */ + +type sockaddr_in6 = struct { + sin6_family sa_family_t + sin6_port in_port_t + sin6_flowinfo uint32_t + sin6_addr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + sin6_scope_id uint32_t +} /* in.h:34:1 */ + +type ipv6_mreq = struct { + ipv6mr_multiaddr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + ipv6mr_interface uint32 +} /* in.h:42:1 */ + +type ip_opts = struct { + ip_dst struct{ s_addr in_addr_t } + ip_opts [40]uint8 +} /* in.h:229:1 */ + +type ip_mreq = struct { + imr_multiaddr struct{ s_addr in_addr_t } + imr_interface struct{ s_addr in_addr_t } +} /* in.h:247:1 */ + +type ip_mreqn = struct { + imr_multiaddr struct{ s_addr in_addr_t } + imr_address struct{ s_addr in_addr_t } + imr_ifindex int32 +} /* in.h:252:1 */ + +type ip_mreq_source = struct { + imr_multiaddr struct{ s_addr in_addr_t } + imr_interface struct{ s_addr in_addr_t } + imr_sourceaddr struct{ s_addr in_addr_t } +} /* in.h:258:1 */ + +type ip_msfilter = struct { + imsf_multiaddr struct{ s_addr in_addr_t } + imsf_interface struct{ s_addr in_addr_t } + imsf_fmode uint32_t + imsf_numsrc uint32_t + imsf_slist [1]struct{ s_addr in_addr_t } +} /* in.h:264:1 */ + +type group_req = struct { + gr_interface uint32_t + _ [4]byte + gr_group struct { + ss_family sa_family_t + __ss_padding [118]uint8 + __ss_align uint64 + } +} /* in.h:275:1 */ + +type group_source_req = struct { + gsr_interface uint32_t + _ [4]byte + gsr_group struct { + ss_family sa_family_t + __ss_padding [118]uint8 + __ss_align uint64 + } + gsr_source struct { + ss_family sa_family_t + __ss_padding [118]uint8 + __ss_align uint64 + } +} /* in.h:280:1 */ + +type group_filter = struct { + gf_interface uint32_t + _ [4]byte + gf_group struct { + ss_family sa_family_t + __ss_padding [118]uint8 + __ss_align uint64 + } + gf_fmode uint32_t + gf_numsrc uint32_t + gf_slist [1]struct { + ss_family sa_family_t + __ss_padding [118]uint8 + __ss_align uint64 + } +} /* in.h:286:1 */ + +type in_pktinfo = struct { + ipi_ifindex int32 + ipi_spec_dst struct{ s_addr in_addr_t } + ipi_addr struct{ s_addr in_addr_t } +} /* in.h:297:1 */ + +type in6_pktinfo = struct { + ipi6_addr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + ipi6_ifindex uint32 +} /* in.h:303:1 */ + +type ip6_mtuinfo = struct { + ip6m_addr struct { + sin6_family sa_family_t + sin6_port in_port_t + sin6_flowinfo uint32_t + sin6_addr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + sin6_scope_id uint32_t + } + ip6m_mtu uint32_t +} /* in.h:308:1 */ + +type addrinfo = struct { + ai_flags int32 + ai_family int32 + ai_socktype int32 + ai_protocol int32 + ai_addrlen socklen_t + _ [4]byte + ai_addr uintptr + ai_canonname uintptr + ai_next uintptr +} /* netdb.h:16:1 */ + +// Legacy functions follow (marked OBsolete in SUS) + +type netent = struct { + n_name uintptr + n_aliases uintptr + n_addrtype int32 + n_net uint32_t +} /* netdb.h:62:1 */ + +type hostent = struct { + h_name uintptr + h_aliases uintptr + h_addrtype int32 + h_length int32 + h_addr_list uintptr +} /* netdb.h:69:1 */ + +type servent = struct { + s_name uintptr + s_aliases uintptr + s_port int32 + _ [4]byte + s_proto uintptr +} /* netdb.h:78:1 */ + +type protoent = struct { + p_name uintptr + p_aliases uintptr + p_proto int32 + _ [4]byte +} /* netdb.h:85:1 */ + +type aibuf = struct { + ai struct { + ai_flags int32 + ai_family int32 + ai_socktype int32 + ai_protocol int32 + ai_addrlen socklen_t + _ [4]byte + ai_addr uintptr + ai_canonname uintptr + ai_next uintptr + } + sa struct { + sin struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t + } + _ [12]byte + } + lock [1]int32 + slot int16 + ref int16 + _ [4]byte +} /* lookup.h:10:1 */ + +type sa = struct { + sin struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t + } + _ [12]byte +} /* lookup.h:10:1 */ + +type address = struct { + family int32 + scopeid uint32 + addr [16]uint8_t + sortkey int32 +} /* lookup.h:20:1 */ + +type service = struct { + port uint16_t + proto uint8 + socktype uint8 +} /* lookup.h:27:1 */ + +type resolvconf = struct { + ns [3]struct { + family int32 + scopeid uint32 + addr [16]uint8_t + sortkey int32 + } + nns uint32 + attempts uint32 + ndots uint32 + timeout uint32 +} /* lookup.h:34:1 */ + +func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ + var cnt size_t + cnt = uint64(1) +__1: + if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + goto __3 + } + goto __2 +__2: + cnt++ + p = (*addrinfo)(unsafe.Pointer(p)).ai_next + goto __1 + goto __3 +__3: + ; + var b uintptr = p - uintptr(uint64(uintptr(0))) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + //TODO LOCK(b->lock); + if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { + Xfree(tls, b) + } + //TODO else UNLOCK(b->lock); +} + +func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ + bp := tls.Alloc(1608) + defer tls.Free(1608) + + // var ports [2]service at bp, 8 + + // var addrs [48]address at bp+8, 1344 + + // var canon [256]uint8 at bp+1352, 256 + + var outcanon uintptr + var nservs int32 + var naddrs int32 + var nais int32 + var canon_len int32 + var i int32 + var j int32 + var k int32 + var family int32 = 0 + var flags int32 = 0 + var proto int32 = 0 + var socktype int32 = 0 + var out uintptr + + if !(host != 0) && !(serv != 0) { + return -2 + } + + if hint != 0 { + family = (*addrinfo)(unsafe.Pointer(hint)).ai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + + var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 + if flags&mask != flags { + return -1 + } + + switch family { + case 2: + fallthrough + case 10: + fallthrough + case 0: + break + fallthrough + default: + return -6 + } + } + + if flags&0x20 != 0 { + Xabort(tls) //TODO- + // /* Define the "an address is configured" condition for address + // * families via ability to create a socket for the family plus + // * routability of the loopback address for the family. */ + // static const struct sockaddr_in lo4 = { + // .sin_family = AF_INET, .sin_port = 65535, + // .sin_addr.s_addr = __BYTE_ORDER == __BIG_ENDIAN + // ? 0x7f000001 : 0x0100007f + // }; + // static const struct sockaddr_in6 lo6 = { + // .sin6_family = AF_INET6, .sin6_port = 65535, + // .sin6_addr = IN6ADDR_LOOPBACK_INIT + // }; + // int tf[2] = { AF_INET, AF_INET6 }; + // const void *ta[2] = { &lo4, &lo6 }; + // socklen_t tl[2] = { sizeof lo4, sizeof lo6 }; + // for (i=0; i<2; i++) { + // if (family==tf[1-i]) continue; + // int s = socket(tf[i], SOCK_CLOEXEC|SOCK_DGRAM, + // IPPROTO_UDP); + // if (s>=0) { + // int cs; + // pthread_setcancelstate( + // PTHREAD_CANCEL_DISABLE, &cs); + // int r = connect(s, ta[i], tl[i]); + // pthread_setcancelstate(cs, 0); + // close(s); + // if (!r) continue; + // } + // switch (errno) { + // case EADDRNOTAVAIL: + // case EAFNOSUPPORT: + // case EHOSTUNREACH: + // case ENETDOWN: + // case ENETUNREACH: + // break; + // default: + // return EAI_SYSTEM; + // } + // if (family == tf[i]) return EAI_NONAME; + // family = tf[1-i]; + // } + } + + nservs = X__lookup_serv(tls, bp, serv, proto, socktype, flags) + if nservs < 0 { + return nservs + } + + naddrs = X__lookup_name(tls, bp+8, bp+1352, host, family, flags) + if naddrs < 0 { + return naddrs + } + + nais = nservs * naddrs + canon_len = int32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(unsafe.Sizeof(aibuf{}))+uint64(canon_len)+uint64(1)) + if !(out != 0) { + return -10 + } + + if canon_len != 0 { + outcanon = out + uintptr(nais)*88 + Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+1)) + } else { + outcanon = uintptr(0) + } + + for k = AssignInt32(&i, 0); i < naddrs; i++ { + j = 0 + __1: + if !(j < nservs) { + goto __3 + } + { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + //TODO out[k].ai = (struct addrinfo){ + //TODO .ai_family = addrs[i].family, + //TODO .ai_socktype = ports[j].socktype, + //TODO .ai_protocol = ports[j].proto, + //TODO .ai_addrlen = addrs[i].family == AF_INET + //TODO ? sizeof(struct sockaddr_in) + //TODO : sizeof(struct sockaddr_in6), + //TODO .ai_addr = (void *)&out[k].sa, + //TODO .ai_canonname = outcanon }; + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + return uint32(unsafe.Sizeof(sockaddr_in{})) + } + return uint32(unsafe.Sizeof(sockaddr_in6{})) + }() + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon + if k != 0 { + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + } + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + case 2: + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) + break + case 10: + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) + break + } + + } + goto __2 + __2: + j++ + k++ + goto __1 + goto __3 + __3: + } + (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + *(*uintptr)(unsafe.Pointer(res)) = out + return 0 +} + +type ucred = struct { + pid pid_t + uid uid_t + gid gid_t +} /* socket.h:57:1 */ + +type mmsghdr = struct { + msg_hdr struct { + msg_name uintptr + msg_namelen socklen_t + _ [4]byte + msg_iov uintptr + msg_iovlen int32 + __pad1 int32 + msg_control uintptr + msg_controllen socklen_t + __pad2 int32 + msg_flags int32 + _ [4]byte + } + msg_len uint32 + _ [4]byte +} /* socket.h:63:1 */ + +func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh) + _sh = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyaddr_r(tls, a, l, af, _sh, + _sh+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh +} + +var _sh uintptr /* gethostbyaddr.c:9:24: */ + +func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + //TODO union { + //TODO struct sockaddr_in sin; + //TODO struct sockaddr_in6 sin6; + //TODO } sa = { .sin.sin_family = af }; + *(*struct { + sin sockaddr_in + _ [12]byte + })(unsafe.Pointer(bp)) = struct { + sin sockaddr_in + _ [12]byte + }{} //TODO- + (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO- + var sl socklen_t + if af == 10 { + sl = uint32(unsafe.Sizeof(sockaddr_in6{})) + } else { + sl = uint32(unsafe.Sizeof(sockaddr_in{})) + } + var i int32 + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + + // Load address argument into sockaddr structure + if af == 10 && l == socklen_t(16) { + Xmemcpy(tls, bp+8, a, uint64(16)) + } else if af == 2 && l == socklen_t(4) { + Xmemcpy(tls, bp+4, a, uint64(4)) + } else { + *(*int32)(unsafe.Pointer(err)) = 3 + return 22 + } + + // Align buffer and check for space for pointers and ip address + i = int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))) + if !(i != 0) { + i = int32(unsafe.Sizeof(uintptr(0))) + } + if buflen <= uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))-uint64(i)+uint64(l) { + return 34 + } + buf += uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i)) + buflen = buflen - (uint64(5)*uint64(unsafe.Sizeof(uintptr(0))) - uint64(i) + uint64(l)) + + (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).h_aliases = buf + buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + buf += uintptr(l) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + + switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + case -12: + return 34 + default: + fallthrough + case -10: + fallthrough + case -11: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + case 0: + break + } + + (*hostent)(unsafe.Pointer(h)).h_addrtype = af + (*hostent)(unsafe.Pointer(h)).h_length = int32(l) + (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */ + return Xgethostbyname2(tls, name, 2) +} + +func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh1) + _sh1 = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh1 != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyname2_r(tls, name, af, _sh1, + _sh1+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh1 +} + +var _sh1 uintptr /* gethostbyname2.c:10:24: */ + +func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname2_r.c:11:5: */ + bp := tls.Alloc(1600) + defer tls.Free(1600) + + // var addrs [48]address at bp, 1344 + + // var canon [256]uint8 at bp+1344, 256 + + var i int32 + var cnt int32 + var align size_t + var need size_t + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + cnt = X__lookup_name(tls, bp, bp+1344, name, af, 0x02) + if cnt < 0 { + switch cnt { + case -2: + *(*int32)(unsafe.Pointer(err)) = 1 + return 2 + fallthrough + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + fallthrough + default: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return 74 + fallthrough + case -10: + fallthrough + case -11: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + } + } + + (*hostent)(unsafe.Pointer(h)).h_addrtype = af + (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + if af == 10 { + return 16 + } + return 4 + }() + + // Align buffer + align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) + + need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + (Xstrlen(tls, name) + uint64(1)) + need = need + (Xstrlen(tls, bp+1344) + uint64(1)) + need = need + align + + if need > buflen { + return 34 + } + + buf += uintptr(align) + (*hostent)(unsafe.Pointer(h)).h_aliases = buf + buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < cnt; i++ { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length)) + } + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + + (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1)) + + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1)) + } else { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */ + return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err) +} + +type if_nameindex = struct { + if_index uint32 + _ [4]byte + if_name uintptr +} /* if.h:12:1 */ + +type ifaddr = struct { + ifa_addr struct { + sa_family sa_family_t + sa_data [14]uint8 + } + ifa_ifu struct { + ifu_broadaddr struct { + sa_family sa_family_t + sa_data [14]uint8 + } + } + ifa_ifp uintptr + ifa_next uintptr +} /* if.h:51:1 */ + +type ifmap = struct { + mem_start uint64 + mem_end uint64 + base_addr uint16 + irq uint8 + dma uint8 + port uint8 + _ [3]byte +} /* if.h:64:1 */ + +type ifreq = struct { + ifr_ifrn struct{ ifrn_name [16]uint8 } + ifr_ifru struct { + _ [0]uint64 + ifru_addr struct { + sa_family sa_family_t + sa_data [14]uint8 + } + _ [8]byte + } +} /* if.h:76:1 */ + +type ifconf = struct { + ifc_len int32 + _ [4]byte + ifc_ifcu struct{ ifcu_buf uintptr } +} /* if.h:116:1 */ + +type ns_sect = uint32 /* nameser.h:37:3 */ + +type __ns_msg = struct { + _msg uintptr + _eom uintptr + _id uint16_t + _flags uint16_t + _counts [4]uint16_t + _ [4]byte + _sections [4]uintptr + _sect ns_sect + _rrnum int32 + _msg_ptr uintptr +} /* nameser.h:39:9 */ + +type ns_msg = __ns_msg /* nameser.h:46:3 */ + +type _ns_flagdata = struct { + mask int32 + shift int32 +} /* nameser.h:48:1 */ + +type __ns_rr = struct { + name [1025]uint8 + _ [1]byte + __type uint16_t + rr_class uint16_t + _ [2]byte + ttl uint32_t + rdlength uint16_t + _ [2]byte + rdata uintptr +} /* nameser.h:59:9 */ + +type ns_rr = __ns_rr /* nameser.h:66:3 */ + +type ns_flag = uint32 /* nameser.h:87:3 */ + +type ns_opcode = uint32 /* nameser.h:96:3 */ + +type ns_rcode = uint32 /* nameser.h:115:3 */ + +type ns_update_operation = uint32 /* nameser.h:121:3 */ + +type ns_tsig_key1 = struct { + name [1025]uint8 + alg [1025]uint8 + _ [6]byte + data uintptr + len int32 + _ [4]byte +} /* nameser.h:123:1 */ + +type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ + +type ns_tcp_tsig_state1 = struct { + counter int32 + _ [4]byte + key uintptr + ctx uintptr + sig [512]uint8 + siglen int32 + _ [4]byte +} /* nameser.h:130:1 */ + +type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ + +type ns_type = uint32 /* nameser.h:200:3 */ + +type ns_class = uint32 /* nameser.h:219:3 */ + +type ns_key_types = uint32 /* nameser.h:226:3 */ + +type ns_cert_types = uint32 /* nameser.h:234:3 */ + +type HEADER = struct { + _ [0]uint32 + id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ +} /* nameser.h:353:3 */ + +// unused; purely for broken apps +type __res_state = struct { + retrans int32 + retry int32 + options uint64 + nscount int32 + nsaddr_list [3]struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t + } + id uint16 + _ [2]byte + dnsrch [7]uintptr + defdname [256]uint8 + pfcode uint64 + ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + _ [4]byte + sort_list [10]struct { + addr struct{ s_addr in_addr_t } + mask uint32_t + } + qhook uintptr + rhook uintptr + res_h_errno int32 + _vcsock int32 + _flags uint32 + _ [4]byte + _u struct { + _ [0]uint64 + pad [52]uint8 + _ [4]byte + } +} /* resolv.h:26:9 */ + +// unused; purely for broken apps +type res_state = uintptr /* resolv.h:62:3 */ + +type res_sym = struct { + number int32 + _ [4]byte + name uintptr + humanname uintptr +} /* resolv.h:70:1 */ + +func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ + p += uintptr(uint64(3) * uint64(unsafe.Sizeof(int32(0)))) + *(*uint8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = uint8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*uint8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = uint8(uint32('0') + x%uint32(10)) + x = x / uint32(10) + } + return p +} + +func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + Xsprintf(tls, s, ts+25, + VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) +} + +func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ + var i int32 + for i = 15; i >= 0; i-- { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&15] + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = uint8('.') + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = uint8('.') + } + Xstrcpy(tls, s, ts+50) +} + +var _sxdigits = *(*[17]uint8)(unsafe.Pointer(ts + 59)) /* getnameinfo.c:36:20 */ + +func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */ + bp := tls.Alloc(556) + defer tls.Free(556) + + // var line [512]uint8 at bp+16, 512 + + var p uintptr + var z uintptr + var _buf [1032]uint8 + _ = _buf + // var atmp [16]uint8 at bp, 16 + + // var iplit address at bp+528, 28 + + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var f uintptr = Xfopen(tls, ts+76, ts+87) + if !(f != 0) { + return + } + if family == 2 { + Xmemcpy(tls, bp+uintptr(12), a, uint64(4)) + Xmemcpy(tls, bp, ts+90, uint64(12)) + a = bp /* &atmp[0] */ + } + for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]uint8{})), f) != 0 { + if AssignUintptr(&p, Xstrchr(tls, bp+16, '#')) != 0 { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8('\n') + *(*uint8)(unsafe.Pointer(p)) = uint8(0) + } + + for p = bp + 16; /* &line[0] */ *(*uint8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8(0) + if X__lookup_ipliteral(tls, bp+528, bp+16, 0) <= 0 { + continue + } + + if (*address)(unsafe.Pointer(bp+528)).family == 2 { + Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) + Xmemcpy(tls, bp+528+8, ts+90, uint64(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + } + + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + continue + } + + for ; *(*uint8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*uint8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + if (int64(z)-int64(p))/1 < int64(256) { + Xmemcpy(tls, buf, p, uint64((int64(z)-int64(p))/1+int64(1))) + break + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) +} + +func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getnameinfo.c:87:13: */ + Xabort(tls) //TODO- + // unsigned long svport; + // char line[128], *p, *z; + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) return; + // while (fgets(line, sizeof line, f)) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // for (p=line; *p && !isspace(*p); p++); + // if (!*p) continue; + // *p++ = 0; + // svport = strtoul(p, &z, 10); + + // if (svport != port || z==p) continue; + // if (dgram && strncmp(z, "/udp", 4)) continue; + // if (!dgram && strncmp(z, "/tcp", 4)) continue; + // if (p-line > 32) continue; + + // memcpy(buf, line, p-line); + // break; + // } + // __fclose_ca(f); +} + +func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */ + bp := tls.Alloc(347) + defer tls.Free(347) + + // var ptr [78]uint8 at bp, 78 + + // var buf [256]uint8 at bp+78, 256 + + // var num [13]uint8 at bp+334, 13 + + var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + var a uintptr + var scopeid uint32 + + switch af { + case 2: + a = sa1 + 4 + if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{})) { + return -6 + } + mkptr4(tls, bp, a) + scopeid = uint32(0) + break + case 10: + a = sa1 + 8 + if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{})) { + return -6 + } + if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 { + mkptr6(tls, bp, a) + } else { + mkptr4(tls, bp, a+uintptr(12)) + } + scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + break + default: + return -6 + } + + if node != 0 && nodelen != 0 { + *(*uint8)(unsafe.Pointer(bp + 78)) = uint8(0) + if !(flags&0x01 != 0) { + reverse_hosts(tls, bp+78, a, scopeid, af) + } + if !(int32(*(*uint8)(unsafe.Pointer(bp + 78))) != 0) && !(flags&0x01 != 0) { + Xabort(tls) //TODO- + // unsigned char query[18+PTR_MAX], reply[512]; + // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, + // 0, 0, 0, query, sizeof query); + // query[3] = 0; /* don't need AD flag */ + // int rlen = __res_send(query, qlen, reply, sizeof reply); + // buf[0] = 0; + // if (rlen > 0) + // __dns_parse(reply, rlen, dns_parse_callback, buf); + } + if !(int32(*(*uint8)(unsafe.Pointer(bp + 78))) != 0) { + if flags&0x08 != 0 { + return -2 + } + Xinet_ntop(tls, af, a, bp+78, uint32(unsafe.Sizeof([256]uint8{}))) + if scopeid != 0 { + Xabort(tls) //TODO- + // char *p = 0, tmp[IF_NAMESIZE+1]; + // if (!(flags & NI_NUMERICSCOPE) && + // (IN6_IS_ADDR_LINKLOCAL(a) || + // IN6_IS_ADDR_MC_LINKLOCAL(a))) + // p = if_indextoname(scopeid, tmp+1); + // if (!p) + // p = itoa(num, scopeid); + // *--p = '%'; + // strcat(buf, p); + } + } + if Xstrlen(tls, bp+78) >= size_t(nodelen) { + return -12 + } + Xstrcpy(tls, node, bp+78) + } + + if serv != 0 && servlen != 0 { + var p uintptr = bp + 78 /* buf */ + var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + *(*uint8)(unsafe.Pointer(bp + 78)) = uint8(0) + if !(flags&0x02 != 0) { + reverse_services(tls, bp+78, port, flags&0x10) + } + if !(int32(*(*uint8)(unsafe.Pointer(p))) != 0) { + p = itoa(tls, bp+334, uint32(port)) + } + if Xstrlen(tls, p) >= size_t(servlen) { + return -12 + } + Xstrcpy(tls, serv, p) + } + + return 0 +} + +var Xh_errno int32 /* h_errno.c:4:5: */ + +func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */ + return uintptr(unsafe.Pointer(&Xh_errno)) +} + +func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var s uintptr = s0 + var d uintptr = dest + *(*[4]uint64)(unsafe.Pointer(bp /* a */)) = [4]uint64{0: uint64(0)} + // var z uintptr at bp+32, 8 + + var i int32 + + for i = 0; i < 4; i++ { + *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) = Xstrtoul(tls, s, bp+32, 0) + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != '.' || !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(s)))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) + }() != 0) { + return 0 + } + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != 0) { + break + } + s = *(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(1) + } + if i == 4 { + return 0 + } + switch i { + case 0: + *(*uint64)(unsafe.Pointer(bp + 1*8)) = *(*uint64)(unsafe.Pointer(bp)) & uint64(0xffffff) + AssignShrPtrUint64(bp, int(24)) + fallthrough + case 1: + *(*uint64)(unsafe.Pointer(bp + 2*8)) = *(*uint64)(unsafe.Pointer(bp + 1*8)) & uint64(0xffff) + AssignShrPtrUint64(bp+1*8, int(16)) + fallthrough + case 2: + *(*uint64)(unsafe.Pointer(bp + 3*8)) = *(*uint64)(unsafe.Pointer(bp + 2*8)) & uint64(0xff) + AssignShrPtrUint64(bp+2*8, int(8)) + } + for i = 0; i < 4; i++ { + if *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) > uint64(255) { + return 0 + } + *(*uint8)(unsafe.Pointer(d + uintptr(i))) = uint8(*(*uint64)(unsafe.Pointer(bp + uintptr(i)*8))) + } + return 1 +} + +func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var a uintptr = a0 + var i int32 + var j int32 + var max int32 + var best int32 + // var buf [100]uint8 at bp+176, 100 + + switch af { + case 2: + if socklen_t(Xsnprintf(tls, s, uint64(l), ts+103, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + return s + } + break + case 10: + if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 { + Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]uint8{})), + ts+115, + VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } else { + Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]uint8{})), + ts+139, + VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } + // Replace longest /(^0|:)[:0]{2,}/ with "::" + i = AssignInt32(&best, 0) + max = 2 + for ; *(*uint8)(unsafe.Pointer(bp + 176 + uintptr(i))) != 0; i++ { + if i != 0 && int32(*(*uint8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { + continue + } + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+169)) + if j > max { + best = i + max = j + } + } + if max > 3 { + *(*uint8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrUint8(bp+176+uintptr(best+1), uint8(':')) + Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint64(i-best-max+1)) + } + if Xstrlen(tls, bp+176) < size_t(l) { + Xstrcpy(tls, s, bp+176) + return s + } + break + default: + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return uintptr(0) + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 28 + return uintptr(0) +} + +func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */ + if c-uint32('0') < uint32(10) { + return int32(c - uint32('0')) + } + c = c | uint32(32) + if c-uint32('a') < uint32(6) { + return int32(c - uint32('a') + uint32(10)) + } + return -1 +} + +func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var ip [8]uint16_t at bp, 16 + + var a uintptr = a0 + var i int32 + var j int32 + var v int32 + var d int32 + var brk int32 = -1 + var need_v4 int32 = 0 + + if af == 2 { + for i = 0; i < 4; i++ { + for v = AssignInt32(&j, 0); j < 3 && func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) + }() != 0; j++ { + v = 10*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - '0' + } + if j == 0 || j > 1 && int32(*(*uint8)(unsafe.Pointer(s))) == '0' || v > 255 { + return 0 + } + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == 3 { + return 1 + } + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != '.' { + return 0 + } + s += uintptr(j + 1) + } + return 0 + } else if af != 10 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return -1 + } + + if int32(*(*uint8)(unsafe.Pointer(s))) == ':' && int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != ':' { + return 0 + } + + for i = 0; ; i++ { + if int32(*(*uint8)(unsafe.Pointer(s))) == ':' && brk < 0 { + brk = i + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(0) + if !(int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != 0) { + break + } + if i == 7 { + return 0 + } + continue + } + for v = AssignInt32(&j, 0); j < 4 && AssignInt32(&d, hexval(tls, uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))))) >= 0; j++ { + v = 16*v + d + } + if j == 0 { + return 0 + } + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(v) + if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != 0) && (brk >= 0 || i == 7) { + break + } + if i == 7 { + return 0 + } + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != ':' { + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != '.' || i < 6 && brk < 0 { + return 0 + } + need_v4 = 1 + i++ + break + } + s += uintptr(j + 1) + } + if brk >= 0 { + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(2*(i+1-brk))) + for j = 0; j < 7-i; j++ { + *(*uint16_t)(unsafe.Pointer(bp + uintptr(brk+j)*2)) = uint16_t(0) + } + } + for j = 0; j < 8; j++ { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(int32(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) >> 8) + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) + } + if need_v4 != 0 && Xinet_pton(tls, 2, s, a-uintptr(4)) <= 0 { + return 0 + } + return 1 +} + +func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + // var a4 in_addr at bp, 4 + + // var a6 in6_addr at bp+68, 16 + + if X__inet_aton(tls, name, bp) > 0 { + if family == 10 { // wrong family + return -2 + } + Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) + (*address)(unsafe.Pointer(buf)).family = 2 + (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + return 1 + } + // var tmp [64]uint8 at bp+4, 64 + + var p uintptr = Xstrchr(tls, name, '%') + // var z uintptr at bp+88, 8 + + var scopeid uint64 = uint64(0) + if p != 0 && (int64(p)-int64(name))/1 < int64(64) { + Xmemcpy(tls, bp+4, name, uint64((int64(p)-int64(name))/1)) + *(*uint8)(unsafe.Pointer(bp + 4 + uintptr((int64(p)-int64(name))/1))) = uint8(0) + name = bp + 4 /* &tmp[0] */ + } + + if Xinet_pton(tls, 10, name, bp+68) <= 0 { + return 0 + } + if family == 2 { // wrong family + return -2 + } + + Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) + (*address)(unsafe.Pointer(buf)).family = 10 + if p != 0 { + if func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1))))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1))))-uint32('0') < uint32(10)) + }() != 0 { + scopeid = Xstrtoull(tls, p, bp+88, 10) + } else { + *(*uintptr)(unsafe.Pointer(bp + 88 /* z */)) = p - uintptr(1) + } + if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { + Xabort(tls) //TODO- + // if (!IN6_IS_ADDR_LINKLOCAL(&a6) && + // !IN6_IS_ADDR_MC_LINKLOCAL(&a6)) + // return EAI_NONAME; + // scopeid = if_nametoindex(p); + // if (!scopeid) return EAI_NONAME; + } + if scopeid > uint64(0xffffffff) { + return -2 + } + } + (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + return 1 +} + +func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ + var s uintptr + //TODO if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) { + return 0 + } + for s = host; int32(*(*uint8)(unsafe.Pointer(s))) >= 0x80 || int32(*(*uint8)(unsafe.Pointer(s))) == '.' || int32(*(*uint8)(unsafe.Pointer(s))) == '-' || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0; s++ { + } + return BoolInt32(!(*(*uint8)(unsafe.Pointer(s)) != 0)) +} + +var Xzero_struct_address address /* lookup_name.c:27:16: */ + +func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:29:12: */ + var cnt int32 = 0 + if name != 0 { + return 0 + } + if flags&0x01 != 0 { + //TODO if (family != AF_INET6) + //TODO buf[cnt++] = (struct address){ .family = AF_INET }; + if family != 10 { + var x = Xzero_struct_address + x.family = 2 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + //TODO if (family != AF_INET) + //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; + if family != 2 { + var x = Xzero_struct_address + x.family = 10 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + } else { + Xabort(tls) //TODO- + // if (family != AF_INET6) + // buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } }; + // if (family != AF_INET) + // buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } }; + } + return cnt +} + +func name_from_numeric(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_name.c:58:12: */ + return X__lookup_ipliteral(tls, buf, name, family) +} + +func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:63:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var line [512]uint8 at bp, 512 + + var l size_t = Xstrlen(tls, name) + var cnt int32 = 0 + var badfam int32 = 0 + var _buf [1032]uint8 + _ = _buf + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var _f FILE + _ = _f + var f uintptr = Xfopen(tls, ts+76, ts+87) + if !(f != 0) { + switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { + case 2: + fallthrough + case 20: + fallthrough + case 13: + return 0 + fallthrough + default: + return -11 + } + } + for Xfgets(tls, bp, int32(unsafe.Sizeof([512]uint8{})), f) != 0 && cnt < 48 { + var p uintptr + var z uintptr + + if AssignUintptr(&p, Xstrchr(tls, bp, '#')) != 0 { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8('\n') + *(*uint8)(unsafe.Pointer(p)) = uint8(0) + } + for p = bp + uintptr(1); AssignUintptr(&p, Xstrstr(tls, p, name)) != 0 && (!(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + UintptrFromInt32(-1))))) != 0) || !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + uintptr(l))))) != 0)); p++ { + } + if !(p != 0) { + continue + } + + // Isolate IP address to parse + for p = bp; /* &line[0] */ *(*uint8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8(0) + switch name_from_numeric(tls, buf+uintptr(cnt)*28, bp, family) { + case 1: + cnt++ + break + case 0: + continue + default: + badfam = -2 + continue + } + + // Extract first name as canonical name + for ; *(*uint8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*uint8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + if is_valid_hostname(tls, p) != 0 { + Xmemcpy(tls, canon, p, uint64((int64(z)-int64(p))/1+int64(1))) + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) + if cnt != 0 { + return cnt + } + return badfam +} + +type dpc_ctx = struct { + addrs uintptr + canon uintptr + cnt int32 + _ [4]byte +} /* lookup_name.c:112:1 */ + +func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ + return -1 //TODO- + Xabort(tls) + return int32(0) //TODO- + // char search[256]; + // struct resolvconf conf; + // size_t l, dots; + // char *p, *z; + + // if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; + + // /* Count dots, suppress search when >=ndots or name ends in + // * a dot, which is an explicit request for global scope. */ + // for (dots=l=0; name[l]; l++) if (name[l]=='.') dots++; + // if (dots >= conf.ndots || name[l-1]=='.') *search = 0; + + // /* Strip final dot for canon, fail if multiple trailing dots. */ + // if (name[l-1]=='.') l--; + // if (!l || name[l-1]=='.') return EAI_NONAME; + + // /* This can never happen; the caller already checked length. */ + // if (l >= 256) return EAI_NONAME; + + // /* Name with search domain appended is setup in canon[]. This both + // * provides the desired default canonical name (if the requested + // * name is not a CNAME record) and serves as a buffer for passing + // * the full requested name to name_from_dns. */ + // memcpy(canon, name, l); + // canon[l] = '.'; + + // for (p=search; *p; p=z) { + // for (; isspace(*p); p++); + // for (z=p; *z && !isspace(*z); z++); + // if (z==p) break; + // if (z-p < 256 - l - 1) { + // memcpy(canon+l+1, p, z-p); + // canon[z-p+1+l] = 0; + // int cnt = name_from_dns(buf, canon, canon, family, &conf); + // if (cnt) return cnt; + // } + // } + + // canon[l] = 0; + // return name_from_dns(buf, canon, name, family, &conf); +} + +type policy = struct { + addr [16]uint8 + len uint8 + mask uint8 + prec uint8 + label uint8 +} /* lookup_name.c:237:14 */ + +var defpolicy = [6]policy{ + {addr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, + {addr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, + {addr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, + {addr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, + {addr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + // Last rule must match all addresses to stop loop. + {addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: uint8(1)}, +} /* lookup_name.c:241:3 */ + +func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ + var i int32 + for i = 0; ; i++ { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 { + continue + } + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + continue + } + return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + } + return uintptr(0) +} + +func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) +} + +func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xff { + return int32(*(*uint8_t)(unsafe.Pointer(a + 1))) & 15 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 { + return 2 + } + if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 { + return 2 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0xc0 { + return 5 + } + return 14 +} + +func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12: */ + // FIXME: The common prefix length should be limited to no greater + // than the nominal length of the prefix portion of the source + // address. However the definition of the source prefix length is + // not clear and thus this limiting is not yet implemented. + var i uint32 + for i = uint32(0); i < uint32(128) && !((int32(*(*uint8_t)(unsafe.Pointer(s /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8)))))^int32(*(*uint8_t)(unsafe.Pointer(d /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8))))))&(int32(128)>>(i%uint32(8))) != 0); i++ { + } + return int32(i) +} + +func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ + var a uintptr = _a + var b uintptr = _b + return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey +} + +func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var cnt int32 = 0 + var i int32 + var j int32 + _ = j + + *(*uint8)(unsafe.Pointer(canon)) = uint8(0) + if name != 0 { + // reject empty name and check len so it fits into temp bufs + var l size_t = Xstrnlen(tls, name, uint64(255)) + if l-uint64(1) >= uint64(254) { + return -2 + } + Xmemcpy(tls, canon, name, l+uint64(1)) + } + + // Procedurally, a request for v6 addresses with the v4-mapped + // flag set is like a request for unspecified family, followed + // by filtering of the results. + if flags&0x08 != 0 { + if family == 10 { + family = 0 + } else { + flags = flags - 0x08 + } + } + + // Try each backend until there's at least one result. + cnt = name_from_null(tls, buf, name, family, flags) + if !(cnt != 0) { + cnt = name_from_numeric(tls, buf, name, family) + } + if !(cnt != 0) && !(flags&0x04 != 0) { + cnt = name_from_hosts(tls, buf, canon, name, family) + if !(cnt != 0) { + cnt = name_from_dns_search(tls, buf, canon, name, family) + } + } + if cnt <= 0 { + if cnt != 0 { + return cnt + } + return -2 + } + + // Filter/transform results for v4-mapped lookup, if requested. + if flags&0x08 != 0 { + Xabort(tls) //TODO- + // if (!(flags & AI_ALL)) { + // /* If any v6 results exist, remove v4 results. */ + // for (i=0; i= 0 { + if !(Xconnect(tls, fd, da, dalen) != 0) { + key = key | 0x40000000 + if !(Xgetsockname(tls, fd, sa1, bp+88) != 0) { + if family == 2 { + Xmemcpy(tls, + bp+28+8+uintptr(12), + bp+72+4, uint64(4)) + } + if dscope == scopeof(tls, bp+28+8) { + key = key | 0x20000000 + } + if dlabel == labelof(tls, bp+28+8) { + key = key | 0x10000000 + } + prefixlen = prefixmatch(tls, bp+28+8, + bp+8) + } + } + Xclose(tls, fd) + } + key = key | dprec<<20 + key = key | (15-dscope)<<16 + key = key | prefixlen<<8 + key = key | (48-i)<<0 + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + } + Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr) int32 + }{addrcmp}))) + + //TODO pthread_setcancelstate(cs, 0); + + return cnt +} + +func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var line [128]uint8 + _ = line + var cnt int32 = 0 + var p uintptr + _ = p + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ + var port uint64 = uint64(0) + + switch socktype { + case 1: + switch proto { + case 0: + proto = 6 + fallthrough + case 6: + break + default: + return -8 + } + break + case 2: + switch proto { + case 0: + proto = 17 + fallthrough + case 17: + break + default: + return -8 + } + fallthrough + case 0: + break + default: + if name != 0 { + return -8 + } + (*service)(unsafe.Pointer(buf)).port = uint16_t(0) + (*service)(unsafe.Pointer(buf)).proto = uint8(proto) + (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + return 1 + } + + if name != 0 { + if !(int32(*(*uint8)(unsafe.Pointer(name))) != 0) { + return -8 + } + port = Xstrtoul(tls, name, bp, 10) + } + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0) { + if port > uint64(65535) { + return -8 + } + if proto != 17 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + } + if proto != 6 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + } + return cnt + } + + if flags&0x400 != 0 { + return -2 + } + + var l size_t = Xstrlen(tls, name) + _ = l + + Xabort(tls) //TODO- + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) switch (errno) { + // case ENOENT: + // case ENOTDIR: + // case EACCES: + // return EAI_SERVICE; + // default: + // return EAI_SYSTEM; + // } + + Xabort(tls) //TODO- + // while (fgets(line, sizeof line, f) && cnt < MAXSERVS) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // /* Find service name */ + // for(p=line; (p=strstr(p, name)); p++) { + // if (p>line && !isspace(p[-1])) continue; + // if (p[l] && !isspace(p[l])) continue; + // break; + // } + // if (!p) continue; + + // /* Skip past canonical name at beginning of line */ + // for (p=line; *p && !isspace(*p); p++); + + // port = strtoul(p, &z, 10); + // if (port > 65535 || z==p) continue; + // if (!strncmp(z, "/udp", 4)) { + // if (proto == IPPROTO_TCP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_DGRAM; + // buf[cnt++].proto = IPPROTO_UDP; + // } + // if (!strncmp(z, "/tcp", 4)) { + // if (proto == IPPROTO_UDP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_STREAM; + // buf[cnt++].proto = IPPROTO_TCP; + // } + // } + // __fclose_ca(f); + // return cnt > 0 ? cnt : EAI_SERVICE; + Xabort(tls) + return int32(0) //TODO- +} + +func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */ + x = x ^ x>>11 + x = x ^ x<<7&0x9D2C5680 + x = x ^ x<<15&0xEFC60000 + x = x ^ x>>18 + return x +} + +func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */ + return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2)) +} + +func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */ + var owner int32 = (*FILE)(unsafe.Pointer(f)).lock + var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid + if owner&CplInt32(0x40000000) == tid { + return 0 + } + owner = a_cas(tls, f+140, 0, tid) + if !(owner != 0) { + return 1 + } + for AssignInt32(&owner, a_cas(tls, f+140, 0, tid|0x40000000)) != 0 { + if owner&0x40000000 != 0 || a_cas(tls, f+140, owner, owner|0x40000000) == owner { + __futexwait(tls, f+140, owner|0x40000000, 1) + } + } + return 1 +} + +func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */ + if a_swap(tls, f+140, 0)&0x40000000 != 0 { + __wake(tls, f+140, 1, 1) + } +} + +func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 + if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0)) + } + (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + *(*uint32)(unsafe.Pointer(f)) |= uint32(32) + return -1 + } + (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) + if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + return -1 + } + return 0 +} + +func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */ + X__builtin_abort(tls) //TODO- + // __stdio_exit_needed(); +} + +// This function assumes it will never be called if there is already +// data buffered for reading. + +func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ + bp := tls.Alloc(1) + defer tls.Free(1) + + // var c uint8 at bp, 1 + + if !(X__toread(tls, f) != 0) && (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) { + return int32(*(*uint8)(unsafe.Pointer(bp))) + } + return -1 +} + +func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */ + var ret int32 + var ap va_list + _ = ap + ap = va + ret = Xvsscanf(tls, s, fmt, ap) + _ = ap + return ret +} + +type wctrans_t = uintptr /* wctype.h:20:19 */ + +func store_int(tls *TLS, dest uintptr, size int32, i uint64) { /* vfscanf.c:22:13: */ + if !(dest != 0) { + return + } + switch size { + case -2: + *(*uint8)(unsafe.Pointer(dest)) = uint8(i) + break + case -1: + *(*int16)(unsafe.Pointer(dest)) = int16(i) + break + case 0: + *(*int32)(unsafe.Pointer(dest)) = int32(i) + break + case 1: + *(*int64)(unsafe.Pointer(dest)) = int64(i) + break + case 3: + *(*int64)(unsafe.Pointer(dest)) = int64(i) + break + } +} + +func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */ + var p uintptr + var i uint32 + var ap2 va_list + _ = ap2 + ap2 = ap + for i = n; i > uint32(1); i-- { + VaUintptr(&ap2) + } + p = VaUintptr(&ap2) + _ = ap2 + return p +} + +func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var width int32 + var size int32 + var alloc int32 + var base int32 + var p uintptr + var c int32 + var t int32 + var s uintptr + var wcs uintptr + // var st mbstate_t at bp+268, 8 + + var dest uintptr + var invert int32 + var matches int32 + var x uint64 + var y float64 + var pos off_t + // var scanset [257]uint8 at bp, 257 + + var i size_t + var k size_t + // var wc wchar_t at bp+260, 4 + + var __need_unlock int32 + var tmp uintptr + var tmp1 uintptr + alloc = 0 + dest = uintptr(0) + matches = 0 + pos = int64(0) + __need_unlock = func() int32 { + if (*FILE)(unsafe.Pointer(f)).lock >= 0 { + return X__lockfile(tls, f) + } + return 0 + }() + + if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) { + goto __1 + } + X__toread(tls, f) +__1: + ; + if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) { + goto __2 + } + goto input_fail +__2: + ; + + p = fmt +__3: + if !(*(*uint8)(unsafe.Pointer(p)) != 0) { + goto __5 + } + + alloc = 0 + + if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0) { + goto __6 + } +__7: + if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + 1)))) != 0) { + goto __8 + } + p++ + goto __7 +__8: + ; + X__shlim(tls, f, int64(0)) +__9: + if !(__isspace(tls, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }()) != 0) { + goto __10 + } + goto __9 +__10: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) + goto __4 +__6: + ; + if !(int32(*(*uint8)(unsafe.Pointer(p))) != '%' || int32(*(*uint8)(unsafe.Pointer(p + 1))) == '%') { + goto __11 + } + X__shlim(tls, f, int64(0)) + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '%') { + goto __12 + } + p++ +__14: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __15 + } + goto __14 +__15: + ; + goto __13 +__12: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() +__13: + ; + if !(c != int32(*(*uint8)(unsafe.Pointer(p)))) { + goto __16 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(c < 0) { + goto __17 + } + goto input_fail +__17: + ; + goto match_fail +__16: + ; + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) + goto __4 +__11: + ; + + p++ + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '*') { + goto __18 + } + dest = uintptr(0) + p++ + goto __19 +__18: + if !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p)))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) + }() != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == '$') { + goto __20 + } + dest = arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-'0')) + p += uintptr(2) + goto __21 +__20: + dest = VaUintptr(&ap) +__21: + ; +__19: + ; + + width = 0 +__22: + if !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p)))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) + }() != 0) { + goto __24 + } + width = 10*width + int32(*(*uint8)(unsafe.Pointer(p))) - '0' + goto __23 +__23: + p++ + goto __22 + goto __24 +__24: + ; + + if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'm') { + goto __25 + } + wcs = uintptr(0) + s = uintptr(0) + alloc = BoolInt32(!!(dest != 0)) + p++ + goto __26 +__25: + alloc = 0 +__26: + ; + + size = 0 + switch int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1)))) { + case 'h': + goto __28 + case 'l': + goto __29 + case 'j': + goto __30 + case 'z': + goto __31 + case 't': + goto __32 + case 'L': + goto __33 + case 'd': + goto __34 + case 'i': + goto __35 + case 'o': + goto __36 + case 'u': + goto __37 + case 'x': + goto __38 + case 'a': + goto __39 + case 'e': + goto __40 + case 'f': + goto __41 + case 'g': + goto __42 + case 'A': + goto __43 + case 'E': + goto __44 + case 'F': + goto __45 + case 'G': + goto __46 + case 'X': + goto __47 + case 's': + goto __48 + case 'c': + goto __49 + case '[': + goto __50 + case 'S': + goto __51 + case 'C': + goto __52 + case 'p': + goto __53 + case 'n': + goto __54 + default: + goto __55 + } + goto __27 +__28: + if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'h') { + goto __56 + } + p++ + size = -2 + goto __57 +__56: + size = -1 +__57: + ; + goto __27 +__29: + if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'l') { + goto __58 + } + p++ + size = 3 + goto __59 +__58: + size = 1 +__59: + ; + goto __27 +__30: + size = 3 + goto __27 +__31: +__32: + size = 1 + goto __27 +__33: + size = 2 + goto __27 +__34: +__35: +__36: +__37: +__38: +__39: +__40: +__41: +__42: +__43: +__44: +__45: +__46: +__47: +__48: +__49: +__50: +__51: +__52: +__53: +__54: + p-- + goto __27 +__55: + goto fmt_fail +__27: + ; + + t = int32(*(*uint8)(unsafe.Pointer(p))) + + // C or S + if !(t&0x2f == 3) { + goto __60 + } + t = t | 32 + size = 1 +__60: + ; + + switch t { + case 'c': + goto __62 + case '[': + goto __63 + case 'n': + goto __64 + default: + goto __65 + } + goto __61 +__62: + if !(width < 1) { + goto __66 + } + width = 1 +__66: + ; +__63: + goto __61 +__64: + store_int(tls, dest, size, uint64(pos)) + // do not increment match count, etc! + goto __4 +__65: + X__shlim(tls, f, int64(0)) +__67: + if !(__isspace(tls, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }()) != 0) { + goto __68 + } + goto __67 +__68: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) +__61: + ; + + X__shlim(tls, f, int64(width)) + if !(func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() < 0) { + goto __69 + } + goto input_fail +__69: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + + switch t { + case 's': + goto __71 + case 'c': + goto __72 + case '[': + goto __73 + case 'p': + goto __74 + case 'X': + goto __75 + case 'x': + goto __76 + case 'o': + goto __77 + case 'd': + goto __78 + case 'u': + goto __79 + case 'i': + goto __80 + case 'a': + goto __81 + case 'A': + goto __82 + case 'e': + goto __83 + case 'E': + goto __84 + case 'f': + goto __85 + case 'F': + goto __86 + case 'g': + goto __87 + case 'G': + goto __88 + } + goto __70 +__71: +__72: +__73: + if !(t == 'c' || t == 's') { + goto __89 + } + Xmemset(tls, bp, -1, uint64(unsafe.Sizeof([257]uint8{}))) + *(*uint8)(unsafe.Pointer(bp)) = uint8(0) + if !(t == 's') { + goto __91 + } + *(*uint8)(unsafe.Pointer(bp + 10)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 11)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 12)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 13)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 14)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 33)) = uint8(0) +__91: + ; + goto __90 +__89: + if !(int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1)))) == '^') { + goto __92 + } + p++ + invert = 1 + goto __93 +__92: + invert = 0 +__93: + ; + Xmemset(tls, bp, invert, uint64(unsafe.Sizeof([257]uint8{}))) + *(*uint8)(unsafe.Pointer(bp)) = uint8(0) + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-') { + goto __94 + } + p++ + *(*uint8)(unsafe.Pointer(bp + 46)) = uint8(1 - invert) + goto __95 +__94: + if !(int32(*(*uint8)(unsafe.Pointer(p))) == ']') { + goto __96 + } + p++ + *(*uint8)(unsafe.Pointer(bp + 94)) = uint8(1 - invert) +__96: + ; +__95: + ; +__97: + if !(int32(*(*uint8)(unsafe.Pointer(p))) != ']') { + goto __99 + } + if !!(int32(*(*uint8)(unsafe.Pointer(p))) != 0) { + goto __100 + } + goto fmt_fail +__100: + ; + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-' && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != ']') { + goto __101 + } + c = int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1) + UintptrFromInt32(-1)))) +__102: + if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + goto __104 + } + *(*uint8)(unsafe.Pointer(bp + uintptr(1+c))) = uint8(1 - invert) + goto __103 +__103: + c++ + goto __102 + goto __104 +__104: + ; +__101: + ; + *(*uint8)(unsafe.Pointer(bp + uintptr(1+int32(*(*uint8)(unsafe.Pointer(p)))))) = uint8(1 - invert) + goto __98 +__98: + p++ + goto __97 + goto __99 +__99: + ; +__90: + ; + wcs = uintptr(0) + s = uintptr(0) + i = uint64(0) + if t == 'c' { + k = uint64(uint32(width) + 1) + } else { + k = uint64(31) + } + if !(size == 1) { + goto __105 + } + if !(alloc != 0) { + goto __107 + } + wcs = Xmalloc(tls, k*size_t(unsafe.Sizeof(wchar_t(0)))) + if !!(wcs != 0) { + goto __109 + } + goto alloc_fail +__109: + ; + goto __108 +__107: + wcs = dest +__108: + ; + *(*mbstate_t)(unsafe.Pointer(bp + 268 /* st */)) = mbstate_t{} +__110: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __111 + } + switch Xmbrtowc(tls, bp+260, func() uintptr { *(*uint8)(unsafe.Pointer(bp + 264)) = uint8(c); return bp + 264 }(), uint64(1), bp+268 /* &st */) { + case Uint64FromInt32(-1): + goto __113 + case Uint64FromInt32(-2): + goto __114 + } + goto __112 +__113: + goto input_fail +__114: + goto __110 +__112: + ; + if !(wcs != 0) { + goto __115 + } + *(*wchar_t)(unsafe.Pointer(wcs + uintptr(PostIncUint64(&i, 1))*4)) = *(*wchar_t)(unsafe.Pointer(bp + 260 /* wc */)) +__115: + ; + if !(alloc != 0 && i == k) { + goto __116 + } + k = k + (k + uint64(1)) + tmp = Xrealloc(tls, wcs, k*size_t(unsafe.Sizeof(wchar_t(0)))) + if !!(tmp != 0) { + goto __117 + } + goto alloc_fail +__117: + ; + wcs = tmp +__116: + ; + goto __110 +__111: + ; + if !!(Xmbsinit(tls, bp+268) != 0) { + goto __118 + } + goto input_fail +__118: + ; + goto __106 +__105: + if !(alloc != 0) { + goto __119 + } + s = Xmalloc(tls, k) + if !!(s != 0) { + goto __121 + } + goto alloc_fail +__121: + ; +__122: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __123 + } + *(*uint8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = uint8(c) + if !(i == k) { + goto __124 + } + k = k + (k + uint64(1)) + tmp1 = Xrealloc(tls, s, k) + if !!(tmp1 != 0) { + goto __125 + } + goto alloc_fail +__125: + ; + s = tmp1 +__124: + ; + goto __122 +__123: + ; + goto __120 +__119: + if !(AssignUintptr(&s, dest) != 0) { + goto __126 + } +__128: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __129 + } + *(*uint8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = uint8(c) + goto __128 +__129: + ; + goto __127 +__126: +__130: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __131 + } + goto __130 +__131: + ; +__127: + ; +__120: + ; +__106: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) { + goto __132 + } + goto match_fail +__132: + ; + if !(t == 'c' && (*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != off_t(width)) { + goto __133 + } + goto match_fail +__133: + ; + if !(alloc != 0) { + goto __134 + } + if !(size == 1) { + goto __135 + } + *(*uintptr)(unsafe.Pointer(dest)) = wcs + goto __136 +__135: + *(*uintptr)(unsafe.Pointer(dest)) = s +__136: + ; +__134: + ; + if !(t != 'c') { + goto __137 + } + if !(wcs != 0) { + goto __138 + } + *(*wchar_t)(unsafe.Pointer(wcs + uintptr(i)*4)) = 0 +__138: + ; + if !(s != 0) { + goto __139 + } + *(*uint8)(unsafe.Pointer(s + uintptr(i))) = uint8(0) +__139: + ; +__137: + ; + goto __70 +__74: +__75: +__76: + base = 16 + goto int_common +__77: + base = 8 + goto int_common +__78: +__79: + base = 10 + goto int_common +__80: + base = 0 +int_common: + x = X__intscan(tls, f, uint32(base), 0, 2*uint64(0x7fffffffffffffff)+uint64(1)) + if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) { + goto __140 + } + goto match_fail +__140: + ; + if !(t == 'p' && dest != 0) { + goto __141 + } + *(*uintptr)(unsafe.Pointer(dest)) = uintptr(uintptr_t(x)) + goto __142 +__141: + store_int(tls, dest, size, x) +__142: + ; + goto __70 +__81: +__82: +__83: +__84: +__85: +__86: +__87: +__88: + y = X__floatscan(tls, f, size, 0) + if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) { + goto __143 + } + goto match_fail +__143: + ; + if !(dest != 0) { + goto __144 + } + switch size { + case 0: + goto __146 + case 1: + goto __147 + case 2: + goto __148 + } + goto __145 +__146: + *(*float32)(unsafe.Pointer(dest)) = float32(y) + goto __145 +__147: + *(*float64)(unsafe.Pointer(dest)) = y + goto __145 +__148: + *(*float64)(unsafe.Pointer(dest)) = y + goto __145 +__145: + ; +__144: + ; + goto __70 +__70: + ; + + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) + if !(dest != 0) { + goto __149 + } + matches++ +__149: + ; + goto __4 +__4: + p++ + goto __3 + goto __5 +__5: + ; + if !(0 != 0) { + goto __150 + } +fmt_fail: +alloc_fail: +input_fail: + if !!(matches != 0) { + goto __151 + } + matches-- +__151: + ; +match_fail: + if !(alloc != 0) { + goto __152 + } + Xfree(tls, s) + Xfree(tls, wcs) +__152: + ; +__150: + ; +__153: + if !(__need_unlock != 0) { + goto __156 + } + X__unlockfile(tls, f) +__156: + ; + goto __154 +__154: + if 0 != 0 { + goto __153 + } + goto __155 +__155: + ; + return matches +} + +func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vsscanf.c:4:15: */ + var src uintptr = (*FILE)(unsafe.Pointer(f)).cookie + var k size_t = len + uint64(256) + var end uintptr = Xmemchr(tls, src, 0, k) + if end != 0 { + k = size_t((int64(end) - int64(src)) / 1) + } + if k < len { + len = k + } + Xmemcpy(tls, buf, src, len) + (*FILE)(unsafe.Pointer(f)).rpos = src + uintptr(len) + (*FILE)(unsafe.Pointer(f)).rend = src + uintptr(k) + (*FILE)(unsafe.Pointer(f)).cookie = src + uintptr(k) + return len +} + +func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + *(*FILE)(unsafe.Pointer(bp /* f */)) = FILE{read: *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + }{string_read})), buf: s, lock: -1, cookie: s} + return Xvfscanf(tls, bp, fmt, ap) +} + +func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ + var try uintptr + var sign int32 + for nel > uint64(0) { + try = base + uintptr(width*(nel/uint64(2))) + sign = (*struct { + f func(*TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) + if sign < 0 { + nel = nel / uint64(2) + } else if sign > 0 { + base = try + uintptr(width) + nel = nel - (nel/uint64(2) + uint64(1)) + } else { + return try + } + } + return uintptr(0) +} + +func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y float64 = X__floatscan(tls, bp, prec, 1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1 + if p != 0 { + *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { + if cnt != 0 { + return s + uintptr(cnt) + } + return s + }() + } + return y +} + +func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */ + return float32(strtox(tls, s, p, 0)) +} + +func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */ + return strtox(tls, s, p, 1) +} + +func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */ + return strtox(tls, s, p, 2) +} + +func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* strtol.c:8:27: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) + if p != 0 { + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1) + *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) + } + return y +} + +func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */ + return strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1)) +} + +func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:26:11: */ + return int64(strtox1(tls, s, p, base, Uint64FromInt64(-0x7fffffffffffffff-int64(1)))) +} + +func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:31:15: */ + return uint64(strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1))) +} + +func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:36:6: */ + return int64(strtox1(tls, s, p, base, 0+Uint64FromInt64(Int64(-Int64(0x7fffffffffffffff))-Int64FromInt32(1)))) +} + +func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) intmax_t { /* strtol.c:41:10: */ + return intmax_t(Xstrtoll(tls, s, p, base)) +} + +func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */ + return uintmax_t(Xstrtoull(tls, s, p, base)) +} + +func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */ + var l size_t = Xstrlen(tls, s) + var d uintptr = Xmalloc(tls, l+uint64(1)) + if !(d != 0) { + return uintptr(0) + } + return Xmemcpy(tls, d, s, l+uint64(1)) +} + +func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */ + var l size_t = Xstrnlen(tls, d, n) + if l == n { + return l + Xstrlen(tls, s) + } + return l + Xstrlcpy(tls, d+uintptr(l), s, n-l) +} + +// Support signed or unsigned plain-char + +// Implementation choices... + +// Arbitrary numbers... + +// POSIX/SUS requirements follow. These numbers come directly +// from SUS and have nothing to do with the host system. + +func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */ + var d0 uintptr + var wd uintptr + var ws uintptr + d0 = d + + if !!(int32(PostDecUint64(&n, 1)) != 0) { + goto __1 + } + goto finish +__1: + ; + if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) == uintptr_t(d)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1))) { + goto __2 + } +__3: + if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) != 0 && n != 0 && AssignPtrUint8(d, *(*uint8)(unsafe.Pointer(s))) != 0) { + goto __5 + } + goto __4 +__4: + n-- + s++ + d++ + goto __3 + goto __5 +__5: + ; + if !(n != 0 && *(*uint8)(unsafe.Pointer(s)) != 0) { + goto __6 + } + wd = d + ws = s +__7: + if !(n >= size_t(unsafe.Sizeof(size_t(0))) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64(Uint64FromInt32(-1))/uint64(255)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64(Uint64FromInt32(-1))/uint64(255)*uint64(255/2+1)) != 0)) { + goto __9 + } + *(*size_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) + goto __8 +__8: + n = n - size_t(unsafe.Sizeof(size_t(0))) + ws += 8 + wd += 8 + goto __7 + goto __9 +__9: + ; + d = wd + s = ws +__6: + ; +__2: + ; +__10: + if !(n != 0 && AssignPtrUint8(d, *(*uint8)(unsafe.Pointer(s))) != 0) { + goto __12 + } + goto __11 +__11: + n-- + s++ + d++ + goto __10 + goto __12 +__12: + ; + *(*uint8)(unsafe.Pointer(d)) = uint8(0) +finish: + return size_t((int64(d)-int64(d0))/1) + Xstrlen(tls, s) +} + +func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */ + var l uintptr = _l + var r uintptr = _r + if !(int32(PostDecUint64(&n, 1)) != 0) { + return 0 + } +__1: + if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) { + goto __3 + } + goto __2 +__2: + l++ + r++ + n-- + goto __1 + goto __3 +__3: + ; + return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))) +} + +func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */ + return Xstrncasecmp(tls, l, r, n) +} + +func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */ + var a uintptr = d + d += uintptr(Xstrlen(tls, d)) + for n != 0 && *(*uint8)(unsafe.Pointer(s)) != 0 { + n-- + *(*uint8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) + } + *(*uint8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = uint8(0) + return a +} + +func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */ + var p uintptr = Xmemchr(tls, s, 0, n) + if p != 0 { + return uint64((int64(p) - int64(s)) / 1) + } + return n +} + +func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var a uintptr = s + *(*[4]size_t)(unsafe.Pointer(bp /* byteset */)) = [4]size_t{0: uint64(0)} + + if !(int32(*(*uint8)(unsafe.Pointer(c))) != 0) { + return uint64(0) + } + if !(int32(*(*uint8)(unsafe.Pointer(c + 1))) != 0) { + for ; int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c))); s++ { + } + return size_t((int64(s) - int64(a)) / 1) + } + + for ; *(*uint8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint64(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8, size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; c++ { + } + for ; *(*uint8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8))&(size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; s++ { + } + return size_t((int64(s) - int64(a)) / 1) +} + +func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */ + if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) { + return uintptr(0) + } + s += uintptr(Xstrspn(tls, s, sep)) + if !(int32(*(*uint8)(unsafe.Pointer(s))) != 0) { + return AssignPtrUintptr(uintptr(unsafe.Pointer(&_sp)), uintptr(0)) + } + _sp = s + uintptr(Xstrcspn(tls, s, sep)) + if *(*uint8)(unsafe.Pointer(_sp)) != 0 { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&_sp, 1))) = uint8(0) + } else { + _sp = uintptr(0) + } + return s +} + +var _sp uintptr /* strtok.c:5:14: */ + +func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */ + return *(*int32)(unsafe.Pointer(a + 6*4)) +} + +func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */ + *(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4)) + return 0 +} + +// +// int pthread_attr_getguardsize(const pthread_attr_t *restrict a, size_t *restrict size) +// { +// *size = a->_a_guardsize; +// return 0; +// } +// +// int pthread_attr_getinheritsched(const pthread_attr_t *restrict a, int *restrict inherit) +// { +// *inherit = a->_a_sched; +// return 0; +// } +// +// int pthread_attr_getschedparam(const pthread_attr_t *restrict a, struct sched_param *restrict param) +// { +// param->sched_priority = a->_a_prio; +// return 0; +// } +// +// int pthread_attr_getschedpolicy(const pthread_attr_t *restrict a, int *restrict policy) +// { +// *policy = a->_a_policy; +// return 0; +// } +// +// int pthread_attr_getscope(const pthread_attr_t *restrict a, int *restrict scope) +// { +// *scope = PTHREAD_SCOPE_SYSTEM; +// return 0; +// } +// +// int pthread_attr_getstack(const pthread_attr_t *restrict a, void **restrict addr, size_t *restrict size) +// { +// if (!a->_a_stackaddr) +// return EINVAL; +// *size = a->_a_stacksize; +// *addr = (void *)(a->_a_stackaddr - *size); +// return 0; +// } +// +// int pthread_attr_getstacksize(const pthread_attr_t *restrict a, size_t *restrict size) +// { +// *size = a->_a_stacksize; +// return 0; +// } +// +// int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict a, int *restrict pshared) +// { +// *pshared = !!a->__attr; +// return 0; +// } +// +// int pthread_condattr_getclock(const pthread_condattr_t *restrict a, clockid_t *restrict clk) +// { +// *clk = a->__attr & 0x7fffffff; +// return 0; +// } +// +// int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restrict pshared) +// { +// *pshared = a->__attr>>31; +// return 0; +// } +// +// int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol) +// { +// *protocol = PTHREAD_PRIO_NONE; +// return 0; +// } +// int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared) +// { +// *pshared = a->__attr / 128U % 2; +// return 0; +// } +// +// int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict a, int *restrict robust) +// { +// *robust = a->__attr / 4U % 2; +// return 0; +// } + +func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */ + return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3)) +} + +// int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict a, int *restrict type) +// { +// *type = a->__attr & 3; +// return 0; +// } +// +// int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict a, int *restrict pshared) +// { +// *pshared = a->__attr[0]; +// return 0; +// } + +func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */ + if uint32(state) > 1 { + return 22 + } + *(*int32)(unsafe.Pointer(a + 6*4)) = state + return 0 +} + +func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */ + return *(*int32)(unsafe.Pointer(m)) & 15 +} + +// int __pthread_mutex_lock(pthread_mutex_t *m) +// { +// if ((m->_m_type&15) == PTHREAD_MUTEX_NORMAL +// && !a_cas(&m->_m_lock, 0, EBUSY)) +// return 0; +// +// return __pthread_mutex_timedlock(m, 0); +// } +// +// weak_alias(__pthread_mutex_lock, pthread_mutex_lock); + +func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */ + return 0 +} + +func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */ + *(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{} + return 0 +} + +func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */ + if uint32(type1) > uint32(2) { + return 22 + } + (*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr&Uint32FromInt32(CplInt32(3)) | uint32(type1) + return 0 +} + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&ptable)) + 0)) = uintptr(unsafe.Pointer(&table)) + uintptr(128)*2 // __ctype_b_loc.c:36:45: +} + +var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00.\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/libc/netdb/capi_linux_riscv64.go b/vendor/modernc.org/libc/netdb/capi_linux_riscv64.go new file mode 100644 index 00000000..9029223c --- /dev/null +++ b/vendor/modernc.org/libc/netdb/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netdb/netdb_linux_riscv64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go b/vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go new file mode 100644 index 00000000..0f2867e6 --- /dev/null +++ b/vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go @@ -0,0 +1,3280 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netdb/netdb_linux_riscv64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_ALG = 38 + AF_APPLETALK = 5 + AF_ASH = 18 + AF_ATMPVC = 8 + AF_ATMSVC = 20 + AF_AX25 = 3 + AF_BLUETOOTH = 31 + AF_BRIDGE = 7 + AF_CAIF = 37 + AF_CAN = 29 + AF_DECnet = 12 + AF_ECONET = 19 + AF_FILE = 1 + AF_IB = 27 + AF_IEEE802154 = 36 + AF_INET = 2 + AF_INET6 = 10 + AF_IPX = 4 + AF_IRDA = 23 + AF_ISDN = 34 + AF_IUCV = 32 + AF_KCM = 41 + AF_KEY = 15 + AF_LLC = 26 + AF_LOCAL = 1 + AF_MAX = 45 + AF_MPLS = 28 + AF_NETBEUI = 13 + AF_NETLINK = 16 + AF_NETROM = 6 + AF_NFC = 39 + AF_PACKET = 17 + AF_PHONET = 35 + AF_PPPOX = 24 + AF_QIPCRTR = 42 + AF_RDS = 21 + AF_ROSE = 11 + AF_ROUTE = 16 + AF_RXRPC = 33 + AF_SECURITY = 14 + AF_SMC = 43 + AF_SNA = 22 + AF_TIPC = 30 + AF_UNIX = 1 + AF_UNSPEC = 0 + AF_VSOCK = 40 + AF_WANPIPE = 25 + AF_X25 = 9 + AF_XDP = 44 + AI_ADDRCONFIG = 0x0020 + AI_ALL = 0x0010 + AI_CANONNAME = 0x0002 + AI_NUMERICHOST = 0x0004 + AI_NUMERICSERV = 0x0400 + AI_PASSIVE = 0x0001 + AI_V4MAPPED = 0x0008 + BIG_ENDIAN = 4321 + BYTE_ORDER = 1234 + EAI_AGAIN = -3 + EAI_BADFLAGS = -1 + EAI_FAIL = -4 + EAI_FAMILY = -6 + EAI_MEMORY = -10 + EAI_NONAME = -2 + EAI_OVERFLOW = -12 + EAI_SERVICE = -8 + EAI_SOCKTYPE = -7 + EAI_SYSTEM = -11 + FD_SETSIZE = 1024 + FIOGETOWN = 0x8903 + FIOSETOWN = 0x8901 + HOST_NOT_FOUND = 1 + INET6_ADDRSTRLEN = 46 + INET_ADDRSTRLEN = 16 + IN_CLASSA_HOST = 16777215 + IN_CLASSA_MAX = 128 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 24 + IN_CLASSB_HOST = 65535 + IN_CLASSB_MAX = 65536 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 16 + IN_CLASSC_HOST = 255 + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 8 + IN_LOOPBACKNET = 127 + IPPORT_RESERVED1 = 1024 + IPV6_2292DSTOPTS = 4 + IPV6_2292HOPLIMIT = 8 + IPV6_2292HOPOPTS = 3 + IPV6_2292PKTINFO = 2 + IPV6_2292PKTOPTIONS = 6 + IPV6_2292RTHDR = 5 + IPV6_ADDRFORM = 1 + IPV6_ADDR_PREFERENCES = 72 + IPV6_ADD_MEMBERSHIP = 20 + IPV6_AUTHHDR = 10 + IPV6_AUTOFLOWLABEL = 70 + IPV6_CHECKSUM = 7 + IPV6_DONTFRAG = 62 + IPV6_DROP_MEMBERSHIP = 21 + IPV6_DSTOPTS = 59 + IPV6_FREEBIND = 78 + IPV6_HDRINCL = 36 + IPV6_HOPLIMIT = 52 + IPV6_HOPOPTS = 54 + IPV6_IPSEC_POLICY = 34 + IPV6_JOIN_ANYCAST = 27 + IPV6_JOIN_GROUP = 20 + IPV6_LEAVE_ANYCAST = 28 + IPV6_LEAVE_GROUP = 21 + IPV6_MINHOPCOUNT = 73 + IPV6_MTU = 24 + IPV6_MTU_DISCOVER = 23 + IPV6_MULTICAST_ALL = 29 + IPV6_MULTICAST_HOPS = 18 + IPV6_MULTICAST_IF = 17 + IPV6_MULTICAST_LOOP = 19 + IPV6_NEXTHOP = 9 + IPV6_ORIGDSTADDR = 74 + IPV6_PATHMTU = 61 + IPV6_PKTINFO = 50 + IPV6_PMTUDISC_DO = 2 + IPV6_PMTUDISC_DONT = 0 + IPV6_PMTUDISC_INTERFACE = 4 + IPV6_PMTUDISC_OMIT = 5 + IPV6_PMTUDISC_PROBE = 3 + IPV6_PMTUDISC_WANT = 1 + IPV6_RECVDSTOPTS = 58 + IPV6_RECVERR = 25 + IPV6_RECVERR_RFC4884 = 31 + IPV6_RECVFRAGSIZE = 77 + IPV6_RECVHOPLIMIT = 51 + IPV6_RECVHOPOPTS = 53 + IPV6_RECVORIGDSTADDR = 74 + IPV6_RECVPATHMTU = 60 + IPV6_RECVPKTINFO = 49 + IPV6_RECVRTHDR = 56 + IPV6_RECVTCLASS = 66 + IPV6_ROUTER_ALERT = 22 + IPV6_ROUTER_ALERT_ISOLATE = 30 + IPV6_RTHDR = 57 + IPV6_RTHDRDSTOPTS = 55 + IPV6_RTHDR_LOOSE = 0 + IPV6_RTHDR_STRICT = 1 + IPV6_RTHDR_TYPE_0 = 0 + IPV6_RXDSTOPTS = 59 + IPV6_RXHOPOPTS = 54 + IPV6_TCLASS = 67 + IPV6_TRANSPARENT = 75 + IPV6_UNICAST_HOPS = 16 + IPV6_UNICAST_IF = 76 + IPV6_V6ONLY = 26 + IPV6_XFRM_POLICY = 35 + IP_ADD_MEMBERSHIP = 35 + IP_ADD_SOURCE_MEMBERSHIP = 39 + IP_BIND_ADDRESS_NO_PORT = 24 + IP_BLOCK_SOURCE = 38 + IP_CHECKSUM = 23 + IP_DEFAULT_MULTICAST_LOOP = 1 + IP_DEFAULT_MULTICAST_TTL = 1 + IP_DROP_MEMBERSHIP = 36 + IP_DROP_SOURCE_MEMBERSHIP = 40 + IP_FREEBIND = 15 + IP_HDRINCL = 3 + IP_IPSEC_POLICY = 16 + IP_MAX_MEMBERSHIPS = 20 + IP_MINTTL = 21 + IP_MSFILTER = 41 + IP_MTU = 14 + IP_MTU_DISCOVER = 10 + IP_MULTICAST_ALL = 49 + IP_MULTICAST_IF = 32 + IP_MULTICAST_LOOP = 34 + IP_MULTICAST_TTL = 33 + IP_NODEFRAG = 22 + IP_OPTIONS = 4 + IP_ORIGDSTADDR = 20 + IP_PASSSEC = 18 + IP_PKTINFO = 8 + IP_PKTOPTIONS = 9 + IP_PMTUDISC = 10 + IP_PMTUDISC_DO = 2 + IP_PMTUDISC_DONT = 0 + IP_PMTUDISC_INTERFACE = 4 + IP_PMTUDISC_OMIT = 5 + IP_PMTUDISC_PROBE = 3 + IP_PMTUDISC_WANT = 1 + IP_RECVERR = 11 + IP_RECVERR_RFC4884 = 26 + IP_RECVFRAGSIZE = 25 + IP_RECVOPTS = 6 + IP_RECVORIGDSTADDR = 20 + IP_RECVRETOPTS = 7 + IP_RECVTOS = 13 + IP_RECVTTL = 12 + IP_RETOPTS = 7 + IP_ROUTER_ALERT = 5 + IP_TOS = 1 + IP_TRANSPARENT = 19 + IP_TTL = 2 + IP_UNBLOCK_SOURCE = 37 + IP_UNICAST_IF = 50 + IP_XFRM_POLICY = 17 + LITTLE_ENDIAN = 1234 + MCAST_BLOCK_SOURCE = 43 + MCAST_EXCLUDE = 0 + MCAST_INCLUDE = 1 + MCAST_JOIN_GROUP = 42 + MCAST_JOIN_SOURCE_GROUP = 46 + MCAST_LEAVE_GROUP = 45 + MCAST_LEAVE_SOURCE_GROUP = 47 + MCAST_MSFILTER = 48 + MCAST_UNBLOCK_SOURCE = 44 + NETDB_INTERNAL = -1 + NETDB_SUCCESS = 0 + NI_DGRAM = 16 + NI_MAXHOST = 1025 + NI_MAXSERV = 32 + NI_NAMEREQD = 8 + NI_NOFQDN = 4 + NI_NUMERICHOST = 1 + NI_NUMERICSERV = 2 + NO_ADDRESS = 4 + NO_DATA = 4 + NO_RECOVERY = 3 + PDP_ENDIAN = 3412 + PF_ALG = 38 + PF_APPLETALK = 5 + PF_ASH = 18 + PF_ATMPVC = 8 + PF_ATMSVC = 20 + PF_AX25 = 3 + PF_BLUETOOTH = 31 + PF_BRIDGE = 7 + PF_CAIF = 37 + PF_CAN = 29 + PF_DECnet = 12 + PF_ECONET = 19 + PF_FILE = 1 + PF_IB = 27 + PF_IEEE802154 = 36 + PF_INET = 2 + PF_INET6 = 10 + PF_IPX = 4 + PF_IRDA = 23 + PF_ISDN = 34 + PF_IUCV = 32 + PF_KCM = 41 + PF_KEY = 15 + PF_LLC = 26 + PF_LOCAL = 1 + PF_MAX = 45 + PF_MPLS = 28 + PF_NETBEUI = 13 + PF_NETLINK = 16 + PF_NETROM = 6 + PF_NFC = 39 + PF_PACKET = 17 + PF_PHONET = 35 + PF_PPPOX = 24 + PF_QIPCRTR = 42 + PF_RDS = 21 + PF_ROSE = 11 + PF_ROUTE = 16 + PF_RXRPC = 33 + PF_SECURITY = 14 + PF_SMC = 43 + PF_SNA = 22 + PF_TIPC = 30 + PF_UNIX = 1 + PF_UNSPEC = 0 + PF_VSOCK = 40 + PF_WANPIPE = 25 + PF_X25 = 9 + PF_XDP = 44 + SCM_TIMESTAMP = 29 + SCM_TIMESTAMPING = 37 + SCM_TIMESTAMPING_OPT_STATS = 54 + SCM_TIMESTAMPING_PKTINFO = 58 + SCM_TIMESTAMPNS = 35 + SCM_TXTIME = 61 + SCM_WIFI_STATUS = 41 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_OLD = 0x8907 + SIOCGSTAMP_OLD = 0x8906 + SIOCSPGRP = 0x8902 + SOL_AAL = 265 + SOL_ALG = 279 + SOL_ATM = 264 + SOL_BLUETOOTH = 274 + SOL_CAIF = 278 + SOL_DCCP = 269 + SOL_DECNET = 261 + SOL_ICMPV6 = 58 + SOL_IP = 0 + SOL_IPV6 = 41 + SOL_IRDA = 266 + SOL_IUCV = 277 + SOL_KCM = 281 + SOL_LLC = 268 + SOL_NETBEUI = 267 + SOL_NETLINK = 270 + SOL_NFC = 280 + SOL_PACKET = 263 + SOL_PNPIPE = 275 + SOL_PPPOL2TP = 273 + SOL_RAW = 255 + SOL_RDS = 276 + SOL_RXRPC = 272 + SOL_SOCKET = 1 + SOL_TIPC = 271 + SOL_TLS = 282 + SOL_X25 = 262 + SOL_XDP = 283 + SOMAXCONN = 4096 + SO_ACCEPTCONN = 30 + SO_ATTACH_BPF = 50 + SO_ATTACH_FILTER = 26 + SO_ATTACH_REUSEPORT_CBPF = 51 + SO_ATTACH_REUSEPORT_EBPF = 52 + SO_BINDTODEVICE = 25 + SO_BINDTOIFINDEX = 62 + SO_BPF_EXTENSIONS = 48 + SO_BROADCAST = 6 + SO_BSDCOMPAT = 14 + SO_BUSY_POLL = 46 + SO_BUSY_POLL_BUDGET = 70 + SO_CNX_ADVICE = 53 + SO_COOKIE = 57 + SO_DEBUG = 1 + SO_DETACH_BPF = 27 + SO_DETACH_FILTER = 27 + SO_DETACH_REUSEPORT_BPF = 68 + SO_DOMAIN = 39 + SO_DONTROUTE = 5 + SO_ERROR = 4 + SO_GET_FILTER = 26 + SO_INCOMING_CPU = 49 + SO_INCOMING_NAPI_ID = 56 + SO_KEEPALIVE = 9 + SO_LINGER = 13 + SO_LOCK_FILTER = 44 + SO_MARK = 36 + SO_MAX_PACING_RATE = 47 + SO_MEMINFO = 55 + SO_NETNS_COOKIE = 71 + SO_NOFCS = 43 + SO_NO_CHECK = 11 + SO_OOBINLINE = 10 + SO_PASSCRED = 16 + SO_PASSSEC = 34 + SO_PEEK_OFF = 42 + SO_PEERCRED = 17 + SO_PEERGROUPS = 59 + SO_PEERNAME = 28 + SO_PEERSEC = 31 + SO_PREFER_BUSY_POLL = 69 + SO_PRIORITY = 12 + SO_PROTOCOL = 38 + SO_RCVBUF = 8 + SO_RCVBUFFORCE = 33 + SO_RCVLOWAT = 18 + SO_RCVTIMEO = 20 + SO_RCVTIMEO_NEW = 66 + SO_RCVTIMEO_OLD = 20 + SO_REUSEADDR = 2 + SO_REUSEPORT = 15 + SO_RXQ_OVFL = 40 + SO_SECURITY_AUTHENTICATION = 22 + SO_SECURITY_ENCRYPTION_NETWORK = 24 + SO_SECURITY_ENCRYPTION_TRANSPORT = 23 + SO_SELECT_ERR_QUEUE = 45 + SO_SNDBUF = 7 + SO_SNDBUFFORCE = 32 + SO_SNDLOWAT = 19 + SO_SNDTIMEO = 21 + SO_SNDTIMEO_NEW = 67 + SO_SNDTIMEO_OLD = 21 + SO_TIMESTAMP = 29 + SO_TIMESTAMPING = 37 + SO_TIMESTAMPING_NEW = 65 + SO_TIMESTAMPING_OLD = 37 + SO_TIMESTAMPNS = 35 + SO_TIMESTAMPNS_NEW = 64 + SO_TIMESTAMPNS_OLD = 35 + SO_TIMESTAMP_NEW = 63 + SO_TIMESTAMP_OLD = 29 + SO_TXTIME = 61 + SO_TYPE = 3 + SO_WIFI_STATUS = 41 + SO_ZEROCOPY = 60 + TRY_AGAIN = 2 + X_ASM_RISCV_BITSPERLONG_H = 0 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_SOCKADDR_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_STDINT_UINTN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_ENDIAN_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LINUX_POSIX_TYPES_H = 0 + X_LP64 = 1 + X_NETDB_H = 1 + X_NETINET_IN_H = 1 + X_PATH_HEQUIV = "/etc/hosts.equiv" + X_PATH_HOSTS = "/etc/hosts" + X_PATH_NETWORKS = "/etc/networks" + X_PATH_NSSWITCH_CONF = "/etc/nsswitch.conf" + X_PATH_PROTOCOLS = "/etc/protocols" + X_PATH_SERVICES = "/etc/services" + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RPC_NETDB_H = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_SS_SIZE = 128 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_SOCKET_H = 1 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. +const ( /* in.h:103:1: */ + IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. + IPPROTO_ROUTING = 43 // IPv6 routing header. + IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header. + IPPROTO_ICMPV6 = 58 // ICMPv6. + IPPROTO_NONE = 59 // IPv6 no next header. + IPPROTO_DSTOPTS = 60 // IPv6 destination options. + IPPROTO_MH = 135 +) + +// Standard well-known ports. +const ( /* in.h:126:1: */ + IPPORT_ECHO = 7 // Echo service. + IPPORT_DISCARD = 9 // Discard transmissions service. + IPPORT_SYSTAT = 11 // System status service. + IPPORT_DAYTIME = 13 // Time of day service. + IPPORT_NETSTAT = 15 // Network status service. + IPPORT_FTP = 21 // File Transfer Protocol. + IPPORT_TELNET = 23 // Telnet protocol. + IPPORT_SMTP = 25 // Simple Mail Transfer Protocol. + IPPORT_TIMESERVER = 37 // Timeserver service. + IPPORT_NAMESERVER = 42 // Domain Name Service. + IPPORT_WHOIS = 43 // Internet Whois service. + IPPORT_MTP = 57 + + IPPORT_TFTP = 69 // Trivial File Transfer Protocol. + IPPORT_RJE = 77 + IPPORT_FINGER = 79 // Finger service. + IPPORT_TTYLINK = 87 + IPPORT_SUPDUP = 95 // SUPDUP protocol. + + IPPORT_EXECSERVER = 512 // execd service. + IPPORT_LOGINSERVER = 513 // rlogind service. + IPPORT_CMDSERVER = 514 + IPPORT_EFSSERVER = 520 + + // UDP ports. + IPPORT_BIFFUDP = 512 + IPPORT_WHOSERVER = 513 + IPPORT_ROUTESERVER = 520 + + // Ports less than this value are reserved for privileged processes. + IPPORT_RESERVED = 1024 + + // Ports greater this value are reserved for (non-privileged) servers. + IPPORT_USERRESERVED = 5000 +) + +// Options for use with `getsockopt' and `setsockopt' at the IPv6 level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. + +// Advanced API (RFC3542) (1). + +// Advanced API (RFC3542) (2). + +// RFC5014. + +// RFC5082. + +// Obsolete synonyms for the above. + +// IPV6_MTU_DISCOVER values. + +// Socket level values for IPv6. + +// Routing header options for IPv6. + +// Standard well-defined IP protocols. +const ( /* in.h:40:1: */ + IPPROTO_IP = 0 // Dummy protocol for TCP. + IPPROTO_ICMP = 1 // Internet Control Message Protocol. + IPPROTO_IGMP = 2 // Internet Group Management Protocol. + IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94). + IPPROTO_TCP = 6 // Transmission Control Protocol. + IPPROTO_EGP = 8 // Exterior Gateway Protocol. + IPPROTO_PUP = 12 // PUP protocol. + IPPROTO_UDP = 17 // User Datagram Protocol. + IPPROTO_IDP = 22 // XNS IDP protocol. + IPPROTO_TP = 29 // SO Transport Protocol Class 4. + IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol. + IPPROTO_IPV6 = 41 // IPv6 header. + IPPROTO_RSVP = 46 // Reservation Protocol. + IPPROTO_GRE = 47 // General Routing Encapsulation. + IPPROTO_ESP = 50 // encapsulating security payload. + IPPROTO_AH = 51 // authentication header. + IPPROTO_MTP = 92 // Multicast Transport Protocol. + IPPROTO_BEETPH = 94 // IP option pseudo header for BEET. + IPPROTO_ENCAP = 98 // Encapsulation Header. + IPPROTO_PIM = 103 // Protocol Independent Multicast. + IPPROTO_COMP = 108 // Compression Header Protocol. + IPPROTO_SCTP = 132 // Stream Control Transmission Protocol. + IPPROTO_UDPLITE = 136 // UDP-Lite protocol. + IPPROTO_MPLS = 137 // MPLS in IP. + IPPROTO_ETHERNET = 143 // Ethernet-within-IPv6 Encapsulation. + IPPROTO_RAW = 255 // Raw IP packets. + IPPROTO_MPTCP = 262 // Multipath TCP connection. + IPPROTO_MAX = 263 +) + +// Bits in the FLAGS argument to `send', `recv', et al. +const ( /* socket.h:200:1: */ + MSG_OOB = 1 // Process out-of-band data. + MSG_PEEK = 2 // Peek at incoming messages. + MSG_DONTROUTE = 4 // Don't use local routing. + MSG_CTRUNC = 8 // Control data lost before delivery. + MSG_PROXY = 16 // Supply or ask second address. + MSG_TRUNC = 32 + MSG_DONTWAIT = 64 // Nonblocking IO. + MSG_EOR = 128 // End of record. + MSG_WAITALL = 256 // Wait for a full request. + MSG_FIN = 512 + MSG_SYN = 1024 + MSG_CONFIRM = 2048 // Confirm path validity. + MSG_RST = 4096 + MSG_ERRQUEUE = 8192 // Fetch message from error queue. + MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. + MSG_MORE = 32768 // Sender will send more. + MSG_WAITFORONE = 65536 // Wait for at least one packet to return. + MSG_BATCH = 262144 // sendmmsg: more messages coming. + MSG_ZEROCOPY = 67108864 // Use user data in kernel path. + MSG_FASTOPEN = 536870912 // Send data in TCP SYN. + + MSG_CMSG_CLOEXEC = 1073741824 +) + +// Socket level message types. This must match the definitions in +// . +const ( /* socket.h:332:1: */ + SCM_RIGHTS = 1 +) + +// Get the architecture-dependent definition of enum __socket_type. +// Define enum __socket_type for generic Linux. +// Copyright (C) 1991-2021 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 +// . + +// Types of sockets. +const ( /* socket_type.h:24:1: */ + SOCK_STREAM = 1 // Sequenced, reliable, connection-based + // byte streams. + SOCK_DGRAM = 2 // Connectionless, unreliable datagrams + // of fixed maximum length. + SOCK_RAW = 3 // Raw protocol interface. + SOCK_RDM = 4 // Reliably-delivered messages. + SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, + // datagrams of fixed maximum length. + SOCK_DCCP = 6 // Datagram Congestion Control Protocol. + SOCK_PACKET = 10 // Linux specific way of getting packets + // at the dev level. For writing rarp and + // other similar things on the user level. + + // Flags to be ORed into the type parameter of socket and socketpair and + // used for the flags parameter of paccept. + + SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the + // new descriptor(s). + SOCK_NONBLOCK = 2048 +) + +// The following constants should be used for the second parameter of +// `shutdown'. +const ( /* socket.h:41:1: */ + SHUT_RD = 0 // No more receptions. + SHUT_WR = 1 // No more transmissions. + SHUT_RDWR = 2 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1996-2021 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 +// . + +// All data returned by the network data base library are supplied in +// host order and returned in network order (suitable for use in +// system calls). + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Copyright (C) 1991-2021 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-2021 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 +// . + +// Define uintN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ +type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */ +type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */ +type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure for scatter/gather I/O. +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* struct_iovec.h:26:1 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This operating system-specific header file defines the SOCK_*, PF_*, +// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', +// `struct msghdr', and `struct linger' types. +// System-specific socket constants and types. Linux version. +// Copyright (C) 1991-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2021 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2021 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 +// . + +// We don't use `memset' because this would require a prototype and +// the array isn't too big. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// Type for length arguments in socket calls. +type Socklen_t = X__socklen_t /* socket.h:33:21 */ + +// Protocol families. + +// Address families. + +// Socket level values. Others are defined in the appropriate headers. +// +// XXX These definitions also should go into the appropriate headers as +// far as they are available. + +// Maximum queue length specifiable by listen. + +// Get the definition of the macro to define the common sockaddr members. +// Definition of struct sockaddr_* common members and sizes, generic version. +// Copyright (C) 1995-2021 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 +// . + +// Never include this file directly; use instead. + +// POSIX.1g specifies this type name for the `sa_family' member. +type Sa_family_t = uint16 /* sockaddr.h:28:28 */ + +// This macro is used to declare the initial common members +// of the data types used for socket addresses, `struct sockaddr', +// `struct sockaddr_in', `struct sockaddr_un', etc. + +// Size of struct sockaddr_storage. + +// Structure describing a generic socket address. +type Sockaddr = struct { + Fsa_family Sa_family_t + Fsa_data [14]uint8 +} /* socket.h:178:1 */ + +// Structure large enough to hold any socket address (with the historical +// exception of AF_UNIX). + +type Sockaddr_storage = struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 +} /* socket.h:191:1 */ + +// Structure describing messages sent by +// `sendmsg' and received by `recvmsg'. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen Size_t + Fmsg_control uintptr + Fmsg_controllen Size_t + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:257:1 */ + +// Structure used for storage of ancillary data object information. +type Cmsghdr = struct { + F__ccgo_pad1 [0]uint64 + Fcmsg_len Size_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:275:1 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This allows for 1024 file descriptors: if NR_OPEN is ever grown +// beyond that you'll have to change this too. But 1024 fd's seem to be +// enough even for such "real" unices like OSF/1, so hopefully this is +// one limit that doesn't have to be changed [again]. +// +// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in +// (and thus ) - but this is a more logical +// place for them. Solved by having dummy defines in . + +// This macro may have been defined in . But we always +// use the one here. + +type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ + +// Type of a signal handler. +type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ + +// Type of a SYSV IPC key. +type X__kernel_key_t = int32 /* posix_types.h:33:13 */ +type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note +// Copyright (C) 2012 ARM Ltd. +// Copyright (C) 2015 Regents of the University of California + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// There seems to be no way of detecting this automatically from user +// space, so 64 bit architectures should override this in their +// bitsperlong.h. In particular, an architecture that supports +// both 32 and 64 bit user space must not rely on CONFIG_64BIT +// to decide it, but rather check a compiler provided macro. + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. +// +// First the types that are often defined in different ways across +// architectures, so that you can override them. + +type X__kernel_long_t = int64 /* posix_types.h:15:15 */ +type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ + +type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ + +type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ + +type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ + +type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ + +type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ +type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ + +type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ + +type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ + +type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ +type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ + +type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */ +type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */ + +type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */ + +// Most 32 bit architectures use "unsigned int" size_t, +// and all 64 bit architectures use "unsigned long" size_t. +type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ +type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ +type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ + +type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ + +// anything below here should be completely generic +type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ +type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ +type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ +type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ +type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ +type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ +type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ +type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ +type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ +type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ +type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Socket-level I/O control calls. + +// For setsockopt(2) + +// Security levels - as per NRL IPv6 - don't actually do anything + +// Socket filtering + +// Instruct lower device to use last 4-bytes of skb data as FCS + +// on 64-bit and x32, avoid the ?: operator + +// Structure used to manipulate the SO_LINGER option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:361:1 */ + +// This is the 4.3 BSD `struct sockaddr' format, which is used as wire +// format in the grotty old 4.3 `talk' protocol. +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]uint8 +} /* struct_osockaddr.h:6:1 */ + +// Define some macros helping to catch buffer overflows. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Internet address. +type In_addr_t = Uint32_t /* in.h:30:18 */ +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ + +// Get system-specific definitions. +// Copyright (C) 1991-2021 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 +// . + +// Linux version. + +// If the application has already included linux/in6.h from a linux-based +// kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the +// defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo +// in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly. +// Neither the linux kernel nor glibc should break this ABI without coordination. +// In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check +// for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for +// maximum backwards compatibility. + +// Options for use with `getsockopt' and `setsockopt' at the IP level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. +// For BSD compatibility. + +// TProxy original addresses + +// IP_MTU_DISCOVER arguments. +// Always use interface mtu (ignores dst pmtu) but don't set DF flag. +// Also incoming ICMP frag_needed notifications will be ignored on +// this socket to prevent accepting spoofed ones. +// Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented. + +// To select the IP level. + +// Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]uint8 +} /* in.h:143:1 */ + +// Like `struct ip_mreq' but including interface specification by index. +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:150:1 */ + +// Structure used for IP_PKTINFO. +type In_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr In_addr_t } + Fipi_addr struct{ Fs_addr In_addr_t } +} /* in.h:158:1 */ + +// Type to represent a port. +type In_port_t = Uint16_t /* in.h:123:18 */ + +// Definitions of the bits in an Internet address integer. +// +// On subnets, host and network parts are found according to +// the subnet mask, not these masks. + +// Address to accept any incoming messages. +// Address to send to all hosts. +// Address indicating an error return. + +// Network number for local host loopback. +// Address to loopback in software to local host. + +// Defines for Multicast INADDR. + +// IPv6 address +type In6_addr = struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } +} /* in.h:216:1 */ + +// ::1 + +// Structure describing an Internet socket address. +type Sockaddr_in = struct { + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]uint8 +} /* in.h:242:1 */ + +// Ditto, for IPv6. +type Sockaddr_in6 = struct { + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t +} /* in.h:257:1 */ + +// IPv4 multicast request. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:269:1 */ + +type Ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } + Fimr_sourceaddr struct{ Fs_addr In_addr_t } +} /* in.h:278:1 */ + +// Likewise, for IPv6. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:293:1 */ + +// Multicast group request. +type Group_req = struct { + Fgr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } +} /* in.h:305:1 */ + +type Group_source_req = struct { + Fgsr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } +} /* in.h:314:1 */ + +// Full-state filter operations. +type Ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr In_addr_t } + Fimsf_interface struct{ Fs_addr In_addr_t } + Fimsf_fmode Uint32_t + Fimsf_numsrc Uint32_t + Fimsf_slist [1]struct{ Fs_addr In_addr_t } +} /* in.h:328:1 */ + +type Group_filter = struct { + Fgf_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } + Fgf_fmode Uint32_t + Fgf_numsrc Uint32_t + Fgf_slist [1]struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } +} /* in.h:349:1 */ + +// Define uintN_t types. +// Copyright (C) 2017-2021 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 +// . + +// This is necessary to make this include file properly replace the +// Sun version. +// @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC +// Copyright (c) 2010, Oracle America, Inc. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials +// provided with the distribution. +// * Neither the name of the "Oracle America, Inc." nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Cleaned up for GNU C library roland@gnu.ai.mit.edu: +// added multiple inclusion protection and use of . +// In GNU this file is #include'd by . + +// Copyright (C) 1991-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +type Rpcent = struct { + Fr_name uintptr + Fr_aliases uintptr + Fr_number int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:46:1 */ + +// Copyright (C) 1996-2021 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 +// . + +// Description of data base entry for a single network. NOTE: here a +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. +type Netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net Uint32_t +} /* netdb.h:26:1 */ + +// Description of data base entry for a single host. +type Hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:98:1 */ + +// Description of data base entry for a single service. +type Servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr +} /* netdb.h:255:1 */ + +// Description of data base entry for a single service. +type Protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:324:1 */ + +// Extension from POSIX.1:2001. +// Structure to contain information about address of a service provider. +type Addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen Socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:565:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/capi_linux_riscv64.go b/vendor/modernc.org/libc/netinet/in/capi_linux_riscv64.go new file mode 100644 index 00000000..3302f699 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_linux_riscv64.go -pkgname in', DO NOT EDIT. + +package in + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go b/vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go new file mode 100644 index 00000000..96c3ccf1 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go @@ -0,0 +1,2990 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_linux_riscv64.go -pkgname in', DO NOT EDIT. + +package in + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_ALG = 38 + AF_APPLETALK = 5 + AF_ASH = 18 + AF_ATMPVC = 8 + AF_ATMSVC = 20 + AF_AX25 = 3 + AF_BLUETOOTH = 31 + AF_BRIDGE = 7 + AF_CAIF = 37 + AF_CAN = 29 + AF_DECnet = 12 + AF_ECONET = 19 + AF_FILE = 1 + AF_IB = 27 + AF_IEEE802154 = 36 + AF_INET = 2 + AF_INET6 = 10 + AF_IPX = 4 + AF_IRDA = 23 + AF_ISDN = 34 + AF_IUCV = 32 + AF_KCM = 41 + AF_KEY = 15 + AF_LLC = 26 + AF_LOCAL = 1 + AF_MAX = 45 + AF_MPLS = 28 + AF_NETBEUI = 13 + AF_NETLINK = 16 + AF_NETROM = 6 + AF_NFC = 39 + AF_PACKET = 17 + AF_PHONET = 35 + AF_PPPOX = 24 + AF_QIPCRTR = 42 + AF_RDS = 21 + AF_ROSE = 11 + AF_ROUTE = 16 + AF_RXRPC = 33 + AF_SECURITY = 14 + AF_SMC = 43 + AF_SNA = 22 + AF_TIPC = 30 + AF_UNIX = 1 + AF_UNSPEC = 0 + AF_VSOCK = 40 + AF_WANPIPE = 25 + AF_X25 = 9 + AF_XDP = 44 + BIG_ENDIAN = 4321 + BYTE_ORDER = 1234 + FD_SETSIZE = 1024 + FIOGETOWN = 0x8903 + FIOSETOWN = 0x8901 + INET6_ADDRSTRLEN = 46 + INET_ADDRSTRLEN = 16 + IN_CLASSA_HOST = 16777215 + IN_CLASSA_MAX = 128 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 24 + IN_CLASSB_HOST = 65535 + IN_CLASSB_MAX = 65536 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 16 + IN_CLASSC_HOST = 255 + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 8 + IN_LOOPBACKNET = 127 + IPV6_2292DSTOPTS = 4 + IPV6_2292HOPLIMIT = 8 + IPV6_2292HOPOPTS = 3 + IPV6_2292PKTINFO = 2 + IPV6_2292PKTOPTIONS = 6 + IPV6_2292RTHDR = 5 + IPV6_ADDRFORM = 1 + IPV6_ADDR_PREFERENCES = 72 + IPV6_ADD_MEMBERSHIP = 20 + IPV6_AUTHHDR = 10 + IPV6_AUTOFLOWLABEL = 70 + IPV6_CHECKSUM = 7 + IPV6_DONTFRAG = 62 + IPV6_DROP_MEMBERSHIP = 21 + IPV6_DSTOPTS = 59 + IPV6_FREEBIND = 78 + IPV6_HDRINCL = 36 + IPV6_HOPLIMIT = 52 + IPV6_HOPOPTS = 54 + IPV6_IPSEC_POLICY = 34 + IPV6_JOIN_ANYCAST = 27 + IPV6_JOIN_GROUP = 20 + IPV6_LEAVE_ANYCAST = 28 + IPV6_LEAVE_GROUP = 21 + IPV6_MINHOPCOUNT = 73 + IPV6_MTU = 24 + IPV6_MTU_DISCOVER = 23 + IPV6_MULTICAST_ALL = 29 + IPV6_MULTICAST_HOPS = 18 + IPV6_MULTICAST_IF = 17 + IPV6_MULTICAST_LOOP = 19 + IPV6_NEXTHOP = 9 + IPV6_ORIGDSTADDR = 74 + IPV6_PATHMTU = 61 + IPV6_PKTINFO = 50 + IPV6_PMTUDISC_DO = 2 + IPV6_PMTUDISC_DONT = 0 + IPV6_PMTUDISC_INTERFACE = 4 + IPV6_PMTUDISC_OMIT = 5 + IPV6_PMTUDISC_PROBE = 3 + IPV6_PMTUDISC_WANT = 1 + IPV6_RECVDSTOPTS = 58 + IPV6_RECVERR = 25 + IPV6_RECVERR_RFC4884 = 31 + IPV6_RECVFRAGSIZE = 77 + IPV6_RECVHOPLIMIT = 51 + IPV6_RECVHOPOPTS = 53 + IPV6_RECVORIGDSTADDR = 74 + IPV6_RECVPATHMTU = 60 + IPV6_RECVPKTINFO = 49 + IPV6_RECVRTHDR = 56 + IPV6_RECVTCLASS = 66 + IPV6_ROUTER_ALERT = 22 + IPV6_ROUTER_ALERT_ISOLATE = 30 + IPV6_RTHDR = 57 + IPV6_RTHDRDSTOPTS = 55 + IPV6_RTHDR_LOOSE = 0 + IPV6_RTHDR_STRICT = 1 + IPV6_RTHDR_TYPE_0 = 0 + IPV6_RXDSTOPTS = 59 + IPV6_RXHOPOPTS = 54 + IPV6_TCLASS = 67 + IPV6_TRANSPARENT = 75 + IPV6_UNICAST_HOPS = 16 + IPV6_UNICAST_IF = 76 + IPV6_V6ONLY = 26 + IPV6_XFRM_POLICY = 35 + IP_ADD_MEMBERSHIP = 35 + IP_ADD_SOURCE_MEMBERSHIP = 39 + IP_BIND_ADDRESS_NO_PORT = 24 + IP_BLOCK_SOURCE = 38 + IP_CHECKSUM = 23 + IP_DEFAULT_MULTICAST_LOOP = 1 + IP_DEFAULT_MULTICAST_TTL = 1 + IP_DROP_MEMBERSHIP = 36 + IP_DROP_SOURCE_MEMBERSHIP = 40 + IP_FREEBIND = 15 + IP_HDRINCL = 3 + IP_IPSEC_POLICY = 16 + IP_MAX_MEMBERSHIPS = 20 + IP_MINTTL = 21 + IP_MSFILTER = 41 + IP_MTU = 14 + IP_MTU_DISCOVER = 10 + IP_MULTICAST_ALL = 49 + IP_MULTICAST_IF = 32 + IP_MULTICAST_LOOP = 34 + IP_MULTICAST_TTL = 33 + IP_NODEFRAG = 22 + IP_OPTIONS = 4 + IP_ORIGDSTADDR = 20 + IP_PASSSEC = 18 + IP_PKTINFO = 8 + IP_PKTOPTIONS = 9 + IP_PMTUDISC = 10 + IP_PMTUDISC_DO = 2 + IP_PMTUDISC_DONT = 0 + IP_PMTUDISC_INTERFACE = 4 + IP_PMTUDISC_OMIT = 5 + IP_PMTUDISC_PROBE = 3 + IP_PMTUDISC_WANT = 1 + IP_RECVERR = 11 + IP_RECVERR_RFC4884 = 26 + IP_RECVFRAGSIZE = 25 + IP_RECVOPTS = 6 + IP_RECVORIGDSTADDR = 20 + IP_RECVRETOPTS = 7 + IP_RECVTOS = 13 + IP_RECVTTL = 12 + IP_RETOPTS = 7 + IP_ROUTER_ALERT = 5 + IP_TOS = 1 + IP_TRANSPARENT = 19 + IP_TTL = 2 + IP_UNBLOCK_SOURCE = 37 + IP_UNICAST_IF = 50 + IP_XFRM_POLICY = 17 + LITTLE_ENDIAN = 1234 + MCAST_BLOCK_SOURCE = 43 + MCAST_EXCLUDE = 0 + MCAST_INCLUDE = 1 + MCAST_JOIN_GROUP = 42 + MCAST_JOIN_SOURCE_GROUP = 46 + MCAST_LEAVE_GROUP = 45 + MCAST_LEAVE_SOURCE_GROUP = 47 + MCAST_MSFILTER = 48 + MCAST_UNBLOCK_SOURCE = 44 + PDP_ENDIAN = 3412 + PF_ALG = 38 + PF_APPLETALK = 5 + PF_ASH = 18 + PF_ATMPVC = 8 + PF_ATMSVC = 20 + PF_AX25 = 3 + PF_BLUETOOTH = 31 + PF_BRIDGE = 7 + PF_CAIF = 37 + PF_CAN = 29 + PF_DECnet = 12 + PF_ECONET = 19 + PF_FILE = 1 + PF_IB = 27 + PF_IEEE802154 = 36 + PF_INET = 2 + PF_INET6 = 10 + PF_IPX = 4 + PF_IRDA = 23 + PF_ISDN = 34 + PF_IUCV = 32 + PF_KCM = 41 + PF_KEY = 15 + PF_LLC = 26 + PF_LOCAL = 1 + PF_MAX = 45 + PF_MPLS = 28 + PF_NETBEUI = 13 + PF_NETLINK = 16 + PF_NETROM = 6 + PF_NFC = 39 + PF_PACKET = 17 + PF_PHONET = 35 + PF_PPPOX = 24 + PF_QIPCRTR = 42 + PF_RDS = 21 + PF_ROSE = 11 + PF_ROUTE = 16 + PF_RXRPC = 33 + PF_SECURITY = 14 + PF_SMC = 43 + PF_SNA = 22 + PF_TIPC = 30 + PF_UNIX = 1 + PF_UNSPEC = 0 + PF_VSOCK = 40 + PF_WANPIPE = 25 + PF_X25 = 9 + PF_XDP = 44 + SCM_TIMESTAMP = 29 + SCM_TIMESTAMPING = 37 + SCM_TIMESTAMPING_OPT_STATS = 54 + SCM_TIMESTAMPING_PKTINFO = 58 + SCM_TIMESTAMPNS = 35 + SCM_TXTIME = 61 + SCM_WIFI_STATUS = 41 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_OLD = 0x8907 + SIOCGSTAMP_OLD = 0x8906 + SIOCSPGRP = 0x8902 + SOL_AAL = 265 + SOL_ALG = 279 + SOL_ATM = 264 + SOL_BLUETOOTH = 274 + SOL_CAIF = 278 + SOL_DCCP = 269 + SOL_DECNET = 261 + SOL_ICMPV6 = 58 + SOL_IP = 0 + SOL_IPV6 = 41 + SOL_IRDA = 266 + SOL_IUCV = 277 + SOL_KCM = 281 + SOL_LLC = 268 + SOL_NETBEUI = 267 + SOL_NETLINK = 270 + SOL_NFC = 280 + SOL_PACKET = 263 + SOL_PNPIPE = 275 + SOL_PPPOL2TP = 273 + SOL_RAW = 255 + SOL_RDS = 276 + SOL_RXRPC = 272 + SOL_SOCKET = 1 + SOL_TIPC = 271 + SOL_TLS = 282 + SOL_X25 = 262 + SOL_XDP = 283 + SOMAXCONN = 4096 + SO_ACCEPTCONN = 30 + SO_ATTACH_BPF = 50 + SO_ATTACH_FILTER = 26 + SO_ATTACH_REUSEPORT_CBPF = 51 + SO_ATTACH_REUSEPORT_EBPF = 52 + SO_BINDTODEVICE = 25 + SO_BINDTOIFINDEX = 62 + SO_BPF_EXTENSIONS = 48 + SO_BROADCAST = 6 + SO_BSDCOMPAT = 14 + SO_BUSY_POLL = 46 + SO_BUSY_POLL_BUDGET = 70 + SO_CNX_ADVICE = 53 + SO_COOKIE = 57 + SO_DEBUG = 1 + SO_DETACH_BPF = 27 + SO_DETACH_FILTER = 27 + SO_DETACH_REUSEPORT_BPF = 68 + SO_DOMAIN = 39 + SO_DONTROUTE = 5 + SO_ERROR = 4 + SO_GET_FILTER = 26 + SO_INCOMING_CPU = 49 + SO_INCOMING_NAPI_ID = 56 + SO_KEEPALIVE = 9 + SO_LINGER = 13 + SO_LOCK_FILTER = 44 + SO_MARK = 36 + SO_MAX_PACING_RATE = 47 + SO_MEMINFO = 55 + SO_NETNS_COOKIE = 71 + SO_NOFCS = 43 + SO_NO_CHECK = 11 + SO_OOBINLINE = 10 + SO_PASSCRED = 16 + SO_PASSSEC = 34 + SO_PEEK_OFF = 42 + SO_PEERCRED = 17 + SO_PEERGROUPS = 59 + SO_PEERNAME = 28 + SO_PEERSEC = 31 + SO_PREFER_BUSY_POLL = 69 + SO_PRIORITY = 12 + SO_PROTOCOL = 38 + SO_RCVBUF = 8 + SO_RCVBUFFORCE = 33 + SO_RCVLOWAT = 18 + SO_RCVTIMEO = 20 + SO_RCVTIMEO_NEW = 66 + SO_RCVTIMEO_OLD = 20 + SO_REUSEADDR = 2 + SO_REUSEPORT = 15 + SO_RXQ_OVFL = 40 + SO_SECURITY_AUTHENTICATION = 22 + SO_SECURITY_ENCRYPTION_NETWORK = 24 + SO_SECURITY_ENCRYPTION_TRANSPORT = 23 + SO_SELECT_ERR_QUEUE = 45 + SO_SNDBUF = 7 + SO_SNDBUFFORCE = 32 + SO_SNDLOWAT = 19 + SO_SNDTIMEO = 21 + SO_SNDTIMEO_NEW = 67 + SO_SNDTIMEO_OLD = 21 + SO_TIMESTAMP = 29 + SO_TIMESTAMPING = 37 + SO_TIMESTAMPING_NEW = 65 + SO_TIMESTAMPING_OLD = 37 + SO_TIMESTAMPNS = 35 + SO_TIMESTAMPNS_NEW = 64 + SO_TIMESTAMPNS_OLD = 35 + SO_TIMESTAMP_NEW = 63 + SO_TIMESTAMP_OLD = 29 + SO_TXTIME = 61 + SO_TYPE = 3 + SO_WIFI_STATUS = 41 + SO_ZEROCOPY = 60 + X_ASM_RISCV_BITSPERLONG_H = 0 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_SOCKADDR_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_STDINT_UINTN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_ENDIAN_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LINUX_POSIX_TYPES_H = 0 + X_LP64 = 1 + X_NETINET_IN_H = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_SS_SIZE = 128 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_SOCKET_H = 1 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. +const ( /* in.h:103:1: */ + IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. + IPPROTO_ROUTING = 43 // IPv6 routing header. + IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header. + IPPROTO_ICMPV6 = 58 // ICMPv6. + IPPROTO_NONE = 59 // IPv6 no next header. + IPPROTO_DSTOPTS = 60 // IPv6 destination options. + IPPROTO_MH = 135 +) + +// Standard well-known ports. +const ( /* in.h:126:1: */ + IPPORT_ECHO = 7 // Echo service. + IPPORT_DISCARD = 9 // Discard transmissions service. + IPPORT_SYSTAT = 11 // System status service. + IPPORT_DAYTIME = 13 // Time of day service. + IPPORT_NETSTAT = 15 // Network status service. + IPPORT_FTP = 21 // File Transfer Protocol. + IPPORT_TELNET = 23 // Telnet protocol. + IPPORT_SMTP = 25 // Simple Mail Transfer Protocol. + IPPORT_TIMESERVER = 37 // Timeserver service. + IPPORT_NAMESERVER = 42 // Domain Name Service. + IPPORT_WHOIS = 43 // Internet Whois service. + IPPORT_MTP = 57 + + IPPORT_TFTP = 69 // Trivial File Transfer Protocol. + IPPORT_RJE = 77 + IPPORT_FINGER = 79 // Finger service. + IPPORT_TTYLINK = 87 + IPPORT_SUPDUP = 95 // SUPDUP protocol. + + IPPORT_EXECSERVER = 512 // execd service. + IPPORT_LOGINSERVER = 513 // rlogind service. + IPPORT_CMDSERVER = 514 + IPPORT_EFSSERVER = 520 + + // UDP ports. + IPPORT_BIFFUDP = 512 + IPPORT_WHOSERVER = 513 + IPPORT_ROUTESERVER = 520 + + // Ports less than this value are reserved for privileged processes. + IPPORT_RESERVED = 1024 + + // Ports greater this value are reserved for (non-privileged) servers. + IPPORT_USERRESERVED = 5000 +) + +// Options for use with `getsockopt' and `setsockopt' at the IPv6 level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. + +// Advanced API (RFC3542) (1). + +// Advanced API (RFC3542) (2). + +// RFC5014. + +// RFC5082. + +// Obsolete synonyms for the above. + +// IPV6_MTU_DISCOVER values. + +// Socket level values for IPv6. + +// Routing header options for IPv6. + +// Standard well-defined IP protocols. +const ( /* in.h:40:1: */ + IPPROTO_IP = 0 // Dummy protocol for TCP. + IPPROTO_ICMP = 1 // Internet Control Message Protocol. + IPPROTO_IGMP = 2 // Internet Group Management Protocol. + IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94). + IPPROTO_TCP = 6 // Transmission Control Protocol. + IPPROTO_EGP = 8 // Exterior Gateway Protocol. + IPPROTO_PUP = 12 // PUP protocol. + IPPROTO_UDP = 17 // User Datagram Protocol. + IPPROTO_IDP = 22 // XNS IDP protocol. + IPPROTO_TP = 29 // SO Transport Protocol Class 4. + IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol. + IPPROTO_IPV6 = 41 // IPv6 header. + IPPROTO_RSVP = 46 // Reservation Protocol. + IPPROTO_GRE = 47 // General Routing Encapsulation. + IPPROTO_ESP = 50 // encapsulating security payload. + IPPROTO_AH = 51 // authentication header. + IPPROTO_MTP = 92 // Multicast Transport Protocol. + IPPROTO_BEETPH = 94 // IP option pseudo header for BEET. + IPPROTO_ENCAP = 98 // Encapsulation Header. + IPPROTO_PIM = 103 // Protocol Independent Multicast. + IPPROTO_COMP = 108 // Compression Header Protocol. + IPPROTO_SCTP = 132 // Stream Control Transmission Protocol. + IPPROTO_UDPLITE = 136 // UDP-Lite protocol. + IPPROTO_MPLS = 137 // MPLS in IP. + IPPROTO_ETHERNET = 143 // Ethernet-within-IPv6 Encapsulation. + IPPROTO_RAW = 255 // Raw IP packets. + IPPROTO_MPTCP = 262 // Multipath TCP connection. + IPPROTO_MAX = 263 +) + +// Bits in the FLAGS argument to `send', `recv', et al. +const ( /* socket.h:200:1: */ + MSG_OOB = 1 // Process out-of-band data. + MSG_PEEK = 2 // Peek at incoming messages. + MSG_DONTROUTE = 4 // Don't use local routing. + MSG_CTRUNC = 8 // Control data lost before delivery. + MSG_PROXY = 16 // Supply or ask second address. + MSG_TRUNC = 32 + MSG_DONTWAIT = 64 // Nonblocking IO. + MSG_EOR = 128 // End of record. + MSG_WAITALL = 256 // Wait for a full request. + MSG_FIN = 512 + MSG_SYN = 1024 + MSG_CONFIRM = 2048 // Confirm path validity. + MSG_RST = 4096 + MSG_ERRQUEUE = 8192 // Fetch message from error queue. + MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. + MSG_MORE = 32768 // Sender will send more. + MSG_WAITFORONE = 65536 // Wait for at least one packet to return. + MSG_BATCH = 262144 // sendmmsg: more messages coming. + MSG_ZEROCOPY = 67108864 // Use user data in kernel path. + MSG_FASTOPEN = 536870912 // Send data in TCP SYN. + + MSG_CMSG_CLOEXEC = 1073741824 +) + +// Socket level message types. This must match the definitions in +// . +const ( /* socket.h:332:1: */ + SCM_RIGHTS = 1 +) + +// Get the architecture-dependent definition of enum __socket_type. +// Define enum __socket_type for generic Linux. +// Copyright (C) 1991-2021 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 +// . + +// Types of sockets. +const ( /* socket_type.h:24:1: */ + SOCK_STREAM = 1 // Sequenced, reliable, connection-based + // byte streams. + SOCK_DGRAM = 2 // Connectionless, unreliable datagrams + // of fixed maximum length. + SOCK_RAW = 3 // Raw protocol interface. + SOCK_RDM = 4 // Reliably-delivered messages. + SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, + // datagrams of fixed maximum length. + SOCK_DCCP = 6 // Datagram Congestion Control Protocol. + SOCK_PACKET = 10 // Linux specific way of getting packets + // at the dev level. For writing rarp and + // other similar things on the user level. + + // Flags to be ORed into the type parameter of socket and socketpair and + // used for the flags parameter of paccept. + + SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the + // new descriptor(s). + SOCK_NONBLOCK = 2048 +) + +// The following constants should be used for the second parameter of +// `shutdown'. +const ( /* socket.h:41:1: */ + SHUT_RD = 0 // No more receptions. + SHUT_WR = 1 // No more transmissions. + SHUT_RDWR = 2 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Define uintN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ +type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */ +type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */ +type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure for scatter/gather I/O. +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* struct_iovec.h:26:1 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This operating system-specific header file defines the SOCK_*, PF_*, +// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', +// `struct msghdr', and `struct linger' types. +// System-specific socket constants and types. Linux version. +// Copyright (C) 1991-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2021 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2021 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 +// . + +// We don't use `memset' because this would require a prototype and +// the array isn't too big. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// Type for length arguments in socket calls. +type Socklen_t = X__socklen_t /* socket.h:33:21 */ + +// Protocol families. + +// Address families. + +// Socket level values. Others are defined in the appropriate headers. +// +// XXX These definitions also should go into the appropriate headers as +// far as they are available. + +// Maximum queue length specifiable by listen. + +// Get the definition of the macro to define the common sockaddr members. +// Definition of struct sockaddr_* common members and sizes, generic version. +// Copyright (C) 1995-2021 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 +// . + +// Never include this file directly; use instead. + +// POSIX.1g specifies this type name for the `sa_family' member. +type Sa_family_t = uint16 /* sockaddr.h:28:28 */ + +// This macro is used to declare the initial common members +// of the data types used for socket addresses, `struct sockaddr', +// `struct sockaddr_in', `struct sockaddr_un', etc. + +// Size of struct sockaddr_storage. + +// Structure describing a generic socket address. +type Sockaddr = struct { + Fsa_family Sa_family_t + Fsa_data [14]uint8 +} /* socket.h:178:1 */ + +// Structure large enough to hold any socket address (with the historical +// exception of AF_UNIX). + +type Sockaddr_storage = struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 +} /* socket.h:191:1 */ + +// Structure describing messages sent by +// `sendmsg' and received by `recvmsg'. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen Size_t + Fmsg_control uintptr + Fmsg_controllen Size_t + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:257:1 */ + +// Structure used for storage of ancillary data object information. +type Cmsghdr = struct { + F__ccgo_pad1 [0]uint64 + Fcmsg_len Size_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:275:1 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This allows for 1024 file descriptors: if NR_OPEN is ever grown +// beyond that you'll have to change this too. But 1024 fd's seem to be +// enough even for such "real" unices like OSF/1, so hopefully this is +// one limit that doesn't have to be changed [again]. +// +// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in +// (and thus ) - but this is a more logical +// place for them. Solved by having dummy defines in . + +// This macro may have been defined in . But we always +// use the one here. + +type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ + +// Type of a signal handler. +type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ + +// Type of a SYSV IPC key. +type X__kernel_key_t = int32 /* posix_types.h:33:13 */ +type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note +// Copyright (C) 2012 ARM Ltd. +// Copyright (C) 2015 Regents of the University of California + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// There seems to be no way of detecting this automatically from user +// space, so 64 bit architectures should override this in their +// bitsperlong.h. In particular, an architecture that supports +// both 32 and 64 bit user space must not rely on CONFIG_64BIT +// to decide it, but rather check a compiler provided macro. + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. +// +// First the types that are often defined in different ways across +// architectures, so that you can override them. + +type X__kernel_long_t = int64 /* posix_types.h:15:15 */ +type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ + +type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ + +type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ + +type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ + +type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ + +type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ +type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ + +type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ + +type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ + +type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ +type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ + +type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */ +type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */ + +type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */ + +// Most 32 bit architectures use "unsigned int" size_t, +// and all 64 bit architectures use "unsigned long" size_t. +type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ +type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ +type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ + +type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ + +// anything below here should be completely generic +type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ +type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ +type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ +type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ +type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ +type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ +type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ +type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ +type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ +type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ +type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Socket-level I/O control calls. + +// For setsockopt(2) + +// Security levels - as per NRL IPv6 - don't actually do anything + +// Socket filtering + +// Instruct lower device to use last 4-bytes of skb data as FCS + +// on 64-bit and x32, avoid the ?: operator + +// Structure used to manipulate the SO_LINGER option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:361:1 */ + +// This is the 4.3 BSD `struct sockaddr' format, which is used as wire +// format in the grotty old 4.3 `talk' protocol. +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]uint8 +} /* struct_osockaddr.h:6:1 */ + +// Define some macros helping to catch buffer overflows. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Internet address. +type In_addr_t = Uint32_t /* in.h:30:18 */ +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ + +// Get system-specific definitions. +// Copyright (C) 1991-2021 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 +// . + +// Linux version. + +// If the application has already included linux/in6.h from a linux-based +// kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the +// defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo +// in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly. +// Neither the linux kernel nor glibc should break this ABI without coordination. +// In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check +// for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for +// maximum backwards compatibility. + +// Options for use with `getsockopt' and `setsockopt' at the IP level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. +// For BSD compatibility. + +// TProxy original addresses + +// IP_MTU_DISCOVER arguments. +// Always use interface mtu (ignores dst pmtu) but don't set DF flag. +// Also incoming ICMP frag_needed notifications will be ignored on +// this socket to prevent accepting spoofed ones. +// Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented. + +// To select the IP level. + +// Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]uint8 +} /* in.h:143:1 */ + +// Like `struct ip_mreq' but including interface specification by index. +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:150:1 */ + +// Structure used for IP_PKTINFO. +type In_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr In_addr_t } + Fipi_addr struct{ Fs_addr In_addr_t } +} /* in.h:158:1 */ + +// Type to represent a port. +type In_port_t = Uint16_t /* in.h:123:18 */ + +// Definitions of the bits in an Internet address integer. +// +// On subnets, host and network parts are found according to +// the subnet mask, not these masks. + +// Address to accept any incoming messages. +// Address to send to all hosts. +// Address indicating an error return. + +// Network number for local host loopback. +// Address to loopback in software to local host. + +// Defines for Multicast INADDR. + +// IPv6 address +type In6_addr = struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } +} /* in.h:216:1 */ + +// ::1 + +// Structure describing an Internet socket address. +type Sockaddr_in = struct { + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]uint8 +} /* in.h:242:1 */ + +// Ditto, for IPv6. +type Sockaddr_in6 = struct { + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t +} /* in.h:257:1 */ + +// IPv4 multicast request. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:269:1 */ + +type Ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } + Fimr_sourceaddr struct{ Fs_addr In_addr_t } +} /* in.h:278:1 */ + +// Likewise, for IPv6. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:293:1 */ + +// Multicast group request. +type Group_req = struct { + Fgr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } +} /* in.h:305:1 */ + +type Group_source_req = struct { + Fgsr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } +} /* in.h:314:1 */ + +// Full-state filter operations. +type Ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr In_addr_t } + Fimsf_interface struct{ Fs_addr In_addr_t } + Fimsf_fmode Uint32_t + Fimsf_numsrc Uint32_t + Fimsf_slist [1]struct{ Fs_addr In_addr_t } +} /* in.h:328:1 */ + +type Group_filter = struct { + Fgf_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } + Fgf_fmode Uint32_t + Fgf_numsrc Uint32_t + Fgf_slist [1]struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 + } +} /* in.h:349:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/capi_linux_riscv64.go b/vendor/modernc.org/libc/poll/capi_linux_riscv64.go new file mode 100644 index 00000000..529a2c83 --- /dev/null +++ b/vendor/modernc.org/libc/poll/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o poll/poll_linux_riscv64.go -pkgname poll', DO NOT EDIT. + +package poll + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/poll/poll_linux_riscv64.go b/vendor/modernc.org/libc/poll/poll_linux_riscv64.go new file mode 100644 index 00000000..6fbc0695 --- /dev/null +++ b/vendor/modernc.org/libc/poll/poll_linux_riscv64.go @@ -0,0 +1,677 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o poll/poll_linux_riscv64.go -pkgname poll', DO NOT EDIT. + +package poll + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + POLLERR = 0x008 + POLLHUP = 0x010 + POLLIN = 0x001 + POLLNVAL = 0x020 + POLLOUT = 0x004 + POLLPRI = 0x002 + POLLRDBAND = 0x080 + POLLRDNORM = 0x040 + POLLWRBAND = 0x200 + POLLWRNORM = 0x100 + X_ATFILE_SOURCE = 1 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + X_SYS_POLL_H = 1 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Compatibility definitions for System V `poll' interface. +// Copyright (C) 1994-2021 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-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Get the platform dependent bits of `poll'. +// Copyright (C) 1997-2021 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 +// . + +// Event types that can be polled for. These bits may be set in `events' +// to indicate the interesting event types; they will appear in `revents' +// to indicate the status of the file descriptor. + +// These values are defined in XPG4.2. + +// Event types always implicitly polled for. These bits need not be set in +// `events', but they will appear in `revents' to indicate the status of +// the file descriptor. + +// Type used for the number of file descriptors. +type Nfds_t = uint64 /* poll.h:33:27 */ + +// Data structure describing a polling request. +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:36:1 */ + +// Define some inlines helping to catch common problems. + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/capi_linux_riscv64.go b/vendor/modernc.org/libc/pthread/capi_linux_riscv64.go new file mode 100644 index 00000000..84fa5dd9 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pthread/pthread_linux_riscv64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go b/vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go new file mode 100644 index 00000000..82d95faa --- /dev/null +++ b/vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go @@ -0,0 +1,2201 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pthread/pthread_linux_riscv64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLOCK_BOOTTIME = 7 + CLOCK_BOOTTIME_ALARM = 9 + CLOCK_MONOTONIC = 1 + CLOCK_MONOTONIC_COARSE = 6 + CLOCK_MONOTONIC_RAW = 4 + CLOCK_PROCESS_CPUTIME_ID = 2 + CLOCK_REALTIME = 0 + CLOCK_REALTIME_ALARM = 8 + CLOCK_REALTIME_COARSE = 5 + CLOCK_TAI = 11 + CLOCK_THREAD_CPUTIME_ID = 3 + PTHREAD_BARRIER_SERIAL_THREAD = -1 + PTHREAD_ONCE_INIT = 0 + PTHREAD_STACK_MIN = 16384 + SCHED_FIFO = 1 + SCHED_OTHER = 0 + SCHED_RR = 2 + TIMER_ABSTIME = 1 + TIME_UTC = 1 + X_ATFILE_SOURCE = 1 + X_BITS_CPU_SET_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_SCHED_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TIME_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_TYPES_LOCALE_T_H = 1 + X_BITS_TYPES_STRUCT_SCHED_PARAM = 1 + X_BITS_TYPES___LOCALE_T_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_PTHREAD_H = 1 + X_RISCV_BITS_SETJMP_H = 0 + X_RWLOCK_INTERNAL_H = 0 + X_SCHED_H = 1 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SIZE_T_H = 0 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_TIME_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +// Read-write lock types. +const ( /* pthread.h:104:1: */ + PTHREAD_RWLOCK_PREFER_READER_NP = 0 + PTHREAD_RWLOCK_PREFER_WRITER_NP = 1 + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP = 2 + PTHREAD_RWLOCK_DEFAULT_NP = 0 +) + +// Read-write lock initializers. + +// Scheduler inheritance. +const ( /* pthread.h:124:1: */ + PTHREAD_INHERIT_SCHED = 0 + PTHREAD_EXPLICIT_SCHED = 1 +) + +// Scope handling. +const ( /* pthread.h:134:1: */ + PTHREAD_SCOPE_SYSTEM = 0 + PTHREAD_SCOPE_PROCESS = 1 +) + +// Process shared or private flag. +const ( /* pthread.h:144:1: */ + PTHREAD_PROCESS_PRIVATE = 0 + PTHREAD_PROCESS_SHARED = 1 +) + +// Cancellation +const ( /* pthread.h:168:1: */ + PTHREAD_CANCEL_ENABLE = 0 + PTHREAD_CANCEL_DISABLE = 1 +) +const ( /* pthread.h:175:1: */ + PTHREAD_CANCEL_DEFERRED = 0 + PTHREAD_CANCEL_ASYNCHRONOUS = 1 +) + +// Definition of PTHREAD_STACK_MIN, possibly dynamic. +// Copyright (C) 2021 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 +// . + +// Definition of PTHREAD_STACK_MIN. Linux version. +// Copyright (C) 2021 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 +// . + +// Minimum size for a thread. We are free to choose a reasonable value. + +// Detach state. +const ( /* pthread.h:37:1: */ + PTHREAD_CREATE_JOINABLE = 0 + PTHREAD_CREATE_DETACHED = 1 +) + +// Mutex types. +const ( /* pthread.h:47:1: */ + PTHREAD_MUTEX_TIMED_NP = 0 + PTHREAD_MUTEX_RECURSIVE_NP = 1 + PTHREAD_MUTEX_ERRORCHECK_NP = 2 + PTHREAD_MUTEX_ADAPTIVE_NP = 3 + PTHREAD_MUTEX_NORMAL = 0 + PTHREAD_MUTEX_RECURSIVE = 1 + PTHREAD_MUTEX_ERRORCHECK = 2 + PTHREAD_MUTEX_DEFAULT = 0 +) + +// Robust mutex or not flags. +const ( /* pthread.h:69:1: */ + PTHREAD_MUTEX_STALLED = 0 + PTHREAD_MUTEX_STALLED_NP = 0 + PTHREAD_MUTEX_ROBUST = 1 + PTHREAD_MUTEX_ROBUST_NP = 1 +) + +// Mutex protocols. +const ( /* pthread.h:81:1: */ + PTHREAD_PRIO_NONE = 0 + PTHREAD_PRIO_INHERIT = 1 + PTHREAD_PRIO_PROTECT = 2 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 2002-2021 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-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. +// Copyright (C) 1996-2021 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-2021 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 +// . + +// Get type definitions. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// RISC-V is little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +type Pid_t = X__pid_t /* sched.h:38:17 */ + +// Get system specific constant and data structure definitions. +// Definitions of constants and data structure for POSIX 1003.1b-1993 +// scheduling interface. +// Copyright (C) 1996-2021 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 +// . + +// Scheduling algorithms. + +// Sched parameter structure. Generic version. +// Copyright (C) 1996-2021 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 +// . + +// Data structure to describe a process' schedulability. +type Sched_param = struct{ Fsched_priority int32 } /* struct_sched_param.h:23:1 */ + +// Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 +// scheduling interface. +// Copyright (C) 1996-2021 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 +// . + +// Size definition for CPU sets. + +// Type for array elements in 'cpu_set_t'. +type X__cpu_mask = uint64 /* cpu-set.h:32:25 */ + +// Basic access functions. + +// Data structure to describe CPU mask. +type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */ + +// Copyright (C) 1991-2021 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 +// . + +// ISO C99 Standard: 7.23 Date and time + +// Copyright (C) 1991-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This defines CLOCKS_PER_SEC, which is the number of processor clock +// ticks per second, and possibly a number of other constants. +// System-dependent timing definitions. Linux version. +// Copyright (C) 1996-2021 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 +// . + +// Never include this file directly; use instead. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// ISO/IEC 9899:1999 7.23.1: Components of time +// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +// the number per second of the value returned by the `clock' function. +// CAE XSH, Issue 4, Version 2: +// The value of CLOCKS_PER_SEC is required to be 1 million on all +// XSI-conformant systems. + +// Identifier for system-wide realtime clock. +// Monotonic system-wide clock. +// High-resolution timer from the CPU. +// Thread-specific CPU-time clock. +// Monotonic system-wide clock, not adjusted for frequency scaling. +// Identifier for system-wide realtime clock, updated only on ticks. +// Monotonic system-wide clock, updated only on ticks. +// Monotonic system-wide clock that includes time spent in suspension. +// Like CLOCK_REALTIME but also wakes suspended system. +// Like CLOCK_BOOTTIME but also wakes suspended system. +// Like CLOCK_REALTIME but in International Atomic Time. + +// Flag to indicate time is absolute. + +// Many of the typedefs and structs whose official home is this header +// may also need to be defined by other headers. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// ISO C `broken-down time' structure. +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* struct_tm.h:7:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// NB: Include guard matches what uses. + +// POSIX.1b structure for timer start values and intervals. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } +} /* struct_itimerspec.h:8:1 */ + +// Definition of locale_t. +// Copyright (C) 2017-2021 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 +// . + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper , 1997. +// +// 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 +// . + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// Define the machine-dependent type `jmp_buf'. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +type X__jmp_buf_internal_tag = struct { + F__pc int64 + F__regs [12]int64 + F__sp int64 + F__fpregs [12]float64 +} /* setjmp.h:22:9 */ + +// Define the machine-dependent type `jmp_buf'. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +type X__jmp_buf = [1]X__jmp_buf_internal_tag /* setjmp.h:37:5 */ + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// NB: Include guard matches what uses. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// Define struct __jmp_buf_tag. +// Copyright (C) 1991-2021 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 +// . + +// Define the machine-dependent type `jmp_buf'. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Calling environment, plus possibly a saved signal mask. +type X__jmp_buf_tag = struct { + F__jmpbuf X__jmp_buf + F__mask_was_saved int32 + F__ccgo_pad1 [4]byte + F__saved_mask X__sigset_t +} /* struct___jmp_buf_tag.h:26:1 */ + +// Conditional variable handling. + +// Cleanup buffers +type X_pthread_cleanup_buffer = struct { + F__routine uintptr + F__arg uintptr + F__canceltype int32 + F__ccgo_pad1 [4]byte + F__prev uintptr +} /* pthread.h:159:1 */ + +// Cancellation handling with integration into exception handling. + +type X__cancel_jmp_buf_tag = struct { + F__cancel_jmp_buf X__jmp_buf + F__mask_was_saved int32 + F__ccgo_pad1 [4]byte +} /* pthread.h:538:1 */ + +type X__pthread_unwind_buf_t = struct { + F__cancel_jmp_buf [1]X__cancel_jmp_buf_tag + F__pad [4]uintptr +} /* pthread.h:548:3 */ + +// No special attributes by default. + +// Structure to hold the cleanup handler information. +type X__pthread_cleanup_frame = struct { + F__cancel_routine uintptr + F__cancel_arg uintptr + F__do_it int32 + F__cancel_type int32 +} /* pthread.h:557:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pwd/capi_linux_riscv64.go b/vendor/modernc.org/libc/pwd/capi_linux_riscv64.go new file mode 100644 index 00000000..b5b0b965 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pwd/pwd_linux_riscv64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go b/vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go new file mode 100644 index 00000000..c8727bd7 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go @@ -0,0 +1,958 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pwd/pwd_linux_riscv64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + NSS_BUFLEN_PASSWD = 1024 + X_ATFILE_SOURCE = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_PWD_H = 1 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SIZE_T_H = 0 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 9.2.2 User Database Access + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// The Single Unix specification says that some more types are +// available here. +type Gid_t = X__gid_t /* pwd.h:38:17 */ + +type Uid_t = X__uid_t /* pwd.h:43:17 */ + +// A record in the user database. +type Passwd = struct { + Fpw_name uintptr + Fpw_passwd uintptr + Fpw_uid X__uid_t + Fpw_gid X__gid_t + Fpw_gecos uintptr + Fpw_dir uintptr + Fpw_shell uintptr +} /* pwd.h:49:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/capi_linux_riscv64.go b/vendor/modernc.org/libc/signal/capi_linux_riscv64.go new file mode 100644 index 00000000..81d5396e --- /dev/null +++ b/vendor/modernc.org/libc/signal/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o signal/signal_linux_riscv64.go -pkgname signal', DO NOT EDIT. + +package signal + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/signal/more_linux_riscv64.go b/vendor/modernc.org/libc/signal/more_linux_riscv64.go new file mode 100644 index 00000000..25cc318b --- /dev/null +++ b/vendor/modernc.org/libc/signal/more_linux_riscv64.go @@ -0,0 +1,12 @@ +// Copyright 2020 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package signal + +const ( + // /usr/include/asm-generic/signal-defs.h:24:#define SIG_DFL ((__sighandler_t)0) /* default signal handling */ + SIG_DFL = 0 + // /usr/include/asm-generic/signal-defs.h:25:#define SIG_IGN ((__sighandler_t)1) /* ignore signal */ + SIG_IGN = 1 +) diff --git a/vendor/modernc.org/libc/signal/signal_linux_riscv64.go b/vendor/modernc.org/libc/signal/signal_linux_riscv64.go new file mode 100644 index 00000000..1a32b33c --- /dev/null +++ b/vendor/modernc.org/libc/signal/signal_linux_riscv64.go @@ -0,0 +1,2359 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o signal/signal_linux_riscv64.go -pkgname signal', DO NOT EDIT. + +package signal + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + MINSIGSTKSZ = 2048 + NGREG = 32 + NSIG = 65 + REG_A0 = 10 + REG_NARGS = 8 + REG_PC = 0 + REG_RA = 1 + REG_S0 = 8 + REG_S1 = 9 + REG_S2 = 18 + REG_SP = 2 + REG_TP = 4 + SA_INTERRUPT = 0x20000000 + SA_NOCLDSTOP = 1 + SA_NOCLDWAIT = 2 + SA_NODEFER = 0x40000000 + SA_NOMASK = 1073741824 + SA_ONESHOT = 2147483648 + SA_ONSTACK = 0x08000000 + SA_RESETHAND = 0x80000000 + SA_RESTART = 0x10000000 + SA_SIGINFO = 4 + SA_STACK = 134217728 + SIGABRT = 6 + SIGALRM = 14 + SIGBUS = 7 + SIGCHLD = 17 + SIGCLD = 17 + SIGCONT = 18 + SIGFPE = 8 + SIGHUP = 1 + SIGILL = 4 + SIGINT = 2 + SIGIO = 29 + SIGIOT = 6 + SIGKILL = 9 + SIGPIPE = 13 + SIGPOLL = 29 + SIGPROF = 27 + SIGPWR = 30 + SIGQUIT = 3 + SIGSEGV = 11 + SIGSTKFLT = 16 + SIGSTKSZ = 8192 + SIGSTOP = 19 + SIGSYS = 31 + SIGTERM = 15 + SIGTRAP = 5 + SIGTSTP = 20 + SIGTTIN = 21 + SIGTTOU = 22 + SIGURG = 23 + SIGUSR1 = 10 + SIGUSR2 = 12 + SIGVTALRM = 26 + SIGWINCH = 28 + SIGXCPU = 24 + SIGXFSZ = 25 + SIG_BLOCK = 0 + SIG_SETMASK = 2 + SIG_UNBLOCK = 1 + X_ATFILE_SOURCE = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_SIGACTION_H = 1 + X_BITS_SIGCONTEXT_H = 1 + X_BITS_SIGEVENT_CONSTS_H = 1 + X_BITS_SIGINFO_ARCH_H = 1 + X_BITS_SIGINFO_CONSTS_H = 1 + X_BITS_SIGNUM_ARCH_H = 1 + X_BITS_SIGNUM_GENERIC_H = 1 + X_BITS_SIGSTACK_H = 1 + X_BITS_SIGTHREAD_H = 1 + X_BITS_SS_FLAGS_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LP64 = 1 + X_NSIG = 65 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIGNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_UCONTEXT_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +// POSIX names to access some of the members. + +// sigevent constants. Linux version. +// Copyright (C) 1997-2021 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 +// . + +// `sigev_notify' values. +const ( /* sigevent-consts.h:27:1: */ + SIGEV_SIGNAL = 0 // Notify via signal. + SIGEV_NONE = 1 // Other notification: meaningless. + SIGEV_THREAD = 2 // Deliver via thread creation. + + SIGEV_THREAD_ID = 4 +) + +// `si_code' values for SIGSEGV signal. +const ( /* siginfo-consts.h:119:1: */ + SEGV_MAPERR = 1 // Address not mapped to object. + SEGV_ACCERR = 2 // Invalid permissions for mapped object. + SEGV_BNDERR = 3 // Bounds checking failure. + SEGV_PKUERR = 4 // Protection key checking failure. + SEGV_ACCADI = 5 // ADI not enabled for mapped object. + SEGV_ADIDERR = 6 // Disrupting MCD error. + SEGV_ADIPERR = 7 // Precise MCD exception. + SEGV_MTEAERR = 8 // Asynchronous ARM MTE error. + SEGV_MTESERR = 9 +) + +// `si_code' values for SIGBUS signal. +const ( /* siginfo-consts.h:142:1: */ + BUS_ADRALN = 1 // Invalid address alignment. + BUS_ADRERR = 2 // Non-existant physical address. + BUS_OBJERR = 3 // Object specific hardware error. + BUS_MCEERR_AR = 4 // Hardware memory error: action required. + BUS_MCEERR_AO = 5 +) + +// `si_code' values for SIGCHLD signal. +const ( /* siginfo-consts.h:176:1: */ + CLD_EXITED = 1 // Child has exited. + CLD_KILLED = 2 // Child was killed. + CLD_DUMPED = 3 // Child terminated abnormally. + CLD_TRAPPED = 4 // Traced child has trapped. + CLD_STOPPED = 5 // Child has stopped. + CLD_CONTINUED = 6 +) + +// `si_code' values for SIGPOLL signal. +const ( /* siginfo-consts.h:193:1: */ + POLL_IN = 1 // Data input available. + POLL_OUT = 2 // Output buffers available. + POLL_MSG = 3 // Input message available. + POLL_ERR = 4 // I/O error. + POLL_PRI = 5 // High priority input available. + POLL_HUP = 6 +) + +// X/Open requires some more fields with fixed names. + +// siginfo constants. Linux version. +// Copyright (C) 1997-2021 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 +// . + +// Most of these constants are uniform across all architectures, but there +// is one exception. +// Architecture-specific adjustments to siginfo_t. + +// Values for `si_code'. Positive values are reserved for kernel-generated +// signals. +const ( /* siginfo-consts.h:35:1: */ + SI_ASYNCNL = -60 // Sent by asynch name lookup completion. + SI_DETHREAD = -7 // Sent by execve killing subsidiary + // threads. + SI_TKILL = -6 // Sent by tkill. + SI_SIGIO = -5 // Sent by queued SIGIO. + SI_ASYNCIO = -4 // Sent by AIO completion. + SI_MESGQ = -3 // Sent by real time mesq state change. + SI_TIMER = -2 // Sent by timer expiration. + SI_QUEUE = -1 // Sent by sigqueue. + SI_USER = 0 // Sent by kill, sigsend. + SI_KERNEL = 128 +) + +// `si_code' values for SIGILL signal. +const ( /* siginfo-consts.h:71:1: */ + ILL_ILLOPC = 1 // Illegal opcode. + ILL_ILLOPN = 2 // Illegal operand. + ILL_ILLADR = 3 // Illegal addressing mode. + ILL_ILLTRP = 4 // Illegal trap. + ILL_PRVOPC = 5 // Privileged opcode. + ILL_PRVREG = 6 // Privileged register. + ILL_COPROC = 7 // Coprocessor error. + ILL_BADSTK = 8 // Internal stack error. + ILL_BADIADDR = 9 +) + +// `si_code' values for SIGFPE signal. +const ( /* siginfo-consts.h:94:1: */ + FPE_INTDIV = 1 // Integer divide by zero. + FPE_INTOVF = 2 // Integer overflow. + FPE_FLTDIV = 3 // Floating point divide by zero. + FPE_FLTOVF = 4 // Floating point overflow. + FPE_FLTUND = 5 // Floating point underflow. + FPE_FLTRES = 6 // Floating point inexact result. + FPE_FLTINV = 7 // Floating point invalid operation. + FPE_FLTSUB = 8 // Subscript out of range. + FPE_FLTUNK = 14 // Undiagnosed floating-point exception. + FPE_CONDTRAP = 15 +) + +// sigstack, sigaltstack definitions. +// Copyright (C) 1998-2021 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 +// . + +// Minimum stack size for a signal handler. + +// System default stack size. + +// Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version. +// Copyright (C) 2020 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 +// . + +// ss_flags values for stack_t. Linux version. +// Copyright (C) 1998-2021 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 +// . + +// Possible values for `ss_flags'. +const ( /* ss_flags.h:27:1: */ + SS_ONSTACK = 1 + SS_DISABLE = 2 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// ISO C99 Standard: 7.14 Signal handling + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// Signal number constants. Generic template. +// Copyright (C) 1991-2021 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 +// . + +// Fake signal functions. + +// We define here all the signal names listed in POSIX (1003.1-2008); +// as of 1003.1-2013, no additional signals have been added by POSIX. +// We also define here signal names that historically exist in every +// real-world POSIX variant (e.g. SIGWINCH). +// +// Signals in the 1-15 range are defined with their historical numbers. +// For other signals, we use the BSD numbers. +// There are two unallocated signal numbers in the 1-31 range: 7 and 29. +// Signal number 0 is reserved for use as kill(pid, 0), to test whether +// a process exists without sending it a signal. + +// ISO C99 signals. + +// Historical signals specified by POSIX. + +// Archaic names for compatibility. + +// Not all systems support real-time signals. bits/signum.h indicates +// that they are supported by overriding __SIGRTMAX to a value greater +// than __SIGRTMIN. These constants give the kernel-level hard limits, +// but some real-time signals may be used internally by glibc. Do not +// use these constants in application code; use SIGRTMIN and SIGRTMAX +// (defined in signal.h) instead. + +// Include system specific bits. +// Signal number definitions. Linux version. +// Copyright (C) 1995-2021 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 +// . + +// Adjustments and additions to the signal number constants for +// most Linux systems. + +// Historical signals specified by POSIX. + +// New(er) POSIX signals (1003.1-2008, 1003.1-2013). + +// Nonstandard signals found in all modern POSIX systems +// (including both BSD and Linux). + +// Archaic names for compatibility. + +// Biggest signal number + 1 (including real-time signals). + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// An integral type that can be modified atomically, without the +// possibility of a signal arriving in the middle of the operation. +type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +type Pid_t = X__pid_t /* signal.h:40:17 */ +type Uid_t = X__uid_t /* signal.h:46:17 */ + +// We need `struct timespec' later on. +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// RISC-V is little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Define __sigval_t. +// Copyright (C) 1997-2021 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 +// . + +// Type for data associated with a signal. +type Sigval = struct { + F__ccgo_pad1 [0]uint64 + Fsival_int int32 + F__ccgo_pad2 [4]byte +} /* __sigval_t.h:24:1 */ + +type X__sigval_t = Sigval /* __sigval_t.h:30:22 */ + +// Some fields of siginfo_t have architecture-specific variations. +// Architecture-specific adjustments to siginfo_t. + +// This architecture has no adjustments to make to siginfo_t. + +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_errno int32 + Fsi_code int32 + F__pad0 int32 + F_sifields struct { + F__ccgo_pad1 [0]uint64 + F_pad [28]int32 + } +} /* siginfo_t.h:124:5 */ + +// Architectures might also add architecture-specific constants. +// These are all considered GNU extensions. + +// Define __sigval_t. +// Copyright (C) 1997-2021 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 +// . + +// To avoid sigval_t (not a standard type name) having C++ name +// mangling depending on whether the selected standard includes union +// sigval, it should not be defined at all when using a standard for +// which the sigval name is not reserved; in that case, headers should +// not include and should use only the +// internal __sigval_t name. + +type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */ + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Define __sigval_t. +// Copyright (C) 1997-2021 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 +// . + +// Forward declaration. +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* sigevent_t.h:17:9 */ + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Define __sigval_t. +// Copyright (C) 1997-2021 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 +// . + +// Forward declaration. +type Pthread_attr_t = Pthread_attr_t1 /* sigevent_t.h:17:30 */ + +// Structure to transport application-defined values with signals. +type Sigevent = struct { + Fsigev_value X__sigval_t + Fsigev_signo int32 + Fsigev_notify int32 + F_sigev_un struct { + F__ccgo_pad1 [0]uint64 + F_pad [12]int32 + } +} /* sigevent_t.h:22:9 */ + +// Structure to transport application-defined values with signals. +type Sigevent_t = Sigevent /* sigevent_t.h:42:5 */ + +// Type of a signal handler. +type X__sighandler_t = uintptr /* signal.h:72:14 */ + +// 4.4 BSD uses the name `sig_t' for this. +type Sig_t = X__sighandler_t /* signal.h:193:24 */ + +// Get the system-specific definitions of `struct sigaction' +// and the `SA_*' and `SIG_*'. constants. +// The proper definitions for Linux's sigaction. +// Copyright (C) 1993-2021 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 +// . + +// Structure describing the action to be taken when a signal arrives. +type Sigaction = struct { + F__sigaction_handler struct{ Fsa_handler X__sighandler_t } + Fsa_mask X__sigset_t + Fsa_flags int32 + F__ccgo_pad1 [4]byte + Fsa_restorer uintptr +} /* sigaction.h:27:1 */ + +// Get machine-dependent `struct sigcontext' and signal subcodes. +// Machine-dependent signal context structure for Linux. RISC-V version. +// Copyright (C) 1996-2021 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 +// . + +type Sigcontext = struct { + Fgregs [32]uint64 + Ffpregs [66]uint64 +} /* sigcontext.h:25:1 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Define stack_t. Linux version. +// Copyright (C) 1998-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure describing a signal stack. +type Stack_t = struct { + Fss_sp uintptr + Fss_flags int32 + F__ccgo_pad1 [4]byte + Fss_size Size_t +} /* stack_t.h:31:5 */ + +// This will define `ucontext_t' and `mcontext_t'. +// struct ucontext definition, RISC-V version. +// Copyright (C) 1997-2021 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 +// . + +// Don't rely on this, the interface is currently messed up and may need to +// be broken to be fixed. + +// Copyright (C) 1991-2021 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 +// . + +// Define stack_t. Linux version. +// Copyright (C) 1998-2021 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 +// . + +type X__riscv_mc_gp_state = [32]uint64 /* ucontext.h:29:27 */ + +type Greg_t = uint64 /* ucontext.h:44:27 */ + +// Container for all general registers. +type Gregset_t = X__riscv_mc_gp_state /* ucontext.h:47:29 */ + +// Container for floating-point state. +type X__riscv_mc_fp_state = struct { + F__ccgo_pad1 [0]uint64 + F__f struct { + F__f [32]uint32 + F__fcsr uint32 + } + F__ccgo_pad2 [396]byte +} /* ucontext.h:50:9 */ + +// Container for floating-point state. +type Fpregset_t = X__riscv_mc_fp_state /* ucontext.h:50:35 */ + +type X__riscv_mc_f_ext_state = struct { + F__f [32]uint32 + F__fcsr uint32 +} /* ucontext.h:50:9 */ + +type X__riscv_mc_d_ext_state = struct { + F__f [32]uint64 + F__fcsr uint32 + F__ccgo_pad1 [4]byte +} /* ucontext.h:50:9 */ + +type X__riscv_mc_q_ext_state = struct { + F__f [64]uint64 + F__fcsr uint32 + F__glibc_reserved [3]uint32 +} /* ucontext.h:50:9 */ + +type Mcontext_t1 = struct { + F__gregs X__riscv_mc_gp_state + F__fpregs struct { + F__ccgo_pad1 [0]uint64 + F__f struct { + F__f [32]uint32 + F__fcsr uint32 + } + F__ccgo_pad2 [396]byte + } +} /* ucontext.h:81:9 */ + +type Mcontext_t = Mcontext_t1 /* ucontext.h:85:5 */ + +// Userlevel context. +type Ucontext_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__uc_flags uint64 + Fuc_link uintptr + Fuc_stack Stack_t + Fuc_sigmask Sigset_t + F__ccgo_pad2 [784]byte +} /* ucontext.h:88:9 */ + +// Userlevel context. +type Ucontext_t = Ucontext_t1 /* ucontext.h:108:5 */ + +// Define struct sigstack. +// Copyright (C) 1998-2021 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 +// . + +// Structure describing a signal stack (obsolete). +type Sigstack = struct { + Fss_sp uintptr + Fss_onstack int32 + F__ccgo_pad1 [4]byte +} /* struct_sigstack.h:23:1 */ + +// Some of the functions for handling signals in threaded programs must +// be defined here. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Some of the functions for handling signals in threaded programs must +// be defined here. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// System-specific extensions. +// System-specific extensions of , Linux version. +// Copyright (C) 2019-2021 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 +// . + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/capi_linux_riscv64.go b/vendor/modernc.org/libc/stdio/capi_linux_riscv64.go new file mode 100644 index 00000000..fbb39ede --- /dev/null +++ b/vendor/modernc.org/libc/stdio/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdio/stdio_linux_riscv64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go b/vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go new file mode 100644 index 00000000..502ad77e --- /dev/null +++ b/vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go @@ -0,0 +1,589 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdio/stdio_linux_riscv64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BUFSIZ = 8192 + EOF = -1 + FILENAME_MAX = 4096 + FOPEN_MAX = 16 + L_ctermid = 9 + L_tmpnam = 20 + P_tmpdir = "/tmp" + SEEK_CUR = 1 + SEEK_END = 2 + SEEK_SET = 0 + TMP_MAX = 238328 + X_ATFILE_SOURCE = 1 + X_BITS_FLOATN_COMMON_H = 0 + X_BITS_FLOATN_H = 0 + X_BITS_STDIO_LIM_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_IOFBF = 0 + X_IOLBF = 1 + X_IONBF = 2 + X_IO_EOF_SEEN = 0x0010 + X_IO_ERR_SEEN = 0x0020 + X_IO_USER_LOCK = 0x8000 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_STDIO_H = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SIZE_T_H = 0 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + X_VA_LIST_DEFINED = 0 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.15 Variable arguments + +// Define __gnuc_va_list. + +type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */ + +// Define the standard macros for the user, +// if this invocation was from the user program. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Integral type unchanged by default argument promotions that can +// hold any value corresponding to members of the extended character +// set, as well as at least one value that does not correspond to any +// member of the extended character set. + +// Conversion state information. +type X__mbstate_t = struct { + F__count int32 + F__value struct{ F__wch uint32 } +} /* __mbstate_t.h:21:3 */ + +// The tag name of this struct is _G_fpos_t to preserve historic +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. +type X_G_fpos_t = struct { + F__pos X__off_t + F__state X__mbstate_t +} /* __fpos_t.h:10:9 */ + +// The tag name of this struct is _G_fpos_t to preserve historic +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. +type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// The tag name of this struct is _G_fpos64_t to preserve historic +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. +type X_G_fpos64_t = struct { + F__pos X__off64_t + F__state X__mbstate_t +} /* __fpos64_t.h:10:9 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// The tag name of this struct is _G_fpos64_t to preserve historic +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. +type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ + +type X_IO_FILE = struct { + F_flags int32 + F__ccgo_pad1 [4]byte + F_IO_read_ptr uintptr + F_IO_read_end uintptr + F_IO_read_base uintptr + F_IO_write_base uintptr + F_IO_write_ptr uintptr + F_IO_write_end uintptr + F_IO_buf_base uintptr + F_IO_buf_end uintptr + F_IO_save_base uintptr + F_IO_backup_base uintptr + F_IO_save_end uintptr + F_markers uintptr + F_chain uintptr + F_fileno int32 + F_flags2 int32 + F_old_offset X__off_t + F_cur_column uint16 + F_vtable_offset int8 + F_shortbuf [1]uint8 + F__ccgo_pad2 [4]byte + F_lock uintptr + F_offset X__off64_t + F_codecvt uintptr + F_wide_data uintptr + F_freeres_list uintptr + F_freeres_buf uintptr + F__pad5 Size_t + F_mode int32 + F_unused2 [20]uint8 +} /* __FILE.h:4:1 */ + +type X__FILE = X_IO_FILE /* __FILE.h:5:25 */ + +// The opaque type of streams. This is the definition used elsewhere. +type FILE = X_IO_FILE /* FILE.h:7:25 */ + +// These macros are used by bits/stdio.h and internal headers. + +// Many more flag bits are defined internally. + +type Va_list = X__gnuc_va_list /* stdio.h:52:24 */ + +type Off_t = X__off64_t /* stdio.h:65:19 */ + +type Ssize_t = X__ssize_t /* stdio.h:77:19 */ + +// The type of the second argument to `fgetpos' and `fsetpos'. +type Fpos_t = X__fpos64_t /* stdio.h:86:20 */ + +// If we are compiling with optimizing read this file. It contains +// several optimizing inline functions and macros. + +// Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +// Copyright (C) 2017-2021 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 +// . + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/capi_linux_riscv64.go b/vendor/modernc.org/libc/stdlib/capi_linux_riscv64.go new file mode 100644 index 00000000..c464fb91 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdlib/stdlib_linux_riscv64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go new file mode 100644 index 00000000..532565b6 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go @@ -0,0 +1,1591 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdlib/stdlib_linux_riscv64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 + BYTE_ORDER = 1234 + EXIT_FAILURE = 1 + EXIT_SUCCESS = 0 + FD_SETSIZE = 1024 + LITTLE_ENDIAN = 1234 + PDP_ENDIAN = 3412 + RAND_MAX = 2147483647 + WCONTINUED = 8 + WEXITED = 4 + WNOHANG = 1 + WNOWAIT = 0x01000000 + WSTOPPED = 2 + WUNTRACED = 2 + X_ALLOCA_H = 1 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_FLOATN_COMMON_H = 0 + X_BITS_FLOATN_H = 0 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_ENDIAN_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_GCC_WCHAR_T = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_STDLIB_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + X_T_WCHAR = 0 + X_T_WCHAR_ = 0 + X_WCHAR_T = 0 + X_WCHAR_T_ = 0 + X_WCHAR_T_DECLARED = 0 + X_WCHAR_T_DEFINED = 0 + X_WCHAR_T_DEFINED_ = 0 + X_WCHAR_T_H = 0 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// A null pointer constant. + +// XPG requires a few symbols from being defined. +// Definitions of flag bits for `waitpid' et al. +// Copyright (C) 1992-2021 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 +// . + +// Bits in the third argument to `waitpid'. + +// Bits in the fourth argument to `waitid'. + +// Definitions of status bits for `wait' et al. +// Copyright (C) 1992-2021 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 +// . + +// Everything extant so far uses these same bits. + +// If WIFEXITED(STATUS), the low-order 8 bits of the status. + +// If WIFSIGNALED(STATUS), the terminating signal. + +// If WIFSTOPPED(STATUS), the signal that stopped the child. + +// Nonzero if STATUS indicates normal termination. + +// Nonzero if STATUS indicates termination by a signal. + +// Nonzero if STATUS indicates the child is stopped. + +// Nonzero if STATUS indicates the child continued after a stop. We only +// define this if provides the WCONTINUED flag bit. + +// Nonzero if STATUS indicates the child dumped core. + +// Macros for constructing status values. + +// Define the macros also would define this way. + +// _FloatN API tests for enablement. +// Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +// Copyright (C) 2017-2021 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-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// Defined to 1 if the current compiler invocation provides a +// floating-point type with the IEEE 754 binary128 format, and this +// glibc includes corresponding *f128 interfaces for it. + +// Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct +// from the default float, double and long double types in this glibc. + +// Defined to 1 if the current compiler invocation provides a +// floating-point type with the right format for _Float64x, and this +// glibc includes corresponding *f64x interfaces for it. + +// Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format +// of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has +// the format of _Float128, which must be different from that of long +// double. + +// Defined to concatenate the literal suffix to be used with _Float128 +// types, if __HAVE_FLOAT128 is 1. + +// Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. + +// The remaining of this file provides support for older compilers. + +// The type _Float128 exists only since GCC 7.0. + +// Various built-in functions do not exist before GCC 7.0. + +// Macros to control TS 18661-3 glibc features where the same +// definitions are appropriate for all platforms. +// Copyright (C) 2017-2021 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-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// This header should be included at the bottom of each bits/floatn.h. +// It defines the following macros for each _FloatN and _FloatNx type, +// where the same definitions, or definitions based only on the macros +// in bits/floatn.h, are appropriate for all glibc configurations. + +// Defined to 1 if the current compiler invocation provides a +// floating-point type with the right format for this type, and this +// glibc includes corresponding *fN or *fNx interfaces for it. + +// Defined to 1 if the corresponding __HAVE_ macro is 1 and the +// type is the first with its format in the sequence of (the default +// choices for) float, double, long double, _Float16, _Float32, +// _Float64, _Float128, _Float32x, _Float64x, _Float128x for this +// glibc; that is, if functions present once per floating-point format +// rather than once per type are present for this type. +// +// All configurations supported by glibc have _Float32 the same format +// as float, _Float64 and _Float32x the same format as double, the +// _Float64x the same format as either long double or _Float128. No +// configurations support _Float128x or, as of GCC 7, have compiler +// support for a type meeting the requirements for _Float128x. + +// Defined to 1 if the corresponding _FloatN type is not binary compatible +// with the corresponding ISO C type in the current compilation unit as +// opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built +// in glibc. + +// Defined to 1 if any _FloatN or _FloatNx types that are not +// ABI-distinct are however distinct types at the C language level (so +// for the purposes of __builtin_types_compatible_p and _Generic). + +// Defined to concatenate the literal suffix to be used with _FloatN +// or _FloatNx types, if __HAVE_ is 1. The corresponding +// literal suffixes exist since GCC 7, for C only. + +// Defined to a complex type if __HAVE_ is 1. + +// The remaining of this file provides support for older compilers. + +// If double, long double and _Float64 all have the same set of +// values, TS 18661-3 requires the usual arithmetic conversions on +// long double and _Float64 to produce _Float64. For this to be the +// case when building with a compiler without a distinct _Float64 +// type, _Float64 must be a typedef for long double, not for +// double. + +// Returned by `div'. +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:5 */ + +// Returned by `ldiv'. +type Ldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:70:5 */ + +// Returned by `lldiv'. +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:80:5 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2021 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2021 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 +// . + +// We don't use `memset' because this would require a prototype and +// the array isn't too big. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// Reentrant versions of the `random' family of functions. +// These functions all use the following data structure to contain +// state, rather than global state variables. + +type Random_data = struct { + Ffptr uintptr + Frptr uintptr + Fstate uintptr + Frand_type int32 + Frand_deg int32 + Frand_sep int32 + F__ccgo_pad1 [4]byte + Fend_ptr uintptr +} /* stdlib.h:423:1 */ + +// Data structure for communication with thread safe versions. This +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. +type Drand48_data = struct { + F__x [3]uint16 + F__old_x [3]uint16 + F__c uint16 + F__init uint16 + F__a uint64 +} /* stdlib.h:490:1 */ + +// Shorthand for type of comparison functions. +type X__compar_fn_t = uintptr /* stdlib.h:814:13 */ + +// Floating-point inline functions for stdlib.h. +// Copyright (C) 2012-2021 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 +// . + +// Define some macros helping to catch buffer overflows. + +// Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +// Copyright (C) 2017-2021 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 +// . + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/capi_linux_riscv64.go b/vendor/modernc.org/libc/sys/socket/capi_linux_riscv64.go new file mode 100644 index 00000000..9fbf0ece --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/socket/socket_linux_riscv64.go -pkgname socket', DO NOT EDIT. + +package socket + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go b/vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go new file mode 100644 index 00000000..c685bf6d --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go @@ -0,0 +1,1909 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/socket/socket_linux_riscv64.go -pkgname socket', DO NOT EDIT. + +package socket + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_ALG = 38 + AF_APPLETALK = 5 + AF_ASH = 18 + AF_ATMPVC = 8 + AF_ATMSVC = 20 + AF_AX25 = 3 + AF_BLUETOOTH = 31 + AF_BRIDGE = 7 + AF_CAIF = 37 + AF_CAN = 29 + AF_DECnet = 12 + AF_ECONET = 19 + AF_FILE = 1 + AF_IB = 27 + AF_IEEE802154 = 36 + AF_INET = 2 + AF_INET6 = 10 + AF_IPX = 4 + AF_IRDA = 23 + AF_ISDN = 34 + AF_IUCV = 32 + AF_KCM = 41 + AF_KEY = 15 + AF_LLC = 26 + AF_LOCAL = 1 + AF_MAX = 45 + AF_MPLS = 28 + AF_NETBEUI = 13 + AF_NETLINK = 16 + AF_NETROM = 6 + AF_NFC = 39 + AF_PACKET = 17 + AF_PHONET = 35 + AF_PPPOX = 24 + AF_QIPCRTR = 42 + AF_RDS = 21 + AF_ROSE = 11 + AF_ROUTE = 16 + AF_RXRPC = 33 + AF_SECURITY = 14 + AF_SMC = 43 + AF_SNA = 22 + AF_TIPC = 30 + AF_UNIX = 1 + AF_UNSPEC = 0 + AF_VSOCK = 40 + AF_WANPIPE = 25 + AF_X25 = 9 + AF_XDP = 44 + BIG_ENDIAN = 4321 + BYTE_ORDER = 1234 + FD_SETSIZE = 1024 + FIOGETOWN = 0x8903 + FIOSETOWN = 0x8901 + LITTLE_ENDIAN = 1234 + PDP_ENDIAN = 3412 + PF_ALG = 38 + PF_APPLETALK = 5 + PF_ASH = 18 + PF_ATMPVC = 8 + PF_ATMSVC = 20 + PF_AX25 = 3 + PF_BLUETOOTH = 31 + PF_BRIDGE = 7 + PF_CAIF = 37 + PF_CAN = 29 + PF_DECnet = 12 + PF_ECONET = 19 + PF_FILE = 1 + PF_IB = 27 + PF_IEEE802154 = 36 + PF_INET = 2 + PF_INET6 = 10 + PF_IPX = 4 + PF_IRDA = 23 + PF_ISDN = 34 + PF_IUCV = 32 + PF_KCM = 41 + PF_KEY = 15 + PF_LLC = 26 + PF_LOCAL = 1 + PF_MAX = 45 + PF_MPLS = 28 + PF_NETBEUI = 13 + PF_NETLINK = 16 + PF_NETROM = 6 + PF_NFC = 39 + PF_PACKET = 17 + PF_PHONET = 35 + PF_PPPOX = 24 + PF_QIPCRTR = 42 + PF_RDS = 21 + PF_ROSE = 11 + PF_ROUTE = 16 + PF_RXRPC = 33 + PF_SECURITY = 14 + PF_SMC = 43 + PF_SNA = 22 + PF_TIPC = 30 + PF_UNIX = 1 + PF_UNSPEC = 0 + PF_VSOCK = 40 + PF_WANPIPE = 25 + PF_X25 = 9 + PF_XDP = 44 + SCM_TIMESTAMP = 29 + SCM_TIMESTAMPING = 37 + SCM_TIMESTAMPING_OPT_STATS = 54 + SCM_TIMESTAMPING_PKTINFO = 58 + SCM_TIMESTAMPNS = 35 + SCM_TXTIME = 61 + SCM_WIFI_STATUS = 41 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_OLD = 0x8907 + SIOCGSTAMP_OLD = 0x8906 + SIOCSPGRP = 0x8902 + SOL_AAL = 265 + SOL_ALG = 279 + SOL_ATM = 264 + SOL_BLUETOOTH = 274 + SOL_CAIF = 278 + SOL_DCCP = 269 + SOL_DECNET = 261 + SOL_IRDA = 266 + SOL_IUCV = 277 + SOL_KCM = 281 + SOL_LLC = 268 + SOL_NETBEUI = 267 + SOL_NETLINK = 270 + SOL_NFC = 280 + SOL_PACKET = 263 + SOL_PNPIPE = 275 + SOL_PPPOL2TP = 273 + SOL_RAW = 255 + SOL_RDS = 276 + SOL_RXRPC = 272 + SOL_SOCKET = 1 + SOL_TIPC = 271 + SOL_TLS = 282 + SOL_X25 = 262 + SOL_XDP = 283 + SOMAXCONN = 4096 + SO_ACCEPTCONN = 30 + SO_ATTACH_BPF = 50 + SO_ATTACH_FILTER = 26 + SO_ATTACH_REUSEPORT_CBPF = 51 + SO_ATTACH_REUSEPORT_EBPF = 52 + SO_BINDTODEVICE = 25 + SO_BINDTOIFINDEX = 62 + SO_BPF_EXTENSIONS = 48 + SO_BROADCAST = 6 + SO_BSDCOMPAT = 14 + SO_BUSY_POLL = 46 + SO_BUSY_POLL_BUDGET = 70 + SO_CNX_ADVICE = 53 + SO_COOKIE = 57 + SO_DEBUG = 1 + SO_DETACH_BPF = 27 + SO_DETACH_FILTER = 27 + SO_DETACH_REUSEPORT_BPF = 68 + SO_DOMAIN = 39 + SO_DONTROUTE = 5 + SO_ERROR = 4 + SO_GET_FILTER = 26 + SO_INCOMING_CPU = 49 + SO_INCOMING_NAPI_ID = 56 + SO_KEEPALIVE = 9 + SO_LINGER = 13 + SO_LOCK_FILTER = 44 + SO_MARK = 36 + SO_MAX_PACING_RATE = 47 + SO_MEMINFO = 55 + SO_NETNS_COOKIE = 71 + SO_NOFCS = 43 + SO_NO_CHECK = 11 + SO_OOBINLINE = 10 + SO_PASSCRED = 16 + SO_PASSSEC = 34 + SO_PEEK_OFF = 42 + SO_PEERCRED = 17 + SO_PEERGROUPS = 59 + SO_PEERNAME = 28 + SO_PEERSEC = 31 + SO_PREFER_BUSY_POLL = 69 + SO_PRIORITY = 12 + SO_PROTOCOL = 38 + SO_RCVBUF = 8 + SO_RCVBUFFORCE = 33 + SO_RCVLOWAT = 18 + SO_RCVTIMEO = 20 + SO_RCVTIMEO_NEW = 66 + SO_RCVTIMEO_OLD = 20 + SO_REUSEADDR = 2 + SO_REUSEPORT = 15 + SO_RXQ_OVFL = 40 + SO_SECURITY_AUTHENTICATION = 22 + SO_SECURITY_ENCRYPTION_NETWORK = 24 + SO_SECURITY_ENCRYPTION_TRANSPORT = 23 + SO_SELECT_ERR_QUEUE = 45 + SO_SNDBUF = 7 + SO_SNDBUFFORCE = 32 + SO_SNDLOWAT = 19 + SO_SNDTIMEO = 21 + SO_SNDTIMEO_NEW = 67 + SO_SNDTIMEO_OLD = 21 + SO_TIMESTAMP = 29 + SO_TIMESTAMPING = 37 + SO_TIMESTAMPING_NEW = 65 + SO_TIMESTAMPING_OLD = 37 + SO_TIMESTAMPNS = 35 + SO_TIMESTAMPNS_NEW = 64 + SO_TIMESTAMPNS_OLD = 35 + SO_TIMESTAMP_NEW = 63 + SO_TIMESTAMP_OLD = 29 + SO_TXTIME = 61 + SO_TYPE = 3 + SO_WIFI_STATUS = 41 + SO_ZEROCOPY = 60 + X_ASM_RISCV_BITSPERLONG_H = 0 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_SOCKADDR_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_ENDIAN_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LINUX_POSIX_TYPES_H = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_SS_SIZE = 128 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_SOCKET_H = 1 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +// Bits in the FLAGS argument to `send', `recv', et al. +const ( /* socket.h:200:1: */ + MSG_OOB = 1 // Process out-of-band data. + MSG_PEEK = 2 // Peek at incoming messages. + MSG_DONTROUTE = 4 // Don't use local routing. + MSG_CTRUNC = 8 // Control data lost before delivery. + MSG_PROXY = 16 // Supply or ask second address. + MSG_TRUNC = 32 + MSG_DONTWAIT = 64 // Nonblocking IO. + MSG_EOR = 128 // End of record. + MSG_WAITALL = 256 // Wait for a full request. + MSG_FIN = 512 + MSG_SYN = 1024 + MSG_CONFIRM = 2048 // Confirm path validity. + MSG_RST = 4096 + MSG_ERRQUEUE = 8192 // Fetch message from error queue. + MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. + MSG_MORE = 32768 // Sender will send more. + MSG_WAITFORONE = 65536 // Wait for at least one packet to return. + MSG_BATCH = 262144 // sendmmsg: more messages coming. + MSG_ZEROCOPY = 67108864 // Use user data in kernel path. + MSG_FASTOPEN = 536870912 // Send data in TCP SYN. + + MSG_CMSG_CLOEXEC = 1073741824 +) + +// Socket level message types. This must match the definitions in +// . +const ( /* socket.h:332:1: */ + SCM_RIGHTS = 1 +) + +// Get the architecture-dependent definition of enum __socket_type. +// Define enum __socket_type for generic Linux. +// Copyright (C) 1991-2021 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 +// . + +// Types of sockets. +const ( /* socket_type.h:24:1: */ + SOCK_STREAM = 1 // Sequenced, reliable, connection-based + // byte streams. + SOCK_DGRAM = 2 // Connectionless, unreliable datagrams + // of fixed maximum length. + SOCK_RAW = 3 // Raw protocol interface. + SOCK_RDM = 4 // Reliably-delivered messages. + SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, + // datagrams of fixed maximum length. + SOCK_DCCP = 6 // Datagram Congestion Control Protocol. + SOCK_PACKET = 10 // Linux specific way of getting packets + // at the dev level. For writing rarp and + // other similar things on the user level. + + // Flags to be ORed into the type parameter of socket and socketpair and + // used for the flags parameter of paccept. + + SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the + // new descriptor(s). + SOCK_NONBLOCK = 2048 +) + +// The following constants should be used for the second parameter of +// `shutdown'. +const ( /* socket.h:41:1: */ + SHUT_RD = 0 // No more receptions. + SHUT_WR = 1 // No more transmissions. + SHUT_RDWR = 2 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure for scatter/gather I/O. +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* struct_iovec.h:26:1 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This operating system-specific header file defines the SOCK_*, PF_*, +// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', +// `struct msghdr', and `struct linger' types. +// System-specific socket constants and types. Linux version. +// Copyright (C) 1991-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2021 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2021 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 +// . + +// We don't use `memset' because this would require a prototype and +// the array isn't too big. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// Type for length arguments in socket calls. +type Socklen_t = X__socklen_t /* socket.h:33:21 */ + +// Protocol families. + +// Address families. + +// Socket level values. Others are defined in the appropriate headers. +// +// XXX These definitions also should go into the appropriate headers as +// far as they are available. + +// Maximum queue length specifiable by listen. + +// Get the definition of the macro to define the common sockaddr members. +// Definition of struct sockaddr_* common members and sizes, generic version. +// Copyright (C) 1995-2021 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 +// . + +// Never include this file directly; use instead. + +// POSIX.1g specifies this type name for the `sa_family' member. +type Sa_family_t = uint16 /* sockaddr.h:28:28 */ + +// This macro is used to declare the initial common members +// of the data types used for socket addresses, `struct sockaddr', +// `struct sockaddr_in', `struct sockaddr_un', etc. + +// Size of struct sockaddr_storage. + +// Structure describing a generic socket address. +type Sockaddr = struct { + Fsa_family Sa_family_t + Fsa_data [14]uint8 +} /* socket.h:178:1 */ + +// Structure large enough to hold any socket address (with the historical +// exception of AF_UNIX). + +type Sockaddr_storage = struct { + Fss_family Sa_family_t + F__ss_padding [118]uint8 + F__ss_align uint64 +} /* socket.h:191:1 */ + +// Structure describing messages sent by +// `sendmsg' and received by `recvmsg'. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen Size_t + Fmsg_control uintptr + Fmsg_controllen Size_t + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:257:1 */ + +// Structure used for storage of ancillary data object information. +type Cmsghdr = struct { + F__ccgo_pad1 [0]uint64 + Fcmsg_len Size_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:275:1 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This allows for 1024 file descriptors: if NR_OPEN is ever grown +// beyond that you'll have to change this too. But 1024 fd's seem to be +// enough even for such "real" unices like OSF/1, so hopefully this is +// one limit that doesn't have to be changed [again]. +// +// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in +// (and thus ) - but this is a more logical +// place for them. Solved by having dummy defines in . + +// This macro may have been defined in . But we always +// use the one here. + +type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ + +// Type of a signal handler. +type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ + +// Type of a SYSV IPC key. +type X__kernel_key_t = int32 /* posix_types.h:33:13 */ +type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note +// Copyright (C) 2012 ARM Ltd. +// Copyright (C) 2015 Regents of the University of California + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// There seems to be no way of detecting this automatically from user +// space, so 64 bit architectures should override this in their +// bitsperlong.h. In particular, an architecture that supports +// both 32 and 64 bit user space must not rely on CONFIG_64BIT +// to decide it, but rather check a compiler provided macro. + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. +// +// First the types that are often defined in different ways across +// architectures, so that you can override them. + +type X__kernel_long_t = int64 /* posix_types.h:15:15 */ +type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ + +type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ + +type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ + +type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ + +type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ + +type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ +type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ + +type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ + +type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ + +type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ +type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ + +type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */ +type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */ + +type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */ + +// Most 32 bit architectures use "unsigned int" size_t, +// and all 64 bit architectures use "unsigned long" size_t. +type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ +type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ +type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ + +type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ + +// anything below here should be completely generic +type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ +type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ +type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ +type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ +type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ +type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ +type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ +type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ +type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ +type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ +type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Socket-level I/O control calls. + +// For setsockopt(2) + +// Security levels - as per NRL IPv6 - don't actually do anything + +// Socket filtering + +// Instruct lower device to use last 4-bytes of skb data as FCS + +// on 64-bit and x32, avoid the ?: operator + +// Structure used to manipulate the SO_LINGER option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:361:1 */ + +// This is the 4.3 BSD `struct sockaddr' format, which is used as wire +// format in the grotty old 4.3 `talk' protocol. +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]uint8 +} /* struct_osockaddr.h:6:1 */ + +// Define some macros helping to catch buffer overflows. + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/capi_linux_riscv64.go b/vendor/modernc.org/libc/sys/stat/capi_linux_riscv64.go new file mode 100644 index 00000000..17c10084 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/stat/stat_linux_riscv64.go -pkgname stat', DO NOT EDIT. + +package stat + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go b/vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go new file mode 100644 index 00000000..edf9167e --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go @@ -0,0 +1,1163 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/stat/stat_linux_riscv64.go -pkgname stat', DO NOT EDIT. + +package stat + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 + ALLPERMS = 4095 + DEFFILEMODE = 438 + S_BLKSIZE = 512 + S_IEXEC = 64 + S_IFBLK = 24576 + S_IFCHR = 8192 + S_IFDIR = 16384 + S_IFIFO = 4096 + S_IFLNK = 40960 + S_IFMT = 61440 + S_IFREG = 32768 + S_IFSOCK = 49152 + S_IREAD = 256 + S_IRGRP = 32 + S_IROTH = 4 + S_IRUSR = 256 + S_IRWXG = 56 + S_IRWXO = 7 + S_IRWXU = 448 + S_ISGID = 1024 + S_ISUID = 2048 + S_ISVTX = 512 + S_IWGRP = 16 + S_IWOTH = 2 + S_IWRITE = 128 + S_IWUSR = 128 + S_IXGRP = 8 + S_IXOTH = 1 + S_IXUSR = 64 + UTIME_NOW = 1073741823 + UTIME_OMIT = 1073741822 + X_ATFILE_SOURCE = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_STAT_H = 1 + X_BITS_STRUCT_STAT_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STATBUF_ST_BLKSIZE = 0 + X_STATBUF_ST_NSEC = 0 + X_STATBUF_ST_RDEV = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_STAT_H = 1 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 5.6 File Characteristics + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// RISC-V is little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +// The Single Unix specification says that some more types are +// available here. + +type Dev_t = X__dev_t /* stat.h:40:17 */ + +type Gid_t = X__gid_t /* stat.h:45:17 */ + +type Ino_t = X__ino64_t /* stat.h:53:19 */ + +type Mode_t = X__mode_t /* stat.h:59:18 */ + +type Nlink_t = X__nlink_t /* stat.h:64:19 */ + +type Off_t = X__off64_t /* stat.h:72:19 */ + +type Uid_t = X__uid_t /* stat.h:78:17 */ + +// Copyright (C) 1992-2021 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 +// . + +// Definition for struct stat. +// Copyright (C) 2020-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +type Stat = struct { + Fst_dev X__dev_t + Fst_ino X__ino64_t + Fst_mode X__mode_t + Fst_nlink X__nlink_t + Fst_uid X__uid_t + Fst_gid X__gid_t + Fst_rdev X__dev_t + F__pad1 X__dev_t + Fst_size X__off64_t + Fst_blksize X__blksize_t + F__pad2 int32 + Fst_blocks X__blkcnt64_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [2]int32 +} /* struct_stat.h:44:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/capi_linux_riscv64.go b/vendor/modernc.org/libc/sys/types/capi_linux_riscv64.go new file mode 100644 index 00000000..2fb48ebc --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/types/types_linux_riscv64.go -pkgname types', DO NOT EDIT. + +package types + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/types/types_linux_riscv64.go b/vendor/modernc.org/libc/sys/types/types_linux_riscv64.go new file mode 100644 index 00000000..f59fb019 --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/types_linux_riscv64.go @@ -0,0 +1,1715 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/types/types_linux_riscv64.go -pkgname types', DO NOT EDIT. + +package types + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 + BYTE_ORDER = 1234 + FD_SETSIZE = 1024 + LITTLE_ENDIAN = 1234 + PDP_ENDIAN = 3412 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_ENDIAN_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2021 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2021 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 +// . + +// We don't use `memset' because this would require a prototype and +// the array isn't too big. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/termios/capi_linux_riscv64.go b/vendor/modernc.org/libc/termios/capi_linux_riscv64.go new file mode 100644 index 00000000..6edfd291 --- /dev/null +++ b/vendor/modernc.org/libc/termios/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o termios/termios_linux_riscv64.go -pkgname termios', DO NOT EDIT. + +package termios + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/termios/termios_linux_riscv64.go b/vendor/modernc.org/libc/termios/termios_linux_riscv64.go new file mode 100644 index 00000000..138f40ea --- /dev/null +++ b/vendor/modernc.org/libc/termios/termios_linux_riscv64.go @@ -0,0 +1,1194 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o termios/termios_linux_riscv64.go -pkgname termios', DO NOT EDIT. + +package termios + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + B0 = 0000000 + B1000000 = 0010010 + B110 = 0000003 + B115200 = 0010002 + B1152000 = 0010011 + B1200 = 0000011 + B134 = 0000004 + B150 = 0000005 + B1500000 = 0010012 + B1800 = 0000012 + B19200 = 0000016 + B200 = 0000006 + B2000000 = 0010013 + B230400 = 0010003 + B2400 = 0000013 + B2500000 = 0010014 + B300 = 0000007 + B3000000 = 0010015 + B3500000 = 0010016 + B38400 = 0000017 + B4000000 = 0010017 + B460800 = 0010004 + B4800 = 0000014 + B50 = 0000001 + B500000 = 0010005 + B57600 = 0010001 + B576000 = 0010006 + B600 = 0000010 + B75 = 0000002 + B921600 = 0010007 + B9600 = 0000015 + BRKINT = 0000002 + BS0 = 0000000 + BS1 = 0020000 + BSDLY = 0020000 + CBAUD = 000000010017 + CBAUDEX = 000000010000 + CBRK = 0 + CDISCARD = 15 + CDSUSP = 25 + CEOF = 4 + CEOL = 0 + CEOT = 4 + CERASE = 0177 + CFLUSH = 15 + CIBAUD = 002003600000 + CINTR = 3 + CKILL = 21 + CLNEXT = 22 + CLOCAL = 0004000 + CMIN = 1 + CMSPAR = 010000000000 + CQUIT = 034 + CR0 = 0000000 + CR1 = 0001000 + CR2 = 0002000 + CR3 = 0003000 + CRDLY = 0003000 + CREAD = 0000200 + CREPRINT = 18 + CRPRNT = 18 + CRTSCTS = 020000000000 + CS5 = 0000000 + CS6 = 0000020 + CS7 = 0000040 + CS8 = 0000060 + CSIZE = 0000060 + CSTART = 17 + CSTATUS = 0 + CSTOP = 19 + CSTOPB = 0000100 + CSUSP = 26 + CTIME = 0 + CWERASE = 23 + ECHO = 0000010 + ECHOCTL = 0001000 + ECHOE = 0000020 + ECHOK = 0000040 + ECHOKE = 0004000 + ECHONL = 0000100 + ECHOPRT = 0002000 + EXTA = 14 + EXTB = 15 + EXTPROC = 0200000 + FF0 = 0000000 + FF1 = 0100000 + FFDLY = 0100000 + FLUSHO = 0010000 + HUPCL = 0002000 + ICANON = 0000002 + ICRNL = 0000400 + IEXTEN = 0100000 + IGNBRK = 0000001 + IGNCR = 0000200 + IGNPAR = 0000004 + IMAXBEL = 0020000 + INLCR = 0000100 + INPCK = 0000020 + ISIG = 0000001 + ISTRIP = 0000040 + IUCLC = 0001000 + IUTF8 = 0040000 + IXANY = 0004000 + IXOFF = 0010000 + IXON = 0002000 + NCCS = 32 + NL0 = 0000000 + NL1 = 0000400 + NLDLY = 0000400 + NOFLSH = 0000200 + OCRNL = 0000010 + OFDEL = 0000200 + OFILL = 0000100 + OLCUC = 0000002 + ONLCR = 0000004 + ONLRET = 0000040 + ONOCR = 0000020 + OPOST = 0000001 + PARENB = 0000400 + PARMRK = 0000010 + PARODD = 0001000 + PENDIN = 0040000 + TAB0 = 0000000 + TAB1 = 0004000 + TAB2 = 0010000 + TAB3 = 0014000 + TABDLY = 0014000 + TCIFLUSH = 0 + TCIOFF = 2 + TCIOFLUSH = 2 + TCION = 3 + TCOFLUSH = 1 + TCOOFF = 0 + TCOON = 1 + TCSADRAIN = 1 + TCSAFLUSH = 2 + TCSANOW = 0 + TIOCSER_TEMT = 0x01 + TOSTOP = 0000400 + TTYDEF_CFLAG = 1440 + TTYDEF_IFLAG = 11554 + TTYDEF_LFLAG = 35355 + TTYDEF_OFLAG = 6149 + TTYDEF_SPEED = 13 + VDISCARD = 13 + VEOF = 4 + VEOL = 11 + VEOL2 = 16 + VERASE = 2 + VINTR = 0 + VKILL = 3 + VLNEXT = 15 + VMIN = 6 + VQUIT = 1 + VREPRINT = 12 + VSTART = 8 + VSTOP = 9 + VSUSP = 10 + VSWTC = 7 + VT0 = 0000000 + VT1 = 0040000 + VTDLY = 0040000 + VTIME = 5 + VWERASE = 14 + XCASE = 0000004 + XTABS = 0014000 + X_ATFILE_SOURCE = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_HAVE_STRUCT_TERMIOS_C_ISPEED = 1 + X_HAVE_STRUCT_TERMIOS_C_OSPEED = 1 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + X_SYS_TTYDEFAULTS_H_ = 0 + X_TERMIOS_H = 1 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 7.1-2 General Terminal Interface + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// We need `pid_t'. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Pid_t = X__pid_t /* termios.h:30:17 */ + +// Get the system-dependent definitions of `struct termios', `tcflag_t', +// `cc_t', `speed_t', and all the macros specifying the flag bits. +// termios type and macro definitions. Linux version. +// Copyright (C) 1993-2021 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 +// . + +type Cc_t = uint8 /* termios.h:23:23 */ +type Speed_t = uint32 /* termios.h:24:22 */ +type Tcflag_t = uint32 /* termios.h:25:22 */ + +// struct termios definition. Linux/generic version. +// Copyright (C) 2019-2021 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 +// . + +type Termios = struct { + Fc_iflag Tcflag_t + Fc_oflag Tcflag_t + Fc_cflag Tcflag_t + Fc_lflag Tcflag_t + Fc_line Cc_t + Fc_cc [32]Cc_t + F__ccgo_pad1 [3]byte + Fc_ispeed Speed_t + Fc_ospeed Speed_t +} /* termios-struct.h:24:1 */ + +// - +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 + +// System wide defaults for terminal state. Linux version. + +// Defaults on "first" open. + +// Control Character Defaults +// compat + +// PROTECTED INCLUSION ENDS HERE + +// #define TTYDEFCHARS to include an array of default control characters. + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/capi_linux_riscv64.go b/vendor/modernc.org/libc/time/capi_linux_riscv64.go new file mode 100644 index 00000000..31f1a1a2 --- /dev/null +++ b/vendor/modernc.org/libc/time/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o time/time_linux_riscv64.go -pkgname time', DO NOT EDIT. + +package time + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/time/time_linux_riscv64.go b/vendor/modernc.org/libc/time/time_linux_riscv64.go new file mode 100644 index 00000000..e60813d5 --- /dev/null +++ b/vendor/modernc.org/libc/time/time_linux_riscv64.go @@ -0,0 +1,711 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o time/time_linux_riscv64.go -pkgname time', DO NOT EDIT. + +package time + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLOCK_BOOTTIME = 7 + CLOCK_BOOTTIME_ALARM = 9 + CLOCK_MONOTONIC = 1 + CLOCK_MONOTONIC_COARSE = 6 + CLOCK_MONOTONIC_RAW = 4 + CLOCK_PROCESS_CPUTIME_ID = 2 + CLOCK_REALTIME = 0 + CLOCK_REALTIME_ALARM = 8 + CLOCK_REALTIME_COARSE = 5 + CLOCK_TAI = 11 + CLOCK_THREAD_CPUTIME_ID = 3 + TIMER_ABSTIME = 1 + TIME_UTC = 1 + X_ATFILE_SOURCE = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TIME_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_TYPES_LOCALE_T_H = 1 + X_BITS_TYPES___LOCALE_T_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SIZE_T_H = 0 + X_TIME_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This defines CLOCKS_PER_SEC, which is the number of processor clock +// ticks per second, and possibly a number of other constants. +// System-dependent timing definitions. Linux version. +// Copyright (C) 1996-2021 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 +// . + +// Never include this file directly; use instead. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// ISO/IEC 9899:1999 7.23.1: Components of time +// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +// the number per second of the value returned by the `clock' function. +// CAE XSH, Issue 4, Version 2: +// The value of CLOCKS_PER_SEC is required to be 1 million on all +// XSI-conformant systems. + +// Identifier for system-wide realtime clock. +// Monotonic system-wide clock. +// High-resolution timer from the CPU. +// Thread-specific CPU-time clock. +// Monotonic system-wide clock, not adjusted for frequency scaling. +// Identifier for system-wide realtime clock, updated only on ticks. +// Monotonic system-wide clock, updated only on ticks. +// Monotonic system-wide clock that includes time spent in suspension. +// Like CLOCK_REALTIME but also wakes suspended system. +// Like CLOCK_BOOTTIME but also wakes suspended system. +// Like CLOCK_REALTIME but in International Atomic Time. + +// Flag to indicate time is absolute. + +// Many of the typedefs and structs whose official home is this header +// may also need to be defined by other headers. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// ISO C `broken-down time' structure. +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* struct_tm.h:7:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// RISC-V is little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// NB: Include guard matches what uses. + +// POSIX.1b structure for timer start values and intervals. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } +} /* struct_itimerspec.h:8:1 */ + +type Pid_t = X__pid_t /* time.h:54:17 */ + +// Definition of locale_t. +// Copyright (C) 2017-2021 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 +// . + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper , 1997. +// +// 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 +// . + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/capi_linux_riscv64.go b/vendor/modernc.org/libc/unistd/capi_linux_riscv64.go new file mode 100644 index 00000000..24077fcd --- /dev/null +++ b/vendor/modernc.org/libc/unistd/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o unistd/unistd_linux_riscv64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go b/vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go new file mode 100644 index 00000000..a10adc11 --- /dev/null +++ b/vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go @@ -0,0 +1,1776 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o unistd/unistd_linux_riscv64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + F_LOCK = 1 + F_OK = 0 + F_TEST = 3 + F_TLOCK = 2 + F_ULOCK = 0 + L_INCR = 1 + L_SET = 0 + L_XTND = 2 + R_OK = 4 + SEEK_CUR = 1 + SEEK_END = 2 + SEEK_SET = 0 + STDERR_FILENO = 2 + STDIN_FILENO = 0 + STDOUT_FILENO = 1 + W_OK = 2 + X_OK = 1 + X_ATFILE_SOURCE = 1 + X_BITS_POSIX_OPT_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_GETOPT_CORE_H = 1 + X_GETOPT_POSIX_H = 1 + X_LFS64_ASYNCHRONOUS_IO = 1 + X_LFS64_LARGEFILE = 1 + X_LFS64_STDIO = 1 + X_LFS_ASYNCHRONOUS_IO = 1 + X_LFS_LARGEFILE = 1 + X_LP64 = 1 + X_POSIX2_CHAR_TERM = 200809 + X_POSIX2_C_BIND = 200809 + X_POSIX2_C_DEV = 200809 + X_POSIX2_C_VERSION = 200809 + X_POSIX2_LOCALEDEF = 200809 + X_POSIX2_SW_DEV = 200809 + X_POSIX2_VERSION = 200809 + X_POSIX_ADVISORY_INFO = 200809 + X_POSIX_ASYNCHRONOUS_IO = 200809 + X_POSIX_ASYNC_IO = 1 + X_POSIX_BARRIERS = 200809 + X_POSIX_CHOWN_RESTRICTED = 0 + X_POSIX_CLOCK_SELECTION = 200809 + X_POSIX_CPUTIME = 0 + X_POSIX_C_SOURCE = 200809 + X_POSIX_FSYNC = 200809 + X_POSIX_IPV6 = 200809 + X_POSIX_JOB_CONTROL = 1 + X_POSIX_MAPPED_FILES = 200809 + X_POSIX_MEMLOCK = 200809 + X_POSIX_MEMLOCK_RANGE = 200809 + X_POSIX_MEMORY_PROTECTION = 200809 + X_POSIX_MESSAGE_PASSING = 200809 + X_POSIX_MONOTONIC_CLOCK = 0 + X_POSIX_NO_TRUNC = 1 + X_POSIX_PRIORITIZED_IO = 200809 + X_POSIX_PRIORITY_SCHEDULING = 200809 + X_POSIX_RAW_SOCKETS = 200809 + X_POSIX_READER_WRITER_LOCKS = 200809 + X_POSIX_REALTIME_SIGNALS = 200809 + X_POSIX_REENTRANT_FUNCTIONS = 1 + X_POSIX_REGEXP = 1 + X_POSIX_SAVED_IDS = 1 + X_POSIX_SEMAPHORES = 200809 + X_POSIX_SHARED_MEMORY_OBJECTS = 200809 + X_POSIX_SHELL = 1 + X_POSIX_SOURCE = 1 + X_POSIX_SPAWN = 200809 + X_POSIX_SPIN_LOCKS = 200809 + X_POSIX_SPORADIC_SERVER = -1 + X_POSIX_SYNCHRONIZED_IO = 200809 + X_POSIX_THREADS = 200809 + X_POSIX_THREAD_ATTR_STACKADDR = 200809 + X_POSIX_THREAD_ATTR_STACKSIZE = 200809 + X_POSIX_THREAD_CPUTIME = 0 + X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 + X_POSIX_THREAD_PRIO_INHERIT = 200809 + X_POSIX_THREAD_PRIO_PROTECT = 200809 + X_POSIX_THREAD_PROCESS_SHARED = 200809 + X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 + X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 + X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 + X_POSIX_THREAD_SPORADIC_SERVER = -1 + X_POSIX_TIMEOUTS = 200809 + X_POSIX_TIMERS = 200809 + X_POSIX_TRACE = -1 + X_POSIX_TRACE_EVENT_FILTER = -1 + X_POSIX_TRACE_INHERIT = -1 + X_POSIX_TRACE_LOG = -1 + X_POSIX_TYPED_MEMORY_OBJECTS = -1 + X_POSIX_V6_ILP32_OFF32 = -1 + X_POSIX_V6_ILP32_OFFBIG = -1 + X_POSIX_V6_LP64_OFF64 = 1 + X_POSIX_V6_LPBIG_OFFBIG = -1 + X_POSIX_V7_ILP32_OFF32 = -1 + X_POSIX_V7_ILP32_OFFBIG = -1 + X_POSIX_V7_LP64_OFF64 = 1 + X_POSIX_V7_LPBIG_OFFBIG = -1 + X_POSIX_VDISABLE = 0 + X_POSIX_VERSION = 200809 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SIZE_T_H = 0 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + X_UNISTD_H = 1 + X_XBS5_ILP32_OFF32 = -1 + X_XBS5_ILP32_OFFBIG = -1 + X_XBS5_LP64_OFF64 = 1 + X_XBS5_LPBIG_OFFBIG = -1 + X_XOPEN_ENH_I18N = 1 + X_XOPEN_LEGACY = 1 + X_XOPEN_REALTIME = 1 + X_XOPEN_REALTIME_THREADS = 1 + X_XOPEN_SHM = 1 + X_XOPEN_UNIX = 1 + X_XOPEN_VERSION = 700 + X_XOPEN_XCU_VERSION = 4 + X_XOPEN_XPG2 = 1 + X_XOPEN_XPG3 = 1 + X_XOPEN_XPG4 = 1 + Linux = 1 + Unix = 1 +) + +// Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; +// the `_SC_*' symbols for the NAME argument to `sysconf'; +// and the `_CS_*' symbols for the NAME argument to `confstr'. +// `sysconf', `pathconf', and `confstr' NAME values. Generic version. +// Copyright (C) 1993-2021 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 +// . + +// Values for the NAME argument to `pathconf' and `fpathconf'. +const ( /* confname.h:24:1: */ + X_PC_LINK_MAX = 0 + X_PC_MAX_CANON = 1 + X_PC_MAX_INPUT = 2 + X_PC_NAME_MAX = 3 + X_PC_PATH_MAX = 4 + X_PC_PIPE_BUF = 5 + X_PC_CHOWN_RESTRICTED = 6 + X_PC_NO_TRUNC = 7 + X_PC_VDISABLE = 8 + X_PC_SYNC_IO = 9 + X_PC_ASYNC_IO = 10 + X_PC_PRIO_IO = 11 + X_PC_SOCK_MAXBUF = 12 + X_PC_FILESIZEBITS = 13 + X_PC_REC_INCR_XFER_SIZE = 14 + X_PC_REC_MAX_XFER_SIZE = 15 + X_PC_REC_MIN_XFER_SIZE = 16 + X_PC_REC_XFER_ALIGN = 17 + X_PC_ALLOC_SIZE_MIN = 18 + X_PC_SYMLINK_MAX = 19 + X_PC_2_SYMLINKS = 20 +) + +// Values for the NAME argument to `confstr'. +const ( /* confname.h:539:1: */ + X_CS_PATH = 0 // The default search path. + + X_CS_V6_WIDTH_RESTRICTED_ENVS = 1 + + X_CS_GNU_LIBC_VERSION = 2 + X_CS_GNU_LIBPTHREAD_VERSION = 3 + + X_CS_V5_WIDTH_RESTRICTED_ENVS = 4 + + X_CS_V7_WIDTH_RESTRICTED_ENVS = 5 + + X_CS_LFS_CFLAGS = 1000 + X_CS_LFS_LDFLAGS = 1001 + X_CS_LFS_LIBS = 1002 + X_CS_LFS_LINTFLAGS = 1003 + X_CS_LFS64_CFLAGS = 1004 + X_CS_LFS64_LDFLAGS = 1005 + X_CS_LFS64_LIBS = 1006 + X_CS_LFS64_LINTFLAGS = 1007 + + X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100 + X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 + X_CS_XBS5_ILP32_OFF32_LIBS = 1102 + X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 + X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 + X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 + X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106 + X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 + X_CS_XBS5_LP64_OFF64_CFLAGS = 1108 + X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109 + X_CS_XBS5_LP64_OFF64_LIBS = 1110 + X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 + X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 + X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 + X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 + X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 + + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 + X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 + X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 + X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126 + X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 + X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 + + X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 + X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 + X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 + X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 + X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 + X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 + X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 + X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 + X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 + X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 + X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142 + X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 + X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 + X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 + X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 + X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 + + X_CS_V6_ENV = 1148 + X_CS_V7_ENV = 1149 +) + +// Values for the argument to `sysconf'. +const ( /* confname.h:71:1: */ + X_SC_ARG_MAX = 0 + X_SC_CHILD_MAX = 1 + X_SC_CLK_TCK = 2 + X_SC_NGROUPS_MAX = 3 + X_SC_OPEN_MAX = 4 + X_SC_STREAM_MAX = 5 + X_SC_TZNAME_MAX = 6 + X_SC_JOB_CONTROL = 7 + X_SC_SAVED_IDS = 8 + X_SC_REALTIME_SIGNALS = 9 + X_SC_PRIORITY_SCHEDULING = 10 + X_SC_TIMERS = 11 + X_SC_ASYNCHRONOUS_IO = 12 + X_SC_PRIORITIZED_IO = 13 + X_SC_SYNCHRONIZED_IO = 14 + X_SC_FSYNC = 15 + X_SC_MAPPED_FILES = 16 + X_SC_MEMLOCK = 17 + X_SC_MEMLOCK_RANGE = 18 + X_SC_MEMORY_PROTECTION = 19 + X_SC_MESSAGE_PASSING = 20 + X_SC_SEMAPHORES = 21 + X_SC_SHARED_MEMORY_OBJECTS = 22 + X_SC_AIO_LISTIO_MAX = 23 + X_SC_AIO_MAX = 24 + X_SC_AIO_PRIO_DELTA_MAX = 25 + X_SC_DELAYTIMER_MAX = 26 + X_SC_MQ_OPEN_MAX = 27 + X_SC_MQ_PRIO_MAX = 28 + X_SC_VERSION = 29 + X_SC_PAGESIZE = 30 + X_SC_RTSIG_MAX = 31 + X_SC_SEM_NSEMS_MAX = 32 + X_SC_SEM_VALUE_MAX = 33 + X_SC_SIGQUEUE_MAX = 34 + X_SC_TIMER_MAX = 35 + + // Values for the argument to `sysconf' + // corresponding to _POSIX2_* symbols. + X_SC_BC_BASE_MAX = 36 + X_SC_BC_DIM_MAX = 37 + X_SC_BC_SCALE_MAX = 38 + X_SC_BC_STRING_MAX = 39 + X_SC_COLL_WEIGHTS_MAX = 40 + X_SC_EQUIV_CLASS_MAX = 41 + X_SC_EXPR_NEST_MAX = 42 + X_SC_LINE_MAX = 43 + X_SC_RE_DUP_MAX = 44 + X_SC_CHARCLASS_NAME_MAX = 45 + + X_SC_2_VERSION = 46 + X_SC_2_C_BIND = 47 + X_SC_2_C_DEV = 48 + X_SC_2_FORT_DEV = 49 + X_SC_2_FORT_RUN = 50 + X_SC_2_SW_DEV = 51 + X_SC_2_LOCALEDEF = 52 + + X_SC_PII = 53 + X_SC_PII_XTI = 54 + X_SC_PII_SOCKET = 55 + X_SC_PII_INTERNET = 56 + X_SC_PII_OSI = 57 + X_SC_POLL = 58 + X_SC_SELECT = 59 + X_SC_UIO_MAXIOV = 60 + X_SC_IOV_MAX = 60 + X_SC_PII_INTERNET_STREAM = 61 + X_SC_PII_INTERNET_DGRAM = 62 + X_SC_PII_OSI_COTS = 63 + X_SC_PII_OSI_CLTS = 64 + X_SC_PII_OSI_M = 65 + X_SC_T_IOV_MAX = 66 + + // Values according to POSIX 1003.1c (POSIX threads). + X_SC_THREADS = 67 + X_SC_THREAD_SAFE_FUNCTIONS = 68 + X_SC_GETGR_R_SIZE_MAX = 69 + X_SC_GETPW_R_SIZE_MAX = 70 + X_SC_LOGIN_NAME_MAX = 71 + X_SC_TTY_NAME_MAX = 72 + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73 + X_SC_THREAD_KEYS_MAX = 74 + X_SC_THREAD_STACK_MIN = 75 + X_SC_THREAD_THREADS_MAX = 76 + X_SC_THREAD_ATTR_STACKADDR = 77 + X_SC_THREAD_ATTR_STACKSIZE = 78 + X_SC_THREAD_PRIORITY_SCHEDULING = 79 + X_SC_THREAD_PRIO_INHERIT = 80 + X_SC_THREAD_PRIO_PROTECT = 81 + X_SC_THREAD_PROCESS_SHARED = 82 + + X_SC_NPROCESSORS_CONF = 83 + X_SC_NPROCESSORS_ONLN = 84 + X_SC_PHYS_PAGES = 85 + X_SC_AVPHYS_PAGES = 86 + X_SC_ATEXIT_MAX = 87 + X_SC_PASS_MAX = 88 + + X_SC_XOPEN_VERSION = 89 + X_SC_XOPEN_XCU_VERSION = 90 + X_SC_XOPEN_UNIX = 91 + X_SC_XOPEN_CRYPT = 92 + X_SC_XOPEN_ENH_I18N = 93 + X_SC_XOPEN_SHM = 94 + + X_SC_2_CHAR_TERM = 95 + X_SC_2_C_VERSION = 96 + X_SC_2_UPE = 97 + + X_SC_XOPEN_XPG2 = 98 + X_SC_XOPEN_XPG3 = 99 + X_SC_XOPEN_XPG4 = 100 + + X_SC_CHAR_BIT = 101 + X_SC_CHAR_MAX = 102 + X_SC_CHAR_MIN = 103 + X_SC_INT_MAX = 104 + X_SC_INT_MIN = 105 + X_SC_LONG_BIT = 106 + X_SC_WORD_BIT = 107 + X_SC_MB_LEN_MAX = 108 + X_SC_NZERO = 109 + X_SC_SSIZE_MAX = 110 + X_SC_SCHAR_MAX = 111 + X_SC_SCHAR_MIN = 112 + X_SC_SHRT_MAX = 113 + X_SC_SHRT_MIN = 114 + X_SC_UCHAR_MAX = 115 + X_SC_UINT_MAX = 116 + X_SC_ULONG_MAX = 117 + X_SC_USHRT_MAX = 118 + + X_SC_NL_ARGMAX = 119 + X_SC_NL_LANGMAX = 120 + X_SC_NL_MSGMAX = 121 + X_SC_NL_NMAX = 122 + X_SC_NL_SETMAX = 123 + X_SC_NL_TEXTMAX = 124 + + X_SC_XBS5_ILP32_OFF32 = 125 + X_SC_XBS5_ILP32_OFFBIG = 126 + X_SC_XBS5_LP64_OFF64 = 127 + X_SC_XBS5_LPBIG_OFFBIG = 128 + + X_SC_XOPEN_LEGACY = 129 + X_SC_XOPEN_REALTIME = 130 + X_SC_XOPEN_REALTIME_THREADS = 131 + + X_SC_ADVISORY_INFO = 132 + X_SC_BARRIERS = 133 + X_SC_BASE = 134 + X_SC_C_LANG_SUPPORT = 135 + X_SC_C_LANG_SUPPORT_R = 136 + X_SC_CLOCK_SELECTION = 137 + X_SC_CPUTIME = 138 + X_SC_THREAD_CPUTIME = 139 + X_SC_DEVICE_IO = 140 + X_SC_DEVICE_SPECIFIC = 141 + X_SC_DEVICE_SPECIFIC_R = 142 + X_SC_FD_MGMT = 143 + X_SC_FIFO = 144 + X_SC_PIPE = 145 + X_SC_FILE_ATTRIBUTES = 146 + X_SC_FILE_LOCKING = 147 + X_SC_FILE_SYSTEM = 148 + X_SC_MONOTONIC_CLOCK = 149 + X_SC_MULTI_PROCESS = 150 + X_SC_SINGLE_PROCESS = 151 + X_SC_NETWORKING = 152 + X_SC_READER_WRITER_LOCKS = 153 + X_SC_SPIN_LOCKS = 154 + X_SC_REGEXP = 155 + X_SC_REGEX_VERSION = 156 + X_SC_SHELL = 157 + X_SC_SIGNALS = 158 + X_SC_SPAWN = 159 + X_SC_SPORADIC_SERVER = 160 + X_SC_THREAD_SPORADIC_SERVER = 161 + X_SC_SYSTEM_DATABASE = 162 + X_SC_SYSTEM_DATABASE_R = 163 + X_SC_TIMEOUTS = 164 + X_SC_TYPED_MEMORY_OBJECTS = 165 + X_SC_USER_GROUPS = 166 + X_SC_USER_GROUPS_R = 167 + X_SC_2_PBS = 168 + X_SC_2_PBS_ACCOUNTING = 169 + X_SC_2_PBS_LOCATE = 170 + X_SC_2_PBS_MESSAGE = 171 + X_SC_2_PBS_TRACK = 172 + X_SC_SYMLOOP_MAX = 173 + X_SC_STREAMS = 174 + X_SC_2_PBS_CHECKPOINT = 175 + + X_SC_V6_ILP32_OFF32 = 176 + X_SC_V6_ILP32_OFFBIG = 177 + X_SC_V6_LP64_OFF64 = 178 + X_SC_V6_LPBIG_OFFBIG = 179 + + X_SC_HOST_NAME_MAX = 180 + X_SC_TRACE = 181 + X_SC_TRACE_EVENT_FILTER = 182 + X_SC_TRACE_INHERIT = 183 + X_SC_TRACE_LOG = 184 + + X_SC_LEVEL1_ICACHE_SIZE = 185 + X_SC_LEVEL1_ICACHE_ASSOC = 186 + X_SC_LEVEL1_ICACHE_LINESIZE = 187 + X_SC_LEVEL1_DCACHE_SIZE = 188 + X_SC_LEVEL1_DCACHE_ASSOC = 189 + X_SC_LEVEL1_DCACHE_LINESIZE = 190 + X_SC_LEVEL2_CACHE_SIZE = 191 + X_SC_LEVEL2_CACHE_ASSOC = 192 + X_SC_LEVEL2_CACHE_LINESIZE = 193 + X_SC_LEVEL3_CACHE_SIZE = 194 + X_SC_LEVEL3_CACHE_ASSOC = 195 + X_SC_LEVEL3_CACHE_LINESIZE = 196 + X_SC_LEVEL4_CACHE_SIZE = 197 + X_SC_LEVEL4_CACHE_ASSOC = 198 + X_SC_LEVEL4_CACHE_LINESIZE = 199 + // Leave room here, maybe we need a few more cache levels some day. + + X_SC_IPV6 = 235 + X_SC_RAW_SOCKETS = 236 + + X_SC_V7_ILP32_OFF32 = 237 + X_SC_V7_ILP32_OFFBIG = 238 + X_SC_V7_LP64_OFF64 = 239 + X_SC_V7_LPBIG_OFFBIG = 240 + + X_SC_SS_REPL_MAX = 241 + + X_SC_TRACE_EVENT_NAME_MAX = 242 + X_SC_TRACE_NAME_MAX = 243 + X_SC_TRACE_SYS_MAX = 244 + X_SC_TRACE_USER_EVENT_MAX = 245 + + X_SC_XOPEN_STREAMS = 246 + + X_SC_THREAD_ROBUST_PRIO_INHERIT = 247 + X_SC_THREAD_ROBUST_PRIO_PROTECT = 248 + + X_SC_MINSIGSTKSZ = 249 + + X_SC_SIGSTKSZ = 250 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.10 Symbolic Constants + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// These may be used to determine what facilities are present at compile time. +// Their values can be obtained at run time from `sysconf'. + +// POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. + +// These are not #ifdef __USE_POSIX2 because they are +// in the theoretically application-owned namespace. + +// The utilities on GNU systems also correspond to this version. + +// The utilities on GNU systems also correspond to this version. + +// This symbol was required until the 2001 edition of POSIX. + +// If defined, the implementation supports the +// C Language Bindings Option. + +// If defined, the implementation supports the +// C Language Development Utilities Option. + +// If defined, the implementation supports the +// Software Development Utilities Option. + +// If defined, the implementation supports the +// creation of locales with the localedef utility. + +// X/Open version number to which the library conforms. It is selectable. + +// Commands and utilities from XPG4 are available. + +// We are compatible with the old published standards as well. + +// The X/Open Unix extensions are available. + +// The enhanced internationalization capabilities according to XPG4.2 +// are present. + +// The legacy interfaces are also available. + +// Get values of POSIX options: +// +// If these symbols are defined, the corresponding features are +// always available. If not, they may be available sometimes. +// The current values can be obtained with `sysconf'. +// +// _POSIX_JOB_CONTROL Job control is supported. +// _POSIX_SAVED_IDS Processes have a saved set-user-ID +// and a saved set-group-ID. +// _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. +// _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. +// _POSIX_TIMERS POSIX.4 clocks and timers are supported. +// _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. +// _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. +// _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. +// _POSIX_FSYNC The fsync function is present. +// _POSIX_MAPPED_FILES Mapping of files to memory is supported. +// _POSIX_MEMLOCK Locking of all memory is supported. +// _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. +// _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. +// _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. +// _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. +// _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. +// _POSIX_THREADS POSIX.1c pthreads are supported. +// _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. +// _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. +// _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. +// _POSIX_THREAD_PRIORITY_SCHEDULING +// POSIX.1c thread execution scheduling supported. +// _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. +// _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. +// _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. +// _POSIX_PII Protocol-independent interfaces are supported. +// _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. +// _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. +// _POSIX_PII_INTERNET Internet family of protocols supported. +// _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. +// _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. +// _POSIX_PII_OSI ISO/OSI family of protocols supported. +// _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. +// _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. +// _POSIX_POLL Implementation supports `poll' function. +// _POSIX_SELECT Implementation supports `select' and `pselect'. +// +// _XOPEN_REALTIME X/Open realtime support is available. +// _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. +// _XOPEN_SHM Shared memory interface according to XPG4.2. +// +// _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit +// int, long, pointer, and off_t types. +// _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit +// int, long, and pointer and off_t with at least +// 64 bits. +// _XBS5_LP64_OFF64 Implementation provides environment with 32-bit +// int, and 64-bit long, pointer, and off_t types. +// _XBS5_LPBIG_OFFBIG Implementation provides environment with at +// least 32 bits int and long, pointer, and off_t +// with at least 64 bits. +// +// If any of these symbols is defined as -1, the corresponding option is not +// true for any file. If any is defined as other than -1, the corresponding +// option is true for all files. If a symbol is not defined at all, the value +// for a specific file can be obtained from `pathconf' and `fpathconf'. +// +// _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change +// the owner of a file. `chown' can only be used +// to change the group ID of a file to a group of +// which the calling process is a member. +// _POSIX_NO_TRUNC Pathname components longer than +// NAME_MAX generate an error. +// _POSIX_VDISABLE If defined, if the value of an element of the +// `c_cc' member of `struct termios' is +// _POSIX_VDISABLE, no character will have the +// effect associated with that element. +// _POSIX_SYNC_IO Synchronous I/O may be performed. +// _POSIX_ASYNC_IO Asynchronous I/O may be performed. +// _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. +// +// Support for the Large File Support interface is not generally available. +// If it is available the following constants are defined to one. +// _LFS64_LARGEFILE Low-level I/O supports large files. +// _LFS64_STDIO Standard I/O supports large files. +// + +// Define POSIX options for Linux. +// Copyright (C) 1996-2021 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; see the file COPYING.LIB. If +// not, see . + +// Job control is supported. + +// Processes have a saved set-user-ID and a saved set-group-ID. + +// Priority scheduling is not supported with the correct semantics, +// but GNU/Linux applications expect that the corresponding interfaces +// are available, even though the semantics do not meet the POSIX +// requirements. See glibc bug 14829. + +// Synchronizing file data is supported. + +// The fsync function is present. + +// Mapping of files to memory is supported. + +// Locking of all memory is supported. + +// Locking of ranges of memory is supported. + +// Setting of memory protections is supported. + +// Some filesystems allow all users to change file ownership. + +// `c_cc' member of 'struct termios' structure can be disabled by +// using the value _POSIX_VDISABLE. + +// Filenames are not silently truncated. + +// X/Open realtime support is available. + +// X/Open thread realtime support is available. + +// XPG4.2 shared memory is supported. + +// Tell we have POSIX threads. + +// We have the reentrant functions described in POSIX. + +// We provide priority scheduling for threads. + +// We support user-defined stack sizes. + +// We support user-defined stacks. + +// We support priority inheritence. + +// We support priority protection, though only for non-robust +// mutexes. + +// We support priority inheritence for robust mutexes. + +// We do not support priority protection for robust mutexes. + +// We support POSIX.1b semaphores. + +// Real-time signals are supported. + +// We support asynchronous I/O. +// Alternative name for Unix98. +// Support for prioritization is also available. + +// The LFS support in asynchronous I/O is also available. + +// The rest of the LFS is also available. + +// POSIX shared memory objects are implemented. + +// CPU-time clocks support needs to be checked at runtime. + +// Clock support in threads must be also checked at runtime. + +// GNU libc provides regular expression handling. + +// Reader/Writer locks are available. + +// We have a POSIX shell. + +// We support the Timeouts option. + +// We support spinlocks. + +// The `spawn' function family is supported. + +// We have POSIX timers. + +// The barrier functions are available. + +// POSIX message queues are available. + +// Thread process-shared synchronization is supported. + +// The monotonic clock might be available. + +// The clock selection interfaces are available. + +// Advisory information interfaces are available. + +// IPv6 support is available. + +// Raw socket support is available. + +// We have at least one terminal. + +// Neither process nor thread sporadic server interfaces is available. + +// trace.h is not available. + +// Typed memory objects are not available. + +// Get the environment definitions from Unix98. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This header should define the following symbols under the described +// situations. A value `1' means that the model is always supported, +// `-1' means it is never supported. Undefined means it cannot be +// statically decided. +// +// _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type +// _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type +// +// _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type +// _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type +// +// The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, +// _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, +// _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were +// used in previous versions of the Unix standard and are available +// only for compatibility. + +// We can never provide environments with 32-bit wide pointers. +// We also have no use (for now) for an environment with bigger pointers +// and offsets. + +// By default we have 64-bit wide `long int', pointers and `off_t'. + +// Standard file descriptors. + +// All functions that are not declared anywhere else. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Ssize_t = X__ssize_t /* unistd.h:220:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// The Single Unix specification says that some more types are +// available here. +type Gid_t = X__gid_t /* unistd.h:232:17 */ + +type Uid_t = X__uid_t /* unistd.h:237:17 */ + +type Off_t = X__off64_t /* unistd.h:245:19 */ + +type Useconds_t = X__useconds_t /* unistd.h:255:22 */ + +type Pid_t = X__pid_t /* unistd.h:260:17 */ + +type Intptr_t = X__intptr_t /* unistd.h:267:20 */ + +type Socklen_t = X__socklen_t /* unistd.h:274:21 */ + +// Define some macros helping to catch buffer overflows. + +// System-specific extensions. +// System-specific extensions of , Linux version. +// Copyright (C) 2019-2021 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 +// . + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/utime/capi_linux_riscv64.go b/vendor/modernc.org/libc/utime/capi_linux_riscv64.go new file mode 100644 index 00000000..e1131046 --- /dev/null +++ b/vendor/modernc.org/libc/utime/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o utime/utime_linux_riscv64.go -pkgname utime', DO NOT EDIT. + +package utime + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/utime/utime_linux_riscv64.go b/vendor/modernc.org/libc/utime/utime_linux_riscv64.go new file mode 100644 index 00000000..56149f5c --- /dev/null +++ b/vendor/modernc.org/libc/utime/utime_linux_riscv64.go @@ -0,0 +1,951 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o utime/utime_linux_riscv64.go -pkgname utime', DO NOT EDIT. + +package utime + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_ATFILE_SOURCE = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + X_UTIME_H = 1 + Linux = 1 + Unix = 1 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 5.6.6 Set File Access and Modification Times + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// Structure describing file times. +type Utimbuf = struct { + Factime X__time_t + Fmodtime X__time_t +} /* utime.h:36:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/uuid/uuid/capi_linux_riscv64.go b/vendor/modernc.org/libc/uuid/uuid/capi_linux_riscv64.go new file mode 100644 index 00000000..1439e9a1 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o uuid/uuid/uuid_linux_amd64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go new file mode 100644 index 00000000..84c78a0e --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go @@ -0,0 +1,1975 @@ +// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o uuid/uuid/uuid_linux_amd64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 + BYTE_ORDER = 1234 + CLOCK_BOOTTIME = 7 + CLOCK_BOOTTIME_ALARM = 9 + CLOCK_MONOTONIC = 1 + CLOCK_MONOTONIC_COARSE = 6 + CLOCK_MONOTONIC_RAW = 4 + CLOCK_PROCESS_CPUTIME_ID = 2 + CLOCK_REALTIME = 0 + CLOCK_REALTIME_ALARM = 8 + CLOCK_REALTIME_COARSE = 5 + CLOCK_TAI = 11 + CLOCK_THREAD_CPUTIME_ID = 3 + FD_SETSIZE = 1024 + LITTLE_ENDIAN = 1234 + PDP_ENDIAN = 3412 + TIMER_ABSTIME = 1 + TIME_UTC = 1 + UUID_STR_LEN = 37 + UUID_TYPE_DCE_MD5 = 3 + UUID_TYPE_DCE_RANDOM = 4 + UUID_TYPE_DCE_SECURITY = 2 + UUID_TYPE_DCE_SHA1 = 5 + UUID_TYPE_DCE_TIME = 1 + UUID_TYPE_MASK = 0xf + UUID_TYPE_SHIFT = 4 + UUID_VARIANT_DCE = 1 + UUID_VARIANT_MASK = 0x7 + UUID_VARIANT_MICROSOFT = 2 + UUID_VARIANT_NCS = 0 + UUID_VARIANT_OTHER = 3 + UUID_VARIANT_SHIFT = 5 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TIME_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_TYPES_LOCALE_T_H = 1 + X_BITS_TYPES___LOCALE_T_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_ENDIAN_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_GCC_SIZE_T = 0 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_STDC_PREDEF_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_TIME_H = 1 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_TIME_H = 1 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + X_UUID_UUID_H = 0 + Linux = 1 + Unix = 1 +) + +// Values for the first argument to `getitimer' and `setitimer'. +const ( /* time.h:89:1: */ + // Timers run in real time. + ITIMER_REAL = 0 + // Timers run only when the process is executing. + ITIMER_VIRTUAL = 1 + // Timers run when the process is executing and when + // the system is executing on behalf of the process. + ITIMER_PROF = 2 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Public include file for the UUID library +// +// Copyright (C) 1996, 1997, 1998 Theodore Ts'o. +// +// %Begin-Header% +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, and the entire permission notice in its entirety, +// including the disclaimer of warranties. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote +// products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF +// WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +// USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH +// DAMAGE. +// %End-Header% + +// Copyright (C) 1991-2020 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2020 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2020 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 +// . + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 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 +// . + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2020 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 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 +// . + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 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 +// . + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 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 +// . + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 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 +// . + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 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 +// . + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Copyright (C) 1991-2020 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-2020 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Structure crudely representing a timezone. +// This is obsolete and should never be used. +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:52:1 */ + +// Type of the second argument to `getitimer' and +// the second and third arguments `setitimer'. +type Itimerval = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t + } +} /* time.h:105:1 */ + +type X__itimer_which_t = int32 /* time.h:118:13 */ + +// Convenience macros for operations on timevals. +// NOTE: `timercmp' does not work for >= or <=. + +// Copyright (C) 1991-2020 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 +// . + +// ISO C99 Standard: 7.23 Date and time + +// Copyright (C) 1991-2020 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) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This defines CLOCKS_PER_SEC, which is the number of processor clock +// ticks per second, and possibly a number of other constants. +// System-dependent timing definitions. Linux version. +// Copyright (C) 1996-2020 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 +// . + +// Never include this file directly; use instead. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// ISO/IEC 9899:1999 7.23.1: Components of time +// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +// the number per second of the value returned by the `clock' function. +// CAE XSH, Issue 4, Version 2: +// The value of CLOCKS_PER_SEC is required to be 1 million on all +// XSI-conformant systems. + +// Identifier for system-wide realtime clock. +// Monotonic system-wide clock. +// High-resolution timer from the CPU. +// Thread-specific CPU-time clock. +// Monotonic system-wide clock, not adjusted for frequency scaling. +// Identifier for system-wide realtime clock, updated only on ticks. +// Monotonic system-wide clock, updated only on ticks. +// Monotonic system-wide clock that includes time spent in suspension. +// Like CLOCK_REALTIME but also wakes suspended system. +// Like CLOCK_BOOTTIME but also wakes suspended system. +// Like CLOCK_REALTIME but in International Atomic Time. + +// Flag to indicate time is absolute. + +// Many of the typedefs and structs whose official home is this header +// may also need to be defined by other headers. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// ISO C `broken-down time' structure. +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* struct_tm.h:7:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 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 +// . + +// Never include this file directly; use instead. + +// NB: Include guard matches what uses. + +// POSIX.1b structure for timer start values and intervals. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } +} /* struct_itimerspec.h:8:1 */ + +// Definition of locale_t. +// Copyright (C) 2017-2020 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 +// . + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper , 1997. +// +// 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 +// . + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +type Uuid_t = [16]uint8 /* uuid.h:44:23 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/capi_linux_riscv64.go b/vendor/modernc.org/libc/wctype/capi_linux_riscv64.go new file mode 100644 index 00000000..ca76e233 --- /dev/null +++ b/vendor/modernc.org/libc/wctype/capi_linux_riscv64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o wctype/wctype_linux_riscv64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go b/vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go new file mode 100644 index 00000000..c6785405 --- /dev/null +++ b/vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go @@ -0,0 +1,1121 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o wctype/wctype_linux_riscv64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + WEOF = 4294967295 + X_ATFILE_SOURCE = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_TYPES_LOCALE_T_H = 1 + X_BITS_TYPES___LOCALE_T_H = 1 + X_BITS_WCTYPE_WCHAR_H = 1 + X_DEFAULT_SOURCE = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_LP64 = 1 + X_POSIX_C_SOURCE = 200809 + X_POSIX_SOURCE = 1 + X_STDC_PREDEF_H = 1 + X_SYS_CDEFS_H = 1 + X_WCTYPE_H = 1 + X_WINT_T = 1 + Linux = 1 + Unix = 1 +) + +// The characteristics are stored always in network byte order (big +// endian). We define the bit value interpretations here dependent on the +// machine's byte order. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// RISC-V is little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +const ( /* wctype-wchar.h:56:1: */ + X__ISwupper = 0 // UPPERCASE. + X__ISwlower = 1 // lowercase. + X__ISwalpha = 2 // Alphabetic. + X__ISwdigit = 3 // Numeric. + X__ISwxdigit = 4 // Hexadecimal numeric. + X__ISwspace = 5 // Whitespace. + X__ISwprint = 6 // Printing. + X__ISwgraph = 7 // Graphical. + X__ISwblank = 8 // Blank (usually SPC and TAB). + X__ISwcntrl = 9 // Control character. + X__ISwpunct = 10 // Punctuation. + X__ISwalnum = 11 // Alphanumeric. + + X_ISwupper = 16777216 // UPPERCASE. + X_ISwlower = 33554432 // lowercase. + X_ISwalpha = 67108864 // Alphabetic. + X_ISwdigit = 134217728 // Numeric. + X_ISwxdigit = 268435456 // Hexadecimal numeric. + X_ISwspace = 536870912 // Whitespace. + X_ISwprint = 1073741824 // Printing. + X_ISwgraph = -2147483648 // Graphical. + X_ISwblank = 65536 // Blank (usually SPC and TAB). + X_ISwcntrl = 131072 // Control character. + X_ISwpunct = 262144 // Punctuation. + X_ISwalnum = 524288 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright (C) 1996-2021 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 +// . + +// ISO C99 Standard: 7.25 +// Wide character classification and mapping utilities + +// Copyright (C) 1991-2021 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 +// . + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// __STDC_WANT_IEC_60559_EXT__ +// ISO C2X interfaces defined only in Annex F. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) +// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// , which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// Features part to handle 64-bit time_t support. +// Copyright (C) 2021 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 +// . + +// We need to know the word size in order to check the time size. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of , this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2021 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 +// . + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2021 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 +// . + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// supported anymore. + +// Some user header file might have defined this before. + +// Compilers that lack __has_attribute may object to +// #if defined __has_attribute && __has_attribute (...) +// even though they do not need to evaluate the right-hand side of the &&. +// Similarly for __has_builtin, etc. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this only works with +// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC and clang have various useful declarations that can be made with +// the '__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonnull function attribute marks pointer parameters that +// must not be NULL. + +// The returns_nonnull function attribute marks the return type of the function +// as always being non-null. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above, and in clang. +// It works also in C++ mode (outside of arrays), but only when spelled +// as '__restrict', not 'restrict'. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 and clang support this. +// This syntax is not usable in C++ mode. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// The #ifndef lets Gnulib avoid including these on non-glibc +// platforms, where the includes typically do not exist. +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Properties of long double type. ldbl-128 version. +// Copyright (C) 2016-2021 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 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 +// . + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// Designates a 1-based positional argument ref-index of pointer type +// that can be used to access size-index elements of the pointed-to +// array according to access mode, or at least one element when +// size-index is not provided: +// access (access-mode, [, ]) + +// Designates dealloc as a function to call to deallocate objects +// allocated by the declared function. + +// Specify that a function such as setjmp or vfork may return +// twice. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// Some versions of stddef.h provide wint_t, even though neither the +// C nor C++ standards, nor POSIX, specifies this. We assume that +// stddef.h will define the macro _WINT_T if and only if it provides +// wint_t, and conversely, that it will avoid providing wint_t if +// _WINT_T is already defined. + +// Integral type unchanged by default argument promotions that can +// hold any value corresponding to members of the extended character +// set, as well as at least one value that does not correspond to any +// member of the extended character set. + +type Wint_t = uint32 /* wint_t.h:20:23 */ + +// Constant expression of type `wint_t' whose value does not correspond +// to any member of the extended character set. + +// Some definitions from this header also appear in in +// Unix98 mode. +// Copyright (C) 1996-2021 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 +// . + +// ISO C99 Standard: 7.25 +// Wide character classification and mapping utilities + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// The definitions in this header are specified to appear in +// in ISO C99, but in in Unix98. _GNU_SOURCE follows C99. + +// Scalar type that can hold values which represent locale-specific +// character classifications. +type Wctype_t = uint64 /* wctype-wchar.h:38:27 */ + +// Extensible wide-character mapping functions: 7.15.3.2. + +// Scalar type that can hold values which represent locale-specific +// character mappings. +type Wctrans_t = uintptr /* wctype.h:48:25 */ + +// POSIX.1-2008 extended locale interface (see locale.h). +// Definition of locale_t. +// Copyright (C) 2017-2021 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 +// . + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper , 1997. +// +// 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 +// . + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/memory/CONTRIBUTORS b/vendor/modernc.org/memory/CONTRIBUTORS index 988458ca..72167486 100644 --- a/vendor/modernc.org/memory/CONTRIBUTORS +++ b/vendor/modernc.org/memory/CONTRIBUTORS @@ -8,3 +8,4 @@ Jan Mercl <0xjnml@gmail.com> Steffen Butzer +ZHU Zijia diff --git a/vendor/modernc.org/memory/LICENSE-GO b/vendor/modernc.org/memory/LICENSE-GO new file mode 100644 index 00000000..6a66aea5 --- /dev/null +++ b/vendor/modernc.org/memory/LICENSE-GO @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/modernc.org/memory/Makefile b/vendor/modernc.org/memory/Makefile index fbb3e4ee..d0c9c254 100644 --- a/vendor/modernc.org/memory/Makefile +++ b/vendor/modernc.org/memory/Makefile @@ -36,14 +36,23 @@ editor: gofmt -l -s -w *.go GOOS=darwin GOARCH=amd64 go build GOOS=darwin GOARCH=arm64 go build + GOOS=freebsd GOARCH=386 go build + GOOS=freebsd GOARCH=amd64 go build GOOS=linux GOARCH=386 go build GOOS=linux GOARCH=amd64 go build GOOS=linux GOARCH=arm go build GOOS=linux GOARCH=arm64 go build + GOOS=linux GOARCH=mips go build + GOOS=linux GOARCH=mips64le go build + GOOS=linux GOARCH=mipsle go build + GOOS=linux GOARCH=riscv64 go build GOOS=linux GOARCH=s390x go build + GOOS=netbsd GOARCH=386 go build + GOOS=netbsd GOARCH=amd64 go build + GOOS=openbsd GOARCH=386 go build + GOOS=openbsd GOARCH=amd64 go build GOOS=windows GOARCH=386 go build GOOS=windows GOARCH=amd64 go build - go test 2>&1 | tee log internalError: egrep -ho '"internal error.*"' *.go | sort | cat -n diff --git a/vendor/modernc.org/memory/counters.go b/vendor/modernc.org/memory/counters.go index ca4024fc..d50a3612 100644 --- a/vendor/modernc.org/memory/counters.go +++ b/vendor/modernc.org/memory/counters.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build memory.counters // +build memory.counters package memory // import "modernc.org/memory" diff --git a/vendor/modernc.org/memory/memory32.go b/vendor/modernc.org/memory/memory32.go index f13a8ae6..ae1a49e7 100644 --- a/vendor/modernc.org/memory/memory32.go +++ b/vendor/modernc.org/memory/memory32.go @@ -2,8 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 || arm || armbe || mips || mipsle || ppc || ppc64le || s390 || s390x || sparc // +build 386 arm armbe mips mipsle ppc ppc64le s390 s390x sparc package memory // import "modernc.org/memory" -type rawmem [1<<31 - 1]byte +type rawmem [1<<31 - 2]byte diff --git a/vendor/modernc.org/memory/memory64.go b/vendor/modernc.org/memory/memory64.go index 2c7cfee1..57c88365 100644 --- a/vendor/modernc.org/memory/memory64.go +++ b/vendor/modernc.org/memory/memory64.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64 amd64p32 arm64 arm64be mips64 mips64le mips64p32 mips64p32le ppc64 sparc64 +//go:build amd64 || amd64p32 || arm64 || arm64be || mips64 || mips64le || mips64p32 || mips64p32le || ppc64 || sparc64 || riscv64 +// +build amd64 amd64p32 arm64 arm64be mips64 mips64le mips64p32 mips64p32le ppc64 sparc64 riscv64 package memory // import "modernc.org/memory" diff --git a/vendor/modernc.org/memory/mmap_fallback.go b/vendor/modernc.org/memory/mmap_fallback.go new file mode 100644 index 00000000..35b2f2b0 --- /dev/null +++ b/vendor/modernc.org/memory/mmap_fallback.go @@ -0,0 +1,17 @@ +// Copyright 2017 The Memory Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +//go:build (darwin && (amd64 || arm64)) || (openbsd && (386 || amd64)) + +package memory + +import ( + _ "unsafe" +) + +// Function syscall.mmap for darwin and openbsd calls internal/abi.FuncPCABI0, +// which is implemented as a compile intrinsic so the code cannot be reused. +// Using go:linkname directive to link mmapSyscall to syscall.mmap + +//go:linkname mmapSyscall syscall.mmap +func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) diff --git a/vendor/modernc.org/memory/mmap_freebsd_32.go b/vendor/modernc.org/memory/mmap_freebsd_32.go new file mode 100644 index 00000000..47b29962 --- /dev/null +++ b/vendor/modernc.org/memory/mmap_freebsd_32.go @@ -0,0 +1,21 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE-GO file. + +//go:build freebsd && 386 + +package memory + +import ( + "syscall" +) + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_freebsd_386.go +func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := syscall.Syscall9(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/modernc.org/memory/mmap_freebsd_64.go b/vendor/modernc.org/memory/mmap_freebsd_64.go new file mode 100644 index 00000000..87a4c238 --- /dev/null +++ b/vendor/modernc.org/memory/mmap_freebsd_64.go @@ -0,0 +1,21 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE-GO file. + +//go:build freebsd && amd64 + +package memory + +import ( + "syscall" +) + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_freebsd_amd64.go;l=1337-1346 +func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := syscall.Syscall6(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/modernc.org/memory/mmap_linux_32.go b/vendor/modernc.org/memory/mmap_linux_32.go new file mode 100644 index 00000000..996805c4 --- /dev/null +++ b/vendor/modernc.org/memory/mmap_linux_32.go @@ -0,0 +1,33 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE-GO file. + +//go:build linux && (386 || arm || mips || mipsle) + +package memory + +import ( + "syscall" +) + +// Function syscall.mmap and syscall.mmap2 are same for linux/386, linux/arm, +// linux/mips and linux/mipsle + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/syscall_linux_386.go;l=99-105 +func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + page := uintptr(offset / 4096) + if offset != int64(page)*4096 { + return 0, syscall.EINVAL + } + return mmap2Syscall(addr, length, prot, flags, fd, page) +} + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_linux_386.go;l=1361-1370 +func mmap2Syscall(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { + r0, _, e1 := syscall.Syscall6(syscall.SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/modernc.org/memory/mmap_linux_64.go b/vendor/modernc.org/memory/mmap_linux_64.go new file mode 100644 index 00000000..9f65896d --- /dev/null +++ b/vendor/modernc.org/memory/mmap_linux_64.go @@ -0,0 +1,24 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE-GO file. + +//go:build linux && (amd64 || arm64 || mips64 || mips64le || riscv64) + +package memory + +import ( + "syscall" +) + +// Function syscall.mmap is same for linux/amd64, linux/arm64, linux/mips64, +// linux/mips64le and linux/riscv64. + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_linux_amd64.go;l=1575-1584 +func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := syscall.Syscall6(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/modernc.org/memory/mmap_linux_s390x.go b/vendor/modernc.org/memory/mmap_linux_s390x.go new file mode 100644 index 00000000..bf7260e5 --- /dev/null +++ b/vendor/modernc.org/memory/mmap_linux_s390x.go @@ -0,0 +1,23 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE-GO file. + +package memory + +import ( + "syscall" + "unsafe" +) + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/syscall_linux_s390x.go;l=105-115 +// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct. +// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in . +func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)} + r0, _, e1 := syscall.Syscall(syscall.SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0) + xaddr = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/modernc.org/memory/mmap_netbsd_32.go b/vendor/modernc.org/memory/mmap_netbsd_32.go new file mode 100644 index 00000000..bd1a32c8 --- /dev/null +++ b/vendor/modernc.org/memory/mmap_netbsd_32.go @@ -0,0 +1,21 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE-GO file. + +//go:build netbsd && 386 + +package memory + +import ( + "syscall" +) + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_freebsd_386.go +func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := syscall.Syscall9(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/modernc.org/memory/mmap_netbsd_64.go b/vendor/modernc.org/memory/mmap_netbsd_64.go new file mode 100644 index 00000000..ced5dbc9 --- /dev/null +++ b/vendor/modernc.org/memory/mmap_netbsd_64.go @@ -0,0 +1,21 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE-GO file. + +//go:build netbsd && amd64 + +package memory + +import ( + "syscall" +) + +// https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_netbsd_amd64.go;l=1190 +func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := syscall.Syscall9(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/modernc.org/memory/mmap_unix.go b/vendor/modernc.org/memory/mmap_unix.go index 8fee87e6..d076ad03 100644 --- a/vendor/modernc.org/memory/mmap_unix.go +++ b/vendor/modernc.org/memory/mmap_unix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE-MMAP-GO file. +//go:build darwin || dragonfly || freebsd || linux || openbsd || solaris || netbsd // +build darwin dragonfly freebsd linux openbsd solaris netbsd // Modifications (c) 2017 The Memory Authors. @@ -11,7 +12,6 @@ package memory // import "modernc.org/memory" import ( "os" "syscall" - "unsafe" ) const pageSizeLog = 20 @@ -33,13 +33,17 @@ func unmap(addr uintptr, size int) error { // pageSize aligned. func mmap(size int) (uintptr, int, error) { size = roundup(size, osPageSize) - b, err := syscall.Mmap(-1, 0, size+pageSize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_SHARED|syscall.MAP_ANON) + // The actual mmap syscall varies by architecture. mmapSyscall provides same + // functionality as the unexported funtion syscall.mmap and is declared in + // mmap_*_*.go and mmap_fallback.go. To add support for a new architecture, + // check function mmap in src/syscall/syscall_*_*.go or + // src/syscall/zsyscall_*_*.go in Go's source code. + p, err := mmapSyscall(0, uintptr(size+pageSize), syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_PRIVATE|syscall.MAP_ANON, -1, 0) if err != nil { return 0, 0, err } - n := len(b) - p := uintptr(unsafe.Pointer(&b[0])) + n := size + pageSize if p&uintptr(osPageMask) != 0 { panic("internal error") } diff --git a/vendor/modernc.org/memory/nocounters.go b/vendor/modernc.org/memory/nocounters.go index 40af6a9a..090eb958 100644 --- a/vendor/modernc.org/memory/nocounters.go +++ b/vendor/modernc.org/memory/nocounters.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !memory.counters // +build !memory.counters package memory // import "modernc.org/memory" diff --git a/vendor/modernc.org/memory/trace_disabled.go b/vendor/modernc.org/memory/trace_disabled.go index 76e60766..eeebc9c7 100644 --- a/vendor/modernc.org/memory/trace_disabled.go +++ b/vendor/modernc.org/memory/trace_disabled.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !memory.trace // +build !memory.trace package memory // import "modernc.org/memory" diff --git a/vendor/modernc.org/memory/trace_enabled.go b/vendor/modernc.org/memory/trace_enabled.go index 55e65f4a..37b8e232 100644 --- a/vendor/modernc.org/memory/trace_enabled.go +++ b/vendor/modernc.org/memory/trace_enabled.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build memory.trace // +build memory.trace package memory // import "modernc.org/memory" diff --git a/vendor/modernc.org/sqlite/Makefile b/vendor/modernc.org/sqlite/Makefile index aa8269ae..8de69a00 100644 --- a/vendor/modernc.org/sqlite/Makefile +++ b/vendor/modernc.org/sqlite/Makefile @@ -23,6 +23,7 @@ all: editor GOOS=linux GOARCH=amd64 go build -v ./... GOOS=linux GOARCH=arm go build -v ./... GOOS=linux GOARCH=arm64 go build -v ./... + GOOS=linux GOARCH=riscv64 go build -v ./... GOOS=linux GOARCH=s390x go build -v ./... #GOOS=windows GOARCH=386 go build -v ./... GOOS=windows GOARCH=amd64 go build -v ./... @@ -52,6 +53,8 @@ build_all_targets: GOOS=linux GOARCH=arm go test -c -o /dev/null GOOS=linux GOARCH=arm64 go build -v ./... GOOS=linux GOARCH=arm64 go test -c -o /dev/null + GOOS=linux GOARCH=riscv64 go build -v ./... + GOOS=linux GOARCH=riscv64 go test -c -o /dev/null GOOS=linux GOARCH=s390x go build -v ./... GOOS=linux GOARCH=s390x go test -c -o /dev/null GOOS=netbsd GOARCH=amd64 go build -v ./... @@ -130,6 +133,12 @@ linux_arm64: CCGO_CPP=aarch64-linux-gnu-cpp TARGET_GOARCH=arm64 TARGET_GOOS=linux go generate 2>&1 | tee log-generate GOOS=linux GOARCH=arm64 go build -v ./... +# linux/riscv64 +linux_riscv64: + @echo "Should be executed only on linux/riscv64." + go generate 2>&1 | tee log-generate + go build -v ./... + # 3900x linux_s390x: @echo "Should be executed only on linux/amd64." diff --git a/vendor/modernc.org/sqlite/doc.go b/vendor/modernc.org/sqlite/doc.go index cda94472..f9e07b48 100644 --- a/vendor/modernc.org/sqlite/doc.go +++ b/vendor/modernc.org/sqlite/doc.go @@ -14,14 +14,15 @@ // // OS Arch SQLite version // ------------------------------ -// darwin amd64 3.38.0 -// darwin arm64 3.38.0 -// freebsd amd64 3.38.0 -// linux 386 3.38.0 -// linux amd64 3.38.0 -// linux arm 3.38.0 -// linux arm64 3.38.0 -// windows amd64 3.38.0 +// darwin amd64 3.38.1 +// darwin arm64 3.38.1 +// freebsd amd64 3.38.1 +// linux 386 3.38.1 +// linux amd64 3.38.1 +// linux arm 3.38.1 +// linux arm64 3.38.1 +// linux riscv64 3.38.1 +// windows amd64 3.38.1 // // Builders // @@ -31,6 +32,10 @@ // // Changelog // +// 2022-03-13 v1.15.0: +// +// Support linux/riscv64. +// // 2021-11-13 v1.14.0: // // Support windows/amd64. This target had previously only experimental status diff --git a/vendor/modernc.org/sqlite/generator.go b/vendor/modernc.org/sqlite/generator.go index b7176e4c..7f718ded 100644 --- a/vendor/modernc.org/sqlite/generator.go +++ b/vendor/modernc.org/sqlite/generator.go @@ -254,12 +254,12 @@ var ( sz int dev bool }{ - {sqliteDir, "https://www.sqlite.org/2022/sqlite-amalgamation-3380000.zip", 2457, false}, - {sqliteSrcDir, "https://www.sqlite.org/2022/sqlite-src-3380000.zip", 12814, false}, + {sqliteDir, "https://www.sqlite.org/2022/sqlite-amalgamation-3380100.zip", 2457, false}, + {sqliteSrcDir, "https://www.sqlite.org/2022/sqlite-src-3380100.zip", 12814, false}, } - sqliteDir = filepath.FromSlash("testdata/sqlite-amalgamation-3380000") - sqliteSrcDir = filepath.FromSlash("testdata/sqlite-src-3380000") + sqliteDir = filepath.FromSlash("testdata/sqlite-amalgamation-3380100") + sqliteSrcDir = filepath.FromSlash("testdata/sqlite-src-3380100") ) func download() { diff --git a/vendor/modernc.org/sqlite/lib/capi_darwin_amd64.go b/vendor/modernc.org/sqlite/lib/capi_darwin_amd64.go index 69d2e2cc..f9be9dd1 100644 --- a/vendor/modernc.org/sqlite/lib/capi_darwin_amd64.go +++ b/vendor/modernc.org/sqlite/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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_darwin_arm64.go b/vendor/modernc.org/sqlite/lib/capi_darwin_arm64.go index 8002803e..c0ae7ff6 100644 --- a/vendor/modernc.org/sqlite/lib/capi_darwin_arm64.go +++ b/vendor/modernc.org/sqlite/lib/capi_darwin_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_freebsd_386.go b/vendor/modernc.org/sqlite/lib/capi_freebsd_386.go index 1cebf582..64610b8c 100644 --- a/vendor/modernc.org/sqlite/lib/capi_freebsd_386.go +++ b/vendor/modernc.org/sqlite/lib/capi_freebsd_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_386.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_386.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_freebsd_amd64.go b/vendor/modernc.org/sqlite/lib/capi_freebsd_amd64.go index 3019119e..5f4a9319 100644 --- a/vendor/modernc.org/sqlite/lib/capi_freebsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/capi_freebsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_386.go b/vendor/modernc.org/sqlite/lib/capi_linux_386.go index 6866c773..38933a5a 100644 --- a/vendor/modernc.org/sqlite/lib/capi_linux_386.go +++ b/vendor/modernc.org/sqlite/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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_amd64.go b/vendor/modernc.org/sqlite/lib/capi_linux_amd64.go index 7a25bb58..82135f5f 100644 --- a/vendor/modernc.org/sqlite/lib/capi_linux_amd64.go +++ b/vendor/modernc.org/sqlite/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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_arm.go b/vendor/modernc.org/sqlite/lib/capi_linux_arm.go index 690bb17c..cf690706 100644 --- a/vendor/modernc.org/sqlite/lib/capi_linux_arm.go +++ b/vendor/modernc.org/sqlite/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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_arm64.go b/vendor/modernc.org/sqlite/lib/capi_linux_arm64.go index 108ac18c..91940ccb 100644 --- a/vendor/modernc.org/sqlite/lib/capi_linux_arm64.go +++ b/vendor/modernc.org/sqlite/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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_riscv64.go b/vendor/modernc.org/sqlite/lib/capi_linux_riscv64.go new file mode 100644 index 00000000..0ab8f850 --- /dev/null +++ b/vendor/modernc.org/sqlite/lib/capi_linux_riscv64.go @@ -0,0 +1,1340 @@ +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_riscv64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. + +package sqlite3 + +var CAPI = map[string]struct{}{ + "sqlite3AbsInt32": {}, + "sqlite3AddCheckConstraint": {}, + "sqlite3AddCollateType": {}, + "sqlite3AddColumn": {}, + "sqlite3AddDefaultValue": {}, + "sqlite3AddGenerated": {}, + "sqlite3AddInt64": {}, + "sqlite3AddNotNull": {}, + "sqlite3AddPrimaryKey": {}, + "sqlite3AddReturning": {}, + "sqlite3AffinityType": {}, + "sqlite3AggInfoPersistWalkerInit": {}, + "sqlite3AllocateIndexObject": {}, + "sqlite3AlterBeginAddColumn": {}, + "sqlite3AlterDropColumn": {}, + "sqlite3AlterFinishAddColumn": {}, + "sqlite3AlterFunctions": {}, + "sqlite3AlterRenameColumn": {}, + "sqlite3AlterRenameTable": {}, + "sqlite3AnalysisLoad": {}, + "sqlite3Analyze": {}, + "sqlite3ApiExit": {}, + "sqlite3ArrayAllocate": {}, + "sqlite3AtoF": {}, + "sqlite3Atoi": {}, + "sqlite3Atoi64": {}, + "sqlite3Attach": {}, + "sqlite3AuthCheck": {}, + "sqlite3AuthContextPop": {}, + "sqlite3AuthContextPush": {}, + "sqlite3AuthRead": {}, + "sqlite3AuthReadCol": {}, + "sqlite3AutoLoadExtensions": {}, + "sqlite3AutoincrementBegin": {}, + "sqlite3AutoincrementEnd": {}, + "sqlite3BackupRestart": {}, + "sqlite3BackupUpdate": {}, + "sqlite3BeginBenignMalloc": {}, + "sqlite3BeginTransaction": {}, + "sqlite3BeginTrigger": {}, + "sqlite3BeginWriteOperation": {}, + "sqlite3BenignMallocHooks": {}, + "sqlite3BinaryCompareCollSeq": {}, + "sqlite3BitvecBuiltinTest": {}, + "sqlite3BitvecClear": {}, + "sqlite3BitvecCreate": {}, + "sqlite3BitvecDestroy": {}, + "sqlite3BitvecSet": {}, + "sqlite3BitvecSize": {}, + "sqlite3BitvecTest": {}, + "sqlite3BitvecTestNotNull": {}, + "sqlite3BlobCompare": {}, + "sqlite3BtreeBeginStmt": {}, + "sqlite3BtreeBeginTrans": {}, + "sqlite3BtreeCheckpoint": {}, + "sqlite3BtreeClearCursor": {}, + "sqlite3BtreeClearTable": {}, + "sqlite3BtreeClearTableOfCursor": {}, + "sqlite3BtreeClose": {}, + "sqlite3BtreeCloseCursor": {}, + "sqlite3BtreeCommit": {}, + "sqlite3BtreeCommitPhaseOne": {}, + "sqlite3BtreeCommitPhaseTwo": {}, + "sqlite3BtreeConnectionCount": {}, + "sqlite3BtreeCopyFile": {}, + "sqlite3BtreeCount": {}, + "sqlite3BtreeCreateTable": {}, + "sqlite3BtreeCursor": {}, + "sqlite3BtreeCursorHasHint": {}, + "sqlite3BtreeCursorHasMoved": {}, + "sqlite3BtreeCursorHintFlags": {}, + "sqlite3BtreeCursorIsValidNN": {}, + "sqlite3BtreeCursorPin": {}, + "sqlite3BtreeCursorRestore": {}, + "sqlite3BtreeCursorSize": {}, + "sqlite3BtreeCursorUnpin": {}, + "sqlite3BtreeCursorZero": {}, + "sqlite3BtreeDelete": {}, + "sqlite3BtreeDropTable": {}, + "sqlite3BtreeEnter": {}, + "sqlite3BtreeEnterAll": {}, + "sqlite3BtreeEnterCursor": {}, + "sqlite3BtreeEof": {}, + "sqlite3BtreeFakeValidCursor": {}, + "sqlite3BtreeFirst": {}, + "sqlite3BtreeGetAutoVacuum": {}, + "sqlite3BtreeGetFilename": {}, + "sqlite3BtreeGetJournalname": {}, + "sqlite3BtreeGetMeta": {}, + "sqlite3BtreeGetPageSize": {}, + "sqlite3BtreeGetRequestedReserve": {}, + "sqlite3BtreeGetReserveNoMutex": {}, + "sqlite3BtreeIncrVacuum": {}, + "sqlite3BtreeIncrblobCursor": {}, + "sqlite3BtreeIndexMoveto": {}, + "sqlite3BtreeInsert": {}, + "sqlite3BtreeIntegerKey": {}, + "sqlite3BtreeIntegrityCheck": {}, + "sqlite3BtreeIsInBackup": {}, + "sqlite3BtreeIsReadonly": {}, + "sqlite3BtreeLast": {}, + "sqlite3BtreeLastPage": {}, + "sqlite3BtreeLeave": {}, + "sqlite3BtreeLeaveAll": {}, + "sqlite3BtreeLeaveCursor": {}, + "sqlite3BtreeLockTable": {}, + "sqlite3BtreeMaxPageCount": {}, + "sqlite3BtreeMaxRecordSize": {}, + "sqlite3BtreeNewDb": {}, + "sqlite3BtreeNext": {}, + "sqlite3BtreeOffset": {}, + "sqlite3BtreeOpen": {}, + "sqlite3BtreePager": {}, + "sqlite3BtreePayload": {}, + "sqlite3BtreePayloadChecked": {}, + "sqlite3BtreePayloadFetch": {}, + "sqlite3BtreePayloadSize": {}, + "sqlite3BtreePrevious": {}, + "sqlite3BtreePutData": {}, + "sqlite3BtreeRollback": {}, + "sqlite3BtreeRowCountEst": {}, + "sqlite3BtreeSavepoint": {}, + "sqlite3BtreeSchema": {}, + "sqlite3BtreeSchemaLocked": {}, + "sqlite3BtreeSecureDelete": {}, + "sqlite3BtreeSetAutoVacuum": {}, + "sqlite3BtreeSetCacheSize": {}, + "sqlite3BtreeSetMmapLimit": {}, + "sqlite3BtreeSetPageSize": {}, + "sqlite3BtreeSetPagerFlags": {}, + "sqlite3BtreeSetSpillSize": {}, + "sqlite3BtreeSetVersion": {}, + "sqlite3BtreeSharable": {}, + "sqlite3BtreeTableMoveto": {}, + "sqlite3BtreeTransferRow": {}, + "sqlite3BtreeTripAllCursors": {}, + "sqlite3BtreeTxnState": {}, + "sqlite3BtreeUpdateMeta": {}, + "sqlite3BuiltinFunctions": {}, + "sqlite3CantopenError": {}, + "sqlite3ChangeCookie": {}, + "sqlite3CheckCollSeq": {}, + "sqlite3CheckObjectName": {}, + "sqlite3Checkpoint": {}, + "sqlite3ClearTempRegCache": {}, + "sqlite3CloseExtensions": {}, + "sqlite3CloseSavepoints": {}, + "sqlite3CodeChangeCount": {}, + "sqlite3CodeDropTable": {}, + "sqlite3CodeRhsOfIN": {}, + "sqlite3CodeRowTrigger": {}, + "sqlite3CodeRowTriggerDirect": {}, + "sqlite3CodeSubselect": {}, + "sqlite3CodeVerifyNamedSchema": {}, + "sqlite3CodeVerifySchema": {}, + "sqlite3CollapseDatabaseArray": {}, + "sqlite3ColumnColl": {}, + "sqlite3ColumnDefault": {}, + "sqlite3ColumnExpr": {}, + "sqlite3ColumnIndex": {}, + "sqlite3ColumnSetColl": {}, + "sqlite3ColumnSetExpr": {}, + "sqlite3ColumnType": {}, + "sqlite3ColumnsFromExprList": {}, + "sqlite3CommitInternalChanges": {}, + "sqlite3CompareAffinity": {}, + "sqlite3CompileOptions": {}, + "sqlite3CompleteInsertion": {}, + "sqlite3ComputeGeneratedColumns": {}, + "sqlite3Config": {}, + "sqlite3ConnectionBlocked": {}, + "sqlite3ConnectionClosed": {}, + "sqlite3ConnectionUnlocked": {}, + "sqlite3CorruptError": {}, + "sqlite3CreateColumnExpr": {}, + "sqlite3CreateForeignKey": {}, + "sqlite3CreateFunc": {}, + "sqlite3CreateIndex": {}, + "sqlite3CreateView": {}, + "sqlite3CteDelete": {}, + "sqlite3CteNew": {}, + "sqlite3CtypeMap": {}, + "sqlite3DbFree": {}, + "sqlite3DbFreeNN": {}, + "sqlite3DbIsNamed": {}, + "sqlite3DbMallocRaw": {}, + "sqlite3DbMallocRawNN": {}, + "sqlite3DbMallocSize": {}, + "sqlite3DbMallocZero": {}, + "sqlite3DbNameToBtree": {}, + "sqlite3DbRealloc": {}, + "sqlite3DbReallocOrFree": {}, + "sqlite3DbSpanDup": {}, + "sqlite3DbStrDup": {}, + "sqlite3DbStrNDup": {}, + "sqlite3DecOrHexToI64": {}, + "sqlite3DefaultMutex": {}, + "sqlite3DefaultRowEst": {}, + "sqlite3DeferForeignKey": {}, + "sqlite3DeleteColumnNames": {}, + "sqlite3DeleteFrom": {}, + "sqlite3DeleteIndexSamples": {}, + "sqlite3DeleteTable": {}, + "sqlite3DeleteTrigger": {}, + "sqlite3DeleteTriggerStep": {}, + "sqlite3Dequote": {}, + "sqlite3DequoteExpr": {}, + "sqlite3DequoteToken": {}, + "sqlite3Detach": {}, + "sqlite3DropIndex": {}, + "sqlite3DropTable": {}, + "sqlite3DropTrigger": {}, + "sqlite3DropTriggerPtr": {}, + "sqlite3EndBenignMalloc": {}, + "sqlite3EndTable": {}, + "sqlite3EndTransaction": {}, + "sqlite3ErrStr": {}, + "sqlite3Error": {}, + "sqlite3ErrorClear": {}, + "sqlite3ErrorMsg": {}, + "sqlite3ErrorToParser": {}, + "sqlite3ErrorWithMsg": {}, + "sqlite3ExpandSubquery": {}, + "sqlite3ExpirePreparedStatements": {}, + "sqlite3Expr": {}, + "sqlite3ExprAddCollateString": {}, + "sqlite3ExprAddCollateToken": {}, + "sqlite3ExprAffinity": {}, + "sqlite3ExprAlloc": {}, + "sqlite3ExprAnalyzeAggList": {}, + "sqlite3ExprAnalyzeAggregates": {}, + "sqlite3ExprAnd": {}, + "sqlite3ExprAssignVarNumber": {}, + "sqlite3ExprAttachSubtrees": {}, + "sqlite3ExprCanBeNull": {}, + "sqlite3ExprCheckHeight": {}, + "sqlite3ExprCheckIN": {}, + "sqlite3ExprCode": {}, + "sqlite3ExprCodeCopy": {}, + "sqlite3ExprCodeExprList": {}, + "sqlite3ExprCodeFactorable": {}, + "sqlite3ExprCodeGeneratedColumn": {}, + "sqlite3ExprCodeGetColumn": {}, + "sqlite3ExprCodeGetColumnOfTable": {}, + "sqlite3ExprCodeLoadIndexColumn": {}, + "sqlite3ExprCodeMove": {}, + "sqlite3ExprCodeRunJustOnce": {}, + "sqlite3ExprCodeTarget": {}, + "sqlite3ExprCodeTemp": {}, + "sqlite3ExprColUsed": {}, + "sqlite3ExprCollSeq": {}, + "sqlite3ExprCollSeqMatch": {}, + "sqlite3ExprCompare": {}, + "sqlite3ExprCompareCollSeq": {}, + "sqlite3ExprCompareSkip": {}, + "sqlite3ExprCoveredByIndex": {}, + "sqlite3ExprDeferredDelete": {}, + "sqlite3ExprDelete": {}, + "sqlite3ExprDup": {}, + "sqlite3ExprForVectorField": {}, + "sqlite3ExprFunction": {}, + "sqlite3ExprFunctionUsable": {}, + "sqlite3ExprIdToTrueFalse": {}, + "sqlite3ExprIfFalse": {}, + "sqlite3ExprIfFalseDup": {}, + "sqlite3ExprIfTrue": {}, + "sqlite3ExprImpliesExpr": {}, + "sqlite3ExprImpliesNonNullRow": {}, + "sqlite3ExprIsConstant": {}, + "sqlite3ExprIsConstantNotJoin": {}, + "sqlite3ExprIsConstantOrFunction": {}, + "sqlite3ExprIsConstantOrGroupBy": {}, + "sqlite3ExprIsInteger": {}, + "sqlite3ExprIsTableConstant": {}, + "sqlite3ExprIsVector": {}, + "sqlite3ExprListAppend": {}, + "sqlite3ExprListAppendGrow": {}, + "sqlite3ExprListAppendNew": {}, + "sqlite3ExprListAppendVector": {}, + "sqlite3ExprListCheckLength": {}, + "sqlite3ExprListCompare": {}, + "sqlite3ExprListDelete": {}, + "sqlite3ExprListDup": {}, + "sqlite3ExprListFlags": {}, + "sqlite3ExprListSetName": {}, + "sqlite3ExprListSetSortOrder": {}, + "sqlite3ExprListSetSpan": {}, + "sqlite3ExprListToValues": {}, + "sqlite3ExprNNCollSeq": {}, + "sqlite3ExprNeedsNoAffinityChange": {}, + "sqlite3ExprReferencesUpdatedColumn": {}, + "sqlite3ExprSetHeightAndFlags": {}, + "sqlite3ExprSimplifiedAndOr": {}, + "sqlite3ExprSkipCollate": {}, + "sqlite3ExprSkipCollateAndLikely": {}, + "sqlite3ExprTruthValue": {}, + "sqlite3ExprUnmapAndDelete": {}, + "sqlite3ExprVectorSize": {}, + "sqlite3ExprWalkNoop": {}, + "sqlite3FaultSim": {}, + "sqlite3FindCollSeq": {}, + "sqlite3FindDb": {}, + "sqlite3FindDbName": {}, + "sqlite3FindFunction": {}, + "sqlite3FindInIndex": {}, + "sqlite3FindIndex": {}, + "sqlite3FindTable": {}, + "sqlite3FinishCoding": {}, + "sqlite3FinishTrigger": {}, + "sqlite3FixExpr": {}, + "sqlite3FixInit": {}, + "sqlite3FixSelect": {}, + "sqlite3FixSrcList": {}, + "sqlite3FixTriggerStep": {}, + "sqlite3FkActions": {}, + "sqlite3FkCheck": {}, + "sqlite3FkClearTriggerCache": {}, + "sqlite3FkDelete": {}, + "sqlite3FkDropTable": {}, + "sqlite3FkLocateIndex": {}, + "sqlite3FkOldmask": {}, + "sqlite3FkReferences": {}, + "sqlite3FkRequired": {}, + "sqlite3FreeIndex": {}, + "sqlite3Fts5Init": {}, + "sqlite3FunctionSearch": {}, + "sqlite3GenerateColumnNames": {}, + "sqlite3GenerateConstraintChecks": {}, + "sqlite3GenerateIndexKey": {}, + "sqlite3GenerateRowDelete": {}, + "sqlite3GenerateRowIndexDelete": {}, + "sqlite3Get4byte": {}, + "sqlite3GetBoolean": {}, + "sqlite3GetCollSeq": {}, + "sqlite3GetInt32": {}, + "sqlite3GetTempRange": {}, + "sqlite3GetTempReg": {}, + "sqlite3GetToken": {}, + "sqlite3GetUInt32": {}, + "sqlite3GetVTable": {}, + "sqlite3GetVarint": {}, + "sqlite3GetVarint32": {}, + "sqlite3GetVdbe": {}, + "sqlite3HaltConstraint": {}, + "sqlite3HasExplicitNulls": {}, + "sqlite3HashClear": {}, + "sqlite3HashFind": {}, + "sqlite3HashInit": {}, + "sqlite3HashInsert": {}, + "sqlite3HeaderSizeBtree": {}, + "sqlite3HeaderSizePcache": {}, + "sqlite3HeaderSizePcache1": {}, + "sqlite3HeapNearlyFull": {}, + "sqlite3HexToBlob": {}, + "sqlite3HexToInt": {}, + "sqlite3IdListAppend": {}, + "sqlite3IdListDelete": {}, + "sqlite3IdListDup": {}, + "sqlite3IdListIndex": {}, + "sqlite3IndexAffinityOk": {}, + "sqlite3IndexAffinityStr": {}, + "sqlite3IndexColumnAffinity": {}, + "sqlite3IndexHasDuplicateRootPage": {}, + "sqlite3IndexedByLookup": {}, + "sqlite3Init": {}, + "sqlite3InitCallback": {}, + "sqlite3InitOne": {}, + "sqlite3Insert": {}, + "sqlite3InsertBuiltinFuncs": {}, + "sqlite3Int64ToText": {}, + "sqlite3IntFloatCompare": {}, + "sqlite3InvokeBusyHandler": {}, + "sqlite3IsBinary": {}, + "sqlite3IsIdChar": {}, + "sqlite3IsLikeFunction": {}, + "sqlite3IsNaN": {}, + "sqlite3IsReadOnly": {}, + "sqlite3IsRowid": {}, + "sqlite3IsShadowTableOf": {}, + "sqlite3IsTrueOrFalse": {}, + "sqlite3JoinType": {}, + "sqlite3JournalIsInMemory": {}, + "sqlite3JournalModename": {}, + "sqlite3JournalOpen": {}, + "sqlite3JournalSize": {}, + "sqlite3JsonTableFunctions": {}, + "sqlite3KeyInfoAlloc": {}, + "sqlite3KeyInfoFromExprList": {}, + "sqlite3KeyInfoOfIndex": {}, + "sqlite3KeyInfoRef": {}, + "sqlite3KeyInfoUnref": {}, + "sqlite3KeywordCode": {}, + "sqlite3LeaveMutexAndCloseZombie": {}, + "sqlite3LocateCollSeq": {}, + "sqlite3LocateTable": {}, + "sqlite3LocateTableItem": {}, + "sqlite3LogEst": {}, + "sqlite3LogEstAdd": {}, + "sqlite3LogEstFromDouble": {}, + "sqlite3LogEstToInt": {}, + "sqlite3LookasideUsed": {}, + "sqlite3MPrintf": {}, + "sqlite3Malloc": {}, + "sqlite3MallocEnd": {}, + "sqlite3MallocInit": {}, + "sqlite3MallocMutex": {}, + "sqlite3MallocSize": {}, + "sqlite3MallocZero": {}, + "sqlite3MarkAllShadowTablesOf": {}, + "sqlite3MatchEName": {}, + "sqlite3MaterializeView": {}, + "sqlite3MayAbort": {}, + "sqlite3MemCompare": {}, + "sqlite3MemJournalOpen": {}, + "sqlite3MemSetDefault": {}, + "sqlite3MemdbInit": {}, + "sqlite3MisuseError": {}, + "sqlite3MulInt64": {}, + "sqlite3MultiWrite": {}, + "sqlite3MutexAlloc": {}, + "sqlite3MutexEnd": {}, + "sqlite3MutexInit": {}, + "sqlite3NameFromToken": {}, + "sqlite3NestedParse": {}, + "sqlite3NoopDestructor": {}, + "sqlite3NoopMutex": {}, + "sqlite3NotPureFunc": {}, + "sqlite3OomClear": {}, + "sqlite3OomFault": {}, + "sqlite3OpcodeName": {}, + "sqlite3OpcodeProperty": {}, + "sqlite3OpenSchemaTable": {}, + "sqlite3OpenTable": {}, + "sqlite3OpenTableAndIndices": {}, + "sqlite3OpenTempDatabase": {}, + "sqlite3OsAccess": {}, + "sqlite3OsCheckReservedLock": {}, + "sqlite3OsClose": {}, + "sqlite3OsCloseFree": {}, + "sqlite3OsCurrentTimeInt64": {}, + "sqlite3OsDelete": {}, + "sqlite3OsDeviceCharacteristics": {}, + "sqlite3OsDlClose": {}, + "sqlite3OsDlError": {}, + "sqlite3OsDlOpen": {}, + "sqlite3OsDlSym": {}, + "sqlite3OsFetch": {}, + "sqlite3OsFileControl": {}, + "sqlite3OsFileControlHint": {}, + "sqlite3OsFileSize": {}, + "sqlite3OsFullPathname": {}, + "sqlite3OsGetLastError": {}, + "sqlite3OsInit": {}, + "sqlite3OsLock": {}, + "sqlite3OsOpen": {}, + "sqlite3OsOpenMalloc": {}, + "sqlite3OsRandomness": {}, + "sqlite3OsRead": {}, + "sqlite3OsSectorSize": {}, + "sqlite3OsShmBarrier": {}, + "sqlite3OsShmLock": {}, + "sqlite3OsShmMap": {}, + "sqlite3OsShmUnmap": {}, + "sqlite3OsSleep": {}, + "sqlite3OsSync": {}, + "sqlite3OsTruncate": {}, + "sqlite3OsUnfetch": {}, + "sqlite3OsUnlock": {}, + "sqlite3OsWrite": {}, + "sqlite3PCacheBufferSetup": {}, + "sqlite3PCachePercentDirty": {}, + "sqlite3PCacheSetDefault": {}, + "sqlite3PExpr": {}, + "sqlite3PExprAddSelect": {}, + "sqlite3PageFree": {}, + "sqlite3PageMalloc": {}, + "sqlite3PagerBackupPtr": {}, + "sqlite3PagerBegin": {}, + "sqlite3PagerCacheStat": {}, + "sqlite3PagerCheckpoint": {}, + "sqlite3PagerClearCache": {}, + "sqlite3PagerClose": {}, + "sqlite3PagerCloseWal": {}, + "sqlite3PagerCommitPhaseOne": {}, + "sqlite3PagerCommitPhaseTwo": {}, + "sqlite3PagerDataVersion": {}, + "sqlite3PagerDontWrite": {}, + "sqlite3PagerExclusiveLock": {}, + "sqlite3PagerFile": {}, + "sqlite3PagerFilename": {}, + "sqlite3PagerFlush": {}, + "sqlite3PagerGet": {}, + "sqlite3PagerGetData": {}, + "sqlite3PagerGetExtra": {}, + "sqlite3PagerGetJournalMode": {}, + "sqlite3PagerIsMemdb": {}, + "sqlite3PagerIsreadonly": {}, + "sqlite3PagerJournalSizeLimit": {}, + "sqlite3PagerJournalname": {}, + "sqlite3PagerJrnlFile": {}, + "sqlite3PagerLockingMode": {}, + "sqlite3PagerLookup": {}, + "sqlite3PagerMaxPageCount": {}, + "sqlite3PagerMemUsed": {}, + "sqlite3PagerMovepage": {}, + "sqlite3PagerOkToChangeJournalMode": {}, + "sqlite3PagerOpen": {}, + "sqlite3PagerOpenSavepoint": {}, + "sqlite3PagerOpenWal": {}, + "sqlite3PagerPageRefcount": {}, + "sqlite3PagerPagecount": {}, + "sqlite3PagerReadFileheader": {}, + "sqlite3PagerRef": {}, + "sqlite3PagerRekey": {}, + "sqlite3PagerRollback": {}, + "sqlite3PagerSavepoint": {}, + "sqlite3PagerSetBusyHandler": {}, + "sqlite3PagerSetCachesize": {}, + "sqlite3PagerSetFlags": {}, + "sqlite3PagerSetJournalMode": {}, + "sqlite3PagerSetMmapLimit": {}, + "sqlite3PagerSetPagesize": {}, + "sqlite3PagerSetSpillsize": {}, + "sqlite3PagerSharedLock": {}, + "sqlite3PagerShrink": {}, + "sqlite3PagerSnapshotCheck": {}, + "sqlite3PagerSnapshotGet": {}, + "sqlite3PagerSnapshotOpen": {}, + "sqlite3PagerSnapshotRecover": {}, + "sqlite3PagerSnapshotUnlock": {}, + "sqlite3PagerSync": {}, + "sqlite3PagerTempSpace": {}, + "sqlite3PagerTruncateImage": {}, + "sqlite3PagerUnref": {}, + "sqlite3PagerUnrefNotNull": {}, + "sqlite3PagerUnrefPageOne": {}, + "sqlite3PagerVfs": {}, + "sqlite3PagerWalCallback": {}, + "sqlite3PagerWalSupported": {}, + "sqlite3PagerWrite": {}, + "sqlite3ParseObjectInit": {}, + "sqlite3ParseObjectReset": {}, + "sqlite3ParseUri": {}, + "sqlite3Parser": {}, + "sqlite3ParserAddCleanup": {}, + "sqlite3ParserFallback": {}, + "sqlite3ParserFinalize": {}, + "sqlite3ParserInit": {}, + "sqlite3Pcache1Mutex": {}, + "sqlite3PcacheCleanAll": {}, + "sqlite3PcacheClear": {}, + "sqlite3PcacheClearSyncFlags": {}, + "sqlite3PcacheClearWritable": {}, + "sqlite3PcacheClose": {}, + "sqlite3PcacheDirtyList": {}, + "sqlite3PcacheDrop": {}, + "sqlite3PcacheFetch": {}, + "sqlite3PcacheFetchFinish": {}, + "sqlite3PcacheFetchStress": {}, + "sqlite3PcacheInitialize": {}, + "sqlite3PcacheMakeClean": {}, + "sqlite3PcacheMakeDirty": {}, + "sqlite3PcacheMove": {}, + "sqlite3PcacheOpen": {}, + "sqlite3PcachePageRefcount": {}, + "sqlite3PcachePagecount": {}, + "sqlite3PcacheRef": {}, + "sqlite3PcacheRefCount": {}, + "sqlite3PcacheRelease": {}, + "sqlite3PcacheReleaseMemory": {}, + "sqlite3PcacheSetCachesize": {}, + "sqlite3PcacheSetPageSize": {}, + "sqlite3PcacheSetSpillsize": {}, + "sqlite3PcacheShrink": {}, + "sqlite3PcacheShutdown": {}, + "sqlite3PcacheSize": {}, + "sqlite3PcacheTruncate": {}, + "sqlite3PendingByte": {}, + "sqlite3Pragma": {}, + "sqlite3PragmaVtabRegister": {}, + "sqlite3PreferredTableName": {}, + "sqlite3PrimaryKeyIndex": {}, + "sqlite3PrngRestoreState": {}, + "sqlite3PrngSaveState": {}, + "sqlite3Put4byte": {}, + "sqlite3PutVarint": {}, + "sqlite3QuoteValue": {}, + "sqlite3ReadOnlyShadowTables": {}, + "sqlite3ReadSchema": {}, + "sqlite3RealSameAsInt": {}, + "sqlite3Realloc": {}, + "sqlite3RecordErrorByteOffset": {}, + "sqlite3RecordErrorOffsetOfExpr": {}, + "sqlite3ReferencesSrcList": {}, + "sqlite3RegisterBuiltinFunctions": {}, + "sqlite3RegisterDateTimeFunctions": {}, + "sqlite3RegisterJsonFunctions": {}, + "sqlite3RegisterLikeFunctions": {}, + "sqlite3RegisterPerConnectionBuiltinFunctions": {}, + "sqlite3Reindex": {}, + "sqlite3ReleaseTempRange": {}, + "sqlite3ReleaseTempReg": {}, + "sqlite3RenameExprUnmap": {}, + "sqlite3RenameExprlistUnmap": {}, + "sqlite3RenameTokenMap": {}, + "sqlite3RenameTokenRemap": {}, + "sqlite3ReportError": {}, + "sqlite3Reprepare": {}, + "sqlite3ResetAllSchemasOfConnection": {}, + "sqlite3ResetOneSchema": {}, + "sqlite3ResolveExprListNames": {}, + "sqlite3ResolveExprNames": {}, + "sqlite3ResolveOrderGroupBy": {}, + "sqlite3ResolvePartIdxLabel": {}, + "sqlite3ResolveSelectNames": {}, + "sqlite3ResolveSelfReference": {}, + "sqlite3ResultIntReal": {}, + "sqlite3ResultSetOfSelect": {}, + "sqlite3ResultStrAccum": {}, + "sqlite3RollbackAll": {}, + "sqlite3RootPageMoved": {}, + "sqlite3RowSetClear": {}, + "sqlite3RowSetDelete": {}, + "sqlite3RowSetInit": {}, + "sqlite3RowSetInsert": {}, + "sqlite3RowSetNext": {}, + "sqlite3RowSetTest": {}, + "sqlite3RowidConstraint": {}, + "sqlite3RtreeInit": {}, + "sqlite3RunParser": {}, + "sqlite3RunVacuum": {}, + "sqlite3SafetyCheckOk": {}, + "sqlite3SafetyCheckSickOrOk": {}, + "sqlite3Savepoint": {}, + "sqlite3SchemaClear": {}, + "sqlite3SchemaGet": {}, + "sqlite3SchemaToIndex": {}, + "sqlite3SectorSize": {}, + "sqlite3Select": {}, + "sqlite3SelectAddColumnTypeAndCollation": {}, + "sqlite3SelectDelete": {}, + "sqlite3SelectDestInit": {}, + "sqlite3SelectDup": {}, + "sqlite3SelectExprHeight": {}, + "sqlite3SelectNew": {}, + "sqlite3SelectOpName": {}, + "sqlite3SelectPopWith": {}, + "sqlite3SelectPrep": {}, + "sqlite3SelectTrace": {}, + "sqlite3SelectWalkFail": {}, + "sqlite3SelectWalkNoop": {}, + "sqlite3SelectWrongNumTermsError": {}, + "sqlite3SetJoinExpr": {}, + "sqlite3SetString": {}, + "sqlite3SetTextEncoding": {}, + "sqlite3ShadowTableName": {}, + "sqlite3SrcListAppend": {}, + "sqlite3SrcListAppendFromTerm": {}, + "sqlite3SrcListAppendList": {}, + "sqlite3SrcListAssignCursors": {}, + "sqlite3SrcListDelete": {}, + "sqlite3SrcListDup": {}, + "sqlite3SrcListEnlarge": {}, + "sqlite3SrcListFuncArgs": {}, + "sqlite3SrcListIndexedBy": {}, + "sqlite3SrcListLookup": {}, + "sqlite3SrcListShiftJoinType": {}, + "sqlite3StartTable": {}, + "sqlite3Stat4Column": {}, + "sqlite3Stat4ProbeFree": {}, + "sqlite3Stat4ProbeSetValue": {}, + "sqlite3Stat4ValueFromExpr": {}, + "sqlite3StatusDown": {}, + "sqlite3StatusHighwater": {}, + "sqlite3StatusUp": {}, + "sqlite3StatusValue": {}, + "sqlite3StdType": {}, + "sqlite3StdTypeAffinity": {}, + "sqlite3StdTypeLen": {}, + "sqlite3StdTypeMap": {}, + "sqlite3StmtCurrentTime": {}, + "sqlite3StorageColumnToTable": {}, + "sqlite3StrAccumEnlarge": {}, + "sqlite3StrAccumFinish": {}, + "sqlite3StrAccumInit": {}, + "sqlite3StrAccumSetError": {}, + "sqlite3StrBINARY": {}, + "sqlite3StrICmp": {}, + "sqlite3StrIHash": {}, + "sqlite3Strlen30": {}, + "sqlite3SubInt64": {}, + "sqlite3SubselectError": {}, + "sqlite3SystemError": {}, + "sqlite3TableAffinity": {}, + "sqlite3TableColumnAffinity": {}, + "sqlite3TableColumnToIndex": {}, + "sqlite3TableColumnToStorage": {}, + "sqlite3TableLock": {}, + "sqlite3TempInMemory": {}, + "sqlite3ThreadCreate": {}, + "sqlite3ThreadJoin": {}, + "sqlite3TokenInit": {}, + "sqlite3TransferBindings": {}, + "sqlite3TriggerColmask": {}, + "sqlite3TriggerDeleteStep": {}, + "sqlite3TriggerInsertStep": {}, + "sqlite3TriggerList": {}, + "sqlite3TriggerSelectStep": {}, + "sqlite3TriggerStepSrc": {}, + "sqlite3TriggerUpdateStep": {}, + "sqlite3TriggersExist": {}, + "sqlite3TwoPartName": {}, + "sqlite3UniqueConstraint": {}, + "sqlite3UnlinkAndDeleteIndex": {}, + "sqlite3UnlinkAndDeleteTable": {}, + "sqlite3UnlinkAndDeleteTrigger": {}, + "sqlite3Update": {}, + "sqlite3UpperToLower": {}, + "sqlite3UpsertAnalyzeTarget": {}, + "sqlite3UpsertDelete": {}, + "sqlite3UpsertDoUpdate": {}, + "sqlite3UpsertDup": {}, + "sqlite3UpsertNew": {}, + "sqlite3UpsertNextIsIPK": {}, + "sqlite3UpsertOfIndex": {}, + "sqlite3Utf16ByteLen": {}, + "sqlite3Utf16to8": {}, + "sqlite3Utf8CharLen": {}, + "sqlite3Utf8Read": {}, + "sqlite3VListAdd": {}, + "sqlite3VListNameToNum": {}, + "sqlite3VListNumToName": {}, + "sqlite3VMPrintf": {}, + "sqlite3Vacuum": {}, + "sqlite3ValueApplyAffinity": {}, + "sqlite3ValueBytes": {}, + "sqlite3ValueFree": {}, + "sqlite3ValueFromExpr": {}, + "sqlite3ValueNew": {}, + "sqlite3ValueSetNull": {}, + "sqlite3ValueSetStr": {}, + "sqlite3ValueText": {}, + "sqlite3VarintLen": {}, + "sqlite3VdbeAddFunctionCall": {}, + "sqlite3VdbeAddOp0": {}, + "sqlite3VdbeAddOp1": {}, + "sqlite3VdbeAddOp2": {}, + "sqlite3VdbeAddOp3": {}, + "sqlite3VdbeAddOp4": {}, + "sqlite3VdbeAddOp4Dup8": {}, + "sqlite3VdbeAddOp4Int": {}, + "sqlite3VdbeAddOpList": {}, + "sqlite3VdbeAddParseSchemaOp": {}, + "sqlite3VdbeAllocUnpackedRecord": {}, + "sqlite3VdbeAppendP4": {}, + "sqlite3VdbeBooleanValue": {}, + "sqlite3VdbeChangeEncoding": {}, + "sqlite3VdbeChangeOpcode": {}, + "sqlite3VdbeChangeP1": {}, + "sqlite3VdbeChangeP2": {}, + "sqlite3VdbeChangeP3": {}, + "sqlite3VdbeChangeP4": {}, + "sqlite3VdbeChangeP5": {}, + "sqlite3VdbeChangeToNoop": {}, + "sqlite3VdbeCheckFk": {}, + "sqlite3VdbeClearObject": {}, + "sqlite3VdbeCloseStatement": {}, + "sqlite3VdbeCountChanges": {}, + "sqlite3VdbeCreate": {}, + "sqlite3VdbeCurrentAddr": {}, + "sqlite3VdbeCursorMoveto": {}, + "sqlite3VdbeCursorRestore": {}, + "sqlite3VdbeDb": {}, + "sqlite3VdbeDelete": {}, + "sqlite3VdbeDeleteAuxData": {}, + "sqlite3VdbeDeletePriorOpcode": {}, + "sqlite3VdbeDisplayP4": {}, + "sqlite3VdbeEndCoroutine": {}, + "sqlite3VdbeEnter": {}, + "sqlite3VdbeError": {}, + "sqlite3VdbeExec": {}, + "sqlite3VdbeExpandSql": {}, + "sqlite3VdbeExplain": {}, + "sqlite3VdbeExplainParent": {}, + "sqlite3VdbeExplainPop": {}, + "sqlite3VdbeFinalize": {}, + "sqlite3VdbeFindCompare": {}, + "sqlite3VdbeFinishMoveto": {}, + "sqlite3VdbeFrameDelete": {}, + "sqlite3VdbeFrameMemDel": {}, + "sqlite3VdbeFrameRestore": {}, + "sqlite3VdbeFreeCursor": {}, + "sqlite3VdbeGetBoundValue": {}, + "sqlite3VdbeGetOp": {}, + "sqlite3VdbeGoto": {}, + "sqlite3VdbeHalt": {}, + "sqlite3VdbeHasSubProgram": {}, + "sqlite3VdbeIdxKeyCompare": {}, + "sqlite3VdbeIdxRowid": {}, + "sqlite3VdbeIntValue": {}, + "sqlite3VdbeIntegerAffinity": {}, + "sqlite3VdbeJumpHere": {}, + "sqlite3VdbeJumpHereOrPopInst": {}, + "sqlite3VdbeLeave": {}, + "sqlite3VdbeLinkSubProgram": {}, + "sqlite3VdbeList": {}, + "sqlite3VdbeLoadString": {}, + "sqlite3VdbeMakeLabel": {}, + "sqlite3VdbeMakeReady": {}, + "sqlite3VdbeMemAggValue": {}, + "sqlite3VdbeMemCast": {}, + "sqlite3VdbeMemClearAndResize": {}, + "sqlite3VdbeMemCopy": {}, + "sqlite3VdbeMemExpandBlob": {}, + "sqlite3VdbeMemFinalize": {}, + "sqlite3VdbeMemFromBtree": {}, + "sqlite3VdbeMemFromBtreeZeroOffset": {}, + "sqlite3VdbeMemGrow": {}, + "sqlite3VdbeMemHandleBom": {}, + "sqlite3VdbeMemInit": {}, + "sqlite3VdbeMemIntegerify": {}, + "sqlite3VdbeMemMakeWriteable": {}, + "sqlite3VdbeMemMove": {}, + "sqlite3VdbeMemNulTerminate": {}, + "sqlite3VdbeMemNumerify": {}, + "sqlite3VdbeMemRealify": {}, + "sqlite3VdbeMemRelease": {}, + "sqlite3VdbeMemSetDouble": {}, + "sqlite3VdbeMemSetInt64": {}, + "sqlite3VdbeMemSetNull": {}, + "sqlite3VdbeMemSetPointer": {}, + "sqlite3VdbeMemSetRowSet": {}, + "sqlite3VdbeMemSetStr": {}, + "sqlite3VdbeMemSetZeroBlob": {}, + "sqlite3VdbeMemShallowCopy": {}, + "sqlite3VdbeMemStringify": {}, + "sqlite3VdbeMemTooBig": {}, + "sqlite3VdbeMemTranslate": {}, + "sqlite3VdbeMultiLoad": {}, + "sqlite3VdbeNextOpcode": {}, + "sqlite3VdbeOneByteSerialTypeLen": {}, + "sqlite3VdbeParameterIndex": {}, + "sqlite3VdbeParser": {}, + "sqlite3VdbePreUpdateHook": {}, + "sqlite3VdbePrepareFlags": {}, + "sqlite3VdbeRealValue": {}, + "sqlite3VdbeRecordCompare": {}, + "sqlite3VdbeRecordCompareWithSkip": {}, + "sqlite3VdbeRecordUnpack": {}, + "sqlite3VdbeReset": {}, + "sqlite3VdbeResetStepResult": {}, + "sqlite3VdbeResolveLabel": {}, + "sqlite3VdbeReusable": {}, + "sqlite3VdbeRewind": {}, + "sqlite3VdbeRunOnlyOnce": {}, + "sqlite3VdbeSerialGet": {}, + "sqlite3VdbeSerialPut": {}, + "sqlite3VdbeSerialTypeLen": {}, + "sqlite3VdbeSetChanges": {}, + "sqlite3VdbeSetColName": {}, + "sqlite3VdbeSetNumCols": {}, + "sqlite3VdbeSetP4KeyInfo": {}, + "sqlite3VdbeSetSql": {}, + "sqlite3VdbeSetVarmask": {}, + "sqlite3VdbeSorterClose": {}, + "sqlite3VdbeSorterCompare": {}, + "sqlite3VdbeSorterInit": {}, + "sqlite3VdbeSorterNext": {}, + "sqlite3VdbeSorterReset": {}, + "sqlite3VdbeSorterRewind": {}, + "sqlite3VdbeSorterRowkey": {}, + "sqlite3VdbeSorterWrite": {}, + "sqlite3VdbeSwap": {}, + "sqlite3VdbeTakeOpArray": {}, + "sqlite3VdbeTransferError": {}, + "sqlite3VdbeUsesBtree": {}, + "sqlite3VectorErrorMsg": {}, + "sqlite3VectorFieldSubexpr": {}, + "sqlite3ViewGetColumnNames": {}, + "sqlite3VtabArgExtend": {}, + "sqlite3VtabArgInit": {}, + "sqlite3VtabBegin": {}, + "sqlite3VtabBeginParse": {}, + "sqlite3VtabCallConnect": {}, + "sqlite3VtabCallCreate": {}, + "sqlite3VtabCallDestroy": {}, + "sqlite3VtabClear": {}, + "sqlite3VtabCommit": {}, + "sqlite3VtabCreateModule": {}, + "sqlite3VtabDisconnect": {}, + "sqlite3VtabEponymousTableClear": {}, + "sqlite3VtabEponymousTableInit": {}, + "sqlite3VtabFinishParse": {}, + "sqlite3VtabImportErrmsg": {}, + "sqlite3VtabLock": {}, + "sqlite3VtabMakeWritable": {}, + "sqlite3VtabModuleUnref": {}, + "sqlite3VtabOverloadFunction": {}, + "sqlite3VtabRollback": {}, + "sqlite3VtabSavepoint": {}, + "sqlite3VtabSync": {}, + "sqlite3VtabUnlock": {}, + "sqlite3VtabUnlockList": {}, + "sqlite3WalBeginReadTransaction": {}, + "sqlite3WalBeginWriteTransaction": {}, + "sqlite3WalCallback": {}, + "sqlite3WalCheckpoint": {}, + "sqlite3WalClose": {}, + "sqlite3WalDbsize": {}, + "sqlite3WalDefaultHook": {}, + "sqlite3WalEndReadTransaction": {}, + "sqlite3WalEndWriteTransaction": {}, + "sqlite3WalExclusiveMode": {}, + "sqlite3WalFile": {}, + "sqlite3WalFindFrame": {}, + "sqlite3WalFrames": {}, + "sqlite3WalHeapMemory": {}, + "sqlite3WalLimit": {}, + "sqlite3WalOpen": {}, + "sqlite3WalReadFrame": {}, + "sqlite3WalSavepoint": {}, + "sqlite3WalSavepointUndo": {}, + "sqlite3WalSnapshotCheck": {}, + "sqlite3WalSnapshotGet": {}, + "sqlite3WalSnapshotOpen": {}, + "sqlite3WalSnapshotRecover": {}, + "sqlite3WalSnapshotUnlock": {}, + "sqlite3WalUndo": {}, + "sqlite3WalkExpr": {}, + "sqlite3WalkExprList": {}, + "sqlite3WalkSelect": {}, + "sqlite3WalkSelectExpr": {}, + "sqlite3WalkSelectFrom": {}, + "sqlite3WalkWinDefnDummyCallback": {}, + "sqlite3WalkerDepthDecrease": {}, + "sqlite3WalkerDepthIncrease": {}, + "sqlite3WhereAddLimit": {}, + "sqlite3WhereBegin": {}, + "sqlite3WhereBreakLabel": {}, + "sqlite3WhereClauseClear": {}, + "sqlite3WhereClauseInit": {}, + "sqlite3WhereCodeOneLoopStart": {}, + "sqlite3WhereContinueLabel": {}, + "sqlite3WhereEnd": {}, + "sqlite3WhereExplainBloomFilter": {}, + "sqlite3WhereExplainOneScan": {}, + "sqlite3WhereExprAnalyze": {}, + "sqlite3WhereExprListUsage": {}, + "sqlite3WhereExprUsage": {}, + "sqlite3WhereExprUsageNN": {}, + "sqlite3WhereFindTerm": {}, + "sqlite3WhereGetMask": {}, + "sqlite3WhereIsDistinct": {}, + "sqlite3WhereIsOrdered": {}, + "sqlite3WhereIsSorted": {}, + "sqlite3WhereMinMaxOptEarlyOut": {}, + "sqlite3WhereOkOnePass": {}, + "sqlite3WhereOrderByLimitOptLabel": {}, + "sqlite3WhereOutputRowCount": {}, + "sqlite3WhereSplit": {}, + "sqlite3WhereTabFuncArgs": {}, + "sqlite3WhereTrace": {}, + "sqlite3WhereUsesDeferredSeek": {}, + "sqlite3WindowAlloc": {}, + "sqlite3WindowAssemble": {}, + "sqlite3WindowAttach": {}, + "sqlite3WindowChain": {}, + "sqlite3WindowCodeInit": {}, + "sqlite3WindowCodeStep": {}, + "sqlite3WindowCompare": {}, + "sqlite3WindowDelete": {}, + "sqlite3WindowDup": {}, + "sqlite3WindowFunctions": {}, + "sqlite3WindowLink": {}, + "sqlite3WindowListDelete": {}, + "sqlite3WindowListDup": {}, + "sqlite3WindowRewrite": {}, + "sqlite3WindowUnlinkFromSelect": {}, + "sqlite3WindowUpdate": {}, + "sqlite3WithAdd": {}, + "sqlite3WithDelete": {}, + "sqlite3WithDup": {}, + "sqlite3WithPush": {}, + "sqlite3WritableSchema": {}, + "sqlite3_aggregate_context": {}, + "sqlite3_aggregate_count": {}, + "sqlite3_auto_extension": {}, + "sqlite3_autovacuum_pages": {}, + "sqlite3_backup_finish": {}, + "sqlite3_backup_init": {}, + "sqlite3_backup_pagecount": {}, + "sqlite3_backup_remaining": {}, + "sqlite3_backup_step": {}, + "sqlite3_bind_blob": {}, + "sqlite3_bind_blob64": {}, + "sqlite3_bind_double": {}, + "sqlite3_bind_int": {}, + "sqlite3_bind_int64": {}, + "sqlite3_bind_null": {}, + "sqlite3_bind_parameter_count": {}, + "sqlite3_bind_parameter_index": {}, + "sqlite3_bind_parameter_name": {}, + "sqlite3_bind_pointer": {}, + "sqlite3_bind_text": {}, + "sqlite3_bind_text16": {}, + "sqlite3_bind_text64": {}, + "sqlite3_bind_value": {}, + "sqlite3_bind_zeroblob": {}, + "sqlite3_bind_zeroblob64": {}, + "sqlite3_blob_bytes": {}, + "sqlite3_blob_close": {}, + "sqlite3_blob_open": {}, + "sqlite3_blob_read": {}, + "sqlite3_blob_reopen": {}, + "sqlite3_blob_write": {}, + "sqlite3_busy_handler": {}, + "sqlite3_busy_timeout": {}, + "sqlite3_cancel_auto_extension": {}, + "sqlite3_changes": {}, + "sqlite3_changes64": {}, + "sqlite3_clear_bindings": {}, + "sqlite3_close": {}, + "sqlite3_close_v2": {}, + "sqlite3_collation_needed": {}, + "sqlite3_collation_needed16": {}, + "sqlite3_column_blob": {}, + "sqlite3_column_bytes": {}, + "sqlite3_column_bytes16": {}, + "sqlite3_column_count": {}, + "sqlite3_column_database_name": {}, + "sqlite3_column_database_name16": {}, + "sqlite3_column_decltype": {}, + "sqlite3_column_decltype16": {}, + "sqlite3_column_double": {}, + "sqlite3_column_int": {}, + "sqlite3_column_int64": {}, + "sqlite3_column_name": {}, + "sqlite3_column_name16": {}, + "sqlite3_column_origin_name": {}, + "sqlite3_column_origin_name16": {}, + "sqlite3_column_table_name": {}, + "sqlite3_column_table_name16": {}, + "sqlite3_column_text": {}, + "sqlite3_column_text16": {}, + "sqlite3_column_type": {}, + "sqlite3_column_value": {}, + "sqlite3_commit_hook": {}, + "sqlite3_compileoption_get": {}, + "sqlite3_compileoption_used": {}, + "sqlite3_complete": {}, + "sqlite3_complete16": {}, + "sqlite3_config": {}, + "sqlite3_context_db_handle": {}, + "sqlite3_create_collation": {}, + "sqlite3_create_collation16": {}, + "sqlite3_create_collation_v2": {}, + "sqlite3_create_filename": {}, + "sqlite3_create_function": {}, + "sqlite3_create_function16": {}, + "sqlite3_create_function_v2": {}, + "sqlite3_create_module": {}, + "sqlite3_create_module_v2": {}, + "sqlite3_create_window_function": {}, + "sqlite3_data_count": {}, + "sqlite3_data_directory": {}, + "sqlite3_database_file_object": {}, + "sqlite3_db_cacheflush": {}, + "sqlite3_db_config": {}, + "sqlite3_db_filename": {}, + "sqlite3_db_handle": {}, + "sqlite3_db_mutex": {}, + "sqlite3_db_readonly": {}, + "sqlite3_db_release_memory": {}, + "sqlite3_db_status": {}, + "sqlite3_declare_vtab": {}, + "sqlite3_deserialize": {}, + "sqlite3_drop_modules": {}, + "sqlite3_enable_load_extension": {}, + "sqlite3_enable_shared_cache": {}, + "sqlite3_errcode": {}, + "sqlite3_errmsg": {}, + "sqlite3_errmsg16": {}, + "sqlite3_error_offset": {}, + "sqlite3_errstr": {}, + "sqlite3_exec": {}, + "sqlite3_expanded_sql": {}, + "sqlite3_expired": {}, + "sqlite3_extended_errcode": {}, + "sqlite3_extended_result_codes": {}, + "sqlite3_file_control": {}, + "sqlite3_filename_database": {}, + "sqlite3_filename_journal": {}, + "sqlite3_filename_wal": {}, + "sqlite3_finalize": {}, + "sqlite3_free": {}, + "sqlite3_free_filename": {}, + "sqlite3_free_table": {}, + "sqlite3_get_autocommit": {}, + "sqlite3_get_auxdata": {}, + "sqlite3_get_table": {}, + "sqlite3_global_recover": {}, + "sqlite3_hard_heap_limit64": {}, + "sqlite3_initialize": {}, + "sqlite3_interrupt": {}, + "sqlite3_keyword_check": {}, + "sqlite3_keyword_count": {}, + "sqlite3_keyword_name": {}, + "sqlite3_last_insert_rowid": {}, + "sqlite3_libversion": {}, + "sqlite3_libversion_number": {}, + "sqlite3_limit": {}, + "sqlite3_load_extension": {}, + "sqlite3_log": {}, + "sqlite3_malloc": {}, + "sqlite3_malloc64": {}, + "sqlite3_memory_alarm": {}, + "sqlite3_memory_highwater": {}, + "sqlite3_memory_used": {}, + "sqlite3_mprintf": {}, + "sqlite3_msize": {}, + "sqlite3_mutex_alloc": {}, + "sqlite3_mutex_enter": {}, + "sqlite3_mutex_free": {}, + "sqlite3_mutex_leave": {}, + "sqlite3_mutex_try": {}, + "sqlite3_next_stmt": {}, + "sqlite3_open": {}, + "sqlite3_open16": {}, + "sqlite3_open_v2": {}, + "sqlite3_os_end": {}, + "sqlite3_os_init": {}, + "sqlite3_overload_function": {}, + "sqlite3_prepare": {}, + "sqlite3_prepare16": {}, + "sqlite3_prepare16_v2": {}, + "sqlite3_prepare16_v3": {}, + "sqlite3_prepare_v2": {}, + "sqlite3_prepare_v3": {}, + "sqlite3_preupdate_blobwrite": {}, + "sqlite3_preupdate_count": {}, + "sqlite3_preupdate_depth": {}, + "sqlite3_preupdate_hook": {}, + "sqlite3_preupdate_new": {}, + "sqlite3_preupdate_old": {}, + "sqlite3_profile": {}, + "sqlite3_progress_handler": {}, + "sqlite3_randomness": {}, + "sqlite3_realloc": {}, + "sqlite3_realloc64": {}, + "sqlite3_release_memory": {}, + "sqlite3_reset": {}, + "sqlite3_reset_auto_extension": {}, + "sqlite3_result_blob": {}, + "sqlite3_result_blob64": {}, + "sqlite3_result_double": {}, + "sqlite3_result_error": {}, + "sqlite3_result_error16": {}, + "sqlite3_result_error_code": {}, + "sqlite3_result_error_nomem": {}, + "sqlite3_result_error_toobig": {}, + "sqlite3_result_int": {}, + "sqlite3_result_int64": {}, + "sqlite3_result_null": {}, + "sqlite3_result_pointer": {}, + "sqlite3_result_subtype": {}, + "sqlite3_result_text": {}, + "sqlite3_result_text16": {}, + "sqlite3_result_text16be": {}, + "sqlite3_result_text16le": {}, + "sqlite3_result_text64": {}, + "sqlite3_result_value": {}, + "sqlite3_result_zeroblob": {}, + "sqlite3_result_zeroblob64": {}, + "sqlite3_rollback_hook": {}, + "sqlite3_rtree_geometry_callback": {}, + "sqlite3_rtree_query_callback": {}, + "sqlite3_serialize": {}, + "sqlite3_set_authorizer": {}, + "sqlite3_set_auxdata": {}, + "sqlite3_set_last_insert_rowid": {}, + "sqlite3_shutdown": {}, + "sqlite3_sleep": {}, + "sqlite3_snapshot_cmp": {}, + "sqlite3_snapshot_free": {}, + "sqlite3_snapshot_get": {}, + "sqlite3_snapshot_open": {}, + "sqlite3_snapshot_recover": {}, + "sqlite3_snprintf": {}, + "sqlite3_soft_heap_limit": {}, + "sqlite3_soft_heap_limit64": {}, + "sqlite3_sourceid": {}, + "sqlite3_sql": {}, + "sqlite3_status": {}, + "sqlite3_status64": {}, + "sqlite3_step": {}, + "sqlite3_stmt_busy": {}, + "sqlite3_stmt_isexplain": {}, + "sqlite3_stmt_readonly": {}, + "sqlite3_stmt_status": {}, + "sqlite3_str_append": {}, + "sqlite3_str_appendall": {}, + "sqlite3_str_appendchar": {}, + "sqlite3_str_appendf": {}, + "sqlite3_str_errcode": {}, + "sqlite3_str_finish": {}, + "sqlite3_str_length": {}, + "sqlite3_str_new": {}, + "sqlite3_str_reset": {}, + "sqlite3_str_value": {}, + "sqlite3_str_vappendf": {}, + "sqlite3_strglob": {}, + "sqlite3_stricmp": {}, + "sqlite3_strlike": {}, + "sqlite3_strnicmp": {}, + "sqlite3_system_errno": {}, + "sqlite3_table_column_metadata": {}, + "sqlite3_temp_directory": {}, + "sqlite3_test_control": {}, + "sqlite3_thread_cleanup": {}, + "sqlite3_threadsafe": {}, + "sqlite3_total_changes": {}, + "sqlite3_total_changes64": {}, + "sqlite3_trace": {}, + "sqlite3_trace_v2": {}, + "sqlite3_transfer_bindings": {}, + "sqlite3_txn_state": {}, + "sqlite3_unlock_notify": {}, + "sqlite3_update_hook": {}, + "sqlite3_uri_boolean": {}, + "sqlite3_uri_int64": {}, + "sqlite3_uri_key": {}, + "sqlite3_uri_parameter": {}, + "sqlite3_user_data": {}, + "sqlite3_value_blob": {}, + "sqlite3_value_bytes": {}, + "sqlite3_value_bytes16": {}, + "sqlite3_value_double": {}, + "sqlite3_value_dup": {}, + "sqlite3_value_free": {}, + "sqlite3_value_frombind": {}, + "sqlite3_value_int": {}, + "sqlite3_value_int64": {}, + "sqlite3_value_nochange": {}, + "sqlite3_value_numeric_type": {}, + "sqlite3_value_pointer": {}, + "sqlite3_value_subtype": {}, + "sqlite3_value_text": {}, + "sqlite3_value_text16": {}, + "sqlite3_value_text16be": {}, + "sqlite3_value_text16le": {}, + "sqlite3_value_type": {}, + "sqlite3_version": {}, + "sqlite3_vfs_find": {}, + "sqlite3_vfs_register": {}, + "sqlite3_vfs_unregister": {}, + "sqlite3_vmprintf": {}, + "sqlite3_vsnprintf": {}, + "sqlite3_vtab_collation": {}, + "sqlite3_vtab_config": {}, + "sqlite3_vtab_distinct": {}, + "sqlite3_vtab_in": {}, + "sqlite3_vtab_in_first": {}, + "sqlite3_vtab_in_next": {}, + "sqlite3_vtab_nochange": {}, + "sqlite3_vtab_on_conflict": {}, + "sqlite3_vtab_rhs_value": {}, + "sqlite3_wal_autocheckpoint": {}, + "sqlite3_wal_checkpoint": {}, + "sqlite3_wal_checkpoint_v2": {}, + "sqlite3_wal_hook": {}, + "sqlite3aEQb": {}, + "sqlite3aGTb": {}, + "sqlite3aLTb": {}, + "sqlite3changegroup_add": {}, + "sqlite3changegroup_add_strm": {}, + "sqlite3changegroup_delete": {}, + "sqlite3changegroup_new": {}, + "sqlite3changegroup_output": {}, + "sqlite3changegroup_output_strm": {}, + "sqlite3changeset_apply": {}, + "sqlite3changeset_apply_strm": {}, + "sqlite3changeset_apply_v2": {}, + "sqlite3changeset_apply_v2_strm": {}, + "sqlite3changeset_concat": {}, + "sqlite3changeset_concat_strm": {}, + "sqlite3changeset_conflict": {}, + "sqlite3changeset_finalize": {}, + "sqlite3changeset_fk_conflicts": {}, + "sqlite3changeset_invert": {}, + "sqlite3changeset_invert_strm": {}, + "sqlite3changeset_new": {}, + "sqlite3changeset_next": {}, + "sqlite3changeset_old": {}, + "sqlite3changeset_op": {}, + "sqlite3changeset_pk": {}, + "sqlite3changeset_start": {}, + "sqlite3changeset_start_strm": {}, + "sqlite3changeset_start_v2": {}, + "sqlite3changeset_start_v2_strm": {}, + "sqlite3one": {}, + "sqlite3rbu_bp_progress": {}, + "sqlite3rbu_close": {}, + "sqlite3rbu_create_vfs": {}, + "sqlite3rbu_db": {}, + "sqlite3rbu_destroy_vfs": {}, + "sqlite3rbu_open": {}, + "sqlite3rbu_progress": {}, + "sqlite3rbu_savestate": {}, + "sqlite3rbu_state": {}, + "sqlite3rbu_step": {}, + "sqlite3rbu_temp_size": {}, + "sqlite3rbu_temp_size_limit": {}, + "sqlite3rbu_vacuum": {}, + "sqlite3rebaser_configure": {}, + "sqlite3rebaser_create": {}, + "sqlite3rebaser_delete": {}, + "sqlite3rebaser_rebase": {}, + "sqlite3rebaser_rebase_strm": {}, + "sqlite3session_attach": {}, + "sqlite3session_changeset": {}, + "sqlite3session_changeset_size": {}, + "sqlite3session_changeset_strm": {}, + "sqlite3session_config": {}, + "sqlite3session_create": {}, + "sqlite3session_delete": {}, + "sqlite3session_diff": {}, + "sqlite3session_enable": {}, + "sqlite3session_indirect": {}, + "sqlite3session_isempty": {}, + "sqlite3session_memory_used": {}, + "sqlite3session_object_config": {}, + "sqlite3session_patchset": {}, + "sqlite3session_patchset_strm": {}, + "sqlite3session_table_filter": {}, +} diff --git a/vendor/modernc.org/sqlite/lib/capi_linux_s390x.go b/vendor/modernc.org/sqlite/lib/capi_linux_s390x.go index 9ff98eff..944fc194 100644 --- a/vendor/modernc.org/sqlite/lib/capi_linux_s390x.go +++ b/vendor/modernc.org/sqlite/lib/capi_linux_s390x.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_openbsd_amd64.go b/vendor/modernc.org/sqlite/lib/capi_openbsd_amd64.go index 9a6874c7..9857cee0 100644 --- a/vendor/modernc.org/sqlite/lib/capi_openbsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/capi_openbsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines -export-enums -export-externs X -export-fields F -export-typedefs -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_openbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_openbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/capi_windows_amd64.go b/vendor/modernc.org/sqlite/lib/capi_windows_amd64.go index baab0876..ae7b6a22 100644 --- a/vendor/modernc.org/sqlite/lib/capi_windows_amd64.go +++ b/vendor/modernc.org/sqlite/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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package sqlite3 diff --git a/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go index f6b80674..79728979 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package sqlite3 @@ -2513,7 +2513,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2621,8 +2621,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -4218,7 +4218,7 @@ var X__darwin_check_fd_set_overflow uintptr /* :146:5: */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5983,7 +5983,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -6008,7 +6008,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -6027,12 +6027,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -6061,7 +6061,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -6169,7 +6169,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -6275,7 +6275,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -6381,7 +6381,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -6456,7 +6456,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -6521,7 +6521,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6546,7 +6546,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6562,7 +6562,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -6585,7 +6585,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6759,7 +6759,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6918,7 +6918,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6935,12 +6935,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6974,7 +6974,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6994,7 +6994,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -7014,7 +7014,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -7058,7 +7058,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -7095,7 +7095,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -7115,13 +7115,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -7151,7 +7151,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -7164,7 +7164,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -7185,13 +7185,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -7201,13 +7201,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7409,7 +7409,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7611,7 +7611,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7665,7 +7665,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7697,22 +7697,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7732,7 +7732,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7746,7 +7746,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -8367,7 +8367,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -8375,7 +8375,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -14620,13 +14620,13 @@ type Max_align_t = float64 /* __stddef_max_align_t.h:16:21 */ // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -14637,7 +14637,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -14660,12 +14660,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -14688,7 +14688,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -14830,13 +14830,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -14844,7 +14844,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -14856,7 +14856,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -14866,7 +14866,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -14880,7 +14880,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -14891,7 +14891,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -14902,7 +14902,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -14912,7 +14912,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -14922,9 +14922,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -14939,7 +14939,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -14959,7 +14959,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -14981,7 +14981,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -14998,17 +14998,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -15023,17 +15023,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -15064,7 +15064,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -15074,7 +15074,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -15087,7 +15087,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -15106,10 +15106,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -15120,7 +15120,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -15131,9 +15131,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -15215,14 +15215,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -15241,21 +15241,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -15265,9 +15265,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -15278,9 +15278,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -15288,7 +15288,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -15313,14 +15313,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -15331,9 +15331,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -15359,15 +15359,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -15397,7 +15397,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -15406,14 +15406,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -15429,7 +15429,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -15439,7 +15439,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -15457,7 +15457,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -15470,7 +15470,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -15488,7 +15488,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -15502,7 +15502,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -15511,7 +15511,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -15521,9 +15521,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -15552,9 +15552,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -15588,7 +15588,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -15596,14 +15596,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -15614,7 +15614,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -15641,7 +15641,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -15712,7 +15712,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -15730,7 +15730,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -15801,7 +15801,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -15826,7 +15826,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -15865,7 +15865,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -15876,9 +15876,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -15982,11 +15982,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -15998,7 +15998,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -16026,7 +16026,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -16035,11 +16035,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -16104,7 +16104,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -16122,10 +16122,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -16201,7 +16201,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -16252,7 +16252,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -16346,7 +16346,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -16359,7 +16359,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -16424,7 +16424,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -16447,7 +16447,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -16469,7 +16469,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -16495,7 +16495,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -16519,7 +16519,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -16545,7 +16545,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -16569,7 +16569,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -16698,9 +16698,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1032, ts + 1046, ts + 1059, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -16767,10 +16767,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -16834,7 +16834,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -16894,12 +16894,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -16917,21 +16917,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -16947,7 +16947,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -16955,7 +16955,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -16963,7 +16963,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1079, ts + 1083, @@ -16971,7 +16971,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1092, ts + 1100, ts + 1105, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -17016,10 +17016,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -17042,10 +17042,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -17057,7 +17057,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -17111,7 +17111,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -17176,7 +17176,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -17190,7 +17190,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -17202,13 +17202,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -17219,7 +17219,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -17227,7 +17227,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -17242,7 +17242,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -17254,20 +17254,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -17282,7 +17282,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -17292,7 +17292,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -17306,7 +17306,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -17314,14 +17314,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -17332,12 +17332,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -17355,7 +17355,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -17371,7 +17371,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -17381,7 +17381,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -17393,7 +17393,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -18046,14 +18046,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -18080,7 +18080,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -18137,7 +18137,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -18153,7 +18153,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -18227,7 +18227,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -18280,7 +18280,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(DateTime{})), libc.X__builtin_object_size(tls, p, 0)) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -18289,7 +18289,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -18345,7 +18345,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -18396,7 +18396,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -18411,7 +18411,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -18434,7 +18434,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18463,12 +18463,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -18513,7 +18513,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -18532,13 +18532,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -18568,7 +18568,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -18593,7 +18593,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -18633,7 +18633,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -18661,7 +18661,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -18685,7 +18685,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -19011,7 +19011,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -19052,7 +19052,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -19068,7 +19068,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -19083,7 +19083,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -19132,7 +19132,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -19160,7 +19160,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -19212,7 +19212,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -19356,7 +19356,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -19365,7 +19365,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -19374,7 +19374,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -19383,7 +19383,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -19396,7 +19396,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1336}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1345}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1358}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -19448,7 +19448,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -19457,27 +19457,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -19487,27 +19487,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -19520,7 +19520,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -19529,7 +19529,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -19537,7 +19537,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -19549,7 +19549,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -19558,23 +19558,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -19582,14 +19582,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -19597,7 +19597,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -19611,7 +19611,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -19621,14 +19621,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -19636,7 +19636,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -19644,25 +19644,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.X__builtin___memset_chk(tls, zBufOut, 0, uint64(nByte), libc.X__builtin_object_size(tls, zBufOut, 0)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -19679,13 +19679,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -19694,7 +19694,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -19719,7 +19719,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -19739,7 +19739,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -19749,7 +19749,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -19759,11 +19759,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -19785,7 +19785,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -19805,7 +19805,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -19828,7 +19828,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -19873,7 +19873,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -19904,8 +19904,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -19915,7 +19915,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -19924,14 +19924,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -20029,7 +20029,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20052,7 +20052,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -20061,7 +20061,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -20077,7 +20077,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -20099,18 +20099,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -20119,7 +20119,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20134,7 +20134,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -20268,7 +20268,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -20302,7 +20302,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -20312,7 +20312,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -20325,7 +20325,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -20336,7 +20336,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -20345,7 +20345,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -20354,7 +20354,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -20369,7 +20369,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -20408,40 +20408,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -20454,11 +20454,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -20521,7 +20521,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -20534,22 +20534,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -20565,7 +20565,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -20593,7 +20593,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -20610,7 +20610,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -20629,7 +20629,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -20652,12 +20652,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mem0)) + 24)) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -20665,7 +20665,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -20680,7 +20680,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -20693,7 +20693,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -20704,7 +20704,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -20751,7 +20751,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20780,7 +20780,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -20790,7 +20790,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -20798,27 +20798,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -20837,7 +20837,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -20848,7 +20848,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -20866,14 +20866,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -20899,7 +20899,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -20907,7 +20907,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -20968,7 +20968,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -20978,7 +20978,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -20986,7 +20986,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.X__builtin___memset_chk(tls, p, 0, Size_t(n), libc.X__builtin_object_size(tls, p, 0)) @@ -20996,7 +20996,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -21008,7 +21008,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -21039,7 +21039,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -21049,7 +21049,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -21087,7 +21087,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -21107,7 +21107,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -21131,7 +21131,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -21145,7 +21145,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -21159,7 +21159,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -21177,7 +21177,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -21190,7 +21190,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -21206,7 +21206,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -21227,7 +21227,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) *(*int32)(unsafe.Pointer(db + 432)) = 0 @@ -21243,7 +21243,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -21262,7 +21262,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -21291,7 +21291,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -21302,18 +21302,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -21340,7 +21340,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -21351,7 +21351,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -21366,7 +21366,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -21381,7 +21381,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -21393,21 +21393,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -21421,7 +21421,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -21443,7 +21443,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -22936,7 +22936,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29902:29 */ // End of function @@ -22944,7 +22944,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -22971,7 +22971,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -22986,7 +22986,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -23040,7 +23040,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -23056,7 +23056,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.X__builtin___memcpy_chk(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N), libc.X__builtin_object_size(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), 0)) @@ -23066,7 +23066,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -23078,14 +23078,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -23099,7 +23099,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -23111,7 +23111,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -23129,10 +23129,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -23144,7 +23144,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -23152,7 +23152,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -23160,7 +23160,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -23169,7 +23169,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -23191,7 +23191,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -23202,7 +23202,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -23220,7 +23220,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -23242,7 +23242,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -23254,7 +23254,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -23274,7 +23274,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -23298,7 +23298,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -23313,7 +23313,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -23335,7 +23335,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -23353,7 +23353,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -23365,7 +23365,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -23420,7 +23420,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -23464,10 +23464,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -23546,18 +23546,18 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755: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:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762: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)) } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -23579,7 +23579,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -23648,7 +23648,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -23675,7 +23675,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -23702,7 +23702,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -24027,7 +24027,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -24061,7 +24061,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -24093,7 +24093,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -24114,7 +24114,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -24411,7 +24411,7 @@ type exception = struct { // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -24423,7 +24423,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -24443,7 +24443,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -24455,7 +24455,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { @@ -24470,7 +24470,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -24480,7 +24480,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -24492,7 +24492,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -24503,7 +24503,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -24523,7 +24523,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -24550,7 +24550,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -24581,7 +24581,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -24606,7 +24606,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -24638,7 +24638,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -24658,7 +24658,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -24676,7 +24676,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -24691,7 +24691,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -24703,7 +24703,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -24729,7 +24729,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -24753,7 +24753,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -24769,7 +24769,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -24812,7 +24812,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -25192,7 +25192,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -25233,7 +25233,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -25262,7 +25262,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -25384,7 +25384,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25417,7 +25417,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25479,7 +25479,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25492,7 +25492,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -25535,7 +25535,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -25581,7 +25581,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -25604,7 +25604,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -25757,7 +25757,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25825,7 +25825,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -25833,12 +25833,12 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ return uint32(*(*U8)(unsafe.Pointer(p)))<<24 | uint32(int32(*(*U8)(unsafe.Pointer(p + 1)))<<16) | uint32(int32(*(*U8)(unsafe.Pointer(p + 2)))<<8) | uint32(*(*U8)(unsafe.Pointer(p + 3))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ *(*uint8)(unsafe.Pointer(p)) = U8(v >> 24) *(*uint8)(unsafe.Pointer(p + 1)) = U8(v >> 16) *(*uint8)(unsafe.Pointer(p + 2)) = U8(v >> 8) @@ -25848,7 +25848,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -25858,7 +25858,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -25876,7 +25876,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25897,7 +25897,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1528) @@ -25916,7 +25916,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -25933,7 +25933,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB >= int64(0) { @@ -25951,7 +25951,7 @@ func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return 0 } -func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043:20: */ if iB == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { @@ -25966,7 +25966,7 @@ func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return int32(0) } -func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB > int64(0) { if iA > (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/iB { @@ -25998,7 +25998,7 @@ func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -26012,7 +26012,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -26043,11 +26043,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -26070,11 +26070,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -26095,7 +26095,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -26147,7 +26147,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -26186,7 +26186,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -26205,7 +26205,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -26244,7 +26244,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -26255,7 +26255,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -26272,7 +26272,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -26287,7 +26287,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -26324,7 +26324,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -26368,7 +26368,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -26397,11 +26397,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -26430,7 +26430,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -26448,7 +26448,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -26497,7 +26497,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -26687,7 +26687,7 @@ var azName = [185]uintptr{ ts + 3182, ts + 3187, ts + 3195, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -35298,7 +35298,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Allowed values of unixFile.fsFlags @@ -35320,7 +35320,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -35336,10 +35336,10 @@ type unixShmNode = struct { F__ccgo_pad2 [4]byte FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -35359,18 +35359,18 @@ type unixInodeInfo = struct { FpNext uintptr FpPrev uintptr FsharedByte uint64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -35398,16 +35398,16 @@ type unixFile = struct { FdeviceCharacteristics int32 FopenFlags int32 FfsFlags uint32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -35430,7 +35430,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35445,7 +35445,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -35513,14 +35513,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3403, FpCurrent: 0}, {FzName: ts + 3409}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { return 0 } @@ -35531,7 +35531,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -35568,7 +35568,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -35584,7 +35584,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -35622,7 +35622,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -35689,14 +35689,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -35706,7 +35706,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, sz) @@ -35722,7 +35722,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -35771,7 +35771,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -35873,12 +35873,12 @@ type unixFileId = struct { Fdev Dev_t F__ccgo_pad1 [4]byte Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -35896,7 +35896,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -35930,7 +35930,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3210, func() uintptr { @@ -35944,19 +35944,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -35966,7 +35966,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -36000,7 +36000,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -36083,7 +36083,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -36100,7 +36100,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -36136,7 +36136,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -36202,7 +36202,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -36254,7 +36254,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -36501,7 +36501,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -36522,7 +36522,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -36709,7 +36709,7 @@ __18: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -36722,11 +36722,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -36736,7 +36736,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -36786,26 +36786,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -36846,7 +36846,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -36882,7 +36882,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -36924,7 +36924,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -36959,7 +36959,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -36987,7 +36987,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off // Retry flock() calls that fail with EINTR -func robust_flock(tls *libc.TLS, fd int32, op int32) int32 { /* sqlite3.c:37175:12: */ +func robust_flock(tls *libc.TLS, fd int32, op int32) int32 { /* sqlite3.c:37184:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { rc = libc.Xflock(tls, fd, op) @@ -36999,7 +36999,7 @@ func robust_flock(tls *libc.TLS, fd int32, op int32) int32 { /* sqlite3.c:37175: // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func flockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37191:12: */ +func flockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37200:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -37066,7 +37066,7 @@ func flockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func flockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37271:12: */ +func flockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37280:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id @@ -37099,7 +37099,7 @@ func flockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func flockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37315:12: */ +func flockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37324:12: */ var pFile uintptr = id // no-op if possible @@ -37124,7 +37124,7 @@ func flockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. } // Close a file. -func flockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37349:12: */ +func flockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37358:12: */ flockUnlock(tls, id, NO_LOCK) return closeUnixFile(tls, id) @@ -37165,7 +37165,7 @@ type afpLockingContext = struct { Freserved int32 F__ccgo_pad1 [4]byte FdbPath uintptr -} /* sqlite3.c:37551:9 */ +} /* sqlite3.c:37560:9 */ // ****************** End of the flock lock implementation ********************* // @@ -37198,7 +37198,7 @@ type afpLockingContext = struct { // only works on OSX. // The afpLockingContext structure contains all afp lock specific state -type AfpLockingContext = afpLockingContext /* sqlite3.c:37551:34 */ +type AfpLockingContext = afpLockingContext /* sqlite3.c:37560:34 */ type ByteRangeLockPB2 = struct { Foffset uint64 @@ -37208,13 +37208,13 @@ type ByteRangeLockPB2 = struct { FstartEndFlag uint8 F__ccgo_pad1 [2]byte Ffd int32 -} /* sqlite3.c:37557:1 */ +} /* sqlite3.c:37566:1 */ // This is a utility for setting or clearing a bit-range lock on an // AFP filesystem. // // Return SQLITE_OK on success, SQLITE_BUSY on failure. -func afpSetLock(tls *libc.TLS, path uintptr, pFile uintptr, offset uint64, length uint64, setLockFlag int32) int32 { /* sqlite3.c:37575:12: */ +func afpSetLock(tls *libc.TLS, path uintptr, pFile uintptr, offset uint64, length uint64, setLockFlag int32) int32 { /* sqlite3.c:37584:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -37259,7 +37259,7 @@ func afpSetLock(tls *libc.TLS, path uintptr, pFile uintptr, offset uint64, lengt // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func afpCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37621:12: */ +func afpCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37630:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -37321,7 +37321,7 @@ func afpCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func afpLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37690:12: */ +func afpLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37699:12: */ var rc int32 var pFile uintptr var pInode uintptr @@ -37563,7 +37563,7 @@ afp_end_lock: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37872:12: */ +func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37881:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr @@ -37635,7 +37635,7 @@ func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: } // Close a file & cleanup AFP specific locking context -func afpClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37975:12: */ +func afpClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37984:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id @@ -37679,7 +37679,7 @@ func afpClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37975:12: */ // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func nfsUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:38023:12: */ +func nfsUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:38032:12: */ return posixUnlock(tls, id, eFileLock, 1) } @@ -37712,7 +37712,7 @@ func nfsUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 @@ -37744,7 +37744,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -37801,7 +37801,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -37821,13 +37821,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -37884,7 +37884,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37946,7 +37946,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -37973,7 +37973,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3322, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3322, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -37989,7 +37989,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38008,7 +38008,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3612, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3612, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -38020,7 +38020,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -38031,7 +38031,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -38046,7 +38046,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -38062,7 +38062,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -38093,7 +38093,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -38138,7 +38138,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -38153,7 +38153,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -38164,7 +38164,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -38282,7 +38282,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -38303,7 +38303,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -38320,7 +38320,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -38330,7 +38330,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -38342,7 +38342,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -38374,7 +38374,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -38415,7 +38415,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size // Page size must be a power of 2 @@ -38429,7 +38429,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -38446,7 +38446,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -38461,7 +38461,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -38505,7 +38505,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -38552,7 +38552,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -38648,7 +38648,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3205, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3205, zShm, 39446) goto shm_open_err __10: ; @@ -38716,7 +38716,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -38819,7 +38819,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39590) goto shmpage_out __14: ; @@ -38867,7 +38867,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -38925,7 +38925,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -38939,7 +38939,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -39046,7 +39046,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -39059,7 +39059,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -39102,7 +39102,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -39125,7 +39125,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3363 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -39167,7 +39167,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -39192,7 +39192,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -39229,7 +39229,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -39256,7 +39256,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -39317,80 +39317,80 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ -var flockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40205:1 */ +var flockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40214:1 */ -func flockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40205:1: */ +func flockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40214:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&flockIoMethods)) } -var flockIoFinder uintptr = 0 /* sqlite3.c:40205:1 */ +var flockIoFinder uintptr = 0 /* sqlite3.c:40214:1 */ -var afpIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40231:1 */ +var afpIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40240:1 */ -func afpIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40231:1: */ +func afpIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40240:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&afpIoMethods)) } -var afpIoFinder uintptr = 0 /* sqlite3.c:40231:1 */ -var proxyIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40257:1 */ +var afpIoFinder uintptr = 0 /* sqlite3.c:40240:1 */ +var proxyIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40266:1 */ -func proxyIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40257:1: */ +func proxyIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40266:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&proxyIoMethods)) } -var proxyIoFinder uintptr = 0 /* sqlite3.c:40257:1 */ +var proxyIoFinder uintptr = 0 /* sqlite3.c:40266:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set -var nfsIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40271:1 */ +var nfsIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40280:1 */ -func nfsIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40271:1: */ +func nfsIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40280:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nfsIoMethods)) } -var nfsIoFinder uintptr = 0 /* sqlite3.c:40271:1 */ +var nfsIoFinder uintptr = 0 /* sqlite3.c:40280:1 */ // This "finder" function attempts to determine the best locking strategy // for the database file "filePath". It then returns the sqlite3_io_methods // object that implements that strategy. // // This is for MacOSX only. -func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr { /* sqlite3.c:40291:33: */ +func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr { /* sqlite3.c:40300:33: */ bp := tls.Alloc(2200) defer tls.Free(2200) @@ -39437,7 +39437,7 @@ func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr type Mapping = struct { FzFilesystem uintptr FpMethods uintptr -} /* sqlite3.c:40295:16 */ +} /* sqlite3.c:40304:16 */ var aMap = [6]Mapping{ {FzFilesystem: ts + 3647, FpMethods: 0}, @@ -39446,11 +39446,11 @@ var aMap = [6]Mapping{ {FzFilesystem: ts + 3661, FpMethods: 0}, {FzFilesystem: ts + 3667, FpMethods: 0}, {}, -} /* sqlite3.c:40298:5 */ -var autolockIoFinder uintptr = 0 /* sqlite3.c:40345:3 */ +} /* sqlite3.c:40307:5 */ +var autolockIoFinder uintptr = 0 /* sqlite3.c:40354:3 */ // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -39460,7 +39460,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -39522,7 +39522,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -39544,7 +39544,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext) - robust_close(tls, pNew, h, 40505) + robust_close(tls, pNew, h, 40514) h = -1 } unixLeaveMutex(tls) @@ -39568,7 +39568,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -39586,17 +39586,17 @@ var azTempDirs = [6]uintptr{ ts + 3706, ts + 3715, ts + 1540, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3720) azTempDirs[1] = libc.Xgetenv(tls, ts+3734) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -39623,7 +39623,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -39667,7 +39667,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -39718,7 +39718,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -39754,7 +39754,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -39828,7 +39828,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(2696) defer tls.Free(2696) @@ -40032,7 +40032,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3205, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3205, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -40092,7 +40092,7 @@ __25: goto __26 } storeLastErrno(tls, p, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - robust_close(tls, p, fd, 41047) + robust_close(tls, p, fd, 41056) return SQLITE_IOERR | int32(13)<<8 __26: ; @@ -40199,7 +40199,7 @@ __40: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40210,7 +40210,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__error(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41141) } return rc } @@ -40220,9 +40220,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3811, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3811, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -40239,7 +40239,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -40261,7 +40261,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -40284,7 +40284,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -40295,7 +40295,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3223, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3223, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -40304,7 +40304,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3609, libc.VaList(bp, zPath)) @@ -40355,7 +40355,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -40381,7 +40381,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__error(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3403, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3403, zIn, 41322) } } else { bLink = libc.Bool32(int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&S_IFMT == S_IFLNK) @@ -40395,20 +40395,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3394, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3394, zIn, 41340) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.X__builtin___memmove_chk(tls, zDel+uintptr(n), zDel, uint64(nByte+1), libc.X__builtin_object_size(tls, zDel+uintptr(n), 0)) libc.X__builtin___memcpy_chk(tls, zDel, zIn, uint64(n), libc.X__builtin_object_size(tls, zDel, 0)) @@ -40693,7 +40693,7 @@ type Dl_info = dl_info /* dlfcn.h:57:3 */ // Special handle arguments for dlsym(). -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -40703,7 +40703,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40717,7 +40717,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -40743,13 +40743,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40784,7 +40784,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -40797,7 +40797,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -40820,7 +40820,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40834,12 +40834,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40855,7 +40855,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -41030,7 +41030,7 @@ type proxyLockingContext = struct { FnFails int32 FoldLockingContext uintptr FpOldMethod uintptr -} /* sqlite3.c:41740:9 */ +} /* sqlite3.c:41749:9 */ // // End of sqlite3_vfs methods *************************** @@ -41190,12 +41190,12 @@ type proxyLockingContext = struct { // The proxyLockingContext has the path and file structures for the remote // and local proxy files in it -type ProxyLockingContext = proxyLockingContext /* sqlite3.c:41740:36 */ +type ProxyLockingContext = proxyLockingContext /* sqlite3.c:41749:36 */ // The proxy lock file path for the database at dbPath is written into lPath, // which must point to valid, writable memory large enough for a maxLen length // file path. -func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_t) int32 { /* sqlite3.c:41758:12: */ +func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_t) int32 { /* sqlite3.c:41767:12: */ var len int32 var dbLen int32 var i int32 @@ -41231,7 +41231,7 @@ func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_ } // Creates the lock file and any missing directories in lockPath -func proxyCreateLockPath(tls *libc.TLS, lockPath uintptr) int32 { /* sqlite3.c:41799:12: */ +func proxyCreateLockPath(tls *libc.TLS, lockPath uintptr) int32 { /* sqlite3.c:41808:12: */ bp := tls.Alloc(1024) defer tls.Free(1024) @@ -41271,7 +41271,7 @@ func proxyCreateLockPath(tls *libc.TLS, lockPath uintptr) int32 { /* sqlite3.c:4 // // The caller is responsible not only for closing the file descriptor // but also for freeing the memory associated with the file descriptor. -func proxyCreateUnixFile(tls *libc.TLS, path uintptr, ppFile uintptr, islockfile int32) int32 { /* sqlite3.c:41839:12: */ +func proxyCreateUnixFile(tls *libc.TLS, path uintptr, ppFile uintptr, islockfile int32) int32 { /* sqlite3.c:41848:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -41359,7 +41359,7 @@ __11: __12: return SQLITE_IOERR | int32(15)<<8 // even though it is the conch __13: - return Xsqlite3CantopenError(tls, 41891) + return Xsqlite3CantopenError(tls, 41900) __10: ; __8: @@ -41391,7 +41391,7 @@ __14: __15: ; end_create_proxy: - robust_close(tls, pNew, fd, 41915) + robust_close(tls, pNew, fd, 41924) Xsqlite3_free(tls, pNew) Xsqlite3_free(tls, pUnused) return rc @@ -41399,7 +41399,7 @@ end_create_proxy: // get the host ID via gethostuuid(), pHostID must point to PROXY_HOSTIDLEN // bytes of writable memory. -func proxyGetHostID(tls *libc.TLS, pHostID uintptr, pError uintptr) int32 { /* sqlite3.c:41936:12: */ +func proxyGetHostID(tls *libc.TLS, pHostID uintptr, pError uintptr) int32 { /* sqlite3.c:41945:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -41425,7 +41425,7 @@ func proxyGetHostID(tls *libc.TLS, pHostID uintptr, pError uintptr) int32 { /* s // it back. The newly created file's file descriptor is assigned to the // conch file structure and finally the original conch file descriptor is // closed. Returns zero if successful. -func proxyBreakConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr) int32 { /* sqlite3.c:41976:12: */ +func proxyBreakConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr) int32 { /* sqlite3.c:41985:12: */ bp := tls.Alloc(2193) defer tls.Free(2193) @@ -41495,7 +41495,7 @@ __5: ; rc = 0 libc.Xfprintf(tls, libc.X__stderrp, ts+4017, libc.VaList(bp+40, cPath)) - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 42018) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 42027) (*UnixFile)(unsafe.Pointer(conchFile)).Fh = fd (*UnixFile)(unsafe.Pointer(conchFile)).FopenFlags = O_RDWR | O_CREAT @@ -41507,7 +41507,7 @@ end_breaklock: goto __7 } (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, bp+64) - robust_close(tls, pFile, fd, 42026) + robust_close(tls, pFile, fd, 42035) __7: ; libc.Xfprintf(tls, libc.X__stderrp, ts+4041, libc.VaList(bp+48, cPath, bp+1088)) @@ -41518,7 +41518,7 @@ __6: // Take the requested lock on the conch file and break a stale lock if the // host id matches. -func proxyConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr, lockType int32) int32 { /* sqlite3.c:42036:12: */ +func proxyConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr, lockType int32) int32 { /* sqlite3.c:42045:12: */ bp := tls.Alloc(1201) defer tls.Free(1201) @@ -41602,7 +41602,7 @@ func proxyConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr, lockType int // lockPath means that the lockPath in the conch file will be used if the // host IDs match, or a new lock path will be generated automatically // and written to the conch file. -func proxyTakeConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42114:12: */ +func proxyTakeConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42123:12: */ bp := tls.Alloc(3272) defer tls.Free(3272) @@ -41832,7 +41832,7 @@ end_takeconch: if !((*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0) { goto __29 } - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 42279) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 42288) __29: ; (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 @@ -41844,7 +41844,7 @@ __29: (*UnixFile)(unsafe.Pointer(pFile)).Fh = fd goto __31 __30: - rc = Xsqlite3CantopenError(tls, 42287) // SQLITE_BUSY? proxyTakeConch called + rc = Xsqlite3CantopenError(tls, 42296) // SQLITE_BUSY? proxyTakeConch called // during locking __31: ; @@ -41926,7 +41926,7 @@ __2: } // If pFile holds a lock on a conch file, then release that lock. -func proxyReleaseConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42336:12: */ +func proxyReleaseConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42345:12: */ var rc int32 = SQLITE_OK // Subroutine return code var pCtx uintptr // The locking context for the proxy lock var conchFile uintptr // Name of the conch file @@ -41953,7 +41953,7 @@ func proxyReleaseConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42336: // space is eventually freed. // // *pConchPath is set to NULL if a memory allocation error occurs. -func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) int32 { /* sqlite3.c:42366:12: */ +func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) int32 { /* sqlite3.c:42375:12: */ var i int32 // Loop counter var len int32 = int32(libc.Xstrlen(tls, dbPath)) // Length of database filename - dbPath var conchPath uintptr // buffer in which to construct conch name @@ -41987,7 +41987,7 @@ func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) // Takes a fully configured proxy locking-style unix file and switches // the local lock file path -func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42403:12: */ +func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42412:12: */ var pCtx uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var oldPath uintptr = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath var rc int32 = SQLITE_OK @@ -42024,7 +42024,7 @@ func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* // // This routine find the filename associated with pFile and writes it // int dbPath. -func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int32 { /* sqlite3.c:42439:12: */ +func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int32 { /* sqlite3.c:42448:12: */ if (*UnixFile)(unsafe.Pointer(pFile)).FpMethod == uintptr(unsafe.Pointer(&afpIoMethods)) { // afp style keeps a reference to the db path in the filePath field // of the struct @@ -42050,7 +42050,7 @@ func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int // the unix structure properly cleaned up at close time: // ->lockingContext // ->pMethod -func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42470:12: */ +func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42479:12: */ bp := tls.Alloc(3344) defer tls.Free(3344) @@ -42136,7 +42136,7 @@ func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { // This routine handles sqlite3_file_control() calls that are specific // to proxy locking. -func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:42557:12: */ +func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:42566:12: */ switch op { case SQLITE_FCNTL_GET_LOCKPROXYFILE: { @@ -42206,7 +42206,7 @@ func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func proxyCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:42630:12: */ +func proxyCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:42639:12: */ var pFile uintptr = id var rc int32 = proxyTakeConch(tls, pFile) if rc == SQLITE_OK { @@ -42245,7 +42245,7 @@ func proxyCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func proxyLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42669:12: */ +func proxyLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42678:12: */ var pFile uintptr = id var rc int32 = proxyTakeConch(tls, pFile) if rc == SQLITE_OK { @@ -42268,7 +42268,7 @@ func proxyLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func proxyUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42693:12: */ +func proxyUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42702:12: */ var pFile uintptr = id var rc int32 = proxyTakeConch(tls, pFile) if rc == SQLITE_OK { @@ -42287,7 +42287,7 @@ func proxyUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. } // Close a file that uses proxy locks. -func proxyClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:42712:12: */ +func proxyClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:42721:12: */ if id != 0 { var pFile uintptr = id var pCtx uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext @@ -42360,7 +42360,7 @@ func proxyClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:42712:12: */ // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -42403,14 +42403,14 @@ var aVfs = [9]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 4160, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 4169, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 4178, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -42452,15 +42452,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -42474,9 +42474,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -42486,13 +42486,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -42509,7 +42509,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -42525,21 +42525,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -42577,7 +42577,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -42594,7 +42594,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -42616,7 +42616,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -42647,7 +42647,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -42662,14 +42662,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -42678,7 +42678,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -42722,7 +42722,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -42751,13 +42751,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -42771,7 +42771,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -42782,7 +42782,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -42857,7 +42857,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -42868,7 +42868,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42878,7 +42878,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -42887,21 +42887,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -42909,7 +42909,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -42917,19 +42917,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -42937,7 +42937,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42960,7 +42960,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -43051,7 +43051,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -43146,7 +43146,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -43168,7 +43168,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -43181,7 +43181,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -43210,7 +43210,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -43224,7 +43224,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -43361,7 +43361,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -43400,7 +43400,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -43415,7 +43415,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -43452,7 +43452,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43615,7 +43615,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -43677,7 +43677,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -43689,7 +43689,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -43714,7 +43714,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -43727,7 +43727,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -43735,7 +43735,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -43749,7 +43749,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(PCache{})), libc.X__builtin_object_size(tls, p, 0)) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -43766,7 +43766,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -43813,7 +43813,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -43841,7 +43841,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -43892,7 +43892,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -43912,7 +43912,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -43928,7 +43928,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -43941,7 +43941,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -43950,7 +43950,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -43963,7 +43963,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -43978,7 +43978,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -43990,7 +43990,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -43999,7 +43999,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -44009,7 +44009,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -44018,7 +44018,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -44037,7 +44037,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -44071,19 +44071,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -44122,7 +44122,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -44165,7 +44165,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -44177,17 +44177,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -44195,7 +44195,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -44207,7 +44207,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -44224,20 +44224,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -44352,7 +44352,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -44438,7 +44438,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -44448,12 +44448,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -44461,9 +44461,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -44480,10 +44480,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -44501,7 +44501,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -44534,7 +44534,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -44579,7 +44579,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -44612,7 +44612,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -44642,7 +44642,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -44656,7 +44656,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -44694,7 +44694,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -44711,13 +44711,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -44735,7 +44735,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -44751,7 +44751,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -44792,7 +44792,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -44809,7 +44809,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -44827,7 +44827,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -44848,7 +44848,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -44896,7 +44896,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.X__builtin___memset_chk(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g)), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0)) @@ -44934,7 +44934,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.X__builtin___memset_chk(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g)), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0)) @@ -44943,7 +44943,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -44993,7 +44993,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -45016,7 +45016,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -45031,7 +45031,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -45046,7 +45046,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -45164,7 +45164,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -45193,7 +45193,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -45204,7 +45204,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -45218,7 +45218,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -45243,7 +45243,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -45274,7 +45274,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -45287,7 +45287,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -45310,7 +45310,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45330,16 +45330,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -45350,7 +45350,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -45448,7 +45448,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -45461,13 +45461,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -45487,7 +45487,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -45506,7 +45506,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -45517,7 +45517,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -45540,7 +45540,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -45570,7 +45570,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -45605,7 +45605,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -45641,7 +45641,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45672,7 +45672,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -45703,7 +45703,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -45736,7 +45736,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -45769,7 +45769,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -45954,7 +45954,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -46723,7 +46723,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -46756,11 +46756,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -46783,7 +46783,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -46805,7 +46805,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46822,7 +46822,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46839,7 +46839,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -46866,7 +46866,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -46900,7 +46900,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -46934,7 +46934,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -46993,7 +46993,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -47022,7 +47022,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47057,7 +47057,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -47072,7 +47072,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -47181,7 +47181,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47291,7 +47291,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47351,21 +47351,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -47382,7 +47382,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -47411,7 +47411,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -47503,7 +47503,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -47528,7 +47528,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -47592,7 +47592,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -47719,7 +47719,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -47751,7 +47751,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -47796,7 +47796,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -48030,7 +48030,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -48196,7 +48196,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48231,7 +48231,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -48263,7 +48263,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -48331,7 +48331,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -48466,39 +48466,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -48507,25 +48513,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -48534,10 +48540,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -48555,7 +48561,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -48564,24 +48570,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -48589,14 +48595,14 @@ __25: libc.X__builtin___memset_chk(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4), libc.X__builtin_object_size(tls, zSuper+libc.UintptrFromInt32(-4), 0)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+4248, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -48616,7 +48622,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48670,7 +48676,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -48697,7 +48703,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -48728,7 +48734,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -48759,7 +48765,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -48807,7 +48813,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48838,7 +48844,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48892,7 +48898,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48960,7 +48966,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -49069,18 +49075,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49096,13 +49102,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -49155,7 +49161,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -49219,7 +49225,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -49247,7 +49253,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -49284,7 +49290,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49353,7 +49359,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -49362,7 +49368,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -49393,7 +49399,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.X__builtin___memset_chk(tls, pDest, 0, uint64(N), libc.X__builtin_object_size(tls, pDest, 0)) @@ -49416,7 +49422,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -49433,7 +49439,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -49478,7 +49484,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -49505,7 +49511,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -49524,7 +49530,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -49554,7 +49560,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -49564,7 +49570,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -49577,7 +49583,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -49615,7 +49621,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -49664,7 +49670,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -49701,7 +49707,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -49815,7 +49821,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -49847,7 +49853,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49927,7 +49933,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -49951,7 +49957,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -49982,7 +49988,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -50008,7 +50014,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -50070,7 +50076,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -50117,7 +50123,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -50243,7 +50249,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -50562,7 +50568,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -50600,7 +50606,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -50711,7 +50717,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -50837,7 +50843,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -50986,7 +50992,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -51048,7 +51054,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -51061,7 +51067,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -51107,7 +51113,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -51179,7 +51185,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -51199,7 +51205,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -51237,7 +51243,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -51246,7 +51252,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -51262,7 +51268,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -51283,7 +51289,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -51295,13 +51301,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -51330,7 +51336,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -51412,7 +51418,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -51472,7 +51478,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -51522,7 +51528,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -51596,7 +51602,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -51684,7 +51690,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -51725,7 +51731,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -51755,7 +51761,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -51825,7 +51831,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -51848,7 +51854,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -51884,7 +51890,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52074,7 +52080,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -52131,7 +52137,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -52175,13 +52181,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -52190,7 +52196,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -52203,7 +52209,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -52213,7 +52219,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -52225,7 +52231,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -52265,7 +52271,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -52303,7 +52309,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -52364,30 +52370,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -52395,7 +52401,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -52422,7 +52428,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52484,7 +52490,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -52544,21 +52550,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -52570,7 +52576,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -52596,7 +52602,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -52666,14 +52672,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -52688,7 +52694,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -52700,12 +52706,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -52717,7 +52723,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -52745,13 +52751,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -52761,7 +52767,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -52778,7 +52784,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -52814,7 +52820,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -52844,7 +52850,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -52884,7 +52890,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -52895,7 +52901,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -52907,7 +52913,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -52927,7 +52933,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -52939,7 +52945,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -53518,7 +53524,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -53530,18 +53536,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -53549,7 +53555,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -53571,7 +53577,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -53602,7 +53608,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -53647,7 +53653,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -53655,13 +53661,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -53679,7 +53685,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -53711,7 +53717,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -53726,7 +53732,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -53750,7 +53756,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -53773,7 +53779,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -53815,7 +53821,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -53826,7 +53832,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -53835,7 +53841,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -53846,7 +53852,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -53858,12 +53864,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -53875,12 +53881,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -53894,7 +53900,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -53917,14 +53923,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -53942,7 +53948,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53985,7 +53991,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -54026,7 +54032,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -54045,7 +54051,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -54160,7 +54166,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -54364,7 +54370,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -54390,7 +54396,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -54462,7 +54468,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -54476,7 +54482,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -54523,7 +54529,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -54569,7 +54575,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -54615,10 +54621,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -54633,7 +54639,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -54717,7 +54723,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -54729,7 +54735,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -54748,7 +54754,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -54799,7 +54805,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -54930,7 +54936,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -55091,7 +55097,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -55110,7 +55116,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55182,7 +55188,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -55251,7 +55257,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55331,7 +55337,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -55376,7 +55382,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -55642,7 +55648,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -55859,7 +55865,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -55933,7 +55939,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -56021,7 +56027,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -56035,7 +56041,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -56102,7 +56108,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -56118,7 +56124,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -56135,7 +56141,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -56153,7 +56159,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -56185,7 +56191,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -56205,7 +56211,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -56242,7 +56248,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -56254,7 +56260,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -56285,7 +56291,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56339,12 +56345,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -56352,7 +56358,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -56374,7 +56380,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -56399,7 +56405,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -56453,7 +56459,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -56686,7 +56692,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56751,7 +56757,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -56795,7 +56801,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -56826,7 +56832,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -56860,14 +56866,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -56886,16 +56892,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -56925,7 +56931,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -56941,13 +56947,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -57468,7 +57474,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -57477,7 +57483,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -57486,7 +57492,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -57596,7 +57602,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -57692,7 +57698,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -57706,7 +57712,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -57715,7 +57721,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -57736,7 +57742,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -57764,7 +57770,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -57795,7 +57801,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -57818,7 +57824,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -57833,13 +57839,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -57851,7 +57857,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -57862,11 +57868,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -57889,7 +57895,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4387)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4387)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -57915,14 +57921,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4387)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -57939,7 +57945,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -57996,7 +58002,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -58047,7 +58053,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -58082,7 +58088,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -58106,7 +58112,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -58125,7 +58131,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -58172,7 +58178,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -58192,20 +58198,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -58227,7 +58233,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -58264,7 +58270,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -58305,7 +58311,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -58326,7 +58332,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -58345,7 +58351,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -58355,7 +58361,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -58368,7 +58374,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -58385,7 +58391,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -58425,7 +58431,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -58433,12 +58439,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -58451,7 +58457,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -58473,7 +58479,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -58485,7 +58491,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -58510,7 +58516,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58533,7 +58539,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -58552,7 +58558,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -58560,7 +58566,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -58591,7 +58597,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58612,7 +58618,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -58622,7 +58628,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -58640,7 +58646,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -58667,7 +58673,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -58697,7 +58703,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -58707,7 +58713,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58784,7 +58790,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -58815,7 +58821,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell) + 1))))), pInfo) @@ -58831,7 +58837,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -58872,7 +58878,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -58889,7 +58895,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -58906,7 +58912,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -58924,7 +58930,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -58969,7 +58975,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -58979,7 +58985,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -58992,7 +58998,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -59001,14 +59007,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.X__builtin___memmove_chk(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz)), libc.X__builtin_object_size(tls, data+uintptr(iFree+sz+sz2), 0)) @@ -59018,7 +59024,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -59080,7 +59086,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -59091,7 +59097,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -59126,7 +59132,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -59151,7 +59157,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -59180,7 +59186,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -59195,14 +59201,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -59218,7 +59224,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -59243,7 +59249,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -59258,7 +59264,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -59309,7 +59315,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -59333,12 +59339,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -59349,11 +59355,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -59366,7 +59372,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -59374,7 +59380,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -59384,10 +59390,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -59421,7 +59427,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -59472,7 +59478,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -59480,7 +59486,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -59512,12 +59518,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -59529,11 +59535,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -59544,7 +59550,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -59552,7 +59558,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -59574,14 +59580,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -59594,7 +59600,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -59603,21 +59609,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -59635,7 +59641,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -59658,7 +59664,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -59670,7 +59676,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -59697,7 +59703,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59715,7 +59721,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -59727,11 +59733,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -59747,7 +59753,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59757,7 +59763,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -59788,7 +59794,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -59812,18 +59818,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -59835,13 +59841,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -59856,7 +59862,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -59876,7 +59882,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -59901,7 +59907,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -60322,7 +60328,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -60354,7 +60360,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -60387,7 +60393,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -60396,7 +60402,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -60446,7 +60452,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -60463,7 +60469,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -60475,7 +60481,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -60490,7 +60496,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -60517,7 +60523,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -60551,7 +60557,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -60564,7 +60570,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -60578,7 +60584,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -60594,7 +60600,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -60618,7 +60624,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -60638,7 +60644,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -60671,7 +60677,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -60696,7 +60702,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60865,7 +60871,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -60942,7 +60948,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -60955,7 +60961,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -60995,7 +61001,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -61037,7 +61043,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -61301,7 +61307,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61353,14 +61359,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -61388,7 +61394,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -61405,7 +61411,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -61420,7 +61426,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61431,7 +61437,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -61501,7 +61507,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -61523,7 +61529,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -61598,7 +61604,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -61622,7 +61628,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -61636,7 +61642,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -61657,7 +61663,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -61680,7 +61686,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -61711,7 +61717,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -61761,7 +61767,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -61784,7 +61790,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -61840,7 +61846,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -61869,7 +61875,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -61904,7 +61910,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -61933,7 +61939,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61955,7 +61961,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62021,7 +62027,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -62045,7 +62051,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -62113,7 +62119,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -62126,7 +62132,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -62164,7 +62170,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -62172,7 +62178,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -62187,7 +62193,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -62197,13 +62203,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(uintptr(0)+32), libc.X__builtin_object_size(tls, p, 0)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -62244,7 +62250,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -62253,7 +62259,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -62262,26 +62268,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -62294,7 +62300,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -62311,7 +62317,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -62333,7 +62339,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -62401,7 +62407,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -62443,7 +62449,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -62454,7 +62460,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -62465,7 +62471,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -62522,7 +62528,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -62582,7 +62588,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -62602,7 +62608,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -62610,7 +62616,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -62623,7 +62629,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -62650,7 +62656,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -62681,7 +62687,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -62692,11 +62698,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -62713,7 +62719,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -62743,7 +62749,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -62822,7 +62828,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -62843,7 +62849,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -62865,7 +62871,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -62886,7 +62892,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -62907,7 +62913,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -62926,7 +62932,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -62975,7 +62981,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63090,7 +63096,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -63219,7 +63225,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -63323,7 +63329,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -63372,7 +63378,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -63439,7 +63445,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -63449,7 +63455,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -63488,7 +63494,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -63525,7 +63531,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -63558,7 +63564,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -63598,7 +63604,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -63652,7 +63658,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -63686,7 +63692,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -63753,7 +63759,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -63834,7 +63840,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -63876,7 +63882,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -63921,7 +63927,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -64035,7 +64041,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -64210,7 +64216,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -64231,7 +64237,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -64301,7 +64307,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -64318,7 +64324,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -64399,14 +64405,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -64418,7 +64424,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -64433,7 +64439,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -64453,7 +64459,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -64485,7 +64491,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -64667,7 +64673,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -64685,7 +64691,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -64721,7 +64727,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -64882,7 +64888,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -64959,11 +64965,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -64980,7 +64986,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -64988,7 +64994,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -65007,7 +65013,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -65038,12 +65044,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -65051,7 +65057,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.X__builtin___memmove_chk(tls, pData, pCell, uint64(sz), libc.X__builtin_object_size(tls, pData, 0)) @@ -65101,7 +65107,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -65139,7 +65145,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.X__builtin___memmove_chk(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz), libc.X__builtin_object_size(tls, pSlot, 0)) @@ -65166,7 +65172,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -65218,7 +65224,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -65252,7 +65258,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.X__builtin___memmove_chk(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2), libc.X__builtin_object_size(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, 0)) @@ -65392,7 +65398,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -65405,7 +65411,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -65503,7 +65509,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -65583,7 +65589,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -65885,7 +65891,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -65913,7 +65919,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -66092,7 +66098,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -66166,7 +66172,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -66239,7 +66245,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -66276,7 +66282,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -66360,7 +66366,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -66613,7 +66619,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -66835,7 +66841,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -66884,13 +66890,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -66904,7 +66910,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -67023,7 +67029,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -67065,7 +67071,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -67079,7 +67085,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -67103,7 +67109,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -67150,7 +67156,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -67222,7 +67228,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -67350,7 +67356,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -67413,7 +67419,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -67461,13 +67467,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.X__builtin___memcpy_chk(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */))), libc.X__builtin_object_size(tls, oldCell, 0)) @@ -67575,7 +67581,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -67602,7 +67608,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -67625,7 +67631,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -67707,7 +67713,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -67735,11 +67741,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -67848,7 +67854,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -67925,7 +67931,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -67955,7 +67961,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -67998,7 +68004,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -68061,7 +68067,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -68071,7 +68077,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -68087,7 +68093,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -68101,7 +68107,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -68205,7 +68211,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -68228,7 +68234,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -68250,7 +68256,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -68260,7 +68266,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -68332,7 +68338,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -68358,7 +68364,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -68377,7 +68383,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -68403,7 +68409,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -68466,12 +68472,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -68498,13 +68504,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -68515,7 +68521,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -68537,7 +68543,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -68564,7 +68570,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -68648,7 +68654,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -68660,7 +68666,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -68699,7 +68705,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -69088,7 +69094,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -69322,7 +69328,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -69333,14 +69339,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -69354,7 +69360,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -69370,7 +69376,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -69393,7 +69399,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -69407,7 +69413,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -69420,7 +69426,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -69444,7 +69450,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -69484,7 +69490,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -69492,7 +69498,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -69524,29 +69530,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -69586,7 +69592,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -69618,7 +69624,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -69628,7 +69634,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+5208, 0) return SQLITE_ERROR @@ -69642,7 +69648,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -69702,14 +69708,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -69771,7 +69777,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -69786,7 +69792,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -69796,7 +69802,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -70034,7 +70040,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -70092,13 +70098,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -70112,7 +70118,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -70133,7 +70139,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -70148,7 +70154,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -70162,7 +70168,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -70256,7 +70262,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -70289,7 +70295,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -70309,7 +70315,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -70365,7 +70371,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -70383,7 +70389,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -70398,7 +70404,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -70423,7 +70429,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -70445,7 +70451,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -70467,7 +70473,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -70493,7 +70499,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -70523,7 +70529,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -70545,7 +70551,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -70564,7 +70570,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -70583,7 +70589,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -70593,7 +70599,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -70605,8 +70611,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -70617,7 +70623,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -70626,7 +70632,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -70647,7 +70653,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -70657,7 +70663,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -70675,7 +70681,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -70688,7 +70694,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -70709,7 +70715,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -70718,7 +70724,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -70733,7 +70739,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -70750,7 +70756,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -70777,7 +70783,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -70831,7 +70837,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -70848,7 +70854,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -70856,13 +70862,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -70877,7 +70883,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -70885,7 +70891,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -70895,14 +70901,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -70922,7 +70929,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -70935,7 +70942,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -70952,7 +70959,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -70968,13 +70975,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -70990,7 +70997,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -71012,7 +71019,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.X__builtin___memcpy_chk(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{})), libc.X__builtin_object_size(tls, pTo, 0)) @@ -71033,7 +71040,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -71146,11 +71153,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -71165,7 +71172,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -71190,7 +71197,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -71235,7 +71242,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -71251,7 +71258,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -71268,7 +71275,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -71279,7 +71286,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -71335,7 +71342,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -71481,7 +71488,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -71729,7 +71736,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -71752,7 +71759,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -71820,7 +71827,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -71865,7 +71872,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -71875,7 +71882,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -71896,7 +71903,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -71911,14 +71918,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -71934,7 +71941,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -71949,14 +71956,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -71967,14 +71974,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -71994,7 +72001,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -72018,12 +72025,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -72033,7 +72040,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -72046,7 +72053,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -72077,7 +72084,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -72130,7 +72137,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -72139,7 +72146,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -72162,26 +72169,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -72194,7 +72201,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -72242,7 +72249,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -72256,7 +72263,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -72288,7 +72295,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.X__builtin___memcpy_chk(tls, p4copy, zP4, uint64(8), libc.X__builtin_object_size(tls, p4copy, 0)) @@ -72298,7 +72305,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -72314,7 +72321,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -72338,7 +72345,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -72349,7 +72356,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -72360,7 +72367,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -72371,7 +72378,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -72406,14 +72413,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) @@ -72425,7 +72432,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -72438,12 +72445,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } @@ -72466,7 +72473,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -72598,7 +72605,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -72629,7 +72636,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -72645,7 +72652,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -72689,23 +72696,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -72714,7 +72721,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -72729,7 +72736,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -72740,26 +72747,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -72820,7 +72827,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -72835,18 +72842,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -72862,7 +72869,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -72886,7 +72893,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -72903,7 +72910,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -72950,7 +72957,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -72966,7 +72973,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -72987,7 +72994,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -73001,11 +73008,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -73168,7 +73175,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 5362, ts + 5364, ts + 5366, ts + 5371} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 5362, ts + 5364, ts + 5366, ts + 5371} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -73176,7 +73183,7 @@ var encnames = [4]uintptr{ts + 5362, ts + 5364, ts + 5366, ts + 5371} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -73203,7 +73210,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -73222,7 +73229,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -73237,7 +73244,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -73245,7 +73252,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -73255,7 +73262,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -73299,7 +73306,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -73311,7 +73318,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -73410,7 +73417,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -73439,7 +73446,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -73528,7 +73535,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -73543,7 +73550,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -73560,7 +73567,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -73593,7 +73600,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -73702,11 +73709,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 5376, ts + 5381, ts + 5388, ts + 5391, ts + 5394, ts + 5397, ts + 5400, ts + 5403, ts + 5411, ts + 5414, ts + 5421, ts + 5429, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -73740,7 +73747,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -73756,7 +73763,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -73780,7 +73787,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -73811,7 +73818,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -73836,7 +73843,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -73855,7 +73862,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -74083,7 +74090,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -74101,7 +74108,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -74144,7 +74151,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -74159,7 +74166,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -74182,7 +74189,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -74386,7 +74393,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -74396,7 +74403,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -74425,7 +74432,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74477,7 +74484,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -74501,7 +74508,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -74526,7 +74533,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -74547,7 +74554,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -74570,7 +74577,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -74583,7 +74590,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -74595,7 +74602,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -74613,7 +74620,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -74632,7 +74639,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -74707,10 +74714,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -74720,7 +74727,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -74769,7 +74776,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74820,7 +74827,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74847,7 +74854,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -74950,7 +74957,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -74964,7 +74971,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -74982,7 +74989,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75043,7 +75050,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -75086,7 +75093,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -75099,7 +75106,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -75139,7 +75146,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -75185,7 +75192,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -75279,7 +75286,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -75342,7 +75349,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -75384,7 +75391,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -75449,7 +75456,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -75484,7 +75491,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -75545,7 +75552,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -75556,7 +75563,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -75661,7 +75668,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -75685,7 +75692,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -75723,7 +75730,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -75777,7 +75784,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -75862,7 +75869,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -75874,7 +75881,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -75890,7 +75897,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -75904,7 +75911,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -75912,7 +75919,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } @@ -75932,7 +75939,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) @@ -75940,12 +75947,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -75955,7 +75962,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -75975,7 +75982,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -75991,7 +75998,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -76022,7 +76029,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -76038,7 +76045,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -76055,7 +76062,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -76107,7 +76114,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -76133,7 +76140,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } @@ -76141,7 +76148,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5603, 0) return 1 @@ -76151,7 +76158,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5648, 0) return 1 @@ -76163,7 +76170,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -76196,7 +76203,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -76206,7 +76213,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -76226,7 +76233,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -76248,7 +76255,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -76270,7 +76277,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -76293,27 +76300,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -76323,7 +76330,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -76336,26 +76343,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -76424,20 +76431,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -76463,7 +76470,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -76478,7 +76485,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -76492,7 +76499,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -76505,12 +76512,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -76519,39 +76526,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -76559,19 +76566,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -76583,32 +76590,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -76618,7 +76625,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -76632,7 +76639,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5688, int64(-1), @@ -76640,7 +76647,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -76650,7 +76657,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -76660,7 +76667,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -76687,7 +76694,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -76854,14 +76861,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76901,7 +76908,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -76914,7 +76921,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -76931,14 +76938,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -76996,13 +77003,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -77011,7 +77018,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77034,7 +77041,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -77054,7 +77061,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -77072,7 +77079,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -77095,7 +77102,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -77175,13 +77182,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -77191,7 +77198,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -77200,19 +77207,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -77247,7 +77254,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -77264,7 +77271,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -77274,43 +77281,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -77320,13 +77327,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -77346,7 +77353,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -77378,11 +77385,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -77391,44 +77398,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -77445,13 +77452,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -77459,7 +77466,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5721, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -77493,7 +77500,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -77519,16 +77526,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -77539,11 +77546,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -77554,7 +77561,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -77564,7 +77571,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -77577,11 +77584,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -77589,11 +77596,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -77642,7 +77649,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -77653,7 +77660,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -77670,7 +77677,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -77682,7 +77689,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -77693,19 +77700,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -77728,7 +77735,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -77749,7 +77756,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -77758,7 +77765,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } @@ -77767,7 +77774,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } @@ -77775,7 +77782,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -77784,7 +77791,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -77797,7 +77804,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77823,7 +77830,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -77838,7 +77845,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -77853,7 +77860,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -77866,7 +77873,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -77880,7 +77887,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -77972,7 +77979,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -77991,7 +77998,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -78003,7 +78010,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -78015,7 +78022,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -78029,7 +78036,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -78170,7 +78177,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78215,7 +78222,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -78438,7 +78445,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -78509,7 +78516,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -78531,7 +78538,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78577,7 +78584,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -78609,7 +78616,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -78621,7 +78628,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -78629,7 +78636,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78665,7 +78672,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -78679,13 +78686,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -78701,7 +78708,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -78725,7 +78732,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -78735,11 +78742,11 @@ var azTypes = [5]uintptr{ ts + 1105, ts + 1083, ts + 1528, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -80851,6 +80858,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -83875,7 +83886,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -83911,10 +83942,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -83922,13 +83953,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -83937,14 +83968,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -83952,12 +83983,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -83972,7 +84003,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -83990,13 +84021,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -84013,38 +84044,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.X__builtin___memset_chk(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{})), libc.X__builtin_object_size(tls, bp+248, 0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -84054,27 +84085,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -84083,63 +84114,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -84147,55 +84178,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.X__builtin___memcpy_chk(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len), libc.X__builtin_object_size(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, 0)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -84210,20 +84241,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -84233,15 +84264,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -84276,81 +84307,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -84358,45 +84389,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -84421,14 +84452,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -84436,30 +84467,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -84523,31 +84554,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -84576,13 +84607,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -84592,77 +84623,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -84671,79 +84702,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -84752,22 +84783,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -84776,37 +84807,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -84821,7 +84852,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -84834,13 +84865,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -84859,20 +84890,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -84893,17 +84924,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5888, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -84914,16 +84945,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.X__builtin___memcpy_chk(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1), libc.X__builtin_object_size(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, 0)) @@ -84931,14 +84962,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -84946,121 +84977,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5939, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5961, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -85073,36 +85079,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -85110,48 +85141,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -85172,18 +85203,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -85191,43 +85222,43 @@ __519: ts+6015, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -85243,7 +85274,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -85285,66 +85316,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -85352,16 +85383,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -85381,20 +85412,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -85441,37 +85472,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -85561,13 +85592,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -85576,11 +85607,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -85592,24 +85623,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -85621,32 +85652,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -85666,10 +85697,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -85688,10 +85719,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -85746,7 +85777,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -85754,11 +85785,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1527 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -85767,71 +85798,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -85850,19 +85881,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -85877,10 +85908,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -85904,10 +85935,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -86032,7 +86063,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -86042,10 +86073,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -86054,29 +86085,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -86087,53 +86118,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -86158,97 +86189,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -86306,10 +86337,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -86318,60 +86349,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -86394,18 +86425,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -86417,10 +86448,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -86515,10 +86546,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; // Fall through into OP_NotFound /* no break */ @@ -86533,15 +86564,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -86551,62 +86582,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -86614,31 +86645,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -86692,7 +86723,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -86702,14 +86733,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; // Fall through into OP_NotExists /* no break */ @@ -86732,25 +86763,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -86808,89 +86839,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -86899,36 +86930,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -86983,56 +87014,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -87044,13 +87075,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -87061,13 +87092,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -87080,7 +87111,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -87106,10 +87137,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -87159,28 +87190,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -87192,13 +87223,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -87207,28 +87238,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -87268,16 +87299,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -87300,10 +87331,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -87353,29 +87384,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -87396,20 +87427,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -87420,36 +87451,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -87458,6 +87489,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -87465,11 +87500,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -87502,39 +87537,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -87550,29 +87585,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -87619,32 +87654,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -87727,18 +87762,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -87778,10 +87813,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -87791,10 +87826,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -87811,10 +87846,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -87837,17 +87872,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -87878,31 +87913,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+6230) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+6230) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -87949,25 +87984,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -87979,17 +88014,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -88003,16 +88038,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -88066,15 +88101,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -88088,19 +88123,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -88108,22 +88143,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -88159,13 +88194,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -88173,21 +88208,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -88213,23 +88248,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -88245,21 +88280,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -88280,10 +88315,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -88297,10 +88332,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -88321,15 +88356,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 6247 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -88341,11 +88376,11 @@ __751: ts+6261, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -88355,38 +88390,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -88399,10 +88434,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -88474,22 +88509,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -88507,15 +88542,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -88534,18 +88569,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -88580,35 +88615,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -88643,37 +88678,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+6304, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -88681,7 +88716,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -88690,10 +88725,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -88701,10 +88736,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -88726,24 +88761,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -88794,21 +88829,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -88825,25 +88860,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -88859,35 +88894,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -88904,11 +88939,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -88941,7 +88976,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -88951,10 +88986,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -88969,16 +89004,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -88991,17 +89026,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -89048,10 +89083,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -89081,75 +89116,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -89185,32 +89220,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -89232,32 +89267,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -89280,17 +89315,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -89300,18 +89335,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -89323,11 +89358,11 @@ __830: return ts + 6398 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -89335,29 +89370,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -89365,18 +89400,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -89386,10 +89421,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -89411,10 +89446,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -89430,17 +89465,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -89462,13 +89497,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -89511,25 +89546,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+6405, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -89545,16 +89580,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -89574,17 +89609,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -89598,10 +89633,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -89616,11 +89651,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -89628,10 +89663,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -89640,18 +89675,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -89669,10 +89704,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -89717,27 +89752,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -89745,10 +89780,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -89772,11 +89807,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -89785,40 +89820,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -89832,10 +89867,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -89850,21 +89885,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -89882,27 +89917,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -89936,43 +89971,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -89981,41 +90016,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -90040,16 +90075,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -90109,24 +90144,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -90137,38 +90172,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -90207,16 +90242,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -90266,67 +90301,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6434, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -90371,25 +90406,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -90398,46 +90433,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -90468,11 +90503,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6472, ts + 6481, ts + 6488, - ts + 6494} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6494} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -90503,7 +90538,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -90524,7 +90559,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -90541,7 +90576,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90617,7 +90652,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -90938,7 +90973,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -90947,11 +90982,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -90970,14 +91005,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -91036,14 +91071,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -91053,7 +91088,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -91069,7 +91104,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -91078,7 +91113,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -91265,7 +91300,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -91416,7 +91451,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -91430,10 +91465,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -91444,18 +91479,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -91468,26 +91503,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -91497,10 +91532,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -91531,11 +91566,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -91552,7 +91587,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -91656,7 +91691,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -91696,7 +91731,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -91711,7 +91746,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -91752,7 +91787,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -91798,7 +91833,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -91821,7 +91856,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -91841,7 +91876,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -91853,7 +91888,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -91903,7 +91938,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -91963,7 +91998,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -91982,7 +92017,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -92078,7 +92113,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -92089,7 +92124,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -92109,7 +92144,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92128,14 +92163,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -92161,7 +92196,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -92186,7 +92221,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -92198,7 +92233,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -92215,7 +92250,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -92244,7 +92279,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -92263,7 +92298,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -92283,7 +92318,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -92307,7 +92342,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -92320,7 +92355,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -92359,7 +92394,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -92377,7 +92412,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -92434,7 +92469,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{})), libc.X__builtin_object_size(tls, p, 0)) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -92449,7 +92484,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -92478,7 +92513,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -92494,7 +92529,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -92517,7 +92552,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -92572,7 +92607,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92648,7 +92683,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -92659,7 +92694,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -92723,7 +92758,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92839,7 +92874,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -92885,7 +92920,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -92893,7 +92928,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -92916,7 +92951,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -92950,7 +92985,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -92977,7 +93012,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -92985,7 +93020,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93045,7 +93080,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -93115,7 +93150,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -93172,7 +93207,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -93188,7 +93223,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -93215,7 +93250,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93252,7 +93287,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -93268,7 +93303,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93319,7 +93354,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93400,7 +93435,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93475,7 +93510,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -93520,7 +93555,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93562,7 +93597,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -93581,7 +93616,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93616,7 +93651,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93708,7 +93743,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -93755,23 +93790,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -93818,7 +93853,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -93828,7 +93863,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -93866,7 +93901,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -93932,7 +93967,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -93960,7 +93995,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -93970,14 +94005,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -93992,7 +94027,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -94004,7 +94039,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -94032,20 +94067,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -94074,7 +94109,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -94122,7 +94157,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -94164,7 +94199,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -94173,7 +94208,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -94202,7 +94237,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -94212,7 +94247,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -94254,7 +94289,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -94303,7 +94338,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -94334,13 +94369,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -94352,7 +94387,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -94360,7 +94395,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -94395,14 +94430,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -94435,7 +94470,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -94481,7 +94516,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -94498,7 +94533,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { @@ -94524,7 +94559,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -94543,7 +94578,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -94593,7 +94628,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -95308,7 +95343,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -95357,7 +95392,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -95379,7 +95414,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95405,7 +95440,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -95887,7 +95922,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -95922,7 +95957,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -95966,7 +96001,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -95989,7 +96024,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -96126,7 +96161,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96172,7 +96207,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -96183,7 +96218,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -96215,7 +96250,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96292,7 +96327,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -96591,7 +96626,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -96632,7 +96667,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -96689,7 +96724,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -96723,7 +96758,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -96759,7 +96794,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -96780,7 +96815,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -96823,7 +96858,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -96835,7 +96870,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96846,7 +96881,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -96857,7 +96892,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -96882,7 +96917,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -96954,7 +96989,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -96964,7 +96999,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -96973,7 +97008,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -96998,7 +97033,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -97016,7 +97051,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -97029,7 +97064,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -97045,7 +97080,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -97068,7 +97103,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -97078,7 +97113,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -97105,7 +97140,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -97113,7 +97148,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -97143,7 +97178,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -97177,7 +97212,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -97225,7 +97260,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -97249,7 +97284,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -97278,7 +97313,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -97366,7 +97401,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97388,7 +97423,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -97396,7 +97431,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -97405,7 +97440,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -97425,7 +97460,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -97452,7 +97487,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -97462,7 +97497,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -97489,7 +97524,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -97537,7 +97572,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -97552,7 +97587,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -97575,7 +97610,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -97593,7 +97628,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -97621,7 +97656,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -97673,7 +97708,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -97692,7 +97727,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97729,7 +97764,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97761,7 +97796,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -97829,7 +97864,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -97859,7 +97894,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -97873,13 +97908,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -97891,7 +97926,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -97933,7 +97968,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -97955,7 +97990,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -97974,7 +98009,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -97991,7 +98026,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98101,7 +98136,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -98123,7 +98158,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -98133,14 +98168,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -98173,7 +98208,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -98181,7 +98216,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -98250,7 +98285,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -98303,7 +98338,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -98332,7 +98367,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98398,9 +98433,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -98417,7 +98452,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -98436,7 +98471,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -98459,7 +98494,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -98556,7 +98591,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -98583,7 +98618,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -98609,7 +98644,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -98624,7 +98659,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98636,7 +98671,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -98648,7 +98683,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -98656,7 +98691,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -98673,7 +98708,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -98685,7 +98720,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+7049) == 0 { return U32(EP_IsTrue) } @@ -98698,7 +98733,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -98712,7 +98747,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -98729,7 +98764,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -98775,7 +98810,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -98853,7 +98888,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -98877,7 +98912,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -98892,7 +98927,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -98900,12 +98935,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -98947,7 +98982,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -98983,7 +99018,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -98992,7 +99027,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99044,7 +99079,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -99083,7 +99118,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -99136,7 +99171,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7995) == 0 { return 1 } @@ -99154,7 +99189,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -99212,7 +99247,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -99224,7 +99259,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -99313,7 +99348,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -99531,7 +99566,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -99563,7 +99598,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -99582,7 +99617,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -99610,7 +99645,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -99805,7 +99840,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -99928,7 +99963,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -99965,7 +100000,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -100346,7 +100381,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100366,7 +100401,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -100412,7 +100447,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -100427,7 +100462,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -100446,7 +100481,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100497,7 +100532,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -100511,14 +100546,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -100537,7 +100572,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -100561,7 +100596,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -100569,7 +100604,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -100694,7 +100729,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -101765,7 +101800,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8414)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8414)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -101782,7 +101817,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8414)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -101851,7 +101886,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -101876,7 +101911,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -101897,7 +101932,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -101910,7 +101945,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -101936,7 +101971,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -102018,7 +102053,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -102081,7 +102116,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102313,7 +102348,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102563,7 +102598,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -102583,7 +102618,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102637,7 +102672,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -102741,7 +102776,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -102768,7 +102803,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -102779,7 +102814,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -102907,7 +102942,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -102930,7 +102965,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -103040,7 +103075,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -103074,7 +103109,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -103092,7 +103127,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -103117,7 +103152,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -103155,7 +103190,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -103171,7 +103206,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -103211,7 +103246,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -103260,7 +103295,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -103293,7 +103328,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.X__builtin___memset_chk(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, pWalker, 0)) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -103306,7 +103341,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -103323,7 +103358,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -103341,7 +103376,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -103532,7 +103567,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -103558,7 +103593,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -103583,7 +103618,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -103592,7 +103627,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -103602,7 +103637,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -103620,7 +103655,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -103638,7 +103673,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -103672,7 +103707,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103691,7 +103726,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -103715,7 +103750,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -103731,7 +103766,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -103744,7 +103779,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -103929,7 +103964,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -103944,7 +103979,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -104090,7 +104125,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -104207,7 +104242,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -104235,7 +104270,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -104364,7 +104399,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -104376,7 +104411,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -104395,7 +104430,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -104407,7 +104442,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -104418,7 +104453,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -104459,7 +104494,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -104469,7 +104504,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -104501,7 +104536,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -104523,7 +104558,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -104546,7 +104581,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -104562,7 +104597,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -104585,7 +104620,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -104601,7 +104636,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -104623,7 +104658,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -104645,7 +104680,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -104669,7 +104704,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -104686,7 +104721,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -104700,34 +104735,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+11210, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -104741,7 +104774,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -104761,7 +104794,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+11210, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+11218, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -104811,7 +104844,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.X__builtin___memcpy_chk(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn), libc.X__builtin_object_size(tls, zBuf1, 0)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+11216, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+11224, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 11208 /* " " */ @@ -104846,7 +104879,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -104944,7 +104977,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -104973,7 +105006,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -105012,7 +105045,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -105355,7 +105388,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -105366,7 +105399,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -105406,7 +105439,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -105540,7 +105573,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -105573,7 +105606,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -105687,7 +105720,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -105759,7 +105792,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -105799,7 +105832,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -105825,7 +105858,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+11221, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+11229, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -105845,7 +105878,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -105923,10 +105956,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+11228, + Xsqlite3ErrorMsg(tls, pParse, ts+11236, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 11256 /* "PRIMARY KEY" */ + return ts + 11264 /* "PRIMARY KEY" */ } return ts + 6481 /* "UNIQUE" */ }(), @@ -105939,7 +105972,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+11268, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+11276, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -105959,11 +105992,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+11316, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+11324, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11437, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11445, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -106078,16 +106111,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11455}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11476}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11496}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11515}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11534}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11463}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11484}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11504}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11523}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11542}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -106243,7 +106276,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -106284,7 +106317,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11557, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11565, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -106296,10 +106329,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11580, + ts+11588, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11610, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11618, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -106320,10 +106353,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11628 /* "sqlite_stat1" */, FzCols: ts + 11641 /* "tbl,idx,stat" */}, - {FzName: ts + 11654 /* "sqlite_stat4" */, FzCols: ts + 11667 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11695 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11636 /* "sqlite_stat1" */, FzCols: ts + 11649 /* "tbl,idx,stat" */}, + {FzName: ts + 11662 /* "sqlite_stat4" */, FzCols: ts + 11675 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11703 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -106350,14 +106383,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -106368,12 +106401,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -106382,7 +106415,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -106397,7 +106430,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -106407,7 +106440,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -106422,7 +106455,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -106457,7 +106490,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -106552,7 +106585,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11708} /* sqlite3.c:111534:22 */ + FzName: ts + 11716} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -106563,7 +106596,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -106585,7 +106618,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -106603,7 +106636,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -106746,7 +106779,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -106798,7 +106831,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -106870,7 +106903,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11718} /* sqlite3.c:111824:22 */ + FzName: ts + 11726} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -106889,7 +106922,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -106923,7 +106956,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11728, + Xsqlite3_str_appendf(tls, bp+24, ts+11736, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -106933,7 +106966,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11733, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11741, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -106976,7 +107009,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11739, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11747, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -106990,9 +107023,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11745} /* sqlite3.c:111958:22 */ + FzName: ts + 11753} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -107001,7 +107034,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -107037,7 +107070,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11754, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11762, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -107055,7 +107088,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.X__builtin___memcpy_chk(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11628, uint64(13), libc.X__builtin_object_size(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, 0)) + libc.X__builtin___memcpy_chk(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11636, uint64(13), libc.X__builtin_object_size(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, 0)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -107288,7 +107321,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11764, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11772, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -107350,7 +107383,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11764, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11772, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -107361,7 +107394,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -107369,7 +107402,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -107394,7 +107427,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -107403,9 +107436,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11768) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11776) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11772) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11780) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -107421,7 +107454,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -107484,16 +107517,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -107522,15 +107555,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11776, z) == 0 { + if Xsqlite3_strglob(tls, ts+11784, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11787, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11795, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11797, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11805, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -107552,7 +107585,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -107614,7 +107647,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -107631,7 +107664,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -107689,7 +107722,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -107710,7 +107743,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -107846,15 +107879,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11654, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11662, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11809, - ts+11863, + ts+11817, + ts+11871, zDb) } return rc @@ -107878,7 +107911,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -107906,10 +107939,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11628, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11636, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11915, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11923, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -107985,7 +108018,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -107999,7 +108032,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6735, zName) == 0) } @@ -108017,7 +108050,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -108084,7 +108117,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11956, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11964, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -108097,7 +108130,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11959, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11967, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -108111,7 +108144,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11996, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12004, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -108182,7 +108215,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12026, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12034, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -108199,7 +108232,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+12055, 0) + ts+12063, 0) rc = SQLITE_ERROR __23: ; @@ -108275,7 +108308,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12123, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12131, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -108310,7 +108343,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -108363,14 +108396,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12151, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12159, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12172, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12180, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -108378,7 +108411,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12198, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12206, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -108415,7 +108448,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -108494,7 +108527,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -108502,12 +108535,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 12220} /* sqlite3.c:113383:24 */ + FzName: ts + 12228} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -108515,10 +108548,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 12234} /* sqlite3.c:113403:24 */ + FzName: ts + 12242} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -108530,7 +108563,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+12248, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+12256, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -108538,7 +108571,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -108563,7 +108596,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+12272, + ts+12280, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -108599,7 +108632,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -108635,7 +108668,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -108650,15 +108683,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -108748,7 +108781,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -108761,8 +108794,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+12318, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+12326, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -108773,7 +108806,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -108788,11 +108821,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+12341, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+12349, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+12347, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12355, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+12353, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12361, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -108807,7 +108840,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -108856,7 +108889,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -108878,7 +108911,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+12380, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12388, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -108890,7 +108923,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -108899,7 +108932,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -108914,7 +108947,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -108948,7 +108981,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -108960,7 +108993,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -108984,7 +109017,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -109137,7 +109170,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -109188,7 +109221,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -109212,14 +109245,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8422, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12395+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12414+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12403+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12422+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6247+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12428) + ts+12436) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12414+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12422+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+6247) } @@ -109245,11 +109278,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8422, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12414+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12422+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+6247) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12395+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12403+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12428) + ts+12436) } } } @@ -109264,7 +109297,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -109285,7 +109318,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12447, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12455, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -109304,9 +109337,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12455 /* "no such view" */ + zMsg = ts + 12463 /* "no such view" */ } else { - zMsg = ts + 12468 /* "no such table" */ + zMsg = ts + 12476 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6930, libc.VaList(bp, zMsg, zDbase, zName)) @@ -109327,7 +109360,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -109341,13 +109374,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8422, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6247+7) == 0 { - return ts + 12414 /* "sqlite_schema" */ + return ts + 12422 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12428+7) == 0 { - return ts + 12395 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12436+7) == 0 { + return ts + 12403 /* "sqlite_temp_sche..." */ } } return zName @@ -109363,7 +109396,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -109390,7 +109423,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -109406,7 +109439,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -109438,7 +109471,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -109464,7 +109497,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -109485,7 +109518,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -109507,14 +109540,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -109537,7 +109570,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -109554,7 +109587,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -109573,7 +109606,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -109592,7 +109625,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -109642,7 +109675,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -109679,7 +109712,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -109692,7 +109725,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -109714,7 +109747,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -109727,7 +109760,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+6247) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -109740,7 +109773,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -109776,7 +109809,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -109800,7 +109833,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109809,13 +109842,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12482, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12490, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12499, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12507, libc.VaList(bp, pName1)) return -1 } } else { @@ -109827,7 +109860,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -109841,7 +109874,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109862,7 +109895,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8422, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12519, + Xsqlite3ErrorMsg(tls, pParse, ts+12527, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -109872,7 +109905,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -109883,7 +109916,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -109903,7 +109936,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -109950,7 +109983,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -109980,7 +110013,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -110003,7 +110036,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -110031,7 +110064,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 /* "sqlite_temp_mast..." */ + return ts + 12436 /* "sqlite_temp_mast..." */ } return ts + 6247 /* "sqlite_master" */ }()) @@ -110051,7 +110084,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12561, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12569, 0) return __4: ; @@ -110098,7 +110131,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }(), uintptr(0), zDb) != 0) { @@ -110138,7 +110171,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12602, + Xsqlite3ErrorMsg(tls, pParse, ts+12610, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10779 /* "view" */ @@ -110158,7 +110191,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12623, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12631, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -110261,8 +110294,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -110272,10 +110305,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12658, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12666, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -110294,12 +110327,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12675, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12683, 0) } else { } @@ -110320,7 +110353,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12658 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12666 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -110332,7 +110365,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12658, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12666, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -110344,7 +110377,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -110366,7 +110399,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12709, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12717, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -110378,13 +110411,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12732, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12740, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12739, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12747, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -110424,7 +110457,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12749, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12757, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -110463,7 +110496,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -110510,7 +110543,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -110584,7 +110617,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -110596,11 +110629,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12775, + Xsqlite3ErrorMsg(tls, pParse, ts+12783, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12820, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12828, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -110637,7 +110670,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -110646,12 +110679,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12861, 0) + ts+12869, 0) } } @@ -110671,7 +110704,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -110696,7 +110729,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12913, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12921, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -110785,7 +110818,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12954, 0) + ts+12962, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -110802,7 +110835,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -110832,7 +110865,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -110867,7 +110900,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -110887,7 +110920,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+13010, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13018, 0) goto generated_done __2: ; @@ -110900,13 +110933,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13053, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13061, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13061, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13069, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -110939,7 +110972,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+13068, + Xsqlite3ErrorMsg(tls, pParse, ts+13076, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -110962,7 +110995,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -110976,7 +111009,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -111011,7 +111044,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -111047,7 +111080,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -111082,12 +111115,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1527 /* "" */ - zSep2 = ts + 13099 /* "," */ + zSep2 = ts + 13107 /* "," */ zEnd = ts + 5311 /* ")" */ } else { - zSep = ts + 13101 /* "\n " */ - zSep2 = ts + 13105 /* ",\n " */ - zEnd = ts + 13110 /* "\n)" */ + zSep = ts + 13109 /* "\n " */ + zSep2 = ts + 13113 /* ",\n " */ + zEnd = ts + 13118 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -111095,7 +111128,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+13113, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+13121, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -111135,15 +111168,15 @@ __6: var azType1 = [5]uintptr{ ts + 1527, - ts + 13127, - ts + 13133, - ts + 13138, - ts + 13143, -} /* sqlite3.c:115999:23 */ + ts + 13135, + ts + 13141, + ts + 13146, + ts + 13151, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -111172,7 +111205,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -111201,7 +111234,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -111221,7 +111254,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -111241,7 +111274,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -111274,7 +111307,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -111313,7 +111346,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -111476,7 +111509,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -111509,7 +111542,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -111553,7 +111586,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -111590,7 +111623,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -111646,10 +111679,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+13149, + ts+13157, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+13182, + Xsqlite3ErrorMsg(tls, pParse, ts+13190, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -111669,11 +111702,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+13209, 0) + ts+13217, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+13259, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13267, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -111717,7 +111750,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13291, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13299, 0) return } } @@ -111751,11 +111784,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 9164 /* "table" */ - zType2 = ts + 13335 /* "TABLE" */ + zType2 = ts + 13343 /* "TABLE" */ } else { // A view zType = ts + 10779 /* "view" */ - zType2 = ts + 13341 /* "VIEW" */ + zType2 = ts + 13349 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -111780,6 +111813,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -111836,7 +111874,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+13346, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13354, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -111844,7 +111882,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+13361, + ts+13369, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -111862,14 +111900,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13459, + ts+13467, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13501, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13509, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -111906,7 +111944,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -111927,7 +111965,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13535, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13543, 0) goto create_view_fail __1: ; @@ -112024,7 +112062,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -112064,7 +112102,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13579, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -112139,7 +112177,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -112169,7 +112207,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -112195,14 +112233,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13609, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -112216,7 +112254,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13616, + ts+13624, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -112225,7 +112263,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -112271,7 +112309,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -112280,17 +112318,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13683, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13691, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11580, + ts+11588, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -112323,7 +112361,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13697, + ts+13705, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -112335,7 +112373,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13742, + ts+13750, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -112354,7 +112392,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -112365,7 +112403,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8422, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3230, 4) == 0 { return 0 @@ -112386,7 +112424,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -112454,7 +112492,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }() @@ -112516,7 +112554,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13817, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -112526,14 +112564,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13837, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13871, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13879, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -112548,7 +112586,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11772, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11780, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -112574,7 +112612,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -112613,7 +112651,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13903, + ts+13911, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -112626,7 +112664,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13966, 0) + ts+13974, 0) goto fk_end goto __7 __6: @@ -112711,7 +112749,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+14060, + ts+14068, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -112797,7 +112835,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -112822,7 +112860,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -112934,7 +112972,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -112959,7 +112997,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -112968,12 +113006,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+14106, + Xsqlite3ErrorMsg(tls, pParse, ts+14114, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 14134 /* "FIRST" */ + return ts + 14142 /* "FIRST" */ } - return ts + 14140 /* "LAST" */ + return ts + 14148 /* "LAST" */ }())) return 1 } @@ -112992,7 +113030,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -113132,7 +113170,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14145, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14153, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -113153,7 +113191,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+14151, + ts+14159, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -113185,21 +113223,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+14201, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14209, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+14229, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14237, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+14254, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14262, 0) goto exit_create_index __17: ; @@ -113226,7 +113264,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14145, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14153, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -113241,7 +113279,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+14288, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14296, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -113253,7 +113291,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+14322, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14330, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -113282,7 +113320,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+14346, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14354, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -113311,7 +113349,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }(), uintptr(0), zDb) != 0) { @@ -113357,7 +113395,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14145) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14153) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -113475,7 +113513,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14369, 0) + ts+14377, 0) goto exit_create_index __56: ; @@ -113705,7 +113743,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14430, libc.VaList(bp+48, 0)) + ts+14438, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -113761,8 +113799,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14472, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14480, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -113819,12 +113857,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14489, + zStmt = Xsqlite3MPrintf(tls, db, ts+14497, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1527 /* "" */ } - return ts + 14509 /* " UNIQUE" */ + return ts + 14517 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -113836,7 +113874,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14517, + ts+14525, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -113852,7 +113890,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14576, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14584, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -113948,7 +113986,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -113992,11 +114030,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -114031,7 +114069,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14603, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14611, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -114046,7 +114084,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14621, libc.VaList(bp+8, 0)) + ts+14629, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -114057,7 +114095,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }() @@ -114087,9 +114125,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14694, + ts+14702, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11768, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11776, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -114115,7 +114153,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -114142,7 +114180,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114173,7 +114211,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -114187,7 +114225,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -114225,7 +114263,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114240,7 +114278,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14754, + Xsqlite3ErrorMsg(tls, pParse, ts+14762, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -114307,7 +114345,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -114346,7 +114384,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -114378,7 +114416,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -114441,7 +114479,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114452,12 +114490,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14790, + Xsqlite3ErrorMsg(tls, pParse, ts+14798, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14826 /* "ON" */ + return ts + 14834 /* "ON" */ } - return ts + 14829 /* "USING" */ + return ts + 14837 /* "USING" */ }())) goto append_from_error __1: @@ -114505,7 +114543,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -114527,7 +114565,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -114544,7 +114582,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -114568,7 +114606,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -114579,14 +114617,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14835, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14843, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -114614,7 +114652,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -114622,9 +114660,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14841 + return ts + 14849 } - return ts + 14850 + return ts + 14858 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -114636,7 +114674,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -114649,11 +114687,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14835, ts + 14857, ts + 14841} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14843, ts + 14865, ts + 14849} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114665,7 +114703,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14865, 0) + ts+14873, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -114679,13 +114717,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12341, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12349, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14949, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14957, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -114854,7 +114892,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -114869,7 +114907,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -114886,7 +114924,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -114928,7 +114966,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114988,14 +115026,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14958, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14966, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -115041,7 +115079,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -115061,7 +115099,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -115069,7 +115107,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -115079,7 +115117,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115098,7 +115136,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+15004, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15012, libc.VaList(bp, zName)) } } } @@ -115122,7 +115160,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -115152,7 +115190,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -115183,7 +115221,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -115198,7 +115236,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -115209,7 +115247,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -115233,7 +115271,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -115278,7 +115316,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -115294,7 +115332,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -115314,7 +115352,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115336,7 +115374,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+15034, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15042, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -115360,7 +115398,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -115401,7 +115439,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -115437,7 +115475,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -115449,7 +115487,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -115487,7 +115525,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -115567,7 +115605,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -115602,7 +115640,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -115649,7 +115687,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -115667,7 +115705,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -115688,7 +115726,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -115707,16 +115745,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+15065, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15073, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+15094, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15102, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -115725,7 +115763,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -115757,7 +115795,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -116308,7 +116346,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15132) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15140) __61: ; @@ -116363,7 +116401,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -116453,7 +116491,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11628) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11636) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -116500,7 +116538,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -116589,7 +116627,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -116645,7 +116683,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -116673,7 +116711,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -116683,14 +116721,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -116720,7 +116758,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -116731,18 +116769,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6545, ts + 6540, ts + 8295, ts + 8290, ts + 6535} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6545, ts + 6540, ts + 8295, ts + 8290, ts + 6535} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -116791,7 +116829,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -116803,7 +116841,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+15145, -1) + Xsqlite3_result_error(tls, context, ts+15153, -1) return } iVal = -iVal @@ -116845,7 +116883,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -116960,7 +116998,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -116997,7 +117035,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -117105,7 +117143,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -117143,7 +117181,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+15162, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+15170, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -117159,7 +117197,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -117176,7 +117214,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -117197,7 +117235,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -117226,7 +117264,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -117250,7 +117288,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -117268,7 +117306,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -117283,7 +117321,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -117292,7 +117330,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -117307,20 +117345,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -117360,7 +117398,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -117546,13 +117584,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -117570,7 +117608,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -117593,7 +117631,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+15167, -1) + Xsqlite3_result_error(tls, context, ts+15175, -1) return } if argc == 3 { @@ -117605,7 +117643,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+15200, -1) + ts+15208, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -117633,7 +117671,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -117643,7 +117681,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -117654,7 +117692,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -117665,7 +117703,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -117677,7 +117715,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -117692,7 +117730,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -117707,11 +117745,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -117733,7 +117771,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+15245, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+15253, libc.VaList(bp+8, r1)) } } break @@ -117770,7 +117808,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+15252, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+15260, libc.VaList(bp+24, zArg)) break } @@ -117792,7 +117830,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -117815,7 +117853,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -117829,7 +117867,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -117867,7 +117905,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -117905,7 +117943,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -117924,7 +117962,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -118013,7 +118051,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -118116,8 +118154,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 11208 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 11208 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -118126,7 +118164,7 @@ var azOne = [1]uintptr{uintptr(ts + 11208 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -118164,7 +118202,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+15255, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+15263, 4, uintptr(0)) } } @@ -118177,10 +118215,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -118192,7 +118230,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12380, -1) + Xsqlite3_result_error(tls, context, ts+12388, -1) return } @@ -118216,11 +118254,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -118230,7 +118268,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -118252,7 +118290,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -118275,12 +118313,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+15145, -1) + Xsqlite3_result_error(tls, context, ts+15153, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -118289,7 +118327,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -118297,7 +118335,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -118311,14 +118349,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -118332,7 +118370,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -118343,7 +118381,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -118353,7 +118391,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -118391,7 +118429,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -118404,11 +118442,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -118424,9 +118462,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -118491,7 +118529,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -118532,7 +118570,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -118540,7 +118578,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -118558,8 +118596,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+15260, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+15268, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -118569,7 +118607,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -118579,14 +118617,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+15266, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15274, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+15266, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15274, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15266, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15266, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15274, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15274, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -118604,7 +118642,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -118660,7 +118698,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -118689,11 +118727,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -118703,7 +118741,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -118760,18 +118798,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846264338327950288) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846264338327950288) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -118792,7 +118830,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -118818,13 +118856,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846264338327950288) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -118852,7 +118890,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -118863,109 +118901,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 15271}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 15291}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 15304}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 15322}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 15279}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 15299}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 15312}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 15330}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15331}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15339}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15339}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15354}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15380}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15405}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15414}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15425}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15446}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15446}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15452}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15452}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15458}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15458}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15463}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15463}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15463}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15467}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15467}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15467}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15471}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15478}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15486}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15499}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15506}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15513}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15526}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15530}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15530}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15536}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15542}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15548}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15552}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15559}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15566}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15584}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15599}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15616}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15627}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15633}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15651}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15339}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15347}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15347}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15362}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15388}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15413}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15422}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15433}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15440}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15454}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15454}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15460}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15460}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15466}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15466}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15471}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15471}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15471}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15475}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15479}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15486}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15494}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15501}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15514}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15521}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15529}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15534}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15544}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15550}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15556}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15560}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15567}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15574}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15585}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15592}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15607}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15624}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15635}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15641}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15659}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15673}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15681}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15690}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15690}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15697}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15697}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15707}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15711}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15717}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15721}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15721}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15727}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15727}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15667}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15681}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15689}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15698}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15698}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15705}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15705}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15715}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15719}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15725}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15729}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15729}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15735}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15735}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15740}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15266}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15266}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15745}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15745}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15754}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15759}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15748}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15274}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15274}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15753}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15753}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15762}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15767}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15773}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15779}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15782}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15786}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15792}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15782}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15797}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15801}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15805}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15811}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15815}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15820}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15825}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15830}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15836}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15840}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15775}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15781}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15787}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15790}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15800}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15790}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15805}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15809}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15813}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15819}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15823}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15828}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15833}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15838}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15844}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15848}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15853}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15858}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15863}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15869}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15875}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15881}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15852}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15856}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15861}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15866}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15871}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15877}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15883}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15889}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15894}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15902}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15905}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15745}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15910}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15902}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15910}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15913}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15753}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15918}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -119140,7 +119178,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -119251,7 +119289,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15914, + ts+15922, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -119286,7 +119324,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -119416,7 +119454,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -119443,7 +119481,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -119484,7 +119522,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -119608,7 +119646,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -119618,7 +119656,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -119632,7 +119670,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -119665,7 +119703,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -119728,7 +119766,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -119752,7 +119790,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -119776,7 +119814,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -119811,7 +119849,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -120013,7 +120051,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120072,7 +120110,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -120140,7 +120178,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -120343,7 +120381,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -120364,7 +120402,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -120424,7 +120462,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -120466,7 +120504,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -120545,7 +120583,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -120603,7 +120641,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -120639,7 +120677,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -120652,7 +120690,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -120765,7 +120803,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -120819,7 +120857,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -120859,7 +120897,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -120873,7 +120911,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -120881,7 +120919,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -120892,7 +120930,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -120923,16 +120961,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -121033,7 +121071,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -121215,7 +121253,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -121305,7 +121346,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15959, + ts+15967, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -121330,7 +121371,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+16000, + Xsqlite3ErrorMsg(tls, pParse, ts+16008, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -121502,7 +121543,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+16032, + ts+16040, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -121512,7 +121553,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+16084, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+16092, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -121568,7 +121609,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+16109, + Xsqlite3ErrorMsg(tls, pParse, ts+16117, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -121576,7 +121617,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+16155, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+16163, 0) goto insert_cleanup __57: ; @@ -122060,7 +122101,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16176) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16184) __123: ; @@ -122084,7 +122125,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -122111,7 +122152,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -122145,7 +122186,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -122156,7 +122197,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -122164,12 +122205,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -122182,7 +122223,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -122288,7 +122329,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -122406,7 +122447,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12341, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12349, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -123151,7 +123192,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -123168,7 +123209,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -123271,7 +123312,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -123349,7 +123390,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -123407,7 +123448,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -123428,18 +123469,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -123793,7 +123828,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -123814,7 +123849,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -124003,7 +124038,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -124337,7 +124372,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -124351,7 +124386,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -124395,7 +124430,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12380, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12388, 0) __3: ; return SQLITE_ERROR @@ -124405,7 +124440,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 16190 /* "sqlite3_extensio..." */ + zEntry = ts + 16198 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -124425,7 +124460,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+12341, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+12349, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -124471,7 +124506,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16213, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16221, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -124485,7 +124520,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16222, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16230, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -124509,7 +124544,7 @@ __17: goto __18 __18: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16226, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16234, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -124527,7 +124562,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+16232, libc.VaList(bp+16, zEntry, zFile)) + ts+16240, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -124554,7 +124589,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16275, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16283, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -124594,7 +124629,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+16307, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+16315, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -124604,10 +124639,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 16344, -} /* sqlite3.c:129386:21 */ + ts + 16352, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -124618,7 +124653,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -124629,7 +124664,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -124649,15 +124684,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -124667,7 +124702,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -124708,7 +124743,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -124727,7 +124762,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -124742,7 +124777,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -124773,7 +124808,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+16350, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+16358, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -124819,67 +124854,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5411, - ts + 16389, + ts + 16397, ts + 9164, - ts + 16393, - ts + 16398, ts + 16401, - ts + 16411, - ts + 16421, - ts + 16427, - ts + 16431, - ts + 16436, - ts + 16441, + ts + 16406, + ts + 16409, + ts + 16419, + ts + 16429, + ts + 16435, + ts + 16439, + ts + 16444, ts + 16449, - ts + 16460, - ts + 16463, + ts + 16457, + ts + 16468, + ts + 16471, - ts + 16470, - ts + 16431, - ts + 16436, - ts + 16477, - ts + 16482, + ts + 16478, + ts + 16439, + ts + 16444, ts + 16485, - ts + 16492, - ts + 16427, - ts + 16431, - ts + 16498, - ts + 16503, - ts + 16508, - ts + 16431, - ts + 16512, - ts + 16436, + ts + 16490, + ts + 16493, + ts + 16500, + ts + 16435, + ts + 16439, + ts + 16506, + ts + 16511, + ts + 16516, + ts + 16439, ts + 16520, - ts + 16524, - ts + 16529, - ts + 11772, - ts + 11768, - ts + 16535, - ts + 16540, - ts + 16545, - ts + 16389, - ts + 16431, - ts + 16550, - ts + 16557, - ts + 16564, - ts + 9164, + ts + 16444, + ts + 16528, + ts + 16532, + ts + 16537, + ts + 11780, + ts + 11776, + ts + 16543, + ts + 16548, + ts + 16553, + ts + 16397, + ts + 16439, + ts + 16558, + ts + 16565, ts + 16572, + ts + 9164, + ts + 16580, ts + 5414, - ts + 16578, + ts + 16586, - ts + 16389, - ts + 16431, - ts + 16583, - ts + 16588, - ts + 15782, - ts + 16593, + ts + 16397, + ts + 16439, + ts + 16591, + ts + 16596, + ts + 15790, + ts + 16601, - ts + 16606, - ts + 16615, - ts + 16622, + ts + 16614, + ts + 16623, + ts + 16630, - ts + 16633, -} /* sqlite3.c:129831:19 */ + ts + 16641, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -124890,250 +124925,250 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [67]PragmaName{ - { /* zName: */ FzName: ts + 16641, + { /* zName: */ FzName: ts + 16649, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16656, + { /* zName: */ FzName: ts + 16664, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16671, + { /* zName: */ FzName: ts + 16679, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16683, + { /* zName: */ FzName: ts + 16691, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16699, + { /* zName: */ FzName: ts + 16707, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16712, + { /* zName: */ FzName: ts + 16720, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16724, + { /* zName: */ FzName: ts + 16732, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16744, + { /* zName: */ FzName: ts + 16752, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16760, + { /* zName: */ FzName: ts + 16768, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16781, + { /* zName: */ FzName: ts + 16789, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16796, + { /* zName: */ FzName: ts + 16804, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16812, + { /* zName: */ FzName: ts + 16820, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16826, + { /* zName: */ FzName: ts + 16834, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16839, + { /* zName: */ FzName: ts + 16847, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16853, + { /* zName: */ FzName: ts + 16861, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16872, + { /* zName: */ FzName: ts + 16880, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16891, + { /* zName: */ FzName: ts + 16899, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16914, + { /* zName: */ FzName: ts + 16922, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16923, + { /* zName: */ FzName: ts + 16931, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16941, + { /* zName: */ FzName: ts + 16949, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16958, + { /* zName: */ FzName: ts + 16966, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16971, + { /* zName: */ FzName: ts + 16979, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16986, + { /* zName: */ FzName: ts + 16994, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 17004, + { /* zName: */ FzName: ts + 17012, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 17014, + { /* zName: */ FzName: ts + 17022, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17028, + { /* zName: */ FzName: ts + 17036, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17044, + { /* zName: */ FzName: ts + 17052, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 17069, + { /* zName: */ FzName: ts + 17077, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17088, + { /* zName: */ FzName: ts + 17096, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17099, + { /* zName: */ FzName: ts + 17107, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 17110, + { /* zName: */ FzName: ts + 17118, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17122, + { /* zName: */ FzName: ts + 17130, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 17138, + { /* zName: */ FzName: ts + 17146, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17151, + { /* zName: */ FzName: ts + 17159, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17170, + { /* zName: */ FzName: ts + 17178, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 17189, + { /* zName: */ FzName: ts + 17197, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCK_PROXY_FILE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17205, + { /* zName: */ FzName: ts + 17213, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17218, + { /* zName: */ FzName: ts + 17226, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17233, + { /* zName: */ FzName: ts + 17241, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 17243, + { /* zName: */ FzName: ts + 17251, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 17255, + { /* zName: */ FzName: ts + 17263, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 17264, + { /* zName: */ FzName: ts + 17272, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17275, + { /* zName: */ FzName: ts + 17283, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17285, + { /* zName: */ FzName: ts + 17293, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 17297, + { /* zName: */ FzName: ts + 17305, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 17308, + { /* zName: */ FzName: ts + 17316, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 17320, + { /* zName: */ FzName: ts + 17328, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 17337, + { /* zName: */ FzName: ts + 17345, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 17356, + { /* zName: */ FzName: ts + 17364, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 17382, + { /* zName: */ FzName: ts + 17390, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 17397, + { /* zName: */ FzName: ts + 17405, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17411, + { /* zName: */ FzName: ts + 17419, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17430, + { /* zName: */ FzName: ts + 17438, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17444, + { /* zName: */ FzName: ts + 17452, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17460, + { /* zName: */ FzName: ts + 17468, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17472, + { /* zName: */ FzName: ts + 17480, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17483, + { /* zName: */ FzName: ts + 17491, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17494, + { /* zName: */ FzName: ts + 17502, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17506, + { /* zName: */ FzName: ts + 17514, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17517, + { /* zName: */ FzName: ts + 17525, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17538, + { /* zName: */ FzName: ts + 17546, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17546, + { /* zName: */ FzName: ts + 17554, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17561, + { /* zName: */ FzName: ts + 17569, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17574, + { /* zName: */ FzName: ts + 17582, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17593, + { /* zName: */ FzName: ts + 17601, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17608, + { /* zName: */ FzName: ts + 17616, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -125149,7 +125184,7 @@ var aPragmaName = [67]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -125166,13 +125201,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17624)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17632)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -125181,12 +125216,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17649) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17657) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17659) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17667) { return PAGER_LOCKINGMODE_NORMAL } } @@ -125197,15 +125232,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+8308) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17666) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17674) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17671) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17679) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -125220,12 +125255,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16583) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16591) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17683) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17691) == 0 { return 2 } else { return 0 @@ -125235,13 +125270,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17690, 0) + ts+17698, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -125254,7 +125289,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -125268,7 +125303,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -125302,7 +125337,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -125312,7 +125347,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -125321,7 +125356,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -125337,23 +125372,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17752 /* "SET NULL" */ + zName = ts + 17760 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17761 /* "SET DEFAULT" */ + zName = ts + 17769 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17773 /* "CASCADE" */ + zName = ts + 17781 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17781 /* "RESTRICT" */ + zName = ts + 17789 /* "RESTRICT" */ break default: - zName = ts + 17790 /* "NO ACTION" */ + zName = ts + 17798 /* "NO ACTION" */ break } return zName @@ -125362,7 +125397,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -125371,11 +125406,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17800, ts + 17807, ts + 17815, ts + 17819, ts + 17683, ts + 17828, -} /* sqlite3.c:130656:15 */ + ts + 17808, ts + 17815, ts + 17823, ts + 17827, ts + 17691, ts + 17836, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -125402,7 +125437,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -125417,13 +125452,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17832 /* "w" */ + zType = ts + 17840 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17834 /* "a" */ + zType = ts + 17842 /* "a" */ } else { zType = ts + 7818 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17836, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17844, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -125431,15 +125466,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17843, ts + 17848, ts + 17856 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17851, ts + 17856, ts + 17864 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -125461,7 +125496,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(624) defer tls.Free(624) @@ -125715,7 +125750,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17864, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17872, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -126367,7 +126402,7 @@ __18: if !(zRight != 0) { goto __64 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17868) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17876) == 0) { goto __65 } b = 2 @@ -126456,7 +126491,7 @@ __72: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17659 /* "normal" */ + zRet = ts + 17667 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -126497,7 +126532,7 @@ __79: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __84 } - zRet = ts + 17649 /* "exclusive" */ + zRet = ts + 17657 /* "exclusive" */ __84: ; returnSingleText(tls, v, zRet) @@ -126862,7 +126897,7 @@ __124: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { goto __127 } - Xsqlite3ErrorMsg(tls, pParse, ts+17873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17881, 0) goto pragma_out __127: ; @@ -126924,7 +126959,7 @@ __134: if !(res1 != SQLITE_OK) { goto __135 } - Xsqlite3ErrorMsg(tls, pParse, ts+17898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17906, 0) goto pragma_out __135: ; @@ -126950,7 +126985,7 @@ __136: goto __138 } Xsqlite3ErrorMsg(tls, pParse, - ts+17928, 0) + ts+17936, 0) goto __139 __138: if !(iDb != 1) { @@ -127006,7 +127041,7 @@ __145: __147: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17981) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17989) == 0) { goto __148 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -127120,9 +127155,9 @@ __161: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17987 /* "issisii" */ + return ts + 17995 /* "issisii" */ } - return ts + 17995 /* "issisi" */ + return ts + 18003 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -127207,7 +127242,7 @@ __176: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __177 } - zSql = Xsqlite3MPrintf(tls, db, ts+18002, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+18010, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __178 } @@ -127260,13 +127295,13 @@ __184: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __186 } - zType = ts + 13053 /* "virtual" */ + zType = ts + 13061 /* "virtual" */ goto __187 __186: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __188 } - zType = ts + 18018 /* "shadow" */ + zType = ts + 18026 /* "shadow" */ goto __189 __188: zType = ts + 9164 /* "table" */ @@ -127276,7 +127311,7 @@ __187: ; __185: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18025, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18033, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -127346,7 +127381,7 @@ __196: goto __198 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18032, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18040, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -127356,7 +127391,7 @@ __196: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __199 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18037, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18045, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -127393,8 +127428,8 @@ __202: if !(pIdx1 != 0) { goto __204 } - *(*[3]uintptr)(unsafe.Pointer(bp + 536 /* azOrigin */)) = [3]uintptr{ts + 18042, ts + 18044, ts + 16460} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18046, + *(*[3]uintptr)(unsafe.Pointer(bp + 536 /* azOrigin */)) = [3]uintptr{ts + 18050, ts + 18052, ts + 16468} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18054, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -127428,7 +127463,7 @@ __205: __208: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18052, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18060, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -127451,7 +127486,7 @@ __209: goto __211 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18056, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18064, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __210 __210: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -127570,7 +127605,7 @@ __232: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __234 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18059, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18067, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -127578,7 +127613,7 @@ __232: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+18068)) + ts+18076)) goto __233 __233: j2++ @@ -127779,7 +127814,7 @@ __262: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __263: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18073, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18081, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 568 /* aiCols */))) @@ -128045,7 +128080,7 @@ __290: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+18077, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+18085, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -128147,7 +128182,7 @@ __310: goto __311 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+18101, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+18109, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { @@ -128169,7 +128204,7 @@ __311: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+18121, + zErr = Xsqlite3MPrintf(tls, db, ts+18129, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -128213,7 +128248,7 @@ __319: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+18143, + zErr1 = Xsqlite3MPrintf(tls, db, ts+18151, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -128247,9 +128282,9 @@ __324: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18173) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18181) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+18178) + Xsqlite3VdbeLoadString(tls, v, 4, ts+18186) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -128289,7 +128324,7 @@ __328: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18199) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18207) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __325: @@ -128311,7 +128346,7 @@ __320: if !!(isQuick != 0) { goto __330 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+18226) + Xsqlite3VdbeLoadString(tls, v, 2, ts+18234) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __331: @@ -128362,7 +128397,7 @@ __272: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18255 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18263 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __335: @@ -128440,7 +128475,7 @@ __342: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __344 } - Xsqlite3ErrorMsg(tls, pParse, ts+18258, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+18266, libc.VaList(bp+416, zRight)) __344: ; __339: @@ -128552,19 +128587,19 @@ __49: if !(zRight != 0) { goto __351 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17666) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17674) == 0) { goto __352 } eMode2 = SQLITE_CHECKPOINT_FULL goto __353 __352: - if !(Xsqlite3StrICmp(tls, zRight, ts+18283) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+18291) == 0) { goto __354 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __355 __354: - if !(Xsqlite3StrICmp(tls, zRight, ts+17819) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17827) == 0) { goto __356 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -128751,7 +128786,7 @@ __371: __373: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+18291, + zSubSql = Xsqlite3MPrintf(tls, db, ts+18299, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __374 @@ -128902,9 +128937,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -128915,16 +128950,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -128933,27 +128968,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 18309, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18314, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 18320, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 18329, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 18338, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18346, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18354}, - {FzName: ts + 18361}, + {FzName: ts + 18317, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18322, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 18328, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 18337, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 18346, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18354, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18362}, + {FzName: ts + 18369}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -128965,24 +129000,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -128999,7 +129034,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+18367) + Xsqlite3_str_appendall(tls, bp+32, ts+18375) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -129007,7 +129042,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+18382, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18390, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -129020,16 +129055,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18389, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18397, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18395) + Xsqlite3_str_appendall(tls, bp+32, ts+18403) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18407) + Xsqlite3_str_appendall(tls, bp+32, ts+18415) j++ } Xsqlite3_str_append(tls, bp+32, ts+5311, 1) @@ -129056,7 +129091,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -129068,7 +129103,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129133,7 +129168,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -129146,7 +129181,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -129157,7 +129192,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -129165,7 +129200,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -129181,7 +129216,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -129227,13 +129262,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+18422) + Xsqlite3_str_appendall(tls, bp+32, ts+18430) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18430, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18438, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18434, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18442, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -129249,14 +129284,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -129268,7 +129303,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -129286,12 +129321,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -129324,7 +129359,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -129335,12 +129370,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18438, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18446, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -129349,25 +129384,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 5362 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18466, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18474, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18497, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18505, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18505, - ts + 18512, - ts + 18524, -} /* sqlite3.c:133149:23 */ + ts + 18513, + ts + 18520, + ts + 18532, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -129389,7 +129424,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129434,7 +129469,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14472) + corruptSchema(tls, pData, argv, ts+14480) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -129472,13 +129507,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18535) + corruptSchema(tls, pData, argv, ts+18543) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14472) + corruptSchema(tls, pData, argv, ts+14480) } } } @@ -129491,7 +129526,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -129524,13 +129559,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 9164 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 8228 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18548 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18556 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -129643,7 +129678,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+12055) + ts+12063) rc = SQLITE_ERROR goto initone_error_out __13: @@ -129683,7 +129718,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18620) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18628) rc = SQLITE_ERROR goto initone_error_out __17: @@ -129705,7 +129740,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18644, + ts+18652, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -129792,7 +129827,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -129824,7 +129859,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -129843,7 +129878,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -129896,7 +129931,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -129923,7 +129958,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -129979,7 +130014,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -130002,7 +130037,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0)) libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0)) @@ -130015,7 +130050,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -130097,7 +130132,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18678, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18686, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -130124,7 +130159,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18708, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18716, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -130221,13 +130256,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -130256,7 +130291,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -130295,14 +130330,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -130315,7 +130350,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -130332,7 +130367,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -130345,7 +130380,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -130380,21 +130415,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -130428,7 +130463,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -130449,7 +130484,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -130479,7 +130514,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -130497,19 +130532,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -130538,7 +130573,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -130549,7 +130584,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -130599,14 +130634,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -130628,7 +130663,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -130671,18 +130706,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18727, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18735, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18771, 0) + ts+18779, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18826)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18834)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -130695,11 +130730,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -130733,7 +130768,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -130761,7 +130796,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -130806,7 +130841,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -130830,7 +130865,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -130865,7 +130900,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -130897,7 +130932,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18860, libc.VaList(bp, 0)) + ts+18868, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -130921,7 +130956,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18910, 0) + ts+18918, 0) return 1 } @@ -130956,7 +130991,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18965, libc.VaList(bp+8, zName)) + ts+18973, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -130979,11 +131014,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -130992,7 +131027,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -131005,7 +131040,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -131148,7 +131183,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -131196,7 +131231,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -131277,7 +131312,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -131305,7 +131340,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -131661,7 +131696,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) if p != 0 { @@ -131679,7 +131714,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -131690,7 +131725,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -131710,7 +131745,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -131744,20 +131779,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 19029 /* "UNION ALL" */ + z = ts + 19037 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 19039 /* "INTERSECT" */ + z = ts + 19047 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 19049 /* "EXCEPT" */ + z = ts + 19057 /* "EXCEPT" */ break default: - z = ts + 19056 /* "UNION" */ + z = ts + 19064 /* "UNION" */ break } return z @@ -131771,11 +131806,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19062, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19070, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -131788,7 +131823,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -131967,7 +132002,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -132045,7 +132080,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1092 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16572 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16580 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -132091,7 +132126,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -132148,7 +132183,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -132200,13 +132235,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16572 /* "rowid" */ + zCol = ts + 16580 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+12341, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+12349, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -132216,7 +132251,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+19085, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+19093, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -132248,7 +132283,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -132309,7 +132344,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16572 /* "rowid" */ + zName = ts + 16580 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -132322,7 +132357,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+19085, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+19093, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -132337,7 +132372,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+19094, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+19102, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -132380,7 +132415,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -132449,7 +132484,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -132484,7 +132519,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -132516,7 +132551,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -132573,7 +132608,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -132597,7 +132632,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -132666,7 +132701,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -132702,7 +132737,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+19102, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19110, 0) return __1: ; @@ -132812,7 +132847,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19151, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19159, 0) goto end_of_recursive_query __15: ; @@ -132834,7 +132869,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19193, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19201, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -132877,7 +132912,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19199, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19207, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -132907,7 +132942,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132927,7 +132962,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19214, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19222, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1527 /* "" */ } @@ -132947,7 +132982,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -132983,7 +133018,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -133083,8 +133118,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19237, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19252, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19245, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19260, 0) __8: ; @@ -133133,7 +133168,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19029, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19037, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -133209,7 +133244,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19271, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19279, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -133281,7 +133316,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19271, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19279, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -133446,15 +133481,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19292, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19300, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+19338, + ts+19346, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -133477,7 +133512,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -133673,7 +133708,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -133880,7 +133915,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19420, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19428, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -133888,7 +133923,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19431, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19439, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -133902,7 +133937,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19436, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19444, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -134023,14 +134058,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -134043,7 +134078,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -134126,7 +134161,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -134136,7 +134171,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -134179,7 +134214,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -134195,7 +134230,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -134227,7 +134262,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -134260,7 +134295,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -134270,7 +134305,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -134297,7 +134332,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -134467,7 +134502,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -134892,7 +134927,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -134900,7 +134935,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -134942,7 +134977,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -134977,7 +135012,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -135031,7 +135066,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -135098,7 +135133,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -135151,7 +135186,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -135222,7 +135257,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -135310,7 +135345,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -135326,12 +135361,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15463) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15471) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15467) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15475) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -135360,7 +135395,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -135400,7 +135435,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135411,7 +135446,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+19442, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19450, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -135439,7 +135474,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135518,12 +135553,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19460, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19468, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -135537,7 +135572,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -135572,7 +135607,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -135605,7 +135640,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -135688,7 +135723,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19483, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19491, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -135715,7 +135750,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19503, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19511, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -135731,7 +135766,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19546 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19554 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -135757,7 +135792,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19569, + Xsqlite3ErrorMsg(tls, pParse, ts+19577, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -135768,9 +135803,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19607 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19615 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19641 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19649 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -135787,7 +135822,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -135803,7 +135838,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -135818,7 +135853,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19679, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19687, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -135857,7 +135892,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -135945,7 +135980,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19691, + Xsqlite3ErrorMsg(tls, pParse, ts+19699, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -135964,7 +135999,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19730, + Xsqlite3ErrorMsg(tls, pParse, ts+19738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -135972,7 +136007,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19761, + Xsqlite3ErrorMsg(tls, pParse, ts+19769, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -136137,7 +136172,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+12341, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+12349, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -136153,7 +136188,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19794, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19802, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -136173,9 +136208,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19803, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19811, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19821, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19829, 0) } } } @@ -136185,7 +136220,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19841, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19849, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -136206,7 +136241,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -136244,7 +136279,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -136292,7 +136327,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -136321,7 +136356,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -136346,7 +136381,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -136374,13 +136409,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19872, 0) + ts+19880, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19923, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19931, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -136396,7 +136431,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -136435,7 +136470,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -136576,17 +136611,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19956, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19964, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19968 /* " USING COVERING ..." */ + return ts + 19976 /* " USING COVERING ..." */ } return ts + 1527 /* "" */ }(), @@ -136608,7 +136643,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -136654,7 +136689,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -136672,7 +136707,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -136713,7 +136748,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -136730,7 +136765,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -136931,7 +136966,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19991, + ts+19999, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -137017,7 +137052,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+20045, + Xsqlite3ErrorMsg(tls, pParse, ts+20053, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -137257,7 +137292,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20085, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20093, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) @@ -137320,7 +137355,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20100, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20108, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -137842,9 +137877,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 20116 /* "DISTINCT" */ + return ts + 20124 /* "DISTINCT" */ } - return ts + 20125 /* "GROUP BY" */ + return ts + 20133 /* "GROUP BY" */ }()) groupBySort = 1 @@ -138257,7 +138292,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+20116) + explainTempTable(tls, pParse, ts+20124) __141: ; @@ -138269,9 +138304,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 20134 /* "RIGHT PART OF OR..." */ + return ts + 20142 /* "RIGHT PART OF OR..." */ } - return ts + 20157 /* "ORDER BY" */ + return ts + 20165 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -138327,7 +138362,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -138351,12 +138386,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -138427,7 +138462,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+20166, 0) + ts+20174, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -138487,7 +138522,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -138559,7 +138594,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -138590,7 +138625,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -138619,7 +138654,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -138657,7 +138692,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -138687,7 +138722,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+20231, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20239, 0) goto trigger_cleanup __3: ; @@ -138748,7 +138783,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20277, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20285, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -138766,7 +138801,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+20285, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20293, 0) goto trigger_orphan_error __11: ; @@ -138781,7 +138816,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20277, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20285, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -138797,7 +138832,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+20326, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+20334, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -138814,7 +138849,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8422, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+20352, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20360, 0) goto trigger_cleanup __18: ; @@ -138824,12 +138859,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+20390, + Xsqlite3ErrorMsg(tls, pParse, ts+20398, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 20427 /* "BEFORE" */ + return ts + 20435 /* "BEFORE" */ } - return ts + 20434 /* "AFTER" */ + return ts + 20442 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -138838,7 +138873,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+20440, libc.VaList(bp+24, pTableName+8)) + ts+20448, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -138868,7 +138903,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }(), uintptr(0), zDb) != 0) { @@ -138964,7 +138999,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -139004,7 +139039,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+20277, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+20285, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -139041,13 +139076,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20486, + ts+20494, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20561, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20569, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -139088,7 +139123,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -139106,7 +139141,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -139123,10 +139158,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -139147,7 +139185,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -139179,7 +139217,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -139208,7 +139246,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -139227,7 +139265,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -139247,7 +139285,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -139313,7 +139351,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20590, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20598, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -139331,12 +139369,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -139354,7 +139392,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }() @@ -139369,7 +139407,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20610, + ts+20618, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -139377,7 +139415,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -139408,7 +139446,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -139425,7 +139463,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -139488,12 +139526,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20672, + ts+20680, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20720 /* "DELETE" */ + return ts + 20728 /* "DELETE" */ } - return ts + 20727 /* "UPDATE" */ + return ts + 20735 /* "UPDATE" */ }())) __15: ; @@ -139552,7 +139590,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -139577,7 +139615,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -139589,7 +139627,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20734, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20742, 0) return 1 } @@ -139598,7 +139636,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -139639,7 +139677,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -139707,7 +139745,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -139794,7 +139832,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -139807,7 +139845,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -139864,7 +139902,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20776, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20784, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -139913,7 +139951,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -139942,7 +139980,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -140002,7 +140040,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -140050,7 +140088,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -140107,7 +140145,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140137,7 +140175,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -140158,7 +140196,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -140170,7 +140208,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -140214,7 +140252,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -140297,7 +140335,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -140578,7 +140616,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20790, + ts+20798, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -140610,7 +140648,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20826, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20834, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -141651,7 +141689,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20845) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20853) __169: ; @@ -141687,7 +141725,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -141860,7 +141898,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -141873,14 +141911,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -141893,7 +141931,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -141919,7 +141957,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -142039,10 +142077,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 216)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20858, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20866, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20862, libc.VaList(bp+8, bp+216)) + ts+20870, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -142061,7 +142099,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -142083,7 +142121,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -142099,7 +142137,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -142133,7 +142171,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12482, -1) + ts+12490, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -142179,7 +142217,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142201,7 +142239,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20935, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20939, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20943, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20947, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -142219,7 +142257,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -142263,7 +142301,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -142320,7 +142358,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -142351,14 +142389,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20943) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20951) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20983) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20991) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -142369,7 +142407,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21026) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21034) return SQLITE_ERROR __5: ; @@ -142414,7 +142452,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+21044, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+21052, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -142435,7 +142473,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+21067) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21075) goto end_of_vacuum __8: ; @@ -142451,7 +142489,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14835) + rc = execSql(tls, db, pzErrMsg, ts+14843) if !(rc != SQLITE_OK) { goto __9 } @@ -142503,7 +142541,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+21094, + ts+21102, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -142513,7 +142551,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21202, + ts+21210, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -142528,7 +142566,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+21256, + ts+21264, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -142545,7 +142583,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+21407, + ts+21415, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -142658,7 +142696,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -142666,7 +142704,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -142706,7 +142744,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -142720,18 +142758,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -142752,7 +142790,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -142770,14 +142808,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -142787,7 +142825,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -142808,7 +142846,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -142845,7 +142883,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -142876,7 +142914,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -142902,7 +142940,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -142922,7 +142960,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142932,7 +142970,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12717, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -142948,7 +142986,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -142983,7 +143021,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -142994,7 +143032,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -143029,7 +143067,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21537, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21545, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -143041,7 +143079,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21561, + ts+21569, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -143051,7 +143089,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21660, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21668, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -143078,7 +143116,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -143086,7 +143124,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -143100,7 +143138,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -143121,7 +143159,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21679, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21687, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -143161,7 +143199,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21721, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21729, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3609, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -143175,7 +143213,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21751 /* "vtable construct..." */ + var zFormat uintptr = ts + 21759 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -143196,7 +143234,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16463, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16471, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -143236,7 +143274,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -143255,7 +143293,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21797, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21805, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -143272,7 +143310,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -143292,7 +143330,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -143304,7 +143342,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -143323,7 +143361,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21797, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21805, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -143344,7 +143382,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -143360,7 +143398,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -143434,7 +143472,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -143479,7 +143517,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -143509,7 +143547,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -143531,14 +143569,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -143549,7 +143587,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -143610,7 +143648,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -143658,7 +143696,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -143725,7 +143763,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -143764,7 +143802,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -143809,7 +143847,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -143826,19 +143864,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap1[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap1 = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -143847,7 +143885,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -143875,7 +143913,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -143939,7 +143977,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -143979,23 +144017,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -144025,9 +144063,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -144054,9 +144092,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -144066,9 +144104,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -144088,9 +144126,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -144103,9 +144141,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -144120,24 +144158,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -144159,7 +144197,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -144185,7 +144223,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -144207,7 +144245,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -144229,13 +144267,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21816 /* "" */ + return ts + 21824 /* "" */ } if i == -1 { - return ts + 16572 /* "rowid" */ + return ts + 16580 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -144246,19 +144284,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21823, 5) + Xsqlite3_str_append(tls, pStr, ts+21831, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21829, 1) + Xsqlite3_str_append(tls, pStr, ts+21837, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13099, 1) + Xsqlite3_str_append(tls, pStr, ts+13107, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -144269,11 +144307,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21829, 1) + Xsqlite3_str_append(tls, pStr, ts+21837, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13099, 1) + Xsqlite3_str_append(tls, pStr, ts+13107, 1) } Xsqlite3_str_append(tls, pStr, ts+5362, 1) } @@ -144294,7 +144332,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -144307,27 +144345,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21831, 2) + Xsqlite3_str_append(tls, pStr, ts+21839, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21823, 5) + Xsqlite3_str_append(tls, pStr, ts+21831, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21834 /* "%s=?" */ + return ts + 21842 /* "%s=?" */ } - return ts + 21839 /* "ANY(%s)" */ + return ts + 21847 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21847) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21855) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21849) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21857) } Xsqlite3_str_append(tls, pStr, ts+5311, 1) } @@ -144339,7 +144377,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -144374,11 +144412,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21851, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21859, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21857 /* "SEARCH" */ + return ts + 21865 /* "SEARCH" */ } - return ts + 21864 /* "SCAN" */ + return ts + 21872 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -144388,30 +144426,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 11256 /* "PRIMARY KEY" */ + zFmt = ts + 11264 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21869 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21877 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21902 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21910 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21927 /* "COVERING INDEX %..." */ + zFmt = ts + 21935 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21945 /* "INDEX %s" */ + zFmt = ts + 21953 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21954, 7) + Xsqlite3_str_append(tls, bp+64, ts+21962, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16572 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21962, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16580 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21970, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21993, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+22001, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -144419,9 +144457,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+22003, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+22011, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+22008, + Xsqlite3_str_appendf(tls, bp+64, ts+22016, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -144440,7 +144478,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -144458,22 +144496,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+22035, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+22043, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21834, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21842, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+22056, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+22064, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21823, 5) + Xsqlite3_str_append(tls, bp+24, ts+21831, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21834, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21842, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+5311, 1) @@ -144523,7 +144561,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -144556,7 +144594,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -144589,7 +144627,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -144627,7 +144665,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -144702,7 +144740,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -144895,7 +144933,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -144932,6 +144970,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -145015,7 +145054,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -145056,7 +145095,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -145084,10 +145123,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -145104,7 +145143,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -145124,7 +145163,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -145146,7 +145185,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -145211,7 +145250,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -145257,7 +145296,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145267,6 +145306,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -145299,7 +145341,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -145370,7 +145412,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -145432,53 +145473,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -145486,8 +145526,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -146123,6 +146163,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -146137,7 +146185,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -146154,7 +146204,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22064, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22072, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -146173,7 +146223,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22079, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22087, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -146521,24 +146571,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -146560,7 +146610,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -146601,14 +146651,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -146628,7 +146678,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -146655,7 +146705,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -146827,7 +146877,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -146932,18 +146982,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16421, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15740, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 15266, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 22088, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16429, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15748, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 15274, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 22096, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -146951,7 +147001,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -146960,7 +147010,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -146991,7 +147041,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -147124,7 +147174,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -147443,7 +147493,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -147472,7 +147522,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -147507,7 +147557,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -147545,7 +147595,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -147586,7 +147636,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -147649,7 +147699,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+22095, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22103, 0) return } } @@ -147833,7 +147883,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 22136 /* "NOCASE" */ + return ts + 22144 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -147954,7 +148004,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -147977,7 +148027,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -148001,7 +148051,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -148053,7 +148103,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -148103,7 +148153,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -148116,7 +148166,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -148176,7 +148226,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -148206,7 +148256,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -148216,14 +148266,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -148240,7 +148290,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -148252,7 +148302,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -148277,7 +148327,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+22143, + Xsqlite3ErrorMsg(tls, pParse, ts+22151, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -148336,7 +148386,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -148366,16 +148416,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -148385,7 +148435,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -148410,7 +148460,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -148431,7 +148481,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { @@ -148452,14 +148502,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -148478,19 +148528,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.X__builtin___memcpy_chk(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2), libc.X__builtin_object_size(tls, aiCur, 0)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.X__builtin___memcpy_chk(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{})), libc.X__builtin_object_size(tls, pDest+8, 0)) } @@ -148500,7 +148550,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -148577,7 +148627,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -148597,14 +148647,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -148615,7 +148665,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -148719,7 +148769,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -148741,7 +148791,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -148796,7 +148846,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -148826,7 +148876,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -148847,7 +148897,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -148868,7 +148918,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -148938,7 +148988,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -148955,7 +149005,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -148998,7 +149048,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -149032,7 +149082,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -149118,7 +149168,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+22179, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+22187, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -149199,7 +149249,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22205 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22213 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -149390,7 +149440,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -149466,7 +149516,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -149490,7 +149545,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -149716,7 +149771,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -149743,7 +149798,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -149781,7 +149836,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -149920,7 +149975,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -149933,7 +149988,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -149977,7 +150032,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -150092,7 +150147,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -150400,7 +150455,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -150409,7 +150464,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -150429,7 +150484,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.X__builtin___memset_chk(tls, pTo, 0, uint64(uintptr(0)+64), libc.X__builtin_object_size(tls, pTo, 0)) @@ -150446,13 +150501,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -150473,7 +150528,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -150499,7 +150554,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -150543,7 +150598,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -150602,7 +150657,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -150691,7 +150746,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -150798,7 +150853,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -150901,7 +150956,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -150969,7 +151024,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -151329,7 +151384,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -151371,7 +151426,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -151446,7 +151501,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -151731,7 +151786,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -151755,7 +151810,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -151857,7 +151912,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22216, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22224, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -151930,7 +151985,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+22216, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22224, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -151979,7 +152034,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -152002,7 +152057,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -152025,7 +152080,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -152051,7 +152106,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -152080,7 +152135,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -152216,7 +152271,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -152341,7 +152396,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -152393,7 +152448,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+22242, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+22250, 0) rc = SQLITE_OK } else { goto __3 @@ -152429,7 +152484,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -152797,7 +152852,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) } @@ -152805,7 +152860,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -152852,7 +152907,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -153167,7 +153222,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22277, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22285, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -153259,7 +153314,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -153366,7 +153421,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -153377,7 +153432,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -153423,7 +153478,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -153498,7 +153553,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -153610,7 +153665,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -153674,7 +153729,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22295, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+22303, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -153753,7 +153808,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22323, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22331, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -154294,7 +154349,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -154511,6 +154566,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -154692,7 +154749,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -154701,7 +154758,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -154717,13 +154774,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -154733,7 +154790,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -154751,9 +154808,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -154816,10 +154873,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+22341, -1) + pCtx, ts+22349, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -154829,7 +154886,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -154842,7 +154899,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -154856,7 +154913,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -154869,7 +154926,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -154882,7 +154939,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -154892,7 +154949,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -154900,7 +154957,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -154918,7 +154975,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -154928,7 +154985,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -154936,7 +154993,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -154950,13 +155007,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -154965,14 +155022,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+22397, -1) + pCtx, ts+22405, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -154980,7 +155037,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -155006,10 +155063,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -155024,7 +155081,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -155038,7 +155095,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -155046,7 +155103,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -155062,17 +155119,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22442)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22453)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22464)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22469)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22482)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22492)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22498)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22509)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22519)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22531)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22536 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22450)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22461)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22472)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22477)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22490)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22500)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22506)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22517)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22527)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22539)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22544 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -155081,7 +155138,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22536 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -155089,7 +155146,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -155104,7 +155161,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -155123,9 +155180,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155136,7 +155193,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22540, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22548, libc.VaList(bp, zName)) } return p } @@ -155156,7 +155213,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -155180,12 +155237,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22559, 0) + ts+22567, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22630, 0) + ts+22638, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -155224,16 +155281,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -155333,7 +155390,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -155357,7 +155414,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -155389,7 +155446,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -155435,7 +155492,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -155443,14 +155500,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22693, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22701, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -155460,12 +155517,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -155641,7 +155701,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -155652,7 +155712,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -155667,7 +155727,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -155680,7 +155740,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -155692,7 +155752,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -155725,7 +155785,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22719, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22727, 0) goto windowAllocErr __2: ; @@ -155761,7 +155821,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -155780,7 +155840,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -155791,15 +155851,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22751 /* "PARTITION clause" */ + zErr = ts + 22759 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22768 /* "ORDER BY clause" */ + zErr = ts + 22776 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22784 /* "frame specificat..." */ + zErr = ts + 22792 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22804, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22812, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -155814,7 +155874,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -155822,7 +155882,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22837, 0) + ts+22845, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -155833,7 +155893,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -155853,7 +155913,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -155893,7 +155953,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -155969,7 +156029,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -155998,17 +156058,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22884, - ts + 22937, - ts + 22341, - ts + 22988, - ts + 23040, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22892, + ts + 22945, + ts + 22349, + ts + 22996, + ts + 23048, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -156033,19 +156093,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -156081,7 +156141,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -156188,7 +156248,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -156224,7 +156284,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -156331,7 +156391,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -156414,7 +156474,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -156449,7 +156509,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -156474,7 +156534,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -156511,7 +156571,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -156634,7 +156694,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -156782,7 +156842,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -156813,7 +156873,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156838,7 +156898,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -157186,7 +157246,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -157583,17 +157643,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -157603,7 +157663,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157622,19 +157682,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23090, + Xsqlite3ErrorMsg(tls, pParse, ts+23098, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 20157 /* "ORDER BY" */ + return ts + 20165 /* "ORDER BY" */ } - return ts + 23132 /* "LIMIT" */ + return ts + 23140 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+23138, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23146, 0) } } @@ -157642,7 +157702,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -157654,7 +157714,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -157692,7 +157752,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -157706,14 +157766,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23172, + Xsqlite3ErrorMsg(tls, pParse, ts+23180, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -157781,7 +157841,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -158050,7 +158110,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -158278,7 +158338,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -158338,7 +158398,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -158381,7 +158441,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -158441,7 +158501,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -158643,7 +158703,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -158665,9 +158725,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -158676,9 +158736,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -158688,7 +158748,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -158703,7 +158763,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -158862,7 +158922,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -158870,7 +158930,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -158893,7 +158953,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -158933,7 +158993,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -158944,7 +159004,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -158954,7 +159014,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+23210, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23218, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -158963,7 +159023,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -159386,7 +159446,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -159793,7 +159853,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -159805,7 +159865,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -159950,21 +160010,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16572, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16580, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23240, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16485, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16493, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23240, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -160700,7 +160760,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+23259) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+23267) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -160851,7 +160911,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23268, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+23276, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -161346,21 +161406,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+23292, 0) + ts+23300, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23387, 0) + ts+23395, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23471, 0) + ts+23479, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -161800,7 +161860,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -161810,9 +161870,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23268, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+23276, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23556, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23564, 0) } //*********** End %syntax_error code ***************************************** @@ -161820,7 +161880,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -161850,7 +161910,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -161904,7 +161964,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -161955,7 +162015,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -162041,7 +162101,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -162054,7 +162114,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -162071,7 +162131,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -162086,7 +162146,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -162102,7 +162162,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -162135,7 +162195,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -162268,7 +162328,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -162446,7 +162506,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162455,7 +162515,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -162464,11 +162524,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -162491,13 +162551,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162547,7 +162607,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -162564,7 +162624,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -162578,7 +162638,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -162591,7 +162651,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -162959,7 +163019,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -163029,7 +163089,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23573, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23581, libc.VaList(bp, bp+2464)) break } } @@ -163052,7 +163112,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3609, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23598, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23606, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -163149,7 +163209,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -163252,7 +163312,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23609, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23617, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -163265,11 +163325,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20277, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20285, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23616, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23624, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23621, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23629, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -163282,9 +163342,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23631, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23639, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23635, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23643, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -163326,12 +163386,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -163358,7 +163418,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -163370,11 +163430,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -163387,14 +163447,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -163407,14 +163467,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -163445,7 +163505,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -163571,7 +163631,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -163610,7 +163670,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -163618,7 +163678,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -163888,7 +163948,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -163986,13 +164046,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -164011,7 +164071,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -164040,7 +164100,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -164119,11 +164179,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -164145,7 +164205,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -164158,7 +164218,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -164172,7 +164232,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -164188,39 +164248,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -164235,7 +164295,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -164250,7 +164310,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -164277,7 +164337,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -164293,14 +164353,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -164324,7 +164384,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23643, 0) + ts+23651, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -164337,7 +164397,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -164374,11 +164434,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -164388,7 +164448,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -164498,7 +164558,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -164548,24 +164608,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23711 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23719 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23725 /* "abort due to ROL..." */ + zErr = ts + 23733 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23747 /* "another row avai..." */ + zErr = ts + 23755 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23769 /* "no more rows ava..." */ + zErr = ts + 23777 /* "no more rows ava..." */ break } @@ -164583,36 +164643,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23792, - ts + 23805, + ts + 23800, + ts + 23813, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23821, - ts + 23846, - ts + 23860, - ts + 23879, + ts + 23829, + ts + 23854, + ts + 23868, + ts + 23887, ts + 1463, - ts + 23904, - ts + 23941, - ts + 23953, - ts + 23968, - ts + 24001, - ts + 24019, - ts + 24044, - ts + 24073, + ts + 23912, + ts + 23949, + ts + 23961, + ts + 23976, + ts + 24009, + ts + 24027, + ts + 24052, + ts + 24081, /* SQLITE_EMPTY */ uintptr(0), ts + 6202, ts + 5688, - ts + 24090, - ts + 24108, - ts + 24126, + ts + 24098, + ts + 24116, + ts + 24134, /* SQLITE_NOLFS */ uintptr(0), - ts + 24160, + ts + 24168, /* SQLITE_FORMAT */ uintptr(0), - ts + 24181, - ts + 24207, - ts + 24230, - ts + 24251, -} /* sqlite3.c:169926:20 */ + ts + 24189, + ts + 24215, + ts + 24238, + ts + 24259, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -164621,7 +164681,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -164644,8 +164704,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -164654,7 +164714,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -164672,7 +164732,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -164685,7 +164745,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -164701,7 +164761,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -164715,7 +164775,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ *(*int32)(unsafe.Pointer(db + 432)) = 1 } @@ -164723,7 +164783,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -164733,7 +164793,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -164791,7 +164851,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+24267, 0) + ts+24275, 0) return SQLITE_BUSY } else { @@ -164838,7 +164898,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -164880,22 +164940,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -164915,7 +164975,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164924,7 +164984,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+24330, libc.VaList(bp, zName)) + ts+24338, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -164939,7 +164999,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -164965,7 +165025,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -164983,7 +165043,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -165004,7 +165064,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -165022,7 +165082,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -165035,7 +165095,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -165048,7 +165108,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -165061,7 +165121,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -165073,7 +165133,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -165089,7 +165149,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -165107,7 +165167,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -165120,7 +165180,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -165131,7 +165191,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -165160,7 +165220,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24381, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24389, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -165181,7 +165241,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -165205,7 +165265,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -165247,19 +165307,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -165281,7 +165341,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -165293,7 +165353,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -165322,18 +165382,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -165341,9 +165401,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -165351,7 +165411,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -165361,13 +165421,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -165380,7 +165440,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -165390,7 +165450,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+24402, 0) + ts+24410, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -165443,7 +165503,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -165455,7 +165515,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -165502,7 +165562,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -165535,7 +165595,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24470, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24478, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -165583,10 +165643,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24476, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24484, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24486, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24494, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -165708,7 +165768,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24514, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24522, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -165719,17 +165779,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24518, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24526, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24518 /* "cache" */ + zModeType = ts + 24526 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24524, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24532, zOpt, uint64(4)) == 0) { goto __32 } @@ -165768,7 +165828,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24529, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24537, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -165776,7 +165836,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24549, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24557, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -165819,7 +165879,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24573, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24581, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -165840,24 +165900,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24589, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24596, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24597, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24604, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24604, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24607, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24610, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17683, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24612, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24615, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24618, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17691, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -165873,7 +165933,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -166025,10 +166085,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+22136, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+22144, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24614, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24622, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -166057,7 +166117,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -166114,7 +166174,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6735 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23616 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23624 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -166213,17 +166273,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -166234,7 +166294,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24620 /* "\x00\x00" */ + zFilename = ts + 24628 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -166255,12 +166315,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -166272,7 +166332,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -166290,7 +166350,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -166301,7 +166361,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -166312,7 +166372,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -166320,7 +166380,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -166333,28 +166393,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24623, + Xsqlite3_log(tls, iErr, ts+24631, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24648) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24656) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24668) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24676) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24675) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24683) } // This is a convenience routine that makes sure that all thread-specific @@ -166362,12 +166422,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -166533,7 +166593,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24692, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24700, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -166551,7 +166611,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -166566,7 +166626,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -166579,7 +166639,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -166624,7 +166684,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -167083,7 +167143,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -167092,7 +167152,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.X__builtin___memcpy_chk(tls, p, z, n+uint64(1), libc.X__builtin_object_size(tls, p, 0)) return p + uintptr(n) + uintptr(1) @@ -167105,7 +167165,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -167136,7 +167196,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -167153,7 +167213,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -167162,7 +167222,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -167179,7 +167239,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -167189,7 +167249,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167210,14 +167270,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -167230,7 +167290,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -167239,7 +167299,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -167254,7 +167314,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -167265,7 +167325,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -167276,7 +167336,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -167299,7 +167359,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -167342,7 +167402,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -167363,7 +167423,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -167372,7 +167432,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -167384,7 +167444,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24720, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24728, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -167402,7 +167462,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -167447,11 +167507,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -167464,7 +167524,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -167474,13 +167534,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -167504,7 +167564,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -167547,7 +167607,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24728 /* "database is dead..." */ + return ts + 24736 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -167559,7 +167619,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -167585,7 +167645,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -167689,7 +167749,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -168294,7 +168354,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -168306,10 +168366,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -168317,9 +168377,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -168332,9 +168392,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -168342,8 +168402,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6535, ts + 7049, ts + 7054, ts + 6545, ts + 6540, ts + 8295, ts + 24751, ts + 24757, -} /* sqlite3.c:193131:19 */ + ts + 6535, ts + 7049, ts + 7054, ts + 6545, ts + 6540, ts + 8295, ts + 24759, ts + 24765, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -168357,7 +168417,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -168365,7 +168425,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -168373,7 +168433,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -168381,7 +168441,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -168389,7 +168449,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -168422,7 +168482,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -168434,7 +168494,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -168447,7 +168507,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -168456,7 +168516,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -168471,7 +168531,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -168522,7 +168582,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24764 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24772 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -168542,11 +168602,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -168579,7 +168639,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24781, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24789, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -168590,7 +168650,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -168617,7 +168677,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -168626,7 +168686,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -168636,7 +168696,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -168644,7 +168704,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -168747,7 +168807,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -168762,14 +168822,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -168780,7 +168840,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169061,7 +169121,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -169083,7 +169143,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -169098,7 +169158,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -169114,7 +169174,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -169341,7 +169401,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.X__builtin___memset_chk(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{})), libc.X__builtin_object_size(tls, pParse, 0)) if zJson == uintptr(0) { @@ -169366,7 +169426,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24810, -1) + Xsqlite3_result_error(tls, pCtx, ts+24818, -1) } } jsonParseReset(tls, pParse) @@ -169377,7 +169437,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -169408,7 +169468,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) @@ -169428,7 +169488,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -169485,7 +169545,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -169508,7 +169568,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -169683,7 +169743,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -169694,7 +169754,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24825, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24833, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -169707,11 +169767,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24829, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24837, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -169722,7 +169782,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169774,18 +169834,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24855, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24863, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -169816,7 +169876,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -169833,7 +169893,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -169856,7 +169916,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -169906,7 +169966,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -169940,11 +170000,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24898, uint32(2)) + jsonAppendRaw(tls, bp, ts+24906, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+5352, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24901, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24909, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -170000,7 +170060,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -170073,7 +170133,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -170105,7 +170165,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -170117,14 +170177,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24904, -1) + ts+24912, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24955, -1) + Xsqlite3_result_error(tls, ctx, ts+24963, -1) jsonReset(tls, bp) return } @@ -170144,7 +170204,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -170213,7 +170273,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -170232,7 +170292,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15673) + jsonWrongNumArgs(tls, ctx, ts+15681) return __2: ; @@ -170296,7 +170356,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -170321,9 +170381,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24989 /* "set" */ + return ts + 24997 /* "set" */ } - return ts + 24993 /* "insert" */ + return ts + 25001 /* "insert" */ }()) return __2: @@ -170394,7 +170454,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -170418,7 +170478,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -170432,7 +170492,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -170448,7 +170508,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -170473,16 +170533,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25000, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25008, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -170490,7 +170550,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -170532,7 +170592,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -170554,7 +170614,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -170578,16 +170638,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25003, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25011, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -170607,16 +170667,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -170631,7 +170691,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+25006) + ts+25014) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -170644,13 +170704,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -170664,7 +170724,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -170675,7 +170735,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -170688,7 +170748,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -170697,13 +170757,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -170754,7 +170814,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170771,19 +170831,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+25089, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+25097, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+25094, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+25102, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -170872,10 +170932,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+25089, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+25097, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+25094, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+25102, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -170902,7 +170962,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 25100 /* "$" */ + zRoot = ts + 25108 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -170920,7 +170980,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -170930,7 +170990,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171005,7 +171065,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171034,7 +171094,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24810, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24818, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -171110,7 +171170,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -171124,36 +171184,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25107}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25118}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25118}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25136}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 25149}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 25152}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25156}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25168}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25191}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25202}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25214}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 25227}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25236}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25236}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25246}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25257}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25274}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25110}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25115}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25126}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25126}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25144}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 25157}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 25160}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25164}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25176}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25188}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25199}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25210}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25222}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 25235}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25244}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25244}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25254}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25265}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25282}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -171169,9 +171229,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 25292 /* "json_each" */, FpModule: 0}, - {FzName: ts + 25302 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 25300 /* "json_each" */, FpModule: 0}, + {FzName: ts + 25310 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -171218,7 +171278,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -171232,7 +171292,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -171253,9 +171313,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -171263,23 +171323,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -171288,20 +171348,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -171309,17 +171369,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -171345,28 +171405,28 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = U32(*(*U8)(unsafe.Pointer(p)))<<24 + U32(*(*U8)(unsafe.Pointer(p + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(p + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(p + 3)))<<0 } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ return I64(U64(*(*U8)(unsafe.Pointer(p)))<<56 + U64(*(*U8)(unsafe.Pointer(p + 1)))<<48 + U64(*(*U8)(unsafe.Pointer(p + 2)))<<40 + U64(*(*U8)(unsafe.Pointer(p + 3)))<<32 + U64(*(*U8)(unsafe.Pointer(p + 4)))<<24 + U64(*(*U8)(unsafe.Pointer(p + 5)))<<16 + U64(*(*U8)(unsafe.Pointer(p + 6)))<<8 + U64(*(*U8)(unsafe.Pointer(p + 7)))<<0) } // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ var i U32 // p is always 4-byte aligned @@ -171378,7 +171438,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 40 & int64(0xFF)) @@ -171391,7 +171451,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -171399,20 +171459,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.X__builtin___memset_chk(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2), libc.X__builtin_object_size(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -171420,7 +171480,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -171429,7 +171489,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -171444,7 +171504,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -171460,7 +171520,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -171469,7 +171529,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171501,11 +171561,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+25312, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+25320, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25320, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25328, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -171579,7 +171639,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -171590,7 +171650,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -171603,7 +171663,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -171620,7 +171680,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -171644,7 +171704,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -171670,19 +171730,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -171698,23 +171758,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -171736,13 +171796,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171750,7 +171810,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+25325, + ts+25333, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -171769,7 +171829,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -171787,7 +171847,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -171817,7 +171877,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -171833,7 +171893,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -171850,7 +171910,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -171962,7 +172022,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172064,7 +172124,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172120,7 +172180,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -172136,7 +172196,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -172155,7 +172215,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -172172,7 +172232,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -172192,7 +172252,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -172203,7 +172263,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -172220,7 +172280,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -172254,7 +172314,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -172290,7 +172350,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -172338,7 +172398,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -172431,7 +172491,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -172447,7 +172507,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172462,7 +172522,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172523,7 +172583,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -172544,12 +172604,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25407) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25415) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -172576,7 +172636,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -172719,7 +172779,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -172826,7 +172886,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -172869,7 +172929,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -172890,7 +172950,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -172929,7 +172989,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -172944,7 +173004,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -172957,7 +173017,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -173032,7 +173092,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -173088,7 +173148,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -173124,7 +173184,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -173132,7 +173192,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -173154,7 +173214,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -173202,7 +173262,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -173258,7 +173318,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -173357,7 +173417,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -173391,7 +173451,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -173626,7 +173686,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -173661,7 +173721,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173711,7 +173771,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -173742,7 +173802,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -173771,7 +173831,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -173886,7 +173946,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -173916,7 +173976,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -173947,7 +174007,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -173958,7 +174018,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174047,7 +174107,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -174061,7 +174121,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -174086,7 +174146,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -174094,7 +174154,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+25421, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25429, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -174106,12 +174166,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25441, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25449, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25473, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25481, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -174125,7 +174185,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -174354,7 +174414,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -174363,7 +174423,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -174371,7 +174431,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -174379,7 +174439,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25510, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25518, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -174400,7 +174460,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -174413,11 +174473,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25655 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25663 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -174425,7 +174485,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11628, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11636, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -174457,7 +174517,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -174468,8 +174528,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25711, ts + 5414, ts + 16572, -} /* sqlite3.c:199185:21 */ + ts + 25719, ts + 5414, ts + 16580, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -174493,9 +174553,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -174512,19 +174572,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25716, + ts+25724, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25778, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25786, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25783, + ts+25791, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25847, + ts+25855, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25917, + ts+25925, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -174555,7 +174615,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25966 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25974 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -174567,7 +174627,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+26074, + ts+26082, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -174575,18 +174635,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+26119, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+26127, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+13099, 1) + Xsqlite3_str_append(tls, p, ts+13107, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+26146, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+26154, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+26168, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+26176, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+26176, 0) + Xsqlite3_str_appendf(tls, p, ts+26184, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -174602,24 +174662,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 26192, - ts + 26245, + ts + 26200, + ts + 26253, - ts + 26290, - ts + 26342, - ts + 26396, + ts + 26298, + ts + 26350, + ts + 26404, - ts + 26441, - ts + 26499, - ts + 26554, -} /* sqlite3.c:199232:21 */ + ts + 26449, + ts + 26507, + ts + 26562, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174650,7 +174710,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -174658,7 +174718,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26601, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26609, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -174670,7 +174730,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26621, + ts+26629, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -174678,7 +174738,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26678, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26686, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -174688,7 +174748,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174703,7 +174763,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -174729,10 +174789,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26713, - ts + 26756, - ts + 26791, - ts + 26827, + ts + 26721, + ts + 26764, + ts + 26799, + ts + 26835, } // Aux columns counted by a u8 @@ -174769,7 +174829,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26864, + Xsqlite3_str_appendf(tls, pSql, ts+26872, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -174781,7 +174841,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26888, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26896, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -174804,7 +174864,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26894, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26902, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -174903,7 +174963,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26897, ts + 26908} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26905, ts + 26916} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -174919,7 +174979,7 @@ var azFormat = [2]uintptr{ts + 26897, ts + 26908} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -174963,11 +175023,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+11208, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26918, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26926, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26924, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26932, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26928, 1) + Xsqlite3_str_append(tls, pOut, ts+26936, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -174982,11 +175042,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26930, -1) + Xsqlite3_result_error(tls, ctx, ts+26938, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -175014,15 +175074,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -175035,7 +175095,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175063,7 +175123,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175075,7 +175135,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26963, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26971, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4416 /* "\n" */ @@ -175103,7 +175163,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175111,7 +175171,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26970, + ts+26978, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -175130,7 +175190,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+27015, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+27023, libc.VaList(bp+16, iNode)) } } @@ -175147,15 +175207,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 27047, - ts + 27101, + ts + 27055, + ts + 27109, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -175170,23 +175230,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+27149, + rtreeCheckAppendMsg(tls, pCheck, ts+27157, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 27194 /* "%_rowid" */ + return ts + 27202 /* "%_rowid" */ } - return ts + 27202 /* "%_parent" */ + return ts + 27210 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+27211, + ts+27219, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 27194 /* "%_rowid" */ + return ts + 27202 /* "%_rowid" */ } - return ts + 27202 /* "%_parent" */ + return ts + 27210 /* "%_parent" */ }(), iKey, iVal)) } } @@ -175203,7 +175263,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -175229,7 +175289,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+27269, libc.VaList(bp, i, iCell, iNode)) + ts+27277, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -175249,7 +175309,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+27317, libc.VaList(bp+24, i, iCell, iNode)) + ts+27325, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -175261,7 +175321,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -175272,14 +175332,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+27384, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+27392, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+27418, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27426, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -175287,7 +175347,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+27448, + ts+27456, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -175315,20 +175375,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27503, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27511, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27534, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27542, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -175338,7 +175398,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -175358,13 +175418,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14835, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14843, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27601, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27609, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -175374,12 +175434,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+25421, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25429, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27629, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27637, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -175394,8 +175454,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27660, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27667, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27668, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27675, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -175405,7 +175465,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27675, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27683, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -175445,13 +175505,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27679, -1) + ts+27687, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -175469,7 +175529,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 18255 /* "ok" */ + return ts + 18263 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -175508,7 +175568,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -175534,7 +175594,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -175556,7 +175616,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -175573,7 +175633,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -175583,10 +175643,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -175596,7 +175656,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -175605,7 +175665,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175677,7 +175737,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -175819,7 +175879,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175888,7 +175948,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -175901,7 +175961,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -175910,11 +175970,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27730, 1) + Xsqlite3_str_append(tls, x, ts+27738, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27732, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27740, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27743, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27751, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -175924,7 +175984,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -175938,19 +175998,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27754, 0) + Xsqlite3_str_appendf(tls, x, ts+27762, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27772, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27780, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27780, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27788, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27788, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27796, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27792, 0) + Xsqlite3_str_appendf(tls, x, ts+27800, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -175970,7 +176030,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -176003,7 +176063,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -176023,7 +176083,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -176042,7 +176102,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -176078,7 +176138,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -176098,7 +176158,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176143,7 +176203,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176284,7 +176344,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -176297,13 +176357,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -176337,7 +176397,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -176364,7 +176424,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -176405,7 +176465,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -176443,7 +176503,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -176475,10 +176535,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -176489,20 +176549,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -176536,7 +176596,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -176548,7 +176608,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -176578,7 +176638,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -176608,7 +176668,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -176643,7 +176703,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -176673,7 +176733,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176909,7 +176969,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -176925,7 +176985,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -176935,7 +176995,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -176975,7 +177035,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27805, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27813, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -176984,7 +177044,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27827, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27835, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -176992,7 +177052,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26894, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26902, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -177050,12 +177110,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -177069,7 +177129,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -177236,7 +177296,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -177262,7 +177322,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16572 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16580 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -177272,7 +177332,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27831 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27839 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -177280,14 +177340,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27837 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27845 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177352,7 +177412,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -177419,7 +177479,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27846, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27854, 0) __4: ; goto geopoly_update_end @@ -177563,15 +177623,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27886) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27894) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27902) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27910) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -177604,9 +177664,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -177636,7 +177696,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27917, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27925, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -177648,26 +177708,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27925 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27938 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27951 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27964 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27902 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27976 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27886 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27999 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28013 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28026 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28040 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28056 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27933 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27946 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27959 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27972 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27910 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27984 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27894 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 28007 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28021 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28034 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28048 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28064 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 28068 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 28076 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -177675,30 +177735,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+28087, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28095, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+28097, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28105, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+28108, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28116, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27831, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27839, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+28119, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28127, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -177712,7 +177772,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -177721,7 +177781,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -177742,7 +177802,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -177770,13 +177830,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25407, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25415, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -177796,7 +177856,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -178252,7 +178312,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -178653,7 +178713,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -178718,7 +178778,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -178780,7 +178840,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -178812,9 +178872,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -178829,16 +178889,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -178846,9 +178906,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -178867,16 +178927,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -178895,7 +178955,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -178918,7 +178978,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -178938,7 +178998,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -179028,7 +179088,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -179053,7 +179113,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -179070,7 +179130,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+28129, -1) + Xsqlite3_result_error(tls, context, ts+28137, -1) return } @@ -179081,7 +179141,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+28129, -1) + Xsqlite3_result_error(tls, context, ts+28137, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -179096,7 +179156,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179114,7 +179174,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179138,7 +179198,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -179153,7 +179213,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -179171,7 +179231,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -179201,7 +179261,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -179215,7 +179275,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -179224,7 +179284,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+28150, uintptr(0), uintptr(0), p+64) + ts+28158, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -179296,7 +179356,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -179308,7 +179368,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+25320, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+25328, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -179326,7 +179386,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179336,9 +179396,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+28321, libc.VaList(bp, func() uintptr { + ts+28329, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28471 /* "AND rootpage!=0 ..." */ + return ts + 28479 /* "AND rootpage!=0 ..." */ } return ts + 1527 /* "" */ }()))) @@ -179346,7 +179406,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28512) + ts+28520) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -179361,7 +179421,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -179387,7 +179447,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -179413,7 +179473,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -179430,7 +179490,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -179453,7 +179513,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -179476,7 +179536,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179526,7 +179586,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -179547,7 +179607,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+28637, libc.VaList(bp, zTab))) + ts+28645, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -179565,7 +179625,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+28756, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28764, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -179583,7 +179643,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28777, libc.VaList(bp+16, zIdx))) + ts+28785, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -179607,7 +179667,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28828, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28836, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -179647,7 +179707,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -179657,7 +179717,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.X__builtin___memcpy_chk(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol), libc.X__builtin_object_size(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+28849, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28857, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -179672,7 +179732,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.X__builtin___memset_chk(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol), libc.X__builtin_object_size(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -179705,7 +179765,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -179722,7 +179782,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19803, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19811, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -179735,18 +179795,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28906, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28914, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28925, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28933, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28930, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28938, zName) { bRbuRowid = 1 } } @@ -179758,12 +179818,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28940, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28948, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28969 /* "may not have" */ + return ts + 28977 /* "may not have" */ } - return ts + 28982 /* "requires" */ + return ts + 28990 /* "requires" */ }())) } @@ -179772,7 +179832,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28991, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28999, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -179786,7 +179846,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29013, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29021, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -179827,7 +179887,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -179836,8 +179896,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29040, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14946 /* ", " */ + zList = rbuMPrintf(tls, p, ts+29048, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14954 /* ", " */ } return zList } @@ -179846,7 +179906,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -179858,7 +179918,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+29049, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+29057, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -179888,7 +179948,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -179897,25 +179957,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+29062, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+29070, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+29094, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+29102, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14946, ts+29117) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29123, ts+29130, ts+5311) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14946, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14954, ts+29125) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29131, ts+29138, ts+5311) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14954, ts+1527) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+29138, + ts+29146, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+29180, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -179947,7 +180007,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -179978,7 +180038,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -180015,7 +180075,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 29200 /* "_rowid_" */ + zCol = ts + 29208 /* "_rowid_" */ __7: ; goto __5 @@ -180024,13 +180084,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+29208, + zLhs = rbuMPrintf(tls, p, ts+29216, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+29229, + zOrder = rbuMPrintf(tls, p, ts+29237, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+29265, + zSelect = rbuMPrintf(tls, p, ts+29273, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ iCol++ goto __1 __2: @@ -180049,7 +180109,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+29292, + Xsqlite3_mprintf(tls, ts+29300, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -180076,8 +180136,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+29340, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14946 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+29348, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14954 /* ", " */ goto __15 __15: iCol++ @@ -180089,7 +180149,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+29347, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29355, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -180128,7 +180188,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -180146,7 +180206,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -180158,7 +180218,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+29359, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29367, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1527 /* "" */ } else { @@ -180172,37 +180232,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 29200 /* "_rowid_" */ + zCol = ts + 29208 /* "_rowid_" */ } else { - zCol = ts + 28930 /* "rbu_rowid" */ + zCol = ts + 28938 /* "rbu_rowid" */ } zType = ts + 1092 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+29381, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29389, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 29117 + return ts + 29125 } return ts + 1527 }() - zImpPK = Xsqlite3_mprintf(tls, ts+29401, + zImpPK = Xsqlite3_mprintf(tls, ts+29409, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+29422, + zImpCols = Xsqlite3_mprintf(tls, ts+29430, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29455, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29463, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14946 /* ", " */ - zAnd = ts + 21823 /* " AND " */ + zCom = ts + 14954 /* ", " */ + zAnd = ts + 21831 /* " AND " */ nBind++ } @@ -180239,7 +180299,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -180250,11 +180310,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29479, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29487, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29491, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29499, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14946 /* ", " */ + zS = ts + 14954 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -180263,7 +180323,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29500, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29508, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -180277,24 +180337,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29523, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1527 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29529, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21823 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29537, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21831 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29541, libc.VaList(bp+40, zList)) + ts+29549, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1527 /* "" */ @@ -180302,8 +180362,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29591, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21823 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29599, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21831 /* " AND " */ } } } @@ -180315,9 +180375,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29604, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29612, 0) } // Return a nul-terminated string containing the comma separated list of @@ -180335,7 +180395,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -180350,17 +180410,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29591, + zList = rbuMPrintf(tls, p, ts+29599, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29630, + zList = rbuMPrintf(tls, p, ts+29638, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29660, + zList = rbuMPrintf(tls, p, ts+29668, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } } } @@ -180381,7 +180441,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -180411,26 +180471,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29697 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29705 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28849, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28857, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16460) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16468) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp+8, zIdx))) } break } @@ -180443,15 +180503,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 29117 /* " DESC" */ + zDesc = ts + 29125 /* " DESC" */ } else { zDesc = ts + 1527 /* "" */ } - z = rbuMPrintf(tls, p, ts+29710, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14946 /* ", " */ + z = rbuMPrintf(tls, p, ts+29718, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14954 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29721, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29729, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -180474,7 +180534,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -180491,7 +180551,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29725) + ts+29733) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -180500,7 +180560,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -180510,23 +180570,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29775, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29783, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29797, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29805, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 29117 /* " DESC" */ + return ts + 29125 /* " DESC" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14946 /* ", " */ + zComma = ts + 14954 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29807, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29815, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29822, + ts+29830, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 0, 0)) } @@ -180550,7 +180610,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -180572,32 +180632,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29884 /* "PRIMARY KEY " */ + zPk = ts + 29892 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29897, + zSql = rbuMPrintf(tls, p, ts+29905, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29924 /* " NOT NULL" */ + return ts + 29932 /* " NOT NULL" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14946 /* ", " */ + zComma = ts + 14954 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29934, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29942, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29941, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29949, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29973 /* " WITHOUT ROWID" */ + return ts + 29981 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) @@ -180614,7 +180674,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -180624,12 +180684,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29988, + ts+29996, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -180651,7 +180711,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -180661,7 +180721,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+30045) + ts+30053) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -180759,7 +180819,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -180771,7 +180831,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+30111, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+30119, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -180795,7 +180855,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30131, + ts+30139, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 0, 0)) @@ -180804,14 +180864,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+30196, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+30204, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+30232, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+30240, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -180828,7 +180888,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+30266, + ts+30274, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -180836,9 +180896,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 30327 /* "AND" */ + return ts + 30335 /* "AND" */ } - return ts + 30331 /* "WHERE" */ + return ts + 30339 /* "WHERE" */ }() } return ts + 1527 /* "" */ @@ -180847,21 +180907,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+30337, + ts+30345, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+30398, + ts+30406, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 30327 /* "AND" */ + return ts + 30335 /* "AND" */ } - return ts + 30331 /* "WHERE" */ + return ts + 30339 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -180899,17 +180959,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1527 } - return ts + 30557 + return ts + 30565 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+30566, + ts+30574, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30602 /* ", _rowid_" */ + return ts + 30610 /* ", _rowid_" */ } return ts + 1527 /* "" */ }(), zBindings))) @@ -180921,28 +180981,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30612, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30620, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30640 /* ", rbu_rowid" */ + zRbuRowid = ts + 30648 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30652, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30660, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30728 /* ", 0 AS rbu_rowid" */ + return ts + 30736 /* ", 0 AS rbu_rowid" */ } return ts + 1527 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30745, + ts+30753, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -180950,7 +181010,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31044, + ts+31052, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -180964,9 +181024,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 31143 /* ",_rowid_ " */ + zRbuRowid = ts + 31151 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 31153 /* ",rbu_rowid" */ + zRbuRowid = ts + 31161 /* ",rbu_rowid" */ } } @@ -180979,20 +181039,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+29200, 0) + zOrder = rbuMPrintf(tls, p, ts+29208, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14946, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14954, ts+1527) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+31164, + ts+31172, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 31212 /* "0 AS " */ + return ts + 31220 /* "0 AS " */ } return ts + 1527 /* "" */ }(), @@ -181005,7 +181065,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 20157 /* "ORDER BY" */ + return ts + 20165 /* "ORDER BY" */ } return ts + 1527 /* "" */ }(), zOrder, @@ -181034,7 +181094,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -181085,9 +181145,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30557 /* "rbu_imp_" */ + zPrefix = ts + 30565 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+31218, + zUpdate = Xsqlite3_mprintf(tls, ts+31226, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -181100,7 +181160,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181123,7 +181183,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -181139,7 +181199,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -181155,7 +181215,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+31248, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+31256, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -181223,7 +181283,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -181235,21 +181295,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6735, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6735) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31278, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31286, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31305, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31313, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.X__builtin___memcpy_chk(tls, p+48, ts+3230, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } else { libc.X__builtin___memcpy_chk(tls, p+48, ts+6735, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31323, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31331, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -181289,11 +181349,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31389, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31397, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24470, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24478, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -181305,13 +181365,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+31421, + zTarget = Xsqlite3_mprintf(tls, ts+31429, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6735), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ } - return ts + 31453 /* "&" */ + return ts + 31461 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ @@ -181330,21 +181390,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31455, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31463, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31470, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31478, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31487, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31495, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -181352,7 +181412,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31503, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31511, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -181363,7 +181423,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31531, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31539, 0) } } @@ -181385,7 +181445,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -181393,7 +181453,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181426,7 +181486,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -181434,7 +181494,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31503, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31511, uintptr(0), uintptr(0), uintptr(0)) } } @@ -181468,7 +181528,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31549, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31557, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -181518,7 +181578,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181904,7 +181964,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31623) + ts+31631) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -181917,7 +181977,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31645, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31653, libc.VaList(bp, iCookie+1)) } } } @@ -181925,7 +181985,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -181942,7 +182002,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31672, + ts+31680, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -181980,16 +182040,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31830, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31838, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31845, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31853, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -181999,18 +182059,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31865, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31873, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31890) + ts+31898) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -182024,12 +182084,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31998) + ts+32006) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+32063) + ts+32071) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -182041,7 +182101,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32107, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32115, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -182049,7 +182109,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -182063,8 +182123,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17561) - rbuCopyPragma(tls, p, ts+16656) + rbuCopyPragma(tls, p, ts+17569) + rbuCopyPragma(tls, p, ts+16664) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -182075,7 +182135,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+32132, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+32140, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -182101,10 +182161,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14858, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14858, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -182192,7 +182252,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -182210,7 +182270,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -182225,7 +182285,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32160, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32168, 0) } if rc == SQLITE_OK { @@ -182240,11 +182300,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31609, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31617, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -182259,7 +182319,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -182268,7 +182328,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32185, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32193, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -182280,7 +182340,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -182290,7 +182350,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -182307,7 +182367,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+32196, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+32204, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -182339,7 +182399,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182350,7 +182410,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+32268, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32276, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -182358,7 +182418,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32282) + ts+32290) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -182370,7 +182430,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32339) + ts+32347) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -182381,7 +182441,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -182453,7 +182513,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32413, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32421, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -182475,12 +182535,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32445, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32453, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32477 /* "vacuum" */ + return ts + 32485 /* "vacuum" */ } - return ts + 32484 /* "update" */ + return ts + 32492 /* "update" */ }())) } } @@ -182488,7 +182548,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14835, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14843, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -182502,14 +182562,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+17275) - rbuCopyPragma(tls, p, ts+16671) + rbuCopyPragma(tls, p, ts+17283) + rbuCopyPragma(tls, p, ts+16679) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32491, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32499, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -182519,7 +182579,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6735, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32507, uintptr(0), uintptr(0), p+64) + db, ts+32515, uintptr(0), uintptr(0), p+64) } } @@ -182554,7 +182614,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -182565,7 +182625,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -182573,13 +182633,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32531, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32539, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -182588,7 +182648,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -182604,12 +182664,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30557, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30565, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -182622,13 +182682,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14858, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -182642,7 +182702,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14858, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -182654,7 +182714,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32539, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32547, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -182687,13 +182747,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -182726,7 +182786,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -182744,7 +182804,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -182753,7 +182813,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14850, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14858, uintptr(0), uintptr(0), uintptr(0)) } } @@ -182772,19 +182832,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14850, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14858, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14835 /* "BEGIN" */ + zBegin = ts + 14843 /* "BEGIN" */ } else { - zBegin = ts + 32491 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32499 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32491, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32499, uintptr(0), uintptr(0), uintptr(0)) } } @@ -182851,7 +182911,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -182868,7 +182928,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -182886,7 +182946,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -182908,7 +182968,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -182933,7 +182993,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -182948,7 +183008,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -182980,7 +183040,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -182989,20 +183049,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -183066,7 +183126,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -183105,7 +183165,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -183119,7 +183179,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -183133,7 +183193,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -183153,7 +183213,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -183173,7 +183233,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -183181,7 +183241,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -183189,7 +183249,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -183216,7 +183276,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32566, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32574, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -183241,7 +183301,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32589, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32597, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -183252,7 +183312,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -183260,7 +183320,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -183268,7 +183328,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -183301,7 +183361,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -183358,13 +183418,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -183387,7 +183447,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -183429,7 +183489,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32600, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32608, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -183473,10 +183533,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -183485,7 +183545,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183530,7 +183590,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -183538,7 +183598,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -183548,7 +183608,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -183556,7 +183616,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -183564,7 +183624,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -183573,7 +183633,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -183582,7 +183642,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -183590,7 +183650,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -183598,13 +183658,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -183618,7 +183678,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -183679,17 +183739,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -183772,7 +183832,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -183843,7 +183903,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -183853,16 +183913,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -183876,13 +183936,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -183890,13 +183950,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -183906,13 +183966,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -183925,7 +183985,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -183933,7 +183993,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -183955,7 +184015,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184043,7 +184103,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -184054,7 +184114,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -184077,14 +184137,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -184094,7 +184154,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -184107,7 +184167,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -184173,7 +184233,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184199,7 +184259,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184242,7 +184302,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -184281,7 +184341,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -184320,7 +184380,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -184347,7 +184407,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -184422,7 +184482,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -184510,7 +184570,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -184574,7 +184634,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -184591,13 +184651,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11628, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11636, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32611, 0) + ts+32619, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1527, 0) } else { @@ -184610,7 +184670,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32732, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32740, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -184705,7 +184765,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184722,7 +184782,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11628, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11636, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -184741,15 +184801,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184765,7 +184825,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184781,21 +184841,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -184909,7 +184969,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -185205,7 +185265,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -185240,7 +185300,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185275,25 +185335,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -185313,24 +185373,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -185338,13 +185398,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -185360,7 +185420,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -185370,9 +185430,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32761, + zRet = Xsqlite3_mprintf(tls, ts+32769, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ if zRet == uintptr(0) { break } @@ -185382,7 +185442,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -185395,9 +185455,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32795, + ts+32803, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32836 /* " OR " */ + zSep = ts + 32844 /* " OR " */ if zRet == uintptr(0) { break } @@ -185412,18 +185472,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32841, + ts+32849, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185451,7 +185511,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -185463,7 +185523,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32919, + ts+32927, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -185488,7 +185548,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -185601,7 +185661,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32972, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32980, 0) __16: ; rc = SQLITE_SCHEMA @@ -185661,7 +185721,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -185697,7 +185757,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -185719,7 +185779,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185757,7 +185817,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -185769,7 +185829,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -185820,7 +185880,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -185865,7 +185925,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -185888,7 +185948,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -185899,7 +185959,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -185910,7 +185970,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.X__builtin___memcpy_chk(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob), libc.X__builtin_object_size(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), 0)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -185923,7 +185983,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.X__builtin___memcpy_chk(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr), libc.X__builtin_object_size(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), 0)) @@ -185937,7 +185997,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -185954,7 +186014,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -185975,7 +186035,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -186035,7 +186095,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -186141,7 +186201,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186198,7 +186258,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -186206,10 +186266,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11628, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11636, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32999, libc.VaList(bp, zDb)) + ts+33007, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -186218,18 +186278,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1527 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+33109, bp+24) + sessionAppendStr(tls, bp+8, ts+33117, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1540, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+33124, bp+24) + sessionAppendStr(tls, bp+8, ts+33132, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+33132, bp+24) + sessionAppendStr(tls, bp+8, ts+33140, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -186249,7 +186309,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -186327,7 +186387,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -186348,7 +186408,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -186370,7 +186430,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+33138, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+33146, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -186468,7 +186528,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+33158, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33166, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -186478,7 +186538,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -186490,7 +186550,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -186498,7 +186558,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -186510,7 +186570,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -186518,7 +186578,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -186530,7 +186590,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -186543,7 +186603,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -186557,12 +186617,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -186588,12 +186648,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -186626,28 +186686,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -186665,7 +186725,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186698,7 +186758,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186723,7 +186783,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -186759,7 +186819,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -186777,7 +186837,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -186802,7 +186862,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -186844,7 +186904,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186863,7 +186923,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -186890,7 +186950,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186932,7 +186992,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186952,7 +187012,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -186987,7 +187047,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -187044,13 +187104,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -187120,7 +187180,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -187151,7 +187211,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187171,14 +187231,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -187192,7 +187252,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -187211,7 +187271,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -187233,7 +187293,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -187257,7 +187317,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -187274,7 +187334,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -187286,7 +187346,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -187303,7 +187363,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187539,7 +187599,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -187590,7 +187650,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -187605,7 +187665,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -187627,9 +187687,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -187651,9 +187711,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -187661,7 +187721,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -187722,7 +187782,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11628) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11636) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -187734,24 +187794,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.X__builtin___memcpy_chk(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0))), libc.X__builtin_object_size(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, 0)) - sessionAppendStr(tls, bp, ts+33176, bp+16) + sessionAppendStr(tls, bp, ts+33184, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+33189, bp+16) + sessionAppendStr(tls, bp, ts+33197, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33195, bp+16) + sessionAppendStr(tls, bp, ts+33203, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1527 /* "" */ - sessionAppendStr(tls, bp, ts+33124, bp+16) + sessionAppendStr(tls, bp, ts+33132, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -187759,13 +187819,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+33200, bp+16) + ts+33208, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33132, bp+16) + sessionAppendStr(tls, bp, ts+33140, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ } } @@ -187795,7 +187855,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -187823,7 +187883,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -187833,34 +187893,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+33275, bp+16) + sessionAppendStr(tls, bp, ts+33283, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+33124, bp+16) + sessionAppendStr(tls, bp, ts+33132, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33195, bp+16) + sessionAppendStr(tls, bp, ts+33203, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+33293, bp+16) + sessionAppendStr(tls, bp, ts+33301, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32836, bp+16) + sessionAppendStr(tls, bp, ts+32844, bp+16) zSep = ts + 1527 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33132, bp+16) + sessionAppendStr(tls, bp, ts+33140, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 33301 /* "AND " */ + zSep = ts + 33309 /* "AND " */ } } sessionAppendStr(tls, bp, ts+5311, bp+16) @@ -187885,7 +187945,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6735, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -187897,7 +187957,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -187905,19 +187965,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+33306, bp+16) + sessionAppendStr(tls, bp, ts+33314, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21829, bp+16) + sessionAppendStr(tls, bp, ts+21837, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14946, bp+16) + sessionAppendStr(tls, bp, ts+14954, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+33324, bp+16) + sessionAppendStr(tls, bp, ts+33332, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+33335, bp+16) + sessionAppendStr(tls, bp, ts+33343, bp+16) } sessionAppendStr(tls, bp, ts+5311, bp+16) @@ -187928,7 +187988,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -187936,24 +187996,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11628, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11636, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+33339) + ts+33347) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33452) + ts+33460) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -187980,7 +188040,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188001,7 +188061,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -188025,7 +188085,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188069,7 +188129,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188141,7 +188201,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -188241,7 +188301,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -188376,7 +188436,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188398,7 +188458,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33596, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33604, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -188414,7 +188474,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33617, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33625, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -188423,7 +188483,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188477,7 +188537,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -188495,10 +188555,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33636, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33644, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33662, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33670, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -188568,20 +188628,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33692, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33700, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33736, + ts+33744, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33807, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33815, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11628) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11636) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -188639,14 +188699,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33867, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33875, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33897, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33905, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33921, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33897, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33929, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33905, uintptr(0), uintptr(0), uintptr(0)) } } @@ -188668,7 +188728,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188686,7 +188746,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -188694,7 +188754,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188709,7 +188769,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -188717,7 +188777,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -188889,7 +188949,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -189020,7 +189080,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189074,7 +189134,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -189089,7 +189149,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189107,12 +189167,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189129,12 +189189,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -189142,7 +189202,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189166,7 +189226,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189193,7 +189253,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -189234,7 +189294,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -189296,7 +189356,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -189434,7 +189494,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -189449,7 +189509,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189464,7 +189524,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189480,7 +189540,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189496,7 +189556,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -189504,7 +189564,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -189592,7 +189652,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -189654,13 +189714,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -189698,14 +189758,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -189720,7 +189780,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -189731,7 +189791,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -189741,19 +189801,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -189786,7 +189846,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -189797,16 +189857,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -189821,7 +189881,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -189832,7 +189892,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -189849,7 +189909,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -189858,7 +189918,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -189877,7 +189937,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -189888,7 +189948,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -189904,7 +189964,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -189913,7 +189973,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -189925,9 +189985,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -189937,25 +189997,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -189963,17 +190023,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -190078,7 +190138,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -190151,7 +190211,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -190166,23 +190226,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -190219,9 +190279,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -190230,9 +190290,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -190242,7 +190302,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -190261,7 +190321,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -190277,7 +190337,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -190335,7 +190395,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -190343,7 +190403,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -190356,7 +190416,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -190380,7 +190440,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -190404,7 +190464,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -190415,7 +190475,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -190425,7 +190485,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33949, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33957, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -190434,7 +190494,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -190483,7 +190543,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -190516,7 +190576,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -190528,7 +190588,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -190738,7 +190798,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -190748,14 +190808,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33977, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33985, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -190784,7 +190844,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -190839,7 +190899,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -190902,7 +190962,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -190953,11 +191013,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -191000,7 +191060,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.X__builtin___memset_chk(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{})), libc.X__builtin_object_size(tls, pIter, 0)) @@ -191033,12 +191093,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -191047,7 +191107,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -191055,7 +191115,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34008, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34016, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -191063,7 +191123,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191118,7 +191178,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -191129,7 +191189,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 34015 /* "wrong number of ..." */ + var zErr uintptr = ts + 34023 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -191178,19 +191238,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -191214,7 +191274,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -191243,7 +191303,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -191301,7 +191361,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -191310,7 +191370,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -191333,7 +191393,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 34065 /* "wrong number of ..." */ + var zErr uintptr = ts + 34073 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -191525,17 +191585,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -191546,7 +191606,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -191640,7 +191700,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -191708,18 +191768,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 34113, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 34121, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 34129, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 34131, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34139, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -191744,7 +191804,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -191759,7 +191819,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -191785,7 +191845,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -191797,21 +191857,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -191829,7 +191889,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -191841,7 +191901,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -191859,7 +191919,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -191875,26 +191935,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.X__builtin___memset_chk(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{})), libc.X__builtin_object_size(tls, pBuf, 0)) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191956,14 +192016,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.X__builtin___memset_chk(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{})), libc.X__builtin_object_size(tls, pIter, 0)) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -191975,7 +192035,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -191987,9 +192047,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -192006,7 +192066,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -192027,7 +192087,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -192052,7 +192112,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -192077,13 +192137,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -192092,7 +192152,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -192138,7 +192198,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -192170,18 +192230,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -192194,7 +192254,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -192205,11 +192265,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -192298,7 +192358,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -192343,7 +192403,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -192356,11 +192416,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -192388,13 +192448,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+34136, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34144, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -192421,14 +192481,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34143, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34151, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+34174, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+34182, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -192439,7 +192499,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34207, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34215, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -192452,7 +192512,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34244, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34252, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -192461,7 +192521,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34253, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34261, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -192480,7 +192540,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34286, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34294, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -192495,14 +192555,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34320, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34328, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34328, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34336, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34360, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34368, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -192510,9 +192570,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34366, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34374, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34380, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34388, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -192520,9 +192580,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34418, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34426, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34429, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34437, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -192533,25 +192593,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5429, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 8308, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17666}, - {FzName: ts + 34464, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17674}, + {FzName: ts + 34472, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34472, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34480, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34503, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34511, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -192569,7 +192629,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -192603,20 +192663,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22464) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16572) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34531, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22472) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16580) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34539, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34561) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34569) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34571, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34579, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -192626,7 +192686,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -192634,13 +192694,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34602, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34607, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34615, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34614, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34622, libc.VaList(bp+16, i)) } } } @@ -192659,7 +192719,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -192688,8 +192748,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22464) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34622, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22472) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34630, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -192723,7 +192783,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34651, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34659, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -192764,19 +192824,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 34320 /* "content" */ + zTail = ts + 34328 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34671 /* "docsize" */ + zTail = ts + 34679 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34679, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34687, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16572, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16580, -1) } // Formulate the zContentExprlist text @@ -192792,7 +192852,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -192817,7 +192877,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -192825,18 +192885,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34690, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34698, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1527 } - return ts + 14946 + return ts + 14954 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34706, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34714, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34713, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22464)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34721, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22472)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -192867,7 +192927,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -192881,7 +192941,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -192908,7 +192968,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -192972,13 +193032,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34739) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34747) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -192988,7 +193048,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34744) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34752) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -192998,7 +193058,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34753) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34761) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -193011,7 +193071,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34763) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34771) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -193021,7 +193081,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34773) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34781) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -193037,7 +193097,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22464) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22472) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -193060,11 +193120,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34785 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34793 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -193087,7 +193147,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34817) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34825) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -193102,7 +193162,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34825, + ts+34833, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -193137,7 +193197,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -193156,9 +193216,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -193170,12 +193230,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -193237,7 +193297,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34890, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34898, 0) return FTS5_EOF } } @@ -193250,20 +193310,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34910, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34918, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34941, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34949, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34944, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34952, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30327, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30335, uint64(3)) == 0 { tok = FTS5_AND } break @@ -193275,15 +193335,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -193361,7 +193421,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -193436,7 +193496,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -193448,7 +193508,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -193456,7 +193516,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -193497,7 +193557,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -193519,7 +193579,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -193683,7 +193743,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -193908,11 +193968,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -193920,7 +193980,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{})), libc.X__builtin_object_size(tls, p, 0)) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -193932,9 +193992,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -193951,7 +194011,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -194153,7 +194213,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -194173,7 +194233,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -194200,7 +194260,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194257,7 +194317,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -194323,7 +194383,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -194339,7 +194399,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -194348,7 +194408,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -194374,7 +194434,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -194393,7 +194453,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -194461,7 +194521,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -194520,7 +194580,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -194539,7 +194599,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -194557,7 +194617,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -194573,7 +194633,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -194599,7 +194659,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -194649,7 +194709,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -194661,7 +194721,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -194691,7 +194751,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -194707,7 +194767,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -194760,7 +194820,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -194822,7 +194882,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -194854,7 +194914,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -194870,15 +194930,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -194888,7 +194948,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -194913,7 +194973,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -194925,7 +194985,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -194985,12 +195045,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -195059,12 +195119,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -195075,12 +195135,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -195097,7 +195157,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -195155,7 +195215,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -195250,17 +195310,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34948, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34956, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33977, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33985, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -195272,7 +195332,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34953, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34961, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -195291,7 +195351,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -195329,7 +195389,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -195351,7 +195411,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195369,7 +195429,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20826, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20834, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -195390,7 +195450,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -195405,7 +195465,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -195429,7 +195489,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -195457,21 +195517,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34982, 0) + ts+34990, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -195522,7 +195582,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.X__builtin___memcpy_chk(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte), libc.X__builtin_object_size(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, 0)) @@ -195542,7 +195602,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -195585,7 +195645,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195645,12 +195705,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+35035, + ts+35043, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 35085 /* "phrase" */ + return ts + 35093 /* "phrase" */ } - return ts + 34948 /* "NEAR" */ + return ts + 34956 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -195673,7 +195733,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -195719,7 +195779,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -195732,7 +195792,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -195742,7 +195802,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -195751,7 +195811,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -195772,7 +195832,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -195796,12 +195856,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -195811,7 +195871,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -195846,7 +195906,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -195874,7 +195934,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -195885,7 +195945,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -195935,12 +195995,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -195991,7 +196051,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -196007,14 +196067,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -196042,7 +196102,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -196051,7 +196111,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -196065,7 +196125,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -196074,7 +196134,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -196085,7 +196145,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -196115,7 +196175,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -196164,7 +196224,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -196323,7 +196383,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -196369,7 +196429,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -196411,7 +196471,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -196445,20 +196505,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -196684,7 +196744,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -196892,14 +196952,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -196907,17 +196967,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -196931,18 +196991,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -196964,18 +197024,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -196992,9 +197052,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -197002,38 +197062,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -197041,7 +197101,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -197059,7 +197119,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -197083,7 +197143,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -197094,7 +197154,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -197106,7 +197166,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -197133,7 +197193,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+35092, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+35100, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -197179,11 +197239,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -197195,7 +197255,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -197210,7 +197270,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -197221,7 +197281,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+35098, + ts+35106, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -197238,7 +197298,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -197249,7 +197309,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+35149, + ts+35157, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -197263,7 +197323,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -197273,7 +197333,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+35198, + ts+35206, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -197285,7 +197345,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -197296,22 +197356,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -197322,7 +197382,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -197364,7 +197424,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -197457,7 +197517,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -197477,7 +197537,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -197500,7 +197560,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -197528,7 +197588,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -197537,7 +197597,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+35238, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+35246, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -197561,7 +197621,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -197578,7 +197638,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -197592,7 +197652,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -197645,14 +197705,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -197695,7 +197755,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -197744,7 +197804,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -197780,7 +197840,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -197801,7 +197861,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -197814,7 +197874,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -197822,11 +197882,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -197847,7 +197907,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -197909,7 +197969,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -197932,12 +197992,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -197947,7 +198007,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -197989,16 +198049,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -198028,7 +198088,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -198057,7 +198117,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -198102,7 +198162,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -198134,7 +198194,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -198168,7 +198228,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -198190,7 +198250,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -198231,7 +198291,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -198290,7 +198350,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -198340,7 +198400,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -198348,7 +198408,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -198377,7 +198437,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -198482,7 +198542,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -198607,7 +198667,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -198707,7 +198767,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -198735,7 +198795,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -198969,7 +199029,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -198977,7 +199037,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+35261, + ts+35269, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -198988,7 +199048,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -199058,7 +199118,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -199114,7 +199174,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -199129,7 +199189,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -199181,7 +199241,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -199211,7 +199271,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -199261,7 +199321,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -199272,7 +199332,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -199295,7 +199355,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -199335,7 +199395,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -199346,7 +199406,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -199385,7 +199445,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -199410,12 +199470,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -199434,7 +199494,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -199451,21 +199511,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -199475,7 +199535,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -199501,7 +199561,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -199581,7 +199641,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -199637,7 +199697,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -199688,7 +199748,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -199749,7 +199809,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -199757,7 +199817,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -199777,7 +199837,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -199785,7 +199845,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -199801,7 +199861,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -199863,7 +199923,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -199885,7 +199945,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -199930,7 +199990,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -200133,7 +200193,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -200166,7 +200226,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -200174,13 +200234,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -200199,7 +200259,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -200212,7 +200272,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -200254,7 +200314,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -200267,7 +200327,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -200277,7 +200337,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -200298,7 +200358,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) @@ -200317,7 +200377,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -200339,7 +200399,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -200372,7 +200432,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -200382,7 +200442,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -200395,7 +200455,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -200411,7 +200471,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -200471,7 +200531,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -200507,14 +200567,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -200590,7 +200650,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -200619,7 +200679,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -200648,7 +200708,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -200672,7 +200732,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -200693,7 +200753,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+35345, + ts+35353, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -200712,7 +200772,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -200781,13 +200841,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -200946,7 +201006,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -200996,7 +201056,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -201013,7 +201073,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -201030,7 +201090,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -201039,14 +201099,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -201071,7 +201131,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -201249,7 +201309,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -201258,7 +201318,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -201319,7 +201379,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -201353,7 +201413,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -201378,12 +201438,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -201410,7 +201470,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -201442,7 +201502,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.X__builtin___memset_chk(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{})), libc.X__builtin_object_size(tls, pIter, 0)) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -201452,13 +201512,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -201475,7 +201535,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -201531,11 +201591,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -201546,7 +201606,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -201559,7 +201619,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -201724,7 +201784,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -201871,7 +201931,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -201891,7 +201951,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -201902,7 +201962,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -201913,7 +201973,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -201932,7 +201992,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -201943,13 +202003,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35402, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35410, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+25320, ts+35410, 0, pzErr) + pConfig, ts+25328, ts+35418, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11768, - ts+35445, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11776, + ts+35453, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -201966,7 +202026,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -201987,7 +202047,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -202014,7 +202074,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -202036,7 +202096,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -202060,7 +202120,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -202143,7 +202203,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -202151,7 +202211,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -202171,14 +202231,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -202196,7 +202256,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -202209,7 +202269,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -202231,7 +202291,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -202239,7 +202299,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -202248,7 +202308,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -202261,7 +202321,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+35092, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+35100, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -202270,7 +202330,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -202284,7 +202344,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -202304,7 +202364,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -202323,7 +202383,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -202382,7 +202442,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -202398,7 +202458,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35489, + ts+35497, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -202551,7 +202611,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -202610,7 +202670,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35575) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35583) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -202641,13 +202701,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -202680,7 +202740,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -202702,7 +202762,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -202710,9 +202770,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -202741,35 +202801,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -202803,21 +202863,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -202827,13 +202887,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -202851,7 +202911,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -202909,11 +202969,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -202922,14 +202982,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -203000,7 +203060,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -203021,7 +203081,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35580, 0) + ts+35588, 0) return SQLITE_ERROR } @@ -203162,7 +203222,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -203173,7 +203233,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -203199,7 +203259,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -203212,11 +203272,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -203259,7 +203319,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -203276,7 +203336,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -203286,7 +203346,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -203320,7 +203380,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -203340,7 +203400,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -203369,7 +203429,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -203428,7 +203488,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -203456,7 +203516,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -203485,11 +203545,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35619, + ts+35627, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14946 /* ", " */ + return ts + 14954 /* ", " */ } return ts + 1527 /* "" */ }(), @@ -203501,9 +203561,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35674 /* "DESC" */ + return ts + 35682 /* "DESC" */ } - return ts + 35679 /* "ASC" */ + return ts + 35687 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -203523,7 +203583,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -203538,7 +203598,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -203554,13 +203614,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35683, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35691, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5411, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35689, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35697, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -203570,7 +203630,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -203583,7 +203643,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -203595,7 +203655,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35717, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35725, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -203627,7 +203687,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35727, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35735, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -203636,7 +203696,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -203659,21 +203719,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35748, libc.VaList(bp, z)) + ts+35756, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 34131 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 34139 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -203692,7 +203752,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -203732,7 +203792,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35580, 0) + ts+35588, 0) return SQLITE_ERROR __1: ; @@ -203967,7 +204027,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35781, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35789, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -204013,7 +204073,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -204024,7 +204084,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -204038,7 +204098,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -204068,7 +204128,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204112,7 +204172,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -204134,7 +204194,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -204142,29 +204202,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35817, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35825, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35828, 0) + ts+35836, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35908, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35916, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35916, 0) + ts+35924, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+17255, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+17263, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35972, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35980, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35978, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35986, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -204183,7 +204243,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -204193,7 +204253,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -204216,7 +204276,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -204238,7 +204298,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17800, z) { + 0 == Xsqlite3_stricmp(tls, ts+17808, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -204263,12 +204323,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35994, + ts+36002, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20727 /* "UPDATE" */ + return ts + 20735 /* "UPDATE" */ } - return ts + 36031 /* "DELETE from" */ + return ts + 36039 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -204318,7 +204378,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -204330,7 +204390,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -204339,7 +204399,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -204347,7 +204407,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -204355,46 +204415,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -204411,7 +204471,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -204468,7 +204528,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -204552,7 +204612,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -204562,7 +204622,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -204578,11 +204638,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -204594,7 +204654,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -204652,7 +204712,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -204690,7 +204750,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -204712,7 +204772,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -204734,7 +204794,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -204757,7 +204817,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204790,7 +204850,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204871,10 +204931,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204910,7 +204970,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -204919,7 +204979,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -204929,7 +204989,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204942,7 +205002,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+36043, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+36051, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -204952,7 +205012,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -204974,7 +205034,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -205038,7 +205098,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -205078,7 +205138,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -205097,12 +205157,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -205110,7 +205170,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -205119,7 +205179,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -205128,7 +205188,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -205137,7 +205197,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -205168,7 +205228,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -205197,7 +205257,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -205215,7 +205275,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -205231,7 +205291,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205247,7 +205307,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36064, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36072, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -205266,7 +205326,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36086, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36094, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -205282,7 +205342,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -205308,28 +205368,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36117) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36125) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+36130, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+36138, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -205340,10 +205400,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 36221, ts + 34320, ts + 25320, ts + 34671, ts + 11768, -} /* sqlite3.c:234311:21 */ + ts + 36229, ts + 34328, ts + 25328, ts + 34679, ts + 11776, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -205364,7 +205424,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+36228, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+36236, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -205382,13 +205442,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+36228, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36236, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+36233, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36241, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -205426,7 +205486,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -205435,7 +205495,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -205443,7 +205503,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -205454,20 +205514,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 36248, - ts + 36316, - ts + 36385, + ts + 36256, + ts + 36324, + ts + 36393, - ts + 36418, - ts + 36457, - ts + 36497, - ts + 36536, - ts + 36577, + ts + 36426, + ts + 36465, + ts + 36505, + ts + 36544, + ts + 36585, - ts + 36616, + ts + 36624, - ts + 36658, - ts + 36698, + ts + 36666, + ts + 36706, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -205544,7 +205604,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -205566,79 +205626,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36721, + ts+36729, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36825, + ts+36833, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36863, + ts+36871, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36901, + ts+36909, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+25320, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11768, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+36221, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+25328, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11776, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+36229, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34671, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34679, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+34320, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34328, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36943, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36951, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29973 /* " WITHOUT ROWID" */ + return ts + 29981 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36973, + ts+36981, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -205651,7 +205711,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205680,27 +205740,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37017, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37025, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37040, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37048, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34320, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34328, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34671, ts+37046, 0, pzErr) + pConfig, ts+34679, ts+37054, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+36221, ts+37078, 1, pzErr) + pConfig, ts+36229, ts+37086, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34817, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34825, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -205712,7 +205772,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -205731,12 +205791,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -205753,7 +205813,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -205822,7 +205882,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205849,7 +205909,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -205863,7 +205923,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -205887,7 +205947,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205928,7 +205988,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -205940,12 +206000,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37095, + ts+37103, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37145, + ts+37153, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -205955,12 +206015,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34817, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34825, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -206024,15 +206084,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -206043,7 +206103,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -206065,7 +206125,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -206097,7 +206157,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -206142,7 +206202,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -206150,7 +206210,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+37174, + zSql = Xsqlite3_mprintf(tls, ts+37182, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -206177,13 +206237,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -206249,7 +206309,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -206347,14 +206407,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34320, bp+48) + rc = fts5StorageCount(tls, p, ts+34328, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34671, bp+56) + rc = fts5StorageCount(tls, p, ts+34679, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -206374,7 +206434,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -206388,7 +206448,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -206398,7 +206458,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -206416,7 +206476,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -206447,7 +206507,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -206465,7 +206525,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -206482,7 +206542,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -206496,12 +206556,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -206556,13 +206616,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -206572,12 +206632,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -206593,9 +206653,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.X__builtin___memcpy_chk(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar)), libc.X__builtin_object_size(tls, p, 0)) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37206) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37214) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37217) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37225) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -206612,7 +206672,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -206624,7 +206684,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -206705,7 +206765,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -206715,11 +206775,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -206774,7 +206834,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -206796,7 +206856,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -206806,7 +206866,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -206826,7 +206886,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -206837,7 +206897,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 37228 /* "L* N* Co" */ + var zCat uintptr = ts + 37236 /* "L* N* Co" */ var i int32 libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{})), libc.X__builtin_object_size(tls, p, 0)) @@ -206850,7 +206910,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37237) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37245) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -206861,18 +206921,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37248) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37256) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37206) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37214) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37217) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37225) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37237) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37245) { // no-op } else { rc = SQLITE_ERROR @@ -206894,12 +206954,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -207155,7 +207215,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -207164,10 +207224,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -207178,7 +207238,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -207186,7 +207246,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 37266 /* "unicode61" */ + var zBase uintptr = ts + 37274 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -207231,9 +207291,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -207243,15 +207303,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -207272,12 +207332,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -207287,7 +207347,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -207297,7 +207357,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -207315,14 +207375,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -207337,13 +207397,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37276, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37284, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -207351,11 +207411,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37279, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37287, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37284, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37292, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -207363,7 +207423,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37289, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37297, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -207371,7 +207431,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37292, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37300, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -207379,11 +207439,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37295, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37303, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37300, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37308, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -207391,19 +207451,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37305, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37313, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37309, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37317, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37315, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37323, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37320, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37328, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -207411,11 +207471,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37324, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37332, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37328, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37336, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -207423,7 +207483,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37331, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37339, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -207431,11 +207491,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37335, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37343, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37339, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37347, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -207443,22 +207503,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37343, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37347, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37351, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -207466,34 +207510,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37355, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37359, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37355, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37363, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37358, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37361, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37366, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37369, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37365, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37373, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37359, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -207503,143 +207563,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37368, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37376, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37376, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37384, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37383, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37391, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37388, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37396, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37284, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37292, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37393, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37401, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37279, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37287, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37398, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37406, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37359, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37403, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37411, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15782, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15790, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37408, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37416, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37361, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37369, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37412, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37420, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37417, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37425, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37320, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37328, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37423, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37431, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37427, uint64(1), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37435, uint64(1), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37429, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37437, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37435, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37443, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37359, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37443, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37451, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37449, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37457, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37454, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37462, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37460, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37347, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37468, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37476, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37355, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37480, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37476, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37484, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37488, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37488, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37496, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37494, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37502, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37347, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37355, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37500, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37508, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37361, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37369, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -207649,22 +207709,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37507, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37515, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37292, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37300, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37512, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37520, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -207672,21 +207732,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37517, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37525, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37292, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37300, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37523, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37531, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37292, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37300, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37476, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37484, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -207694,7 +207754,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37529, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37537, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -207702,9 +207762,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37535, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37543, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -207714,18 +207774,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37541, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37549, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37545, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37553, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37548, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37556, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -207734,7 +207794,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37551, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37559, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -207751,7 +207811,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -207767,7 +207827,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -207865,7 +207925,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -207886,20 +207946,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -207910,7 +207970,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37555) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37563) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -207930,7 +207990,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -208083,7 +208143,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -208097,27 +208157,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 37266, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37274, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37570, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37578, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37576, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37584, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37583, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37591, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -208143,7 +208203,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -208166,7 +208226,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -208237,7 +208297,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -208256,7 +208316,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -208317,7 +208377,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -208375,7 +208435,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -208387,9 +208447,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -208586,7 +208646,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -208765,7 +208825,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -208944,9 +209004,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -208986,7 +209046,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -209018,7 +209078,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -209093,7 +209153,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -209269,7 +209329,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -209315,7 +209375,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -209328,7 +209388,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -209388,7 +209448,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -209428,7 +209488,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -209449,9 +209509,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -209459,7 +209519,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -209467,14 +209527,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37591) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37599) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37595) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37603) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37599) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37607) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37608, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37616, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -209484,14 +209544,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -209516,24 +209576,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 37642, - ts + 37682, - ts + 37717, + ts + 37650, + ts + 37690, + ts + 37725, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23616, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23624, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37760, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37768, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -209586,11 +209646,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -209604,7 +209664,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -209672,7 +209732,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -209685,11 +209745,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37793, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37801, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37824, + ts+37832, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -209713,7 +209773,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37875, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37883, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -209739,7 +209799,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -209753,7 +209813,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -209762,7 +209822,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -209793,7 +209853,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -209822,7 +209882,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -209966,7 +210026,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -210040,12 +210100,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -210118,16 +210178,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37901, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37909, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -210144,7 +210204,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -210171,1132 +210231,1132 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37911 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37919 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 8 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40299:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 24 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40300:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 40 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40301:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 56 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40302:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 72 /* .pMethods */)) = uintptr(unsafe.Pointer(&nolockIoMethods)) // sqlite3.c:40303:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 8 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40308:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 24 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40309:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 40 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40310:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 56 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40311:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 72 /* .pMethods */)) = uintptr(unsafe.Pointer(&nolockIoMethods)) // sqlite3.c:40312:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Off_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 224 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t, Off_t) Ssize_t - }{libc.Xpread})) // sqlite3.c:35200:21: + }{libc.Xpread})) // sqlite3.c:35209:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 296 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t, Off_t) Ssize_t - }{libc.Xpwrite})) // sqlite3.c:35217:21: + }{libc.Xpwrite})) // sqlite3.c:35226:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Uid_t, Gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, Off_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&autolockIoFinder)) // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42829:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 704 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 712)) = unixOpen // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 720)) = unixDelete // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 728)) = unixAccess // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 736)) = unixFullPathname // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 744)) = unixDlOpen // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 752)) = unixDlError // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 760)) = unixDlSym // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 768)) = unixDlClose // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 776)) = unixRandomness // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 784)) = unixSleep // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 792)) = unixCurrentTime // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 800)) = unixGetLastError // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 808)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 816)) = unixSetSystemCall // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 824)) = unixGetSystemCall // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 832)) = unixNextSystemCall // sqlite3.c:42842:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 872 /* .pAppData */)) = uintptr(unsafe.Pointer(&flockIoFinder)) // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 880)) = unixOpen // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 888)) = unixDelete // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 896)) = unixAccess // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 904)) = unixFullPathname // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 912)) = unixDlOpen // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 920)) = unixDlError // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 928)) = unixDlSym // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 936)) = unixDlClose // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 944)) = unixRandomness // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 952)) = unixSleep // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 960)) = unixCurrentTime // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 968)) = unixGetLastError // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 976)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 984)) = unixSetSystemCall // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 992)) = unixGetSystemCall // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1000)) = unixNextSystemCall // sqlite3.c:42845:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1040 /* .pAppData */)) = uintptr(unsafe.Pointer(&afpIoFinder)) // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1048)) = unixOpen // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1056)) = unixDelete // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1064)) = unixAccess // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1072)) = unixFullPathname // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1080)) = unixDlOpen // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1088)) = unixDlError // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1096)) = unixDlSym // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1104)) = unixDlClose // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1112)) = unixRandomness // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1120)) = unixSleep // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1128)) = unixCurrentTime // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1136)) = unixGetLastError // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1144)) = unixCurrentTimeInt64 // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1152)) = unixSetSystemCall // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1160)) = unixGetSystemCall // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1168)) = unixNextSystemCall // sqlite3.c:42848:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1208 /* .pAppData */)) = uintptr(unsafe.Pointer(&nfsIoFinder)) // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1216)) = unixOpen // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1224)) = unixDelete // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1232)) = unixAccess // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1240)) = unixFullPathname // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1248)) = unixDlOpen // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1256)) = unixDlError // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1264)) = unixDlSym // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1272)) = unixDlClose // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1280)) = unixRandomness // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1288)) = unixSleep // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1296)) = unixCurrentTime // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1304)) = unixGetLastError // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1312)) = unixCurrentTimeInt64 // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1320)) = unixSetSystemCall // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1328)) = unixGetSystemCall // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1336)) = unixNextSystemCall // sqlite3.c:42849:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1376 /* .pAppData */)) = uintptr(unsafe.Pointer(&proxyIoFinder)) // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1384)) = unixOpen // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1392)) = unixDelete // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1400)) = unixAccess // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1408)) = unixFullPathname // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1416)) = unixDlOpen // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1424)) = unixDlError // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1432)) = unixDlSym // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1440)) = unixDlClose // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1448)) = unixRandomness // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1456)) = unixSleep // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1464)) = unixCurrentTime // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1472)) = unixGetLastError // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1480)) = unixCurrentTimeInt64 // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1488)) = unixSetSystemCall // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1496)) = unixGetSystemCall // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1504)) = unixNextSystemCall // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoFinder)) + 0)) = afpIoFinderImpl // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 8)) = afpClose // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 16)) = unixRead // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 24)) = unixWrite // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 32)) = unixTruncate // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 40)) = unixSync // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 48)) = unixFileSize // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 56)) = afpLock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 64)) = afpUnlock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 72)) = afpCheckReservedLock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 80)) = unixFileControl // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 112)) = unixShmLock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 136)) = unixFetch // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&autolockIoFinder)) + 0)) = autolockIoFinderImpl // sqlite3.c:40345:55: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoFinder)) + 0)) = flockIoFinderImpl // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 8)) = flockClose // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 16)) = unixRead // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 24)) = unixWrite // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 40)) = unixSync // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 56)) = flockLock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 64)) = flockUnlock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 72)) = flockCheckReservedLock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 136)) = unixFetch // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoFinder)) + 0)) = nfsIoFinderImpl // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 8)) = unixClose // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 16)) = unixRead // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 24)) = unixWrite // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 32)) = unixTruncate // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 40)) = unixSync // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 48)) = unixFileSize // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 56)) = unixLock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 64)) = nfsUnlock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 80)) = unixFileControl // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 112)) = unixShmLock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 136)) = unixFetch // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoFinder)) + 0)) = proxyIoFinderImpl // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 8)) = proxyClose // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 16)) = unixRead // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 24)) = unixWrite // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 32)) = unixTruncate // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 40)) = unixSync // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 48)) = unixFileSize // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 56)) = proxyLock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 64)) = proxyUnlock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 72)) = proxyCheckReservedLock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 80)) = unixFileControl // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 112)) = unixShmLock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 136)) = unixFetch // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&autolockIoFinder)) // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42838:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 704 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 712)) = unixOpen // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 720)) = unixDelete // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 728)) = unixAccess // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 736)) = unixFullPathname // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 744)) = unixDlOpen // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 752)) = unixDlError // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 760)) = unixDlSym // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 768)) = unixDlClose // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 776)) = unixRandomness // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 784)) = unixSleep // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 792)) = unixCurrentTime // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 800)) = unixGetLastError // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 808)) = unixCurrentTimeInt64 // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 816)) = unixSetSystemCall // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 824)) = unixGetSystemCall // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 832)) = unixNextSystemCall // sqlite3.c:42851:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 872 /* .pAppData */)) = uintptr(unsafe.Pointer(&flockIoFinder)) // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 880)) = unixOpen // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 888)) = unixDelete // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 896)) = unixAccess // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 904)) = unixFullPathname // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 912)) = unixDlOpen // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 920)) = unixDlError // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 928)) = unixDlSym // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 936)) = unixDlClose // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 944)) = unixRandomness // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 952)) = unixSleep // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 960)) = unixCurrentTime // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 968)) = unixGetLastError // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 976)) = unixCurrentTimeInt64 // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 984)) = unixSetSystemCall // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 992)) = unixGetSystemCall // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1000)) = unixNextSystemCall // sqlite3.c:42854:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1040 /* .pAppData */)) = uintptr(unsafe.Pointer(&afpIoFinder)) // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1048)) = unixOpen // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1056)) = unixDelete // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1064)) = unixAccess // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1072)) = unixFullPathname // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1080)) = unixDlOpen // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1088)) = unixDlError // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1096)) = unixDlSym // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1104)) = unixDlClose // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1112)) = unixRandomness // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1120)) = unixSleep // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1128)) = unixCurrentTime // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1136)) = unixGetLastError // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1144)) = unixCurrentTimeInt64 // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1152)) = unixSetSystemCall // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1160)) = unixGetSystemCall // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1168)) = unixNextSystemCall // sqlite3.c:42857:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1208 /* .pAppData */)) = uintptr(unsafe.Pointer(&nfsIoFinder)) // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1216)) = unixOpen // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1224)) = unixDelete // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1232)) = unixAccess // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1240)) = unixFullPathname // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1248)) = unixDlOpen // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1256)) = unixDlError // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1264)) = unixDlSym // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1272)) = unixDlClose // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1280)) = unixRandomness // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1288)) = unixSleep // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1296)) = unixCurrentTime // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1304)) = unixGetLastError // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1312)) = unixCurrentTimeInt64 // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1320)) = unixSetSystemCall // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1328)) = unixGetSystemCall // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1336)) = unixNextSystemCall // sqlite3.c:42858:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1376 /* .pAppData */)) = uintptr(unsafe.Pointer(&proxyIoFinder)) // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1384)) = unixOpen // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1392)) = unixDelete // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1400)) = unixAccess // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1408)) = unixFullPathname // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1416)) = unixDlOpen // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1424)) = unixDlError // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1432)) = unixDlSym // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1440)) = unixDlClose // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1448)) = unixRandomness // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1456)) = unixSleep // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1464)) = unixCurrentTime // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1472)) = unixGetLastError // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1480)) = unixCurrentTimeInt64 // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1488)) = unixSetSystemCall // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1496)) = unixGetSystemCall // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1504)) = unixNextSystemCall // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoFinder)) + 0)) = afpIoFinderImpl // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 8)) = afpClose // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 16)) = unixRead // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 24)) = unixWrite // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 32)) = unixTruncate // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 40)) = unixSync // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 48)) = unixFileSize // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 56)) = afpLock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 64)) = afpUnlock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 72)) = afpCheckReservedLock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 80)) = unixFileControl // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 112)) = unixShmLock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 136)) = unixFetch // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&autolockIoFinder)) + 0)) = autolockIoFinderImpl // sqlite3.c:40354:55: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoFinder)) + 0)) = flockIoFinderImpl // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 8)) = flockClose // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 16)) = unixRead // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 24)) = unixWrite // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 40)) = unixSync // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 56)) = flockLock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 64)) = flockUnlock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 72)) = flockCheckReservedLock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 136)) = unixFetch // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoFinder)) + 0)) = nfsIoFinderImpl // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 8)) = unixClose // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 16)) = unixRead // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 24)) = unixWrite // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 32)) = unixTruncate // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 40)) = unixSync // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 48)) = unixFileSize // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 56)) = unixLock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 64)) = nfsUnlock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 80)) = unixFileControl // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 112)) = unixShmLock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 136)) = unixFetch // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoFinder)) + 0)) = proxyIoFinderImpl // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 8)) = proxyClose // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 16)) = unixRead // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 24)) = unixWrite // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 32)) = unixTruncate // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 40)) = unixSync // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 48)) = unixFileSize // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 56)) = proxyLock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 64)) = proxyUnlock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 72)) = proxyCheckReservedLock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 80)) = unixFileControl // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 112)) = unixShmLock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 136)) = unixFetch // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-12.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00S\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00nfs\x00hfs\x00ufs\x00afpfs\x00smbfs\x00webdav\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00msdos\x00exfat\x00SQLITE_FORCE_PROXY_LOCKING\x00:auto:\x00fsync\x00/dev/urandom\x00sqliteplocks\x00/\x00dummy\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00break\x00path error (len %d)\x00read error (len %d)\x00create failed (%d)\x00write failed (%d)\x00rename failed (%d)\x00broke stale lock on %s\n\x00failed to break stale lock on %s, %s\n\x00-conch\x00.lock\x00:auto: (not held)\x00unix\x00unix-none\x00unix-dotfile\x00unix-posix\x00unix-flock\x00unix-afp\x00unix-nfs\x00unix-proxy\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00dylib\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00lock_proxy_file\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00failed to set lock proxy file\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-12.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00S\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00nfs\x00hfs\x00ufs\x00afpfs\x00smbfs\x00webdav\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00msdos\x00exfat\x00SQLITE_FORCE_PROXY_LOCKING\x00:auto:\x00fsync\x00/dev/urandom\x00sqliteplocks\x00/\x00dummy\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00break\x00path error (len %d)\x00read error (len %d)\x00create failed (%d)\x00write failed (%d)\x00rename failed (%d)\x00broke stale lock on %s\n\x00failed to break stale lock on %s, %s\n\x00-conch\x00.lock\x00:auto: (not held)\x00unix\x00unix-none\x00unix-dotfile\x00unix-posix\x00unix-flock\x00unix-afp\x00unix-nfs\x00unix-proxy\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00dylib\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00lock_proxy_file\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00failed to set lock proxy file\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go index ad91ddc8..5da1545f 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_darwin_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -DSQLITE_WITHOUT_ZONEMALLOC', DO NOT EDIT. package sqlite3 @@ -2564,7 +2564,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2672,8 +2672,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -4285,7 +4285,7 @@ var X__darwin_check_fd_set_overflow uintptr /* :146:5: */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -6050,7 +6050,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -6075,7 +6075,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -6094,12 +6094,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -6128,7 +6128,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -6236,7 +6236,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -6342,7 +6342,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -6448,7 +6448,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -6523,7 +6523,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -6588,7 +6588,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6613,7 +6613,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6629,7 +6629,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -6652,7 +6652,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6826,7 +6826,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6985,7 +6985,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -7002,12 +7002,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -7041,7 +7041,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -7061,7 +7061,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -7081,7 +7081,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -7125,7 +7125,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -7162,7 +7162,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -7182,13 +7182,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -7218,7 +7218,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -7231,7 +7231,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -7252,13 +7252,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -7268,13 +7268,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7476,7 +7476,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7678,7 +7678,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7732,7 +7732,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7764,22 +7764,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7799,7 +7799,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7813,7 +7813,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -8434,7 +8434,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -8442,7 +8442,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -13449,13 +13449,13 @@ type Max_align_t = float64 /* __stddef_max_align_t.h:16:21 */ // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -13466,7 +13466,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -13489,12 +13489,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -13517,7 +13517,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -13659,13 +13659,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -13673,7 +13673,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -13685,7 +13685,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -13695,7 +13695,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -13709,7 +13709,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -13720,7 +13720,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -13731,7 +13731,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -13741,7 +13741,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -13751,9 +13751,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -13768,7 +13768,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -13788,7 +13788,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -13810,7 +13810,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -13827,17 +13827,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -13852,17 +13852,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -13893,7 +13893,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -13903,7 +13903,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -13916,7 +13916,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -13935,10 +13935,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -13949,7 +13949,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -13960,9 +13960,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -14044,14 +14044,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -14070,21 +14070,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -14094,9 +14094,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -14107,9 +14107,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -14117,7 +14117,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -14142,14 +14142,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -14160,9 +14160,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -14188,15 +14188,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -14226,7 +14226,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -14235,14 +14235,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -14258,7 +14258,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -14268,7 +14268,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -14286,7 +14286,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -14299,7 +14299,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -14317,7 +14317,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -14331,7 +14331,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -14340,7 +14340,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -14350,9 +14350,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -14381,9 +14381,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -14417,7 +14417,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -14425,14 +14425,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -14443,7 +14443,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -14470,7 +14470,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -14541,7 +14541,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -14559,7 +14559,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -14630,7 +14630,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -14655,7 +14655,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -14694,7 +14694,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -14705,9 +14705,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -14811,11 +14811,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -14827,7 +14827,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -14855,7 +14855,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -14864,11 +14864,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -14933,7 +14933,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -14951,10 +14951,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -15030,7 +15030,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -15081,7 +15081,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -15175,7 +15175,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -15188,7 +15188,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -15253,7 +15253,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -15276,7 +15276,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -15298,7 +15298,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -15324,7 +15324,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -15348,7 +15348,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -15374,7 +15374,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -15398,7 +15398,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -15527,9 +15527,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1032, ts + 1046, ts + 1059, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -15596,10 +15596,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -15663,7 +15663,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -15723,12 +15723,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -15746,21 +15746,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -15776,7 +15776,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -15784,7 +15784,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -15792,7 +15792,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1079, ts + 1083, @@ -15800,7 +15800,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1092, ts + 1100, ts + 1105, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -15845,10 +15845,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -15871,10 +15871,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -15886,7 +15886,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -15940,7 +15940,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -16005,7 +16005,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -16019,7 +16019,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -16031,13 +16031,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -16048,7 +16048,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -16056,7 +16056,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -16071,7 +16071,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -16083,20 +16083,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -16111,7 +16111,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -16121,7 +16121,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -16135,7 +16135,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -16143,14 +16143,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -16161,12 +16161,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -16184,7 +16184,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -16200,7 +16200,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -16210,7 +16210,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -16222,7 +16222,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -16875,14 +16875,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -16909,7 +16909,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -16966,7 +16966,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -16982,7 +16982,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -17056,7 +17056,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -17109,7 +17109,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(DateTime{})), libc.X__builtin_object_size(tls, p, 0)) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -17118,7 +17118,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -17174,7 +17174,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -17225,7 +17225,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -17240,7 +17240,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -17263,7 +17263,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -17292,12 +17292,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -17342,7 +17342,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -17361,13 +17361,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -17397,7 +17397,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -17422,7 +17422,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -17462,7 +17462,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -17490,7 +17490,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -17514,7 +17514,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -17840,7 +17840,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -17881,7 +17881,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -17897,7 +17897,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -17912,7 +17912,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -17961,7 +17961,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -17989,7 +17989,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -18041,7 +18041,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -18185,7 +18185,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -18194,7 +18194,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -18203,7 +18203,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -18212,7 +18212,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -18225,7 +18225,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1336}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1345}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1358}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -18277,7 +18277,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -18286,27 +18286,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -18316,27 +18316,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -18349,7 +18349,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -18358,7 +18358,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -18366,7 +18366,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -18378,7 +18378,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -18387,23 +18387,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -18411,14 +18411,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -18426,7 +18426,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -18440,7 +18440,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -18450,14 +18450,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -18465,7 +18465,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -18473,25 +18473,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.X__builtin___memset_chk(tls, zBufOut, 0, uint64(nByte), libc.X__builtin_object_size(tls, zBufOut, 0)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -18508,13 +18508,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -18523,7 +18523,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18548,7 +18548,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -18568,7 +18568,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -18578,7 +18578,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -18588,11 +18588,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -18614,7 +18614,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -18634,7 +18634,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -18657,7 +18657,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -18702,7 +18702,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -18733,8 +18733,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -18744,7 +18744,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -18753,14 +18753,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -18858,7 +18858,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18881,7 +18881,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -18890,7 +18890,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -18906,7 +18906,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -18928,18 +18928,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -18948,7 +18948,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18963,7 +18963,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -19097,7 +19097,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -19131,7 +19131,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -19141,7 +19141,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -19154,7 +19154,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -19165,7 +19165,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -19174,7 +19174,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -19183,7 +19183,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -19198,7 +19198,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -19237,40 +19237,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -19283,11 +19283,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -19350,7 +19350,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -19363,22 +19363,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -19394,7 +19394,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -19422,7 +19422,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -19439,7 +19439,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -19458,7 +19458,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -19481,12 +19481,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mem0)) + 24)) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -19494,7 +19494,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -19509,7 +19509,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -19522,7 +19522,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -19533,7 +19533,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -19580,7 +19580,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -19609,7 +19609,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -19619,7 +19619,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -19627,27 +19627,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -19666,7 +19666,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -19677,7 +19677,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -19695,14 +19695,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -19728,7 +19728,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -19736,7 +19736,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -19797,7 +19797,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -19807,7 +19807,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -19815,7 +19815,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.X__builtin___memset_chk(tls, p, 0, Size_t(n), libc.X__builtin_object_size(tls, p, 0)) @@ -19825,7 +19825,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -19837,7 +19837,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -19868,7 +19868,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -19878,7 +19878,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -19916,7 +19916,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -19936,7 +19936,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -19960,7 +19960,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -19974,7 +19974,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -19988,7 +19988,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -20006,7 +20006,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -20019,7 +20019,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -20035,7 +20035,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -20056,7 +20056,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) *(*int32)(unsafe.Pointer(db + 432)) = 0 @@ -20072,7 +20072,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -20091,7 +20091,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -20120,7 +20120,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -20131,18 +20131,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -20169,7 +20169,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -20180,7 +20180,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -20195,7 +20195,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -20210,7 +20210,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -20222,21 +20222,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -20250,7 +20250,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -20272,7 +20272,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -21765,7 +21765,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29902:29 */ // End of function @@ -21773,7 +21773,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -21800,7 +21800,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -21815,7 +21815,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -21869,7 +21869,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -21885,7 +21885,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.X__builtin___memcpy_chk(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N), libc.X__builtin_object_size(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), 0)) @@ -21895,7 +21895,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -21907,14 +21907,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -21928,7 +21928,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -21940,7 +21940,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -21958,10 +21958,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -21973,7 +21973,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -21981,7 +21981,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -21989,7 +21989,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -21998,7 +21998,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -22020,7 +22020,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -22031,7 +22031,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -22049,7 +22049,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -22071,7 +22071,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -22083,7 +22083,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -22103,7 +22103,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -22127,7 +22127,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -22142,7 +22142,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -22164,7 +22164,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -22182,7 +22182,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -22194,7 +22194,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -22249,7 +22249,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -22293,10 +22293,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -22375,18 +22375,18 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755: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:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762: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)) } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -22408,7 +22408,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -22477,7 +22477,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -22504,7 +22504,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -22531,7 +22531,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -22856,7 +22856,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -22890,7 +22890,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -22922,7 +22922,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -22943,7 +22943,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -23252,7 +23252,7 @@ type exception = struct { // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -23264,7 +23264,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -23284,7 +23284,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -23296,7 +23296,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { @@ -23311,7 +23311,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -23321,7 +23321,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -23333,7 +23333,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -23344,7 +23344,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -23364,7 +23364,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -23391,7 +23391,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -23422,7 +23422,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -23447,7 +23447,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -23479,7 +23479,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -23499,7 +23499,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -23517,7 +23517,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -23532,7 +23532,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -23544,7 +23544,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -23570,7 +23570,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -23594,7 +23594,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -23610,7 +23610,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -23653,7 +23653,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -24033,7 +24033,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -24074,7 +24074,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -24103,7 +24103,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -24225,7 +24225,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24258,7 +24258,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -24320,7 +24320,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -24333,7 +24333,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -24376,7 +24376,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -24422,7 +24422,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -24445,7 +24445,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -24598,7 +24598,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24666,7 +24666,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -24674,12 +24674,12 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ return uint32(*(*U8)(unsafe.Pointer(p)))<<24 | uint32(int32(*(*U8)(unsafe.Pointer(p + 1)))<<16) | uint32(int32(*(*U8)(unsafe.Pointer(p + 2)))<<8) | uint32(*(*U8)(unsafe.Pointer(p + 3))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ *(*uint8)(unsafe.Pointer(p)) = U8(v >> 24) *(*uint8)(unsafe.Pointer(p + 1)) = U8(v >> 16) *(*uint8)(unsafe.Pointer(p + 2)) = U8(v >> 8) @@ -24689,7 +24689,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -24699,7 +24699,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -24717,7 +24717,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24738,7 +24738,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1528) @@ -24757,7 +24757,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -24774,7 +24774,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB >= int64(0) { @@ -24792,7 +24792,7 @@ func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return 0 } -func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043:20: */ if iB == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { @@ -24807,7 +24807,7 @@ func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return int32(0) } -func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB > int64(0) { if iA > (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/iB { @@ -24839,7 +24839,7 @@ func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -24853,7 +24853,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -24884,11 +24884,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -24911,11 +24911,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -24936,7 +24936,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -24988,7 +24988,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -25027,7 +25027,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -25046,7 +25046,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -25085,7 +25085,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -25096,7 +25096,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -25113,7 +25113,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -25128,7 +25128,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -25165,7 +25165,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -25209,7 +25209,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -25238,11 +25238,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -25271,7 +25271,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -25289,7 +25289,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25338,7 +25338,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -25528,7 +25528,7 @@ var azName = [185]uintptr{ ts + 3182, ts + 3187, ts + 3195, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -34003,7 +34003,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Allowed values of unixFile.fsFlags @@ -34025,7 +34025,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -34041,10 +34041,10 @@ type unixShmNode = struct { F__ccgo_pad2 [4]byte FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -34064,18 +34064,18 @@ type unixInodeInfo = struct { FpNext uintptr FpPrev uintptr FsharedByte uint64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -34103,16 +34103,16 @@ type unixFile = struct { FdeviceCharacteristics int32 FopenFlags int32 FfsFlags uint32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -34135,7 +34135,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34150,7 +34150,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -34218,14 +34218,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3403, FpCurrent: 0}, {FzName: ts + 3409}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { return 0 } @@ -34236,7 +34236,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -34273,7 +34273,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -34289,7 +34289,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -34327,7 +34327,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -34394,14 +34394,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -34411,7 +34411,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, sz) @@ -34427,7 +34427,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -34476,7 +34476,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -34578,12 +34578,12 @@ type unixFileId = struct { Fdev Dev_t F__ccgo_pad1 [4]byte Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -34601,7 +34601,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -34635,7 +34635,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3210, func() uintptr { @@ -34649,19 +34649,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -34671,7 +34671,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -34705,7 +34705,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -34788,7 +34788,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -34805,7 +34805,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -34841,7 +34841,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -34907,7 +34907,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -34959,7 +34959,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -35206,7 +35206,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -35227,7 +35227,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -35414,7 +35414,7 @@ __18: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -35427,11 +35427,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -35441,7 +35441,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -35491,26 +35491,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -35551,7 +35551,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -35587,7 +35587,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -35629,7 +35629,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -35664,7 +35664,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -35692,7 +35692,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off // Retry flock() calls that fail with EINTR -func robust_flock(tls *libc.TLS, fd int32, op int32) int32 { /* sqlite3.c:37175:12: */ +func robust_flock(tls *libc.TLS, fd int32, op int32) int32 { /* sqlite3.c:37184:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { rc = libc.Xflock(tls, fd, op) @@ -35704,7 +35704,7 @@ func robust_flock(tls *libc.TLS, fd int32, op int32) int32 { /* sqlite3.c:37175: // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func flockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37191:12: */ +func flockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37200:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -35771,7 +35771,7 @@ func flockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func flockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37271:12: */ +func flockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37280:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id @@ -35804,7 +35804,7 @@ func flockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func flockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37315:12: */ +func flockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37324:12: */ var pFile uintptr = id // no-op if possible @@ -35829,7 +35829,7 @@ func flockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. } // Close a file. -func flockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37349:12: */ +func flockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37358:12: */ flockUnlock(tls, id, NO_LOCK) return closeUnixFile(tls, id) @@ -35870,7 +35870,7 @@ type afpLockingContext = struct { Freserved int32 F__ccgo_pad1 [4]byte FdbPath uintptr -} /* sqlite3.c:37551:9 */ +} /* sqlite3.c:37560:9 */ // ****************** End of the flock lock implementation ********************* // @@ -35903,7 +35903,7 @@ type afpLockingContext = struct { // only works on OSX. // The afpLockingContext structure contains all afp lock specific state -type AfpLockingContext = afpLockingContext /* sqlite3.c:37551:34 */ +type AfpLockingContext = afpLockingContext /* sqlite3.c:37560:34 */ type ByteRangeLockPB2 = struct { Foffset uint64 @@ -35913,13 +35913,13 @@ type ByteRangeLockPB2 = struct { FstartEndFlag uint8 F__ccgo_pad1 [2]byte Ffd int32 -} /* sqlite3.c:37557:1 */ +} /* sqlite3.c:37566:1 */ // This is a utility for setting or clearing a bit-range lock on an // AFP filesystem. // // Return SQLITE_OK on success, SQLITE_BUSY on failure. -func afpSetLock(tls *libc.TLS, path uintptr, pFile uintptr, offset uint64, length uint64, setLockFlag int32) int32 { /* sqlite3.c:37575:12: */ +func afpSetLock(tls *libc.TLS, path uintptr, pFile uintptr, offset uint64, length uint64, setLockFlag int32) int32 { /* sqlite3.c:37584:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -35964,7 +35964,7 @@ func afpSetLock(tls *libc.TLS, path uintptr, pFile uintptr, offset uint64, lengt // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func afpCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37621:12: */ +func afpCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37630:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -36026,7 +36026,7 @@ func afpCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func afpLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37690:12: */ +func afpLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37699:12: */ var rc int32 var pFile uintptr var pInode uintptr @@ -36268,7 +36268,7 @@ afp_end_lock: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37872:12: */ +func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37881:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr @@ -36340,7 +36340,7 @@ func afpUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: } // Close a file & cleanup AFP specific locking context -func afpClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37975:12: */ +func afpClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37984:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id @@ -36384,7 +36384,7 @@ func afpClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37975:12: */ // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func nfsUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:38023:12: */ +func nfsUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:38032:12: */ return posixUnlock(tls, id, eFileLock, 1) } @@ -36417,7 +36417,7 @@ func nfsUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 @@ -36449,7 +36449,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -36506,7 +36506,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -36526,13 +36526,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -36589,7 +36589,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -36651,7 +36651,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -36678,7 +36678,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3322, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3322, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -36694,7 +36694,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36713,7 +36713,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3612, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3612, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -36725,7 +36725,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -36736,7 +36736,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -36751,7 +36751,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -36767,7 +36767,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -36798,7 +36798,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -36843,7 +36843,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -36858,7 +36858,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -36869,7 +36869,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -36987,7 +36987,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -37008,7 +37008,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -37025,7 +37025,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -37035,7 +37035,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -37047,7 +37047,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -37079,7 +37079,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -37120,7 +37120,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size // Page size must be a power of 2 @@ -37134,7 +37134,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -37151,7 +37151,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -37166,7 +37166,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -37210,7 +37210,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -37257,7 +37257,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -37353,7 +37353,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3205, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3205, zShm, 39446) goto shm_open_err __10: ; @@ -37421,7 +37421,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -37524,7 +37524,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39590) goto shmpage_out __14: ; @@ -37572,7 +37572,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -37630,7 +37630,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -37644,7 +37644,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -37751,7 +37751,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -37764,7 +37764,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -37807,7 +37807,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -37830,7 +37830,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3363 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -37872,7 +37872,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -37897,7 +37897,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -37934,7 +37934,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -37961,7 +37961,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -38022,80 +38022,80 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ -var flockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40205:1 */ +var flockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40214:1 */ -func flockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40205:1: */ +func flockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40214:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&flockIoMethods)) } -var flockIoFinder uintptr = 0 /* sqlite3.c:40205:1 */ +var flockIoFinder uintptr = 0 /* sqlite3.c:40214:1 */ -var afpIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40231:1 */ +var afpIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40240:1 */ -func afpIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40231:1: */ +func afpIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40240:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&afpIoMethods)) } -var afpIoFinder uintptr = 0 /* sqlite3.c:40231:1 */ -var proxyIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40257:1 */ +var afpIoFinder uintptr = 0 /* sqlite3.c:40240:1 */ +var proxyIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40266:1 */ -func proxyIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40257:1: */ +func proxyIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40266:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&proxyIoMethods)) } -var proxyIoFinder uintptr = 0 /* sqlite3.c:40257:1 */ +var proxyIoFinder uintptr = 0 /* sqlite3.c:40266:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set -var nfsIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40271:1 */ +var nfsIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40280:1 */ -func nfsIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40271:1: */ +func nfsIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40280:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nfsIoMethods)) } -var nfsIoFinder uintptr = 0 /* sqlite3.c:40271:1 */ +var nfsIoFinder uintptr = 0 /* sqlite3.c:40280:1 */ // This "finder" function attempts to determine the best locking strategy // for the database file "filePath". It then returns the sqlite3_io_methods // object that implements that strategy. // // This is for MacOSX only. -func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr { /* sqlite3.c:40291:33: */ +func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr { /* sqlite3.c:40300:33: */ bp := tls.Alloc(2200) defer tls.Free(2200) @@ -38142,7 +38142,7 @@ func autolockIoFinderImpl(tls *libc.TLS, filePath uintptr, pNew uintptr) uintptr type Mapping = struct { FzFilesystem uintptr FpMethods uintptr -} /* sqlite3.c:40295:16 */ +} /* sqlite3.c:40304:16 */ var aMap = [6]Mapping{ {FzFilesystem: ts + 3647, FpMethods: 0}, @@ -38151,11 +38151,11 @@ var aMap = [6]Mapping{ {FzFilesystem: ts + 3661, FpMethods: 0}, {FzFilesystem: ts + 3667, FpMethods: 0}, {}, -} /* sqlite3.c:40298:5 */ -var autolockIoFinder uintptr = 0 /* sqlite3.c:40345:3 */ +} /* sqlite3.c:40307:5 */ +var autolockIoFinder uintptr = 0 /* sqlite3.c:40354:3 */ // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -38165,7 +38165,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -38227,7 +38227,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -38249,7 +38249,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename rc = findInodeInfo(tls, pNew, pNew+16) if rc != SQLITE_OK { Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext) - robust_close(tls, pNew, h, 40505) + robust_close(tls, pNew, h, 40514) h = -1 } unixLeaveMutex(tls) @@ -38273,7 +38273,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -38291,17 +38291,17 @@ var azTempDirs = [6]uintptr{ ts + 3706, ts + 3715, ts + 1540, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3720) azTempDirs[1] = libc.Xgetenv(tls, ts+3734) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -38328,7 +38328,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -38372,7 +38372,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -38423,7 +38423,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -38459,7 +38459,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -38533,7 +38533,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(2696) defer tls.Free(2696) @@ -38737,7 +38737,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3205, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3205, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -38797,7 +38797,7 @@ __25: goto __26 } storeLastErrno(tls, p, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - robust_close(tls, p, fd, 41047) + robust_close(tls, p, fd, 41056) return SQLITE_IOERR | int32(13)<<8 __26: ; @@ -38904,7 +38904,7 @@ __40: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38915,7 +38915,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__error(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41141) } return rc } @@ -38925,9 +38925,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3811, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3811, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -38944,7 +38944,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -38966,7 +38966,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -38989,7 +38989,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -39000,7 +39000,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3223, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3223, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -39009,7 +39009,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3609, libc.VaList(bp, zPath)) @@ -39060,7 +39060,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -39086,7 +39086,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__error(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3403, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3403, zIn, 41322) } } else { bLink = libc.Bool32(int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&S_IFMT == S_IFLNK) @@ -39100,20 +39100,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3394, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3394, zIn, 41340) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.X__builtin___memmove_chk(tls, zDel+uintptr(n), zDel, uint64(nByte+1), libc.X__builtin_object_size(tls, zDel+uintptr(n), 0)) libc.X__builtin___memcpy_chk(tls, zDel, zIn, uint64(n), libc.X__builtin_object_size(tls, zDel, 0)) @@ -39398,7 +39398,7 @@ type Dl_info = dl_info /* dlfcn.h:57:3 */ // Special handle arguments for dlsym(). -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -39408,7 +39408,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -39422,7 +39422,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -39448,13 +39448,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -39489,7 +39489,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -39502,7 +39502,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -39525,7 +39525,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -39539,12 +39539,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -39560,7 +39560,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -39735,7 +39735,7 @@ type proxyLockingContext = struct { FnFails int32 FoldLockingContext uintptr FpOldMethod uintptr -} /* sqlite3.c:41740:9 */ +} /* sqlite3.c:41749:9 */ // // End of sqlite3_vfs methods *************************** @@ -39895,12 +39895,12 @@ type proxyLockingContext = struct { // The proxyLockingContext has the path and file structures for the remote // and local proxy files in it -type ProxyLockingContext = proxyLockingContext /* sqlite3.c:41740:36 */ +type ProxyLockingContext = proxyLockingContext /* sqlite3.c:41749:36 */ // The proxy lock file path for the database at dbPath is written into lPath, // which must point to valid, writable memory large enough for a maxLen length // file path. -func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_t) int32 { /* sqlite3.c:41758:12: */ +func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_t) int32 { /* sqlite3.c:41767:12: */ var len int32 var dbLen int32 var i int32 @@ -39936,7 +39936,7 @@ func proxyGetLockPath(tls *libc.TLS, dbPath uintptr, lPath uintptr, maxLen Size_ } // Creates the lock file and any missing directories in lockPath -func proxyCreateLockPath(tls *libc.TLS, lockPath uintptr) int32 { /* sqlite3.c:41799:12: */ +func proxyCreateLockPath(tls *libc.TLS, lockPath uintptr) int32 { /* sqlite3.c:41808:12: */ bp := tls.Alloc(1024) defer tls.Free(1024) @@ -39976,7 +39976,7 @@ func proxyCreateLockPath(tls *libc.TLS, lockPath uintptr) int32 { /* sqlite3.c:4 // // The caller is responsible not only for closing the file descriptor // but also for freeing the memory associated with the file descriptor. -func proxyCreateUnixFile(tls *libc.TLS, path uintptr, ppFile uintptr, islockfile int32) int32 { /* sqlite3.c:41839:12: */ +func proxyCreateUnixFile(tls *libc.TLS, path uintptr, ppFile uintptr, islockfile int32) int32 { /* sqlite3.c:41848:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -40064,7 +40064,7 @@ __11: __12: return SQLITE_IOERR | int32(15)<<8 // even though it is the conch __13: - return Xsqlite3CantopenError(tls, 41891) + return Xsqlite3CantopenError(tls, 41900) __10: ; __8: @@ -40096,7 +40096,7 @@ __14: __15: ; end_create_proxy: - robust_close(tls, pNew, fd, 41915) + robust_close(tls, pNew, fd, 41924) Xsqlite3_free(tls, pNew) Xsqlite3_free(tls, pUnused) return rc @@ -40104,7 +40104,7 @@ end_create_proxy: // get the host ID via gethostuuid(), pHostID must point to PROXY_HOSTIDLEN // bytes of writable memory. -func proxyGetHostID(tls *libc.TLS, pHostID uintptr, pError uintptr) int32 { /* sqlite3.c:41936:12: */ +func proxyGetHostID(tls *libc.TLS, pHostID uintptr, pError uintptr) int32 { /* sqlite3.c:41945:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40130,7 +40130,7 @@ func proxyGetHostID(tls *libc.TLS, pHostID uintptr, pError uintptr) int32 { /* s // it back. The newly created file's file descriptor is assigned to the // conch file structure and finally the original conch file descriptor is // closed. Returns zero if successful. -func proxyBreakConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr) int32 { /* sqlite3.c:41976:12: */ +func proxyBreakConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr) int32 { /* sqlite3.c:41985:12: */ bp := tls.Alloc(2193) defer tls.Free(2193) @@ -40200,7 +40200,7 @@ __5: ; rc = 0 libc.Xfprintf(tls, libc.X__stderrp, ts+4017, libc.VaList(bp+40, cPath)) - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 42018) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(conchFile)).Fh, 42027) (*UnixFile)(unsafe.Pointer(conchFile)).Fh = fd (*UnixFile)(unsafe.Pointer(conchFile)).FopenFlags = O_RDWR | O_CREAT @@ -40212,7 +40212,7 @@ end_breaklock: goto __7 } (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, bp+64) - robust_close(tls, pFile, fd, 42026) + robust_close(tls, pFile, fd, 42035) __7: ; libc.Xfprintf(tls, libc.X__stderrp, ts+4041, libc.VaList(bp+48, cPath, bp+1088)) @@ -40223,7 +40223,7 @@ __6: // Take the requested lock on the conch file and break a stale lock if the // host id matches. -func proxyConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr, lockType int32) int32 { /* sqlite3.c:42036:12: */ +func proxyConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr, lockType int32) int32 { /* sqlite3.c:42045:12: */ bp := tls.Alloc(1201) defer tls.Free(1201) @@ -40307,7 +40307,7 @@ func proxyConchLock(tls *libc.TLS, pFile uintptr, myHostID uintptr, lockType int // lockPath means that the lockPath in the conch file will be used if the // host IDs match, or a new lock path will be generated automatically // and written to the conch file. -func proxyTakeConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42114:12: */ +func proxyTakeConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42123:12: */ bp := tls.Alloc(3272) defer tls.Free(3272) @@ -40537,7 +40537,7 @@ end_takeconch: if !((*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0) { goto __29 } - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 42279) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 42288) __29: ; (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 @@ -40549,7 +40549,7 @@ __29: (*UnixFile)(unsafe.Pointer(pFile)).Fh = fd goto __31 __30: - rc = Xsqlite3CantopenError(tls, 42287) // SQLITE_BUSY? proxyTakeConch called + rc = Xsqlite3CantopenError(tls, 42296) // SQLITE_BUSY? proxyTakeConch called // during locking __31: ; @@ -40631,7 +40631,7 @@ __2: } // If pFile holds a lock on a conch file, then release that lock. -func proxyReleaseConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42336:12: */ +func proxyReleaseConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42345:12: */ var rc int32 = SQLITE_OK // Subroutine return code var pCtx uintptr // The locking context for the proxy lock var conchFile uintptr // Name of the conch file @@ -40658,7 +40658,7 @@ func proxyReleaseConch(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:42336: // space is eventually freed. // // *pConchPath is set to NULL if a memory allocation error occurs. -func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) int32 { /* sqlite3.c:42366:12: */ +func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) int32 { /* sqlite3.c:42375:12: */ var i int32 // Loop counter var len int32 = int32(libc.Xstrlen(tls, dbPath)) // Length of database filename - dbPath var conchPath uintptr // buffer in which to construct conch name @@ -40692,7 +40692,7 @@ func proxyCreateConchPathname(tls *libc.TLS, dbPath uintptr, pConchPath uintptr) // Takes a fully configured proxy locking-style unix file and switches // the local lock file path -func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42403:12: */ +func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42412:12: */ var pCtx uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var oldPath uintptr = (*ProxyLockingContext)(unsafe.Pointer(pCtx)).FlockProxyPath var rc int32 = SQLITE_OK @@ -40729,7 +40729,7 @@ func switchLockProxyPath(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* // // This routine find the filename associated with pFile and writes it // int dbPath. -func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int32 { /* sqlite3.c:42439:12: */ +func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int32 { /* sqlite3.c:42448:12: */ if (*UnixFile)(unsafe.Pointer(pFile)).FpMethod == uintptr(unsafe.Pointer(&afpIoMethods)) { // afp style keeps a reference to the db path in the filePath field // of the struct @@ -40755,7 +40755,7 @@ func proxyGetDbPathForUnixFile(tls *libc.TLS, pFile uintptr, dbPath uintptr) int // the unix structure properly cleaned up at close time: // ->lockingContext // ->pMethod -func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42470:12: */ +func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { /* sqlite3.c:42479:12: */ bp := tls.Alloc(3344) defer tls.Free(3344) @@ -40841,7 +40841,7 @@ func proxyTransformUnixFile(tls *libc.TLS, pFile uintptr, path uintptr) int32 { // This routine handles sqlite3_file_control() calls that are specific // to proxy locking. -func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:42557:12: */ +func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:42566:12: */ switch op { case SQLITE_FCNTL_GET_LOCKPROXYFILE: { @@ -40911,7 +40911,7 @@ func proxyFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func proxyCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:42630:12: */ +func proxyCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:42639:12: */ var pFile uintptr = id var rc int32 = proxyTakeConch(tls, pFile) if rc == SQLITE_OK { @@ -40950,7 +40950,7 @@ func proxyCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func proxyLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42669:12: */ +func proxyLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42678:12: */ var pFile uintptr = id var rc int32 = proxyTakeConch(tls, pFile) if rc == SQLITE_OK { @@ -40973,7 +40973,7 @@ func proxyLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func proxyUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42693:12: */ +func proxyUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:42702:12: */ var pFile uintptr = id var rc int32 = proxyTakeConch(tls, pFile) if rc == SQLITE_OK { @@ -40992,7 +40992,7 @@ func proxyUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. } // Close a file that uses proxy locks. -func proxyClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:42712:12: */ +func proxyClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:42721:12: */ if id != 0 { var pFile uintptr = id var pCtx uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext @@ -41065,7 +41065,7 @@ func proxyClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:42712:12: */ // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -41108,14 +41108,14 @@ var aVfs = [9]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 4160, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 4169, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 4178, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -41157,15 +41157,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -41179,9 +41179,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -41191,13 +41191,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -41214,7 +41214,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -41230,21 +41230,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -41282,7 +41282,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -41299,7 +41299,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -41321,7 +41321,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -41352,7 +41352,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -41367,14 +41367,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -41383,7 +41383,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -41427,7 +41427,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -41456,13 +41456,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -41476,7 +41476,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -41487,7 +41487,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -41562,7 +41562,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -41573,7 +41573,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41583,7 +41583,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -41592,21 +41592,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -41614,7 +41614,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -41622,19 +41622,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -41642,7 +41642,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41665,7 +41665,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41756,7 +41756,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -41851,7 +41851,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -41873,7 +41873,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -41886,7 +41886,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -41915,7 +41915,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -41929,7 +41929,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -42066,7 +42066,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -42105,7 +42105,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -42120,7 +42120,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -42157,7 +42157,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42320,7 +42320,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -42382,7 +42382,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -42394,7 +42394,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -42419,7 +42419,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -42432,7 +42432,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -42440,7 +42440,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -42454,7 +42454,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(PCache{})), libc.X__builtin_object_size(tls, p, 0)) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -42471,7 +42471,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -42518,7 +42518,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -42546,7 +42546,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -42597,7 +42597,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -42617,7 +42617,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -42633,7 +42633,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -42646,7 +42646,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -42655,7 +42655,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -42668,7 +42668,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -42683,7 +42683,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -42695,7 +42695,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -42704,7 +42704,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -42714,7 +42714,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -42723,7 +42723,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -42742,7 +42742,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -42776,19 +42776,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -42827,7 +42827,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -42870,7 +42870,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -42882,17 +42882,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -42900,7 +42900,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -42912,7 +42912,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -42929,20 +42929,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -43057,7 +43057,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -43143,7 +43143,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -43153,12 +43153,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -43166,9 +43166,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -43185,10 +43185,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -43206,7 +43206,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -43239,7 +43239,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -43284,7 +43284,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -43317,7 +43317,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -43347,7 +43347,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -43361,7 +43361,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -43399,7 +43399,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -43416,13 +43416,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -43440,7 +43440,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -43456,7 +43456,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -43497,7 +43497,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -43514,7 +43514,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -43532,7 +43532,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -43553,7 +43553,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -43601,7 +43601,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.X__builtin___memset_chk(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g)), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0)) @@ -43639,7 +43639,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.X__builtin___memset_chk(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g)), libc.X__builtin_object_size(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0)) @@ -43648,7 +43648,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -43698,7 +43698,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -43721,7 +43721,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -43736,7 +43736,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -43751,7 +43751,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -43869,7 +43869,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -43898,7 +43898,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -43909,7 +43909,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -43923,7 +43923,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -43948,7 +43948,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -43979,7 +43979,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -43992,7 +43992,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -44015,7 +44015,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44035,16 +44035,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -44055,7 +44055,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -44153,7 +44153,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -44166,13 +44166,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -44192,7 +44192,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -44211,7 +44211,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -44222,7 +44222,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -44245,7 +44245,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -44275,7 +44275,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -44310,7 +44310,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -44346,7 +44346,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44377,7 +44377,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -44408,7 +44408,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -44441,7 +44441,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -44474,7 +44474,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -44659,7 +44659,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -45428,7 +45428,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -45461,11 +45461,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -45488,7 +45488,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -45510,7 +45510,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45527,7 +45527,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45544,7 +45544,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -45571,7 +45571,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -45605,7 +45605,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -45639,7 +45639,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -45698,7 +45698,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -45727,7 +45727,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45762,7 +45762,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -45777,7 +45777,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -45886,7 +45886,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -45996,7 +45996,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -46056,21 +46056,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -46087,7 +46087,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -46116,7 +46116,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -46208,7 +46208,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -46233,7 +46233,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -46297,7 +46297,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -46424,7 +46424,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -46456,7 +46456,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -46501,7 +46501,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46735,7 +46735,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -46901,7 +46901,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -46936,7 +46936,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -46968,7 +46968,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -47036,7 +47036,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -47171,39 +47171,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -47212,25 +47218,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -47239,10 +47245,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -47260,7 +47266,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -47269,24 +47275,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -47294,14 +47300,14 @@ __25: libc.X__builtin___memset_chk(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4), libc.X__builtin_object_size(tls, zSuper+libc.UintptrFromInt32(-4), 0)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+4248, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -47321,7 +47327,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47375,7 +47381,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -47402,7 +47408,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -47433,7 +47439,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -47464,7 +47470,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -47512,7 +47518,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47543,7 +47549,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47597,7 +47603,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47665,7 +47671,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47774,18 +47780,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47801,13 +47807,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -47860,7 +47866,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -47924,7 +47930,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -47952,7 +47958,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -47989,7 +47995,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48058,7 +48064,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -48067,7 +48073,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -48098,7 +48104,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.X__builtin___memset_chk(tls, pDest, 0, uint64(N), libc.X__builtin_object_size(tls, pDest, 0)) @@ -48121,7 +48127,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -48138,7 +48144,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -48183,7 +48189,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -48210,7 +48216,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -48229,7 +48235,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -48259,7 +48265,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -48269,7 +48275,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -48282,7 +48288,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -48320,7 +48326,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -48369,7 +48375,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -48406,7 +48412,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -48520,7 +48526,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -48552,7 +48558,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48632,7 +48638,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -48656,7 +48662,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -48687,7 +48693,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -48713,7 +48719,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -48775,7 +48781,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -48822,7 +48828,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -48948,7 +48954,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -49267,7 +49273,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -49305,7 +49311,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -49416,7 +49422,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -49542,7 +49548,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -49691,7 +49697,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -49753,7 +49759,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49766,7 +49772,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -49812,7 +49818,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -49884,7 +49890,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -49904,7 +49910,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -49942,7 +49948,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -49951,7 +49957,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -49967,7 +49973,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -49988,7 +49994,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -50000,13 +50006,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -50035,7 +50041,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -50117,7 +50123,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -50177,7 +50183,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -50227,7 +50233,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -50301,7 +50307,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -50389,7 +50395,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -50430,7 +50436,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -50460,7 +50466,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -50530,7 +50536,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -50553,7 +50559,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -50589,7 +50595,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -50779,7 +50785,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -50836,7 +50842,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -50880,13 +50886,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -50895,7 +50901,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -50908,7 +50914,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -50918,7 +50924,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -50930,7 +50936,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -50970,7 +50976,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -51008,7 +51014,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -51069,30 +51075,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -51100,7 +51106,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -51127,7 +51133,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -51189,7 +51195,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -51249,21 +51255,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -51275,7 +51281,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -51301,7 +51307,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -51371,14 +51377,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -51393,7 +51399,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -51405,12 +51411,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -51422,7 +51428,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -51450,13 +51456,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -51466,7 +51472,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -51483,7 +51489,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -51519,7 +51525,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -51549,7 +51555,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -51589,7 +51595,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -51600,7 +51606,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -51612,7 +51618,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -51632,7 +51638,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -51644,7 +51650,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -52223,7 +52229,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -52235,18 +52241,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -52254,7 +52260,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -52276,7 +52282,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -52307,7 +52313,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -52352,7 +52358,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -52360,13 +52366,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -52384,7 +52390,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -52416,7 +52422,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -52431,7 +52437,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -52455,7 +52461,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -52478,7 +52484,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -52520,7 +52526,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -52531,7 +52537,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -52540,7 +52546,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -52551,7 +52557,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -52563,12 +52569,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -52580,12 +52586,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -52599,7 +52605,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -52622,14 +52628,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -52647,7 +52653,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -52690,7 +52696,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -52731,7 +52737,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -52750,7 +52756,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -52865,7 +52871,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -53069,7 +53075,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -53095,7 +53101,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -53167,7 +53173,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -53181,7 +53187,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -53228,7 +53234,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -53274,7 +53280,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -53320,10 +53326,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -53338,7 +53344,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53422,7 +53428,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -53434,7 +53440,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -53453,7 +53459,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -53504,7 +53510,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -53635,7 +53641,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -53796,7 +53802,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53815,7 +53821,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -53887,7 +53893,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -53956,7 +53962,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54036,7 +54042,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -54081,7 +54087,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -54347,7 +54353,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -54564,7 +54570,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -54638,7 +54644,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -54726,7 +54732,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -54740,7 +54746,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -54807,7 +54813,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -54823,7 +54829,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -54840,7 +54846,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -54858,7 +54864,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -54890,7 +54896,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -54910,7 +54916,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -54947,7 +54953,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -54959,7 +54965,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -54990,7 +54996,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55044,12 +55050,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -55057,7 +55063,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -55079,7 +55085,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -55104,7 +55110,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -55158,7 +55164,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -55391,7 +55397,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55456,7 +55462,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -55500,7 +55506,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -55531,7 +55537,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -55565,14 +55571,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -55591,16 +55597,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -55630,7 +55636,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -55646,13 +55652,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -56173,7 +56179,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -56182,7 +56188,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -56191,7 +56197,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -56301,7 +56307,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -56397,7 +56403,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -56411,7 +56417,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -56420,7 +56426,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -56441,7 +56447,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -56469,7 +56475,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -56500,7 +56506,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -56523,7 +56529,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -56538,13 +56544,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -56556,7 +56562,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -56567,11 +56573,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -56594,7 +56600,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4387)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4387)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -56620,14 +56626,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 4387)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -56644,7 +56650,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -56701,7 +56707,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -56752,7 +56758,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -56787,7 +56793,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -56811,7 +56817,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -56830,7 +56836,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -56877,7 +56883,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -56897,20 +56903,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -56932,7 +56938,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -56969,7 +56975,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -57010,7 +57016,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -57031,7 +57037,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -57050,7 +57056,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -57060,7 +57066,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -57073,7 +57079,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -57090,7 +57096,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -57130,7 +57136,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -57138,12 +57144,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -57156,7 +57162,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -57178,7 +57184,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -57190,7 +57196,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -57215,7 +57221,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57238,7 +57244,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -57257,7 +57263,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -57265,7 +57271,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -57296,7 +57302,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57317,7 +57323,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -57327,7 +57333,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -57345,7 +57351,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -57372,7 +57378,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -57402,7 +57408,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -57412,7 +57418,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57489,7 +57495,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -57520,7 +57526,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell) + 1))))), pInfo) @@ -57536,7 +57542,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -57577,7 +57583,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -57594,7 +57600,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -57611,7 +57617,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -57629,7 +57635,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -57674,7 +57680,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -57684,7 +57690,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -57697,7 +57703,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -57706,14 +57712,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.X__builtin___memmove_chk(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz)), libc.X__builtin_object_size(tls, data+uintptr(iFree+sz+sz2), 0)) @@ -57723,7 +57729,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -57785,7 +57791,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -57796,7 +57802,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -57831,7 +57837,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -57856,7 +57862,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -57885,7 +57891,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -57900,14 +57906,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -57923,7 +57929,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -57948,7 +57954,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -57963,7 +57969,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -58014,7 +58020,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -58038,12 +58044,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -58054,11 +58060,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -58071,7 +58077,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -58079,7 +58085,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -58089,10 +58095,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -58126,7 +58132,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -58177,7 +58183,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -58185,7 +58191,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -58217,12 +58223,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -58234,11 +58240,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -58249,7 +58255,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -58257,7 +58263,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -58279,14 +58285,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -58299,7 +58305,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -58308,21 +58314,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -58340,7 +58346,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -58363,7 +58369,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -58375,7 +58381,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -58402,7 +58408,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58420,7 +58426,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -58432,11 +58438,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -58452,7 +58458,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58462,7 +58468,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -58493,7 +58499,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -58517,18 +58523,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -58540,13 +58546,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -58561,7 +58567,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -58581,7 +58587,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -58606,7 +58612,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -59027,7 +59033,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -59059,7 +59065,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -59092,7 +59098,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -59101,7 +59107,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -59151,7 +59157,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -59168,7 +59174,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -59180,7 +59186,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -59195,7 +59201,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -59222,7 +59228,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -59256,7 +59262,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -59269,7 +59275,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -59283,7 +59289,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -59299,7 +59305,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -59323,7 +59329,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -59343,7 +59349,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -59376,7 +59382,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -59401,7 +59407,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -59570,7 +59576,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -59647,7 +59653,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -59660,7 +59666,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -59700,7 +59706,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -59742,7 +59748,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -60006,7 +60012,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60058,14 +60064,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -60093,7 +60099,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -60110,7 +60116,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -60125,7 +60131,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60136,7 +60142,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -60206,7 +60212,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -60228,7 +60234,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -60303,7 +60309,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -60327,7 +60333,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -60341,7 +60347,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -60362,7 +60368,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -60385,7 +60391,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -60416,7 +60422,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -60466,7 +60472,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -60489,7 +60495,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -60545,7 +60551,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -60574,7 +60580,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -60609,7 +60615,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -60638,7 +60644,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60660,7 +60666,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60726,7 +60732,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -60750,7 +60756,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -60818,7 +60824,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -60831,7 +60837,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -60869,7 +60875,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -60877,7 +60883,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -60892,7 +60898,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -60902,13 +60908,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(uintptr(0)+32), libc.X__builtin_object_size(tls, p, 0)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -60949,7 +60955,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -60958,7 +60964,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -60967,26 +60973,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -60999,7 +61005,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -61016,7 +61022,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -61038,7 +61044,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61106,7 +61112,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -61148,7 +61154,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61159,7 +61165,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -61170,7 +61176,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -61227,7 +61233,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -61287,7 +61293,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -61307,7 +61313,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -61315,7 +61321,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -61328,7 +61334,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -61355,7 +61361,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -61386,7 +61392,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -61397,11 +61403,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -61418,7 +61424,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -61448,7 +61454,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -61527,7 +61533,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -61548,7 +61554,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -61570,7 +61576,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -61591,7 +61597,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -61612,7 +61618,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -61631,7 +61637,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -61680,7 +61686,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -61795,7 +61801,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -61924,7 +61930,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -62028,7 +62034,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -62077,7 +62083,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -62144,7 +62150,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -62154,7 +62160,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -62193,7 +62199,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -62230,7 +62236,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -62263,7 +62269,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -62303,7 +62309,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -62357,7 +62363,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -62391,7 +62397,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -62458,7 +62464,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -62539,7 +62545,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -62581,7 +62587,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -62626,7 +62632,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -62740,7 +62746,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -62915,7 +62921,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -62936,7 +62942,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -63006,7 +63012,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -63023,7 +63029,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -63104,14 +63110,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -63123,7 +63129,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -63138,7 +63144,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -63158,7 +63164,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -63190,7 +63196,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -63372,7 +63378,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -63390,7 +63396,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -63426,7 +63432,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63587,7 +63593,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -63664,11 +63670,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -63685,7 +63691,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -63693,7 +63699,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -63712,7 +63718,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -63743,12 +63749,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -63756,7 +63762,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.X__builtin___memmove_chk(tls, pData, pCell, uint64(sz), libc.X__builtin_object_size(tls, pData, 0)) @@ -63806,7 +63812,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63844,7 +63850,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.X__builtin___memmove_chk(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz), libc.X__builtin_object_size(tls, pSlot, 0)) @@ -63871,7 +63877,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -63923,7 +63929,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63957,7 +63963,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.X__builtin___memmove_chk(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2), libc.X__builtin_object_size(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, 0)) @@ -64097,7 +64103,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -64110,7 +64116,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -64208,7 +64214,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -64288,7 +64294,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -64590,7 +64596,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -64618,7 +64624,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -64797,7 +64803,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -64871,7 +64877,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -64944,7 +64950,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -64981,7 +64987,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -65065,7 +65071,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -65318,7 +65324,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -65540,7 +65546,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -65589,13 +65595,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -65609,7 +65615,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -65728,7 +65734,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -65770,7 +65776,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -65784,7 +65790,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -65808,7 +65814,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -65855,7 +65861,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -65927,7 +65933,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -66055,7 +66061,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -66118,7 +66124,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -66166,13 +66172,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.X__builtin___memcpy_chk(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */))), libc.X__builtin_object_size(tls, oldCell, 0)) @@ -66280,7 +66286,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -66307,7 +66313,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -66330,7 +66336,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -66412,7 +66418,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -66440,11 +66446,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -66553,7 +66559,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -66630,7 +66636,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -66660,7 +66666,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -66703,7 +66709,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -66766,7 +66772,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -66776,7 +66782,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -66792,7 +66798,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -66806,7 +66812,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -66910,7 +66916,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -66933,7 +66939,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -66955,7 +66961,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -66965,7 +66971,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -67037,7 +67043,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -67063,7 +67069,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -67082,7 +67088,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -67108,7 +67114,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -67171,12 +67177,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -67203,13 +67209,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -67220,7 +67226,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -67242,7 +67248,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -67269,7 +67275,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -67353,7 +67359,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -67365,7 +67371,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -67404,7 +67410,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -67793,7 +67799,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -68027,7 +68033,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -68038,14 +68044,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -68059,7 +68065,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -68075,7 +68081,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -68098,7 +68104,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -68112,7 +68118,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -68125,7 +68131,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -68149,7 +68155,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -68189,7 +68195,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -68197,7 +68203,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -68229,29 +68235,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -68291,7 +68297,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -68323,7 +68329,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -68333,7 +68339,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+5208, 0) return SQLITE_ERROR @@ -68347,7 +68353,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -68407,14 +68413,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -68476,7 +68482,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -68491,7 +68497,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -68501,7 +68507,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -68739,7 +68745,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -68797,13 +68803,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -68817,7 +68823,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -68838,7 +68844,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -68853,7 +68859,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -68867,7 +68873,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -68961,7 +68967,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -68994,7 +69000,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -69014,7 +69020,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -69070,7 +69076,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -69088,7 +69094,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -69103,7 +69109,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -69128,7 +69134,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -69150,7 +69156,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -69172,7 +69178,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -69198,7 +69204,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -69228,7 +69234,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -69250,7 +69256,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -69269,7 +69275,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -69288,7 +69294,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -69298,7 +69304,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -69310,8 +69316,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -69322,7 +69328,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -69331,7 +69337,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -69352,7 +69358,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -69362,7 +69368,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -69380,7 +69386,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -69393,7 +69399,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -69414,7 +69420,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -69423,7 +69429,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -69438,7 +69444,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -69455,7 +69461,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -69482,7 +69488,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -69536,7 +69542,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -69553,7 +69559,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -69561,13 +69567,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -69582,7 +69588,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -69590,7 +69596,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -69600,14 +69606,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -69627,7 +69634,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -69640,7 +69647,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -69657,7 +69664,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -69673,13 +69680,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -69695,7 +69702,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -69717,7 +69724,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.X__builtin___memcpy_chk(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{})), libc.X__builtin_object_size(tls, pTo, 0)) @@ -69738,7 +69745,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -69851,11 +69858,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -69870,7 +69877,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -69895,7 +69902,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -69940,7 +69947,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -69956,7 +69963,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -69973,7 +69980,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -69984,7 +69991,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -70040,7 +70047,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -70186,7 +70193,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -70434,7 +70441,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -70457,7 +70464,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -70525,7 +70532,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -70570,7 +70577,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -70580,7 +70587,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -70601,7 +70608,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -70616,14 +70623,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -70639,7 +70646,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -70654,14 +70661,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -70672,14 +70679,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -70699,7 +70706,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -70723,12 +70730,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -70738,7 +70745,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -70751,7 +70758,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -70782,7 +70789,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -70835,7 +70842,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -70844,7 +70851,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -70867,26 +70874,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -70899,7 +70906,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -70947,7 +70954,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -70961,7 +70968,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -70993,7 +71000,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.X__builtin___memcpy_chk(tls, p4copy, zP4, uint64(8), libc.X__builtin_object_size(tls, p4copy, 0)) @@ -71003,7 +71010,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -71019,7 +71026,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -71043,7 +71050,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -71054,7 +71061,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -71065,7 +71072,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -71076,7 +71083,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -71111,14 +71118,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) @@ -71130,7 +71137,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -71143,12 +71150,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } @@ -71171,7 +71178,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -71303,7 +71310,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -71334,7 +71341,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -71350,7 +71357,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -71394,23 +71401,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -71419,7 +71426,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -71434,7 +71441,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -71445,26 +71452,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -71525,7 +71532,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -71540,18 +71547,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -71567,7 +71574,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -71591,7 +71598,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -71608,7 +71615,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -71655,7 +71662,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -71671,7 +71678,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -71692,7 +71699,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -71706,11 +71713,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -71873,7 +71880,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 5362, ts + 5364, ts + 5366, ts + 5371} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 5362, ts + 5364, ts + 5366, ts + 5371} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -71881,7 +71888,7 @@ var encnames = [4]uintptr{ts + 5362, ts + 5364, ts + 5366, ts + 5371} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -71908,7 +71915,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -71927,7 +71934,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -71942,7 +71949,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -71950,7 +71957,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -71960,7 +71967,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -72004,7 +72011,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -72016,7 +72023,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -72115,7 +72122,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -72144,7 +72151,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -72233,7 +72240,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -72248,7 +72255,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -72265,7 +72272,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -72298,7 +72305,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -72407,11 +72414,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 5376, ts + 5381, ts + 5388, ts + 5391, ts + 5394, ts + 5397, ts + 5400, ts + 5403, ts + 5411, ts + 5414, ts + 5421, ts + 5429, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -72445,7 +72452,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -72461,7 +72468,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -72485,7 +72492,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -72516,7 +72523,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -72541,7 +72548,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -72560,7 +72567,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -72788,7 +72795,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -72806,7 +72813,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -72849,7 +72856,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -72864,7 +72871,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -72887,7 +72894,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -73091,7 +73098,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -73101,7 +73108,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -73130,7 +73137,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73182,7 +73189,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -73206,7 +73213,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -73231,7 +73238,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -73252,7 +73259,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -73275,7 +73282,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -73288,7 +73295,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -73300,7 +73307,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -73318,7 +73325,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -73337,7 +73344,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -73412,10 +73419,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -73425,7 +73432,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -73474,7 +73481,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73525,7 +73532,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73552,7 +73559,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -73655,7 +73662,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -73669,7 +73676,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -73687,7 +73694,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73748,7 +73755,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -73791,7 +73798,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -73804,7 +73811,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -73844,7 +73851,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -73890,7 +73897,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -73984,7 +73991,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -74047,7 +74054,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -74089,7 +74096,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -74154,7 +74161,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -74189,7 +74196,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -74250,7 +74257,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -74261,7 +74268,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -74366,7 +74373,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -74390,7 +74397,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -74428,7 +74435,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -74482,7 +74489,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -74567,7 +74574,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -74579,7 +74586,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -74595,7 +74602,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -74609,7 +74616,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -74617,7 +74624,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } @@ -74637,7 +74644,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) @@ -74645,12 +74652,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -74660,7 +74667,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -74680,7 +74687,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -74696,7 +74703,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -74727,7 +74734,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -74743,7 +74750,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -74760,7 +74767,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -74812,7 +74819,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -74838,7 +74845,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } @@ -74846,7 +74853,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5603, 0) return 1 @@ -74856,7 +74863,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5648, 0) return 1 @@ -74868,7 +74875,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -74901,7 +74908,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -74911,7 +74918,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -74931,7 +74938,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -74953,7 +74960,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -74975,7 +74982,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -74998,27 +75005,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -75028,7 +75035,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -75041,26 +75048,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -75129,20 +75136,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -75168,7 +75175,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -75183,7 +75190,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -75197,7 +75204,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -75210,12 +75217,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -75224,39 +75231,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -75264,19 +75271,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -75288,32 +75295,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -75323,7 +75330,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -75337,7 +75344,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5688, int64(-1), @@ -75345,7 +75352,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -75355,7 +75362,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -75365,7 +75372,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -75392,7 +75399,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -75559,14 +75566,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75606,7 +75613,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -75619,7 +75626,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -75636,14 +75643,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -75701,13 +75708,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -75716,7 +75723,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75739,7 +75746,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -75759,7 +75766,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -75777,7 +75784,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -75800,7 +75807,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -75880,13 +75887,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -75896,7 +75903,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -75905,19 +75912,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -75952,7 +75959,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -75969,7 +75976,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -75979,43 +75986,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -76025,13 +76032,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -76051,7 +76058,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -76083,11 +76090,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -76096,44 +76103,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -76150,13 +76157,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -76164,7 +76171,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5721, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -76198,7 +76205,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -76224,16 +76231,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -76244,11 +76251,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -76259,7 +76266,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -76269,7 +76276,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -76282,11 +76289,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -76294,11 +76301,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -76347,7 +76354,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -76358,7 +76365,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -76375,7 +76382,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -76387,7 +76394,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -76398,19 +76405,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -76433,7 +76440,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -76454,7 +76461,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -76463,7 +76470,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } @@ -76472,7 +76479,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } @@ -76480,7 +76487,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -76489,7 +76496,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -76502,7 +76509,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76528,7 +76535,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -76543,7 +76550,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -76558,7 +76565,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -76571,7 +76578,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -76585,7 +76592,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -76677,7 +76684,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -76696,7 +76703,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -76708,7 +76715,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -76720,7 +76727,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -76734,7 +76741,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -76875,7 +76882,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76920,7 +76927,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -77143,7 +77150,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -77214,7 +77221,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -77236,7 +77243,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77282,7 +77289,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -77314,7 +77321,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -77326,7 +77333,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -77334,7 +77341,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77370,7 +77377,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -77384,13 +77391,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -77406,7 +77413,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -77430,7 +77437,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -77440,11 +77447,11 @@ var azTypes = [5]uintptr{ ts + 1105, ts + 1083, ts + 1528, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -79556,6 +79563,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -82580,7 +82591,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -82616,10 +82647,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -82627,13 +82658,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -82642,14 +82673,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -82657,12 +82688,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -82677,7 +82708,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -82695,13 +82726,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -82718,38 +82749,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.X__builtin___memset_chk(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{})), libc.X__builtin_object_size(tls, bp+248, 0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -82759,27 +82790,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -82788,63 +82819,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -82852,55 +82883,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.X__builtin___memcpy_chk(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len), libc.X__builtin_object_size(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, 0)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -82915,20 +82946,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -82938,15 +82969,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -82981,81 +83012,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -83063,45 +83094,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -83126,14 +83157,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -83141,30 +83172,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -83228,31 +83259,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -83281,13 +83312,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -83297,77 +83328,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -83376,79 +83407,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -83457,22 +83488,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -83481,37 +83512,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -83526,7 +83557,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -83539,13 +83570,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -83564,20 +83595,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -83598,17 +83629,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5888, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -83619,16 +83650,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.X__builtin___memcpy_chk(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1), libc.X__builtin_object_size(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, 0)) @@ -83636,14 +83667,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -83651,121 +83682,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5939, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5961, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -83778,36 +83784,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -83815,48 +83846,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -83877,18 +83908,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -83896,43 +83927,43 @@ __519: ts+6015, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -83948,7 +83979,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -83990,66 +84021,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -84057,16 +84088,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -84086,20 +84117,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -84146,37 +84177,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -84266,13 +84297,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -84281,11 +84312,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -84297,24 +84328,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -84326,32 +84357,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -84371,10 +84402,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -84393,10 +84424,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -84451,7 +84482,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -84459,11 +84490,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1527 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -84472,71 +84503,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -84555,19 +84586,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -84582,10 +84613,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -84609,10 +84640,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -84737,7 +84768,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -84747,10 +84778,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -84759,29 +84790,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -84792,53 +84823,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -84863,97 +84894,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -85011,10 +85042,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -85023,60 +85054,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -85099,18 +85130,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -85122,10 +85153,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -85220,10 +85251,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; // Fall through into OP_NotFound /* no break */ @@ -85238,15 +85269,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -85256,62 +85287,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -85319,31 +85350,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -85397,7 +85428,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -85407,14 +85438,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; // Fall through into OP_NotExists /* no break */ @@ -85437,25 +85468,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -85513,89 +85544,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -85604,36 +85635,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -85688,56 +85719,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -85749,13 +85780,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -85766,13 +85797,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -85785,7 +85816,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -85811,10 +85842,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -85864,28 +85895,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -85897,13 +85928,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -85912,28 +85943,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -85973,16 +86004,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -86005,10 +86036,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -86058,29 +86089,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -86101,20 +86132,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -86125,36 +86156,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -86163,6 +86194,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -86170,11 +86205,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -86207,39 +86242,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -86255,29 +86290,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -86324,32 +86359,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -86432,18 +86467,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -86483,10 +86518,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -86496,10 +86531,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -86516,10 +86551,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -86542,17 +86577,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -86583,31 +86618,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+6230) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+6230) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -86654,25 +86689,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -86684,17 +86719,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -86708,16 +86743,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -86771,15 +86806,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -86793,19 +86828,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -86813,22 +86848,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -86864,13 +86899,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -86878,21 +86913,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -86918,23 +86953,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -86950,21 +86985,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -86985,10 +87020,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -87002,10 +87037,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -87026,15 +87061,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 6247 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -87046,11 +87081,11 @@ __751: ts+6261, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -87060,38 +87095,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -87104,10 +87139,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -87179,22 +87214,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -87212,15 +87247,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -87239,18 +87274,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -87285,35 +87320,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -87348,37 +87383,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+6304, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -87386,7 +87421,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -87395,10 +87430,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -87406,10 +87441,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -87431,24 +87466,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -87499,21 +87534,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -87530,25 +87565,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -87564,35 +87599,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -87609,11 +87644,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -87646,7 +87681,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -87656,10 +87691,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -87674,16 +87709,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -87696,17 +87731,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -87753,10 +87788,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -87786,75 +87821,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -87890,32 +87925,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -87937,32 +87972,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -87985,17 +88020,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -88005,18 +88040,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -88028,11 +88063,11 @@ __830: return ts + 6398 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -88040,29 +88075,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -88070,18 +88105,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -88091,10 +88126,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -88116,10 +88151,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -88135,17 +88170,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -88167,13 +88202,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -88216,25 +88251,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+6405, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -88250,16 +88285,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -88279,17 +88314,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -88303,10 +88338,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -88321,11 +88356,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -88333,10 +88368,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -88345,18 +88380,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -88374,10 +88409,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -88422,27 +88457,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -88450,10 +88485,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -88477,11 +88512,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -88490,40 +88525,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -88537,10 +88572,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -88555,21 +88590,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -88587,27 +88622,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -88641,43 +88676,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -88686,41 +88721,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -88745,16 +88780,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -88814,24 +88849,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -88842,38 +88877,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -88912,16 +88947,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -88971,67 +89006,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6434, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -89076,25 +89111,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3609, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -89103,46 +89138,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -89173,11 +89208,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6472, ts + 6481, ts + 6488, - ts + 6494} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6494} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -89208,7 +89243,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -89229,7 +89264,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -89246,7 +89281,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89322,7 +89357,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -89643,7 +89678,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -89652,11 +89687,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -89675,14 +89710,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -89741,14 +89776,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -89758,7 +89793,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -89774,7 +89809,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -89783,7 +89818,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -89970,7 +90005,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -90121,7 +90156,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -90135,10 +90170,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -90149,18 +90184,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -90173,26 +90208,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -90202,10 +90237,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -90236,11 +90271,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -90257,7 +90292,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90361,7 +90396,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90401,7 +90436,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -90416,7 +90451,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -90457,7 +90492,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90503,7 +90538,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90526,7 +90561,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -90546,7 +90581,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -90558,7 +90593,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90608,7 +90643,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -90668,7 +90703,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -90687,7 +90722,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -90783,7 +90818,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -90794,7 +90829,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -90814,7 +90849,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90833,14 +90868,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -90866,7 +90901,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -90891,7 +90926,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -90903,7 +90938,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -90920,7 +90955,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -90949,7 +90984,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -90968,7 +91003,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -90988,7 +91023,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -91012,7 +91047,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -91025,7 +91060,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -91064,7 +91099,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -91082,7 +91117,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -91139,7 +91174,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{})), libc.X__builtin_object_size(tls, p, 0)) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -91154,7 +91189,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -91183,7 +91218,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -91199,7 +91234,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -91222,7 +91257,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -91277,7 +91312,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -91353,7 +91388,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -91364,7 +91399,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -91428,7 +91463,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -91544,7 +91579,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -91590,7 +91625,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -91598,7 +91633,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -91621,7 +91656,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -91655,7 +91690,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -91682,7 +91717,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -91690,7 +91725,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -91750,7 +91785,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -91820,7 +91855,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -91877,7 +91912,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -91893,7 +91928,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -91920,7 +91955,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -91957,7 +91992,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -91973,7 +92008,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92024,7 +92059,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -92105,7 +92140,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92180,7 +92215,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -92225,7 +92260,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92267,7 +92302,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -92286,7 +92321,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92321,7 +92356,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92413,7 +92448,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -92460,23 +92495,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -92523,7 +92558,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -92533,7 +92568,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -92571,7 +92606,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -92637,7 +92672,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -92665,7 +92700,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -92675,14 +92710,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -92697,7 +92732,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -92709,7 +92744,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -92737,20 +92772,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -92779,7 +92814,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -92827,7 +92862,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -92869,7 +92904,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -92878,7 +92913,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -92907,7 +92942,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -92917,7 +92952,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -92959,7 +92994,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -93008,7 +93043,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -93039,13 +93074,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -93057,7 +93092,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -93065,7 +93100,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -93100,14 +93135,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -93140,7 +93175,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -93186,7 +93221,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -93203,7 +93238,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { @@ -93229,7 +93264,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -93248,7 +93283,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -93298,7 +93333,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -94013,7 +94048,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -94062,7 +94097,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -94084,7 +94119,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94110,7 +94145,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -94592,7 +94627,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -94627,7 +94662,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -94671,7 +94706,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -94694,7 +94729,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -94831,7 +94866,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94877,7 +94912,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -94888,7 +94923,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -94920,7 +94955,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -94997,7 +95032,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -95296,7 +95331,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -95337,7 +95372,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -95394,7 +95429,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -95428,7 +95463,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -95464,7 +95499,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -95485,7 +95520,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -95528,7 +95563,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -95540,7 +95575,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -95551,7 +95586,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -95562,7 +95597,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -95587,7 +95622,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -95659,7 +95694,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -95669,7 +95704,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -95678,7 +95713,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -95703,7 +95738,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -95721,7 +95756,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -95734,7 +95769,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -95750,7 +95785,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -95773,7 +95808,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -95783,7 +95818,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -95810,7 +95845,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -95818,7 +95853,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -95848,7 +95883,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -95882,7 +95917,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -95930,7 +95965,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -95954,7 +95989,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -95983,7 +96018,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -96071,7 +96106,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96093,7 +96128,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -96101,7 +96136,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -96110,7 +96145,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -96130,7 +96165,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96157,7 +96192,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -96167,7 +96202,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96194,7 +96229,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96242,7 +96277,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96257,7 +96292,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -96280,7 +96315,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -96298,7 +96333,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -96326,7 +96361,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -96378,7 +96413,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -96397,7 +96432,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96434,7 +96469,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96466,7 +96501,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96534,7 +96569,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -96564,7 +96599,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -96578,13 +96613,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -96596,7 +96631,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -96638,7 +96673,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -96660,7 +96695,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -96679,7 +96714,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -96696,7 +96731,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96806,7 +96841,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -96828,7 +96863,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -96838,14 +96873,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -96878,7 +96913,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -96886,7 +96921,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -96955,7 +96990,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -97008,7 +97043,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -97037,7 +97072,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97103,9 +97138,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -97122,7 +97157,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -97141,7 +97176,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -97164,7 +97199,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -97261,7 +97296,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -97288,7 +97323,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -97314,7 +97349,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -97329,7 +97364,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97341,7 +97376,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -97353,7 +97388,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -97361,7 +97396,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -97378,7 +97413,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -97390,7 +97425,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+7049) == 0 { return U32(EP_IsTrue) } @@ -97403,7 +97438,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -97417,7 +97452,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -97434,7 +97469,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -97480,7 +97515,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -97558,7 +97593,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -97582,7 +97617,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -97597,7 +97632,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -97605,12 +97640,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -97652,7 +97687,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -97688,7 +97723,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -97697,7 +97732,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -97749,7 +97784,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -97788,7 +97823,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -97841,7 +97876,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7995) == 0 { return 1 } @@ -97859,7 +97894,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -97917,7 +97952,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -97929,7 +97964,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -98018,7 +98053,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -98236,7 +98271,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -98268,7 +98303,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -98287,7 +98322,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -98315,7 +98350,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -98510,7 +98545,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -98633,7 +98668,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -98670,7 +98705,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -99051,7 +99086,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99071,7 +99106,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -99117,7 +99152,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -99132,7 +99167,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -99151,7 +99186,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99202,7 +99237,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -99216,14 +99251,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -99242,7 +99277,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -99266,7 +99301,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -99274,7 +99309,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -99399,7 +99434,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -100470,7 +100505,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8414)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8414)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -100487,7 +100522,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8414)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -100556,7 +100591,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -100581,7 +100616,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -100602,7 +100637,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -100615,7 +100650,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -100641,7 +100676,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -100723,7 +100758,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -100786,7 +100821,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101018,7 +101053,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101268,7 +101303,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -101288,7 +101323,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101342,7 +101377,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -101446,7 +101481,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -101473,7 +101508,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -101484,7 +101519,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -101612,7 +101647,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -101635,7 +101670,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -101745,7 +101780,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -101779,7 +101814,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -101797,7 +101832,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -101822,7 +101857,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -101860,7 +101895,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -101876,7 +101911,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -101916,7 +101951,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -101965,7 +102000,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -101998,7 +102033,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.X__builtin___memset_chk(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{})), libc.X__builtin_object_size(tls, pWalker, 0)) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -102011,7 +102046,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102028,7 +102063,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102046,7 +102081,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -102237,7 +102272,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -102263,7 +102298,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -102288,7 +102323,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -102297,7 +102332,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -102307,7 +102342,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -102325,7 +102360,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -102343,7 +102378,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -102377,7 +102412,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102396,7 +102431,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -102420,7 +102455,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -102436,7 +102471,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -102449,7 +102484,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -102634,7 +102669,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102649,7 +102684,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -102795,7 +102830,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102912,7 +102947,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102940,7 +102975,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -103069,7 +103104,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -103081,7 +103116,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -103100,7 +103135,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -103112,7 +103147,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -103123,7 +103158,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -103164,7 +103199,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -103174,7 +103209,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -103206,7 +103241,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -103228,7 +103263,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -103251,7 +103286,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -103267,7 +103302,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -103290,7 +103325,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -103306,7 +103341,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -103328,7 +103363,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -103350,7 +103385,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -103374,7 +103409,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -103391,7 +103426,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -103405,34 +103440,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+11210, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -103446,7 +103479,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -103466,7 +103499,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+11210, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+11218, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -103516,7 +103549,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.X__builtin___memcpy_chk(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn), libc.X__builtin_object_size(tls, zBuf1, 0)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+11216, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+11224, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 11208 /* " " */ @@ -103551,7 +103584,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -103649,7 +103682,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -103678,7 +103711,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -103717,7 +103750,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -104060,7 +104093,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -104071,7 +104104,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -104111,7 +104144,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -104245,7 +104278,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -104278,7 +104311,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -104392,7 +104425,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -104464,7 +104497,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -104504,7 +104537,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -104530,7 +104563,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+11221, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+11229, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -104550,7 +104583,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -104628,10 +104661,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+11228, + Xsqlite3ErrorMsg(tls, pParse, ts+11236, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 11256 /* "PRIMARY KEY" */ + return ts + 11264 /* "PRIMARY KEY" */ } return ts + 6481 /* "UNIQUE" */ }(), @@ -104644,7 +104677,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+11268, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+11276, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -104664,11 +104697,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+11316, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+11324, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11437, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11445, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -104783,16 +104816,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11455}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11476}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11496}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11515}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11534}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11463}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11484}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11504}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11523}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11542}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -104948,7 +104981,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -104989,7 +105022,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11557, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11565, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -105001,10 +105034,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11580, + ts+11588, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11610, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11618, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -105025,10 +105058,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11628 /* "sqlite_stat1" */, FzCols: ts + 11641 /* "tbl,idx,stat" */}, - {FzName: ts + 11654 /* "sqlite_stat4" */, FzCols: ts + 11667 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11695 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11636 /* "sqlite_stat1" */, FzCols: ts + 11649 /* "tbl,idx,stat" */}, + {FzName: ts + 11662 /* "sqlite_stat4" */, FzCols: ts + 11675 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11703 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -105055,14 +105088,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -105073,12 +105106,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -105087,7 +105120,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -105102,7 +105135,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -105112,7 +105145,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -105127,7 +105160,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -105162,7 +105195,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -105257,7 +105290,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11708} /* sqlite3.c:111534:22 */ + FzName: ts + 11716} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -105268,7 +105301,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -105290,7 +105323,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -105308,7 +105341,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -105451,7 +105484,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -105503,7 +105536,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -105575,7 +105608,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11718} /* sqlite3.c:111824:22 */ + FzName: ts + 11726} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -105594,7 +105627,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -105628,7 +105661,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11728, + Xsqlite3_str_appendf(tls, bp+24, ts+11736, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -105638,7 +105671,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11733, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11741, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -105681,7 +105714,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11739, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11747, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -105695,9 +105728,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11745} /* sqlite3.c:111958:22 */ + FzName: ts + 11753} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -105706,7 +105739,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -105742,7 +105775,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11754, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11762, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -105760,7 +105793,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.X__builtin___memcpy_chk(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11628, uint64(13), libc.X__builtin_object_size(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, 0)) + libc.X__builtin___memcpy_chk(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11636, uint64(13), libc.X__builtin_object_size(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, 0)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -105993,7 +106026,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11764, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11772, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -106055,7 +106088,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11764, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11772, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -106066,7 +106099,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -106074,7 +106107,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -106099,7 +106132,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -106108,9 +106141,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11768) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11776) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11772) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11780) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -106126,7 +106159,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -106189,16 +106222,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -106227,15 +106260,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11776, z) == 0 { + if Xsqlite3_strglob(tls, ts+11784, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11787, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11795, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11797, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11805, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -106257,7 +106290,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -106319,7 +106352,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -106336,7 +106369,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -106394,7 +106427,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -106415,7 +106448,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -106551,15 +106584,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11654, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11662, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11809, - ts+11863, + ts+11817, + ts+11871, zDb) } return rc @@ -106583,7 +106616,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -106611,10 +106644,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11628, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11636, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11915, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11923, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -106690,7 +106723,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -106704,7 +106737,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6735, zName) == 0) } @@ -106722,7 +106755,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -106789,7 +106822,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11956, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11964, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -106802,7 +106835,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11959, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11967, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -106816,7 +106849,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11996, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12004, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -106887,7 +106920,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12026, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12034, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -106904,7 +106937,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+12055, 0) + ts+12063, 0) rc = SQLITE_ERROR __23: ; @@ -106980,7 +107013,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12123, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12131, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -107015,7 +107048,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -107068,14 +107101,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12151, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12159, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12172, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12180, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -107083,7 +107116,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12198, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+12206, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -107120,7 +107153,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -107199,7 +107232,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -107207,12 +107240,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 12220} /* sqlite3.c:113383:24 */ + FzName: ts + 12228} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -107220,10 +107253,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 12234} /* sqlite3.c:113403:24 */ + FzName: ts + 12242} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -107235,7 +107268,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+12248, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+12256, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -107243,7 +107276,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -107268,7 +107301,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+12272, + ts+12280, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -107304,7 +107337,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -107340,7 +107373,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -107355,15 +107388,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -107453,7 +107486,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -107466,8 +107499,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+12318, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+12326, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -107478,7 +107511,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -107493,11 +107526,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+12341, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+12349, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+12347, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12355, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+12353, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12361, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -107512,7 +107545,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -107561,7 +107594,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -107583,7 +107616,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+12380, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12388, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -107595,7 +107628,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -107604,7 +107637,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -107619,7 +107652,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -107653,7 +107686,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -107665,7 +107698,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -107689,7 +107722,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -107842,7 +107875,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -107893,7 +107926,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -107917,14 +107950,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8422, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12395+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12414+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12403+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12422+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6247+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12428) + ts+12436) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12414+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12422+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+6247) } @@ -107950,11 +107983,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8422, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12414+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12422+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+6247) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12395+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12403+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12428) + ts+12436) } } } @@ -107969,7 +108002,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -107990,7 +108023,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12447, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12455, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -108009,9 +108042,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12455 /* "no such view" */ + zMsg = ts + 12463 /* "no such view" */ } else { - zMsg = ts + 12468 /* "no such table" */ + zMsg = ts + 12476 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6930, libc.VaList(bp, zMsg, zDbase, zName)) @@ -108032,7 +108065,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -108046,13 +108079,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8422, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6247+7) == 0 { - return ts + 12414 /* "sqlite_schema" */ + return ts + 12422 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12428+7) == 0 { - return ts + 12395 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12436+7) == 0 { + return ts + 12403 /* "sqlite_temp_sche..." */ } } return zName @@ -108068,7 +108101,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -108095,7 +108128,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -108111,7 +108144,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -108143,7 +108176,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -108169,7 +108202,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -108190,7 +108223,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -108212,14 +108245,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -108242,7 +108275,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -108259,7 +108292,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -108278,7 +108311,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -108297,7 +108330,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -108347,7 +108380,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -108384,7 +108417,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -108397,7 +108430,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -108419,7 +108452,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -108432,7 +108465,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+6247) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -108445,7 +108478,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -108481,7 +108514,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -108505,7 +108538,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -108514,13 +108547,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12482, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12490, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12499, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12507, libc.VaList(bp, pName1)) return -1 } } else { @@ -108532,7 +108565,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -108546,7 +108579,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -108567,7 +108600,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8422, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12519, + Xsqlite3ErrorMsg(tls, pParse, ts+12527, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -108577,7 +108610,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -108588,7 +108621,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -108608,7 +108641,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -108655,7 +108688,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -108685,7 +108718,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -108708,7 +108741,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -108736,7 +108769,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 /* "sqlite_temp_mast..." */ + return ts + 12436 /* "sqlite_temp_mast..." */ } return ts + 6247 /* "sqlite_master" */ }()) @@ -108756,7 +108789,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12561, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12569, 0) return __4: ; @@ -108803,7 +108836,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }(), uintptr(0), zDb) != 0) { @@ -108843,7 +108876,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12602, + Xsqlite3ErrorMsg(tls, pParse, ts+12610, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10779 /* "view" */ @@ -108863,7 +108896,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12623, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12631, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -108966,8 +108999,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -108977,10 +109010,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12658, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12666, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -108999,12 +109032,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12675, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12683, 0) } else { } @@ -109025,7 +109058,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12658 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12666 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -109037,7 +109070,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12658, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12666, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -109049,7 +109082,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -109071,7 +109104,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12709, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12717, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -109083,13 +109116,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12732, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12740, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12739, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12747, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -109129,7 +109162,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12749, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12757, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -109168,7 +109201,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -109215,7 +109248,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -109289,7 +109322,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -109301,11 +109334,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12775, + Xsqlite3ErrorMsg(tls, pParse, ts+12783, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12820, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12828, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -109342,7 +109375,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -109351,12 +109384,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12861, 0) + ts+12869, 0) } } @@ -109376,7 +109409,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109401,7 +109434,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12913, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12921, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -109490,7 +109523,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12954, 0) + ts+12962, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -109507,7 +109540,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -109537,7 +109570,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -109572,7 +109605,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109592,7 +109625,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+13010, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13018, 0) goto generated_done __2: ; @@ -109605,13 +109638,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13053, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+13061, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13061, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+13069, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -109644,7 +109677,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+13068, + Xsqlite3ErrorMsg(tls, pParse, ts+13076, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -109667,7 +109700,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -109681,7 +109714,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -109716,7 +109749,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -109752,7 +109785,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -109787,12 +109820,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1527 /* "" */ - zSep2 = ts + 13099 /* "," */ + zSep2 = ts + 13107 /* "," */ zEnd = ts + 5311 /* ")" */ } else { - zSep = ts + 13101 /* "\n " */ - zSep2 = ts + 13105 /* ",\n " */ - zEnd = ts + 13110 /* "\n)" */ + zSep = ts + 13109 /* "\n " */ + zSep2 = ts + 13113 /* ",\n " */ + zEnd = ts + 13118 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -109800,7 +109833,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+13113, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+13121, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -109840,15 +109873,15 @@ __6: var azType1 = [5]uintptr{ ts + 1527, - ts + 13127, - ts + 13133, - ts + 13138, - ts + 13143, -} /* sqlite3.c:115999:23 */ + ts + 13135, + ts + 13141, + ts + 13146, + ts + 13151, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -109877,7 +109910,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -109906,7 +109939,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -109926,7 +109959,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -109946,7 +109979,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -109979,7 +110012,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -110018,7 +110051,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -110181,7 +110214,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -110214,7 +110247,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -110258,7 +110291,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -110295,7 +110328,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -110351,10 +110384,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+13149, + ts+13157, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+13182, + Xsqlite3ErrorMsg(tls, pParse, ts+13190, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -110374,11 +110407,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+13209, 0) + ts+13217, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+13259, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13267, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -110422,7 +110455,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13291, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13299, 0) return } } @@ -110456,11 +110489,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 9164 /* "table" */ - zType2 = ts + 13335 /* "TABLE" */ + zType2 = ts + 13343 /* "TABLE" */ } else { // A view zType = ts + 10779 /* "view" */ - zType2 = ts + 13341 /* "VIEW" */ + zType2 = ts + 13349 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -110485,6 +110518,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -110541,7 +110579,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+13346, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13354, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -110549,7 +110587,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+13361, + ts+13369, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -110567,14 +110605,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13459, + ts+13467, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13501, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13509, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -110611,7 +110649,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -110632,7 +110670,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13535, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13543, 0) goto create_view_fail __1: ; @@ -110729,7 +110767,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -110769,7 +110807,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13579, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -110844,7 +110882,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -110874,7 +110912,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -110900,14 +110938,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13609, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -110921,7 +110959,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13616, + ts+13624, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -110930,7 +110968,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -110976,7 +111014,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -110985,17 +111023,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13683, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13691, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11580, + ts+11588, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -111028,7 +111066,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13697, + ts+13705, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -111040,7 +111078,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13742, + ts+13750, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -111059,7 +111097,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -111070,7 +111108,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8422, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3230, 4) == 0 { return 0 @@ -111091,7 +111129,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -111159,7 +111197,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }() @@ -111221,7 +111259,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13817, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -111231,14 +111269,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13837, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13871, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13879, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -111253,7 +111291,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11772, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11780, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -111279,7 +111317,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -111318,7 +111356,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13903, + ts+13911, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -111331,7 +111369,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13966, 0) + ts+13974, 0) goto fk_end goto __7 __6: @@ -111416,7 +111454,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+14060, + ts+14068, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -111502,7 +111540,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -111527,7 +111565,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -111639,7 +111677,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -111664,7 +111702,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -111673,12 +111711,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+14106, + Xsqlite3ErrorMsg(tls, pParse, ts+14114, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 14134 /* "FIRST" */ + return ts + 14142 /* "FIRST" */ } - return ts + 14140 /* "LAST" */ + return ts + 14148 /* "LAST" */ }())) return 1 } @@ -111697,7 +111735,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -111837,7 +111875,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14145, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+14153, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -111858,7 +111896,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+14151, + ts+14159, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -111890,21 +111928,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+14201, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14209, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+14229, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14237, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+14254, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14262, 0) goto exit_create_index __17: ; @@ -111931,7 +111969,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14145, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+14153, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -111946,7 +111984,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+14288, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14296, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -111958,7 +111996,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+14322, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14330, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -111987,7 +112025,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+14346, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14354, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -112016,7 +112054,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }(), uintptr(0), zDb) != 0) { @@ -112062,7 +112100,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14145) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+14153) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -112180,7 +112218,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14369, 0) + ts+14377, 0) goto exit_create_index __56: ; @@ -112410,7 +112448,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14430, libc.VaList(bp+48, 0)) + ts+14438, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -112466,8 +112504,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14472, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14480, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -112524,12 +112562,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14489, + zStmt = Xsqlite3MPrintf(tls, db, ts+14497, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1527 /* "" */ } - return ts + 14509 /* " UNIQUE" */ + return ts + 14517 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -112541,7 +112579,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14517, + ts+14525, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -112557,7 +112595,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14576, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14584, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -112653,7 +112691,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -112697,11 +112735,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -112736,7 +112774,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14603, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14611, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -112751,7 +112789,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14621, libc.VaList(bp+8, 0)) + ts+14629, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -112762,7 +112800,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }() @@ -112792,9 +112830,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14694, + ts+14702, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11768, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11776, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -112820,7 +112858,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -112847,7 +112885,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -112878,7 +112916,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -112892,7 +112930,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -112930,7 +112968,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -112945,7 +112983,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14754, + Xsqlite3ErrorMsg(tls, pParse, ts+14762, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -113012,7 +113050,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -113051,7 +113089,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -113083,7 +113121,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -113146,7 +113184,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113157,12 +113195,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14790, + Xsqlite3ErrorMsg(tls, pParse, ts+14798, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14826 /* "ON" */ + return ts + 14834 /* "ON" */ } - return ts + 14829 /* "USING" */ + return ts + 14837 /* "USING" */ }())) goto append_from_error __1: @@ -113210,7 +113248,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -113232,7 +113270,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -113249,7 +113287,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -113273,7 +113311,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -113284,14 +113322,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14835, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14843, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -113319,7 +113357,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -113327,9 +113365,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14841 + return ts + 14849 } - return ts + 14850 + return ts + 14858 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -113341,7 +113379,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -113354,11 +113392,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14835, ts + 14857, ts + 14841} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14843, ts + 14865, ts + 14849} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113370,7 +113408,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14865, 0) + ts+14873, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -113384,13 +113422,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12341, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12349, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14949, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14957, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -113559,7 +113597,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -113574,7 +113612,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -113591,7 +113629,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -113633,7 +113671,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113693,14 +113731,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14958, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14966, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -113746,7 +113784,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -113766,7 +113804,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -113774,7 +113812,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -113784,7 +113822,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113803,7 +113841,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+15004, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15012, libc.VaList(bp, zName)) } } } @@ -113827,7 +113865,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -113857,7 +113895,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -113888,7 +113926,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -113903,7 +113941,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -113914,7 +113952,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -113938,7 +113976,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -113983,7 +114021,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -113999,7 +114037,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -114019,7 +114057,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114041,7 +114079,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+15034, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15042, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -114065,7 +114103,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -114106,7 +114144,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -114142,7 +114180,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -114154,7 +114192,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -114192,7 +114230,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -114272,7 +114310,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -114307,7 +114345,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -114354,7 +114392,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -114372,7 +114410,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -114393,7 +114431,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -114412,16 +114450,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+15065, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15073, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+15094, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15102, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -114430,7 +114468,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -114462,7 +114500,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -115013,7 +115051,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15132) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15140) __61: ; @@ -115068,7 +115106,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -115158,7 +115196,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11628) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11636) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -115205,7 +115243,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115294,7 +115332,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -115350,7 +115388,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -115378,7 +115416,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -115388,14 +115426,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -115425,7 +115463,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -115436,18 +115474,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6545, ts + 6540, ts + 8295, ts + 8290, ts + 6535} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6545, ts + 6540, ts + 8295, ts + 8290, ts + 6535} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -115496,7 +115534,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -115508,7 +115546,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+15145, -1) + Xsqlite3_result_error(tls, context, ts+15153, -1) return } iVal = -iVal @@ -115550,7 +115588,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -115665,7 +115703,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -115702,7 +115740,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -115810,7 +115848,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -115848,7 +115886,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+15162, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+15170, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -115864,7 +115902,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -115881,7 +115919,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -115902,7 +115940,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -115931,7 +115969,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115955,7 +115993,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -115973,7 +116011,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -115988,7 +116026,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -115997,7 +116035,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -116012,20 +116050,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -116065,7 +116103,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -116251,13 +116289,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -116275,7 +116313,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -116298,7 +116336,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+15167, -1) + Xsqlite3_result_error(tls, context, ts+15175, -1) return } if argc == 3 { @@ -116310,7 +116348,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+15200, -1) + ts+15208, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -116338,7 +116376,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -116348,7 +116386,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -116359,7 +116397,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -116370,7 +116408,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -116382,7 +116420,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -116397,7 +116435,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -116412,11 +116450,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -116438,7 +116476,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+15245, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+15253, libc.VaList(bp+8, r1)) } } break @@ -116475,7 +116513,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+15252, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+15260, libc.VaList(bp+24, zArg)) break } @@ -116497,7 +116535,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116520,7 +116558,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -116534,7 +116572,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -116572,7 +116610,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -116610,7 +116648,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -116629,7 +116667,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -116718,7 +116756,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -116821,8 +116859,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 11208 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 11208 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -116831,7 +116869,7 @@ var azOne = [1]uintptr{uintptr(ts + 11208 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -116869,7 +116907,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+15255, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+15263, 4, uintptr(0)) } } @@ -116882,10 +116920,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -116897,7 +116935,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12380, -1) + Xsqlite3_result_error(tls, context, ts+12388, -1) return } @@ -116921,11 +116959,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -116935,7 +116973,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -116957,7 +116995,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -116980,12 +117018,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+15145, -1) + Xsqlite3_result_error(tls, context, ts+15153, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -116994,7 +117032,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -117002,7 +117040,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -117016,14 +117054,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -117037,7 +117075,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -117048,7 +117086,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -117058,7 +117096,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -117096,7 +117134,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -117109,11 +117147,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -117129,9 +117167,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -117196,7 +117234,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -117237,7 +117275,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -117245,7 +117283,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -117263,8 +117301,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+15260, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+15268, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -117274,7 +117312,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -117284,14 +117322,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+15266, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15274, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+15266, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+15274, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15266, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15266, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15274, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+15274, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -117309,7 +117347,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -117365,7 +117403,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -117394,11 +117432,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -117408,7 +117446,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -117465,18 +117503,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846264338327950288) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846264338327950288) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -117497,7 +117535,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -117523,13 +117561,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846264338327950288) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -117557,7 +117595,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -117568,109 +117606,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 15271}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 15291}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 15304}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 15322}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 15279}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 15299}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 15312}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 15330}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15331}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15339}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15339}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15354}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15380}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15405}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15414}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15425}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15446}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15446}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15452}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15452}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15458}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15458}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15463}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15463}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15463}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15467}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15467}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15467}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15471}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15478}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15486}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15499}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15506}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15513}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15526}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15530}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15530}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15536}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15542}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15548}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15552}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15559}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15566}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15584}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15599}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15616}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15627}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15633}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15651}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15339}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15347}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15347}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15362}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15388}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15413}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15422}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15433}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15440}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15454}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15454}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15460}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15460}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15466}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15466}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15471}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15471}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15471}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15475}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15479}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15486}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15494}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15501}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15514}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15521}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15529}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15534}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15544}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15550}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15556}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15560}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15567}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15574}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15585}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15592}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15607}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15624}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15635}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15641}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15659}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15673}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15681}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15690}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15690}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15697}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15697}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15707}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15711}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15717}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15721}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15721}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15727}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15727}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15667}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15681}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15689}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15698}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15698}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15705}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15705}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15715}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15719}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15725}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15729}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15729}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15735}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15735}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15740}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15266}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15266}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15745}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15745}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15754}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15759}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15748}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15274}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15274}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15753}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15753}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15762}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15767}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15773}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15779}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15782}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15786}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15792}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15782}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15797}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15801}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15805}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15811}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15815}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15820}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15825}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15830}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15836}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15840}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15775}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15781}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15787}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15790}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15800}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15790}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15805}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15809}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15813}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15819}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15823}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15828}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15833}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15838}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15844}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15848}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15853}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15858}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15863}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15869}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15875}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15881}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15886}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15852}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15856}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15861}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15866}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15871}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15877}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15883}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15889}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15894}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15902}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15905}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15745}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15910}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15902}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15910}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15913}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15753}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15918}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -117845,7 +117883,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -117956,7 +117994,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15914, + ts+15922, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -117991,7 +118029,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -118121,7 +118159,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -118148,7 +118186,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -118189,7 +118227,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -118313,7 +118351,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -118323,7 +118361,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -118337,7 +118375,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -118370,7 +118408,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -118433,7 +118471,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -118457,7 +118495,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -118481,7 +118519,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -118516,7 +118554,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -118718,7 +118756,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -118777,7 +118815,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -118845,7 +118883,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -119048,7 +119086,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -119069,7 +119107,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -119129,7 +119167,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -119171,7 +119209,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -119250,7 +119288,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -119308,7 +119346,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -119344,7 +119382,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -119357,7 +119395,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -119470,7 +119508,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -119524,7 +119562,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -119564,7 +119602,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -119578,7 +119616,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -119586,7 +119624,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -119597,7 +119635,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -119628,16 +119666,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -119738,7 +119776,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -119920,7 +119958,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -120010,7 +120051,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15959, + ts+15967, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -120035,7 +120076,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+16000, + Xsqlite3ErrorMsg(tls, pParse, ts+16008, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -120207,7 +120248,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+16032, + ts+16040, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -120217,7 +120258,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+16084, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+16092, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -120273,7 +120314,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+16109, + Xsqlite3ErrorMsg(tls, pParse, ts+16117, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -120281,7 +120322,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+16155, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+16163, 0) goto insert_cleanup __57: ; @@ -120765,7 +120806,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16176) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+16184) __123: ; @@ -120789,7 +120830,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -120816,7 +120857,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120850,7 +120891,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -120861,7 +120902,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -120869,12 +120910,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -120887,7 +120928,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -120993,7 +121034,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -121111,7 +121152,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12341, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12349, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -121856,7 +121897,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -121873,7 +121914,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -121976,7 +122017,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -122054,7 +122095,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -122112,7 +122153,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -122133,18 +122174,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -122498,7 +122533,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -122519,7 +122554,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -122708,7 +122743,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -123042,7 +123077,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -123056,7 +123091,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -123100,7 +123135,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12380, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12388, 0) __3: ; return SQLITE_ERROR @@ -123110,7 +123145,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 16190 /* "sqlite3_extensio..." */ + zEntry = ts + 16198 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -123130,7 +123165,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+12341, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+12349, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -123176,7 +123211,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16213, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry, ts+16221, uint64(8), libc.X__builtin_object_size(tls, zAltEntry, 0)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -123190,7 +123225,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16222, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+16230, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -123214,7 +123249,7 @@ __17: goto __18 __18: ; - libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16226, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) + libc.X__builtin___memcpy_chk(tls, zAltEntry+uintptr(iEntry), ts+16234, uint64(6), libc.X__builtin_object_size(tls, zAltEntry+uintptr(iEntry), 0)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -123232,7 +123267,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+16232, libc.VaList(bp+16, zEntry, zFile)) + ts+16240, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -123259,7 +123294,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16275, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+16283, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -123299,7 +123334,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+16307, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+16315, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -123309,10 +123344,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 16344, -} /* sqlite3.c:129386:21 */ + ts + 16352, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -123323,7 +123358,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -123334,7 +123369,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -123354,15 +123389,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -123372,7 +123407,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -123413,7 +123448,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -123432,7 +123467,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -123447,7 +123482,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -123478,7 +123513,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+16350, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+16358, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -123524,67 +123559,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5411, - ts + 16389, + ts + 16397, ts + 9164, - ts + 16393, - ts + 16398, ts + 16401, - ts + 16411, - ts + 16421, - ts + 16427, - ts + 16431, - ts + 16436, - ts + 16441, + ts + 16406, + ts + 16409, + ts + 16419, + ts + 16429, + ts + 16435, + ts + 16439, + ts + 16444, ts + 16449, - ts + 16460, - ts + 16463, + ts + 16457, + ts + 16468, + ts + 16471, - ts + 16470, - ts + 16431, - ts + 16436, - ts + 16477, - ts + 16482, + ts + 16478, + ts + 16439, + ts + 16444, ts + 16485, - ts + 16492, - ts + 16427, - ts + 16431, - ts + 16498, - ts + 16503, - ts + 16508, - ts + 16431, - ts + 16512, - ts + 16436, + ts + 16490, + ts + 16493, + ts + 16500, + ts + 16435, + ts + 16439, + ts + 16506, + ts + 16511, + ts + 16516, + ts + 16439, ts + 16520, - ts + 16524, - ts + 16529, - ts + 11772, - ts + 11768, - ts + 16535, - ts + 16540, - ts + 16545, - ts + 16389, - ts + 16431, - ts + 16550, - ts + 16557, - ts + 16564, - ts + 9164, + ts + 16444, + ts + 16528, + ts + 16532, + ts + 16537, + ts + 11780, + ts + 11776, + ts + 16543, + ts + 16548, + ts + 16553, + ts + 16397, + ts + 16439, + ts + 16558, + ts + 16565, ts + 16572, + ts + 9164, + ts + 16580, ts + 5414, - ts + 16578, + ts + 16586, - ts + 16389, - ts + 16431, - ts + 16583, - ts + 16588, - ts + 15782, - ts + 16593, + ts + 16397, + ts + 16439, + ts + 16591, + ts + 16596, + ts + 15790, + ts + 16601, - ts + 16606, - ts + 16615, - ts + 16622, + ts + 16614, + ts + 16623, + ts + 16630, - ts + 16633, -} /* sqlite3.c:129831:19 */ + ts + 16641, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -123595,250 +123630,250 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [67]PragmaName{ - { /* zName: */ FzName: ts + 16641, + { /* zName: */ FzName: ts + 16649, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16656, + { /* zName: */ FzName: ts + 16664, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16671, + { /* zName: */ FzName: ts + 16679, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16683, + { /* zName: */ FzName: ts + 16691, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16699, + { /* zName: */ FzName: ts + 16707, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16712, + { /* zName: */ FzName: ts + 16720, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16724, + { /* zName: */ FzName: ts + 16732, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16744, + { /* zName: */ FzName: ts + 16752, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16760, + { /* zName: */ FzName: ts + 16768, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16781, + { /* zName: */ FzName: ts + 16789, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16796, + { /* zName: */ FzName: ts + 16804, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16812, + { /* zName: */ FzName: ts + 16820, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16826, + { /* zName: */ FzName: ts + 16834, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16839, + { /* zName: */ FzName: ts + 16847, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16853, + { /* zName: */ FzName: ts + 16861, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16872, + { /* zName: */ FzName: ts + 16880, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16891, + { /* zName: */ FzName: ts + 16899, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16914, + { /* zName: */ FzName: ts + 16922, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16923, + { /* zName: */ FzName: ts + 16931, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16941, + { /* zName: */ FzName: ts + 16949, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16958, + { /* zName: */ FzName: ts + 16966, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16971, + { /* zName: */ FzName: ts + 16979, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16986, + { /* zName: */ FzName: ts + 16994, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 17004, + { /* zName: */ FzName: ts + 17012, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 17014, + { /* zName: */ FzName: ts + 17022, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17028, + { /* zName: */ FzName: ts + 17036, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17044, + { /* zName: */ FzName: ts + 17052, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 17069, + { /* zName: */ FzName: ts + 17077, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17088, + { /* zName: */ FzName: ts + 17096, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17099, + { /* zName: */ FzName: ts + 17107, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 17110, + { /* zName: */ FzName: ts + 17118, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17122, + { /* zName: */ FzName: ts + 17130, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 17138, + { /* zName: */ FzName: ts + 17146, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17151, + { /* zName: */ FzName: ts + 17159, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17170, + { /* zName: */ FzName: ts + 17178, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 17189, + { /* zName: */ FzName: ts + 17197, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCK_PROXY_FILE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17205, + { /* zName: */ FzName: ts + 17213, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17218, + { /* zName: */ FzName: ts + 17226, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17233, + { /* zName: */ FzName: ts + 17241, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 17243, + { /* zName: */ FzName: ts + 17251, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 17255, + { /* zName: */ FzName: ts + 17263, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 17264, + { /* zName: */ FzName: ts + 17272, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 17275, + { /* zName: */ FzName: ts + 17283, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17285, + { /* zName: */ FzName: ts + 17293, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 17297, + { /* zName: */ FzName: ts + 17305, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 17308, + { /* zName: */ FzName: ts + 17316, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 17320, + { /* zName: */ FzName: ts + 17328, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 17337, + { /* zName: */ FzName: ts + 17345, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 17356, + { /* zName: */ FzName: ts + 17364, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 17382, + { /* zName: */ FzName: ts + 17390, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 17397, + { /* zName: */ FzName: ts + 17405, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17411, + { /* zName: */ FzName: ts + 17419, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17430, + { /* zName: */ FzName: ts + 17438, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17444, + { /* zName: */ FzName: ts + 17452, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17460, + { /* zName: */ FzName: ts + 17468, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17472, + { /* zName: */ FzName: ts + 17480, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17483, + { /* zName: */ FzName: ts + 17491, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17494, + { /* zName: */ FzName: ts + 17502, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17506, + { /* zName: */ FzName: ts + 17514, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17517, + { /* zName: */ FzName: ts + 17525, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17538, + { /* zName: */ FzName: ts + 17546, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17546, + { /* zName: */ FzName: ts + 17554, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17561, + { /* zName: */ FzName: ts + 17569, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17574, + { /* zName: */ FzName: ts + 17582, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17593, + { /* zName: */ FzName: ts + 17601, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17608, + { /* zName: */ FzName: ts + 17616, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -123854,7 +123889,7 @@ var aPragmaName = [67]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -123871,13 +123906,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17624)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17632)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -123886,12 +123921,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17649) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17657) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17659) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17667) { return PAGER_LOCKINGMODE_NORMAL } } @@ -123902,15 +123937,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+8308) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17666) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17674) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17671) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17679) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -123925,12 +123960,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16583) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16591) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17683) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17691) == 0 { return 2 } else { return 0 @@ -123940,13 +123975,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17690, 0) + ts+17698, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -123959,7 +123994,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -123973,7 +124008,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -124007,7 +124042,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -124017,7 +124052,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -124026,7 +124061,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -124042,23 +124077,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17752 /* "SET NULL" */ + zName = ts + 17760 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17761 /* "SET DEFAULT" */ + zName = ts + 17769 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17773 /* "CASCADE" */ + zName = ts + 17781 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17781 /* "RESTRICT" */ + zName = ts + 17789 /* "RESTRICT" */ break default: - zName = ts + 17790 /* "NO ACTION" */ + zName = ts + 17798 /* "NO ACTION" */ break } return zName @@ -124067,7 +124102,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -124076,11 +124111,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17800, ts + 17807, ts + 17815, ts + 17819, ts + 17683, ts + 17828, -} /* sqlite3.c:130656:15 */ + ts + 17808, ts + 17815, ts + 17823, ts + 17827, ts + 17691, ts + 17836, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -124107,7 +124142,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -124122,13 +124157,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17832 /* "w" */ + zType = ts + 17840 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17834 /* "a" */ + zType = ts + 17842 /* "a" */ } else { zType = ts + 7818 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17836, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17844, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -124136,15 +124171,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17843, ts + 17848, ts + 17856 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17851, ts + 17856, ts + 17864 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -124166,7 +124201,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(624) defer tls.Free(624) @@ -124420,7 +124455,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17864, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17872, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -125072,7 +125107,7 @@ __18: if !(zRight != 0) { goto __64 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17868) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17876) == 0) { goto __65 } b = 2 @@ -125161,7 +125196,7 @@ __72: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17659 /* "normal" */ + zRet = ts + 17667 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -125202,7 +125237,7 @@ __79: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __84 } - zRet = ts + 17649 /* "exclusive" */ + zRet = ts + 17657 /* "exclusive" */ __84: ; returnSingleText(tls, v, zRet) @@ -125567,7 +125602,7 @@ __124: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { goto __127 } - Xsqlite3ErrorMsg(tls, pParse, ts+17873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17881, 0) goto pragma_out __127: ; @@ -125629,7 +125664,7 @@ __134: if !(res1 != SQLITE_OK) { goto __135 } - Xsqlite3ErrorMsg(tls, pParse, ts+17898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17906, 0) goto pragma_out __135: ; @@ -125655,7 +125690,7 @@ __136: goto __138 } Xsqlite3ErrorMsg(tls, pParse, - ts+17928, 0) + ts+17936, 0) goto __139 __138: if !(iDb != 1) { @@ -125711,7 +125746,7 @@ __145: __147: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17981) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17989) == 0) { goto __148 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -125825,9 +125860,9 @@ __161: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17987 /* "issisii" */ + return ts + 17995 /* "issisii" */ } - return ts + 17995 /* "issisi" */ + return ts + 18003 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -125912,7 +125947,7 @@ __176: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __177 } - zSql = Xsqlite3MPrintf(tls, db, ts+18002, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+18010, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __178 } @@ -125965,13 +126000,13 @@ __184: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __186 } - zType = ts + 13053 /* "virtual" */ + zType = ts + 13061 /* "virtual" */ goto __187 __186: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __188 } - zType = ts + 18018 /* "shadow" */ + zType = ts + 18026 /* "shadow" */ goto __189 __188: zType = ts + 9164 /* "table" */ @@ -125981,7 +126016,7 @@ __187: ; __185: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18025, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18033, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -126051,7 +126086,7 @@ __196: goto __198 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18032, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18040, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -126061,7 +126096,7 @@ __196: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __199 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18037, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18045, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -126098,8 +126133,8 @@ __202: if !(pIdx1 != 0) { goto __204 } - *(*[3]uintptr)(unsafe.Pointer(bp + 536 /* azOrigin */)) = [3]uintptr{ts + 18042, ts + 18044, ts + 16460} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18046, + *(*[3]uintptr)(unsafe.Pointer(bp + 536 /* azOrigin */)) = [3]uintptr{ts + 18050, ts + 18052, ts + 16468} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18054, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -126133,7 +126168,7 @@ __205: __208: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18052, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18060, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -126156,7 +126191,7 @@ __209: goto __211 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18056, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18064, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __210 __210: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -126275,7 +126310,7 @@ __232: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __234 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18059, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18067, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -126283,7 +126318,7 @@ __232: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+18068)) + ts+18076)) goto __233 __233: j2++ @@ -126484,7 +126519,7 @@ __262: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __263: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18073, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18081, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 568 /* aiCols */))) @@ -126750,7 +126785,7 @@ __290: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+18077, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+18085, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -126852,7 +126887,7 @@ __310: goto __311 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+18101, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+18109, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { @@ -126874,7 +126909,7 @@ __311: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+18121, + zErr = Xsqlite3MPrintf(tls, db, ts+18129, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -126918,7 +126953,7 @@ __319: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+18143, + zErr1 = Xsqlite3MPrintf(tls, db, ts+18151, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -126952,9 +126987,9 @@ __324: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18173) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18181) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+18178) + Xsqlite3VdbeLoadString(tls, v, 4, ts+18186) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -126994,7 +127029,7 @@ __328: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+18199) + Xsqlite3VdbeLoadString(tls, v, 3, ts+18207) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __325: @@ -127016,7 +127051,7 @@ __320: if !!(isQuick != 0) { goto __330 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+18226) + Xsqlite3VdbeLoadString(tls, v, 2, ts+18234) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __331: @@ -127067,7 +127102,7 @@ __272: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18255 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 18263 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __335: @@ -127145,7 +127180,7 @@ __342: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __344 } - Xsqlite3ErrorMsg(tls, pParse, ts+18258, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+18266, libc.VaList(bp+416, zRight)) __344: ; __339: @@ -127257,19 +127292,19 @@ __49: if !(zRight != 0) { goto __351 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17666) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17674) == 0) { goto __352 } eMode2 = SQLITE_CHECKPOINT_FULL goto __353 __352: - if !(Xsqlite3StrICmp(tls, zRight, ts+18283) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+18291) == 0) { goto __354 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __355 __354: - if !(Xsqlite3StrICmp(tls, zRight, ts+17819) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17827) == 0) { goto __356 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -127456,7 +127491,7 @@ __371: __373: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+18291, + zSubSql = Xsqlite3MPrintf(tls, db, ts+18299, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __374 @@ -127607,9 +127642,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -127620,16 +127655,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -127638,27 +127673,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 18309, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18314, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 18320, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 18329, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 18338, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18346, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18354}, - {FzName: ts + 18361}, + {FzName: ts + 18317, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18322, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 18328, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 18337, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 18346, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18354, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18362}, + {FzName: ts + 18369}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -127670,24 +127705,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -127704,7 +127739,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+18367) + Xsqlite3_str_appendall(tls, bp+32, ts+18375) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -127712,7 +127747,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+18382, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18390, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -127725,16 +127760,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18389, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18397, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18395) + Xsqlite3_str_appendall(tls, bp+32, ts+18403) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18407) + Xsqlite3_str_appendall(tls, bp+32, ts+18415) j++ } Xsqlite3_str_append(tls, bp+32, ts+5311, 1) @@ -127761,7 +127796,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -127773,7 +127808,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127838,7 +127873,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -127851,7 +127886,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -127862,7 +127897,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -127870,7 +127905,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -127886,7 +127921,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -127932,13 +127967,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+18422) + Xsqlite3_str_appendall(tls, bp+32, ts+18430) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18430, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18438, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18434, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18442, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -127954,14 +127989,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -127973,7 +128008,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -127991,12 +128026,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -128029,7 +128064,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -128040,12 +128075,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18438, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18446, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -128054,25 +128089,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 5362 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18466, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18474, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18497, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18505, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18505, - ts + 18512, - ts + 18524, -} /* sqlite3.c:133149:23 */ + ts + 18513, + ts + 18520, + ts + 18532, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -128094,7 +128129,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128139,7 +128174,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14472) + corruptSchema(tls, pData, argv, ts+14480) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -128177,13 +128212,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18535) + corruptSchema(tls, pData, argv, ts+18543) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14472) + corruptSchema(tls, pData, argv, ts+14480) } } } @@ -128196,7 +128231,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -128229,13 +128264,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 9164 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 8228 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18548 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18556 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -128348,7 +128383,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+12055) + ts+12063) rc = SQLITE_ERROR goto initone_error_out __13: @@ -128388,7 +128423,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18620) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18628) rc = SQLITE_ERROR goto initone_error_out __17: @@ -128410,7 +128445,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18644, + ts+18652, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -128497,7 +128532,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -128529,7 +128564,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -128548,7 +128583,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -128601,7 +128636,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -128628,7 +128663,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -128684,7 +128719,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -128707,7 +128742,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0)) libc.X__builtin___memset_chk(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272), libc.X__builtin_object_size(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0)) @@ -128720,7 +128755,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -128802,7 +128837,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18678, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18686, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -128829,7 +128864,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18708, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18716, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -128926,13 +128961,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -128961,7 +128996,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129000,14 +129035,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -129020,7 +129055,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -129037,7 +129072,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129050,7 +129085,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -129085,21 +129120,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -129133,7 +129168,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -129154,7 +129189,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -129184,7 +129219,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -129202,19 +129237,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -129243,7 +129278,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -129254,7 +129289,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -129304,14 +129339,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -129333,7 +129368,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -129376,18 +129411,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18727, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18735, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18771, 0) + ts+18779, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18826)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18834)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -129400,11 +129435,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -129438,7 +129473,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -129466,7 +129501,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -129511,7 +129546,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -129535,7 +129570,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -129570,7 +129605,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -129602,7 +129637,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18860, libc.VaList(bp, 0)) + ts+18868, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -129626,7 +129661,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18910, 0) + ts+18918, 0) return 1 } @@ -129661,7 +129696,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18965, libc.VaList(bp+8, zName)) + ts+18973, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -129684,11 +129719,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -129697,7 +129732,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -129710,7 +129745,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -129853,7 +129888,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -129901,7 +129936,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -129982,7 +130017,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -130010,7 +130045,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -130366,7 +130401,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) if p != 0 { @@ -130384,7 +130419,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -130395,7 +130430,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -130415,7 +130450,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -130449,20 +130484,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 19029 /* "UNION ALL" */ + z = ts + 19037 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 19039 /* "INTERSECT" */ + z = ts + 19047 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 19049 /* "EXCEPT" */ + z = ts + 19057 /* "EXCEPT" */ break default: - z = ts + 19056 /* "UNION" */ + z = ts + 19064 /* "UNION" */ break } return z @@ -130476,11 +130511,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19062, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19070, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -130493,7 +130528,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -130672,7 +130707,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -130750,7 +130785,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1092 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16572 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16580 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -130796,7 +130831,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -130853,7 +130888,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -130905,13 +130940,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16572 /* "rowid" */ + zCol = ts + 16580 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+12341, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+12349, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -130921,7 +130956,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+19085, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+19093, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -130953,7 +130988,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -131014,7 +131049,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16572 /* "rowid" */ + zName = ts + 16580 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -131027,7 +131062,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+19085, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+19093, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -131042,7 +131077,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+19094, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+19102, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -131085,7 +131120,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -131154,7 +131189,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -131189,7 +131224,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -131221,7 +131256,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -131278,7 +131313,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -131302,7 +131337,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -131371,7 +131406,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -131407,7 +131442,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+19102, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19110, 0) return __1: ; @@ -131517,7 +131552,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19151, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19159, 0) goto end_of_recursive_query __15: ; @@ -131539,7 +131574,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19193, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19201, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -131582,7 +131617,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19199, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19207, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -131612,7 +131647,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -131632,7 +131667,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19214, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19222, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1527 /* "" */ } @@ -131652,7 +131687,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -131688,7 +131723,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -131788,8 +131823,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19237, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19252, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19245, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19260, 0) __8: ; @@ -131838,7 +131873,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19029, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19037, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -131914,7 +131949,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19271, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19279, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -131986,7 +132021,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19271, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19279, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -132151,15 +132186,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19292, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19300, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+19338, + ts+19346, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -132182,7 +132217,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -132378,7 +132413,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -132585,7 +132620,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19420, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19428, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -132593,7 +132628,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19431, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19439, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -132607,7 +132642,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19436, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19444, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -132728,14 +132763,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -132748,7 +132783,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -132831,7 +132866,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -132841,7 +132876,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -132884,7 +132919,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -132900,7 +132935,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -132932,7 +132967,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -132965,7 +133000,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -132975,7 +133010,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -133002,7 +133037,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -133172,7 +133207,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -133597,7 +133632,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -133605,7 +133640,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -133647,7 +133682,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -133682,7 +133717,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -133736,7 +133771,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -133803,7 +133838,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -133856,7 +133891,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -133927,7 +133962,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -134015,7 +134050,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -134031,12 +134066,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15463) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15471) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15467) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15475) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -134065,7 +134100,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -134105,7 +134140,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -134116,7 +134151,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+19442, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19450, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -134144,7 +134179,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -134223,12 +134258,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19460, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19468, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -134242,7 +134277,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -134277,7 +134312,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -134310,7 +134345,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -134393,7 +134428,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19483, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19491, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -134420,7 +134455,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19503, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19511, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -134436,7 +134471,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19546 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19554 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -134462,7 +134497,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19569, + Xsqlite3ErrorMsg(tls, pParse, ts+19577, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -134473,9 +134508,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19607 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19615 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19641 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19649 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -134492,7 +134527,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -134508,7 +134543,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -134523,7 +134558,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19679, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19687, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -134562,7 +134597,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -134650,7 +134685,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19691, + Xsqlite3ErrorMsg(tls, pParse, ts+19699, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -134669,7 +134704,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19730, + Xsqlite3ErrorMsg(tls, pParse, ts+19738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -134677,7 +134712,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19761, + Xsqlite3ErrorMsg(tls, pParse, ts+19769, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -134842,7 +134877,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+12341, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+12349, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -134858,7 +134893,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19794, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19802, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -134878,9 +134913,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19803, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19811, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19821, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19829, 0) } } } @@ -134890,7 +134925,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19841, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19849, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -134911,7 +134946,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -134949,7 +134984,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -134997,7 +135032,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -135026,7 +135061,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -135051,7 +135086,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -135079,13 +135114,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19872, 0) + ts+19880, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19923, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19931, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -135101,7 +135136,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -135140,7 +135175,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -135281,17 +135316,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19956, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19964, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19968 /* " USING COVERING ..." */ + return ts + 19976 /* " USING COVERING ..." */ } return ts + 1527 /* "" */ }(), @@ -135313,7 +135348,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -135359,7 +135394,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -135377,7 +135412,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -135418,7 +135453,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -135435,7 +135470,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -135636,7 +135671,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19991, + ts+19999, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -135722,7 +135757,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+20045, + Xsqlite3ErrorMsg(tls, pParse, ts+20053, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -135962,7 +135997,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20085, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20093, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) @@ -136025,7 +136060,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20100, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20108, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -136547,9 +136582,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 20116 /* "DISTINCT" */ + return ts + 20124 /* "DISTINCT" */ } - return ts + 20125 /* "GROUP BY" */ + return ts + 20133 /* "GROUP BY" */ }()) groupBySort = 1 @@ -136962,7 +136997,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+20116) + explainTempTable(tls, pParse, ts+20124) __141: ; @@ -136974,9 +137009,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 20134 /* "RIGHT PART OF OR..." */ + return ts + 20142 /* "RIGHT PART OF OR..." */ } - return ts + 20157 /* "ORDER BY" */ + return ts + 20165 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -137032,7 +137067,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -137056,12 +137091,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -137132,7 +137167,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+20166, 0) + ts+20174, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -137192,7 +137227,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -137264,7 +137299,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -137295,7 +137330,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -137324,7 +137359,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -137362,7 +137397,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -137392,7 +137427,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+20231, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20239, 0) goto trigger_cleanup __3: ; @@ -137453,7 +137488,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20277, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+20285, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -137471,7 +137506,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+20285, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20293, 0) goto trigger_orphan_error __11: ; @@ -137486,7 +137521,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20277, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+20285, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -137502,7 +137537,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+20326, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+20334, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -137519,7 +137554,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8422, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+20352, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20360, 0) goto trigger_cleanup __18: ; @@ -137529,12 +137564,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+20390, + Xsqlite3ErrorMsg(tls, pParse, ts+20398, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 20427 /* "BEFORE" */ + return ts + 20435 /* "BEFORE" */ } - return ts + 20434 /* "AFTER" */ + return ts + 20442 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -137543,7 +137578,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+20440, libc.VaList(bp+24, pTableName+8)) + ts+20448, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -137573,7 +137608,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }(), uintptr(0), zDb) != 0) { @@ -137669,7 +137704,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -137709,7 +137744,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+20277, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+20285, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -137746,13 +137781,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20486, + ts+20494, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20561, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20569, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -137793,7 +137828,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -137811,7 +137846,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -137828,10 +137863,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -137852,7 +137890,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -137884,7 +137922,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -137913,7 +137951,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -137932,7 +137970,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -137952,7 +137990,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -138018,7 +138056,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20590, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20598, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -138036,12 +138074,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -138059,7 +138097,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12428 + return ts + 12436 } return ts + 6247 }() @@ -138074,7 +138112,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20610, + ts+20618, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -138082,7 +138120,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -138113,7 +138151,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -138130,7 +138168,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -138193,12 +138231,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20672, + ts+20680, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20720 /* "DELETE" */ + return ts + 20728 /* "DELETE" */ } - return ts + 20727 /* "UPDATE" */ + return ts + 20735 /* "UPDATE" */ }())) __15: ; @@ -138257,7 +138295,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -138282,7 +138320,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -138294,7 +138332,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20734, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20742, 0) return 1 } @@ -138303,7 +138341,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -138344,7 +138382,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -138412,7 +138450,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -138499,7 +138537,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -138512,7 +138550,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -138569,7 +138607,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20776, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20784, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -138618,7 +138656,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -138647,7 +138685,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -138707,7 +138745,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -138755,7 +138793,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -138812,7 +138850,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -138842,7 +138880,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -138863,7 +138901,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -138875,7 +138913,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -138919,7 +138957,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -139002,7 +139040,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -139283,7 +139321,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20790, + ts+20798, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -139315,7 +139353,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20826, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20834, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -140356,7 +140394,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20845) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20853) __169: ; @@ -140392,7 +140430,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140565,7 +140603,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -140578,14 +140616,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -140598,7 +140636,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -140624,7 +140662,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -140744,10 +140782,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 216)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20858, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20866, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20862, libc.VaList(bp+8, bp+216)) + ts+20870, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -140766,7 +140804,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -140788,7 +140826,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -140804,7 +140842,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -140838,7 +140876,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12482, -1) + ts+12490, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -140884,7 +140922,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140906,7 +140944,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20935, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20939, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20943, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20947, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -140924,7 +140962,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -140968,7 +141006,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -141025,7 +141063,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -141056,14 +141094,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20943) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20951) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20983) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20991) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -141074,7 +141112,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21026) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21034) return SQLITE_ERROR __5: ; @@ -141119,7 +141157,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+21044, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+21052, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -141140,7 +141178,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+21067) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21075) goto end_of_vacuum __8: ; @@ -141156,7 +141194,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14835) + rc = execSql(tls, db, pzErrMsg, ts+14843) if !(rc != SQLITE_OK) { goto __9 } @@ -141208,7 +141246,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+21094, + ts+21102, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -141218,7 +141256,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21202, + ts+21210, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -141233,7 +141271,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+21256, + ts+21264, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -141250,7 +141288,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+21407, + ts+21415, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -141363,7 +141401,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -141371,7 +141409,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -141411,7 +141449,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -141425,18 +141463,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -141457,7 +141495,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -141475,14 +141513,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -141492,7 +141530,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -141513,7 +141551,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -141550,7 +141588,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -141581,7 +141619,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -141607,7 +141645,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -141627,7 +141665,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -141637,7 +141675,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12717, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -141653,7 +141691,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -141688,7 +141726,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -141699,7 +141737,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -141734,7 +141772,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21537, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21545, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -141746,7 +141784,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21561, + ts+21569, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -141756,7 +141794,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21660, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21668, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -141783,7 +141821,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -141791,7 +141829,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -141805,7 +141843,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -141826,7 +141864,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21679, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21687, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -141866,7 +141904,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21721, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21729, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3609, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -141880,7 +141918,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21751 /* "vtable construct..." */ + var zFormat uintptr = ts + 21759 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -141901,7 +141939,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16463, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16471, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -141941,7 +141979,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -141960,7 +141998,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21797, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21805, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -141977,7 +142015,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -141997,7 +142035,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -142009,7 +142047,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142028,7 +142066,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21797, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21805, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -142049,7 +142087,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -142065,7 +142103,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -142139,7 +142177,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -142184,7 +142222,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -142214,7 +142252,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -142236,14 +142274,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -142254,7 +142292,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -142315,7 +142353,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -142363,7 +142401,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -142430,7 +142468,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -142469,7 +142507,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -142514,7 +142552,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -142531,19 +142569,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap1[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap1 = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -142552,7 +142590,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -142580,7 +142618,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -142644,7 +142682,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -142684,23 +142722,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -142730,9 +142768,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -142759,9 +142797,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -142771,9 +142809,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -142793,9 +142831,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -142808,9 +142846,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -142825,24 +142863,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -142864,7 +142902,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -142890,7 +142928,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -142912,7 +142950,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -142934,13 +142972,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21816 /* "" */ + return ts + 21824 /* "" */ } if i == -1 { - return ts + 16572 /* "rowid" */ + return ts + 16580 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -142951,19 +142989,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21823, 5) + Xsqlite3_str_append(tls, pStr, ts+21831, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21829, 1) + Xsqlite3_str_append(tls, pStr, ts+21837, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13099, 1) + Xsqlite3_str_append(tls, pStr, ts+13107, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -142974,11 +143012,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21829, 1) + Xsqlite3_str_append(tls, pStr, ts+21837, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+13099, 1) + Xsqlite3_str_append(tls, pStr, ts+13107, 1) } Xsqlite3_str_append(tls, pStr, ts+5362, 1) } @@ -142999,7 +143037,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -143012,27 +143050,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21831, 2) + Xsqlite3_str_append(tls, pStr, ts+21839, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21823, 5) + Xsqlite3_str_append(tls, pStr, ts+21831, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21834 /* "%s=?" */ + return ts + 21842 /* "%s=?" */ } - return ts + 21839 /* "ANY(%s)" */ + return ts + 21847 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21847) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21855) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21849) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21857) } Xsqlite3_str_append(tls, pStr, ts+5311, 1) } @@ -143044,7 +143082,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -143079,11 +143117,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21851, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21859, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21857 /* "SEARCH" */ + return ts + 21865 /* "SEARCH" */ } - return ts + 21864 /* "SCAN" */ + return ts + 21872 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -143093,30 +143131,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 11256 /* "PRIMARY KEY" */ + zFmt = ts + 11264 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21869 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21877 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21902 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21910 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21927 /* "COVERING INDEX %..." */ + zFmt = ts + 21935 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21945 /* "INDEX %s" */ + zFmt = ts + 21953 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21954, 7) + Xsqlite3_str_append(tls, bp+64, ts+21962, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16572 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21962, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16580 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21970, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21993, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+22001, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -143124,9 +143162,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+22003, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+22011, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+22008, + Xsqlite3_str_appendf(tls, bp+64, ts+22016, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -143145,7 +143183,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -143163,22 +143201,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+22035, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+22043, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21834, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21842, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+22056, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+22064, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21823, 5) + Xsqlite3_str_append(tls, bp+24, ts+21831, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21834, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21842, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+5311, 1) @@ -143228,7 +143266,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -143261,7 +143299,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -143294,7 +143332,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -143332,7 +143370,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -143407,7 +143445,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -143600,7 +143638,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -143637,6 +143675,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -143720,7 +143759,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -143761,7 +143800,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -143789,10 +143828,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -143809,7 +143848,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -143829,7 +143868,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -143851,7 +143890,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -143916,7 +143955,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -143962,7 +144001,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -143972,6 +144011,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -144004,7 +144046,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -144075,7 +144117,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -144137,53 +144178,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -144191,8 +144231,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -144828,6 +144868,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -144842,7 +144890,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -144859,7 +144909,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22064, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22072, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -144878,7 +144928,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22079, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22087, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -145226,24 +145276,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -145265,7 +145315,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -145306,14 +145356,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -145333,7 +145383,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -145360,7 +145410,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -145532,7 +145582,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -145637,18 +145687,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16421, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15740, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 15266, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 22088, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16429, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15748, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 15274, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 22096, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -145656,7 +145706,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -145665,7 +145715,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -145696,7 +145746,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -145829,7 +145879,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -146148,7 +146198,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -146177,7 +146227,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -146212,7 +146262,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -146250,7 +146300,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -146291,7 +146341,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -146354,7 +146404,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+22095, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22103, 0) return } } @@ -146538,7 +146588,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 22136 /* "NOCASE" */ + return ts + 22144 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -146659,7 +146709,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -146682,7 +146732,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -146706,7 +146756,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -146758,7 +146808,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -146808,7 +146858,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -146821,7 +146871,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -146881,7 +146931,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -146911,7 +146961,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -146921,14 +146971,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -146945,7 +146995,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -146957,7 +147007,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -146982,7 +147032,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+22143, + Xsqlite3ErrorMsg(tls, pParse, ts+22151, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -147041,7 +147091,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -147071,16 +147121,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -147090,7 +147140,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -147115,7 +147165,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -147136,7 +147186,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { @@ -147157,14 +147207,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -147183,19 +147233,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.X__builtin___memcpy_chk(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2), libc.X__builtin_object_size(tls, aiCur, 0)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.X__builtin___memcpy_chk(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{})), libc.X__builtin_object_size(tls, pDest+8, 0)) } @@ -147205,7 +147255,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -147282,7 +147332,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -147302,14 +147352,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -147320,7 +147370,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -147424,7 +147474,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -147446,7 +147496,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -147501,7 +147551,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -147531,7 +147581,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -147552,7 +147602,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -147573,7 +147623,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -147643,7 +147693,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -147660,7 +147710,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -147703,7 +147753,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -147737,7 +147787,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -147823,7 +147873,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+22179, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+22187, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -147904,7 +147954,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22205 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 22213 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -148095,7 +148145,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -148171,7 +148221,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -148195,7 +148250,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -148421,7 +148476,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -148448,7 +148503,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -148486,7 +148541,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -148625,7 +148680,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -148638,7 +148693,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -148682,7 +148737,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -148797,7 +148852,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -149105,7 +149160,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -149114,7 +149169,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -149134,7 +149189,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.X__builtin___memset_chk(tls, pTo, 0, uint64(uintptr(0)+64), libc.X__builtin_object_size(tls, pTo, 0)) @@ -149151,13 +149206,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -149178,7 +149233,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -149204,7 +149259,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -149248,7 +149303,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -149307,7 +149362,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -149396,7 +149451,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -149503,7 +149558,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -149606,7 +149661,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -149674,7 +149729,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -150034,7 +150089,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -150076,7 +150131,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -150151,7 +150206,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -150436,7 +150491,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -150460,7 +150515,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -150562,7 +150617,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22216, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22224, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -150635,7 +150690,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+22216, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22224, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -150684,7 +150739,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -150707,7 +150762,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -150730,7 +150785,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -150756,7 +150811,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -150785,7 +150840,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -150921,7 +150976,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -151046,7 +151101,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -151098,7 +151153,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+22242, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+22250, 0) rc = SQLITE_OK } else { goto __3 @@ -151134,7 +151189,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -151502,7 +151557,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) } @@ -151510,7 +151565,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -151557,7 +151612,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -151872,7 +151927,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22277, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22285, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -151964,7 +152019,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -152071,7 +152126,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -152082,7 +152137,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -152128,7 +152183,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -152203,7 +152258,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -152315,7 +152370,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -152379,7 +152434,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22295, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+22303, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -152458,7 +152513,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22323, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22331, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -152999,7 +153054,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -153216,6 +153271,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -153397,7 +153454,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -153406,7 +153463,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -153422,13 +153479,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -153438,7 +153495,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -153456,9 +153513,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -153521,10 +153578,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+22341, -1) + pCtx, ts+22349, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -153534,7 +153591,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -153547,7 +153604,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -153561,7 +153618,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -153574,7 +153631,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -153587,7 +153644,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -153597,7 +153654,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -153605,7 +153662,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -153623,7 +153680,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -153633,7 +153690,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -153641,7 +153698,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -153655,13 +153712,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -153670,14 +153727,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+22397, -1) + pCtx, ts+22405, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -153685,7 +153742,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -153711,10 +153768,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -153729,7 +153786,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -153743,7 +153800,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -153751,7 +153808,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -153767,17 +153824,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22442)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22453)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22464)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22469)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22482)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22492)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22498)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22509)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22519)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22531)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22536 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22450)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22461)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22472)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22477)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22490)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22500)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22506)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22517)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22527)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22539)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22544 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -153786,7 +153843,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22536 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -153794,7 +153851,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -153809,7 +153866,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -153828,9 +153885,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -153841,7 +153898,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22540, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22548, libc.VaList(bp, zName)) } return p } @@ -153861,7 +153918,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -153885,12 +153942,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22559, 0) + ts+22567, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22630, 0) + ts+22638, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -153929,16 +153986,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -154038,7 +154095,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -154062,7 +154119,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -154094,7 +154151,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -154140,7 +154197,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -154148,14 +154205,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22693, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22701, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -154165,12 +154222,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -154346,7 +154406,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -154357,7 +154417,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -154372,7 +154432,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -154385,7 +154445,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -154397,7 +154457,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -154430,7 +154490,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22719, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22727, 0) goto windowAllocErr __2: ; @@ -154466,7 +154526,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -154485,7 +154545,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -154496,15 +154556,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22751 /* "PARTITION clause" */ + zErr = ts + 22759 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22768 /* "ORDER BY clause" */ + zErr = ts + 22776 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22784 /* "frame specificat..." */ + zErr = ts + 22792 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22804, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22812, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -154519,7 +154579,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -154527,7 +154587,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22837, 0) + ts+22845, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -154538,7 +154598,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -154558,7 +154618,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -154598,7 +154658,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -154674,7 +154734,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -154703,17 +154763,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22884, - ts + 22937, - ts + 22341, - ts + 22988, - ts + 23040, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22892, + ts + 22945, + ts + 22349, + ts + 22996, + ts + 23048, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -154738,19 +154798,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -154786,7 +154846,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -154893,7 +154953,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -154929,7 +154989,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -155036,7 +155096,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -155119,7 +155179,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -155154,7 +155214,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -155179,7 +155239,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -155216,7 +155276,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -155339,7 +155399,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -155487,7 +155547,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -155518,7 +155578,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155543,7 +155603,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155891,7 +155951,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -156288,17 +156348,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -156308,7 +156368,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -156327,19 +156387,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23090, + Xsqlite3ErrorMsg(tls, pParse, ts+23098, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 20157 /* "ORDER BY" */ + return ts + 20165 /* "ORDER BY" */ } - return ts + 23132 /* "LIMIT" */ + return ts + 23140 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+23138, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23146, 0) } } @@ -156347,7 +156407,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -156359,7 +156419,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -156397,7 +156457,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -156411,14 +156471,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23172, + Xsqlite3ErrorMsg(tls, pParse, ts+23180, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -156486,7 +156546,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -156755,7 +156815,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -156983,7 +157043,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -157043,7 +157103,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -157086,7 +157146,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -157146,7 +157206,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -157348,7 +157408,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -157370,9 +157430,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -157381,9 +157441,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -157393,7 +157453,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -157408,7 +157468,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -157567,7 +157627,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -157575,7 +157635,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -157598,7 +157658,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -157638,7 +157698,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -157649,7 +157709,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -157659,7 +157719,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+23210, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23218, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -157668,7 +157728,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -158091,7 +158151,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -158498,7 +158558,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -158510,7 +158570,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -158655,21 +158715,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16572, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16580, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23240, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16485, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16493, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+23240, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -159405,7 +159465,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+23259) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+23267) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -159556,7 +159616,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23268, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+23276, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -160051,21 +160111,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+23292, 0) + ts+23300, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23387, 0) + ts+23395, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23471, 0) + ts+23479, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -160505,7 +160565,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -160515,9 +160575,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23268, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+23276, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23556, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23564, 0) } //*********** End %syntax_error code ***************************************** @@ -160525,7 +160585,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -160555,7 +160615,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -160609,7 +160669,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -160660,7 +160720,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -160746,7 +160806,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -160759,7 +160819,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -160776,7 +160836,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -160791,7 +160851,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -160807,7 +160867,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -160840,7 +160900,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -160973,7 +161033,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -161151,7 +161211,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161160,7 +161220,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -161169,11 +161229,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -161196,13 +161256,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161252,7 +161312,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -161269,7 +161329,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -161283,7 +161343,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -161296,7 +161356,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -161664,7 +161724,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -161734,7 +161794,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23573, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23581, libc.VaList(bp, bp+2464)) break } } @@ -161757,7 +161817,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3609, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23598, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23606, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -161854,7 +161914,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -161957,7 +162017,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23609, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23617, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -161970,11 +162030,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20277, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+20285, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23616, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23624, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23621, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23629, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -161987,9 +162047,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23631, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23639, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23635, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23643, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -162031,12 +162091,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -162063,7 +162123,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -162075,11 +162135,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -162092,14 +162152,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -162112,14 +162172,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -162150,7 +162210,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -162276,7 +162336,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -162315,7 +162375,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -162323,7 +162383,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -162593,7 +162653,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -162691,13 +162751,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -162716,7 +162776,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -162745,7 +162805,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -162824,11 +162884,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -162850,7 +162910,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -162863,7 +162923,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -162877,7 +162937,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -162893,39 +162953,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -162940,7 +163000,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -162955,7 +163015,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -162982,7 +163042,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -162998,14 +163058,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -163029,7 +163089,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23643, 0) + ts+23651, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -163042,7 +163102,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -163079,11 +163139,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -163093,7 +163153,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -163203,7 +163263,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -163253,24 +163313,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23711 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23719 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23725 /* "abort due to ROL..." */ + zErr = ts + 23733 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23747 /* "another row avai..." */ + zErr = ts + 23755 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23769 /* "no more rows ava..." */ + zErr = ts + 23777 /* "no more rows ava..." */ break } @@ -163288,36 +163348,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23792, - ts + 23805, + ts + 23800, + ts + 23813, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23821, - ts + 23846, - ts + 23860, - ts + 23879, + ts + 23829, + ts + 23854, + ts + 23868, + ts + 23887, ts + 1463, - ts + 23904, - ts + 23941, - ts + 23953, - ts + 23968, - ts + 24001, - ts + 24019, - ts + 24044, - ts + 24073, + ts + 23912, + ts + 23949, + ts + 23961, + ts + 23976, + ts + 24009, + ts + 24027, + ts + 24052, + ts + 24081, /* SQLITE_EMPTY */ uintptr(0), ts + 6202, ts + 5688, - ts + 24090, - ts + 24108, - ts + 24126, + ts + 24098, + ts + 24116, + ts + 24134, /* SQLITE_NOLFS */ uintptr(0), - ts + 24160, + ts + 24168, /* SQLITE_FORMAT */ uintptr(0), - ts + 24181, - ts + 24207, - ts + 24230, - ts + 24251, -} /* sqlite3.c:169926:20 */ + ts + 24189, + ts + 24215, + ts + 24238, + ts + 24259, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -163326,7 +163386,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -163349,8 +163409,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -163359,7 +163419,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -163377,7 +163437,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -163390,7 +163450,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -163406,7 +163466,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -163420,7 +163480,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ *(*int32)(unsafe.Pointer(db + 432)) = 1 } @@ -163428,7 +163488,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -163438,7 +163498,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -163496,7 +163556,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+24267, 0) + ts+24275, 0) return SQLITE_BUSY } else { @@ -163543,7 +163603,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -163585,22 +163645,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -163620,7 +163680,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163629,7 +163689,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+24330, libc.VaList(bp, zName)) + ts+24338, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -163644,7 +163704,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -163670,7 +163730,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -163688,7 +163748,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -163709,7 +163769,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -163727,7 +163787,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -163740,7 +163800,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -163753,7 +163813,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -163766,7 +163826,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -163778,7 +163838,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -163794,7 +163854,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -163812,7 +163872,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -163825,7 +163885,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -163836,7 +163896,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163865,7 +163925,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24381, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24389, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -163886,7 +163946,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -163910,7 +163970,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -163952,19 +164012,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -163986,7 +164046,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -163998,7 +164058,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -164027,18 +164087,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -164046,9 +164106,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -164056,7 +164116,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -164066,13 +164126,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -164085,7 +164145,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -164095,7 +164155,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+24402, 0) + ts+24410, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -164148,7 +164208,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -164160,7 +164220,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -164207,7 +164267,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -164240,7 +164300,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24470, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24478, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -164288,10 +164348,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24476, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24484, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24486, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24494, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -164413,7 +164473,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24514, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24522, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -164424,17 +164484,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24518, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24526, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24518 /* "cache" */ + zModeType = ts + 24526 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24524, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24532, zOpt, uint64(4)) == 0) { goto __32 } @@ -164473,7 +164533,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24529, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24537, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -164481,7 +164541,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24549, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24557, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -164524,7 +164584,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24573, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24581, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -164545,24 +164605,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24589, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24596, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24597, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24604, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24604, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24607, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24610, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17683, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24612, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24615, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24618, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17691, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -164578,7 +164638,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -164730,10 +164790,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+22136, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+22144, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24614, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24622, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -164762,7 +164822,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -164819,7 +164879,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6735 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23616 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23624 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -164918,17 +164978,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -164939,7 +164999,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24620 /* "\x00\x00" */ + zFilename = ts + 24628 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -164960,12 +165020,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -164977,7 +165037,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -164995,7 +165055,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -165006,7 +165066,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -165017,7 +165077,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -165025,7 +165085,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -165038,28 +165098,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24623, + Xsqlite3_log(tls, iErr, ts+24631, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24648) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24656) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24668) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24676) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24675) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24683) } // This is a convenience routine that makes sure that all thread-specific @@ -165067,12 +165127,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -165238,7 +165298,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24692, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24700, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -165256,7 +165316,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -165271,7 +165331,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -165284,7 +165344,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -165329,7 +165389,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -165788,7 +165848,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -165797,7 +165857,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.X__builtin___memcpy_chk(tls, p, z, n+uint64(1), libc.X__builtin_object_size(tls, p, 0)) return p + uintptr(n) + uintptr(1) @@ -165810,7 +165870,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -165841,7 +165901,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -165858,7 +165918,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -165867,7 +165927,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -165884,7 +165944,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -165894,7 +165954,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -165915,14 +165975,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -165935,7 +165995,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -165944,7 +166004,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -165959,7 +166019,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -165970,7 +166030,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -165981,7 +166041,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -166004,7 +166064,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -166047,7 +166107,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -166068,7 +166128,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -166077,7 +166137,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -166089,7 +166149,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24720, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24728, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -166107,7 +166167,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -166152,11 +166212,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -166169,7 +166229,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -166179,13 +166239,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -166209,7 +166269,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -166252,7 +166312,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24728 /* "database is dead..." */ + return ts + 24736 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -166264,7 +166324,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -166290,7 +166350,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -166394,7 +166454,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -166999,7 +167059,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -167011,10 +167071,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -167022,9 +167082,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -167037,9 +167097,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -167047,8 +167107,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6535, ts + 7049, ts + 7054, ts + 6545, ts + 6540, ts + 8295, ts + 24751, ts + 24757, -} /* sqlite3.c:193131:19 */ + ts + 6535, ts + 7049, ts + 7054, ts + 6545, ts + 6540, ts + 8295, ts + 24759, ts + 24765, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -167062,7 +167122,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -167070,7 +167130,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -167078,7 +167138,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -167086,7 +167146,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -167094,7 +167154,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -167127,7 +167187,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -167139,7 +167199,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -167152,7 +167212,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -167161,7 +167221,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -167176,7 +167236,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -167227,7 +167287,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24764 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24772 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -167247,11 +167307,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -167284,7 +167344,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24781, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24789, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -167295,7 +167355,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -167322,7 +167382,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -167331,7 +167391,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -167341,7 +167401,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -167349,7 +167409,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -167452,7 +167512,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -167467,14 +167527,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -167485,7 +167545,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167766,7 +167826,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -167788,7 +167848,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -167803,7 +167863,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -167819,7 +167879,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -168046,7 +168106,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.X__builtin___memset_chk(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{})), libc.X__builtin_object_size(tls, pParse, 0)) if zJson == uintptr(0) { @@ -168071,7 +168131,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24810, -1) + Xsqlite3_result_error(tls, pCtx, ts+24818, -1) } } jsonParseReset(tls, pParse) @@ -168082,7 +168142,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -168113,7 +168173,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) @@ -168133,7 +168193,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -168190,7 +168250,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -168213,7 +168273,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -168388,7 +168448,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -168399,7 +168459,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24825, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24833, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -168412,11 +168472,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24829, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24837, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -168427,7 +168487,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168479,18 +168539,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24855, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24863, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -168521,7 +168581,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -168538,7 +168598,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -168561,7 +168621,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -168611,7 +168671,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -168645,11 +168705,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24898, uint32(2)) + jsonAppendRaw(tls, bp, ts+24906, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+5352, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24901, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24909, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -168705,7 +168765,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -168778,7 +168838,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -168810,7 +168870,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -168822,14 +168882,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24904, -1) + ts+24912, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24955, -1) + Xsqlite3_result_error(tls, ctx, ts+24963, -1) jsonReset(tls, bp) return } @@ -168849,7 +168909,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -168918,7 +168978,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -168937,7 +168997,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15673) + jsonWrongNumArgs(tls, ctx, ts+15681) return __2: ; @@ -169001,7 +169061,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -169026,9 +169086,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24989 /* "set" */ + return ts + 24997 /* "set" */ } - return ts + 24993 /* "insert" */ + return ts + 25001 /* "insert" */ }()) return __2: @@ -169099,7 +169159,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -169123,7 +169183,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -169137,7 +169197,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -169153,7 +169213,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -169178,16 +169238,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25000, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25008, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -169195,7 +169255,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -169237,7 +169297,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -169259,7 +169319,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -169283,16 +169343,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25003, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25011, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -169312,16 +169372,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -169336,7 +169396,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+25006) + ts+25014) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -169349,13 +169409,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -169369,7 +169429,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -169380,7 +169440,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -169393,7 +169453,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -169402,13 +169462,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -169459,7 +169519,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169476,19 +169536,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+25089, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+25097, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+25094, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+25102, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -169577,10 +169637,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+25089, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+25097, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+25094, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+25102, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -169607,7 +169667,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 25100 /* "$" */ + zRoot = ts + 25108 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -169625,7 +169685,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -169635,7 +169695,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169710,7 +169770,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169739,7 +169799,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24810, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24818, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -169815,7 +169875,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -169829,36 +169889,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25107}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25118}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25118}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25136}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 25149}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 25152}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25156}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25168}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25191}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25202}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25214}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 25227}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25236}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25236}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25246}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25257}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25274}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25110}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25115}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25126}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25126}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25144}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 25157}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 25160}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25164}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25176}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25188}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25199}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25210}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25222}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 25235}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25244}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25244}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 25254}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25265}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 25282}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -169874,9 +169934,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 25292 /* "json_each" */, FpModule: 0}, - {FzName: ts + 25302 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 25300 /* "json_each" */, FpModule: 0}, + {FzName: ts + 25310 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -169923,7 +169983,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -169937,7 +169997,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -169958,9 +170018,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -169968,23 +170028,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -169993,20 +170053,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -170014,17 +170074,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -170050,28 +170110,28 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = U32(*(*U8)(unsafe.Pointer(p)))<<24 + U32(*(*U8)(unsafe.Pointer(p + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(p + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(p + 3)))<<0 } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ return I64(U64(*(*U8)(unsafe.Pointer(p)))<<56 + U64(*(*U8)(unsafe.Pointer(p + 1)))<<48 + U64(*(*U8)(unsafe.Pointer(p + 2)))<<40 + U64(*(*U8)(unsafe.Pointer(p + 3)))<<32 + U64(*(*U8)(unsafe.Pointer(p + 4)))<<24 + U64(*(*U8)(unsafe.Pointer(p + 5)))<<16 + U64(*(*U8)(unsafe.Pointer(p + 6)))<<8 + U64(*(*U8)(unsafe.Pointer(p + 7)))<<0) } // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ var i U32 // p is always 4-byte aligned @@ -170083,7 +170143,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 40 & int64(0xFF)) @@ -170096,7 +170156,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -170104,20 +170164,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.X__builtin___memset_chk(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2), libc.X__builtin_object_size(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -170125,7 +170185,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -170134,7 +170194,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -170149,7 +170209,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -170165,7 +170225,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -170174,7 +170234,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170206,11 +170266,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+25312, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+25320, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25320, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25328, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -170284,7 +170344,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -170295,7 +170355,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -170308,7 +170368,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -170325,7 +170385,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -170349,7 +170409,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -170375,19 +170435,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -170403,23 +170463,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -170441,13 +170501,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -170455,7 +170515,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+25325, + ts+25333, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -170474,7 +170534,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -170492,7 +170552,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -170522,7 +170582,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -170538,7 +170598,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -170555,7 +170615,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -170667,7 +170727,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -170769,7 +170829,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170825,7 +170885,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -170841,7 +170901,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -170860,7 +170920,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -170877,7 +170937,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -170897,7 +170957,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -170908,7 +170968,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -170925,7 +170985,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -170959,7 +171019,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -170995,7 +171055,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -171043,7 +171103,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -171136,7 +171196,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -171152,7 +171212,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -171167,7 +171227,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171228,7 +171288,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -171249,12 +171309,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25407) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25415) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -171281,7 +171341,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171424,7 +171484,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -171531,7 +171591,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -171574,7 +171634,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -171595,7 +171655,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -171634,7 +171694,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -171649,7 +171709,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171662,7 +171722,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -171737,7 +171797,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -171793,7 +171853,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -171829,7 +171889,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -171837,7 +171897,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -171859,7 +171919,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -171907,7 +171967,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -171963,7 +172023,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -172062,7 +172122,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -172096,7 +172156,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -172331,7 +172391,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -172366,7 +172426,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172416,7 +172476,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -172447,7 +172507,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -172476,7 +172536,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -172591,7 +172651,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -172621,7 +172681,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -172652,7 +172712,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -172663,7 +172723,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -172752,7 +172812,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -172766,7 +172826,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -172791,7 +172851,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -172799,7 +172859,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+25421, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25429, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -172811,12 +172871,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25441, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25449, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25473, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25481, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -172830,7 +172890,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -173059,7 +173119,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -173068,7 +173128,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -173076,7 +173136,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -173084,7 +173144,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25510, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25518, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -173105,7 +173165,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -173118,11 +173178,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25655 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25663 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -173130,7 +173190,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11628, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11636, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -173162,7 +173222,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -173173,8 +173233,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25711, ts + 5414, ts + 16572, -} /* sqlite3.c:199185:21 */ + ts + 25719, ts + 5414, ts + 16580, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -173198,9 +173258,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -173217,19 +173277,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25716, + ts+25724, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25778, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25786, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25783, + ts+25791, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25847, + ts+25855, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25917, + ts+25925, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -173260,7 +173320,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25966 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25974 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -173272,7 +173332,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+26074, + ts+26082, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -173280,18 +173340,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+26119, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+26127, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+13099, 1) + Xsqlite3_str_append(tls, p, ts+13107, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+26146, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+26154, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+26168, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+26176, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+26176, 0) + Xsqlite3_str_appendf(tls, p, ts+26184, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -173307,24 +173367,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 26192, - ts + 26245, + ts + 26200, + ts + 26253, - ts + 26290, - ts + 26342, - ts + 26396, + ts + 26298, + ts + 26350, + ts + 26404, - ts + 26441, - ts + 26499, - ts + 26554, -} /* sqlite3.c:199232:21 */ + ts + 26449, + ts + 26507, + ts + 26562, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173355,7 +173415,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -173363,7 +173423,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26601, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26609, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -173375,7 +173435,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26621, + ts+26629, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -173383,7 +173443,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26678, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26686, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -173393,7 +173453,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173408,7 +173468,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -173434,10 +173494,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26713, - ts + 26756, - ts + 26791, - ts + 26827, + ts + 26721, + ts + 26764, + ts + 26799, + ts + 26835, } // Aux columns counted by a u8 @@ -173474,7 +173534,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26864, + Xsqlite3_str_appendf(tls, pSql, ts+26872, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -173486,7 +173546,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26888, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26896, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -173509,7 +173569,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26894, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26902, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -173608,7 +173668,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26897, ts + 26908} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26905, ts + 26916} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -173624,7 +173684,7 @@ var azFormat = [2]uintptr{ts + 26897, ts + 26908} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -173668,11 +173728,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+11208, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26918, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26926, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26924, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26932, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26928, 1) + Xsqlite3_str_append(tls, pOut, ts+26936, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -173687,11 +173747,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26930, -1) + Xsqlite3_result_error(tls, ctx, ts+26938, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -173719,15 +173779,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -173740,7 +173800,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173768,7 +173828,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -173780,7 +173840,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26963, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26971, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4416 /* "\n" */ @@ -173808,7 +173868,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -173816,7 +173876,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26970, + ts+26978, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -173835,7 +173895,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+27015, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+27023, libc.VaList(bp+16, iNode)) } } @@ -173852,15 +173912,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 27047, - ts + 27101, + ts + 27055, + ts + 27109, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -173875,23 +173935,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+27149, + rtreeCheckAppendMsg(tls, pCheck, ts+27157, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 27194 /* "%_rowid" */ + return ts + 27202 /* "%_rowid" */ } - return ts + 27202 /* "%_parent" */ + return ts + 27210 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+27211, + ts+27219, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 27194 /* "%_rowid" */ + return ts + 27202 /* "%_rowid" */ } - return ts + 27202 /* "%_parent" */ + return ts + 27210 /* "%_parent" */ }(), iKey, iVal)) } } @@ -173908,7 +173968,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -173934,7 +173994,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+27269, libc.VaList(bp, i, iCell, iNode)) + ts+27277, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -173954,7 +174014,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+27317, libc.VaList(bp+24, i, iCell, iNode)) + ts+27325, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -173966,7 +174026,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -173977,14 +174037,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+27384, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+27392, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+27418, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27426, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -173992,7 +174052,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+27448, + ts+27456, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -174020,20 +174080,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27503, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27511, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27534, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27542, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -174043,7 +174103,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -174063,13 +174123,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14835, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14843, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27601, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27609, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -174079,12 +174139,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+25421, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25429, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27629, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27637, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -174099,8 +174159,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27660, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27667, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27668, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27675, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -174110,7 +174170,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27675, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27683, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -174150,13 +174210,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27679, -1) + ts+27687, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -174174,7 +174234,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 18255 /* "ok" */ + return ts + 18263 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -174213,7 +174273,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -174239,7 +174299,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -174261,7 +174321,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -174278,7 +174338,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -174288,10 +174348,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -174301,7 +174361,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -174310,7 +174370,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174382,7 +174442,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -174524,7 +174584,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174593,7 +174653,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -174606,7 +174666,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174615,11 +174675,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27730, 1) + Xsqlite3_str_append(tls, x, ts+27738, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27732, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27740, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27743, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27751, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -174629,7 +174689,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -174643,19 +174703,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27754, 0) + Xsqlite3_str_appendf(tls, x, ts+27762, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27772, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27780, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27780, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27788, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27788, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27796, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27792, 0) + Xsqlite3_str_appendf(tls, x, ts+27800, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -174675,7 +174735,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -174708,7 +174768,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -174728,7 +174788,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -174747,7 +174807,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -174783,7 +174843,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -174803,7 +174863,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174848,7 +174908,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174989,7 +175049,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -175002,13 +175062,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -175042,7 +175102,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -175069,7 +175129,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -175110,7 +175170,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -175148,7 +175208,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -175180,10 +175240,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -175194,20 +175254,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -175241,7 +175301,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -175253,7 +175313,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -175283,7 +175343,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -175313,7 +175373,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -175348,7 +175408,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -175378,7 +175438,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175614,7 +175674,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -175630,7 +175690,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -175640,7 +175700,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -175680,7 +175740,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27805, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27813, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -175689,7 +175749,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27827, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27835, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -175697,7 +175757,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26894, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26902, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -175755,12 +175815,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -175774,7 +175834,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -175941,7 +176001,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -175967,7 +176027,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16572 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16580 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -175977,7 +176037,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27831 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27839 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -175985,14 +176045,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27837 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27845 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176057,7 +176117,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -176124,7 +176184,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27846, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27854, 0) __4: ; goto geopoly_update_end @@ -176268,15 +176328,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27886) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27894) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27902) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27910) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -176309,9 +176369,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -176341,7 +176401,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27917, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27925, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -176353,26 +176413,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27925 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27938 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27951 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27964 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27902 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27976 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27886 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27999 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28013 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28026 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28040 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28056 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27933 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27946 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27959 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27972 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27910 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27984 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27894 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 28007 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28021 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28034 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28048 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28064 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 28068 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 28076 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -176380,30 +176440,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+28087, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28095, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+28097, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28105, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+28108, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+28116, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27831, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27839, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+28119, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28127, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -176417,7 +176477,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -176426,7 +176486,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -176447,7 +176507,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -176475,13 +176535,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25407, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25415, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -176501,7 +176561,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -176957,7 +177017,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -177358,7 +177418,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -177423,7 +177483,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -177485,7 +177545,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -177517,9 +177577,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -177534,16 +177594,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -177551,9 +177611,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -177572,16 +177632,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -177600,7 +177660,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -177623,7 +177683,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -177643,7 +177703,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -177733,7 +177793,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -177758,7 +177818,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -177775,7 +177835,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+28129, -1) + Xsqlite3_result_error(tls, context, ts+28137, -1) return } @@ -177786,7 +177846,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+28129, -1) + Xsqlite3_result_error(tls, context, ts+28137, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -177801,7 +177861,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -177819,7 +177879,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -177843,7 +177903,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -177858,7 +177918,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -177876,7 +177936,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -177906,7 +177966,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -177920,7 +177980,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -177929,7 +177989,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+28150, uintptr(0), uintptr(0), p+64) + ts+28158, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -178001,7 +178061,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -178013,7 +178073,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+25320, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+25328, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -178031,7 +178091,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178041,9 +178101,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+28321, libc.VaList(bp, func() uintptr { + ts+28329, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28471 /* "AND rootpage!=0 ..." */ + return ts + 28479 /* "AND rootpage!=0 ..." */ } return ts + 1527 /* "" */ }()))) @@ -178051,7 +178111,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28512) + ts+28520) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -178066,7 +178126,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -178092,7 +178152,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -178118,7 +178178,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -178135,7 +178195,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -178158,7 +178218,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -178181,7 +178241,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178231,7 +178291,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -178252,7 +178312,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+28637, libc.VaList(bp, zTab))) + ts+28645, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -178270,7 +178330,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+28756, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28764, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -178288,7 +178348,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28777, libc.VaList(bp+16, zIdx))) + ts+28785, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -178312,7 +178372,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28828, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28836, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -178352,7 +178412,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -178362,7 +178422,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.X__builtin___memcpy_chk(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol), libc.X__builtin_object_size(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+28849, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28857, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -178377,7 +178437,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.X__builtin___memset_chk(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol), libc.X__builtin_object_size(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -178410,7 +178470,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -178427,7 +178487,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19803, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19811, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -178440,18 +178500,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28906, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28914, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28925, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28933, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28930, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28938, zName) { bRbuRowid = 1 } } @@ -178463,12 +178523,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28940, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28948, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28969 /* "may not have" */ + return ts + 28977 /* "may not have" */ } - return ts + 28982 /* "requires" */ + return ts + 28990 /* "requires" */ }())) } @@ -178477,7 +178537,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28991, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28999, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -178491,7 +178551,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29013, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29021, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -178532,7 +178592,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -178541,8 +178601,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29040, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14946 /* ", " */ + zList = rbuMPrintf(tls, p, ts+29048, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14954 /* ", " */ } return zList } @@ -178551,7 +178611,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -178563,7 +178623,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+29049, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+29057, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -178593,7 +178653,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -178602,25 +178662,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+29062, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+29070, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+29094, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+29102, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14946, ts+29117) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29123, ts+29130, ts+5311) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14946, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14954, ts+29125) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+29131, ts+29138, ts+5311) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14954, ts+1527) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+29138, + ts+29146, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+29180, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -178652,7 +178712,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -178683,7 +178743,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -178720,7 +178780,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 29200 /* "_rowid_" */ + zCol = ts + 29208 /* "_rowid_" */ __7: ; goto __5 @@ -178729,13 +178789,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+29208, + zLhs = rbuMPrintf(tls, p, ts+29216, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+29229, + zOrder = rbuMPrintf(tls, p, ts+29237, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+29265, + zSelect = rbuMPrintf(tls, p, ts+29273, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ iCol++ goto __1 __2: @@ -178754,7 +178814,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+29292, + Xsqlite3_mprintf(tls, ts+29300, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -178781,8 +178841,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+29340, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14946 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+29348, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14954 /* ", " */ goto __15 __15: iCol++ @@ -178794,7 +178854,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+29347, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29355, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -178833,7 +178893,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -178851,7 +178911,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -178863,7 +178923,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+29359, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29367, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1527 /* "" */ } else { @@ -178877,37 +178937,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 29200 /* "_rowid_" */ + zCol = ts + 29208 /* "_rowid_" */ } else { - zCol = ts + 28930 /* "rbu_rowid" */ + zCol = ts + 28938 /* "rbu_rowid" */ } zType = ts + 1092 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+29381, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29389, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 29117 + return ts + 29125 } return ts + 1527 }() - zImpPK = Xsqlite3_mprintf(tls, ts+29401, + zImpPK = Xsqlite3_mprintf(tls, ts+29409, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+29422, + zImpCols = Xsqlite3_mprintf(tls, ts+29430, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29455, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29463, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14946 /* ", " */ - zAnd = ts + 21823 /* " AND " */ + zCom = ts + 14954 /* ", " */ + zAnd = ts + 21831 /* " AND " */ nBind++ } @@ -178944,7 +179004,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -178955,11 +179015,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29479, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29487, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29491, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29499, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14946 /* ", " */ + zS = ts + 14954 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -178968,7 +179028,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29500, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29508, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -178982,24 +179042,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29515, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29523, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1527 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29529, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21823 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29537, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21831 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29541, libc.VaList(bp+40, zList)) + ts+29549, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1527 /* "" */ @@ -179007,8 +179067,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29591, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21823 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29599, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21831 /* " AND " */ } } } @@ -179020,9 +179080,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29604, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29612, 0) } // Return a nul-terminated string containing the comma separated list of @@ -179040,7 +179100,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -179055,17 +179115,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29591, + zList = rbuMPrintf(tls, p, ts+29599, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29630, + zList = rbuMPrintf(tls, p, ts+29638, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29660, + zList = rbuMPrintf(tls, p, ts+29668, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } } } @@ -179086,7 +179146,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -179116,26 +179176,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29697 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29705 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28849, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28857, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16460) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16468) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp+8, zIdx))) } break } @@ -179148,15 +179208,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 29117 /* " DESC" */ + zDesc = ts + 29125 /* " DESC" */ } else { zDesc = ts + 1527 /* "" */ } - z = rbuMPrintf(tls, p, ts+29710, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14946 /* ", " */ + z = rbuMPrintf(tls, p, ts+29718, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14954 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29721, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29729, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -179179,7 +179239,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -179196,7 +179256,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29725) + ts+29733) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -179205,7 +179265,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28877, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28885, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -179215,23 +179275,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29775, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29783, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29797, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29805, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 29117 /* " DESC" */ + return ts + 29125 /* " DESC" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14946 /* ", " */ + zComma = ts + 14954 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29807, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29815, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29822, + ts+29830, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 0, 0)) } @@ -179255,7 +179315,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -179277,32 +179337,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29884 /* "PRIMARY KEY " */ + zPk = ts + 29892 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29897, + zSql = rbuMPrintf(tls, p, ts+29905, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29924 /* " NOT NULL" */ + return ts + 29932 /* " NOT NULL" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14946 /* ", " */ + zComma = ts + 14954 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29934, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29942, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29941, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29949, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29973 /* " WITHOUT ROWID" */ + return ts + 29981 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) @@ -179319,7 +179379,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -179329,12 +179389,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29988, + ts+29996, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -179356,7 +179416,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -179366,7 +179426,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+30045) + ts+30053) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -179464,7 +179524,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -179476,7 +179536,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+30111, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+30119, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -179500,7 +179560,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30131, + ts+30139, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, 0, 0)) @@ -179509,14 +179569,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+30196, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+30204, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+30232, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+30240, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -179533,7 +179593,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+30266, + ts+30274, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -179541,9 +179601,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 30327 /* "AND" */ + return ts + 30335 /* "AND" */ } - return ts + 30331 /* "WHERE" */ + return ts + 30339 /* "WHERE" */ }() } return ts + 1527 /* "" */ @@ -179552,21 +179612,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+30337, + ts+30345, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+30398, + ts+30406, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 30327 /* "AND" */ + return ts + 30335 /* "AND" */ } - return ts + 30331 /* "WHERE" */ + return ts + 30339 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -179604,17 +179664,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1527 } - return ts + 30557 + return ts + 30565 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+30566, + ts+30574, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30602 /* ", _rowid_" */ + return ts + 30610 /* ", _rowid_" */ } return ts + 1527 /* "" */ }(), zBindings))) @@ -179626,28 +179686,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30612, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30620, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30640 /* ", rbu_rowid" */ + zRbuRowid = ts + 30648 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30652, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30660, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30728 /* ", 0 AS rbu_rowid" */ + return ts + 30736 /* ", 0 AS rbu_rowid" */ } return ts + 1527 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30745, + ts+30753, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -179655,7 +179715,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31044, + ts+31052, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -179669,9 +179729,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 31143 /* ",_rowid_ " */ + zRbuRowid = ts + 31151 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 31153 /* ",rbu_rowid" */ + zRbuRowid = ts + 31161 /* ",rbu_rowid" */ } } @@ -179684,20 +179744,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+29200, 0) + zOrder = rbuMPrintf(tls, p, ts+29208, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14946, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14954, ts+1527) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+31164, + ts+31172, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 31212 /* "0 AS " */ + return ts + 31220 /* "0 AS " */ } return ts + 1527 /* "" */ }(), @@ -179710,7 +179770,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 20157 /* "ORDER BY" */ + return ts + 20165 /* "ORDER BY" */ } return ts + 1527 /* "" */ }(), zOrder, @@ -179739,7 +179799,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -179790,9 +179850,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30557 /* "rbu_imp_" */ + zPrefix = ts + 30565 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+31218, + zUpdate = Xsqlite3_mprintf(tls, ts+31226, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -179805,7 +179865,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179828,7 +179888,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -179844,7 +179904,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -179860,7 +179920,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+31248, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+31256, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -179928,7 +179988,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -179940,21 +180000,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6735, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6735) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31278, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31286, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31305, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31313, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.X__builtin___memcpy_chk(tls, p+48, ts+3230, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } else { libc.X__builtin___memcpy_chk(tls, p+48, ts+6735, uint64(4), libc.X__builtin_object_size(tls, p+48, 0)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31323, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31331, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -179994,11 +180054,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31389, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31397, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24470, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24478, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -180010,13 +180070,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+31421, + zTarget = Xsqlite3_mprintf(tls, ts+31429, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6735), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ } - return ts + 31453 /* "&" */ + return ts + 31461 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ @@ -180035,21 +180095,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31455, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31463, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31470, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31478, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31487, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31495, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -180057,7 +180117,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6735, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31503, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31511, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -180068,7 +180128,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31531, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31539, 0) } } @@ -180090,7 +180150,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -180098,7 +180158,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180131,7 +180191,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -180139,7 +180199,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31503, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31511, uintptr(0), uintptr(0), uintptr(0)) } } @@ -180173,7 +180233,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31549, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31557, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -180223,7 +180283,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180609,7 +180669,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31623) + ts+31631) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -180622,7 +180682,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31645, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31653, libc.VaList(bp, iCookie+1)) } } } @@ -180630,7 +180690,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -180647,7 +180707,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31672, + ts+31680, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -180685,16 +180745,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31830, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31838, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31845, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31853, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -180704,18 +180764,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31865, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31873, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31890) + ts+31898) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -180729,12 +180789,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31998) + ts+32006) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+32063) + ts+32071) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -180746,7 +180806,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32107, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32115, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -180754,7 +180814,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180768,8 +180828,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17561) - rbuCopyPragma(tls, p, ts+16656) + rbuCopyPragma(tls, p, ts+17569) + rbuCopyPragma(tls, p, ts+16664) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -180780,7 +180840,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+32132, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+32140, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -180806,10 +180866,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14858, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14858, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -180897,7 +180957,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -180915,7 +180975,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -180930,7 +180990,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32160, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32168, 0) } if rc == SQLITE_OK { @@ -180945,11 +181005,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31609, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31617, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -180964,7 +181024,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -180973,7 +181033,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32185, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+32193, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -180985,7 +181045,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -180995,7 +181055,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -181012,7 +181072,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+32196, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+32204, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -181044,7 +181104,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181055,7 +181115,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+32268, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32276, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -181063,7 +181123,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32282) + ts+32290) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -181075,7 +181135,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32339) + ts+32347) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -181086,7 +181146,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -181158,7 +181218,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32413, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32421, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -181180,12 +181240,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32445, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32453, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32477 /* "vacuum" */ + return ts + 32485 /* "vacuum" */ } - return ts + 32484 /* "update" */ + return ts + 32492 /* "update" */ }())) } } @@ -181193,7 +181253,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14835, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14843, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -181207,14 +181267,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+17275) - rbuCopyPragma(tls, p, ts+16671) + rbuCopyPragma(tls, p, ts+17283) + rbuCopyPragma(tls, p, ts+16679) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32491, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32499, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -181224,7 +181284,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6735, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32507, uintptr(0), uintptr(0), p+64) + db, ts+32515, uintptr(0), uintptr(0), p+64) } } @@ -181259,7 +181319,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -181270,7 +181330,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -181278,13 +181338,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32531, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32539, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -181293,7 +181353,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -181309,12 +181369,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30557, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30565, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -181327,13 +181387,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14858, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -181347,7 +181407,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14850, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14858, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -181359,7 +181419,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32539, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32547, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -181392,13 +181452,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -181431,7 +181491,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -181449,7 +181509,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -181458,7 +181518,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14850, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14858, uintptr(0), uintptr(0), uintptr(0)) } } @@ -181477,19 +181537,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14850, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14858, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14835 /* "BEGIN" */ + zBegin = ts + 14843 /* "BEGIN" */ } else { - zBegin = ts + 32491 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32499 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32491, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32499, uintptr(0), uintptr(0), uintptr(0)) } } @@ -181556,7 +181616,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -181573,7 +181633,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -181591,7 +181651,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -181613,7 +181673,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -181638,7 +181698,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -181653,7 +181713,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -181685,7 +181745,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -181694,20 +181754,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -181771,7 +181831,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -181810,7 +181870,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -181824,7 +181884,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -181838,7 +181898,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -181858,7 +181918,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -181878,7 +181938,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -181886,7 +181946,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -181894,7 +181954,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -181921,7 +181981,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32566, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32574, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -181946,7 +182006,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32589, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32597, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -181957,7 +182017,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -181965,7 +182025,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -181973,7 +182033,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -182006,7 +182066,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -182063,13 +182123,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -182092,7 +182152,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -182134,7 +182194,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32600, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32608, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -182178,10 +182238,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -182190,7 +182250,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182235,7 +182295,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -182243,7 +182303,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -182253,7 +182313,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -182261,7 +182321,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -182269,7 +182329,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -182278,7 +182338,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -182287,7 +182347,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -182295,7 +182355,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -182303,13 +182363,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -182323,7 +182383,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -182384,17 +182444,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -182477,7 +182537,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -182548,7 +182608,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -182558,16 +182618,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -182581,13 +182641,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -182595,13 +182655,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -182611,13 +182671,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -182630,7 +182690,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -182638,7 +182698,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -182660,7 +182720,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182748,7 +182808,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -182759,7 +182819,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -182782,14 +182842,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -182799,7 +182859,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -182812,7 +182872,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -182878,7 +182938,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182904,7 +182964,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182947,7 +183007,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -182986,7 +183046,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -183025,7 +183085,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -183052,7 +183112,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -183127,7 +183187,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -183215,7 +183275,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -183279,7 +183339,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -183296,13 +183356,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11628, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11636, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32611, 0) + ts+32619, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1527, 0) } else { @@ -183315,7 +183375,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32732, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32740, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -183410,7 +183470,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183427,7 +183487,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11628, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11636, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -183446,15 +183506,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183470,7 +183530,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183486,21 +183546,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -183614,7 +183674,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -183910,7 +183970,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -183945,7 +184005,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183980,25 +184040,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -184018,24 +184078,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -184043,13 +184103,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -184065,7 +184125,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -184075,9 +184135,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32761, + zRet = Xsqlite3_mprintf(tls, ts+32769, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ if zRet == uintptr(0) { break } @@ -184087,7 +184147,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -184100,9 +184160,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32795, + ts+32803, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32836 /* " OR " */ + zSep = ts + 32844 /* " OR " */ if zRet == uintptr(0) { break } @@ -184117,18 +184177,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32841, + ts+32849, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184156,7 +184216,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -184168,7 +184228,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32919, + ts+32927, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -184193,7 +184253,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -184306,7 +184366,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32972, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32980, 0) __16: ; rc = SQLITE_SCHEMA @@ -184366,7 +184426,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -184402,7 +184462,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -184424,7 +184484,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184462,7 +184522,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -184474,7 +184534,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -184525,7 +184585,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -184570,7 +184630,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -184593,7 +184653,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -184604,7 +184664,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -184615,7 +184675,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.X__builtin___memcpy_chk(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob), libc.X__builtin_object_size(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), 0)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -184628,7 +184688,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.X__builtin___memcpy_chk(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr), libc.X__builtin_object_size(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), 0)) @@ -184642,7 +184702,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -184659,7 +184719,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -184680,7 +184740,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -184740,7 +184800,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -184846,7 +184906,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184903,7 +184963,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -184911,10 +184971,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11628, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11636, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32999, libc.VaList(bp, zDb)) + ts+33007, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -184923,18 +184983,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1527 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+33109, bp+24) + sessionAppendStr(tls, bp+8, ts+33117, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1540, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+33124, bp+24) + sessionAppendStr(tls, bp+8, ts+33132, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+33132, bp+24) + sessionAppendStr(tls, bp+8, ts+33140, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -184954,7 +185014,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -185032,7 +185092,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -185053,7 +185113,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -185075,7 +185135,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+33138, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+33146, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -185173,7 +185233,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+33158, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33166, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -185183,7 +185243,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -185195,7 +185255,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -185203,7 +185263,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -185215,7 +185275,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -185223,7 +185283,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -185235,7 +185295,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -185248,7 +185308,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -185262,12 +185322,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -185293,12 +185353,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -185331,28 +185391,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -185370,7 +185430,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185403,7 +185463,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185428,7 +185488,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -185464,7 +185524,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -185482,7 +185542,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -185507,7 +185567,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -185549,7 +185609,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185568,7 +185628,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -185595,7 +185655,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185637,7 +185697,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185657,7 +185717,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -185692,7 +185752,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -185749,13 +185809,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -185825,7 +185885,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -185856,7 +185916,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185876,14 +185936,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -185897,7 +185957,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -185916,7 +185976,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -185938,7 +185998,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -185962,7 +186022,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -185979,7 +186039,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -185991,7 +186051,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -186008,7 +186068,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -186244,7 +186304,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -186295,7 +186355,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -186310,7 +186370,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -186332,9 +186392,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -186356,9 +186416,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -186366,7 +186426,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186427,7 +186487,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11628) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11636) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -186439,24 +186499,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.X__builtin___memcpy_chk(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0))), libc.X__builtin_object_size(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, 0)) - sessionAppendStr(tls, bp, ts+33176, bp+16) + sessionAppendStr(tls, bp, ts+33184, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+33189, bp+16) + sessionAppendStr(tls, bp, ts+33197, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33195, bp+16) + sessionAppendStr(tls, bp, ts+33203, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14946 /* ", " */ + zSep = ts + 14954 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1527 /* "" */ - sessionAppendStr(tls, bp, ts+33124, bp+16) + sessionAppendStr(tls, bp, ts+33132, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -186464,13 +186524,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+33200, bp+16) + ts+33208, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33132, bp+16) + sessionAppendStr(tls, bp, ts+33140, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ } } @@ -186500,7 +186560,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -186528,7 +186588,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186538,34 +186598,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+33275, bp+16) + sessionAppendStr(tls, bp, ts+33283, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+33124, bp+16) + sessionAppendStr(tls, bp, ts+33132, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33195, bp+16) + sessionAppendStr(tls, bp, ts+33203, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21823 /* " AND " */ + zSep = ts + 21831 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+33293, bp+16) + sessionAppendStr(tls, bp, ts+33301, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32836, bp+16) + sessionAppendStr(tls, bp, ts+32844, bp+16) zSep = ts + 1527 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+33132, bp+16) + sessionAppendStr(tls, bp, ts+33140, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 33301 /* "AND " */ + zSep = ts + 33309 /* "AND " */ } } sessionAppendStr(tls, bp, ts+5311, bp+16) @@ -186590,7 +186650,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6735, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -186602,7 +186662,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186610,19 +186670,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+33306, bp+16) + sessionAppendStr(tls, bp, ts+33314, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21829, bp+16) + sessionAppendStr(tls, bp, ts+21837, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14946, bp+16) + sessionAppendStr(tls, bp, ts+14954, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+33324, bp+16) + sessionAppendStr(tls, bp, ts+33332, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+33335, bp+16) + sessionAppendStr(tls, bp, ts+33343, bp+16) } sessionAppendStr(tls, bp, ts+5311, bp+16) @@ -186633,7 +186693,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -186641,24 +186701,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11628, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11636, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+33339) + ts+33347) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33452) + ts+33460) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -186685,7 +186745,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186706,7 +186766,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -186730,7 +186790,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186774,7 +186834,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186846,7 +186906,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186946,7 +187006,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187081,7 +187141,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187103,7 +187163,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33596, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33604, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -187119,7 +187179,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33617, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33625, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -187128,7 +187188,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187182,7 +187242,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -187200,10 +187260,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33636, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33644, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33662, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33670, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -187273,20 +187333,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33692, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33700, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33736, + ts+33744, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33807, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33815, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11628) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11636) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -187344,14 +187404,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33867, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33875, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33897, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33905, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33921, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33897, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33929, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33905, uintptr(0), uintptr(0), uintptr(0)) } } @@ -187373,7 +187433,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187391,7 +187451,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -187399,7 +187459,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187414,7 +187474,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -187422,7 +187482,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -187594,7 +187654,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -187725,7 +187785,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -187779,7 +187839,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -187794,7 +187854,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187812,12 +187872,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187834,12 +187894,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -187847,7 +187907,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187871,7 +187931,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187898,7 +187958,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -187939,7 +187999,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -188001,7 +188061,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -188139,7 +188199,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -188154,7 +188214,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188169,7 +188229,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188185,7 +188245,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188201,7 +188261,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -188209,7 +188269,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -188297,7 +188357,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -188359,13 +188419,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -188403,14 +188463,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -188425,7 +188485,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -188436,7 +188496,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -188446,19 +188506,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -188491,7 +188551,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -188502,16 +188562,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -188526,7 +188586,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -188537,7 +188597,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -188554,7 +188614,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -188563,7 +188623,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -188582,7 +188642,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -188593,7 +188653,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -188609,7 +188669,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -188618,7 +188678,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -188630,9 +188690,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -188642,25 +188702,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -188668,17 +188728,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -188783,7 +188843,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -188856,7 +188916,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -188871,23 +188931,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -188924,9 +188984,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -188935,9 +188995,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -188947,7 +189007,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -188966,7 +189026,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -188982,7 +189042,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -189040,7 +189100,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -189048,7 +189108,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -189061,7 +189121,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -189085,7 +189145,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -189109,7 +189169,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -189120,7 +189180,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -189130,7 +189190,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33949, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33957, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -189139,7 +189199,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -189188,7 +189248,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -189221,7 +189281,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -189233,7 +189293,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189443,7 +189503,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189453,14 +189513,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33977, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33985, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -189489,7 +189549,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189544,7 +189604,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -189607,7 +189667,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -189658,11 +189718,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -189705,7 +189765,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.X__builtin___memset_chk(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{})), libc.X__builtin_object_size(tls, pIter, 0)) @@ -189738,12 +189798,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -189752,7 +189812,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -189760,7 +189820,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34008, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34016, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -189768,7 +189828,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189823,7 +189883,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -189834,7 +189894,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 34015 /* "wrong number of ..." */ + var zErr uintptr = ts + 34023 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -189883,19 +189943,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -189919,7 +189979,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -189948,7 +190008,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -190006,7 +190066,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -190015,7 +190075,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -190038,7 +190098,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 34065 /* "wrong number of ..." */ + var zErr uintptr = ts + 34073 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -190230,17 +190290,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -190251,7 +190311,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -190345,7 +190405,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -190413,18 +190473,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 34113, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 34121, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 34129, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 34131, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 34139, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -190449,7 +190509,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -190464,7 +190524,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -190490,7 +190550,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -190502,21 +190562,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -190534,7 +190594,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -190546,7 +190606,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -190564,7 +190624,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -190580,26 +190640,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.X__builtin___memset_chk(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{})), libc.X__builtin_object_size(tls, pBuf, 0)) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190661,14 +190721,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.X__builtin___memset_chk(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{})), libc.X__builtin_object_size(tls, pIter, 0)) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -190680,7 +190740,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -190692,9 +190752,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190711,7 +190771,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -190732,7 +190792,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -190757,7 +190817,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -190782,13 +190842,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190797,7 +190857,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190843,7 +190903,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -190875,18 +190935,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -190899,7 +190959,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -190910,11 +190970,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -191003,7 +191063,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -191048,7 +191108,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -191061,11 +191121,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -191093,13 +191153,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+34136, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34144, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -191126,14 +191186,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34143, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34151, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+34174, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+34182, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -191144,7 +191204,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34207, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34215, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -191157,7 +191217,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34244, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34252, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -191166,7 +191226,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34253, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34261, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -191185,7 +191245,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34286, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34294, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -191200,14 +191260,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34320, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34328, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34328, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34336, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34360, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34368, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -191215,9 +191275,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34366, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34374, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34380, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34388, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -191225,9 +191285,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+34418, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34426, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34429, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34437, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -191238,25 +191298,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5429, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 8308, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17666}, - {FzName: ts + 34464, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17674}, + {FzName: ts + 34472, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34472, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34480, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34503, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34511, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -191274,7 +191334,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -191308,20 +191368,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22464) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16572) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34531, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22472) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16580) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34539, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34561) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34569) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34571, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34579, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -191331,7 +191391,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -191339,13 +191399,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34602, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34610, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34607, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34615, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34614, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34622, libc.VaList(bp+16, i)) } } } @@ -191364,7 +191424,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -191393,8 +191453,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22464) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34622, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22472) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34630, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -191428,7 +191488,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34651, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34659, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -191469,19 +191529,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 34320 /* "content" */ + zTail = ts + 34328 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34671 /* "docsize" */ + zTail = ts + 34679 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34679, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34687, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16572, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16580, -1) } // Formulate the zContentExprlist text @@ -191497,7 +191557,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -191522,7 +191582,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -191530,18 +191590,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34690, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34698, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1527 } - return ts + 14946 + return ts + 14954 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34706, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34714, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34713, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22464)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34721, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22472)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -191572,7 +191632,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -191586,7 +191646,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -191613,7 +191673,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191677,13 +191737,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34739) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34747) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -191693,7 +191753,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34744) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34752) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -191703,7 +191763,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34753) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34761) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -191716,7 +191776,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34763) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34771) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -191726,7 +191786,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34773) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34781) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -191742,7 +191802,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22464) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22472) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -191765,11 +191825,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34785 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34793 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -191792,7 +191852,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34817) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34825) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -191807,7 +191867,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34825, + ts+34833, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -191842,7 +191902,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -191861,9 +191921,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -191875,12 +191935,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191942,7 +192002,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34890, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34898, 0) return FTS5_EOF } } @@ -191955,20 +192015,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34910, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34918, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34941, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34949, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34944, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34952, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30327, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30335, uint64(3)) == 0 { tok = FTS5_AND } break @@ -191980,15 +192040,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -192066,7 +192126,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -192141,7 +192201,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -192153,7 +192213,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -192161,7 +192221,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -192202,7 +192262,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -192224,7 +192284,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -192388,7 +192448,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -192613,11 +192673,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -192625,7 +192685,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{})), libc.X__builtin_object_size(tls, p, 0)) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -192637,9 +192697,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -192656,7 +192716,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -192858,7 +192918,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -192878,7 +192938,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -192905,7 +192965,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192962,7 +193022,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -193028,7 +193088,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -193044,7 +193104,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -193053,7 +193113,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -193079,7 +193139,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -193098,7 +193158,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -193166,7 +193226,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -193225,7 +193285,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -193244,7 +193304,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -193262,7 +193322,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -193278,7 +193338,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -193304,7 +193364,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -193354,7 +193414,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -193366,7 +193426,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -193396,7 +193456,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -193412,7 +193472,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -193465,7 +193525,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -193527,7 +193587,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -193559,7 +193619,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -193575,15 +193635,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193593,7 +193653,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -193618,7 +193678,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -193630,7 +193690,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -193690,12 +193750,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193764,12 +193824,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -193780,12 +193840,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -193802,7 +193862,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -193860,7 +193920,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -193955,17 +194015,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34948, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34956, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33977, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33985, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -193977,7 +194037,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34953, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34961, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -193996,7 +194056,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -194034,7 +194094,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -194056,7 +194116,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194074,7 +194134,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20826, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20834, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -194095,7 +194155,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -194110,7 +194170,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -194134,7 +194194,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -194162,21 +194222,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34982, 0) + ts+34990, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -194227,7 +194287,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.X__builtin___memcpy_chk(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte), libc.X__builtin_object_size(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, 0)) @@ -194247,7 +194307,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -194290,7 +194350,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194350,12 +194410,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+35035, + ts+35043, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 35085 /* "phrase" */ + return ts + 35093 /* "phrase" */ } - return ts + 34948 /* "NEAR" */ + return ts + 34956 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -194378,7 +194438,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -194424,7 +194484,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -194437,7 +194497,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -194447,7 +194507,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -194456,7 +194516,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -194477,7 +194537,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -194501,12 +194561,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -194516,7 +194576,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -194551,7 +194611,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -194579,7 +194639,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -194590,7 +194650,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -194640,12 +194700,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -194696,7 +194756,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -194712,14 +194772,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -194747,7 +194807,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -194756,7 +194816,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -194770,7 +194830,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -194779,7 +194839,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -194790,7 +194850,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -194820,7 +194880,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -194869,7 +194929,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -195028,7 +195088,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195074,7 +195134,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -195116,7 +195176,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -195150,20 +195210,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -195389,7 +195449,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -195597,14 +195657,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -195612,17 +195672,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -195636,18 +195696,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -195669,18 +195729,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -195697,9 +195757,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -195707,38 +195767,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -195746,7 +195806,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -195764,7 +195824,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -195788,7 +195848,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -195799,7 +195859,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -195811,7 +195871,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -195838,7 +195898,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+35092, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+35100, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -195884,11 +195944,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -195900,7 +195960,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -195915,7 +195975,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -195926,7 +195986,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+35098, + ts+35106, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -195943,7 +196003,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -195954,7 +196014,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+35149, + ts+35157, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -195968,7 +196028,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -195978,7 +196038,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+35198, + ts+35206, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -195990,7 +196050,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -196001,22 +196061,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -196027,7 +196087,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -196069,7 +196129,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -196162,7 +196222,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -196182,7 +196242,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -196205,7 +196265,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -196233,7 +196293,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -196242,7 +196302,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+35238, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+35246, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -196266,7 +196326,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -196283,7 +196343,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -196297,7 +196357,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -196350,14 +196410,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -196400,7 +196460,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -196449,7 +196509,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -196485,7 +196545,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -196506,7 +196566,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -196519,7 +196579,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -196527,11 +196587,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -196552,7 +196612,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -196614,7 +196674,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -196637,12 +196697,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -196652,7 +196712,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -196694,16 +196754,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -196733,7 +196793,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -196762,7 +196822,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -196807,7 +196867,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -196839,7 +196899,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -196873,7 +196933,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -196895,7 +196955,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -196936,7 +196996,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -196995,7 +197055,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -197045,7 +197105,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -197053,7 +197113,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -197082,7 +197142,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -197187,7 +197247,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -197312,7 +197372,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -197412,7 +197472,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -197440,7 +197500,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -197674,7 +197734,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -197682,7 +197742,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+35261, + ts+35269, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -197693,7 +197753,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -197763,7 +197823,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -197819,7 +197879,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -197834,7 +197894,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -197886,7 +197946,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -197916,7 +197976,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -197966,7 +198026,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -197977,7 +198037,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -198000,7 +198060,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -198040,7 +198100,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -198051,7 +198111,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -198090,7 +198150,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -198115,12 +198175,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -198139,7 +198199,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -198156,21 +198216,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -198180,7 +198240,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -198206,7 +198266,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -198286,7 +198346,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -198342,7 +198402,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -198393,7 +198453,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -198454,7 +198514,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -198462,7 +198522,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -198482,7 +198542,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -198490,7 +198550,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -198506,7 +198566,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -198568,7 +198628,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -198590,7 +198650,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -198635,7 +198695,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -198838,7 +198898,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -198871,7 +198931,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -198879,13 +198939,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -198904,7 +198964,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -198917,7 +198977,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -198959,7 +199019,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -198972,7 +199032,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -198982,7 +199042,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -199003,7 +199063,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) @@ -199022,7 +199082,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -199044,7 +199104,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -199077,7 +199137,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -199087,7 +199147,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -199100,7 +199160,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -199116,7 +199176,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -199176,7 +199236,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -199212,14 +199272,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -199295,7 +199355,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -199324,7 +199384,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -199353,7 +199413,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -199377,7 +199437,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -199398,7 +199458,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+35345, + ts+35353, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -199417,7 +199477,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -199486,13 +199546,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -199651,7 +199711,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -199701,7 +199761,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -199718,7 +199778,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -199735,7 +199795,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -199744,14 +199804,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -199776,7 +199836,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -199954,7 +200014,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -199963,7 +200023,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -200024,7 +200084,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -200058,7 +200118,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -200083,12 +200143,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -200115,7 +200175,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -200147,7 +200207,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.X__builtin___memset_chk(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{})), libc.X__builtin_object_size(tls, pIter, 0)) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -200157,13 +200217,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -200180,7 +200240,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -200236,11 +200296,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -200251,7 +200311,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -200264,7 +200324,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -200429,7 +200489,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -200576,7 +200636,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -200596,7 +200656,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -200607,7 +200667,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -200618,7 +200678,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -200637,7 +200697,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -200648,13 +200708,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35402, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35410, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+25320, ts+35410, 0, pzErr) + pConfig, ts+25328, ts+35418, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11768, - ts+35445, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11776, + ts+35453, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -200671,7 +200731,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -200692,7 +200752,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -200719,7 +200779,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -200741,7 +200801,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -200765,7 +200825,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -200848,7 +200908,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -200856,7 +200916,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -200876,14 +200936,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -200901,7 +200961,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -200914,7 +200974,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -200936,7 +200996,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -200944,7 +201004,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -200953,7 +201013,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -200966,7 +201026,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+35092, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+35100, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -200975,7 +201035,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -200989,7 +201049,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -201009,7 +201069,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -201028,7 +201088,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -201087,7 +201147,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -201103,7 +201163,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35489, + ts+35497, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -201256,7 +201316,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -201315,7 +201375,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35575) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35583) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -201346,13 +201406,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -201385,7 +201445,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -201407,7 +201467,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -201415,9 +201475,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -201446,35 +201506,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -201508,21 +201568,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -201532,13 +201592,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -201556,7 +201616,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -201614,11 +201674,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -201627,14 +201687,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -201705,7 +201765,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -201726,7 +201786,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35580, 0) + ts+35588, 0) return SQLITE_ERROR } @@ -201867,7 +201927,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -201878,7 +201938,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -201904,7 +201964,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -201917,11 +201977,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -201964,7 +202024,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -201981,7 +202041,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -201991,7 +202051,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -202025,7 +202085,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -202045,7 +202105,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -202074,7 +202134,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -202133,7 +202193,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -202161,7 +202221,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -202190,11 +202250,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35619, + ts+35627, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14946 /* ", " */ + return ts + 14954 /* ", " */ } return ts + 1527 /* "" */ }(), @@ -202206,9 +202266,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35674 /* "DESC" */ + return ts + 35682 /* "DESC" */ } - return ts + 35679 /* "ASC" */ + return ts + 35687 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -202228,7 +202288,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -202243,7 +202303,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -202259,13 +202319,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35683, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35691, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5411, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35689, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35697, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -202275,7 +202335,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -202288,7 +202348,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -202300,7 +202360,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35717, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35725, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -202332,7 +202392,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35727, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35735, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -202341,7 +202401,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -202364,21 +202424,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35748, libc.VaList(bp, z)) + ts+35756, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 34131 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 34139 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -202397,7 +202457,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -202437,7 +202497,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35580, 0) + ts+35588, 0) return SQLITE_ERROR __1: ; @@ -202672,7 +202732,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35781, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35789, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -202718,7 +202778,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -202729,7 +202789,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -202743,7 +202803,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -202773,7 +202833,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -202817,7 +202877,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -202839,7 +202899,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -202847,29 +202907,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35817, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35825, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35828, 0) + ts+35836, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35908, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35916, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35916, 0) + ts+35924, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+17255, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+17263, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35972, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35980, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35978, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35986, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -202888,7 +202948,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -202898,7 +202958,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -202921,7 +202981,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -202943,7 +203003,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17800, z) { + 0 == Xsqlite3_stricmp(tls, ts+17808, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -202968,12 +203028,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35994, + ts+36002, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20727 /* "UPDATE" */ + return ts + 20735 /* "UPDATE" */ } - return ts + 36031 /* "DELETE from" */ + return ts + 36039 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -203023,7 +203083,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -203035,7 +203095,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -203044,7 +203104,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -203052,7 +203112,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -203060,46 +203120,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -203116,7 +203176,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -203173,7 +203233,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -203257,7 +203317,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -203267,7 +203327,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -203283,11 +203343,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -203299,7 +203359,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -203357,7 +203417,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -203395,7 +203455,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -203417,7 +203477,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -203439,7 +203499,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -203462,7 +203522,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -203495,7 +203555,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -203576,10 +203636,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -203615,7 +203675,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -203624,7 +203684,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -203634,7 +203694,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -203647,7 +203707,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+36043, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+36051, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -203657,7 +203717,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -203679,7 +203739,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -203743,7 +203803,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -203783,7 +203843,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -203802,12 +203862,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -203815,7 +203875,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -203824,7 +203884,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -203833,7 +203893,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -203842,7 +203902,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -203873,7 +203933,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -203902,7 +203962,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -203920,7 +203980,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -203936,7 +203996,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -203952,7 +204012,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36064, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36072, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -203971,7 +204031,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36086, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36094, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -203987,7 +204047,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -204013,28 +204073,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36117) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+36125) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+36130, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+36138, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -204045,10 +204105,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 36221, ts + 34320, ts + 25320, ts + 34671, ts + 11768, -} /* sqlite3.c:234311:21 */ + ts + 36229, ts + 34328, ts + 25328, ts + 34679, ts + 11776, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -204069,7 +204129,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+36228, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+36236, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -204087,13 +204147,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+36228, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36236, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+36233, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+36241, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -204131,7 +204191,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -204140,7 +204200,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -204148,7 +204208,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -204159,20 +204219,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 36248, - ts + 36316, - ts + 36385, + ts + 36256, + ts + 36324, + ts + 36393, - ts + 36418, - ts + 36457, - ts + 36497, - ts + 36536, - ts + 36577, + ts + 36426, + ts + 36465, + ts + 36505, + ts + 36544, + ts + 36585, - ts + 36616, + ts + 36624, - ts + 36658, - ts + 36698, + ts + 36666, + ts + 36706, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -204249,7 +204309,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -204271,79 +204331,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36721, + ts+36729, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36825, + ts+36833, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36863, + ts+36871, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36901, + ts+36909, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+25320, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11768, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+36221, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+25328, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11776, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+36229, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34671, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34679, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+34320, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34328, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36943, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36951, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29973 /* " WITHOUT ROWID" */ + return ts + 29981 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36973, + ts+36981, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -204356,7 +204416,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204385,27 +204445,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37017, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37025, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37040, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37048, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34320, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34328, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34671, ts+37046, 0, pzErr) + pConfig, ts+34679, ts+37054, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+36221, ts+37078, 1, pzErr) + pConfig, ts+36229, ts+37086, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34817, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34825, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -204417,7 +204477,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -204436,12 +204496,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -204458,7 +204518,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -204527,7 +204587,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204554,7 +204614,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -204568,7 +204628,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -204592,7 +204652,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204633,7 +204693,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -204645,12 +204705,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37095, + ts+37103, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37145, + ts+37153, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -204660,12 +204720,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34817, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34825, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -204729,15 +204789,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -204748,7 +204808,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204770,7 +204830,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -204802,7 +204862,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -204847,7 +204907,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -204855,7 +204915,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+37174, + zSql = Xsqlite3_mprintf(tls, ts+37182, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -204882,13 +204942,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -204954,7 +205014,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -205052,14 +205112,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34320, bp+48) + rc = fts5StorageCount(tls, p, ts+34328, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34671, bp+56) + rc = fts5StorageCount(tls, p, ts+34679, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -205079,7 +205139,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -205093,7 +205153,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -205103,7 +205163,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -205121,7 +205181,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205152,7 +205212,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -205170,7 +205230,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -205187,7 +205247,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -205201,12 +205261,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205261,13 +205321,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -205277,12 +205337,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -205298,9 +205358,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.X__builtin___memcpy_chk(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar)), libc.X__builtin_object_size(tls, p, 0)) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37206) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37214) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37217) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37225) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -205317,7 +205377,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -205329,7 +205389,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -205410,7 +205470,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -205420,11 +205480,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -205479,7 +205539,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -205501,7 +205561,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -205511,7 +205571,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -205531,7 +205591,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -205542,7 +205602,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 37228 /* "L* N* Co" */ + var zCat uintptr = ts + 37236 /* "L* N* Co" */ var i int32 libc.X__builtin___memset_chk(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{})), libc.X__builtin_object_size(tls, p, 0)) @@ -205555,7 +205615,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37237) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37245) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -205566,18 +205626,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37248) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37256) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37206) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37214) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37217) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37225) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37237) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37245) { // no-op } else { rc = SQLITE_ERROR @@ -205599,12 +205659,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -205860,7 +205920,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -205869,10 +205929,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -205883,7 +205943,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205891,7 +205951,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 37266 /* "unicode61" */ + var zBase uintptr = ts + 37274 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -205936,9 +205996,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -205948,15 +206008,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -205977,12 +206037,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -205992,7 +206052,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -206002,7 +206062,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -206020,14 +206080,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -206042,13 +206102,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37276, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37284, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -206056,11 +206116,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37279, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37287, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37284, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37292, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -206068,7 +206128,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37289, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37297, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -206076,7 +206136,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37292, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37300, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -206084,11 +206144,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37295, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37303, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37300, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37308, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -206096,19 +206156,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37305, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37313, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37309, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37317, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37315, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37323, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37320, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37328, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -206116,11 +206176,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37324, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37332, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37328, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37336, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -206128,7 +206188,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37331, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37339, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -206136,11 +206196,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37335, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37343, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37339, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37347, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -206148,22 +206208,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37343, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37347, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37351, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -206171,34 +206215,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37355, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37359, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37355, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37363, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37358, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37361, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37366, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37369, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37365, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37373, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-2), ts+37359, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-2), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -206208,143 +206268,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37368, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37376, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37376, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37384, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37383, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37391, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37388, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37396, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37284, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37292, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37393, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37401, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37279, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37287, uint64(4), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37398, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37406, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37359, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37403, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37411, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15782, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+15790, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37408, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37416, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37361, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37369, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37412, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37420, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37417, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37425, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37320, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37328, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37423, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37431, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37427, uint64(1), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37435, uint64(1), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37429, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37437, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37435, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37443, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37359, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37443, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37451, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37449, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37457, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37335, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37454, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37462, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37460, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37347, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37468, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37476, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37355, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37480, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37476, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37343, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37484, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37488, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-7), ts+37351, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-7), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37488, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37496, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37494, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37502, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37347, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37355, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37500, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37508, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37361, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-6), ts+37369, uint64(3), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-6), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -206354,22 +206414,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37507, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37515, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37292, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-4), ts+37300, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-4), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37512, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37520, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -206377,21 +206437,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37517, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37525, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37292, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37300, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37523, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37531, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37292, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37300, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37476, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37484, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -206399,7 +206459,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37529, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37537, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -206407,9 +206467,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37535, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37543, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37276, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-5), ts+37284, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-5), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -206419,18 +206479,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37541, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37549, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37545, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) + libc.X__builtin___memcpy_chk(tls, aBuf+uintptr(nBuf-3), ts+37553, uint64(2), libc.X__builtin_object_size(tls, aBuf+uintptr(nBuf-3), 0)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37548, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37556, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -206439,7 +206499,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37551, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37559, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -206456,7 +206516,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -206472,7 +206532,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -206570,7 +206630,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -206591,20 +206651,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -206615,7 +206675,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37555) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37563) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -206635,7 +206695,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -206788,7 +206848,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -206802,27 +206862,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 37266, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37274, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37570, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37578, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37576, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37584, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37583, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37591, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -206848,7 +206908,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -206871,7 +206931,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -206942,7 +207002,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -206961,7 +207021,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -207022,7 +207082,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -207080,7 +207140,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -207092,9 +207152,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -207291,7 +207351,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -207470,7 +207530,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -207649,9 +207709,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -207691,7 +207751,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -207723,7 +207783,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -207798,7 +207858,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -207974,7 +208034,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -208020,7 +208080,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -208033,7 +208093,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -208093,7 +208153,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -208133,7 +208193,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -208154,9 +208214,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -208164,7 +208224,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -208172,14 +208232,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37591) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37599) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37595) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37603) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37599) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37607) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37608, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37616, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -208189,14 +208249,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -208221,24 +208281,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 37642, - ts + 37682, - ts + 37717, + ts + 37650, + ts + 37690, + ts + 37725, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23616, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23624, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37760, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37768, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -208291,11 +208351,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -208309,7 +208369,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -208377,7 +208437,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -208390,11 +208450,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37793, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37801, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37824, + ts+37832, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -208418,7 +208478,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37875, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37883, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -208444,7 +208504,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -208458,7 +208518,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -208467,7 +208527,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -208498,7 +208558,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -208527,7 +208587,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -208671,7 +208731,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -208745,12 +208805,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -208823,16 +208883,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37901, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37909, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -208849,7 +208909,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -208876,1132 +208936,1132 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37911 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37919 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 8 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40299:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 24 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40300:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 40 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40301:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 56 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40302:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 72 /* .pMethods */)) = uintptr(unsafe.Pointer(&nolockIoMethods)) // sqlite3.c:40303:17: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 8 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40308:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 24 /* .pMethods */)) = uintptr(unsafe.Pointer(&posixIoMethods)) // sqlite3.c:40309:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 40 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40310:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 56 /* .pMethods */)) = uintptr(unsafe.Pointer(&afpIoMethods)) // sqlite3.c:40311:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMap)) + 72 /* .pMethods */)) = uintptr(unsafe.Pointer(&nolockIoMethods)) // sqlite3.c:40312:17: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Off_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 224 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t, Off_t) Ssize_t - }{libc.Xpread})) // sqlite3.c:35200:21: + }{libc.Xpread})) // sqlite3.c:35209:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 296 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t, Off_t) Ssize_t - }{libc.Xpwrite})) // sqlite3.c:35217:21: + }{libc.Xpwrite})) // sqlite3.c:35226:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Uid_t, Gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, Off_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&autolockIoFinder)) // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42829:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42829:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 704 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 712)) = unixOpen // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 720)) = unixDelete // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 728)) = unixAccess // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 736)) = unixFullPathname // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 744)) = unixDlOpen // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 752)) = unixDlError // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 760)) = unixDlSym // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 768)) = unixDlClose // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 776)) = unixRandomness // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 784)) = unixSleep // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 792)) = unixCurrentTime // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 800)) = unixGetLastError // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 808)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 816)) = unixSetSystemCall // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 824)) = unixGetSystemCall // sqlite3.c:42842:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 832)) = unixNextSystemCall // sqlite3.c:42842:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 872 /* .pAppData */)) = uintptr(unsafe.Pointer(&flockIoFinder)) // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 880)) = unixOpen // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 888)) = unixDelete // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 896)) = unixAccess // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 904)) = unixFullPathname // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 912)) = unixDlOpen // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 920)) = unixDlError // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 928)) = unixDlSym // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 936)) = unixDlClose // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 944)) = unixRandomness // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 952)) = unixSleep // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 960)) = unixCurrentTime // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 968)) = unixGetLastError // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 976)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 984)) = unixSetSystemCall // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 992)) = unixGetSystemCall // sqlite3.c:42845:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1000)) = unixNextSystemCall // sqlite3.c:42845:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1040 /* .pAppData */)) = uintptr(unsafe.Pointer(&afpIoFinder)) // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1048)) = unixOpen // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1056)) = unixDelete // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1064)) = unixAccess // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1072)) = unixFullPathname // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1080)) = unixDlOpen // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1088)) = unixDlError // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1096)) = unixDlSym // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1104)) = unixDlClose // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1112)) = unixRandomness // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1120)) = unixSleep // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1128)) = unixCurrentTime // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1136)) = unixGetLastError // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1144)) = unixCurrentTimeInt64 // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1152)) = unixSetSystemCall // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1160)) = unixGetSystemCall // sqlite3.c:42848:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1168)) = unixNextSystemCall // sqlite3.c:42848:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1208 /* .pAppData */)) = uintptr(unsafe.Pointer(&nfsIoFinder)) // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1216)) = unixOpen // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1224)) = unixDelete // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1232)) = unixAccess // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1240)) = unixFullPathname // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1248)) = unixDlOpen // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1256)) = unixDlError // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1264)) = unixDlSym // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1272)) = unixDlClose // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1280)) = unixRandomness // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1288)) = unixSleep // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1296)) = unixCurrentTime // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1304)) = unixGetLastError // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1312)) = unixCurrentTimeInt64 // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1320)) = unixSetSystemCall // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1328)) = unixGetSystemCall // sqlite3.c:42849:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1336)) = unixNextSystemCall // sqlite3.c:42849:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1376 /* .pAppData */)) = uintptr(unsafe.Pointer(&proxyIoFinder)) // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1384)) = unixOpen // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1392)) = unixDelete // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1400)) = unixAccess // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1408)) = unixFullPathname // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1416)) = unixDlOpen // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1424)) = unixDlError // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1432)) = unixDlSym // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1440)) = unixDlClose // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1448)) = unixRandomness // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1456)) = unixSleep // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1464)) = unixCurrentTime // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1472)) = unixGetLastError // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1480)) = unixCurrentTimeInt64 // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1488)) = unixSetSystemCall // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1496)) = unixGetSystemCall // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1504)) = unixNextSystemCall // sqlite3.c:42850:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoFinder)) + 0)) = afpIoFinderImpl // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 8)) = afpClose // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 16)) = unixRead // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 24)) = unixWrite // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 32)) = unixTruncate // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 40)) = unixSync // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 48)) = unixFileSize // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 56)) = afpLock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 64)) = afpUnlock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 72)) = afpCheckReservedLock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 80)) = unixFileControl // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 112)) = unixShmLock // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 136)) = unixFetch // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40231:1: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&autolockIoFinder)) + 0)) = autolockIoFinderImpl // sqlite3.c:40345:55: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoFinder)) + 0)) = flockIoFinderImpl // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 8)) = flockClose // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 16)) = unixRead // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 24)) = unixWrite // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 40)) = unixSync // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 56)) = flockLock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 64)) = flockUnlock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 72)) = flockCheckReservedLock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 136)) = unixFetch // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40205:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoFinder)) + 0)) = nfsIoFinderImpl // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 8)) = unixClose // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 16)) = unixRead // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 24)) = unixWrite // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 32)) = unixTruncate // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 40)) = unixSync // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 48)) = unixFileSize // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 56)) = unixLock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 64)) = nfsUnlock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 80)) = unixFileControl // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 112)) = unixShmLock // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 136)) = unixFetch // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40271:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoFinder)) + 0)) = proxyIoFinderImpl // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 8)) = proxyClose // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 16)) = unixRead // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 24)) = unixWrite // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 32)) = unixTruncate // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 40)) = unixSync // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 48)) = unixFileSize // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 56)) = proxyLock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 64)) = proxyUnlock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 72)) = proxyCheckReservedLock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 80)) = unixFileControl // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 112)) = unixShmLock // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 136)) = unixFetch // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40257:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&autolockIoFinder)) // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42838:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42838:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 704 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 712)) = unixOpen // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 720)) = unixDelete // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 728)) = unixAccess // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 736)) = unixFullPathname // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 744)) = unixDlOpen // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 752)) = unixDlError // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 760)) = unixDlSym // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 768)) = unixDlClose // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 776)) = unixRandomness // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 784)) = unixSleep // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 792)) = unixCurrentTime // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 800)) = unixGetLastError // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 808)) = unixCurrentTimeInt64 // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 816)) = unixSetSystemCall // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 824)) = unixGetSystemCall // sqlite3.c:42851:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 832)) = unixNextSystemCall // sqlite3.c:42851:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 872 /* .pAppData */)) = uintptr(unsafe.Pointer(&flockIoFinder)) // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 880)) = unixOpen // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 888)) = unixDelete // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 896)) = unixAccess // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 904)) = unixFullPathname // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 912)) = unixDlOpen // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 920)) = unixDlError // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 928)) = unixDlSym // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 936)) = unixDlClose // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 944)) = unixRandomness // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 952)) = unixSleep // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 960)) = unixCurrentTime // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 968)) = unixGetLastError // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 976)) = unixCurrentTimeInt64 // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 984)) = unixSetSystemCall // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 992)) = unixGetSystemCall // sqlite3.c:42854:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1000)) = unixNextSystemCall // sqlite3.c:42854:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1040 /* .pAppData */)) = uintptr(unsafe.Pointer(&afpIoFinder)) // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1048)) = unixOpen // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1056)) = unixDelete // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1064)) = unixAccess // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1072)) = unixFullPathname // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1080)) = unixDlOpen // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1088)) = unixDlError // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1096)) = unixDlSym // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1104)) = unixDlClose // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1112)) = unixRandomness // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1120)) = unixSleep // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1128)) = unixCurrentTime // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1136)) = unixGetLastError // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1144)) = unixCurrentTimeInt64 // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1152)) = unixSetSystemCall // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1160)) = unixGetSystemCall // sqlite3.c:42857:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1168)) = unixNextSystemCall // sqlite3.c:42857:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1208 /* .pAppData */)) = uintptr(unsafe.Pointer(&nfsIoFinder)) // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1216)) = unixOpen // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1224)) = unixDelete // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1232)) = unixAccess // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1240)) = unixFullPathname // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1248)) = unixDlOpen // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1256)) = unixDlError // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1264)) = unixDlSym // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1272)) = unixDlClose // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1280)) = unixRandomness // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1288)) = unixSleep // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1296)) = unixCurrentTime // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1304)) = unixGetLastError // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1312)) = unixCurrentTimeInt64 // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1320)) = unixSetSystemCall // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1328)) = unixGetSystemCall // sqlite3.c:42858:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1336)) = unixNextSystemCall // sqlite3.c:42858:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1376 /* .pAppData */)) = uintptr(unsafe.Pointer(&proxyIoFinder)) // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1384)) = unixOpen // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1392)) = unixDelete // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1400)) = unixAccess // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1408)) = unixFullPathname // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1416)) = unixDlOpen // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1424)) = unixDlError // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1432)) = unixDlSym // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1440)) = unixDlClose // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1448)) = unixRandomness // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1456)) = unixSleep // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1464)) = unixCurrentTime // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1472)) = unixGetLastError // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1480)) = unixCurrentTimeInt64 // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1488)) = unixSetSystemCall // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1496)) = unixGetSystemCall // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 1504)) = unixNextSystemCall // sqlite3.c:42859:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoFinder)) + 0)) = afpIoFinderImpl // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 8)) = afpClose // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 16)) = unixRead // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 24)) = unixWrite // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 32)) = unixTruncate // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 40)) = unixSync // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 48)) = unixFileSize // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 56)) = afpLock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 64)) = afpUnlock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 72)) = afpCheckReservedLock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 80)) = unixFileControl // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 112)) = unixShmLock // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 136)) = unixFetch // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&afpIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40240:1: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&autolockIoFinder)) + 0)) = autolockIoFinderImpl // sqlite3.c:40354:55: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoFinder)) + 0)) = flockIoFinderImpl // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 8)) = flockClose // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 16)) = unixRead // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 24)) = unixWrite // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 40)) = unixSync // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 56)) = flockLock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 64)) = flockUnlock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 72)) = flockCheckReservedLock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 136)) = unixFetch // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&flockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40214:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoFinder)) + 0)) = nfsIoFinderImpl // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 8)) = unixClose // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 16)) = unixRead // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 24)) = unixWrite // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 32)) = unixTruncate // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 40)) = unixSync // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 48)) = unixFileSize // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 56)) = unixLock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 64)) = nfsUnlock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 80)) = unixFileControl // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 112)) = unixShmLock // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 136)) = unixFetch // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nfsIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40280:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoFinder)) + 0)) = proxyIoFinderImpl // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 8)) = proxyClose // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 16)) = unixRead // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 24)) = unixWrite // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 32)) = unixTruncate // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 40)) = unixSync // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 48)) = unixFileSize // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 56)) = proxyLock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 64)) = proxyUnlock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 72)) = proxyCheckReservedLock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 80)) = unixFileControl // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 112)) = unixShmLock // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 136)) = unixFetch // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&proxyIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40266:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-13.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00S\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00nfs\x00hfs\x00ufs\x00afpfs\x00smbfs\x00webdav\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00msdos\x00exfat\x00SQLITE_FORCE_PROXY_LOCKING\x00:auto:\x00fsync\x00/dev/urandom\x00sqliteplocks\x00/\x00dummy\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00break\x00path error (len %d)\x00read error (len %d)\x00create failed (%d)\x00write failed (%d)\x00rename failed (%d)\x00broke stale lock on %s\n\x00failed to break stale lock on %s, %s\n\x00-conch\x00.lock\x00:auto: (not held)\x00unix\x00unix-none\x00unix-dotfile\x00unix-posix\x00unix-flock\x00unix-afp\x00unix-nfs\x00unix-proxy\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00dylib\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00lock_proxy_file\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00failed to set lock proxy file\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-13.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00S\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00nfs\x00hfs\x00ufs\x00afpfs\x00smbfs\x00webdav\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00msdos\x00exfat\x00SQLITE_FORCE_PROXY_LOCKING\x00:auto:\x00fsync\x00/dev/urandom\x00sqliteplocks\x00/\x00dummy\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00break\x00path error (len %d)\x00read error (len %d)\x00create failed (%d)\x00write failed (%d)\x00rename failed (%d)\x00broke stale lock on %s\n\x00failed to break stale lock on %s, %s\n\x00-conch\x00.lock\x00:auto: (not held)\x00unix\x00unix-none\x00unix-dotfile\x00unix-posix\x00unix-flock\x00unix-afp\x00unix-nfs\x00unix-proxy\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00dylib\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00lock_proxy_file\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00failed to set lock proxy file\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_386.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_386.go index 75b6f651..e4861d77 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_386.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_386.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_386.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -1932,7 +1932,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2040,8 +2040,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2978,7 +2978,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5305,7 +5305,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -5329,7 +5329,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 FaConstraint uintptr @@ -5344,12 +5344,12 @@ type sqlite3_index_info = struct { FestimatedRows Sqlite3_int64 FidxFlags int32 FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 FxCreate uintptr @@ -5377,7 +5377,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5485,7 +5485,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5591,7 +5591,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5697,7 +5697,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -5772,7 +5772,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -5837,7 +5837,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -5862,7 +5862,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -5878,7 +5878,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -5901,7 +5901,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6074,7 +6074,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6233,7 +6233,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6250,12 +6250,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6288,7 +6288,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6308,7 +6308,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6328,7 +6328,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6371,7 +6371,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6408,7 +6408,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -6426,13 +6426,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6461,7 +6461,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6474,7 +6474,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -6494,13 +6494,13 @@ type sqlite3_changeset_iter = struct { FbIndirect int32 FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6510,13 +6510,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6718,7 +6718,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6920,7 +6920,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -6973,7 +6973,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7005,22 +7005,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7039,7 +7039,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7053,7 +7053,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7674,7 +7674,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7682,7 +7682,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -8203,13 +8203,13 @@ type Max_align_t = X__max_align_t /* stddef.h:69:23 */ // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -8220,7 +8220,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -8243,12 +8243,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U32 /* sqlite3.c:14287:15 */ +type Uptr = U32 /* sqlite3.c:14291:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -8270,7 +8270,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -8412,13 +8412,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -8426,7 +8426,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -8437,7 +8437,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -8447,7 +8447,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -8461,7 +8461,7 @@ type Column1 = struct { F__ccgo_pad3 [2]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -8472,7 +8472,7 @@ type Cte1 = struct { F__ccgo_pad1 [3]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -8483,7 +8483,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -8493,7 +8493,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -8503,9 +8503,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -8520,7 +8520,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -8543,7 +8543,7 @@ type Expr1 = struct { } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -8564,7 +8564,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -8580,16 +8580,16 @@ type FKey1 = struct { FiFrom int32 FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -8604,16 +8604,16 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -8643,7 +8643,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -8652,7 +8652,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -8665,7 +8665,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -8683,10 +8683,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -8696,7 +8696,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -8706,9 +8706,9 @@ type NameContext1 = struct { FnNcErr int32 FncFlags int32 FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -8783,14 +8783,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -8808,21 +8808,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -8831,9 +8831,9 @@ type Returning1 = struct { FiRetCur int32 FnRetCol int32 FiRetReg int32 -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -8844,9 +8844,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -8854,7 +8854,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -8878,14 +8878,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -8895,9 +8895,9 @@ type SelectDest1 = struct { FnSdst int32 FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -8923,15 +8923,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -8960,7 +8960,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -8969,13 +8969,13 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -8991,7 +8991,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -9000,7 +9000,7 @@ type TriggerPrg1 = struct { FaColmask [2]U32 } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -9018,7 +9018,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -9031,7 +9031,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -9048,7 +9048,7 @@ type Upsert1 = struct { FiIdxCur int32 } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -9061,7 +9061,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -9069,7 +9069,7 @@ type VtabCtx1 = struct { FbDeclared int32 } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -9079,9 +9079,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -9110,9 +9110,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -9146,7 +9146,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -9154,14 +9154,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -9172,7 +9172,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -9199,7 +9199,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -9269,7 +9269,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -9287,7 +9287,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -9358,7 +9358,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -9383,7 +9383,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -9419,7 +9419,7 @@ type BtShared1 = struct { FnPreformatSize int32 } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -9429,9 +9429,9 @@ type BtreePayload1 = struct { F__ccgo_pad1 [2]byte FnData int32 FnZero int32 -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -9533,11 +9533,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -9548,7 +9548,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -9568,7 +9568,7 @@ type VdbeOp1 = struct { // as an instance of the following structure: type p4union = struct{ Fi int32 } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -9577,11 +9577,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -9646,7 +9646,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -9664,10 +9664,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -9742,7 +9742,7 @@ type sqlite3InitInfo = struct { type sColMap = struct { FiFrom int32 FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -9791,7 +9791,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -9883,7 +9883,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -9895,7 +9895,7 @@ type InitData = struct { FmInitFlags U32 FnInitRow U32 FmxPage Pgno -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -9956,7 +9956,7 @@ type Sqlite3Config = struct { FiOnceResetThreshold int32 FszSorterRef U32 FiPrngSeed uint32 -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -9979,7 +9979,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10000,7 +10000,7 @@ type RefSrcList = struct { type IdxCover = struct { FpIdx uintptr FiCur int32 -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10026,7 +10026,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10050,7 +10050,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10075,7 +10075,7 @@ type WhereConst1 = struct { FnChng int32 FbHasAffBlob int32 FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10099,7 +10099,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -10228,9 +10228,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1032, ts + 1046, ts + 1059, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint32(unsafe.Sizeof(sqlite3azCompileOpt)) / uint32(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -10297,10 +10297,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -10364,7 +10364,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -10424,12 +10424,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -10447,21 +10447,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -10477,7 +10477,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -10485,7 +10485,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -10493,7 +10493,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1079, ts + 1083, @@ -10501,7 +10501,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1092, ts + 1100, ts + 1105, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -10546,10 +10546,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -10572,10 +10572,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -10587,7 +10587,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -10638,7 +10638,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -10703,7 +10703,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -10717,7 +10717,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -10729,13 +10729,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [2]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -10746,7 +10746,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -10754,7 +10754,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -10769,7 +10769,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -10781,20 +10781,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = U32 /* sqlite3.c:22681:13 */ +type Sqlite3StatValueType = U32 /* sqlite3.c:22690:13 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -10809,7 +10809,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -10819,7 +10819,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return Sqlite3_int64(*(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4))) } @@ -10833,7 +10833,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 40 + uintptr(op)*4)) { @@ -10841,14 +10841,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -10859,12 +10859,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -10882,7 +10882,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -10898,7 +10898,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -10908,7 +10908,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -10920,7 +10920,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -11550,14 +11550,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -11584,7 +11584,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -11641,7 +11641,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -11657,7 +11657,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -11731,7 +11731,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -11784,7 +11784,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -11793,7 +11793,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -11849,7 +11849,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -11900,7 +11900,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -11915,7 +11915,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -11938,7 +11938,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -11967,12 +11967,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -12017,7 +12017,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -12036,13 +12036,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -12072,7 +12072,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -12097,7 +12097,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -12137,7 +12137,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -12165,7 +12165,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -12189,7 +12189,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -12515,7 +12515,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -12556,7 +12556,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -12572,7 +12572,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -12587,7 +12587,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -12636,7 +12636,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -12664,7 +12664,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -12716,7 +12716,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -12860,7 +12860,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -12869,7 +12869,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -12878,7 +12878,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -12887,7 +12887,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint32(unsafe.Sizeof(aDateTimeFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } @@ -12900,7 +12900,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1336}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1345}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1358}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -12952,7 +12952,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -12961,27 +12961,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -12991,27 +12991,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -13024,7 +13024,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -13033,7 +13033,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -13041,7 +13041,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -13053,7 +13053,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -13062,23 +13062,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -13086,14 +13086,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -13101,7 +13101,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -13115,7 +13115,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -13125,14 +13125,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -13140,7 +13140,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -13148,25 +13148,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint32(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -13183,13 +13183,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -13198,7 +13198,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13223,7 +13223,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -13243,7 +13243,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -13253,7 +13253,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -13263,11 +13263,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -13289,7 +13289,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -13309,7 +13309,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -13332,7 +13332,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -13377,7 +13377,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -13408,8 +13408,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -13419,7 +13419,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -13428,14 +13428,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -13533,7 +13533,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13556,7 +13556,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -13565,7 +13565,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -13581,7 +13581,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13603,18 +13603,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -13623,7 +13623,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13638,7 +13638,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -13772,7 +13772,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -13806,7 +13806,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -13816,7 +13816,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -13829,7 +13829,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -13840,7 +13840,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -13849,7 +13849,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -13858,7 +13858,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -13873,7 +13873,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -13912,40 +13912,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -13958,11 +13958,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -14025,7 +14025,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -14037,22 +14037,22 @@ type Mem0Global = struct { FalarmThreshold Sqlite3_int64 FhardLimit Sqlite3_int64 FnearlyFull int32 -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -14068,7 +14068,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -14096,7 +14096,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -14113,7 +14113,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14132,7 +14132,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -14155,12 +14155,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mem0)) + 20)) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -14168,7 +14168,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -14183,7 +14183,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -14196,7 +14196,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -14207,7 +14207,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -14254,7 +14254,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -14283,7 +14283,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14293,7 +14293,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14301,27 +14301,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -14340,7 +14340,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -14351,7 +14351,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -14369,14 +14369,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -14402,7 +14402,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -14410,7 +14410,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -14471,7 +14471,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14481,7 +14481,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14489,7 +14489,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -14499,7 +14499,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -14511,7 +14511,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -14542,7 +14542,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -14552,7 +14552,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -14590,7 +14590,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -14610,7 +14610,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -14634,7 +14634,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -14648,7 +14648,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -14662,7 +14662,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -14680,7 +14680,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -14693,7 +14693,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -14709,7 +14709,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -14730,7 +14730,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) *(*int32)(unsafe.Pointer(db + 304)) = 0 @@ -14746,7 +14746,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -14765,7 +14765,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -14794,7 +14794,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -14805,18 +14805,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -14843,7 +14843,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -14854,7 +14854,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -14869,7 +14869,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -14884,7 +14884,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -14896,21 +14896,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -14924,7 +14924,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -14946,7 +14946,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -16439,7 +16439,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29902:29 */ // End of function @@ -16447,7 +16447,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -16474,7 +16474,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 36)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -16489,7 +16489,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -16543,7 +16543,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -16559,7 +16559,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint32(N)) @@ -16569,7 +16569,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -16581,14 +16581,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -16602,7 +16602,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -16614,7 +16614,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -16632,10 +16632,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -16647,7 +16647,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -16655,7 +16655,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -16663,7 +16663,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -16672,7 +16672,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 21)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -16694,7 +16694,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -16705,7 +16705,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -16723,7 +16723,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -16745,7 +16745,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -16757,7 +16757,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -16777,7 +16777,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -16801,7 +16801,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -16816,7 +16816,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -16838,7 +16838,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(234) defer tls.Free(234) @@ -16856,7 +16856,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -16868,7 +16868,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -16923,7 +16923,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -16967,10 +16967,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -17049,16 +17049,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint32(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -17066,7 +17066,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -17088,7 +17088,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -17157,7 +17157,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -17184,7 +17184,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -17211,7 +17211,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -17536,7 +17536,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -17570,7 +17570,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -17602,7 +17602,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -17623,7 +17623,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -17809,7 +17809,7 @@ type Float_t = X__float_t /* math.h:136:19 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -17821,7 +17821,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -17841,7 +17841,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -17853,7 +17853,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4)) != 0 { @@ -17868,7 +17868,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -17878,7 +17878,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -17890,7 +17890,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -17901,7 +17901,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -17921,7 +17921,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -17948,7 +17948,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -17979,7 +17979,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -18004,7 +18004,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -18036,7 +18036,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -18056,7 +18056,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -18074,7 +18074,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -18089,7 +18089,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -18101,7 +18101,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -18127,7 +18127,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -18151,7 +18151,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -18167,7 +18167,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -18210,7 +18210,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -18590,7 +18590,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -18631,7 +18631,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -18660,7 +18660,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -18782,7 +18782,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18815,7 +18815,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -18877,7 +18877,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -18890,7 +18890,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -18933,7 +18933,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -18979,7 +18979,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -19002,7 +19002,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -19155,7 +19155,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -19223,7 +19223,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -19231,12 +19231,12 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ return uint32(*(*U8)(unsafe.Pointer(p)))<<24 | uint32(int32(*(*U8)(unsafe.Pointer(p + 1)))<<16) | uint32(int32(*(*U8)(unsafe.Pointer(p + 2)))<<8) | uint32(*(*U8)(unsafe.Pointer(p + 3))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ *(*uint8)(unsafe.Pointer(p)) = U8(v >> 24) *(*uint8)(unsafe.Pointer(p + 1)) = U8(v >> 16) *(*uint8)(unsafe.Pointer(p + 2)) = U8(v >> 8) @@ -19246,7 +19246,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -19256,7 +19256,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -19274,7 +19274,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -19295,7 +19295,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1528) @@ -19314,7 +19314,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -19331,7 +19331,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB >= int64(0) { @@ -19349,7 +19349,7 @@ func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return 0 } -func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043:20: */ if iB == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { @@ -19364,7 +19364,7 @@ func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return int32(0) } -func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB > int64(0) { if iA > (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/iB { @@ -19396,7 +19396,7 @@ func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -19410,7 +19410,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -19441,11 +19441,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -19468,11 +19468,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19493,7 +19493,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -19545,7 +19545,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -19584,7 +19584,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -19603,7 +19603,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -19642,7 +19642,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -19653,7 +19653,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -19670,7 +19670,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -19685,7 +19685,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -19722,7 +19722,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -19766,7 +19766,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -19795,11 +19795,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -19828,7 +19828,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -19846,7 +19846,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -19895,7 +19895,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -20085,7 +20085,7 @@ var azName = [185]uintptr{ ts + 3182, ts + 3187, ts + 3195, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ type pthread_once = struct { Fstate int32 Fmutex Pthread_mutex_t @@ -21813,7 +21813,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -21846,7 +21846,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -21860,10 +21860,10 @@ type unixShmNode = struct { FnRef int32 FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -21880,18 +21880,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -21916,16 +21916,16 @@ type unixFile = struct { FpMapRegion uintptr FsectorSize int32 FdeviceCharacteristics int32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -21948,7 +21948,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -21963,7 +21963,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -22031,14 +22031,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3403, FpCurrent: 0}, {FzName: ts + 3409}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*12 + 4)))(tls) != 0 { return 0 } @@ -22049,7 +22049,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -22086,7 +22086,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -22102,7 +22102,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -22140,7 +22140,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -22207,14 +22207,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -22224,7 +22224,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*12 + 4)))(tls, h, sz) @@ -22240,7 +22240,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -22289,7 +22289,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -22390,12 +22390,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -22413,7 +22413,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -22447,7 +22447,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3210, func() uintptr { @@ -22461,19 +22461,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -22483,7 +22483,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -22517,7 +22517,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -22576,7 +22576,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -22593,7 +22593,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(240) defer tls.Free(240) @@ -22629,7 +22629,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -22695,7 +22695,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -22747,7 +22747,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -22994,7 +22994,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -23015,7 +23015,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -23149,7 +23149,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -23162,11 +23162,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -23176,7 +23176,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -23226,26 +23226,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -23286,7 +23286,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -23322,7 +23322,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -23364,7 +23364,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -23399,7 +23399,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -23498,7 +23498,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -23536,7 +23536,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -23591,7 +23591,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -23617,13 +23617,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+20) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -23680,7 +23680,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -23726,7 +23726,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -23753,7 +23753,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3322, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3322, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -23769,7 +23769,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -23788,7 +23788,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3610, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3610, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -23800,7 +23800,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -23811,7 +23811,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -23826,7 +23826,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -23842,7 +23842,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -23873,7 +23873,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -23918,7 +23918,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -23933,7 +23933,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -23944,7 +23944,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24055,7 +24055,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -24076,7 +24076,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -24093,7 +24093,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -24103,7 +24103,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -24115,7 +24115,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -24147,7 +24147,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -24188,7 +24188,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*12 + 4)))(tls) // System page size // Page size must be a power of 2 @@ -24202,7 +24202,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -24219,7 +24219,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -24234,7 +24234,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -24278,7 +24278,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -24325,7 +24325,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -24421,7 +24421,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3205, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3205, zShm, 39446) goto shm_open_err __10: ; @@ -24489,7 +24489,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(212) defer tls.Free(212) @@ -24592,7 +24592,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39590) goto shmpage_out __14: ; @@ -24640,7 +24640,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -24698,7 +24698,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -24712,7 +24712,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -24819,7 +24819,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -24832,7 +24832,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -24875,7 +24875,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint32((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -24898,7 +24898,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3363 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -24940,7 +24940,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -24965,7 +24965,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -25002,7 +25002,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -25029,7 +25029,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -25090,33 +25090,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -25129,7 +25129,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -25139,7 +25139,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25196,7 +25196,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -25219,7 +25219,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -25237,17 +25237,17 @@ var azTempDirs = [6]uintptr{ ts + 3673, ts + 3682, ts + 1540, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3687) azTempDirs[1] = libc.Xgetenv(tls, ts+3701) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -25274,7 +25274,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25318,7 +25318,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -25369,7 +25369,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -25405,7 +25405,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -25479,7 +25479,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(524) defer tls.Free(524) @@ -25677,7 +25677,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3205, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3205, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -25777,7 +25777,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25788,7 +25788,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__error(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41141) } return rc } @@ -25798,9 +25798,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3732, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3732, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -25817,7 +25817,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -25839,7 +25839,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -25862,7 +25862,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -25873,7 +25873,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, zOut, uint32(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3223, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3223, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -25882,7 +25882,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3607, libc.VaList(bp, zPath)) @@ -25933,7 +25933,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -25959,7 +25959,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*12 + 4)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__error(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3403, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3403, zIn, 41322) } } else { bLink = libc.Bool32(int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&0170000 == 0120000) @@ -25973,20 +25973,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, zDel, uint32(nOut-1)) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3394, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3394, zIn, 41340) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint32(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint32(n)) @@ -26194,7 +26194,7 @@ type dl_serinfo = struct { type Dl_serinfo = dl_serinfo /* dlfcn.h:113:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -26204,7 +26204,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26218,7 +26218,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -26244,13 +26244,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -26285,7 +26285,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { got = (*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*12 + 4)))(tls, fd, zBuf, uint32(nBuf)) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -26298,7 +26298,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -26321,7 +26321,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26335,12 +26335,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26356,7 +26356,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -26538,7 +26538,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -26576,14 +26576,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3756, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3766, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3646, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -26625,14 +26625,14 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -26645,9 +26645,9 @@ type MemStore1 = struct { FnWrLock int32 FnRef int32 FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -26656,13 +26656,13 @@ type MemStore = MemStore1 /* sqlite3.c:49088:25 */ type MemFS = struct { FnMemStore int32 FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -26679,7 +26679,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -26695,21 +26695,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -26747,7 +26747,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -26764,7 +26764,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -26786,7 +26786,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -26817,7 +26817,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -26832,14 +26832,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -26848,7 +26848,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -26892,7 +26892,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -26921,13 +26921,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -26941,7 +26941,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -26952,7 +26952,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -27027,7 +27027,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -27038,7 +27038,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27048,7 +27048,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -27057,21 +27057,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -27079,7 +27079,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -27087,19 +27087,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -27107,7 +27107,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27130,7 +27130,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -27221,7 +27221,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -27316,7 +27316,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -27338,7 +27338,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -27351,7 +27351,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -27380,7 +27380,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -27394,7 +27394,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -27531,7 +27531,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -27570,7 +27570,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -27585,7 +27585,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -27622,7 +27622,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27785,7 +27785,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -27847,7 +27847,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -27859,7 +27859,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -27884,7 +27884,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -27897,7 +27897,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -27905,7 +27905,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -27919,7 +27919,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -27936,7 +27936,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -27983,7 +27983,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -28011,7 +28011,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -28062,7 +28062,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -28082,7 +28082,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -28098,7 +28098,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -28111,7 +28111,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -28120,7 +28120,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -28133,7 +28133,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -28148,7 +28148,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -28160,7 +28160,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -28169,7 +28169,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -28179,7 +28179,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -28188,7 +28188,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -28207,7 +28207,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -28241,19 +28241,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -28292,7 +28292,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -28335,7 +28335,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -28347,17 +28347,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -28365,7 +28365,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -28377,7 +28377,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -28394,20 +28394,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint32(unsafe.Sizeof(PgHdr{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -28522,7 +28522,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -28608,7 +28608,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -28618,12 +28618,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -28631,9 +28631,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -28650,10 +28650,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -28671,7 +28671,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -28704,7 +28704,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -28749,7 +28749,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -28782,7 +28782,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -28812,7 +28812,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -28826,7 +28826,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -28864,7 +28864,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -28881,13 +28881,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -28905,7 +28905,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -28921,7 +28921,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -28962,7 +28962,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -28979,7 +28979,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -28997,7 +28997,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -29018,7 +29018,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -29066,7 +29066,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -29104,7 +29104,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -29113,7 +29113,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -29163,7 +29163,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -29186,7 +29186,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -29201,7 +29201,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -29216,7 +29216,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -29334,7 +29334,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -29363,7 +29363,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -29374,7 +29374,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -29388,7 +29388,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -29413,7 +29413,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -29444,7 +29444,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -29457,7 +29457,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -29480,7 +29480,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -29500,16 +29500,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint32(unsafe.Sizeof(PgHdr1{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -29520,7 +29520,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -29618,7 +29618,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -29631,13 +29631,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -29657,7 +29657,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -29676,7 +29676,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -29687,7 +29687,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -29710,7 +29710,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -29740,7 +29740,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -29775,7 +29775,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -29811,7 +29811,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -29842,7 +29842,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -29873,7 +29873,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -29906,7 +29906,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -29939,7 +29939,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30122,7 +30122,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -30890,7 +30890,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -30923,11 +30923,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -30950,7 +30950,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -30972,7 +30972,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -30989,7 +30989,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -31006,7 +31006,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -31033,7 +31033,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -31067,7 +31067,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -31101,7 +31101,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -31160,7 +31160,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -31189,7 +31189,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31224,7 +31224,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -31239,7 +31239,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -31349,7 +31349,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -31459,7 +31459,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31519,21 +31519,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*48)).FpInSavepoint) @@ -31550,7 +31550,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -31579,7 +31579,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -31671,7 +31671,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -31696,7 +31696,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -31760,7 +31760,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -31887,7 +31887,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -31919,7 +31919,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -31964,7 +31964,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -32198,7 +32198,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -32364,7 +32364,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32399,7 +32399,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -32431,7 +32431,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -32499,7 +32499,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -32634,39 +32634,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+76, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -32675,25 +32681,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -32702,10 +32708,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -32723,7 +32729,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -32732,24 +32738,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -32757,14 +32763,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint32(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3838, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -32784,7 +32790,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32838,7 +32844,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -32865,7 +32871,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -32896,7 +32902,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -32927,7 +32933,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -32975,7 +32981,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -33006,7 +33012,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33060,7 +33066,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33128,7 +33134,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -33237,18 +33243,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33264,13 +33270,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -33323,7 +33329,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -33387,7 +33393,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -33415,7 +33421,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -33452,7 +33458,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33521,7 +33527,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -33530,7 +33536,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -33561,7 +33567,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint32(N)) @@ -33584,7 +33590,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -33601,7 +33607,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -33646,7 +33652,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -33673,7 +33679,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -33692,7 +33698,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -33722,7 +33728,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -33732,7 +33738,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -33745,7 +33751,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -33783,7 +33789,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -33832,7 +33838,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -33869,7 +33875,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -33983,7 +33989,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -34015,7 +34021,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34095,7 +34101,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -34119,7 +34125,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -34150,7 +34156,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -34176,7 +34182,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -34238,7 +34244,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -34285,7 +34291,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -34411,7 +34417,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -34730,7 +34736,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -34768,7 +34774,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -34879,7 +34885,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -35005,7 +35011,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -35154,7 +35160,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -35216,7 +35222,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35229,7 +35235,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -35275,7 +35281,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -35347,7 +35353,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -35367,7 +35373,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -35405,7 +35411,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -35414,7 +35420,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -35430,7 +35436,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -35451,7 +35457,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -35463,13 +35469,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -35498,7 +35504,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -35580,7 +35586,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -35640,7 +35646,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -35690,7 +35696,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -35764,7 +35770,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35852,7 +35858,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -35893,7 +35899,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -35923,7 +35929,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35993,7 +35999,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -36016,7 +36022,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -36052,7 +36058,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36242,7 +36248,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -36299,7 +36305,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -36343,13 +36349,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint32(unsafe.Sizeof(PgHdr{}))+uint32(5)*uint32(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -36358,7 +36364,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -36371,7 +36377,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 188 + uintptr(eStat)*4)) @@ -36381,7 +36387,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -36393,7 +36399,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -36433,7 +36439,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -36471,7 +36477,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -36532,30 +36538,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -36563,7 +36569,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -36590,7 +36596,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36652,7 +36658,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -36712,21 +36718,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -36738,7 +36744,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -36764,7 +36770,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -36834,14 +36840,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -36856,7 +36862,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -36868,12 +36874,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 92 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -36885,7 +36891,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -36913,13 +36919,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -36929,7 +36935,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -36946,7 +36952,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -36982,7 +36988,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -37012,7 +37018,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37052,7 +37058,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -37063,7 +37069,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -37075,7 +37081,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -37095,7 +37101,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -37107,7 +37113,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -37686,7 +37692,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -37697,18 +37703,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -37716,7 +37722,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -37737,7 +37743,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -37768,7 +37774,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -37814,7 +37820,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -37822,13 +37828,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -37846,7 +37852,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -37878,7 +37884,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -37893,7 +37899,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -37917,7 +37923,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 @@ -37940,7 +37946,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 var pgno U32 // Page number of the frame @@ -37982,7 +37988,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -37993,7 +37999,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -38002,7 +38008,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -38013,7 +38019,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -38025,12 +38031,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -38041,12 +38047,12 @@ type WalHashLoc1 = struct { FaHash uintptr FaPgno uintptr FiZero U32 -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -38060,7 +38066,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+4) @@ -38083,14 +38089,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((iFrame + U32(HASHTABLE_NPAGE) - (uint32(HASHTABLE_NPAGE) - (uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))) - U32(1)) / U32(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))+iFrame-uint32(1))*4)) @@ -38108,7 +38114,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -38151,7 +38157,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -38192,7 +38198,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -38211,7 +38217,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -38326,7 +38332,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -38530,7 +38536,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -38556,7 +38562,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38628,7 +38634,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -38642,7 +38648,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -38689,7 +38695,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -38735,7 +38741,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -38780,10 +38786,10 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt type Sublist = struct { FnList int32 FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -38798,7 +38804,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -38882,7 +38888,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -38894,7 +38900,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -38913,7 +38919,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -38964,7 +38970,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -39095,7 +39101,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+12) @@ -39256,7 +39262,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -39275,7 +39281,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -39347,7 +39353,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -39416,7 +39422,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -39496,7 +39502,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -39541,7 +39547,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -39807,7 +39813,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -40024,7 +40030,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -40098,7 +40104,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -40186,7 +40192,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -40200,7 +40206,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -40267,7 +40273,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -40283,7 +40289,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -40300,7 +40306,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -40318,7 +40324,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -40350,7 +40356,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -40370,7 +40376,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -40407,7 +40413,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) @@ -40419,7 +40425,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -40450,7 +40456,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40504,12 +40510,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -40517,7 +40523,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -40539,7 +40545,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -40564,7 +40570,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -40618,7 +40624,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -40851,7 +40857,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40916,7 +40922,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -40960,7 +40966,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -40991,7 +40997,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -41025,14 +41031,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -41051,16 +41057,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -41090,7 +41096,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -41106,13 +41112,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -41632,7 +41638,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -41641,7 +41647,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -41650,7 +41656,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -41760,7 +41766,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -41856,7 +41862,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -41870,7 +41876,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -41879,7 +41885,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -41900,7 +41906,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -41928,7 +41934,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -41959,7 +41965,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -41982,7 +41988,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -41997,13 +42003,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -42015,7 +42021,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -42026,11 +42032,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -42053,7 +42059,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3977)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3977)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -42079,14 +42085,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3977)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -42103,7 +42109,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -42160,7 +42166,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -42211,7 +42217,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 76 @@ -42246,7 +42252,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -42270,7 +42276,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -42289,7 +42295,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -42336,7 +42342,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -42356,20 +42362,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -42391,7 +42397,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -42428,7 +42434,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -42469,7 +42475,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -42490,7 +42496,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -42509,7 +42515,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -42519,7 +42525,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -42532,7 +42538,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -42549,7 +42555,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42589,7 +42595,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -42597,12 +42603,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -42615,7 +42621,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -42637,7 +42643,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -42649,7 +42655,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -42674,7 +42680,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42697,7 +42703,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -42716,7 +42722,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -42724,7 +42730,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -42755,7 +42761,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42776,7 +42782,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -42786,7 +42792,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -42804,7 +42810,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -42831,7 +42837,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -42861,7 +42867,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -42871,7 +42877,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42948,7 +42954,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -42979,7 +42985,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell) + 1))))), pInfo) @@ -42995,7 +43001,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -43036,7 +43042,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -43053,7 +43059,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -43070,7 +43076,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -43088,7 +43094,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -43133,7 +43139,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -43143,7 +43149,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -43156,7 +43162,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -43165,14 +43171,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -43182,7 +43188,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -43244,7 +43250,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -43255,7 +43261,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -43290,7 +43296,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -43315,7 +43321,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -43344,7 +43350,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -43359,14 +43365,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -43382,7 +43388,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43407,7 +43413,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -43422,7 +43428,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, (int32(pSpace)-int32(data))/1) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -43473,7 +43479,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -43497,12 +43503,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -43513,11 +43519,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -43530,7 +43536,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -43538,7 +43544,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -43548,10 +43554,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -43585,7 +43591,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -43636,7 +43642,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -43644,7 +43650,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -43676,12 +43682,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -43693,11 +43699,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -43708,7 +43714,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -43716,7 +43722,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -43738,14 +43744,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -43758,7 +43764,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -43767,21 +43773,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -43799,7 +43805,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -43822,7 +43828,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -43834,7 +43840,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -43861,7 +43867,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43879,7 +43885,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -43891,11 +43897,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -43911,7 +43917,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43921,7 +43927,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -43952,7 +43958,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -43976,18 +43982,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -43999,13 +44005,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -44020,7 +44026,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -44040,7 +44046,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+452) @@ -44065,7 +44071,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -44486,7 +44492,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -44518,7 +44524,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -44551,7 +44557,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 84)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -44560,7 +44566,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -44610,7 +44616,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -44627,7 +44633,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -44639,7 +44645,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -44654,7 +44660,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -44681,7 +44687,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -44715,7 +44721,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -44728,7 +44734,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -44742,7 +44748,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -44758,7 +44764,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -44782,7 +44788,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -44802,7 +44808,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -44835,7 +44841,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -44860,7 +44866,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -45029,7 +45035,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -45106,7 +45112,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -45119,7 +45125,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -45159,7 +45165,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -45201,7 +45207,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -45465,7 +45471,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45517,14 +45523,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(20) defer tls.Free(20) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -45552,7 +45558,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -45569,7 +45575,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -45584,7 +45590,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45595,7 +45601,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -45665,7 +45671,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -45687,7 +45693,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -45762,7 +45768,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -45786,7 +45792,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -45800,7 +45806,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -45821,7 +45827,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -45844,7 +45850,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -45875,7 +45881,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -45925,7 +45931,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -45948,7 +45954,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -46004,7 +46010,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -46033,7 +46039,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -46068,7 +46074,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -46097,7 +46103,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46119,7 +46125,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46185,7 +46191,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46209,7 +46215,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46277,7 +46283,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -46290,7 +46296,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -46328,7 +46334,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -46336,7 +46342,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -46351,7 +46357,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint32(unsafe.Sizeof(BtCursor{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } @@ -46361,13 +46367,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint32(uintptr(0)+20)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -46408,7 +46414,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+28) @@ -46417,7 +46423,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -46426,26 +46432,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -46458,7 +46464,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -46475,7 +46481,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -46497,7 +46503,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -46565,7 +46571,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -46607,7 +46613,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -46618,7 +46624,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -46629,7 +46635,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -46686,7 +46692,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -46746,7 +46752,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -46766,7 +46772,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -46774,7 +46780,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -46787,7 +46793,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -46814,7 +46820,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -46845,7 +46851,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -46856,11 +46862,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -46877,7 +46883,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -46907,7 +46913,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -46986,7 +46992,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -47007,7 +47013,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -47029,7 +47035,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -47050,7 +47056,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -47071,7 +47077,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -47090,7 +47096,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -47139,7 +47145,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47254,7 +47260,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -47383,7 +47389,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -47487,7 +47493,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -47536,7 +47542,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -47603,7 +47609,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -47613,7 +47619,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -47652,7 +47658,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -47689,7 +47695,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -47722,7 +47728,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -47762,7 +47768,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -47816,7 +47822,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -47850,7 +47856,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47917,7 +47923,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -47998,7 +48004,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) @@ -48040,7 +48046,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -48085,7 +48091,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -48199,7 +48205,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -48374,7 +48380,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -48395,7 +48401,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -48465,7 +48471,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -48482,7 +48488,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -48563,14 +48569,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48582,7 +48588,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -48597,7 +48603,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -48617,7 +48623,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -48649,7 +48655,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -48831,7 +48837,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -48849,7 +48855,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -48885,7 +48891,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -49045,7 +49051,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -49122,11 +49128,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -49143,7 +49149,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -49151,7 +49157,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -49170,7 +49176,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -49201,12 +49207,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -49214,7 +49220,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int32(pData) - int32(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -49264,7 +49270,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -49302,7 +49308,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -49329,7 +49335,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -49381,7 +49387,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -49415,7 +49421,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -49555,7 +49561,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -49568,7 +49574,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -49666,7 +49672,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -49746,7 +49752,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -50048,7 +50054,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -50076,7 +50082,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -50255,7 +50261,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -50329,7 +50335,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -50402,7 +50408,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -50439,7 +50445,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -50523,7 +50529,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -50776,7 +50782,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -50998,7 +51004,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -51049,13 +51055,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -51069,7 +51075,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -51188,7 +51194,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -51230,7 +51236,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -51244,7 +51250,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -51268,7 +51274,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -51315,7 +51321,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -51387,7 +51393,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -51515,7 +51521,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -51578,7 +51584,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -51626,13 +51632,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 76))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 76 /* szNew */)))) @@ -51740,7 +51746,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -51767,7 +51773,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -51790,7 +51796,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -51872,7 +51878,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -51900,11 +51906,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -52013,7 +52019,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -52090,7 +52096,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -52120,7 +52126,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -52163,7 +52169,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+16, bp+20) if int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pRoot */))) @@ -52226,7 +52232,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -52236,7 +52242,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -52252,7 +52258,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -52266,7 +52272,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -52370,7 +52376,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -52393,7 +52399,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -52415,7 +52421,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52425,7 +52431,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -52497,7 +52503,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -52523,7 +52529,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -52542,7 +52548,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -52568,7 +52574,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -52631,12 +52637,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52663,13 +52669,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -52680,7 +52686,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52702,7 +52708,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -52729,7 +52735,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -52813,7 +52819,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -52825,7 +52831,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -52864,7 +52870,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(132) defer tls.Free(132) *(*I64)(unsafe.Pointer(bp + 100)) = maxKey @@ -53253,7 +53259,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(212) defer tls.Free(212) @@ -53487,7 +53493,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -53498,14 +53504,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -53519,7 +53525,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -53535,7 +53541,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -53558,7 +53564,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -53572,7 +53578,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -53585,7 +53591,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -53609,7 +53615,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -53649,7 +53655,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -53657,7 +53663,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -53689,29 +53695,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -53751,7 +53757,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(288) defer tls.Free(288) @@ -53783,7 +53789,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -53793,7 +53799,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4798, 0) return SQLITE_ERROR @@ -53807,7 +53813,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -53867,14 +53873,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -53936,7 +53942,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -53951,7 +53957,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -53961,7 +53967,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54199,7 +54205,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -54257,13 +54263,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -54277,7 +54283,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -54298,7 +54304,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -54313,7 +54319,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -54327,7 +54333,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -54421,7 +54427,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -54454,7 +54460,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -54474,7 +54480,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -54530,7 +54536,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -54548,7 +54554,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -54563,7 +54569,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -54588,7 +54594,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -54610,7 +54616,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -54632,7 +54638,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -54658,7 +54664,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -54688,7 +54694,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -54710,7 +54716,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -54729,7 +54735,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -54748,7 +54754,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -54758,7 +54764,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -54770,8 +54776,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -54782,7 +54788,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54791,7 +54797,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -54812,7 +54818,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54822,7 +54828,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -54840,7 +54846,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -54853,7 +54859,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -54874,7 +54880,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -54883,7 +54889,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -54898,7 +54904,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -54915,7 +54921,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54942,7 +54948,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -54996,7 +55002,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -55013,7 +55019,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -55021,13 +55027,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -55042,7 +55048,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -55050,7 +55056,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -55060,14 +55066,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -55087,7 +55094,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -55100,7 +55107,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -55117,7 +55124,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -55133,13 +55140,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -55155,7 +55162,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -55177,7 +55184,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint32(unsafe.Sizeof(Mem{}))) @@ -55198,7 +55205,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -55311,11 +55318,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -55330,7 +55337,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55355,7 +55362,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -55400,7 +55407,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -55416,7 +55423,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -55432,7 +55439,7 @@ type ValueNewStat4Ctx = struct { FpIdx uintptr FppRec uintptr FiVal int32 -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -55443,7 +55450,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -55499,7 +55506,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -55645,7 +55652,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -55893,7 +55900,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -55916,7 +55923,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55984,7 +55991,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -56029,7 +56036,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -56039,7 +56046,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56060,7 +56067,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -56075,14 +56082,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -56098,7 +56105,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -56113,14 +56120,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -56131,14 +56138,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -56158,7 +56165,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -56182,12 +56189,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -56197,7 +56204,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -56210,7 +56217,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -56241,7 +56248,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -56294,7 +56301,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -56303,7 +56310,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -56326,26 +56333,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -56358,7 +56365,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -56406,7 +56413,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -56420,7 +56427,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -56452,7 +56459,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint32(8)) @@ -56462,7 +56469,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -56478,7 +56485,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -56502,7 +56509,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -56513,7 +56520,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -56524,7 +56531,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*20 @@ -56535,7 +56542,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -56570,14 +56577,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint32(nNewSize)*uint32(unsafe.Sizeof(int32(0))))) @@ -56589,7 +56596,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -56602,12 +56609,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+148, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 5, 0x20) } @@ -56630,7 +56637,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -56762,7 +56769,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -56793,7 +56800,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -56809,7 +56816,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -56853,23 +56860,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fp5 = p5 @@ -56878,7 +56885,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -56893,7 +56900,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -56904,26 +56911,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -56984,7 +56991,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*20; pOp >= aOp; pOp -= 20 { @@ -56999,18 +57006,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -57026,7 +57033,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -57050,7 +57057,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -57067,7 +57074,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -57114,7 +57121,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -57130,7 +57137,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -57151,7 +57158,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -57165,11 +57172,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -57332,7 +57339,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4952, ts + 4954, ts + 4956, ts + 4961} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4952, ts + 4954, ts + 4956, ts + 4961} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -57340,7 +57347,7 @@ var encnames = [4]uintptr{ts + 4952, ts + 4954, ts + 4956, ts + 4961} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 152)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*16)).FpBt) != 0 { @@ -57367,7 +57374,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -57386,7 +57393,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -57401,7 +57408,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -57409,7 +57416,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -57419,7 +57426,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*40 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -57463,7 +57470,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -57475,7 +57482,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -57574,7 +57581,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 88 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*40 @@ -57603,7 +57610,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57692,7 +57699,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -57707,7 +57714,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -57724,7 +57731,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -57757,7 +57764,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -57866,11 +57873,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4966, ts + 4971, ts + 4978, ts + 4981, ts + 4984, ts + 4987, ts + 4990, ts + 4993, ts + 5001, ts + 5004, ts + 5011, ts + 5019, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -57904,7 +57911,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -57920,7 +57927,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -57944,7 +57951,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -57975,7 +57982,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -58000,7 +58007,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -58019,7 +58026,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -58247,7 +58254,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -58265,7 +58272,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -58308,7 +58315,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -58323,7 +58330,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -58346,7 +58353,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -58550,7 +58557,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -58560,7 +58567,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -58589,7 +58596,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58641,7 +58648,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -58665,7 +58672,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -58690,7 +58697,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -58711,7 +58718,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -58734,7 +58741,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -58747,7 +58754,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -58759,7 +58766,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -58777,7 +58784,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 36))) != 0 { return handleMovedCursor(tls, p) @@ -58796,7 +58803,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -58871,10 +58878,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -58884,7 +58891,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -58933,7 +58940,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58984,7 +58991,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59011,7 +59018,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -59114,7 +59121,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -59128,7 +59135,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint32(unsafe.Sizeof(UnpackedRecord{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(unsafe.Sizeof(Mem{}))*uint32(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -59146,7 +59153,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59207,7 +59214,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -59250,7 +59257,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -59263,7 +59270,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -59303,7 +59310,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint32(unsafe.Sizeof(float64(0))) > uint32(8) { var x float64 = float64(i) @@ -59349,7 +59356,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -59443,7 +59450,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -59506,7 +59513,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -59548,7 +59555,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -59613,7 +59620,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -59648,7 +59655,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 48)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -59709,7 +59716,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -59720,7 +59727,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -59825,7 +59832,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -59849,7 +59856,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -59887,7 +59894,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -59941,7 +59948,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -60026,7 +60033,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -60038,7 +60045,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -60054,7 +60061,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -60068,7 +60075,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 108)) += nChange @@ -60076,7 +60083,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+148, Bft(1), 4, 0x10) } @@ -60096,7 +60103,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+148, Bft(iCode+1), 0, 0x3) @@ -60104,12 +60111,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -60119,7 +60126,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*40 @@ -60139,7 +60146,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 216)) |= 0x80000000 @@ -60155,7 +60162,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60186,7 +60193,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -60202,7 +60209,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -60219,7 +60226,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -60271,7 +60278,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -60297,7 +60304,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 148))&0x3>>0)) != 0) } @@ -60305,7 +60312,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5193, 0) return 1 @@ -60315,7 +60322,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5238, 0) return 1 @@ -60327,7 +60334,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60360,7 +60367,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -60370,7 +60377,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -60390,7 +60397,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -60412,7 +60419,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -60434,7 +60441,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -60457,27 +60464,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -60487,7 +60494,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -60500,26 +60507,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -60588,20 +60595,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -60627,7 +60634,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -60642,7 +60649,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -60656,7 +60663,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -60669,12 +60676,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -60683,39 +60690,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -60723,19 +60730,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -60747,32 +60754,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 116))) { @@ -60782,7 +60789,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -60796,7 +60803,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5278, int64(-1), @@ -60804,7 +60811,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -60814,7 +60821,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -60824,7 +60831,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -60851,7 +60858,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -61018,14 +61025,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -61065,7 +61072,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -61078,7 +61085,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -61095,14 +61102,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -61160,13 +61167,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -61175,7 +61182,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -61198,7 +61205,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -61218,7 +61225,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -61236,7 +61243,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -61259,7 +61266,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -61339,13 +61346,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -61355,7 +61362,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -61364,19 +61371,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -61411,7 +61418,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -61428,7 +61435,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -61438,43 +61445,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -61484,13 +61491,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -61510,7 +61517,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -61542,11 +61549,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -61555,44 +61562,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -61609,13 +61616,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -61623,7 +61630,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5311, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -61657,7 +61664,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -61683,16 +61690,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61703,11 +61710,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61718,7 +61725,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61728,7 +61735,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61741,11 +61748,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -61753,11 +61760,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -61806,7 +61813,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61817,7 +61824,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -61834,7 +61841,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -61846,7 +61853,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -61857,19 +61864,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -61892,7 +61899,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -61913,7 +61920,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -61922,7 +61929,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 148)) & 0x80 >> 7) } @@ -61931,7 +61938,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 148)) & 0xc >> 2) } @@ -61939,7 +61946,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -61948,7 +61955,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -61961,7 +61968,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61987,7 +61994,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -62002,7 +62009,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -62017,7 +62024,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -62030,7 +62037,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -62044,7 +62051,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -62136,7 +62143,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62155,7 +62162,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62167,7 +62174,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62179,7 +62186,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -62193,7 +62200,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -62334,7 +62341,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -62379,7 +62386,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -62602,7 +62609,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -62673,7 +62680,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -62695,7 +62702,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62741,7 +62748,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -62773,7 +62780,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -62785,7 +62792,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -62793,7 +62800,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62829,7 +62836,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -62843,13 +62850,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*40 @@ -62865,7 +62872,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -62889,7 +62896,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -62899,11 +62906,11 @@ var azTypes = [5]uintptr{ ts + 1105, ts + 1083, ts + 1528, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(748) defer tls.Free(748) @@ -65015,6 +65022,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -68039,7 +68050,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 36))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 36)))) +__357: + ; __353: ; goto __8 @@ -68075,10 +68106,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+236) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -68086,13 +68117,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -68101,14 +68132,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -68116,12 +68147,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -68136,7 +68167,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -68154,13 +68185,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -68177,38 +68208,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 236))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+240, 0, uint32(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+240) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 240 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -68218,27 +68249,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+80+uintptr(i2)*4, libc.AssignPtrUint32(bp+280, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 280))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+280)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 80 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 280 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 280)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 236)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -68247,63 +68278,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+240) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+240) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 280 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 236))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 280 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 80 + uintptr(*(*U32)(unsafe.Pointer(bp + 236 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -68311,55 +68342,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 280)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 280))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint32(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 280))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 280)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 280))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 280))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -68374,20 +68405,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -68397,15 +68428,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*20 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -68440,81 +68471,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 40 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*16 + 4)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -68522,45 +68553,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 40 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -68585,14 +68616,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -68600,30 +68631,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 40 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -68687,31 +68718,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 40 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -68740,13 +68771,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -68756,77 +68787,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -68835,79 +68866,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 40 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -68916,22 +68947,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -68940,37 +68971,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -68985,7 +69016,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -68998,13 +69029,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 40) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -69023,20 +69054,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + 36)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 284 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 284 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+284) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 284 /* nEntry */)) @@ -69057,17 +69088,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5478, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -69078,16 +69109,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*24 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint32(nName+1)) @@ -69095,14 +69126,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -69110,121 +69141,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5529, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5551, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -69237,36 +69243,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -69274,48 +69305,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -69336,18 +69367,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -69355,43 +69386,43 @@ __519: ts+5605, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -69407,7 +69438,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -69449,66 +69480,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 292 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+292) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 148))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -69516,16 +69547,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 292)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -69545,20 +69576,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 292))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+148, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -69605,37 +69636,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -69725,13 +69756,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -69740,11 +69771,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 148))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -69756,24 +69787,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*40 @@ -69785,32 +69816,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -69830,10 +69861,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 36)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -69852,10 +69883,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -69910,7 +69941,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -69918,11 +69949,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1527 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -69931,71 +69962,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+12, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 36))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -70014,19 +70045,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -70041,10 +70072,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -70068,10 +70099,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -70196,7 +70227,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -70206,10 +70237,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -70218,29 +70249,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+300) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -70251,53 +70282,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), int64(U64(iKey)), 0, bp+300) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -70322,97 +70353,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+304, bp+300) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+304)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 20 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -70470,10 +70501,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp1)*4)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -70482,60 +70513,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 320 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 320 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 336 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+320, bp+336) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 336)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 336)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -70558,18 +70589,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -70581,10 +70612,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -70679,10 +70710,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; // Fall through into OP_NotFound /* no break */ @@ -70697,15 +70728,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 340 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 340 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 340 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 340 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -70715,62 +70746,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*40)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), pIdxKey, bp+356) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 356 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 356)) == 0) @@ -70778,31 +70809,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -70856,7 +70887,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -70866,14 +70897,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 360 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+360, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+360)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 360))) goto notExistsWithKey -__635: +__639: ; // Fall through into OP_NotExists /* no break */ @@ -70896,25 +70927,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 400 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 400)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -70972,89 +71003,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+404) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 404)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 408 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 408 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 408)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 408 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 408)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 408 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 408 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -71063,36 +71094,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+408) *(*I64)(unsafe.Pointer(bp + 408 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 408 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 408)))), 0, bp+404)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 404)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 404)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -71147,56 +71178,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*16)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+416 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -71208,13 +71239,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 36)), bp+416, @@ -71225,13 +71256,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -71244,7 +71275,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+416 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -71270,10 +71301,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -71323,28 +71354,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*16)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -71356,13 +71387,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -71371,28 +71402,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -71432,16 +71463,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+448) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 448)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -71464,10 +71495,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -71517,29 +71548,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -71560,20 +71591,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 452 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 36)))).FpVtab @@ -71584,36 +71615,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36 /* &.uc */)), bp+452 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 452 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 452 /* v3 */)) goto __8 @@ -71622,6 +71653,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) @@ -71629,11 +71664,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 36))) -__698: +__702: ; goto __8 @@ -71666,39 +71701,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 460 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+460) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 460 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 460)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -71714,29 +71749,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+464) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 464)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 464 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 464)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -71783,32 +71818,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 468 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+468) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+468) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 468 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 468)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -71891,18 +71926,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 160 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -71942,10 +71977,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -71955,10 +71990,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 472 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 472 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -71975,10 +72010,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -72001,17 +72036,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -72042,31 +72077,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 504 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+504, bp+520) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 520)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5820) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 520)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5820) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -72113,25 +72148,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 524 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+524) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) @@ -72143,17 +72178,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 524 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__726: +__730: ; goto __8 @@ -72167,16 +72202,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -72230,15 +72265,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -72252,19 +72287,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+532, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+532) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fz, bp+572, 0) Xsqlite3VdbeMemRelease(tls, bp+532) @@ -72272,22 +72307,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -72323,13 +72358,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 588 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -72337,21 +72372,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 588 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 588)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 588 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -72377,23 +72412,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*16)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+592) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 44)) += *(*I64)(unsafe.Pointer(bp + 592)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 592)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -72409,21 +72444,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 36))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 36))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -72444,10 +72479,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+600, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 600 /* pgno */))) goto __8 @@ -72461,10 +72496,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -72485,15 +72520,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpSchema) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+124, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5837 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).Fdb = db @@ -72505,11 +72540,11 @@ __751: ts+5851, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).Frc = SQLITE_OK @@ -72519,38 +72554,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+604 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+604)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -72563,10 +72598,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -72638,22 +72673,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+632) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 632)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 632)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -72671,15 +72706,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -72698,18 +72733,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+636) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*I64)(unsafe.Pointer(bp + 636 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -72744,35 +72779,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -72807,37 +72842,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 116 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5894, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -72845,7 +72880,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -72854,10 +72889,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -72865,10 +72900,10 @@ __781: uint32(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -72890,24 +72925,24 @@ __782: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem2 = pFrame2 + 88 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 40 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -72958,21 +72993,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 524)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 516)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 64)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -72989,25 +73024,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -73023,35 +73058,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -73068,11 +73103,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -73105,7 +73140,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -73115,10 +73150,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 644 /* x3 */)) -__802: +__806: ; goto __8 @@ -73133,16 +73168,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -73155,17 +73190,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -73212,10 +73247,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(n4)*uint32(unsafe.Sizeof(uintptr(0)))+(uint32(unsafe.Sizeof(Sqlite3_context{}))+uint32(unsafe.Sizeof(Mem{}))-uint32(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -73245,75 +73280,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+28 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+28 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -73349,32 +73384,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -73396,32 +73431,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+652+1*4, bp+652+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 652)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 652 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 40 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -73444,17 +73479,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -73464,18 +73499,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -73487,11 +73522,11 @@ __830: return ts + 5988 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -73499,29 +73534,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -73529,18 +73564,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -73550,10 +73585,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -73575,10 +73610,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -73594,17 +73629,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -73626,13 +73661,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+148, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -73675,25 +73710,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*16)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+5995, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -73709,16 +73744,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -73738,17 +73773,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+664) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+124) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+664) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -73762,10 +73797,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -73780,11 +73815,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 704 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -73792,10 +73827,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+704 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -73804,18 +73839,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 704 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 704 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -73833,10 +73868,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -73881,27 +73916,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*4)) = pArgc + uintptr(i7+1)*40 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -73909,10 +73944,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -73936,11 +73971,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -73949,40 +73984,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 708 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 36 /* &.uc */)), bp+708 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+708)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 708 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -73996,10 +74031,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -74014,21 +74049,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -74046,27 +74081,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 28)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -74100,43 +74135,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 740 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -74145,41 +74180,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 740 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -74204,16 +74239,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -74273,24 +74308,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -74301,38 +74336,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+224, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -74371,16 +74406,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 160 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 160 + 7*4))++ -__900: +__904: ; goto __8 @@ -74430,67 +74465,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6024, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 160 + 6*4))++ @@ -74535,25 +74570,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -74562,46 +74597,46 @@ __915: libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 28)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 160 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -74632,11 +74667,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6062, ts + 6071, ts + 6078, - ts + 6084} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6084} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -74667,7 +74702,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -74688,7 +74723,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -74705,7 +74740,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -74781,7 +74816,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(324) defer tls.Free(324) @@ -75102,7 +75137,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -75111,11 +75146,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -75134,14 +75169,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75200,14 +75235,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -75217,7 +75252,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -75233,7 +75268,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -75242,7 +75277,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75428,7 +75463,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -75579,7 +75614,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -75592,10 +75627,10 @@ type PmaReader1 = struct { FnBuffer int32 FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 FaBuffer uintptr @@ -75604,17 +75639,17 @@ type PmaWriter1 = struct { FiBufEnd int32 FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -75625,25 +75660,25 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -75652,10 +75687,10 @@ type IncrMerger1 = struct { FbEof int32 FbUseThread int32 FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -75686,11 +75721,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -75707,7 +75742,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -75811,7 +75846,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -75851,7 +75886,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -75866,7 +75901,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -75907,7 +75942,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75953,7 +75988,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75976,7 +76011,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -75996,7 +76031,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -76008,7 +76043,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76058,7 +76093,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -76118,7 +76153,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -76137,7 +76172,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -76233,7 +76268,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -76244,7 +76279,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -76264,7 +76299,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76283,14 +76318,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -76316,7 +76351,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -76341,7 +76376,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -76353,7 +76388,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -76370,7 +76405,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -76399,7 +76434,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 36)) @@ -76418,7 +76453,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*I64)(unsafe.Pointer(bp + 4)) = nByte @@ -76438,7 +76473,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -76462,7 +76497,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -76475,7 +76510,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76514,7 +76549,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -76532,7 +76567,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -76589,7 +76624,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -76604,7 +76639,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -76633,7 +76668,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -76649,7 +76684,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -76672,7 +76707,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -76727,7 +76762,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76803,7 +76838,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -76814,7 +76849,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -76878,7 +76913,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76994,7 +77029,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -77040,7 +77075,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(vdbeIncrPopulate(tls, pIncr)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -77048,7 +77083,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -77071,7 +77106,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -77105,7 +77140,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -77132,7 +77167,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 48 + 4)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -77140,7 +77175,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77200,7 +77235,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -77270,7 +77305,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -77327,7 +77362,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -77343,7 +77378,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -77370,7 +77405,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77407,7 +77442,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -77423,7 +77458,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77474,7 +77509,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -77555,7 +77590,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77630,7 +77665,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -77675,7 +77710,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77717,7 +77752,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -77736,7 +77771,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77771,7 +77806,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77862,7 +77897,7 @@ type MemJournal1 = struct { Fflags int32 FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -77909,23 +77944,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -77972,7 +78007,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -77982,7 +78017,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -78020,7 +78055,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -78086,7 +78121,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -78114,7 +78149,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -78124,14 +78159,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -78146,7 +78181,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -78158,7 +78193,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -78186,20 +78221,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -78228,7 +78263,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -78276,7 +78311,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -78318,7 +78353,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -78327,7 +78362,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -78356,7 +78391,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -78366,7 +78401,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -78408,7 +78443,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -78457,7 +78492,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -78488,13 +78523,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -78506,7 +78541,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -78514,7 +78549,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -78549,14 +78584,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 24))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -78589,7 +78624,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -78635,7 +78670,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -78652,7 +78687,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 12))&0x3>>0) != ENAME_TAB { @@ -78678,7 +78713,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -78697,7 +78732,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -78747,7 +78782,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -79465,7 +79500,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*72 @@ -79514,7 +79549,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -79536,7 +79571,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79562,7 +79597,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -80044,7 +80079,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -80079,7 +80114,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -80123,7 +80158,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -80146,7 +80181,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -80283,7 +80318,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80329,7 +80364,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -80340,7 +80375,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -80372,7 +80407,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -80449,7 +80484,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -80748,7 +80783,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -80789,7 +80824,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -80846,7 +80881,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -80880,7 +80915,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -80916,7 +80951,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -80937,7 +80972,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -80980,7 +81015,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -80992,7 +81027,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81003,7 +81038,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -81014,7 +81049,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -81039,7 +81074,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -81111,7 +81146,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -81121,7 +81156,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -81130,7 +81165,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -81155,7 +81190,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -81173,7 +81208,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -81186,7 +81221,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -81202,7 +81237,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -81225,7 +81260,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -81235,7 +81270,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -81262,7 +81297,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -81270,7 +81305,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -81300,7 +81335,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -81334,7 +81369,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -81382,7 +81417,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -81406,7 +81441,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -81435,7 +81470,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81523,7 +81558,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81545,7 +81580,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -81553,7 +81588,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -81562,7 +81597,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -81582,7 +81617,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81609,7 +81644,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -81619,7 +81654,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81646,7 +81681,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81694,7 +81729,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81709,7 +81744,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -81732,7 +81767,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -81750,7 +81785,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 20)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -81778,7 +81813,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81830,7 +81865,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -81849,7 +81884,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81886,7 +81921,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81918,7 +81953,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81986,7 +82021,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -82016,7 +82051,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -82030,13 +82065,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -82048,7 +82083,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 12) } @@ -82090,7 +82125,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -82112,7 +82147,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&Size_t(0x3fffffff) + Size_t(1))) @@ -82131,7 +82166,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -82148,7 +82183,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82258,7 +82293,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(With{})) + uint32(unsafe.Sizeof(Cte{}))*uint32((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -82280,7 +82315,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -82290,14 +82325,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 24)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82330,7 +82365,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -82338,7 +82373,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -82407,7 +82442,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -82460,7 +82495,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -82489,7 +82524,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82555,9 +82590,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -82574,7 +82609,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -82593,7 +82628,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -82616,7 +82651,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82713,7 +82748,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -82740,7 +82775,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -82766,7 +82801,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -82781,7 +82816,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82793,7 +82828,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -82805,7 +82840,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -82813,7 +82848,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -82830,7 +82865,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -82842,7 +82877,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6639) == 0 { return U32(EP_IsTrue) } @@ -82855,7 +82890,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -82869,7 +82904,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -82886,7 +82921,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -82932,7 +82967,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -83010,7 +83045,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -83034,7 +83069,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -83049,7 +83084,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -83057,12 +83092,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var i int32 @@ -83104,7 +83139,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -83140,7 +83175,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -83149,7 +83184,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83201,7 +83236,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -83240,7 +83275,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -83293,7 +83328,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7585) == 0 { return 1 } @@ -83311,7 +83346,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -83369,7 +83404,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -83381,7 +83416,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -83470,7 +83505,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83688,7 +83723,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -83720,7 +83755,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83739,7 +83774,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList)).FnExpr, 1) } else { @@ -83767,7 +83802,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(53) defer tls.Free(53) @@ -83962,7 +83997,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -84085,7 +84120,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 20)))).FpEList)).FnExpr { @@ -84122,7 +84157,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84503,7 +84538,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84523,7 +84558,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -84569,7 +84604,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -84584,7 +84619,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -84603,7 +84638,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84654,7 +84689,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -84668,14 +84703,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -84694,7 +84729,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -84718,7 +84753,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -84726,7 +84761,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -84851,7 +84886,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -85922,7 +85957,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8004)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8004)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -85939,7 +85974,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8004)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -86008,7 +86043,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -86033,7 +86068,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -86054,7 +86089,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -86067,7 +86102,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -86093,7 +86128,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -86175,7 +86210,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -86238,7 +86273,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86470,7 +86505,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86720,7 +86755,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -86740,7 +86775,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -86794,7 +86829,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -86898,7 +86933,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -86925,7 +86960,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -86936,7 +86971,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -87064,7 +87099,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -87087,7 +87122,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -87197,7 +87232,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -87231,7 +87266,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -87249,7 +87284,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -87274,7 +87309,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -87312,7 +87347,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -87328,7 +87363,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -87368,7 +87403,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -87417,7 +87452,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -87450,7 +87485,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -87463,7 +87498,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -87480,7 +87515,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -87498,7 +87533,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -87689,7 +87724,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -87715,7 +87750,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -87740,7 +87775,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -87749,7 +87784,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { @@ -87759,7 +87794,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -87777,7 +87812,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -87795,7 +87830,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -87829,7 +87864,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87848,7 +87883,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -87872,7 +87907,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -87888,7 +87923,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -87901,7 +87936,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -88086,7 +88121,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -88101,7 +88136,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -88247,7 +88282,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88364,7 +88399,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -88392,7 +88427,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -88521,7 +88556,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -88533,7 +88568,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -88552,7 +88587,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -88564,7 +88599,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -88575,7 +88610,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -88616,7 +88651,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -88626,7 +88661,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -88658,7 +88693,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -88680,7 +88715,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -88703,7 +88738,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -88719,7 +88754,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -88742,7 +88777,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -88758,7 +88793,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -88780,7 +88815,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -88802,7 +88837,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -88826,7 +88861,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -88843,7 +88878,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -88857,34 +88892,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10800, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -88898,7 +88931,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -88918,7 +88951,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10800, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10808, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -88968,7 +89001,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10806, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10814, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10798 /* " " */ @@ -89004,7 +89037,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -89102,7 +89135,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -89131,7 +89164,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -89170,7 +89203,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -89513,7 +89546,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -89524,7 +89557,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -89564,7 +89597,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(352) defer tls.Free(352) @@ -89698,7 +89731,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 24)), pExpr) } @@ -89731,7 +89764,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -89845,7 +89878,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -89917,7 +89950,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -89957,7 +89990,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -89983,7 +90016,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10811, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10819, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -90003,7 +90036,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -90081,10 +90114,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10818, + Xsqlite3ErrorMsg(tls, pParse, ts+10826, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10846 /* "PRIMARY KEY" */ + return ts + 10854 /* "PRIMARY KEY" */ } return ts + 6071 /* "UNIQUE" */ }(), @@ -90097,7 +90130,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10858, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10866, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -90117,11 +90150,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10906, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10914, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11027, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11035, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -90236,16 +90269,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint32(unsafe.Sizeof(aAlterTableFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11045}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11066}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11086}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11105}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11124}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11053}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11074}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11094}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11132}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -90401,7 +90434,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -90442,7 +90475,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11147, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11155, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -90454,10 +90487,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11170, + ts+11178, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11200, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11208, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -90478,10 +90511,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11218 /* "sqlite_stat1" */, FzCols: ts + 11231 /* "tbl,idx,stat" */}, - {FzName: ts + 11244 /* "sqlite_stat4" */, FzCols: ts + 11257 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11285 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11226 /* "sqlite_stat1" */, FzCols: ts + 11239 /* "tbl,idx,stat" */}, + {FzName: ts + 11252 /* "sqlite_stat4" */, FzCols: ts + 11265 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11293 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -90507,14 +90540,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -90525,12 +90558,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -90539,7 +90572,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -90554,7 +90587,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -90564,7 +90597,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -90579,7 +90612,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -90614,7 +90647,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -90709,7 +90742,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11298} /* sqlite3.c:111534:22 */ + FzName: ts + 11306} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -90720,7 +90753,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -90742,7 +90775,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -90760,7 +90793,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -90903,7 +90936,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -90955,7 +90988,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -91027,7 +91060,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11308} /* sqlite3.c:111824:22 */ + FzName: ts + 11316} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -91046,7 +91079,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -91080,7 +91113,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11318, + Xsqlite3_str_appendf(tls, bp+24, ts+11326, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -91090,7 +91123,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11323, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11331, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -91133,7 +91166,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+11329, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11337, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+48)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+48 /* &sStat */)).FnChar-- @@ -91147,9 +91180,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11335} /* sqlite3.c:111958:22 */ + FzName: ts + 11343} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -91158,7 +91191,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -91194,7 +91227,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11344, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11352, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -91212,7 +91245,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*64 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11218, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11226, uint32(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -91445,7 +91478,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11354, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11362, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -91507,7 +91540,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11354, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11362, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -91518,7 +91551,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -91526,7 +91559,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema // Schema of database iDb var k uintptr @@ -91551,7 +91584,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -91560,9 +91593,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 40)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11358) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11366) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11362) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11370) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -91578,7 +91611,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -91641,16 +91674,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -91679,15 +91712,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11366, z) == 0 { + if Xsqlite3_strglob(tls, ts+11374, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11377, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11385, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11387, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11395, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -91709,7 +91742,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -91771,7 +91804,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -91788,7 +91821,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*20 @@ -91846,7 +91879,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -91867,7 +91900,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -92003,15 +92036,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11244, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11252, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11399, - ts+11453, + ts+11407, + ts+11461, zDb) } return rc @@ -92035,7 +92068,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -92063,10 +92096,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11218, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11226, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11505, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11513, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -92142,7 +92175,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -92156,7 +92189,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6325, zName) == 0) } @@ -92174,7 +92207,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -92241,7 +92274,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11546, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11554, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -92254,7 +92287,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 116 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11549, + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11557, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 116 + 7*4)))) goto attach_error __7: @@ -92268,7 +92301,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11586, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11594, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -92339,7 +92372,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11616, 0) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11624, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -92356,7 +92389,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11645, 0) + ts+11653, 0) rc = SQLITE_ERROR __23: ; @@ -92432,7 +92465,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11713, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11721, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -92467,7 +92500,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -92520,14 +92553,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11741, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11749, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11762, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11770, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -92535,7 +92568,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11788, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11796, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -92572,7 +92605,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -92651,7 +92684,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -92659,12 +92692,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11810} /* sqlite3.c:113383:24 */ + FzName: ts + 11818} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -92672,10 +92705,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11824} /* sqlite3.c:113403:24 */ + FzName: ts + 11832} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92687,7 +92720,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11838, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11846, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -92695,7 +92728,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -92720,7 +92753,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11862, + ts+11870, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -92756,7 +92789,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -92792,7 +92825,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -92807,15 +92840,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+4, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+4, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -92905,7 +92938,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -92918,8 +92951,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11908, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11916, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -92930,7 +92963,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -92945,11 +92978,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11931, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11939, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11937, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11945, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11943, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11951, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -92964,7 +92997,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -93013,7 +93046,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -93035,7 +93068,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11970, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11978, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -93047,7 +93080,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -93056,7 +93089,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -93071,7 +93104,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -93105,7 +93138,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -93117,7 +93150,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -93141,7 +93174,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -93294,7 +93327,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -93345,7 +93378,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -93369,14 +93402,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8012, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11985+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12004+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11993+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12012+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5837+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12018) + ts+12026) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12004+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12012+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, ts+5837) } @@ -93402,11 +93435,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8012, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12004+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12012+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5837) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11985+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11993+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12018) + ts+12026) } } } @@ -93421,7 +93454,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -93442,7 +93475,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+392, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12037, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12045, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -93461,9 +93494,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12045 /* "no such view" */ + zMsg = ts + 12053 /* "no such view" */ } else { - zMsg = ts + 12058 /* "no such table" */ + zMsg = ts + 12066 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6520, libc.VaList(bp, zMsg, zDbase, zName)) @@ -93484,7 +93517,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -93498,13 +93531,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8012, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5837+7) == 0 { - return ts + 12004 /* "sqlite_schema" */ + return ts + 12012 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12018+7) == 0 { - return ts + 11985 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12026+7) == 0 { + return ts + 11993 /* "sqlite_temp_sche..." */ } } return zName @@ -93520,7 +93553,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -93547,7 +93580,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -93563,7 +93596,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -93595,7 +93628,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -93621,7 +93654,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -93642,7 +93675,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -93664,14 +93697,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.pDfltList */)) @@ -93694,7 +93727,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -93711,7 +93744,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -93730,7 +93763,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -93749,7 +93782,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -93799,7 +93832,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -93836,7 +93869,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -93849,7 +93882,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -93871,7 +93904,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -93884,7 +93917,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5837) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -93897,7 +93930,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -93933,7 +93966,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -93957,7 +93990,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93966,13 +93999,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12072, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12080, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12089, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12097, libc.VaList(bp, pName1)) return -1 } } else { @@ -93984,7 +94017,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -93998,7 +94031,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94019,7 +94052,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8012, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12109, + Xsqlite3ErrorMsg(tls, pParse, ts+12117, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -94029,7 +94062,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 56 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -94040,7 +94073,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -94060,7 +94093,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -94107,7 +94140,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -94137,7 +94170,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -94160,7 +94193,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -94188,7 +94221,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 /* "sqlite_temp_mast..." */ + return ts + 12026 /* "sqlite_temp_mast..." */ } return ts + 5837 /* "sqlite_master" */ }()) @@ -94208,7 +94241,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12151, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12159, 0) return __4: ; @@ -94255,7 +94288,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }(), uintptr(0), zDb) != 0) { @@ -94295,7 +94328,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12192, + Xsqlite3ErrorMsg(tls, pParse, ts+12200, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10369 /* "view" */ @@ -94315,7 +94348,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12213, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12221, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -94418,8 +94451,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -94429,10 +94462,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12248, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12256, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -94451,12 +94484,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12265, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12273, 0) } else { } @@ -94477,7 +94510,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12248 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12256 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -94489,7 +94522,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - if Xsqlite3HashInsert(tls, pHash, ts+12248, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12256, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -94501,7 +94534,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(32) defer tls.Free(32) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -94523,7 +94556,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12299, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12307, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -94535,13 +94568,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12322, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12330, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12329, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12337, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- @@ -94581,7 +94614,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12339, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12347, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -94620,7 +94653,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -94667,7 +94700,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -94741,7 +94774,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -94753,11 +94786,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*16 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12365, + Xsqlite3ErrorMsg(tls, pParse, ts+12373, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12410, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12418, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -94794,7 +94827,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -94803,12 +94836,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12451, 0) + ts+12459, 0) } } @@ -94828,7 +94861,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94853,7 +94886,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12503, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12511, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -94942,7 +94975,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12544, 0) + ts+12552, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -94959,7 +94992,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94989,7 +95022,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -95024,7 +95057,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95044,7 +95077,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12600, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12608, 0) goto generated_done __2: ; @@ -95057,13 +95090,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12643, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12651, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12651, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12659, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -95096,7 +95129,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12658, + Xsqlite3ErrorMsg(tls, pParse, ts+12666, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -95119,7 +95152,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -95133,7 +95166,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -95168,7 +95201,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -95204,7 +95237,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -95239,12 +95272,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1527 /* "" */ - zSep2 = ts + 12689 /* "," */ + zSep2 = ts + 12697 /* "," */ zEnd = ts + 4901 /* ")" */ } else { - zSep = ts + 12691 /* "\n " */ - zSep2 = ts + 12695 /* ",\n " */ - zEnd = ts + 12700 /* "\n)" */ + zSep = ts + 12699 /* "\n " */ + zSep2 = ts + 12703 /* ",\n " */ + zEnd = ts + 12708 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -95252,7 +95285,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12703, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12711, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -95292,15 +95325,15 @@ __6: var azType1 = [5]uintptr{ ts + 1527, - ts + 12717, - ts + 12723, - ts + 12728, - ts + 12733, -} /* sqlite3.c:115999:23 */ + ts + 12725, + ts + 12731, + ts + 12736, + ts + 12741, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -95329,7 +95362,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -95358,7 +95391,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -95378,7 +95411,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -95398,7 +95431,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -95431,7 +95464,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -95470,7 +95503,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95633,7 +95666,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -95666,7 +95699,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -95710,7 +95743,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -95747,7 +95780,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -95803,10 +95836,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12739, + ts+12747, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12772, + Xsqlite3ErrorMsg(tls, pParse, ts+12780, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -95826,11 +95859,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12799, 0) + ts+12807, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12849, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12857, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -95874,7 +95907,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12881, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12889, 0) return } } @@ -95908,11 +95941,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8754 /* "table" */ - zType2 = ts + 12925 /* "TABLE" */ + zType2 = ts + 12933 /* "TABLE" */ } else { // A view zType = ts + 10369 /* "view" */ - zType2 = ts + 12931 /* "VIEW" */ + zType2 = ts + 12939 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -95937,6 +95970,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -95993,7 +96031,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12936, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12944, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -96001,7 +96039,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12951, + ts+12959, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -96019,14 +96057,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13049, + ts+13057, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13091, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13099, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -96063,7 +96101,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -96084,7 +96122,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13125, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13133, 0) goto create_view_fail __1: ; @@ -96181,7 +96219,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96221,7 +96259,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13161, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13169, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -96296,7 +96334,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*16)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -96326,7 +96364,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -96352,14 +96390,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13191, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13199, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -96373,7 +96411,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13206, + ts+13214, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*16)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -96382,7 +96420,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -96428,7 +96466,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -96437,17 +96475,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13273, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13281, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11170, + ts+11178, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -96480,7 +96518,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13287, + ts+13295, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -96492,7 +96530,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13332, + ts+13340, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -96511,7 +96549,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -96522,7 +96560,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8012, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3230, 4) == 0 { return 0 @@ -96543,7 +96581,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -96611,7 +96649,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }() @@ -96673,7 +96711,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13399, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13407, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -96683,14 +96721,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13427, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13435, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13461, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13469, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -96705,7 +96743,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11362, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11370, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -96731,7 +96769,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -96770,7 +96808,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13493, + ts+13501, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -96783,7 +96821,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13556, 0) + ts+13564, 0) goto fk_end goto __7 __6: @@ -96868,7 +96906,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13650, + ts+13658, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -96954,7 +96992,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -96979,7 +97017,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -97091,7 +97129,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -97116,7 +97154,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97125,12 +97163,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 12))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13696, + Xsqlite3ErrorMsg(tls, pParse, ts+13704, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13724 /* "FIRST" */ + return ts + 13732 /* "FIRST" */ } - return ts + 13730 /* "LAST" */ + return ts + 13738 /* "LAST" */ }())) return 1 } @@ -97149,7 +97187,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -97289,7 +97327,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13735, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13743, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -97310,7 +97348,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13741, + ts+13749, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -97342,21 +97380,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13791, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13819, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13827, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13844, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13852, 0) goto exit_create_index __17: ; @@ -97383,7 +97421,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13735, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13743, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -97398,7 +97436,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13878, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13886, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -97410,7 +97448,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13912, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13920, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -97439,7 +97477,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13936, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13944, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -97468,7 +97506,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }(), uintptr(0), zDb) != 0) { @@ -97514,7 +97552,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13735) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13743) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -97632,7 +97670,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13959, 0) + ts+13967, 0) goto exit_create_index __56: ; @@ -97862,7 +97900,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14020, libc.VaList(bp+48, 0)) + ts+14028, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -97918,8 +97956,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14062, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14070, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -97976,12 +98014,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14079, + zStmt = Xsqlite3MPrintf(tls, db, ts+14087, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1527 /* "" */ } - return ts + 14099 /* " UNIQUE" */ + return ts + 14107 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -97993,7 +98031,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14107, + ts+14115, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -98009,7 +98047,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14166, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14174, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -98105,7 +98143,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -98149,11 +98187,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -98188,7 +98226,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14193, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14201, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -98203,7 +98241,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14211, libc.VaList(bp+8, 0)) + ts+14219, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -98214,7 +98252,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }() @@ -98244,9 +98282,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14284, + ts+14292, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11358, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11366, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -98272,7 +98310,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -98299,7 +98337,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98330,7 +98368,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -98344,7 +98382,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -98382,7 +98420,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98397,7 +98435,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14344, + Xsqlite3ErrorMsg(tls, pParse, ts+14352, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -98464,7 +98502,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -98503,7 +98541,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -98535,7 +98573,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -98598,7 +98636,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98609,12 +98647,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14380, + Xsqlite3ErrorMsg(tls, pParse, ts+14388, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14416 /* "ON" */ + return ts + 14424 /* "ON" */ } - return ts + 14419 /* "USING" */ + return ts + 14427 /* "USING" */ }())) goto append_from_error __1: @@ -98662,7 +98700,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -98684,7 +98722,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -98701,7 +98739,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*72 @@ -98725,7 +98763,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -98736,14 +98774,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14425, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14433, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -98771,7 +98809,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -98779,9 +98817,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14431 + return ts + 14439 } - return ts + 14440 + return ts + 14448 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -98793,7 +98831,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -98806,11 +98844,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14425, ts + 14447, ts + 14431} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14433, ts + 14455, ts + 14439} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98822,7 +98860,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14455, 0) + ts+14463, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -98836,13 +98874,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11931, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11939, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14539, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14547, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -99011,7 +99049,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -99026,7 +99064,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -99043,7 +99081,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -99085,7 +99123,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99145,14 +99183,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14548, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14556, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -99198,7 +99236,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -99218,7 +99256,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -99226,7 +99264,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -99236,7 +99274,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99255,7 +99293,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+12+uintptr(i)*24)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14594, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14602, libc.VaList(bp, zName)) } } } @@ -99279,7 +99317,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -99309,7 +99347,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -99340,7 +99378,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -99355,7 +99393,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -99366,7 +99404,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -99390,7 +99428,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+436, zName) @@ -99435,7 +99473,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -99451,7 +99489,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -99471,7 +99509,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99493,7 +99531,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14624, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14632, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -99517,7 +99555,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -99558,7 +99596,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -99594,7 +99632,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*4)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 36)) { @@ -99606,7 +99644,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -99644,7 +99682,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -99724,7 +99762,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -99759,7 +99797,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -99806,7 +99844,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -99824,7 +99862,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -99845,7 +99883,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -99864,16 +99902,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14655, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14684, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -99882,7 +99920,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -99914,7 +99952,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -100465,7 +100503,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14722) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14730) __61: ; @@ -100520,7 +100558,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -100610,7 +100648,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11218) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11226) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -100657,7 +100695,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -100746,7 +100784,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -100802,7 +100840,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -100830,7 +100868,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*20 @@ -100840,14 +100878,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -100877,7 +100915,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -100888,18 +100926,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6135, ts + 6130, ts + 7885, ts + 7880, ts + 6125} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6135, ts + 6130, ts + 7885, ts + 7880, ts + 6125} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -100948,7 +100986,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -100960,7 +100998,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14735, -1) + Xsqlite3_result_error(tls, context, ts+14743, -1) return } iVal = -iVal @@ -101002,7 +101040,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -101117,7 +101155,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -101154,7 +101192,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -101262,7 +101300,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -101300,7 +101338,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14752, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14760, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -101316,7 +101354,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -101333,7 +101371,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -101354,7 +101392,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -101383,7 +101421,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101407,7 +101445,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -101425,7 +101463,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101440,7 +101478,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101449,7 +101487,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101464,20 +101502,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -101517,7 +101555,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(11) defer tls.Free(11) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -101703,13 +101741,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -101727,7 +101765,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101750,7 +101788,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 116 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14757, -1) + Xsqlite3_result_error(tls, context, ts+14765, -1) return } if argc == 3 { @@ -101762,7 +101800,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14790, -1) + ts+14798, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -101790,7 +101828,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*4)), pColl) != 0 { @@ -101800,7 +101838,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -101811,7 +101849,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -101822,7 +101860,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101834,7 +101872,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -101849,7 +101887,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -101864,11 +101902,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -101890,7 +101928,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14835, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14843, libc.VaList(bp+8, r1)) } } break @@ -101927,7 +101965,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14842, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14850, libc.VaList(bp+24, zArg)) break } @@ -101949,7 +101987,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -101972,7 +102010,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -101986,7 +102024,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -102024,7 +102062,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -102062,7 +102100,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -102081,7 +102119,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -102170,7 +102208,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -102273,8 +102311,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10798 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10798 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -102283,7 +102321,7 @@ var azOne = [1]uintptr{uintptr(ts + 10798 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102321,7 +102359,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14845, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14853, 4, uintptr(0)) } } @@ -102334,10 +102372,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102349,7 +102387,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11970, -1) + Xsqlite3_result_error(tls, context, ts+11978, -1) return } @@ -102373,11 +102411,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -102387,7 +102425,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -102409,7 +102447,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -102432,12 +102470,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14735, -1) + Xsqlite3_result_error(tls, context, ts+14743, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -102446,7 +102484,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -102454,7 +102492,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -102468,14 +102506,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -102489,7 +102527,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -102500,7 +102538,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -102510,7 +102548,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -102548,7 +102586,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -102561,11 +102599,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -102581,9 +102619,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -102648,7 +102686,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -102690,7 +102728,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -102698,7 +102736,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -102716,8 +102754,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14850, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14858, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -102727,7 +102765,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -102737,14 +102775,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14856, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14864, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14856, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14864, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14856, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14856, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14864, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14864, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -102762,7 +102800,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -102818,7 +102856,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -102847,11 +102885,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -102861,7 +102899,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -102918,18 +102956,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -102950,7 +102988,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -102976,13 +103014,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -103010,7 +103048,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -103021,109 +103059,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14861}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14881}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14894}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14912}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14869}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14889}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14920}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14921}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14929}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14929}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14944}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14970}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 14995}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15004}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15015}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15022}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15036}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15036}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15042}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15042}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15048}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15048}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15053}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15053}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15053}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15057}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15057}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15057}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15061}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15068}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15076}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15116}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15120}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15120}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15132}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15138}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15142}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15149}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15156}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15174}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15189}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15206}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15217}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15223}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15241}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14929}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14937}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14937}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14952}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14978}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15003}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15012}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15044}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15044}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15050}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15050}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15056}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15056}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15061}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15061}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15061}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15065}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15065}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15065}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15069}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15076}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15084}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15097}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15104}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15119}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15124}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15128}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15128}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15134}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15140}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15146}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15150}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15175}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15182}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15197}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15225}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15231}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15249}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15263}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15280}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15280}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15297}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15301}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15307}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15311}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15311}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15317}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15317}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15279}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15305}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15309}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15315}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15319}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15319}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15325}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15330}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14856}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14856}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15335}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15335}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15344}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15349}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15338}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14864}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14864}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15343}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15343}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15352}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15357}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15363}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15369}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15372}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15376}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15382}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15387}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15391}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15401}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15405}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15415}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15426}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15430}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15371}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15377}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15380}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15384}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15390}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15380}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15399}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15403}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15409}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15413}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15418}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15423}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15428}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15434}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15438}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15443}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15448}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15453}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15459}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15465}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15471}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15476}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15442}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15446}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15451}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15456}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15461}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15473}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15479}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15484}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15492}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15495}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15335}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15500}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15492}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15500}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15503}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15343}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15508}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -103298,7 +103336,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -103409,7 +103447,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15504, + ts+15512, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -103444,7 +103482,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -103574,7 +103612,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -103601,7 +103639,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -103642,7 +103680,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -103766,7 +103804,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+56, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -103776,7 +103814,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -103790,7 +103828,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -103823,7 +103861,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -103886,7 +103924,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FiFrom @@ -103910,7 +103948,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FzCol @@ -103934,7 +103972,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -103969,7 +104007,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -104171,7 +104209,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -104230,7 +104268,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -104298,7 +104336,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -104501,7 +104539,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -104522,7 +104560,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -104582,7 +104620,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -104624,7 +104662,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -104703,7 +104741,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -104761,7 +104799,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -104797,7 +104835,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 20)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*16)).FcolFlags)) @@ -104810,7 +104848,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -104923,7 +104961,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -104977,7 +105015,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -105017,7 +105055,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -105031,7 +105069,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -105039,7 +105077,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -105050,7 +105088,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -105081,16 +105119,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -105191,7 +105229,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -105373,7 +105411,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -105463,7 +105504,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15549, + ts+15557, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -105488,7 +105529,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15590, + Xsqlite3ErrorMsg(tls, pParse, ts+15598, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -105660,7 +105701,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15622, + ts+15630, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -105670,7 +105711,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15674, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -105726,7 +105767,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15699, + Xsqlite3ErrorMsg(tls, pParse, ts+15707, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -105734,7 +105775,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15745, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15753, 0) goto insert_cleanup __57: ; @@ -106218,7 +106259,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15766) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15774) __123: ; @@ -106242,7 +106283,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -106269,7 +106310,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -106302,7 +106343,7 @@ func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng ui type IndexListTerm1 = struct { Fp uintptr Fix int32 -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -106313,7 +106354,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -106321,12 +106362,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [4]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 4 /* &.aIdx */)))).Fix @@ -106339,7 +106380,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -106445,7 +106486,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -106563,7 +106604,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11931, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11939, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -107308,7 +107349,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -107325,7 +107366,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -107428,7 +107469,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -107506,7 +107547,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -107564,7 +107605,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -107585,18 +107626,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -107950,7 +107985,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -107971,7 +108006,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -108160,7 +108195,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -108494,7 +108529,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -108508,7 +108543,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -108552,7 +108587,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11970, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11978, 0) __3: ; return SQLITE_ERROR @@ -108562,7 +108597,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15780 /* "sqlite3_extensio..." */ + zEntry = ts + 15788 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -108582,7 +108617,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11931, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11939, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -108628,7 +108663,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15803, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15811, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -108642,7 +108677,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15812, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15820, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -108666,7 +108701,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15816, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15824, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -108684,7 +108719,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15822, libc.VaList(bp+16, zEntry, zFile)) + ts+15830, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -108711,7 +108746,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15865, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15873, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -108751,7 +108786,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15897, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15905, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -108761,10 +108796,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15934, -} /* sqlite3.c:129386:21 */ + ts + 15942, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -108775,7 +108810,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -108786,7 +108821,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 28)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -108805,15 +108840,15 @@ func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int3 type sqlite3AutoExtList = struct { FnExt U32 FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -108823,7 +108858,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -108864,7 +108899,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -108883,7 +108918,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -108898,7 +108933,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -108929,7 +108964,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15937, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15945, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -108975,67 +109010,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5001, - ts + 15976, + ts + 15984, ts + 8754, - ts + 15980, - ts + 15985, ts + 15988, - ts + 15998, - ts + 16008, - ts + 16014, - ts + 16018, - ts + 16023, - ts + 16028, + ts + 15993, + ts + 15996, + ts + 16006, + ts + 16016, + ts + 16022, + ts + 16026, + ts + 16031, ts + 16036, - ts + 16047, - ts + 16050, + ts + 16044, + ts + 16055, + ts + 16058, - ts + 16057, - ts + 16018, - ts + 16023, - ts + 16064, - ts + 16069, + ts + 16065, + ts + 16026, + ts + 16031, ts + 16072, - ts + 16079, - ts + 16014, - ts + 16018, - ts + 16085, - ts + 16090, - ts + 16095, - ts + 16018, - ts + 16099, - ts + 16023, + ts + 16077, + ts + 16080, + ts + 16087, + ts + 16022, + ts + 16026, + ts + 16093, + ts + 16098, + ts + 16103, + ts + 16026, ts + 16107, - ts + 16111, - ts + 16116, - ts + 11362, - ts + 11358, - ts + 16122, - ts + 16127, - ts + 16132, - ts + 15976, - ts + 16018, - ts + 16137, - ts + 16144, - ts + 16151, - ts + 8754, + ts + 16031, + ts + 16115, + ts + 16119, + ts + 16124, + ts + 11370, + ts + 11366, + ts + 16130, + ts + 16135, + ts + 16140, + ts + 15984, + ts + 16026, + ts + 16145, + ts + 16152, ts + 16159, + ts + 8754, + ts + 16167, ts + 5004, - ts + 16165, + ts + 16173, - ts + 15976, - ts + 16018, - ts + 16170, - ts + 16175, - ts + 15372, - ts + 16180, + ts + 15984, + ts + 16026, + ts + 16178, + ts + 16183, + ts + 15380, + ts + 16188, - ts + 16193, - ts + 16202, - ts + 16209, + ts + 16201, + ts + 16210, + ts + 16217, - ts + 16220, -} /* sqlite3.c:129831:19 */ + ts + 16228, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -109045,247 +109080,247 @@ type PragmaName1 = struct { FiPragCName U8 FnPragCName U8 FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16228, + { /* zName: */ FzName: ts + 16236, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16243, + { /* zName: */ FzName: ts + 16251, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16258, + { /* zName: */ FzName: ts + 16266, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16270, + { /* zName: */ FzName: ts + 16278, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16286, + { /* zName: */ FzName: ts + 16294, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16209, + { /* zName: */ FzName: ts + 16217, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16299, + { /* zName: */ FzName: ts + 16307, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16311, + { /* zName: */ FzName: ts + 16319, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16331, + { /* zName: */ FzName: ts + 16339, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16347, + { /* zName: */ FzName: ts + 16355, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16368, + { /* zName: */ FzName: ts + 16376, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16383, + { /* zName: */ FzName: ts + 16391, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16399, + { /* zName: */ FzName: ts + 16407, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16413, + { /* zName: */ FzName: ts + 16421, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16426, + { /* zName: */ FzName: ts + 16434, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16440, + { /* zName: */ FzName: ts + 16448, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16459, + { /* zName: */ FzName: ts + 16467, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16478, + { /* zName: */ FzName: ts + 16486, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16501, + { /* zName: */ FzName: ts + 16509, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16510, + { /* zName: */ FzName: ts + 16518, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16528, + { /* zName: */ FzName: ts + 16536, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16545, + { /* zName: */ FzName: ts + 16553, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16558, + { /* zName: */ FzName: ts + 16566, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16573, + { /* zName: */ FzName: ts + 16581, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16591, + { /* zName: */ FzName: ts + 16599, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16601, + { /* zName: */ FzName: ts + 16609, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16615, + { /* zName: */ FzName: ts + 16623, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16631, + { /* zName: */ FzName: ts + 16639, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16656, + { /* zName: */ FzName: ts + 16664, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16675, + { /* zName: */ FzName: ts + 16683, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16686, + { /* zName: */ FzName: ts + 16694, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16697, + { /* zName: */ FzName: ts + 16705, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16709, + { /* zName: */ FzName: ts + 16717, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16725, + { /* zName: */ FzName: ts + 16733, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16738, + { /* zName: */ FzName: ts + 16746, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16757, + { /* zName: */ FzName: ts + 16765, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16776, + { /* zName: */ FzName: ts + 16784, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16789, + { /* zName: */ FzName: ts + 16797, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16804, + { /* zName: */ FzName: ts + 16812, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16814, + { /* zName: */ FzName: ts + 16822, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16826, + { /* zName: */ FzName: ts + 16834, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16835, + { /* zName: */ FzName: ts + 16843, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16846, + { /* zName: */ FzName: ts + 16854, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16856, + { /* zName: */ FzName: ts + 16864, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16868, + { /* zName: */ FzName: ts + 16876, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16879, + { /* zName: */ FzName: ts + 16887, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16891, + { /* zName: */ FzName: ts + 16899, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16908, + { /* zName: */ FzName: ts + 16916, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16927, + { /* zName: */ FzName: ts + 16935, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16953, + { /* zName: */ FzName: ts + 16961, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16968, + { /* zName: */ FzName: ts + 16976, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16982, + { /* zName: */ FzName: ts + 16990, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17001, + { /* zName: */ FzName: ts + 17009, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17015, + { /* zName: */ FzName: ts + 17023, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17031, + { /* zName: */ FzName: ts + 17039, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17043, + { /* zName: */ FzName: ts + 17051, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17054, + { /* zName: */ FzName: ts + 17062, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17065, + { /* zName: */ FzName: ts + 17073, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17077, + { /* zName: */ FzName: ts + 17085, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17088, + { /* zName: */ FzName: ts + 17096, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17109, + { /* zName: */ FzName: ts + 17117, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17117, + { /* zName: */ FzName: ts + 17125, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17132, + { /* zName: */ FzName: ts + 17140, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17145, + { /* zName: */ FzName: ts + 17153, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17164, + { /* zName: */ FzName: ts + 17172, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17179, + { /* zName: */ FzName: ts + 17187, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -109301,7 +109336,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -109318,13 +109353,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17195)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17203)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -109333,12 +109368,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17220) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17228) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17230) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17238) { return PAGER_LOCKINGMODE_NORMAL } } @@ -109349,15 +109384,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7898) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17237) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17245) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17242) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17250) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -109372,12 +109407,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16170) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16178) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17254) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17262) == 0 { return 2 } else { return 0 @@ -109387,13 +109422,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17261, 0) + ts+17269, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -109406,7 +109441,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -109420,7 +109455,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -109454,7 +109489,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -109464,7 +109499,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -109473,7 +109508,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -109489,23 +109524,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17323 /* "SET NULL" */ + zName = ts + 17331 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17332 /* "SET DEFAULT" */ + zName = ts + 17340 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17344 /* "CASCADE" */ + zName = ts + 17352 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17352 /* "RESTRICT" */ + zName = ts + 17360 /* "RESTRICT" */ break default: - zName = ts + 17361 /* "NO ACTION" */ + zName = ts + 17369 /* "NO ACTION" */ break } return zName @@ -109514,7 +109549,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint32(unsafe.Sizeof(azModeName))/uint32(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -109523,11 +109558,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17371, ts + 17378, ts + 17386, ts + 17390, ts + 17254, ts + 17399, -} /* sqlite3.c:130656:15 */ + ts + 17379, ts + 17386, ts + 17394, ts + 17398, ts + 17262, ts + 17407, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -109554,7 +109589,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -109569,13 +109604,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17403 /* "w" */ + zType = ts + 17411 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17405 /* "a" */ + zType = ts + 17413 /* "a" */ } else { zType = ts + 7408 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17407, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17415, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -109583,15 +109618,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17414, ts + 17419, ts + 17427 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17422, ts + 17427, ts + 17435 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -109613,7 +109648,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(568) defer tls.Free(568) @@ -109860,7 +109895,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17435, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17443, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -110503,7 +110538,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17439) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17447) == 0) { goto __64 } b = 2 @@ -110592,7 +110627,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17230 /* "normal" */ + zRet = ts + 17238 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -110633,7 +110668,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17220 /* "exclusive" */ + zRet = ts + 17228 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -110998,7 +111033,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 492)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17444, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17452, 0) goto pragma_out __126: ; @@ -111044,7 +111079,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17469, 0) + ts+17477, 0) goto __133 __132: if !(iDb != 1) { @@ -111100,7 +111135,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17522) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17530) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -111214,9 +111249,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17528 /* "issisii" */ + return ts + 17536 /* "issisii" */ } - return ts + 17536 /* "issisi" */ + return ts + 17544 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -111301,7 +111336,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17543, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17551, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -111354,13 +111389,13 @@ __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12643 /* "virtual" */ + zType = ts + 12651 /* "virtual" */ goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17559 /* "shadow" */ + zType = ts + 17567 /* "shadow" */ goto __183 __182: zType = ts + 8754 /* "table" */ @@ -111370,7 +111405,7 @@ __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17566, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17574, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -111440,7 +111475,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17573, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17581, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -111450,7 +111485,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17578, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17586, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*4)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -111487,8 +111522,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 500 /* azOrigin */)) = [3]uintptr{ts + 17583, ts + 17585, ts + 16047} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17587, + *(*[3]uintptr)(unsafe.Pointer(bp + 500 /* azOrigin */)) = [3]uintptr{ts + 17591, ts + 17593, ts + 16055} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17595, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -111522,7 +111557,7 @@ __199: __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17593, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17601, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FpBt))) @@ -111545,7 +111580,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17597, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17605, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -111664,7 +111699,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17600, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17608, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -111672,7 +111707,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17609)) + ts+17617)) goto __227 __227: j2++ @@ -111873,7 +111908,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17614, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17622, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 516 /* aiCols */))) @@ -112139,7 +112174,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17618, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17626, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -112241,7 +112276,7 @@ __304: goto __305 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17642, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17650, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { @@ -112263,7 +112298,7 @@ __305: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17662, + zErr = Xsqlite3MPrintf(tls, db, ts+17670, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -112307,7 +112342,7 @@ __313: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17684, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17692, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -112341,9 +112376,9 @@ __318: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 528))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17714) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17722) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17719) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17727) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -112383,7 +112418,7 @@ __322: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 528))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17740) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17748) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __319: @@ -112405,7 +112440,7 @@ __314: if !!(isQuick != 0) { goto __324 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17767) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17775) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __325: @@ -112456,7 +112491,7 @@ __266: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 520)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17796 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17804 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __329: @@ -112534,7 +112569,7 @@ __336: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __338 } - Xsqlite3ErrorMsg(tls, pParse, ts+17799, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17807, libc.VaList(bp+416, zRight)) __338: ; __333: @@ -112646,19 +112681,19 @@ __48: if !(zRight != 0) { goto __345 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17237) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17245) == 0) { goto __346 } eMode2 = SQLITE_CHECKPOINT_FULL goto __347 __346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17824) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17832) == 0) { goto __348 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __349 __348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17390) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17398) == 0) { goto __350 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -112845,7 +112880,7 @@ __365: __367: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17832, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17840, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __368 @@ -112996,9 +113031,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -113009,16 +113044,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -113027,27 +113062,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17850, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17855, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17861, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17870, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17879, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17887, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17895}, - {FzName: ts + 17902}, + {FzName: ts + 17858, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17863, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17869, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17878, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17887, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17895, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17903}, + {FzName: ts + 17910}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -113059,24 +113094,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -113093,7 +113128,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+56, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17908) + Xsqlite3_str_appendall(tls, bp+32, ts+17916) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -113101,7 +113136,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17923, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17931, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -113114,16 +113149,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17930, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17938, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17936) + Xsqlite3_str_appendall(tls, bp+32, ts+17944) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17948) + Xsqlite3_str_appendall(tls, bp+32, ts+17956) j++ } Xsqlite3_str_append(tls, bp+32, ts+4901, 1) @@ -113150,7 +113185,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -113162,7 +113197,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113227,7 +113262,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -113240,7 +113275,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -113251,7 +113286,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -113259,7 +113294,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -113275,7 +113310,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -113321,13 +113356,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 116 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17963) + Xsqlite3_str_appendall(tls, bp+32, ts+17971) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17971, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17979, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 16)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17983, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -113343,14 +113378,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -113362,7 +113397,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -113380,12 +113415,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -113418,7 +113453,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -113429,12 +113464,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17979, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+17987, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -113443,25 +113478,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4952 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18007, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18015, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18038, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18046, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18046, - ts + 18053, - ts + 18065, -} /* sqlite3.c:133149:23 */ + ts + 18054, + ts + 18061, + ts + 18073, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -113483,7 +113518,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -113528,7 +113563,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), db+168) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14062) + corruptSchema(tls, pData, argv, ts+14070) } } libc.SetBitFieldPtr8Uint32(db+168+8, uint32(0), 0, 0x1) @@ -113566,13 +113601,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18076) + corruptSchema(tls, pData, argv, ts+18084) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), pIndex+44) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14062) + corruptSchema(tls, pData, argv, ts+14070) } } } @@ -113585,7 +113620,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -113618,13 +113653,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8754 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7818 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18089 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18097 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FiDb = iDb @@ -113737,7 +113772,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11645) + ts+11653) rc = SQLITE_ERROR goto initone_error_out __13: @@ -113777,7 +113812,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18161) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18169) rc = SQLITE_ERROR goto initone_error_out __17: @@ -113799,7 +113834,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18185, + ts+18193, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -113886,7 +113921,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -113918,7 +113953,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -113937,7 +113972,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -113990,7 +114025,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -114017,7 +114052,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -114073,7 +114108,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -114096,7 +114131,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+152)-uint32(uintptr(0)+4)) libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) @@ -114109,7 +114144,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(288) defer tls.Free(288) @@ -114191,7 +114226,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18219, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18227, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -114218,7 +114253,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18249, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18257, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -114315,13 +114350,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -114350,7 +114385,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114389,14 +114424,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -114409,7 +114444,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -114426,7 +114461,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114439,7 +114474,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -114474,21 +114509,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -114522,7 +114557,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -114543,7 +114578,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -114573,7 +114608,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -114591,19 +114626,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -114632,7 +114667,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -114643,7 +114678,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -114693,14 +114728,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -114722,7 +114757,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -114765,18 +114800,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18268, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18276, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18312, 0) + ts+18320, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18367)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18375)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -114789,11 +114824,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -114827,7 +114862,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -114855,7 +114890,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -114900,7 +114935,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -114924,7 +114959,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 36)) == iTable) { @@ -114959,7 +114994,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -114991,7 +115026,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18401, libc.VaList(bp, 0)) + ts+18409, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -115015,7 +115050,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18451, 0) + ts+18459, 0) return 1 } @@ -115050,7 +115085,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18506, libc.VaList(bp+8, zName)) + ts+18514, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -115073,11 +115108,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -115086,7 +115121,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -115099,7 +115134,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -115242,7 +115277,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -115290,7 +115325,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -115371,7 +115406,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -115399,7 +115434,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115755,7 +115790,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint32(N+X)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32(1)) - uint32(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(KeyInfo{}))+uint32(nExtra))) if p != 0 { @@ -115773,7 +115808,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -115784,7 +115819,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -115804,7 +115839,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -115838,20 +115873,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18570 /* "UNION ALL" */ + z = ts + 18578 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18580 /* "INTERSECT" */ + z = ts + 18588 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18590 /* "EXCEPT" */ + z = ts + 18598 /* "EXCEPT" */ break default: - z = ts + 18597 /* "UNION" */ + z = ts + 18605 /* "UNION" */ break } return z @@ -115865,11 +115900,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18603, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18611, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -115882,7 +115917,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -116061,7 +116096,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -116139,7 +116174,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1092 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 16159 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 16167 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, uintptr(0)) @@ -116185,7 +116220,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -116242,7 +116277,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -116294,13 +116329,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16159 /* "rowid" */ + zCol = ts + 16167 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11931, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11939, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -116310,7 +116345,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*20)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18626, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18634, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -116342,7 +116377,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -116403,7 +116438,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16159 /* "rowid" */ + zName = ts + 16167 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -116416,7 +116451,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18626, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18634, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -116431,7 +116466,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18635, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18643, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -116474,7 +116509,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116543,7 +116578,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -116578,7 +116613,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -116610,7 +116645,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -116667,7 +116702,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -116691,7 +116726,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -116760,7 +116795,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -116796,7 +116831,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18643, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18651, 0) return __1: ; @@ -116906,7 +116941,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18692, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18700, 0) goto end_of_recursive_query __15: ; @@ -116928,7 +116963,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18734, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18742, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -116971,7 +117006,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18740, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18748, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -117001,7 +117036,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -117021,11 +117056,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18755, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18763, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1527 /* "" */ } - return ts + 18778 /* "S" */ + return ts + 18786 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -117041,7 +117076,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -117077,7 +117112,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -117177,8 +117212,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18780, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18795, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18788, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18803, 0) __8: ; @@ -117227,7 +117262,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18570, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18578, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -117303,7 +117338,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18814, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18822, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -117375,7 +117410,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18814, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18822, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -117540,15 +117575,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18843, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18881, + ts+18889, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -117571,7 +117606,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -117767,7 +117802,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -117974,7 +118009,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+36, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18963, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18971, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -117982,7 +118017,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18974, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18982, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -117996,7 +118031,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18979, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18987, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -118116,14 +118151,14 @@ type SubstContext1 = struct { FiNewTable int32 FisLeftJoin int32 FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -118136,7 +118171,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -118219,7 +118254,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -118229,7 +118264,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -118272,7 +118307,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -118288,7 +118323,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -118320,7 +118355,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -118353,7 +118388,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -118363,7 +118398,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+28) @@ -118390,7 +118425,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -118560,7 +118595,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -118985,7 +119020,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -118993,7 +119028,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -119035,7 +119070,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -119070,7 +119105,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -119124,7 +119159,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -119191,7 +119226,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -119244,7 +119279,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -119315,7 +119350,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -119403,7 +119438,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -119419,12 +119454,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15053) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15061) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15057) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15065) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -119453,7 +119488,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -119493,7 +119528,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -119504,7 +119539,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18985, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+18993, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -119532,7 +119567,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -119611,12 +119646,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19003, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19011, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -119630,7 +119665,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -119665,7 +119700,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -119698,7 +119733,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -119781,7 +119816,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19026, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19034, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 7, 0x80) @@ -119808,7 +119843,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19046, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19054, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -119824,7 +119859,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19089 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19097 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -119850,7 +119885,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19112, + Xsqlite3ErrorMsg(tls, pParse, ts+19120, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -119861,9 +119896,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+34, pTab+4) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19150 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19158 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19184 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19192 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -119880,7 +119915,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -119896,7 +119931,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -119911,7 +119946,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19222, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19230, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -119950,7 +119985,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -120038,7 +120073,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19234, + Xsqlite3ErrorMsg(tls, pParse, ts+19242, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -120057,7 +120092,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19273, + Xsqlite3ErrorMsg(tls, pParse, ts+19281, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -120065,7 +120100,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19304, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -120230,7 +120265,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11931, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11939, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -120246,7 +120281,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19337, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19345, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -120266,9 +120301,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19346, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19354, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19364, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19372, 0) } } } @@ -120278,7 +120313,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19384, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19392, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -120299,7 +120334,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -120337,7 +120372,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -120385,7 +120420,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -120414,7 +120449,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -120439,7 +120474,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120467,13 +120502,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19415, 0) + ts+19423, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 20)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19466, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19474, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -120489,7 +120524,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -120528,7 +120563,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -120669,17 +120704,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19499, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19507, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19511 /* " USING COVERING ..." */ + return ts + 19519 /* " USING COVERING ..." */ } return ts + 1527 /* "" */ }(), @@ -120701,7 +120736,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) // This routine is called before the HAVING clause of the current @@ -120747,7 +120782,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -120765,7 +120800,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -120806,7 +120841,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -120823,7 +120858,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(164) defer tls.Free(164) @@ -121024,7 +121059,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19534, + ts+19542, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -121110,7 +121145,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19588, + Xsqlite3ErrorMsg(tls, pParse, ts+19596, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -121350,7 +121385,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19628, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19636, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+36+4, uint32(1), 4, 0x10) @@ -121413,7 +121448,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19643, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19651, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -121935,9 +121970,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19659 /* "DISTINCT" */ + return ts + 19667 /* "DISTINCT" */ } - return ts + 19668 /* "GROUP BY" */ + return ts + 19676 /* "GROUP BY" */ }()) groupBySort = 1 @@ -122350,7 +122385,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19659) + explainTempTable(tls, pParse, ts+19667) __141: ; @@ -122362,9 +122397,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19677 /* "RIGHT PART OF OR..." */ + return ts + 19685 /* "RIGHT PART OF OR..." */ } - return ts + 19700 /* "ORDER BY" */ + return ts + 19708 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -122419,7 +122454,7 @@ type TabResult1 = struct { FnColumn U32 FnData U32 Frc int32 -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -122443,12 +122478,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122519,7 +122554,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19709, 0) + ts+19717, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -122579,7 +122614,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -122651,7 +122686,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -122682,7 +122717,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -122711,7 +122746,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -122749,7 +122784,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -122779,7 +122814,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19782, 0) goto trigger_cleanup __3: ; @@ -122840,7 +122875,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19820, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19828, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -122858,7 +122893,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19828, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19836, 0) goto trigger_orphan_error __11: ; @@ -122873,7 +122908,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19820, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19828, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -122889,7 +122924,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19869, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19877, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -122906,7 +122941,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8012, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19895, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19903, 0) goto trigger_cleanup __18: ; @@ -122916,12 +122951,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19933, + Xsqlite3ErrorMsg(tls, pParse, ts+19941, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19970 /* "BEFORE" */ + return ts + 19978 /* "BEFORE" */ } - return ts + 19977 /* "AFTER" */ + return ts + 19985 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -122930,7 +122965,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19983, libc.VaList(bp+24, pTableName+8)) + ts+19991, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -122960,7 +122995,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }(), uintptr(0), zDb) != 0) { @@ -123056,7 +123091,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -123096,7 +123131,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+48, pParse, iDb, ts+19820, bp+40) + Xsqlite3FixInit(tls, bp+48, pParse, iDb, ts+19828, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -123133,13 +123168,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20029, + ts+20037, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20104, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20112, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -123180,7 +123215,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -123198,7 +123233,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -123215,10 +123250,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(TriggerStep{}))+(*Token)(unsafe.Pointer(pName)).Fn+uint32(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*48 @@ -123239,7 +123277,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123271,7 +123309,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123300,7 +123338,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123319,7 +123357,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -123339,7 +123377,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123405,7 +123443,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20133, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20141, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -123423,12 +123461,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -123446,7 +123484,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }() @@ -123461,7 +123499,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20153, + ts+20161, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -123469,7 +123507,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -123500,7 +123538,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -123517,7 +123555,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123580,12 +123618,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20215, + ts+20223, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20263 /* "DELETE" */ + return ts + 20271 /* "DELETE" */ } - return ts + 20270 /* "UPDATE" */ + return ts + 20278 /* "UPDATE" */ }())) __15: ; @@ -123644,7 +123682,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -123669,7 +123707,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -123681,7 +123719,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20277, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20285, 0) return 1 } @@ -123690,7 +123728,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -123731,7 +123769,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -123799,7 +123837,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -123886,7 +123924,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -123899,7 +123937,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(312) defer tls.Free(312) @@ -123956,7 +123994,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20319, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20327, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -124005,7 +124043,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -124034,7 +124072,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -124094,7 +124132,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -124142,7 +124180,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -124199,7 +124237,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -124229,7 +124267,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -124250,7 +124288,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -124262,7 +124300,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -124306,7 +124344,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -124389,7 +124427,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -124670,7 +124708,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20333, + ts+20341, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -124702,7 +124740,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20369, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20377, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -125743,7 +125781,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20388) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20396) __169: ; @@ -125779,7 +125817,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125952,7 +125990,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -125965,14 +126003,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -125985,7 +126023,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -126011,7 +126049,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -126131,10 +126169,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 152)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152, ts+20401, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152, ts+20409, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20405, libc.VaList(bp+8, bp+152)) + ts+20413, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -126153,7 +126191,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -126175,7 +126213,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -126191,7 +126229,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -126225,7 +126263,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12072, -1) + ts+12080, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -126271,7 +126309,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -126293,7 +126331,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20478, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20482, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20486, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20490, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -126311,7 +126349,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -126355,7 +126393,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -126412,7 +126450,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -126443,14 +126481,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20486) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20494) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20526) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20534) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -126461,7 +126499,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20569) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20577) return SQLITE_ERROR __5: ; @@ -126506,7 +126544,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20587, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20595, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -126527,7 +126565,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20610) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20618) goto end_of_vacuum __8: ; @@ -126543,7 +126581,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14425) + rc = execSql(tls, db, pzErrMsg, ts+14433) if !(rc != SQLITE_OK) { goto __9 } @@ -126595,7 +126633,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20637, + ts+20645, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -126605,7 +126643,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20745, + ts+20753, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -126620,7 +126658,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20799, + ts+20807, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -126637,7 +126675,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20950, + ts+20958, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -126750,7 +126788,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -126758,7 +126796,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -126798,7 +126836,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -126812,18 +126850,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; pThis != 0; pThis = pNext { @@ -126844,7 +126882,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -126862,14 +126900,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -126879,7 +126917,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -126900,7 +126938,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -126937,7 +126975,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 44 + 8; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 24 { @@ -126968,7 +127006,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -126994,7 +127032,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -127014,7 +127052,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127024,7 +127062,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32(2+*(*int32)(unsafe.Pointer(pTable + 44)))) if *(*int32)(unsafe.Pointer(pTable + 44))+3 >= *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12299, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12307, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -127040,7 +127078,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -127075,7 +127113,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -127086,7 +127124,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -127121,7 +127159,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32((int32((*Token)(unsafe.Pointer(pEnd)).Fz)-int32((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21080, libc.VaList(bp, pParse+188)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21088, libc.VaList(bp, pParse+188)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -127133,7 +127171,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21104, + ts+21112, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -127143,7 +127181,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21203, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21211, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -127170,7 +127208,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -127178,7 +127216,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 252 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -127192,7 +127230,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -127213,7 +127251,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21222, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21230, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -127253,7 +127291,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21264, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21272, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3607, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */))) @@ -127267,7 +127305,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21294 /* "vtable construct..." */ + var zFormat uintptr = ts + 21302 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -127288,7 +127326,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16050, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16058, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -127328,7 +127366,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -127347,7 +127385,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21340, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21348, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -127364,7 +127402,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -127384,7 +127422,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*4)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -127396,7 +127434,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127415,7 +127453,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21340, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21348, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -127436,7 +127474,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -127452,7 +127490,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -127526,7 +127564,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -127571,7 +127609,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -127601,7 +127639,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -127623,14 +127661,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+68)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+64)) return SQLITE_OK } @@ -127641,7 +127679,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -127702,7 +127740,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -127750,7 +127788,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127817,7 +127855,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -127856,7 +127894,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -127901,7 +127939,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -127918,19 +127956,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -127939,7 +127977,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -127967,7 +128005,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -128031,7 +128069,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -128071,23 +128109,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -128115,9 +128153,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -128144,9 +128182,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -128156,9 +128194,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -128177,9 +128215,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -128191,9 +128229,9 @@ type WhereLoopBuilder1 = struct { FbldFlags2 uint8 F__ccgo_pad1 [2]byte FiPlanLimit uint32 -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -128208,23 +128246,23 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [2]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -128246,7 +128284,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -128272,7 +128310,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -128294,7 +128332,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -128316,13 +128354,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21359 /* "" */ + return ts + 21367 /* "" */ } if i == -1 { - return ts + 16159 /* "rowid" */ + return ts + 16167 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -128333,19 +128371,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21366, 5) + Xsqlite3_str_append(tls, pStr, ts+21374, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21372, 1) + Xsqlite3_str_append(tls, pStr, ts+21380, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12689, 1) + Xsqlite3_str_append(tls, pStr, ts+12697, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -128356,11 +128394,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21372, 1) + Xsqlite3_str_append(tls, pStr, ts+21380, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12689, 1) + Xsqlite3_str_append(tls, pStr, ts+12697, 1) } Xsqlite3_str_append(tls, pStr, ts+4952, 1) } @@ -128381,7 +128419,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128394,27 +128432,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21374, 2) + Xsqlite3_str_append(tls, pStr, ts+21382, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21366, 5) + Xsqlite3_str_append(tls, pStr, ts+21374, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21377 /* "%s=?" */ + return ts + 21385 /* "%s=?" */ } - return ts + 21382 /* "ANY(%s)" */ + return ts + 21390 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21390) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21398) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21392) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21400) } Xsqlite3_str_append(tls, pStr, ts+4901, 1) } @@ -128426,7 +128464,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -128461,11 +128499,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+88, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21394, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21402, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21400 /* "SEARCH" */ + return ts + 21408 /* "SEARCH" */ } - return ts + 21407 /* "SCAN" */ + return ts + 21415 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -128475,30 +128513,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10846 /* "PRIMARY KEY" */ + zFmt = ts + 10854 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21412 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21420 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21445 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21453 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21470 /* "COVERING INDEX %..." */ + zFmt = ts + 21478 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21488 /* "INDEX %s" */ + zFmt = ts + 21496 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21497, 7) + Xsqlite3_str_append(tls, bp+64, ts+21505, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16159 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21505, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16167 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21513, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21536, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21544, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -128506,9 +128544,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21546, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21554, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21551, + Xsqlite3_str_appendf(tls, bp+64, ts+21559, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -128527,7 +128565,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -128545,22 +128583,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+48, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21578, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21586, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21377, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21385, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21599, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21607, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21366, 5) + Xsqlite3_str_append(tls, bp+24, ts+21374, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21377, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21385, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4901, 1) @@ -128610,7 +128648,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -128643,7 +128681,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -128676,7 +128714,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -128714,7 +128752,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -128789,7 +128827,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -128982,7 +129020,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -129019,6 +129057,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -129102,7 +129141,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -129143,7 +129182,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -129171,10 +129210,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -129191,7 +129230,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -129211,7 +129250,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -129233,7 +129272,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -129298,7 +129337,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -129344,7 +129383,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -129354,6 +129393,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -129386,7 +129428,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -129457,7 +129499,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -129519,53 +129560,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 60)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*4)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 16)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 16)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 60 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 60 + 4)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 24 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 20)) + 8 + uintptr(iFld-1)*20)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -129573,8 +129613,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -130210,6 +130250,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -130224,7 +130272,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -130241,7 +130291,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21607, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21615, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -130260,7 +130310,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21622, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21630, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -130608,24 +130658,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -130647,7 +130697,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -130689,14 +130739,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -130716,7 +130766,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -130743,7 +130793,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -130915,7 +130965,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -131020,18 +131070,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16008, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15330, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14856, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21631, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16016, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15338, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14864, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21639, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 36)) = *(*int32)(unsafe.Pointer(pBase + 36)) @@ -131039,7 +131089,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*48)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*48)).FnChild++ @@ -131048,7 +131098,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -131079,7 +131129,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -131212,7 +131262,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -131531,7 +131581,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -131560,7 +131610,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -131595,7 +131645,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -131633,7 +131683,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -131674,7 +131724,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -131737,7 +131787,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21638, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21646, 0) return } } @@ -131921,7 +131971,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21679 /* "NOCASE" */ + return ts + 21687 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -132042,7 +132092,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 32)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -132065,7 +132115,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -132089,7 +132139,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -132141,7 +132191,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -132191,7 +132241,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -132204,7 +132254,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -132264,7 +132314,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -132294,7 +132344,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -132304,14 +132354,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -132328,7 +132378,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -132340,7 +132390,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132365,7 +132415,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21686, + Xsqlite3ErrorMsg(tls, pParse, ts+21694, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -132423,7 +132473,7 @@ type HiddenIndexInfo1 = struct { FmIn U32 FmHandleIn U32 FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -132453,16 +132503,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -132472,7 +132522,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -132497,7 +132547,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -132518,7 +132568,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { @@ -132539,14 +132589,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -132565,19 +132615,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+24, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+4, pSrc+4, uint32((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint32(unsafe.Sizeof(WhereOrCost{}))) } @@ -132587,7 +132637,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -132664,7 +132714,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -132684,14 +132734,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -132702,7 +132752,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -132806,7 +132856,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -132828,7 +132878,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -132883,7 +132933,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -132913,7 +132963,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*4)) @@ -132934,7 +132984,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -132955,7 +133005,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -133025,7 +133075,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -133042,7 +133092,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -133085,7 +133135,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -133119,7 +133169,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -133205,7 +133255,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21722, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21730, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -133286,7 +133336,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21748 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21756 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -133477,7 +133527,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -133553,7 +133603,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 756 + uintptr(iLevel)*80 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -133577,7 +133632,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -133803,7 +133858,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -133830,7 +133885,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133868,7 +133923,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -134007,7 +134062,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -134020,7 +134075,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -134064,7 +134119,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -134179,7 +134234,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 12 /* &.idxStr */))) @@ -134487,7 +134542,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+64 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -134496,7 +134551,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -134516,7 +134571,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+52)) @@ -134533,13 +134588,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -134560,7 +134615,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -134586,7 +134641,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -134630,7 +134685,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -134689,7 +134744,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -134778,7 +134833,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -134885,7 +134940,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -134988,7 +135043,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -135056,7 +135111,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -135416,7 +135471,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -135458,7 +135513,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -135533,7 +135588,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(98) defer tls.Free(98) @@ -135818,7 +135873,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -135842,7 +135897,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135943,7 +135998,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*4)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21759, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21767, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -136016,7 +136071,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21759, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21767, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -136065,7 +136120,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*64 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -136088,7 +136143,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*64 var m U32 = func() uint32 { if iCons <= 31 { @@ -136111,7 +136166,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*64 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -136137,7 +136192,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*64 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -136166,7 +136221,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -136302,7 +136357,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(564) defer tls.Free(564) @@ -136427,7 +136482,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -136479,7 +136534,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21785, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21793, 0) rc = SQLITE_OK } else { goto __3 @@ -136515,7 +136570,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -136883,7 +136938,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x8 >> 3) } @@ -136891,7 +136946,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -136938,7 +136993,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -137253,7 +137308,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21820, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21828, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -137345,7 +137400,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -137452,7 +137507,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -137463,7 +137518,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -137509,7 +137564,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -137584,7 +137639,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -137696,7 +137751,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -137760,7 +137815,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21838, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21846, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -137840,7 +137895,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21874, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -138381,7 +138436,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -138598,6 +138653,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -138779,7 +138836,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -138788,7 +138845,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -138804,13 +138861,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138820,7 +138877,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138838,9 +138895,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -138903,10 +138960,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21884, -1) + pCtx, ts+21892, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -138916,7 +138973,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -138929,7 +138986,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -138943,7 +139000,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138956,7 +139013,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138969,7 +139026,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -138979,7 +139036,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -138987,7 +139044,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -139005,7 +139062,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -139015,7 +139072,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -139023,7 +139080,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -139037,13 +139094,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -139052,14 +139109,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21940, -1) + pCtx, ts+21948, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -139067,7 +139124,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -139092,10 +139149,10 @@ func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ type LastValueCtx = struct { FpVal uintptr FnVal int32 -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -139110,7 +139167,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -139124,7 +139181,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -139132,7 +139189,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -139148,17 +139205,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21985)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 21996)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22007)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22012)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22025)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22035)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22041)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22052)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22062)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22074)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22079 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21993)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22004)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22015)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22020)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22033)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22043)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22049)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22060)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22070)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22082)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22087 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -139167,7 +139224,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22079 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -139175,7 +139232,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -139190,7 +139247,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint32(unsafe.Sizeof(aWindowFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } @@ -139209,9 +139266,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -139222,7 +139279,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22083, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22091, libc.VaList(bp, zName)) } return p } @@ -139242,7 +139299,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -139266,12 +139323,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22102, 0) + ts+22110, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22173, 0) + ts+22181, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -139309,16 +139366,16 @@ type WindowUpdate = struct { FeFrmType int32 FeStart int32 FeEnd int32 -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -139418,7 +139475,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -139442,7 +139499,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -139474,7 +139531,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -139520,7 +139577,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -139528,14 +139585,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22236, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22244, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -139545,12 +139602,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -139726,7 +139786,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -139737,7 +139797,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -139752,7 +139812,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -139765,7 +139825,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -139777,7 +139837,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -139810,7 +139870,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22262, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22270, 0) goto windowAllocErr __2: ; @@ -139846,7 +139906,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -139865,7 +139925,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -139876,15 +139936,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22294 /* "PARTITION clause" */ + zErr = ts + 22302 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22311 /* "ORDER BY clause" */ + zErr = ts + 22319 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22327 /* "frame specificat..." */ + zErr = ts + 22335 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22347, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22355, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -139899,7 +139959,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 44)) = pWin @@ -139907,7 +139967,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22380, 0) + ts+22388, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -139918,7 +139978,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -139938,7 +139998,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -139978,7 +140038,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -140054,7 +140114,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -140083,17 +140143,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22427, - ts + 22480, - ts + 21884, - ts + 22531, - ts + 22583, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22435, + ts + 22488, + ts + 21892, + ts + 22539, + ts + 22591, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 20)) @@ -140117,19 +140177,19 @@ type WindowCodeArg1 = struct { Fstart WindowCsrAndReg Fcurrent WindowCsrAndReg Fend WindowCsrAndReg -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -140165,7 +140225,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -140272,7 +140332,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -140308,7 +140368,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -140415,7 +140475,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -140498,7 +140558,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -140533,7 +140593,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -140558,7 +140618,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -140595,7 +140655,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -140718,7 +140778,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -140866,7 +140926,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -140897,7 +140957,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -140922,7 +140982,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -141270,7 +141330,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -141666,16 +141726,16 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin type TrigEvent = struct { Fa int32 Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -141685,7 +141745,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141704,19 +141764,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22633, + Xsqlite3ErrorMsg(tls, pParse, ts+22641, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19700 /* "ORDER BY" */ + return ts + 19708 /* "ORDER BY" */ } - return ts + 22675 /* "LIMIT" */ + return ts + 22683 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22681, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22689, 0) } } @@ -141724,7 +141784,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -141736,7 +141796,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(8) defer tls.Free(8) *(*Token)(unsafe.Pointer(bp)) = t @@ -141777,7 +141837,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -141791,14 +141851,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22715, + Xsqlite3ErrorMsg(tls, pParse, ts+22723, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -141865,7 +141925,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT type YYMINORTYPE = struct { Fyyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -142134,7 +142194,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -142362,7 +142422,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -142422,7 +142482,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -142465,7 +142525,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -142525,7 +142585,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -142727,7 +142787,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -142748,9 +142808,9 @@ type yyStackEntry = struct { Fstateno uint16 Fmajor uint16 Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -142759,9 +142819,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -142771,7 +142831,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 8 /* &.yystack */ @@ -142786,7 +142846,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -142945,7 +143005,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 12) @@ -142953,7 +143013,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+8 { yy_pop_parser_stack(tls, pParser) @@ -142976,7 +143036,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -143016,7 +143076,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -143027,7 +143087,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+8 { @@ -143037,7 +143097,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22753, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22761, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -143046,7 +143106,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 12 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -143469,7 +143529,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -143876,7 +143936,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -143888,7 +143948,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -144033,21 +144093,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16159, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16167, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22775, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22783, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16072, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16080, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22775, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22783, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 4)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -144783,7 +144843,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22802) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22810) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*12 + 4)), uintptr(0), uintptr(0), uintptr(0)) } @@ -144934,7 +144994,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 84 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 4)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22811, libc.VaList(bp+32, bp+84)) + Xsqlite3ErrorMsg(tls, pParse, ts+22819, libc.VaList(bp+32, bp+84)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -145429,21 +145489,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*Token)(unsafe.Pointer(yymsp + 4)) Xsqlite3ErrorMsg(tls, pParse, - ts+22835, 0) + ts+22843, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22930, 0) + ts+22938, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23014, 0) + ts+23022, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -145883,7 +145943,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -145893,9 +145953,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22811, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22819, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23099, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23107, 0) } //*********** End %syntax_error code ***************************************** @@ -145903,7 +145963,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -145933,7 +145993,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145987,7 +146047,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -146038,7 +146098,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -146124,7 +146184,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -146137,7 +146197,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -146154,7 +146214,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -146169,7 +146229,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -146185,7 +146245,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -146218,7 +146278,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -146351,7 +146411,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -146529,7 +146589,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -146538,7 +146598,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -146547,11 +146607,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -146574,13 +146634,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -146630,7 +146690,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -146647,7 +146707,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -146661,7 +146721,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -146674,7 +146734,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -147042,7 +147102,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(1256) defer tls.Free(1256) @@ -147112,7 +147172,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 1248 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23116, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23124, libc.VaList(bp, bp+1248)) break } } @@ -147135,7 +147195,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3607, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23141, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23149, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -147232,7 +147292,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -147335,7 +147395,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23152, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23160, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -147348,11 +147408,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19820, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19828, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23159, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23167, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23164, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23172, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -147365,9 +147425,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23174, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23182, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23178, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23186, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -147409,12 +147469,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -147441,7 +147501,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -147453,11 +147513,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -147470,14 +147530,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -147490,14 +147550,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -147528,7 +147588,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -147654,7 +147714,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -147693,7 +147753,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -147701,7 +147761,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -147971,7 +148031,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -148069,13 +148129,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148094,7 +148154,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -148123,7 +148183,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -148202,11 +148262,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -148228,7 +148288,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -148241,7 +148301,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -148255,7 +148315,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -148271,39 +148331,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -148318,7 +148378,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 36)) @@ -148333,7 +148393,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -148360,7 +148420,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -148376,14 +148436,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -148407,7 +148467,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23186, 0) + ts+23194, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -148420,7 +148480,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -148457,11 +148517,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -148471,7 +148531,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -148581,7 +148641,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -148631,24 +148691,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23254 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23262 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23268 /* "abort due to ROL..." */ + zErr = ts + 23276 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23290 /* "another row avai..." */ + zErr = ts + 23298 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23312 /* "no more rows ava..." */ + zErr = ts + 23320 /* "no more rows ava..." */ break } @@ -148666,36 +148726,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23335, - ts + 23348, + ts + 23343, + ts + 23356, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23364, - ts + 23389, - ts + 23403, - ts + 23422, + ts + 23372, + ts + 23397, + ts + 23411, + ts + 23430, ts + 1463, - ts + 23447, - ts + 23484, - ts + 23496, - ts + 23511, - ts + 23544, - ts + 23562, - ts + 23587, - ts + 23616, + ts + 23455, + ts + 23492, + ts + 23504, + ts + 23519, + ts + 23552, + ts + 23570, + ts + 23595, + ts + 23624, /* SQLITE_EMPTY */ uintptr(0), ts + 5792, ts + 5278, - ts + 23633, - ts + 23651, - ts + 23669, + ts + 23641, + ts + 23659, + ts + 23677, /* SQLITE_NOLFS */ uintptr(0), - ts + 23703, + ts + 23711, /* SQLITE_FORMAT */ uintptr(0), - ts + 23724, - ts + 23750, - ts + 23773, - ts + 23794, -} /* sqlite3.c:169926:20 */ + ts + 23732, + ts + 23758, + ts + 23781, + ts + 23802, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -148704,7 +148764,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -148727,8 +148787,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -148737,7 +148797,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -148755,7 +148815,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -148768,7 +148828,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -148784,7 +148844,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -148798,7 +148858,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ *(*int32)(unsafe.Pointer(db + 304)) = 1 } @@ -148806,7 +148866,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -148816,7 +148876,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -148874,7 +148934,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23810, 0) + ts+23818, 0) return SQLITE_BUSY } else { @@ -148921,7 +148981,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -148963,22 +149023,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -148998,7 +149058,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -149007,7 +149067,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23873, libc.VaList(bp, zName)) + ts+23881, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -149022,7 +149082,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -149048,7 +149108,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149066,7 +149126,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -149087,7 +149147,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149105,7 +149165,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149118,7 +149178,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149131,7 +149191,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149144,7 +149204,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -149156,7 +149216,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -149172,7 +149232,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -149190,7 +149250,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -149203,7 +149263,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -149214,7 +149274,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -149243,7 +149303,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23924, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23932, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -149264,7 +149324,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -149288,7 +149348,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -149330,19 +149390,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -149364,7 +149424,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149376,7 +149436,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -149405,18 +149465,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -149424,9 +149484,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -149434,7 +149494,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -149444,13 +149504,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -149463,7 +149523,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -149473,7 +149533,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23945, 0) + ts+23953, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -149526,7 +149586,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -149538,7 +149598,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -149585,7 +149645,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -149618,7 +149678,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24013, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24021, uint32(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -149666,10 +149726,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24019, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24027, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24029, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24037, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -149791,7 +149851,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24057, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24065, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -149802,17 +149862,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24061, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24069, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24061 /* "cache" */ + zModeType = ts + 24069 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24067, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24075, zOpt, uint32(4)) == 0) { goto __32 } @@ -149851,7 +149911,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24072, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24080, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -149859,7 +149919,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24092, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -149902,7 +149962,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24116, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24124, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -149922,24 +149982,24 @@ __43: type OpenMode = struct { Fz uintptr Fmode int32 -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24132, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24139, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24140, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24147, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24147, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24150, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24153, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17254, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24155, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24158, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24161, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17262, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -149955,7 +150015,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -150107,10 +150167,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21679, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21687, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24157, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24165, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -150139,7 +150199,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) @@ -150196,7 +150256,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6325 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23159 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23167 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -150295,17 +150355,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -150316,7 +150376,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24163 /* "\x00\x00" */ + zFilename = ts + 24171 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -150337,12 +150397,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150354,7 +150414,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -150372,7 +150432,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -150383,7 +150443,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -150394,7 +150454,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -150402,7 +150462,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -150415,28 +150475,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24166, + Xsqlite3_log(tls, iErr, ts+24174, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24191) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24199) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24211) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24219) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24218) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24226) } // This is a convenience routine that makes sure that all thread-specific @@ -150444,12 +150504,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -150615,7 +150675,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24235, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24243, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -150633,7 +150693,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -150648,7 +150708,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -150661,7 +150721,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -150706,7 +150766,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -151165,7 +151225,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -151174,7 +151234,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+Size_t(1)) return p + uintptr(n) + uintptr(1) @@ -151187,7 +151247,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -151218,7 +151278,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -151235,7 +151295,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -151244,7 +151304,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -151261,7 +151321,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -151271,7 +151331,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -151292,14 +151352,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -151312,7 +151372,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -151321,7 +151381,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -151336,7 +151396,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -151347,7 +151407,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -151358,7 +151418,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151381,7 +151441,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151424,7 +151484,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -151445,7 +151505,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -151454,7 +151514,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -151466,7 +151526,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24263, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24271, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -151484,7 +151544,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -151529,11 +151589,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 552 { @@ -151546,7 +151606,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 552 { @@ -151556,13 +151616,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -151586,7 +151646,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -151629,7 +151689,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24271 /* "database is dead..." */ + return ts + 24279 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -151641,7 +151701,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -151667,7 +151727,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -151771,7 +151831,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -152376,7 +152436,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -152388,10 +152448,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -152399,9 +152459,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -152413,9 +152473,9 @@ type JsonParse1 = struct { FiDepth U16 FnJson int32 FiHold U32 -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -152423,8 +152483,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6125, ts + 6639, ts + 6644, ts + 6135, ts + 6130, ts + 7885, ts + 24294, ts + 24300, -} /* sqlite3.c:193131:19 */ + ts + 6125, ts + 6639, ts + 6644, ts + 6135, ts + 6130, ts + 7885, ts + 24302, ts + 24308, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -152438,7 +152498,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 26 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -152446,7 +152506,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -152454,7 +152514,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -152462,7 +152522,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -152470,7 +152530,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -152503,7 +152563,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -152515,7 +152575,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -152528,7 +152588,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -152537,7 +152597,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -152552,7 +152612,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -152603,7 +152663,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24307 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24315 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -152623,11 +152683,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -152660,7 +152720,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24324, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24332, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -152671,7 +152731,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -152698,7 +152758,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -152707,7 +152767,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -152717,7 +152777,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -152725,7 +152785,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -152828,7 +152888,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -152843,14 +152903,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -152861,7 +152921,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -153142,7 +153202,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -153164,7 +153224,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -153179,7 +153239,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -153195,7 +153255,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -153422,7 +153482,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint32(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -153447,7 +153507,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24353, -1) + Xsqlite3_result_error(tls, pCtx, ts+24361, -1) } } jsonParseReset(tls, pParse) @@ -153458,7 +153518,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*12 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -153489,7 +153549,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+16, Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(U32(0)))*(*JsonParse)(unsafe.Pointer(pParse)).FnNode))) @@ -153509,7 +153569,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -153566,7 +153626,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -153589,7 +153649,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -153764,7 +153824,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -153775,7 +153835,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24368, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24376, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -153788,11 +153848,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24372, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24380, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -153803,7 +153863,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -153855,18 +153915,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24398, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24406, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -153897,7 +153957,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153914,7 +153974,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153937,7 +153997,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -153987,7 +154047,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -154021,11 +154081,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24441, uint32(2)) + jsonAppendRaw(tls, bp, ts+24449, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4942, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24444, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24452, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -154081,7 +154141,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -154154,7 +154214,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -154186,7 +154246,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -154198,14 +154258,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24447, -1) + ts+24455, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24498, -1) + Xsqlite3_result_error(tls, ctx, ts+24506, -1) jsonReset(tls, bp) return } @@ -154225,7 +154285,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -154294,7 +154354,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -154313,7 +154373,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15263) + jsonWrongNumArgs(tls, ctx, ts+15271) return __2: ; @@ -154377,7 +154437,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -154402,9 +154462,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24532 /* "set" */ + return ts + 24540 /* "set" */ } - return ts + 24536 /* "insert" */ + return ts + 24544 /* "insert" */ }()) return __2: @@ -154475,7 +154535,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -154499,7 +154559,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -154513,7 +154573,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -154529,7 +154589,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -154554,16 +154614,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24543, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24551, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -154571,7 +154631,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -154613,7 +154673,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -154635,7 +154695,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -154659,16 +154719,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24546, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24554, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -154688,16 +154748,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -154712,7 +154772,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24549) + ts+24557) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -154725,13 +154785,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -154745,7 +154805,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -154756,7 +154816,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+32) @@ -154769,7 +154829,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -154778,13 +154838,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*12)).FjnFlags)&JNODE_LABEL != 0 { @@ -154835,7 +154895,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -154852,19 +154912,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24632, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24640, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24637, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24645, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -154953,10 +155013,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24632, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24640, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24637, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24645, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -154983,7 +155043,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24643 /* "$" */ + zRoot = ts + 24651 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -155001,7 +155061,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -155011,7 +155071,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155086,7 +155146,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -155115,7 +155175,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24353, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24361, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -155191,7 +155251,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -155205,36 +155265,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint32(unsafe.Sizeof(aJsonFunc))/uint32(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24645}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24650}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24661}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24661}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24679}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24692}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24695}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24699}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24711}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24723}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24734}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24745}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24757}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24770}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24779}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24779}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24789}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24800}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24817}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24653}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24658}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24669}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24669}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24687}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24700}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24703}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24707}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24719}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24731}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24742}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24753}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24765}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24778}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24787}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24787}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24797}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24808}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24825}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(aMod))/uint32(unsafe.Sizeof(struct { @@ -155250,9 +155310,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24835 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24845 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24843 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24853 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -155297,7 +155357,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -155311,7 +155371,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -155329,9 +155389,9 @@ type RtreeCursor1 = struct { FsPoint RtreeSearchPoint FaNode [5]uintptr FanQueue [41]U32 -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -155339,43 +155399,43 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 Fcb RtreeGeomCallback FnParam int32 FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -155383,17 +155443,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -155419,28 +155479,28 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = U32(*(*U8)(unsafe.Pointer(p)))<<24 + U32(*(*U8)(unsafe.Pointer(p + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(p + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(p + 3)))<<0 } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ return I64(U64(*(*U8)(unsafe.Pointer(p)))<<56 + U64(*(*U8)(unsafe.Pointer(p + 1)))<<48 + U64(*(*U8)(unsafe.Pointer(p + 2)))<<40 + U64(*(*U8)(unsafe.Pointer(p + 3)))<<32 + U64(*(*U8)(unsafe.Pointer(p + 4)))<<24 + U64(*(*U8)(unsafe.Pointer(p + 5)))<<16 + U64(*(*U8)(unsafe.Pointer(p + 6)))<<8 + U64(*(*U8)(unsafe.Pointer(p + 7)))<<0) } // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ var i U32 // p is always 4-byte aligned @@ -155452,7 +155512,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 40 & int64(0xFF)) @@ -155465,7 +155525,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -155473,20 +155533,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 112 + uintptr(nodeHash(tls, iNode))*4)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -155494,7 +155554,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -155503,7 +155563,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 112 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*4 @@ -155518,7 +155578,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(RtreeNode{}))+uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -155534,7 +155594,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -155543,7 +155603,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155575,11 +155635,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24855, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24863, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24863, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24871, iNode, 0, pRtree+72) Xsqlite3_free(tls, zTab) } @@ -155653,7 +155713,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -155664,7 +155724,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -155677,7 +155737,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -155694,7 +155754,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -155718,7 +155778,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -155744,19 +155804,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -155772,23 +155832,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -155810,13 +155870,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155824,7 +155884,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24868, + ts+24876, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -155843,7 +155903,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -155861,7 +155921,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -155891,7 +155951,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -155907,7 +155967,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -155924,7 +155984,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -156036,7 +156096,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -156138,7 +156198,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156194,7 +156254,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -156210,7 +156270,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -156229,7 +156289,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -156246,7 +156306,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*20)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*20)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*20)) @@ -156266,7 +156326,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 40 } @@ -156277,7 +156337,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -156294,7 +156354,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -156328,7 +156388,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -156364,7 +156424,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -156412,7 +156472,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -156505,7 +156565,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -156521,7 +156581,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156536,7 +156596,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156597,7 +156657,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -156618,12 +156678,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24950) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24958) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -156650,7 +156710,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -156793,7 +156853,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -156900,7 +156960,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -156943,7 +157003,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -156964,7 +157024,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -157003,7 +157063,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -157018,7 +157078,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -157031,7 +157091,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -157106,7 +157166,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -157162,7 +157222,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -157198,7 +157258,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -157206,7 +157266,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -157228,7 +157288,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -157276,7 +157336,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -157332,7 +157392,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -157431,7 +157491,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -157465,7 +157525,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -157700,7 +157760,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -157735,7 +157795,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157785,7 +157845,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -157816,7 +157876,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -157845,7 +157905,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -157960,7 +158020,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -157990,7 +158050,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -158021,7 +158081,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -158032,7 +158092,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -158121,7 +158181,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -158135,7 +158195,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -158160,7 +158220,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -158168,7 +158228,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24964, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24972, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -158180,12 +158240,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24984, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24992, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25016, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25024, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -158199,7 +158259,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -158428,7 +158488,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -158437,7 +158497,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -158445,7 +158505,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -158453,7 +158513,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25053, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25061, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -158474,7 +158534,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -158487,11 +158547,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25198 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25206 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 4 @@ -158499,7 +158559,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11218, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11226, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -158531,7 +158591,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName1))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -158542,8 +158602,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25254, ts + 5004, ts + 16159, -} /* sqlite3.c:199185:21 */ + ts + 25262, ts + 5004, ts + 16167, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -158567,9 +158627,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -158586,19 +158646,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25259, + ts+25267, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25321, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25329, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25326, + ts+25334, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25390, + ts+25398, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25460, + ts+25468, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -158629,7 +158689,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25509 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25517 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -158641,7 +158701,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25617, + ts+25625, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -158649,18 +158709,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25662, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25670, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12689, 1) + Xsqlite3_str_append(tls, p, ts+12697, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25689, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25697, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25711, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25719, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25719, 0) + Xsqlite3_str_appendf(tls, p, ts+25727, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -158676,24 +158736,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25735, - ts + 25788, + ts + 25743, + ts + 25796, - ts + 25833, - ts + 25885, - ts + 25939, + ts + 25841, + ts + 25893, + ts + 25947, - ts + 25984, - ts + 26042, - ts + 26097, -} /* sqlite3.c:199232:21 */ + ts + 25992, + ts + 26050, + ts + 26105, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158724,7 +158784,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -158732,7 +158792,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26144, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26152, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -158744,7 +158804,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26164, + ts+26172, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+16) if rc != SQLITE_OK { @@ -158752,7 +158812,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26221, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26229, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -158762,7 +158822,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158777,7 +158837,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -158803,10 +158863,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26256, - ts + 26299, - ts + 26334, - ts + 26370, + ts + 26264, + ts + 26307, + ts + 26342, + ts + 26378, } // Aux columns counted by a u8 @@ -158843,7 +158903,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26407, + Xsqlite3_str_appendf(tls, pSql, ts+26415, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -158855,7 +158915,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26431, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26439, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -158878,7 +158938,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26437, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26445, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -158977,7 +159037,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26440, ts + 26451} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26448, ts + 26459} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -158993,7 +159053,7 @@ var azFormat = [2]uintptr{ts + 26440, ts + 26451} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(592) defer tls.Free(592) @@ -159037,11 +159097,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10798, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26461, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26469, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+44 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26467, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26475, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26471, 1) + Xsqlite3_str_append(tls, pOut, ts+26479, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -159056,11 +159116,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26473, -1) + Xsqlite3_result_error(tls, ctx, ts+26481, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -159086,15 +159146,15 @@ type RtreeCheck1 = struct { Frc int32 FzReport uintptr FnErr int32 -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -159107,7 +159167,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159135,7 +159195,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -159147,7 +159207,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26506, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26514, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4006 /* "\n" */ @@ -159175,7 +159235,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -159183,7 +159243,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26513, + ts+26521, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -159202,7 +159262,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26558, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26566, libc.VaList(bp+16, iNode)) } } @@ -159219,15 +159279,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(88) defer tls.Free(88) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26590, - ts + 26644, + ts + 26598, + ts + 26652, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -159242,23 +159302,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26692, + rtreeCheckAppendMsg(tls, pCheck, ts+26700, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26737 /* "%_rowid" */ + return ts + 26745 /* "%_rowid" */ } - return ts + 26745 /* "%_parent" */ + return ts + 26753 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26754, + ts+26762, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26737 /* "%_rowid" */ + return ts + 26745 /* "%_rowid" */ } - return ts + 26745 /* "%_parent" */ + return ts + 26753 /* "%_parent" */ }(), iKey, iVal)) } } @@ -159275,7 +159335,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -159301,7 +159361,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26812, libc.VaList(bp, i, iCell, iNode)) + ts+26820, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -159321,7 +159381,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26860, libc.VaList(bp+24, i, iCell, iNode)) + ts+26868, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -159333,7 +159393,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159344,14 +159404,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26927, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26935, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26961, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26969, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -159359,7 +159419,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26991, + ts+26999, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -159387,20 +159447,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27046, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27054, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27077, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27085, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -159410,7 +159470,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -159430,13 +159490,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14425, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14433, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27144, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27152, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -159446,12 +159506,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24964, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24972, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27172, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27180, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -159466,8 +159526,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27203, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27210, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27211, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27218, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -159477,7 +159537,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27218, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27226, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -159517,13 +159577,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(4) defer tls.Free(4) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27222, -1) + ts+27230, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -159541,7 +159601,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17796 /* "ok" */ + return ts + 17804 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -159580,7 +159640,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -159606,7 +159666,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -159628,7 +159688,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -159644,7 +159704,7 @@ type GeoParse1 = struct { FnAlloc int32 FnErr int32 Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -159654,10 +159714,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -159667,7 +159727,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -159676,7 +159736,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -159748,7 +159808,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -159890,7 +159950,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159959,7 +160019,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -159972,7 +160032,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -159981,11 +160041,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27273, 1) + Xsqlite3_str_append(tls, x, ts+27281, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27275, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27283, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27286, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27294, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -159995,7 +160055,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -160009,19 +160069,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27297, 0) + Xsqlite3_str_appendf(tls, x, ts+27305, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27315, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27323, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27323, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27331, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27331, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27339, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27335, 0) + Xsqlite3_str_appendf(tls, x, ts+27343, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -160041,7 +160101,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -160074,7 +160134,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -160094,7 +160154,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -160113,7 +160173,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -160149,7 +160209,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -160169,7 +160229,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160214,7 +160274,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160355,7 +160415,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -160368,13 +160428,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -160408,7 +160468,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -160435,7 +160495,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -160476,7 +160536,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -160514,7 +160574,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -160545,10 +160605,10 @@ type GeoEvent1 = struct { FeType int32 FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -160558,20 +160618,20 @@ type GeoSegment1 = struct { F__ccgo_pad1 [3]byte Fidx uint32 FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -160605,7 +160665,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -160617,7 +160677,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -160647,7 +160707,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -160677,7 +160737,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -160712,7 +160772,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -160742,7 +160802,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160978,7 +161038,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -160994,7 +161054,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -161004,7 +161064,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161044,7 +161104,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27348, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27356, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -161053,7 +161113,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27370, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27378, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -161061,7 +161121,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26437, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26445, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -161119,12 +161179,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -161138,7 +161198,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -161305,7 +161365,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -161331,7 +161391,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16159 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16167 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -161341,7 +161401,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27374 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27382 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -161349,14 +161409,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27380 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27388 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161421,7 +161481,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -161488,7 +161548,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27389, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27397, 0) __4: ; goto geopoly_update_end @@ -161632,15 +161692,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27429) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27437) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27445) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27453) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -161673,9 +161733,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint32(i) < uint32(unsafe.Sizeof(aFunc))/uint32(unsafe.Sizeof(struct { @@ -161705,7 +161765,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27460, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27468, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -161717,26 +161777,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27468 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27481 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27494 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27507 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27445 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27519 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27429 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27542 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27556 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27569 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27583 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27599 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27476 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27489 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27502 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27515 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27453 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27527 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27437 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27550 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27564 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27577 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27591 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27607 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27611 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27619 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -161744,30 +161804,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27630, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27638, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27640, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27648, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27651, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27659, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27374, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27382, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27662, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27670, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -161781,7 +161841,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -161790,7 +161850,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -161811,7 +161871,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -161839,13 +161899,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24950, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24958, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -161865,7 +161925,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -162316,7 +162376,7 @@ type sqlite3rbu = struct { FszTempLimit I64 FnRbu int32 FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -162717,7 +162777,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -162782,7 +162842,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -162844,7 +162904,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -162873,9 +162933,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 FzTbl uintptr @@ -162887,15 +162947,15 @@ type RbuState1 = struct { FiCookie U32 FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -162903,9 +162963,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -162924,16 +162984,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -162952,7 +163012,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -162975,7 +163035,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -162995,7 +163055,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -163085,7 +163145,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -163110,7 +163170,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -163127,7 +163187,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27672, -1) + Xsqlite3_result_error(tls, context, ts+27680, -1) return } @@ -163138,7 +163198,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27672, -1) + Xsqlite3_result_error(tls, context, ts+27680, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -163153,7 +163213,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163171,7 +163231,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163195,7 +163255,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -163210,7 +163270,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))) @@ -163228,7 +163288,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -163258,7 +163318,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -163272,7 +163332,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -163281,7 +163341,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27693, uintptr(0), uintptr(0), p+36) + ts+27701, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -163353,7 +163413,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -163365,7 +163425,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24863, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24871, zIn, uint32(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -163383,7 +163443,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163393,9 +163453,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27864, libc.VaList(bp, func() uintptr { + ts+27872, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28014 /* "AND rootpage!=0 ..." */ + return ts + 28022 /* "AND rootpage!=0 ..." */ } return ts + 1527 /* "" */ }()))) @@ -163403,7 +163463,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28055) + ts+28063) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -163418,7 +163478,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -163444,7 +163504,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -163470,7 +163530,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -163487,7 +163547,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint32(2)*uint32(unsafe.Sizeof(uintptr(0))) + uint32(unsafe.Sizeof(int32(0))) + uint32(3)*uint32(unsafe.Sizeof(U8(0)))) * uint32(nCol)) var azNew uintptr @@ -163510,7 +163570,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -163533,7 +163593,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163583,7 +163643,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -163604,7 +163664,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+36, Xsqlite3_mprintf(tls, - ts+28180, libc.VaList(bp, zTab))) + ts+28188, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -163622,7 +163682,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*4, p+36, - Xsqlite3_mprintf(tls, ts+28299, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28307, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -163640,7 +163700,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28320, libc.VaList(bp+16, zIdx))) + ts+28328, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -163664,7 +163724,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28371, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28379, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -163704,7 +163764,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -163714,7 +163774,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+36, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28400, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -163729,7 +163789,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+20, p+36, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 20 /* pXInfo */)), 1) if iCid >= 0 { @@ -163762,7 +163822,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -163779,7 +163839,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+36, bp+56, pIter+60) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19346, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19354, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -163792,18 +163852,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28449, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28457, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28468, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28476, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+32) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*4)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28473, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28481, zName) { bRbuRowid = 1 } } @@ -163815,12 +163875,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28483, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28491, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28512 /* "may not have" */ + return ts + 28520 /* "may not have" */ } - return ts + 28525 /* "requires" */ + return ts + 28533 /* "requires" */ }())) } @@ -163829,7 +163889,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28534, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28542, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 60))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 1) @@ -163843,7 +163903,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28556, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28564, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 5) @@ -163884,7 +163944,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -163893,8 +163953,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+28583, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14536 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28591, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14544 /* ", " */ } return zList } @@ -163903,7 +163963,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -163915,7 +163975,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zRet = rbuMPrintf(tls, p, ts+28592, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28600, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -163945,7 +164005,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -163954,25 +164014,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28605, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28613, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28637, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28645, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14536, ts+28660) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28666, ts+28673, ts+4901) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14536, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14544, ts+28668) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28674, ts+28681, ts+4901) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14544, ts+1527) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28681, + ts+28689, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28723, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28731, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -164004,7 +164064,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -164035,7 +164095,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -164072,7 +164132,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28743 /* "_rowid_" */ + zCol = ts + 28751 /* "_rowid_" */ __7: ; goto __5 @@ -164081,13 +164141,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28751, + zLhs = rbuMPrintf(tls, p, ts+28759, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28772, + zOrder = rbuMPrintf(tls, p, ts+28780, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28808, + zSelect = rbuMPrintf(tls, p, ts+28816, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ iCol++ goto __1 __2: @@ -164106,7 +164166,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28835, + Xsqlite3_mprintf(tls, ts+28843, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 180)))) { goto __13 @@ -164133,8 +164193,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28883, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14536 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28891, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14544 /* ", " */ goto __15 __15: iCol++ @@ -164146,7 +164206,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28890, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28898, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -164185,7 +164245,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(204) defer tls.Free(204) @@ -164203,7 +164263,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -164215,7 +164275,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28902, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28910, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FzSpan, zCollate)) zType = ts + 1527 /* "" */ } else { @@ -164229,37 +164289,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28743 /* "_rowid_" */ + zCol = ts + 28751 /* "_rowid_" */ } else { - zCol = ts + 28473 /* "rbu_rowid" */ + zCol = ts + 28481 /* "rbu_rowid" */ } zType = ts + 1092 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)) } - zRet = Xsqlite3_mprintf(tls, ts+28924, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28932, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28660 + return ts + 28668 } return ts + 1527 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28944, + zImpPK = Xsqlite3_mprintf(tls, ts+28952, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28965, + zImpCols = Xsqlite3_mprintf(tls, ts+28973, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+28998, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29006, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14536 /* ", " */ - zAnd = ts + 21366 /* " AND " */ + zCom = ts + 14544 /* ", " */ + zAnd = ts + 21374 /* " AND " */ nBind++ } @@ -164296,7 +164356,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -164307,11 +164367,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = Xsqlite3_mprintf(tls, ts+29022, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29030, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29034, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29042, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14536 /* ", " */ + zS = ts + 14544 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -164320,7 +164380,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29043, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29051, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -164334,24 +164394,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29058, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29066, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1527 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29072, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21366 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29080, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21374 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29084, libc.VaList(bp+40, zList)) + ts+29092, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1527 /* "" */ @@ -164359,8 +164419,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+29134, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21366 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29142, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21374 /* " AND " */ } } } @@ -164372,9 +164432,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29147, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29155, 0) } // Return a nul-terminated string containing the comma separated list of @@ -164392,7 +164452,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -164407,17 +164467,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29134, + zList = rbuMPrintf(tls, p, ts+29142, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29173, + zList = rbuMPrintf(tls, p, ts+29181, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29203, + zList = rbuMPrintf(tls, p, ts+29211, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } } } @@ -164438,7 +164498,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -164468,26 +164528,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(64) defer tls.Free(64) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29240 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29248 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28400, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16047) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16055) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp+8, zIdx))) } break } @@ -164500,15 +164560,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28660 /* " DESC" */ + zDesc = ts + 28668 /* " DESC" */ } else { zDesc = ts + 1527 /* "" */ } - z = rbuMPrintf(tls, p, ts+29253, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14536 /* ", " */ + z = rbuMPrintf(tls, p, ts+29261, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14544 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29264, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29272, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */))) } return z @@ -164531,7 +164591,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -164548,7 +164608,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, - ts+29268) + ts+29276) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -164557,7 +164617,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -164567,23 +164627,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29318, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29326, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29340, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29348, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28660 /* " DESC" */ + return ts + 28668 /* " DESC" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14536 /* ", " */ + zComma = ts + 14544 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29350, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29358, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29365, + ts+29373, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 0, 0)) } @@ -164607,7 +164667,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -164629,32 +164689,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29427 /* "PRIMARY KEY " */ + zPk = ts + 29435 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29440, + zSql = rbuMPrintf(tls, p, ts+29448, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29467 /* " NOT NULL" */ + return ts + 29475 /* " NOT NULL" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14536 /* ", " */ + zComma = ts + 14544 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29477, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29485, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29484, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29492, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29516 /* " WITHOUT ROWID" */ + return ts + 29524 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) @@ -164671,7 +164731,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -164681,12 +164741,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29531, + ts+29539, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -164708,7 +164768,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164718,7 +164778,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29588) + ts+29596) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -164816,7 +164876,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -164828,7 +164888,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29654, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29662, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -164852,7 +164912,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29674, + ts+29682, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 604 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 0, 0)) @@ -164861,14 +164921,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, p+36, - Xsqlite3_mprintf(tls, ts+29739, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29747, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, p+36, - Xsqlite3_mprintf(tls, ts+29775, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29783, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -164885,7 +164945,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29809, + ts+29817, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -164893,9 +164953,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29870 /* "AND" */ + return ts + 29878 /* "AND" */ } - return ts + 29874 /* "WHERE" */ + return ts + 29882 /* "WHERE" */ }() } return ts + 1527 /* "" */ @@ -164904,21 +164964,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29880, + ts+29888, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29941, + ts+29949, libc.VaList(bp+264, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29870 /* "AND" */ + return ts + 29878 /* "AND" */ } - return ts + 29874 /* "WHERE" */ + return ts + 29882 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -164956,17 +165016,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1527 } - return ts + 30100 + return ts + 30108 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, pz, Xsqlite3_mprintf(tls, - ts+30109, + ts+30117, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30145 /* ", _rowid_" */ + return ts + 30153 /* ", _rowid_" */ } return ts + 1527 /* "" */ }(), zBindings))) @@ -164978,28 +165038,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, pz, Xsqlite3_mprintf(tls, - ts+30155, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30163, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30183 /* ", rbu_rowid" */ + zRbuRowid = ts + 30191 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30195, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30203, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30271 /* ", 0 AS rbu_rowid" */ + return ts + 30279 /* ", 0 AS rbu_rowid" */ } return ts + 1527 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30288, + ts+30296, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -165007,7 +165067,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30587, + ts+30595, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -165021,9 +165081,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30686 /* ",_rowid_ " */ + zRbuRowid = ts + 30694 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30696 /* ",rbu_rowid" */ + zRbuRowid = ts + 30704 /* ",rbu_rowid" */ } } @@ -165036,20 +165096,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28743, 0) + zOrder = rbuMPrintf(tls, p, ts+28751, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14536, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14544, ts+1527) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+76, pz, Xsqlite3_mprintf(tls, - ts+30707, + ts+30715, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30755 /* "0 AS " */ + return ts + 30763 /* "0 AS " */ } return ts + 1527 /* "" */ }(), @@ -165062,7 +165122,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19700 /* "ORDER BY" */ + return ts + 19708 /* "ORDER BY" */ } return ts + 1527 /* "" */ }(), zOrder, @@ -165091,7 +165151,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -165142,9 +165202,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30100 /* "rbu_imp_" */ + zPrefix = ts + 30108 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30761, + zUpdate = Xsqlite3_mprintf(tls, ts+30769, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+4, p+36, zUpdate) @@ -165157,7 +165217,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -165180,7 +165240,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -165196,7 +165256,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -165212,7 +165272,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30791, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30799, libc.VaList(bp, p+24))) for *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -165280,7 +165340,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -165292,21 +165352,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6325, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6325) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30821, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30829, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30848, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30856, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+24, ts+3230, uint32(4)) } else { libc.Xmemcpy(tls, p+24, ts+6325, uint32(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30866, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30874, libc.VaList(bp+24, p+24)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -165346,11 +165406,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30932, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30940, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24013, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24021, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -165362,13 +165422,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30964, + zTarget = Xsqlite3_mprintf(tls, ts+30972, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6325), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ } - return ts + 30996 /* "&" */ + return ts + 31004 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ @@ -165387,21 +165447,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30998, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31006, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31013, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31021, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31030, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31038, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -165409,7 +165469,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31046, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31054, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -165420,7 +165480,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31074, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31082, 0) } } @@ -165442,7 +165502,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -165450,7 +165510,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -165483,7 +165543,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -165491,7 +165551,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31046, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31054, uintptr(0), uintptr(0), uintptr(0)) } } @@ -165525,7 +165585,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31092, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31100, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -165575,7 +165635,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -165961,7 +166021,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 4 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31166) + ts+31174) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -165974,7 +166034,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31188, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31196, libc.VaList(bp, iCookie+1)) } } } @@ -165982,7 +166042,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -165999,7 +166059,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31215, + ts+31223, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -166037,16 +166097,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(28) defer tls.Free(28) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31373, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31381, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31388, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31396, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -166056,18 +166116,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31408, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31416, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31433) + ts+31441) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -166081,12 +166141,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31541) + ts+31549) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, - ts+31606) + ts+31614) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -166098,7 +166158,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31650, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31658, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -166106,7 +166166,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -166120,8 +166180,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17132) - rbuCopyPragma(tls, p, ts+16243) + rbuCopyPragma(tls, p, ts+17140) + rbuCopyPragma(tls, p, ts+16251) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -166132,7 +166192,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31675, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31683, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -166158,10 +166218,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14440, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14448, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14448, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -166249,7 +166309,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -166267,7 +166327,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 48 @@ -166282,7 +166342,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31703, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31711, 0) } if rc == SQLITE_OK { @@ -166297,11 +166357,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31152, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31160, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -166316,7 +166376,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -166325,7 +166385,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31728, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31736, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -166337,7 +166397,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -166347,7 +166407,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166364,7 +166424,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31739, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31747, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 12 /* zErrmsg */)), -1) } else { @@ -166396,7 +166456,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -166407,7 +166467,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31811, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31819, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -166415,7 +166475,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31825) + ts+31833) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -166427,7 +166487,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31882) + ts+31890) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -166438,7 +166498,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -166510,7 +166570,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31956, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31964, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -166532,12 +166592,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31988, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31996, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32020 /* "vacuum" */ + return ts + 32028 /* "vacuum" */ } - return ts + 32027 /* "update" */ + return ts + 32035 /* "update" */ }())) } } @@ -166545,7 +166605,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14425, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14433, uintptr(0), uintptr(0), p+36) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -166559,14 +166619,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16846) - rbuCopyPragma(tls, p, ts+16258) + rbuCopyPragma(tls, p, ts+16854) + rbuCopyPragma(tls, p, ts+16266) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32034, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32042, uintptr(0), uintptr(0), p+36) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -166576,7 +166636,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6325, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32050, uintptr(0), uintptr(0), p+36) + db, ts+32058, uintptr(0), uintptr(0), p+36) } } @@ -166611,7 +166671,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -166622,7 +166682,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -166630,13 +166690,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32074, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32082, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -166645,7 +166705,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -166661,12 +166721,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); i < nErrmsg-Size_t(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30100, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30108, uint32(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -166679,13 +166739,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14440, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14448, uintptr(0), uintptr(0), p+36) } // Sync the db file if currently doing an incremental checkpoint @@ -166699,7 +166759,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14448, uintptr(0), uintptr(0), p+36) } // Close any open statement handles. @@ -166711,7 +166771,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32082, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32090, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -166744,13 +166804,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -166783,7 +166843,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -166801,7 +166861,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -166810,7 +166870,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14440, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14448, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166829,19 +166889,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14448, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14425 /* "BEGIN" */ + zBegin = ts + 14433 /* "BEGIN" */ } else { - zBegin = ts + 32034 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32042 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32034, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32042, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166908,7 +166968,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -166925,7 +166985,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 220)) += nDiff @@ -166943,7 +167003,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -166965,7 +167025,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 100; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 56 { @@ -166990,7 +167050,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -167005,7 +167065,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -167037,7 +167097,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -167046,20 +167106,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -167123,7 +167183,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -167162,7 +167222,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -167176,7 +167236,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -167190,7 +167250,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -167210,7 +167270,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -167230,7 +167290,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -167238,7 +167298,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -167246,7 +167306,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167273,7 +167333,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32109, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32117, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -167298,7 +167358,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32132, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32140, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -167309,7 +167369,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -167317,7 +167377,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -167325,7 +167385,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -167358,7 +167418,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -167415,13 +167475,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -167444,7 +167504,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -167486,7 +167546,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32143, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32151, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -167530,10 +167590,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -167542,7 +167602,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167587,7 +167647,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -167595,7 +167655,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -167605,7 +167665,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -167613,7 +167673,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -167621,7 +167681,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -167630,7 +167690,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -167639,7 +167699,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -167647,7 +167707,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -167655,13 +167715,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -167675,7 +167735,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -167736,17 +167796,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -167829,7 +167889,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -167900,7 +167960,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -167909,16 +167969,16 @@ type SessionChange1 = struct { FnRecord int32 FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -167929,13 +167989,13 @@ type SessionInput1 = struct { FxInput uintptr FpIn uintptr FbEof int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -167943,13 +168003,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -167959,13 +168019,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -167978,7 +168038,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -167986,7 +168046,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -168008,7 +168068,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -168096,7 +168156,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 36)) += I64(Xsqlite3_msize(tls, pRet)) @@ -168107,7 +168167,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 36)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -168130,14 +168190,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -168147,7 +168207,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -168160,7 +168220,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -168226,7 +168286,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168252,7 +168312,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168295,7 +168355,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -168334,7 +168394,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -168373,7 +168433,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -168400,7 +168460,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -168475,7 +168535,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168563,7 +168623,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -168627,7 +168687,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -168644,13 +168704,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11218, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11226, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32154, 0) + ts+32162, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1527, 0) } else { @@ -168663,7 +168723,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32275, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32283, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -168758,7 +168818,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168775,7 +168835,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11218, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11226, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -168794,15 +168854,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168818,7 +168878,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168834,21 +168894,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -168962,7 +169022,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -169258,7 +169318,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -169293,7 +169353,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169328,25 +169388,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -169365,24 +169425,24 @@ func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:21176 type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -169390,13 +169450,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -169412,7 +169472,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -169422,9 +169482,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32304, + zRet = Xsqlite3_mprintf(tls, ts+32312, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ if zRet == uintptr(0) { break } @@ -169434,7 +169494,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -169447,9 +169507,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32338, + ts+32346, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 32379 /* " OR " */ + zSep = ts + 32387 /* " OR " */ if zRet == uintptr(0) { break } @@ -169464,18 +169524,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32384, + ts+32392, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169503,7 +169563,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -169515,7 +169575,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32462, + ts+32470, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -169540,7 +169600,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169653,7 +169713,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32515, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32523, 0) __16: ; rc = SQLITE_SCHEMA @@ -169713,7 +169773,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -169749,7 +169809,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -169771,7 +169831,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169809,7 +169869,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -169821,7 +169881,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -169872,7 +169932,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -169917,7 +169977,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -169940,7 +170000,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -169951,7 +170011,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 4)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -169962,7 +170022,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint32(nBlob)) *(*int32)(unsafe.Pointer(p + 4)) += nBlob @@ -169975,7 +170035,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint32(nStr)) @@ -169989,7 +170049,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -170006,7 +170066,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -170027,7 +170087,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170087,7 +170147,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -170193,7 +170253,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170250,7 +170310,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170258,10 +170318,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11218, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11226, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32542, libc.VaList(bp, zDb)) + ts+32550, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = SQLITE_NOMEM } @@ -170270,18 +170330,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1527 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32652, bp+20) + sessionAppendStr(tls, bp+8, ts+32660, bp+20) sessionAppendIdent(tls, bp+8, zDb, bp+20) sessionAppendStr(tls, bp+8, ts+1540, bp+20) sessionAppendIdent(tls, bp+8, zTab, bp+20) - sessionAppendStr(tls, bp+8, ts+32667, bp+20) + sessionAppendStr(tls, bp+8, ts+32675, bp+20) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+20) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp+20) - sessionAppendStr(tls, bp+8, ts+32675, bp+20) + sessionAppendStr(tls, bp+8, ts+32683, bp+20) sessionAppendInteger(tls, bp+8, i+1, bp+20) - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -170301,7 +170361,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170379,7 +170439,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -170400,7 +170460,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -170422,7 +170482,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32681, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32689, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -170520,7 +170580,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+12 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32701, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32709, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -170530,7 +170590,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -170542,7 +170602,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -170550,7 +170610,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -170562,7 +170622,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -170570,7 +170630,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -170582,7 +170642,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -170595,7 +170655,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -170609,12 +170669,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -170640,12 +170700,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -170678,28 +170738,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -170717,7 +170777,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170750,7 +170810,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170775,7 +170835,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -170811,7 +170871,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -170829,7 +170889,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -170854,7 +170914,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -170896,7 +170956,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170915,7 +170975,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -170942,7 +171002,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170984,7 +171044,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171004,7 +171064,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -171039,7 +171099,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -171096,13 +171156,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -171172,7 +171232,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) == uintptr(0) { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -171203,7 +171263,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -171223,14 +171283,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -171244,7 +171304,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -171263,7 +171323,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -171285,7 +171345,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -171309,7 +171369,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -171326,7 +171386,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -171338,7 +171398,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -171355,7 +171415,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -171591,7 +171651,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -171642,7 +171702,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -171657,7 +171717,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -171679,9 +171739,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -171701,9 +171761,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -171711,7 +171771,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -171772,7 +171832,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint32(unsafe.Sizeof(SessionUpdate{})) * uint32(nU32) * uint32(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11218) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11226) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = SQLITE_NOMEM @@ -171784,24 +171844,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*12 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint32(nU32)*uint32(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32719, bp+12) + sessionAppendStr(tls, bp, ts+32727, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32732, bp+12) + sessionAppendStr(tls, bp, ts+32740, bp+12) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32738, bp+12) + sessionAppendStr(tls, bp, ts+32746, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1527 /* "" */ - sessionAppendStr(tls, bp, ts+32667, bp+12) + sessionAppendStr(tls, bp, ts+32675, bp+12) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) @@ -171809,13 +171869,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32743, bp+12) + ts+32751, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32675, bp+12) + sessionAppendStr(tls, bp, ts+32683, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ } } @@ -171845,7 +171905,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -171873,7 +171933,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -171883,34 +171943,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32818, bp+12) + sessionAppendStr(tls, bp, ts+32826, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32667, bp+12) + sessionAppendStr(tls, bp, ts+32675, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32738, bp+12) + sessionAppendStr(tls, bp, ts+32746, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32836, bp+12) + sessionAppendStr(tls, bp, ts+32844, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32379, bp+12) + sessionAppendStr(tls, bp, ts+32387, bp+12) zSep = ts + 1527 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32675, bp+12) + sessionAppendStr(tls, bp, ts+32683, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32844 /* "AND " */ + zSep = ts + 32852 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4901, bp+12) @@ -171935,7 +171995,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6325, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } @@ -171947,7 +172007,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -171955,19 +172015,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32849, bp+12) + sessionAppendStr(tls, bp, ts+32857, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21372, bp+12) + sessionAppendStr(tls, bp, ts+21380, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14536, bp+12) + sessionAppendStr(tls, bp, ts+14544, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32867, bp+12) + sessionAppendStr(tls, bp, ts+32875, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32878, bp+12) + sessionAppendStr(tls, bp, ts+32886, bp+12) } sessionAppendStr(tls, bp, ts+4901, bp+12) @@ -171978,7 +172038,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -171986,24 +172046,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11218, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11226, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32882) + ts+32890) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+32995) + ts+33003) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -172030,7 +172090,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172051,7 +172111,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -172075,7 +172135,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -172119,7 +172179,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172191,7 +172251,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172291,7 +172351,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172426,7 +172486,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172448,7 +172508,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33139, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33147, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -172464,7 +172524,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33160, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33168, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -172473,7 +172533,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172527,7 +172587,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -172545,10 +172605,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33179, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33187, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33205, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33213, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+128, 4 @@ -172618,20 +172678,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33235, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33243, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33279, + ts+33287, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 128)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 136)), uint32(*(*int32)(unsafe.Pointer(bp + 128)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33350, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33358, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11218) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11226) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -172689,14 +172749,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33410, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33418, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33440, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33448, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33464, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33440, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33472, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33448, uintptr(0), uintptr(0), uintptr(0)) } } @@ -172718,7 +172778,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172736,7 +172796,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -172744,7 +172804,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172759,7 +172819,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -172767,7 +172827,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172939,7 +172999,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -173070,7 +173130,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173124,7 +173184,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -173139,7 +173199,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173157,12 +173217,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173179,12 +173239,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -173192,7 +173252,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173216,7 +173276,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173243,7 +173303,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -173284,7 +173344,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -173346,7 +173406,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -173484,7 +173544,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -173499,7 +173559,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173514,7 +173574,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173530,7 +173590,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173546,7 +173606,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -173554,7 +173614,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -173642,7 +173702,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -173704,13 +173764,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -173745,14 +173805,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -173767,7 +173827,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -173778,7 +173838,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -173788,19 +173848,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [2]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -173830,7 +173890,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -173841,16 +173901,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -173865,7 +173925,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -173876,7 +173936,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -173892,7 +173952,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -173901,7 +173961,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -173919,7 +173979,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -173930,7 +173990,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -173946,7 +174006,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -173955,7 +174015,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -173965,9 +174025,9 @@ type Fts5ExprNode1 = struct { FpNear uintptr FnChild int32 FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -173976,39 +174036,39 @@ type Fts5Parse1 = struct { FapPhrase uintptr FpExpr uintptr FbPhraseToAnd int32 -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 FpColset uintptr FnPhrase int32 FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -174112,7 +174172,7 @@ type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ type Fts5YYMINORTYPE = struct { Ffts5yyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -174185,7 +174245,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -174200,23 +174260,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -174253,9 +174313,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [2]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -174264,9 +174324,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -174276,7 +174336,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 8 /* &.fts5yystack */ @@ -174295,7 +174355,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -174311,7 +174371,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -174369,7 +174429,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 12) @@ -174377,7 +174437,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+8 { fts5yy_pop_parser_stack(tls, pParser) @@ -174390,7 +174450,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -174414,7 +174474,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -174438,7 +174498,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -174449,7 +174509,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+8 { @@ -174459,7 +174519,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33492, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33500, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -174468,7 +174528,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 12 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -174517,7 +174577,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -174550,7 +174610,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -174562,7 +174622,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174772,7 +174832,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174782,14 +174842,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33520, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33528, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -174818,7 +174878,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174873,7 +174933,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -174927,7 +174987,7 @@ type CInstIter1 = struct { FnInst int32 FiStart int32 FiEnd int32 -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -174970,11 +175030,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -175017,7 +175077,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(CInstIter{}))) @@ -175049,12 +175109,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -175063,7 +175123,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175071,7 +175131,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33551, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33559, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -175079,7 +175139,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175134,7 +175194,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -175145,7 +175205,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33558 /* "wrong number of ..." */ + var zErr uintptr = ts + 33566 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -175193,19 +175253,19 @@ type Fts5SFinder1 = struct { FnFirst int32 FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -175229,7 +175289,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -175258,7 +175318,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -175316,7 +175376,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -175325,7 +175385,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -175348,7 +175408,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33608 /* "wrong number of ..." */ + var zErr uintptr = ts + 33616 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -175539,17 +175599,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -175560,7 +175620,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175654,7 +175714,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175722,18 +175782,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(48) defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33656, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33664, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33672, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33674, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33682, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -175758,7 +175818,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -175773,7 +175833,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -175799,7 +175859,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -175811,21 +175871,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -175843,7 +175903,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -175855,7 +175915,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -175873,7 +175933,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -175889,26 +175949,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175970,14 +176030,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+8, pIter+16) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -175989,7 +176049,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -176001,9 +176061,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176020,7 +176080,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -176041,7 +176101,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -176066,7 +176126,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -176091,13 +176151,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176106,7 +176166,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176152,7 +176212,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint32(unsafe.Sizeof([512]uintptr{}))/uint32(unsafe.Sizeof(uintptr(0))))); i++ { @@ -176184,18 +176244,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -176208,7 +176268,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -176219,11 +176279,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -176312,7 +176372,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -176357,7 +176417,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -176369,11 +176429,11 @@ func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ type Fts5Enum1 = struct { FzName uintptr FeVal int32 -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -176401,13 +176461,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(76) defer tls.Free(76) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33679, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33687, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -176434,14 +176494,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33686, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33694, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33717, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33725, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -176452,7 +176512,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33750, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33758, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -176465,7 +176525,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33787, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33795, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + Size_t(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, Sqlite3_int64(unsafe.Sizeof(uintptr(0)))*nArg) @@ -176474,7 +176534,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33796, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33804, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -176493,7 +176553,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33829, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33837, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -176508,14 +176568,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33863, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33871, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33871, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33879, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33903, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33911, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -176523,9 +176583,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33909, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33917, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33923, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33931, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -176533,9 +176593,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33961, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33969, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33972, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33980, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -176546,25 +176606,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5019, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7898, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17237}, - {FzName: ts + 34007, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17245}, + {FzName: ts + 34015, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+44, zArg, pConfig+48)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34015, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34023, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34046, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34054, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -176582,7 +176642,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -176616,20 +176676,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22007) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16159) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22015) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16167) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34082, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34104) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34112) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34114, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34122, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -176639,7 +176699,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -176647,13 +176707,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34145, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34153, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34150, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34158, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34157, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34165, libc.VaList(bp+16, i)) } } } @@ -176672,7 +176732,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -176701,8 +176761,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*4)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22007) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34165, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22015) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -176736,7 +176796,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34194, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34202, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -176777,19 +176837,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33863 /* "content" */ + zTail = ts + 33871 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34214 /* "docsize" */ + zTail = ts + 34222 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34222, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34230, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16159, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16167, -1) } // Formulate the zContentExprlist text @@ -176805,7 +176865,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -176830,7 +176890,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -176838,18 +176898,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34233, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34241, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1527 } - return ts + 14536 + return ts + 14544 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34249, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34257, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34256, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22007)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34264, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22015)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -176880,7 +176940,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -176894,7 +176954,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -176921,7 +176981,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176985,13 +177045,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34282) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34290) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -177001,7 +177061,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34287) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34295) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -177011,7 +177071,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34296) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34304) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -177024,7 +177084,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34306) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34314) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -177034,7 +177094,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34316) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34324) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -177050,7 +177110,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22007) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22015) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 4 @@ -177073,11 +177133,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34328 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34336 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -177100,7 +177160,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 36))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34360) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34368) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40 /* bDummy */)) = 0 @@ -177115,7 +177175,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34368, + ts+34376, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -177150,7 +177210,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -177169,9 +177229,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -177183,12 +177243,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -177250,7 +177310,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34433, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34441, 0) return FTS5_EOF } } @@ -177263,20 +177323,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34453, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34461, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = (int32(z2) - int32(z)) / 1 - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34484, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34492, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34487, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34495, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29870, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29878, uint32(3)) == 0 { tok = FTS5_AND } break @@ -177288,15 +177348,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -177374,7 +177434,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -177449,7 +177509,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -177461,7 +177521,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -177469,7 +177529,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -177510,7 +177570,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -177532,7 +177592,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -177696,7 +177756,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -177921,11 +177981,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+8, p+20) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -177933,7 +177993,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -177945,9 +178005,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -177964,7 +178024,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(164) defer tls.Free(164) @@ -178166,7 +178226,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -178186,7 +178246,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178213,7 +178273,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178270,7 +178330,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -178336,7 +178396,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -178352,7 +178412,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -178361,7 +178421,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -178387,7 +178447,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -178406,7 +178466,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -178474,7 +178534,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20 var rc int32 = SQLITE_OK @@ -178533,7 +178593,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -178552,7 +178612,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20)).FpIter @@ -178570,7 +178630,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var i int32 @@ -178586,7 +178646,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -178612,7 +178672,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -178662,7 +178722,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -178674,7 +178734,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32 + 1*4)) @@ -178704,7 +178764,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -178720,7 +178780,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -178773,7 +178833,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -178835,7 +178895,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -178867,7 +178927,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -178883,15 +178943,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178901,7 +178961,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -178926,7 +178986,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 20)).FbFirst = U8(1) } @@ -178938,7 +178998,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -178997,12 +179057,12 @@ func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhra type TokenCtx1 = struct { FpPhrase uintptr Frc int32 -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179071,12 +179131,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -179087,12 +179147,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -179109,7 +179169,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -179167,7 +179227,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -179262,17 +179322,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34491, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34499, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33520, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33528, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179284,7 +179344,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34496, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34504, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -179303,7 +179363,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -179341,7 +179401,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -179363,7 +179423,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179381,7 +179441,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20369, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20377, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -179402,7 +179462,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5Colset{})) + uint32((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint32(unsafe.Sizeof(int32(0)))) @@ -179417,7 +179477,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -179441,7 +179501,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -179469,21 +179529,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34525, 0) + ts+34533, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -179534,7 +179594,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+32+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*4, pSub+32, uint32(nByte)) @@ -179554,7 +179614,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 12)))).FnTerm var ii int32 var nByte int32 @@ -179597,7 +179657,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179657,12 +179717,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+20)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34578, + ts+34586, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34628 /* "phrase" */ + return ts + 34636 /* "phrase" */ } - return ts + 34491 /* "NEAR" */ + return ts + 34499 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -179685,7 +179745,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -179731,7 +179791,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -179744,7 +179804,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -179754,7 +179814,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -179763,7 +179823,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -179784,7 +179844,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint32((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -179808,12 +179868,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -179823,7 +179883,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -179858,7 +179918,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179886,7 +179946,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)))).Fposlist.Fn = 0 } else { @@ -179897,7 +179957,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -179947,12 +180007,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -180003,7 +180063,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -180019,14 +180079,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -180054,7 +180114,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -180063,7 +180123,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -180077,7 +180137,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -180086,7 +180146,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -180097,7 +180157,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -180127,7 +180187,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -180176,7 +180236,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -180335,7 +180395,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180381,7 +180441,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -180423,7 +180483,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -180457,20 +180517,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+16) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*40 @@ -180696,7 +180756,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -180904,14 +180964,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -180919,17 +180979,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -180943,18 +181003,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -180976,18 +181036,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 Fwriter Fts5PageWriter @@ -181002,47 +181062,47 @@ type Fts5SegWriter1 = struct { FaDlidx uintptr Fbtterm Fts5Buffer FiBtPage int32 -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 FnWriteCounter U64 FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -181050,7 +181110,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+32, nByte) } @@ -181068,7 +181128,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -181092,7 +181152,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181103,7 +181163,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -181115,7 +181175,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -181142,7 +181202,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34635, iRowid, 0, p+36) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34643, iRowid, 0, p+36) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -181188,11 +181248,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -181204,7 +181264,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -181219,7 +181279,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181230,7 +181290,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+40, Xsqlite3_mprintf(tls, - ts+34641, + ts+34649, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -181247,7 +181307,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181258,7 +181318,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34692, + ts+34700, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+44, zSql) != 0 { return @@ -181272,7 +181332,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181282,7 +181342,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+52, Xsqlite3_mprintf(tls, - ts+34741, + ts+34749, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -181294,7 +181354,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -181305,22 +181365,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -181331,7 +181391,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint32(unsafe.Sizeof(Fts5Structure{})) + uint32((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint32(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -181373,7 +181433,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181466,7 +181526,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -181486,7 +181546,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 20 + uintptr(iLvl)*12 var aNew uintptr @@ -181509,7 +181569,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181537,7 +181597,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 4 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181546,7 +181606,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+64, - Xsqlite3_mprintf(tls, ts+34781, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34789, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -181570,7 +181630,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -181587,7 +181647,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -181601,7 +181661,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -181654,14 +181714,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 20 + uintptr(iPromote)*12 @@ -181704,7 +181764,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -181753,7 +181813,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181789,7 +181849,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*28 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -181810,7 +181870,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -181823,7 +181883,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*28) @@ -181831,11 +181891,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -181856,7 +181916,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181918,7 +181978,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*28 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -181941,12 +182001,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -181956,7 +182016,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -181998,16 +182058,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -182037,7 +182097,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182066,7 +182126,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182111,7 +182171,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -182143,7 +182203,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182177,7 +182237,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -182199,7 +182259,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -182240,7 +182300,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182299,7 +182359,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -182349,7 +182409,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -182357,7 +182417,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182386,7 +182446,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -182491,7 +182551,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -182616,7 +182676,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -182716,7 +182776,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -182744,7 +182804,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -182978,7 +183038,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182986,7 +183046,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+56, Xsqlite3_mprintf(tls, - ts+34804, + ts+34812, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -182997,7 +183057,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -183067,7 +183127,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183123,7 +183183,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+64) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -183138,7 +183198,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -183190,7 +183250,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -183220,7 +183280,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -183270,7 +183330,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -183281,7 +183341,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -183304,7 +183364,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 68 + uintptr(iChanged)*92 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -183344,7 +183404,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183355,7 +183415,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183394,7 +183454,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183419,12 +183479,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -183443,7 +183503,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -183459,21 +183519,21 @@ type PoslistCallbackCtx1 = struct { FpBuf uintptr FpColset uintptr FeState int32 -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -183483,7 +183543,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183509,7 +183569,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183589,7 +183649,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -183645,7 +183705,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -183696,7 +183756,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183757,7 +183817,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -183765,7 +183825,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -183785,7 +183845,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -183793,7 +183853,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+24) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+24) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183809,7 +183869,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -183871,7 +183931,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183893,7 +183953,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -183938,7 +183998,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -184141,7 +184201,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -184174,7 +184234,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -184182,13 +184242,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -184207,7 +184267,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -184220,7 +184280,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -184262,7 +184322,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -184275,7 +184335,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -184285,7 +184345,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -184306,7 +184366,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint32(unsafe.Sizeof(Fts5DlidxWriter{}))*uint32(nLvl))) @@ -184325,7 +184385,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -184347,7 +184407,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -184380,7 +184440,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+32, pWriter+76, nTerm, pTerm) @@ -184390,7 +184450,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -184403,7 +184463,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184419,7 +184479,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -184479,7 +184539,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 4 var iRowid I64 @@ -184515,14 +184575,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 4 var pPgidx uintptr = pWriter + 4 + 20 @@ -184598,7 +184658,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 4 @@ -184627,7 +184687,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184656,7 +184716,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 4 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -184680,7 +184740,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184701,7 +184761,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+48, Xsqlite3_mprintf(tls, - ts+34888, + ts+34896, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -184720,7 +184780,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184789,13 +184849,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -184954,7 +185014,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185004,7 +185064,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -185021,7 +185081,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185038,7 +185098,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -185047,14 +185107,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185079,7 +185139,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -185257,7 +185317,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -185266,7 +185326,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -185327,7 +185387,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185361,7 +185421,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185386,12 +185446,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+32, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -185418,7 +185478,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -185450,7 +185510,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -185460,13 +185520,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185483,7 +185543,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -185538,11 +185598,11 @@ type PrefixMerger1 = struct { FiOff int32 FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -185553,7 +185613,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -185566,7 +185626,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(740) defer tls.Free(740) @@ -185731,7 +185791,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 708 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -185878,7 +185938,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -185898,7 +185958,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -185909,7 +185969,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -185920,7 +185980,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -185939,7 +185999,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -185950,13 +186010,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34945, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34953, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24863, ts+34953, 0, pzErr) + pConfig, ts+24871, ts+34961, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11358, - ts+34988, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11366, + ts+34996, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -185973,7 +186033,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -185994,7 +186054,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -186021,7 +186081,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -186043,7 +186103,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -186067,7 +186127,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186150,7 +186210,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -186158,7 +186218,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -186178,14 +186238,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186203,7 +186263,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -186216,7 +186276,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -186238,7 +186298,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -186246,7 +186306,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -186255,7 +186315,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186268,7 +186328,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34635, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34643, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */))) @@ -186277,7 +186337,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -186291,7 +186351,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -186311,7 +186371,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -186330,7 +186390,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -186389,7 +186449,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+28) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -186405,7 +186465,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35032, + ts+35040, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -186558,7 +186618,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -186617,7 +186677,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+68+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*92, uintptr(0), bp+8) - sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(4), ts+35118) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(4), ts+35126) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fn, bp+20, bp+24) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) & int64(0x7FFFFFFF)) @@ -186648,13 +186708,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -186687,7 +186747,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -186709,7 +186769,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -186717,9 +186777,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -186746,35 +186806,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -186808,20 +186868,20 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -186831,13 +186891,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -186855,7 +186915,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186913,11 +186973,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -186926,14 +186986,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 52)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -187004,7 +187064,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187025,7 +187085,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35123, 0) + ts+35131, 0) return SQLITE_ERROR } @@ -187166,7 +187226,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -187177,7 +187237,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -187203,7 +187263,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -187216,11 +187276,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -187263,7 +187323,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -187280,7 +187340,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187290,7 +187350,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -187324,7 +187384,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -187344,7 +187404,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -187373,7 +187433,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187432,7 +187492,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187460,7 +187520,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -187489,11 +187549,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35162, + ts+35170, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14536 /* ", " */ + return ts + 14544 /* ", " */ } return ts + 1527 /* "" */ }(), @@ -187505,9 +187565,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35217 /* "DESC" */ + return ts + 35225 /* "DESC" */ } - return ts + 35222 /* "ASC" */ + return ts + 35230 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -187527,7 +187587,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -187542,7 +187602,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187558,13 +187618,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35226, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35234, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5001, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35232, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35240, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -187574,7 +187634,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -187587,7 +187647,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187599,7 +187659,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35260, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35268, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -187631,7 +187691,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35270, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35278, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -187640,7 +187700,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187663,21 +187723,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35291, libc.VaList(bp, z)) + ts+35299, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33674 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33682 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -187696,7 +187756,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187736,7 +187796,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35123, 0) + ts+35131, 0) return SQLITE_ERROR __1: ; @@ -187971,7 +188031,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35324, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35332, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -188017,7 +188077,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -188028,7 +188088,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -188042,7 +188102,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -188072,7 +188132,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188116,7 +188176,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -188138,7 +188198,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188146,29 +188206,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35360, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35368, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35371, 0) + ts+35379, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35451, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35459, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35459, 0) + ts+35467, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16826, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16834, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35515, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35523, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35521, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35529, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -188187,7 +188247,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) if eType1 == SQLITE_INTEGER { @@ -188197,7 +188257,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -188220,7 +188280,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -188242,7 +188302,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17371, z) { + 0 == Xsqlite3_stricmp(tls, ts+17379, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -188267,12 +188327,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35537, + ts+35545, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20270 /* "UPDATE" */ + return ts + 20278 /* "UPDATE" */ } - return ts + 35574 /* "DELETE from" */ + return ts + 35582 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -188322,7 +188382,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -188334,7 +188394,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -188343,7 +188403,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -188351,7 +188411,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -188359,46 +188419,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -188415,7 +188475,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188472,7 +188532,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188556,7 +188616,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -188566,7 +188626,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -188582,11 +188642,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -188598,7 +188658,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188656,7 +188716,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188694,7 +188754,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -188716,7 +188776,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188738,7 +188798,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188761,7 +188821,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188794,7 +188854,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188875,10 +188935,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188914,7 +188974,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -188923,7 +188983,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -188933,7 +188993,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188946,7 +189006,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35586, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35594, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -188956,7 +189016,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -188978,7 +189038,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -189042,7 +189102,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -189082,7 +189142,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -189101,12 +189161,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -189114,7 +189174,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -189123,7 +189183,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -189132,7 +189192,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -189141,7 +189201,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -189172,7 +189232,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -189201,7 +189261,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -189219,7 +189279,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -189235,7 +189295,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189251,7 +189311,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35607, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35615, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -189270,7 +189330,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 8 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35629, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35637, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -189286,7 +189346,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -189312,28 +189372,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35660) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35668) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35673, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35681, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName2))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -189344,10 +189404,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35764, ts + 33863, ts + 24863, ts + 34214, ts + 11358, -} /* sqlite3.c:234311:21 */ + ts + 35772, ts + 33871, ts + 24871, ts + 34222, ts + 11366, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -189368,7 +189428,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35771, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35779, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -189386,13 +189446,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35771, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35779, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35776, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35784, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -189430,7 +189490,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -189439,7 +189499,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -189447,7 +189507,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -189458,20 +189518,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 24 + uintptr(eStmt)*4)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35791, - ts + 35859, - ts + 35928, + ts + 35799, + ts + 35867, + ts + 35936, - ts + 35961, - ts + 36000, - ts + 36040, - ts + 36079, - ts + 36120, + ts + 35969, + ts + 36008, + ts + 36048, + ts + 36087, + ts + 36128, - ts + 36159, + ts + 36167, - ts + 36201, - ts + 36241, + ts + 36209, + ts + 36249, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -189548,7 +189608,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -189570,79 +189630,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36264, + ts+36272, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36368, + ts+36376, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36406, + ts+36414, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36444, + ts+36452, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24863, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11358, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35764, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24871, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11366, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35772, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34214, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34222, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33863, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33871, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(68) defer tls.Free(68) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36486, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36494, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29516 /* " WITHOUT ROWID" */ + return ts + 29524 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36516, + ts+36524, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -189655,7 +189715,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189684,27 +189744,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36560, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36568, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36583, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36591, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33863, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33871, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34214, ts+36589, 0, pzErr) + pConfig, ts+34222, ts+36597, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35764, ts+36621, 1, pzErr) + pConfig, ts+35772, ts+36629, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34360, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34368, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -189716,7 +189776,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -189735,12 +189795,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -189757,7 +189817,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189826,7 +189886,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189853,7 +189913,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+12, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -189867,7 +189927,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189891,7 +189951,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189932,7 +189992,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -189944,12 +190004,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36638, + ts+36646, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36688, + ts+36696, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -189959,12 +190019,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34360, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34368, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -190028,15 +190088,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -190047,7 +190107,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190069,7 +190129,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190101,7 +190161,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -190146,7 +190206,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -190154,7 +190214,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36717, + zSql = Xsqlite3_mprintf(tls, ts+36725, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -190181,13 +190241,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190253,7 +190313,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -190351,14 +190411,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 36 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33863, bp+36) + rc = fts5StorageCount(tls, p, ts+33871, bp+36) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 36)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 44 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34214, bp+44) + rc = fts5StorageCount(tls, p, ts+34222, bp+44) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 44)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -190378,7 +190438,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -190392,7 +190452,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 24 + uintptr(eStmt)*4)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -190402,7 +190462,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -190420,7 +190480,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190451,7 +190511,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -190469,7 +190529,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -190486,7 +190546,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -190500,12 +190560,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190560,13 +190620,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -190576,12 +190636,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -190597,9 +190657,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint32(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36749) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36757) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36760) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36768) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -190616,7 +190676,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -190628,7 +190688,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -190708,7 +190768,7 @@ type Unicode61Tokenizer1 = struct { FnException int32 FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -190718,11 +190778,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -190777,7 +190837,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -190799,7 +190859,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -190809,7 +190869,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -190829,7 +190889,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -190840,7 +190900,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36771 /* "L* N* Co" */ + var zCat uintptr = ts + 36779 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -190853,7 +190913,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36780) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36788) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -190864,18 +190924,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36791) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36799) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36749) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36757) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36760) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36768) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36780) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36788) { // no-op } else { rc = SQLITE_ERROR @@ -190897,12 +190957,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 148 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -191158,7 +191218,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -191167,10 +191227,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -191181,7 +191241,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191189,7 +191249,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36809 /* "unicode61" */ + var zBase uintptr = ts + 36817 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -191234,9 +191294,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -191244,15 +191304,15 @@ type PorterRule1 = struct { FxCond uintptr FzOutput uintptr FnOutput int32 -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -191273,12 +191333,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -191288,7 +191348,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -191298,7 +191358,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -191316,14 +191376,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -191338,13 +191398,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36819, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36827, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191352,11 +191412,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36822, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36830, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36827, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36835, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -191364,7 +191424,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36832, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36840, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191372,7 +191432,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36835, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191380,11 +191440,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36838, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36846, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36851, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -191392,19 +191452,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36848, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36856, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36852, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36871, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191412,11 +191472,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36867, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36875, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36871, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36879, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191424,7 +191484,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191432,11 +191492,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36890, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191444,22 +191504,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-3), uint32(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36890, aBuf+uintptr(nBuf-3), uint32(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36894, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -191467,34 +191511,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36898, aBuf+uintptr(nBuf-3), uint32(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint32(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36898, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36878, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36886, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36901, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36904, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36909, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36912, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36908, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36894, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36902, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -191504,143 +191564,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36911, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36919, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36878, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36886, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36919, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36927, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36926, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36934, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36931, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36939, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36827, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36835, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36944, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36822, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36830, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36941, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36949, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36894, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36902, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36954, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15372, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15380, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36904, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36912, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36963, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36819, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36827, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36968, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36871, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36974, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36970, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36978, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36972, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36980, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36886, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36894, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36978, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36986, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36894, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36902, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36986, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36878, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36886, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36992, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36878, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36886, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36997, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37005, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36819, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36827, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-7), uint32(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36890, uint32(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37011, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37019, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36898, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37023, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37019, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36886, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37027, uint32(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint32(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36894, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36819, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36827, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37037, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37045, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36890, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36898, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36904, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36912, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -191650,22 +191710,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36835, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36843, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -191673,21 +191733,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36835, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36843, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37066, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37074, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36835, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36843, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37019, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37027, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191695,7 +191755,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37080, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -191703,9 +191763,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37078, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37086, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36819, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36827, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -191715,18 +191775,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37084, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37092, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37088, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37096, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37091, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -191735,7 +191795,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -191752,7 +191812,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -191768,7 +191828,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191866,7 +191926,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -191887,20 +191947,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -191911,7 +191971,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37098) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37106) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -191931,7 +191991,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -192084,7 +192144,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -192098,27 +192158,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(64) defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36809, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36817, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37113, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37121, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37119, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37127, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37126, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -192144,7 +192204,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -192167,7 +192227,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -192238,7 +192298,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -192257,7 +192317,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -192318,7 +192378,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -192376,7 +192436,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -192388,9 +192448,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -192587,7 +192647,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -192766,7 +192826,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -192945,9 +193005,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -192987,7 +193047,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -193019,7 +193079,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -193094,7 +193154,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -193270,7 +193330,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -193316,7 +193376,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -193329,7 +193389,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -193389,7 +193449,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -193429,7 +193489,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -193446,9 +193506,9 @@ type Fts5VocabCursor1 = struct { Fterm Fts5Buffer FiInstPos I64 FiInstOff int32 -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -193456,7 +193516,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -193464,14 +193524,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37134) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37142) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37138) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37146) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37142) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37150) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37151, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37159, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -193481,14 +193541,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -193513,24 +193573,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4 /* azSchema */)) = [3]uintptr{ - ts + 37185, - ts + 37225, - ts + 37260, + ts + 37193, + ts + 37233, + ts + 37268, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23159, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23167, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37303, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37311, 0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -193583,11 +193643,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -193601,7 +193661,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -193669,7 +193729,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -193682,11 +193742,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37336, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37344, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37367, + ts+37375, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -193710,7 +193770,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 68 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37418, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37426, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -193736,7 +193796,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -193750,7 +193810,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+52) @@ -193759,7 +193819,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -193790,7 +193850,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -193819,7 +193879,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -193963,7 +194023,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -194037,12 +194097,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -194115,16 +194175,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37444, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37452, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -194141,7 +194201,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -194168,963 +194228,963 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37454 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37462 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 4)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2568 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 208 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 336)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 36)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 84)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 132)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 16)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 56)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 136)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 176)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 216)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 256)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 296)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 336)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 376)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 416)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 496)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 536)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 576)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 616)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 656)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 696)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 700)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 704)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 708)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 736)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 740)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 748)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 4)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2568 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 208 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 336)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 36)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 84)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 132)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 16)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 56)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 136)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 176)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 216)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 256)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 296)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 336)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 376)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 416)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 496)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 536)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 576)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 616)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 656)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 696)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 700)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 704)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 708)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 736)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 740)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 748)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 28 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 40 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 52 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 64 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 76 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 88 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 100 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 136 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 172 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 196 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 208 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 220 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 232 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 244 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Uid_t, Gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 268 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 280 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 316 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 328 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1028)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1036)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1044)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1028)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1036)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1044)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-13.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-13.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go index b45b6d4c..08821535 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_freebsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -1926,7 +1926,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2034,8 +2034,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2977,7 +2977,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5305,7 +5305,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -5330,7 +5330,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -5349,12 +5349,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -5383,7 +5383,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5491,7 +5491,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5597,7 +5597,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5703,7 +5703,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -5778,7 +5778,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -5843,7 +5843,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -5868,7 +5868,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -5884,7 +5884,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -5907,7 +5907,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6081,7 +6081,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6240,7 +6240,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6257,12 +6257,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6296,7 +6296,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6316,7 +6316,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6336,7 +6336,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6380,7 +6380,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6417,7 +6417,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -6437,13 +6437,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6473,7 +6473,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6486,7 +6486,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -6507,13 +6507,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6523,13 +6523,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6731,7 +6731,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6933,7 +6933,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -6987,7 +6987,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7019,22 +7019,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7054,7 +7054,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7068,7 +7068,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7689,7 +7689,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7697,7 +7697,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -8227,13 +8227,13 @@ type Max_align_t = X__max_align_t /* stddef.h:69:23 */ // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -8244,7 +8244,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -8267,12 +8267,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -8295,7 +8295,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -8437,13 +8437,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -8451,7 +8451,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -8463,7 +8463,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -8473,7 +8473,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -8487,7 +8487,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -8498,7 +8498,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -8509,7 +8509,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -8519,7 +8519,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -8529,9 +8529,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -8546,7 +8546,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -8566,7 +8566,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -8588,7 +8588,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -8605,17 +8605,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -8630,17 +8630,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -8671,7 +8671,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -8681,7 +8681,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -8694,7 +8694,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -8713,10 +8713,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -8727,7 +8727,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -8738,9 +8738,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -8822,14 +8822,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -8848,21 +8848,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -8872,9 +8872,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -8885,9 +8885,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -8895,7 +8895,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -8920,14 +8920,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -8938,9 +8938,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -8966,15 +8966,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -9004,7 +9004,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -9013,14 +9013,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -9036,7 +9036,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -9046,7 +9046,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -9064,7 +9064,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -9077,7 +9077,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -9095,7 +9095,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -9109,7 +9109,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -9118,7 +9118,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -9128,9 +9128,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -9159,9 +9159,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -9195,7 +9195,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -9203,14 +9203,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -9221,7 +9221,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -9248,7 +9248,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -9319,7 +9319,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -9337,7 +9337,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -9408,7 +9408,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -9433,7 +9433,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -9472,7 +9472,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -9483,9 +9483,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -9589,11 +9589,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -9605,7 +9605,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -9633,7 +9633,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -9642,11 +9642,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -9711,7 +9711,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -9729,10 +9729,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -9808,7 +9808,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -9859,7 +9859,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -9953,7 +9953,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -9966,7 +9966,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -10031,7 +10031,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10054,7 +10054,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10076,7 +10076,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10102,7 +10102,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10126,7 +10126,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10152,7 +10152,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -10176,7 +10176,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -10305,9 +10305,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1032, ts + 1046, ts + 1059, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -10374,10 +10374,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -10441,7 +10441,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -10501,12 +10501,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -10524,21 +10524,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -10554,7 +10554,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1072)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -10562,7 +10562,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -10570,7 +10570,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1079, ts + 1083, @@ -10578,7 +10578,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1092, ts + 1100, ts + 1105, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -10623,10 +10623,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -10649,10 +10649,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -10664,7 +10664,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -10718,7 +10718,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -10783,7 +10783,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -10797,7 +10797,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -10809,13 +10809,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -10826,7 +10826,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -10834,7 +10834,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -10849,7 +10849,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -10861,20 +10861,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -10889,7 +10889,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -10899,7 +10899,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -10913,7 +10913,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -10921,14 +10921,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -10939,12 +10939,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -10962,7 +10962,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -10978,7 +10978,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -10988,7 +10988,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -11000,7 +11000,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -11579,14 +11579,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -11613,7 +11613,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -11670,7 +11670,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -11686,7 +11686,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -11760,7 +11760,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -11813,7 +11813,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -11822,7 +11822,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -11878,7 +11878,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -11929,7 +11929,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -11944,7 +11944,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -11967,7 +11967,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -11996,12 +11996,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -12046,7 +12046,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -12065,13 +12065,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -12101,7 +12101,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -12126,7 +12126,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -12166,7 +12166,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -12194,7 +12194,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1190 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -12218,7 +12218,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -12544,7 +12544,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -12585,7 +12585,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -12601,7 +12601,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -12616,7 +12616,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -12665,7 +12665,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -12693,7 +12693,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -12745,7 +12745,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -12889,7 +12889,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -12898,7 +12898,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -12907,7 +12907,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -12916,7 +12916,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -12929,7 +12929,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1336}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1345}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1358}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1376}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -12981,7 +12981,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -12990,27 +12990,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -13020,27 +13020,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -13053,7 +13053,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -13062,7 +13062,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -13070,7 +13070,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -13082,7 +13082,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -13091,23 +13091,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -13115,14 +13115,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -13130,7 +13130,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -13144,7 +13144,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -13154,14 +13154,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -13169,7 +13169,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -13177,25 +13177,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -13212,13 +13212,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -13227,7 +13227,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13252,7 +13252,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -13272,7 +13272,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -13282,7 +13282,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -13292,11 +13292,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -13318,7 +13318,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -13338,7 +13338,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -13361,7 +13361,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -13406,7 +13406,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -13437,8 +13437,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -13448,7 +13448,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -13457,14 +13457,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -13562,7 +13562,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13585,7 +13585,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -13594,7 +13594,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -13610,7 +13610,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13632,18 +13632,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -13652,7 +13652,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13667,7 +13667,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -13801,7 +13801,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -13835,7 +13835,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -13845,7 +13845,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -13858,7 +13858,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -13869,7 +13869,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -13878,7 +13878,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -13887,7 +13887,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -13902,7 +13902,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -13941,40 +13941,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -13987,11 +13987,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -14054,7 +14054,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -14067,22 +14067,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -14098,7 +14098,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -14126,7 +14126,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -14143,7 +14143,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14162,7 +14162,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -14185,12 +14185,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mem0)) + 24)) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -14198,7 +14198,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -14213,7 +14213,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -14226,7 +14226,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -14237,7 +14237,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -14284,7 +14284,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14313,7 +14313,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14323,7 +14323,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14331,27 +14331,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -14370,7 +14370,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -14381,7 +14381,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -14399,14 +14399,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -14432,7 +14432,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -14440,7 +14440,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -14501,7 +14501,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14511,7 +14511,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14519,7 +14519,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -14529,7 +14529,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -14541,7 +14541,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -14572,7 +14572,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -14582,7 +14582,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -14620,7 +14620,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -14640,7 +14640,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -14664,7 +14664,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -14678,7 +14678,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -14692,7 +14692,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -14710,7 +14710,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -14723,7 +14723,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -14739,7 +14739,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -14760,7 +14760,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) *(*int32)(unsafe.Pointer(db + 432)) = 0 @@ -14776,7 +14776,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -14795,7 +14795,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -14824,7 +14824,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -14835,18 +14835,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1477)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1510)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -14873,7 +14873,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -14884,7 +14884,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -14899,7 +14899,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -14914,7 +14914,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -14926,21 +14926,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -14954,7 +14954,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -14976,7 +14976,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -16469,7 +16469,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29902:29 */ // End of function @@ -16477,7 +16477,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1554)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -16504,7 +16504,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -16519,7 +16519,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -16573,7 +16573,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -16589,7 +16589,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) @@ -16599,7 +16599,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -16611,14 +16611,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -16632,7 +16632,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -16644,7 +16644,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -16662,10 +16662,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -16677,7 +16677,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -16685,7 +16685,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -16693,7 +16693,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -16702,7 +16702,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -16724,7 +16724,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -16735,7 +16735,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -16753,7 +16753,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -16775,7 +16775,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -16787,7 +16787,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -16807,7 +16807,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -16831,7 +16831,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -16846,7 +16846,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -16868,7 +16868,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -16886,7 +16886,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -16898,7 +16898,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -16953,7 +16953,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -16997,10 +16997,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -17079,16 +17079,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -17096,7 +17096,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -17118,7 +17118,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -17187,7 +17187,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -17214,7 +17214,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -17241,7 +17241,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -17566,7 +17566,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -17600,7 +17600,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -17632,7 +17632,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -17653,7 +17653,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -17839,7 +17839,7 @@ type Float_t = X__float_t /* math.h:137:19 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -17851,7 +17851,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -17871,7 +17871,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -17883,7 +17883,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { @@ -17898,7 +17898,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -17908,7 +17908,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -17920,7 +17920,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -17931,7 +17931,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -17951,7 +17951,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -17978,7 +17978,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -18009,7 +18009,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -18034,7 +18034,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -18066,7 +18066,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -18086,7 +18086,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -18104,7 +18104,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -18119,7 +18119,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -18131,7 +18131,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -18157,7 +18157,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -18181,7 +18181,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -18197,7 +18197,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -18240,7 +18240,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -18620,7 +18620,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -18661,7 +18661,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -18690,7 +18690,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -18812,7 +18812,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18845,7 +18845,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -18907,7 +18907,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -18920,7 +18920,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -18963,7 +18963,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -19009,7 +19009,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -19032,7 +19032,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -19185,7 +19185,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -19253,7 +19253,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -19261,12 +19261,12 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ return uint32(*(*U8)(unsafe.Pointer(p)))<<24 | uint32(int32(*(*U8)(unsafe.Pointer(p + 1)))<<16) | uint32(int32(*(*U8)(unsafe.Pointer(p + 2)))<<8) | uint32(*(*U8)(unsafe.Pointer(p + 3))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ *(*uint8)(unsafe.Pointer(p)) = U8(v >> 24) *(*uint8)(unsafe.Pointer(p + 1)) = U8(v >> 16) *(*uint8)(unsafe.Pointer(p + 2)) = U8(v >> 8) @@ -19276,7 +19276,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -19286,7 +19286,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -19304,7 +19304,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -19325,7 +19325,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1528) @@ -19344,7 +19344,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -19361,7 +19361,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB >= int64(0) { @@ -19379,7 +19379,7 @@ func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return 0 } -func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043:20: */ if iB == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { @@ -19394,7 +19394,7 @@ func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return int32(0) } -func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB > int64(0) { if iA > (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/iB { @@ -19426,7 +19426,7 @@ func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -19440,7 +19440,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -19471,11 +19471,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -19498,11 +19498,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19523,7 +19523,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -19575,7 +19575,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -19614,7 +19614,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -19633,7 +19633,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -19672,7 +19672,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -19683,7 +19683,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -19700,7 +19700,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -19715,7 +19715,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -19752,7 +19752,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -19796,7 +19796,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -19825,11 +19825,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -19858,7 +19858,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -19876,7 +19876,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -19925,7 +19925,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -20115,7 +20115,7 @@ var azName = [185]uintptr{ ts + 3182, ts + 3187, ts + 3195, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ type pthread_once = struct { Fstate int32 F__ccgo_pad1 [4]byte @@ -21797,7 +21797,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -21830,7 +21830,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -21846,10 +21846,10 @@ type unixShmNode = struct { F__ccgo_pad2 [4]byte FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -21867,18 +21867,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -21904,16 +21904,16 @@ type unixFile = struct { FpMapRegion uintptr FsectorSize int32 FdeviceCharacteristics int32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -21936,7 +21936,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -21951,7 +21951,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -22019,14 +22019,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3403, FpCurrent: 0}, {FzName: ts + 3409}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { return 0 } @@ -22037,7 +22037,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -22074,7 +22074,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -22090,7 +22090,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -22128,7 +22128,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(240) defer tls.Free(240) @@ -22195,14 +22195,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -22212,7 +22212,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, int64(sz)) @@ -22228,7 +22228,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -22277,7 +22277,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -22378,12 +22378,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -22401,7 +22401,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -22435,7 +22435,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3210, func() uintptr { @@ -22449,19 +22449,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -22471,7 +22471,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -22505,7 +22505,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(240) defer tls.Free(240) @@ -22564,7 +22564,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -22581,7 +22581,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -22617,7 +22617,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -22683,7 +22683,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -22735,7 +22735,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -22982,7 +22982,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -23003,7 +23003,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -23137,7 +23137,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -23150,11 +23150,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -23164,7 +23164,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -23214,26 +23214,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -23274,7 +23274,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -23310,7 +23310,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -23352,7 +23352,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -23387,7 +23387,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -23486,7 +23486,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -23524,7 +23524,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -23579,7 +23579,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -23605,13 +23605,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -23668,7 +23668,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -23714,7 +23714,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -23741,7 +23741,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3322, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3322, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -23757,7 +23757,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -23776,7 +23776,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3610, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3610, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -23788,7 +23788,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -23799,7 +23799,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -23814,7 +23814,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -23830,7 +23830,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -23861,7 +23861,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -23906,7 +23906,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3241, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -23921,7 +23921,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -23932,7 +23932,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24043,7 +24043,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -24064,7 +24064,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -24081,7 +24081,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -24091,7 +24091,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -24103,7 +24103,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24135,7 +24135,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24176,7 +24176,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size // Page size must be a power of 2 @@ -24190,7 +24190,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -24207,7 +24207,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -24222,7 +24222,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24266,7 +24266,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3241, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -24313,7 +24313,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -24409,7 +24409,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3205, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3205, zShm, 39446) goto shm_open_err __10: ; @@ -24477,7 +24477,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(228) defer tls.Free(228) @@ -24580,7 +24580,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3276, zFile, 39590) goto shmpage_out __14: ; @@ -24628,7 +24628,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3363, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -24686,7 +24686,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -24700,7 +24700,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -24807,7 +24807,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -24820,7 +24820,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -24863,7 +24863,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -24886,7 +24886,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3363 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -24928,7 +24928,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -24953,7 +24953,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -24990,7 +24990,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -25017,7 +25017,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -25078,33 +25078,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -25117,7 +25117,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -25127,7 +25127,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25184,7 +25184,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -25207,7 +25207,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -25225,17 +25225,17 @@ var azTempDirs = [6]uintptr{ ts + 3673, ts + 3682, ts + 1540, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3687) azTempDirs[1] = libc.Xgetenv(tls, ts+3701) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -25262,7 +25262,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25306,7 +25306,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -25357,7 +25357,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -25393,7 +25393,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -25467,7 +25467,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(524) defer tls.Free(524) @@ -25665,7 +25665,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3205, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3205, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -25765,7 +25765,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25776,7 +25776,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__error(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3315, zPath, 41141) } return rc } @@ -25786,9 +25786,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3732, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3732, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -25805,7 +25805,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -25827,7 +25827,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -25850,7 +25850,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -25861,7 +25861,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3223, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3223, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -25870,7 +25870,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3607, libc.VaList(bp, zPath)) @@ -25921,7 +25921,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(224) defer tls.Free(224) @@ -25947,7 +25947,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__error(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3403, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3403, zIn, 41322) } } else { bLink = libc.Bool32(int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&0170000 == 0120000) @@ -25961,20 +25961,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3394, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3394, zIn, 41340) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint64(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint64(n)) @@ -26184,7 +26184,7 @@ type dl_serinfo = struct { type Dl_serinfo = dl_serinfo /* dlfcn.h:113:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -26194,7 +26194,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26208,7 +26208,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -26234,13 +26234,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26275,7 +26275,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -26288,7 +26288,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -26311,7 +26311,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -26325,12 +26325,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26346,7 +26346,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -26528,7 +26528,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -26566,14 +26566,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3756, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3766, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3646, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -26615,15 +26615,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -26637,9 +26637,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -26649,13 +26649,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -26672,7 +26672,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -26688,21 +26688,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -26740,7 +26740,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -26757,7 +26757,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -26779,7 +26779,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -26810,7 +26810,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -26825,14 +26825,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -26841,7 +26841,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -26885,7 +26885,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -26914,13 +26914,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -26934,7 +26934,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -26945,7 +26945,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -27020,7 +27020,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -27031,7 +27031,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27041,7 +27041,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -27050,21 +27050,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -27072,7 +27072,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -27080,19 +27080,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -27100,7 +27100,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27123,7 +27123,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -27214,7 +27214,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -27309,7 +27309,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -27331,7 +27331,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -27344,7 +27344,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -27373,7 +27373,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -27387,7 +27387,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -27524,7 +27524,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -27563,7 +27563,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -27578,7 +27578,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -27615,7 +27615,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27778,7 +27778,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -27840,7 +27840,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -27852,7 +27852,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -27877,7 +27877,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -27890,7 +27890,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -27898,7 +27898,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -27912,7 +27912,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -27929,7 +27929,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -27976,7 +27976,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -28004,7 +28004,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -28055,7 +28055,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -28075,7 +28075,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -28091,7 +28091,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -28104,7 +28104,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -28113,7 +28113,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -28126,7 +28126,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -28141,7 +28141,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -28153,7 +28153,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -28162,7 +28162,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -28172,7 +28172,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -28181,7 +28181,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -28200,7 +28200,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -28234,19 +28234,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -28285,7 +28285,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -28328,7 +28328,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -28340,17 +28340,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -28358,7 +28358,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -28370,7 +28370,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -28387,20 +28387,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -28515,7 +28515,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -28601,7 +28601,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -28611,12 +28611,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -28624,9 +28624,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -28643,10 +28643,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -28664,7 +28664,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -28697,7 +28697,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -28742,7 +28742,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -28775,7 +28775,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -28805,7 +28805,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -28819,7 +28819,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -28857,7 +28857,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -28874,13 +28874,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -28898,7 +28898,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -28914,7 +28914,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -28955,7 +28955,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -28972,7 +28972,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -28990,7 +28990,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -29011,7 +29011,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -29059,7 +29059,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -29097,7 +29097,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -29106,7 +29106,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -29156,7 +29156,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -29179,7 +29179,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -29194,7 +29194,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -29209,7 +29209,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -29327,7 +29327,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -29356,7 +29356,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -29367,7 +29367,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -29381,7 +29381,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -29406,7 +29406,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -29437,7 +29437,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -29450,7 +29450,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -29473,7 +29473,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -29493,16 +29493,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -29513,7 +29513,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -29611,7 +29611,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -29624,13 +29624,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -29650,7 +29650,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -29669,7 +29669,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -29680,7 +29680,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -29703,7 +29703,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -29733,7 +29733,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -29768,7 +29768,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -29804,7 +29804,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -29835,7 +29835,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -29866,7 +29866,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -29899,7 +29899,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -29932,7 +29932,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -30117,7 +30117,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -30886,7 +30886,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -30919,11 +30919,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -30946,7 +30946,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -30968,7 +30968,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -30985,7 +30985,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -31002,7 +31002,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -31029,7 +31029,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -31063,7 +31063,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -31097,7 +31097,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -31156,7 +31156,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -31185,7 +31185,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31220,7 +31220,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -31235,7 +31235,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -31345,7 +31345,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -31455,7 +31455,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31515,21 +31515,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -31546,7 +31546,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -31575,7 +31575,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -31667,7 +31667,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -31692,7 +31692,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -31756,7 +31756,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -31883,7 +31883,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -31915,7 +31915,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -31960,7 +31960,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32194,7 +32194,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -32360,7 +32360,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32395,7 +32395,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -32427,7 +32427,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -32495,7 +32495,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -32630,39 +32630,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -32671,25 +32677,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -32698,10 +32704,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -32719,7 +32725,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -32728,24 +32734,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -32753,14 +32759,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3838, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -32780,7 +32786,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32834,7 +32840,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -32861,7 +32867,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -32892,7 +32898,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -32923,7 +32929,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -32971,7 +32977,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -33002,7 +33008,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33056,7 +33062,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33124,7 +33130,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -33233,18 +33239,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33260,13 +33266,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -33319,7 +33325,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -33383,7 +33389,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -33411,7 +33417,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -33448,7 +33454,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33517,7 +33523,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -33526,7 +33532,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -33557,7 +33563,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint64(N)) @@ -33580,7 +33586,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -33597,7 +33603,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -33642,7 +33648,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -33669,7 +33675,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -33688,7 +33694,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -33718,7 +33724,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -33728,7 +33734,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -33741,7 +33747,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -33779,7 +33785,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -33828,7 +33834,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -33865,7 +33871,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -33979,7 +33985,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -34011,7 +34017,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34091,7 +34097,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -34115,7 +34121,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -34146,7 +34152,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -34172,7 +34178,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -34234,7 +34240,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -34281,7 +34287,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -34407,7 +34413,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -34726,7 +34732,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -34764,7 +34770,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -34875,7 +34881,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -35001,7 +35007,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -35150,7 +35156,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -35212,7 +35218,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35225,7 +35231,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -35271,7 +35277,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -35343,7 +35349,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -35363,7 +35369,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -35401,7 +35407,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -35410,7 +35416,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -35426,7 +35432,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -35447,7 +35453,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -35459,13 +35465,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -35494,7 +35500,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -35576,7 +35582,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -35636,7 +35642,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -35686,7 +35692,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -35760,7 +35766,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35848,7 +35854,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -35889,7 +35895,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -35919,7 +35925,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35989,7 +35995,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -36012,7 +36018,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -36048,7 +36054,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -36238,7 +36244,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -36295,7 +36301,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -36339,13 +36345,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -36354,7 +36360,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -36367,7 +36373,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -36377,7 +36383,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -36389,7 +36395,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -36429,7 +36435,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -36467,7 +36473,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -36528,30 +36534,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -36559,7 +36565,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -36586,7 +36592,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -36648,7 +36654,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -36708,21 +36714,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -36734,7 +36740,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -36760,7 +36766,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -36830,14 +36836,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -36852,7 +36858,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -36864,12 +36870,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -36881,7 +36887,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -36909,13 +36915,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -36925,7 +36931,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -36942,7 +36948,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -36978,7 +36984,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -37008,7 +37014,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37048,7 +37054,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -37059,7 +37065,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -37071,7 +37077,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -37091,7 +37097,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -37103,7 +37109,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -37682,7 +37688,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -37694,18 +37700,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -37713,7 +37719,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -37735,7 +37741,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -37766,7 +37772,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -37812,7 +37818,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -37820,13 +37826,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -37844,7 +37850,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -37876,7 +37882,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -37891,7 +37897,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -37915,7 +37921,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -37938,7 +37944,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -37980,7 +37986,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -37991,7 +37997,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -38000,7 +38006,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -38011,7 +38017,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -38023,12 +38029,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -38040,12 +38046,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -38059,7 +38065,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -38082,14 +38088,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -38107,7 +38113,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -38150,7 +38156,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -38191,7 +38197,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -38210,7 +38216,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -38325,7 +38331,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -38529,7 +38535,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -38555,7 +38561,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38627,7 +38633,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -38641,7 +38647,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -38688,7 +38694,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -38734,7 +38740,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -38780,10 +38786,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -38798,7 +38804,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -38882,7 +38888,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -38894,7 +38900,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -38913,7 +38919,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -38964,7 +38970,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -39095,7 +39101,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -39256,7 +39262,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -39275,7 +39281,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -39347,7 +39353,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -39416,7 +39422,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -39496,7 +39502,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -39541,7 +39547,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -39807,7 +39813,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -40024,7 +40030,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -40098,7 +40104,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -40186,7 +40192,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -40200,7 +40206,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -40267,7 +40273,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -40283,7 +40289,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -40300,7 +40306,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -40318,7 +40324,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -40350,7 +40356,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -40370,7 +40376,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -40407,7 +40413,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -40419,7 +40425,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -40450,7 +40456,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40504,12 +40510,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -40517,7 +40523,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -40539,7 +40545,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -40564,7 +40570,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -40618,7 +40624,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -40851,7 +40857,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40916,7 +40922,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -40960,7 +40966,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -40991,7 +40997,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -41025,14 +41031,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -41051,16 +41057,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -41090,7 +41096,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -41106,13 +41112,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -41633,7 +41639,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -41642,7 +41648,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -41651,7 +41657,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -41761,7 +41767,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -41857,7 +41863,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -41871,7 +41877,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -41880,7 +41886,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -41901,7 +41907,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -41929,7 +41935,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -41960,7 +41966,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -41983,7 +41989,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -41998,13 +42004,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -42016,7 +42022,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -42027,11 +42033,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -42054,7 +42060,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3977)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3977)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -42080,14 +42086,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3977)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -42104,7 +42110,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -42161,7 +42167,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -42212,7 +42218,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -42247,7 +42253,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -42271,7 +42277,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -42290,7 +42296,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -42337,7 +42343,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -42357,20 +42363,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -42392,7 +42398,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -42429,7 +42435,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -42470,7 +42476,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -42491,7 +42497,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -42510,7 +42516,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -42520,7 +42526,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -42533,7 +42539,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -42550,7 +42556,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42590,7 +42596,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -42598,12 +42604,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -42616,7 +42622,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -42638,7 +42644,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -42650,7 +42656,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -42675,7 +42681,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42698,7 +42704,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -42717,7 +42723,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -42725,7 +42731,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -42756,7 +42762,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42777,7 +42783,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -42787,7 +42793,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -42805,7 +42811,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -42832,7 +42838,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -42862,7 +42868,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -42872,7 +42878,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42949,7 +42955,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -42980,7 +42986,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell) + 1))))), pInfo) @@ -42996,7 +43002,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -43037,7 +43043,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -43054,7 +43060,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -43071,7 +43077,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -43089,7 +43095,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -43134,7 +43140,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -43144,7 +43150,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -43157,7 +43163,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -43166,14 +43172,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -43183,7 +43189,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -43245,7 +43251,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -43256,7 +43262,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -43291,7 +43297,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -43316,7 +43322,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -43345,7 +43351,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -43360,14 +43366,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -43383,7 +43389,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43408,7 +43414,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -43423,7 +43429,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -43474,7 +43480,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -43498,12 +43504,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -43514,11 +43520,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -43531,7 +43537,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -43539,7 +43545,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -43549,10 +43555,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -43586,7 +43592,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -43637,7 +43643,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -43645,7 +43651,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -43677,12 +43683,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -43694,11 +43700,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -43709,7 +43715,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -43717,7 +43723,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -43739,14 +43745,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -43759,7 +43765,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -43768,21 +43774,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -43800,7 +43806,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -43823,7 +43829,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -43835,7 +43841,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -43862,7 +43868,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -43880,7 +43886,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -43892,11 +43898,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -43912,7 +43918,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -43922,7 +43928,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -43953,7 +43959,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -43977,18 +43983,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -44000,13 +44006,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -44021,7 +44027,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -44041,7 +44047,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -44066,7 +44072,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -44487,7 +44493,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -44519,7 +44525,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -44552,7 +44558,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -44561,7 +44567,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -44611,7 +44617,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -44628,7 +44634,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -44640,7 +44646,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -44655,7 +44661,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -44682,7 +44688,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -44716,7 +44722,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -44729,7 +44735,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -44743,7 +44749,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -44759,7 +44765,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -44783,7 +44789,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -44803,7 +44809,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -44836,7 +44842,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -44861,7 +44867,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -45030,7 +45036,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -45107,7 +45113,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -45120,7 +45126,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -45160,7 +45166,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -45202,7 +45208,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -45466,7 +45472,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45518,14 +45524,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -45553,7 +45559,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -45570,7 +45576,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -45585,7 +45591,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -45596,7 +45602,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -45666,7 +45672,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -45688,7 +45694,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -45763,7 +45769,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -45787,7 +45793,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -45801,7 +45807,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -45822,7 +45828,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -45845,7 +45851,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -45876,7 +45882,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -45926,7 +45932,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -45949,7 +45955,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -46005,7 +46011,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -46034,7 +46040,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -46069,7 +46075,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -46098,7 +46104,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46120,7 +46126,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -46186,7 +46192,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46210,7 +46216,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46278,7 +46284,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -46291,7 +46297,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -46329,7 +46335,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -46337,7 +46343,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -46352,7 +46358,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -46362,13 +46368,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -46409,7 +46415,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -46418,7 +46424,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -46427,26 +46433,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -46459,7 +46465,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -46476,7 +46482,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -46498,7 +46504,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46566,7 +46572,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -46608,7 +46614,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46619,7 +46625,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -46630,7 +46636,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -46687,7 +46693,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -46747,7 +46753,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -46767,7 +46773,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -46775,7 +46781,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -46788,7 +46794,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -46815,7 +46821,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -46846,7 +46852,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -46857,11 +46863,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -46878,7 +46884,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -46908,7 +46914,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -46987,7 +46993,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -47008,7 +47014,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -47030,7 +47036,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -47051,7 +47057,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -47072,7 +47078,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -47091,7 +47097,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -47140,7 +47146,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47255,7 +47261,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -47384,7 +47390,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -47488,7 +47494,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -47537,7 +47543,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -47604,7 +47610,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -47614,7 +47620,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -47653,7 +47659,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -47690,7 +47696,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -47723,7 +47729,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -47763,7 +47769,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -47817,7 +47823,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -47851,7 +47857,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -47918,7 +47924,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -47999,7 +48005,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -48041,7 +48047,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -48086,7 +48092,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -48200,7 +48206,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -48375,7 +48381,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -48396,7 +48402,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -48466,7 +48472,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -48483,7 +48489,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -48564,14 +48570,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -48583,7 +48589,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -48598,7 +48604,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -48618,7 +48624,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -48650,7 +48656,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -48832,7 +48838,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -48850,7 +48856,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -48886,7 +48892,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -49047,7 +49053,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -49124,11 +49130,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -49145,7 +49151,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -49153,7 +49159,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -49172,7 +49178,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -49203,12 +49209,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -49216,7 +49222,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -49266,7 +49272,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -49304,7 +49310,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -49331,7 +49337,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -49383,7 +49389,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49417,7 +49423,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -49557,7 +49563,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -49570,7 +49576,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -49668,7 +49674,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -49748,7 +49754,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -50050,7 +50056,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -50078,7 +50084,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -50257,7 +50263,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -50331,7 +50337,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -50404,7 +50410,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -50441,7 +50447,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -50525,7 +50531,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -50778,7 +50784,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -51000,7 +51006,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -51051,13 +51057,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -51071,7 +51077,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -51190,7 +51196,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -51232,7 +51238,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -51246,7 +51252,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -51270,7 +51276,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -51317,7 +51323,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -51389,7 +51395,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -51517,7 +51523,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -51580,7 +51586,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -51628,13 +51634,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) @@ -51742,7 +51748,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -51769,7 +51775,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -51792,7 +51798,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -51874,7 +51880,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -51902,11 +51908,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -52015,7 +52021,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -52092,7 +52098,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -52122,7 +52128,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -52165,7 +52171,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -52228,7 +52234,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -52238,7 +52244,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -52254,7 +52260,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -52268,7 +52274,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -52372,7 +52378,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -52395,7 +52401,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -52417,7 +52423,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -52427,7 +52433,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -52499,7 +52505,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -52525,7 +52531,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -52544,7 +52550,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -52570,7 +52576,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -52633,12 +52639,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52665,13 +52671,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -52682,7 +52688,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52704,7 +52710,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -52731,7 +52737,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -52815,7 +52821,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -52827,7 +52833,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -52866,7 +52872,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -53255,7 +53261,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -53489,7 +53495,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -53500,14 +53506,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -53521,7 +53527,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -53537,7 +53543,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -53560,7 +53566,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -53574,7 +53580,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -53587,7 +53593,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -53611,7 +53617,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -53651,7 +53657,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -53659,7 +53665,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -53691,29 +53697,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -53753,7 +53759,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -53785,7 +53791,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -53795,7 +53801,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4798, 0) return SQLITE_ERROR @@ -53809,7 +53815,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -53869,14 +53875,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -53938,7 +53944,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -53953,7 +53959,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -53963,7 +53969,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -54201,7 +54207,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -54259,13 +54265,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -54279,7 +54285,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -54300,7 +54306,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -54315,7 +54321,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -54329,7 +54335,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -54423,7 +54429,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -54456,7 +54462,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -54476,7 +54482,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -54532,7 +54538,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -54550,7 +54556,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -54565,7 +54571,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -54590,7 +54596,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -54612,7 +54618,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -54634,7 +54640,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -54660,7 +54666,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -54690,7 +54696,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -54712,7 +54718,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -54731,7 +54737,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -54750,7 +54756,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -54760,7 +54766,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -54772,8 +54778,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -54784,7 +54790,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54793,7 +54799,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -54814,7 +54820,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54824,7 +54830,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -54842,7 +54848,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -54855,7 +54861,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -54876,7 +54882,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -54885,7 +54891,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -54900,7 +54906,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -54917,7 +54923,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54944,7 +54950,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -54998,7 +55004,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -55015,7 +55021,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -55023,13 +55029,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -55044,7 +55050,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -55052,7 +55058,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -55062,14 +55068,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -55089,7 +55096,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -55102,7 +55109,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -55119,7 +55126,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -55135,13 +55142,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -55157,7 +55164,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -55179,7 +55186,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) @@ -55200,7 +55207,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -55313,11 +55320,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -55332,7 +55339,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55357,7 +55364,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -55402,7 +55409,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -55418,7 +55425,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -55435,7 +55442,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -55446,7 +55453,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -55502,7 +55509,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -55648,7 +55655,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -55896,7 +55903,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -55919,7 +55926,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55987,7 +55994,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -56032,7 +56039,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -56042,7 +56049,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56063,7 +56070,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -56078,14 +56085,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -56101,7 +56108,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -56116,14 +56123,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -56134,14 +56141,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -56161,7 +56168,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -56185,12 +56192,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -56200,7 +56207,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -56213,7 +56220,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -56244,7 +56251,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -56297,7 +56304,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -56306,7 +56313,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -56329,26 +56336,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -56361,7 +56368,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -56409,7 +56416,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -56423,7 +56430,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -56455,7 +56462,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) @@ -56465,7 +56472,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -56481,7 +56488,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -56505,7 +56512,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -56516,7 +56523,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -56527,7 +56534,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -56538,7 +56545,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -56573,14 +56580,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) @@ -56592,7 +56599,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -56605,12 +56612,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } @@ -56633,7 +56640,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -56765,7 +56772,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -56796,7 +56803,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -56812,7 +56819,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -56856,23 +56863,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -56881,7 +56888,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -56896,7 +56903,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -56907,26 +56914,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -56987,7 +56994,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -57002,18 +57009,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -57029,7 +57036,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -57053,7 +57060,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -57070,7 +57077,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -57117,7 +57124,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -57133,7 +57140,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -57154,7 +57161,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -57168,11 +57175,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -57335,7 +57342,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4952, ts + 4954, ts + 4956, ts + 4961} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4952, ts + 4954, ts + 4956, ts + 4961} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -57343,7 +57350,7 @@ var encnames = [4]uintptr{ts + 4952, ts + 4954, ts + 4956, ts + 4961} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -57370,7 +57377,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -57389,7 +57396,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -57404,7 +57411,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -57412,7 +57419,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -57422,7 +57429,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -57466,7 +57473,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -57478,7 +57485,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -57577,7 +57584,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -57606,7 +57613,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -57695,7 +57702,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -57710,7 +57717,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -57727,7 +57734,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -57760,7 +57767,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -57869,11 +57876,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4966, ts + 4971, ts + 4978, ts + 4981, ts + 4984, ts + 4987, ts + 4990, ts + 4993, ts + 5001, ts + 5004, ts + 5011, ts + 5019, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -57907,7 +57914,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -57923,7 +57930,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -57947,7 +57954,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -57978,7 +57985,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -58003,7 +58010,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -58022,7 +58029,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -58250,7 +58257,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -58268,7 +58275,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -58311,7 +58318,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -58326,7 +58333,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -58349,7 +58356,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -58553,7 +58560,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -58563,7 +58570,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -58592,7 +58599,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58644,7 +58651,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -58668,7 +58675,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -58693,7 +58700,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -58714,7 +58721,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -58737,7 +58744,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -58750,7 +58757,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -58762,7 +58769,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -58780,7 +58787,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -58799,7 +58806,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -58874,10 +58881,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -58887,7 +58894,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -58936,7 +58943,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58987,7 +58994,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59014,7 +59021,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -59117,7 +59124,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -59131,7 +59138,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -59149,7 +59156,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59210,7 +59217,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -59253,7 +59260,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -59266,7 +59273,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -59306,7 +59313,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -59352,7 +59359,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -59446,7 +59453,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -59509,7 +59516,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -59551,7 +59558,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -59616,7 +59623,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -59651,7 +59658,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -59712,7 +59719,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -59723,7 +59730,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -59828,7 +59835,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -59852,7 +59859,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -59890,7 +59897,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -59944,7 +59951,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -60029,7 +60036,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -60041,7 +60048,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -60057,7 +60064,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -60071,7 +60078,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -60079,7 +60086,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } @@ -60099,7 +60106,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) @@ -60107,12 +60114,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -60122,7 +60129,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -60142,7 +60149,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -60158,7 +60165,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60189,7 +60196,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -60205,7 +60212,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -60222,7 +60229,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -60274,7 +60281,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -60300,7 +60307,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } @@ -60308,7 +60315,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5193, 0) return 1 @@ -60318,7 +60325,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5238, 0) return 1 @@ -60330,7 +60337,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60363,7 +60370,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -60373,7 +60380,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -60393,7 +60400,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -60415,7 +60422,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -60437,7 +60444,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -60460,27 +60467,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -60490,7 +60497,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -60503,26 +60510,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -60591,20 +60598,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -60630,7 +60637,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -60645,7 +60652,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -60659,7 +60666,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -60672,12 +60679,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -60686,39 +60693,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -60726,19 +60733,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -60750,32 +60757,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -60785,7 +60792,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -60799,7 +60806,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5278, int64(-1), @@ -60807,7 +60814,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -60817,7 +60824,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -60827,7 +60834,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -60854,7 +60861,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -61021,14 +61028,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -61068,7 +61075,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -61081,7 +61088,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -61098,14 +61105,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -61163,13 +61170,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -61178,7 +61185,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -61201,7 +61208,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -61221,7 +61228,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -61239,7 +61246,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -61262,7 +61269,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -61342,13 +61349,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -61358,7 +61365,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -61367,19 +61374,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -61414,7 +61421,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -61431,7 +61438,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -61441,43 +61448,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -61487,13 +61494,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -61513,7 +61520,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -61545,11 +61552,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -61558,44 +61565,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -61612,13 +61619,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -61626,7 +61633,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5311, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -61660,7 +61667,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -61686,16 +61693,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61706,11 +61713,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61721,7 +61728,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61731,7 +61738,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61744,11 +61751,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -61756,11 +61763,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -61809,7 +61816,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -61820,7 +61827,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -61837,7 +61844,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -61849,7 +61856,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -61860,19 +61867,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -61895,7 +61902,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -61916,7 +61923,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -61925,7 +61932,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } @@ -61934,7 +61941,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } @@ -61942,7 +61949,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -61951,7 +61958,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -61964,7 +61971,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61990,7 +61997,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -62005,7 +62012,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -62020,7 +62027,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -62033,7 +62040,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -62047,7 +62054,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -62139,7 +62146,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62158,7 +62165,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62170,7 +62177,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62182,7 +62189,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -62196,7 +62203,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -62337,7 +62344,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -62382,7 +62389,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -62605,7 +62612,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -62676,7 +62683,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -62698,7 +62705,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62744,7 +62751,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -62776,7 +62783,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -62788,7 +62795,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -62796,7 +62803,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62832,7 +62839,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -62846,13 +62853,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -62868,7 +62875,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -62892,7 +62899,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -62902,11 +62909,11 @@ var azTypes = [5]uintptr{ ts + 1105, ts + 1083, ts + 1528, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -65018,6 +65025,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -68042,7 +68053,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -68078,10 +68109,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -68089,13 +68120,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -68104,14 +68135,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -68119,12 +68150,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -68139,7 +68170,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -68157,13 +68188,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -68180,38 +68211,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -68221,27 +68252,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -68250,63 +68281,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -68314,55 +68345,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -68377,20 +68408,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -68400,15 +68431,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -68443,81 +68474,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -68525,45 +68556,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -68588,14 +68619,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -68603,30 +68634,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -68690,31 +68721,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -68743,13 +68774,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -68759,77 +68790,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -68838,79 +68869,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -68919,22 +68950,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -68943,37 +68974,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -68988,7 +69019,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -69001,13 +69032,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -69026,20 +69057,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -69060,17 +69091,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5478, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -69081,16 +69112,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) @@ -69098,14 +69129,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -69113,121 +69144,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5529, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5551, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -69240,36 +69246,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -69277,48 +69308,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -69339,18 +69370,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -69358,43 +69389,43 @@ __519: ts+5605, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -69410,7 +69441,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -69452,66 +69483,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -69519,16 +69550,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -69548,20 +69579,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -69608,37 +69639,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -69728,13 +69759,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -69743,11 +69774,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -69759,24 +69790,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -69788,32 +69819,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -69833,10 +69864,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -69855,10 +69886,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -69913,7 +69944,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -69921,11 +69952,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1527 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -69934,71 +69965,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -70017,19 +70048,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -70044,10 +70075,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -70071,10 +70102,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -70199,7 +70230,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -70209,10 +70240,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -70221,29 +70252,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -70254,53 +70285,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -70325,97 +70356,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -70473,10 +70504,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -70485,60 +70516,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -70561,18 +70592,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -70584,10 +70615,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -70682,10 +70713,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; // Fall through into OP_NotFound /* no break */ @@ -70700,15 +70731,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -70718,62 +70749,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -70781,31 +70812,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -70859,7 +70890,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -70869,14 +70900,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; // Fall through into OP_NotExists /* no break */ @@ -70899,25 +70930,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -70975,89 +71006,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -71066,36 +71097,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -71150,56 +71181,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -71211,13 +71242,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -71228,13 +71259,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -71247,7 +71278,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -71273,10 +71304,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -71326,28 +71357,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -71359,13 +71390,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -71374,28 +71405,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -71435,16 +71466,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -71467,10 +71498,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -71520,29 +71551,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -71563,20 +71594,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -71587,36 +71618,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -71625,6 +71656,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -71632,11 +71667,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -71669,39 +71704,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -71717,29 +71752,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -71786,32 +71821,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -71894,18 +71929,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -71945,10 +71980,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -71958,10 +71993,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -71978,10 +72013,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -72004,17 +72039,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -72045,31 +72080,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5820) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5820) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -72116,25 +72151,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -72146,17 +72181,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -72170,16 +72205,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -72233,15 +72268,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -72255,19 +72290,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -72275,22 +72310,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -72326,13 +72361,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -72340,21 +72375,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -72380,23 +72415,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -72412,21 +72447,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -72447,10 +72482,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -72464,10 +72499,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -72488,15 +72523,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5837 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -72508,11 +72543,11 @@ __751: ts+5851, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -72522,38 +72557,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -72566,10 +72601,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -72641,22 +72676,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -72674,15 +72709,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -72701,18 +72736,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -72747,35 +72782,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -72810,37 +72845,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5894, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -72848,7 +72883,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -72857,10 +72892,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -72868,10 +72903,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -72893,24 +72928,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -72961,21 +72996,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -72992,25 +73027,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -73026,35 +73061,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -73071,11 +73106,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -73108,7 +73143,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -73118,10 +73153,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -73136,16 +73171,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -73158,17 +73193,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -73215,10 +73250,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -73248,75 +73283,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -73352,32 +73387,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -73399,32 +73434,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -73447,17 +73482,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -73467,18 +73502,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -73490,11 +73525,11 @@ __830: return ts + 5988 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -73502,29 +73537,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -73532,18 +73567,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -73553,10 +73588,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -73578,10 +73613,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -73597,17 +73632,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -73629,13 +73664,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -73678,25 +73713,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+5995, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -73712,16 +73747,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -73741,17 +73776,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -73765,10 +73800,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -73783,11 +73818,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -73795,10 +73830,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -73807,18 +73842,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -73836,10 +73871,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -73884,27 +73919,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -73912,10 +73947,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -73939,11 +73974,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -73952,40 +73987,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -73999,10 +74034,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -74017,21 +74052,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -74049,27 +74084,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -74103,43 +74138,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -74148,41 +74183,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -74207,16 +74242,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -74276,24 +74311,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -74304,38 +74339,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -74374,16 +74409,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -74433,67 +74468,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6024, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -74538,25 +74573,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3607, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -74565,46 +74600,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -74635,11 +74670,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6062, ts + 6071, ts + 6078, - ts + 6084} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6084} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -74670,7 +74705,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -74691,7 +74726,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -74708,7 +74743,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -74784,7 +74819,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -75105,7 +75140,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -75114,11 +75149,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -75137,14 +75172,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75203,14 +75238,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -75220,7 +75255,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -75236,7 +75271,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -75245,7 +75280,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75432,7 +75467,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -75583,7 +75618,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -75597,10 +75632,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -75611,18 +75646,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -75635,26 +75670,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -75664,10 +75699,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -75698,11 +75733,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -75719,7 +75754,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75823,7 +75858,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -75863,7 +75898,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -75878,7 +75913,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -75919,7 +75954,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75965,7 +76000,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75988,7 +76023,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -76008,7 +76043,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -76020,7 +76055,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76070,7 +76105,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -76130,7 +76165,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -76149,7 +76184,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -76245,7 +76280,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -76256,7 +76291,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -76276,7 +76311,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76295,14 +76330,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -76328,7 +76363,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -76353,7 +76388,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -76365,7 +76400,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -76382,7 +76417,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -76411,7 +76446,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -76430,7 +76465,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -76450,7 +76485,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -76474,7 +76509,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -76487,7 +76522,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -76526,7 +76561,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -76544,7 +76579,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -76601,7 +76636,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -76616,7 +76651,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -76645,7 +76680,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -76661,7 +76696,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -76684,7 +76719,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -76739,7 +76774,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76815,7 +76850,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -76826,7 +76861,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -76890,7 +76925,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77006,7 +77041,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -77052,7 +77087,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -77060,7 +77095,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -77083,7 +77118,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -77117,7 +77152,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -77144,7 +77179,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -77152,7 +77187,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77212,7 +77247,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -77282,7 +77317,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -77339,7 +77374,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -77355,7 +77390,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -77382,7 +77417,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77419,7 +77454,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -77435,7 +77470,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77486,7 +77521,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -77567,7 +77602,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77642,7 +77677,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -77687,7 +77722,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77729,7 +77764,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -77748,7 +77783,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77783,7 +77818,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77875,7 +77910,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -77922,23 +77957,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -77985,7 +78020,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -77995,7 +78030,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -78033,7 +78068,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -78099,7 +78134,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -78127,7 +78162,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -78137,14 +78172,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -78159,7 +78194,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -78171,7 +78206,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -78199,20 +78234,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -78241,7 +78276,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -78289,7 +78324,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -78331,7 +78366,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -78340,7 +78375,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -78369,7 +78404,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -78379,7 +78414,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -78421,7 +78456,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -78470,7 +78505,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -78501,13 +78536,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -78519,7 +78554,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -78527,7 +78562,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -78562,14 +78597,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -78602,7 +78637,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -78648,7 +78683,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -78665,7 +78700,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { @@ -78691,7 +78726,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -78710,7 +78745,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -78760,7 +78795,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -79475,7 +79510,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -79524,7 +79559,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -79546,7 +79581,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79572,7 +79607,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -80054,7 +80089,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -80089,7 +80124,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -80133,7 +80168,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -80156,7 +80191,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -80293,7 +80328,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80339,7 +80374,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -80350,7 +80385,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -80382,7 +80417,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -80459,7 +80494,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -80758,7 +80793,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -80799,7 +80834,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -80856,7 +80891,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -80890,7 +80925,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -80926,7 +80961,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -80947,7 +80982,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -80990,7 +81025,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -81002,7 +81037,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81013,7 +81048,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -81024,7 +81059,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -81049,7 +81084,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -81121,7 +81156,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -81131,7 +81166,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -81140,7 +81175,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -81165,7 +81200,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -81183,7 +81218,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -81196,7 +81231,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -81212,7 +81247,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -81235,7 +81270,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -81245,7 +81280,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -81272,7 +81307,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -81280,7 +81315,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -81310,7 +81345,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -81344,7 +81379,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -81392,7 +81427,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -81416,7 +81451,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -81445,7 +81480,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81533,7 +81568,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81555,7 +81590,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -81563,7 +81598,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -81572,7 +81607,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -81592,7 +81627,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81619,7 +81654,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -81629,7 +81664,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81656,7 +81691,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81704,7 +81739,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81719,7 +81754,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -81742,7 +81777,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -81760,7 +81795,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -81788,7 +81823,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81840,7 +81875,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -81859,7 +81894,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81896,7 +81931,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81928,7 +81963,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81996,7 +82031,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -82026,7 +82061,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -82040,13 +82075,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -82058,7 +82093,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -82100,7 +82135,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -82122,7 +82157,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -82141,7 +82176,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -82158,7 +82193,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82268,7 +82303,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -82290,7 +82325,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -82300,14 +82335,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82340,7 +82375,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -82348,7 +82383,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -82417,7 +82452,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -82470,7 +82505,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -82499,7 +82534,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82565,9 +82600,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -82584,7 +82619,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -82603,7 +82638,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -82626,7 +82661,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82723,7 +82758,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -82750,7 +82785,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -82776,7 +82811,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -82791,7 +82826,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82803,7 +82838,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -82815,7 +82850,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -82823,7 +82858,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -82840,7 +82875,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -82852,7 +82887,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6639) == 0 { return U32(EP_IsTrue) } @@ -82865,7 +82900,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -82879,7 +82914,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -82896,7 +82931,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -82942,7 +82977,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -83020,7 +83055,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -83044,7 +83079,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -83059,7 +83094,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -83067,12 +83102,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -83114,7 +83149,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -83150,7 +83185,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -83159,7 +83194,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83211,7 +83246,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -83250,7 +83285,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -83303,7 +83338,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7585) == 0 { return 1 } @@ -83321,7 +83356,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -83379,7 +83414,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -83391,7 +83426,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -83480,7 +83515,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83698,7 +83733,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -83730,7 +83765,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83749,7 +83784,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -83777,7 +83812,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -83972,7 +84007,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -84095,7 +84130,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -84132,7 +84167,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84513,7 +84548,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84533,7 +84568,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -84579,7 +84614,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -84594,7 +84629,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -84613,7 +84648,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84664,7 +84699,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -84678,14 +84713,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -84704,7 +84739,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -84728,7 +84763,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -84736,7 +84771,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -84861,7 +84896,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -85932,7 +85967,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8004)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8004)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -85949,7 +85984,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8004)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -86018,7 +86053,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -86043,7 +86078,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -86064,7 +86099,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -86077,7 +86112,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -86103,7 +86138,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -86185,7 +86220,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -86248,7 +86283,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86480,7 +86515,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86730,7 +86765,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -86750,7 +86785,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86804,7 +86839,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -86908,7 +86943,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -86935,7 +86970,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -86946,7 +86981,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -87074,7 +87109,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -87097,7 +87132,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -87207,7 +87242,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -87241,7 +87276,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -87259,7 +87294,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -87284,7 +87319,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -87322,7 +87357,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -87338,7 +87373,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -87378,7 +87413,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -87427,7 +87462,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -87460,7 +87495,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -87473,7 +87508,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -87490,7 +87525,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -87508,7 +87543,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -87699,7 +87734,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -87725,7 +87760,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -87750,7 +87785,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -87759,7 +87794,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -87769,7 +87804,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -87787,7 +87822,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -87805,7 +87840,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -87839,7 +87874,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87858,7 +87893,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -87882,7 +87917,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -87898,7 +87933,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -87911,7 +87946,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -88096,7 +88131,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -88111,7 +88146,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -88257,7 +88292,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88374,7 +88409,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -88402,7 +88437,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -88531,7 +88566,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -88543,7 +88578,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -88562,7 +88597,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -88574,7 +88609,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -88585,7 +88620,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -88626,7 +88661,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -88636,7 +88671,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -88668,7 +88703,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -88690,7 +88725,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -88713,7 +88748,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -88729,7 +88764,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -88752,7 +88787,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -88768,7 +88803,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -88790,7 +88825,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -88812,7 +88847,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -88836,7 +88871,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -88853,7 +88888,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -88867,34 +88902,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10800, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -88908,7 +88941,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -88928,7 +88961,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10800, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10808, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -88978,7 +89011,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10806, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10814, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10798 /* " " */ @@ -89014,7 +89047,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -89112,7 +89145,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -89141,7 +89174,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -89180,7 +89213,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -89523,7 +89556,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -89534,7 +89567,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -89574,7 +89607,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -89708,7 +89741,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -89741,7 +89774,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -89855,7 +89888,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -89927,7 +89960,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -89967,7 +90000,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -89993,7 +90026,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10811, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10819, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -90013,7 +90046,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -90091,10 +90124,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10818, + Xsqlite3ErrorMsg(tls, pParse, ts+10826, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10846 /* "PRIMARY KEY" */ + return ts + 10854 /* "PRIMARY KEY" */ } return ts + 6071 /* "UNIQUE" */ }(), @@ -90107,7 +90140,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10858, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10866, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -90127,11 +90160,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10906, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10914, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11027, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11035, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -90246,16 +90279,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11045}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11066}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11086}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11105}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11124}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11053}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11074}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11094}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11132}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -90411,7 +90444,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -90452,7 +90485,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11147, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11155, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -90464,10 +90497,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11170, + ts+11178, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11200, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11208, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -90488,10 +90521,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11218 /* "sqlite_stat1" */, FzCols: ts + 11231 /* "tbl,idx,stat" */}, - {FzName: ts + 11244 /* "sqlite_stat4" */, FzCols: ts + 11257 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11285 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11226 /* "sqlite_stat1" */, FzCols: ts + 11239 /* "tbl,idx,stat" */}, + {FzName: ts + 11252 /* "sqlite_stat4" */, FzCols: ts + 11265 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11293 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -90518,14 +90551,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -90536,12 +90569,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -90550,7 +90583,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -90565,7 +90598,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -90575,7 +90608,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -90590,7 +90623,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -90625,7 +90658,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -90720,7 +90753,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11298} /* sqlite3.c:111534:22 */ + FzName: ts + 11306} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -90731,7 +90764,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -90753,7 +90786,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -90771,7 +90804,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -90914,7 +90947,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -90966,7 +90999,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -91038,7 +91071,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11308} /* sqlite3.c:111824:22 */ + FzName: ts + 11316} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -91057,7 +91090,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -91091,7 +91124,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11318, + Xsqlite3_str_appendf(tls, bp+24, ts+11326, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -91101,7 +91134,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11323, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11331, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -91144,7 +91177,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11329, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11337, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -91158,9 +91191,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11335} /* sqlite3.c:111958:22 */ + FzName: ts + 11343} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -91169,7 +91202,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -91205,7 +91238,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11344, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11352, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -91223,7 +91256,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11218, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11226, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -91456,7 +91489,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11354, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11362, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -91518,7 +91551,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11354, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11362, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -91529,7 +91562,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -91537,7 +91570,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -91562,7 +91595,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -91571,9 +91604,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11358) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11366) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11362) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11370) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -91589,7 +91622,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -91652,16 +91685,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -91690,15 +91723,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11366, z) == 0 { + if Xsqlite3_strglob(tls, ts+11374, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11377, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11385, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11387, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11395, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -91720,7 +91753,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -91782,7 +91815,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -91799,7 +91832,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -91857,7 +91890,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -91878,7 +91911,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -92014,15 +92047,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11244, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11252, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11399, - ts+11453, + ts+11407, + ts+11461, zDb) } return rc @@ -92046,7 +92079,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -92074,10 +92107,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11218, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11226, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11505, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11513, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -92153,7 +92186,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -92167,7 +92200,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6325, zName) == 0) } @@ -92185,7 +92218,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -92252,7 +92285,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11546, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11554, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -92265,7 +92298,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11549, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11557, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -92279,7 +92312,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11586, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11594, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -92350,7 +92383,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11616, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11624, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -92367,7 +92400,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11645, 0) + ts+11653, 0) rc = SQLITE_ERROR __23: ; @@ -92443,7 +92476,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11713, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11721, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -92478,7 +92511,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -92531,14 +92564,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11741, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11749, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11762, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11770, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -92546,7 +92579,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11788, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11796, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -92583,7 +92616,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -92662,7 +92695,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -92670,12 +92703,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11810} /* sqlite3.c:113383:24 */ + FzName: ts + 11818} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -92683,10 +92716,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11824} /* sqlite3.c:113403:24 */ + FzName: ts + 11832} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92698,7 +92731,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11838, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11846, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -92706,7 +92739,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -92731,7 +92764,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11862, + ts+11870, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -92767,7 +92800,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -92803,7 +92836,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -92818,15 +92851,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -92916,7 +92949,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -92929,8 +92962,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11908, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11916, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -92941,7 +92974,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -92956,11 +92989,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11931, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11939, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11937, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11945, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11943, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11951, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -92975,7 +93008,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -93024,7 +93057,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -93046,7 +93079,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11970, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11978, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -93058,7 +93091,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -93067,7 +93100,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -93082,7 +93115,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -93116,7 +93149,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -93128,7 +93161,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -93152,7 +93185,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -93305,7 +93338,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -93356,7 +93389,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -93380,14 +93413,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8012, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11985+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12004+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11993+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12012+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5837+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12018) + ts+12026) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12004+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12012+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+5837) } @@ -93413,11 +93446,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8012, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12004+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12012+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5837) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11985+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11993+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12018) + ts+12026) } } } @@ -93432,7 +93465,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -93453,7 +93486,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12037, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12045, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -93472,9 +93505,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12045 /* "no such view" */ + zMsg = ts + 12053 /* "no such view" */ } else { - zMsg = ts + 12058 /* "no such table" */ + zMsg = ts + 12066 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6520, libc.VaList(bp, zMsg, zDbase, zName)) @@ -93495,7 +93528,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -93509,13 +93542,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8012, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5837+7) == 0 { - return ts + 12004 /* "sqlite_schema" */ + return ts + 12012 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12018+7) == 0 { - return ts + 11985 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12026+7) == 0 { + return ts + 11993 /* "sqlite_temp_sche..." */ } } return zName @@ -93531,7 +93564,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -93558,7 +93591,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -93574,7 +93607,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -93606,7 +93639,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -93632,7 +93665,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -93653,7 +93686,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -93675,14 +93708,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -93705,7 +93738,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -93722,7 +93755,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -93741,7 +93774,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -93760,7 +93793,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -93810,7 +93843,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -93847,7 +93880,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -93860,7 +93893,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -93882,7 +93915,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -93895,7 +93928,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5837) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -93908,7 +93941,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -93944,7 +93977,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -93968,7 +94001,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93977,13 +94010,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12072, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12080, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12089, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12097, libc.VaList(bp, pName1)) return -1 } } else { @@ -93995,7 +94028,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -94009,7 +94042,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94030,7 +94063,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8012, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12109, + Xsqlite3ErrorMsg(tls, pParse, ts+12117, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -94040,7 +94073,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -94051,7 +94084,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -94071,7 +94104,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -94118,7 +94151,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -94148,7 +94181,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -94171,7 +94204,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -94199,7 +94232,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 /* "sqlite_temp_mast..." */ + return ts + 12026 /* "sqlite_temp_mast..." */ } return ts + 5837 /* "sqlite_master" */ }()) @@ -94219,7 +94252,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12151, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12159, 0) return __4: ; @@ -94266,7 +94299,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }(), uintptr(0), zDb) != 0) { @@ -94306,7 +94339,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12192, + Xsqlite3ErrorMsg(tls, pParse, ts+12200, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10369 /* "view" */ @@ -94326,7 +94359,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12213, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12221, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -94429,8 +94462,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -94440,10 +94473,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12248, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12256, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -94462,12 +94495,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12265, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12273, 0) } else { } @@ -94488,7 +94521,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12248 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12256 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -94500,7 +94533,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12248, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12256, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -94512,7 +94545,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -94534,7 +94567,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12299, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12307, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -94546,13 +94579,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12322, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12330, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12329, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12337, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -94592,7 +94625,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12339, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12347, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -94631,7 +94664,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -94678,7 +94711,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -94752,7 +94785,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -94764,11 +94797,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12365, + Xsqlite3ErrorMsg(tls, pParse, ts+12373, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12410, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12418, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -94805,7 +94838,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -94814,12 +94847,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12451, 0) + ts+12459, 0) } } @@ -94839,7 +94872,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94864,7 +94897,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12503, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12511, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -94953,7 +94986,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12544, 0) + ts+12552, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -94970,7 +95003,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -95000,7 +95033,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -95035,7 +95068,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95055,7 +95088,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12600, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12608, 0) goto generated_done __2: ; @@ -95068,13 +95101,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12643, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12651, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12651, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12659, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -95107,7 +95140,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12658, + Xsqlite3ErrorMsg(tls, pParse, ts+12666, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -95130,7 +95163,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -95144,7 +95177,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -95179,7 +95212,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -95215,7 +95248,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -95250,12 +95283,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1527 /* "" */ - zSep2 = ts + 12689 /* "," */ + zSep2 = ts + 12697 /* "," */ zEnd = ts + 4901 /* ")" */ } else { - zSep = ts + 12691 /* "\n " */ - zSep2 = ts + 12695 /* ",\n " */ - zEnd = ts + 12700 /* "\n)" */ + zSep = ts + 12699 /* "\n " */ + zSep2 = ts + 12703 /* ",\n " */ + zEnd = ts + 12708 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -95263,7 +95296,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12703, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12711, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -95303,15 +95336,15 @@ __6: var azType1 = [5]uintptr{ ts + 1527, - ts + 12717, - ts + 12723, - ts + 12728, - ts + 12733, -} /* sqlite3.c:115999:23 */ + ts + 12725, + ts + 12731, + ts + 12736, + ts + 12741, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -95340,7 +95373,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -95369,7 +95402,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -95389,7 +95422,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -95409,7 +95442,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -95442,7 +95475,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -95481,7 +95514,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -95644,7 +95677,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -95677,7 +95710,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -95721,7 +95754,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -95758,7 +95791,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -95814,10 +95847,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12739, + ts+12747, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1527))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12772, + Xsqlite3ErrorMsg(tls, pParse, ts+12780, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -95837,11 +95870,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12799, 0) + ts+12807, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12849, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12857, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -95885,7 +95918,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12881, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12889, 0) return } } @@ -95919,11 +95952,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8754 /* "table" */ - zType2 = ts + 12925 /* "TABLE" */ + zType2 = ts + 12933 /* "TABLE" */ } else { // A view zType = ts + 10369 /* "view" */ - zType2 = ts + 12931 /* "VIEW" */ + zType2 = ts + 12939 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -95948,6 +95981,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -96004,7 +96042,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12936, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12944, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -96012,7 +96050,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12951, + ts+12959, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -96030,14 +96068,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13049, + ts+13057, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13091, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13099, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -96074,7 +96112,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -96095,7 +96133,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13125, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13133, 0) goto create_view_fail __1: ; @@ -96192,7 +96230,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96232,7 +96270,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13161, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13169, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -96307,7 +96345,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -96337,7 +96375,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -96363,14 +96401,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13191, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13199, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -96384,7 +96422,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13206, + ts+13214, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -96393,7 +96431,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -96439,7 +96477,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -96448,17 +96486,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13273, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13281, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11170, + ts+11178, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -96491,7 +96529,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13287, + ts+13295, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -96503,7 +96541,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13332, + ts+13340, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -96522,7 +96560,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -96533,7 +96571,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8012, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3230, 4) == 0 { return 0 @@ -96554,7 +96592,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -96622,7 +96660,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }() @@ -96684,7 +96722,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13399, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13407, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -96694,14 +96732,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13427, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13435, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13461, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13469, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -96716,7 +96754,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11362, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11370, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -96742,7 +96780,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -96781,7 +96819,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13493, + ts+13501, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -96794,7 +96832,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13556, 0) + ts+13564, 0) goto fk_end goto __7 __6: @@ -96879,7 +96917,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13650, + ts+13658, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -96965,7 +97003,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -96990,7 +97028,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -97102,7 +97140,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -97127,7 +97165,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97136,12 +97174,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13696, + Xsqlite3ErrorMsg(tls, pParse, ts+13704, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13724 /* "FIRST" */ + return ts + 13732 /* "FIRST" */ } - return ts + 13730 /* "LAST" */ + return ts + 13738 /* "LAST" */ }())) return 1 } @@ -97160,7 +97198,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -97300,7 +97338,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13735, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13743, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -97321,7 +97359,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13741, + ts+13749, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -97353,21 +97391,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13791, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13819, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13827, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13844, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13852, 0) goto exit_create_index __17: ; @@ -97394,7 +97432,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13735, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13743, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -97409,7 +97447,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13878, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13886, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -97421,7 +97459,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13912, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13920, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -97450,7 +97488,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13936, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13944, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -97479,7 +97517,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }(), uintptr(0), zDb) != 0) { @@ -97525,7 +97563,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13735) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13743) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -97643,7 +97681,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13959, 0) + ts+13967, 0) goto exit_create_index __56: ; @@ -97873,7 +97911,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14020, libc.VaList(bp+48, 0)) + ts+14028, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -97929,8 +97967,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14062, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14070, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -97987,12 +98025,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14079, + zStmt = Xsqlite3MPrintf(tls, db, ts+14087, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1527 /* "" */ } - return ts + 14099 /* " UNIQUE" */ + return ts + 14107 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -98004,7 +98042,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14107, + ts+14115, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -98020,7 +98058,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14166, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14174, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -98116,7 +98154,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -98160,11 +98198,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -98199,7 +98237,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14193, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14201, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -98214,7 +98252,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14211, libc.VaList(bp+8, 0)) + ts+14219, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -98225,7 +98263,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }() @@ -98255,9 +98293,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14284, + ts+14292, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11358, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11366, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -98283,7 +98321,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -98310,7 +98348,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98341,7 +98379,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -98355,7 +98393,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -98393,7 +98431,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98408,7 +98446,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14344, + Xsqlite3ErrorMsg(tls, pParse, ts+14352, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -98475,7 +98513,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -98514,7 +98552,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -98546,7 +98584,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -98609,7 +98647,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98620,12 +98658,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14380, + Xsqlite3ErrorMsg(tls, pParse, ts+14388, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14416 /* "ON" */ + return ts + 14424 /* "ON" */ } - return ts + 14419 /* "USING" */ + return ts + 14427 /* "USING" */ }())) goto append_from_error __1: @@ -98673,7 +98711,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -98695,7 +98733,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -98712,7 +98750,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -98736,7 +98774,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -98747,14 +98785,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14425, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14433, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -98782,7 +98820,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -98790,9 +98828,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14431 + return ts + 14439 } - return ts + 14440 + return ts + 14448 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -98804,7 +98842,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -98817,11 +98855,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14425, ts + 14447, ts + 14431} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14433, ts + 14455, ts + 14439} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98833,7 +98871,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14455, 0) + ts+14463, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -98847,13 +98885,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11931, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11939, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14539, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14547, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -99022,7 +99060,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -99037,7 +99075,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -99054,7 +99092,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -99096,7 +99134,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99156,14 +99194,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14548, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14556, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -99209,7 +99247,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -99229,7 +99267,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -99237,7 +99275,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -99247,7 +99285,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99266,7 +99304,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14594, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14602, libc.VaList(bp, zName)) } } } @@ -99290,7 +99328,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -99320,7 +99358,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -99351,7 +99389,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -99366,7 +99404,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -99377,7 +99415,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -99401,7 +99439,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -99446,7 +99484,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -99462,7 +99500,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -99482,7 +99520,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99504,7 +99542,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14624, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14632, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -99528,7 +99566,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -99569,7 +99607,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -99605,7 +99643,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -99617,7 +99655,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -99655,7 +99693,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -99735,7 +99773,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -99770,7 +99808,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -99817,7 +99855,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -99835,7 +99873,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -99856,7 +99894,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -99875,16 +99913,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14655, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14684, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -99893,7 +99931,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -99925,7 +99963,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -100476,7 +100514,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14722) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14730) __61: ; @@ -100531,7 +100569,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -100621,7 +100659,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11218) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11226) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -100668,7 +100706,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -100757,7 +100795,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -100813,7 +100851,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -100841,7 +100879,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -100851,14 +100889,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -100888,7 +100926,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -100899,18 +100937,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6135, ts + 6130, ts + 7885, ts + 7880, ts + 6125} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6135, ts + 6130, ts + 7885, ts + 7880, ts + 6125} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -100959,7 +100997,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -100971,7 +101009,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14735, -1) + Xsqlite3_result_error(tls, context, ts+14743, -1) return } iVal = -iVal @@ -101013,7 +101051,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -101128,7 +101166,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -101165,7 +101203,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -101273,7 +101311,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -101311,7 +101349,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14752, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14760, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -101327,7 +101365,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -101344,7 +101382,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -101365,7 +101403,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -101394,7 +101432,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101418,7 +101456,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -101436,7 +101474,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101451,7 +101489,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101460,7 +101498,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101475,20 +101513,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -101528,7 +101566,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -101714,13 +101752,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -101738,7 +101776,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -101761,7 +101799,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14757, -1) + Xsqlite3_result_error(tls, context, ts+14765, -1) return } if argc == 3 { @@ -101773,7 +101811,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14790, -1) + ts+14798, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -101801,7 +101839,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -101811,7 +101849,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -101822,7 +101860,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -101833,7 +101871,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101845,7 +101883,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -101860,7 +101898,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -101875,11 +101913,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -101901,7 +101939,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14835, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14843, libc.VaList(bp+8, r1)) } } break @@ -101938,7 +101976,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14842, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14850, libc.VaList(bp+24, zArg)) break } @@ -101960,7 +101998,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -101983,7 +102021,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101997,7 +102035,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -102035,7 +102073,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -102073,7 +102111,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -102092,7 +102130,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -102181,7 +102219,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -102284,8 +102322,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10798 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10798 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -102294,7 +102332,7 @@ var azOne = [1]uintptr{uintptr(ts + 10798 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102332,7 +102370,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14845, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14853, 4, uintptr(0)) } } @@ -102345,10 +102383,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102360,7 +102398,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11970, -1) + Xsqlite3_result_error(tls, context, ts+11978, -1) return } @@ -102384,11 +102422,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -102398,7 +102436,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -102420,7 +102458,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -102443,12 +102481,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14735, -1) + Xsqlite3_result_error(tls, context, ts+14743, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -102457,7 +102495,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -102465,7 +102503,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -102479,14 +102517,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -102500,7 +102538,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -102511,7 +102549,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -102521,7 +102559,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -102559,7 +102597,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -102572,11 +102610,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -102592,9 +102630,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -102659,7 +102697,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -102701,7 +102739,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -102709,7 +102747,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -102727,8 +102765,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14850, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14858, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -102738,7 +102776,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -102748,14 +102786,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14856, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14864, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14856, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14864, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14856, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14856, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14864, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14864, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -102773,7 +102811,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -102829,7 +102867,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -102858,11 +102896,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -102872,7 +102910,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -102929,18 +102967,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -102961,7 +102999,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -102987,13 +103025,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -103021,7 +103059,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -103032,109 +103070,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14861}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14881}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14894}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14912}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14869}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14889}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14902}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14920}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14921}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14929}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14929}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14944}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14970}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 14995}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15004}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15015}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15022}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15036}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15036}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15042}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15042}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15048}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15048}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15053}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15053}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15053}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15057}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15057}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15057}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15061}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15068}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15076}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15116}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15120}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15120}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15132}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15138}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15142}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15149}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15156}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15167}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15174}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15189}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15206}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15217}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15223}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15241}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14929}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14937}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14937}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14952}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14978}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15003}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15012}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15023}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15044}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15044}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15050}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15050}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15056}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15056}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15061}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15061}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15061}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15065}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15065}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15065}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15069}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15076}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15084}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15097}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15104}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15119}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15124}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15128}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15128}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15134}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15140}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15146}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15150}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15175}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15182}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15197}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15225}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15231}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15249}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15263}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15280}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15280}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15297}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15301}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15307}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15311}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15311}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15317}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15317}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15279}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15288}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15305}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15309}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15315}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15319}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15319}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15325}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15330}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14856}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14856}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15335}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15335}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15344}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15349}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15338}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14864}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14864}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15343}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15343}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15352}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15357}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15363}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15369}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15372}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15376}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15382}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15387}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15391}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15401}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15405}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15410}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15415}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15426}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15430}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15365}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15371}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15377}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15380}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15384}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15390}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15380}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15399}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15403}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15409}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15413}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15418}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15423}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15428}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15434}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15438}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15443}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15448}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15453}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15459}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15465}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15471}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15476}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15442}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15446}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15451}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15456}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15461}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15473}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15479}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15484}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15492}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15495}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15335}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15500}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15492}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15500}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15503}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15343}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15508}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -103309,7 +103347,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -103420,7 +103458,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15504, + ts+15512, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -103455,7 +103493,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -103585,7 +103623,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -103612,7 +103650,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -103653,7 +103691,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -103777,7 +103815,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -103787,7 +103825,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -103801,7 +103839,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -103834,7 +103872,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -103897,7 +103935,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -103921,7 +103959,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -103945,7 +103983,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -103980,7 +104018,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -104182,7 +104220,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -104241,7 +104279,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -104309,7 +104347,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -104512,7 +104550,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -104533,7 +104571,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -104593,7 +104631,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -104635,7 +104673,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -104714,7 +104752,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -104772,7 +104810,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -104808,7 +104846,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -104821,7 +104859,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -104934,7 +104972,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -104988,7 +105026,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -105028,7 +105066,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -105042,7 +105080,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -105050,7 +105088,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -105061,7 +105099,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -105092,16 +105130,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -105202,7 +105240,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -105384,7 +105422,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -105474,7 +105515,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15549, + ts+15557, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -105499,7 +105540,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15590, + Xsqlite3ErrorMsg(tls, pParse, ts+15598, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -105671,7 +105712,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15622, + ts+15630, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -105681,7 +105722,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15674, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -105737,7 +105778,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15699, + Xsqlite3ErrorMsg(tls, pParse, ts+15707, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -105745,7 +105786,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15745, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15753, 0) goto insert_cleanup __57: ; @@ -106229,7 +106270,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15766) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15774) __123: ; @@ -106253,7 +106294,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -106280,7 +106321,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -106314,7 +106355,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -106325,7 +106366,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -106333,12 +106374,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -106351,7 +106392,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -106457,7 +106498,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -106575,7 +106616,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11931, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11939, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -107320,7 +107361,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -107337,7 +107378,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -107440,7 +107481,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -107518,7 +107559,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -107576,7 +107617,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -107597,18 +107638,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -107962,7 +107997,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -107983,7 +108018,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -108172,7 +108207,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -108506,7 +108541,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -108520,7 +108555,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -108564,7 +108599,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11970, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11978, 0) __3: ; return SQLITE_ERROR @@ -108574,7 +108609,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15780 /* "sqlite3_extensio..." */ + zEntry = ts + 15788 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -108594,7 +108629,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11931, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11939, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -108640,7 +108675,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15803, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15811, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -108654,7 +108689,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15812, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15820, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -108678,7 +108713,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15816, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15824, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -108696,7 +108731,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15822, libc.VaList(bp+16, zEntry, zFile)) + ts+15830, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -108723,7 +108758,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15865, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15873, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -108763,7 +108798,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15897, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15905, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -108773,10 +108808,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15934, -} /* sqlite3.c:129386:21 */ + ts + 15942, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -108787,7 +108822,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -108798,7 +108833,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -108818,15 +108853,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -108836,7 +108871,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -108877,7 +108912,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -108896,7 +108931,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -108911,7 +108946,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -108942,7 +108977,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15937, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15945, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -108988,67 +109023,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5001, - ts + 15976, + ts + 15984, ts + 8754, - ts + 15980, - ts + 15985, ts + 15988, - ts + 15998, - ts + 16008, - ts + 16014, - ts + 16018, - ts + 16023, - ts + 16028, + ts + 15993, + ts + 15996, + ts + 16006, + ts + 16016, + ts + 16022, + ts + 16026, + ts + 16031, ts + 16036, - ts + 16047, - ts + 16050, + ts + 16044, + ts + 16055, + ts + 16058, - ts + 16057, - ts + 16018, - ts + 16023, - ts + 16064, - ts + 16069, + ts + 16065, + ts + 16026, + ts + 16031, ts + 16072, - ts + 16079, - ts + 16014, - ts + 16018, - ts + 16085, - ts + 16090, - ts + 16095, - ts + 16018, - ts + 16099, - ts + 16023, + ts + 16077, + ts + 16080, + ts + 16087, + ts + 16022, + ts + 16026, + ts + 16093, + ts + 16098, + ts + 16103, + ts + 16026, ts + 16107, - ts + 16111, - ts + 16116, - ts + 11362, - ts + 11358, - ts + 16122, - ts + 16127, - ts + 16132, - ts + 15976, - ts + 16018, - ts + 16137, - ts + 16144, - ts + 16151, - ts + 8754, + ts + 16031, + ts + 16115, + ts + 16119, + ts + 16124, + ts + 11370, + ts + 11366, + ts + 16130, + ts + 16135, + ts + 16140, + ts + 15984, + ts + 16026, + ts + 16145, + ts + 16152, ts + 16159, + ts + 8754, + ts + 16167, ts + 5004, - ts + 16165, + ts + 16173, - ts + 15976, - ts + 16018, - ts + 16170, - ts + 16175, - ts + 15372, - ts + 16180, + ts + 15984, + ts + 16026, + ts + 16178, + ts + 16183, + ts + 15380, + ts + 16188, - ts + 16193, - ts + 16202, - ts + 16209, + ts + 16201, + ts + 16210, + ts + 16217, - ts + 16220, -} /* sqlite3.c:129831:19 */ + ts + 16228, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -109059,247 +109094,247 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16228, + { /* zName: */ FzName: ts + 16236, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16243, + { /* zName: */ FzName: ts + 16251, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16258, + { /* zName: */ FzName: ts + 16266, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16270, + { /* zName: */ FzName: ts + 16278, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16286, + { /* zName: */ FzName: ts + 16294, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16209, + { /* zName: */ FzName: ts + 16217, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16299, + { /* zName: */ FzName: ts + 16307, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16311, + { /* zName: */ FzName: ts + 16319, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16331, + { /* zName: */ FzName: ts + 16339, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16347, + { /* zName: */ FzName: ts + 16355, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16368, + { /* zName: */ FzName: ts + 16376, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16383, + { /* zName: */ FzName: ts + 16391, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16399, + { /* zName: */ FzName: ts + 16407, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16413, + { /* zName: */ FzName: ts + 16421, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16426, + { /* zName: */ FzName: ts + 16434, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16440, + { /* zName: */ FzName: ts + 16448, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16459, + { /* zName: */ FzName: ts + 16467, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16478, + { /* zName: */ FzName: ts + 16486, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16501, + { /* zName: */ FzName: ts + 16509, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16510, + { /* zName: */ FzName: ts + 16518, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16528, + { /* zName: */ FzName: ts + 16536, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16545, + { /* zName: */ FzName: ts + 16553, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16558, + { /* zName: */ FzName: ts + 16566, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16573, + { /* zName: */ FzName: ts + 16581, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16591, + { /* zName: */ FzName: ts + 16599, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16601, + { /* zName: */ FzName: ts + 16609, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16615, + { /* zName: */ FzName: ts + 16623, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16631, + { /* zName: */ FzName: ts + 16639, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16656, + { /* zName: */ FzName: ts + 16664, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16675, + { /* zName: */ FzName: ts + 16683, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16686, + { /* zName: */ FzName: ts + 16694, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16697, + { /* zName: */ FzName: ts + 16705, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16709, + { /* zName: */ FzName: ts + 16717, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16725, + { /* zName: */ FzName: ts + 16733, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16738, + { /* zName: */ FzName: ts + 16746, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16757, + { /* zName: */ FzName: ts + 16765, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16776, + { /* zName: */ FzName: ts + 16784, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16789, + { /* zName: */ FzName: ts + 16797, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16804, + { /* zName: */ FzName: ts + 16812, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16814, + { /* zName: */ FzName: ts + 16822, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16826, + { /* zName: */ FzName: ts + 16834, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16835, + { /* zName: */ FzName: ts + 16843, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16846, + { /* zName: */ FzName: ts + 16854, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16856, + { /* zName: */ FzName: ts + 16864, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16868, + { /* zName: */ FzName: ts + 16876, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16879, + { /* zName: */ FzName: ts + 16887, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16891, + { /* zName: */ FzName: ts + 16899, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16908, + { /* zName: */ FzName: ts + 16916, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16927, + { /* zName: */ FzName: ts + 16935, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16953, + { /* zName: */ FzName: ts + 16961, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16968, + { /* zName: */ FzName: ts + 16976, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16982, + { /* zName: */ FzName: ts + 16990, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17001, + { /* zName: */ FzName: ts + 17009, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17015, + { /* zName: */ FzName: ts + 17023, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17031, + { /* zName: */ FzName: ts + 17039, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17043, + { /* zName: */ FzName: ts + 17051, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17054, + { /* zName: */ FzName: ts + 17062, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17065, + { /* zName: */ FzName: ts + 17073, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17077, + { /* zName: */ FzName: ts + 17085, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17088, + { /* zName: */ FzName: ts + 17096, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17109, + { /* zName: */ FzName: ts + 17117, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17117, + { /* zName: */ FzName: ts + 17125, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17132, + { /* zName: */ FzName: ts + 17140, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17145, + { /* zName: */ FzName: ts + 17153, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17164, + { /* zName: */ FzName: ts + 17172, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17179, + { /* zName: */ FzName: ts + 17187, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -109315,7 +109350,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -109332,13 +109367,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17195)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17203)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -109347,12 +109382,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17220) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17228) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17230) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17238) { return PAGER_LOCKINGMODE_NORMAL } } @@ -109363,15 +109398,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7898) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17237) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17245) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17242) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17250) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -109386,12 +109421,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16170) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16178) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17254) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17262) == 0 { return 2 } else { return 0 @@ -109401,13 +109436,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17261, 0) + ts+17269, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -109420,7 +109455,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -109434,7 +109469,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -109468,7 +109503,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -109478,7 +109513,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -109487,7 +109522,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -109503,23 +109538,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17323 /* "SET NULL" */ + zName = ts + 17331 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17332 /* "SET DEFAULT" */ + zName = ts + 17340 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17344 /* "CASCADE" */ + zName = ts + 17352 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17352 /* "RESTRICT" */ + zName = ts + 17360 /* "RESTRICT" */ break default: - zName = ts + 17361 /* "NO ACTION" */ + zName = ts + 17369 /* "NO ACTION" */ break } return zName @@ -109528,7 +109563,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -109537,11 +109572,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17371, ts + 17378, ts + 17386, ts + 17390, ts + 17254, ts + 17399, -} /* sqlite3.c:130656:15 */ + ts + 17379, ts + 17386, ts + 17394, ts + 17398, ts + 17262, ts + 17407, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -109568,7 +109603,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -109583,13 +109618,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17403 /* "w" */ + zType = ts + 17411 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17405 /* "a" */ + zType = ts + 17413 /* "a" */ } else { zType = ts + 7408 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17407, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17415, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -109597,15 +109632,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17414, ts + 17419, ts + 17427 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17422, ts + 17427, ts + 17435 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -109627,7 +109662,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -109874,7 +109909,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17435, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17443, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -110517,7 +110552,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17439) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17447) == 0) { goto __64 } b = 2 @@ -110606,7 +110641,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17230 /* "normal" */ + zRet = ts + 17238 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -110647,7 +110682,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17220 /* "exclusive" */ + zRet = ts + 17228 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -111012,7 +111047,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17444, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17452, 0) goto pragma_out __126: ; @@ -111058,7 +111093,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17469, 0) + ts+17477, 0) goto __133 __132: if !(iDb != 1) { @@ -111114,7 +111149,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17522) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17530) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -111228,9 +111263,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17528 /* "issisii" */ + return ts + 17536 /* "issisii" */ } - return ts + 17536 /* "issisi" */ + return ts + 17544 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -111315,7 +111350,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17543, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17551, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -111368,13 +111403,13 @@ __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12643 /* "virtual" */ + zType = ts + 12651 /* "virtual" */ goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17559 /* "shadow" */ + zType = ts + 17567 /* "shadow" */ goto __183 __182: zType = ts + 8754 /* "table" */ @@ -111384,7 +111419,7 @@ __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17566, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17574, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -111454,7 +111489,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17573, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17581, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -111464,7 +111499,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17578, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17586, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -111501,8 +111536,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17583, ts + 17585, ts + 16047} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17587, + *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17591, ts + 17593, ts + 16055} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17595, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -111536,7 +111571,7 @@ __199: __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17593, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17601, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -111559,7 +111594,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17597, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17605, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -111678,7 +111713,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17600, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17608, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -111686,7 +111721,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17609)) + ts+17617)) goto __227 __227: j2++ @@ -111887,7 +111922,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17614, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17622, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560 /* aiCols */))) @@ -112153,7 +112188,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17618, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17626, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -112255,7 +112290,7 @@ __304: goto __305 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17642, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17650, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { @@ -112277,7 +112312,7 @@ __305: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17662, + zErr = Xsqlite3MPrintf(tls, db, ts+17670, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -112321,7 +112356,7 @@ __313: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17684, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17692, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -112355,9 +112390,9 @@ __318: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17714) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17722) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17719) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17727) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -112397,7 +112432,7 @@ __322: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17740) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17748) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __319: @@ -112419,7 +112454,7 @@ __314: if !!(isQuick != 0) { goto __324 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17767) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17775) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __325: @@ -112470,7 +112505,7 @@ __266: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17796 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17804 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __329: @@ -112548,7 +112583,7 @@ __336: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __338 } - Xsqlite3ErrorMsg(tls, pParse, ts+17799, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17807, libc.VaList(bp+416, zRight)) __338: ; __333: @@ -112660,19 +112695,19 @@ __48: if !(zRight != 0) { goto __345 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17237) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17245) == 0) { goto __346 } eMode2 = SQLITE_CHECKPOINT_FULL goto __347 __346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17824) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17832) == 0) { goto __348 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __349 __348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17390) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17398) == 0) { goto __350 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -112859,7 +112894,7 @@ __365: __367: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17832, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17840, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __368 @@ -113010,9 +113045,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -113023,16 +113058,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -113041,27 +113076,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17850, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17855, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17861, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17870, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17879, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17887, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17895}, - {FzName: ts + 17902}, + {FzName: ts + 17858, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17863, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17869, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17878, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17887, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17895, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17903}, + {FzName: ts + 17910}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -113073,24 +113108,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -113107,7 +113142,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17908) + Xsqlite3_str_appendall(tls, bp+32, ts+17916) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -113115,7 +113150,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17923, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17931, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -113128,16 +113163,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17930, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17938, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17936) + Xsqlite3_str_appendall(tls, bp+32, ts+17944) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17948) + Xsqlite3_str_appendall(tls, bp+32, ts+17956) j++ } Xsqlite3_str_append(tls, bp+32, ts+4901, 1) @@ -113164,7 +113199,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -113176,7 +113211,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113241,7 +113276,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -113254,7 +113289,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -113265,7 +113300,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -113273,7 +113308,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -113289,7 +113324,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -113335,13 +113370,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17963) + Xsqlite3_str_appendall(tls, bp+32, ts+17971) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17971, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17979, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17983, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -113357,14 +113392,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -113376,7 +113411,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -113394,12 +113429,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -113432,7 +113467,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -113443,12 +113478,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17979, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+17987, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -113457,25 +113492,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4952 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18007, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18015, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18038, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18046, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18046, - ts + 18053, - ts + 18065, -} /* sqlite3.c:133149:23 */ + ts + 18054, + ts + 18061, + ts + 18073, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -113497,7 +113532,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113542,7 +113577,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14062) + corruptSchema(tls, pData, argv, ts+14070) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -113580,13 +113615,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18076) + corruptSchema(tls, pData, argv, ts+18084) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14062) + corruptSchema(tls, pData, argv, ts+14070) } } } @@ -113599,7 +113634,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -113632,13 +113667,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8754 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7818 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18089 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18097 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -113751,7 +113786,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11645) + ts+11653) rc = SQLITE_ERROR goto initone_error_out __13: @@ -113791,7 +113826,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18161) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18169) rc = SQLITE_ERROR goto initone_error_out __17: @@ -113813,7 +113848,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18185, + ts+18193, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -113900,7 +113935,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -113932,7 +113967,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -113951,7 +113986,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114004,7 +114039,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -114031,7 +114066,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -114087,7 +114122,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -114110,7 +114145,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) @@ -114123,7 +114158,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -114205,7 +114240,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18219, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18227, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -114232,7 +114267,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18249, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18257, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -114329,13 +114364,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -114364,7 +114399,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114403,14 +114438,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -114423,7 +114458,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -114440,7 +114475,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114453,7 +114488,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -114488,21 +114523,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -114536,7 +114571,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -114557,7 +114592,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -114587,7 +114622,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -114605,19 +114640,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -114646,7 +114681,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -114657,7 +114692,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -114707,14 +114742,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -114736,7 +114771,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114779,18 +114814,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18268, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18276, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18312, 0) + ts+18320, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18367)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18375)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -114803,11 +114838,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -114841,7 +114876,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -114869,7 +114904,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -114914,7 +114949,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -114938,7 +114973,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -114973,7 +115008,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -115005,7 +115040,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18401, libc.VaList(bp, 0)) + ts+18409, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -115029,7 +115064,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18451, 0) + ts+18459, 0) return 1 } @@ -115064,7 +115099,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18506, libc.VaList(bp+8, zName)) + ts+18514, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -115087,11 +115122,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -115100,7 +115135,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -115113,7 +115148,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -115256,7 +115291,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -115304,7 +115339,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -115385,7 +115420,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -115413,7 +115448,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115769,7 +115804,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) if p != 0 { @@ -115787,7 +115822,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -115798,7 +115833,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -115818,7 +115853,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -115852,20 +115887,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18570 /* "UNION ALL" */ + z = ts + 18578 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18580 /* "INTERSECT" */ + z = ts + 18588 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18590 /* "EXCEPT" */ + z = ts + 18598 /* "EXCEPT" */ break default: - z = ts + 18597 /* "UNION" */ + z = ts + 18605 /* "UNION" */ break } return z @@ -115879,11 +115914,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18603, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18611, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -115896,7 +115931,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -116075,7 +116110,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -116153,7 +116188,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1092 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16159 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16167 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -116199,7 +116234,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -116256,7 +116291,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -116308,13 +116343,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16159 /* "rowid" */ + zCol = ts + 16167 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11931, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11939, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -116324,7 +116359,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18626, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18634, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -116356,7 +116391,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -116417,7 +116452,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16159 /* "rowid" */ + zName = ts + 16167 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -116430,7 +116465,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18626, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18634, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -116445,7 +116480,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18635, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18643, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -116488,7 +116523,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -116557,7 +116592,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -116592,7 +116627,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -116624,7 +116659,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -116681,7 +116716,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -116705,7 +116740,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -116774,7 +116809,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -116810,7 +116845,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18643, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18651, 0) return __1: ; @@ -116920,7 +116955,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18692, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18700, 0) goto end_of_recursive_query __15: ; @@ -116942,7 +116977,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18734, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18742, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -116985,7 +117020,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18740, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18748, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -117015,7 +117050,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -117035,11 +117070,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18755, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18763, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1527 /* "" */ } - return ts + 18778 /* "S" */ + return ts + 18786 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -117055,7 +117090,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -117091,7 +117126,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -117191,8 +117226,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18780, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18795, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18788, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18803, 0) __8: ; @@ -117241,7 +117276,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18570, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18578, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -117317,7 +117352,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18814, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18822, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -117389,7 +117424,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18814, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18822, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -117554,15 +117589,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18843, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18881, + ts+18889, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -117585,7 +117620,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -117781,7 +117816,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -117988,7 +118023,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18963, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18971, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -117996,7 +118031,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18974, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18982, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -118010,7 +118045,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18979, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18987, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -118131,14 +118166,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -118151,7 +118186,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -118234,7 +118269,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -118244,7 +118279,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -118287,7 +118322,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -118303,7 +118338,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -118335,7 +118370,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -118368,7 +118403,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -118378,7 +118413,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -118405,7 +118440,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -118575,7 +118610,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -119000,7 +119035,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -119008,7 +119043,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -119050,7 +119085,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -119085,7 +119120,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -119139,7 +119174,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -119206,7 +119241,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -119259,7 +119294,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -119330,7 +119365,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -119418,7 +119453,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -119434,12 +119469,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15053) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15061) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15057) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15065) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -119468,7 +119503,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -119508,7 +119543,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -119519,7 +119554,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18985, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+18993, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -119547,7 +119582,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -119626,12 +119661,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19003, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19011, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -119645,7 +119680,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -119680,7 +119715,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -119713,7 +119748,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -119796,7 +119831,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19026, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19034, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -119823,7 +119858,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19046, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19054, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -119839,7 +119874,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19089 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19097 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -119865,7 +119900,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19112, + Xsqlite3ErrorMsg(tls, pParse, ts+19120, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -119876,9 +119911,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19150 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19158 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19184 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19192 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -119895,7 +119930,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -119911,7 +119946,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -119926,7 +119961,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19222, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19230, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -119965,7 +120000,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -120053,7 +120088,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19234, + Xsqlite3ErrorMsg(tls, pParse, ts+19242, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -120072,7 +120107,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19273, + Xsqlite3ErrorMsg(tls, pParse, ts+19281, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -120080,7 +120115,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19304, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -120245,7 +120280,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11931, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11939, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -120261,7 +120296,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19337, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19345, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -120281,9 +120316,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19346, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19354, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19364, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19372, 0) } } } @@ -120293,7 +120328,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19384, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19392, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -120314,7 +120349,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120352,7 +120387,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -120400,7 +120435,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120429,7 +120464,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -120454,7 +120489,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120482,13 +120517,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19415, 0) + ts+19423, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19466, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19474, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -120504,7 +120539,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -120543,7 +120578,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -120684,17 +120719,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19499, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19507, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19511 /* " USING COVERING ..." */ + return ts + 19519 /* " USING COVERING ..." */ } return ts + 1527 /* "" */ }(), @@ -120716,7 +120751,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -120762,7 +120797,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120780,7 +120815,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -120821,7 +120856,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -120838,7 +120873,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -121039,7 +121074,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19534, + ts+19542, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -121125,7 +121160,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19588, + Xsqlite3ErrorMsg(tls, pParse, ts+19596, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -121365,7 +121400,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19628, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19636, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) @@ -121428,7 +121463,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19643, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19651, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -121950,9 +121985,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19659 /* "DISTINCT" */ + return ts + 19667 /* "DISTINCT" */ } - return ts + 19668 /* "GROUP BY" */ + return ts + 19676 /* "GROUP BY" */ }()) groupBySort = 1 @@ -122365,7 +122400,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19659) + explainTempTable(tls, pParse, ts+19667) __141: ; @@ -122377,9 +122412,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19677 /* "RIGHT PART OF OR..." */ + return ts + 19685 /* "RIGHT PART OF OR..." */ } - return ts + 19700 /* "ORDER BY" */ + return ts + 19708 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -122435,7 +122470,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -122459,12 +122494,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122535,7 +122570,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19709, 0) + ts+19717, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -122595,7 +122630,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -122667,7 +122702,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -122698,7 +122733,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -122727,7 +122762,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -122765,7 +122800,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -122795,7 +122830,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19774, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19782, 0) goto trigger_cleanup __3: ; @@ -122856,7 +122891,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19820, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19828, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -122874,7 +122909,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19828, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19836, 0) goto trigger_orphan_error __11: ; @@ -122889,7 +122924,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19820, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19828, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -122905,7 +122940,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19869, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19877, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -122922,7 +122957,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8012, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19895, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19903, 0) goto trigger_cleanup __18: ; @@ -122932,12 +122967,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19933, + Xsqlite3ErrorMsg(tls, pParse, ts+19941, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19970 /* "BEFORE" */ + return ts + 19978 /* "BEFORE" */ } - return ts + 19977 /* "AFTER" */ + return ts + 19985 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -122946,7 +122981,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19983, libc.VaList(bp+24, pTableName+8)) + ts+19991, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -122976,7 +123011,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }(), uintptr(0), zDb) != 0) { @@ -123072,7 +123107,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -123112,7 +123147,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19820, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19828, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -123149,13 +123184,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20029, + ts+20037, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20104, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20112, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -123196,7 +123231,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -123214,7 +123249,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -123231,10 +123266,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -123255,7 +123293,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123287,7 +123325,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123316,7 +123354,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123335,7 +123373,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -123355,7 +123393,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123421,7 +123459,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20133, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20141, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -123439,12 +123477,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -123462,7 +123500,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12018 + return ts + 12026 } return ts + 5837 }() @@ -123477,7 +123515,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20153, + ts+20161, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -123485,7 +123523,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -123516,7 +123554,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -123533,7 +123571,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123596,12 +123634,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20215, + ts+20223, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20263 /* "DELETE" */ + return ts + 20271 /* "DELETE" */ } - return ts + 20270 /* "UPDATE" */ + return ts + 20278 /* "UPDATE" */ }())) __15: ; @@ -123660,7 +123698,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -123685,7 +123723,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -123697,7 +123735,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20277, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20285, 0) return 1 } @@ -123706,7 +123744,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -123747,7 +123785,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -123815,7 +123853,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -123902,7 +123940,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -123915,7 +123953,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -123972,7 +124010,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20319, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20327, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -124021,7 +124059,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -124050,7 +124088,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -124110,7 +124148,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -124158,7 +124196,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -124215,7 +124253,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124245,7 +124283,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -124266,7 +124304,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -124278,7 +124316,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -124322,7 +124360,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -124405,7 +124443,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -124686,7 +124724,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20333, + ts+20341, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -124718,7 +124756,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20369, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20377, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -125759,7 +125797,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20388) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20396) __169: ; @@ -125795,7 +125833,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125968,7 +126006,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -125981,14 +126019,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -126001,7 +126039,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -126027,7 +126065,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -126147,10 +126185,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 216)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20401, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20409, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20405, libc.VaList(bp+8, bp+216)) + ts+20413, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -126169,7 +126207,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -126191,7 +126229,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -126207,7 +126245,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -126241,7 +126279,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12072, -1) + ts+12080, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -126287,7 +126325,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -126309,7 +126347,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20478, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20482, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20486, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20490, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -126327,7 +126365,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -126371,7 +126409,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -126428,7 +126466,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -126459,14 +126497,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20486) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20494) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20526) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20534) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -126477,7 +126515,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20569) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20577) return SQLITE_ERROR __5: ; @@ -126522,7 +126560,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20587, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20595, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -126543,7 +126581,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20610) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20618) goto end_of_vacuum __8: ; @@ -126559,7 +126597,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14425) + rc = execSql(tls, db, pzErrMsg, ts+14433) if !(rc != SQLITE_OK) { goto __9 } @@ -126611,7 +126649,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20637, + ts+20645, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -126621,7 +126659,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20745, + ts+20753, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -126636,7 +126674,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20799, + ts+20807, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -126653,7 +126691,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20950, + ts+20958, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -126766,7 +126804,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -126774,7 +126812,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -126814,7 +126852,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -126828,18 +126866,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -126860,7 +126898,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -126878,14 +126916,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -126895,7 +126933,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -126916,7 +126954,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -126953,7 +126991,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -126984,7 +127022,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -127010,7 +127048,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -127030,7 +127068,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127040,7 +127078,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12299, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12307, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -127056,7 +127094,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -127091,7 +127129,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -127102,7 +127140,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -127137,7 +127175,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21080, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21088, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -127149,7 +127187,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21104, + ts+21112, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -127159,7 +127197,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21203, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21211, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -127186,7 +127224,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -127194,7 +127232,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -127208,7 +127246,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -127229,7 +127267,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21222, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21230, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -127269,7 +127307,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21264, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21272, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3607, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -127283,7 +127321,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21294 /* "vtable construct..." */ + var zFormat uintptr = ts + 21302 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -127304,7 +127342,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16050, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16058, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -127344,7 +127382,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -127363,7 +127401,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21340, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21348, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -127380,7 +127418,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -127400,7 +127438,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -127412,7 +127450,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127431,7 +127469,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21340, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21348, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -127452,7 +127490,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -127468,7 +127506,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -127542,7 +127580,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -127587,7 +127625,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -127617,7 +127655,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -127639,14 +127677,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -127657,7 +127695,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -127718,7 +127756,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -127766,7 +127804,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -127833,7 +127871,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -127872,7 +127910,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -127917,7 +127955,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -127934,19 +127972,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -127955,7 +127993,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -127983,7 +128021,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -128047,7 +128085,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -128087,23 +128125,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -128133,9 +128171,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -128162,9 +128200,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -128174,9 +128212,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -128196,9 +128234,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -128211,9 +128249,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -128228,24 +128266,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -128267,7 +128305,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -128293,7 +128331,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -128315,7 +128353,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -128337,13 +128375,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21359 /* "" */ + return ts + 21367 /* "" */ } if i == -1 { - return ts + 16159 /* "rowid" */ + return ts + 16167 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -128354,19 +128392,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21366, 5) + Xsqlite3_str_append(tls, pStr, ts+21374, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21372, 1) + Xsqlite3_str_append(tls, pStr, ts+21380, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12689, 1) + Xsqlite3_str_append(tls, pStr, ts+12697, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -128377,11 +128415,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21372, 1) + Xsqlite3_str_append(tls, pStr, ts+21380, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12689, 1) + Xsqlite3_str_append(tls, pStr, ts+12697, 1) } Xsqlite3_str_append(tls, pStr, ts+4952, 1) } @@ -128402,7 +128440,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128415,27 +128453,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21374, 2) + Xsqlite3_str_append(tls, pStr, ts+21382, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21366, 5) + Xsqlite3_str_append(tls, pStr, ts+21374, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21377 /* "%s=?" */ + return ts + 21385 /* "%s=?" */ } - return ts + 21382 /* "ANY(%s)" */ + return ts + 21390 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21390) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21398) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21392) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21400) } Xsqlite3_str_append(tls, pStr, ts+4901, 1) } @@ -128447,7 +128485,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -128482,11 +128520,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21394, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21402, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21400 /* "SEARCH" */ + return ts + 21408 /* "SEARCH" */ } - return ts + 21407 /* "SCAN" */ + return ts + 21415 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -128496,30 +128534,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10846 /* "PRIMARY KEY" */ + zFmt = ts + 10854 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21412 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21420 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21445 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21453 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21470 /* "COVERING INDEX %..." */ + zFmt = ts + 21478 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21488 /* "INDEX %s" */ + zFmt = ts + 21496 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21497, 7) + Xsqlite3_str_append(tls, bp+64, ts+21505, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16159 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21505, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16167 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21513, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21536, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21544, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -128527,9 +128565,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21546, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21554, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21551, + Xsqlite3_str_appendf(tls, bp+64, ts+21559, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -128548,7 +128586,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -128566,22 +128604,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21578, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21586, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21377, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21385, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21599, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21607, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21366, 5) + Xsqlite3_str_append(tls, bp+24, ts+21374, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21377, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21385, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4901, 1) @@ -128631,7 +128669,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -128664,7 +128702,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -128697,7 +128735,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -128735,7 +128773,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -128810,7 +128848,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -129003,7 +129041,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -129040,6 +129078,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -129123,7 +129162,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -129164,7 +129203,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -129192,10 +129231,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -129212,7 +129251,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -129232,7 +129271,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -129254,7 +129293,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -129319,7 +129358,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -129365,7 +129404,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129375,6 +129414,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -129407,7 +129449,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -129478,7 +129520,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -129540,53 +129581,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -129594,8 +129634,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -130231,6 +130271,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -130245,7 +130293,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -130262,7 +130312,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21607, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21615, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -130281,7 +130331,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21622, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21630, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -130629,24 +130679,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -130668,7 +130718,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -130710,14 +130760,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -130737,7 +130787,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -130764,7 +130814,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -130936,7 +130986,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -131041,18 +131091,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16008, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15330, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14856, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21631, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16016, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15338, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14864, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21639, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -131060,7 +131110,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -131069,7 +131119,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -131100,7 +131150,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -131233,7 +131283,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -131552,7 +131602,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -131581,7 +131631,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -131616,7 +131666,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -131654,7 +131704,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -131695,7 +131745,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -131758,7 +131808,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21638, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21646, 0) return } } @@ -131942,7 +131992,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21679 /* "NOCASE" */ + return ts + 21687 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -132063,7 +132113,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -132086,7 +132136,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -132110,7 +132160,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -132162,7 +132212,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -132212,7 +132262,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -132225,7 +132275,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -132285,7 +132335,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -132315,7 +132365,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -132325,14 +132375,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -132349,7 +132399,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -132361,7 +132411,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132386,7 +132436,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21686, + Xsqlite3ErrorMsg(tls, pParse, ts+21694, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -132445,7 +132495,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -132475,16 +132525,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -132494,7 +132544,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -132519,7 +132569,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -132540,7 +132590,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { @@ -132561,14 +132611,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -132587,19 +132637,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{}))) } @@ -132609,7 +132659,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -132686,7 +132736,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -132706,14 +132756,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -132724,7 +132774,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -132828,7 +132878,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -132850,7 +132900,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -132905,7 +132955,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -132935,7 +132985,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -132956,7 +133006,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -132977,7 +133027,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -133047,7 +133097,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -133064,7 +133114,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -133107,7 +133157,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -133141,7 +133191,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -133227,7 +133277,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21722, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21730, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -133308,7 +133358,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21748 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21756 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -133499,7 +133549,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -133575,7 +133625,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -133599,7 +133654,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -133825,7 +133880,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -133852,7 +133907,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133890,7 +133945,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -134029,7 +134084,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -134042,7 +134097,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -134086,7 +134141,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -134201,7 +134256,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -134509,7 +134564,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -134518,7 +134573,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -134538,7 +134593,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) @@ -134555,13 +134610,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -134582,7 +134637,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -134608,7 +134663,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -134652,7 +134707,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -134711,7 +134766,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -134800,7 +134855,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -134907,7 +134962,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -135010,7 +135065,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -135078,7 +135133,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -135438,7 +135493,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -135480,7 +135535,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -135555,7 +135610,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -135840,7 +135895,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -135864,7 +135919,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135966,7 +136021,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21759, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21767, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -136039,7 +136094,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21759, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21767, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -136088,7 +136143,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -136111,7 +136166,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -136134,7 +136189,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -136160,7 +136215,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -136189,7 +136244,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -136325,7 +136380,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -136450,7 +136505,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -136502,7 +136557,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21785, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21793, 0) rc = SQLITE_OK } else { goto __3 @@ -136538,7 +136593,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -136906,7 +136961,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) } @@ -136914,7 +136969,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -136961,7 +137016,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -137276,7 +137331,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21820, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21828, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -137368,7 +137423,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -137475,7 +137530,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -137486,7 +137541,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -137532,7 +137587,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -137607,7 +137662,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -137719,7 +137774,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -137783,7 +137838,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21838, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21846, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -137863,7 +137918,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21874, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -138404,7 +138459,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -138621,6 +138676,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -138802,7 +138859,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -138811,7 +138868,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -138827,13 +138884,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138843,7 +138900,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138861,9 +138918,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -138926,10 +138983,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21884, -1) + pCtx, ts+21892, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -138939,7 +138996,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -138952,7 +139009,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -138966,7 +139023,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138979,7 +139036,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138992,7 +139049,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -139002,7 +139059,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -139010,7 +139067,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -139028,7 +139085,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -139038,7 +139095,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -139046,7 +139103,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -139060,13 +139117,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -139075,14 +139132,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21940, -1) + pCtx, ts+21948, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -139090,7 +139147,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -139116,10 +139173,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -139134,7 +139191,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -139148,7 +139205,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -139156,7 +139213,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -139172,17 +139229,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21985)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 21996)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22007)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22012)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22025)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22035)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22041)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22052)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22062)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22074)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22079 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21993)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22004)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22015)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22020)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22033)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22043)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22049)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22060)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22070)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22082)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22087 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -139191,7 +139248,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22079 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -139199,7 +139256,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -139214,7 +139271,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -139233,9 +139290,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -139246,7 +139303,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22083, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22091, libc.VaList(bp, zName)) } return p } @@ -139266,7 +139323,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -139290,12 +139347,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22102, 0) + ts+22110, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22173, 0) + ts+22181, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -139334,16 +139391,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -139443,7 +139500,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -139467,7 +139524,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -139499,7 +139556,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -139545,7 +139602,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -139553,14 +139610,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22236, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22244, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -139570,12 +139627,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -139751,7 +139811,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -139762,7 +139822,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -139777,7 +139837,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -139790,7 +139850,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -139802,7 +139862,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -139835,7 +139895,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22262, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22270, 0) goto windowAllocErr __2: ; @@ -139871,7 +139931,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -139890,7 +139950,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -139901,15 +139961,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22294 /* "PARTITION clause" */ + zErr = ts + 22302 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22311 /* "ORDER BY clause" */ + zErr = ts + 22319 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22327 /* "frame specificat..." */ + zErr = ts + 22335 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22347, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22355, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -139924,7 +139984,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -139932,7 +139992,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22380, 0) + ts+22388, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -139943,7 +140003,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -139963,7 +140023,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -140003,7 +140063,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -140079,7 +140139,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -140108,17 +140168,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22427, - ts + 22480, - ts + 21884, - ts + 22531, - ts + 22583, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22435, + ts + 22488, + ts + 21892, + ts + 22539, + ts + 22591, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -140143,19 +140203,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -140191,7 +140251,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -140298,7 +140358,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -140334,7 +140394,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -140441,7 +140501,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -140524,7 +140584,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -140559,7 +140619,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -140584,7 +140644,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -140621,7 +140681,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -140744,7 +140804,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -140892,7 +140952,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -140923,7 +140983,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140948,7 +141008,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -141296,7 +141356,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -141693,17 +141753,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -141713,7 +141773,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141732,19 +141792,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22633, + Xsqlite3ErrorMsg(tls, pParse, ts+22641, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19700 /* "ORDER BY" */ + return ts + 19708 /* "ORDER BY" */ } - return ts + 22675 /* "LIMIT" */ + return ts + 22683 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22681, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22689, 0) } } @@ -141752,7 +141812,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -141764,7 +141824,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -141802,7 +141862,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -141816,14 +141876,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22715, + Xsqlite3ErrorMsg(tls, pParse, ts+22723, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -141891,7 +141951,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -142160,7 +142220,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -142388,7 +142448,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -142448,7 +142508,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -142491,7 +142551,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -142551,7 +142611,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -142753,7 +142813,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -142775,9 +142835,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -142786,9 +142846,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -142798,7 +142858,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -142813,7 +142873,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -142972,7 +143032,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -142980,7 +143040,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -143003,7 +143063,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -143043,7 +143103,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -143054,7 +143114,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -143064,7 +143124,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22753, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22761, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -143073,7 +143133,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -143496,7 +143556,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -143903,7 +143963,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -143915,7 +143975,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -144060,21 +144120,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16159, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16167, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22775, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22783, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16072, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16080, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22775, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22783, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -144810,7 +144870,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22802) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22810) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -144961,7 +145021,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22811, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+22819, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -145456,21 +145516,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+22835, 0) + ts+22843, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22930, 0) + ts+22938, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23014, 0) + ts+23022, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -145910,7 +145970,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -145920,9 +145980,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22811, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22819, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23099, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23107, 0) } //*********** End %syntax_error code ***************************************** @@ -145930,7 +145990,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -145960,7 +146020,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -146014,7 +146074,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -146065,7 +146125,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -146151,7 +146211,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -146164,7 +146224,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -146181,7 +146241,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -146196,7 +146256,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -146212,7 +146272,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -146245,7 +146305,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -146378,7 +146438,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -146556,7 +146616,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -146565,7 +146625,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -146574,11 +146634,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -146601,13 +146661,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -146657,7 +146717,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -146674,7 +146734,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -146688,7 +146748,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -146701,7 +146761,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -147069,7 +147129,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -147139,7 +147199,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23116, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23124, libc.VaList(bp, bp+2464)) break } } @@ -147162,7 +147222,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3607, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23141, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23149, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -147259,7 +147319,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -147362,7 +147422,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23152, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23160, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -147375,11 +147435,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19820, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19828, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23159, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23167, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23164, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23172, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -147392,9 +147452,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23174, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23182, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23178, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23186, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -147436,12 +147496,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -147468,7 +147528,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -147480,11 +147540,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -147497,14 +147557,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -147517,14 +147577,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -147555,7 +147615,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -147681,7 +147741,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -147720,7 +147780,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -147728,7 +147788,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -147998,7 +148058,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -148096,13 +148156,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148121,7 +148181,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -148150,7 +148210,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -148229,11 +148289,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -148255,7 +148315,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -148268,7 +148328,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -148282,7 +148342,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -148298,39 +148358,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -148345,7 +148405,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -148360,7 +148420,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -148387,7 +148447,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -148403,14 +148463,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -148434,7 +148494,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23186, 0) + ts+23194, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -148447,7 +148507,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -148484,11 +148544,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -148498,7 +148558,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -148608,7 +148668,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -148658,24 +148718,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23254 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23262 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23268 /* "abort due to ROL..." */ + zErr = ts + 23276 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23290 /* "another row avai..." */ + zErr = ts + 23298 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23312 /* "no more rows ava..." */ + zErr = ts + 23320 /* "no more rows ava..." */ break } @@ -148693,36 +148753,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23335, - ts + 23348, + ts + 23343, + ts + 23356, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23364, - ts + 23389, - ts + 23403, - ts + 23422, + ts + 23372, + ts + 23397, + ts + 23411, + ts + 23430, ts + 1463, - ts + 23447, - ts + 23484, - ts + 23496, - ts + 23511, - ts + 23544, - ts + 23562, - ts + 23587, - ts + 23616, + ts + 23455, + ts + 23492, + ts + 23504, + ts + 23519, + ts + 23552, + ts + 23570, + ts + 23595, + ts + 23624, /* SQLITE_EMPTY */ uintptr(0), ts + 5792, ts + 5278, - ts + 23633, - ts + 23651, - ts + 23669, + ts + 23641, + ts + 23659, + ts + 23677, /* SQLITE_NOLFS */ uintptr(0), - ts + 23703, + ts + 23711, /* SQLITE_FORMAT */ uintptr(0), - ts + 23724, - ts + 23750, - ts + 23773, - ts + 23794, -} /* sqlite3.c:169926:20 */ + ts + 23732, + ts + 23758, + ts + 23781, + ts + 23802, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -148731,7 +148791,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -148754,8 +148814,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -148764,7 +148824,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -148782,7 +148842,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -148795,7 +148855,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -148811,7 +148871,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -148825,7 +148885,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ *(*int32)(unsafe.Pointer(db + 432)) = 1 } @@ -148833,7 +148893,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -148843,7 +148903,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -148901,7 +148961,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23810, 0) + ts+23818, 0) return SQLITE_BUSY } else { @@ -148948,7 +149008,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -148990,22 +149050,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -149025,7 +149085,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -149034,7 +149094,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23873, libc.VaList(bp, zName)) + ts+23881, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -149049,7 +149109,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -149075,7 +149135,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149093,7 +149153,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -149114,7 +149174,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149132,7 +149192,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149145,7 +149205,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149158,7 +149218,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149171,7 +149231,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -149183,7 +149243,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -149199,7 +149259,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -149217,7 +149277,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -149230,7 +149290,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -149241,7 +149301,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -149270,7 +149330,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23924, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23932, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -149291,7 +149351,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -149315,7 +149375,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -149357,19 +149417,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -149391,7 +149451,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149403,7 +149463,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -149432,18 +149492,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -149451,9 +149511,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -149461,7 +149521,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -149471,13 +149531,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -149490,7 +149550,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -149500,7 +149560,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23945, 0) + ts+23953, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -149553,7 +149613,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -149565,7 +149625,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -149612,7 +149672,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -149645,7 +149705,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24013, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24021, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -149693,10 +149753,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24019, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24027, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24029, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24037, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -149818,7 +149878,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24057, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24065, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -149829,17 +149889,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24061, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24069, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24061 /* "cache" */ + zModeType = ts + 24069 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24067, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24075, zOpt, uint64(4)) == 0) { goto __32 } @@ -149878,7 +149938,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24072, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24080, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -149886,7 +149946,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24092, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24100, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -149929,7 +149989,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24116, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24124, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -149950,24 +150010,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24132, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24139, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24140, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24147, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24147, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24150, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24153, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17254, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24155, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24158, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24161, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17262, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -149983,7 +150043,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -150135,10 +150195,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21679, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21687, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24157, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24165, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -150167,7 +150227,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -150224,7 +150284,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6325 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23159 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23167 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -150323,17 +150383,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -150344,7 +150404,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24163 /* "\x00\x00" */ + zFilename = ts + 24171 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -150365,12 +150425,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150382,7 +150442,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -150400,7 +150460,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -150411,7 +150471,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -150422,7 +150482,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -150430,7 +150490,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -150443,28 +150503,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24166, + Xsqlite3_log(tls, iErr, ts+24174, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24191) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24199) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24211) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24219) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24218) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24226) } // This is a convenience routine that makes sure that all thread-specific @@ -150472,12 +150532,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -150643,7 +150703,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24235, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24243, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -150661,7 +150721,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -150676,7 +150736,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -150689,7 +150749,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -150734,7 +150794,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -151193,7 +151253,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -151202,7 +151262,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+uint64(1)) return p + uintptr(n) + uintptr(1) @@ -151215,7 +151275,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -151246,7 +151306,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -151263,7 +151323,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -151272,7 +151332,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -151289,7 +151349,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -151299,7 +151359,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -151320,14 +151380,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -151340,7 +151400,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -151349,7 +151409,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -151364,7 +151424,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -151375,7 +151435,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -151386,7 +151446,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151409,7 +151469,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151452,7 +151512,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -151473,7 +151533,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -151482,7 +151542,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -151494,7 +151554,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24263, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24271, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -151512,7 +151572,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -151557,11 +151617,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -151574,7 +151634,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -151584,13 +151644,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -151614,7 +151674,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -151657,7 +151717,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24271 /* "database is dead..." */ + return ts + 24279 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -151669,7 +151729,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -151695,7 +151755,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -151799,7 +151859,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -152404,7 +152464,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -152416,10 +152476,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -152427,9 +152487,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -152442,9 +152502,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -152452,8 +152512,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6125, ts + 6639, ts + 6644, ts + 6135, ts + 6130, ts + 7885, ts + 24294, ts + 24300, -} /* sqlite3.c:193131:19 */ + ts + 6125, ts + 6639, ts + 6644, ts + 6135, ts + 6130, ts + 7885, ts + 24302, ts + 24308, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -152467,7 +152527,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -152475,7 +152535,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -152483,7 +152543,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -152491,7 +152551,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -152499,7 +152559,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -152532,7 +152592,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -152544,7 +152604,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -152557,7 +152617,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -152566,7 +152626,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -152581,7 +152641,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -152632,7 +152692,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24307 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24315 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -152652,11 +152712,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -152689,7 +152749,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24324, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24332, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -152700,7 +152760,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -152727,7 +152787,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -152736,7 +152796,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -152746,7 +152806,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -152754,7 +152814,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -152857,7 +152917,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -152872,14 +152932,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -152890,7 +152950,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -153171,7 +153231,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -153193,7 +153253,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -153208,7 +153268,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -153224,7 +153284,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -153451,7 +153511,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -153476,7 +153536,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24353, -1) + Xsqlite3_result_error(tls, pCtx, ts+24361, -1) } } jsonParseReset(tls, pParse) @@ -153487,7 +153547,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -153518,7 +153578,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) @@ -153538,7 +153598,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -153595,7 +153655,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -153618,7 +153678,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -153793,7 +153853,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -153804,7 +153864,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24368, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24376, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -153817,11 +153877,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24372, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24380, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -153832,7 +153892,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -153884,18 +153944,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24398, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24406, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -153926,7 +153986,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -153943,7 +154003,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -153966,7 +154026,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -154016,7 +154076,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -154050,11 +154110,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24441, uint32(2)) + jsonAppendRaw(tls, bp, ts+24449, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4942, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24444, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24452, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -154110,7 +154170,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -154183,7 +154243,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -154215,7 +154275,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -154227,14 +154287,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24447, -1) + ts+24455, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24498, -1) + Xsqlite3_result_error(tls, ctx, ts+24506, -1) jsonReset(tls, bp) return } @@ -154254,7 +154314,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -154323,7 +154383,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -154342,7 +154402,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15263) + jsonWrongNumArgs(tls, ctx, ts+15271) return __2: ; @@ -154406,7 +154466,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -154431,9 +154491,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24532 /* "set" */ + return ts + 24540 /* "set" */ } - return ts + 24536 /* "insert" */ + return ts + 24544 /* "insert" */ }()) return __2: @@ -154504,7 +154564,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -154528,7 +154588,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -154542,7 +154602,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -154558,7 +154618,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -154583,16 +154643,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24543, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24551, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -154600,7 +154660,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -154642,7 +154702,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -154664,7 +154724,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -154688,16 +154748,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24546, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24554, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -154717,16 +154777,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -154741,7 +154801,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24549) + ts+24557) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -154754,13 +154814,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -154774,7 +154834,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -154785,7 +154845,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -154798,7 +154858,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -154807,13 +154867,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -154864,7 +154924,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -154881,19 +154941,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24632, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24640, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24637, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24645, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -154982,10 +155042,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24632, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24640, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24637, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24645, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -155012,7 +155072,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24643 /* "$" */ + zRoot = ts + 24651 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -155030,7 +155090,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -155040,7 +155100,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155115,7 +155175,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155144,7 +155204,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24353, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24361, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -155220,7 +155280,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -155234,36 +155294,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24645}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24650}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24661}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24661}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24679}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24692}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24695}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24699}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24711}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24723}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24734}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24745}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24757}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24770}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24779}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24779}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24789}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24800}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24817}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24653}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24658}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24669}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24669}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24687}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24700}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24703}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24707}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24719}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24731}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24742}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24753}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24765}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24778}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24787}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24787}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24797}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24808}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24825}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -155279,9 +155339,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24835 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24845 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24843 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24853 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -155328,7 +155388,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -155342,7 +155402,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -155363,9 +155423,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -155373,23 +155433,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -155398,20 +155458,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -155419,17 +155479,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -155455,28 +155515,28 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = U32(*(*U8)(unsafe.Pointer(p)))<<24 + U32(*(*U8)(unsafe.Pointer(p + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(p + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(p + 3)))<<0 } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ return I64(U64(*(*U8)(unsafe.Pointer(p)))<<56 + U64(*(*U8)(unsafe.Pointer(p + 1)))<<48 + U64(*(*U8)(unsafe.Pointer(p + 2)))<<40 + U64(*(*U8)(unsafe.Pointer(p + 3)))<<32 + U64(*(*U8)(unsafe.Pointer(p + 4)))<<24 + U64(*(*U8)(unsafe.Pointer(p + 5)))<<16 + U64(*(*U8)(unsafe.Pointer(p + 6)))<<8 + U64(*(*U8)(unsafe.Pointer(p + 7)))<<0) } // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ var i U32 // p is always 4-byte aligned @@ -155488,7 +155548,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 40 & int64(0xFF)) @@ -155501,7 +155561,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -155509,20 +155569,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -155530,7 +155590,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -155539,7 +155599,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -155554,7 +155614,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -155570,7 +155630,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -155579,7 +155639,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155611,11 +155671,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24855, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24863, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24863, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24871, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -155689,7 +155749,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -155700,7 +155760,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -155713,7 +155773,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -155730,7 +155790,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -155754,7 +155814,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -155780,19 +155840,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -155808,23 +155868,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -155846,13 +155906,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155860,7 +155920,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24868, + ts+24876, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -155879,7 +155939,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -155897,7 +155957,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -155927,7 +155987,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -155943,7 +156003,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -155960,7 +156020,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -156072,7 +156132,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -156174,7 +156234,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156230,7 +156290,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -156246,7 +156306,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -156265,7 +156325,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -156282,7 +156342,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -156302,7 +156362,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -156313,7 +156373,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -156330,7 +156390,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -156364,7 +156424,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -156400,7 +156460,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -156448,7 +156508,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -156541,7 +156601,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -156557,7 +156617,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156572,7 +156632,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156633,7 +156693,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -156654,12 +156714,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24950) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24958) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -156686,7 +156746,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -156829,7 +156889,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -156936,7 +156996,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -156979,7 +157039,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -157000,7 +157060,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -157039,7 +157099,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -157054,7 +157114,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -157067,7 +157127,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -157142,7 +157202,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -157198,7 +157258,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -157234,7 +157294,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -157242,7 +157302,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -157264,7 +157324,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -157312,7 +157372,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -157368,7 +157428,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -157467,7 +157527,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -157501,7 +157561,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -157736,7 +157796,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -157771,7 +157831,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157821,7 +157881,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -157852,7 +157912,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -157881,7 +157941,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -157996,7 +158056,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -158026,7 +158086,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -158057,7 +158117,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -158068,7 +158128,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -158157,7 +158217,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -158171,7 +158231,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -158196,7 +158256,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -158204,7 +158264,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24964, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24972, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -158216,12 +158276,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24984, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24992, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25016, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25024, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -158235,7 +158295,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -158464,7 +158524,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -158473,7 +158533,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -158481,7 +158541,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -158489,7 +158549,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25053, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25061, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -158510,7 +158570,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -158523,11 +158583,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25198 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25206 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -158535,7 +158595,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11218, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11226, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -158567,7 +158627,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -158578,8 +158638,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25254, ts + 5004, ts + 16159, -} /* sqlite3.c:199185:21 */ + ts + 25262, ts + 5004, ts + 16167, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -158603,9 +158663,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -158622,19 +158682,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25259, + ts+25267, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25321, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25329, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25326, + ts+25334, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25390, + ts+25398, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25460, + ts+25468, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -158665,7 +158725,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25509 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25517 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -158677,7 +158737,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25617, + ts+25625, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -158685,18 +158745,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25662, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25670, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12689, 1) + Xsqlite3_str_append(tls, p, ts+12697, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25689, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25697, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25711, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25719, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25719, 0) + Xsqlite3_str_appendf(tls, p, ts+25727, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -158712,24 +158772,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25735, - ts + 25788, + ts + 25743, + ts + 25796, - ts + 25833, - ts + 25885, - ts + 25939, + ts + 25841, + ts + 25893, + ts + 25947, - ts + 25984, - ts + 26042, - ts + 26097, -} /* sqlite3.c:199232:21 */ + ts + 25992, + ts + 26050, + ts + 26105, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -158760,7 +158820,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -158768,7 +158828,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26144, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26152, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -158780,7 +158840,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26164, + ts+26172, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -158788,7 +158848,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26221, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26229, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -158798,7 +158858,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158813,7 +158873,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -158839,10 +158899,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26256, - ts + 26299, - ts + 26334, - ts + 26370, + ts + 26264, + ts + 26307, + ts + 26342, + ts + 26378, } // Aux columns counted by a u8 @@ -158879,7 +158939,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26407, + Xsqlite3_str_appendf(tls, pSql, ts+26415, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -158891,7 +158951,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26431, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26439, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -158914,7 +158974,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26437, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26445, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -159013,7 +159073,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26440, ts + 26451} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26448, ts + 26459} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -159029,7 +159089,7 @@ var azFormat = [2]uintptr{ts + 26440, ts + 26451} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -159073,11 +159133,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10798, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26461, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26469, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26467, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26475, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26471, 1) + Xsqlite3_str_append(tls, pOut, ts+26479, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -159092,11 +159152,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26473, -1) + Xsqlite3_result_error(tls, ctx, ts+26481, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -159124,15 +159184,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -159145,7 +159205,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -159173,7 +159233,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -159185,7 +159245,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26506, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26514, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4006 /* "\n" */ @@ -159213,7 +159273,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -159221,7 +159281,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26513, + ts+26521, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -159240,7 +159300,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26558, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26566, libc.VaList(bp+16, iNode)) } } @@ -159257,15 +159317,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26590, - ts + 26644, + ts + 26598, + ts + 26652, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -159280,23 +159340,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26692, + rtreeCheckAppendMsg(tls, pCheck, ts+26700, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26737 /* "%_rowid" */ + return ts + 26745 /* "%_rowid" */ } - return ts + 26745 /* "%_parent" */ + return ts + 26753 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26754, + ts+26762, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26737 /* "%_rowid" */ + return ts + 26745 /* "%_rowid" */ } - return ts + 26745 /* "%_parent" */ + return ts + 26753 /* "%_parent" */ }(), iKey, iVal)) } } @@ -159313,7 +159373,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -159339,7 +159399,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26812, libc.VaList(bp, i, iCell, iNode)) + ts+26820, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -159359,7 +159419,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26860, libc.VaList(bp+24, i, iCell, iNode)) + ts+26868, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -159371,7 +159431,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159382,14 +159442,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26927, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26935, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26961, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26969, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -159397,7 +159457,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26991, + ts+26999, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -159425,20 +159485,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27046, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27054, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27077, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27085, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -159448,7 +159508,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -159468,13 +159528,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14425, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14433, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27144, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27152, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -159484,12 +159544,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24964, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24972, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27172, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27180, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -159504,8 +159564,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27203, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27210, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27211, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27218, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -159515,7 +159575,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27218, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27226, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -159555,13 +159615,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27222, -1) + ts+27230, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -159579,7 +159639,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17796 /* "ok" */ + return ts + 17804 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -159618,7 +159678,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -159644,7 +159704,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -159666,7 +159726,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -159683,7 +159743,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -159693,10 +159753,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -159706,7 +159766,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -159715,7 +159775,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -159787,7 +159847,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -159929,7 +159989,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159998,7 +160058,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -160011,7 +160071,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -160020,11 +160080,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27273, 1) + Xsqlite3_str_append(tls, x, ts+27281, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27275, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27283, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27286, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27294, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -160034,7 +160094,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -160048,19 +160108,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27297, 0) + Xsqlite3_str_appendf(tls, x, ts+27305, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27315, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27323, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27323, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27331, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27331, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27339, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27335, 0) + Xsqlite3_str_appendf(tls, x, ts+27343, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -160080,7 +160140,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -160113,7 +160173,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -160133,7 +160193,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -160152,7 +160212,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -160188,7 +160248,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -160208,7 +160268,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160253,7 +160313,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160394,7 +160454,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -160407,13 +160467,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -160447,7 +160507,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -160474,7 +160534,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -160515,7 +160575,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -160553,7 +160613,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -160585,10 +160645,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -160599,20 +160659,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -160646,7 +160706,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -160658,7 +160718,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -160688,7 +160748,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -160718,7 +160778,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -160753,7 +160813,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -160783,7 +160843,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161019,7 +161079,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -161035,7 +161095,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -161045,7 +161105,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161085,7 +161145,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27348, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27356, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -161094,7 +161154,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27370, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27378, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -161102,7 +161162,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26437, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26445, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -161160,12 +161220,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -161179,7 +161239,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -161346,7 +161406,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -161372,7 +161432,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16159 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16167 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -161382,7 +161442,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27374 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27382 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -161390,14 +161450,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27380 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27388 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161462,7 +161522,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -161529,7 +161589,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27389, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27397, 0) __4: ; goto geopoly_update_end @@ -161673,15 +161733,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27429) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27437) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27445) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27453) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -161714,9 +161774,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -161746,7 +161806,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27460, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27468, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -161758,26 +161818,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27468 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27481 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27494 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27507 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27445 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27519 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27429 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27542 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27556 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27569 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27583 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27599 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27476 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27489 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27502 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27515 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27453 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27527 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27437 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27550 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27564 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27577 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27591 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27607 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27611 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27619 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -161785,30 +161845,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27630, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27638, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27640, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27648, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27651, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27659, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27374, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27382, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27662, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27670, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -161822,7 +161882,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -161831,7 +161891,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -161852,7 +161912,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -161880,13 +161940,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24950, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24958, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -161906,7 +161966,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -162362,7 +162422,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -162763,7 +162823,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -162828,7 +162888,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -162890,7 +162950,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -162922,9 +162982,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -162939,16 +162999,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -162956,9 +163016,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -162977,16 +163037,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -163005,7 +163065,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -163028,7 +163088,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -163048,7 +163108,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -163138,7 +163198,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -163163,7 +163223,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -163180,7 +163240,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27672, -1) + Xsqlite3_result_error(tls, context, ts+27680, -1) return } @@ -163191,7 +163251,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27672, -1) + Xsqlite3_result_error(tls, context, ts+27680, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -163206,7 +163266,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163224,7 +163284,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163248,7 +163308,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -163263,7 +163323,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -163281,7 +163341,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -163311,7 +163371,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -163325,7 +163385,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -163334,7 +163394,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27693, uintptr(0), uintptr(0), p+64) + ts+27701, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -163406,7 +163466,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -163418,7 +163478,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24863, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24871, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -163436,7 +163496,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163446,9 +163506,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27864, libc.VaList(bp, func() uintptr { + ts+27872, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28014 /* "AND rootpage!=0 ..." */ + return ts + 28022 /* "AND rootpage!=0 ..." */ } return ts + 1527 /* "" */ }()))) @@ -163456,7 +163516,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28055) + ts+28063) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -163471,7 +163531,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -163497,7 +163557,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -163523,7 +163583,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -163540,7 +163600,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -163563,7 +163623,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -163586,7 +163646,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163636,7 +163696,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -163657,7 +163717,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+28180, libc.VaList(bp, zTab))) + ts+28188, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -163675,7 +163735,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+28299, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28307, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -163693,7 +163753,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28320, libc.VaList(bp+16, zIdx))) + ts+28328, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -163717,7 +163777,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28371, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28379, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -163757,7 +163817,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -163767,7 +163827,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28400, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -163782,7 +163842,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -163815,7 +163875,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -163832,7 +163892,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19346, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19354, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -163845,18 +163905,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28449, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28457, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28468, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28476, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28473, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28481, zName) { bRbuRowid = 1 } } @@ -163868,12 +163928,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28483, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28491, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28512 /* "may not have" */ + return ts + 28520 /* "may not have" */ } - return ts + 28525 /* "requires" */ + return ts + 28533 /* "requires" */ }())) } @@ -163882,7 +163942,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28534, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28542, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -163896,7 +163956,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28556, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28564, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -163937,7 +163997,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -163946,8 +164006,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+28583, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14536 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28591, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14544 /* ", " */ } return zList } @@ -163956,7 +164016,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -163968,7 +164028,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+28592, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28600, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -163998,7 +164058,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -164007,25 +164067,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28605, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28613, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28637, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28645, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14536, ts+28660) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28666, ts+28673, ts+4901) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14536, ts+1527) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14544, ts+28668) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28674, ts+28681, ts+4901) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14544, ts+1527) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28681, + ts+28689, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28723, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28731, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -164057,7 +164117,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -164088,7 +164148,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -164125,7 +164185,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28743 /* "_rowid_" */ + zCol = ts + 28751 /* "_rowid_" */ __7: ; goto __5 @@ -164134,13 +164194,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28751, + zLhs = rbuMPrintf(tls, p, ts+28759, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28772, + zOrder = rbuMPrintf(tls, p, ts+28780, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28808, + zSelect = rbuMPrintf(tls, p, ts+28816, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ iCol++ goto __1 __2: @@ -164159,7 +164219,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28835, + Xsqlite3_mprintf(tls, ts+28843, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -164186,8 +164246,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28883, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14536 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28891, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14544 /* ", " */ goto __15 __15: iCol++ @@ -164199,7 +164259,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28890, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28898, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -164238,7 +164298,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -164256,7 +164316,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -164268,7 +164328,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28902, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28910, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1527 /* "" */ } else { @@ -164282,37 +164342,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28743 /* "_rowid_" */ + zCol = ts + 28751 /* "_rowid_" */ } else { - zCol = ts + 28473 /* "rbu_rowid" */ + zCol = ts + 28481 /* "rbu_rowid" */ } zType = ts + 1092 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+28924, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28932, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28660 + return ts + 28668 } return ts + 1527 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28944, + zImpPK = Xsqlite3_mprintf(tls, ts+28952, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28965, + zImpCols = Xsqlite3_mprintf(tls, ts+28973, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+28998, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29006, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14536 /* ", " */ - zAnd = ts + 21366 /* " AND " */ + zCom = ts + 14544 /* ", " */ + zAnd = ts + 21374 /* " AND " */ nBind++ } @@ -164349,7 +164409,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -164360,11 +164420,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29022, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29030, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29034, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29042, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14536 /* ", " */ + zS = ts + 14544 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -164373,7 +164433,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29043, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29051, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -164387,24 +164447,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29058, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29066, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1527 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29072, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21366 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29080, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21374 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29084, libc.VaList(bp+40, zList)) + ts+29092, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1527 /* "" */ @@ -164412,8 +164472,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29134, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21366 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29142, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21374 /* " AND " */ } } } @@ -164425,9 +164485,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29147, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29155, 0) } // Return a nul-terminated string containing the comma separated list of @@ -164445,7 +164505,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -164460,17 +164520,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29134, + zList = rbuMPrintf(tls, p, ts+29142, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29173, + zList = rbuMPrintf(tls, p, ts+29181, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29203, + zList = rbuMPrintf(tls, p, ts+29211, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } } } @@ -164491,7 +164551,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -164521,26 +164581,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29240 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29248 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28392, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28400, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16047) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16055) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp+8, zIdx))) } break } @@ -164553,15 +164613,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28660 /* " DESC" */ + zDesc = ts + 28668 /* " DESC" */ } else { zDesc = ts + 1527 /* "" */ } - z = rbuMPrintf(tls, p, ts+29253, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14536 /* ", " */ + z = rbuMPrintf(tls, p, ts+29261, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14544 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29264, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29272, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -164584,7 +164644,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -164601,7 +164661,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29268) + ts+29276) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -164610,7 +164670,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28420, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28428, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -164620,23 +164680,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29318, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29326, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29340, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29348, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28660 /* " DESC" */ + return ts + 28668 /* " DESC" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14536 /* ", " */ + zComma = ts + 14544 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29350, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29358, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29365, + ts+29373, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 0, 0)) } @@ -164660,7 +164720,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -164682,32 +164742,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29427 /* "PRIMARY KEY " */ + zPk = ts + 29435 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29440, + zSql = rbuMPrintf(tls, p, ts+29448, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29467 /* " NOT NULL" */ + return ts + 29475 /* " NOT NULL" */ } return ts + 1527 /* "" */ }())) - zComma = ts + 14536 /* ", " */ + zComma = ts + 14544 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29477, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29485, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29484, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29492, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29516 /* " WITHOUT ROWID" */ + return ts + 29524 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) @@ -164724,7 +164784,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -164734,12 +164794,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29531, + ts+29539, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -164761,7 +164821,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -164771,7 +164831,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29588) + ts+29596) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -164869,7 +164929,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -164881,7 +164941,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29654, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29662, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -164905,7 +164965,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29674, + ts+29682, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, 0, 0)) @@ -164914,14 +164974,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+29739, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29747, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+29775, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29783, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -164938,7 +164998,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29809, + ts+29817, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -164946,9 +165006,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29870 /* "AND" */ + return ts + 29878 /* "AND" */ } - return ts + 29874 /* "WHERE" */ + return ts + 29882 /* "WHERE" */ }() } return ts + 1527 /* "" */ @@ -164957,21 +165017,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29880, + ts+29888, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29941, + ts+29949, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29870 /* "AND" */ + return ts + 29878 /* "AND" */ } - return ts + 29874 /* "WHERE" */ + return ts + 29882 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -165009,17 +165069,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1527 } - return ts + 30100 + return ts + 30108 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+30109, + ts+30117, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30145 /* ", _rowid_" */ + return ts + 30153 /* ", _rowid_" */ } return ts + 1527 /* "" */ }(), zBindings))) @@ -165031,28 +165091,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30155, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30163, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30183 /* ", rbu_rowid" */ + zRbuRowid = ts + 30191 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30195, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30203, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30271 /* ", 0 AS rbu_rowid" */ + return ts + 30279 /* ", 0 AS rbu_rowid" */ } return ts + 1527 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30288, + ts+30296, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -165060,7 +165120,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30587, + ts+30595, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -165074,9 +165134,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30686 /* ",_rowid_ " */ + zRbuRowid = ts + 30694 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30696 /* ",rbu_rowid" */ + zRbuRowid = ts + 30704 /* ",rbu_rowid" */ } } @@ -165089,20 +165149,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28743, 0) + zOrder = rbuMPrintf(tls, p, ts+28751, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14536, ts+1527) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1527, ts+14544, ts+1527) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+30707, + ts+30715, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30755 /* "0 AS " */ + return ts + 30763 /* "0 AS " */ } return ts + 1527 /* "" */ }(), @@ -165115,7 +165175,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19700 /* "ORDER BY" */ + return ts + 19708 /* "ORDER BY" */ } return ts + 1527 /* "" */ }(), zOrder, @@ -165144,7 +165204,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -165195,9 +165255,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1527 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30100 /* "rbu_imp_" */ + zPrefix = ts + 30108 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30761, + zUpdate = Xsqlite3_mprintf(tls, ts+30769, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -165210,7 +165270,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -165233,7 +165293,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -165249,7 +165309,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -165265,7 +165325,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30791, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30799, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -165333,7 +165393,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -165345,21 +165405,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6325, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6325) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30821, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30829, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30848, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30856, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+48, ts+3230, uint64(4)) } else { libc.Xmemcpy(tls, p+48, ts+6325, uint64(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30866, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30874, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -165399,11 +165459,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30932, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30940, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24013, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24021, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -165415,13 +165475,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30964, + zTarget = Xsqlite3_mprintf(tls, ts+30972, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6325), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ } - return ts + 30996 /* "&" */ + return ts + 31004 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1527 /* "" */ @@ -165440,21 +165500,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30998, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31006, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31013, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31021, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31030, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31038, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -165462,7 +165522,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6325, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31046, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31054, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -165473,7 +165533,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31074, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31082, 0) } } @@ -165495,7 +165555,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -165503,7 +165563,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -165536,7 +165596,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -165544,7 +165604,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31046, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31054, uintptr(0), uintptr(0), uintptr(0)) } } @@ -165578,7 +165638,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31092, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31100, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -165628,7 +165688,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166014,7 +166074,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31166) + ts+31174) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -166027,7 +166087,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31188, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31196, libc.VaList(bp, iCookie+1)) } } } @@ -166035,7 +166095,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -166052,7 +166112,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31215, + ts+31223, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -166090,16 +166150,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31373, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31381, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31388, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31396, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -166109,18 +166169,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31408, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31416, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31433) + ts+31441) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -166134,12 +166194,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31541) + ts+31549) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+31606) + ts+31614) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -166151,7 +166211,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31650, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31658, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -166159,7 +166219,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -166173,8 +166233,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17132) - rbuCopyPragma(tls, p, ts+16243) + rbuCopyPragma(tls, p, ts+17140) + rbuCopyPragma(tls, p, ts+16251) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -166185,7 +166245,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31675, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31683, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -166211,10 +166271,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14440, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14448, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14448, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -166302,7 +166362,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -166320,7 +166380,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -166335,7 +166395,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31703, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31711, 0) } if rc == SQLITE_OK { @@ -166350,11 +166410,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31152, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31160, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -166369,7 +166429,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -166378,7 +166438,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31728, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31736, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -166390,7 +166450,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -166400,7 +166460,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -166417,7 +166477,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31739, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31747, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -166449,7 +166509,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -166460,7 +166520,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31811, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31819, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -166468,7 +166528,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31825) + ts+31833) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -166480,7 +166540,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31882) + ts+31890) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -166491,7 +166551,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -166563,7 +166623,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31956, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31964, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -166585,12 +166645,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31988, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31996, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32020 /* "vacuum" */ + return ts + 32028 /* "vacuum" */ } - return ts + 32027 /* "update" */ + return ts + 32035 /* "update" */ }())) } } @@ -166598,7 +166658,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14425, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14433, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -166612,14 +166672,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16846) - rbuCopyPragma(tls, p, ts+16258) + rbuCopyPragma(tls, p, ts+16854) + rbuCopyPragma(tls, p, ts+16266) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32034, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32042, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -166629,7 +166689,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6325, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32050, uintptr(0), uintptr(0), p+64) + db, ts+32058, uintptr(0), uintptr(0), p+64) } } @@ -166664,7 +166724,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -166675,7 +166735,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -166683,13 +166743,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32074, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32082, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -166698,7 +166758,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -166714,12 +166774,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30100, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30108, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -166732,13 +166792,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14440, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14448, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -166752,7 +166812,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14448, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -166764,7 +166824,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32082, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32090, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -166797,13 +166857,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -166836,7 +166896,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -166854,7 +166914,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -166863,7 +166923,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14440, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14448, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166882,19 +166942,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14448, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14425 /* "BEGIN" */ + zBegin = ts + 14433 /* "BEGIN" */ } else { - zBegin = ts + 32034 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32042 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32034, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32042, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166961,7 +167021,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -166978,7 +167038,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -166996,7 +167056,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -167018,7 +167078,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -167043,7 +167103,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -167058,7 +167118,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -167090,7 +167150,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -167099,20 +167159,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -167176,7 +167236,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -167215,7 +167275,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -167229,7 +167289,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -167243,7 +167303,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -167263,7 +167323,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -167283,7 +167343,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -167291,7 +167351,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -167299,7 +167359,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167326,7 +167386,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32109, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32117, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -167351,7 +167411,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32132, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32140, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -167362,7 +167422,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -167370,7 +167430,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -167378,7 +167438,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -167411,7 +167471,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -167468,13 +167528,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -167497,7 +167557,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -167539,7 +167599,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32143, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32151, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -167583,10 +167643,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -167595,7 +167655,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167640,7 +167700,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -167648,7 +167708,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -167658,7 +167718,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -167666,7 +167726,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -167674,7 +167734,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -167683,7 +167743,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -167692,7 +167752,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -167700,7 +167760,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -167708,13 +167768,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -167728,7 +167788,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -167789,17 +167849,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -167882,7 +167942,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -167953,7 +168013,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -167963,16 +168023,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -167986,13 +168046,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -168000,13 +168060,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -168016,13 +168076,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -168035,7 +168095,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -168043,7 +168103,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -168065,7 +168125,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -168153,7 +168213,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -168164,7 +168224,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -168187,14 +168247,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -168204,7 +168264,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -168217,7 +168277,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168283,7 +168343,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168309,7 +168369,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168352,7 +168412,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -168391,7 +168451,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -168430,7 +168490,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -168457,7 +168517,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -168532,7 +168592,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -168620,7 +168680,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -168684,7 +168744,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168701,13 +168761,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11218, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11226, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32154, 0) + ts+32162, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1527, 0) } else { @@ -168720,7 +168780,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32275, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32283, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -168815,7 +168875,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168832,7 +168892,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11218, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11226, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -168851,15 +168911,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168875,7 +168935,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168891,21 +168951,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -169019,7 +169079,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -169315,7 +169375,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -169350,7 +169410,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169385,25 +169445,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -169423,24 +169483,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -169448,13 +169508,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -169470,7 +169530,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -169480,9 +169540,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32304, + zRet = Xsqlite3_mprintf(tls, ts+32312, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ if zRet == uintptr(0) { break } @@ -169492,7 +169552,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -169505,9 +169565,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32338, + ts+32346, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32379 /* " OR " */ + zSep = ts + 32387 /* " OR " */ if zRet == uintptr(0) { break } @@ -169522,18 +169582,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32384, + ts+32392, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169561,7 +169621,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -169573,7 +169633,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32462, + ts+32470, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -169598,7 +169658,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -169711,7 +169771,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32515, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32523, 0) __16: ; rc = SQLITE_SCHEMA @@ -169771,7 +169831,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -169807,7 +169867,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -169829,7 +169889,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169867,7 +169927,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -169879,7 +169939,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -169930,7 +169990,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -169975,7 +170035,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -169998,7 +170058,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -170009,7 +170069,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -170020,7 +170080,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -170033,7 +170093,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr)) @@ -170047,7 +170107,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -170064,7 +170124,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -170085,7 +170145,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170145,7 +170205,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -170251,7 +170311,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170308,7 +170368,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -170316,10 +170376,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11218, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11226, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32542, libc.VaList(bp, zDb)) + ts+32550, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -170328,18 +170388,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1527 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32652, bp+24) + sessionAppendStr(tls, bp+8, ts+32660, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1540, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+32667, bp+24) + sessionAppendStr(tls, bp+8, ts+32675, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+32675, bp+24) + sessionAppendStr(tls, bp+8, ts+32683, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -170359,7 +170419,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170437,7 +170497,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -170458,7 +170518,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -170480,7 +170540,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32681, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32689, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -170578,7 +170638,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32701, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32709, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -170588,7 +170648,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -170600,7 +170660,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -170608,7 +170668,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -170620,7 +170680,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -170628,7 +170688,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -170640,7 +170700,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -170653,7 +170713,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -170667,12 +170727,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -170698,12 +170758,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -170736,28 +170796,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -170775,7 +170835,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170808,7 +170868,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170833,7 +170893,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -170869,7 +170929,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170887,7 +170947,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -170912,7 +170972,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -170954,7 +171014,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170973,7 +171033,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -171000,7 +171060,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -171042,7 +171102,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171062,7 +171122,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -171097,7 +171157,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -171154,13 +171214,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -171230,7 +171290,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -171261,7 +171321,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -171281,14 +171341,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -171302,7 +171362,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -171321,7 +171381,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -171343,7 +171403,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -171367,7 +171427,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -171384,7 +171444,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -171396,7 +171456,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -171413,7 +171473,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171649,7 +171709,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -171700,7 +171760,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -171715,7 +171775,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -171737,9 +171797,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -171761,9 +171821,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -171771,7 +171831,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -171832,7 +171892,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11218) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11226) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -171844,24 +171904,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32719, bp+16) + sessionAppendStr(tls, bp, ts+32727, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32732, bp+16) + sessionAppendStr(tls, bp, ts+32740, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32738, bp+16) + sessionAppendStr(tls, bp, ts+32746, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14536 /* ", " */ + zSep = ts + 14544 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1527 /* "" */ - sessionAppendStr(tls, bp, ts+32667, bp+16) + sessionAppendStr(tls, bp, ts+32675, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -171869,13 +171929,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32743, bp+16) + ts+32751, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32675, bp+16) + sessionAppendStr(tls, bp, ts+32683, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ } } @@ -171905,7 +171965,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -171933,7 +171993,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -171943,34 +172003,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32818, bp+16) + sessionAppendStr(tls, bp, ts+32826, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32667, bp+16) + sessionAppendStr(tls, bp, ts+32675, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32738, bp+16) + sessionAppendStr(tls, bp, ts+32746, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21366 /* " AND " */ + zSep = ts + 21374 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32836, bp+16) + sessionAppendStr(tls, bp, ts+32844, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32379, bp+16) + sessionAppendStr(tls, bp, ts+32387, bp+16) zSep = ts + 1527 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32675, bp+16) + sessionAppendStr(tls, bp, ts+32683, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32844 /* "AND " */ + zSep = ts + 32852 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4901, bp+16) @@ -171995,7 +172055,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6325, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -172007,7 +172067,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -172015,19 +172075,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32849, bp+16) + sessionAppendStr(tls, bp, ts+32857, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21372, bp+16) + sessionAppendStr(tls, bp, ts+21380, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14536, bp+16) + sessionAppendStr(tls, bp, ts+14544, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32867, bp+16) + sessionAppendStr(tls, bp, ts+32875, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32878, bp+16) + sessionAppendStr(tls, bp, ts+32886, bp+16) } sessionAppendStr(tls, bp, ts+4901, bp+16) @@ -172038,7 +172098,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -172046,24 +172106,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11218, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11226, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32882) + ts+32890) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32995) + ts+33003) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -172090,7 +172150,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172111,7 +172171,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -172135,7 +172195,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172179,7 +172239,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172251,7 +172311,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -172351,7 +172411,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -172486,7 +172546,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172508,7 +172568,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33139, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33147, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -172524,7 +172584,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33160, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33168, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -172533,7 +172593,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -172587,7 +172647,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -172605,10 +172665,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33179, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33187, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33205, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33213, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -172678,20 +172738,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33235, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33243, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33279, + ts+33287, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33350, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33358, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11218) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11226) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -172749,14 +172809,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33410, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33418, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33440, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33448, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33464, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33440, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33472, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33448, uintptr(0), uintptr(0), uintptr(0)) } } @@ -172778,7 +172838,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172796,7 +172856,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -172804,7 +172864,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172819,7 +172879,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -172827,7 +172887,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -172999,7 +173059,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -173130,7 +173190,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173184,7 +173244,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -173199,7 +173259,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173217,12 +173277,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173239,12 +173299,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -173252,7 +173312,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173276,7 +173336,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173303,7 +173363,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -173344,7 +173404,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -173406,7 +173466,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -173544,7 +173604,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -173559,7 +173619,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173574,7 +173634,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173590,7 +173650,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173606,7 +173666,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -173614,7 +173674,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -173702,7 +173762,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -173764,13 +173824,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -173808,14 +173868,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -173830,7 +173890,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -173841,7 +173901,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -173851,19 +173911,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -173896,7 +173956,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -173907,16 +173967,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -173931,7 +173991,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -173942,7 +174002,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -173959,7 +174019,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -173968,7 +174028,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -173987,7 +174047,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -173998,7 +174058,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -174014,7 +174074,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -174023,7 +174083,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -174035,9 +174095,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -174047,25 +174107,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -174073,17 +174133,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -174188,7 +174248,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -174261,7 +174321,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -174276,23 +174336,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -174329,9 +174389,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -174340,9 +174400,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -174352,7 +174412,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -174371,7 +174431,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -174387,7 +174447,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -174445,7 +174505,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -174453,7 +174513,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -174466,7 +174526,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -174490,7 +174550,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -174514,7 +174574,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -174525,7 +174585,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -174535,7 +174595,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33492, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33500, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -174544,7 +174604,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -174593,7 +174653,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -174626,7 +174686,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -174638,7 +174698,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174848,7 +174908,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174858,14 +174918,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33520, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33528, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -174894,7 +174954,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174949,7 +175009,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -175004,7 +175064,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -175047,11 +175107,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -175094,7 +175154,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{}))) @@ -175127,12 +175187,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -175141,7 +175201,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175149,7 +175209,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33551, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33559, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -175157,7 +175217,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175212,7 +175272,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -175223,7 +175283,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33558 /* "wrong number of ..." */ + var zErr uintptr = ts + 33566 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -175272,19 +175332,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -175308,7 +175368,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -175337,7 +175397,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -175395,7 +175455,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -175404,7 +175464,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -175427,7 +175487,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33608 /* "wrong number of ..." */ + var zErr uintptr = ts + 33616 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -175619,17 +175679,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -175640,7 +175700,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175734,7 +175794,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -175802,18 +175862,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33656, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33664, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33672, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33674, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33682, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -175838,7 +175898,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -175853,7 +175913,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -175879,7 +175939,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -175891,21 +175951,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -175923,7 +175983,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -175935,7 +175995,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -175953,7 +176013,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -175969,26 +176029,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176050,14 +176110,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -176069,7 +176129,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -176081,9 +176141,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176100,7 +176160,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -176121,7 +176181,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -176146,7 +176206,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -176171,13 +176231,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176186,7 +176246,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176232,7 +176292,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -176264,18 +176324,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -176288,7 +176348,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -176299,11 +176359,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -176392,7 +176452,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -176437,7 +176497,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -176450,11 +176510,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -176482,13 +176542,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33679, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33687, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -176515,14 +176575,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33686, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33694, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33717, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33725, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -176533,7 +176593,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33750, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33758, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -176546,7 +176606,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33787, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33795, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -176555,7 +176615,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33796, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33804, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -176574,7 +176634,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33829, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33837, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -176589,14 +176649,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33863, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33871, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33871, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33879, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33903, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33911, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -176604,9 +176664,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33909, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33917, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33923, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33931, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -176614,9 +176674,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33961, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33969, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33972, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33980, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -176627,25 +176687,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5019, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7898, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17237}, - {FzName: ts + 34007, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17245}, + {FzName: ts + 34015, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34015, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34023, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34046, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34054, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -176663,7 +176723,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -176697,20 +176757,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22007) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16159) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34074, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22015) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16167) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34082, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34104) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34112) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34114, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34122, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -176720,7 +176780,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -176728,13 +176788,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34145, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34153, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34150, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34158, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34157, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34165, libc.VaList(bp+16, i)) } } } @@ -176753,7 +176813,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -176782,8 +176842,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22007) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34165, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22015) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34173, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -176817,7 +176877,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34194, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34202, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -176858,19 +176918,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33863 /* "content" */ + zTail = ts + 33871 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34214 /* "docsize" */ + zTail = ts + 34222 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34222, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34230, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16159, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16167, -1) } // Formulate the zContentExprlist text @@ -176886,7 +176946,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -176911,7 +176971,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -176919,18 +176979,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34233, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34241, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1527 } - return ts + 14536 + return ts + 14544 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34249, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34257, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34256, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22007)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34264, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22015)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -176961,7 +177021,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -176975,7 +177035,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -177002,7 +177062,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177066,13 +177126,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34282) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34290) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -177082,7 +177142,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34287) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34295) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -177092,7 +177152,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34296) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34304) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -177105,7 +177165,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34306) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34314) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -177115,7 +177175,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34316) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34324) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -177131,7 +177191,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22007) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22015) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -177154,11 +177214,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34328 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34336 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -177181,7 +177241,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34360) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34368) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -177196,7 +177256,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34368, + ts+34376, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -177231,7 +177291,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -177250,9 +177310,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -177264,12 +177324,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -177331,7 +177391,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34433, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34441, 0) return FTS5_EOF } } @@ -177344,20 +177404,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34453, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34461, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34484, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34492, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34487, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34495, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29870, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29878, uint64(3)) == 0 { tok = FTS5_AND } break @@ -177369,15 +177429,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -177455,7 +177515,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -177530,7 +177590,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -177542,7 +177602,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -177550,7 +177610,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -177591,7 +177651,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -177613,7 +177673,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -177777,7 +177837,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -178002,11 +178062,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -178014,7 +178074,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -178026,9 +178086,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -178045,7 +178105,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -178247,7 +178307,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -178267,7 +178327,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178294,7 +178354,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178351,7 +178411,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -178417,7 +178477,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -178433,7 +178493,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -178442,7 +178502,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -178468,7 +178528,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -178487,7 +178547,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -178555,7 +178615,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -178614,7 +178674,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -178633,7 +178693,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -178651,7 +178711,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -178667,7 +178727,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -178693,7 +178753,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -178743,7 +178803,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -178755,7 +178815,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -178785,7 +178845,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -178801,7 +178861,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -178854,7 +178914,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -178916,7 +178976,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -178948,7 +179008,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -178964,15 +179024,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178982,7 +179042,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -179007,7 +179067,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -179019,7 +179079,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -179079,12 +179139,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179153,12 +179213,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -179169,12 +179229,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -179191,7 +179251,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -179249,7 +179309,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -179344,17 +179404,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34491, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34499, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33520, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33528, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179366,7 +179426,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34496, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34504, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -179385,7 +179445,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -179423,7 +179483,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -179445,7 +179505,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179463,7 +179523,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20369, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20377, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -179484,7 +179544,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -179499,7 +179559,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -179523,7 +179583,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -179551,21 +179611,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34525, 0) + ts+34533, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -179616,7 +179676,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte)) @@ -179636,7 +179696,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -179679,7 +179739,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179739,12 +179799,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34578, + ts+34586, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34628 /* "phrase" */ + return ts + 34636 /* "phrase" */ } - return ts + 34491 /* "NEAR" */ + return ts + 34499 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -179767,7 +179827,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -179813,7 +179873,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -179826,7 +179886,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -179836,7 +179896,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -179845,7 +179905,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -179866,7 +179926,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -179890,12 +179950,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -179905,7 +179965,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -179940,7 +180000,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -179968,7 +180028,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -179979,7 +180039,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -180029,12 +180089,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -180085,7 +180145,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -180101,14 +180161,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -180136,7 +180196,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -180145,7 +180205,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -180159,7 +180219,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -180168,7 +180228,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -180179,7 +180239,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -180209,7 +180269,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -180258,7 +180318,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -180417,7 +180477,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180463,7 +180523,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -180505,7 +180565,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -180539,20 +180599,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -180778,7 +180838,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -180986,14 +181046,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -181001,17 +181061,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -181025,18 +181085,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -181058,18 +181118,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -181086,9 +181146,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -181096,38 +181156,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -181135,7 +181195,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -181153,7 +181213,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -181177,7 +181237,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181188,7 +181248,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -181200,7 +181260,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -181227,7 +181287,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34635, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34643, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -181273,11 +181333,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -181289,7 +181349,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -181304,7 +181364,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181315,7 +181375,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+34641, + ts+34649, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -181332,7 +181392,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181343,7 +181403,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34692, + ts+34700, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -181357,7 +181417,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181367,7 +181427,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+34741, + ts+34749, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -181379,7 +181439,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -181390,22 +181450,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -181416,7 +181476,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -181458,7 +181518,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181551,7 +181611,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -181571,7 +181631,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -181594,7 +181654,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181622,7 +181682,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181631,7 +181691,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+34781, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34789, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -181655,7 +181715,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -181672,7 +181732,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -181686,7 +181746,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181739,14 +181799,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -181789,7 +181849,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -181838,7 +181898,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181874,7 +181934,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -181895,7 +181955,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -181908,7 +181968,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -181916,11 +181976,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -181941,7 +182001,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182003,7 +182063,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -182026,12 +182086,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -182041,7 +182101,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -182083,16 +182143,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -182122,7 +182182,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182151,7 +182211,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182196,7 +182256,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -182228,7 +182288,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182262,7 +182322,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -182284,7 +182344,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -182325,7 +182385,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182384,7 +182444,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -182434,7 +182494,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -182442,7 +182502,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182471,7 +182531,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -182576,7 +182636,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -182701,7 +182761,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -182801,7 +182861,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -182829,7 +182889,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -183063,7 +183123,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183071,7 +183131,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+34804, + ts+34812, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -183082,7 +183142,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -183152,7 +183212,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -183208,7 +183268,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -183223,7 +183283,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -183275,7 +183335,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -183305,7 +183365,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -183355,7 +183415,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -183366,7 +183426,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -183389,7 +183449,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -183429,7 +183489,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183440,7 +183500,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183479,7 +183539,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183504,12 +183564,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -183528,7 +183588,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -183545,21 +183605,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -183569,7 +183629,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183595,7 +183655,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183675,7 +183735,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -183731,7 +183791,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -183782,7 +183842,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183843,7 +183903,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -183851,7 +183911,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -183871,7 +183931,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -183879,7 +183939,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183895,7 +183955,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -183957,7 +184017,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183979,7 +184039,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -184024,7 +184084,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -184227,7 +184287,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -184260,7 +184320,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -184268,13 +184328,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -184293,7 +184353,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -184306,7 +184366,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -184348,7 +184408,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -184361,7 +184421,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -184371,7 +184431,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -184392,7 +184452,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) @@ -184411,7 +184471,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -184433,7 +184493,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -184466,7 +184526,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -184476,7 +184536,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -184489,7 +184549,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184505,7 +184565,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -184565,7 +184625,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -184601,14 +184661,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -184684,7 +184744,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -184713,7 +184773,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184742,7 +184802,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -184766,7 +184826,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184787,7 +184847,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+34888, + ts+34896, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -184806,7 +184866,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -184875,13 +184935,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -185040,7 +185100,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -185090,7 +185150,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -185107,7 +185167,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185124,7 +185184,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -185133,14 +185193,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185165,7 +185225,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -185343,7 +185403,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -185352,7 +185412,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -185413,7 +185473,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -185447,7 +185507,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185472,12 +185532,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -185504,7 +185564,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -185536,7 +185596,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -185546,13 +185606,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185569,7 +185629,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -185625,11 +185685,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -185640,7 +185700,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -185653,7 +185713,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -185818,7 +185878,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -185965,7 +186025,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -185985,7 +186045,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -185996,7 +186056,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -186007,7 +186067,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -186026,7 +186086,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186037,13 +186097,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34945, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34953, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24863, ts+34953, 0, pzErr) + pConfig, ts+24871, ts+34961, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11358, - ts+34988, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11366, + ts+34996, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -186060,7 +186120,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -186081,7 +186141,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -186108,7 +186168,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -186130,7 +186190,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -186154,7 +186214,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -186237,7 +186297,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -186245,7 +186305,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -186265,14 +186325,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186290,7 +186350,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -186303,7 +186363,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -186325,7 +186385,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -186333,7 +186393,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -186342,7 +186402,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186355,7 +186415,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34635, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34643, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -186364,7 +186424,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -186378,7 +186438,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -186398,7 +186458,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -186417,7 +186477,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -186476,7 +186536,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -186492,7 +186552,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35032, + ts+35040, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -186645,7 +186705,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -186704,7 +186764,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35118) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35126) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -186735,13 +186795,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -186774,7 +186834,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -186796,7 +186856,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -186804,9 +186864,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -186835,35 +186895,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -186897,21 +186957,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -186921,13 +186981,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -186945,7 +187005,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187003,11 +187063,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -187016,14 +187076,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -187094,7 +187154,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187115,7 +187175,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35123, 0) + ts+35131, 0) return SQLITE_ERROR } @@ -187256,7 +187316,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -187267,7 +187327,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -187293,7 +187353,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -187306,11 +187366,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -187353,7 +187413,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -187370,7 +187430,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187380,7 +187440,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -187414,7 +187474,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -187434,7 +187494,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -187463,7 +187523,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187522,7 +187582,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187550,7 +187610,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -187579,11 +187639,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35162, + ts+35170, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14536 /* ", " */ + return ts + 14544 /* ", " */ } return ts + 1527 /* "" */ }(), @@ -187595,9 +187655,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35217 /* "DESC" */ + return ts + 35225 /* "DESC" */ } - return ts + 35222 /* "ASC" */ + return ts + 35230 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -187617,7 +187677,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -187632,7 +187692,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187648,13 +187708,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35226, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35234, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5001, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35232, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35240, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -187664,7 +187724,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -187677,7 +187737,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -187689,7 +187749,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35260, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35268, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -187721,7 +187781,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35270, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35278, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -187730,7 +187790,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187753,21 +187813,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35291, libc.VaList(bp, z)) + ts+35299, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33674 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33682 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -187786,7 +187846,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187826,7 +187886,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35123, 0) + ts+35131, 0) return SQLITE_ERROR __1: ; @@ -188061,7 +188121,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35324, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35332, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -188107,7 +188167,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -188118,7 +188178,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -188132,7 +188192,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -188162,7 +188222,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188206,7 +188266,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -188228,7 +188288,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188236,29 +188296,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35360, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35368, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35371, 0) + ts+35379, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35451, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35459, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35459, 0) + ts+35467, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16826, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16834, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35515, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35523, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35521, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35529, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -188277,7 +188337,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -188287,7 +188347,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -188310,7 +188370,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -188332,7 +188392,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17371, z) { + 0 == Xsqlite3_stricmp(tls, ts+17379, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -188357,12 +188417,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35537, + ts+35545, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20270 /* "UPDATE" */ + return ts + 20278 /* "UPDATE" */ } - return ts + 35574 /* "DELETE from" */ + return ts + 35582 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -188412,7 +188472,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -188424,7 +188484,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -188433,7 +188493,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -188441,7 +188501,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -188449,46 +188509,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -188505,7 +188565,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188562,7 +188622,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -188646,7 +188706,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -188656,7 +188716,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -188672,11 +188732,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -188688,7 +188748,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188746,7 +188806,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188784,7 +188844,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -188806,7 +188866,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188828,7 +188888,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188851,7 +188911,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188884,7 +188944,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188965,10 +189025,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189004,7 +189064,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -189013,7 +189073,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -189023,7 +189083,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189036,7 +189096,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35586, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35594, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -189046,7 +189106,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -189068,7 +189128,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -189132,7 +189192,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -189172,7 +189232,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -189191,12 +189251,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -189204,7 +189264,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -189213,7 +189273,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -189222,7 +189282,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -189231,7 +189291,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -189262,7 +189322,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -189291,7 +189351,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -189309,7 +189369,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -189325,7 +189385,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189341,7 +189401,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35607, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35615, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -189360,7 +189420,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35629, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35637, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -189376,7 +189436,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -189402,28 +189462,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35660) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35668) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35673, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35681, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -189434,10 +189494,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35764, ts + 33863, ts + 24863, ts + 34214, ts + 11358, -} /* sqlite3.c:234311:21 */ + ts + 35772, ts + 33871, ts + 24871, ts + 34222, ts + 11366, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -189458,7 +189518,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35771, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35779, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -189476,13 +189536,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35771, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35779, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35776, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35784, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -189520,7 +189580,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -189529,7 +189589,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -189537,7 +189597,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -189548,20 +189608,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35791, - ts + 35859, - ts + 35928, + ts + 35799, + ts + 35867, + ts + 35936, - ts + 35961, - ts + 36000, - ts + 36040, - ts + 36079, - ts + 36120, + ts + 35969, + ts + 36008, + ts + 36048, + ts + 36087, + ts + 36128, - ts + 36159, + ts + 36167, - ts + 36201, - ts + 36241, + ts + 36209, + ts + 36249, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -189638,7 +189698,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -189660,79 +189720,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36264, + ts+36272, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36368, + ts+36376, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36406, + ts+36414, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36444, + ts+36452, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24863, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11358, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35764, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24871, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11366, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35772, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34214, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34222, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33863, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33871, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36486, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36494, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29516 /* " WITHOUT ROWID" */ + return ts + 29524 /* " WITHOUT ROWID" */ } return ts + 1527 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36516, + ts+36524, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -189745,7 +189805,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189774,27 +189834,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36560, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36568, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36583, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36591, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33863, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33871, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34214, ts+36589, 0, pzErr) + pConfig, ts+34222, ts+36597, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35764, ts+36621, 1, pzErr) + pConfig, ts+35772, ts+36629, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34360, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34368, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -189806,7 +189866,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -189825,12 +189885,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -189847,7 +189907,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -189916,7 +189976,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189943,7 +190003,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -189957,7 +190017,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189981,7 +190041,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190022,7 +190082,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -190034,12 +190094,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36638, + ts+36646, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36688, + ts+36696, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -190049,12 +190109,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34360, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34368, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -190118,15 +190178,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -190137,7 +190197,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190159,7 +190219,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190191,7 +190251,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -190236,7 +190296,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -190244,7 +190304,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36717, + zSql = Xsqlite3_mprintf(tls, ts+36725, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -190271,13 +190331,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190343,7 +190403,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -190441,14 +190501,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33863, bp+48) + rc = fts5StorageCount(tls, p, ts+33871, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34214, bp+56) + rc = fts5StorageCount(tls, p, ts+34222, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -190468,7 +190528,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -190482,7 +190542,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -190492,7 +190552,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -190510,7 +190570,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190541,7 +190601,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -190559,7 +190619,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -190576,7 +190636,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -190590,12 +190650,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190650,13 +190710,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -190666,12 +190726,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -190687,9 +190747,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36749) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36757) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36760) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36768) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -190706,7 +190766,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -190718,7 +190778,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -190799,7 +190859,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -190809,11 +190869,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -190868,7 +190928,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -190890,7 +190950,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -190900,7 +190960,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -190920,7 +190980,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -190931,7 +190991,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36771 /* "L* N* Co" */ + var zCat uintptr = ts + 36779 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -190944,7 +191004,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36780) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -190955,18 +191015,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36791) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36799) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36749) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36757) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36760) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36768) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36780) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36788) { // no-op } else { rc = SQLITE_ERROR @@ -190988,12 +191048,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -191249,7 +191309,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -191258,10 +191318,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -191272,7 +191332,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191280,7 +191340,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36809 /* "unicode61" */ + var zBase uintptr = ts + 36817 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -191325,9 +191385,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -191337,15 +191397,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -191366,12 +191426,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -191381,7 +191441,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -191391,7 +191451,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -191409,14 +191469,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -191431,13 +191491,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36819, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36827, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191445,11 +191505,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36822, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36830, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36827, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36835, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -191457,7 +191517,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36832, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36840, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191465,7 +191525,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36835, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191473,11 +191533,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36838, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36846, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36851, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -191485,19 +191545,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36848, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36856, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36852, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36871, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191505,11 +191565,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36867, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36875, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36871, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36879, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -191517,7 +191577,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191525,11 +191585,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36890, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191537,22 +191597,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36890, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36894, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -191560,34 +191604,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36898, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36898, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36878, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36906, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36886, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36901, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36904, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36909, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36912, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36908, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36894, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36902, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -191597,143 +191657,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36911, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36919, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36878, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36886, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36919, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36927, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36926, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36934, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36931, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36939, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36827, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36835, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36944, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36822, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36830, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36941, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36949, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36894, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36902, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36954, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15372, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15380, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36904, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36912, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36963, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36819, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36827, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36968, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36863, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36871, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36974, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36970, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36978, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36972, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36980, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36886, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36894, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36978, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36986, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36894, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36902, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36986, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36878, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36886, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36992, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37000, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36878, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36886, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36997, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37005, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36819, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36827, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36890, uint64(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37011, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37019, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36898, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37023, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37019, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36886, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37027, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36894, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37031, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36819, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36827, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37037, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37045, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36890, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36898, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36904, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36912, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -191743,22 +191803,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36835, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36843, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37055, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -191766,21 +191826,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36835, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36843, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37066, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37074, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36835, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36843, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37019, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37027, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191788,7 +191848,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37080, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -191796,9 +191856,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37078, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37086, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36819, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36827, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -191808,18 +191868,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37084, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37092, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37088, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37096, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37091, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -191828,7 +191888,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37094, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37102, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -191845,7 +191905,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -191861,7 +191921,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191959,7 +192019,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -191980,20 +192040,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -192004,7 +192064,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37098) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37106) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -192024,7 +192084,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -192177,7 +192237,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -192191,27 +192251,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36809, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36817, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37113, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37121, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37119, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37127, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37126, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -192237,7 +192297,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -192260,7 +192320,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -192331,7 +192391,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -192350,7 +192410,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -192411,7 +192471,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -192469,7 +192529,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -192481,9 +192541,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -192680,7 +192740,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -192859,7 +192919,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -193038,9 +193098,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -193080,7 +193140,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -193112,7 +193172,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -193187,7 +193247,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -193363,7 +193423,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -193409,7 +193469,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -193422,7 +193482,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -193482,7 +193542,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -193522,7 +193582,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -193543,9 +193603,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -193553,7 +193613,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -193561,14 +193621,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37134) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37142) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37138) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37146) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37142) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37150) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37151, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37159, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -193578,14 +193638,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -193610,24 +193670,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 37185, - ts + 37225, - ts + 37260, + ts + 37193, + ts + 37233, + ts + 37268, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23159, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23167, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37303, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37311, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -193680,11 +193740,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -193698,7 +193758,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -193766,7 +193826,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -193779,11 +193839,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37336, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37344, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37367, + ts+37375, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -193807,7 +193867,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37418, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37426, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -193833,7 +193893,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -193847,7 +193907,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -193856,7 +193916,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -193887,7 +193947,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -193916,7 +193976,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -194060,7 +194120,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -194134,12 +194194,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -194212,16 +194272,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37444, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37452, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -194238,7 +194298,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -194265,963 +194325,963 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37454 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37462 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Uid_t, Gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-11.0.1\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-11.0.1\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go index fcb3709f..09141ac0 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -2142,7 +2142,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2250,8 +2250,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3732,7 +3732,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5527,7 +5527,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -5551,7 +5551,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 FaConstraint uintptr @@ -5566,12 +5566,12 @@ type sqlite3_index_info = struct { FestimatedRows Sqlite3_int64 FidxFlags int32 FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 FxCreate uintptr @@ -5599,7 +5599,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5707,7 +5707,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5813,7 +5813,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5919,7 +5919,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -5994,7 +5994,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -6059,7 +6059,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6084,7 +6084,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6100,7 +6100,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -6123,7 +6123,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6296,7 +6296,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6455,7 +6455,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6472,12 +6472,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6510,7 +6510,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6530,7 +6530,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6550,7 +6550,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6593,7 +6593,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6630,7 +6630,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -6648,13 +6648,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6683,7 +6683,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6696,7 +6696,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -6716,13 +6716,13 @@ type sqlite3_changeset_iter = struct { FbIndirect int32 FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6732,13 +6732,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6940,7 +6940,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7142,7 +7142,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7195,7 +7195,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7227,22 +7227,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7261,7 +7261,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7275,7 +7275,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7896,7 +7896,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7904,7 +7904,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -9655,13 +9655,13 @@ type Max_align_t = struct { // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -9672,7 +9672,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -9695,12 +9695,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U32 /* sqlite3.c:14287:15 */ +type Uptr = U32 /* sqlite3.c:14291:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -9722,7 +9722,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -9864,13 +9864,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -9878,7 +9878,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -9889,7 +9889,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -9899,7 +9899,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -9913,7 +9913,7 @@ type Column1 = struct { F__ccgo_pad3 [2]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -9924,7 +9924,7 @@ type Cte1 = struct { F__ccgo_pad1 [3]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -9935,7 +9935,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -9945,7 +9945,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -9955,9 +9955,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -9972,7 +9972,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -9995,7 +9995,7 @@ type Expr1 = struct { } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -10016,7 +10016,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -10032,16 +10032,16 @@ type FKey1 = struct { FiFrom int32 FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -10056,16 +10056,16 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -10095,7 +10095,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -10104,7 +10104,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -10117,7 +10117,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -10135,10 +10135,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -10148,7 +10148,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -10158,9 +10158,9 @@ type NameContext1 = struct { FnNcErr int32 FncFlags int32 FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -10235,14 +10235,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -10260,21 +10260,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -10283,9 +10283,9 @@ type Returning1 = struct { FiRetCur int32 FnRetCol int32 FiRetReg int32 -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -10296,9 +10296,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -10306,7 +10306,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -10330,14 +10330,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -10347,9 +10347,9 @@ type SelectDest1 = struct { FnSdst int32 FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -10375,15 +10375,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -10412,7 +10412,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -10421,13 +10421,13 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -10443,7 +10443,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -10452,7 +10452,7 @@ type TriggerPrg1 = struct { FaColmask [2]U32 } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -10470,7 +10470,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -10483,7 +10483,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -10500,7 +10500,7 @@ type Upsert1 = struct { FiIdxCur int32 } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -10513,7 +10513,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -10521,7 +10521,7 @@ type VtabCtx1 = struct { FbDeclared int32 } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -10531,9 +10531,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -10562,9 +10562,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -10598,7 +10598,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -10606,14 +10606,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -10624,7 +10624,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -10651,7 +10651,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -10721,7 +10721,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -10739,7 +10739,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -10810,7 +10810,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -10835,7 +10835,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -10871,7 +10871,7 @@ type BtShared1 = struct { FnPreformatSize int32 } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -10881,9 +10881,9 @@ type BtreePayload1 = struct { F__ccgo_pad1 [2]byte FnData int32 FnZero int32 -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -10985,11 +10985,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -11000,7 +11000,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -11020,7 +11020,7 @@ type VdbeOp1 = struct { // as an instance of the following structure: type p4union = struct{ Fi int32 } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -11029,11 +11029,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -11098,7 +11098,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -11116,10 +11116,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -11194,7 +11194,7 @@ type sqlite3InitInfo = struct { type sColMap = struct { FiFrom int32 FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -11243,7 +11243,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -11335,7 +11335,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -11347,7 +11347,7 @@ type InitData = struct { FmInitFlags U32 FnInitRow U32 FmxPage Pgno -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -11408,7 +11408,7 @@ type Sqlite3Config = struct { FiOnceResetThreshold int32 FszSorterRef U32 FiPrngSeed uint32 -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11431,7 +11431,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11452,7 +11452,7 @@ type RefSrcList = struct { type IdxCover = struct { FpIdx uintptr FiCur int32 -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11478,7 +11478,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11502,7 +11502,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11527,7 +11527,7 @@ type WhereConst1 = struct { FnChng int32 FbHasAffBlob int32 FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11551,7 +11551,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -11679,9 +11679,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1039, ts + 1053, ts + 1066, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint32(unsafe.Sizeof(sqlite3azCompileOpt)) / uint32(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -11748,10 +11748,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -11815,7 +11815,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -11875,12 +11875,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -11898,21 +11898,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -11928,7 +11928,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -11936,7 +11936,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -11944,7 +11944,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1086, ts + 1090, @@ -11952,7 +11952,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1099, ts + 1107, ts + 1112, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -11997,10 +11997,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -12023,10 +12023,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -12038,7 +12038,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -12089,7 +12089,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -12154,7 +12154,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -12168,7 +12168,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -12180,13 +12180,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [2]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12197,7 +12197,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12205,7 +12205,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12220,7 +12220,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12232,20 +12232,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = U32 /* sqlite3.c:22681:13 */ +type Sqlite3StatValueType = U32 /* sqlite3.c:22690:13 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -12260,7 +12260,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -12270,7 +12270,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return Sqlite3_int64(*(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4))) } @@ -12284,7 +12284,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 40 + uintptr(op)*4)) { @@ -12292,14 +12292,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -12310,12 +12310,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -12333,7 +12333,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -12349,7 +12349,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -12359,7 +12359,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -12371,7 +12371,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -12953,14 +12953,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -12987,7 +12987,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -13044,7 +13044,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -13060,7 +13060,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -13134,7 +13134,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13187,7 +13187,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -13196,7 +13196,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -13252,7 +13252,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13303,7 +13303,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -13318,7 +13318,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -13341,7 +13341,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13370,12 +13370,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -13420,7 +13420,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -13439,13 +13439,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -13475,7 +13475,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -13500,7 +13500,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -13540,7 +13540,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -13568,7 +13568,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1211 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -13592,7 +13592,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -13918,7 +13918,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -13959,7 +13959,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -13975,7 +13975,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -13990,7 +13990,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -14039,7 +14039,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14067,7 +14067,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14119,7 +14119,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -14263,7 +14263,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -14272,7 +14272,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -14281,7 +14281,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -14290,7 +14290,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint32(unsafe.Sizeof(aDateTimeFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } @@ -14303,7 +14303,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1343}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1352}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1365}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -14355,7 +14355,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -14364,27 +14364,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -14394,27 +14394,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -14427,7 +14427,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -14436,7 +14436,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14444,7 +14444,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -14456,7 +14456,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -14465,23 +14465,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -14489,14 +14489,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -14504,7 +14504,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -14518,7 +14518,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -14528,14 +14528,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -14543,7 +14543,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -14551,25 +14551,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint32(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -14586,13 +14586,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14601,7 +14601,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14626,7 +14626,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -14646,7 +14646,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -14656,7 +14656,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -14666,11 +14666,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -14692,7 +14692,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -14712,7 +14712,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14735,7 +14735,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14780,7 +14780,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -14811,8 +14811,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -14822,7 +14822,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -14831,14 +14831,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -14936,7 +14936,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14959,7 +14959,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -14968,7 +14968,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -14984,7 +14984,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15006,18 +15006,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -15026,7 +15026,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15041,7 +15041,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -15175,7 +15175,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -15209,7 +15209,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -15219,7 +15219,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15232,7 +15232,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -15243,7 +15243,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -15252,7 +15252,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -15261,7 +15261,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -15276,7 +15276,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -15315,40 +15315,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -15361,11 +15361,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -15428,7 +15428,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -15440,22 +15440,22 @@ type Mem0Global = struct { FalarmThreshold Sqlite3_int64 FhardLimit Sqlite3_int64 FnearlyFull int32 -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -15471,7 +15471,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -15499,7 +15499,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -15516,7 +15516,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -15535,7 +15535,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -15558,12 +15558,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+20, 0) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -15571,7 +15571,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15586,7 +15586,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15599,7 +15599,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -15610,7 +15610,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -15657,7 +15657,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -15686,7 +15686,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15696,7 +15696,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15704,27 +15704,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -15743,7 +15743,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -15754,7 +15754,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -15772,14 +15772,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -15805,7 +15805,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -15813,7 +15813,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -15874,7 +15874,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15884,7 +15884,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15892,7 +15892,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -15902,7 +15902,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -15914,7 +15914,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -15945,7 +15945,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -15955,7 +15955,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -15993,7 +15993,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16013,7 +16013,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -16037,7 +16037,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -16051,7 +16051,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -16065,7 +16065,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -16083,7 +16083,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -16096,7 +16096,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -16112,7 +16112,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -16133,7 +16133,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+304, int32(0), 0) @@ -16149,7 +16149,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -16168,7 +16168,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -16197,7 +16197,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -16208,18 +16208,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -16246,7 +16246,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -16257,7 +16257,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -16272,7 +16272,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -16287,7 +16287,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -16299,21 +16299,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -16327,7 +16327,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -16349,7 +16349,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -17838,7 +17838,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29902:29 */ // End of function @@ -17846,7 +17846,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -17873,7 +17873,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 36)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -17888,7 +17888,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -17942,7 +17942,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -17958,7 +17958,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint32(N)) @@ -17968,7 +17968,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -17980,14 +17980,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -18001,7 +18001,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -18013,7 +18013,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -18031,10 +18031,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -18046,7 +18046,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -18054,7 +18054,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -18062,7 +18062,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -18071,7 +18071,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 21)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -18093,7 +18093,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -18104,7 +18104,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -18122,7 +18122,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -18144,7 +18144,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -18156,7 +18156,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -18176,7 +18176,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -18200,7 +18200,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -18215,7 +18215,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -18237,7 +18237,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(234) defer tls.Free(234) @@ -18255,7 +18255,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -18267,7 +18267,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -18322,7 +18322,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -18366,10 +18366,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -18448,16 +18448,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint32(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -18465,7 +18465,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -18487,7 +18487,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -18556,7 +18556,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -18583,7 +18583,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -18610,7 +18610,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -18935,7 +18935,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -18969,7 +18969,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -19001,7 +19001,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -19022,7 +19022,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -19320,7 +19320,7 @@ type Double_t = float64 /* math.h:156:21 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -19332,7 +19332,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19352,7 +19352,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -19364,7 +19364,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4)) != 0 { @@ -19379,7 +19379,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -19389,7 +19389,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -19401,7 +19401,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -19412,7 +19412,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -19432,7 +19432,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -19459,7 +19459,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -19490,7 +19490,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -19515,7 +19515,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -19547,7 +19547,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -19567,7 +19567,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -19585,7 +19585,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -19600,7 +19600,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -19612,7 +19612,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -19638,7 +19638,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -19662,7 +19662,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -19678,7 +19678,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -19721,7 +19721,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -20101,7 +20101,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -20142,7 +20142,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -20171,7 +20171,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -20293,7 +20293,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20326,7 +20326,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20388,7 +20388,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20401,7 +20401,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -20444,7 +20444,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -20490,7 +20490,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -20513,7 +20513,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -20666,7 +20666,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20734,7 +20734,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -20742,7 +20742,7 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20752,7 +20752,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20763,7 +20763,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -20773,7 +20773,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -20791,7 +20791,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20812,7 +20812,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1535) @@ -20831,7 +20831,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -20848,21 +20848,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023: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:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043: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:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -20876,7 +20876,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -20907,11 +20907,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -20929,11 +20929,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -20954,7 +20954,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -21006,7 +21006,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -21045,7 +21045,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21064,7 +21064,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21103,7 +21103,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -21114,7 +21114,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -21131,7 +21131,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -21146,7 +21146,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -21183,7 +21183,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -21227,7 +21227,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -21256,11 +21256,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -21289,7 +21289,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -21307,7 +21307,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -21356,7 +21356,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -21546,7 +21546,7 @@ var azName = [185]uintptr{ ts + 3189, ts + 3194, ts + 3202, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -23127,7 +23127,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -23160,7 +23160,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -23174,10 +23174,10 @@ type unixShmNode = struct { FnRef int32 FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -23194,18 +23194,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -23230,16 +23230,16 @@ type unixFile = struct { FpMapRegion uintptr FsectorSize int32 FdeviceCharacteristics int32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -23264,7 +23264,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -23279,7 +23279,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -23347,14 +23347,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3410, FpCurrent: 0}, {FzName: ts + 3416}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*12 + 4)))(tls) != 0 { return 0 } @@ -23365,7 +23365,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -23402,7 +23402,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -23418,7 +23418,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -23456,7 +23456,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -23523,14 +23523,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -23540,7 +23540,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*12 + 4)))(tls, h, sz) @@ -23556,7 +23556,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -23605,7 +23605,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -23706,12 +23706,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -23729,7 +23729,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -23763,7 +23763,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3217, func() uintptr { @@ -23777,19 +23777,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -23799,7 +23799,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -23833,7 +23833,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -23892,7 +23892,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -23909,7 +23909,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -23945,7 +23945,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24011,7 +24011,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24063,7 +24063,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -24310,7 +24310,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -24331,7 +24331,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -24465,7 +24465,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -24478,11 +24478,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -24492,7 +24492,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -24542,26 +24542,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -24602,7 +24602,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -24638,7 +24638,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -24680,7 +24680,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -24715,7 +24715,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -24814,7 +24814,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -24852,7 +24852,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -24907,7 +24907,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -24933,13 +24933,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+20) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -24996,7 +24996,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -25042,7 +25042,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -25069,7 +25069,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3329, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3329, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -25085,7 +25085,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25104,7 +25104,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -25116,7 +25116,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -25127,7 +25127,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -25142,7 +25142,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -25158,7 +25158,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -25189,7 +25189,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -25234,7 +25234,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -25249,7 +25249,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -25260,7 +25260,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25371,7 +25371,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -25392,7 +25392,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -25409,7 +25409,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -25419,7 +25419,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -25431,7 +25431,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25463,7 +25463,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25504,7 +25504,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*12 + 4)))(tls) // System page size // Page size must be a power of 2 @@ -25518,7 +25518,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -25535,7 +25535,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -25550,7 +25550,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25594,7 +25594,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -25641,7 +25641,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -25737,7 +25737,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3212, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3212, zShm, 39446) goto shm_open_err __10: ; @@ -25805,7 +25805,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -25908,7 +25908,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39590) goto shmpage_out __14: ; @@ -25956,7 +25956,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -26014,7 +26014,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -26028,7 +26028,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -26135,7 +26135,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -26148,7 +26148,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -26191,7 +26191,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint32((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -26214,7 +26214,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3370 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -26248,7 +26248,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -26273,7 +26273,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26310,7 +26310,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -26337,7 +26337,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -26398,33 +26398,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -26437,7 +26437,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -26447,7 +26447,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26504,7 +26504,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -26527,7 +26527,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -26545,17 +26545,17 @@ var azTempDirs = [6]uintptr{ ts + 3680, ts + 3689, ts + 1547, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3694) azTempDirs[1] = libc.Xgetenv(tls, ts+3708) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26582,7 +26582,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -26626,7 +26626,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26677,7 +26677,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26713,7 +26713,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -26787,7 +26787,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(528) defer tls.Free(528) @@ -26985,7 +26985,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3212, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3212, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -27085,7 +27085,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27096,7 +27096,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41141) } return rc } @@ -27106,9 +27106,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -27125,7 +27125,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -27147,7 +27147,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -27170,7 +27170,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -27181,7 +27181,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, zOut, uint32(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3230, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3230, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -27190,7 +27190,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3614, libc.VaList(bp, zPath)) @@ -27241,7 +27241,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -27267,7 +27267,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*12 + 4)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3410, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3410, zIn, 41322) } } else { bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000)) @@ -27281,20 +27281,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, zDel, uint32(nOut-1)) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3401, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3401, zIn, 41340) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint32(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint32(n)) @@ -27364,7 +27364,7 @@ type Dl_serinfo = struct { } } /* dlfcn.h:196:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -27374,7 +27374,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27388,7 +27388,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -27414,13 +27414,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27455,7 +27455,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { got = (*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*12 + 4)))(tls, fd, zBuf, uint32(nBuf)) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -27468,7 +27468,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -27491,7 +27491,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27505,12 +27505,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27526,7 +27526,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -27708,7 +27708,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -27746,14 +27746,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3763, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3773, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3653, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -27795,14 +27795,14 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -27815,9 +27815,9 @@ type MemStore1 = struct { FnWrLock int32 FnRef int32 FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -27826,13 +27826,13 @@ type MemStore = MemStore1 /* sqlite3.c:49088:25 */ type MemFS = struct { FnMemStore int32 FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -27849,7 +27849,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -27865,21 +27865,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -27917,7 +27917,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -27934,7 +27934,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -27956,7 +27956,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -27987,7 +27987,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -28002,14 +28002,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -28018,7 +28018,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -28062,7 +28062,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28091,13 +28091,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -28111,7 +28111,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -28122,7 +28122,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -28197,7 +28197,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -28208,7 +28208,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28218,7 +28218,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -28227,21 +28227,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -28249,7 +28249,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -28257,19 +28257,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -28277,7 +28277,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -28300,7 +28300,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28391,7 +28391,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -28486,7 +28486,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -28508,7 +28508,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -28521,7 +28521,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -28550,7 +28550,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -28564,7 +28564,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -28701,7 +28701,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -28740,7 +28740,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -28755,7 +28755,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -28792,7 +28792,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -28955,7 +28955,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -29017,7 +29017,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -29029,7 +29029,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -29054,7 +29054,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -29067,7 +29067,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -29075,7 +29075,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -29089,7 +29089,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -29106,7 +29106,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -29153,7 +29153,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -29181,7 +29181,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -29232,7 +29232,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29252,7 +29252,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29268,7 +29268,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -29281,7 +29281,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -29290,7 +29290,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -29303,7 +29303,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -29318,7 +29318,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -29330,7 +29330,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -29339,7 +29339,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -29349,7 +29349,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -29358,7 +29358,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -29377,7 +29377,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -29411,19 +29411,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -29462,7 +29462,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -29505,7 +29505,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -29517,17 +29517,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -29535,7 +29535,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -29547,7 +29547,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -29564,20 +29564,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint32(unsafe.Sizeof(PgHdr{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -29692,7 +29692,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -29778,7 +29778,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -29788,12 +29788,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -29801,9 +29801,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -29820,10 +29820,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -29841,7 +29841,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -29874,7 +29874,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -29919,7 +29919,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -29952,7 +29952,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -29982,7 +29982,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -29996,7 +29996,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -30034,7 +30034,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -30051,13 +30051,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -30075,7 +30075,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -30091,7 +30091,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -30132,7 +30132,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -30149,7 +30149,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -30167,7 +30167,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -30188,7 +30188,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -30236,7 +30236,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -30274,7 +30274,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -30283,7 +30283,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -30333,7 +30333,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -30356,7 +30356,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30371,7 +30371,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -30386,7 +30386,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -30504,7 +30504,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -30533,7 +30533,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -30544,7 +30544,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -30558,7 +30558,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30583,7 +30583,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -30614,7 +30614,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -30627,7 +30627,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30650,7 +30650,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30670,16 +30670,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint32(unsafe.Sizeof(PgHdr1{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -30690,7 +30690,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -30788,7 +30788,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -30801,13 +30801,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -30827,7 +30827,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -30846,7 +30846,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -30857,7 +30857,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -30880,7 +30880,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -30910,7 +30910,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -30945,7 +30945,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -30981,7 +30981,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -31012,7 +31012,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -31043,7 +31043,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -31076,7 +31076,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -31109,7 +31109,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31292,7 +31292,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -32060,7 +32060,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -32093,11 +32093,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -32120,7 +32120,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -32142,7 +32142,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32159,7 +32159,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32176,7 +32176,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -32203,7 +32203,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -32237,7 +32237,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -32271,7 +32271,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -32330,7 +32330,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -32359,7 +32359,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32394,7 +32394,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -32409,7 +32409,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -32519,7 +32519,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32629,7 +32629,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32689,21 +32689,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*48)).FpInSavepoint) @@ -32720,7 +32720,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -32749,7 +32749,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -32841,7 +32841,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -32866,7 +32866,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -32930,7 +32930,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -33057,7 +33057,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -33089,7 +33089,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -33134,7 +33134,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33368,7 +33368,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33534,7 +33534,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33569,7 +33569,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -33601,7 +33601,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -33669,7 +33669,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -33804,39 +33804,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+76, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -33845,25 +33851,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -33872,10 +33878,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -33893,7 +33899,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -33902,24 +33908,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -33927,14 +33933,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint32(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3845, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -33954,7 +33960,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34008,7 +34014,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -34035,7 +34041,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -34066,7 +34072,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -34097,7 +34103,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -34145,7 +34151,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34176,7 +34182,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34230,7 +34236,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34298,7 +34304,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -34407,18 +34413,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34434,13 +34440,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -34493,7 +34499,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -34557,7 +34563,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -34585,7 +34591,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -34622,7 +34628,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34691,7 +34697,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -34700,7 +34706,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -34731,7 +34737,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint32(N)) @@ -34754,7 +34760,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -34771,7 +34777,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -34816,7 +34822,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -34843,7 +34849,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -34862,7 +34868,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -34892,7 +34898,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -34902,7 +34908,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -34915,7 +34921,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34953,7 +34959,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -35002,7 +35008,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -35039,7 +35045,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -35153,7 +35159,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -35185,7 +35191,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35265,7 +35271,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -35289,7 +35295,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -35320,7 +35326,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -35346,7 +35352,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -35408,7 +35414,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -35455,7 +35461,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -35581,7 +35587,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -35900,7 +35906,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -35938,7 +35944,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -36049,7 +36055,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -36175,7 +36181,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -36324,7 +36330,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -36386,7 +36392,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36399,7 +36405,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -36445,7 +36451,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -36517,7 +36523,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -36537,7 +36543,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -36575,7 +36581,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -36584,7 +36590,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -36600,7 +36606,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -36621,7 +36627,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -36633,13 +36639,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -36668,7 +36674,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -36750,7 +36756,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -36810,7 +36816,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -36860,7 +36866,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -36934,7 +36940,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37022,7 +37028,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -37063,7 +37069,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -37093,7 +37099,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37163,7 +37169,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -37186,7 +37192,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -37222,7 +37228,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37412,7 +37418,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -37469,7 +37475,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -37513,13 +37519,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint32(unsafe.Sizeof(PgHdr{}))+uint32(5)*uint32(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -37528,7 +37534,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -37541,7 +37547,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 188 + uintptr(eStat)*4)) @@ -37551,7 +37557,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -37563,7 +37569,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -37603,7 +37609,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -37641,7 +37647,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -37702,30 +37708,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -37733,7 +37739,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -37760,7 +37766,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37822,7 +37828,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -37882,21 +37888,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -37908,7 +37914,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -37934,7 +37940,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -38004,14 +38010,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -38026,7 +38032,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -38038,12 +38044,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 92 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -38055,7 +38061,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -38083,13 +38089,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -38099,7 +38105,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -38116,7 +38122,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -38152,7 +38158,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -38182,7 +38188,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38222,7 +38228,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -38233,7 +38239,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38245,7 +38251,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -38265,7 +38271,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38277,7 +38283,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -38856,7 +38862,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -38867,18 +38873,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -38886,7 +38892,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -38907,7 +38913,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -38938,7 +38944,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -38984,7 +38990,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -38992,13 +38998,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -39016,7 +39022,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -39048,7 +39054,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -39063,7 +39069,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -39087,7 +39093,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 @@ -39110,7 +39116,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 var pgno U32 // Page number of the frame @@ -39152,7 +39158,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39163,7 +39169,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39172,7 +39178,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39183,7 +39189,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39195,12 +39201,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -39211,12 +39217,12 @@ type WalHashLoc1 = struct { FaHash uintptr FaPgno uintptr FiZero U32 -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -39230,7 +39236,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+4) @@ -39253,14 +39259,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((iFrame + U32(HASHTABLE_NPAGE) - (uint32(HASHTABLE_NPAGE) - (uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))) - U32(1)) / U32(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))+iFrame-uint32(1))*4)) @@ -39278,7 +39284,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -39321,7 +39327,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -39362,7 +39368,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -39381,7 +39387,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -39496,7 +39502,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -39700,7 +39706,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -39726,7 +39732,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -39798,7 +39804,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -39812,7 +39818,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -39859,7 +39865,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -39905,7 +39911,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -39950,10 +39956,10 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt type Sublist = struct { FnList int32 FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -39968,7 +39974,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40052,7 +40058,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -40064,7 +40070,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -40083,7 +40089,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -40134,7 +40140,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -40265,7 +40271,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+12) @@ -40426,7 +40432,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40445,7 +40451,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40517,7 +40523,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -40586,7 +40592,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40666,7 +40672,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -40711,7 +40717,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -40977,7 +40983,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -41194,7 +41200,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -41268,7 +41274,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -41356,7 +41362,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -41370,7 +41376,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -41437,7 +41443,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -41453,7 +41459,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -41470,7 +41476,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -41488,7 +41494,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -41520,7 +41526,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -41540,7 +41546,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -41577,7 +41583,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) @@ -41589,7 +41595,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -41620,7 +41626,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41674,12 +41680,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -41687,7 +41693,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -41709,7 +41715,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41734,7 +41740,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41788,7 +41794,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -42021,7 +42027,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42086,7 +42092,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -42130,7 +42136,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -42161,7 +42167,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -42195,14 +42201,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -42221,16 +42227,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -42260,7 +42266,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -42276,13 +42282,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -42802,7 +42808,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -42811,7 +42817,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -42820,7 +42826,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -42930,7 +42936,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -43026,7 +43032,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -43040,7 +43046,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -43049,7 +43055,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -43070,7 +43076,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -43098,7 +43104,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -43129,7 +43135,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -43152,7 +43158,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -43167,13 +43173,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -43185,7 +43191,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -43196,11 +43202,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -43223,7 +43229,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -43249,14 +43255,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -43273,7 +43279,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -43330,7 +43336,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -43381,7 +43387,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 76 @@ -43416,7 +43422,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -43440,7 +43446,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43459,7 +43465,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -43506,7 +43512,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -43526,20 +43532,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -43561,7 +43567,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -43598,7 +43604,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -43639,7 +43645,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43660,7 +43666,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -43679,7 +43685,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -43689,7 +43695,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -43702,7 +43708,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -43719,7 +43725,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43759,7 +43765,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -43767,12 +43773,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -43785,7 +43791,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -43807,7 +43813,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -43819,7 +43825,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -43844,7 +43850,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43867,7 +43873,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -43886,7 +43892,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -43894,7 +43900,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -43925,7 +43931,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43946,7 +43952,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -43956,7 +43962,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -43974,7 +43980,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -44001,7 +44007,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -44031,7 +44037,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -44041,7 +44047,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44118,7 +44124,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -44149,7 +44155,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(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) @@ -44165,7 +44171,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -44206,7 +44212,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -44223,7 +44229,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -44240,7 +44246,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -44258,7 +44264,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -44303,7 +44309,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -44313,7 +44319,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -44326,7 +44332,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -44335,14 +44341,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -44352,7 +44358,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -44414,7 +44420,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -44425,7 +44431,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -44460,7 +44466,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -44485,7 +44491,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -44514,7 +44520,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -44529,14 +44535,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -44552,7 +44558,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44577,7 +44583,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -44592,7 +44598,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, (int32(pSpace)-int32(data))/1) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -44643,7 +44649,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -44667,12 +44673,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -44683,11 +44689,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -44700,7 +44706,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -44708,7 +44714,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -44718,10 +44724,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -44755,7 +44761,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -44806,7 +44812,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -44814,7 +44820,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -44846,12 +44852,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -44863,11 +44869,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -44878,7 +44884,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -44886,7 +44892,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -44908,14 +44914,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -44928,7 +44934,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -44937,21 +44943,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -44969,7 +44975,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -44992,7 +44998,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -45004,7 +45010,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -45031,7 +45037,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45049,7 +45055,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -45061,11 +45067,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -45081,7 +45087,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45091,7 +45097,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -45122,7 +45128,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -45146,18 +45152,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -45169,13 +45175,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -45190,7 +45196,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -45210,7 +45216,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+452) @@ -45235,7 +45241,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -45656,7 +45662,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -45688,7 +45694,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -45721,7 +45727,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 84)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -45730,7 +45736,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -45780,7 +45786,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45797,7 +45803,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -45809,7 +45815,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45824,7 +45830,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45851,7 +45857,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -45885,7 +45891,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -45898,7 +45904,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -45912,7 +45918,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -45928,7 +45934,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -45952,7 +45958,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -45972,7 +45978,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -46005,7 +46011,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -46030,7 +46036,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -46199,7 +46205,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -46276,7 +46282,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -46289,7 +46295,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -46329,7 +46335,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -46371,7 +46377,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -46635,7 +46641,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46687,14 +46693,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(20) defer tls.Free(20) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -46722,7 +46728,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -46739,7 +46745,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -46754,7 +46760,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -46765,7 +46771,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -46835,7 +46841,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -46857,7 +46863,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -46932,7 +46938,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -46956,7 +46962,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46970,7 +46976,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -46991,7 +46997,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -47014,7 +47020,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -47045,7 +47051,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -47095,7 +47101,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47118,7 +47124,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -47174,7 +47180,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -47203,7 +47209,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -47238,7 +47244,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -47267,7 +47273,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47289,7 +47295,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47355,7 +47361,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -47379,7 +47385,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47447,7 +47453,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -47460,7 +47466,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -47498,7 +47504,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -47506,7 +47512,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -47521,7 +47527,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint32(unsafe.Sizeof(BtCursor{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } @@ -47531,13 +47537,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint32(uintptr(0)+20)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -47578,7 +47584,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+28) @@ -47587,7 +47593,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -47596,26 +47602,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -47628,7 +47634,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -47645,7 +47651,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -47667,7 +47673,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -47735,7 +47741,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -47777,7 +47783,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47788,7 +47794,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -47799,7 +47805,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -47856,7 +47862,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -47916,7 +47922,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -47936,7 +47942,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -47944,7 +47950,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -47957,7 +47963,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -47984,7 +47990,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -48015,7 +48021,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -48026,11 +48032,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -48047,7 +48053,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -48077,7 +48083,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -48156,7 +48162,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -48177,7 +48183,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -48199,7 +48205,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -48220,7 +48226,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -48241,7 +48247,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -48260,7 +48266,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -48309,7 +48315,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48424,7 +48430,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -48553,7 +48559,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -48657,7 +48663,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -48706,7 +48712,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -48773,7 +48779,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -48783,7 +48789,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -48822,7 +48828,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -48859,7 +48865,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -48892,7 +48898,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -48932,7 +48938,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -48986,7 +48992,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -49020,7 +49026,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -49087,7 +49093,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -49168,7 +49174,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) @@ -49210,7 +49216,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -49255,7 +49261,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -49369,7 +49375,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -49544,7 +49550,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -49565,7 +49571,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -49635,7 +49641,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -49652,7 +49658,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -49733,14 +49739,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49752,7 +49758,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -49767,7 +49773,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -49787,7 +49793,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -49819,7 +49825,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -50001,7 +50007,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -50019,7 +50025,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -50055,7 +50061,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50215,7 +50221,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -50292,11 +50298,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -50313,7 +50319,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -50321,7 +50327,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -50340,7 +50346,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -50371,12 +50377,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -50384,7 +50390,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int32(pData) - int32(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -50434,7 +50440,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50472,7 +50478,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -50499,7 +50505,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -50551,7 +50557,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50585,7 +50591,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -50725,7 +50731,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -50738,7 +50744,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -50836,7 +50842,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -50916,7 +50922,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -51218,7 +51224,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -51246,7 +51252,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -51425,7 +51431,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -51499,7 +51505,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -51572,7 +51578,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -51609,7 +51615,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -51693,7 +51699,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -51946,7 +51952,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -52168,7 +52174,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -52219,13 +52225,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -52239,7 +52245,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -52358,7 +52364,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -52400,7 +52406,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -52414,7 +52420,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -52438,7 +52444,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -52485,7 +52491,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -52557,7 +52563,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -52685,7 +52691,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -52748,7 +52754,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -52796,13 +52802,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 76))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 76 /* szNew */)))) @@ -52910,7 +52916,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52937,7 +52943,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -52960,7 +52966,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -53042,7 +53048,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53070,11 +53076,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*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*iCellIdx)))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -53183,7 +53189,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1))))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -53260,7 +53266,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53290,7 +53296,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -53333,7 +53339,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+16, bp+20) if int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pRoot */))) @@ -53396,7 +53402,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -53406,7 +53412,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53422,7 +53428,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -53436,7 +53442,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -53540,7 +53546,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53563,7 +53569,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -53585,7 +53591,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53595,7 +53601,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -53667,7 +53673,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -53693,7 +53699,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53712,7 +53718,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -53738,7 +53744,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -53801,12 +53807,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53833,13 +53839,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -53850,7 +53856,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53872,7 +53878,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -53899,7 +53905,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -53983,7 +53989,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -53995,7 +54001,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -54034,7 +54040,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(132) defer tls.Free(132) *(*I64)(unsafe.Pointer(bp + 100)) = maxKey @@ -54423,7 +54429,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(212) defer tls.Free(212) @@ -54657,7 +54663,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -54668,14 +54674,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -54689,7 +54695,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -54705,7 +54711,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -54728,7 +54734,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -54742,7 +54748,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -54755,7 +54761,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -54779,7 +54785,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -54819,7 +54825,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -54827,7 +54833,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -54859,29 +54865,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -54921,7 +54927,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(288) defer tls.Free(288) @@ -54953,7 +54959,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -54963,7 +54969,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4805, 0) return SQLITE_ERROR @@ -54977,7 +54983,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -55037,14 +55043,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55106,7 +55112,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55121,7 +55127,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -55131,7 +55137,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -55369,7 +55375,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -55427,13 +55433,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -55447,7 +55453,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -55468,7 +55474,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -55483,7 +55489,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -55497,7 +55503,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -55591,7 +55597,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -55629,7 +55635,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -55649,7 +55655,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -55705,7 +55711,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -55723,7 +55729,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -55738,7 +55744,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -55763,7 +55769,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -55785,7 +55791,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -55807,7 +55813,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -55833,7 +55839,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -55863,7 +55869,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -55885,7 +55891,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -55904,7 +55910,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -55923,7 +55929,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -55933,7 +55939,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -55945,8 +55951,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -55957,7 +55963,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55966,7 +55972,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -55987,7 +55993,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55997,7 +56003,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -56015,7 +56021,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -56028,7 +56034,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -56049,7 +56055,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -56058,7 +56064,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -56073,7 +56079,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -56090,7 +56096,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56117,7 +56123,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -56171,7 +56177,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -56188,7 +56194,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -56196,13 +56202,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -56217,7 +56223,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -56225,7 +56231,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -56235,14 +56241,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -56262,7 +56269,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -56275,7 +56282,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -56292,7 +56299,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -56308,13 +56315,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -56330,7 +56337,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -56352,7 +56359,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint32(unsafe.Sizeof(Mem{}))) @@ -56373,7 +56380,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -56486,11 +56493,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -56505,7 +56512,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56530,7 +56537,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -56575,7 +56582,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -56591,7 +56598,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -56607,7 +56614,7 @@ type ValueNewStat4Ctx = struct { FpIdx uintptr FppRec uintptr FiVal int32 -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -56618,7 +56625,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -56674,7 +56681,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -56820,7 +56827,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -57068,7 +57075,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -57091,7 +57098,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -57159,7 +57166,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -57204,7 +57211,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -57214,7 +57221,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57235,7 +57242,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -57250,14 +57257,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -57273,7 +57280,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -57288,14 +57295,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -57306,14 +57313,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -57333,7 +57340,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -57357,12 +57364,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -57372,7 +57379,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -57385,7 +57392,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -57416,7 +57423,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -57469,7 +57476,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -57478,7 +57485,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -57501,26 +57508,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -57533,7 +57540,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -57581,7 +57588,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -57595,7 +57602,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -57627,7 +57634,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint32(8)) @@ -57637,7 +57644,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -57653,7 +57660,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -57677,7 +57684,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -57688,7 +57695,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -57699,7 +57706,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*20 @@ -57710,7 +57717,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -57745,14 +57752,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint32(nNewSize)*uint32(unsafe.Sizeof(int32(0))))) @@ -57764,7 +57771,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -57777,12 +57784,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+148, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 5, 0x20) } @@ -57805,7 +57812,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -57934,7 +57941,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -57965,7 +57972,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -57981,7 +57988,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -58025,23 +58032,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fp5 = p5 @@ -58050,7 +58057,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -58065,7 +58072,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -58076,26 +58083,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -58156,7 +58163,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*20; pOp >= aOp; pOp -= 20 { @@ -58171,18 +58178,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -58198,7 +58205,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -58222,7 +58229,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -58239,7 +58246,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -58286,7 +58293,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -58302,7 +58309,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -58323,7 +58330,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -58337,11 +58344,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -58504,7 +58511,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -58512,7 +58519,7 @@ var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 152)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*16)).FpBt) != 0 { @@ -58539,7 +58546,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -58558,7 +58565,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -58573,7 +58580,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -58581,7 +58588,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -58591,7 +58598,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*40 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -58635,7 +58642,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -58647,7 +58654,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -58746,7 +58753,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 88 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*40 @@ -58775,7 +58782,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58864,7 +58871,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -58879,7 +58886,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -58896,7 +58903,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -58929,7 +58936,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -59038,11 +59045,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4973, ts + 4978, ts + 4985, ts + 4988, ts + 4991, ts + 4994, ts + 4997, ts + 5000, ts + 5008, ts + 5011, ts + 5018, ts + 5026, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -59076,7 +59083,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -59092,7 +59099,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -59116,7 +59123,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -59147,7 +59154,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59172,7 +59179,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -59191,7 +59198,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -59419,7 +59426,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -59437,7 +59444,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -59480,7 +59487,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -59495,7 +59502,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -59518,7 +59525,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59722,7 +59729,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -59732,7 +59739,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -59761,7 +59768,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59813,7 +59820,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -59837,7 +59844,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -59862,7 +59869,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -59883,7 +59890,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59906,7 +59913,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -59919,7 +59926,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -59931,7 +59938,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -59949,7 +59956,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 36))) != 0 { return handleMovedCursor(tls, p) @@ -59968,7 +59975,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -60043,10 +60050,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -60056,7 +60063,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -60105,7 +60112,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60156,7 +60163,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60183,7 +60190,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -60286,7 +60293,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -60300,7 +60307,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint32(unsafe.Sizeof(UnpackedRecord{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(unsafe.Sizeof(Mem{}))*uint32(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -60318,7 +60325,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60379,7 +60386,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -60422,7 +60429,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -60435,7 +60442,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -60475,7 +60482,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint32(unsafe.Sizeof(float64(0))) > uint32(8) { var x float64 = float64(i) @@ -60521,7 +60528,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -60615,7 +60622,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -60678,7 +60685,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -60720,7 +60727,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -60785,7 +60792,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -60820,7 +60827,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 48)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -60881,7 +60888,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -60892,7 +60899,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -60997,7 +61004,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61021,7 +61028,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -61059,7 +61066,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -61113,7 +61120,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -61198,7 +61205,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -61210,7 +61217,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -61226,7 +61233,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -61240,7 +61247,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 108)) += nChange @@ -61248,7 +61255,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+148, Bft(1), 4, 0x10) } @@ -61268,7 +61275,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+148, Bft(iCode+1), 0, 0x3) @@ -61276,12 +61283,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -61291,7 +61298,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*40 @@ -61311,7 +61318,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 216)) |= 0x80000000 @@ -61327,7 +61334,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61358,7 +61365,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -61374,7 +61381,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -61391,7 +61398,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -61443,7 +61450,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -61469,7 +61476,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 148))&0x3>>0)) != 0) } @@ -61477,7 +61484,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5200, 0) return 1 @@ -61487,7 +61494,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5245, 0) return 1 @@ -61499,7 +61506,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61532,7 +61539,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -61542,7 +61549,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -61562,7 +61569,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -61584,7 +61591,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -61606,7 +61613,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -61629,27 +61636,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -61659,7 +61666,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -61672,26 +61679,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -61760,20 +61767,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -61799,7 +61806,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -61814,7 +61821,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -61828,7 +61835,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -61841,12 +61848,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -61855,39 +61862,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -61895,19 +61902,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -61919,32 +61926,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 116))) { @@ -61954,7 +61961,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -61968,7 +61975,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5285, int64(-1), @@ -61976,7 +61983,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -61986,7 +61993,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -61996,7 +62003,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -62023,7 +62030,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -62190,14 +62197,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -62237,7 +62244,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -62250,7 +62257,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -62267,14 +62274,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -62332,13 +62339,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -62347,7 +62354,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62370,7 +62377,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -62390,7 +62397,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -62408,7 +62415,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -62431,7 +62438,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -62511,13 +62518,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -62527,7 +62534,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -62536,19 +62543,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -62583,7 +62590,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -62600,7 +62607,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -62610,43 +62617,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -62656,13 +62663,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -62682,7 +62689,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -62714,11 +62721,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -62727,44 +62734,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -62781,13 +62788,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -62795,7 +62802,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5318, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -62829,7 +62836,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -62855,16 +62862,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62875,11 +62882,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62890,7 +62897,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62900,7 +62907,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62913,11 +62920,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -62925,11 +62932,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -62978,7 +62985,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62989,7 +62996,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -63006,7 +63013,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -63018,7 +63025,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -63029,19 +63036,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -63064,7 +63071,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -63085,7 +63092,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -63094,7 +63101,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 148)) & 0x80 >> 7) } @@ -63103,7 +63110,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 148)) & 0xc >> 2) } @@ -63111,7 +63118,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -63120,7 +63127,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -63133,7 +63140,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63159,7 +63166,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -63174,7 +63181,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -63189,7 +63196,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -63202,7 +63209,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -63216,7 +63223,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -63308,7 +63315,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63327,7 +63334,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63339,7 +63346,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63351,7 +63358,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -63365,7 +63372,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -63506,7 +63513,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63551,7 +63558,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -63774,7 +63781,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -63845,7 +63852,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -63867,7 +63874,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63913,7 +63920,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -63945,7 +63952,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -63957,7 +63964,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -63965,7 +63972,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64001,7 +64008,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -64015,13 +64022,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*40 @@ -64037,7 +64044,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -64061,7 +64068,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -64071,11 +64078,11 @@ var azTypes = [5]uintptr{ ts + 1112, ts + 1090, ts + 1535, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(748) defer tls.Free(748) @@ -66185,6 +66192,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -69204,7 +69215,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 36))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 36)))) +__357: + ; __353: ; goto __8 @@ -69240,10 +69271,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+236) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -69251,13 +69282,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -69266,14 +69297,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -69281,12 +69312,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -69301,7 +69332,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -69319,13 +69350,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -69342,38 +69373,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 236))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+240, 0, uint32(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+240) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 240 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -69383,27 +69414,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+80+uintptr(i2)*4, libc.AssignPtrUint32(bp+280, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 280))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+280)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 80 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 280 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 280)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 236)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -69412,63 +69443,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+240) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+240) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 280 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 236))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 280 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 80 + uintptr(*(*U32)(unsafe.Pointer(bp + 236 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -69476,55 +69507,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 280)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 280))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint32(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 280))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 280)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 280))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 280))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -69539,20 +69570,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -69562,15 +69593,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*20 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -69605,81 +69636,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 40 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*16 + 4)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -69687,45 +69718,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 40 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -69750,14 +69781,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -69765,30 +69796,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 40 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -69852,31 +69883,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 40 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -69905,13 +69936,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -69921,77 +69952,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -70000,79 +70031,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 40 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -70081,22 +70112,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -70105,37 +70136,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -70150,7 +70181,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -70163,13 +70194,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 40) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -70188,20 +70219,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + 36)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 284 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 284 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+284) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 284 /* nEntry */)) @@ -70222,17 +70253,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5485, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -70243,16 +70274,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*24 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint32(nName+1)) @@ -70260,14 +70291,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -70275,121 +70306,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5536, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5558, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -70402,36 +70408,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -70439,48 +70470,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -70501,18 +70532,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -70520,43 +70551,43 @@ __519: ts+5612, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -70572,7 +70603,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -70614,66 +70645,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 292 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+292) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 148))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -70681,16 +70712,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 292)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -70710,20 +70741,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 292))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+148, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -70770,37 +70801,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -70890,13 +70921,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -70905,11 +70936,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 148))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -70921,24 +70952,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*40 @@ -70950,32 +70981,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -70995,10 +71026,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 36)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -71017,10 +71048,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -71075,7 +71106,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -71083,11 +71114,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1534 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -71096,71 +71127,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+12, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 36))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -71179,19 +71210,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -71206,10 +71237,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -71233,10 +71264,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -71361,7 +71392,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -71371,10 +71402,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -71383,29 +71414,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+300) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -71416,53 +71447,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), int64(U64(iKey)), 0, bp+300) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -71487,97 +71518,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+304, bp+300) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+304)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 300 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 300)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 20 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -71635,10 +71666,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp1)*4)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -71647,60 +71678,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 320 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 320 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 336 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+320, bp+336) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 336)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 336)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -71723,18 +71754,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -71746,10 +71777,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -71844,10 +71875,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; __99: // jump, in3 @@ -71860,15 +71891,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 340 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 340 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 340 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 340 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -71878,62 +71909,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*40)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), pIdxKey, bp+356) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 356 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 356)) == 0) @@ -71941,31 +71972,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -72019,7 +72050,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -72029,14 +72060,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 360 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+360, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+360)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 360))) goto notExistsWithKey -__635: +__639: ; __103: // jump, in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -72057,25 +72088,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 400 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 400)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -72133,89 +72164,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+404) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 404)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 408 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 408 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 408)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 408 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 408)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 408 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 408 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -72224,36 +72255,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+408) *(*I64)(unsafe.Pointer(bp + 408 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 408 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 408)))), 0, bp+404)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 404)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 404)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -72308,56 +72339,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*16)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+416 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -72369,13 +72400,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 36)), bp+416, @@ -72386,13 +72417,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -72405,7 +72436,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+416 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -72431,10 +72462,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -72484,28 +72515,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*16)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -72517,13 +72548,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -72532,28 +72563,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -72593,16 +72624,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+448) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 448)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -72625,10 +72656,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -72678,29 +72709,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 116)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -72721,20 +72752,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 452 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 36)))).FpVtab @@ -72745,36 +72776,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36 /* &.uc */)), bp+452 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 452 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 452 /* v3 */)) goto __8 @@ -72783,6 +72814,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) @@ -72790,11 +72825,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 36))) -__698: +__702: ; goto __8 @@ -72827,39 +72862,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 460 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+460) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 460 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 460)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -72875,29 +72910,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+464) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 464)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 464 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 464)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -72942,32 +72977,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 468 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+468) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+468) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 468 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 468)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -73050,18 +73085,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 160 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -73101,10 +73136,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -73114,10 +73149,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 472 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 472 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -73134,10 +73169,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -73160,17 +73195,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -73201,31 +73236,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 504 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+504, bp+520) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 520)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5827) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 520)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5827) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -73272,25 +73307,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 524 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+524) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) @@ -73302,17 +73337,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 524 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__726: +__730: ; goto __8 @@ -73326,16 +73361,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -73389,15 +73424,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 572 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -73411,19 +73446,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+532, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+532) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fz, bp+572, 0) Xsqlite3VdbeMemRelease(tls, bp+532) @@ -73431,22 +73466,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -73482,13 +73517,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 588 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -73496,21 +73531,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 588 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 588)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 588 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -73536,23 +73571,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*16)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+592) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 44)) += *(*I64)(unsafe.Pointer(bp + 592)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 592)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -73568,21 +73603,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 36))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 36))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -73603,10 +73638,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+600, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 600 /* pgno */))) goto __8 @@ -73620,10 +73655,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -73644,15 +73679,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpSchema) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+124, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5844 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).Fdb = db @@ -73664,11 +73699,11 @@ __751: ts+5858, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).Frc = SQLITE_OK @@ -73678,38 +73713,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+604 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+604)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -73722,10 +73757,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -73797,22 +73832,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+632) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 632)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 632)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -73830,15 +73865,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -73857,18 +73892,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+636) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*I64)(unsafe.Pointer(bp + 636 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -73903,35 +73938,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -73966,37 +74001,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 116 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5901, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -74004,7 +74039,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -74013,10 +74048,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -74024,10 +74059,10 @@ __781: uint32(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -74049,24 +74084,24 @@ __782: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem2 = pFrame2 + 88 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 40 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -74117,21 +74152,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 524)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 516)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 64)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -74148,25 +74183,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -74182,35 +74217,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -74227,11 +74262,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -74264,7 +74299,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -74274,10 +74309,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 644 /* x3 */)) -__802: +__806: ; goto __8 @@ -74292,16 +74327,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -74314,17 +74349,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -74371,10 +74406,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(n4)*uint32(unsafe.Sizeof(uintptr(0)))+(uint32(unsafe.Sizeof(Sqlite3_context{}))+uint32(unsafe.Sizeof(Mem{}))-uint32(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -74402,75 +74437,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+28 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+28 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -74506,32 +74541,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -74553,32 +74588,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+652+1*4, bp+652+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 652)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 652 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 40 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -74601,17 +74636,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -74621,18 +74656,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -74644,11 +74679,11 @@ __830: return ts + 5995 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -74656,29 +74691,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -74686,18 +74721,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -74707,10 +74742,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -74732,10 +74767,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -74751,17 +74786,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -74783,13 +74818,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+148, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -74832,25 +74867,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*16)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+6002, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -74866,16 +74901,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -74895,17 +74930,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+664) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+124) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+664) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -74919,10 +74954,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -74937,11 +74972,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 704 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -74949,10 +74984,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+704 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -74961,18 +74996,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 704 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 704 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -74990,10 +75025,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -75038,27 +75073,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*4)) = pArgc + uintptr(i7+1)*40 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -75066,10 +75101,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -75093,11 +75128,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -75106,40 +75141,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 708 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 36 /* &.uc */)), bp+708 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+708)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 708 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -75153,10 +75188,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -75171,21 +75206,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -75203,27 +75238,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 28)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -75257,43 +75292,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 740 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -75302,41 +75337,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 740 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -75361,16 +75396,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -75430,24 +75465,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -75458,38 +75493,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+224, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -75528,16 +75563,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 160 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 160 + 7*4))++ -__900: +__904: ; goto __8 @@ -75587,67 +75622,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6031, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 212 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 160 + 6*4))++ @@ -75692,25 +75727,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -75719,46 +75754,46 @@ __915: libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 28)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 160 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -75789,11 +75824,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6069, ts + 6078, ts + 6085, - ts + 6091} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6091} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -75824,7 +75859,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -75845,7 +75880,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -75862,7 +75897,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -75938,7 +75973,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(324) defer tls.Free(324) @@ -76259,7 +76294,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -76268,11 +76303,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -76291,14 +76326,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76357,14 +76392,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -76374,7 +76409,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -76390,7 +76425,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -76399,7 +76434,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76585,7 +76620,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -76736,7 +76771,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -76749,10 +76784,10 @@ type PmaReader1 = struct { FnBuffer int32 FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 FaBuffer uintptr @@ -76761,17 +76796,17 @@ type PmaWriter1 = struct { FiBufEnd int32 FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -76782,25 +76817,25 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -76809,10 +76844,10 @@ type IncrMerger1 = struct { FbEof int32 FbUseThread int32 FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -76843,11 +76878,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -76864,7 +76899,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76968,7 +77003,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -77008,7 +77043,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -77023,7 +77058,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -77064,7 +77099,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77110,7 +77145,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77133,7 +77168,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77153,7 +77188,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77165,7 +77200,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77215,7 +77250,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -77275,7 +77310,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -77294,7 +77329,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -77390,7 +77425,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -77401,7 +77436,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -77421,7 +77456,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77440,14 +77475,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -77473,7 +77508,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -77498,7 +77533,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -77510,7 +77545,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -77527,7 +77562,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -77556,7 +77591,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 36)) @@ -77575,7 +77610,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*I64)(unsafe.Pointer(bp + 4)) = nByte @@ -77595,7 +77630,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -77619,7 +77654,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -77632,7 +77667,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77671,7 +77706,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -77689,7 +77724,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -77746,7 +77781,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -77761,7 +77796,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -77790,7 +77825,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -77806,7 +77841,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -77829,7 +77864,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -77884,7 +77919,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77960,7 +77995,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -77971,7 +78006,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -78035,7 +78070,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78151,7 +78186,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -78197,7 +78232,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(vdbeIncrPopulate(tls, pIncr)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -78205,7 +78240,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -78228,7 +78263,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -78262,7 +78297,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -78289,7 +78324,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 48 + 4)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -78297,7 +78332,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78357,7 +78392,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -78427,7 +78462,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -78484,7 +78519,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -78500,7 +78535,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -78527,7 +78562,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78564,7 +78599,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -78580,7 +78615,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78631,7 +78666,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -78712,7 +78747,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78787,7 +78822,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -78832,7 +78867,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78874,7 +78909,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -78893,7 +78928,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78928,7 +78963,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79019,7 +79054,7 @@ type MemJournal1 = struct { Fflags int32 FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -79066,23 +79101,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -79129,7 +79164,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -79139,7 +79174,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -79177,7 +79212,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -79243,7 +79278,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -79271,7 +79306,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -79281,14 +79316,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -79303,7 +79338,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -79315,7 +79350,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -79343,20 +79378,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -79385,7 +79420,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -79433,7 +79468,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -79475,7 +79510,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -79484,7 +79519,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -79513,7 +79548,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -79523,7 +79558,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -79565,7 +79600,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -79614,7 +79649,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -79645,13 +79680,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -79663,7 +79698,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79671,7 +79706,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79706,14 +79741,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 24))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -79746,7 +79781,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -79792,7 +79827,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -79809,7 +79844,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 12))&0x3>>0) != ENAME_TAB { @@ -79835,7 +79870,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -79854,7 +79889,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -79904,7 +79939,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -80622,7 +80657,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*72 @@ -80671,7 +80706,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -80693,7 +80728,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80719,7 +80754,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -81200,7 +81235,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -81235,7 +81270,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -81279,7 +81314,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81302,7 +81337,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -81439,7 +81474,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81485,7 +81520,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -81496,7 +81531,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81528,7 +81563,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81605,7 +81640,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -81904,7 +81939,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81945,7 +81980,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82002,7 +82037,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82036,7 +82071,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -82072,7 +82107,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -82093,7 +82128,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -82136,7 +82171,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -82148,7 +82183,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82159,7 +82194,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -82170,7 +82205,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -82195,7 +82230,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -82267,7 +82302,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -82277,7 +82312,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -82286,7 +82321,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -82311,7 +82346,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -82329,7 +82364,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -82342,7 +82377,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -82358,7 +82393,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -82381,7 +82416,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -82391,7 +82426,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -82418,7 +82453,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -82426,7 +82461,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -82456,7 +82491,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -82490,7 +82525,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -82538,7 +82573,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -82562,7 +82597,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -82591,7 +82626,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82679,7 +82714,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82701,7 +82736,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -82709,7 +82744,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -82718,7 +82753,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -82738,7 +82773,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82765,7 +82800,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -82775,7 +82810,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82802,7 +82837,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82850,7 +82885,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82865,7 +82900,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -82888,7 +82923,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -82906,7 +82941,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 20)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -82934,7 +82969,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -82986,7 +83021,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -83005,7 +83040,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83042,7 +83077,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83074,7 +83109,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83142,7 +83177,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -83172,7 +83207,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -83186,13 +83221,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -83204,7 +83239,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 12) } @@ -83246,7 +83281,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -83268,7 +83303,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&Size_t(0x3fffffff) + Size_t(1))) @@ -83287,7 +83322,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -83304,7 +83339,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83414,7 +83449,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(With{})) + uint32(unsafe.Sizeof(Cte{}))*uint32((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -83436,7 +83471,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -83446,14 +83481,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 24)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -83486,7 +83521,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -83494,7 +83529,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -83563,7 +83598,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -83616,7 +83651,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -83645,7 +83680,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83711,9 +83746,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -83730,7 +83765,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -83749,7 +83784,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -83772,7 +83807,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83869,7 +83904,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -83896,7 +83931,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -83922,7 +83957,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -83937,7 +83972,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83949,7 +83984,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -83961,7 +83996,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -83969,7 +84004,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -83986,7 +84021,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -83998,7 +84033,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6646) == 0 { return U32(EP_IsTrue) } @@ -84011,7 +84046,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -84025,7 +84060,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -84042,7 +84077,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -84088,7 +84123,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -84163,7 +84198,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -84187,7 +84222,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -84202,7 +84237,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -84210,12 +84245,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var i int32 @@ -84257,7 +84292,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -84293,7 +84328,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -84302,7 +84337,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -84354,7 +84389,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -84393,7 +84428,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -84446,7 +84481,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7592) == 0 { return 1 } @@ -84464,7 +84499,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -84522,7 +84557,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -84534,7 +84569,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -84623,7 +84658,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84841,7 +84876,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -84873,7 +84908,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84892,7 +84927,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList)).FnExpr, 1) } else { @@ -84920,7 +84955,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(53) defer tls.Free(53) @@ -85115,7 +85150,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -85238,7 +85273,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 20)))).FpEList)).FnExpr { @@ -85275,7 +85310,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85656,7 +85691,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85676,7 +85711,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -85722,7 +85757,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -85737,7 +85772,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -85756,7 +85791,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85807,7 +85842,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -85821,14 +85856,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -85847,7 +85882,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -85871,7 +85906,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -85879,7 +85914,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -86004,7 +86039,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -87073,7 +87108,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -87090,7 +87125,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -87159,7 +87194,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -87184,7 +87219,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -87205,7 +87240,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -87218,7 +87253,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -87244,7 +87279,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -87326,7 +87361,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -87389,7 +87424,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87619,7 +87654,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87867,7 +87902,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -87887,7 +87922,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -87941,7 +87976,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -88045,7 +88080,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -88072,7 +88107,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -88083,7 +88118,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -88209,7 +88244,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -88232,7 +88267,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -88341,7 +88376,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -88375,7 +88410,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -88393,7 +88428,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -88418,7 +88453,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -88456,7 +88491,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -88472,7 +88507,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -88512,7 +88547,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -88561,7 +88596,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -88594,7 +88629,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -88607,7 +88642,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88624,7 +88659,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88642,7 +88677,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -88833,7 +88868,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -88859,7 +88894,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -88884,7 +88919,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -88893,7 +88928,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { @@ -88903,7 +88938,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -88921,7 +88956,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -88939,7 +88974,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -88973,7 +89008,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88992,7 +89027,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89016,7 +89051,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -89032,7 +89067,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -89045,7 +89080,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -89230,7 +89265,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89245,7 +89280,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -89391,7 +89426,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89508,7 +89543,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89536,7 +89571,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -89665,7 +89700,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -89677,7 +89712,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -89696,7 +89731,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -89708,7 +89743,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -89719,7 +89754,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -89760,7 +89795,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -89770,7 +89805,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -89802,7 +89837,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -89824,7 +89859,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -89847,7 +89882,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -89863,7 +89898,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -89886,7 +89921,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -89902,7 +89937,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -89924,7 +89959,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -89946,7 +89981,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -89970,7 +90005,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -89987,7 +90022,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -90001,34 +90036,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10807, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -90042,7 +90075,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90062,7 +90095,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10807, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10815, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -90112,7 +90145,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10813, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10821, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10805 /* " " */ @@ -90148,7 +90181,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -90246,7 +90279,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -90275,7 +90308,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -90314,7 +90347,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -90657,7 +90690,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -90668,7 +90701,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -90708,7 +90741,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(352) defer tls.Free(352) @@ -90842,7 +90875,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 24)), pExpr) } @@ -90875,7 +90908,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -90989,7 +91022,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -91061,7 +91094,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -91101,7 +91134,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -91127,7 +91160,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10818, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10826, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -91147,7 +91180,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -91225,10 +91258,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10825, + Xsqlite3ErrorMsg(tls, pParse, ts+10833, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10853 /* "PRIMARY KEY" */ + return ts + 10861 /* "PRIMARY KEY" */ } return ts + 6078 /* "UNIQUE" */ }(), @@ -91241,7 +91274,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10865, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10873, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -91261,11 +91294,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10913, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10921, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11034, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11042, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -91380,16 +91413,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint32(unsafe.Sizeof(aAlterTableFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11052}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11073}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11093}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11112}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11131}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11060}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11081}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11101}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11139}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -91545,7 +91578,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -91586,7 +91619,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11154, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11162, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -91598,10 +91631,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11207, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11215, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -91622,10 +91655,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11225 /* "sqlite_stat1" */, FzCols: ts + 11238 /* "tbl,idx,stat" */}, - {FzName: ts + 11251 /* "sqlite_stat4" */, FzCols: ts + 11264 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11292 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11233 /* "sqlite_stat1" */, FzCols: ts + 11246 /* "tbl,idx,stat" */}, + {FzName: ts + 11259 /* "sqlite_stat4" */, FzCols: ts + 11272 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11300 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -91651,14 +91684,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -91669,12 +91702,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -91683,7 +91716,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -91698,7 +91731,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -91708,7 +91741,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -91723,7 +91756,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -91758,7 +91791,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -91853,7 +91886,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11305} /* sqlite3.c:111534:22 */ + FzName: ts + 11313} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -91864,7 +91897,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -91886,7 +91919,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -91904,7 +91937,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -92047,7 +92080,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -92099,7 +92132,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -92171,7 +92204,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11315} /* sqlite3.c:111824:22 */ + FzName: ts + 11323} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -92190,7 +92223,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -92224,7 +92257,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11325, + Xsqlite3_str_appendf(tls, bp+24, ts+11333, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -92234,7 +92267,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11330, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11338, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -92277,7 +92310,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+11336, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11344, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+48)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+48 /* &sStat */)).FnChar-- @@ -92291,9 +92324,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11342} /* sqlite3.c:111958:22 */ + FzName: ts + 11350} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -92302,7 +92335,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -92338,7 +92371,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11351, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11359, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -92356,7 +92389,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*64 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11225, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11233, uint32(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -92589,7 +92622,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -92651,7 +92684,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -92662,7 +92695,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -92670,7 +92703,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema // Schema of database iDb var k uintptr @@ -92695,7 +92728,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -92704,9 +92737,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 40)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11365) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11373) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11369) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11377) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -92722,7 +92755,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92785,16 +92818,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -92823,15 +92856,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11373, z) == 0 { + if Xsqlite3_strglob(tls, ts+11381, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11384, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11392, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11394, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11402, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -92853,7 +92886,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -92915,7 +92948,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -92932,7 +92965,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*20 @@ -92990,7 +93023,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -93011,7 +93044,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -93147,15 +93180,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11251, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11259, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11406, - ts+11460, + ts+11414, + ts+11468, zDb) } return rc @@ -93179,7 +93212,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -93207,10 +93240,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11225, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11233, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11512, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11520, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -93286,7 +93319,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -93300,7 +93333,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6332, zName) == 0) } @@ -93318,7 +93351,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -93385,7 +93418,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11553, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11561, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -93398,7 +93431,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 116 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11556, + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11564, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 116 + 7*4)))) goto attach_error __7: @@ -93412,7 +93445,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11593, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11601, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -93483,7 +93516,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11623, 0) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11631, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -93500,7 +93533,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11652, 0) + ts+11660, 0) rc = SQLITE_ERROR __23: ; @@ -93576,7 +93609,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11720, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11728, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -93611,7 +93644,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93664,14 +93697,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11748, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11756, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11769, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11777, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -93679,7 +93712,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11795, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11803, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -93716,7 +93749,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -93795,7 +93828,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -93803,12 +93836,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11817} /* sqlite3.c:113383:24 */ + FzName: ts + 11825} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -93816,10 +93849,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11831} /* sqlite3.c:113403:24 */ + FzName: ts + 11839} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93831,7 +93864,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11845, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11853, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -93839,7 +93872,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93864,7 +93897,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11869, + ts+11877, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -93900,7 +93933,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -93936,7 +93969,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -93951,15 +93984,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+4, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+4, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -94049,7 +94082,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -94062,8 +94095,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11915, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11923, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -94074,7 +94107,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94089,11 +94122,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11944, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11952, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11950, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11958, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -94108,7 +94141,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -94157,7 +94190,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -94179,7 +94212,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11977, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11985, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -94191,7 +94224,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -94200,7 +94233,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -94215,7 +94248,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -94249,7 +94282,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -94261,7 +94294,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -94285,7 +94318,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -94438,7 +94471,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -94489,7 +94522,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -94513,14 +94546,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12025) + ts+12033) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, ts+5844) } @@ -94546,11 +94579,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5844) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12025) + ts+12033) } } } @@ -94565,7 +94598,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94586,7 +94619,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+392, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12044, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12052, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -94605,9 +94638,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12052 /* "no such view" */ + zMsg = ts + 12060 /* "no such view" */ } else { - zMsg = ts + 12065 /* "no such table" */ + zMsg = ts + 12073 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6527, libc.VaList(bp, zMsg, zDbase, zName)) @@ -94628,7 +94661,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -94642,13 +94675,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { - return ts + 12011 /* "sqlite_schema" */ + return ts + 12019 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12025+7) == 0 { - return ts + 11992 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 { + return ts + 12000 /* "sqlite_temp_sche..." */ } } return zName @@ -94664,7 +94697,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -94691,7 +94724,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -94707,7 +94740,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -94739,7 +94772,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -94765,7 +94798,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -94786,7 +94819,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -94808,14 +94841,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.pDfltList */)) @@ -94838,7 +94871,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -94855,7 +94888,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -94874,7 +94907,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -94893,7 +94926,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -94943,7 +94976,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -94980,7 +95013,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -94993,7 +95026,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -95015,7 +95048,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -95028,7 +95061,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5844) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -95041,7 +95074,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -95077,7 +95110,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -95101,7 +95134,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95110,13 +95143,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12079, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12087, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12096, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12104, libc.VaList(bp, pName1)) return -1 } } else { @@ -95128,7 +95161,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -95142,7 +95175,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95163,7 +95196,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8019, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12116, + Xsqlite3ErrorMsg(tls, pParse, ts+12124, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -95173,7 +95206,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 56 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -95184,7 +95217,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -95204,7 +95237,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -95251,7 +95284,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -95281,7 +95314,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -95304,7 +95337,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -95332,7 +95365,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 /* "sqlite_temp_mast..." */ + return ts + 12033 /* "sqlite_temp_mast..." */ } return ts + 5844 /* "sqlite_master" */ }()) @@ -95352,7 +95385,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12158, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12166, 0) return __4: ; @@ -95399,7 +95432,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -95439,7 +95472,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12199, + Xsqlite3ErrorMsg(tls, pParse, ts+12207, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10376 /* "view" */ @@ -95459,7 +95492,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12220, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12228, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -95562,8 +95595,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -95573,10 +95606,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12255, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12263, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -95595,12 +95628,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12272, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12280, 0) } else { } @@ -95621,7 +95654,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12255 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12263 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -95633,7 +95666,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - if Xsqlite3HashInsert(tls, pHash, ts+12255, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12263, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -95645,7 +95678,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(32) defer tls.Free(32) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -95667,7 +95700,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -95679,13 +95712,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12329, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12337, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12336, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12344, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- @@ -95725,7 +95758,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12346, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12354, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -95764,7 +95797,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -95811,7 +95844,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -95885,7 +95918,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -95897,11 +95930,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*16 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12372, + Xsqlite3ErrorMsg(tls, pParse, ts+12380, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12417, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12425, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -95938,7 +95971,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -95947,12 +95980,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12458, 0) + ts+12466, 0) } } @@ -95972,7 +96005,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95997,7 +96030,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12510, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12518, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -96086,7 +96119,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12551, 0) + ts+12559, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -96103,7 +96136,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96133,7 +96166,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -96168,7 +96201,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96188,7 +96221,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12607, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12615, 0) goto generated_done __2: ; @@ -96201,13 +96234,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12650, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12666, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -96240,7 +96273,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12665, + Xsqlite3ErrorMsg(tls, pParse, ts+12673, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -96263,7 +96296,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -96277,7 +96310,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -96312,7 +96345,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -96348,7 +96381,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -96383,12 +96416,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1534 /* "" */ - zSep2 = ts + 12696 /* "," */ + zSep2 = ts + 12704 /* "," */ zEnd = ts + 4908 /* ")" */ } else { - zSep = ts + 12698 /* "\n " */ - zSep2 = ts + 12702 /* ",\n " */ - zEnd = ts + 12707 /* "\n)" */ + zSep = ts + 12706 /* "\n " */ + zSep2 = ts + 12710 /* ",\n " */ + zEnd = ts + 12715 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -96396,7 +96429,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12710, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12718, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -96436,15 +96469,15 @@ __6: var azType1 = [5]uintptr{ ts + 1534, - ts + 12724, - ts + 12730, - ts + 12735, - ts + 12740, -} /* sqlite3.c:115999:23 */ + ts + 12732, + ts + 12738, + ts + 12743, + ts + 12748, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -96473,7 +96506,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -96502,7 +96535,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -96522,7 +96555,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -96542,7 +96575,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -96575,7 +96608,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -96614,7 +96647,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96777,7 +96810,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -96810,7 +96843,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -96854,7 +96887,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -96891,7 +96924,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -96947,10 +96980,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12746, + ts+12754, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12779, + Xsqlite3ErrorMsg(tls, pParse, ts+12787, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -96970,11 +97003,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12806, 0) + ts+12814, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12856, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12864, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -97018,7 +97051,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12888, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12896, 0) return } } @@ -97052,11 +97085,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8761 /* "table" */ - zType2 = ts + 12932 /* "TABLE" */ + zType2 = ts + 12940 /* "TABLE" */ } else { // A view zType = ts + 10376 /* "view" */ - zType2 = ts + 12938 /* "VIEW" */ + zType2 = ts + 12946 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -97081,6 +97114,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -97137,7 +97175,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12943, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12951, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -97145,7 +97183,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12958, + ts+12966, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -97163,14 +97201,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13056, + ts+13064, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13098, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13106, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -97207,7 +97245,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -97228,7 +97266,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13132, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13140, 0) goto create_view_fail __1: ; @@ -97325,7 +97363,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97365,7 +97403,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13168, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13176, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -97440,7 +97478,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*16)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -97470,7 +97508,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -97496,14 +97534,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13206, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -97517,7 +97555,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13213, + ts+13221, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*16)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -97526,7 +97564,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -97572,7 +97610,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -97581,17 +97619,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13280, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13288, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -97624,7 +97662,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13294, + ts+13302, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -97636,7 +97674,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13339, + ts+13347, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -97655,7 +97693,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -97666,7 +97704,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3237, 4) == 0 { return 0 @@ -97687,7 +97725,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -97755,7 +97793,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -97817,7 +97855,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13406, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13414, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -97827,14 +97865,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13434, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13442, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13468, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13476, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -97849,7 +97887,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11369, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11377, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -97875,7 +97913,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -97914,7 +97952,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13500, + ts+13508, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -97927,7 +97965,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13563, 0) + ts+13571, 0) goto fk_end goto __7 __6: @@ -98012,7 +98050,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13657, + ts+13665, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -98098,7 +98136,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -98123,7 +98161,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98235,7 +98273,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -98260,7 +98298,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98269,12 +98307,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 12))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13703, + Xsqlite3ErrorMsg(tls, pParse, ts+13711, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13731 /* "FIRST" */ + return ts + 13739 /* "FIRST" */ } - return ts + 13737 /* "LAST" */ + return ts + 13745 /* "LAST" */ }())) return 1 } @@ -98293,7 +98331,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -98433,7 +98471,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13742, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13750, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -98454,7 +98492,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13748, + ts+13756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -98486,21 +98524,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13798, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13826, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13834, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13851, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 0) goto exit_create_index __17: ; @@ -98527,7 +98565,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13742, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13750, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -98542,7 +98580,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13885, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13893, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -98554,7 +98592,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13919, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13927, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -98583,7 +98621,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13943, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13951, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -98612,7 +98650,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -98658,7 +98696,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13742) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13750) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -98776,7 +98814,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13966, 0) + ts+13974, 0) goto exit_create_index __56: ; @@ -99006,7 +99044,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14027, libc.VaList(bp+48, 0)) + ts+14035, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -99062,8 +99100,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14069, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14077, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -99120,12 +99158,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14086, + zStmt = Xsqlite3MPrintf(tls, db, ts+14094, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1534 /* "" */ } - return ts + 14106 /* " UNIQUE" */ + return ts + 14114 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -99137,7 +99175,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14114, + ts+14122, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -99153,7 +99191,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14173, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14181, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -99249,7 +99287,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -99293,11 +99331,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -99332,7 +99370,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14200, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14208, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -99347,7 +99385,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14218, libc.VaList(bp+8, 0)) + ts+14226, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -99358,7 +99396,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -99388,9 +99426,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14291, + ts+14299, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11365, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11373, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -99416,7 +99454,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -99443,7 +99481,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99474,7 +99512,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -99488,7 +99526,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -99526,7 +99564,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99541,7 +99579,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14351, + Xsqlite3ErrorMsg(tls, pParse, ts+14359, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -99608,7 +99646,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -99647,7 +99685,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -99679,7 +99717,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -99742,7 +99780,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99753,12 +99791,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14387, + Xsqlite3ErrorMsg(tls, pParse, ts+14395, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14423 /* "ON" */ + return ts + 14431 /* "ON" */ } - return ts + 14426 /* "USING" */ + return ts + 14434 /* "USING" */ }())) goto append_from_error __1: @@ -99806,7 +99844,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -99828,7 +99866,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -99845,7 +99883,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*72 @@ -99869,7 +99907,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -99880,14 +99918,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14432, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14440, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -99915,7 +99953,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -99923,9 +99961,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14438 + return ts + 14446 } - return ts + 14447 + return ts + 14455 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -99937,7 +99975,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -99950,11 +99988,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14432, ts + 14454, ts + 14438} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14440, ts + 14462, ts + 14446} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99966,7 +100004,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14462, 0) + ts+14470, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -99980,13 +100018,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14546, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14554, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -100155,7 +100193,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -100170,7 +100208,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -100187,7 +100225,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -100229,7 +100267,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -100289,14 +100327,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14563, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -100342,7 +100380,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100362,7 +100400,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -100370,7 +100408,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -100380,7 +100418,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100399,7 +100437,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+12+uintptr(i)*24)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14601, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, libc.VaList(bp, zName)) } } } @@ -100423,7 +100461,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -100453,7 +100491,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -100484,7 +100522,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -100499,7 +100537,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -100510,7 +100548,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100534,7 +100572,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+436, zName) @@ -100579,7 +100617,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -100595,7 +100633,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -100615,7 +100653,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100637,7 +100675,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14631, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14639, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -100661,7 +100699,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -100702,7 +100740,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -100738,7 +100776,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*4)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 36)) { @@ -100750,7 +100788,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -100788,7 +100826,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -100868,7 +100906,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -100903,7 +100941,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -100950,7 +100988,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -100968,7 +101006,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -100989,7 +101027,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -101008,16 +101046,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14670, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14691, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14699, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -101026,7 +101064,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -101058,7 +101096,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -101609,7 +101647,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14729) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14737) __61: ; @@ -101664,7 +101702,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -101754,7 +101792,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11225) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11233) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -101801,7 +101839,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -101890,7 +101928,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -101946,7 +101984,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -101974,7 +102012,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*20 @@ -101984,14 +102022,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -102021,7 +102059,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -102032,18 +102070,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102092,7 +102130,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102104,7 +102142,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) return } iVal = -iVal @@ -102146,7 +102184,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -102261,7 +102299,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -102298,7 +102336,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -102406,7 +102444,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102444,7 +102482,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14759, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14767, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -102460,7 +102498,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -102477,7 +102515,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102498,7 +102536,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102527,7 +102565,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102551,7 +102589,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -102569,7 +102607,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102584,7 +102622,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102593,7 +102631,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102608,20 +102646,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -102661,7 +102699,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(11) defer tls.Free(11) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -102847,13 +102885,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -102871,7 +102909,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102894,7 +102932,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 116 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14764, -1) + Xsqlite3_result_error(tls, context, ts+14772, -1) return } if argc == 3 { @@ -102906,7 +102944,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14797, -1) + ts+14805, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -102934,7 +102972,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*4)), pColl) != 0 { @@ -102944,7 +102982,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -102955,7 +102993,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -102966,7 +103004,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102978,7 +103016,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -102993,7 +103031,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -103008,11 +103046,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -103034,7 +103072,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14842, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14850, libc.VaList(bp+8, r1)) } } break @@ -103071,7 +103109,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14849, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14857, libc.VaList(bp+24, zArg)) break } @@ -103093,7 +103131,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -103116,7 +103154,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -103130,7 +103168,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -103168,7 +103206,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -103206,7 +103244,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -103225,7 +103263,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -103314,7 +103352,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -103417,8 +103455,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -103427,7 +103465,7 @@ var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103465,7 +103503,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14852, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14860, 4, uintptr(0)) } } @@ -103478,10 +103516,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -103493,7 +103531,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11977, -1) + Xsqlite3_result_error(tls, context, ts+11985, -1) return } @@ -103517,11 +103555,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -103531,7 +103569,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -103553,7 +103591,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -103576,12 +103614,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -103590,7 +103628,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -103598,7 +103636,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -103612,14 +103650,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -103633,7 +103671,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -103644,7 +103682,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -103654,7 +103692,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -103692,7 +103730,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -103705,11 +103743,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -103725,9 +103763,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -103792,7 +103830,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -103834,7 +103872,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -103842,7 +103880,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -103860,8 +103898,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14857, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14865, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -103871,7 +103909,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -103881,14 +103919,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14863, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14863, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -103906,7 +103944,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -103962,7 +104000,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -103991,11 +104029,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -104005,7 +104043,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -104062,18 +104100,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -104094,7 +104132,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -104120,13 +104158,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -104154,7 +104192,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -104165,109 +104203,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14868}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14888}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14901}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14919}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14876}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14896}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14909}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14927}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14928}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14951}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14977}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15002}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15011}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15022}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15029}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15060}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15060}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15060}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15064}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15068}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15075}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15110}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15133}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15139}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15145}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15149}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15156}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15181}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15213}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15230}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15248}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14936}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14959}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14985}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15010}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15019}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15037}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15068}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15068}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15068}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15072}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15076}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15083}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15098}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15104}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15131}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15141}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15153}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15157}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15171}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15182}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15189}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15204}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15238}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15256}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15304}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15308}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15314}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15312}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15316}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15322}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15337}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15351}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15345}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15359}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15364}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15370}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15376}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15383}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15398}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15408}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15412}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15422}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15437}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15378}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15384}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15391}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15406}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15410}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15430}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15435}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15441}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15445}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15466}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15478}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15449}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15453}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15458}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15463}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15486}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15491}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15499}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15502}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15342}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15507}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15499}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15510}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15515}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -104442,7 +104480,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -104553,7 +104591,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15511, + ts+15519, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -104588,7 +104626,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -104718,7 +104756,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -104745,7 +104783,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -104786,7 +104824,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -104910,7 +104948,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+56, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -104920,7 +104958,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -104934,7 +104972,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -104967,7 +105005,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -105030,7 +105068,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FiFrom @@ -105054,7 +105092,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FzCol @@ -105078,7 +105116,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -105113,7 +105151,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -105315,7 +105353,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -105374,7 +105412,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -105442,7 +105480,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -105644,7 +105682,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -105665,7 +105703,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -105725,7 +105763,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -105767,7 +105805,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -105846,7 +105884,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -105904,7 +105942,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -105940,7 +105978,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 20)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*16)).FcolFlags)) @@ -105953,7 +105991,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -106066,7 +106104,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -106120,7 +106158,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -106160,7 +106198,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -106174,7 +106212,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -106182,7 +106220,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -106193,7 +106231,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -106224,16 +106262,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -106334,7 +106372,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -106516,7 +106554,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -106606,7 +106647,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15556, + ts+15564, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -106631,7 +106672,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15597, + Xsqlite3ErrorMsg(tls, pParse, ts+15605, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -106803,7 +106844,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15629, + ts+15637, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -106813,7 +106854,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15681, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15689, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -106869,7 +106910,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15706, + Xsqlite3ErrorMsg(tls, pParse, ts+15714, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -106877,7 +106918,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15752, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15760, 0) goto insert_cleanup __57: ; @@ -107361,7 +107402,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15773) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15781) __123: ; @@ -107385,7 +107426,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -107412,7 +107453,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -107445,7 +107486,7 @@ func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng ui type IndexListTerm1 = struct { Fp uintptr Fix int32 -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -107456,7 +107497,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -107464,12 +107505,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [4]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 4 /* &.aIdx */)))).Fix @@ -107482,7 +107523,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -107588,7 +107629,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -107705,7 +107746,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -108446,7 +108487,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -108463,7 +108504,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -108566,7 +108607,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -108644,7 +108685,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -108702,7 +108743,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -108723,18 +108764,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -109088,7 +109123,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109109,7 +109144,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -109298,7 +109333,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -109632,7 +109667,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -109646,7 +109681,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -109690,7 +109725,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11977, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11985, 0) __3: ; return SQLITE_ERROR @@ -109700,7 +109735,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15787 /* "sqlite3_extensio..." */ + zEntry = ts + 15795 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -109720,7 +109755,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -109766,7 +109801,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15810, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15818, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -109780,7 +109815,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15819, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15827, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -109804,7 +109839,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15823, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15831, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -109822,7 +109857,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15829, libc.VaList(bp+16, zEntry, zFile)) + ts+15837, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -109849,7 +109884,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15872, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15880, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -109889,7 +109924,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15904, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15912, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -109899,10 +109934,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15941, -} /* sqlite3.c:129386:21 */ + ts + 15949, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -109913,7 +109948,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -109924,7 +109959,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 28)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -109943,15 +109978,15 @@ func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int3 type sqlite3AutoExtList = struct { FnExt U32 FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -109961,7 +109996,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -110002,7 +110037,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -110021,7 +110056,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -110036,7 +110071,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -110067,7 +110102,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15944, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15952, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -110113,67 +110148,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5008, - ts + 15983, + ts + 15991, ts + 8761, - ts + 15987, - ts + 15992, ts + 15995, - ts + 16005, - ts + 16015, - ts + 16021, - ts + 16025, - ts + 16030, - ts + 16035, + ts + 16000, + ts + 16003, + ts + 16013, + ts + 16023, + ts + 16029, + ts + 16033, + ts + 16038, ts + 16043, - ts + 16054, - ts + 16057, + ts + 16051, + ts + 16062, + ts + 16065, - ts + 16064, - ts + 16025, - ts + 16030, - ts + 16071, - ts + 16076, + ts + 16072, + ts + 16033, + ts + 16038, ts + 16079, - ts + 16086, - ts + 16021, - ts + 16025, - ts + 16092, - ts + 16097, - ts + 16102, - ts + 16025, - ts + 16106, - ts + 16030, + ts + 16084, + ts + 16087, + ts + 16094, + ts + 16029, + ts + 16033, + ts + 16100, + ts + 16105, + ts + 16110, + ts + 16033, ts + 16114, - ts + 16118, - ts + 16123, - ts + 11369, - ts + 11365, - ts + 16129, - ts + 16134, - ts + 16139, - ts + 15983, - ts + 16025, - ts + 16144, - ts + 16151, - ts + 16158, - ts + 8761, + ts + 16038, + ts + 16122, + ts + 16126, + ts + 16131, + ts + 11377, + ts + 11373, + ts + 16137, + ts + 16142, + ts + 16147, + ts + 15991, + ts + 16033, + ts + 16152, + ts + 16159, ts + 16166, + ts + 8761, + ts + 16174, ts + 5011, - ts + 16172, + ts + 16180, - ts + 15983, - ts + 16025, - ts + 16177, - ts + 16182, - ts + 15379, - ts + 16187, + ts + 15991, + ts + 16033, + ts + 16185, + ts + 16190, + ts + 15387, + ts + 16195, - ts + 16200, - ts + 16209, - ts + 16216, + ts + 16208, + ts + 16217, + ts + 16224, - ts + 16227, -} /* sqlite3.c:129831:19 */ + ts + 16235, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -110183,247 +110218,247 @@ type PragmaName1 = struct { FiPragCName U8 FnPragCName U8 FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16235, + { /* zName: */ FzName: ts + 16243, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16250, + { /* zName: */ FzName: ts + 16258, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16265, + { /* zName: */ FzName: ts + 16273, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16277, + { /* zName: */ FzName: ts + 16285, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16293, + { /* zName: */ FzName: ts + 16301, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16216, + { /* zName: */ FzName: ts + 16224, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16306, + { /* zName: */ FzName: ts + 16314, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16318, + { /* zName: */ FzName: ts + 16326, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16338, + { /* zName: */ FzName: ts + 16346, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16354, + { /* zName: */ FzName: ts + 16362, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16375, + { /* zName: */ FzName: ts + 16383, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16390, + { /* zName: */ FzName: ts + 16398, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16406, + { /* zName: */ FzName: ts + 16414, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16420, + { /* zName: */ FzName: ts + 16428, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16433, + { /* zName: */ FzName: ts + 16441, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16447, + { /* zName: */ FzName: ts + 16455, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16466, + { /* zName: */ FzName: ts + 16474, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16485, + { /* zName: */ FzName: ts + 16493, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16508, + { /* zName: */ FzName: ts + 16516, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16517, + { /* zName: */ FzName: ts + 16525, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16535, + { /* zName: */ FzName: ts + 16543, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16552, + { /* zName: */ FzName: ts + 16560, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16565, + { /* zName: */ FzName: ts + 16573, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16580, + { /* zName: */ FzName: ts + 16588, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16598, + { /* zName: */ FzName: ts + 16606, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16608, + { /* zName: */ FzName: ts + 16616, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16638, + { /* zName: */ FzName: ts + 16646, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16663, + { /* zName: */ FzName: ts + 16671, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16682, + { /* zName: */ FzName: ts + 16690, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16693, + { /* zName: */ FzName: ts + 16701, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16704, + { /* zName: */ FzName: ts + 16712, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16716, + { /* zName: */ FzName: ts + 16724, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16732, + { /* zName: */ FzName: ts + 16740, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16745, + { /* zName: */ FzName: ts + 16753, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16764, + { /* zName: */ FzName: ts + 16772, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16783, + { /* zName: */ FzName: ts + 16791, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16796, + { /* zName: */ FzName: ts + 16804, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16811, + { /* zName: */ FzName: ts + 16819, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16821, + { /* zName: */ FzName: ts + 16829, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16833, + { /* zName: */ FzName: ts + 16841, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16842, + { /* zName: */ FzName: ts + 16850, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16853, + { /* zName: */ FzName: ts + 16861, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16863, + { /* zName: */ FzName: ts + 16871, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16875, + { /* zName: */ FzName: ts + 16883, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16886, + { /* zName: */ FzName: ts + 16894, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16898, + { /* zName: */ FzName: ts + 16906, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16915, + { /* zName: */ FzName: ts + 16923, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16934, + { /* zName: */ FzName: ts + 16942, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16960, + { /* zName: */ FzName: ts + 16968, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16975, + { /* zName: */ FzName: ts + 16983, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16989, + { /* zName: */ FzName: ts + 16997, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17008, + { /* zName: */ FzName: ts + 17016, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17022, + { /* zName: */ FzName: ts + 17030, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17038, + { /* zName: */ FzName: ts + 17046, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17050, + { /* zName: */ FzName: ts + 17058, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17061, + { /* zName: */ FzName: ts + 17069, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17072, + { /* zName: */ FzName: ts + 17080, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17084, + { /* zName: */ FzName: ts + 17092, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17095, + { /* zName: */ FzName: ts + 17103, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17116, + { /* zName: */ FzName: ts + 17124, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17124, + { /* zName: */ FzName: ts + 17132, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17139, + { /* zName: */ FzName: ts + 17147, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17152, + { /* zName: */ FzName: ts + 17160, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17171, + { /* zName: */ FzName: ts + 17179, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17186, + { /* zName: */ FzName: ts + 17194, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -110439,7 +110474,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -110456,13 +110491,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17202)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17210)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -110471,12 +110506,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17227) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17235) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17237) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17245) { return PAGER_LOCKINGMODE_NORMAL } } @@ -110487,15 +110522,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7905) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17244) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17252) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17249) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17257) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -110510,12 +110545,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16177) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16185) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17261) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17269) == 0 { return 2 } else { return 0 @@ -110525,13 +110560,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17268, 0) + ts+17276, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -110544,7 +110579,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -110558,7 +110593,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -110592,7 +110627,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -110602,7 +110637,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -110611,7 +110646,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -110627,23 +110662,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17330 /* "SET NULL" */ + zName = ts + 17338 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17339 /* "SET DEFAULT" */ + zName = ts + 17347 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17351 /* "CASCADE" */ + zName = ts + 17359 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17359 /* "RESTRICT" */ + zName = ts + 17367 /* "RESTRICT" */ break default: - zName = ts + 17368 /* "NO ACTION" */ + zName = ts + 17376 /* "NO ACTION" */ break } return zName @@ -110652,7 +110687,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint32(unsafe.Sizeof(azModeName))/uint32(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -110661,11 +110696,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17378, ts + 17385, ts + 17393, ts + 17397, ts + 17261, ts + 17406, -} /* sqlite3.c:130656:15 */ + ts + 17386, ts + 17393, ts + 17401, ts + 17405, ts + 17269, ts + 17414, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -110692,7 +110727,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -110707,13 +110742,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17410 /* "w" */ + zType = ts + 17418 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17412 /* "a" */ + zType = ts + 17420 /* "a" */ } else { zType = ts + 7415 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17414, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17422, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -110721,15 +110756,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17421, ts + 17426, ts + 17434 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17429, ts + 17434, ts + 17442 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -110751,7 +110786,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(568) defer tls.Free(568) @@ -110998,7 +111033,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17442, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17450, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -111641,7 +111676,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17446) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17454) == 0) { goto __64 } b = 2 @@ -111730,7 +111765,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17237 /* "normal" */ + zRet = ts + 17245 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -111771,7 +111806,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17227 /* "exclusive" */ + zRet = ts + 17235 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -112136,7 +112171,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 492)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17451, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17459, 0) goto pragma_out __126: ; @@ -112182,7 +112217,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17476, 0) + ts+17484, 0) goto __133 __132: if !(iDb != 1) { @@ -112238,7 +112273,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17529) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17537) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -112352,9 +112387,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17535 /* "issisii" */ + return ts + 17543 /* "issisii" */ } - return ts + 17543 /* "issisi" */ + return ts + 17551 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -112439,7 +112474,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17550, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17558, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -112492,13 +112527,13 @@ __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12650 /* "virtual" */ + zType = ts + 12658 /* "virtual" */ goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17566 /* "shadow" */ + zType = ts + 17574 /* "shadow" */ goto __183 __182: zType = ts + 8761 /* "table" */ @@ -112508,7 +112543,7 @@ __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17573, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17581, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -112578,7 +112613,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17580, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17588, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -112588,7 +112623,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17585, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17593, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*4)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -112625,8 +112660,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 500 /* azOrigin */)) = [3]uintptr{ts + 17590, ts + 17592, ts + 16054} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17594, + *(*[3]uintptr)(unsafe.Pointer(bp + 500 /* azOrigin */)) = [3]uintptr{ts + 17598, ts + 17600, ts + 16062} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17602, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -112660,7 +112695,7 @@ __199: __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17600, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17608, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FpBt))) @@ -112683,7 +112718,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17612, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -112802,7 +112837,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17607, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17615, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -112810,7 +112845,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17616)) + ts+17624)) goto __227 __227: j2++ @@ -113011,7 +113046,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17621, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17629, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 516 /* aiCols */))) @@ -113277,7 +113312,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17625, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17633, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -113379,7 +113414,7 @@ __304: goto __305 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17649, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17657, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { @@ -113401,7 +113436,7 @@ __305: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17669, + zErr = Xsqlite3MPrintf(tls, db, ts+17677, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -113445,7 +113480,7 @@ __313: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17691, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17699, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -113479,9 +113514,9 @@ __318: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 528))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17721) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17729) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17726) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17734) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -113521,7 +113556,7 @@ __322: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 528))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17747) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17755) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __319: @@ -113543,7 +113578,7 @@ __314: if !!(isQuick != 0) { goto __324 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17774) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17782) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __325: @@ -113594,7 +113629,7 @@ __266: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 520)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17803 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17811 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __329: @@ -113672,7 +113707,7 @@ __336: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __338 } - Xsqlite3ErrorMsg(tls, pParse, ts+17806, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17814, libc.VaList(bp+416, zRight)) __338: ; __333: @@ -113784,19 +113819,19 @@ __48: if !(zRight != 0) { goto __345 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17244) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17252) == 0) { goto __346 } eMode2 = SQLITE_CHECKPOINT_FULL goto __347 __346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17831) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17839) == 0) { goto __348 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __349 __348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17397) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17405) == 0) { goto __350 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -113983,7 +114018,7 @@ __365: __367: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17839, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17847, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __368 @@ -114134,9 +114169,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -114147,16 +114182,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -114165,27 +114200,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17857, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17862, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17868, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17877, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17886, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17902}, - {FzName: ts + 17909}, + {FzName: ts + 17865, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17870, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17876, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17885, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17902, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17910}, + {FzName: ts + 17917}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -114197,24 +114232,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -114231,7 +114266,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+56, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17915) + Xsqlite3_str_appendall(tls, bp+32, ts+17923) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -114239,7 +114274,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17930, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17938, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -114252,16 +114287,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17937, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17945, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17943) + Xsqlite3_str_appendall(tls, bp+32, ts+17951) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17955) + Xsqlite3_str_appendall(tls, bp+32, ts+17963) j++ } Xsqlite3_str_append(tls, bp+32, ts+4908, 1) @@ -114288,7 +114323,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -114300,7 +114335,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114365,7 +114400,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -114378,7 +114413,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -114389,7 +114424,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -114397,7 +114432,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -114413,7 +114448,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114459,13 +114494,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 116 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17970) + Xsqlite3_str_appendall(tls, bp+32, ts+17978) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17978, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17986, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 16)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17982, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17990, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -114481,14 +114516,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -114500,7 +114535,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -114518,12 +114553,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -114556,7 +114591,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114567,12 +114602,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17986, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+17994, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -114581,25 +114616,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4959 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18014, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18022, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18053, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18053, - ts + 18060, - ts + 18072, -} /* sqlite3.c:133149:23 */ + ts + 18061, + ts + 18068, + ts + 18080, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -114621,7 +114656,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114666,7 +114701,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), db+168) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } libc.SetBitFieldPtr8Uint32(db+168+8, uint32(0), 0, 0x1) @@ -114704,13 +114739,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18083) + corruptSchema(tls, pData, argv, ts+18091) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), pIndex+44) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } } @@ -114723,7 +114758,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -114756,13 +114791,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8761 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7825 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18096 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18104 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FiDb = iDb @@ -114875,7 +114910,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11652) + ts+11660) rc = SQLITE_ERROR goto initone_error_out __13: @@ -114915,7 +114950,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18168) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18176) rc = SQLITE_ERROR goto initone_error_out __17: @@ -114937,7 +114972,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18192, + ts+18200, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -115024,7 +115059,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -115056,7 +115091,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -115075,7 +115110,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115128,7 +115163,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -115155,7 +115190,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -115211,7 +115246,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -115234,7 +115269,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+152)-uint32(uintptr(0)+4)) libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) @@ -115247,7 +115282,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(288) defer tls.Free(288) @@ -115329,7 +115364,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18226, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18234, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -115356,7 +115391,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18256, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18264, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -115453,13 +115488,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -115488,7 +115523,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115527,14 +115562,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -115547,7 +115582,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -115564,7 +115599,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115577,7 +115612,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -115612,21 +115647,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -115660,7 +115695,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -115681,7 +115716,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115711,7 +115746,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115729,19 +115764,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -115770,7 +115805,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -115781,7 +115816,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -115831,14 +115866,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -115860,7 +115895,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -115903,18 +115938,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18275, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18283, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18319, 0) + ts+18327, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18374)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18382)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -115927,11 +115962,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -115965,7 +116000,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -115993,7 +116028,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -116038,7 +116073,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -116062,7 +116097,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 36)) == iTable) { @@ -116097,7 +116132,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116129,7 +116164,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18408, libc.VaList(bp, 0)) + ts+18416, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -116153,7 +116188,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18458, 0) + ts+18466, 0) return 1 } @@ -116188,7 +116223,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18513, libc.VaList(bp+8, zName)) + ts+18521, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -116211,11 +116246,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -116224,7 +116259,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -116237,7 +116272,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -116380,7 +116415,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -116428,7 +116463,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116509,7 +116544,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116537,7 +116572,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -116893,7 +116928,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint32(N+X)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32(1)) - uint32(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(KeyInfo{}))+uint32(nExtra))) if p != 0 { @@ -116911,7 +116946,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -116922,7 +116957,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -116942,7 +116977,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -116976,20 +117011,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18577 /* "UNION ALL" */ + z = ts + 18585 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18587 /* "INTERSECT" */ + z = ts + 18595 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18597 /* "EXCEPT" */ + z = ts + 18605 /* "EXCEPT" */ break default: - z = ts + 18604 /* "UNION" */ + z = ts + 18612 /* "UNION" */ break } return z @@ -117003,11 +117038,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18610, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18618, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -117020,7 +117055,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -117199,7 +117234,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -117277,7 +117312,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1099 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 16166 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 16174 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, uintptr(0)) @@ -117323,7 +117358,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -117380,7 +117415,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -117432,13 +117467,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16166 /* "rowid" */ + zCol = ts + 16174 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -117448,7 +117483,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*20)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -117480,7 +117515,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -117541,7 +117576,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16166 /* "rowid" */ + zName = ts + 16174 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -117554,7 +117589,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -117569,7 +117604,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18642, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18650, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -117612,7 +117647,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -117681,7 +117716,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -117716,7 +117751,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -117748,7 +117783,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -117805,7 +117840,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -117829,7 +117864,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -117898,7 +117933,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -117934,7 +117969,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18658, 0) return __1: ; @@ -118044,7 +118079,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18699, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18707, 0) goto end_of_recursive_query __15: ; @@ -118066,7 +118101,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18741, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18749, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -118109,7 +118144,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18747, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18755, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -118139,7 +118174,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -118159,11 +118194,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18762, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18770, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1534 /* "" */ } - return ts + 18785 /* "S" */ + return ts + 18793 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -118179,7 +118214,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -118215,7 +118250,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -118315,8 +118350,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18787, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18802, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18795, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) __8: ; @@ -118365,7 +118400,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18577, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18585, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -118441,7 +118476,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -118513,7 +118548,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -118678,15 +118713,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18842, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18850, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18888, + ts+18896, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -118709,7 +118744,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -118905,7 +118940,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -119112,7 +119147,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+36, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18970, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18978, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -119120,7 +119155,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18981, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18989, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -119134,7 +119169,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18986, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18994, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -119254,14 +119289,14 @@ type SubstContext1 = struct { FiNewTable int32 FisLeftJoin int32 FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -119274,7 +119309,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -119357,7 +119392,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -119367,7 +119402,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -119410,7 +119445,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -119426,7 +119461,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -119458,7 +119493,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -119491,7 +119526,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -119501,7 +119536,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+28) @@ -119528,7 +119563,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -119698,7 +119733,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120123,7 +120158,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -120131,7 +120166,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -120173,7 +120208,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -120208,7 +120243,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -120262,7 +120297,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -120329,7 +120364,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -120382,7 +120417,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -120453,7 +120488,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -120541,7 +120576,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -120557,12 +120592,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15060) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15068) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15064) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15072) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -120591,7 +120626,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -120631,7 +120666,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -120642,7 +120677,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18992, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19000, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -120670,7 +120705,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120749,12 +120784,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19010, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19018, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -120768,7 +120803,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -120803,7 +120838,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -120836,7 +120871,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -120919,7 +120954,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19033, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19041, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 7, 0x80) @@ -120946,7 +120981,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19053, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19061, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -120962,7 +120997,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19096 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19104 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -120988,7 +121023,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19119, + Xsqlite3ErrorMsg(tls, pParse, ts+19127, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -120999,9 +121034,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+34, pTab+4) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19157 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19165 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19191 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19199 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -121018,7 +121053,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -121034,7 +121069,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121049,7 +121084,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19229, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19237, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -121088,7 +121123,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -121176,7 +121211,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19241, + Xsqlite3ErrorMsg(tls, pParse, ts+19249, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -121195,7 +121230,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19280, + Xsqlite3ErrorMsg(tls, pParse, ts+19288, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -121203,7 +121238,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19311, + Xsqlite3ErrorMsg(tls, pParse, ts+19319, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -121368,7 +121403,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -121384,7 +121419,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19344, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19352, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -121404,9 +121439,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19353, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19361, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19371, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19379, 0) } } } @@ -121416,7 +121451,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19391, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19399, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -121437,7 +121472,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -121475,7 +121510,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -121523,7 +121558,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -121552,7 +121587,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -121577,7 +121612,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121605,13 +121640,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19422, 0) + ts+19430, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 20)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19473, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19481, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -121627,7 +121662,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -121666,7 +121701,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -121807,17 +121842,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19506, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19514, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19518 /* " USING COVERING ..." */ + return ts + 19526 /* " USING COVERING ..." */ } return ts + 1534 /* "" */ }(), @@ -121839,7 +121874,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) // This routine is called before the HAVING clause of the current @@ -121885,7 +121920,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -121903,7 +121938,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -121944,7 +121979,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -121961,7 +121996,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(164) defer tls.Free(164) @@ -122162,7 +122197,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19541, + ts+19549, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -122248,7 +122283,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19595, + Xsqlite3ErrorMsg(tls, pParse, ts+19603, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -122488,7 +122523,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19635, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19643, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+36+4, uint32(1), 4, 0x10) @@ -122551,7 +122586,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19650, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19658, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -123073,9 +123108,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19666 /* "DISTINCT" */ + return ts + 19674 /* "DISTINCT" */ } - return ts + 19675 /* "GROUP BY" */ + return ts + 19683 /* "GROUP BY" */ }()) groupBySort = 1 @@ -123488,7 +123523,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19666) + explainTempTable(tls, pParse, ts+19674) __141: ; @@ -123500,9 +123535,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19684 /* "RIGHT PART OF OR..." */ + return ts + 19692 /* "RIGHT PART OF OR..." */ } - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -123557,7 +123592,7 @@ type TabResult1 = struct { FnColumn U32 FnData U32 Frc int32 -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -123581,12 +123616,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123657,7 +123692,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19716, 0) + ts+19724, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -123717,7 +123752,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -123789,7 +123824,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -123820,7 +123855,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -123849,7 +123884,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -123887,7 +123922,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -123917,7 +123952,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19789, 0) goto trigger_cleanup __3: ; @@ -123978,7 +124013,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19827, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19835, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -123996,7 +124031,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) goto trigger_orphan_error __11: ; @@ -124011,7 +124046,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19827, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19835, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -124027,7 +124062,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19876, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19884, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -124044,7 +124079,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19902, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19910, 0) goto trigger_cleanup __18: ; @@ -124054,12 +124089,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19940, + Xsqlite3ErrorMsg(tls, pParse, ts+19948, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19977 /* "BEFORE" */ + return ts + 19985 /* "BEFORE" */ } - return ts + 19984 /* "AFTER" */ + return ts + 19992 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -124068,7 +124103,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19990, libc.VaList(bp+24, pTableName+8)) + ts+19998, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -124098,7 +124133,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -124194,7 +124229,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -124234,7 +124269,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+48, pParse, iDb, ts+19827, bp+40) + Xsqlite3FixInit(tls, bp+48, pParse, iDb, ts+19835, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -124271,13 +124306,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20036, + ts+20044, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20111, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20119, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -124318,7 +124353,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -124336,7 +124371,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -124353,10 +124388,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(TriggerStep{}))+(*Token)(unsafe.Pointer(pName)).Fn+uint32(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*48 @@ -124377,7 +124415,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124409,7 +124447,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124438,7 +124476,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124457,7 +124495,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -124477,7 +124515,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124543,7 +124581,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20140, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20148, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -124561,12 +124599,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -124584,7 +124622,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -124599,7 +124637,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20160, + ts+20168, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -124607,7 +124645,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -124638,7 +124676,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -124655,7 +124693,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124718,12 +124756,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20222, + ts+20230, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20270 /* "DELETE" */ + return ts + 20278 /* "DELETE" */ } - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ }())) __15: ; @@ -124782,7 +124820,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -124807,7 +124845,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -124819,7 +124857,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20284, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20292, 0) return 1 } @@ -124828,7 +124866,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -124869,7 +124907,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -124937,7 +124975,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -125024,7 +125062,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -125037,7 +125075,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(312) defer tls.Free(312) @@ -125094,7 +125132,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20326, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20334, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -125143,7 +125181,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -125172,7 +125210,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -125232,7 +125270,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -125280,7 +125318,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -125337,7 +125375,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -125367,7 +125405,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -125388,7 +125426,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -125400,7 +125438,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -125444,7 +125482,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -125527,7 +125565,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -125808,7 +125846,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20340, + ts+20348, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -125840,7 +125878,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20376, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20384, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -126881,7 +126919,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20395) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20403) __169: ; @@ -126917,7 +126955,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127090,7 +127128,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -127103,14 +127141,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -127123,7 +127161,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -127149,7 +127187,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -127269,10 +127307,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 152)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152, ts+20408, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152, ts+20416, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20412, libc.VaList(bp+8, bp+152)) + ts+20420, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -127291,7 +127329,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -127313,7 +127351,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -127329,7 +127367,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -127363,7 +127401,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12079, -1) + ts+12087, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -127409,7 +127447,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -127431,7 +127469,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20485, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20489, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20493, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20497, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -127449,7 +127487,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -127493,7 +127531,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -127550,7 +127588,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -127581,14 +127619,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20493) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20501) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20533) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20541) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -127599,7 +127637,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20576) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __5: ; @@ -127644,7 +127682,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20594, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20602, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -127665,7 +127703,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20625) goto end_of_vacuum __8: ; @@ -127681,7 +127719,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14432) + rc = execSql(tls, db, pzErrMsg, ts+14440) if !(rc != SQLITE_OK) { goto __9 } @@ -127733,7 +127771,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20644, + ts+20652, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -127743,7 +127781,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20752, + ts+20760, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -127758,7 +127796,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20806, + ts+20814, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -127775,7 +127813,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20957, + ts+20965, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -127888,7 +127926,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -127896,7 +127934,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -127936,7 +127974,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -127950,18 +127988,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 392)).Ffirst; pThis != 0; pThis = pNext { @@ -127982,7 +128020,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -128000,14 +128038,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -128017,7 +128055,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -128038,7 +128076,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -128075,7 +128113,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 44 + 8; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 24 { @@ -128106,7 +128144,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -128132,7 +128170,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -128152,7 +128190,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128162,7 +128200,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32(2+*(*int32)(unsafe.Pointer(pTable + 44)))) if *(*int32)(unsafe.Pointer(pTable + 44))+3 >= *(*int32)(unsafe.Pointer(db + 116 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -128178,7 +128216,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -128213,7 +128251,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -128224,7 +128262,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -128259,7 +128297,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32((int32((*Token)(unsafe.Pointer(pEnd)).Fz)-int32((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21087, libc.VaList(bp, pParse+188)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21095, libc.VaList(bp, pParse+188)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -128271,7 +128309,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21111, + ts+21119, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -128281,7 +128319,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21210, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21218, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -128308,7 +128346,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -128316,7 +128354,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 252 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -128330,7 +128368,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -128351,7 +128389,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21237, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -128391,7 +128429,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21271, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21279, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */))) @@ -128405,7 +128443,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21301 /* "vtable construct..." */ + var zFormat uintptr = ts + 21309 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -128426,7 +128464,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16057, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16065, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -128466,7 +128504,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -128485,7 +128523,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21347, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21355, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -128502,7 +128540,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -128522,7 +128560,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*4)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -128534,7 +128572,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128553,7 +128591,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21347, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -128574,7 +128612,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -128590,7 +128628,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -128664,7 +128702,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -128709,7 +128747,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -128739,7 +128777,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -128761,14 +128799,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+68)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+64)) return SQLITE_OK } @@ -128779,7 +128817,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -128840,7 +128878,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -128888,7 +128926,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128955,7 +128993,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -128994,7 +129032,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -129039,7 +129077,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -129056,19 +129094,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -129077,7 +129115,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -129105,7 +129143,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -129169,7 +129207,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -129209,23 +129247,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -129253,9 +129291,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -129282,9 +129320,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -129294,9 +129332,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -129315,9 +129353,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -129329,9 +129367,9 @@ type WhereLoopBuilder1 = struct { FbldFlags2 uint8 F__ccgo_pad1 [2]byte FiPlanLimit uint32 -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -129346,23 +129384,23 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [2]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -129384,7 +129422,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129410,7 +129448,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129432,7 +129470,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -129454,13 +129492,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21366 /* "" */ + return ts + 21374 /* "" */ } if i == -1 { - return ts + 16166 /* "rowid" */ + return ts + 16174 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -129471,19 +129509,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -129494,11 +129532,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_append(tls, pStr, ts+4959, 1) } @@ -129519,7 +129557,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129532,27 +129570,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21381, 2) + Xsqlite3_str_append(tls, pStr, ts+21389, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21384 /* "%s=?" */ + return ts + 21392 /* "%s=?" */ } - return ts + 21389 /* "ANY(%s)" */ + return ts + 21397 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21397) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21405) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21399) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21407) } Xsqlite3_str_append(tls, pStr, ts+4908, 1) } @@ -129564,7 +129602,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -129599,11 +129637,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+88, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21401, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21409, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21407 /* "SEARCH" */ + return ts + 21415 /* "SEARCH" */ } - return ts + 21414 /* "SCAN" */ + return ts + 21422 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -129613,30 +129651,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10853 /* "PRIMARY KEY" */ + zFmt = ts + 10861 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21419 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21427 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21452 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21460 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21477 /* "COVERING INDEX %..." */ + zFmt = ts + 21485 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21495 /* "INDEX %s" */ + zFmt = ts + 21503 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21504, 7) + Xsqlite3_str_append(tls, bp+64, ts+21512, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16166 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21512, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16174 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21520, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21543, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21551, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -129644,9 +129682,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21553, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21561, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21558, + Xsqlite3_str_appendf(tls, bp+64, ts+21566, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -129665,7 +129703,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -129683,22 +129721,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+48, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21593, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21606, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21614, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21373, 5) + Xsqlite3_str_append(tls, bp+24, ts+21381, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4908, 1) @@ -129748,7 +129786,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -129781,7 +129819,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -129814,7 +129852,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -129852,7 +129890,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -129927,7 +129965,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130120,7 +130158,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -130157,6 +130195,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -130240,7 +130279,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -130281,7 +130320,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -130309,10 +130348,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -130329,7 +130368,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -130349,7 +130388,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -130371,7 +130410,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -130436,7 +130475,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -130482,7 +130521,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130492,6 +130531,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -130524,7 +130566,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -130595,7 +130637,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -130657,53 +130698,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 60)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*4)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 16)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 16)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 60 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 60 + 4)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 24 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 20)) + 8 + uintptr(iFld-1)*20)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -130711,8 +130751,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -131348,6 +131388,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -131362,7 +131410,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -131379,7 +131429,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21622, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -131398,7 +131448,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21637, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -131746,24 +131796,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -131785,7 +131835,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -131827,14 +131877,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -131854,7 +131904,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -131881,7 +131931,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -132053,7 +132103,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -132158,18 +132208,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16015, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15337, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14863, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21638, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16023, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15345, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14871, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21646, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 36)) = *(*int32)(unsafe.Pointer(pBase + 36)) @@ -132177,7 +132227,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*48)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*48)).FnChild++ @@ -132186,7 +132236,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -132217,7 +132267,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -132350,7 +132400,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -132669,7 +132719,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -132698,7 +132748,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -132733,7 +132783,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -132771,7 +132821,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -132812,7 +132862,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -132875,7 +132925,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21645, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21653, 0) return } } @@ -133059,7 +133109,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21686 /* "NOCASE" */ + return ts + 21694 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -133180,7 +133230,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 32)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -133203,7 +133253,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -133227,7 +133277,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -133279,7 +133329,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -133329,7 +133379,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -133342,7 +133392,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -133402,7 +133452,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -133432,7 +133482,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -133442,14 +133492,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -133466,7 +133516,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -133478,7 +133528,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133503,7 +133553,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21693, + Xsqlite3ErrorMsg(tls, pParse, ts+21701, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -133561,7 +133611,7 @@ type HiddenIndexInfo1 = struct { FmIn U32 FmHandleIn U32 FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -133591,16 +133641,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -133610,7 +133660,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -133635,7 +133685,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -133656,7 +133706,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { @@ -133677,14 +133727,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -133703,19 +133753,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+24, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+4, pSrc+4, uint32((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint32(unsafe.Sizeof(WhereOrCost{}))) } @@ -133725,7 +133775,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -133802,7 +133852,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -133822,14 +133872,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -133840,7 +133890,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -133944,7 +133994,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -133966,7 +134016,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -134021,7 +134071,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -134051,7 +134101,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*4)) @@ -134072,7 +134122,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -134093,7 +134143,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -134163,7 +134213,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -134180,7 +134230,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -134223,7 +134273,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -134257,7 +134307,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -134343,7 +134393,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21729, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21737, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -134424,7 +134474,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21755 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21763 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -134615,7 +134665,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -134691,7 +134741,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 756 + uintptr(iLevel)*80 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -134715,7 +134770,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -134941,7 +134996,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -134968,7 +135023,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135006,7 +135061,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -135145,7 +135200,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -135158,7 +135213,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -135202,7 +135257,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -135317,7 +135372,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 12 /* &.idxStr */))) @@ -135625,7 +135680,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+64 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -135634,7 +135689,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -135654,7 +135709,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+52)) @@ -135671,13 +135726,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -135698,7 +135753,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -135724,7 +135779,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -135768,7 +135823,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -135827,7 +135882,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -135916,7 +135971,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -136023,7 +136078,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -136126,7 +136181,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -136194,7 +136249,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -136554,7 +136609,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -136596,7 +136651,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -136671,7 +136726,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(98) defer tls.Free(98) @@ -136956,7 +137011,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -136980,7 +137035,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -137081,7 +137136,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*4)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137154,7 +137209,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137203,7 +137258,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*64 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -137226,7 +137281,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*64 var m U32 = func() uint32 { if iCons <= 31 { @@ -137249,7 +137304,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*64 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -137275,7 +137330,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*64 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -137304,7 +137359,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -137440,7 +137495,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(564) defer tls.Free(564) @@ -137565,7 +137620,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -137617,7 +137672,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21792, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21800, 0) rc = SQLITE_OK } else { goto __3 @@ -137653,7 +137708,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -138021,7 +138076,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x8 >> 3) } @@ -138029,7 +138084,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -138076,7 +138131,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -138391,7 +138446,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21827, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21835, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -138483,7 +138538,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -138590,7 +138645,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -138601,7 +138656,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -138647,7 +138702,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -138722,7 +138777,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -138834,7 +138889,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -138898,7 +138953,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21845, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21853, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -138978,7 +139033,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21873, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21881, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -139519,7 +139574,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -139736,6 +139791,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -139917,7 +139974,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -139926,7 +139983,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -139942,13 +139999,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -139958,7 +140015,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -139976,9 +140033,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -140041,10 +140098,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21891, -1) + pCtx, ts+21899, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140054,7 +140111,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -140067,7 +140124,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140081,7 +140138,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140094,7 +140151,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140107,7 +140164,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -140117,7 +140174,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -140125,7 +140182,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140143,7 +140200,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -140153,7 +140210,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -140161,7 +140218,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -140175,13 +140232,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -140190,14 +140247,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21947, -1) + pCtx, ts+21955, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -140205,7 +140262,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -140230,10 +140287,10 @@ func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ type LastValueCtx = struct { FpVal uintptr FnVal int32 -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -140248,7 +140305,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -140262,7 +140319,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140270,7 +140327,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140286,17 +140343,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21992)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22003)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22014)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22019)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22032)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22042)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22048)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22059)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22069)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22081)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22000)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22011)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22022)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22027)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22040)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22050)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22056)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22067)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22077)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22089)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22094 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -140305,7 +140362,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -140313,7 +140370,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -140328,7 +140385,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint32(unsafe.Sizeof(aWindowFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } @@ -140347,9 +140404,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140360,7 +140417,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22090, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22098, libc.VaList(bp, zName)) } return p } @@ -140380,7 +140437,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -140404,12 +140461,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22109, 0) + ts+22117, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22180, 0) + ts+22188, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -140447,16 +140504,16 @@ type WindowUpdate = struct { FeFrmType int32 FeStart int32 FeEnd int32 -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -140555,7 +140612,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -140579,7 +140636,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -140611,7 +140668,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -140657,7 +140714,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -140665,14 +140722,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22243, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22251, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -140682,12 +140739,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -140863,7 +140923,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -140874,7 +140934,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -140889,7 +140949,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -140902,7 +140962,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -140914,7 +140974,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -140947,7 +141007,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22269, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22277, 0) goto windowAllocErr __2: ; @@ -140983,7 +141043,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -141002,7 +141062,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141013,15 +141073,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22301 /* "PARTITION clause" */ + zErr = ts + 22309 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22318 /* "ORDER BY clause" */ + zErr = ts + 22326 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22334 /* "frame specificat..." */ + zErr = ts + 22342 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22354, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22362, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -141036,7 +141096,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 44)) = pWin @@ -141044,7 +141104,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22387, 0) + ts+22395, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -141055,7 +141115,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -141075,7 +141135,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -141115,7 +141175,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -141191,7 +141251,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -141220,17 +141280,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22434, - ts + 22487, - ts + 21891, - ts + 22538, - ts + 22590, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22442, + ts + 22495, + ts + 21899, + ts + 22546, + ts + 22598, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 20)) @@ -141254,19 +141314,19 @@ type WindowCodeArg1 = struct { Fstart WindowCsrAndReg Fcurrent WindowCsrAndReg Fend WindowCsrAndReg -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -141302,7 +141362,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -141409,7 +141469,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -141445,7 +141505,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -141552,7 +141612,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -141635,7 +141695,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -141670,7 +141730,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -141695,7 +141755,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -141732,7 +141792,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -141855,7 +141915,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -142003,7 +142063,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -142034,7 +142094,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142059,7 +142119,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142407,7 +142467,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -142803,16 +142863,16 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin type TrigEvent = struct { Fa int32 Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -142822,7 +142882,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -142841,19 +142901,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22640, + Xsqlite3ErrorMsg(tls, pParse, ts+22648, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } - return ts + 22682 /* "LIMIT" */ + return ts + 22690 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 116 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22688, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22696, 0) } } @@ -142861,7 +142921,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -142873,7 +142933,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(8) defer tls.Free(8) *(*Token)(unsafe.Pointer(bp)) = t @@ -142914,7 +142974,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -142928,14 +142988,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22722, + Xsqlite3ErrorMsg(tls, pParse, ts+22730, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -143002,7 +143062,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT type YYMINORTYPE = struct { Fyyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -143271,7 +143331,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -143499,7 +143559,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -143559,7 +143619,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -143602,7 +143662,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -143662,7 +143722,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -143864,7 +143924,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -143885,9 +143945,9 @@ type yyStackEntry = struct { Fstateno uint16 Fmajor uint16 Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -143896,9 +143956,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -143908,7 +143968,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 8 /* &.yystack */ @@ -143923,7 +143983,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -144082,7 +144142,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 12) @@ -144090,7 +144150,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+8 { yy_pop_parser_stack(tls, pParser) @@ -144113,7 +144173,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -144153,7 +144213,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -144164,7 +144224,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+8 { @@ -144174,7 +144234,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22760, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22768, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -144183,7 +144243,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 12 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -144606,7 +144666,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -145013,7 +145073,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -145025,7 +145085,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -145170,21 +145230,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16166, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16174, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16079, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16087, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 4)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -145920,7 +145980,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22809) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22817) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*12 + 4)), uintptr(0), uintptr(0), uintptr(0)) } @@ -146071,7 +146131,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 84 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 4)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp+32, bp+84)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp+32, bp+84)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -146566,21 +146626,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*Token)(unsafe.Pointer(yymsp + 4)) Xsqlite3ErrorMsg(tls, pParse, - ts+22842, 0) + ts+22850, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22937, 0) + ts+22945, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23021, 0) + ts+23029, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -147020,7 +147080,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -147030,9 +147090,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23106, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23114, 0) } //*********** End %syntax_error code ***************************************** @@ -147040,7 +147100,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -147070,7 +147130,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -147124,7 +147184,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -147175,7 +147235,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -147261,7 +147321,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -147274,7 +147334,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -147291,7 +147351,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -147306,7 +147366,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -147322,7 +147382,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -147355,7 +147415,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -147488,7 +147548,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -147666,7 +147726,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147675,7 +147735,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -147684,11 +147744,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -147711,13 +147771,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147767,7 +147827,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -147784,7 +147844,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -147798,7 +147858,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -147811,7 +147871,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -148173,7 +148233,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(1256) defer tls.Free(1256) @@ -148243,7 +148303,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 1248 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23123, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23131, libc.VaList(bp, bp+1248)) break } } @@ -148266,7 +148326,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23148, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23156, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -148363,7 +148423,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -148466,7 +148526,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23159, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23167, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -148479,11 +148539,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19827, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19835, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23166, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23174, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23171, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23179, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -148496,9 +148556,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23181, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23189, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23193, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -148540,12 +148600,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -148572,7 +148632,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -148584,11 +148644,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -148601,14 +148661,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -148621,14 +148681,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -148659,7 +148719,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -148785,7 +148845,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -148824,7 +148884,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -148832,7 +148892,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -149102,7 +149162,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -149200,13 +149260,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149225,7 +149285,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -149254,7 +149314,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -149333,11 +149393,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -149359,7 +149419,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -149372,7 +149432,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -149386,7 +149446,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -149402,39 +149462,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -149449,7 +149509,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 36)) @@ -149464,7 +149524,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -149491,7 +149551,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -149507,14 +149567,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -149538,7 +149598,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23193, 0) + ts+23201, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -149551,7 +149611,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -149588,11 +149648,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -149602,7 +149662,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -149712,7 +149772,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -149762,24 +149822,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23261 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23269 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23275 /* "abort due to ROL..." */ + zErr = ts + 23283 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23297 /* "another row avai..." */ + zErr = ts + 23305 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23319 /* "no more rows ava..." */ + zErr = ts + 23327 /* "no more rows ava..." */ break } @@ -149797,36 +149857,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23342, - ts + 23355, + ts + 23350, + ts + 23363, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23371, - ts + 23396, - ts + 23410, - ts + 23429, + ts + 23379, + ts + 23404, + ts + 23418, + ts + 23437, ts + 1470, - ts + 23454, - ts + 23491, - ts + 23503, - ts + 23518, - ts + 23551, - ts + 23569, - ts + 23594, - ts + 23623, + ts + 23462, + ts + 23499, + ts + 23511, + ts + 23526, + ts + 23559, + ts + 23577, + ts + 23602, + ts + 23631, /* SQLITE_EMPTY */ uintptr(0), ts + 5799, ts + 5285, - ts + 23640, - ts + 23658, - ts + 23676, + ts + 23648, + ts + 23666, + ts + 23684, /* SQLITE_NOLFS */ uintptr(0), - ts + 23710, + ts + 23718, /* SQLITE_FORMAT */ uintptr(0), - ts + 23731, - ts + 23757, - ts + 23780, - ts + 23801, -} /* sqlite3.c:169926:20 */ + ts + 23739, + ts + 23765, + ts + 23788, + ts + 23809, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -149835,7 +149895,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -149858,8 +149918,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -149868,7 +149928,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -149886,7 +149946,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -149899,7 +149959,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -149915,7 +149975,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -149929,7 +149989,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ libc.AtomicStoreNInt32(db+304, int32(1), 0) } @@ -149937,7 +149997,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -149947,7 +150007,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -150005,7 +150065,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23817, 0) + ts+23825, 0) return SQLITE_BUSY } else { @@ -150052,7 +150112,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -150094,22 +150154,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -150129,7 +150189,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150138,7 +150198,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23880, libc.VaList(bp, zName)) + ts+23888, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -150153,7 +150213,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -150179,7 +150239,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150197,7 +150257,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -150218,7 +150278,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150236,7 +150296,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150249,7 +150309,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150262,7 +150322,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150275,7 +150335,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -150287,7 +150347,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -150303,7 +150363,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -150321,7 +150381,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -150334,7 +150394,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -150345,7 +150405,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150374,7 +150434,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23931, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23939, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -150395,7 +150455,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -150419,7 +150479,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -150461,19 +150521,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -150495,7 +150555,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150507,7 +150567,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -150536,18 +150596,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150555,9 +150615,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150565,7 +150625,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -150575,13 +150635,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -150594,7 +150654,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -150604,7 +150664,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23952, 0) + ts+23960, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -150657,7 +150717,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -150669,7 +150729,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -150716,7 +150776,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -150749,7 +150809,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24020, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24028, uint32(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -150797,10 +150857,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24026, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24034, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24036, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24044, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -150922,7 +150982,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24064, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24072, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -150933,17 +150993,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24068, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24076, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24068 /* "cache" */ + zModeType = ts + 24076 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24074, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24082, zOpt, uint32(4)) == 0) { goto __32 } @@ -150982,7 +151042,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24079, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24087, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -150990,7 +151050,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24099, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24107, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -151033,7 +151093,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24123, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24131, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -151053,24 +151113,24 @@ __43: type OpenMode = struct { Fz uintptr Fmode int32 -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24139, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24146, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24147, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24154, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24154, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24157, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17261, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24162, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24165, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24168, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17269, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -151086,7 +151146,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -151238,10 +151298,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21686, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21694, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24164, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24172, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -151270,7 +151330,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) @@ -151327,7 +151387,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6332 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23166 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23174 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -151426,17 +151486,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -151447,7 +151507,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24170 /* "\x00\x00" */ + zFilename = ts + 24178 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -151468,12 +151528,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151485,7 +151545,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -151503,7 +151563,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -151514,7 +151574,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -151525,7 +151585,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -151533,7 +151593,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -151546,28 +151606,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24173, + Xsqlite3_log(tls, iErr, ts+24181, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24198) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24206) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24218) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24226) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24225) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24233) } // This is a convenience routine that makes sure that all thread-specific @@ -151575,12 +151635,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -151746,7 +151806,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24242, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24250, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -151764,7 +151824,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -151779,7 +151839,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -151792,7 +151852,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -151837,7 +151897,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -152296,7 +152356,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -152305,7 +152365,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+Size_t(1)) return p + uintptr(n) + uintptr(1) @@ -152318,7 +152378,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -152349,7 +152409,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -152366,7 +152426,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -152375,7 +152435,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -152392,7 +152452,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -152402,7 +152462,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -152423,14 +152483,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -152443,7 +152503,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -152452,7 +152512,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -152467,7 +152527,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152478,7 +152538,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152489,7 +152549,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152512,7 +152572,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152555,7 +152615,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -152576,7 +152636,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -152585,7 +152645,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152597,7 +152657,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24270, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24278, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -152615,7 +152675,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152660,11 +152720,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 552 { @@ -152677,7 +152737,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 552 { @@ -152687,13 +152747,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -152717,7 +152777,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -152760,7 +152820,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24278 /* "database is dead..." */ + return ts + 24286 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -152772,7 +152832,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -152798,7 +152858,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -152902,7 +152962,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -153507,7 +153567,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -153519,10 +153579,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -153530,9 +153590,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -153544,9 +153604,9 @@ type JsonParse1 = struct { FiDepth U16 FnJson int32 FiHold U32 -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -153554,8 +153614,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24301, ts + 24307, -} /* sqlite3.c:193131:19 */ + ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24309, ts + 24315, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -153569,7 +153629,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 26 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -153577,7 +153637,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -153585,7 +153645,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -153593,7 +153653,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -153601,7 +153661,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -153634,7 +153694,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -153646,7 +153706,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -153659,7 +153719,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -153668,7 +153728,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -153683,7 +153743,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -153734,7 +153794,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24314 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24322 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -153754,11 +153814,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -153791,7 +153851,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24331, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24339, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -153802,7 +153862,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -153829,7 +153889,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -153838,7 +153898,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -153848,7 +153908,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -153856,7 +153916,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -153958,7 +154018,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153973,14 +154033,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -153991,7 +154051,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154272,7 +154332,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -154294,7 +154354,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -154309,7 +154369,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -154325,7 +154385,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -154552,7 +154612,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint32(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -154577,7 +154637,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24360, -1) + Xsqlite3_result_error(tls, pCtx, ts+24368, -1) } } jsonParseReset(tls, pParse) @@ -154588,7 +154648,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*12 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -154619,7 +154679,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+16, Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(U32(0)))*(*JsonParse)(unsafe.Pointer(pParse)).FnNode))) @@ -154639,7 +154699,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -154696,7 +154756,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -154719,7 +154779,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -154894,7 +154954,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -154905,7 +154965,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24375, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24383, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -154918,11 +154978,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24379, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24387, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -154933,7 +154993,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -154985,18 +155045,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24405, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24413, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -155027,7 +155087,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155044,7 +155104,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155067,7 +155127,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -155117,7 +155177,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155151,11 +155211,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24448, uint32(2)) + jsonAppendRaw(tls, bp, ts+24456, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4949, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24451, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24459, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -155211,7 +155271,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -155284,7 +155344,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -155316,7 +155376,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155328,14 +155388,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24454, -1) + ts+24462, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24505, -1) + Xsqlite3_result_error(tls, ctx, ts+24513, -1) jsonReset(tls, bp) return } @@ -155355,7 +155415,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -155424,7 +155484,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -155443,7 +155503,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15270) + jsonWrongNumArgs(tls, ctx, ts+15278) return __2: ; @@ -155507,7 +155567,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -155532,9 +155592,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24539 /* "set" */ + return ts + 24547 /* "set" */ } - return ts + 24543 /* "insert" */ + return ts + 24551 /* "insert" */ }()) return __2: @@ -155605,7 +155665,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -155629,7 +155689,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -155643,7 +155703,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -155659,7 +155719,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -155684,16 +155744,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24550, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24558, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -155701,7 +155761,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -155743,7 +155803,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -155765,7 +155825,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -155789,16 +155849,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24553, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24561, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -155818,16 +155878,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -155842,7 +155902,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24556) + ts+24564) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -155855,13 +155915,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -155875,7 +155935,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -155886,7 +155946,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+32) @@ -155899,7 +155959,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -155908,13 +155968,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*12)).FjnFlags)&JNODE_LABEL != 0 { @@ -155965,7 +156025,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -155982,19 +156042,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24639, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24647, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -156083,10 +156143,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24639, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24647, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -156110,7 +156170,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24650 /* "$" */ + zRoot = ts + 24658 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -156128,7 +156188,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -156138,7 +156198,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156213,7 +156273,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156242,7 +156302,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24360, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24368, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -156318,7 +156378,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -156332,36 +156392,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint32(unsafe.Sizeof(aJsonFunc))/uint32(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24652}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24657}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24686}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24699}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24702}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24706}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24718}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24730}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24741}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24752}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24764}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24777}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24796}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24824}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24660}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24665}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24694}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24707}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24710}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24714}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24726}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24738}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24749}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24760}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24772}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24785}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24804}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24815}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24832}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(aMod))/uint32(unsafe.Sizeof(struct { @@ -156377,9 +156437,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24842 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24852 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24850 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24860 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -156424,7 +156484,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -156438,7 +156498,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -156456,9 +156516,9 @@ type RtreeCursor1 = struct { FsPoint RtreeSearchPoint FaNode [5]uintptr FanQueue [41]U32 -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -156466,43 +156526,43 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 Fcb RtreeGeomCallback FnParam int32 FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -156510,17 +156570,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -156546,16 +156606,16 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156568,12 +156628,12 @@ func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156586,7 +156646,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = i @@ -156597,7 +156657,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -156605,20 +156665,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 112 + uintptr(nodeHash(tls, iNode))*4)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -156626,7 +156686,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -156635,7 +156695,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 112 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*4 @@ -156650,7 +156710,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(RtreeNode{}))+uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -156666,7 +156726,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -156675,7 +156735,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156707,11 +156767,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24862, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24870, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24870, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24878, iNode, 0, pRtree+72) Xsqlite3_free(tls, zTab) } @@ -156785,7 +156845,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -156796,7 +156856,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -156809,7 +156869,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -156826,7 +156886,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -156850,7 +156910,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -156876,19 +156936,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -156904,23 +156964,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -156942,13 +157002,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -156956,7 +157016,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24875, + ts+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -156975,7 +157035,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -156993,7 +157053,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -157023,7 +157083,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -157039,7 +157099,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -157056,7 +157116,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -157168,7 +157228,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157266,7 +157326,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157321,7 +157381,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -157337,7 +157397,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -157356,7 +157416,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -157373,7 +157433,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*20)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*20)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*20)) @@ -157393,7 +157453,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 40 } @@ -157404,7 +157464,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -157421,7 +157481,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -157455,7 +157515,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -157491,7 +157551,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -157539,7 +157599,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157632,7 +157692,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -157648,7 +157708,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157663,7 +157723,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -157724,7 +157784,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -157745,12 +157805,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24957) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24965) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -157777,7 +157837,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -157920,7 +157980,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -158027,7 +158087,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -158070,7 +158130,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -158091,7 +158151,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -158130,7 +158190,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -158145,7 +158205,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -158158,7 +158218,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -158233,7 +158293,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -158289,7 +158349,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -158325,7 +158385,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -158333,7 +158393,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -158355,7 +158415,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -158403,7 +158463,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -158459,7 +158519,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -158558,7 +158618,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -158592,7 +158652,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -158827,7 +158887,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -158862,7 +158922,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158912,7 +158972,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -158943,7 +159003,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -158972,7 +159032,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -159087,7 +159147,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -159117,7 +159177,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159148,7 +159208,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -159159,7 +159219,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -159248,7 +159308,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -159262,7 +159322,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -159287,7 +159347,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -159295,7 +159355,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24971, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24979, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -159307,12 +159367,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24991, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24999, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25023, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25031, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -159326,7 +159386,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159555,7 +159615,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -159564,7 +159624,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -159572,7 +159632,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -159580,7 +159640,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25060, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25068, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -159601,7 +159661,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -159614,11 +159674,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25205 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25213 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 4 @@ -159626,7 +159686,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11225, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11233, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -159658,7 +159718,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName1))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -159669,8 +159729,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25261, ts + 5011, ts + 16166, -} /* sqlite3.c:199185:21 */ + ts + 25269, ts + 5011, ts + 16174, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -159694,9 +159754,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -159713,19 +159773,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25266, + ts+25274, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25328, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25336, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25333, + ts+25341, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25397, + ts+25405, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25467, + ts+25475, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -159756,7 +159816,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25516 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25524 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -159768,7 +159828,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25624, + ts+25632, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -159776,18 +159836,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25669, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25677, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12696, 1) + Xsqlite3_str_append(tls, p, ts+12704, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25696, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25704, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25718, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25726, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25726, 0) + Xsqlite3_str_appendf(tls, p, ts+25734, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -159803,24 +159863,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25742, - ts + 25795, + ts + 25750, + ts + 25803, - ts + 25840, - ts + 25892, - ts + 25946, + ts + 25848, + ts + 25900, + ts + 25954, - ts + 25991, - ts + 26049, - ts + 26104, -} /* sqlite3.c:199232:21 */ + ts + 25999, + ts + 26057, + ts + 26112, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159851,7 +159911,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159859,7 +159919,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26151, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26159, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -159871,7 +159931,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26171, + ts+26179, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+16) if rc != SQLITE_OK { @@ -159879,7 +159939,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26228, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26236, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -159889,7 +159949,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159904,7 +159964,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -159930,10 +159990,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26263, - ts + 26306, - ts + 26341, - ts + 26377, + ts + 26271, + ts + 26314, + ts + 26349, + ts + 26385, } // Aux columns counted by a u8 @@ -159970,7 +160030,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26414, + Xsqlite3_str_appendf(tls, pSql, ts+26422, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -159982,7 +160042,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26438, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26446, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -160005,7 +160065,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -160104,7 +160164,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26455, ts + 26466} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -160120,7 +160180,7 @@ var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(592) defer tls.Free(592) @@ -160164,11 +160224,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10805, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26468, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26476, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+44 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26474, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26478, 1) + Xsqlite3_str_append(tls, pOut, ts+26486, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -160183,11 +160243,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26480, -1) + Xsqlite3_result_error(tls, ctx, ts+26488, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -160213,15 +160273,15 @@ type RtreeCheck1 = struct { Frc int32 FzReport uintptr FnErr int32 -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -160234,7 +160294,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160262,7 +160322,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160274,7 +160334,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26513, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26521, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4013 /* "\n" */ @@ -160302,7 +160362,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160310,7 +160370,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26520, + ts+26528, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -160329,7 +160389,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26565, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26573, libc.VaList(bp+16, iNode)) } } @@ -160346,15 +160406,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(88) defer tls.Free(88) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26597, - ts + 26651, + ts + 26605, + ts + 26659, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -160369,23 +160429,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26699, + rtreeCheckAppendMsg(tls, pCheck, ts+26707, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26761, + ts+26769, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }(), iKey, iVal)) } } @@ -160402,7 +160462,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -160428,7 +160488,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26819, libc.VaList(bp, i, iCell, iNode)) + ts+26827, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -160448,7 +160508,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26867, libc.VaList(bp+24, i, iCell, iNode)) + ts+26875, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -160460,7 +160520,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160471,14 +160531,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26934, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26942, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26968, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26976, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -160486,7 +160546,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26998, + ts+27006, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -160514,20 +160574,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27053, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27061, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27084, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27092, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -160537,7 +160597,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -160557,13 +160617,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14432, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14440, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27151, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27159, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -160573,12 +160633,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24971, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24979, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27179, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27187, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -160593,8 +160653,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27210, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27217, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27218, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27225, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -160604,7 +160664,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27225, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27233, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -160644,13 +160704,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(4) defer tls.Free(4) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27229, -1) + ts+27237, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -160668,7 +160728,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17803 /* "ok" */ + return ts + 17811 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -160707,7 +160767,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -160733,7 +160793,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -160755,7 +160815,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -160771,7 +160831,7 @@ type GeoParse1 = struct { FnAlloc int32 FnErr int32 Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -160781,10 +160841,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -160794,7 +160854,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -160803,7 +160863,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160875,7 +160935,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -161017,7 +161077,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161086,7 +161146,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161099,7 +161159,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161108,11 +161168,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27280, 1) + Xsqlite3_str_append(tls, x, ts+27288, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27282, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27290, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27293, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27301, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161122,7 +161182,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -161136,19 +161196,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27304, 0) + Xsqlite3_str_appendf(tls, x, ts+27312, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27322, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27346, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27342, 0) + Xsqlite3_str_appendf(tls, x, ts+27350, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161168,7 +161228,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -161201,7 +161261,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -161221,7 +161281,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -161240,7 +161300,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -161276,7 +161336,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -161296,7 +161356,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161341,7 +161401,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161482,7 +161542,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161495,13 +161555,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -161535,7 +161595,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -161562,7 +161622,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -161603,7 +161663,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -161641,7 +161701,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -161672,10 +161732,10 @@ type GeoEvent1 = struct { FeType int32 FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -161685,20 +161745,20 @@ type GeoSegment1 = struct { F__ccgo_pad1 [3]byte Fidx uint32 FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -161732,7 +161792,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -161744,7 +161804,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -161774,7 +161834,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -161804,7 +161864,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -161839,7 +161899,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -161869,7 +161929,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162105,7 +162165,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -162121,7 +162181,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -162131,7 +162191,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -162171,7 +162231,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27355, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27363, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -162180,7 +162240,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27377, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27385, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -162188,7 +162248,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -162246,12 +162306,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -162265,7 +162325,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -162432,7 +162492,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -162458,7 +162518,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16166 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16174 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -162468,7 +162528,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27381 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27389 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -162476,14 +162536,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27387 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162548,7 +162608,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -162615,7 +162675,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27396, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27404, 0) __4: ; goto geopoly_update_end @@ -162759,15 +162819,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27436) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27444) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27452) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27460) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -162800,9 +162860,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint32(i) < uint32(unsafe.Sizeof(aFunc))/uint32(unsafe.Sizeof(struct { @@ -162832,7 +162892,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27467, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27475, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -162844,26 +162904,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27475 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27488 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27501 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27514 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27452 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27526 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27436 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27549 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27563 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27576 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27590 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27606 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27483 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27522 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27460 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27534 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27444 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27557 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27571 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27584 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27598 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27614 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27618 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27626 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -162871,30 +162931,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27637, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27645, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27647, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27655, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27658, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27666, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27381, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27389, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27669, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27677, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -162908,7 +162968,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -162917,7 +162977,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -162938,7 +162998,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -162966,13 +163026,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24957, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24965, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -162992,7 +163052,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163443,7 +163503,7 @@ type sqlite3rbu = struct { FszTempLimit I64 FnRbu int32 FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -163844,7 +163904,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -163909,7 +163969,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -163971,7 +164031,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -164000,9 +164060,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 FzTbl uintptr @@ -164014,15 +164074,15 @@ type RbuState1 = struct { FiCookie U32 FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -164030,9 +164090,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -164051,16 +164111,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -164079,7 +164139,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -164102,7 +164162,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -164122,7 +164182,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164212,7 +164272,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164237,7 +164297,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -164254,7 +164314,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) return } @@ -164265,7 +164325,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -164280,7 +164340,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164298,7 +164358,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164322,7 +164382,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -164337,7 +164397,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))) @@ -164355,7 +164415,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -164385,7 +164445,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -164399,7 +164459,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -164408,7 +164468,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27700, uintptr(0), uintptr(0), p+36) + ts+27708, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -164480,7 +164540,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -164492,7 +164552,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24870, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24878, zIn, uint32(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -164510,7 +164570,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164520,9 +164580,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27871, libc.VaList(bp, func() uintptr { + ts+27879, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28021 /* "AND rootpage!=0 ..." */ + return ts + 28029 /* "AND rootpage!=0 ..." */ } return ts + 1534 /* "" */ }()))) @@ -164530,7 +164590,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28062) + ts+28070) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -164545,7 +164605,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -164571,7 +164631,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -164597,7 +164657,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -164614,7 +164674,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint32(2)*uint32(unsafe.Sizeof(uintptr(0))) + uint32(unsafe.Sizeof(int32(0))) + uint32(3)*uint32(unsafe.Sizeof(U8(0)))) * uint32(nCol)) var azNew uintptr @@ -164637,7 +164697,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -164660,7 +164720,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164710,7 +164770,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -164731,7 +164791,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+36, Xsqlite3_mprintf(tls, - ts+28187, libc.VaList(bp, zTab))) + ts+28195, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -164749,7 +164809,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*4, p+36, - Xsqlite3_mprintf(tls, ts+28306, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28314, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -164767,7 +164827,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28327, libc.VaList(bp+16, zIdx))) + ts+28335, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -164791,7 +164851,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28378, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28386, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -164830,7 +164890,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -164840,7 +164900,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+36, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -164855,7 +164915,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+20, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 20 /* pXInfo */)), 1) if iCid >= 0 { @@ -164888,7 +164948,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -164905,7 +164965,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+36, bp+56, pIter+60) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19353, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19361, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -164918,18 +164978,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28456, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28464, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28475, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28483, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+32) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*4)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28480, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28488, zName) { bRbuRowid = 1 } } @@ -164941,12 +165001,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28490, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28498, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28519 /* "may not have" */ + return ts + 28527 /* "may not have" */ } - return ts + 28532 /* "requires" */ + return ts + 28540 /* "requires" */ }())) } @@ -164955,7 +165015,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28541, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28549, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 60))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 1) @@ -164969,7 +165029,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28563, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28571, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 5) @@ -165010,7 +165070,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165019,8 +165079,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+28590, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14543 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28598, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14551 /* ", " */ } return zList } @@ -165029,7 +165089,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -165041,7 +165101,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zRet = rbuMPrintf(tls, p, ts+28599, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28607, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -165071,7 +165131,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -165080,25 +165140,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28612, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28620, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28644, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28652, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+28667) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28673, ts+28680, ts+4908) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+28675) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28681, ts+28688, ts+4908) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28688, + ts+28696, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28730, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28738, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -165130,7 +165190,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -165161,7 +165221,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -165198,7 +165258,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ __7: ; goto __5 @@ -165207,13 +165267,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28758, + zLhs = rbuMPrintf(tls, p, ts+28766, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28779, + zOrder = rbuMPrintf(tls, p, ts+28787, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28815, + zSelect = rbuMPrintf(tls, p, ts+28823, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ iCol++ goto __1 __2: @@ -165232,7 +165292,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28842, + Xsqlite3_mprintf(tls, ts+28850, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 180)))) { goto __13 @@ -165259,8 +165319,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28890, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14543 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28898, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14551 /* ", " */ goto __15 __15: iCol++ @@ -165272,7 +165332,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28897, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28905, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -165311,7 +165371,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(204) defer tls.Free(204) @@ -165329,7 +165389,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -165341,7 +165401,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28909, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28917, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FzSpan, zCollate)) zType = ts + 1534 /* "" */ } else { @@ -165355,37 +165415,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ } else { - zCol = ts + 28480 /* "rbu_rowid" */ + zCol = ts + 28488 /* "rbu_rowid" */ } zType = ts + 1099 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)) } - zRet = Xsqlite3_mprintf(tls, ts+28931, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28939, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28667 + return ts + 28675 } return ts + 1534 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28951, + zImpPK = Xsqlite3_mprintf(tls, ts+28959, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28972, + zImpCols = Xsqlite3_mprintf(tls, ts+28980, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29005, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29013, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14543 /* ", " */ - zAnd = ts + 21373 /* " AND " */ + zCom = ts + 14551 /* ", " */ + zAnd = ts + 21381 /* " AND " */ nBind++ } @@ -165422,7 +165482,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165433,11 +165493,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = Xsqlite3_mprintf(tls, ts+29029, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29037, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29041, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29049, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14543 /* ", " */ + zS = ts + 14551 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -165446,7 +165506,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29050, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29058, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -165460,24 +165520,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29065, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29073, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1534 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29079, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29087, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21381 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29091, libc.VaList(bp+40, zList)) + ts+29099, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1534 /* "" */ @@ -165485,8 +165545,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+29141, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21381 /* " AND " */ } } } @@ -165498,9 +165558,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29154, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29162, 0) } // Return a nul-terminated string containing the comma separated list of @@ -165518,7 +165578,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -165533,17 +165593,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29141, + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29180, + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29210, + zList = rbuMPrintf(tls, p, ts+29218, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } } @@ -165564,7 +165624,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -165594,26 +165654,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(64) defer tls.Free(64) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29247 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29255 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16054) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16062) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) } break } @@ -165626,15 +165686,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28667 /* " DESC" */ + zDesc = ts + 28675 /* " DESC" */ } else { zDesc = ts + 1534 /* "" */ } - z = rbuMPrintf(tls, p, ts+29260, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14543 /* ", " */ + z = rbuMPrintf(tls, p, ts+29268, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14551 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29271, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29279, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */))) } return z @@ -165657,7 +165717,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -165674,7 +165734,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, - ts+29275) + ts+29283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -165683,7 +165743,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -165693,23 +165753,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29325, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29333, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29347, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29355, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28667 /* " DESC" */ + return ts + 28675 /* " DESC" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29357, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29365, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29372, + ts+29380, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) } @@ -165733,7 +165793,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -165755,32 +165815,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29434 /* "PRIMARY KEY " */ + zPk = ts + 29442 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29447, + zSql = rbuMPrintf(tls, p, ts+29455, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29474 /* " NOT NULL" */ + return ts + 29482 /* " NOT NULL" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29484, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29492, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29491, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29499, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) @@ -165797,7 +165857,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -165807,12 +165867,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29538, + ts+29546, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -165834,7 +165894,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -165844,7 +165904,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29595) + ts+29603) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -165942,7 +166002,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -165954,7 +166014,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29661, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29669, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -165978,7 +166038,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29681, + ts+29689, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 604 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) @@ -165987,14 +166047,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, p+36, - Xsqlite3_mprintf(tls, ts+29746, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29754, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, p+36, - Xsqlite3_mprintf(tls, ts+29782, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29790, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -166011,7 +166071,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29816, + ts+29824, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -166019,9 +166079,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }() } return ts + 1534 /* "" */ @@ -166030,21 +166090,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29887, + ts+29895, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29948, + ts+29956, libc.VaList(bp+264, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -166082,17 +166142,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1534 } - return ts + 30107 + return ts + 30115 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, pz, Xsqlite3_mprintf(tls, - ts+30116, + ts+30124, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30152 /* ", _rowid_" */ + return ts + 30160 /* ", _rowid_" */ } return ts + 1534 /* "" */ }(), zBindings))) @@ -166104,28 +166164,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, pz, Xsqlite3_mprintf(tls, - ts+30162, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30170, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30190 /* ", rbu_rowid" */ + zRbuRowid = ts + 30198 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30202, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30210, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30278 /* ", 0 AS rbu_rowid" */ + return ts + 30286 /* ", 0 AS rbu_rowid" */ } return ts + 1534 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30295, + ts+30303, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -166133,7 +166193,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30594, + ts+30602, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -166147,9 +166207,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30693 /* ",_rowid_ " */ + zRbuRowid = ts + 30701 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30703 /* ",rbu_rowid" */ + zRbuRowid = ts + 30711 /* ",rbu_rowid" */ } } @@ -166162,20 +166222,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28750, 0) + zOrder = rbuMPrintf(tls, p, ts+28758, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+76, pz, Xsqlite3_mprintf(tls, - ts+30714, + ts+30722, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30762 /* "0 AS " */ + return ts + 30770 /* "0 AS " */ } return ts + 1534 /* "" */ }(), @@ -166188,7 +166248,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } return ts + 1534 /* "" */ }(), zOrder, @@ -166217,7 +166277,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -166268,9 +166328,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30107 /* "rbu_imp_" */ + zPrefix = ts + 30115 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30768, + zUpdate = Xsqlite3_mprintf(tls, ts+30776, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+4, p+36, zUpdate) @@ -166283,7 +166343,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -166306,7 +166366,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -166322,7 +166382,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166338,7 +166398,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30798, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30806, libc.VaList(bp, p+24))) for *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -166406,7 +166466,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -166418,21 +166478,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30828, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30836, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30855, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30863, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+24, ts+3237, uint32(4)) } else { libc.Xmemcpy(tls, p+24, ts+6332, uint32(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30873, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30881, libc.VaList(bp+24, p+24)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -166472,11 +166532,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30939, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30947, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24020, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24028, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -166488,13 +166548,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30971, + zTarget = Xsqlite3_mprintf(tls, ts+30979, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ } - return ts + 31003 /* "&" */ + return ts + 31011 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ @@ -166513,21 +166573,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31005, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31013, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31020, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31028, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31037, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31045, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -166535,7 +166595,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -166546,7 +166606,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31081, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31089, 0) } } @@ -166568,7 +166628,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -166576,7 +166636,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -166609,7 +166669,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -166617,7 +166677,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166651,7 +166711,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31099, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31107, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -166701,7 +166761,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -167087,7 +167147,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 4 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31173) + ts+31181) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -167100,7 +167160,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31195, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31203, libc.VaList(bp, iCookie+1)) } } } @@ -167108,7 +167168,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -167125,7 +167185,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31222, + ts+31230, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -167163,16 +167223,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(28) defer tls.Free(28) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31380, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31388, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31395, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31403, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -167182,18 +167242,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31415, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31423, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31440) + ts+31448) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167207,12 +167267,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31548) + ts+31556) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, - ts+31613) + ts+31621) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167224,7 +167284,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31657, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31665, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -167232,7 +167292,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167246,8 +167306,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17139) - rbuCopyPragma(tls, p, ts+16250) + rbuCopyPragma(tls, p, ts+17147) + rbuCopyPragma(tls, p, ts+16258) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -167258,7 +167318,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31682, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31690, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -167284,10 +167344,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -167375,7 +167435,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -167393,7 +167453,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 48 @@ -167408,7 +167468,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31710, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31718, 0) } if rc == SQLITE_OK { @@ -167423,11 +167483,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31159, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31167, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -167442,7 +167502,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -167451,7 +167511,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31735, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31743, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -167463,7 +167523,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -167473,7 +167533,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -167490,7 +167550,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31746, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31754, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 12 /* zErrmsg */)), -1) } else { @@ -167522,7 +167582,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -167533,7 +167593,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31818, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31826, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -167541,7 +167601,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31832) + ts+31840) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -167553,7 +167613,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31889) + ts+31897) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -167564,7 +167624,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167636,7 +167696,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31963, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31971, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -167658,12 +167718,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31995, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32003, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32027 /* "vacuum" */ + return ts + 32035 /* "vacuum" */ } - return ts + 32034 /* "update" */ + return ts + 32042 /* "update" */ }())) } } @@ -167671,7 +167731,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14432, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+36) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -167685,14 +167745,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16853) - rbuCopyPragma(tls, p, ts+16265) + rbuCopyPragma(tls, p, ts+16861) + rbuCopyPragma(tls, p, ts+16273) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32041, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32049, uintptr(0), uintptr(0), p+36) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -167702,7 +167762,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6332, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32057, uintptr(0), uintptr(0), p+36) + db, ts+32065, uintptr(0), uintptr(0), p+36) } } @@ -167737,7 +167797,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -167748,7 +167808,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -167756,13 +167816,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32081, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32089, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -167771,7 +167831,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -167787,12 +167847,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); i < nErrmsg-Size_t(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30107, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30115, uint32(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -167805,13 +167865,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+36) } // Sync the db file if currently doing an incremental checkpoint @@ -167825,7 +167885,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+36) } // Close any open statement handles. @@ -167837,7 +167897,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32089, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32097, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -167870,13 +167930,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -167909,7 +167969,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167927,7 +167987,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -167936,7 +167996,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -167955,19 +168015,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14432 /* "BEGIN" */ + zBegin = ts + 14440 /* "BEGIN" */ } else { - zBegin = ts + 32041 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32049 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32041, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32049, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168034,7 +168094,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -168051,7 +168111,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 220)) += nDiff @@ -168069,7 +168129,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -168091,7 +168151,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 100; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 56 { @@ -168116,7 +168176,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -168131,7 +168191,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -168163,7 +168223,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -168172,20 +168232,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168249,7 +168309,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168288,7 +168348,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -168302,7 +168362,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -168316,7 +168376,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -168336,7 +168396,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168356,7 +168416,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -168364,7 +168424,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -168372,7 +168432,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -168399,7 +168459,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32116, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32124, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -168424,7 +168484,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32139, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32147, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -168435,7 +168495,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168443,7 +168503,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168451,7 +168511,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168484,7 +168544,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168541,13 +168601,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168570,7 +168630,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -168612,7 +168672,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32150, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32158, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -168656,10 +168716,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -168668,7 +168728,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168713,7 +168773,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -168721,7 +168781,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -168731,7 +168791,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -168739,7 +168799,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -168747,7 +168807,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -168756,7 +168816,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -168765,7 +168825,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -168773,7 +168833,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -168781,13 +168841,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -168801,7 +168861,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -168862,17 +168922,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -168955,7 +169015,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -169026,7 +169086,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -169035,16 +169095,16 @@ type SessionChange1 = struct { FnRecord int32 FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -169055,13 +169115,13 @@ type SessionInput1 = struct { FxInput uintptr FpIn uintptr FbEof int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -169069,13 +169129,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -169085,13 +169145,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -169104,7 +169164,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -169112,7 +169172,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -169134,7 +169194,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -169222,7 +169282,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 36)) += I64(Xsqlite3_msize(tls, pRet)) @@ -169233,7 +169293,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 36)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -169256,14 +169316,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -169273,7 +169333,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -169286,7 +169346,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -169352,7 +169412,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169378,7 +169438,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169421,7 +169481,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -169460,7 +169520,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -169499,7 +169559,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -169526,7 +169586,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -169601,7 +169661,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169689,7 +169749,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -169753,7 +169813,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -169770,13 +169830,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11225, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11233, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32161, 0) + ts+32169, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1534, 0) } else { @@ -169789,7 +169849,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32282, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32290, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -169884,7 +169944,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169901,7 +169961,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11225, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -169920,15 +169980,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169944,7 +170004,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169960,21 +170020,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -170088,7 +170148,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -170384,7 +170444,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -170419,7 +170479,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170454,25 +170514,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170491,24 +170551,24 @@ func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:21176 type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -170516,13 +170576,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170538,7 +170598,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170548,9 +170608,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32311, + zRet = Xsqlite3_mprintf(tls, ts+32319, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ if zRet == uintptr(0) { break } @@ -170560,7 +170620,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170573,9 +170633,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32345, + ts+32353, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 32386 /* " OR " */ + zSep = ts + 32394 /* " OR " */ if zRet == uintptr(0) { break } @@ -170590,18 +170650,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32391, + ts+32399, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170629,7 +170689,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -170641,7 +170701,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32469, + ts+32477, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -170666,7 +170726,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170779,7 +170839,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32522, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32530, 0) __16: ; rc = SQLITE_SCHEMA @@ -170839,7 +170899,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -170875,7 +170935,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -170897,7 +170957,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170935,7 +170995,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -170947,7 +171007,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -170998,7 +171058,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -171043,7 +171103,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -171066,7 +171126,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -171077,7 +171137,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 4)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -171088,7 +171148,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint32(nBlob)) *(*int32)(unsafe.Pointer(p + 4)) += nBlob @@ -171101,7 +171161,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint32(nStr)) @@ -171115,7 +171175,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171132,7 +171192,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -171153,7 +171213,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171213,7 +171273,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -171319,7 +171379,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171376,7 +171436,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171384,10 +171444,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11225, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32549, libc.VaList(bp, zDb)) + ts+32557, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = SQLITE_NOMEM } @@ -171396,18 +171456,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1534 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32659, bp+20) + sessionAppendStr(tls, bp+8, ts+32667, bp+20) sessionAppendIdent(tls, bp+8, zDb, bp+20) sessionAppendStr(tls, bp+8, ts+1547, bp+20) sessionAppendIdent(tls, bp+8, zTab, bp+20) - sessionAppendStr(tls, bp+8, ts+32674, bp+20) + sessionAppendStr(tls, bp+8, ts+32682, bp+20) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+20) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp+20) - sessionAppendStr(tls, bp+8, ts+32682, bp+20) + sessionAppendStr(tls, bp+8, ts+32690, bp+20) sessionAppendInteger(tls, bp+8, i+1, bp+20) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -171427,7 +171487,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171505,7 +171565,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -171526,7 +171586,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171548,7 +171608,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32688, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32696, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -171646,7 +171706,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+12 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32708, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32716, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -171656,7 +171716,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -171668,7 +171728,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -171676,7 +171736,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -171688,7 +171748,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -171696,7 +171756,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -171708,7 +171768,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -171721,7 +171781,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -171735,12 +171795,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -171766,12 +171826,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -171804,28 +171864,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -171843,7 +171903,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171876,7 +171936,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -171901,7 +171961,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -171937,7 +171997,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -171955,7 +172015,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -171980,7 +172040,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -172022,7 +172082,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172041,7 +172101,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -172068,7 +172128,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172110,7 +172170,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172130,7 +172190,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -172165,7 +172225,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -172222,13 +172282,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -172298,7 +172358,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) == uintptr(0) { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -172329,7 +172389,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172349,14 +172409,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -172370,7 +172430,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -172389,7 +172449,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -172411,7 +172471,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -172435,7 +172495,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -172452,7 +172512,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -172464,7 +172524,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -172481,7 +172541,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -172717,7 +172777,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -172768,7 +172828,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -172783,7 +172843,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -172805,9 +172865,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -172827,9 +172887,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -172837,7 +172897,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172898,7 +172958,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint32(unsafe.Sizeof(SessionUpdate{})) * uint32(nU32) * uint32(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11225) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11233) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = SQLITE_NOMEM @@ -172910,24 +172970,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*12 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint32(nU32)*uint32(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32726, bp+12) + sessionAppendStr(tls, bp, ts+32734, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32739, bp+12) + sessionAppendStr(tls, bp, ts+32747, bp+12) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32745, bp+12) + sessionAppendStr(tls, bp, ts+32753, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1534 /* "" */ - sessionAppendStr(tls, bp, ts+32674, bp+12) + sessionAppendStr(tls, bp, ts+32682, bp+12) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) @@ -172935,13 +172995,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32750, bp+12) + ts+32758, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32682, bp+12) + sessionAppendStr(tls, bp, ts+32690, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } @@ -172971,7 +173031,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -172999,7 +173059,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173009,34 +173069,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32825, bp+12) + sessionAppendStr(tls, bp, ts+32833, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32674, bp+12) + sessionAppendStr(tls, bp, ts+32682, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32745, bp+12) + sessionAppendStr(tls, bp, ts+32753, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32843, bp+12) + sessionAppendStr(tls, bp, ts+32851, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32386, bp+12) + sessionAppendStr(tls, bp, ts+32394, bp+12) zSep = ts + 1534 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32682, bp+12) + sessionAppendStr(tls, bp, ts+32690, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32851 /* "AND " */ + zSep = ts + 32859 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4908, bp+12) @@ -173061,7 +173121,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6332, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } @@ -173073,7 +173133,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173081,19 +173141,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32856, bp+12) + sessionAppendStr(tls, bp, ts+32864, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21379, bp+12) + sessionAppendStr(tls, bp, ts+21387, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14543, bp+12) + sessionAppendStr(tls, bp, ts+14551, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32874, bp+12) + sessionAppendStr(tls, bp, ts+32882, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32885, bp+12) + sessionAppendStr(tls, bp, ts+32893, bp+12) } sessionAppendStr(tls, bp, ts+4908, bp+12) @@ -173104,7 +173164,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -173112,24 +173172,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11225, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11233, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32889) + ts+32897) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+33002) + ts+33010) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -173156,7 +173216,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173177,7 +173237,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -173201,7 +173261,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -173245,7 +173305,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173317,7 +173377,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173417,7 +173477,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173552,7 +173612,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173574,7 +173634,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33146, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33154, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -173590,7 +173650,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33175, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -173599,7 +173659,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173653,7 +173713,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -173671,10 +173731,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33186, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33194, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33212, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33220, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+128, 4 @@ -173744,20 +173804,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33242, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33250, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33286, + ts+33294, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 128)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 136)), uint32(*(*int32)(unsafe.Pointer(bp + 128)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33357, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33365, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11225) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11233) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -173815,14 +173875,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33417, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33425, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33471, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33479, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -173844,7 +173904,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173862,7 +173922,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -173870,7 +173930,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173885,7 +173945,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -173893,7 +173953,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174065,7 +174125,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174196,7 +174256,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174250,7 +174310,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -174265,7 +174325,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174283,12 +174343,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174305,12 +174365,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -174318,7 +174378,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174342,7 +174402,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174369,7 +174429,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -174410,7 +174470,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -174472,7 +174532,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174610,7 +174670,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -174625,7 +174685,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174640,7 +174700,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174656,7 +174716,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174672,7 +174732,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -174680,7 +174740,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -174768,7 +174828,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -174830,13 +174890,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -174871,14 +174931,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -174893,7 +174953,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -174904,7 +174964,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -174914,19 +174974,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [2]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -174956,7 +175016,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -174967,16 +175027,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -174991,7 +175051,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -175002,7 +175062,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -175018,7 +175078,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -175027,7 +175087,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -175045,7 +175105,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -175056,7 +175116,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -175072,7 +175132,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -175081,7 +175141,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -175091,9 +175151,9 @@ type Fts5ExprNode1 = struct { FpNear uintptr FnChild int32 FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -175102,39 +175162,39 @@ type Fts5Parse1 = struct { FapPhrase uintptr FpExpr uintptr FbPhraseToAnd int32 -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 FpColset uintptr FnPhrase int32 FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -175238,7 +175298,7 @@ type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ type Fts5YYMINORTYPE = struct { Ffts5yyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -175311,7 +175371,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -175326,23 +175386,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -175379,9 +175439,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [2]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -175390,9 +175450,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -175402,7 +175462,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 8 /* &.fts5yystack */ @@ -175421,7 +175481,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -175437,7 +175497,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -175495,7 +175555,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 12) @@ -175503,7 +175563,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+8 { fts5yy_pop_parser_stack(tls, pParser) @@ -175516,7 +175576,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -175540,7 +175600,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -175564,7 +175624,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -175575,7 +175635,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+8 { @@ -175585,7 +175645,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33499, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33507, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -175594,7 +175654,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 12 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -175643,7 +175703,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -175676,7 +175736,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -175688,7 +175748,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175898,7 +175958,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -175908,14 +175968,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33535, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -175944,7 +176004,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175999,7 +176059,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -176061,7 +176121,7 @@ type CInstIter1 = struct { FnInst int32 FiStart int32 FiEnd int32 -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -176112,11 +176172,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -176159,7 +176219,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(CInstIter{}))) @@ -176191,12 +176251,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -176205,7 +176265,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176213,7 +176273,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33558, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33566, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -176221,7 +176281,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176276,7 +176336,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -176287,7 +176347,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33565 /* "wrong number of ..." */ + var zErr uintptr = ts + 33573 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176335,19 +176395,19 @@ type Fts5SFinder1 = struct { FnFirst int32 FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -176371,7 +176431,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -176400,7 +176460,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176458,7 +176518,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -176467,7 +176527,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -176490,7 +176550,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33615 /* "wrong number of ..." */ + var zErr uintptr = ts + 33623 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176681,17 +176741,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -176702,7 +176762,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176796,7 +176856,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176864,18 +176924,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(48) defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33663, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33671, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33679, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33681, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33689, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -176900,7 +176960,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -176915,7 +176975,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -176941,7 +177001,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -176953,21 +177013,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -176985,7 +177045,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -176997,7 +177057,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -177015,7 +177075,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -177031,26 +177091,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177112,14 +177172,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+8, pIter+16) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -177131,7 +177191,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -177143,9 +177203,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177162,7 +177222,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -177183,7 +177243,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -177208,7 +177268,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -177233,13 +177293,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177248,7 +177308,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177294,7 +177354,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint32(unsafe.Sizeof([512]uintptr{}))/uint32(unsafe.Sizeof(uintptr(0))))); i++ { @@ -177326,18 +177386,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -177350,7 +177410,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -177361,11 +177421,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -177454,7 +177514,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -177499,7 +177559,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -177511,11 +177571,11 @@ func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ type Fts5Enum1 = struct { FzName uintptr FeVal int32 -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -177543,13 +177603,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(76) defer tls.Free(76) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33686, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33694, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -177576,14 +177636,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33693, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33701, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33724, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33732, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177594,7 +177654,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33757, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33765, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177607,7 +177667,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33794, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33802, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + Size_t(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, Sqlite3_int64(unsafe.Sizeof(uintptr(0)))*nArg) @@ -177616,7 +177676,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33811, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -177635,7 +177695,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33836, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33844, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -177650,14 +177710,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33870, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33878, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33878, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33886, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33910, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33918, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -177665,9 +177725,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33916, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33924, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33930, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33938, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -177675,9 +177735,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33968, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33976, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33987, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -177688,25 +177748,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5026, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7905, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17244}, - {FzName: ts + 34014, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17252}, + {FzName: ts + 34022, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+44, zArg, pConfig+48)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34022, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34030, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34053, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34061, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -177724,7 +177784,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -177758,20 +177818,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22014) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16166) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34081, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22022) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16174) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34111) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34119) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34121, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34129, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -177781,7 +177841,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -177789,13 +177849,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34152, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34160, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34157, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34165, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34164, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34172, libc.VaList(bp+16, i)) } } } @@ -177814,7 +177874,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -177843,8 +177903,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*4)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22014) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34172, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22022) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34180, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -177878,7 +177938,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34201, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34209, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -177919,19 +177979,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33870 /* "content" */ + zTail = ts + 33878 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34221 /* "docsize" */ + zTail = ts + 34229 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34229, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34237, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16166, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16174, -1) } // Formulate the zContentExprlist text @@ -177947,7 +178007,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -177972,7 +178032,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -177980,18 +178040,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34240, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34248, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1534 } - return ts + 14543 + return ts + 14551 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34256, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34264, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34263, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22014)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34271, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22022)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -178022,7 +178082,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -178036,7 +178096,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -178063,7 +178123,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178127,13 +178187,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34289) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34297) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -178143,7 +178203,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34294) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34302) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -178153,7 +178213,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34311) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -178166,7 +178226,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34313) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34321) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -178176,7 +178236,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34323) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34331) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -178192,7 +178252,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22014) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22022) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 4 @@ -178215,11 +178275,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34335 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34343 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -178242,7 +178302,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 36))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34367) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34375) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40 /* bDummy */)) = 0 @@ -178257,7 +178317,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34375, + ts+34383, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -178292,7 +178352,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -178311,9 +178371,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -178325,12 +178385,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178392,7 +178452,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34440, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34448, 0) return FTS5_EOF } } @@ -178405,20 +178465,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34460, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34468, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = (int32(z2) - int32(z)) / 1 - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34491, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34499, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34494, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34502, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29877, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29885, uint32(3)) == 0 { tok = FTS5_AND } break @@ -178430,15 +178490,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -178516,7 +178576,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -178591,7 +178651,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -178603,7 +178663,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -178611,7 +178671,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -178652,7 +178712,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -178674,7 +178734,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -178838,7 +178898,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -179063,11 +179123,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+8, p+20) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -179075,7 +179135,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -179087,9 +179147,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -179106,7 +179166,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(164) defer tls.Free(164) @@ -179308,7 +179368,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -179328,7 +179388,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179355,7 +179415,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179412,7 +179472,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179478,7 +179538,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -179494,7 +179554,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -179503,7 +179563,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179529,7 +179589,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -179548,7 +179608,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -179616,7 +179676,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20 var rc int32 = SQLITE_OK @@ -179675,7 +179735,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -179694,7 +179754,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20)).FpIter @@ -179712,7 +179772,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var i int32 @@ -179728,7 +179788,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -179754,7 +179814,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -179804,7 +179864,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -179816,7 +179876,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32 + 1*4)) @@ -179846,7 +179906,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -179862,7 +179922,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -179915,7 +179975,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -179977,7 +180037,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -180009,7 +180069,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -180025,15 +180085,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180043,7 +180103,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -180068,7 +180128,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 20)).FbFirst = U8(1) } @@ -180080,7 +180140,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -180139,12 +180199,12 @@ func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhra type TokenCtx1 = struct { FpPhrase uintptr Frc int32 -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180213,12 +180273,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -180229,12 +180289,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -180251,7 +180311,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -180309,7 +180369,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -180404,17 +180464,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34498, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34506, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33535, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180426,7 +180486,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34503, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34511, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -180445,7 +180505,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -180483,7 +180543,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -180505,7 +180565,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180523,7 +180583,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20376, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20384, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -180544,7 +180604,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5Colset{})) + uint32((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint32(unsafe.Sizeof(int32(0)))) @@ -180559,7 +180619,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -180583,7 +180643,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -180611,21 +180671,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34532, 0) + ts+34540, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -180676,7 +180736,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+32+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*4, pSub+32, uint32(nByte)) @@ -180696,7 +180756,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 12)))).FnTerm var ii int32 var nByte int32 @@ -180739,7 +180799,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180799,12 +180859,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+20)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34585, + ts+34593, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34635 /* "phrase" */ + return ts + 34643 /* "phrase" */ } - return ts + 34498 /* "NEAR" */ + return ts + 34506 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -180827,7 +180887,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -180873,7 +180933,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -180886,7 +180946,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -180896,7 +180956,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -180905,7 +180965,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -180926,7 +180986,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint32((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -180950,12 +181010,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -180965,7 +181025,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -181000,7 +181060,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181028,7 +181088,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)))).Fposlist.Fn = 0 } else { @@ -181039,7 +181099,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -181089,12 +181149,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -181145,7 +181205,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -181161,14 +181221,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -181196,7 +181256,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -181205,7 +181265,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -181219,7 +181279,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181228,7 +181288,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181239,7 +181299,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -181269,7 +181329,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -181318,7 +181378,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -181477,7 +181537,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181523,7 +181583,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -181565,7 +181625,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -181599,20 +181659,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+16) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*40 @@ -181838,7 +181898,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -182046,14 +182106,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -182061,17 +182121,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -182085,18 +182145,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -182118,18 +182178,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 Fwriter Fts5PageWriter @@ -182144,47 +182204,47 @@ type Fts5SegWriter1 = struct { FaDlidx uintptr Fbtterm Fts5Buffer FiBtPage int32 -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 FnWriteCounter U64 FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -182192,7 +182252,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+32, nByte) } @@ -182210,7 +182270,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -182234,7 +182294,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182245,7 +182305,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -182257,7 +182317,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -182284,7 +182344,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34642, iRowid, 0, p+36) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34650, iRowid, 0, p+36) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -182330,11 +182390,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -182346,7 +182406,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -182361,7 +182421,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182372,7 +182432,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+40, Xsqlite3_mprintf(tls, - ts+34648, + ts+34656, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -182389,7 +182449,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182400,7 +182460,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34699, + ts+34707, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+44, zSql) != 0 { return @@ -182414,7 +182474,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182424,7 +182484,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+52, Xsqlite3_mprintf(tls, - ts+34748, + ts+34756, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -182436,7 +182496,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -182447,22 +182507,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -182473,7 +182533,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint32(unsafe.Sizeof(Fts5Structure{})) + uint32((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint32(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -182515,7 +182575,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182608,7 +182668,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -182628,7 +182688,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 20 + uintptr(iLvl)*12 var aNew uintptr @@ -182651,7 +182711,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182679,7 +182739,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 4 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182688,7 +182748,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+64, - Xsqlite3_mprintf(tls, ts+34788, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34796, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -182712,7 +182772,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -182729,7 +182789,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -182743,7 +182803,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -182796,14 +182856,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 20 + uintptr(iPromote)*12 @@ -182846,7 +182906,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -182895,7 +182955,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182931,7 +182991,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*28 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -182952,7 +183012,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -182965,7 +183025,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*28) @@ -182973,11 +183033,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -182998,7 +183058,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183060,7 +183120,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*28 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -183083,12 +183143,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -183098,7 +183158,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -183140,16 +183200,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -183179,7 +183239,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183208,7 +183268,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183253,7 +183313,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -183285,7 +183345,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183319,7 +183379,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -183341,7 +183401,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -183382,7 +183442,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183441,7 +183501,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -183491,7 +183551,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -183499,7 +183559,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183528,7 +183588,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -183633,7 +183693,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -183758,7 +183818,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -183858,7 +183918,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -183886,7 +183946,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -184120,7 +184180,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184128,7 +184188,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+56, Xsqlite3_mprintf(tls, - ts+34811, + ts+34819, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -184139,7 +184199,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -184209,7 +184269,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184265,7 +184325,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+64) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -184280,7 +184340,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -184332,7 +184392,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -184362,7 +184422,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -184412,7 +184472,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -184423,7 +184483,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -184446,7 +184506,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 68 + uintptr(iChanged)*92 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -184486,7 +184546,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -184497,7 +184557,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184536,7 +184596,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184561,12 +184621,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -184585,7 +184645,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -184601,21 +184661,21 @@ type PoslistCallbackCtx1 = struct { FpBuf uintptr FpColset uintptr FeState int32 -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -184625,7 +184685,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184651,7 +184711,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184731,7 +184791,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -184787,7 +184847,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -184838,7 +184898,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184899,7 +184959,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -184907,7 +184967,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -184927,7 +184987,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -184935,7 +184995,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+24) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+24) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -184951,7 +185011,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -185013,7 +185073,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185035,7 +185095,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -185080,7 +185140,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -185283,7 +185343,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -185316,7 +185376,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -185324,13 +185384,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -185349,7 +185409,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -185362,7 +185422,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -185404,7 +185464,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -185417,7 +185477,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -185427,7 +185487,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -185448,7 +185508,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint32(unsafe.Sizeof(Fts5DlidxWriter{}))*uint32(nLvl))) @@ -185467,7 +185527,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -185489,7 +185549,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -185522,7 +185582,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+32, pWriter+76, nTerm, pTerm) @@ -185532,7 +185592,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -185545,7 +185605,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185561,7 +185621,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -185621,7 +185681,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 4 var iRowid I64 @@ -185657,14 +185717,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 4 var pPgidx uintptr = pWriter + 4 + 20 @@ -185740,7 +185800,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 4 @@ -185769,7 +185829,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185798,7 +185858,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 4 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -185822,7 +185882,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -185843,7 +185903,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+48, Xsqlite3_mprintf(tls, - ts+34895, + ts+34903, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -185862,7 +185922,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -185931,13 +185991,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -186096,7 +186156,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186146,7 +186206,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -186163,7 +186223,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186180,7 +186240,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -186189,14 +186249,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186221,7 +186281,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -186399,7 +186459,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -186408,7 +186468,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -186469,7 +186529,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186503,7 +186563,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186528,12 +186588,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+32, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -186560,7 +186620,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186592,7 +186652,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -186602,13 +186662,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186625,7 +186685,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -186680,11 +186740,11 @@ type PrefixMerger1 = struct { FiOff int32 FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -186695,7 +186755,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -186708,7 +186768,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(740) defer tls.Free(740) @@ -186873,7 +186933,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 708 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187020,7 +187080,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -187040,7 +187100,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -187051,7 +187111,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -187062,7 +187122,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -187081,7 +187141,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187092,13 +187152,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34952, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34960, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24870, ts+34960, 0, pzErr) + pConfig, ts+24878, ts+34968, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11365, - ts+34995, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11373, + ts+35003, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -187115,7 +187175,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -187136,7 +187196,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -187163,7 +187223,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -187185,7 +187245,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -187209,7 +187269,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187292,7 +187352,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -187300,7 +187360,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187320,14 +187380,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187345,7 +187405,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187358,7 +187418,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -187380,7 +187440,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -187388,7 +187448,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -187397,7 +187457,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187410,7 +187470,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34642, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34650, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */))) @@ -187419,7 +187479,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -187433,7 +187493,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -187453,7 +187513,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -187472,7 +187532,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187531,7 +187591,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+28) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187547,7 +187607,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35039, + ts+35047, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -187700,7 +187760,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -187759,7 +187819,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+68+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*92, uintptr(0), bp+8) - sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(4), ts+35125) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(4), ts+35133) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fn, bp+20, bp+24) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) & int64(0x7FFFFFFF)) @@ -187790,13 +187850,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -187829,7 +187889,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -187851,7 +187911,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -187859,9 +187919,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -187888,35 +187948,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -187950,20 +188010,20 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -187973,13 +188033,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -187997,7 +188057,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188055,11 +188115,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -188068,14 +188128,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 52)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -188146,7 +188206,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188167,7 +188227,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR } @@ -188308,7 +188368,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -188319,7 +188379,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -188345,7 +188405,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -188358,11 +188418,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -188405,7 +188465,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -188422,7 +188482,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188432,7 +188492,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -188466,7 +188526,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -188486,7 +188546,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -188515,7 +188575,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188574,7 +188634,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188602,7 +188662,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -188631,11 +188691,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35169, + ts+35177, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14543 /* ", " */ + return ts + 14551 /* ", " */ } return ts + 1534 /* "" */ }(), @@ -188647,9 +188707,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35224 /* "DESC" */ + return ts + 35232 /* "DESC" */ } - return ts + 35229 /* "ASC" */ + return ts + 35237 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -188669,7 +188729,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -188684,7 +188744,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188700,13 +188760,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35233, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35241, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5008, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35239, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35247, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -188716,7 +188776,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -188729,7 +188789,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -188741,7 +188801,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35267, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35275, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -188773,7 +188833,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35277, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35285, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -188782,7 +188842,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188805,21 +188865,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35298, libc.VaList(bp, z)) + ts+35306, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33681 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33689 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -188838,7 +188898,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188878,7 +188938,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR __1: ; @@ -189113,7 +189173,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35331, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35339, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -189159,7 +189219,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -189170,7 +189230,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -189184,7 +189244,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -189214,7 +189274,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189258,7 +189318,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -189280,7 +189340,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189288,29 +189348,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35367, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35375, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35378, 0) + ts+35386, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35458, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35466, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35466, 0) + ts+35474, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16833, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16841, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35522, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35530, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35528, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -189329,7 +189389,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) if eType1 == SQLITE_INTEGER { @@ -189339,7 +189399,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -189362,7 +189422,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189384,7 +189444,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17378, z) { + 0 == Xsqlite3_stricmp(tls, ts+17386, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -189409,12 +189469,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35544, + ts+35552, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ } - return ts + 35581 /* "DELETE from" */ + return ts + 35589 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -189464,7 +189524,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -189476,7 +189536,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -189485,7 +189545,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -189493,7 +189553,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -189501,46 +189561,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -189557,7 +189617,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189614,7 +189674,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -189698,7 +189758,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -189708,7 +189768,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -189724,11 +189784,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -189740,7 +189800,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189798,7 +189858,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189836,7 +189896,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -189858,7 +189918,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189880,7 +189940,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189903,7 +189963,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189936,7 +189996,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190017,10 +190077,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190056,7 +190116,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -190065,7 +190125,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -190075,7 +190135,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190088,7 +190148,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35593, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35601, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -190098,7 +190158,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -190120,7 +190180,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -190184,7 +190244,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -190224,7 +190284,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -190243,12 +190303,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -190256,7 +190316,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190265,7 +190325,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190274,7 +190334,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -190283,7 +190343,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -190314,7 +190374,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -190343,7 +190403,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -190361,7 +190421,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -190377,7 +190437,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190393,7 +190453,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35614, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35622, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -190412,7 +190472,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 8 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35636, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35644, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -190428,7 +190488,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -190454,28 +190514,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35667) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35675) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35680, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35688, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName2))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -190486,10 +190546,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35771, ts + 33870, ts + 24870, ts + 34221, ts + 11365, -} /* sqlite3.c:234311:21 */ + ts + 35779, ts + 33878, ts + 24878, ts + 34229, ts + 11373, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -190510,7 +190570,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35778, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35786, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -190528,13 +190588,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35778, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35786, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35783, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35791, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -190572,7 +190632,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -190581,7 +190641,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -190589,7 +190649,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -190600,20 +190660,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 24 + uintptr(eStmt)*4)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35798, - ts + 35866, - ts + 35935, + ts + 35806, + ts + 35874, + ts + 35943, - ts + 35968, - ts + 36007, - ts + 36047, - ts + 36086, - ts + 36127, + ts + 35976, + ts + 36015, + ts + 36055, + ts + 36094, + ts + 36135, - ts + 36166, + ts + 36174, - ts + 36208, - ts + 36248, + ts + 36216, + ts + 36256, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -190690,7 +190750,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -190712,79 +190772,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36271, + ts+36279, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36375, + ts+36383, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36413, + ts+36421, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36451, + ts+36459, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24870, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11365, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35771, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24878, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11373, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35779, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34221, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34229, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33870, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33878, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(68) defer tls.Free(68) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36493, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36501, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36523, + ts+36531, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -190797,7 +190857,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190826,27 +190886,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36567, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36575, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36590, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36598, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33870, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33878, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34221, ts+36596, 0, pzErr) + pConfig, ts+34229, ts+36604, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35771, ts+36628, 1, pzErr) + pConfig, ts+35779, ts+36636, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -190858,7 +190918,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -190877,12 +190937,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -190899,7 +190959,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -190968,7 +191028,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190995,7 +191055,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+12, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -191009,7 +191069,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -191033,7 +191093,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191074,7 +191134,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -191086,12 +191146,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36645, + ts+36653, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36695, + ts+36703, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -191101,12 +191161,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -191170,15 +191230,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -191189,7 +191249,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191211,7 +191271,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191243,7 +191303,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -191288,7 +191348,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -191296,7 +191356,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36724, + zSql = Xsqlite3_mprintf(tls, ts+36732, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -191323,13 +191383,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191395,7 +191455,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -191493,14 +191553,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 36 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33870, bp+36) + rc = fts5StorageCount(tls, p, ts+33878, bp+36) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 36)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 44 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34221, bp+44) + rc = fts5StorageCount(tls, p, ts+34229, bp+44) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 44)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -191520,7 +191580,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -191534,7 +191594,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 24 + uintptr(eStmt)*4)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -191544,7 +191604,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -191562,7 +191622,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191593,7 +191653,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -191611,7 +191671,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -191628,7 +191688,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -191642,12 +191702,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191702,13 +191762,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -191718,12 +191778,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -191739,9 +191799,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint32(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36756) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36764) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36775) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -191758,7 +191818,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -191770,7 +191830,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -191850,7 +191910,7 @@ type Unicode61Tokenizer1 = struct { FnException int32 FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -191860,11 +191920,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -191919,7 +191979,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -191941,7 +192001,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -191951,7 +192011,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -191971,7 +192031,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -191982,7 +192042,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36778 /* "L* N* Co" */ + var zCat uintptr = ts + 36786 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -191995,7 +192055,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36787) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36795) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -192006,18 +192066,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36798) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36806) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36756) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36764) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36775) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36787) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36795) { // no-op } else { rc = SQLITE_ERROR @@ -192039,12 +192099,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 148 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -192300,7 +192360,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -192309,10 +192369,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -192323,7 +192383,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -192331,7 +192391,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36816 /* "unicode61" */ + var zBase uintptr = ts + 36824 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -192376,9 +192436,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -192386,15 +192446,15 @@ type PorterRule1 = struct { FxCond uintptr FzOutput uintptr FnOutput int32 -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -192415,12 +192475,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -192430,7 +192490,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -192440,7 +192500,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -192458,14 +192518,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -192480,13 +192540,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36826, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192494,11 +192554,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36829, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36837, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192506,7 +192566,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36839, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192514,7 +192574,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192522,11 +192582,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36845, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192534,19 +192594,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36855, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36867, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36865, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36870, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192554,11 +192614,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192566,7 +192626,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36881, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192574,11 +192634,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36885, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192586,22 +192646,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint32(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint32(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36901, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -192609,34 +192653,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-3), uint32(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36909, aBuf+uintptr(nBuf-3), uint32(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36885, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36913, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36908, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36911, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36919, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36901, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36923, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36909, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -192646,143 +192706,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36885, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36934, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36933, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36941, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36938, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36829, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36837, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36901, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36909, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36953, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36961, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15379, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15387, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36958, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36919, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36970, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36870, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36878, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36973, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36977, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36985, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36901, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36985, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36909, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37001, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36885, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36885, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37012, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-7), uint32(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36897, uint32(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37026, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36905, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37030, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37034, uint32(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-7), uint32(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37046, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36897, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36905, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36919, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -192792,22 +192852,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37057, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37062, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37070, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192815,21 +192875,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37067, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37073, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37034, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192837,7 +192897,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -192845,9 +192905,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37085, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -192857,18 +192917,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37091, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37095, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37103, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37098, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -192877,7 +192937,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37101, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -192894,7 +192954,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -192910,7 +192970,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193008,7 +193068,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -193029,20 +193089,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -193053,7 +193113,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37105) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37113) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -193073,7 +193133,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -193226,7 +193286,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -193240,27 +193300,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(64) defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36816, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36824, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37120, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37128, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37126, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37133, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -193286,7 +193346,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -193309,7 +193369,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -193380,7 +193440,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -193399,7 +193459,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -193460,7 +193520,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -193518,7 +193578,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -193530,9 +193590,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -193729,7 +193789,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -193908,7 +193968,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -194087,9 +194147,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -194129,7 +194189,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -194161,7 +194221,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194236,7 +194296,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -194412,7 +194472,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -194458,7 +194518,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -194471,7 +194531,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -194531,7 +194591,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -194571,7 +194631,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -194588,9 +194648,9 @@ type Fts5VocabCursor1 = struct { Fterm Fts5Buffer FiInstPos I64 FiInstOff int32 -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -194598,7 +194658,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -194606,14 +194666,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37141) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37145) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37153) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37157) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37158, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37166, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -194623,14 +194683,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -194655,24 +194715,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4 /* azSchema */)) = [3]uintptr{ - ts + 37192, - ts + 37232, - ts + 37267, + ts + 37200, + ts + 37240, + ts + 37275, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23166, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23174, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37310, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37318, 0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -194725,11 +194785,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -194743,7 +194803,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -194811,7 +194871,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -194824,11 +194884,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37343, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37351, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37374, + ts+37382, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -194852,7 +194912,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 68 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37425, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37433, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -194878,7 +194938,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -194892,7 +194952,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+52) @@ -194901,7 +194961,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194932,7 +194992,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -194961,7 +195021,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -195105,7 +195165,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -195179,12 +195239,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -195257,16 +195317,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37451, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37459, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -195283,7 +195343,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -195310,966 +195370,966 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37461 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37469 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 4)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2568 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 208 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 336)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 36)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 84)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 132)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 16)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 56)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 136)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 176)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 216)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 256)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 296)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 336)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 376)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 416)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 496)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 536)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 576)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 616)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 656)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 696)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 700)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 704)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 708)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 736)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 740)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 748)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 4)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2568 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 208 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 336)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 36)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 84)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 132)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 16)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 56)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 136)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 176)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 216)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 256)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 296)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 336)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 376)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 416)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 496)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 536)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 576)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 616)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 656)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 696)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 700)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 704)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 708)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 736)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 740)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 748)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 28 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 40 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 52 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 64 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 76 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off64_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 88 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 100 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 136 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 172 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 196 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 208 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 220 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, X__mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 232 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 244 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 268 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 280 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 292 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr - }{libc.Xmremap})) // sqlite3.c:35283:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmremap})) // sqlite3.c:35292:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 316 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 328 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1028)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1036)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1044)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1028)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1036)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1044)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go index 7e847f9e..f718e367 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go +++ b/vendor/modernc.org/sqlite/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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -2142,7 +2142,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2250,8 +2250,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3737,7 +3737,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5536,7 +5536,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -5561,7 +5561,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -5580,12 +5580,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -5614,7 +5614,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5722,7 +5722,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5828,7 +5828,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5934,7 +5934,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -6009,7 +6009,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -6074,7 +6074,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6099,7 +6099,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6115,7 +6115,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -6138,7 +6138,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6312,7 +6312,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6471,7 +6471,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6488,12 +6488,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6527,7 +6527,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6547,7 +6547,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6567,7 +6567,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6611,7 +6611,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6648,7 +6648,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -6668,13 +6668,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6704,7 +6704,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6717,7 +6717,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -6738,13 +6738,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6754,13 +6754,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6962,7 +6962,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7164,7 +7164,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7218,7 +7218,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7250,22 +7250,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7285,7 +7285,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7299,7 +7299,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7920,7 +7920,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7928,7 +7928,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -9691,13 +9691,13 @@ type Max_align_t = struct { // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -9708,7 +9708,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -9731,12 +9731,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -9759,7 +9759,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -9901,13 +9901,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -9915,7 +9915,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -9927,7 +9927,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -9937,7 +9937,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -9951,7 +9951,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -9962,7 +9962,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -9973,7 +9973,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -9983,7 +9983,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -9993,9 +9993,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -10010,7 +10010,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -10030,7 +10030,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -10052,7 +10052,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -10069,17 +10069,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -10094,17 +10094,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -10135,7 +10135,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -10145,7 +10145,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -10158,7 +10158,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -10177,10 +10177,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -10191,7 +10191,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -10202,9 +10202,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -10286,14 +10286,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -10312,21 +10312,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -10336,9 +10336,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -10349,9 +10349,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -10359,7 +10359,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -10384,14 +10384,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -10402,9 +10402,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -10430,15 +10430,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -10468,7 +10468,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -10477,14 +10477,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -10500,7 +10500,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -10510,7 +10510,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -10528,7 +10528,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -10541,7 +10541,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -10559,7 +10559,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -10573,7 +10573,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -10582,7 +10582,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -10592,9 +10592,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -10623,9 +10623,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -10659,7 +10659,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -10667,14 +10667,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -10685,7 +10685,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -10712,7 +10712,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -10783,7 +10783,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -10801,7 +10801,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -10872,7 +10872,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -10897,7 +10897,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -10936,7 +10936,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -10947,9 +10947,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -11053,11 +11053,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -11069,7 +11069,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -11097,7 +11097,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -11106,11 +11106,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -11175,7 +11175,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -11193,10 +11193,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -11272,7 +11272,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -11323,7 +11323,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -11417,7 +11417,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -11430,7 +11430,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -11495,7 +11495,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11518,7 +11518,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11540,7 +11540,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11566,7 +11566,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11590,7 +11590,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11616,7 +11616,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11640,7 +11640,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -11768,9 +11768,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1039, ts + 1053, ts + 1066, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -11837,10 +11837,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -11904,7 +11904,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -11964,12 +11964,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -11987,21 +11987,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -12017,7 +12017,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -12025,7 +12025,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -12033,7 +12033,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1086, ts + 1090, @@ -12041,7 +12041,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1099, ts + 1107, ts + 1112, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -12086,10 +12086,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -12112,10 +12112,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -12127,7 +12127,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -12181,7 +12181,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -12246,7 +12246,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -12260,7 +12260,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -12272,13 +12272,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12289,7 +12289,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12297,7 +12297,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12312,7 +12312,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12324,20 +12324,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -12352,7 +12352,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -12362,7 +12362,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -12376,7 +12376,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -12384,14 +12384,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -12402,12 +12402,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -12425,7 +12425,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -12441,7 +12441,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -12451,7 +12451,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -12463,7 +12463,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -13049,14 +13049,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -13083,7 +13083,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -13140,7 +13140,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -13156,7 +13156,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -13230,7 +13230,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13283,7 +13283,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -13292,7 +13292,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -13348,7 +13348,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13399,7 +13399,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -13414,7 +13414,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -13437,7 +13437,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13466,12 +13466,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -13516,7 +13516,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -13535,13 +13535,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -13571,7 +13571,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -13596,7 +13596,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -13636,7 +13636,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -13664,7 +13664,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1197 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1204 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1211 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -13688,7 +13688,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -14014,7 +14014,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -14055,7 +14055,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14071,7 +14071,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14086,7 +14086,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -14135,7 +14135,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14163,7 +14163,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14215,7 +14215,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -14359,7 +14359,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -14368,7 +14368,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -14377,7 +14377,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -14386,7 +14386,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -14399,7 +14399,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1343}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1352}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1365}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -14451,7 +14451,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -14460,27 +14460,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -14490,27 +14490,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -14523,7 +14523,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -14532,7 +14532,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14540,7 +14540,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -14552,7 +14552,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -14561,23 +14561,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -14585,14 +14585,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -14600,7 +14600,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -14614,7 +14614,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -14624,14 +14624,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -14639,7 +14639,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -14647,25 +14647,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -14682,13 +14682,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14697,7 +14697,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14722,7 +14722,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -14742,7 +14742,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -14752,7 +14752,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -14762,11 +14762,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -14788,7 +14788,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -14808,7 +14808,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14831,7 +14831,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14876,7 +14876,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -14907,8 +14907,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -14918,7 +14918,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -14927,14 +14927,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -15032,7 +15032,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15055,7 +15055,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -15064,7 +15064,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -15080,7 +15080,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15102,18 +15102,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -15122,7 +15122,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15137,7 +15137,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -15271,7 +15271,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -15305,7 +15305,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -15315,7 +15315,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15328,7 +15328,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -15339,7 +15339,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -15348,7 +15348,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -15357,7 +15357,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -15372,7 +15372,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -15411,40 +15411,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -15457,11 +15457,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -15524,7 +15524,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -15537,22 +15537,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -15568,7 +15568,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -15596,7 +15596,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -15613,7 +15613,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -15632,7 +15632,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -15655,12 +15655,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+24, 0) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -15668,7 +15668,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15683,7 +15683,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15696,7 +15696,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -15707,7 +15707,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -15754,7 +15754,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15783,7 +15783,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15793,7 +15793,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15801,27 +15801,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -15840,7 +15840,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -15851,7 +15851,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -15869,14 +15869,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -15902,7 +15902,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -15910,7 +15910,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -15971,7 +15971,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15981,7 +15981,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15989,7 +15989,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -15999,7 +15999,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -16011,7 +16011,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -16042,7 +16042,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16052,7 +16052,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -16090,7 +16090,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16110,7 +16110,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -16134,7 +16134,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -16148,7 +16148,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -16162,7 +16162,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -16180,7 +16180,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -16193,7 +16193,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -16209,7 +16209,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -16230,7 +16230,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+432, int32(0), 0) @@ -16246,7 +16246,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -16265,7 +16265,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -16294,7 +16294,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -16305,18 +16305,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -16343,7 +16343,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -16354,7 +16354,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -16369,7 +16369,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -16384,7 +16384,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -16396,21 +16396,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -16424,7 +16424,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -16446,7 +16446,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -17935,7 +17935,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29902:29 */ // End of function @@ -17943,7 +17943,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -17970,7 +17970,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -17985,7 +17985,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -18039,7 +18039,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -18055,7 +18055,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) @@ -18065,7 +18065,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -18077,14 +18077,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -18098,7 +18098,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -18110,7 +18110,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -18128,10 +18128,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -18143,7 +18143,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -18151,7 +18151,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -18159,7 +18159,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -18168,7 +18168,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -18190,7 +18190,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -18201,7 +18201,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -18219,7 +18219,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -18241,7 +18241,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -18253,7 +18253,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -18273,7 +18273,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -18297,7 +18297,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -18312,7 +18312,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -18334,7 +18334,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -18352,7 +18352,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -18364,7 +18364,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -18419,7 +18419,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -18463,10 +18463,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -18545,16 +18545,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -18562,7 +18562,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -18584,7 +18584,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -18653,7 +18653,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -18680,7 +18680,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -18707,7 +18707,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -19032,7 +19032,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -19066,7 +19066,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -19098,7 +19098,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -19119,7 +19119,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -19417,7 +19417,7 @@ type Double_t = float64 /* math.h:150:16 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -19429,7 +19429,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19449,7 +19449,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -19461,7 +19461,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { @@ -19476,7 +19476,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -19486,7 +19486,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -19498,7 +19498,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -19509,7 +19509,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -19529,7 +19529,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -19556,7 +19556,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -19587,7 +19587,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -19612,7 +19612,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -19644,7 +19644,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -19664,7 +19664,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -19682,7 +19682,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -19697,7 +19697,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -19709,7 +19709,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -19735,7 +19735,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -19759,7 +19759,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -19775,7 +19775,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -19818,7 +19818,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -20198,7 +20198,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -20239,7 +20239,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -20268,7 +20268,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -20390,7 +20390,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20423,7 +20423,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20485,7 +20485,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20498,7 +20498,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -20541,7 +20541,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -20587,7 +20587,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -20610,7 +20610,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -20763,7 +20763,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20831,7 +20831,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -20839,7 +20839,7 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20849,7 +20849,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20860,7 +20860,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -20870,7 +20870,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -20888,7 +20888,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20909,7 +20909,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1535) @@ -20928,7 +20928,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -20945,21 +20945,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023: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:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043: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:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -20973,7 +20973,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -21004,11 +21004,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -21026,11 +21026,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -21051,7 +21051,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -21103,7 +21103,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -21142,7 +21142,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21161,7 +21161,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21200,7 +21200,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -21211,7 +21211,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -21228,7 +21228,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -21243,7 +21243,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -21280,7 +21280,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -21324,7 +21324,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -21353,11 +21353,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -21386,7 +21386,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -21404,7 +21404,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -21453,7 +21453,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -21643,7 +21643,7 @@ var azName = [185]uintptr{ ts + 3189, ts + 3194, ts + 3202, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -23225,7 +23225,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -23258,7 +23258,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -23274,10 +23274,10 @@ type unixShmNode = struct { F__ccgo_pad2 [4]byte FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -23295,18 +23295,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -23332,16 +23332,16 @@ type unixFile = struct { FpMapRegion uintptr FsectorSize int32 FdeviceCharacteristics int32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -23366,7 +23366,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -23381,7 +23381,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -23449,14 +23449,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3410, FpCurrent: 0}, {FzName: ts + 3416}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { return 0 } @@ -23467,7 +23467,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -23504,7 +23504,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -23520,7 +23520,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -23558,7 +23558,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -23625,14 +23625,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -23642,7 +23642,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, int64(sz)) @@ -23658,7 +23658,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -23707,7 +23707,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -23808,12 +23808,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -23831,7 +23831,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -23865,7 +23865,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3217, func() uintptr { @@ -23879,19 +23879,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -23901,7 +23901,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -23935,7 +23935,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -23994,7 +23994,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -24011,7 +24011,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -24047,7 +24047,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24113,7 +24113,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -24165,7 +24165,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24412,7 +24412,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -24433,7 +24433,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24567,7 +24567,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -24580,11 +24580,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -24594,7 +24594,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -24644,26 +24644,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -24704,7 +24704,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -24740,7 +24740,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -24782,7 +24782,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -24817,7 +24817,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -24916,7 +24916,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -24954,7 +24954,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -25009,7 +25009,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -25035,13 +25035,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -25098,7 +25098,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -25144,7 +25144,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -25171,7 +25171,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3329, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3329, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -25187,7 +25187,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25206,7 +25206,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -25218,7 +25218,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -25229,7 +25229,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -25244,7 +25244,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -25260,7 +25260,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -25291,7 +25291,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -25336,7 +25336,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -25351,7 +25351,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -25362,7 +25362,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25473,7 +25473,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -25494,7 +25494,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -25511,7 +25511,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -25521,7 +25521,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -25533,7 +25533,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25565,7 +25565,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25606,7 +25606,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size // Page size must be a power of 2 @@ -25620,7 +25620,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -25637,7 +25637,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -25652,7 +25652,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25696,7 +25696,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -25743,7 +25743,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -25839,7 +25839,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3212, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3212, zShm, 39446) goto shm_open_err __10: ; @@ -25907,7 +25907,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -26010,7 +26010,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39590) goto shmpage_out __14: ; @@ -26058,7 +26058,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -26116,7 +26116,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -26130,7 +26130,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -26237,7 +26237,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -26250,7 +26250,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -26293,7 +26293,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -26316,7 +26316,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3370 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -26350,7 +26350,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -26375,7 +26375,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26412,7 +26412,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -26439,7 +26439,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -26500,33 +26500,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -26539,7 +26539,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -26549,7 +26549,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26606,7 +26606,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -26629,7 +26629,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -26647,17 +26647,17 @@ var azTempDirs = [6]uintptr{ ts + 3680, ts + 3689, ts + 1547, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3694) azTempDirs[1] = libc.Xgetenv(tls, ts+3708) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26684,7 +26684,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -26728,7 +26728,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26779,7 +26779,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26815,7 +26815,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -26889,7 +26889,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(528) defer tls.Free(528) @@ -27087,7 +27087,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3212, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3212, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -27187,7 +27187,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27198,7 +27198,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41141) } return rc } @@ -27208,9 +27208,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -27227,7 +27227,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -27249,7 +27249,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -27272,7 +27272,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -27283,7 +27283,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3230, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3230, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -27292,7 +27292,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3614, libc.VaList(bp, zPath)) @@ -27343,7 +27343,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -27369,7 +27369,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3410, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3410, zIn, 41322) } } else { bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000)) @@ -27383,20 +27383,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3401, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3401, zIn, 41340) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint64(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint64(n)) @@ -27468,7 +27468,7 @@ type Dl_serinfo = struct { } } /* dlfcn.h:196:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -27478,7 +27478,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27492,7 +27492,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -27518,13 +27518,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27559,7 +27559,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -27572,7 +27572,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -27595,7 +27595,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -27609,12 +27609,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27630,7 +27630,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -27812,7 +27812,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -27850,14 +27850,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3763, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3773, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3653, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -27899,15 +27899,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -27921,9 +27921,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -27933,13 +27933,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -27956,7 +27956,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -27972,21 +27972,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -28024,7 +28024,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -28041,7 +28041,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -28063,7 +28063,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -28094,7 +28094,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -28109,14 +28109,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -28125,7 +28125,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -28169,7 +28169,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28198,13 +28198,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -28218,7 +28218,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -28229,7 +28229,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -28304,7 +28304,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -28315,7 +28315,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28325,7 +28325,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -28334,21 +28334,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -28356,7 +28356,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -28364,19 +28364,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -28384,7 +28384,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28407,7 +28407,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -28498,7 +28498,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28593,7 +28593,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -28615,7 +28615,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -28628,7 +28628,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -28657,7 +28657,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -28671,7 +28671,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -28808,7 +28808,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -28847,7 +28847,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -28862,7 +28862,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -28899,7 +28899,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -29062,7 +29062,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -29124,7 +29124,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -29136,7 +29136,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -29161,7 +29161,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -29174,7 +29174,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -29182,7 +29182,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -29196,7 +29196,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -29213,7 +29213,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -29260,7 +29260,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -29288,7 +29288,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -29339,7 +29339,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29359,7 +29359,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29375,7 +29375,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -29388,7 +29388,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -29397,7 +29397,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -29410,7 +29410,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -29425,7 +29425,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -29437,7 +29437,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -29446,7 +29446,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -29456,7 +29456,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -29465,7 +29465,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -29484,7 +29484,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -29518,19 +29518,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -29569,7 +29569,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -29612,7 +29612,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -29624,17 +29624,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -29642,7 +29642,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -29654,7 +29654,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -29671,20 +29671,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -29799,7 +29799,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -29885,7 +29885,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -29895,12 +29895,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -29908,9 +29908,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -29927,10 +29927,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -29948,7 +29948,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -29981,7 +29981,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -30026,7 +30026,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -30059,7 +30059,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -30089,7 +30089,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -30103,7 +30103,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -30141,7 +30141,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -30158,13 +30158,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -30182,7 +30182,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -30198,7 +30198,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -30239,7 +30239,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -30256,7 +30256,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -30274,7 +30274,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -30295,7 +30295,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -30343,7 +30343,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -30381,7 +30381,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -30390,7 +30390,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -30440,7 +30440,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -30463,7 +30463,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30478,7 +30478,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -30493,7 +30493,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -30611,7 +30611,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -30640,7 +30640,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -30651,7 +30651,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -30665,7 +30665,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30690,7 +30690,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -30721,7 +30721,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -30734,7 +30734,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30757,7 +30757,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30777,16 +30777,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -30797,7 +30797,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -30895,7 +30895,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -30908,13 +30908,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -30934,7 +30934,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -30953,7 +30953,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -30964,7 +30964,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -30987,7 +30987,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -31017,7 +31017,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -31052,7 +31052,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -31088,7 +31088,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31119,7 +31119,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -31150,7 +31150,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -31183,7 +31183,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -31216,7 +31216,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -31401,7 +31401,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -32170,7 +32170,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -32203,11 +32203,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -32230,7 +32230,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -32252,7 +32252,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32269,7 +32269,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32286,7 +32286,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -32313,7 +32313,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -32347,7 +32347,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -32381,7 +32381,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -32440,7 +32440,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -32469,7 +32469,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32504,7 +32504,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -32519,7 +32519,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -32629,7 +32629,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32739,7 +32739,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32799,21 +32799,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -32830,7 +32830,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -32859,7 +32859,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -32951,7 +32951,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -32976,7 +32976,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -33040,7 +33040,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -33167,7 +33167,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -33199,7 +33199,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -33244,7 +33244,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -33478,7 +33478,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33644,7 +33644,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33679,7 +33679,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -33711,7 +33711,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -33779,7 +33779,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -33914,39 +33914,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -33955,25 +33961,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -33982,10 +33988,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -34003,7 +34009,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -34012,24 +34018,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -34037,14 +34043,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3845, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -34064,7 +34070,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34118,7 +34124,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -34145,7 +34151,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -34176,7 +34182,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -34207,7 +34213,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -34255,7 +34261,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34286,7 +34292,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34340,7 +34346,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34408,7 +34414,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -34517,18 +34523,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34544,13 +34550,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -34603,7 +34609,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -34667,7 +34673,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -34695,7 +34701,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -34732,7 +34738,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34801,7 +34807,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -34810,7 +34816,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -34841,7 +34847,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint64(N)) @@ -34864,7 +34870,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -34881,7 +34887,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -34926,7 +34932,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -34953,7 +34959,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -34972,7 +34978,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -35002,7 +35008,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -35012,7 +35018,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -35025,7 +35031,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35063,7 +35069,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -35112,7 +35118,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -35149,7 +35155,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -35263,7 +35269,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -35295,7 +35301,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35375,7 +35381,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -35399,7 +35405,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -35430,7 +35436,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -35456,7 +35462,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -35518,7 +35524,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -35565,7 +35571,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -35691,7 +35697,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -36010,7 +36016,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -36048,7 +36054,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -36159,7 +36165,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -36285,7 +36291,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -36434,7 +36440,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -36496,7 +36502,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -36509,7 +36515,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -36555,7 +36561,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -36627,7 +36633,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -36647,7 +36653,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -36685,7 +36691,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -36694,7 +36700,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -36710,7 +36716,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -36731,7 +36737,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -36743,13 +36749,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -36778,7 +36784,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -36860,7 +36866,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -36920,7 +36926,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -36970,7 +36976,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -37044,7 +37050,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37132,7 +37138,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -37173,7 +37179,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -37203,7 +37209,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37273,7 +37279,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -37296,7 +37302,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -37332,7 +37338,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37522,7 +37528,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -37579,7 +37585,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -37623,13 +37629,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -37638,7 +37644,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -37651,7 +37657,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -37661,7 +37667,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -37673,7 +37679,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -37713,7 +37719,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -37751,7 +37757,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -37812,30 +37818,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -37843,7 +37849,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -37870,7 +37876,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37932,7 +37938,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -37992,21 +37998,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -38018,7 +38024,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -38044,7 +38050,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -38114,14 +38120,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -38136,7 +38142,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -38148,12 +38154,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -38165,7 +38171,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -38193,13 +38199,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -38209,7 +38215,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -38226,7 +38232,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -38262,7 +38268,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -38292,7 +38298,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38332,7 +38338,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -38343,7 +38349,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38355,7 +38361,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -38375,7 +38381,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38387,7 +38393,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -38966,7 +38972,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -38978,18 +38984,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -38997,7 +39003,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -39019,7 +39025,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -39050,7 +39056,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -39096,7 +39102,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -39104,13 +39110,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -39128,7 +39134,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -39160,7 +39166,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -39175,7 +39181,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -39199,7 +39205,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -39222,7 +39228,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -39264,7 +39270,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39275,7 +39281,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39284,7 +39290,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39295,7 +39301,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39307,12 +39313,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -39324,12 +39330,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -39343,7 +39349,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -39366,14 +39372,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -39391,7 +39397,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -39434,7 +39440,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -39475,7 +39481,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -39494,7 +39500,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -39609,7 +39615,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -39813,7 +39819,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -39839,7 +39845,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -39911,7 +39917,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -39925,7 +39931,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -39972,7 +39978,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -40018,7 +40024,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -40064,10 +40070,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -40082,7 +40088,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -40166,7 +40172,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -40178,7 +40184,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -40197,7 +40203,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -40248,7 +40254,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -40379,7 +40385,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -40540,7 +40546,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40559,7 +40565,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40631,7 +40637,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -40700,7 +40706,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40780,7 +40786,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -40825,7 +40831,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -41091,7 +41097,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -41308,7 +41314,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -41382,7 +41388,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -41470,7 +41476,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -41484,7 +41490,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41551,7 +41557,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -41567,7 +41573,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -41584,7 +41590,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -41602,7 +41608,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -41634,7 +41640,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -41654,7 +41660,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -41691,7 +41697,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -41703,7 +41709,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -41734,7 +41740,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41788,12 +41794,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -41801,7 +41807,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -41823,7 +41829,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41848,7 +41854,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41902,7 +41908,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -42135,7 +42141,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42200,7 +42206,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -42244,7 +42250,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -42275,7 +42281,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -42309,14 +42315,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -42335,16 +42341,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -42374,7 +42380,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -42390,13 +42396,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -42917,7 +42923,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -42926,7 +42932,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -42935,7 +42941,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -43045,7 +43051,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -43141,7 +43147,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -43155,7 +43161,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -43164,7 +43170,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -43185,7 +43191,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -43213,7 +43219,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -43244,7 +43250,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -43267,7 +43273,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -43282,13 +43288,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -43300,7 +43306,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -43311,11 +43317,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -43338,7 +43344,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -43364,14 +43370,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -43388,7 +43394,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -43445,7 +43451,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -43496,7 +43502,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -43531,7 +43537,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -43555,7 +43561,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43574,7 +43580,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -43621,7 +43627,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -43641,20 +43647,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -43676,7 +43682,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -43713,7 +43719,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -43754,7 +43760,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43775,7 +43781,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -43794,7 +43800,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -43804,7 +43810,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -43817,7 +43823,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -43834,7 +43840,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43874,7 +43880,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -43882,12 +43888,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -43900,7 +43906,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -43922,7 +43928,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -43934,7 +43940,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -43959,7 +43965,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -43982,7 +43988,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -44001,7 +44007,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -44009,7 +44015,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -44040,7 +44046,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44061,7 +44067,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -44071,7 +44077,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -44089,7 +44095,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -44116,7 +44122,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -44146,7 +44152,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -44156,7 +44162,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44233,7 +44239,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -44264,7 +44270,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(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) @@ -44280,7 +44286,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -44321,7 +44327,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -44338,7 +44344,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -44355,7 +44361,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -44373,7 +44379,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -44418,7 +44424,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -44428,7 +44434,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -44441,7 +44447,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -44450,14 +44456,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -44467,7 +44473,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -44529,7 +44535,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -44540,7 +44546,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -44575,7 +44581,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -44600,7 +44606,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -44629,7 +44635,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -44644,14 +44650,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -44667,7 +44673,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44692,7 +44698,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -44707,7 +44713,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -44758,7 +44764,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -44782,12 +44788,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -44798,11 +44804,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -44815,7 +44821,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -44823,7 +44829,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -44833,10 +44839,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -44870,7 +44876,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -44921,7 +44927,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -44929,7 +44935,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -44961,12 +44967,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -44978,11 +44984,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -44993,7 +44999,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -45001,7 +45007,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -45023,14 +45029,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -45043,7 +45049,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -45052,21 +45058,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -45084,7 +45090,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -45107,7 +45113,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -45119,7 +45125,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -45146,7 +45152,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45164,7 +45170,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -45176,11 +45182,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -45196,7 +45202,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45206,7 +45212,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -45237,7 +45243,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -45261,18 +45267,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -45284,13 +45290,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -45305,7 +45311,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -45325,7 +45331,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -45350,7 +45356,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -45771,7 +45777,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -45803,7 +45809,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -45836,7 +45842,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -45845,7 +45851,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -45895,7 +45901,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45912,7 +45918,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -45924,7 +45930,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45939,7 +45945,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45966,7 +45972,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46000,7 +46006,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -46013,7 +46019,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -46027,7 +46033,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -46043,7 +46049,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -46067,7 +46073,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -46087,7 +46093,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -46120,7 +46126,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -46145,7 +46151,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46314,7 +46320,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -46391,7 +46397,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -46404,7 +46410,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -46444,7 +46450,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -46486,7 +46492,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -46750,7 +46756,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46802,14 +46808,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -46837,7 +46843,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -46854,7 +46860,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -46869,7 +46875,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46880,7 +46886,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -46950,7 +46956,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -46972,7 +46978,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -47047,7 +47053,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -47071,7 +47077,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47085,7 +47091,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -47106,7 +47112,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -47129,7 +47135,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -47160,7 +47166,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -47210,7 +47216,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47233,7 +47239,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -47289,7 +47295,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -47318,7 +47324,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -47353,7 +47359,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -47382,7 +47388,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47404,7 +47410,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47470,7 +47476,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -47494,7 +47500,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47562,7 +47568,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -47575,7 +47581,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -47613,7 +47619,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -47621,7 +47627,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -47636,7 +47642,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -47646,13 +47652,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -47693,7 +47699,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -47702,7 +47708,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -47711,26 +47717,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -47743,7 +47749,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -47760,7 +47766,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -47782,7 +47788,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47850,7 +47856,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -47892,7 +47898,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47903,7 +47909,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -47914,7 +47920,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -47971,7 +47977,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -48031,7 +48037,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -48051,7 +48057,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -48059,7 +48065,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -48072,7 +48078,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -48099,7 +48105,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -48130,7 +48136,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -48141,11 +48147,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -48162,7 +48168,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -48192,7 +48198,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -48271,7 +48277,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -48292,7 +48298,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -48314,7 +48320,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -48335,7 +48341,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -48356,7 +48362,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -48375,7 +48381,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -48424,7 +48430,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48539,7 +48545,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -48668,7 +48674,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -48772,7 +48778,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -48821,7 +48827,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -48888,7 +48894,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -48898,7 +48904,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -48937,7 +48943,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -48974,7 +48980,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -49007,7 +49013,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -49047,7 +49053,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -49101,7 +49107,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -49135,7 +49141,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -49202,7 +49208,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -49283,7 +49289,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -49325,7 +49331,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -49370,7 +49376,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -49484,7 +49490,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -49659,7 +49665,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -49680,7 +49686,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -49750,7 +49756,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -49767,7 +49773,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -49848,14 +49854,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -49867,7 +49873,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -49882,7 +49888,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -49902,7 +49908,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -49934,7 +49940,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -50116,7 +50122,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -50134,7 +50140,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -50170,7 +50176,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50331,7 +50337,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -50408,11 +50414,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -50429,7 +50435,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -50437,7 +50443,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -50456,7 +50462,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -50487,12 +50493,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -50500,7 +50506,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -50550,7 +50556,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50588,7 +50594,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -50615,7 +50621,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -50667,7 +50673,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -50701,7 +50707,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -50841,7 +50847,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -50854,7 +50860,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -50952,7 +50958,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -51032,7 +51038,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -51334,7 +51340,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -51362,7 +51368,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -51541,7 +51547,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -51615,7 +51621,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -51688,7 +51694,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -51725,7 +51731,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -51809,7 +51815,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -52062,7 +52068,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -52284,7 +52290,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52335,13 +52341,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -52355,7 +52361,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -52474,7 +52480,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -52516,7 +52522,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52530,7 +52536,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -52554,7 +52560,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -52601,7 +52607,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -52673,7 +52679,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -52801,7 +52807,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -52864,7 +52870,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -52912,13 +52918,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) @@ -53026,7 +53032,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53053,7 +53059,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -53076,7 +53082,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -53158,7 +53164,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53186,11 +53192,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*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*iCellIdx)))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -53299,7 +53305,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1))))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -53376,7 +53382,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -53406,7 +53412,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -53449,7 +53455,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -53512,7 +53518,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -53522,7 +53528,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -53538,7 +53544,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -53552,7 +53558,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -53656,7 +53662,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53679,7 +53685,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -53701,7 +53707,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53711,7 +53717,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -53783,7 +53789,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -53809,7 +53815,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53828,7 +53834,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -53854,7 +53860,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -53917,12 +53923,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53949,13 +53955,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -53966,7 +53972,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53988,7 +53994,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -54015,7 +54021,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -54099,7 +54105,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -54111,7 +54117,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -54150,7 +54156,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -54539,7 +54545,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -54773,7 +54779,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -54784,14 +54790,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -54805,7 +54811,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -54821,7 +54827,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -54844,7 +54850,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -54858,7 +54864,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -54871,7 +54877,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -54895,7 +54901,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -54935,7 +54941,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -54943,7 +54949,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -54975,29 +54981,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -55037,7 +55043,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -55069,7 +55075,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -55079,7 +55085,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4805, 0) return SQLITE_ERROR @@ -55093,7 +55099,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -55153,14 +55159,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55222,7 +55228,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55237,7 +55243,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -55247,7 +55253,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -55485,7 +55491,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -55543,13 +55549,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -55563,7 +55569,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -55584,7 +55590,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -55599,7 +55605,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -55613,7 +55619,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -55707,7 +55713,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -55745,7 +55751,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -55765,7 +55771,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -55821,7 +55827,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -55839,7 +55845,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -55854,7 +55860,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -55879,7 +55885,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -55901,7 +55907,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -55923,7 +55929,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -55949,7 +55955,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -55979,7 +55985,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -56001,7 +56007,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -56020,7 +56026,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -56039,7 +56045,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -56049,7 +56055,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -56061,8 +56067,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -56073,7 +56079,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56082,7 +56088,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -56103,7 +56109,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56113,7 +56119,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -56131,7 +56137,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -56144,7 +56150,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -56165,7 +56171,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -56174,7 +56180,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -56189,7 +56195,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -56206,7 +56212,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56233,7 +56239,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -56287,7 +56293,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -56304,7 +56310,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -56312,13 +56318,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -56333,7 +56339,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -56341,7 +56347,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -56351,14 +56357,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -56378,7 +56385,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -56391,7 +56398,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -56408,7 +56415,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -56424,13 +56431,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -56446,7 +56453,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -56468,7 +56475,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) @@ -56489,7 +56496,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -56602,11 +56609,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -56621,7 +56628,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56646,7 +56653,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -56691,7 +56698,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -56707,7 +56714,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -56724,7 +56731,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -56735,7 +56742,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -56791,7 +56798,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -56937,7 +56944,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -57185,7 +57192,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -57208,7 +57215,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57276,7 +57283,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -57321,7 +57328,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -57331,7 +57338,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57352,7 +57359,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -57367,14 +57374,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -57390,7 +57397,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -57405,14 +57412,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -57423,14 +57430,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -57450,7 +57457,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -57474,12 +57481,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -57489,7 +57496,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -57502,7 +57509,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -57533,7 +57540,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -57586,7 +57593,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -57595,7 +57602,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -57618,26 +57625,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -57650,7 +57657,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -57698,7 +57705,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -57712,7 +57719,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -57744,7 +57751,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) @@ -57754,7 +57761,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -57770,7 +57777,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -57794,7 +57801,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -57805,7 +57812,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -57816,7 +57823,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -57827,7 +57834,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -57862,14 +57869,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) @@ -57881,7 +57888,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -57894,12 +57901,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } @@ -57922,7 +57929,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -58051,7 +58058,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -58082,7 +58089,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -58098,7 +58105,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -58142,23 +58149,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -58167,7 +58174,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -58182,7 +58189,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -58193,26 +58200,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -58273,7 +58280,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -58288,18 +58295,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -58315,7 +58322,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -58339,7 +58346,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -58356,7 +58363,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -58403,7 +58410,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -58419,7 +58426,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -58440,7 +58447,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -58454,11 +58461,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -58621,7 +58628,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -58629,7 +58636,7 @@ var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -58656,7 +58663,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -58675,7 +58682,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -58690,7 +58697,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -58698,7 +58705,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -58708,7 +58715,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -58752,7 +58759,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -58764,7 +58771,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -58863,7 +58870,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -58892,7 +58899,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -58981,7 +58988,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -58996,7 +59003,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -59013,7 +59020,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -59046,7 +59053,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -59155,11 +59162,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4973, ts + 4978, ts + 4985, ts + 4988, ts + 4991, ts + 4994, ts + 4997, ts + 5000, ts + 5008, ts + 5011, ts + 5018, ts + 5026, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -59193,7 +59200,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -59209,7 +59216,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -59233,7 +59240,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -59264,7 +59271,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59289,7 +59296,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -59308,7 +59315,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -59536,7 +59543,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -59554,7 +59561,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -59597,7 +59604,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -59612,7 +59619,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -59635,7 +59642,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59839,7 +59846,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -59849,7 +59856,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -59878,7 +59885,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59930,7 +59937,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -59954,7 +59961,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -59979,7 +59986,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -60000,7 +60007,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -60023,7 +60030,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60036,7 +60043,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -60048,7 +60055,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60066,7 +60073,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -60085,7 +60092,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -60160,10 +60167,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -60173,7 +60180,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -60222,7 +60229,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60273,7 +60280,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60300,7 +60307,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -60403,7 +60410,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -60417,7 +60424,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -60435,7 +60442,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60496,7 +60503,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -60539,7 +60546,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -60552,7 +60559,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -60592,7 +60599,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -60638,7 +60645,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -60732,7 +60739,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60795,7 +60802,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -60837,7 +60844,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -60902,7 +60909,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -60937,7 +60944,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -60998,7 +61005,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -61009,7 +61016,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61114,7 +61121,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61138,7 +61145,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -61176,7 +61183,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -61230,7 +61237,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -61315,7 +61322,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -61327,7 +61334,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -61343,7 +61350,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -61357,7 +61364,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -61365,7 +61372,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } @@ -61385,7 +61392,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) @@ -61393,12 +61400,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -61408,7 +61415,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -61428,7 +61435,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -61444,7 +61451,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61475,7 +61482,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -61491,7 +61498,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -61508,7 +61515,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -61560,7 +61567,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -61586,7 +61593,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } @@ -61594,7 +61601,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5200, 0) return 1 @@ -61604,7 +61611,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5245, 0) return 1 @@ -61616,7 +61623,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61649,7 +61656,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -61659,7 +61666,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -61679,7 +61686,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -61701,7 +61708,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -61723,7 +61730,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -61746,27 +61753,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -61776,7 +61783,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -61789,26 +61796,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -61877,20 +61884,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -61916,7 +61923,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -61931,7 +61938,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -61945,7 +61952,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -61958,12 +61965,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -61972,39 +61979,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -62012,19 +62019,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -62036,32 +62043,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -62071,7 +62078,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -62085,7 +62092,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5285, int64(-1), @@ -62093,7 +62100,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -62103,7 +62110,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -62113,7 +62120,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -62140,7 +62147,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -62307,14 +62314,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -62354,7 +62361,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -62367,7 +62374,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -62384,14 +62391,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -62449,13 +62456,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -62464,7 +62471,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62487,7 +62494,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -62507,7 +62514,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -62525,7 +62532,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -62548,7 +62555,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -62628,13 +62635,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -62644,7 +62651,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -62653,19 +62660,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -62700,7 +62707,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -62717,7 +62724,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -62727,43 +62734,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -62773,13 +62780,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -62799,7 +62806,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -62831,11 +62838,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -62844,44 +62851,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -62898,13 +62905,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -62912,7 +62919,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5318, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -62946,7 +62953,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -62972,16 +62979,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62992,11 +62999,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63007,7 +63014,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63017,7 +63024,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63030,11 +63037,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -63042,11 +63049,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -63095,7 +63102,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63106,7 +63113,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -63123,7 +63130,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -63135,7 +63142,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -63146,19 +63153,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -63181,7 +63188,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -63202,7 +63209,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -63211,7 +63218,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } @@ -63220,7 +63227,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } @@ -63228,7 +63235,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -63237,7 +63244,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -63250,7 +63257,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63276,7 +63283,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -63291,7 +63298,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -63306,7 +63313,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -63319,7 +63326,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -63333,7 +63340,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -63425,7 +63432,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63444,7 +63451,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63456,7 +63463,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63468,7 +63475,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -63482,7 +63489,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -63623,7 +63630,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63668,7 +63675,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -63891,7 +63898,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -63962,7 +63969,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -63984,7 +63991,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64030,7 +64037,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -64062,7 +64069,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -64074,7 +64081,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -64082,7 +64089,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64118,7 +64125,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -64132,13 +64139,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -64154,7 +64161,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -64178,7 +64185,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -64188,11 +64195,11 @@ var azTypes = [5]uintptr{ ts + 1112, ts + 1090, ts + 1535, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -66302,6 +66309,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -69321,7 +69332,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -69357,10 +69388,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -69368,13 +69399,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -69383,14 +69414,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -69398,12 +69429,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -69418,7 +69449,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -69436,13 +69467,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -69459,38 +69490,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -69500,27 +69531,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -69529,63 +69560,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -69593,55 +69624,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -69656,20 +69687,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -69679,15 +69710,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -69722,81 +69753,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -69804,45 +69835,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -69867,14 +69898,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -69882,30 +69913,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -69969,31 +70000,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -70022,13 +70053,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -70038,77 +70069,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -70117,79 +70148,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -70198,22 +70229,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -70222,37 +70253,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -70267,7 +70298,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -70280,13 +70311,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -70305,20 +70336,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -70339,17 +70370,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5485, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -70360,16 +70391,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) @@ -70377,14 +70408,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -70392,121 +70423,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5536, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5558, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -70519,36 +70525,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -70556,48 +70587,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -70618,18 +70649,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -70637,43 +70668,43 @@ __519: ts+5612, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -70689,7 +70720,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -70731,66 +70762,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -70798,16 +70829,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -70827,20 +70858,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -70887,37 +70918,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -71007,13 +71038,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -71022,11 +71053,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -71038,24 +71069,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -71067,32 +71098,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -71112,10 +71143,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -71134,10 +71165,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -71192,7 +71223,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -71200,11 +71231,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1534 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -71213,71 +71244,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -71296,19 +71327,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -71323,10 +71354,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -71350,10 +71381,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -71478,7 +71509,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -71488,10 +71519,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -71500,29 +71531,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -71533,53 +71564,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -71604,97 +71635,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -71752,10 +71783,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -71764,60 +71795,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -71840,18 +71871,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -71863,10 +71894,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -71961,10 +71992,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; __99: // jump, in3 @@ -71977,15 +72008,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -71995,62 +72026,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -72058,31 +72089,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -72136,7 +72167,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -72146,14 +72177,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; __103: // jump, in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -72174,25 +72205,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -72250,89 +72281,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -72341,36 +72372,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -72425,56 +72456,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -72486,13 +72517,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -72503,13 +72534,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -72522,7 +72553,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -72548,10 +72579,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -72601,28 +72632,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -72634,13 +72665,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -72649,28 +72680,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -72710,16 +72741,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -72742,10 +72773,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -72795,29 +72826,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -72838,20 +72869,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -72862,36 +72893,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -72900,6 +72931,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -72907,11 +72942,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -72944,39 +72979,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -72992,29 +73027,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -73059,32 +73094,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -73167,18 +73202,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -73218,10 +73253,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -73231,10 +73266,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -73251,10 +73286,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -73277,17 +73312,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -73318,31 +73353,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5827) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5827) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -73389,25 +73424,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -73419,17 +73454,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -73443,16 +73478,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -73506,15 +73541,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -73528,19 +73563,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -73548,22 +73583,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -73599,13 +73634,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -73613,21 +73648,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -73653,23 +73688,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -73685,21 +73720,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -73720,10 +73755,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -73737,10 +73772,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -73761,15 +73796,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5844 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -73781,11 +73816,11 @@ __751: ts+5858, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -73795,38 +73830,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -73839,10 +73874,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -73914,22 +73949,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -73947,15 +73982,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -73974,18 +74009,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -74020,35 +74055,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -74083,37 +74118,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5901, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -74121,7 +74156,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -74130,10 +74165,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -74141,10 +74176,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -74166,24 +74201,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -74234,21 +74269,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -74265,25 +74300,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -74299,35 +74334,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -74344,11 +74379,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -74381,7 +74416,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -74391,10 +74426,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -74409,16 +74444,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -74431,17 +74466,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -74488,10 +74523,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -74519,75 +74554,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -74623,32 +74658,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -74670,32 +74705,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -74718,17 +74753,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -74738,18 +74773,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -74761,11 +74796,11 @@ __830: return ts + 5995 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -74773,29 +74808,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -74803,18 +74838,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -74824,10 +74859,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -74849,10 +74884,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -74868,17 +74903,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -74900,13 +74935,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -74949,25 +74984,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+6002, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -74983,16 +75018,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -75012,17 +75047,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -75036,10 +75071,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -75054,11 +75089,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -75066,10 +75101,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -75078,18 +75113,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -75107,10 +75142,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -75155,27 +75190,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -75183,10 +75218,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -75210,11 +75245,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -75223,40 +75258,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -75270,10 +75305,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -75288,21 +75323,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -75320,27 +75355,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -75374,43 +75409,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -75419,41 +75454,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -75478,16 +75513,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -75547,24 +75582,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -75575,38 +75610,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -75645,16 +75680,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -75704,67 +75739,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6031, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -75809,25 +75844,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -75836,46 +75871,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -75906,11 +75941,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6069, ts + 6078, ts + 6085, - ts + 6091} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6091} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -75941,7 +75976,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -75962,7 +75997,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -75979,7 +76014,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -76055,7 +76090,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -76376,7 +76411,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -76385,11 +76420,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -76408,14 +76443,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76474,14 +76509,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -76491,7 +76526,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -76507,7 +76542,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -76516,7 +76551,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76703,7 +76738,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -76854,7 +76889,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -76868,10 +76903,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -76882,18 +76917,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -76906,26 +76941,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -76935,10 +76970,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -76969,11 +77004,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -76990,7 +77025,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77094,7 +77129,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -77134,7 +77169,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -77149,7 +77184,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -77190,7 +77225,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77236,7 +77271,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77259,7 +77294,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77279,7 +77314,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77291,7 +77326,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77341,7 +77376,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -77401,7 +77436,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -77420,7 +77455,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -77516,7 +77551,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -77527,7 +77562,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -77547,7 +77582,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77566,14 +77601,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -77599,7 +77634,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -77624,7 +77659,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -77636,7 +77671,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -77653,7 +77688,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -77682,7 +77717,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -77701,7 +77736,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -77721,7 +77756,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -77745,7 +77780,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -77758,7 +77793,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -77797,7 +77832,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -77815,7 +77850,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -77872,7 +77907,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -77887,7 +77922,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -77916,7 +77951,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -77932,7 +77967,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -77955,7 +77990,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -78010,7 +78045,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78086,7 +78121,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -78097,7 +78132,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -78161,7 +78196,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78277,7 +78312,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -78323,7 +78358,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -78331,7 +78366,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -78354,7 +78389,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -78388,7 +78423,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -78415,7 +78450,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -78423,7 +78458,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78483,7 +78518,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -78553,7 +78588,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -78610,7 +78645,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -78626,7 +78661,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -78653,7 +78688,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78690,7 +78725,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -78706,7 +78741,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78757,7 +78792,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -78838,7 +78873,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78913,7 +78948,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -78958,7 +78993,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79000,7 +79035,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -79019,7 +79054,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79054,7 +79089,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79146,7 +79181,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -79193,23 +79228,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -79256,7 +79291,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -79266,7 +79301,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -79304,7 +79339,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -79370,7 +79405,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -79398,7 +79433,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -79408,14 +79443,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -79430,7 +79465,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -79442,7 +79477,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -79470,20 +79505,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -79512,7 +79547,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -79560,7 +79595,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -79602,7 +79637,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -79611,7 +79646,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -79640,7 +79675,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -79650,7 +79685,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -79692,7 +79727,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -79741,7 +79776,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -79772,13 +79807,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -79790,7 +79825,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79798,7 +79833,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79833,14 +79868,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -79873,7 +79908,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -79919,7 +79954,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -79936,7 +79971,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { @@ -79962,7 +79997,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -79981,7 +80016,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -80031,7 +80066,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -80746,7 +80781,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -80795,7 +80830,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -80817,7 +80852,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80843,7 +80878,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -81324,7 +81359,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -81359,7 +81394,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -81403,7 +81438,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81426,7 +81461,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -81563,7 +81598,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81609,7 +81644,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -81620,7 +81655,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -81652,7 +81687,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81729,7 +81764,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -82028,7 +82063,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82069,7 +82104,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82126,7 +82161,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82160,7 +82195,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -82196,7 +82231,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -82217,7 +82252,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -82260,7 +82295,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -82272,7 +82307,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82283,7 +82318,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -82294,7 +82329,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -82319,7 +82354,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -82391,7 +82426,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -82401,7 +82436,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -82410,7 +82445,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -82435,7 +82470,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -82453,7 +82488,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -82466,7 +82501,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -82482,7 +82517,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -82505,7 +82540,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -82515,7 +82550,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -82542,7 +82577,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -82550,7 +82585,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -82580,7 +82615,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -82614,7 +82649,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -82662,7 +82697,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -82686,7 +82721,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -82715,7 +82750,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82803,7 +82838,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82825,7 +82860,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -82833,7 +82868,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -82842,7 +82877,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -82862,7 +82897,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82889,7 +82924,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -82899,7 +82934,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82926,7 +82961,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82974,7 +83009,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82989,7 +83024,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -83012,7 +83047,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -83030,7 +83065,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -83058,7 +83093,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -83110,7 +83145,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -83129,7 +83164,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83166,7 +83201,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83198,7 +83233,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83266,7 +83301,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -83296,7 +83331,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -83310,13 +83345,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -83328,7 +83363,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -83370,7 +83405,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -83392,7 +83427,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -83411,7 +83446,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -83428,7 +83463,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83538,7 +83573,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -83560,7 +83595,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -83570,14 +83605,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -83610,7 +83645,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -83618,7 +83653,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -83687,7 +83722,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -83740,7 +83775,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -83769,7 +83804,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83835,9 +83870,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -83854,7 +83889,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -83873,7 +83908,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -83896,7 +83931,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83993,7 +84028,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -84020,7 +84055,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -84046,7 +84081,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -84061,7 +84096,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84073,7 +84108,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -84085,7 +84120,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -84093,7 +84128,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -84110,7 +84145,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -84122,7 +84157,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6646) == 0 { return U32(EP_IsTrue) } @@ -84135,7 +84170,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -84149,7 +84184,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -84166,7 +84201,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -84212,7 +84247,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -84287,7 +84322,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -84311,7 +84346,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -84326,7 +84361,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -84334,12 +84369,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -84381,7 +84416,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -84417,7 +84452,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -84426,7 +84461,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -84478,7 +84513,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -84517,7 +84552,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -84570,7 +84605,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7592) == 0 { return 1 } @@ -84588,7 +84623,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -84646,7 +84681,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -84658,7 +84693,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -84747,7 +84782,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84965,7 +85000,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -84997,7 +85032,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85016,7 +85051,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -85044,7 +85079,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -85239,7 +85274,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -85362,7 +85397,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -85399,7 +85434,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85780,7 +85815,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85800,7 +85835,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -85846,7 +85881,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -85861,7 +85896,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -85880,7 +85915,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85931,7 +85966,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -85945,14 +85980,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -85971,7 +86006,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -85995,7 +86030,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -86003,7 +86038,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -86128,7 +86163,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -87197,7 +87232,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -87214,7 +87249,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -87283,7 +87318,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -87308,7 +87343,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -87329,7 +87364,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -87342,7 +87377,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -87368,7 +87403,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -87450,7 +87485,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -87513,7 +87548,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87743,7 +87778,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87991,7 +88026,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -88011,7 +88046,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88065,7 +88100,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -88169,7 +88204,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -88196,7 +88231,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -88207,7 +88242,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -88333,7 +88368,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -88356,7 +88391,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -88465,7 +88500,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -88499,7 +88534,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -88517,7 +88552,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -88542,7 +88577,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -88580,7 +88615,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -88596,7 +88631,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -88636,7 +88671,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -88685,7 +88720,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -88718,7 +88753,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -88731,7 +88766,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88748,7 +88783,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88766,7 +88801,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -88957,7 +88992,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -88983,7 +89018,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -89008,7 +89043,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -89017,7 +89052,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -89027,7 +89062,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -89045,7 +89080,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -89063,7 +89098,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -89097,7 +89132,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89116,7 +89151,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89140,7 +89175,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -89156,7 +89191,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -89169,7 +89204,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -89354,7 +89389,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89369,7 +89404,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89515,7 +89550,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89632,7 +89667,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89660,7 +89695,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -89789,7 +89824,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -89801,7 +89836,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -89820,7 +89855,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -89832,7 +89867,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -89843,7 +89878,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -89884,7 +89919,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -89894,7 +89929,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -89926,7 +89961,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -89948,7 +89983,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -89971,7 +90006,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -89987,7 +90022,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -90010,7 +90045,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -90026,7 +90061,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -90048,7 +90083,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -90070,7 +90105,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -90094,7 +90129,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -90111,7 +90146,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -90125,34 +90160,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10807, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -90166,7 +90199,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90186,7 +90219,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10807, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10815, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -90236,7 +90269,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10813, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10821, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10805 /* " " */ @@ -90272,7 +90305,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -90370,7 +90403,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -90399,7 +90432,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -90438,7 +90471,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -90781,7 +90814,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -90792,7 +90825,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -90832,7 +90865,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -90966,7 +90999,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -90999,7 +91032,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -91113,7 +91146,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -91185,7 +91218,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -91225,7 +91258,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -91251,7 +91284,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10818, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10826, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -91271,7 +91304,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -91349,10 +91382,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10825, + Xsqlite3ErrorMsg(tls, pParse, ts+10833, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10853 /* "PRIMARY KEY" */ + return ts + 10861 /* "PRIMARY KEY" */ } return ts + 6078 /* "UNIQUE" */ }(), @@ -91365,7 +91398,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10865, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10873, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -91385,11 +91418,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10913, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10921, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11034, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11042, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -91504,16 +91537,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11052}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11073}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11093}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11112}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11131}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11060}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11081}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11101}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11139}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -91669,7 +91702,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -91710,7 +91743,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11154, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11162, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -91722,10 +91755,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11207, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11215, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -91746,10 +91779,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11225 /* "sqlite_stat1" */, FzCols: ts + 11238 /* "tbl,idx,stat" */}, - {FzName: ts + 11251 /* "sqlite_stat4" */, FzCols: ts + 11264 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11292 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11233 /* "sqlite_stat1" */, FzCols: ts + 11246 /* "tbl,idx,stat" */}, + {FzName: ts + 11259 /* "sqlite_stat4" */, FzCols: ts + 11272 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11300 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -91776,14 +91809,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -91794,12 +91827,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -91808,7 +91841,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -91823,7 +91856,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -91833,7 +91866,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -91848,7 +91881,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -91883,7 +91916,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -91978,7 +92011,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11305} /* sqlite3.c:111534:22 */ + FzName: ts + 11313} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -91989,7 +92022,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -92011,7 +92044,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -92029,7 +92062,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -92172,7 +92205,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -92224,7 +92257,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -92296,7 +92329,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11315} /* sqlite3.c:111824:22 */ + FzName: ts + 11323} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -92315,7 +92348,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -92349,7 +92382,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11325, + Xsqlite3_str_appendf(tls, bp+24, ts+11333, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -92359,7 +92392,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11330, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11338, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -92402,7 +92435,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11336, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11344, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -92416,9 +92449,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11342} /* sqlite3.c:111958:22 */ + FzName: ts + 11350} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -92427,7 +92460,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -92463,7 +92496,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11351, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11359, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -92481,7 +92514,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11225, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11233, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -92714,7 +92747,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -92776,7 +92809,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -92787,7 +92820,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -92795,7 +92828,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -92820,7 +92853,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -92829,9 +92862,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11365) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11373) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11369) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11377) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -92847,7 +92880,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92910,16 +92943,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -92948,15 +92981,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11373, z) == 0 { + if Xsqlite3_strglob(tls, ts+11381, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11384, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11392, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11394, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11402, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -92978,7 +93011,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93040,7 +93073,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -93057,7 +93090,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -93115,7 +93148,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -93136,7 +93169,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93272,15 +93305,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11251, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11259, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11406, - ts+11460, + ts+11414, + ts+11468, zDb) } return rc @@ -93304,7 +93337,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93332,10 +93365,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11225, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11233, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11512, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11520, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -93411,7 +93444,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -93425,7 +93458,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6332, zName) == 0) } @@ -93443,7 +93476,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -93510,7 +93543,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11553, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11561, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -93523,7 +93556,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11556, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11564, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -93537,7 +93570,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11593, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11601, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -93608,7 +93641,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11623, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11631, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -93625,7 +93658,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11652, 0) + ts+11660, 0) rc = SQLITE_ERROR __23: ; @@ -93701,7 +93734,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11720, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11728, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -93736,7 +93769,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93789,14 +93822,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11748, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11756, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11769, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11777, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -93804,7 +93837,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11795, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11803, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -93841,7 +93874,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -93920,7 +93953,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -93928,12 +93961,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11817} /* sqlite3.c:113383:24 */ + FzName: ts + 11825} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -93941,10 +93974,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11831} /* sqlite3.c:113403:24 */ + FzName: ts + 11839} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93956,7 +93989,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11845, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11853, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -93964,7 +93997,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93989,7 +94022,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11869, + ts+11877, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -94025,7 +94058,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -94061,7 +94094,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -94076,15 +94109,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -94174,7 +94207,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -94187,8 +94220,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11915, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11923, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -94199,7 +94232,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94214,11 +94247,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11944, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11952, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11950, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11958, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -94233,7 +94266,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -94282,7 +94315,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -94304,7 +94337,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11977, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11985, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -94316,7 +94349,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -94325,7 +94358,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -94340,7 +94373,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -94374,7 +94407,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -94386,7 +94419,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -94410,7 +94443,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -94563,7 +94596,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -94614,7 +94647,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -94638,14 +94671,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12025) + ts+12033) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+5844) } @@ -94671,11 +94704,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5844) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12025) + ts+12033) } } } @@ -94690,7 +94723,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94711,7 +94744,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12044, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12052, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -94730,9 +94763,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12052 /* "no such view" */ + zMsg = ts + 12060 /* "no such view" */ } else { - zMsg = ts + 12065 /* "no such table" */ + zMsg = ts + 12073 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6527, libc.VaList(bp, zMsg, zDbase, zName)) @@ -94753,7 +94786,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -94767,13 +94800,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { - return ts + 12011 /* "sqlite_schema" */ + return ts + 12019 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12025+7) == 0 { - return ts + 11992 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 { + return ts + 12000 /* "sqlite_temp_sche..." */ } } return zName @@ -94789,7 +94822,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -94816,7 +94849,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -94832,7 +94865,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -94864,7 +94897,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -94890,7 +94923,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -94911,7 +94944,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -94933,14 +94966,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -94963,7 +94996,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -94980,7 +95013,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -94999,7 +95032,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -95018,7 +95051,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -95068,7 +95101,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -95105,7 +95138,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -95118,7 +95151,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -95140,7 +95173,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -95153,7 +95186,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5844) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -95166,7 +95199,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -95202,7 +95235,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -95226,7 +95259,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95235,13 +95268,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12079, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12087, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12096, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12104, libc.VaList(bp, pName1)) return -1 } } else { @@ -95253,7 +95286,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -95267,7 +95300,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95288,7 +95321,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8019, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12116, + Xsqlite3ErrorMsg(tls, pParse, ts+12124, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -95298,7 +95331,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -95309,7 +95342,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -95329,7 +95362,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -95376,7 +95409,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -95406,7 +95439,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -95429,7 +95462,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -95457,7 +95490,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 /* "sqlite_temp_mast..." */ + return ts + 12033 /* "sqlite_temp_mast..." */ } return ts + 5844 /* "sqlite_master" */ }()) @@ -95477,7 +95510,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12158, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12166, 0) return __4: ; @@ -95524,7 +95557,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -95564,7 +95597,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12199, + Xsqlite3ErrorMsg(tls, pParse, ts+12207, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10376 /* "view" */ @@ -95584,7 +95617,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12220, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12228, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -95687,8 +95720,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -95698,10 +95731,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12255, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12263, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -95720,12 +95753,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12272, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12280, 0) } else { } @@ -95746,7 +95779,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12255 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12263 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -95758,7 +95791,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12255, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12263, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -95770,7 +95803,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -95792,7 +95825,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -95804,13 +95837,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12329, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12337, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12336, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12344, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -95850,7 +95883,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12346, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12354, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -95889,7 +95922,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -95936,7 +95969,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96010,7 +96043,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -96022,11 +96055,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12372, + Xsqlite3ErrorMsg(tls, pParse, ts+12380, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12417, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12425, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -96063,7 +96096,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -96072,12 +96105,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12458, 0) + ts+12466, 0) } } @@ -96097,7 +96130,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96122,7 +96155,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12510, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12518, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -96211,7 +96244,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12551, 0) + ts+12559, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -96228,7 +96261,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96258,7 +96291,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -96293,7 +96326,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96313,7 +96346,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12607, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12615, 0) goto generated_done __2: ; @@ -96326,13 +96359,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12650, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12666, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -96365,7 +96398,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12665, + Xsqlite3ErrorMsg(tls, pParse, ts+12673, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -96388,7 +96421,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -96402,7 +96435,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -96437,7 +96470,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -96473,7 +96506,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -96508,12 +96541,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1534 /* "" */ - zSep2 = ts + 12696 /* "," */ + zSep2 = ts + 12704 /* "," */ zEnd = ts + 4908 /* ")" */ } else { - zSep = ts + 12698 /* "\n " */ - zSep2 = ts + 12702 /* ",\n " */ - zEnd = ts + 12707 /* "\n)" */ + zSep = ts + 12706 /* "\n " */ + zSep2 = ts + 12710 /* ",\n " */ + zEnd = ts + 12715 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -96521,7 +96554,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12710, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12718, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -96561,15 +96594,15 @@ __6: var azType1 = [5]uintptr{ ts + 1534, - ts + 12724, - ts + 12730, - ts + 12735, - ts + 12740, -} /* sqlite3.c:115999:23 */ + ts + 12732, + ts + 12738, + ts + 12743, + ts + 12748, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -96598,7 +96631,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -96627,7 +96660,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -96647,7 +96680,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -96667,7 +96700,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -96700,7 +96733,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -96739,7 +96772,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96902,7 +96935,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -96935,7 +96968,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -96979,7 +97012,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -97016,7 +97049,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -97072,10 +97105,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12746, + ts+12754, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12779, + Xsqlite3ErrorMsg(tls, pParse, ts+12787, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -97095,11 +97128,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12806, 0) + ts+12814, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12856, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12864, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -97143,7 +97176,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12888, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12896, 0) return } } @@ -97177,11 +97210,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8761 /* "table" */ - zType2 = ts + 12932 /* "TABLE" */ + zType2 = ts + 12940 /* "TABLE" */ } else { // A view zType = ts + 10376 /* "view" */ - zType2 = ts + 12938 /* "VIEW" */ + zType2 = ts + 12946 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -97206,6 +97239,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -97262,7 +97300,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12943, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12951, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -97270,7 +97308,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12958, + ts+12966, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -97288,14 +97326,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13056, + ts+13064, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13098, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13106, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -97332,7 +97370,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -97353,7 +97391,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13132, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13140, 0) goto create_view_fail __1: ; @@ -97450,7 +97488,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97490,7 +97528,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13168, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13176, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -97565,7 +97603,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -97595,7 +97633,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -97621,14 +97659,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13206, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -97642,7 +97680,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13213, + ts+13221, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -97651,7 +97689,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -97697,7 +97735,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -97706,17 +97744,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13280, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13288, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -97749,7 +97787,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13294, + ts+13302, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -97761,7 +97799,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13339, + ts+13347, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -97780,7 +97818,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -97791,7 +97829,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3237, 4) == 0 { return 0 @@ -97812,7 +97850,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -97880,7 +97918,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -97942,7 +97980,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13406, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13414, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -97952,14 +97990,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13434, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13442, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13468, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13476, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -97974,7 +98012,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11369, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11377, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -98000,7 +98038,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -98039,7 +98077,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13500, + ts+13508, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -98052,7 +98090,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13563, 0) + ts+13571, 0) goto fk_end goto __7 __6: @@ -98137,7 +98175,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13657, + ts+13665, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -98223,7 +98261,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -98248,7 +98286,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98360,7 +98398,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -98385,7 +98423,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98394,12 +98432,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13703, + Xsqlite3ErrorMsg(tls, pParse, ts+13711, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13731 /* "FIRST" */ + return ts + 13739 /* "FIRST" */ } - return ts + 13737 /* "LAST" */ + return ts + 13745 /* "LAST" */ }())) return 1 } @@ -98418,7 +98456,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -98558,7 +98596,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13742, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13750, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -98579,7 +98617,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13748, + ts+13756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -98611,21 +98649,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13798, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13826, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13834, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13851, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 0) goto exit_create_index __17: ; @@ -98652,7 +98690,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13742, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13750, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -98667,7 +98705,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13885, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13893, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -98679,7 +98717,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13919, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13927, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -98708,7 +98746,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13943, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13951, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -98737,7 +98775,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -98783,7 +98821,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13742) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13750) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -98901,7 +98939,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13966, 0) + ts+13974, 0) goto exit_create_index __56: ; @@ -99131,7 +99169,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14027, libc.VaList(bp+48, 0)) + ts+14035, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -99187,8 +99225,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14069, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14077, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -99245,12 +99283,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14086, + zStmt = Xsqlite3MPrintf(tls, db, ts+14094, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1534 /* "" */ } - return ts + 14106 /* " UNIQUE" */ + return ts + 14114 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -99262,7 +99300,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14114, + ts+14122, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -99278,7 +99316,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14173, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14181, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -99374,7 +99412,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -99418,11 +99456,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -99457,7 +99495,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14200, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14208, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -99472,7 +99510,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14218, libc.VaList(bp+8, 0)) + ts+14226, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -99483,7 +99521,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -99513,9 +99551,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14291, + ts+14299, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11365, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11373, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -99541,7 +99579,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -99568,7 +99606,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99599,7 +99637,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -99613,7 +99651,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -99651,7 +99689,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99666,7 +99704,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14351, + Xsqlite3ErrorMsg(tls, pParse, ts+14359, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -99733,7 +99771,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -99772,7 +99810,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -99804,7 +99842,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -99867,7 +99905,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99878,12 +99916,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14387, + Xsqlite3ErrorMsg(tls, pParse, ts+14395, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14423 /* "ON" */ + return ts + 14431 /* "ON" */ } - return ts + 14426 /* "USING" */ + return ts + 14434 /* "USING" */ }())) goto append_from_error __1: @@ -99931,7 +99969,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -99953,7 +99991,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -99970,7 +100008,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -99994,7 +100032,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -100005,14 +100043,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14432, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14440, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -100040,7 +100078,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -100048,9 +100086,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14438 + return ts + 14446 } - return ts + 14447 + return ts + 14455 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -100062,7 +100100,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -100075,11 +100113,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14432, ts + 14454, ts + 14438} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14440, ts + 14462, ts + 14446} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100091,7 +100129,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14462, 0) + ts+14470, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -100105,13 +100143,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14546, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14554, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -100280,7 +100318,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -100295,7 +100333,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -100312,7 +100350,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -100354,7 +100392,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100414,14 +100452,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14563, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -100467,7 +100505,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100487,7 +100525,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -100495,7 +100533,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -100505,7 +100543,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100524,7 +100562,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14601, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, libc.VaList(bp, zName)) } } } @@ -100548,7 +100586,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -100578,7 +100616,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -100609,7 +100647,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -100624,7 +100662,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -100635,7 +100673,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100659,7 +100697,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -100704,7 +100742,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -100720,7 +100758,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -100740,7 +100778,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100762,7 +100800,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14631, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14639, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -100786,7 +100824,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -100827,7 +100865,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -100863,7 +100901,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -100875,7 +100913,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -100913,7 +100951,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -100993,7 +101031,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -101028,7 +101066,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -101075,7 +101113,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -101093,7 +101131,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -101114,7 +101152,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -101133,16 +101171,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14670, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14691, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14699, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -101151,7 +101189,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -101183,7 +101221,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -101734,7 +101772,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14729) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14737) __61: ; @@ -101789,7 +101827,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -101879,7 +101917,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11225) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11233) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -101926,7 +101964,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102015,7 +102053,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -102071,7 +102109,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -102099,7 +102137,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -102109,14 +102147,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -102146,7 +102184,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -102157,18 +102195,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102217,7 +102255,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102229,7 +102267,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) return } iVal = -iVal @@ -102271,7 +102309,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -102386,7 +102424,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -102423,7 +102461,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -102531,7 +102569,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102569,7 +102607,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14759, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14767, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -102585,7 +102623,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -102602,7 +102640,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102623,7 +102661,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102652,7 +102690,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102676,7 +102714,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -102694,7 +102732,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102709,7 +102747,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102718,7 +102756,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102733,20 +102771,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -102786,7 +102824,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -102972,13 +103010,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -102996,7 +103034,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -103019,7 +103057,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14764, -1) + Xsqlite3_result_error(tls, context, ts+14772, -1) return } if argc == 3 { @@ -103031,7 +103069,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14797, -1) + ts+14805, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -103059,7 +103097,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -103069,7 +103107,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -103080,7 +103118,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -103091,7 +103129,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103103,7 +103141,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -103118,7 +103156,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -103133,11 +103171,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -103159,7 +103197,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14842, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14850, libc.VaList(bp+8, r1)) } } break @@ -103196,7 +103234,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14849, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14857, libc.VaList(bp+24, zArg)) break } @@ -103218,7 +103256,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -103241,7 +103279,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103255,7 +103293,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -103293,7 +103331,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -103331,7 +103369,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -103350,7 +103388,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -103439,7 +103477,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -103542,8 +103580,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -103552,7 +103590,7 @@ var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103590,7 +103628,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14852, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14860, 4, uintptr(0)) } } @@ -103603,10 +103641,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103618,7 +103656,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11977, -1) + Xsqlite3_result_error(tls, context, ts+11985, -1) return } @@ -103642,11 +103680,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -103656,7 +103694,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -103678,7 +103716,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -103701,12 +103739,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -103715,7 +103753,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -103723,7 +103761,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -103737,14 +103775,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -103758,7 +103796,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -103769,7 +103807,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -103779,7 +103817,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -103817,7 +103855,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -103830,11 +103868,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -103850,9 +103888,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -103917,7 +103955,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -103959,7 +103997,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -103967,7 +104005,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -103985,8 +104023,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14857, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14865, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -103996,7 +104034,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -104006,14 +104044,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14863, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14863, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -104031,7 +104069,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -104087,7 +104125,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -104116,11 +104154,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -104130,7 +104168,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -104187,18 +104225,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -104219,7 +104257,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -104245,13 +104283,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -104279,7 +104317,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -104290,109 +104328,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14868}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14888}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14901}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14919}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14876}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14896}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14909}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14927}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14928}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14951}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14977}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15002}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15011}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15022}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15029}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15060}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15060}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15060}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15064}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15068}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15075}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15110}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15133}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15139}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15145}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15149}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15156}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15181}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15213}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15230}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15248}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14936}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14959}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14985}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15010}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15019}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15037}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15068}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15068}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15068}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15072}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15076}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15083}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15098}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15104}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15131}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15141}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15153}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15157}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15171}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15182}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15189}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15204}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15238}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15256}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15304}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15308}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15314}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15312}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15316}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15322}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15337}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15351}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15345}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15359}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15364}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15370}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15376}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15383}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15398}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15408}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15412}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15422}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15437}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15378}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15384}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15391}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15406}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15410}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15430}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15435}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15441}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15445}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15466}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15478}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15449}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15453}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15458}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15463}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15486}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15491}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15499}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15502}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15342}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15507}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15499}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15510}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15515}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -104567,7 +104605,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -104678,7 +104716,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15511, + ts+15519, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -104713,7 +104751,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -104843,7 +104881,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -104870,7 +104908,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -104911,7 +104949,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -105035,7 +105073,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -105045,7 +105083,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -105059,7 +105097,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -105092,7 +105130,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -105155,7 +105193,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -105179,7 +105217,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -105203,7 +105241,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -105238,7 +105276,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -105440,7 +105478,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -105499,7 +105537,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -105567,7 +105605,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -105769,7 +105807,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -105790,7 +105828,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -105850,7 +105888,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -105892,7 +105930,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -105971,7 +106009,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -106029,7 +106067,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -106065,7 +106103,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -106078,7 +106116,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -106191,7 +106229,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -106245,7 +106283,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -106285,7 +106323,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -106299,7 +106337,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -106307,7 +106345,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -106318,7 +106356,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -106349,16 +106387,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -106459,7 +106497,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -106641,7 +106679,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -106731,7 +106772,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15556, + ts+15564, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -106756,7 +106797,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15597, + Xsqlite3ErrorMsg(tls, pParse, ts+15605, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -106928,7 +106969,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15629, + ts+15637, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -106938,7 +106979,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15681, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15689, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -106994,7 +107035,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15706, + Xsqlite3ErrorMsg(tls, pParse, ts+15714, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -107002,7 +107043,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15752, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15760, 0) goto insert_cleanup __57: ; @@ -107486,7 +107527,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15773) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15781) __123: ; @@ -107510,7 +107551,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -107537,7 +107578,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -107571,7 +107612,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -107582,7 +107623,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -107590,12 +107631,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -107608,7 +107649,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -107714,7 +107755,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -107831,7 +107872,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -108572,7 +108613,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -108589,7 +108630,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -108692,7 +108733,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -108770,7 +108811,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -108828,7 +108869,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -108849,18 +108890,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -109214,7 +109249,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -109235,7 +109270,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -109424,7 +109459,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -109758,7 +109793,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -109772,7 +109807,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -109816,7 +109851,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11977, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11985, 0) __3: ; return SQLITE_ERROR @@ -109826,7 +109861,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15787 /* "sqlite3_extensio..." */ + zEntry = ts + 15795 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -109846,7 +109881,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -109892,7 +109927,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15810, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15818, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -109906,7 +109941,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15819, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15827, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -109930,7 +109965,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15823, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15831, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -109948,7 +109983,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15829, libc.VaList(bp+16, zEntry, zFile)) + ts+15837, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -109975,7 +110010,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15872, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15880, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -110015,7 +110050,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15904, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15912, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -110025,10 +110060,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15941, -} /* sqlite3.c:129386:21 */ + ts + 15949, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -110039,7 +110074,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -110050,7 +110085,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -110070,15 +110105,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -110088,7 +110123,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -110129,7 +110164,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -110148,7 +110183,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -110163,7 +110198,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -110194,7 +110229,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15944, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15952, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -110240,67 +110275,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5008, - ts + 15983, + ts + 15991, ts + 8761, - ts + 15987, - ts + 15992, ts + 15995, - ts + 16005, - ts + 16015, - ts + 16021, - ts + 16025, - ts + 16030, - ts + 16035, + ts + 16000, + ts + 16003, + ts + 16013, + ts + 16023, + ts + 16029, + ts + 16033, + ts + 16038, ts + 16043, - ts + 16054, - ts + 16057, + ts + 16051, + ts + 16062, + ts + 16065, - ts + 16064, - ts + 16025, - ts + 16030, - ts + 16071, - ts + 16076, + ts + 16072, + ts + 16033, + ts + 16038, ts + 16079, - ts + 16086, - ts + 16021, - ts + 16025, - ts + 16092, - ts + 16097, - ts + 16102, - ts + 16025, - ts + 16106, - ts + 16030, + ts + 16084, + ts + 16087, + ts + 16094, + ts + 16029, + ts + 16033, + ts + 16100, + ts + 16105, + ts + 16110, + ts + 16033, ts + 16114, - ts + 16118, - ts + 16123, - ts + 11369, - ts + 11365, - ts + 16129, - ts + 16134, - ts + 16139, - ts + 15983, - ts + 16025, - ts + 16144, - ts + 16151, - ts + 16158, - ts + 8761, + ts + 16038, + ts + 16122, + ts + 16126, + ts + 16131, + ts + 11377, + ts + 11373, + ts + 16137, + ts + 16142, + ts + 16147, + ts + 15991, + ts + 16033, + ts + 16152, + ts + 16159, ts + 16166, + ts + 8761, + ts + 16174, ts + 5011, - ts + 16172, + ts + 16180, - ts + 15983, - ts + 16025, - ts + 16177, - ts + 16182, - ts + 15379, - ts + 16187, + ts + 15991, + ts + 16033, + ts + 16185, + ts + 16190, + ts + 15387, + ts + 16195, - ts + 16200, - ts + 16209, - ts + 16216, + ts + 16208, + ts + 16217, + ts + 16224, - ts + 16227, -} /* sqlite3.c:129831:19 */ + ts + 16235, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -110311,247 +110346,247 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16235, + { /* zName: */ FzName: ts + 16243, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16250, + { /* zName: */ FzName: ts + 16258, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16265, + { /* zName: */ FzName: ts + 16273, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16277, + { /* zName: */ FzName: ts + 16285, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16293, + { /* zName: */ FzName: ts + 16301, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16216, + { /* zName: */ FzName: ts + 16224, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16306, + { /* zName: */ FzName: ts + 16314, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16318, + { /* zName: */ FzName: ts + 16326, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16338, + { /* zName: */ FzName: ts + 16346, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16354, + { /* zName: */ FzName: ts + 16362, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16375, + { /* zName: */ FzName: ts + 16383, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16390, + { /* zName: */ FzName: ts + 16398, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16406, + { /* zName: */ FzName: ts + 16414, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16420, + { /* zName: */ FzName: ts + 16428, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16433, + { /* zName: */ FzName: ts + 16441, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16447, + { /* zName: */ FzName: ts + 16455, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16466, + { /* zName: */ FzName: ts + 16474, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16485, + { /* zName: */ FzName: ts + 16493, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16508, + { /* zName: */ FzName: ts + 16516, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16517, + { /* zName: */ FzName: ts + 16525, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16535, + { /* zName: */ FzName: ts + 16543, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16552, + { /* zName: */ FzName: ts + 16560, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16565, + { /* zName: */ FzName: ts + 16573, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16580, + { /* zName: */ FzName: ts + 16588, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16598, + { /* zName: */ FzName: ts + 16606, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16608, + { /* zName: */ FzName: ts + 16616, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16638, + { /* zName: */ FzName: ts + 16646, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16663, + { /* zName: */ FzName: ts + 16671, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16682, + { /* zName: */ FzName: ts + 16690, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16693, + { /* zName: */ FzName: ts + 16701, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16704, + { /* zName: */ FzName: ts + 16712, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16716, + { /* zName: */ FzName: ts + 16724, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16732, + { /* zName: */ FzName: ts + 16740, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16745, + { /* zName: */ FzName: ts + 16753, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16764, + { /* zName: */ FzName: ts + 16772, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16783, + { /* zName: */ FzName: ts + 16791, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16796, + { /* zName: */ FzName: ts + 16804, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16811, + { /* zName: */ FzName: ts + 16819, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16821, + { /* zName: */ FzName: ts + 16829, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16833, + { /* zName: */ FzName: ts + 16841, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16842, + { /* zName: */ FzName: ts + 16850, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16853, + { /* zName: */ FzName: ts + 16861, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16863, + { /* zName: */ FzName: ts + 16871, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16875, + { /* zName: */ FzName: ts + 16883, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16886, + { /* zName: */ FzName: ts + 16894, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16898, + { /* zName: */ FzName: ts + 16906, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16915, + { /* zName: */ FzName: ts + 16923, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16934, + { /* zName: */ FzName: ts + 16942, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16960, + { /* zName: */ FzName: ts + 16968, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16975, + { /* zName: */ FzName: ts + 16983, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16989, + { /* zName: */ FzName: ts + 16997, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17008, + { /* zName: */ FzName: ts + 17016, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17022, + { /* zName: */ FzName: ts + 17030, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17038, + { /* zName: */ FzName: ts + 17046, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17050, + { /* zName: */ FzName: ts + 17058, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17061, + { /* zName: */ FzName: ts + 17069, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17072, + { /* zName: */ FzName: ts + 17080, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17084, + { /* zName: */ FzName: ts + 17092, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17095, + { /* zName: */ FzName: ts + 17103, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17116, + { /* zName: */ FzName: ts + 17124, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17124, + { /* zName: */ FzName: ts + 17132, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17139, + { /* zName: */ FzName: ts + 17147, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17152, + { /* zName: */ FzName: ts + 17160, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17171, + { /* zName: */ FzName: ts + 17179, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17186, + { /* zName: */ FzName: ts + 17194, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -110567,7 +110602,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -110584,13 +110619,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17202)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17210)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -110599,12 +110634,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17227) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17235) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17237) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17245) { return PAGER_LOCKINGMODE_NORMAL } } @@ -110615,15 +110650,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7905) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17244) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17252) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17249) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17257) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -110638,12 +110673,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16177) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16185) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17261) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17269) == 0 { return 2 } else { return 0 @@ -110653,13 +110688,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17268, 0) + ts+17276, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -110672,7 +110707,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -110686,7 +110721,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -110720,7 +110755,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -110730,7 +110765,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -110739,7 +110774,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -110755,23 +110790,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17330 /* "SET NULL" */ + zName = ts + 17338 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17339 /* "SET DEFAULT" */ + zName = ts + 17347 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17351 /* "CASCADE" */ + zName = ts + 17359 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17359 /* "RESTRICT" */ + zName = ts + 17367 /* "RESTRICT" */ break default: - zName = ts + 17368 /* "NO ACTION" */ + zName = ts + 17376 /* "NO ACTION" */ break } return zName @@ -110780,7 +110815,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -110789,11 +110824,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17378, ts + 17385, ts + 17393, ts + 17397, ts + 17261, ts + 17406, -} /* sqlite3.c:130656:15 */ + ts + 17386, ts + 17393, ts + 17401, ts + 17405, ts + 17269, ts + 17414, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -110820,7 +110855,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -110835,13 +110870,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17410 /* "w" */ + zType = ts + 17418 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17412 /* "a" */ + zType = ts + 17420 /* "a" */ } else { zType = ts + 7415 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17414, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17422, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -110849,15 +110884,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17421, ts + 17426, ts + 17434 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17429, ts + 17434, ts + 17442 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -110879,7 +110914,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -111126,7 +111161,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17442, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17450, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -111769,7 +111804,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17446) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17454) == 0) { goto __64 } b = 2 @@ -111858,7 +111893,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17237 /* "normal" */ + zRet = ts + 17245 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -111899,7 +111934,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17227 /* "exclusive" */ + zRet = ts + 17235 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -112264,7 +112299,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17451, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17459, 0) goto pragma_out __126: ; @@ -112310,7 +112345,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17476, 0) + ts+17484, 0) goto __133 __132: if !(iDb != 1) { @@ -112366,7 +112401,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17529) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17537) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -112480,9 +112515,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17535 /* "issisii" */ + return ts + 17543 /* "issisii" */ } - return ts + 17543 /* "issisi" */ + return ts + 17551 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -112567,7 +112602,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17550, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17558, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -112620,13 +112655,13 @@ __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12650 /* "virtual" */ + zType = ts + 12658 /* "virtual" */ goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17566 /* "shadow" */ + zType = ts + 17574 /* "shadow" */ goto __183 __182: zType = ts + 8761 /* "table" */ @@ -112636,7 +112671,7 @@ __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17573, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17581, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -112706,7 +112741,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17580, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17588, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -112716,7 +112751,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17585, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17593, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -112753,8 +112788,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17590, ts + 17592, ts + 16054} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17594, + *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17598, ts + 17600, ts + 16062} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17602, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -112788,7 +112823,7 @@ __199: __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17600, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17608, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -112811,7 +112846,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17612, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -112930,7 +112965,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17607, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17615, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -112938,7 +112973,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17616)) + ts+17624)) goto __227 __227: j2++ @@ -113139,7 +113174,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17621, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17629, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560 /* aiCols */))) @@ -113405,7 +113440,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17625, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17633, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -113507,7 +113542,7 @@ __304: goto __305 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17649, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17657, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { @@ -113529,7 +113564,7 @@ __305: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17669, + zErr = Xsqlite3MPrintf(tls, db, ts+17677, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -113573,7 +113608,7 @@ __313: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17691, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17699, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -113607,9 +113642,9 @@ __318: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17721) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17729) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17726) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17734) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -113649,7 +113684,7 @@ __322: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17747) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17755) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __319: @@ -113671,7 +113706,7 @@ __314: if !!(isQuick != 0) { goto __324 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17774) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17782) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __325: @@ -113722,7 +113757,7 @@ __266: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17803 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17811 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __329: @@ -113800,7 +113835,7 @@ __336: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __338 } - Xsqlite3ErrorMsg(tls, pParse, ts+17806, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17814, libc.VaList(bp+416, zRight)) __338: ; __333: @@ -113912,19 +113947,19 @@ __48: if !(zRight != 0) { goto __345 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17244) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17252) == 0) { goto __346 } eMode2 = SQLITE_CHECKPOINT_FULL goto __347 __346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17831) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17839) == 0) { goto __348 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __349 __348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17397) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17405) == 0) { goto __350 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -114111,7 +114146,7 @@ __365: __367: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17839, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17847, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __368 @@ -114262,9 +114297,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -114275,16 +114310,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -114293,27 +114328,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17857, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17862, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17868, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17877, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17886, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17902}, - {FzName: ts + 17909}, + {FzName: ts + 17865, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17870, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17876, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17885, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17902, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17910}, + {FzName: ts + 17917}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -114325,24 +114360,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -114359,7 +114394,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17915) + Xsqlite3_str_appendall(tls, bp+32, ts+17923) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -114367,7 +114402,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17930, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17938, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -114380,16 +114415,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17937, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17945, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17943) + Xsqlite3_str_appendall(tls, bp+32, ts+17951) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17955) + Xsqlite3_str_appendall(tls, bp+32, ts+17963) j++ } Xsqlite3_str_append(tls, bp+32, ts+4908, 1) @@ -114416,7 +114451,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -114428,7 +114463,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114493,7 +114528,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -114506,7 +114541,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -114517,7 +114552,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -114525,7 +114560,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -114541,7 +114576,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -114587,13 +114622,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17970) + Xsqlite3_str_appendall(tls, bp+32, ts+17978) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17978, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17986, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17982, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17990, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -114609,14 +114644,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -114628,7 +114663,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -114646,12 +114681,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -114684,7 +114719,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114695,12 +114730,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17986, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+17994, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -114709,25 +114744,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4959 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18014, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18022, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18053, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18053, - ts + 18060, - ts + 18072, -} /* sqlite3.c:133149:23 */ + ts + 18061, + ts + 18068, + ts + 18080, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -114749,7 +114784,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114794,7 +114829,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -114832,13 +114867,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18083) + corruptSchema(tls, pData, argv, ts+18091) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } } @@ -114851,7 +114886,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -114884,13 +114919,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8761 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7825 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18096 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18104 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -115003,7 +115038,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11652) + ts+11660) rc = SQLITE_ERROR goto initone_error_out __13: @@ -115043,7 +115078,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18168) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18176) rc = SQLITE_ERROR goto initone_error_out __17: @@ -115065,7 +115100,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18192, + ts+18200, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -115152,7 +115187,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -115184,7 +115219,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -115203,7 +115238,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115256,7 +115291,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -115283,7 +115318,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -115339,7 +115374,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -115362,7 +115397,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) @@ -115375,7 +115410,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -115457,7 +115492,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18226, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18234, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -115484,7 +115519,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18256, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18264, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -115581,13 +115616,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -115616,7 +115651,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115655,14 +115690,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -115675,7 +115710,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -115692,7 +115727,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115705,7 +115740,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -115740,21 +115775,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -115788,7 +115823,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -115809,7 +115844,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115839,7 +115874,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115857,19 +115892,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -115898,7 +115933,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -115909,7 +115944,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -115959,14 +115994,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -115988,7 +116023,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -116031,18 +116066,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18275, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18283, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18319, 0) + ts+18327, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18374)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18382)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -116055,11 +116090,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -116093,7 +116128,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -116121,7 +116156,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -116166,7 +116201,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -116190,7 +116225,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -116225,7 +116260,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116257,7 +116292,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18408, libc.VaList(bp, 0)) + ts+18416, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -116281,7 +116316,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18458, 0) + ts+18466, 0) return 1 } @@ -116316,7 +116351,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18513, libc.VaList(bp+8, zName)) + ts+18521, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -116339,11 +116374,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -116352,7 +116387,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -116365,7 +116400,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -116508,7 +116543,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -116556,7 +116591,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116637,7 +116672,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116665,7 +116700,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -117021,7 +117056,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) if p != 0 { @@ -117039,7 +117074,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -117050,7 +117085,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -117070,7 +117105,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -117104,20 +117139,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18577 /* "UNION ALL" */ + z = ts + 18585 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18587 /* "INTERSECT" */ + z = ts + 18595 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18597 /* "EXCEPT" */ + z = ts + 18605 /* "EXCEPT" */ break default: - z = ts + 18604 /* "UNION" */ + z = ts + 18612 /* "UNION" */ break } return z @@ -117131,11 +117166,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18610, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18618, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -117148,7 +117183,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -117327,7 +117362,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -117405,7 +117440,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1099 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16166 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16174 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -117451,7 +117486,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -117508,7 +117543,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -117560,13 +117595,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16166 /* "rowid" */ + zCol = ts + 16174 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -117576,7 +117611,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -117608,7 +117643,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -117669,7 +117704,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16166 /* "rowid" */ + zName = ts + 16174 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -117682,7 +117717,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -117697,7 +117732,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18642, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18650, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -117740,7 +117775,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -117809,7 +117844,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -117844,7 +117879,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -117876,7 +117911,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -117933,7 +117968,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -117957,7 +117992,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -118026,7 +118061,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -118062,7 +118097,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18658, 0) return __1: ; @@ -118172,7 +118207,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18699, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18707, 0) goto end_of_recursive_query __15: ; @@ -118194,7 +118229,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18741, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18749, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -118237,7 +118272,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18747, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18755, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -118267,7 +118302,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -118287,11 +118322,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18762, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18770, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1534 /* "" */ } - return ts + 18785 /* "S" */ + return ts + 18793 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -118307,7 +118342,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -118343,7 +118378,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -118443,8 +118478,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18787, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18802, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18795, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) __8: ; @@ -118493,7 +118528,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18577, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18585, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -118569,7 +118604,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -118641,7 +118676,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -118806,15 +118841,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18842, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18850, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18888, + ts+18896, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -118837,7 +118872,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -119033,7 +119068,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -119240,7 +119275,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18970, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18978, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -119248,7 +119283,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18981, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18989, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -119262,7 +119297,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18986, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18994, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -119383,14 +119418,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -119403,7 +119438,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -119486,7 +119521,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -119496,7 +119531,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -119539,7 +119574,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -119555,7 +119590,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -119587,7 +119622,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -119620,7 +119655,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -119630,7 +119665,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -119657,7 +119692,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -119827,7 +119862,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -120252,7 +120287,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -120260,7 +120295,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -120302,7 +120337,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -120337,7 +120372,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -120391,7 +120426,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -120458,7 +120493,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -120511,7 +120546,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -120582,7 +120617,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -120670,7 +120705,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -120686,12 +120721,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15060) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15068) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15064) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15072) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -120720,7 +120755,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -120760,7 +120795,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -120771,7 +120806,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18992, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19000, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -120799,7 +120834,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -120878,12 +120913,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19010, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19018, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -120897,7 +120932,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -120932,7 +120967,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -120965,7 +121000,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -121048,7 +121083,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19033, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19041, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -121075,7 +121110,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19053, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19061, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -121091,7 +121126,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19096 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19104 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -121117,7 +121152,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19119, + Xsqlite3ErrorMsg(tls, pParse, ts+19127, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -121128,9 +121163,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19157 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19165 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19191 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19199 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -121147,7 +121182,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -121163,7 +121198,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121178,7 +121213,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19229, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19237, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -121217,7 +121252,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -121305,7 +121340,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19241, + Xsqlite3ErrorMsg(tls, pParse, ts+19249, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -121324,7 +121359,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19280, + Xsqlite3ErrorMsg(tls, pParse, ts+19288, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -121332,7 +121367,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19311, + Xsqlite3ErrorMsg(tls, pParse, ts+19319, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -121497,7 +121532,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -121513,7 +121548,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19344, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19352, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -121533,9 +121568,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19353, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19361, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19371, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19379, 0) } } } @@ -121545,7 +121580,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19391, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19399, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -121566,7 +121601,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -121604,7 +121639,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -121652,7 +121687,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -121681,7 +121716,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -121706,7 +121741,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121734,13 +121769,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19422, 0) + ts+19430, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19473, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19481, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -121756,7 +121791,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -121795,7 +121830,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -121936,17 +121971,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19506, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19514, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19518 /* " USING COVERING ..." */ + return ts + 19526 /* " USING COVERING ..." */ } return ts + 1534 /* "" */ }(), @@ -121968,7 +122003,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -122014,7 +122049,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -122032,7 +122067,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -122073,7 +122108,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -122090,7 +122125,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -122291,7 +122326,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19541, + ts+19549, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -122377,7 +122412,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19595, + Xsqlite3ErrorMsg(tls, pParse, ts+19603, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -122617,7 +122652,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19635, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19643, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) @@ -122680,7 +122715,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19650, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19658, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -123202,9 +123237,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19666 /* "DISTINCT" */ + return ts + 19674 /* "DISTINCT" */ } - return ts + 19675 /* "GROUP BY" */ + return ts + 19683 /* "GROUP BY" */ }()) groupBySort = 1 @@ -123617,7 +123652,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19666) + explainTempTable(tls, pParse, ts+19674) __141: ; @@ -123629,9 +123664,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19684 /* "RIGHT PART OF OR..." */ + return ts + 19692 /* "RIGHT PART OF OR..." */ } - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -123687,7 +123722,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -123711,12 +123746,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123787,7 +123822,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19716, 0) + ts+19724, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -123847,7 +123882,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -123919,7 +123954,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -123950,7 +123985,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -123979,7 +124014,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -124017,7 +124052,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -124047,7 +124082,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19789, 0) goto trigger_cleanup __3: ; @@ -124108,7 +124143,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19827, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19835, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -124126,7 +124161,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) goto trigger_orphan_error __11: ; @@ -124141,7 +124176,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19827, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19835, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -124157,7 +124192,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19876, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19884, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -124174,7 +124209,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19902, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19910, 0) goto trigger_cleanup __18: ; @@ -124184,12 +124219,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19940, + Xsqlite3ErrorMsg(tls, pParse, ts+19948, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19977 /* "BEFORE" */ + return ts + 19985 /* "BEFORE" */ } - return ts + 19984 /* "AFTER" */ + return ts + 19992 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -124198,7 +124233,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19990, libc.VaList(bp+24, pTableName+8)) + ts+19998, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -124228,7 +124263,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -124324,7 +124359,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -124364,7 +124399,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19827, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19835, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -124401,13 +124436,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20036, + ts+20044, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20111, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20119, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -124448,7 +124483,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -124466,7 +124501,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -124483,10 +124518,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -124507,7 +124545,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124539,7 +124577,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124568,7 +124606,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124587,7 +124625,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -124607,7 +124645,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124673,7 +124711,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20140, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20148, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -124691,12 +124729,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -124714,7 +124752,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -124729,7 +124767,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20160, + ts+20168, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -124737,7 +124775,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -124768,7 +124806,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -124785,7 +124823,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124848,12 +124886,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20222, + ts+20230, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20270 /* "DELETE" */ + return ts + 20278 /* "DELETE" */ } - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ }())) __15: ; @@ -124912,7 +124950,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -124937,7 +124975,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -124949,7 +124987,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20284, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20292, 0) return 1 } @@ -124958,7 +124996,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -124999,7 +125037,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -125067,7 +125105,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -125154,7 +125192,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -125167,7 +125205,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -125224,7 +125262,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20326, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20334, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -125273,7 +125311,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -125302,7 +125340,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -125362,7 +125400,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -125410,7 +125448,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -125467,7 +125505,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125497,7 +125535,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -125518,7 +125556,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -125530,7 +125568,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -125574,7 +125612,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -125657,7 +125695,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -125938,7 +125976,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20340, + ts+20348, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -125970,7 +126008,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20376, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20384, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -127011,7 +127049,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20395) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20403) __169: ; @@ -127047,7 +127085,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127220,7 +127258,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -127233,14 +127271,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -127253,7 +127291,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -127279,7 +127317,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -127399,10 +127437,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 216)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20408, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20416, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20412, libc.VaList(bp+8, bp+216)) + ts+20420, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -127421,7 +127459,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -127443,7 +127481,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -127459,7 +127497,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -127493,7 +127531,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12079, -1) + ts+12087, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -127539,7 +127577,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127561,7 +127599,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20489, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20493, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20497, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -127579,7 +127617,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -127623,7 +127661,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -127680,7 +127718,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -127711,14 +127749,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20493) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20501) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20533) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20541) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -127729,7 +127767,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20576) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __5: ; @@ -127774,7 +127812,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20594, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20602, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -127795,7 +127833,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20625) goto end_of_vacuum __8: ; @@ -127811,7 +127849,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14432) + rc = execSql(tls, db, pzErrMsg, ts+14440) if !(rc != SQLITE_OK) { goto __9 } @@ -127863,7 +127901,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20644, + ts+20652, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -127873,7 +127911,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20752, + ts+20760, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -127888,7 +127926,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20806, + ts+20814, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -127905,7 +127943,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20957, + ts+20965, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -128018,7 +128056,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -128026,7 +128064,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -128066,7 +128104,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -128080,18 +128118,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -128112,7 +128150,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -128130,14 +128168,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -128147,7 +128185,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -128168,7 +128206,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -128205,7 +128243,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -128236,7 +128274,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -128262,7 +128300,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -128282,7 +128320,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128292,7 +128330,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -128308,7 +128346,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -128343,7 +128381,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -128354,7 +128392,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -128389,7 +128427,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21087, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21095, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -128401,7 +128439,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21111, + ts+21119, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -128411,7 +128449,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21210, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21218, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -128438,7 +128476,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -128446,7 +128484,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -128460,7 +128498,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -128481,7 +128519,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21237, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -128521,7 +128559,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21271, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21279, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -128535,7 +128573,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21301 /* "vtable construct..." */ + var zFormat uintptr = ts + 21309 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -128556,7 +128594,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16057, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16065, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -128596,7 +128634,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -128615,7 +128653,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21347, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21355, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -128632,7 +128670,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -128652,7 +128690,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -128664,7 +128702,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128683,7 +128721,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21347, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -128704,7 +128742,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -128720,7 +128758,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -128794,7 +128832,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -128839,7 +128877,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -128869,7 +128907,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -128891,14 +128929,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -128909,7 +128947,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -128970,7 +129008,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -129018,7 +129056,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129085,7 +129123,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -129124,7 +129162,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129169,7 +129207,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -129186,19 +129224,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -129207,7 +129245,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -129235,7 +129273,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -129299,7 +129337,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -129339,23 +129377,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -129385,9 +129423,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -129414,9 +129452,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -129426,9 +129464,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -129448,9 +129486,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -129463,9 +129501,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -129480,24 +129518,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -129519,7 +129557,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129545,7 +129583,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129567,7 +129605,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -129589,13 +129627,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21366 /* "" */ + return ts + 21374 /* "" */ } if i == -1 { - return ts + 16166 /* "rowid" */ + return ts + 16174 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -129606,19 +129644,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -129629,11 +129667,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_append(tls, pStr, ts+4959, 1) } @@ -129654,7 +129692,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129667,27 +129705,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21381, 2) + Xsqlite3_str_append(tls, pStr, ts+21389, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21384 /* "%s=?" */ + return ts + 21392 /* "%s=?" */ } - return ts + 21389 /* "ANY(%s)" */ + return ts + 21397 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21397) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21405) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21399) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21407) } Xsqlite3_str_append(tls, pStr, ts+4908, 1) } @@ -129699,7 +129737,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -129734,11 +129772,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21401, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21409, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21407 /* "SEARCH" */ + return ts + 21415 /* "SEARCH" */ } - return ts + 21414 /* "SCAN" */ + return ts + 21422 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -129748,30 +129786,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10853 /* "PRIMARY KEY" */ + zFmt = ts + 10861 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21419 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21427 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21452 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21460 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21477 /* "COVERING INDEX %..." */ + zFmt = ts + 21485 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21495 /* "INDEX %s" */ + zFmt = ts + 21503 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21504, 7) + Xsqlite3_str_append(tls, bp+64, ts+21512, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16166 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21512, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16174 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21520, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21543, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21551, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -129779,9 +129817,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21553, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21561, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21558, + Xsqlite3_str_appendf(tls, bp+64, ts+21566, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -129800,7 +129838,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -129818,22 +129856,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21593, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21606, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21614, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21373, 5) + Xsqlite3_str_append(tls, bp+24, ts+21381, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4908, 1) @@ -129883,7 +129921,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -129916,7 +129954,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -129949,7 +129987,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -129987,7 +130025,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -130062,7 +130100,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130255,7 +130293,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -130292,6 +130330,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -130375,7 +130414,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -130416,7 +130455,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -130444,10 +130483,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -130464,7 +130503,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -130484,7 +130523,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -130506,7 +130545,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -130571,7 +130610,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -130617,7 +130656,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -130627,6 +130666,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -130659,7 +130701,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -130730,7 +130772,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -130792,53 +130833,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -130846,8 +130886,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -131483,6 +131523,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -131497,7 +131545,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -131514,7 +131564,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21622, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -131533,7 +131583,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21637, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -131881,24 +131931,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -131920,7 +131970,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -131962,14 +132012,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -131989,7 +132039,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -132016,7 +132066,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132188,7 +132238,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132293,18 +132343,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16015, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15337, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14863, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21638, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16023, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15345, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14871, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21646, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -132312,7 +132362,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -132321,7 +132371,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -132352,7 +132402,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -132485,7 +132535,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -132804,7 +132854,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -132833,7 +132883,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -132868,7 +132918,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -132906,7 +132956,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -132947,7 +132997,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -133010,7 +133060,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21645, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21653, 0) return } } @@ -133194,7 +133244,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21686 /* "NOCASE" */ + return ts + 21694 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -133315,7 +133365,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -133338,7 +133388,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -133362,7 +133412,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -133414,7 +133464,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -133464,7 +133514,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -133477,7 +133527,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -133537,7 +133587,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -133567,7 +133617,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -133577,14 +133627,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -133601,7 +133651,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -133613,7 +133663,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133638,7 +133688,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21693, + Xsqlite3ErrorMsg(tls, pParse, ts+21701, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -133697,7 +133747,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -133727,16 +133777,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -133746,7 +133796,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -133771,7 +133821,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -133792,7 +133842,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { @@ -133813,14 +133863,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -133839,19 +133889,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{}))) } @@ -133861,7 +133911,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -133938,7 +133988,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -133958,14 +134008,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -133976,7 +134026,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -134080,7 +134130,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -134102,7 +134152,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -134157,7 +134207,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -134187,7 +134237,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -134208,7 +134258,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -134229,7 +134279,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -134299,7 +134349,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -134316,7 +134366,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -134359,7 +134409,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -134393,7 +134443,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -134479,7 +134529,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21729, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21737, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -134560,7 +134610,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21755 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21763 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -134751,7 +134801,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -134827,7 +134877,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -134851,7 +134906,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -135077,7 +135132,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -135104,7 +135159,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135142,7 +135197,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -135281,7 +135336,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -135294,7 +135349,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -135338,7 +135393,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -135453,7 +135508,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -135761,7 +135816,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -135770,7 +135825,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -135790,7 +135845,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) @@ -135807,13 +135862,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -135834,7 +135889,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -135860,7 +135915,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -135904,7 +135959,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -135963,7 +136018,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -136052,7 +136107,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -136159,7 +136214,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -136262,7 +136317,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -136330,7 +136385,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -136690,7 +136745,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -136732,7 +136787,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -136807,7 +136862,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -137092,7 +137147,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -137116,7 +137171,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -137218,7 +137273,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137291,7 +137346,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137340,7 +137395,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -137363,7 +137418,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -137386,7 +137441,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -137412,7 +137467,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -137441,7 +137496,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -137577,7 +137632,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -137702,7 +137757,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -137754,7 +137809,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21792, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21800, 0) rc = SQLITE_OK } else { goto __3 @@ -137790,7 +137845,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -138158,7 +138213,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) } @@ -138166,7 +138221,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -138213,7 +138268,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -138528,7 +138583,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21827, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21835, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -138620,7 +138675,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -138727,7 +138782,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -138738,7 +138793,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -138784,7 +138839,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -138859,7 +138914,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -138971,7 +139026,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -139035,7 +139090,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21845, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21853, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -139115,7 +139170,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21873, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21881, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -139656,7 +139711,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -139873,6 +139928,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -140054,7 +140111,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -140063,7 +140120,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -140079,13 +140136,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140095,7 +140152,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140113,9 +140170,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -140178,10 +140235,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21891, -1) + pCtx, ts+21899, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140191,7 +140248,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -140204,7 +140261,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140218,7 +140275,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140231,7 +140288,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140244,7 +140301,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -140254,7 +140311,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -140262,7 +140319,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140280,7 +140337,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -140290,7 +140347,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -140298,7 +140355,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -140312,13 +140369,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -140327,14 +140384,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21947, -1) + pCtx, ts+21955, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -140342,7 +140399,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -140368,10 +140425,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -140386,7 +140443,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -140400,7 +140457,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140408,7 +140465,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140424,17 +140481,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21992)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22003)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22014)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22019)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22032)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22042)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22048)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22059)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22069)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22081)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22000)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22011)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22022)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22027)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22040)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22050)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22056)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22067)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22077)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22089)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22094 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -140443,7 +140500,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -140451,7 +140508,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -140466,7 +140523,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -140485,9 +140542,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140498,7 +140555,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22090, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22098, libc.VaList(bp, zName)) } return p } @@ -140518,7 +140575,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -140542,12 +140599,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22109, 0) + ts+22117, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22180, 0) + ts+22188, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -140586,16 +140643,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -140694,7 +140751,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -140718,7 +140775,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -140750,7 +140807,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -140796,7 +140853,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -140804,14 +140861,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22243, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22251, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -140821,12 +140878,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -141002,7 +141062,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -141013,7 +141073,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -141028,7 +141088,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -141041,7 +141101,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -141053,7 +141113,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -141086,7 +141146,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22269, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22277, 0) goto windowAllocErr __2: ; @@ -141122,7 +141182,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -141141,7 +141201,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141152,15 +141212,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22301 /* "PARTITION clause" */ + zErr = ts + 22309 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22318 /* "ORDER BY clause" */ + zErr = ts + 22326 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22334 /* "frame specificat..." */ + zErr = ts + 22342 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22354, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22362, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -141175,7 +141235,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -141183,7 +141243,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22387, 0) + ts+22395, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -141194,7 +141254,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -141214,7 +141274,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -141254,7 +141314,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -141330,7 +141390,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -141359,17 +141419,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22434, - ts + 22487, - ts + 21891, - ts + 22538, - ts + 22590, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22442, + ts + 22495, + ts + 21899, + ts + 22546, + ts + 22598, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -141394,19 +141454,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -141442,7 +141502,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -141549,7 +141609,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -141585,7 +141645,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -141692,7 +141752,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -141775,7 +141835,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -141810,7 +141870,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -141835,7 +141895,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -141872,7 +141932,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -141995,7 +142055,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -142143,7 +142203,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -142174,7 +142234,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142199,7 +142259,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142547,7 +142607,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -142944,17 +143004,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -142964,7 +143024,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -142983,19 +143043,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22640, + Xsqlite3ErrorMsg(tls, pParse, ts+22648, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } - return ts + 22682 /* "LIMIT" */ + return ts + 22690 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22688, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22696, 0) } } @@ -143003,7 +143063,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -143015,7 +143075,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -143053,7 +143113,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -143067,14 +143127,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22722, + Xsqlite3ErrorMsg(tls, pParse, ts+22730, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -143142,7 +143202,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -143411,7 +143471,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -143639,7 +143699,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -143699,7 +143759,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -143742,7 +143802,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -143802,7 +143862,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -144004,7 +144064,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -144026,9 +144086,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -144037,9 +144097,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -144049,7 +144109,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -144064,7 +144124,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -144223,7 +144283,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -144231,7 +144291,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -144254,7 +144314,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -144294,7 +144354,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -144305,7 +144365,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -144315,7 +144375,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22760, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22768, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -144324,7 +144384,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -144747,7 +144807,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -145154,7 +145214,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -145166,7 +145226,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -145311,21 +145371,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16166, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16174, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16079, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16087, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -146061,7 +146121,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22809) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22817) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -146212,7 +146272,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -146707,21 +146767,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+22842, 0) + ts+22850, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22937, 0) + ts+22945, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23021, 0) + ts+23029, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -147161,7 +147221,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -147171,9 +147231,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23106, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23114, 0) } //*********** End %syntax_error code ***************************************** @@ -147181,7 +147241,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -147211,7 +147271,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -147265,7 +147325,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -147316,7 +147376,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -147402,7 +147462,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -147415,7 +147475,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -147432,7 +147492,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -147447,7 +147507,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -147463,7 +147523,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -147496,7 +147556,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -147629,7 +147689,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -147807,7 +147867,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147816,7 +147876,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -147825,11 +147885,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -147852,13 +147912,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147908,7 +147968,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -147925,7 +147985,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -147939,7 +147999,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -147952,7 +148012,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -148314,7 +148374,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -148384,7 +148444,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23123, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23131, libc.VaList(bp, bp+2464)) break } } @@ -148407,7 +148467,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23148, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23156, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -148504,7 +148564,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -148607,7 +148667,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23159, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23167, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -148620,11 +148680,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19827, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19835, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23166, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23174, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23171, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23179, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -148637,9 +148697,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23181, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23189, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23193, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -148681,12 +148741,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -148713,7 +148773,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -148725,11 +148785,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -148742,14 +148802,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -148762,14 +148822,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -148800,7 +148860,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -148926,7 +148986,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -148965,7 +149025,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -148973,7 +149033,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -149243,7 +149303,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -149341,13 +149401,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149366,7 +149426,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -149395,7 +149455,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -149474,11 +149534,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -149500,7 +149560,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -149513,7 +149573,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -149527,7 +149587,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -149543,39 +149603,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -149590,7 +149650,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -149605,7 +149665,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -149632,7 +149692,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -149648,14 +149708,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -149679,7 +149739,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23193, 0) + ts+23201, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -149692,7 +149752,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -149729,11 +149789,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -149743,7 +149803,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -149853,7 +149913,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -149903,24 +149963,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23261 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23269 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23275 /* "abort due to ROL..." */ + zErr = ts + 23283 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23297 /* "another row avai..." */ + zErr = ts + 23305 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23319 /* "no more rows ava..." */ + zErr = ts + 23327 /* "no more rows ava..." */ break } @@ -149938,36 +149998,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23342, - ts + 23355, + ts + 23350, + ts + 23363, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23371, - ts + 23396, - ts + 23410, - ts + 23429, + ts + 23379, + ts + 23404, + ts + 23418, + ts + 23437, ts + 1470, - ts + 23454, - ts + 23491, - ts + 23503, - ts + 23518, - ts + 23551, - ts + 23569, - ts + 23594, - ts + 23623, + ts + 23462, + ts + 23499, + ts + 23511, + ts + 23526, + ts + 23559, + ts + 23577, + ts + 23602, + ts + 23631, /* SQLITE_EMPTY */ uintptr(0), ts + 5799, ts + 5285, - ts + 23640, - ts + 23658, - ts + 23676, + ts + 23648, + ts + 23666, + ts + 23684, /* SQLITE_NOLFS */ uintptr(0), - ts + 23710, + ts + 23718, /* SQLITE_FORMAT */ uintptr(0), - ts + 23731, - ts + 23757, - ts + 23780, - ts + 23801, -} /* sqlite3.c:169926:20 */ + ts + 23739, + ts + 23765, + ts + 23788, + ts + 23809, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -149976,7 +150036,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -149999,8 +150059,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -150009,7 +150069,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -150027,7 +150087,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -150040,7 +150100,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -150056,7 +150116,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -150070,7 +150130,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ libc.AtomicStoreNInt32(db+432, int32(1), 0) } @@ -150078,7 +150138,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -150088,7 +150148,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -150146,7 +150206,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23817, 0) + ts+23825, 0) return SQLITE_BUSY } else { @@ -150193,7 +150253,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -150235,22 +150295,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -150270,7 +150330,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150279,7 +150339,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23880, libc.VaList(bp, zName)) + ts+23888, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -150294,7 +150354,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -150320,7 +150380,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150338,7 +150398,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -150359,7 +150419,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150377,7 +150437,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150390,7 +150450,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150403,7 +150463,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150416,7 +150476,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -150428,7 +150488,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -150444,7 +150504,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -150462,7 +150522,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -150475,7 +150535,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -150486,7 +150546,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150515,7 +150575,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23931, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23939, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -150536,7 +150596,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -150560,7 +150620,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -150602,19 +150662,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -150636,7 +150696,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150648,7 +150708,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -150677,18 +150737,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150696,9 +150756,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150706,7 +150766,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -150716,13 +150776,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -150735,7 +150795,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -150745,7 +150805,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23952, 0) + ts+23960, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -150798,7 +150858,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -150810,7 +150870,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -150857,7 +150917,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -150890,7 +150950,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24020, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24028, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -150938,10 +150998,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24026, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24034, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24036, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24044, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -151063,7 +151123,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24064, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24072, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -151074,17 +151134,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24068, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24076, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24068 /* "cache" */ + zModeType = ts + 24076 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24074, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24082, zOpt, uint64(4)) == 0) { goto __32 } @@ -151123,7 +151183,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24079, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24087, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -151131,7 +151191,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24099, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24107, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -151174,7 +151234,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24123, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24131, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -151195,24 +151255,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24139, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24146, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24147, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24154, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24154, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24157, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17261, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24162, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24165, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24168, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17269, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -151228,7 +151288,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -151380,10 +151440,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21686, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21694, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24164, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24172, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -151412,7 +151472,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -151469,7 +151529,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6332 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23166 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23174 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -151568,17 +151628,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -151589,7 +151649,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24170 /* "\x00\x00" */ + zFilename = ts + 24178 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -151610,12 +151670,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151627,7 +151687,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -151645,7 +151705,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -151656,7 +151716,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -151667,7 +151727,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -151675,7 +151735,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -151688,28 +151748,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24173, + Xsqlite3_log(tls, iErr, ts+24181, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24198) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24206) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24218) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24226) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24225) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24233) } // This is a convenience routine that makes sure that all thread-specific @@ -151717,12 +151777,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -151888,7 +151948,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24242, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24250, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -151906,7 +151966,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -151921,7 +151981,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -151934,7 +151994,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -151979,7 +152039,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -152438,7 +152498,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -152447,7 +152507,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+uint64(1)) return p + uintptr(n) + uintptr(1) @@ -152460,7 +152520,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -152491,7 +152551,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -152508,7 +152568,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -152517,7 +152577,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -152534,7 +152594,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -152544,7 +152604,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -152565,14 +152625,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -152585,7 +152645,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -152594,7 +152654,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -152609,7 +152669,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152620,7 +152680,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152631,7 +152691,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152654,7 +152714,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152697,7 +152757,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -152718,7 +152778,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -152727,7 +152787,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152739,7 +152799,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24270, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24278, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -152757,7 +152817,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152802,11 +152862,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -152819,7 +152879,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -152829,13 +152889,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -152859,7 +152919,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -152902,7 +152962,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24278 /* "database is dead..." */ + return ts + 24286 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -152914,7 +152974,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -152940,7 +153000,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153044,7 +153104,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -153649,7 +153709,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -153661,10 +153721,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -153672,9 +153732,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -153687,9 +153747,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -153697,8 +153757,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24301, ts + 24307, -} /* sqlite3.c:193131:19 */ + ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24309, ts + 24315, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -153712,7 +153772,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -153720,7 +153780,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -153728,7 +153788,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -153736,7 +153796,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -153744,7 +153804,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -153777,7 +153837,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -153789,7 +153849,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -153802,7 +153862,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -153811,7 +153871,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -153826,7 +153886,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -153877,7 +153937,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24314 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24322 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -153897,11 +153957,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -153934,7 +153994,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24331, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24339, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -153945,7 +154005,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -153972,7 +154032,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -153981,7 +154041,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -153991,7 +154051,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -153999,7 +154059,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -154101,7 +154161,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -154116,14 +154176,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -154134,7 +154194,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154415,7 +154475,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -154437,7 +154497,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -154452,7 +154512,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -154468,7 +154528,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -154695,7 +154755,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -154720,7 +154780,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24360, -1) + Xsqlite3_result_error(tls, pCtx, ts+24368, -1) } } jsonParseReset(tls, pParse) @@ -154731,7 +154791,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -154762,7 +154822,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) @@ -154782,7 +154842,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -154839,7 +154899,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -154862,7 +154922,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -155037,7 +155097,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -155048,7 +155108,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24375, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24383, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -155061,11 +155121,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24379, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24387, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -155076,7 +155136,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155128,18 +155188,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24405, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24413, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -155170,7 +155230,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155187,7 +155247,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155210,7 +155270,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -155260,7 +155320,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155294,11 +155354,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24448, uint32(2)) + jsonAppendRaw(tls, bp, ts+24456, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4949, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24451, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24459, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -155354,7 +155414,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -155427,7 +155487,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -155459,7 +155519,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155471,14 +155531,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24454, -1) + ts+24462, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24505, -1) + Xsqlite3_result_error(tls, ctx, ts+24513, -1) jsonReset(tls, bp) return } @@ -155498,7 +155558,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155567,7 +155627,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155586,7 +155646,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15270) + jsonWrongNumArgs(tls, ctx, ts+15278) return __2: ; @@ -155650,7 +155710,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -155675,9 +155735,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24539 /* "set" */ + return ts + 24547 /* "set" */ } - return ts + 24543 /* "insert" */ + return ts + 24551 /* "insert" */ }()) return __2: @@ -155748,7 +155808,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -155772,7 +155832,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -155786,7 +155846,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -155802,7 +155862,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -155827,16 +155887,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24550, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24558, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -155844,7 +155904,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -155886,7 +155946,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -155908,7 +155968,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -155932,16 +155992,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24553, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24561, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -155961,16 +156021,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -155985,7 +156045,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24556) + ts+24564) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -155998,13 +156058,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -156018,7 +156078,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -156029,7 +156089,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -156042,7 +156102,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -156051,13 +156111,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -156108,7 +156168,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -156125,19 +156185,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24639, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24647, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -156226,10 +156286,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24639, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24647, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -156253,7 +156313,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24650 /* "$" */ + zRoot = ts + 24658 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -156271,7 +156331,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -156281,7 +156341,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156356,7 +156416,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156385,7 +156445,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24360, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24368, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -156461,7 +156521,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -156475,36 +156535,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24652}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24657}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24686}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24699}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24702}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24706}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24718}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24730}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24741}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24752}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24764}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24777}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24796}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24824}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24660}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24665}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24694}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24707}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24710}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24714}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24726}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24738}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24749}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24760}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24772}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24785}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24804}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24815}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24832}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -156520,9 +156580,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24842 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24852 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24850 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24860 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -156569,7 +156629,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -156583,7 +156643,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -156604,9 +156664,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -156614,23 +156674,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -156639,20 +156699,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -156660,17 +156720,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -156696,16 +156756,16 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156718,12 +156778,12 @@ func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156736,7 +156796,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = i @@ -156747,7 +156807,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -156755,20 +156815,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -156776,7 +156836,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -156785,7 +156845,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -156800,7 +156860,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -156816,7 +156876,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -156825,7 +156885,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156857,11 +156917,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24862, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24870, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24870, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24878, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -156935,7 +156995,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -156946,7 +157006,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -156959,7 +157019,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -156976,7 +157036,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -157000,7 +157060,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -157026,19 +157086,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -157054,23 +157114,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -157092,13 +157152,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -157106,7 +157166,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24875, + ts+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -157125,7 +157185,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -157143,7 +157203,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -157173,7 +157233,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -157189,7 +157249,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -157206,7 +157266,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -157318,7 +157378,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157416,7 +157476,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157471,7 +157531,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -157487,7 +157547,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -157506,7 +157566,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -157523,7 +157583,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -157543,7 +157603,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -157554,7 +157614,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -157571,7 +157631,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -157605,7 +157665,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -157641,7 +157701,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -157689,7 +157749,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -157782,7 +157842,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -157798,7 +157858,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157813,7 +157873,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -157874,7 +157934,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -157895,12 +157955,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24957) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24965) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -157927,7 +157987,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -158070,7 +158130,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -158177,7 +158237,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -158220,7 +158280,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -158241,7 +158301,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -158280,7 +158340,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -158295,7 +158355,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -158308,7 +158368,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -158383,7 +158443,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -158439,7 +158499,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -158475,7 +158535,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -158483,7 +158543,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -158505,7 +158565,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -158553,7 +158613,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -158609,7 +158669,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -158708,7 +158768,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -158742,7 +158802,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -158977,7 +159037,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -159012,7 +159072,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159062,7 +159122,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -159093,7 +159153,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -159122,7 +159182,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -159237,7 +159297,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -159267,7 +159327,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -159298,7 +159358,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -159309,7 +159369,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -159398,7 +159458,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -159412,7 +159472,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -159437,7 +159497,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -159445,7 +159505,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24971, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24979, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -159457,12 +159517,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24991, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24999, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25023, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25031, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -159476,7 +159536,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -159705,7 +159765,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -159714,7 +159774,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -159722,7 +159782,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -159730,7 +159790,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25060, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25068, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -159751,7 +159811,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -159764,11 +159824,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25205 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25213 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -159776,7 +159836,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11225, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11233, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -159808,7 +159868,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -159819,8 +159879,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25261, ts + 5011, ts + 16166, -} /* sqlite3.c:199185:21 */ + ts + 25269, ts + 5011, ts + 16174, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -159844,9 +159904,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -159863,19 +159923,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25266, + ts+25274, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25328, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25336, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25333, + ts+25341, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25397, + ts+25405, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25467, + ts+25475, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -159906,7 +159966,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25516 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25524 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -159918,7 +159978,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25624, + ts+25632, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -159926,18 +159986,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25669, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25677, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12696, 1) + Xsqlite3_str_append(tls, p, ts+12704, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25696, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25704, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25718, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25726, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25726, 0) + Xsqlite3_str_appendf(tls, p, ts+25734, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -159953,24 +160013,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25742, - ts + 25795, + ts + 25750, + ts + 25803, - ts + 25840, - ts + 25892, - ts + 25946, + ts + 25848, + ts + 25900, + ts + 25954, - ts + 25991, - ts + 26049, - ts + 26104, -} /* sqlite3.c:199232:21 */ + ts + 25999, + ts + 26057, + ts + 26112, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160001,7 +160061,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160009,7 +160069,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26151, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26159, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -160021,7 +160081,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26171, + ts+26179, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -160029,7 +160089,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26228, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26236, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -160039,7 +160099,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160054,7 +160114,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -160080,10 +160140,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26263, - ts + 26306, - ts + 26341, - ts + 26377, + ts + 26271, + ts + 26314, + ts + 26349, + ts + 26385, } // Aux columns counted by a u8 @@ -160120,7 +160180,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26414, + Xsqlite3_str_appendf(tls, pSql, ts+26422, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -160132,7 +160192,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26438, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26446, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -160155,7 +160215,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -160254,7 +160314,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26455, ts + 26466} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -160270,7 +160330,7 @@ var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -160314,11 +160374,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10805, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26468, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26476, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26474, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26478, 1) + Xsqlite3_str_append(tls, pOut, ts+26486, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -160333,11 +160393,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26480, -1) + Xsqlite3_result_error(tls, ctx, ts+26488, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -160365,15 +160425,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -160386,7 +160446,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160414,7 +160474,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160426,7 +160486,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26513, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26521, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4013 /* "\n" */ @@ -160454,7 +160514,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160462,7 +160522,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26520, + ts+26528, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -160481,7 +160541,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26565, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26573, libc.VaList(bp+16, iNode)) } } @@ -160498,15 +160558,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26597, - ts + 26651, + ts + 26605, + ts + 26659, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -160521,23 +160581,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26699, + rtreeCheckAppendMsg(tls, pCheck, ts+26707, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26761, + ts+26769, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }(), iKey, iVal)) } } @@ -160554,7 +160614,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -160580,7 +160640,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26819, libc.VaList(bp, i, iCell, iNode)) + ts+26827, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -160600,7 +160660,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26867, libc.VaList(bp+24, i, iCell, iNode)) + ts+26875, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -160612,7 +160672,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160623,14 +160683,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26934, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26942, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26968, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26976, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -160638,7 +160698,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26998, + ts+27006, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -160666,20 +160726,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27053, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27061, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27084, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27092, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -160689,7 +160749,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -160709,13 +160769,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14432, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14440, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27151, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27159, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -160725,12 +160785,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24971, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24979, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27179, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27187, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -160745,8 +160805,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27210, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27217, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27218, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27225, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -160756,7 +160816,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27225, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27233, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -160796,13 +160856,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27229, -1) + ts+27237, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -160820,7 +160880,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17803 /* "ok" */ + return ts + 17811 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -160859,7 +160919,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -160885,7 +160945,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -160907,7 +160967,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -160924,7 +160984,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -160934,10 +160994,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -160947,7 +161007,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -160956,7 +161016,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161028,7 +161088,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -161170,7 +161230,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161239,7 +161299,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161252,7 +161312,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161261,11 +161321,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27280, 1) + Xsqlite3_str_append(tls, x, ts+27288, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27282, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27290, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27293, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27301, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161275,7 +161335,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -161289,19 +161349,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27304, 0) + Xsqlite3_str_appendf(tls, x, ts+27312, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27322, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27346, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27342, 0) + Xsqlite3_str_appendf(tls, x, ts+27350, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161321,7 +161381,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -161354,7 +161414,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -161374,7 +161434,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -161393,7 +161453,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -161429,7 +161489,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -161449,7 +161509,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161494,7 +161554,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161635,7 +161695,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161648,13 +161708,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -161688,7 +161748,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -161715,7 +161775,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -161756,7 +161816,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -161794,7 +161854,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -161826,10 +161886,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -161840,20 +161900,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -161887,7 +161947,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -161899,7 +161959,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161929,7 +161989,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -161959,7 +162019,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -161994,7 +162054,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -162024,7 +162084,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162260,7 +162320,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -162276,7 +162336,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -162286,7 +162346,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -162326,7 +162386,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27355, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27363, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -162335,7 +162395,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27377, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27385, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -162343,7 +162403,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -162401,12 +162461,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -162420,7 +162480,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -162587,7 +162647,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -162613,7 +162673,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16166 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16174 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -162623,7 +162683,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27381 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27389 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -162631,14 +162691,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27387 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162703,7 +162763,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -162770,7 +162830,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27396, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27404, 0) __4: ; goto geopoly_update_end @@ -162914,15 +162974,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27436) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27444) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27452) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27460) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -162955,9 +163015,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -162987,7 +163047,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27467, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27475, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -162999,26 +163059,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27475 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27488 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27501 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27514 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27452 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27526 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27436 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27549 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27563 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27576 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27590 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27606 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27483 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27522 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27460 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27534 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27444 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27557 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27571 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27584 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27598 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27614 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27618 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27626 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -163026,30 +163086,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27637, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27645, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27647, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27655, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27658, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27666, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27381, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27389, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27669, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27677, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -163063,7 +163123,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -163072,7 +163132,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -163093,7 +163153,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -163121,13 +163181,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24957, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24965, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163147,7 +163207,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163603,7 +163663,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -164004,7 +164064,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164069,7 +164129,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164131,7 +164191,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -164163,9 +164223,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -164180,16 +164240,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -164197,9 +164257,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -164218,16 +164278,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -164246,7 +164306,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -164269,7 +164329,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -164289,7 +164349,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164379,7 +164439,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164404,7 +164464,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -164421,7 +164481,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) return } @@ -164432,7 +164492,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -164447,7 +164507,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164465,7 +164525,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164489,7 +164549,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -164504,7 +164564,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -164522,7 +164582,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -164552,7 +164612,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -164566,7 +164626,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -164575,7 +164635,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27700, uintptr(0), uintptr(0), p+64) + ts+27708, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -164647,7 +164707,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -164659,7 +164719,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24870, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24878, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -164677,7 +164737,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164687,9 +164747,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27871, libc.VaList(bp, func() uintptr { + ts+27879, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28021 /* "AND rootpage!=0 ..." */ + return ts + 28029 /* "AND rootpage!=0 ..." */ } return ts + 1534 /* "" */ }()))) @@ -164697,7 +164757,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28062) + ts+28070) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -164712,7 +164772,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -164738,7 +164798,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -164764,7 +164824,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -164781,7 +164841,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -164804,7 +164864,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -164827,7 +164887,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164877,7 +164937,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -164898,7 +164958,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+28187, libc.VaList(bp, zTab))) + ts+28195, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -164916,7 +164976,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+28306, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28314, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -164934,7 +164994,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28327, libc.VaList(bp+16, zIdx))) + ts+28335, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -164958,7 +165018,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28378, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28386, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -164997,7 +165057,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -165007,7 +165067,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -165022,7 +165082,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -165055,7 +165115,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -165072,7 +165132,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19353, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19361, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -165085,18 +165145,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28456, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28464, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28475, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28483, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28480, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28488, zName) { bRbuRowid = 1 } } @@ -165108,12 +165168,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28490, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28498, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28519 /* "may not have" */ + return ts + 28527 /* "may not have" */ } - return ts + 28532 /* "requires" */ + return ts + 28540 /* "requires" */ }())) } @@ -165122,7 +165182,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28541, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28549, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -165136,7 +165196,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28563, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28571, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -165177,7 +165237,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165186,8 +165246,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+28590, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14543 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28598, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14551 /* ", " */ } return zList } @@ -165196,7 +165256,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -165208,7 +165268,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+28599, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28607, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -165238,7 +165298,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -165247,25 +165307,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28612, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28620, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28644, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28652, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+28667) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28673, ts+28680, ts+4908) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+28675) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28681, ts+28688, ts+4908) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28688, + ts+28696, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28730, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28738, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -165297,7 +165357,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -165328,7 +165388,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -165365,7 +165425,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ __7: ; goto __5 @@ -165374,13 +165434,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28758, + zLhs = rbuMPrintf(tls, p, ts+28766, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28779, + zOrder = rbuMPrintf(tls, p, ts+28787, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28815, + zSelect = rbuMPrintf(tls, p, ts+28823, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ iCol++ goto __1 __2: @@ -165399,7 +165459,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28842, + Xsqlite3_mprintf(tls, ts+28850, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -165426,8 +165486,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28890, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14543 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28898, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14551 /* ", " */ goto __15 __15: iCol++ @@ -165439,7 +165499,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28897, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28905, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -165478,7 +165538,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -165496,7 +165556,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -165508,7 +165568,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28909, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28917, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1534 /* "" */ } else { @@ -165522,37 +165582,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ } else { - zCol = ts + 28480 /* "rbu_rowid" */ + zCol = ts + 28488 /* "rbu_rowid" */ } zType = ts + 1099 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+28931, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28939, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28667 + return ts + 28675 } return ts + 1534 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28951, + zImpPK = Xsqlite3_mprintf(tls, ts+28959, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28972, + zImpCols = Xsqlite3_mprintf(tls, ts+28980, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29005, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29013, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14543 /* ", " */ - zAnd = ts + 21373 /* " AND " */ + zCom = ts + 14551 /* ", " */ + zAnd = ts + 21381 /* " AND " */ nBind++ } @@ -165589,7 +165649,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165600,11 +165660,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29029, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29037, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29041, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29049, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14543 /* ", " */ + zS = ts + 14551 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -165613,7 +165673,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29050, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29058, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -165627,24 +165687,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29065, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29073, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1534 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29079, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29087, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21381 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29091, libc.VaList(bp+40, zList)) + ts+29099, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1534 /* "" */ @@ -165652,8 +165712,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29141, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21381 /* " AND " */ } } } @@ -165665,9 +165725,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29154, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29162, 0) } // Return a nul-terminated string containing the comma separated list of @@ -165685,7 +165745,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -165700,17 +165760,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29141, + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29180, + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29210, + zList = rbuMPrintf(tls, p, ts+29218, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } } @@ -165731,7 +165791,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -165761,26 +165821,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29247 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29255 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16054) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16062) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) } break } @@ -165793,15 +165853,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28667 /* " DESC" */ + zDesc = ts + 28675 /* " DESC" */ } else { zDesc = ts + 1534 /* "" */ } - z = rbuMPrintf(tls, p, ts+29260, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14543 /* ", " */ + z = rbuMPrintf(tls, p, ts+29268, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14551 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29271, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29279, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -165824,7 +165884,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -165841,7 +165901,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29275) + ts+29283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -165850,7 +165910,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -165860,23 +165920,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29325, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29333, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29347, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29355, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28667 /* " DESC" */ + return ts + 28675 /* " DESC" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29357, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29365, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29372, + ts+29380, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) } @@ -165900,7 +165960,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -165922,32 +165982,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29434 /* "PRIMARY KEY " */ + zPk = ts + 29442 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29447, + zSql = rbuMPrintf(tls, p, ts+29455, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29474 /* " NOT NULL" */ + return ts + 29482 /* " NOT NULL" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29484, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29492, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29491, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29499, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) @@ -165964,7 +166024,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -165974,12 +166034,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29538, + ts+29546, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -166001,7 +166061,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -166011,7 +166071,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29595) + ts+29603) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -166109,7 +166169,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -166121,7 +166181,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29661, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29669, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -166145,7 +166205,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29681, + ts+29689, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) @@ -166154,14 +166214,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+29746, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29754, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+29782, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29790, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -166178,7 +166238,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29816, + ts+29824, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -166186,9 +166246,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }() } return ts + 1534 /* "" */ @@ -166197,21 +166257,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29887, + ts+29895, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29948, + ts+29956, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -166249,17 +166309,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1534 } - return ts + 30107 + return ts + 30115 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+30116, + ts+30124, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30152 /* ", _rowid_" */ + return ts + 30160 /* ", _rowid_" */ } return ts + 1534 /* "" */ }(), zBindings))) @@ -166271,28 +166331,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30162, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30170, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30190 /* ", rbu_rowid" */ + zRbuRowid = ts + 30198 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30202, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30210, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30278 /* ", 0 AS rbu_rowid" */ + return ts + 30286 /* ", 0 AS rbu_rowid" */ } return ts + 1534 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30295, + ts+30303, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -166300,7 +166360,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30594, + ts+30602, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -166314,9 +166374,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30693 /* ",_rowid_ " */ + zRbuRowid = ts + 30701 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30703 /* ",rbu_rowid" */ + zRbuRowid = ts + 30711 /* ",rbu_rowid" */ } } @@ -166329,20 +166389,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28750, 0) + zOrder = rbuMPrintf(tls, p, ts+28758, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+30714, + ts+30722, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30762 /* "0 AS " */ + return ts + 30770 /* "0 AS " */ } return ts + 1534 /* "" */ }(), @@ -166355,7 +166415,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } return ts + 1534 /* "" */ }(), zOrder, @@ -166384,7 +166444,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -166435,9 +166495,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30107 /* "rbu_imp_" */ + zPrefix = ts + 30115 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30768, + zUpdate = Xsqlite3_mprintf(tls, ts+30776, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -166450,7 +166510,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166473,7 +166533,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -166489,7 +166549,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -166505,7 +166565,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30798, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30806, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -166573,7 +166633,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -166585,21 +166645,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30828, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30836, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30855, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30863, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+48, ts+3237, uint64(4)) } else { libc.Xmemcpy(tls, p+48, ts+6332, uint64(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30873, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30881, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -166639,11 +166699,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30939, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30947, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24020, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24028, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -166655,13 +166715,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30971, + zTarget = Xsqlite3_mprintf(tls, ts+30979, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ } - return ts + 31003 /* "&" */ + return ts + 31011 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ @@ -166680,21 +166740,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31005, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31013, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31020, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31028, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31037, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31045, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -166702,7 +166762,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -166713,7 +166773,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31081, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31089, 0) } } @@ -166735,7 +166795,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -166743,7 +166803,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -166776,7 +166836,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -166784,7 +166844,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166818,7 +166878,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31099, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31107, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -166868,7 +166928,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -167254,7 +167314,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31173) + ts+31181) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -167267,7 +167327,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31195, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31203, libc.VaList(bp, iCookie+1)) } } } @@ -167275,7 +167335,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -167292,7 +167352,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31222, + ts+31230, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -167330,16 +167390,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31380, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31388, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31395, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31403, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -167349,18 +167409,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31415, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31423, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31440) + ts+31448) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167374,12 +167434,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31548) + ts+31556) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+31613) + ts+31621) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167391,7 +167451,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31657, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31665, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -167399,7 +167459,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167413,8 +167473,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17139) - rbuCopyPragma(tls, p, ts+16250) + rbuCopyPragma(tls, p, ts+17147) + rbuCopyPragma(tls, p, ts+16258) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -167425,7 +167485,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31682, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31690, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -167451,10 +167511,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -167542,7 +167602,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -167560,7 +167620,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -167575,7 +167635,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31710, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31718, 0) } if rc == SQLITE_OK { @@ -167590,11 +167650,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31159, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31167, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -167609,7 +167669,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -167618,7 +167678,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31735, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31743, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -167630,7 +167690,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -167640,7 +167700,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167657,7 +167717,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31746, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31754, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -167689,7 +167749,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167700,7 +167760,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31818, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31826, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -167708,7 +167768,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31832) + ts+31840) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -167720,7 +167780,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31889) + ts+31897) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -167731,7 +167791,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167803,7 +167863,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31963, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31971, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -167825,12 +167885,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31995, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32003, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32027 /* "vacuum" */ + return ts + 32035 /* "vacuum" */ } - return ts + 32034 /* "update" */ + return ts + 32042 /* "update" */ }())) } } @@ -167838,7 +167898,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14432, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -167852,14 +167912,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16853) - rbuCopyPragma(tls, p, ts+16265) + rbuCopyPragma(tls, p, ts+16861) + rbuCopyPragma(tls, p, ts+16273) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32041, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32049, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -167869,7 +167929,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6332, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32057, uintptr(0), uintptr(0), p+64) + db, ts+32065, uintptr(0), uintptr(0), p+64) } } @@ -167904,7 +167964,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -167915,7 +167975,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -167923,13 +167983,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32081, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32089, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -167938,7 +167998,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -167954,12 +168014,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30107, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30115, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -167972,13 +168032,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -167992,7 +168052,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -168004,7 +168064,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32089, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32097, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -168037,13 +168097,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -168076,7 +168136,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168094,7 +168154,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -168103,7 +168163,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168122,19 +168182,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14432 /* "BEGIN" */ + zBegin = ts + 14440 /* "BEGIN" */ } else { - zBegin = ts + 32041 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32049 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32041, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32049, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168201,7 +168261,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -168218,7 +168278,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -168236,7 +168296,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -168258,7 +168318,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -168283,7 +168343,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -168298,7 +168358,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -168330,7 +168390,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -168339,20 +168399,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168416,7 +168476,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168455,7 +168515,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -168469,7 +168529,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -168483,7 +168543,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -168503,7 +168563,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168523,7 +168583,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -168531,7 +168591,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -168539,7 +168599,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168566,7 +168626,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32116, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32124, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -168591,7 +168651,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32139, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32147, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -168602,7 +168662,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168610,7 +168670,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168618,7 +168678,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168651,7 +168711,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168708,13 +168768,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168737,7 +168797,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -168779,7 +168839,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32150, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32158, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -168823,10 +168883,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -168835,7 +168895,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168880,7 +168940,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -168888,7 +168948,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -168898,7 +168958,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -168906,7 +168966,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -168914,7 +168974,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -168923,7 +168983,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -168932,7 +168992,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -168940,7 +169000,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -168948,13 +169008,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -168968,7 +169028,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -169029,17 +169089,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -169122,7 +169182,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -169193,7 +169253,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -169203,16 +169263,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -169226,13 +169286,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -169240,13 +169300,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -169256,13 +169316,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -169275,7 +169335,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -169283,7 +169343,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -169305,7 +169365,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -169393,7 +169453,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -169404,7 +169464,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -169427,14 +169487,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -169444,7 +169504,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -169457,7 +169517,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169523,7 +169583,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169549,7 +169609,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169592,7 +169652,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -169631,7 +169691,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -169670,7 +169730,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -169697,7 +169757,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -169772,7 +169832,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -169860,7 +169920,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -169924,7 +169984,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169941,13 +170001,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11225, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11233, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32161, 0) + ts+32169, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1534, 0) } else { @@ -169960,7 +170020,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32282, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32290, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -170055,7 +170115,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170072,7 +170132,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11225, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -170091,15 +170151,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170115,7 +170175,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170131,21 +170191,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -170259,7 +170319,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -170555,7 +170615,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -170590,7 +170650,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170625,25 +170685,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170663,24 +170723,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -170688,13 +170748,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170710,7 +170770,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170720,9 +170780,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32311, + zRet = Xsqlite3_mprintf(tls, ts+32319, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ if zRet == uintptr(0) { break } @@ -170732,7 +170792,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170745,9 +170805,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32345, + ts+32353, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32386 /* " OR " */ + zSep = ts + 32394 /* " OR " */ if zRet == uintptr(0) { break } @@ -170762,18 +170822,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32391, + ts+32399, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170801,7 +170861,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -170813,7 +170873,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32469, + ts+32477, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -170838,7 +170898,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -170951,7 +171011,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32522, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32530, 0) __16: ; rc = SQLITE_SCHEMA @@ -171011,7 +171071,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -171047,7 +171107,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -171069,7 +171129,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171107,7 +171167,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -171119,7 +171179,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -171170,7 +171230,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -171215,7 +171275,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -171238,7 +171298,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -171249,7 +171309,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -171260,7 +171320,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -171273,7 +171333,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr)) @@ -171287,7 +171347,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171304,7 +171364,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -171325,7 +171385,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171385,7 +171445,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171491,7 +171551,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171548,7 +171608,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -171556,10 +171616,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11225, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32549, libc.VaList(bp, zDb)) + ts+32557, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -171568,18 +171628,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1534 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32659, bp+24) + sessionAppendStr(tls, bp+8, ts+32667, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1547, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+32674, bp+24) + sessionAppendStr(tls, bp+8, ts+32682, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+32682, bp+24) + sessionAppendStr(tls, bp+8, ts+32690, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -171599,7 +171659,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171677,7 +171737,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -171698,7 +171758,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -171720,7 +171780,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32688, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32696, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -171818,7 +171878,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32708, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32716, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -171828,7 +171888,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -171840,7 +171900,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -171848,7 +171908,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -171860,7 +171920,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -171868,7 +171928,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -171880,7 +171940,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -171893,7 +171953,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -171907,12 +171967,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -171938,12 +171998,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -171976,28 +172036,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -172015,7 +172075,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172048,7 +172108,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172073,7 +172133,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -172109,7 +172169,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -172127,7 +172187,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -172152,7 +172212,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -172194,7 +172254,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172213,7 +172273,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -172240,7 +172300,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172282,7 +172342,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172302,7 +172362,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -172337,7 +172397,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -172394,13 +172454,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -172470,7 +172530,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -172501,7 +172561,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172521,14 +172581,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -172542,7 +172602,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -172561,7 +172621,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -172583,7 +172643,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -172607,7 +172667,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -172624,7 +172684,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -172636,7 +172696,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -172653,7 +172713,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -172889,7 +172949,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -172940,7 +173000,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -172955,7 +173015,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -172977,9 +173037,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -173001,9 +173061,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -173011,7 +173071,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173072,7 +173132,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11225) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11233) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -173084,24 +173144,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32726, bp+16) + sessionAppendStr(tls, bp, ts+32734, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32739, bp+16) + sessionAppendStr(tls, bp, ts+32747, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32745, bp+16) + sessionAppendStr(tls, bp, ts+32753, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1534 /* "" */ - sessionAppendStr(tls, bp, ts+32674, bp+16) + sessionAppendStr(tls, bp, ts+32682, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -173109,13 +173169,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32750, bp+16) + ts+32758, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32682, bp+16) + sessionAppendStr(tls, bp, ts+32690, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } @@ -173145,7 +173205,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -173173,7 +173233,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173183,34 +173243,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32825, bp+16) + sessionAppendStr(tls, bp, ts+32833, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32674, bp+16) + sessionAppendStr(tls, bp, ts+32682, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32745, bp+16) + sessionAppendStr(tls, bp, ts+32753, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32843, bp+16) + sessionAppendStr(tls, bp, ts+32851, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32386, bp+16) + sessionAppendStr(tls, bp, ts+32394, bp+16) zSep = ts + 1534 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32682, bp+16) + sessionAppendStr(tls, bp, ts+32690, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32851 /* "AND " */ + zSep = ts + 32859 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4908, bp+16) @@ -173235,7 +173295,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6332, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -173247,7 +173307,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173255,19 +173315,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32856, bp+16) + sessionAppendStr(tls, bp, ts+32864, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21379, bp+16) + sessionAppendStr(tls, bp, ts+21387, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14543, bp+16) + sessionAppendStr(tls, bp, ts+14551, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32874, bp+16) + sessionAppendStr(tls, bp, ts+32882, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32885, bp+16) + sessionAppendStr(tls, bp, ts+32893, bp+16) } sessionAppendStr(tls, bp, ts+4908, bp+16) @@ -173278,7 +173338,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -173286,24 +173346,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11225, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11233, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32889) + ts+32897) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33002) + ts+33010) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -173330,7 +173390,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173351,7 +173411,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -173375,7 +173435,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173419,7 +173479,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173491,7 +173551,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173591,7 +173651,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -173726,7 +173786,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173748,7 +173808,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33146, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33154, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -173764,7 +173824,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33175, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -173773,7 +173833,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -173827,7 +173887,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -173845,10 +173905,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33186, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33194, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33212, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33220, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -173918,20 +173978,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33242, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33250, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33286, + ts+33294, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33357, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33365, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11225) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11233) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -173989,14 +174049,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33417, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33425, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33471, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33479, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -174018,7 +174078,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174036,7 +174096,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174044,7 +174104,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174059,7 +174119,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174067,7 +174127,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174239,7 +174299,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -174370,7 +174430,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -174424,7 +174484,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -174439,7 +174499,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174457,12 +174517,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174479,12 +174539,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -174492,7 +174552,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174516,7 +174576,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174543,7 +174603,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -174584,7 +174644,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -174646,7 +174706,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -174784,7 +174844,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -174799,7 +174859,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174814,7 +174874,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174830,7 +174890,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174846,7 +174906,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -174854,7 +174914,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -174942,7 +175002,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -175004,13 +175064,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -175048,14 +175108,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -175070,7 +175130,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -175081,7 +175141,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -175091,19 +175151,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -175136,7 +175196,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -175147,16 +175207,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -175171,7 +175231,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -175182,7 +175242,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -175199,7 +175259,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -175208,7 +175268,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -175227,7 +175287,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -175238,7 +175298,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -175254,7 +175314,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -175263,7 +175323,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -175275,9 +175335,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -175287,25 +175347,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -175313,17 +175373,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -175428,7 +175488,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -175501,7 +175561,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -175516,23 +175576,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -175569,9 +175629,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -175580,9 +175640,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -175592,7 +175652,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -175611,7 +175671,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -175627,7 +175687,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -175685,7 +175745,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -175693,7 +175753,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -175706,7 +175766,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -175730,7 +175790,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -175754,7 +175814,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -175765,7 +175825,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -175775,7 +175835,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33499, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33507, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -175784,7 +175844,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -175833,7 +175893,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -175866,7 +175926,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -175878,7 +175938,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176088,7 +176148,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176098,14 +176158,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33535, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -176134,7 +176194,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176189,7 +176249,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -176252,7 +176312,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -176303,11 +176363,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -176350,7 +176410,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{}))) @@ -176383,12 +176443,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -176397,7 +176457,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176405,7 +176465,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33558, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33566, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -176413,7 +176473,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176468,7 +176528,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -176479,7 +176539,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33565 /* "wrong number of ..." */ + var zErr uintptr = ts + 33573 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176528,19 +176588,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -176564,7 +176624,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -176593,7 +176653,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176651,7 +176711,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -176660,7 +176720,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -176683,7 +176743,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33615 /* "wrong number of ..." */ + var zErr uintptr = ts + 33623 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176875,17 +176935,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -176896,7 +176956,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176990,7 +177050,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -177058,18 +177118,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33663, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33671, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33679, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33681, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33689, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -177094,7 +177154,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -177109,7 +177169,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -177135,7 +177195,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -177147,21 +177207,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -177179,7 +177239,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -177191,7 +177251,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -177209,7 +177269,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -177225,26 +177285,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177306,14 +177366,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -177325,7 +177385,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -177337,9 +177397,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177356,7 +177416,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -177377,7 +177437,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -177402,7 +177462,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -177427,13 +177487,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177442,7 +177502,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177488,7 +177548,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -177520,18 +177580,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -177544,7 +177604,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -177555,11 +177615,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -177648,7 +177708,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -177693,7 +177753,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -177706,11 +177766,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -177738,13 +177798,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33686, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33694, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -177771,14 +177831,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33693, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33701, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33724, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33732, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177789,7 +177849,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33757, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33765, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177802,7 +177862,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33794, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33802, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -177811,7 +177871,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33811, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -177830,7 +177890,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33836, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33844, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -177845,14 +177905,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33870, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33878, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33878, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33886, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33910, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33918, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -177860,9 +177920,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33916, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33924, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33930, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33938, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -177870,9 +177930,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33968, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33976, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33987, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -177883,25 +177943,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5026, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7905, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17244}, - {FzName: ts + 34014, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17252}, + {FzName: ts + 34022, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34022, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34030, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34053, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34061, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -177919,7 +177979,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -177953,20 +178013,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22014) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16166) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34081, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22022) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16174) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34111) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34119) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34121, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34129, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -177976,7 +178036,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -177984,13 +178044,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34152, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34160, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34157, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34165, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34164, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34172, libc.VaList(bp+16, i)) } } } @@ -178009,7 +178069,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -178038,8 +178098,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22014) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34172, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22022) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34180, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -178073,7 +178133,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34201, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34209, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -178114,19 +178174,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33870 /* "content" */ + zTail = ts + 33878 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34221 /* "docsize" */ + zTail = ts + 34229 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34229, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34237, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16166, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16174, -1) } // Formulate the zContentExprlist text @@ -178142,7 +178202,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -178167,7 +178227,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -178175,18 +178235,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34240, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34248, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1534 } - return ts + 14543 + return ts + 14551 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34256, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34264, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34263, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22014)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34271, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22022)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -178217,7 +178277,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -178231,7 +178291,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -178258,7 +178318,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178322,13 +178382,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34289) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34297) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -178338,7 +178398,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34294) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34302) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -178348,7 +178408,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34311) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -178361,7 +178421,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34313) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34321) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -178371,7 +178431,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34323) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34331) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -178387,7 +178447,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22014) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22022) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -178410,11 +178470,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34335 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34343 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -178437,7 +178497,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34367) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34375) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -178452,7 +178512,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34375, + ts+34383, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -178487,7 +178547,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -178506,9 +178566,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -178520,12 +178580,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178587,7 +178647,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34440, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34448, 0) return FTS5_EOF } } @@ -178600,20 +178660,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34460, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34468, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34491, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34499, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34494, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34502, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29877, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29885, uint64(3)) == 0 { tok = FTS5_AND } break @@ -178625,15 +178685,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -178711,7 +178771,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -178786,7 +178846,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -178798,7 +178858,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -178806,7 +178866,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -178847,7 +178907,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -178869,7 +178929,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -179033,7 +179093,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -179258,11 +179318,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -179270,7 +179330,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -179282,9 +179342,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -179301,7 +179361,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -179503,7 +179563,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -179523,7 +179583,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179550,7 +179610,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179607,7 +179667,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179673,7 +179733,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -179689,7 +179749,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -179698,7 +179758,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179724,7 +179784,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -179743,7 +179803,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -179811,7 +179871,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -179870,7 +179930,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -179889,7 +179949,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -179907,7 +179967,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -179923,7 +179983,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -179949,7 +180009,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -179999,7 +180059,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -180011,7 +180071,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -180041,7 +180101,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -180057,7 +180117,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -180110,7 +180170,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -180172,7 +180232,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -180204,7 +180264,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -180220,15 +180280,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180238,7 +180298,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -180263,7 +180323,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -180275,7 +180335,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -180335,12 +180395,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180409,12 +180469,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -180425,12 +180485,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -180447,7 +180507,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180505,7 +180565,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180600,17 +180660,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34498, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34506, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33535, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180622,7 +180682,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34503, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34511, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -180641,7 +180701,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -180679,7 +180739,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -180701,7 +180761,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180719,7 +180779,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20376, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20384, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -180740,7 +180800,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -180755,7 +180815,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -180779,7 +180839,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -180807,21 +180867,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34532, 0) + ts+34540, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -180872,7 +180932,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte)) @@ -180892,7 +180952,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -180935,7 +180995,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180995,12 +181055,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34585, + ts+34593, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34635 /* "phrase" */ + return ts + 34643 /* "phrase" */ } - return ts + 34498 /* "NEAR" */ + return ts + 34506 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -181023,7 +181083,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -181069,7 +181129,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -181082,7 +181142,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -181092,7 +181152,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -181101,7 +181161,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -181122,7 +181182,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -181146,12 +181206,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -181161,7 +181221,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -181196,7 +181256,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -181224,7 +181284,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -181235,7 +181295,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -181285,12 +181345,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -181341,7 +181401,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -181357,14 +181417,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -181392,7 +181452,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -181401,7 +181461,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -181415,7 +181475,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181424,7 +181484,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181435,7 +181495,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -181465,7 +181525,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -181514,7 +181574,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -181673,7 +181733,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181719,7 +181779,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -181761,7 +181821,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -181795,20 +181855,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -182034,7 +182094,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -182242,14 +182302,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -182257,17 +182317,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -182281,18 +182341,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -182314,18 +182374,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -182342,9 +182402,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -182352,38 +182412,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -182391,7 +182451,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -182409,7 +182469,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -182433,7 +182493,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182444,7 +182504,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -182456,7 +182516,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -182483,7 +182543,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34642, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34650, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -182529,11 +182589,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -182545,7 +182605,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -182560,7 +182620,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182571,7 +182631,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+34648, + ts+34656, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -182588,7 +182648,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182599,7 +182659,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34699, + ts+34707, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -182613,7 +182673,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182623,7 +182683,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+34748, + ts+34756, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -182635,7 +182695,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -182646,22 +182706,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -182672,7 +182732,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -182714,7 +182774,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182807,7 +182867,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -182827,7 +182887,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -182850,7 +182910,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182878,7 +182938,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182887,7 +182947,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+34788, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34796, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -182911,7 +182971,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -182928,7 +182988,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -182942,7 +183002,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182995,14 +183055,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -183045,7 +183105,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -183094,7 +183154,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183130,7 +183190,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -183151,7 +183211,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -183164,7 +183224,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -183172,11 +183232,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -183197,7 +183257,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183259,7 +183319,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -183282,12 +183342,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -183297,7 +183357,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -183339,16 +183399,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -183378,7 +183438,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183407,7 +183467,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183452,7 +183512,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -183484,7 +183544,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183518,7 +183578,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -183540,7 +183600,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -183581,7 +183641,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183640,7 +183700,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -183690,7 +183750,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -183698,7 +183758,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183727,7 +183787,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -183832,7 +183892,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -183957,7 +184017,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -184057,7 +184117,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -184085,7 +184145,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -184319,7 +184379,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184327,7 +184387,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+34811, + ts+34819, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -184338,7 +184398,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -184408,7 +184468,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -184464,7 +184524,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -184479,7 +184539,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -184531,7 +184591,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -184561,7 +184621,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -184611,7 +184671,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -184622,7 +184682,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -184645,7 +184705,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -184685,7 +184745,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -184696,7 +184756,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184735,7 +184795,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184760,12 +184820,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -184784,7 +184844,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -184801,21 +184861,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -184825,7 +184885,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184851,7 +184911,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184931,7 +184991,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -184987,7 +185047,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -185038,7 +185098,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185099,7 +185159,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185107,7 +185167,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185127,7 +185187,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -185135,7 +185195,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185151,7 +185211,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -185213,7 +185273,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185235,7 +185295,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -185280,7 +185340,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -185483,7 +185543,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -185516,7 +185576,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -185524,13 +185584,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -185549,7 +185609,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -185562,7 +185622,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -185604,7 +185664,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -185617,7 +185677,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -185627,7 +185687,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -185648,7 +185708,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) @@ -185667,7 +185727,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -185689,7 +185749,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -185722,7 +185782,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -185732,7 +185792,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -185745,7 +185805,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185761,7 +185821,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -185821,7 +185881,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -185857,14 +185917,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -185940,7 +186000,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -185969,7 +186029,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185998,7 +186058,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -186022,7 +186082,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186043,7 +186103,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+34895, + ts+34903, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -186062,7 +186122,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186131,13 +186191,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -186296,7 +186356,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186346,7 +186406,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -186363,7 +186423,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186380,7 +186440,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -186389,14 +186449,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186421,7 +186481,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -186599,7 +186659,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -186608,7 +186668,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -186669,7 +186729,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186703,7 +186763,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186728,12 +186788,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -186760,7 +186820,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186792,7 +186852,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -186802,13 +186862,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186825,7 +186885,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -186881,11 +186941,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -186896,7 +186956,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -186909,7 +186969,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -187074,7 +187134,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -187221,7 +187281,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -187241,7 +187301,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -187252,7 +187312,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -187263,7 +187323,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187282,7 +187342,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187293,13 +187353,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34952, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34960, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24870, ts+34960, 0, pzErr) + pConfig, ts+24878, ts+34968, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11365, - ts+34995, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11373, + ts+35003, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -187316,7 +187376,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -187337,7 +187397,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -187364,7 +187424,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -187386,7 +187446,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -187410,7 +187470,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187493,7 +187553,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -187501,7 +187561,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187521,14 +187581,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187546,7 +187606,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187559,7 +187619,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -187581,7 +187641,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -187589,7 +187649,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -187598,7 +187658,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187611,7 +187671,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34642, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34650, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -187620,7 +187680,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -187634,7 +187694,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -187654,7 +187714,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -187673,7 +187733,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187732,7 +187792,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187748,7 +187808,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35039, + ts+35047, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -187901,7 +187961,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187960,7 +188020,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35125) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35133) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -187991,13 +188051,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -188030,7 +188090,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -188052,7 +188112,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -188060,9 +188120,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -188091,35 +188151,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -188153,21 +188213,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -188177,13 +188237,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -188201,7 +188261,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188259,11 +188319,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -188272,14 +188332,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -188350,7 +188410,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188371,7 +188431,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR } @@ -188512,7 +188572,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -188523,7 +188583,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -188549,7 +188609,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -188562,11 +188622,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -188609,7 +188669,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -188626,7 +188686,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188636,7 +188696,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -188670,7 +188730,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -188690,7 +188750,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -188719,7 +188779,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188778,7 +188838,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188806,7 +188866,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -188835,11 +188895,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35169, + ts+35177, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14543 /* ", " */ + return ts + 14551 /* ", " */ } return ts + 1534 /* "" */ }(), @@ -188851,9 +188911,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35224 /* "DESC" */ + return ts + 35232 /* "DESC" */ } - return ts + 35229 /* "ASC" */ + return ts + 35237 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -188873,7 +188933,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -188888,7 +188948,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188904,13 +188964,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35233, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35241, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5008, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35239, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35247, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -188920,7 +188980,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -188933,7 +188993,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -188945,7 +189005,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35267, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35275, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -188977,7 +189037,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35277, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35285, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -188986,7 +189046,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -189009,21 +189069,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35298, libc.VaList(bp, z)) + ts+35306, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33681 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33689 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -189042,7 +189102,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189082,7 +189142,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR __1: ; @@ -189317,7 +189377,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35331, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35339, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -189363,7 +189423,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -189374,7 +189434,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -189388,7 +189448,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -189418,7 +189478,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189462,7 +189522,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -189484,7 +189544,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189492,29 +189552,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35367, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35375, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35378, 0) + ts+35386, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35458, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35466, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35466, 0) + ts+35474, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16833, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16841, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35522, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35530, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35528, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -189533,7 +189593,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -189543,7 +189603,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -189566,7 +189626,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189588,7 +189648,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17378, z) { + 0 == Xsqlite3_stricmp(tls, ts+17386, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -189613,12 +189673,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35544, + ts+35552, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ } - return ts + 35581 /* "DELETE from" */ + return ts + 35589 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -189668,7 +189728,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -189680,7 +189740,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -189689,7 +189749,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -189697,7 +189757,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -189705,46 +189765,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -189761,7 +189821,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -189818,7 +189878,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189902,7 +189962,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -189912,7 +189972,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -189928,11 +189988,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -189944,7 +190004,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -190002,7 +190062,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190040,7 +190100,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -190062,7 +190122,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190084,7 +190144,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190107,7 +190167,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190140,7 +190200,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190221,10 +190281,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190260,7 +190320,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -190269,7 +190329,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -190279,7 +190339,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190292,7 +190352,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35593, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35601, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -190302,7 +190362,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -190324,7 +190384,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -190388,7 +190448,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -190428,7 +190488,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -190447,12 +190507,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -190460,7 +190520,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190469,7 +190529,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190478,7 +190538,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -190487,7 +190547,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -190518,7 +190578,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -190547,7 +190607,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -190565,7 +190625,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -190581,7 +190641,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190597,7 +190657,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35614, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35622, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -190616,7 +190676,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35636, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35644, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -190632,7 +190692,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -190658,28 +190718,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35667) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35675) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35680, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35688, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -190690,10 +190750,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35771, ts + 33870, ts + 24870, ts + 34221, ts + 11365, -} /* sqlite3.c:234311:21 */ + ts + 35779, ts + 33878, ts + 24878, ts + 34229, ts + 11373, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -190714,7 +190774,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35778, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35786, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -190732,13 +190792,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35778, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35786, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35783, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35791, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -190776,7 +190836,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -190785,7 +190845,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -190793,7 +190853,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -190804,20 +190864,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35798, - ts + 35866, - ts + 35935, + ts + 35806, + ts + 35874, + ts + 35943, - ts + 35968, - ts + 36007, - ts + 36047, - ts + 36086, - ts + 36127, + ts + 35976, + ts + 36015, + ts + 36055, + ts + 36094, + ts + 36135, - ts + 36166, + ts + 36174, - ts + 36208, - ts + 36248, + ts + 36216, + ts + 36256, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -190894,7 +190954,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -190916,79 +190976,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36271, + ts+36279, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36375, + ts+36383, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36413, + ts+36421, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36451, + ts+36459, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24870, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11365, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35771, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24878, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11373, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35779, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34221, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34229, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33870, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33878, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36493, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36501, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36523, + ts+36531, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -191001,7 +191061,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191030,27 +191090,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36567, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36575, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36590, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36598, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33870, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33878, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34221, ts+36596, 0, pzErr) + pConfig, ts+34229, ts+36604, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35771, ts+36628, 1, pzErr) + pConfig, ts+35779, ts+36636, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -191062,7 +191122,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -191081,12 +191141,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -191103,7 +191163,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -191172,7 +191232,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191199,7 +191259,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -191213,7 +191273,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -191237,7 +191297,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191278,7 +191338,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -191290,12 +191350,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36645, + ts+36653, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36695, + ts+36703, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -191305,12 +191365,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -191374,15 +191434,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -191393,7 +191453,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191415,7 +191475,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191447,7 +191507,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -191492,7 +191552,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -191500,7 +191560,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36724, + zSql = Xsqlite3_mprintf(tls, ts+36732, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -191527,13 +191587,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191599,7 +191659,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -191697,14 +191757,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33870, bp+48) + rc = fts5StorageCount(tls, p, ts+33878, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34221, bp+56) + rc = fts5StorageCount(tls, p, ts+34229, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -191724,7 +191784,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -191738,7 +191798,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -191748,7 +191808,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -191766,7 +191826,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191797,7 +191857,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -191815,7 +191875,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -191832,7 +191892,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -191846,12 +191906,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191906,13 +191966,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -191922,12 +191982,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -191943,9 +192003,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36756) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36764) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36775) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -191962,7 +192022,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -191974,7 +192034,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -192055,7 +192115,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -192065,11 +192125,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -192124,7 +192184,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -192146,7 +192206,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -192156,7 +192216,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -192176,7 +192236,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -192187,7 +192247,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36778 /* "L* N* Co" */ + var zCat uintptr = ts + 36786 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -192200,7 +192260,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36787) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36795) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -192211,18 +192271,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36798) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36806) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36756) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36764) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36775) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36787) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36795) { // no-op } else { rc = SQLITE_ERROR @@ -192244,12 +192304,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -192505,7 +192565,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -192514,10 +192574,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -192528,7 +192588,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192536,7 +192596,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36816 /* "unicode61" */ + var zBase uintptr = ts + 36824 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -192581,9 +192641,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -192593,15 +192653,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -192622,12 +192682,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -192637,7 +192697,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -192647,7 +192707,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -192665,14 +192725,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -192687,13 +192747,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36826, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192701,11 +192761,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36829, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36837, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192713,7 +192773,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36839, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192721,7 +192781,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192729,11 +192789,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36845, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192741,19 +192801,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36855, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36867, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36865, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36870, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192761,11 +192821,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192773,7 +192833,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36881, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192781,11 +192841,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36885, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192793,22 +192853,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36901, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -192816,34 +192860,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36909, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36885, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36913, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36908, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36911, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36901, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36923, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -192853,143 +192913,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36934, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36933, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36941, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36938, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36829, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36837, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36901, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36953, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36961, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15379, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15387, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36958, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36970, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36870, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36878, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36973, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36977, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36985, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36901, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36985, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37001, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37012, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36897, uint64(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37026, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36905, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37030, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37034, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37046, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36897, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36905, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -192999,22 +193059,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37057, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37062, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37070, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -193022,21 +193082,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37067, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37073, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37034, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193044,7 +193104,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -193052,9 +193112,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37085, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -193064,18 +193124,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37091, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37095, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37103, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37098, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -193084,7 +193144,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37101, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -193101,7 +193161,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -193117,7 +193177,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193215,7 +193275,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -193236,20 +193296,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -193260,7 +193320,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37105) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37113) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -193280,7 +193340,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -193433,7 +193493,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -193447,27 +193507,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36816, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36824, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37120, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37128, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37126, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37133, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -193493,7 +193553,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -193516,7 +193576,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -193587,7 +193647,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -193606,7 +193666,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -193667,7 +193727,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -193725,7 +193785,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -193737,9 +193797,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -193936,7 +193996,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -194115,7 +194175,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -194294,9 +194354,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -194336,7 +194396,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -194368,7 +194428,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194443,7 +194503,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -194619,7 +194679,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -194665,7 +194725,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -194678,7 +194738,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -194738,7 +194798,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -194778,7 +194838,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -194799,9 +194859,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -194809,7 +194869,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -194817,14 +194877,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37141) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37145) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37153) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37157) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37158, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37166, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -194834,14 +194894,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -194866,24 +194926,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 37192, - ts + 37232, - ts + 37267, + ts + 37200, + ts + 37240, + ts + 37275, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23166, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23174, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37310, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37318, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -194936,11 +194996,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -194954,7 +195014,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -195022,7 +195082,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -195035,11 +195095,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37343, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37351, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37374, + ts+37382, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -195063,7 +195123,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37425, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37433, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -195089,7 +195149,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -195103,7 +195163,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -195112,7 +195172,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195143,7 +195203,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -195172,7 +195232,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -195316,7 +195376,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -195390,12 +195450,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -195468,16 +195528,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37451, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37459, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -195494,7 +195554,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -195521,966 +195581,966 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37461 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37469 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off64_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, X__mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 584 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr - }{libc.Xmremap})) // sqlite3.c:35283:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmremap})) // sqlite3.c:35292:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go index 9f68d246..e28cdcba 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -2115,7 +2115,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2223,8 +2223,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3710,7 +3710,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5509,7 +5509,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -5533,7 +5533,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 FaConstraint uintptr @@ -5550,12 +5550,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad2 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 FxCreate uintptr @@ -5583,7 +5583,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5691,7 +5691,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5797,7 +5797,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5903,7 +5903,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -5978,7 +5978,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -6043,7 +6043,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6068,7 +6068,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6084,7 +6084,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -6107,7 +6107,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6280,7 +6280,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6439,7 +6439,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6456,12 +6456,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6494,7 +6494,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6514,7 +6514,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6534,7 +6534,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6577,7 +6577,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6614,7 +6614,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -6633,13 +6633,13 @@ type sqlite3_rtree_query_info = struct { FrScore Sqlite3_rtree_dbl FapSqlParam uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6669,7 +6669,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6682,7 +6682,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -6702,13 +6702,13 @@ type sqlite3_changeset_iter = struct { FbIndirect int32 FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6718,13 +6718,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6926,7 +6926,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7128,7 +7128,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7181,7 +7181,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7213,22 +7213,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7247,7 +7247,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7261,7 +7261,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7882,7 +7882,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7890,7 +7890,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -9705,13 +9705,13 @@ type Max_align_t = struct { // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -9722,7 +9722,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -9745,12 +9745,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U32 /* sqlite3.c:14287:15 */ +type Uptr = U32 /* sqlite3.c:14291:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -9772,7 +9772,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -9914,13 +9914,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -9928,7 +9928,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -9939,7 +9939,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -9949,7 +9949,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -9963,7 +9963,7 @@ type Column1 = struct { F__ccgo_pad3 [2]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -9974,7 +9974,7 @@ type Cte1 = struct { F__ccgo_pad1 [3]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -9985,7 +9985,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -9995,7 +9995,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -10005,9 +10005,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -10022,7 +10022,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr uint8 @@ -10045,7 +10045,7 @@ type Expr1 = struct { } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -10066,7 +10066,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -10082,16 +10082,16 @@ type FKey1 = struct { FiFrom int32 FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -10106,16 +10106,16 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -10146,7 +10146,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -10155,7 +10155,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -10168,7 +10168,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -10186,10 +10186,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -10199,7 +10199,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -10209,9 +10209,9 @@ type NameContext1 = struct { FnNcErr int32 FncFlags int32 FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -10286,14 +10286,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -10312,21 +10312,21 @@ type PreUpdate1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -10335,9 +10335,9 @@ type Returning1 = struct { FiRetCur int32 FnRetCol int32 FiRetReg int32 -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -10348,9 +10348,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr F__ccgo_pad1 [4]byte @@ -10360,7 +10360,7 @@ type Savepoint1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -10384,14 +10384,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -10401,9 +10401,9 @@ type SelectDest1 = struct { FnSdst int32 FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -10429,15 +10429,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -10466,7 +10466,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -10475,13 +10475,13 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -10497,7 +10497,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -10506,7 +10506,7 @@ type TriggerPrg1 = struct { FaColmask [2]U32 } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -10524,7 +10524,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -10537,7 +10537,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -10554,7 +10554,7 @@ type Upsert1 = struct { FiIdxCur int32 } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -10567,7 +10567,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -10575,7 +10575,7 @@ type VtabCtx1 = struct { FbDeclared int32 } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -10585,9 +10585,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -10616,9 +10616,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -10652,7 +10652,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -10660,14 +10660,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -10678,7 +10678,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -10705,7 +10705,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -10778,7 +10778,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -10796,7 +10796,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -10867,7 +10867,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -10894,7 +10894,7 @@ type BtCursor1 = struct { F__ccgo_pad3 [4]byte } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -10930,7 +10930,7 @@ type BtShared1 = struct { FnPreformatSize int32 } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr F__ccgo_pad1 [4]byte @@ -10942,9 +10942,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -11049,11 +11049,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -11064,7 +11064,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -11084,7 +11084,7 @@ type VdbeOp1 = struct { // as an instance of the following structure: type p4union = struct{ Fi int32 } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -11093,11 +11093,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -11162,7 +11162,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -11180,10 +11180,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -11258,7 +11258,7 @@ type sqlite3InitInfo = struct { type sColMap = struct { FiFrom int32 FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -11307,7 +11307,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -11399,7 +11399,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -11411,7 +11411,7 @@ type InitData = struct { FmInitFlags U32 FnInitRow U32 FmxPage Pgno -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -11473,7 +11473,7 @@ type Sqlite3Config = struct { FiOnceResetThreshold int32 FszSorterRef U32 FiPrngSeed uint32 -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11497,7 +11497,7 @@ type RefSrcList = struct { FnExclude I64 FaiExclude uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11518,7 +11518,7 @@ type RefSrcList = struct { type IdxCover = struct { FpIdx uintptr FiCur int32 -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11544,7 +11544,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11568,7 +11568,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11593,7 +11593,7 @@ type WhereConst1 = struct { FnChng int32 FbHasAffBlob int32 FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11617,7 +11617,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -11745,9 +11745,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1039, ts + 1053, ts + 1066, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint32(unsafe.Sizeof(sqlite3azCompileOpt)) / uint32(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -11814,10 +11814,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -11881,7 +11881,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -11941,12 +11941,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -11964,21 +11964,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -11994,7 +11994,7 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:219 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), uint8(SQLITE_AFF_BLOB), @@ -12002,7 +12002,7 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_INTEGER), uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]uint8{ uint8(0), uint8(SQLITE_BLOB), @@ -12010,7 +12010,7 @@ var Xsqlite3StdTypeMap = [6]uint8{ uint8(SQLITE_INTEGER), uint8(SQLITE_FLOAT), uint8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1086, ts + 1090, @@ -12018,7 +12018,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1099, ts + 1107, ts + 1112, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -12063,10 +12063,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -12089,10 +12089,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -12104,7 +12104,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -12156,7 +12156,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -12222,7 +12222,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -12236,7 +12236,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -12248,13 +12248,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [2]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12265,7 +12265,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]uint8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12273,7 +12273,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12288,7 +12288,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12300,20 +12300,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = U32 /* sqlite3.c:22681:13 */ +type Sqlite3StatValueType = U32 /* sqlite3.c:22690:13 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -12328,7 +12328,7 @@ var statMutex = [10]uint8{ uint8(1), // SQLITE_STATUS_PAGECACHE_SIZE uint8(0), // SQLITE_STATUS_SCRATCH_SIZE uint8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -12338,7 +12338,7 @@ var statMutex = [10]uint8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return Sqlite3_int64(*(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4))) } @@ -12352,7 +12352,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 40 + uintptr(op)*4)) { @@ -12360,14 +12360,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -12378,12 +12378,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -12401,7 +12401,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -12417,7 +12417,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -12427,7 +12427,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -12439,7 +12439,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -13021,14 +13021,14 @@ type DateTime1 = struct { FtzSet uint8 FisError uint8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -13055,7 +13055,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -13112,7 +13112,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -13128,7 +13128,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -13202,7 +13202,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13255,7 +13255,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = uint8(1) } @@ -13264,7 +13264,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -13320,7 +13320,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13371,7 +13371,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) @@ -13386,7 +13386,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(1) if r >= 0.0 && r < 5373484.5 { @@ -13409,7 +13409,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13438,12 +13438,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -13488,7 +13488,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -13507,13 +13507,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -13543,7 +13543,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -13568,7 +13568,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -13608,7 +13608,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) @@ -13636,7 +13636,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -13660,7 +13660,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -13986,7 +13986,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -14027,7 +14027,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14043,7 +14043,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14058,7 +14058,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -14107,7 +14107,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14135,7 +14135,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14187,7 +14187,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -14331,7 +14331,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -14340,7 +14340,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -14349,7 +14349,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -14358,7 +14358,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint32(unsafe.Sizeof(aDateTimeFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } @@ -14371,7 +14371,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1343}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1352}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1365}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -14423,7 +14423,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -14432,27 +14432,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -14462,27 +14462,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -14495,7 +14495,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -14504,7 +14504,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14512,7 +14512,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -14524,7 +14524,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -14533,23 +14533,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -14557,14 +14557,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -14572,7 +14572,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -14586,7 +14586,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -14596,14 +14596,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*uint8)(unsafe.Pointer(zPathOut)) = uint8(0) return (*struct { @@ -14611,7 +14611,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -14619,25 +14619,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint32(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -14654,13 +14654,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14669,7 +14669,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14694,7 +14694,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -14714,7 +14714,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -14724,7 +14724,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -14734,11 +14734,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -14760,7 +14760,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -14780,7 +14780,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14803,7 +14803,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14848,7 +14848,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -14879,8 +14879,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -14890,7 +14890,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -14899,14 +14899,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -15004,7 +15004,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15027,7 +15027,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -15036,7 +15036,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -15052,7 +15052,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15074,18 +15074,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -15094,7 +15094,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15109,7 +15109,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -15243,7 +15243,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -15277,7 +15277,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -15287,7 +15287,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15300,7 +15300,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -15311,7 +15311,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -15320,7 +15320,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -15329,7 +15329,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -15344,7 +15344,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -15383,40 +15383,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -15429,11 +15429,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -15496,7 +15496,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -15510,22 +15510,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -15541,7 +15541,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -15569,7 +15569,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -15586,7 +15586,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -15605,7 +15605,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -15628,12 +15628,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+24, 0) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -15641,7 +15641,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15656,7 +15656,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15669,7 +15669,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -15680,7 +15680,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -15727,7 +15727,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -15756,7 +15756,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15766,7 +15766,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15774,27 +15774,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -15813,7 +15813,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -15824,7 +15824,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -15842,14 +15842,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -15875,7 +15875,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -15883,7 +15883,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -15944,7 +15944,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15954,7 +15954,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15962,7 +15962,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -15972,7 +15972,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -15984,7 +15984,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -16015,7 +16015,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16025,7 +16025,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -16063,7 +16063,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16083,7 +16083,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -16107,7 +16107,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -16121,7 +16121,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -16135,7 +16135,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -16153,7 +16153,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -16166,7 +16166,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -16182,7 +16182,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -16203,7 +16203,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+312, int32(0), 0) @@ -16219,7 +16219,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -16238,7 +16238,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -16267,7 +16267,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -16278,18 +16278,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: uint8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: uint8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -16316,7 +16316,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: uint8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: uint8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: uint8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -16327,7 +16327,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -16342,7 +16342,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -16357,7 +16357,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:2 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -16369,21 +16369,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -16397,7 +16397,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -16419,7 +16419,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -17908,7 +17908,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29902:29 */ // End of function @@ -17916,7 +17916,7 @@ var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -17943,7 +17943,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 36)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -17958,7 +17958,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -18012,7 +18012,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -18028,7 +18028,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sq // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint32(N)) @@ -18038,7 +18038,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -18050,14 +18050,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -18071,7 +18071,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*uint8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = uint8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -18083,7 +18083,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -18101,10 +18101,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -18116,7 +18116,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -18124,7 +18124,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -18132,7 +18132,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -18141,7 +18141,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 21)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -18163,7 +18163,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -18174,7 +18174,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -18192,7 +18192,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -18214,7 +18214,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -18226,7 +18226,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -18246,7 +18246,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -18270,7 +18270,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -18285,7 +18285,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -18307,7 +18307,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(234) defer tls.Free(234) @@ -18325,7 +18325,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -18337,7 +18337,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -18392,7 +18392,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -18436,10 +18436,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -18518,16 +18518,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint32(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -18535,7 +18535,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -18557,7 +18557,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -18626,7 +18626,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -18653,7 +18653,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -18680,7 +18680,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -19005,7 +19005,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -19039,7 +19039,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -19071,7 +19071,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -19092,7 +19092,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -19493,7 +19493,7 @@ type Double_t = float64 /* math.h:150:16 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -19505,7 +19505,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19525,7 +19525,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -19537,7 +19537,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4)) != 0 { @@ -19552,7 +19552,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -19562,7 +19562,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -19574,7 +19574,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -19585,7 +19585,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -19605,7 +19605,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -19632,7 +19632,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -19663,7 +19663,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -19688,7 +19688,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote uint8 var i int32 var j int32 @@ -19720,7 +19720,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*uint8)(unsafe.Pointer(z + uintptr(j))) = uint8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -19740,7 +19740,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -19758,7 +19758,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -19773,7 +19773,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -19785,7 +19785,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -19811,7 +19811,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -19835,7 +19835,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -19851,7 +19851,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -19894,7 +19894,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -20274,7 +20274,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -20315,7 +20315,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -20344,7 +20344,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -20466,7 +20466,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20499,7 +20499,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20561,7 +20561,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20574,7 +20574,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -20617,7 +20617,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -20663,7 +20663,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -20686,7 +20686,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -20839,7 +20839,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20907,7 +20907,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -20915,7 +20915,7 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20925,7 +20925,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20936,7 +20936,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -20946,7 +20946,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -20964,7 +20964,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20985,7 +20985,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1535) @@ -21004,7 +21004,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -21021,21 +21021,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023: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:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043: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:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -21049,7 +21049,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -21080,11 +21080,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -21102,11 +21102,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -21127,7 +21127,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -21179,7 +21179,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -21218,7 +21218,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21237,7 +21237,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21276,7 +21276,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -21287,7 +21287,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -21304,7 +21304,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -21319,7 +21319,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -21356,7 +21356,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -21400,7 +21400,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -21429,11 +21429,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -21462,7 +21462,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -21480,7 +21480,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -21529,7 +21529,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -21719,7 +21719,7 @@ var azName = [185]uintptr{ ts + 3189, ts + 3194, ts + 3202, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -23338,7 +23338,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -23371,7 +23371,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -23385,10 +23385,10 @@ type unixShmNode = struct { FnRef int32 FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -23406,18 +23406,18 @@ type unixInodeInfo = struct { FpNext uintptr FpPrev uintptr F__ccgo_pad2 [4]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -23443,16 +23443,16 @@ type unixFile = struct { FsectorSize int32 FdeviceCharacteristics int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -23477,7 +23477,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -23492,7 +23492,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -23560,14 +23560,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3410, FpCurrent: 0}, {FzName: ts + 3416}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*12 + 4)))(tls) != 0 { return 0 } @@ -23578,7 +23578,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -23615,7 +23615,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -23631,7 +23631,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -23669,7 +23669,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -23736,14 +23736,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -23753,7 +23753,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*12 + 4)))(tls, h, sz) @@ -23769,7 +23769,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -23818,7 +23818,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -23919,12 +23919,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -23942,7 +23942,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -23976,7 +23976,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3217, func() uintptr { @@ -23990,19 +23990,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -24012,7 +24012,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -24046,7 +24046,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -24105,7 +24105,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -24122,7 +24122,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -24158,7 +24158,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24224,7 +24224,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -24276,7 +24276,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24523,7 +24523,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -24544,7 +24544,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24678,7 +24678,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -24691,11 +24691,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -24705,7 +24705,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -24755,26 +24755,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -24815,7 +24815,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -24851,7 +24851,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -24893,7 +24893,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -24928,7 +24928,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -25027,7 +25027,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -25065,7 +25065,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -25120,7 +25120,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -25146,13 +25146,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+20) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -25209,7 +25209,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -25255,7 +25255,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -25282,7 +25282,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3329, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3329, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -25298,7 +25298,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25317,7 +25317,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -25329,7 +25329,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -25340,7 +25340,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -25355,7 +25355,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -25371,7 +25371,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -25402,7 +25402,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -25447,7 +25447,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -25462,7 +25462,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -25473,7 +25473,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25584,7 +25584,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -25605,7 +25605,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -25622,7 +25622,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -25632,7 +25632,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -25644,7 +25644,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25676,7 +25676,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25717,7 +25717,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*12 + 4)))(tls) // System page size // Page size must be a power of 2 @@ -25731,7 +25731,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -25748,7 +25748,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -25763,7 +25763,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25807,7 +25807,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -25854,7 +25854,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -25950,7 +25950,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3212, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3212, zShm, 39446) goto shm_open_err __10: ; @@ -26018,7 +26018,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -26121,7 +26121,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39590) goto shmpage_out __14: ; @@ -26169,7 +26169,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -26227,7 +26227,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -26241,7 +26241,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -26348,7 +26348,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -26361,7 +26361,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -26404,7 +26404,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint32((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -26427,7 +26427,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3370 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -26461,7 +26461,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -26486,7 +26486,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -26523,7 +26523,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -26550,7 +26550,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -26611,33 +26611,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -26650,7 +26650,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -26660,7 +26660,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26717,7 +26717,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -26740,7 +26740,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -26758,17 +26758,17 @@ var azTempDirs = [6]uintptr{ ts + 3680, ts + 3689, ts + 1547, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3694) azTempDirs[1] = libc.Xgetenv(tls, ts+3708) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -26795,7 +26795,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -26839,7 +26839,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -26890,7 +26890,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -26926,7 +26926,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -27000,7 +27000,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(528) defer tls.Free(528) @@ -27198,7 +27198,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3212, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3212, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -27298,7 +27298,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27309,7 +27309,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41141) } return rc } @@ -27319,9 +27319,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -27338,7 +27338,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -27360,7 +27360,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -27383,7 +27383,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -27394,7 +27394,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, zOut, uint32(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3230, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3230, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = uint8('/') @@ -27403,7 +27403,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*uint8)(unsafe.Pointer(zOut + uintptr(iOff))) = uint8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3614, libc.VaList(bp, zPath)) @@ -27454,7 +27454,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -27480,7 +27480,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*12 + 4)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3410, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3410, zIn, 41322) } } else { bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000)) @@ -27494,20 +27494,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, zDel, uint32(nOut-1)) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3401, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3401, zIn, 41340) } else { if int32(*(*uint8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint32(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint32(n)) @@ -27577,7 +27577,7 @@ type Dl_serinfo = struct { } } /* dlfcn.h:196:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -27587,7 +27587,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27601,7 +27601,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -27627,13 +27627,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27668,7 +27668,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { got = (*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*12 + 4)))(tls, fd, zBuf, uint32(nBuf)) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -27681,7 +27681,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -27704,7 +27704,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27718,12 +27718,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27739,7 +27739,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -27921,7 +27921,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -27959,14 +27959,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3763, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3773, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3653, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -28008,14 +28008,14 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -28028,9 +28028,9 @@ type MemStore1 = struct { FnWrLock int32 FnRef int32 FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -28039,13 +28039,13 @@ type MemStore = MemStore1 /* sqlite3.c:49088:25 */ type MemFS = struct { FnMemStore int32 FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -28062,7 +28062,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -28078,21 +28078,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -28130,7 +28130,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -28147,7 +28147,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -28169,7 +28169,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -28200,7 +28200,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -28215,14 +28215,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -28231,7 +28231,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -28275,7 +28275,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28304,13 +28304,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -28324,7 +28324,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -28335,7 +28335,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -28410,7 +28410,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -28421,7 +28421,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28431,7 +28431,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -28440,21 +28440,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -28462,7 +28462,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -28470,19 +28470,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -28490,7 +28490,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -28513,7 +28513,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28604,7 +28604,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -28699,7 +28699,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -28721,7 +28721,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -28734,7 +28734,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -28763,7 +28763,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -28777,7 +28777,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -28914,7 +28914,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -28953,7 +28953,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -28968,7 +28968,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -29005,7 +29005,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -29168,7 +29168,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -29230,7 +29230,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -29242,7 +29242,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -29267,7 +29267,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -29280,7 +29280,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -29288,7 +29288,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -29302,7 +29302,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -29319,7 +29319,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -29366,7 +29366,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -29394,7 +29394,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -29445,7 +29445,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29465,7 +29465,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29481,7 +29481,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -29494,7 +29494,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -29503,7 +29503,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -29516,7 +29516,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -29531,7 +29531,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -29543,7 +29543,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -29552,7 +29552,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -29562,7 +29562,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -29571,7 +29571,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -29590,7 +29590,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -29624,19 +29624,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -29675,7 +29675,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -29718,7 +29718,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -29730,17 +29730,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -29748,7 +29748,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -29760,7 +29760,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -29777,20 +29777,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint32(unsafe.Sizeof(PgHdr{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -29905,7 +29905,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -29991,7 +29991,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -30001,12 +30001,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -30014,9 +30014,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -30033,10 +30033,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -30054,7 +30054,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -30087,7 +30087,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -30132,7 +30132,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -30165,7 +30165,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -30195,7 +30195,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -30209,7 +30209,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -30247,7 +30247,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -30264,13 +30264,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -30288,7 +30288,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -30304,7 +30304,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -30345,7 +30345,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -30362,7 +30362,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -30380,7 +30380,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -30401,7 +30401,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -30449,7 +30449,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -30487,7 +30487,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -30496,7 +30496,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -30546,7 +30546,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -30569,7 +30569,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30584,7 +30584,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -30599,7 +30599,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -30717,7 +30717,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -30746,7 +30746,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -30757,7 +30757,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -30771,7 +30771,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30796,7 +30796,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -30827,7 +30827,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -30840,7 +30840,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30863,7 +30863,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30883,16 +30883,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint32(unsafe.Sizeof(PgHdr1{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -30903,7 +30903,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -31001,7 +31001,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -31015,13 +31015,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -31041,7 +31041,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -31060,7 +31060,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -31071,7 +31071,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -31094,7 +31094,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -31124,7 +31124,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -31159,7 +31159,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -31195,7 +31195,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -31226,7 +31226,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -31257,7 +31257,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -31290,7 +31290,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -31323,7 +31323,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31506,7 +31506,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -32274,7 +32274,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -32307,11 +32307,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -32334,7 +32334,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -32356,7 +32356,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32373,7 +32373,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32390,7 +32390,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -32417,7 +32417,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -32451,7 +32451,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -32485,7 +32485,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -32544,7 +32544,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -32573,7 +32573,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32608,7 +32608,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -32623,7 +32623,7 @@ var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -32733,7 +32733,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32843,7 +32843,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32903,21 +32903,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*48)).FpInSavepoint) @@ -32934,7 +32934,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -32963,7 +32963,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -33055,7 +33055,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -33080,7 +33080,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -33144,7 +33144,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -33271,7 +33271,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -33303,7 +33303,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -33348,7 +33348,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33582,7 +33582,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33748,7 +33748,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33783,7 +33783,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -33815,7 +33815,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -33883,7 +33883,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -34018,39 +34018,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+80, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -34059,25 +34065,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -34086,10 +34092,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -34107,7 +34113,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -34116,24 +34122,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*uint8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -34141,14 +34147,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint32(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3845, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -34168,7 +34174,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34222,7 +34228,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -34249,7 +34255,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -34280,7 +34286,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -34311,7 +34317,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -34359,7 +34365,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34390,7 +34396,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34444,7 +34450,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34512,7 +34518,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -34621,18 +34627,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34648,13 +34654,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -34707,7 +34713,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -34771,7 +34777,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -34799,7 +34805,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -34836,7 +34842,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34905,7 +34911,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -34914,7 +34920,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -34945,7 +34951,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint32(N)) @@ -34968,7 +34974,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -34985,7 +34991,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -35030,7 +35036,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -35057,7 +35063,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -35076,7 +35082,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -35106,7 +35112,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -35116,7 +35122,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -35129,7 +35135,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35167,7 +35173,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -35216,7 +35222,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -35253,7 +35259,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -35367,7 +35373,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -35399,7 +35405,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35479,7 +35485,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -35503,7 +35509,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -35534,7 +35540,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -35560,7 +35566,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -35622,7 +35628,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -35669,7 +35675,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -35795,7 +35801,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -36114,7 +36120,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -36152,7 +36158,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -36263,7 +36269,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -36389,7 +36395,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -36538,7 +36544,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -36600,7 +36606,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36613,7 +36619,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -36659,7 +36665,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -36731,7 +36737,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -36751,7 +36757,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -36789,7 +36795,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -36798,7 +36804,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -36814,7 +36820,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -36835,7 +36841,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -36847,13 +36853,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -36882,7 +36888,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -36964,7 +36970,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -37024,7 +37030,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -37074,7 +37080,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -37148,7 +37154,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37236,7 +37242,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -37277,7 +37283,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -37307,7 +37313,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37377,7 +37383,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -37400,7 +37406,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -37436,7 +37442,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37626,7 +37632,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -37683,7 +37689,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -37727,13 +37733,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint32(unsafe.Sizeof(PgHdr{}))+uint32(5)*uint32(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -37742,7 +37748,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -37755,7 +37761,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 200 + uintptr(eStat)*4)) @@ -37765,7 +37771,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -37777,7 +37783,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -37817,7 +37823,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -37855,7 +37861,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -37916,30 +37922,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -37947,7 +37953,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -37974,7 +37980,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38036,7 +38042,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -38096,21 +38102,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -38122,7 +38128,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -38148,7 +38154,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -38218,14 +38224,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -38240,7 +38246,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -38252,12 +38258,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 96 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -38269,7 +38275,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -38297,13 +38303,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -38313,7 +38319,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -38330,7 +38336,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -38366,7 +38372,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -38396,7 +38402,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38436,7 +38442,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -38447,7 +38453,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38459,7 +38465,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -38479,7 +38485,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38491,7 +38497,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -39070,7 +39076,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -39081,18 +39087,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -39100,7 +39106,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -39121,7 +39127,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -39152,7 +39158,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -39198,7 +39204,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -39206,13 +39212,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -39230,7 +39236,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -39262,7 +39268,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -39277,7 +39283,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -39301,7 +39307,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 @@ -39324,7 +39330,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 var pgno U32 // Page number of the frame @@ -39366,7 +39372,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39377,7 +39383,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39386,7 +39392,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39397,7 +39403,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39409,12 +39415,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -39425,12 +39431,12 @@ type WalHashLoc1 = struct { FaHash uintptr FaPgno uintptr FiZero U32 -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -39444,7 +39450,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+4) @@ -39467,14 +39473,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((iFrame + U32(HASHTABLE_NPAGE) - (uint32(HASHTABLE_NPAGE) - (uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))) - U32(1)) / U32(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))+iFrame-uint32(1))*4)) @@ -39492,7 +39498,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -39535,7 +39541,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -39576,7 +39582,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -39595,7 +39601,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -39710,7 +39716,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -39914,7 +39920,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -39940,7 +39946,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40012,7 +40018,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -40026,7 +40032,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -40073,7 +40079,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -40119,7 +40125,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -40164,10 +40170,10 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt type Sublist = struct { FnList int32 FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -40182,7 +40188,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40266,7 +40272,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -40278,7 +40284,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -40297,7 +40303,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -40348,7 +40354,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -40479,7 +40485,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -40640,7 +40646,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40659,7 +40665,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40731,7 +40737,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -40800,7 +40806,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40880,7 +40886,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -40925,7 +40931,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -41191,7 +41197,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -41408,7 +41414,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -41482,7 +41488,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -41570,7 +41576,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -41584,7 +41590,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -41651,7 +41657,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -41667,7 +41673,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -41684,7 +41690,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -41702,7 +41708,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -41734,7 +41740,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -41754,7 +41760,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -41791,7 +41797,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) @@ -41803,7 +41809,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -41834,7 +41840,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41888,12 +41894,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -41901,7 +41907,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -41923,7 +41929,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41948,7 +41954,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -42002,7 +42008,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -42235,7 +42241,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42300,7 +42306,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -42344,7 +42350,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -42375,7 +42381,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -42409,14 +42415,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -42435,16 +42441,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -42474,7 +42480,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -42490,13 +42496,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -43016,7 +43022,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -43025,7 +43031,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -43035,7 +43041,7 @@ type CellInfo1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -43145,7 +43151,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -43241,7 +43247,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -43255,7 +43261,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -43264,7 +43270,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -43285,7 +43291,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -43313,7 +43319,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -43344,7 +43350,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -43367,7 +43373,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -43382,13 +43388,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -43400,7 +43406,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -43411,11 +43417,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -43438,7 +43444,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -43464,14 +43470,14 @@ var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:1 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -43488,7 +43494,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -43545,7 +43551,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -43596,7 +43602,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 76 @@ -43631,7 +43637,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -43655,7 +43661,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43674,7 +43680,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -43721,7 +43727,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -43741,20 +43747,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -43776,7 +43782,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -43813,7 +43819,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -43854,7 +43860,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43875,7 +43881,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -43894,7 +43900,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -43904,7 +43910,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -43917,7 +43923,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -43934,7 +43940,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43974,7 +43980,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -43982,12 +43988,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -44000,7 +44006,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -44022,7 +44028,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -44034,7 +44040,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -44059,7 +44065,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44082,7 +44088,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -44101,7 +44107,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -44109,7 +44115,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -44140,7 +44146,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44161,7 +44167,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -44171,7 +44177,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -44189,7 +44195,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -44216,7 +44222,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -44246,7 +44252,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -44256,7 +44262,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44333,7 +44339,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -44364,7 +44370,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(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) @@ -44380,7 +44386,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -44421,7 +44427,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -44438,7 +44444,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -44455,7 +44461,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -44473,7 +44479,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -44518,7 +44524,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -44528,7 +44534,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -44541,7 +44547,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -44550,14 +44556,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -44567,7 +44573,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -44629,7 +44635,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -44640,7 +44646,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -44675,7 +44681,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -44700,7 +44706,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -44729,7 +44735,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -44744,14 +44750,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -44767,7 +44773,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44792,7 +44798,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -44807,7 +44813,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, (int32(pSpace)-int32(data))/1) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -44858,7 +44864,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -44882,12 +44888,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -44898,11 +44904,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -44915,7 +44921,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -44923,7 +44929,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -44933,10 +44939,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -44970,7 +44976,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -45021,7 +45027,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -45029,7 +45035,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -45061,12 +45067,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -45078,11 +45084,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -45093,7 +45099,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -45101,7 +45107,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -45123,14 +45129,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -45143,7 +45149,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -45152,21 +45158,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -45184,7 +45190,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -45207,7 +45213,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -45219,7 +45225,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -45246,7 +45252,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45264,7 +45270,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -45276,11 +45282,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -45296,7 +45302,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -45306,7 +45312,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -45337,7 +45343,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -45361,18 +45367,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -45384,13 +45390,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -45405,7 +45411,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -45425,7 +45431,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+460) @@ -45450,7 +45456,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -45871,7 +45877,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -45903,7 +45909,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -45936,7 +45942,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 84)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -45945,7 +45951,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -45995,7 +46001,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46012,7 +46018,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -46024,7 +46030,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46039,7 +46045,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46066,7 +46072,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46100,7 +46106,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -46113,7 +46119,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -46127,7 +46133,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -46143,7 +46149,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -46167,7 +46173,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -46187,7 +46193,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -46220,7 +46226,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -46245,7 +46251,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -46414,7 +46420,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -46491,7 +46497,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -46504,7 +46510,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -46544,7 +46550,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -46586,7 +46592,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -46850,7 +46856,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46902,14 +46908,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -46937,7 +46943,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -46954,7 +46960,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -46969,7 +46975,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -46980,7 +46986,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -47050,7 +47056,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -47072,7 +47078,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -47147,7 +47153,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -47171,7 +47177,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47185,7 +47191,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -47206,7 +47212,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -47229,7 +47235,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -47260,7 +47266,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -47310,7 +47316,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47333,7 +47339,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -47389,7 +47395,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -47418,7 +47424,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -47453,7 +47459,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -47482,7 +47488,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47504,7 +47510,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47570,7 +47576,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -47594,7 +47600,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47662,7 +47668,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -47675,7 +47681,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -47713,7 +47719,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -47721,7 +47727,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -47736,7 +47742,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint32(unsafe.Sizeof(BtCursor{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } @@ -47746,13 +47752,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint32(uintptr(0)+20)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -47793,7 +47799,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+32) @@ -47802,7 +47808,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -47811,26 +47817,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -47843,7 +47849,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -47860,7 +47866,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -47882,7 +47888,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -47950,7 +47956,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -47992,7 +47998,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48003,7 +48009,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -48014,7 +48020,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -48071,7 +48077,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -48131,7 +48137,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -48151,7 +48157,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -48159,7 +48165,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -48172,7 +48178,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -48199,7 +48205,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -48230,7 +48236,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -48241,11 +48247,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -48262,7 +48268,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -48292,7 +48298,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -48371,7 +48377,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -48392,7 +48398,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -48414,7 +48420,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -48435,7 +48441,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -48456,7 +48462,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -48475,7 +48481,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -48524,7 +48530,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48639,7 +48645,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -48768,7 +48774,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -48872,7 +48878,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -48921,7 +48927,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -48988,7 +48994,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -48998,7 +49004,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -49037,7 +49043,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -49074,7 +49080,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -49107,7 +49113,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -49147,7 +49153,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -49201,7 +49207,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -49235,7 +49241,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -49302,7 +49308,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -49383,7 +49389,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) @@ -49425,7 +49431,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -49470,7 +49476,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -49584,7 +49590,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -49759,7 +49765,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -49780,7 +49786,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -49850,7 +49856,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -49867,7 +49873,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -49948,14 +49954,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49967,7 +49973,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -49982,7 +49988,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -50002,7 +50008,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -50034,7 +50040,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -50216,7 +50222,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -50234,7 +50240,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -50270,7 +50276,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50430,7 +50436,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -50507,11 +50513,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -50528,7 +50534,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -50536,7 +50542,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -50555,7 +50561,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -50586,12 +50592,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -50599,7 +50605,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int32(pData) - int32(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -50649,7 +50655,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50687,7 +50693,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -50714,7 +50720,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -50766,7 +50772,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50800,7 +50806,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -50940,7 +50946,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -50953,7 +50959,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -51051,7 +51057,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -51131,7 +51137,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -51433,7 +51439,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -51461,7 +51467,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -51640,7 +51646,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -51714,7 +51720,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -51787,7 +51793,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -51824,7 +51830,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -51908,7 +51914,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -52161,7 +52167,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -52383,7 +52389,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -52434,13 +52440,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -52454,7 +52460,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -52573,7 +52579,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -52615,7 +52621,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -52629,7 +52635,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -52653,7 +52659,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -52700,7 +52706,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -52772,7 +52778,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -52900,7 +52906,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -52963,7 +52969,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -53011,13 +53017,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 92))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 92 /* szNew */)))) @@ -53125,7 +53131,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53152,7 +53158,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -53175,7 +53181,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -53257,7 +53263,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53285,11 +53291,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*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*iCellIdx)))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -53398,7 +53404,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1))))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -53475,7 +53481,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53505,7 +53511,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -53548,7 +53554,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+16, bp+20) if int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pRoot */))) @@ -53611,7 +53617,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -53621,7 +53627,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -53637,7 +53643,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -53651,7 +53657,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -53755,7 +53761,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53778,7 +53784,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -53800,7 +53806,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53810,7 +53816,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -53882,7 +53888,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -53908,7 +53914,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53927,7 +53933,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -53953,7 +53959,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -54016,12 +54022,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54048,13 +54054,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -54065,7 +54071,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54087,7 +54093,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -54114,7 +54120,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -54198,7 +54204,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -54210,7 +54216,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -54249,7 +54255,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -54638,7 +54644,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -54872,7 +54878,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -54883,14 +54889,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -54904,7 +54910,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -54920,7 +54926,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -54943,7 +54949,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -54957,7 +54963,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -54970,7 +54976,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -54994,7 +55000,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -55034,7 +55040,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -55042,7 +55048,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -55074,29 +55080,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -55136,7 +55142,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(288) defer tls.Free(288) @@ -55168,7 +55174,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -55178,7 +55184,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4805, 0) return SQLITE_ERROR @@ -55192,7 +55198,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -55252,14 +55258,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -55321,7 +55327,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55336,7 +55342,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -55346,7 +55352,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -55584,7 +55590,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -55642,13 +55648,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -55662,7 +55668,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -55683,7 +55689,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -55698,7 +55704,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -55712,7 +55718,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -55806,7 +55812,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -55844,7 +55850,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -55864,7 +55870,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -55920,7 +55926,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -55938,7 +55944,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -55953,7 +55959,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -55978,7 +55984,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -56000,7 +56006,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -56022,7 +56028,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -56048,7 +56054,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -56078,7 +56084,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -56100,7 +56106,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -56119,7 +56125,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -56138,7 +56144,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -56148,7 +56154,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -56160,8 +56166,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -56172,7 +56178,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56181,7 +56187,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -56202,7 +56208,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56212,7 +56218,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -56230,7 +56236,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -56243,7 +56249,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -56264,7 +56270,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -56273,7 +56279,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -56288,7 +56294,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -56305,7 +56311,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56332,7 +56338,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -56386,7 +56392,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -56403,7 +56409,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -56411,13 +56417,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -56432,7 +56438,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -56440,7 +56446,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -56450,14 +56456,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -56477,7 +56484,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -56490,7 +56497,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -56507,7 +56514,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -56523,13 +56530,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -56545,7 +56552,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -56567,7 +56574,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint32(unsafe.Sizeof(Mem{}))) @@ -56588,7 +56595,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -56701,11 +56708,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -56720,7 +56727,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56745,7 +56752,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -56790,7 +56797,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -56806,7 +56813,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -56822,7 +56829,7 @@ type ValueNewStat4Ctx = struct { FpIdx uintptr FppRec uintptr FiVal int32 -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -56833,7 +56840,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -56889,7 +56896,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -57035,7 +57042,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -57283,7 +57290,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -57306,7 +57313,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -57374,7 +57381,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -57419,7 +57426,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -57429,7 +57436,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57450,7 +57457,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -57465,14 +57472,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -57488,7 +57495,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -57503,14 +57510,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -57521,14 +57528,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -57548,7 +57555,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -57572,12 +57579,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -57587,7 +57594,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -57600,7 +57607,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -57631,7 +57638,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -57684,7 +57691,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -57693,7 +57700,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -57716,26 +57723,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -57748,7 +57755,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -57796,7 +57803,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -57810,7 +57817,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -57842,7 +57849,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint32(8)) @@ -57852,7 +57859,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -57868,7 +57875,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -57892,7 +57899,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -57903,7 +57910,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -57914,7 +57921,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*20 @@ -57925,7 +57932,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -57960,14 +57967,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint32(nNewSize)*uint32(unsafe.Sizeof(int32(0))))) @@ -57979,7 +57986,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -57992,12 +57999,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+160, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+160, Bft(0), 5, 0x20) } @@ -58020,7 +58027,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -58149,7 +58156,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -58180,7 +58187,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -58196,7 +58203,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -58240,23 +58247,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fp5 = p5 @@ -58265,7 +58272,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -58280,7 +58287,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -58291,26 +58298,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -58371,7 +58378,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*20; pOp >= aOp; pOp -= 20 { @@ -58386,18 +58393,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -58413,7 +58420,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -58437,7 +58444,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -58454,7 +58461,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -58501,7 +58508,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -58517,7 +58524,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -58538,7 +58545,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -58552,11 +58559,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -58719,7 +58726,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -58727,7 +58734,7 @@ var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 164)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*16)).FpBt) != 0 { @@ -58754,7 +58761,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -58773,7 +58780,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -58788,7 +58795,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -58796,7 +58803,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -58806,7 +58813,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*40 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -58850,7 +58857,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -58862,7 +58869,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -58961,7 +58968,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 88 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*40 @@ -58990,7 +58997,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59080,7 +59087,7 @@ type ReusableSpace = struct { F__ccgo_pad1 [4]byte FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -59095,7 +59102,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -59112,7 +59119,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -59145,7 +59152,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -59254,11 +59261,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4973, ts + 4978, ts + 4985, ts + 4988, ts + 4991, ts + 4994, ts + 4997, ts + 5000, ts + 5008, ts + 5011, ts + 5018, ts + 5026, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -59292,7 +59299,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -59308,7 +59315,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -59332,7 +59339,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -59363,7 +59370,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59388,7 +59395,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -59407,7 +59414,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -59635,7 +59642,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -59653,7 +59660,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -59696,7 +59703,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -59711,7 +59718,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -59734,7 +59741,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59938,7 +59945,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -59948,7 +59955,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -59977,7 +59984,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60029,7 +60036,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -60053,7 +60060,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -60078,7 +60085,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -60099,7 +60106,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -60122,7 +60129,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60135,7 +60142,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -60147,7 +60154,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60165,7 +60172,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 36))) != 0 { return handleMovedCursor(tls, p) @@ -60184,7 +60191,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -60259,10 +60266,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -60272,7 +60279,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -60321,7 +60328,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60372,7 +60379,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60399,7 +60406,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -60502,7 +60509,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -60516,7 +60523,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint32(unsafe.Sizeof(UnpackedRecord{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(unsafe.Sizeof(Mem{}))*uint32(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -60534,7 +60541,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60595,7 +60602,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -60638,7 +60645,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -60651,7 +60658,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -60691,7 +60698,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint32(unsafe.Sizeof(float64(0))) > uint32(8) { var x float64 = float64(i) @@ -60737,7 +60744,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -60831,7 +60838,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60894,7 +60901,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -60936,7 +60943,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -61001,7 +61008,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -61036,7 +61043,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 48)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -61097,7 +61104,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -61108,7 +61115,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61213,7 +61220,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61237,7 +61244,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -61275,7 +61282,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -61329,7 +61336,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -61414,7 +61421,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -61426,7 +61433,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -61442,7 +61449,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -61456,7 +61463,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 112)) += nChange @@ -61464,7 +61471,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+160, Bft(1), 4, 0x10) } @@ -61484,7 +61491,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+160, Bft(iCode+1), 0, 0x3) @@ -61492,12 +61499,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -61507,7 +61514,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*40 @@ -61527,7 +61534,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 228)) |= 0x80000000 @@ -61543,7 +61550,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61574,7 +61581,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -61590,7 +61597,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -61607,7 +61614,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -61659,7 +61666,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -61685,7 +61692,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 160))&0x3>>0)) != 0) } @@ -61693,7 +61700,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5200, 0) return 1 @@ -61703,7 +61710,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5245, 0) return 1 @@ -61715,7 +61722,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61748,7 +61755,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -61758,7 +61765,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -61778,7 +61785,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -61800,7 +61807,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -61822,7 +61829,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -61845,27 +61852,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -61875,7 +61882,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -61888,26 +61895,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -61976,20 +61983,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -62015,7 +62022,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -62030,7 +62037,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -62044,7 +62051,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -62057,12 +62064,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -62071,39 +62078,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -62111,19 +62118,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -62135,32 +62142,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 120))) { @@ -62170,7 +62177,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -62184,7 +62191,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5285, int64(-1), @@ -62192,7 +62199,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -62202,7 +62209,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -62212,7 +62219,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -62239,7 +62246,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -62406,14 +62413,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -62453,7 +62460,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -62466,7 +62473,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -62483,14 +62490,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -62548,13 +62555,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -62563,7 +62570,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62586,7 +62593,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -62606,7 +62613,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -62624,7 +62631,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -62647,7 +62654,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -62727,13 +62734,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -62743,7 +62750,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -62752,19 +62759,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -62799,7 +62806,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -62816,7 +62823,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -62826,43 +62833,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -62872,13 +62879,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -62898,7 +62905,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -62930,11 +62937,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -62943,44 +62950,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -62997,13 +63004,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -63011,7 +63018,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5318, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -63045,7 +63052,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -63071,16 +63078,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63091,11 +63098,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63106,7 +63113,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63116,7 +63123,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63129,11 +63136,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -63141,11 +63148,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -63194,7 +63201,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63205,7 +63212,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -63222,7 +63229,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -63234,7 +63241,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -63245,19 +63252,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -63280,7 +63287,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -63301,7 +63308,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -63310,7 +63317,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 160)) & 0x80 >> 7) } @@ -63319,7 +63326,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 160)) & 0xc >> 2) } @@ -63327,7 +63334,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -63336,7 +63343,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -63349,7 +63356,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63375,7 +63382,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -63390,7 +63397,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -63405,7 +63412,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -63418,7 +63425,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -63432,7 +63439,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -63524,7 +63531,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63543,7 +63550,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63555,7 +63562,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63567,7 +63574,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -63581,7 +63588,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -63722,7 +63729,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63767,7 +63774,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -63990,7 +63997,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -64061,7 +64068,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -64083,7 +64090,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64129,7 +64136,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -64161,7 +64168,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sql // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -64173,7 +64180,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, uint8(affinity), enc) } @@ -64181,7 +64188,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64217,7 +64224,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -64231,13 +64238,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*40 @@ -64253,7 +64260,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -64277,7 +64284,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -64287,11 +64294,11 @@ var azTypes = [5]uintptr{ ts + 1112, ts + 1090, ts + 1535, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(800) defer tls.Free(800) @@ -66401,6 +66408,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -69420,7 +69431,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 36))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 36)))) +__357: + ; __353: ; goto __8 @@ -69456,10 +69487,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+236) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -69467,13 +69498,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -69482,14 +69513,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -69497,12 +69528,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 120)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -69517,7 +69548,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -69535,13 +69566,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -69558,38 +69589,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 236))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+240, 0, uint32(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+240) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 240 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -69599,27 +69630,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+80+uintptr(i2)*4, libc.AssignPtrUint32(bp+280, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 280))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+280)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 80 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 280 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 280)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 236)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -69628,63 +69659,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+240) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int32(zHdr) - int32(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+240) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 280 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 236))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 280 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 80 + uintptr(*(*U32)(unsafe.Pointer(bp + 236 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -69692,55 +69723,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 280)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 280))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint32(len)) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = uint8(0) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = uint8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 280))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 280)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 280))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 280))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -69755,20 +69786,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 36)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 236 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 280 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -69778,15 +69809,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*20 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -69821,81 +69852,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 40 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*16 + 4)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -69903,45 +69934,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 40 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -69966,14 +69997,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*uint8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -69981,30 +70012,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 40 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -70068,31 +70099,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*uint8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 40 - goto __427 -__427: + goto __431 +__431: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -70121,13 +70152,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -70137,77 +70168,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -70216,79 +70247,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 40 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -70297,22 +70328,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -70321,37 +70352,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 120)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -70366,7 +70397,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -70379,13 +70410,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 40) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -70404,20 +70435,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + 36)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 288 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 288 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+288) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 288 /* nEntry */)) @@ -70438,17 +70469,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5485, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -70459,16 +70490,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint32(nName+1)) @@ -70476,14 +70507,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -70491,121 +70522,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5536, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5558, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -70618,36 +70624,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -70655,48 +70686,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -70717,18 +70748,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -70736,43 +70767,43 @@ __519: ts+5612, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -70788,7 +70819,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -70830,66 +70861,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 296 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+296) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 160))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -70897,16 +70928,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 296)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -70926,20 +70957,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 296))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+160, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -70986,37 +71017,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+160, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -71106,13 +71137,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -71121,11 +71152,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 160))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -71137,24 +71168,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*40 @@ -71166,32 +71197,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -71211,10 +71242,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 36)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -71233,10 +71264,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -71291,7 +71322,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -71299,11 +71330,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1534 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -71312,71 +71343,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+12, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 36))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -71395,19 +71426,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -71422,10 +71453,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -71449,10 +71480,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -71577,7 +71608,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -71587,10 +71618,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -71599,29 +71630,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+304) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -71632,53 +71663,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), int64(U64(iKey)), 0, bp+304) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -71703,97 +71734,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 308 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), bp+308, bp+304) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+308)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 304 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 304 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 304 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 304 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 304 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 20 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -71851,10 +71882,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp1)*4)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -71863,60 +71894,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 324 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 324 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 340 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+324, bp+340) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 340)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 340)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 36)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -71939,18 +71970,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -71962,10 +71993,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -72060,10 +72091,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; __99: // jump, in3 @@ -72076,15 +72107,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 344 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 344 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 344 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 344 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -72094,62 +72125,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*40)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 36)), pIdxKey, bp+360) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 360 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 360)) == 0) @@ -72157,31 +72188,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -72235,7 +72266,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -72245,14 +72276,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 368 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+368, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+368)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 368))) goto notExistsWithKey -__635: +__639: ; __103: // jump, in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -72273,25 +72304,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 408 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 408)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -72349,89 +72380,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+412) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 412)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 416 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 416 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 416)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 416 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 416)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 416 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 416 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -72440,36 +72471,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+416) *(*I64)(unsafe.Pointer(bp + 416 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 416 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 416)))), 0, bp+412)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 412)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 412)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -72524,56 +72555,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 424 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*16)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+424 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 424 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 424 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -72585,13 +72616,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 424 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 424 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 424 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 36)), bp+424, @@ -72602,13 +72633,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -72621,7 +72652,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+424 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -72647,10 +72678,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -72700,28 +72731,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*16)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -72733,13 +72764,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -72748,28 +72779,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -72809,16 +72840,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+464) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 464)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -72841,10 +72872,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -72894,29 +72925,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 120)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -72937,20 +72968,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 472 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 36)))).FpVtab @@ -72961,36 +72992,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36 /* &.uc */)), bp+472 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 472 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 472 /* v3 */)) goto __8 @@ -72999,6 +73030,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) @@ -73006,11 +73041,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 36))) -__698: +__702: ; goto __8 @@ -73043,39 +73078,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 480 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+480) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 480 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -73091,29 +73126,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+484) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 484 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -73158,32 +73193,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 488 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+488) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+488) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 488 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 488)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -73266,18 +73301,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 172 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -73317,10 +73352,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -73330,10 +73365,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -73350,10 +73385,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -73376,17 +73411,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -73417,31 +73452,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 536 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+536, bp+552) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 552)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5827) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 552)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5827) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -73488,25 +73523,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 560 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+560) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) @@ -73518,17 +73553,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 560 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__726: +__730: ; goto __8 @@ -73542,16 +73577,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -73605,15 +73640,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 608 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 608 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 608 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 608 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 608 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -73627,19 +73662,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+568, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+568) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+568 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+568 /* &m */)).Fz, bp+608, 0) Xsqlite3VdbeMemRelease(tls, bp+568) @@ -73647,22 +73682,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -73698,13 +73733,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 624 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -73712,21 +73747,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 624 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 624)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 624 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -73752,23 +73787,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*16)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+632) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 48)) += *(*I64)(unsafe.Pointer(bp + 632)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 632)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -73784,21 +73819,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 36))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 36))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -73819,10 +73854,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+640, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 640 /* pgno */))) goto __8 @@ -73836,10 +73871,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -73860,15 +73895,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpSchema) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+132, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+160, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5844 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 644 /* &initData */)).Fdb = db @@ -73880,11 +73915,11 @@ __751: ts+5858, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 644 /* &initData */)).Frc = SQLITE_OK @@ -73894,38 +73929,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+644 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 644 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+644)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -73938,10 +73973,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -74013,22 +74048,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+672) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 672)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 672)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -74046,15 +74081,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -74073,18 +74108,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+680) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*I64)(unsafe.Pointer(bp + 680 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -74119,35 +74154,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -74182,37 +74217,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 120 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5901, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -74220,7 +74255,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -74229,10 +74264,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -74240,10 +74275,10 @@ __781: uint32(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -74265,24 +74300,24 @@ __782: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem2 = pFrame2 + 88 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 40 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -74333,21 +74368,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 536)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 528)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 72)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -74364,25 +74399,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -74398,35 +74433,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -74443,11 +74478,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -74480,7 +74515,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -74490,10 +74525,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 688 /* x3 */)) -__802: +__806: ; goto __8 @@ -74508,16 +74543,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -74530,17 +74565,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -74587,10 +74622,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(n4)*uint32(unsafe.Sizeof(uintptr(0)))+(uint32(unsafe.Sizeof(Sqlite3_context{}))+uint32(unsafe.Sizeof(Mem{}))-uint32(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -74618,75 +74653,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+28 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+28 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -74722,32 +74757,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -74769,32 +74804,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+696+1*4, bp+696+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 696)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 696 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 40 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -74817,17 +74852,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -74837,18 +74872,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -74860,11 +74895,11 @@ __830: return ts + 5995 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -74872,29 +74907,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -74902,18 +74937,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -74923,10 +74958,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -74948,10 +74983,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -74967,17 +75002,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -74999,13 +75034,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+160, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -75048,25 +75083,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*16)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+6002, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -75082,16 +75117,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -75111,17 +75146,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+712) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+132) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+712) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -75135,10 +75170,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -75153,11 +75188,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 752 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -75165,10 +75200,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+752 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -75177,18 +75212,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 752 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 752 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -75206,10 +75241,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -75254,27 +75289,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*4)) = pArgc + uintptr(i7+1)*40 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -75282,10 +75317,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -75309,11 +75344,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -75322,40 +75357,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 756 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 36 /* &.uc */)), bp+756 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+756)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 756 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -75369,10 +75404,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -75387,21 +75422,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -75419,27 +75454,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 32)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+160, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -75473,43 +75508,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 792 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -75518,41 +75553,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 792 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -75577,16 +75612,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -75646,24 +75681,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -75674,38 +75709,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+236, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -75744,16 +75779,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 172 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 172 + 7*4))++ -__900: +__904: ; goto __8 @@ -75803,67 +75838,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6031, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 172 + 6*4))++ @@ -75908,25 +75943,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -75935,46 +75970,46 @@ __915: libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 32)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 172 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -76005,11 +76040,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6069, ts + 6078, ts + 6085, - ts + 6091} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6091} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -76040,7 +76075,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -76061,7 +76096,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -76078,7 +76113,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -76154,7 +76189,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(324) defer tls.Free(324) @@ -76475,7 +76510,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -76484,11 +76519,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -76507,14 +76542,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76573,14 +76608,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -76590,7 +76625,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -76606,7 +76641,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -76615,7 +76650,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76801,7 +76836,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -76952,7 +76987,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -76966,10 +77001,10 @@ type PmaReader1 = struct { FaMap uintptr FpIncr uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 FaBuffer uintptr @@ -76980,17 +77015,17 @@ type PmaWriter1 = struct { FiWriteOff I64 FpFd uintptr F__ccgo_pad2 [4]byte -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -77002,26 +77037,26 @@ type SortSubtask1 = struct { F__ccgo_pad1 [4]byte Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr F__ccgo_pad1 [4]byte FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -77031,10 +77066,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -77065,11 +77100,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -77086,7 +77121,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77190,7 +77225,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -77230,7 +77265,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -77245,7 +77280,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -77286,7 +77321,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77332,7 +77367,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77355,7 +77390,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77375,7 +77410,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77387,7 +77422,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77437,7 +77472,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -77497,7 +77532,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -77516,7 +77551,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -77612,7 +77647,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -77623,7 +77658,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -77643,7 +77678,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77662,14 +77697,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -77695,7 +77730,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -77720,7 +77755,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -77732,7 +77767,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -77749,7 +77784,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -77778,7 +77813,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 36)) @@ -77797,7 +77832,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(20) defer tls.Free(20) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -77817,7 +77852,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -77841,7 +77876,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -77854,7 +77889,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77893,7 +77928,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -77911,7 +77946,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -77968,7 +78003,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -77983,7 +78018,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -78012,7 +78047,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -78028,7 +78063,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -78051,7 +78086,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -78106,7 +78141,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78182,7 +78217,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -78193,7 +78228,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -78257,7 +78292,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78373,7 +78408,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -78419,7 +78454,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(vdbeIncrPopulate(tls, pIncr)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -78427,7 +78462,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -78450,7 +78485,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -78484,7 +78519,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -78511,7 +78546,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 56 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -78519,7 +78554,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78579,7 +78614,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -78649,7 +78684,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -78706,7 +78741,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -78722,7 +78757,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -78749,7 +78784,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78786,7 +78821,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -78802,7 +78837,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78853,7 +78888,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -78934,7 +78969,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79009,7 +79044,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -79054,7 +79089,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79096,7 +79131,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -79115,7 +79150,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79150,7 +79185,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79242,7 +79277,7 @@ type MemJournal1 = struct { FpVfs uintptr FzJournal uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -79289,24 +79324,24 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -79353,7 +79388,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -79363,7 +79398,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -79401,7 +79436,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -79467,7 +79502,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -79495,7 +79530,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -79505,14 +79540,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -79527,7 +79562,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -79539,7 +79574,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -79567,20 +79602,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -79609,7 +79644,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -79657,7 +79692,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -79699,7 +79734,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -79708,7 +79743,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -79737,7 +79772,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -79747,7 +79782,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -79789,7 +79824,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -79838,7 +79873,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -79869,13 +79904,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -79887,7 +79922,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79895,7 +79930,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79930,14 +79965,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 24))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -79970,7 +80005,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -80016,7 +80051,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -80033,7 +80068,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 12))&0x3>>0) != ENAME_TAB { @@ -80059,7 +80094,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -80078,7 +80113,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -80128,7 +80163,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -80846,7 +80881,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*72 @@ -80895,7 +80930,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -80917,7 +80952,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80943,7 +80978,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -81424,7 +81459,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -81459,7 +81494,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -81503,7 +81538,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81526,7 +81561,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -81663,7 +81698,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81709,7 +81744,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -81720,7 +81755,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81752,7 +81787,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81829,7 +81864,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -82128,7 +82163,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82169,7 +82204,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82226,7 +82261,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82260,7 +82295,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -82296,7 +82331,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return uint8(SQLITE_AFF_INTEGER) } @@ -82317,7 +82352,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -82360,7 +82395,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -82372,7 +82407,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82383,7 +82418,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -82394,7 +82429,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -82419,7 +82454,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -82491,7 +82526,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -82501,7 +82536,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -82510,7 +82545,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:102726:21: */ var aff1 uint8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -82535,7 +82570,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { / // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102748:13: */ var aff uint8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -82553,7 +82588,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:10272 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:102771:20: */ var aff uint8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -82566,7 +82601,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) i // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, uint8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -82582,7 +82617,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -82605,7 +82640,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -82615,7 +82650,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -82642,7 +82677,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -82650,7 +82685,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -82680,7 +82715,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -82714,7 +82749,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -82762,7 +82797,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -82786,7 +82821,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -82815,7 +82850,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82903,7 +82938,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82925,7 +82960,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -82933,7 +82968,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -82942,7 +82977,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -82962,7 +82997,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82989,7 +83024,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -82999,7 +83034,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83026,7 +83061,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83074,7 +83109,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83089,7 +83124,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -83112,7 +83147,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -83130,7 +83165,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 20)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -83158,7 +83193,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -83210,7 +83245,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -83229,7 +83264,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83266,7 +83301,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83298,7 +83333,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83366,7 +83401,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -83396,7 +83431,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -83410,13 +83445,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -83428,7 +83463,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 12) } @@ -83470,7 +83505,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -83492,7 +83527,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&Size_t(0x3fffffff) + Size_t(1))) @@ -83511,7 +83546,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -83528,7 +83563,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83638,7 +83673,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(With{})) + uint32(unsafe.Sizeof(Cte{}))*uint32((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -83660,7 +83695,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -83670,14 +83705,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 24)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -83710,7 +83745,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -83718,7 +83753,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -83787,7 +83822,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -83840,7 +83875,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -83869,7 +83904,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83935,9 +83970,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -83954,7 +83989,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -83973,7 +84008,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -83996,7 +84031,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84093,7 +84128,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -84120,7 +84155,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -84146,7 +84181,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -84161,7 +84196,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84173,7 +84208,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -84185,7 +84220,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -84193,7 +84228,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -84210,7 +84245,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -84222,7 +84257,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6646) == 0 { return U32(EP_IsTrue) } @@ -84235,7 +84270,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -84249,7 +84284,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -84266,7 +84301,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -84312,7 +84347,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -84387,7 +84422,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -84411,7 +84446,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -84426,7 +84461,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -84434,12 +84469,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var i int32 @@ -84481,7 +84516,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -84517,7 +84552,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -84526,7 +84561,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -84578,7 +84613,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -84617,7 +84652,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -84670,7 +84705,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int3 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7592) == 0 { return 1 } @@ -84688,7 +84723,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -84746,7 +84781,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -84758,7 +84793,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -84847,7 +84882,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85065,7 +85100,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -85097,7 +85132,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85116,7 +85151,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList)).FnExpr, 1) } else { @@ -85144,7 +85179,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(53) defer tls.Free(53) @@ -85339,7 +85374,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -85462,7 +85497,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 20)))).FpEList)).FnExpr { @@ -85499,7 +85534,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85880,7 +85915,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85900,7 +85935,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -85946,7 +85981,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -85961,7 +85996,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -85980,7 +86015,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86031,7 +86066,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -86045,14 +86080,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -86071,7 +86106,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -86095,7 +86130,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -86103,7 +86138,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -86228,7 +86263,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -87297,7 +87332,7 @@ __3: return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -87314,7 +87349,7 @@ var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -87383,7 +87418,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -87408,7 +87443,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -87429,7 +87464,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -87442,7 +87477,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -87468,7 +87503,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -87550,7 +87585,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -87613,7 +87648,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87843,7 +87878,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88091,7 +88126,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -88111,7 +88146,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88165,7 +88200,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -88269,7 +88304,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -88296,7 +88331,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -88307,7 +88342,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -88433,7 +88468,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -88456,7 +88491,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -88565,7 +88600,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -88599,7 +88634,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -88617,7 +88652,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -88642,7 +88677,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -88680,7 +88715,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -88696,7 +88731,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -88736,7 +88771,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -88785,7 +88820,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -88818,7 +88853,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -88831,7 +88866,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88848,7 +88883,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88866,7 +88901,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -89057,7 +89092,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -89083,7 +89118,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -89108,7 +89143,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -89117,7 +89152,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { @@ -89127,7 +89162,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -89145,7 +89180,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -89163,7 +89198,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -89197,7 +89232,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89216,7 +89251,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89240,7 +89275,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -89256,7 +89291,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -89269,7 +89304,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -89454,7 +89489,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89469,7 +89504,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -89615,7 +89650,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89732,7 +89767,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89760,7 +89795,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -89889,7 +89924,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -89901,7 +89936,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -89920,7 +89955,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -89932,7 +89967,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -89943,7 +89978,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -89984,7 +90019,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -89994,7 +90029,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -90026,7 +90061,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -90048,7 +90083,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -90071,7 +90106,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -90087,7 +90122,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -90110,7 +90145,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -90126,7 +90161,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -90148,7 +90183,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -90170,7 +90205,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -90194,7 +90229,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -90211,7 +90246,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -90225,34 +90260,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10807, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -90266,7 +90299,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90286,7 +90319,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10807, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10815, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -90336,7 +90369,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn) *(*uint8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = uint8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10813, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10821, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10805 /* " " */ @@ -90372,7 +90405,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -90470,7 +90503,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -90499,7 +90532,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -90538,7 +90571,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -90881,7 +90914,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -90892,7 +90925,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -90932,7 +90965,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(352) defer tls.Free(352) @@ -91066,7 +91099,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 24)), pExpr) } @@ -91099,7 +91132,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -91213,7 +91246,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -91285,7 +91318,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -91325,7 +91358,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -91351,7 +91384,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10818, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10826, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -91371,7 +91404,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -91449,10 +91482,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10825, + Xsqlite3ErrorMsg(tls, pParse, ts+10833, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10853 /* "PRIMARY KEY" */ + return ts + 10861 /* "PRIMARY KEY" */ } return ts + 6078 /* "UNIQUE" */ }(), @@ -91465,7 +91498,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10865, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10873, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -91485,11 +91518,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10913, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10921, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11034, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11042, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -91604,16 +91637,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint32(unsafe.Sizeof(aAlterTableFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11052}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11073}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11093}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11112}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11131}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11060}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11081}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11101}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11139}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -91769,7 +91802,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -91810,7 +91843,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11154, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11162, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -91822,10 +91855,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11207, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11215, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -91846,10 +91879,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11225 /* "sqlite_stat1" */, FzCols: ts + 11238 /* "tbl,idx,stat" */}, - {FzName: ts + 11251 /* "sqlite_stat4" */, FzCols: ts + 11264 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11292 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11233 /* "sqlite_stat1" */, FzCols: ts + 11246 /* "tbl,idx,stat" */}, + {FzName: ts + 11259 /* "sqlite_stat4" */, FzCols: ts + 11272 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11300 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -91876,14 +91909,14 @@ type StatAccum1 = struct { FiGet int32 Fa uintptr F__ccgo_pad2 [4]byte -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -91895,12 +91928,12 @@ type StatSample1 = struct { F__ccgo_pad2 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 16))) @@ -91909,7 +91942,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 16))) @@ -91924,7 +91957,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 16))) @@ -91934,7 +91967,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -91949,7 +91982,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -91984,7 +92017,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -92079,7 +92112,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11305} /* sqlite3.c:111534:22 */ + FzName: ts + 11313} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -92090,7 +92123,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -92112,7 +92145,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -92130,7 +92163,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -92273,7 +92306,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -92325,7 +92358,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -92397,7 +92430,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11315} /* sqlite3.c:111824:22 */ + FzName: ts + 11323} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -92416,7 +92449,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -92450,7 +92483,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11325, + Xsqlite3_str_appendf(tls, bp+24, ts+11333, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -92460,7 +92493,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11330, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11338, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -92503,7 +92536,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+11336, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11344, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+48)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+48 /* &sStat */)).FnChar-- @@ -92517,9 +92550,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11342} /* sqlite3.c:111958:22 */ + FzName: ts + 11350} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -92528,7 +92561,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -92564,7 +92597,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11351, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11359, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -92582,7 +92615,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*64 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11225, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11233, uint32(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -92815,7 +92848,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -92877,7 +92910,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -92888,7 +92921,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -92896,7 +92929,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema // Schema of database iDb var k uintptr @@ -92921,7 +92954,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -92930,9 +92963,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 40)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11365) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11373) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11369) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11377) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -92948,7 +92981,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93011,16 +93044,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -93049,15 +93082,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 6, 0x40) for *(*uint8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11373, z) == 0 { + if Xsqlite3_strglob(tls, ts+11381, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11384, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11392, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11394, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11402, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -93079,7 +93112,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -93141,7 +93174,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -93158,7 +93191,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*20 @@ -93216,7 +93249,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -93237,7 +93270,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -93373,15 +93406,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11251, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11259, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11406, - ts+11460, + ts+11414, + ts+11468, zDb) } return rc @@ -93405,7 +93438,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -93433,10 +93466,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11225, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11233, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11512, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11520, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -93512,7 +93545,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -93526,7 +93559,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6332, zName) == 0) } @@ -93544,7 +93577,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -93611,7 +93644,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11553, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11561, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -93624,7 +93657,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 120 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11556, + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11564, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 120 + 7*4)))) goto attach_error __7: @@ -93638,7 +93671,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11593, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11601, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -93709,7 +93742,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11623, 0) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11631, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -93726,7 +93759,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11652, 0) + ts+11660, 0) rc = SQLITE_ERROR __23: ; @@ -93802,7 +93835,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11720, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11728, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -93837,7 +93870,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93890,14 +93923,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11748, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11756, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11769, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11777, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -93905,7 +93938,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11803, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -93942,7 +93975,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -94021,7 +94054,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -94029,12 +94062,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11817} /* sqlite3.c:113383:24 */ + FzName: ts + 11825} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -94042,10 +94075,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11831} /* sqlite3.c:113403:24 */ + FzName: ts + 11839} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94057,7 +94090,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11845, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11853, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -94065,7 +94098,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -94090,7 +94123,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11869, + ts+11877, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -94126,7 +94159,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -94162,7 +94195,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -94177,15 +94210,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+4, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+4, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -94275,7 +94308,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -94288,8 +94321,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11915, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11923, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -94300,7 +94333,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94315,11 +94348,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11944, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11952, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11950, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11958, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -94334,7 +94367,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -94383,7 +94416,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -94405,7 +94438,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11977, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11985, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -94417,7 +94450,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -94426,7 +94459,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -94441,7 +94474,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -94475,7 +94508,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -94487,7 +94520,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -94511,7 +94544,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -94664,7 +94697,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -94715,7 +94748,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -94739,14 +94772,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12025) + ts+12033) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, ts+5844) } @@ -94772,11 +94805,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5844) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12025) + ts+12033) } } } @@ -94791,7 +94824,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94812,7 +94845,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+400, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12044, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12052, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -94831,9 +94864,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12052 /* "no such view" */ + zMsg = ts + 12060 /* "no such view" */ } else { - zMsg = ts + 12065 /* "no such table" */ + zMsg = ts + 12073 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6527, libc.VaList(bp, zMsg, zDbase, zName)) @@ -94854,7 +94887,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -94868,13 +94901,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { - return ts + 12011 /* "sqlite_schema" */ + return ts + 12019 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12025+7) == 0 { - return ts + 11992 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 { + return ts + 12000 /* "sqlite_temp_sche..." */ } } return zName @@ -94890,7 +94923,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -94917,7 +94950,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -94933,7 +94966,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -94965,7 +94998,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -94991,7 +95024,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -95012,7 +95045,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -95034,14 +95067,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.pDfltList */)) @@ -95064,7 +95097,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -95081,7 +95114,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -95100,7 +95133,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -95119,7 +95152,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -95169,7 +95202,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -95206,7 +95239,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -95219,7 +95252,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -95241,7 +95274,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -95254,7 +95287,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5844) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -95267,7 +95300,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -95303,7 +95336,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -95327,7 +95360,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95336,13 +95369,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12079, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12087, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12096, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12104, libc.VaList(bp, pName1)) return -1 } } else { @@ -95354,7 +95387,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -95368,7 +95401,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95389,7 +95422,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8019, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12116, + Xsqlite3ErrorMsg(tls, pParse, ts+12124, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -95399,7 +95432,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 56 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -95410,7 +95443,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -95430,7 +95463,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -95477,7 +95510,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -95507,7 +95540,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -95530,7 +95563,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -95558,7 +95591,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 /* "sqlite_temp_mast..." */ + return ts + 12033 /* "sqlite_temp_mast..." */ } return ts + 5844 /* "sqlite_master" */ }()) @@ -95578,7 +95611,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12158, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12166, 0) return __4: ; @@ -95625,7 +95658,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -95665,7 +95698,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12199, + Xsqlite3ErrorMsg(tls, pParse, ts+12207, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10376 /* "view" */ @@ -95685,7 +95718,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12220, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12228, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -95788,8 +95821,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -95799,10 +95832,10 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12255, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12263, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -95821,12 +95854,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12272, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12280, 0) } else { } @@ -95847,7 +95880,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12255 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12263 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -95859,7 +95892,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - if Xsqlite3HashInsert(tls, pHash, ts+12255, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12263, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -95871,7 +95904,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(32) defer tls.Free(32) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -95893,7 +95926,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -95905,13 +95938,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12329, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12337, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12336, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12344, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- @@ -95951,7 +95984,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12346, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12354, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -95990,7 +96023,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -96037,7 +96070,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96111,7 +96144,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* s // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -96123,11 +96156,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*16 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12372, + Xsqlite3ErrorMsg(tls, pParse, ts+12380, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12417, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12425, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -96164,7 +96197,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -96173,12 +96206,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12458, 0) + ts+12466, 0) } } @@ -96198,7 +96231,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96223,7 +96256,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12510, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12518, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -96312,7 +96345,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12551, 0) + ts+12559, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -96329,7 +96362,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96359,7 +96392,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -96394,7 +96427,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96414,7 +96447,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12607, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12615, 0) goto generated_done __2: ; @@ -96427,13 +96460,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12650, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12666, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -96466,7 +96499,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12665, + Xsqlite3ErrorMsg(tls, pParse, ts+12673, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -96489,7 +96522,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -96503,7 +96536,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -96538,7 +96571,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -96574,7 +96607,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -96609,12 +96642,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1534 /* "" */ - zSep2 = ts + 12696 /* "," */ + zSep2 = ts + 12704 /* "," */ zEnd = ts + 4908 /* ")" */ } else { - zSep = ts + 12698 /* "\n " */ - zSep2 = ts + 12702 /* ",\n " */ - zEnd = ts + 12707 /* "\n)" */ + zSep = ts + 12706 /* "\n " */ + zSep2 = ts + 12710 /* ",\n " */ + zEnd = ts + 12715 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -96622,7 +96655,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12710, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12718, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*uint8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = uint8('(') @@ -96662,15 +96695,15 @@ __6: var azType1 = [5]uintptr{ ts + 1534, - ts + 12724, - ts + 12730, - ts + 12735, - ts + 12740, -} /* sqlite3.c:115999:23 */ + ts + 12732, + ts + 12738, + ts + 12743, + ts + 12748, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -96699,7 +96732,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -96728,7 +96761,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -96748,7 +96781,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -96768,7 +96801,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -96801,7 +96834,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -96840,7 +96873,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97003,7 +97036,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -97036,7 +97069,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -97080,7 +97113,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -97117,7 +97150,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -97173,10 +97206,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12746, + ts+12754, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12779, + Xsqlite3ErrorMsg(tls, pParse, ts+12787, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -97196,11 +97229,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12806, 0) + ts+12814, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12856, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12864, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -97244,7 +97277,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12888, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12896, 0) return } } @@ -97278,11 +97311,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8761 /* "table" */ - zType2 = ts + 12932 /* "TABLE" */ + zType2 = ts + 12940 /* "TABLE" */ } else { // A view zType = ts + 10376 /* "view" */ - zType2 = ts + 12938 /* "VIEW" */ + zType2 = ts + 12946 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -97307,6 +97340,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -97363,7 +97401,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12943, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12951, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -97371,7 +97409,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12958, + ts+12966, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -97389,14 +97427,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13056, + ts+13064, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13098, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13106, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -97433,7 +97471,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -97454,7 +97492,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13132, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13140, 0) goto create_view_fail __1: ; @@ -97551,7 +97589,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97591,7 +97629,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13168, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13176, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -97666,7 +97704,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*16)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -97696,7 +97734,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -97722,14 +97760,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13206, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -97743,7 +97781,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13213, + ts+13221, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*16)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -97752,7 +97790,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -97798,7 +97836,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -97807,17 +97845,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]uint8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13280, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13288, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -97850,7 +97888,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13294, + ts+13302, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -97862,7 +97900,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13339, + ts+13347, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -97881,7 +97919,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -97892,7 +97930,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3237, 4) == 0 { return 0 @@ -97913,7 +97951,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -97981,7 +98019,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -98043,7 +98081,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13406, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13414, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -98053,14 +98091,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13434, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13442, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13468, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13476, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -98075,7 +98113,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11369, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11377, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -98101,7 +98139,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -98140,7 +98178,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13500, + ts+13508, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -98153,7 +98191,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13563, 0) + ts+13571, 0) goto fk_end goto __7 __6: @@ -98238,7 +98276,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13657, + ts+13665, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -98324,7 +98362,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -98349,7 +98387,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98461,7 +98499,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -98486,7 +98524,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98495,12 +98533,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 12))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13703, + Xsqlite3ErrorMsg(tls, pParse, ts+13711, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13731 /* "FIRST" */ + return ts + 13739 /* "FIRST" */ } - return ts + 13737 /* "LAST" */ + return ts + 13745 /* "LAST" */ }())) return 1 } @@ -98519,7 +98557,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -98659,7 +98697,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13742, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13750, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -98680,7 +98718,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13748, + ts+13756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -98712,21 +98750,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13798, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13826, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13834, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13851, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 0) goto exit_create_index __17: ; @@ -98753,7 +98791,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13742, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13750, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -98768,7 +98806,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13885, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13893, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -98780,7 +98818,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13919, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13927, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -98809,7 +98847,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13943, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13951, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -98838,7 +98876,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -98884,7 +98922,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13742) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13750) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -99002,7 +99040,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13966, 0) + ts+13974, 0) goto exit_create_index __56: ; @@ -99232,7 +99270,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14027, libc.VaList(bp+48, 0)) + ts+14035, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -99288,8 +99326,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14069, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14077, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -99346,12 +99384,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14086, + zStmt = Xsqlite3MPrintf(tls, db, ts+14094, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1534 /* "" */ } - return ts + 14106 /* " UNIQUE" */ + return ts + 14114 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -99363,7 +99401,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14114, + ts+14122, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -99379,7 +99417,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14173, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14181, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -99475,7 +99513,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -99519,11 +99557,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -99558,7 +99596,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14200, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14208, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -99573,7 +99611,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14218, libc.VaList(bp+8, 0)) + ts+14226, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -99584,7 +99622,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -99614,9 +99652,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14291, + ts+14299, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11365, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11373, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -99642,7 +99680,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -99669,7 +99707,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99700,7 +99738,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -99714,7 +99752,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -99752,7 +99790,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99767,7 +99805,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14351, + Xsqlite3ErrorMsg(tls, pParse, ts+14359, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -99834,7 +99872,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -99873,7 +99911,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -99905,7 +99943,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -99968,7 +100006,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99979,12 +100017,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14387, + Xsqlite3ErrorMsg(tls, pParse, ts+14395, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14423 /* "ON" */ + return ts + 14431 /* "ON" */ } - return ts + 14426 /* "USING" */ + return ts + 14434 /* "USING" */ }())) goto append_from_error __1: @@ -100032,7 +100070,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -100054,7 +100092,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -100071,7 +100109,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*72 @@ -100095,7 +100133,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -100106,14 +100144,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14432, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14440, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -100141,7 +100179,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -100149,9 +100187,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14438 + return ts + 14446 } - return ts + 14447 + return ts + 14455 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -100163,7 +100201,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -100176,11 +100214,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14432, ts + 14454, ts + 14438} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14440, ts + 14462, ts + 14446} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -100192,7 +100230,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14462, 0) + ts+14470, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -100206,13 +100244,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14546, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14554, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -100381,7 +100419,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -100396,7 +100434,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -100413,7 +100451,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -100455,7 +100493,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -100515,14 +100553,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14563, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -100568,7 +100606,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100588,7 +100626,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -100596,7 +100634,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -100606,7 +100644,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100625,7 +100663,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+12+uintptr(i)*24)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14601, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, libc.VaList(bp, zName)) } } } @@ -100649,7 +100687,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -100679,7 +100717,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -100710,7 +100748,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -100725,7 +100763,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -100736,7 +100774,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100760,7 +100798,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+444, zName) @@ -100805,7 +100843,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -100821,7 +100859,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -100841,7 +100879,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100863,7 +100901,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14631, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14639, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -100887,7 +100925,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -100928,7 +100966,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -100964,7 +101002,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*4)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 36)) { @@ -100976,7 +101014,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -101014,7 +101052,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -101094,7 +101132,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -101129,7 +101167,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -101176,7 +101214,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -101194,7 +101232,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -101215,7 +101253,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -101234,16 +101272,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14670, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14691, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14699, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -101252,7 +101290,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -101284,7 +101322,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -101835,7 +101873,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14729) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14737) __61: ; @@ -101890,7 +101928,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -101980,7 +102018,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11225) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11233) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -102027,7 +102065,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102116,7 +102154,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -102172,7 +102210,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -102200,7 +102238,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*20 @@ -102210,14 +102248,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -102247,7 +102285,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -102258,18 +102296,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102318,7 +102356,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102330,7 +102368,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) return } iVal = -iVal @@ -102372,7 +102410,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -102487,7 +102525,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -102524,7 +102562,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -102632,7 +102670,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102670,7 +102708,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14759, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14767, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -102686,7 +102724,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -102703,7 +102741,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102724,7 +102762,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102753,7 +102791,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102777,7 +102815,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -102795,7 +102833,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102810,7 +102848,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102819,7 +102857,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102834,20 +102872,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -102887,7 +102925,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(11) defer tls.Free(11) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -103073,13 +103111,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -103097,7 +103135,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103120,7 +103158,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 120 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14764, -1) + Xsqlite3_result_error(tls, context, ts+14772, -1) return } if argc == 3 { @@ -103132,7 +103170,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14797, -1) + ts+14805, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -103160,7 +103198,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*4)), pColl) != 0 { @@ -103170,7 +103208,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -103181,7 +103219,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -103192,7 +103230,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103204,7 +103242,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -103219,7 +103257,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -103234,11 +103272,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]uint8{ uint8('0'), uint8('1'), uint8('2'), uint8('3'), uint8('4'), uint8('5'), uint8('6'), uint8('7'), uint8('8'), uint8('9'), uint8('A'), uint8('B'), uint8('C'), uint8('D'), uint8('E'), uint8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -103260,7 +103298,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14842, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14850, libc.VaList(bp+8, r1)) } } break @@ -103297,7 +103335,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14849, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14857, libc.VaList(bp+24, zArg)) break } @@ -103319,7 +103357,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -103342,7 +103380,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -103356,7 +103394,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -103394,7 +103432,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -103432,7 +103470,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -103451,7 +103489,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -103540,7 +103578,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -103643,8 +103681,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -103653,7 +103691,7 @@ var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103691,7 +103729,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14852, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14860, 4, uintptr(0)) } } @@ -103704,10 +103742,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -103719,7 +103757,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11977, -1) + Xsqlite3_result_error(tls, context, ts+11985, -1) return } @@ -103743,11 +103781,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -103757,7 +103795,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -103779,7 +103817,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -103802,12 +103840,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -103816,7 +103854,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -103824,7 +103862,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -103838,14 +103876,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -103859,7 +103897,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -103870,7 +103908,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -103880,7 +103918,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -103918,7 +103956,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -103931,11 +103969,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -103951,9 +103989,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -104018,7 +104056,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -104060,7 +104098,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -104068,7 +104106,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -104086,8 +104124,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14857, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14865, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -104097,7 +104135,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -104107,14 +104145,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14863, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14863, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -104132,7 +104170,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -104188,7 +104226,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -104217,11 +104255,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -104231,7 +104269,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -104288,18 +104326,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -104320,7 +104358,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -104346,13 +104384,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -104380,7 +104418,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -104391,109 +104429,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14868}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14888}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14901}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14919}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14876}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14896}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14909}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14927}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14928}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14951}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14977}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15002}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15011}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15022}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15029}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15060}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15060}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15060}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15064}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15068}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15075}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15110}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15133}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15139}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15145}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15149}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15156}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15181}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15213}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15230}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15248}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14936}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14959}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14985}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15010}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15019}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15037}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15068}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15068}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15068}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15072}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15076}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15083}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15098}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15104}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15131}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15141}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15153}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15157}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15171}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15182}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15189}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15204}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15238}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15256}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15304}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15308}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15314}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15312}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15316}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15322}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15337}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15351}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15345}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15359}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15364}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15370}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15376}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15383}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15398}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15408}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15412}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15422}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15437}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15378}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15384}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15391}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15406}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15410}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15430}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15435}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15441}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15445}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15466}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15478}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15449}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15453}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15458}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15463}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15486}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15491}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15499}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15502}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15342}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15507}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15499}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15510}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15515}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -104668,7 +104706,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -104779,7 +104817,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15511, + ts+15519, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -104814,7 +104852,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -104944,7 +104982,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -104971,7 +105009,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -105012,7 +105050,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -105136,7 +105174,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+56, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -105146,7 +105184,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -105160,7 +105198,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -105193,7 +105231,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -105256,7 +105294,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FiFrom @@ -105280,7 +105318,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FzCol @@ -105304,7 +105342,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -105339,7 +105377,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -105541,7 +105579,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -105600,7 +105638,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -105668,7 +105706,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -105870,7 +105908,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -105891,7 +105929,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -105951,7 +105989,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -105993,7 +106031,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -106072,7 +106110,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -106130,7 +106168,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -106166,7 +106204,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 20)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*16)).FcolFlags)) @@ -106179,7 +106217,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -106292,7 +106330,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -106346,7 +106384,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -106386,7 +106424,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -106400,7 +106438,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -106408,7 +106446,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -106419,7 +106457,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -106450,16 +106488,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -106560,7 +106598,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -106742,7 +106780,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -106832,7 +106873,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15556, + ts+15564, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -106857,7 +106898,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15597, + Xsqlite3ErrorMsg(tls, pParse, ts+15605, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -107029,7 +107070,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15629, + ts+15637, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -107039,7 +107080,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15681, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15689, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -107095,7 +107136,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15706, + Xsqlite3ErrorMsg(tls, pParse, ts+15714, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -107103,7 +107144,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15752, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15760, 0) goto insert_cleanup __57: ; @@ -107587,7 +107628,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15773) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15781) __123: ; @@ -107611,7 +107652,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -107638,7 +107679,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -107671,7 +107712,7 @@ func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng ui type IndexListTerm1 = struct { Fp uintptr Fix int32 -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -107682,7 +107723,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -107690,12 +107731,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [4]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 4 /* &.aIdx */)))).Fix @@ -107708,7 +107749,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -107814,7 +107855,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -107931,7 +107972,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -108672,7 +108713,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -108689,7 +108730,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -108792,7 +108833,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -108870,7 +108911,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -108928,7 +108969,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -108949,18 +108990,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -109314,7 +109349,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109335,7 +109370,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -109524,7 +109559,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -109858,7 +109893,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -109872,7 +109907,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -109916,7 +109951,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11977, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11985, 0) __3: ; return SQLITE_ERROR @@ -109926,7 +109961,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15787 /* "sqlite3_extensio..." */ + zEntry = ts + 15795 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -109946,7 +109981,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -109992,7 +110027,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15810, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15818, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -110006,7 +110041,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15819, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15827, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -110030,7 +110065,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15823, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15831, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -110048,7 +110083,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15829, libc.VaList(bp+16, zEntry, zFile)) + ts+15837, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -110075,7 +110110,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15872, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15880, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -110115,7 +110150,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15904, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15912, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -110125,10 +110160,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15941, -} /* sqlite3.c:129386:21 */ + ts + 15949, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -110139,7 +110174,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -110150,7 +110185,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 32)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -110169,15 +110204,15 @@ func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int3 type sqlite3AutoExtList = struct { FnExt U32 FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -110187,7 +110222,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -110228,7 +110263,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -110247,7 +110282,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -110262,7 +110297,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -110293,7 +110328,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15944, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15952, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -110339,67 +110374,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5008, - ts + 15983, + ts + 15991, ts + 8761, - ts + 15987, - ts + 15992, ts + 15995, - ts + 16005, - ts + 16015, - ts + 16021, - ts + 16025, - ts + 16030, - ts + 16035, + ts + 16000, + ts + 16003, + ts + 16013, + ts + 16023, + ts + 16029, + ts + 16033, + ts + 16038, ts + 16043, - ts + 16054, - ts + 16057, + ts + 16051, + ts + 16062, + ts + 16065, - ts + 16064, - ts + 16025, - ts + 16030, - ts + 16071, - ts + 16076, + ts + 16072, + ts + 16033, + ts + 16038, ts + 16079, - ts + 16086, - ts + 16021, - ts + 16025, - ts + 16092, - ts + 16097, - ts + 16102, - ts + 16025, - ts + 16106, - ts + 16030, + ts + 16084, + ts + 16087, + ts + 16094, + ts + 16029, + ts + 16033, + ts + 16100, + ts + 16105, + ts + 16110, + ts + 16033, ts + 16114, - ts + 16118, - ts + 16123, - ts + 11369, - ts + 11365, - ts + 16129, - ts + 16134, - ts + 16139, - ts + 15983, - ts + 16025, - ts + 16144, - ts + 16151, - ts + 16158, - ts + 8761, + ts + 16038, + ts + 16122, + ts + 16126, + ts + 16131, + ts + 11377, + ts + 11373, + ts + 16137, + ts + 16142, + ts + 16147, + ts + 15991, + ts + 16033, + ts + 16152, + ts + 16159, ts + 16166, + ts + 8761, + ts + 16174, ts + 5011, - ts + 16172, + ts + 16180, - ts + 15983, - ts + 16025, - ts + 16177, - ts + 16182, - ts + 15379, - ts + 16187, + ts + 15991, + ts + 16033, + ts + 16185, + ts + 16190, + ts + 15387, + ts + 16195, - ts + 16200, - ts + 16209, - ts + 16216, + ts + 16208, + ts + 16217, + ts + 16224, - ts + 16227, -} /* sqlite3.c:129831:19 */ + ts + 16235, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -110409,247 +110444,247 @@ type PragmaName1 = struct { FiPragCName U8 FnPragCName U8 FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16235, + { /* zName: */ FzName: ts + 16243, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16250, + { /* zName: */ FzName: ts + 16258, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16265, + { /* zName: */ FzName: ts + 16273, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16277, + { /* zName: */ FzName: ts + 16285, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16293, + { /* zName: */ FzName: ts + 16301, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16216, + { /* zName: */ FzName: ts + 16224, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16306, + { /* zName: */ FzName: ts + 16314, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16318, + { /* zName: */ FzName: ts + 16326, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16338, + { /* zName: */ FzName: ts + 16346, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16354, + { /* zName: */ FzName: ts + 16362, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16375, + { /* zName: */ FzName: ts + 16383, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16390, + { /* zName: */ FzName: ts + 16398, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16406, + { /* zName: */ FzName: ts + 16414, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16420, + { /* zName: */ FzName: ts + 16428, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16433, + { /* zName: */ FzName: ts + 16441, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16447, + { /* zName: */ FzName: ts + 16455, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16466, + { /* zName: */ FzName: ts + 16474, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16485, + { /* zName: */ FzName: ts + 16493, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16508, + { /* zName: */ FzName: ts + 16516, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16517, + { /* zName: */ FzName: ts + 16525, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16535, + { /* zName: */ FzName: ts + 16543, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16552, + { /* zName: */ FzName: ts + 16560, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16565, + { /* zName: */ FzName: ts + 16573, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16580, + { /* zName: */ FzName: ts + 16588, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16598, + { /* zName: */ FzName: ts + 16606, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16608, + { /* zName: */ FzName: ts + 16616, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16638, + { /* zName: */ FzName: ts + 16646, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16663, + { /* zName: */ FzName: ts + 16671, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16682, + { /* zName: */ FzName: ts + 16690, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16693, + { /* zName: */ FzName: ts + 16701, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16704, + { /* zName: */ FzName: ts + 16712, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16716, + { /* zName: */ FzName: ts + 16724, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16732, + { /* zName: */ FzName: ts + 16740, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16745, + { /* zName: */ FzName: ts + 16753, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16764, + { /* zName: */ FzName: ts + 16772, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16783, + { /* zName: */ FzName: ts + 16791, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16796, + { /* zName: */ FzName: ts + 16804, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16811, + { /* zName: */ FzName: ts + 16819, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16821, + { /* zName: */ FzName: ts + 16829, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16833, + { /* zName: */ FzName: ts + 16841, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16842, + { /* zName: */ FzName: ts + 16850, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16853, + { /* zName: */ FzName: ts + 16861, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16863, + { /* zName: */ FzName: ts + 16871, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16875, + { /* zName: */ FzName: ts + 16883, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16886, + { /* zName: */ FzName: ts + 16894, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16898, + { /* zName: */ FzName: ts + 16906, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16915, + { /* zName: */ FzName: ts + 16923, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16934, + { /* zName: */ FzName: ts + 16942, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16960, + { /* zName: */ FzName: ts + 16968, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16975, + { /* zName: */ FzName: ts + 16983, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16989, + { /* zName: */ FzName: ts + 16997, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17008, + { /* zName: */ FzName: ts + 17016, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17022, + { /* zName: */ FzName: ts + 17030, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17038, + { /* zName: */ FzName: ts + 17046, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17050, + { /* zName: */ FzName: ts + 17058, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17061, + { /* zName: */ FzName: ts + 17069, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17072, + { /* zName: */ FzName: ts + 17080, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17084, + { /* zName: */ FzName: ts + 17092, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17095, + { /* zName: */ FzName: ts + 17103, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17116, + { /* zName: */ FzName: ts + 17124, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17124, + { /* zName: */ FzName: ts + 17132, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17139, + { /* zName: */ FzName: ts + 17147, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17152, + { /* zName: */ FzName: ts + 17160, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17171, + { /* zName: */ FzName: ts + 17179, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17186, + { /* zName: */ FzName: ts + 17194, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -110665,7 +110700,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -110682,13 +110717,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17202)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17210)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -110697,12 +110732,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17227) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17235) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17237) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17245) { return PAGER_LOCKINGMODE_NORMAL } } @@ -110713,15 +110748,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7905) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17244) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17252) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17249) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17257) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -110736,12 +110771,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '2' { return int32(*(*uint8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16177) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16185) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17261) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17269) == 0 { return 2 } else { return 0 @@ -110751,13 +110786,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17268, 0) + ts+17276, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -110770,7 +110805,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -110784,7 +110819,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -110818,7 +110853,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -110828,7 +110863,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -110837,7 +110872,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -110853,23 +110888,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17330 /* "SET NULL" */ + zName = ts + 17338 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17339 /* "SET DEFAULT" */ + zName = ts + 17347 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17351 /* "CASCADE" */ + zName = ts + 17359 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17359 /* "RESTRICT" */ + zName = ts + 17367 /* "RESTRICT" */ break default: - zName = ts + 17368 /* "NO ACTION" */ + zName = ts + 17376 /* "NO ACTION" */ break } return zName @@ -110878,7 +110913,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint32(unsafe.Sizeof(azModeName))/uint32(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -110887,11 +110922,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17378, ts + 17385, ts + 17393, ts + 17397, ts + 17261, ts + 17406, -} /* sqlite3.c:130656:15 */ + ts + 17386, ts + 17393, ts + 17401, ts + 17405, ts + 17269, ts + 17414, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -110918,7 +110953,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -110933,13 +110968,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17410 /* "w" */ + zType = ts + 17418 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17412 /* "a" */ + zType = ts + 17420 /* "a" */ } else { zType = ts + 7415 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17414, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17422, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -110947,15 +110982,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17421, ts + 17426, ts + 17434 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17429, ts + 17434, ts + 17442 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -110977,7 +111012,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(576) defer tls.Free(576) @@ -111224,7 +111259,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17442, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17450, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -111867,7 +111902,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17446) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17454) == 0) { goto __64 } b = 2 @@ -111956,7 +111991,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17237 /* "normal" */ + zRet = ts + 17245 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -111997,7 +112032,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17227 /* "exclusive" */ + zRet = ts + 17235 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -112362,7 +112397,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 496)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17451, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17459, 0) goto pragma_out __126: ; @@ -112408,7 +112443,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17476, 0) + ts+17484, 0) goto __133 __132: if !(iDb != 1) { @@ -112464,7 +112499,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17529) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17537) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -112578,9 +112613,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17535 /* "issisii" */ + return ts + 17543 /* "issisii" */ } - return ts + 17543 /* "issisi" */ + return ts + 17551 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -112665,7 +112700,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17550, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17558, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -112718,13 +112753,13 @@ __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12650 /* "virtual" */ + zType = ts + 12658 /* "virtual" */ goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17566 /* "shadow" */ + zType = ts + 17574 /* "shadow" */ goto __183 __182: zType = ts + 8761 /* "table" */ @@ -112734,7 +112769,7 @@ __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17573, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17581, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -112804,7 +112839,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17580, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17588, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -112814,7 +112849,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17585, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17593, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*4)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -112851,8 +112886,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 504 /* azOrigin */)) = [3]uintptr{ts + 17590, ts + 17592, ts + 16054} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17594, + *(*[3]uintptr)(unsafe.Pointer(bp + 504 /* azOrigin */)) = [3]uintptr{ts + 17598, ts + 17600, ts + 16062} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17602, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -112886,7 +112921,7 @@ __199: __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17600, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17608, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FpBt))) @@ -112909,7 +112944,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17612, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -113028,7 +113063,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17607, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17615, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -113036,7 +113071,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17616)) + ts+17624)) goto __227 __227: j2++ @@ -113237,7 +113272,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17621, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17629, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 520 /* aiCols */))) @@ -113503,7 +113538,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17625, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17633, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -113605,7 +113640,7 @@ __304: goto __305 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17649, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17657, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { @@ -113627,7 +113662,7 @@ __305: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17669, + zErr = Xsqlite3MPrintf(tls, db, ts+17677, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -113671,7 +113706,7 @@ __313: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17691, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17699, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -113705,9 +113740,9 @@ __318: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 532))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17721) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17729) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17726) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17734) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -113747,7 +113782,7 @@ __322: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 532))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17747) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17755) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __319: @@ -113769,7 +113804,7 @@ __314: if !!(isQuick != 0) { goto __324 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17774) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17782) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __325: @@ -113820,7 +113855,7 @@ __266: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 524)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17803 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17811 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __329: @@ -113898,7 +113933,7 @@ __336: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __338 } - Xsqlite3ErrorMsg(tls, pParse, ts+17806, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17814, libc.VaList(bp+416, zRight)) __338: ; __333: @@ -114010,19 +114045,19 @@ __48: if !(zRight != 0) { goto __345 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17244) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17252) == 0) { goto __346 } eMode2 = SQLITE_CHECKPOINT_FULL goto __347 __346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17831) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17839) == 0) { goto __348 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __349 __348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17397) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17405) == 0) { goto __350 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -114209,7 +114244,7 @@ __365: __367: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17839, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17847, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __368 @@ -114360,9 +114395,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -114373,16 +114408,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -114391,27 +114426,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17857, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17862, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17868, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17877, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17886, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17902}, - {FzName: ts + 17909}, + {FzName: ts + 17865, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17870, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17876, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17885, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17902, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17910}, + {FzName: ts + 17917}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -114423,24 +114458,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -114457,7 +114492,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+56, int32(unsafe.Sizeof([200]uint8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17915) + Xsqlite3_str_appendall(tls, bp+32, ts+17923) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -114465,7 +114500,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17930, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17938, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -114478,16 +114513,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17937, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17945, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17943) + Xsqlite3_str_appendall(tls, bp+32, ts+17951) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17955) + Xsqlite3_str_appendall(tls, bp+32, ts+17963) j++ } Xsqlite3_str_append(tls, bp+32, ts+4908, 1) @@ -114514,7 +114549,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -114526,7 +114561,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114591,7 +114626,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -114604,7 +114639,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -114615,7 +114650,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -114623,7 +114658,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -114639,7 +114674,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114685,13 +114720,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 120 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17970) + Xsqlite3_str_appendall(tls, bp+32, ts+17978) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17978, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17986, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 16)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17982, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17990, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -114707,14 +114742,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -114726,7 +114761,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -114744,12 +114779,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -114782,7 +114817,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114793,12 +114828,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17986, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+17994, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -114807,25 +114842,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4959 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18014, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18022, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18053, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18053, - ts + 18060, - ts + 18072, -} /* sqlite3.c:133149:23 */ + ts + 18061, + ts + 18068, + ts + 18080, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -114847,7 +114882,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114892,7 +114927,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), db+172) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } libc.SetBitFieldPtr8Uint32(db+172+8, uint32(0), 0, 0x1) @@ -114930,13 +114965,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18083) + corruptSchema(tls, pData, argv, ts+18091) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), pIndex+44) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } } @@ -114949,7 +114984,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -114982,13 +115017,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8761 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7825 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18096 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18104 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FiDb = iDb @@ -115101,7 +115136,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11652) + ts+11660) rc = SQLITE_ERROR goto initone_error_out __13: @@ -115141,7 +115176,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18168) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18176) rc = SQLITE_ERROR goto initone_error_out __17: @@ -115163,7 +115198,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18192, + ts+18200, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -115250,7 +115285,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -115282,7 +115317,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -115301,7 +115336,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115354,7 +115389,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -115381,7 +115416,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -115437,7 +115472,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -115460,7 +115495,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+152)-uint32(uintptr(0)+4)) libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+196)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+196)) @@ -115473,7 +115508,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(288) defer tls.Free(288) @@ -115555,7 +115590,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18226, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18234, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -115582,7 +115617,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18256, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18264, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -115679,13 +115714,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -115714,7 +115749,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115753,14 +115788,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -115773,7 +115808,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -115790,7 +115825,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115803,7 +115838,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -115838,21 +115873,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -115886,7 +115921,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -115907,7 +115942,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115937,7 +115972,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115955,19 +115990,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -115996,7 +116031,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -116007,7 +116042,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -116057,14 +116092,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -116086,7 +116121,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -116129,18 +116164,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18275, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18283, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18319, 0) + ts+18327, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18374)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18382)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -116153,11 +116188,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -116191,7 +116226,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -116219,7 +116254,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -116264,7 +116299,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -116288,7 +116323,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 36)) == iTable) { @@ -116323,7 +116358,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116355,7 +116390,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18408, libc.VaList(bp, 0)) + ts+18416, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -116379,7 +116414,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18458, 0) + ts+18466, 0) return 1 } @@ -116414,7 +116449,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18513, libc.VaList(bp+8, zName)) + ts+18521, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -116437,11 +116472,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -116450,7 +116485,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -116463,7 +116498,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -116606,7 +116641,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -116654,7 +116689,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116735,7 +116770,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116763,7 +116798,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -117119,7 +117154,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint32(N+X)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32(1)) - uint32(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(KeyInfo{}))+uint32(nExtra))) if p != 0 { @@ -117137,7 +117172,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -117148,7 +117183,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -117168,7 +117203,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -117202,20 +117237,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18577 /* "UNION ALL" */ + z = ts + 18585 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18587 /* "INTERSECT" */ + z = ts + 18595 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18597 /* "EXCEPT" */ + z = ts + 18605 /* "EXCEPT" */ break default: - z = ts + 18604 /* "UNION" */ + z = ts + 18612 /* "UNION" */ break } return z @@ -117229,11 +117264,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18610, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18618, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -117246,7 +117281,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -117425,7 +117460,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -117503,7 +117538,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1099 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 16166 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 16174 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, uintptr(0)) @@ -117549,7 +117584,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -117606,7 +117641,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -117658,13 +117693,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16166 /* "rowid" */ + zCol = ts + 16174 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -117674,7 +117709,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*20)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -117706,7 +117741,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -117767,7 +117802,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16166 /* "rowid" */ + zName = ts + 16174 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -117780,7 +117815,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -117795,7 +117830,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18642, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18650, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -117838,7 +117873,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -117907,7 +117942,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -117942,7 +117977,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -117974,7 +118009,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -118031,7 +118066,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -118055,7 +118090,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -118124,7 +118159,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -118160,7 +118195,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18658, 0) return __1: ; @@ -118270,7 +118305,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18699, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18707, 0) goto end_of_recursive_query __15: ; @@ -118292,7 +118327,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18741, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18749, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -118335,7 +118370,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18747, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18755, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -118365,7 +118400,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -118385,11 +118420,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18762, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18770, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1534 /* "" */ } - return ts + 18785 /* "S" */ + return ts + 18793 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -118405,7 +118440,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -118441,7 +118476,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -118541,8 +118576,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18787, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18802, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18795, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) __8: ; @@ -118591,7 +118626,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18577, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18585, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -118667,7 +118702,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -118739,7 +118774,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -118904,15 +118939,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18842, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18850, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18888, + ts+18896, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -118935,7 +118970,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -119131,7 +119166,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -119338,7 +119373,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+36, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18970, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18978, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -119346,7 +119381,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18981, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18989, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -119360,7 +119395,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18986, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18994, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -119480,14 +119515,14 @@ type SubstContext1 = struct { FiNewTable int32 FisLeftJoin int32 FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -119500,7 +119535,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -119583,7 +119618,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -119593,7 +119628,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -119636,7 +119671,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -119652,7 +119687,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -119684,7 +119719,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -119717,7 +119752,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -119727,7 +119762,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+28) @@ -119754,7 +119789,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -119924,7 +119959,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120349,7 +120384,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -120357,7 +120392,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -120399,7 +120434,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -120434,7 +120469,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -120488,7 +120523,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -120555,7 +120590,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -120608,7 +120643,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -120679,7 +120714,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -120767,7 +120802,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -120783,12 +120818,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15060) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15068) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15064) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15072) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -120817,7 +120852,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -120857,7 +120892,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -120868,7 +120903,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18992, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19000, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -120896,7 +120931,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120975,12 +121010,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19010, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19018, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -120994,7 +121029,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -121029,7 +121064,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -121062,7 +121097,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -121145,7 +121180,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19033, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19041, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 7, 0x80) @@ -121172,7 +121207,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19053, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19061, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -121188,7 +121223,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19096 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19104 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -121214,7 +121249,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19119, + Xsqlite3ErrorMsg(tls, pParse, ts+19127, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -121225,9 +121260,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+34, pTab+4) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19157 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19165 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19191 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19199 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -121244,7 +121279,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -121260,7 +121295,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121275,7 +121310,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19229, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19237, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -121314,7 +121349,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -121402,7 +121437,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19241, + Xsqlite3ErrorMsg(tls, pParse, ts+19249, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -121421,7 +121456,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19280, + Xsqlite3ErrorMsg(tls, pParse, ts+19288, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -121429,7 +121464,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19311, + Xsqlite3ErrorMsg(tls, pParse, ts+19319, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -121594,7 +121629,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -121610,7 +121645,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19344, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19352, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -121630,9 +121665,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19353, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19361, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19371, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19379, 0) } } } @@ -121642,7 +121677,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19391, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19399, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -121663,7 +121698,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -121701,7 +121736,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -121749,7 +121784,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -121778,7 +121813,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -121803,7 +121838,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121831,13 +121866,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19422, 0) + ts+19430, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 20)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19473, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19481, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -121853,7 +121888,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -121892,7 +121927,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -122033,17 +122068,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19506, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19514, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19518 /* " USING COVERING ..." */ + return ts + 19526 /* " USING COVERING ..." */ } return ts + 1534 /* "" */ }(), @@ -122065,7 +122100,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) // This routine is called before the HAVING clause of the current @@ -122111,7 +122146,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -122129,7 +122164,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -122170,7 +122205,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -122187,7 +122222,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(164) defer tls.Free(164) @@ -122388,7 +122423,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19541, + ts+19549, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -122474,7 +122509,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19595, + Xsqlite3ErrorMsg(tls, pParse, ts+19603, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -122714,7 +122749,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19635, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19643, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+36+4, uint32(1), 4, 0x10) @@ -122777,7 +122812,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19650, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19658, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -123299,9 +123334,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19666 /* "DISTINCT" */ + return ts + 19674 /* "DISTINCT" */ } - return ts + 19675 /* "GROUP BY" */ + return ts + 19683 /* "GROUP BY" */ }()) groupBySort = 1 @@ -123714,7 +123749,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19666) + explainTempTable(tls, pParse, ts+19674) __141: ; @@ -123726,9 +123761,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19684 /* "RIGHT PART OF OR..." */ + return ts + 19692 /* "RIGHT PART OF OR..." */ } - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -123783,7 +123818,7 @@ type TabResult1 = struct { FnColumn U32 FnData U32 Frc int32 -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -123807,12 +123842,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123883,7 +123918,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19716, 0) + ts+19724, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -123943,7 +123978,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -124015,7 +124050,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -124046,7 +124081,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -124075,7 +124110,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -124113,7 +124148,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -124143,7 +124178,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19789, 0) goto trigger_cleanup __3: ; @@ -124204,7 +124239,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19827, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19835, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -124222,7 +124257,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) goto trigger_orphan_error __11: ; @@ -124237,7 +124272,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19827, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19835, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -124253,7 +124288,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19876, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19884, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -124270,7 +124305,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19902, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19910, 0) goto trigger_cleanup __18: ; @@ -124280,12 +124315,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19940, + Xsqlite3ErrorMsg(tls, pParse, ts+19948, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19977 /* "BEFORE" */ + return ts + 19985 /* "BEFORE" */ } - return ts + 19984 /* "AFTER" */ + return ts + 19992 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -124294,7 +124329,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19990, libc.VaList(bp+24, pTableName+8)) + ts+19998, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -124324,7 +124359,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -124420,7 +124455,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -124460,7 +124495,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+48, pParse, iDb, ts+19827, bp+40) + Xsqlite3FixInit(tls, bp+48, pParse, iDb, ts+19835, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -124497,13 +124532,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20036, + ts+20044, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20111, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20119, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -124544,7 +124579,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -124562,7 +124597,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -124579,10 +124614,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(TriggerStep{}))+(*Token)(unsafe.Pointer(pName)).Fn+uint32(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*48 @@ -124603,7 +124641,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124635,7 +124673,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124664,7 +124702,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124683,7 +124721,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -124703,7 +124741,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124769,7 +124807,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20140, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20148, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -124787,12 +124825,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -124810,7 +124848,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -124825,7 +124863,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20160, + ts+20168, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -124833,7 +124871,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -124864,7 +124902,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -124881,7 +124919,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124944,12 +124982,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20222, + ts+20230, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20270 /* "DELETE" */ + return ts + 20278 /* "DELETE" */ } - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ }())) __15: ; @@ -125008,7 +125046,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -125033,7 +125071,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -125045,7 +125083,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20284, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20292, 0) return 1 } @@ -125054,7 +125092,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -125095,7 +125133,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -125163,7 +125201,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -125250,7 +125288,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -125263,7 +125301,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(312) defer tls.Free(312) @@ -125320,7 +125358,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20326, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20334, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -125369,7 +125407,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -125398,7 +125436,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -125458,7 +125496,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -125506,7 +125544,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -125563,7 +125601,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -125593,7 +125631,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -125614,7 +125652,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -125626,7 +125664,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -125670,7 +125708,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -125753,7 +125791,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -126034,7 +126072,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20340, + ts+20348, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -126066,7 +126104,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20376, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20384, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -127107,7 +127145,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20395) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20403) __169: ; @@ -127143,7 +127181,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127316,7 +127354,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -127329,14 +127367,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -127349,7 +127387,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -127375,7 +127413,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -127495,10 +127533,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*uint8)(unsafe.Pointer(bp + 152)) = uint8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+152, ts+20408, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+152, ts+20416, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20412, libc.VaList(bp+8, bp+152)) + ts+20420, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -127517,7 +127555,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -127539,7 +127577,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -127555,7 +127593,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -127589,7 +127627,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12079, -1) + ts+12087, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -127635,7 +127673,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -127657,7 +127695,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20485, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20489, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20493, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20497, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -127675,7 +127713,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -127719,7 +127757,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -127776,7 +127814,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -127807,14 +127845,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20493) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20501) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20533) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20541) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -127825,7 +127863,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20576) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __5: ; @@ -127870,7 +127908,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20594, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20602, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -127891,7 +127929,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20625) goto end_of_vacuum __8: ; @@ -127907,7 +127945,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14432) + rc = execSql(tls, db, pzErrMsg, ts+14440) if !(rc != SQLITE_OK) { goto __9 } @@ -127959,7 +127997,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20644, + ts+20652, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -127969,7 +128007,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20752, + ts+20760, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -127984,7 +128022,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20806, + ts+20814, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -128001,7 +128039,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20957, + ts+20965, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -128114,7 +128152,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -128122,7 +128160,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -128162,7 +128200,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -128176,18 +128214,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 400)).Ffirst; pThis != 0; pThis = pNext { @@ -128208,7 +128246,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -128226,14 +128264,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -128243,7 +128281,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -128264,7 +128302,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -128301,7 +128339,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 44 + 8; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 24 { @@ -128332,7 +128370,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -128358,7 +128396,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -128378,7 +128416,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128388,7 +128426,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32(2+*(*int32)(unsafe.Pointer(pTable + 44)))) if *(*int32)(unsafe.Pointer(pTable + 44))+3 >= *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -128404,7 +128442,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -128439,7 +128477,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -128450,7 +128488,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -128485,7 +128523,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32((int32((*Token)(unsafe.Pointer(pEnd)).Fz)-int32((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21087, libc.VaList(bp, pParse+188)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21095, libc.VaList(bp, pParse+188)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -128497,7 +128535,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21111, + ts+21119, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -128507,7 +128545,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21210, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21218, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -128534,7 +128572,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -128542,7 +128580,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 252 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -128556,7 +128594,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -128577,7 +128615,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21237, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -128617,7 +128655,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21271, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21279, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */))) @@ -128631,7 +128669,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21301 /* "vtable construct..." */ + var zFormat uintptr = ts + 21309 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -128652,7 +128690,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16057, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16065, zType+uintptr(i), 6) && (i == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -128692,7 +128730,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -128711,7 +128749,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21347, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21355, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -128728,7 +128766,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -128748,7 +128786,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*4)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -128760,7 +128798,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128779,7 +128817,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21347, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -128800,7 +128838,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -128816,7 +128854,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -128890,7 +128928,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -128935,7 +128973,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -128965,7 +129003,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -128987,14 +129025,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+68)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+64)) return SQLITE_OK } @@ -129005,7 +129043,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -129066,7 +129104,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -129114,7 +129152,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129181,7 +129219,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -129220,7 +129258,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -129265,7 +129303,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -129282,19 +129320,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -129303,7 +129341,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -129331,7 +129369,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -129396,7 +129434,7 @@ type WhereClause1 = struct { Fa uintptr F__ccgo_pad2 [4]byte FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -129436,23 +129474,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -129480,9 +129518,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -129510,9 +129548,9 @@ type WhereLoop1 = struct { FpNextLoop uintptr FaLTermSpace [3]uintptr F__ccgo_pad2 [4]byte -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -129523,9 +129561,9 @@ type WherePath1 = struct { F__ccgo_pad1 [1]byte FaLoop uintptr F__ccgo_pad2 [4]byte -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -129544,9 +129582,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -129558,9 +129596,9 @@ type WhereLoopBuilder1 = struct { FbldFlags2 uint8 F__ccgo_pad1 [2]byte FiPlanLimit uint32 -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -129575,24 +129613,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -129614,7 +129652,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129640,7 +129678,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129662,7 +129700,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -129684,13 +129722,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21366 /* "" */ + return ts + 21374 /* "" */ } if i == -1 { - return ts + 16166 /* "rowid" */ + return ts + 16174 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -129701,19 +129739,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -129724,11 +129762,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_append(tls, pStr, ts+4959, 1) } @@ -129749,7 +129787,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129762,27 +129800,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21381, 2) + Xsqlite3_str_append(tls, pStr, ts+21389, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21384 /* "%s=?" */ + return ts + 21392 /* "%s=?" */ } - return ts + 21389 /* "ANY(%s)" */ + return ts + 21397 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21397) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21405) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21399) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21407) } Xsqlite3_str_append(tls, pStr, ts+4908, 1) } @@ -129794,7 +129832,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -129829,11 +129867,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+88, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21401, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21409, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21407 /* "SEARCH" */ + return ts + 21415 /* "SEARCH" */ } - return ts + 21414 /* "SCAN" */ + return ts + 21422 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -129843,30 +129881,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10853 /* "PRIMARY KEY" */ + zFmt = ts + 10861 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21419 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21427 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21452 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21460 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21477 /* "COVERING INDEX %..." */ + zFmt = ts + 21485 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21495 /* "INDEX %s" */ + zFmt = ts + 21503 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21504, 7) + Xsqlite3_str_append(tls, bp+64, ts+21512, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp uint8 - var zRowid uintptr = ts + 16166 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21512, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16174 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21520, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = uint8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21543, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21551, libc.VaList(bp+32, zRowid)) cRangeOp = uint8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = uint8('>') @@ -129874,9 +129912,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = uint8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21553, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21561, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21558, + Xsqlite3_str_appendf(tls, bp+64, ts+21566, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -129895,7 +129933,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -129913,22 +129951,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+48, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21593, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21606, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21614, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21373, 5) + Xsqlite3_str_append(tls, bp+24, ts+21381, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4908, 1) @@ -129978,7 +130016,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -130011,7 +130049,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -130044,7 +130082,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -130082,7 +130120,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -130157,7 +130195,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130350,7 +130388,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -130387,6 +130425,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -130470,7 +130509,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -130511,7 +130550,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -130539,10 +130578,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -130559,7 +130598,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -130579,7 +130618,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -130601,7 +130640,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -130666,7 +130705,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -130712,7 +130751,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130722,6 +130761,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -130754,7 +130796,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -130825,7 +130867,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -130887,53 +130928,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 60)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*4)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 16)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 16)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 60 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 60 + 4)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 24 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 20)) + 8 + uintptr(iFld-1)*20)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -130941,8 +130981,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -131578,6 +131618,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -131592,7 +131640,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -131609,7 +131659,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21622, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -131628,7 +131678,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21637, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -131976,24 +132026,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -132015,7 +132065,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -132057,14 +132107,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -132084,7 +132134,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -132111,7 +132161,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132283,7 +132333,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -132388,18 +132438,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16015, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15337, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14863, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21638, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16023, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15345, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14871, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21646, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 36)) = *(*int32)(unsafe.Pointer(pBase + 36)) @@ -132407,7 +132457,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*48)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*48)).FnChild++ @@ -132416,7 +132466,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -132447,7 +132497,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -132580,7 +132630,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -132899,7 +132949,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 uint8 var aff2 uint8 var pColl uintptr @@ -132928,7 +132978,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -132963,7 +133013,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -133001,7 +133051,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -133042,7 +133092,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -133105,7 +133155,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21645, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21653, 0) return } } @@ -133289,7 +133339,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21686 /* "NOCASE" */ + return ts + 21694 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -133410,7 +133460,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 32)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -133433,7 +133483,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -133457,7 +133507,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -133509,7 +133559,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -133559,7 +133609,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -133572,7 +133622,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -133632,7 +133682,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -133662,7 +133712,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -133672,14 +133722,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -133696,7 +133746,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -133708,7 +133758,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133733,7 +133783,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21693, + Xsqlite3ErrorMsg(tls, pParse, ts+21701, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -133791,7 +133841,7 @@ type HiddenIndexInfo1 = struct { FmIn U32 FmHandleIn U32 FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -133821,16 +133871,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -133840,7 +133890,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -133865,7 +133915,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -133886,7 +133936,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 52))&0x4>>2) != 0) { @@ -133907,14 +133957,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -133933,19 +133983,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+24, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+8, pSrc+8, uint32((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint32(unsafe.Sizeof(WhereOrCost{}))) } @@ -133955,7 +134005,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -134032,7 +134082,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -134052,14 +134102,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -134070,7 +134120,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -134174,7 +134224,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -134196,7 +134246,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -134251,7 +134301,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -134281,7 +134331,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*4)) @@ -134302,7 +134352,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -134323,7 +134373,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -134393,7 +134443,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -134410,7 +134460,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -134453,7 +134503,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -134487,7 +134537,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -134573,7 +134623,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21729, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21737, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -134654,7 +134704,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21755 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21763 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -134845,7 +134895,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -134921,7 +134971,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 760 + uintptr(iLevel)*80 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -134945,7 +135000,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -135171,7 +135226,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -135198,7 +135253,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135236,7 +135291,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -135375,7 +135430,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -135388,7 +135443,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -135432,7 +135487,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -135547,7 +135602,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 12 /* &.idxStr */))) @@ -135855,7 +135910,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+64 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -135864,7 +135919,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -135884,7 +135939,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+52)) @@ -135901,13 +135956,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -135928,7 +135983,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -135954,7 +136009,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -135998,7 +136053,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -136057,7 +136112,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -136146,7 +136201,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -136253,7 +136308,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -136356,7 +136411,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -136424,7 +136479,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -136784,7 +136839,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -136826,7 +136881,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -136901,7 +136956,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -137186,7 +137241,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -137210,7 +137265,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -137311,7 +137366,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*4)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137384,7 +137439,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137433,7 +137488,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*72 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -137456,7 +137511,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*72 var m U32 = func() uint32 { if iCons <= 31 { @@ -137479,7 +137534,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*72 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -137505,7 +137560,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*72 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -137534,7 +137589,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -137670,7 +137725,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -137795,7 +137850,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -137847,7 +137902,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21792, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21800, 0) rc = SQLITE_OK } else { goto __3 @@ -137883,7 +137938,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -138251,7 +138306,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 52)) & 0x8 >> 3) } @@ -138259,7 +138314,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -138306,7 +138361,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -138621,7 +138676,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21827, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21835, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -138713,7 +138768,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -138820,7 +138875,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -138831,7 +138886,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -138877,7 +138932,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -138952,7 +139007,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -139064,7 +139119,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -139128,7 +139183,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21845, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21853, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -139208,7 +139263,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21873, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21881, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -139749,7 +139804,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -139966,6 +140021,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -140147,7 +140204,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -140156,7 +140213,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -140172,13 +140229,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140188,7 +140245,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140207,9 +140264,9 @@ type NthValueCtx = struct { FnStep I64 FpValue uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -140272,10 +140329,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21891, -1) + pCtx, ts+21899, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140285,7 +140342,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -140298,7 +140355,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140312,7 +140369,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140325,7 +140382,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140338,7 +140395,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -140348,7 +140405,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -140356,7 +140413,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140374,7 +140431,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -140384,7 +140441,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -140392,7 +140449,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -140406,13 +140463,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -140421,14 +140478,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21947, -1) + pCtx, ts+21955, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -140436,7 +140493,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -140461,10 +140518,10 @@ func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ type LastValueCtx = struct { FpVal uintptr FnVal int32 -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -140479,7 +140536,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -140493,7 +140550,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140501,7 +140558,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140517,17 +140574,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 21992)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22003)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22014)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22019)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22032)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22042)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22048)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22059)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22069)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22081)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22000)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22011)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22022)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22027)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22040)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22050)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22056)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22067)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22077)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22089)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22094 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -140536,7 +140593,7 @@ var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c: // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -140544,7 +140601,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -140559,7 +140616,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint32(unsafe.Sizeof(aWindowFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } @@ -140578,9 +140635,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140591,7 +140648,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22090, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22098, libc.VaList(bp, zName)) } return p } @@ -140611,7 +140668,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -140635,12 +140692,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22109, 0) + ts+22117, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22180, 0) + ts+22188, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -140678,16 +140735,16 @@ type WindowUpdate = struct { FeFrmType int32 FeStart int32 FeEnd int32 -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -140786,7 +140843,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -140810,7 +140867,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -140842,7 +140899,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -140888,7 +140945,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -140896,14 +140953,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22243, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22251, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -140913,12 +140970,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -141094,7 +141154,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -141105,7 +141165,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -141120,7 +141180,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -141133,7 +141193,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -141145,7 +141205,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -141178,7 +141238,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22269, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22277, 0) goto windowAllocErr __2: ; @@ -141214,7 +141274,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -141233,7 +141293,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141244,15 +141304,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22301 /* "PARTITION clause" */ + zErr = ts + 22309 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22318 /* "ORDER BY clause" */ + zErr = ts + 22326 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22334 /* "frame specificat..." */ + zErr = ts + 22342 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22354, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22362, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -141267,7 +141327,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 44)) = pWin @@ -141275,7 +141335,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22387, 0) + ts+22395, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -141286,7 +141346,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -141306,7 +141366,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -141346,7 +141406,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -141422,7 +141482,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -141451,17 +141511,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22434, - ts + 22487, - ts + 21891, - ts + 22538, - ts + 22590, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22442, + ts + 22495, + ts + 21899, + ts + 22546, + ts + 22598, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 20)) @@ -141485,19 +141545,19 @@ type WindowCodeArg1 = struct { Fstart WindowCsrAndReg Fcurrent WindowCsrAndReg Fend WindowCsrAndReg -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -141533,7 +141593,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -141640,7 +141700,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -141676,7 +141736,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -141783,7 +141843,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -141866,7 +141926,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -141901,7 +141961,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -141926,7 +141986,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -141963,7 +142023,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -142086,7 +142146,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -142234,7 +142294,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -142265,7 +142325,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142290,7 +142350,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -142638,7 +142698,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -143034,16 +143094,16 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin type TrigEvent = struct { Fa int32 Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -143053,7 +143113,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -143072,19 +143132,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22640, + Xsqlite3ErrorMsg(tls, pParse, ts+22648, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } - return ts + 22682 /* "LIMIT" */ + return ts + 22690 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22688, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22696, 0) } } @@ -143092,7 +143152,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -143104,7 +143164,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(8) defer tls.Free(8) *(*Token)(unsafe.Pointer(bp)) = t @@ -143145,7 +143205,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -143159,14 +143219,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22722, + Xsqlite3ErrorMsg(tls, pParse, ts+22730, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -143233,7 +143293,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT type YYMINORTYPE = struct { Fyyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -143502,7 +143562,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -143730,7 +143790,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -143790,7 +143850,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -143833,7 +143893,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -143893,7 +143953,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -144095,7 +144155,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -144116,9 +144176,9 @@ type yyStackEntry = struct { Fstateno uint16 Fmajor uint16 Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -144127,9 +144187,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -144139,7 +144199,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 8 /* &.yystack */ @@ -144154,7 +144214,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -144313,7 +144373,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 12) @@ -144321,7 +144381,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+8 { yy_pop_parser_stack(tls, pParser) @@ -144344,7 +144404,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -144384,7 +144444,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -144395,7 +144455,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+8 { @@ -144405,7 +144465,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22760, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22768, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -144414,7 +144474,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 12 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -144837,7 +144897,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -145244,7 +145304,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -145256,7 +145316,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -145401,21 +145461,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16166, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16174, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16079, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16087, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 4)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -146151,7 +146211,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22809) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22817) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*12 + 4)), uintptr(0), uintptr(0), uintptr(0)) } @@ -146302,7 +146362,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 84 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 4)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp+32, bp+84)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp+32, bp+84)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -146797,21 +146857,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*Token)(unsafe.Pointer(yymsp + 4)) Xsqlite3ErrorMsg(tls, pParse, - ts+22842, 0) + ts+22850, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22937, 0) + ts+22945, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23021, 0) + ts+23029, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -147251,7 +147311,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -147261,9 +147321,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23106, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23114, 0) } //*********** End %syntax_error code ***************************************** @@ -147271,7 +147331,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -147301,7 +147361,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -147355,7 +147415,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -147406,7 +147466,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -147492,7 +147552,7 @@ var zKWText = [666]uint8{ uint8('W'), uint8('S'), uint8('U'), uint8('N'), uint8('B'), uint8('O'), uint8('U'), uint8('N'), uint8('D'), uint8('E'), uint8('D'), uint8('U'), uint8('N'), uint8('I'), uint8('O'), uint8('N'), uint8('U'), uint8('S'), uint8('I'), uint8('N'), uint8('G'), uint8('V'), uint8('A'), uint8('C'), uint8('U'), uint8('U'), uint8('M'), uint8('V'), uint8('I'), uint8('E'), uint8('W'), uint8('I'), uint8('N'), uint8('D'), uint8('O'), uint8('W'), uint8('B'), uint8('Y'), uint8('I'), uint8('N'), uint8('I'), uint8('T'), uint8('I'), uint8('A'), uint8('L'), uint8('L'), uint8('Y'), uint8('P'), uint8('R'), uint8('I'), uint8('M'), uint8('A'), uint8('R'), uint8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -147505,7 +147565,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -147522,7 +147582,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -147537,7 +147597,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -147553,7 +147613,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -147586,7 +147646,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -147719,7 +147779,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -147897,7 +147957,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147906,7 +147966,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -147915,11 +147975,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -147942,13 +148002,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147998,7 +148058,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148015,7 +148075,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148029,7 +148089,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148042,7 +148102,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -148404,7 +148464,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(1256) defer tls.Free(1256) @@ -148474,7 +148534,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 1248 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23123, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23131, libc.VaList(bp, bp+1248)) break } } @@ -148497,7 +148557,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23148, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23156, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -148594,7 +148654,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -148697,7 +148757,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23159, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23167, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -148710,11 +148770,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19827, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19835, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23166, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23174, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23171, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23179, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -148727,9 +148787,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23181, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23189, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23193, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -148771,12 +148831,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -148803,7 +148863,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -148815,11 +148875,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -148832,14 +148892,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -148852,14 +148912,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -148890,7 +148950,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -149016,7 +149076,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -149055,7 +149115,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -149063,7 +149123,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -149333,7 +149393,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -149431,13 +149491,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149456,7 +149516,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -149485,7 +149545,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -149564,11 +149624,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -149590,7 +149650,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -149603,7 +149663,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -149617,7 +149677,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -149633,39 +149693,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -149680,7 +149740,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 36)) @@ -149695,7 +149755,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -149722,7 +149782,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -149738,14 +149798,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -149769,7 +149829,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23193, 0) + ts+23201, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -149782,7 +149842,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -149819,11 +149879,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -149833,7 +149893,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -149943,7 +150003,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -149993,24 +150053,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23261 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23269 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23275 /* "abort due to ROL..." */ + zErr = ts + 23283 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23297 /* "another row avai..." */ + zErr = ts + 23305 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23319 /* "no more rows ava..." */ + zErr = ts + 23327 /* "no more rows ava..." */ break } @@ -150028,36 +150088,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23342, - ts + 23355, + ts + 23350, + ts + 23363, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23371, - ts + 23396, - ts + 23410, - ts + 23429, + ts + 23379, + ts + 23404, + ts + 23418, + ts + 23437, ts + 1470, - ts + 23454, - ts + 23491, - ts + 23503, - ts + 23518, - ts + 23551, - ts + 23569, - ts + 23594, - ts + 23623, + ts + 23462, + ts + 23499, + ts + 23511, + ts + 23526, + ts + 23559, + ts + 23577, + ts + 23602, + ts + 23631, /* SQLITE_EMPTY */ uintptr(0), ts + 5799, ts + 5285, - ts + 23640, - ts + 23658, - ts + 23676, + ts + 23648, + ts + 23666, + ts + 23684, /* SQLITE_NOLFS */ uintptr(0), - ts + 23710, + ts + 23718, /* SQLITE_FORMAT */ uintptr(0), - ts + 23731, - ts + 23757, - ts + 23780, - ts + 23801, -} /* sqlite3.c:169926:20 */ + ts + 23739, + ts + 23765, + ts + 23788, + ts + 23809, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -150066,7 +150126,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -150089,8 +150149,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -150099,7 +150159,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -150117,7 +150177,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -150130,7 +150190,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -150146,7 +150206,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -150160,7 +150220,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ libc.AtomicStoreNInt32(db+312, int32(1), 0) } @@ -150168,7 +150228,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -150178,7 +150238,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -150236,7 +150296,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23817, 0) + ts+23825, 0) return SQLITE_BUSY } else { @@ -150283,7 +150343,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -150325,22 +150385,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -150360,7 +150420,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150369,7 +150429,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23880, libc.VaList(bp, zName)) + ts+23888, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -150384,7 +150444,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -150410,7 +150470,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150428,7 +150488,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -150449,7 +150509,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150467,7 +150527,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150480,7 +150540,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150493,7 +150553,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150506,7 +150566,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -150518,7 +150578,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -150534,7 +150594,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -150552,7 +150612,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -150565,7 +150625,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -150576,7 +150636,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150605,7 +150665,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23931, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23939, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -150626,7 +150686,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -150650,7 +150710,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -150692,19 +150752,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -150726,7 +150786,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150738,7 +150798,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -150767,18 +150827,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150786,9 +150846,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150796,7 +150856,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -150806,13 +150866,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -150825,7 +150885,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -150835,7 +150895,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23952, 0) + ts+23960, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -150888,7 +150948,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -150900,7 +150960,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -150947,7 +151007,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -150980,7 +151040,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24020, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24028, uint32(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -151028,10 +151088,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24026, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24034, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24036, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24044, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -151153,7 +151213,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24064, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24072, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -151164,17 +151224,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24068, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24076, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24068 /* "cache" */ + zModeType = ts + 24076 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24074, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24082, zOpt, uint32(4)) == 0) { goto __32 } @@ -151213,7 +151273,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24079, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24087, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -151221,7 +151281,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24099, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24107, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -151264,7 +151324,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24123, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24131, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -151284,24 +151344,24 @@ __43: type OpenMode = struct { Fz uintptr Fmode int32 -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24139, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24146, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24147, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24154, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24154, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24157, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17261, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24162, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24165, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24168, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17269, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*uint8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -151317,7 +151377,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -151469,10 +151529,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21686, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21694, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24164, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24172, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -151501,7 +151561,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) @@ -151558,7 +151618,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6332 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23166 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23174 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -151657,17 +151717,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -151678,7 +151738,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24170 /* "\x00\x00" */ + zFilename = ts + 24178 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -151699,12 +151759,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151716,7 +151776,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -151734,7 +151794,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -151745,7 +151805,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -151756,7 +151816,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -151764,7 +151824,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -151777,28 +151837,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24173, + Xsqlite3_log(tls, iErr, ts+24181, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24198) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24206) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24218) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24226) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24225) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24233) } // This is a convenience routine that makes sure that all thread-specific @@ -151806,12 +151866,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -151977,7 +152037,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24242, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24250, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -151995,7 +152055,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -152010,7 +152070,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -152023,7 +152083,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -152068,7 +152128,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -152527,7 +152587,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -152536,7 +152596,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+Size_t(1)) return p + uintptr(n) + uintptr(1) @@ -152549,7 +152609,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -152580,7 +152640,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -152597,7 +152657,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -152606,7 +152666,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -152623,7 +152683,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -152633,7 +152693,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -152654,14 +152714,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -152674,7 +152734,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -152683,7 +152743,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -152698,7 +152758,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152709,7 +152769,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152720,7 +152780,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152743,7 +152803,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152786,7 +152846,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -152807,7 +152867,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -152816,7 +152876,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152828,7 +152888,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24270, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24278, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -152846,7 +152906,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152891,11 +152951,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 564 { @@ -152908,7 +152968,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 564 { @@ -152918,13 +152978,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -152948,7 +153008,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -152991,7 +153051,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24278 /* "database is dead..." */ + return ts + 24286 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -153003,7 +153063,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -153029,7 +153089,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -153133,7 +153193,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -153738,7 +153798,7 @@ var jsonIsSpace = [256]uint8{ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -153750,10 +153810,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]uint8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -153761,9 +153821,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -153775,9 +153835,9 @@ type JsonParse1 = struct { FiDepth U16 FnJson int32 FiHold U32 -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -153785,8 +153845,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24301, ts + 24307, -} /* sqlite3.c:193131:19 */ + ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24309, ts + 24315, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -153800,7 +153860,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 26 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]uint8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -153808,7 +153868,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -153816,7 +153876,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -153824,7 +153884,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -153832,7 +153892,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -153865,7 +153925,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -153877,7 +153937,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -153890,7 +153950,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -153899,7 +153959,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c uint8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -153914,7 +153974,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -153965,7 +154025,7 @@ __10: *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0' + int32(c)>>4) - c = uint8(*(*uint8)(unsafe.Pointer(ts + 24314 + uintptr(int32(c)&0xf)))) + c = uint8(*(*uint8)(unsafe.Pointer(ts + 24322 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -153985,11 +154045,11 @@ __4: var aSpecial = [32]uint8{ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8('b'), uint8('t'), uint8('n'), uint8(0), uint8('f'), uint8('r'), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -154022,7 +154082,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24331, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24339, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -154033,7 +154093,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -154060,7 +154120,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -154069,7 +154129,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -154079,7 +154139,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -154087,7 +154147,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -154189,7 +154249,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -154204,14 +154264,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z)))))<<12 + @@ -154222,7 +154282,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154503,7 +154563,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -154525,7 +154585,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -154540,7 +154600,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -154556,7 +154616,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c uint8 var j U32 var iThis int32 @@ -154783,7 +154843,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint32(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -154808,7 +154868,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24360, -1) + Xsqlite3_result_error(tls, pCtx, ts+24368, -1) } } jsonParseReset(tls, pParse) @@ -154819,7 +154879,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*12 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -154850,7 +154910,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+16, Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(U32(0)))*(*JsonParse)(unsafe.Pointer(pParse)).FnNode))) @@ -154870,7 +154930,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -154927,7 +154987,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -154950,7 +155010,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -155125,7 +155185,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*uint8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -155136,7 +155196,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24375, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24383, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -155149,11 +155209,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24379, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24387, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -155164,7 +155224,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -155216,18 +155276,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24405, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24413, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -155258,7 +155318,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155275,7 +155335,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155298,7 +155358,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -155348,7 +155408,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155382,11 +155442,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24448, uint32(2)) + jsonAppendRaw(tls, bp, ts+24456, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4949, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24451, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24459, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -155442,7 +155502,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -155515,7 +155575,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -155547,7 +155607,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -155559,14 +155619,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24454, -1) + ts+24462, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, uint8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24505, -1) + Xsqlite3_result_error(tls, ctx, ts+24513, -1) jsonReset(tls, bp) return } @@ -155586,7 +155646,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -155655,7 +155715,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -155674,7 +155734,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15270) + jsonWrongNumArgs(tls, ctx, ts+15278) return __2: ; @@ -155738,7 +155798,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -155763,9 +155823,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24539 /* "set" */ + return ts + 24547 /* "set" */ } - return ts + 24543 /* "insert" */ + return ts + 24551 /* "insert" */ }()) return __2: @@ -155836,7 +155896,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -155860,7 +155920,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -155874,7 +155934,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -155890,7 +155950,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -155915,16 +155975,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24550, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24558, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -155932,7 +155992,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -155974,7 +156034,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -155996,7 +156056,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -156020,16 +156080,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24553, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24561, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -156049,16 +156109,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -156073,7 +156133,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24556) + ts+24564) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -156086,13 +156146,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -156106,7 +156166,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -156117,7 +156177,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+32) @@ -156130,7 +156190,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -156139,13 +156199,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*12)).FjnFlags)&JNODE_LABEL != 0 { @@ -156196,7 +156256,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -156213,19 +156273,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24639, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24647, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -156314,10 +156374,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24639, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24647, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -156341,7 +156401,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24650 /* "$" */ + zRoot = ts + 24658 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -156359,7 +156419,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -156369,7 +156429,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156444,7 +156504,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156473,7 +156533,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24360, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24368, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -156549,7 +156609,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -156563,36 +156623,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint32(unsafe.Sizeof(aJsonFunc))/uint32(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24652}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24657}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24686}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24699}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24702}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24706}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24718}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24730}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24741}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24752}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24764}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24777}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24796}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24824}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24660}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24665}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24694}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24707}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24710}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24714}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24726}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24738}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24749}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24760}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24772}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24785}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24804}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24815}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24832}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(aMod))/uint32(unsafe.Sizeof(struct { @@ -156608,9 +156668,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24842 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24852 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24850 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24860 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -156656,7 +156716,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -156670,7 +156730,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -156688,9 +156748,9 @@ type RtreeCursor1 = struct { FsPoint RtreeSearchPoint FaNode [5]uintptr FanQueue [41]U32 -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr F__ccgo_pad1 [4]byte @@ -156699,24 +156759,24 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 Fcb RtreeGeomCallback @@ -156724,20 +156784,20 @@ type RtreeMatchArg1 = struct { FapSqlParam uintptr F__ccgo_pad1 [4]byte FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -156745,17 +156805,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -156781,16 +156841,16 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156803,12 +156863,12 @@ func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156821,7 +156881,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = i @@ -156832,7 +156892,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -156840,20 +156900,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 116 + uintptr(nodeHash(tls, iNode))*4)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -156861,7 +156921,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -156870,7 +156930,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 116 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*4 @@ -156885,7 +156945,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(RtreeNode{}))+uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -156901,7 +156961,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -156910,7 +156970,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156942,11 +157002,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24862, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24870, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24870, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24878, iNode, 0, pRtree+76) Xsqlite3_free(tls, zTab) } @@ -157020,7 +157080,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -157031,7 +157091,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -157044,7 +157104,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -157061,7 +157121,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -157085,7 +157145,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -157111,19 +157171,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -157139,23 +157199,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -157177,13 +157237,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -157191,7 +157251,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24875, + ts+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -157210,7 +157270,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -157228,7 +157288,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -157258,7 +157318,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -157274,7 +157334,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -157291,7 +157351,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -157403,7 +157463,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157501,7 +157561,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157556,7 +157616,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -157572,7 +157632,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -157591,7 +157651,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -157608,7 +157668,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -157628,7 +157688,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 40 } @@ -157639,7 +157699,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -157656,7 +157716,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -157690,7 +157750,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -157726,7 +157786,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -157774,7 +157834,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -157867,7 +157927,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -157883,7 +157943,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157898,7 +157958,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -157959,7 +158019,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -157980,12 +158040,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24957) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24965) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -158012,7 +158072,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -158155,7 +158215,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -158262,7 +158322,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -158305,7 +158365,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -158326,7 +158386,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -158365,7 +158425,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -158380,7 +158440,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -158393,7 +158453,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -158468,7 +158528,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -158524,7 +158584,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -158560,7 +158620,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -158568,7 +158628,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -158590,7 +158650,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -158638,7 +158698,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -158694,7 +158754,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -158793,7 +158853,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -158827,7 +158887,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -159062,7 +159122,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -159097,7 +159157,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159147,7 +159207,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -159178,7 +159238,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -159207,7 +159267,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -159322,7 +159382,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -159352,7 +159412,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159383,7 +159443,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -159394,7 +159454,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -159483,7 +159543,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -159497,7 +159557,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -159522,7 +159582,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -159530,7 +159590,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24971, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24979, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -159542,12 +159602,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24991, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24999, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25023, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25031, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -159561,7 +159621,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159790,7 +159850,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -159799,7 +159859,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -159807,7 +159867,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -159815,7 +159875,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25060, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25068, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -159836,7 +159896,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -159849,11 +159909,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25205 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25213 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 4 @@ -159861,7 +159921,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11225, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11233, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -159893,7 +159953,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName1))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -159904,8 +159964,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25261, ts + 5011, ts + 16166, -} /* sqlite3.c:199185:21 */ + ts + 25269, ts + 5011, ts + 16174, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -159929,9 +159989,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -159948,19 +160008,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25266, + ts+25274, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25328, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25336, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25333, + ts+25341, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25397, + ts+25405, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25467, + ts+25475, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -159991,7 +160051,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25516 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25524 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -160003,7 +160063,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25624, + ts+25632, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -160011,18 +160071,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25669, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25677, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12696, 1) + Xsqlite3_str_append(tls, p, ts+12704, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25696, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25704, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25718, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25726, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25726, 0) + Xsqlite3_str_appendf(tls, p, ts+25734, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -160038,24 +160098,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25742, - ts + 25795, + ts + 25750, + ts + 25803, - ts + 25840, - ts + 25892, - ts + 25946, + ts + 25848, + ts + 25900, + ts + 25954, - ts + 25991, - ts + 26049, - ts + 26104, -} /* sqlite3.c:199232:21 */ + ts + 25999, + ts + 26057, + ts + 26112, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160086,7 +160146,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160094,7 +160154,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26151, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26159, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -160106,7 +160166,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26171, + ts+26179, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+16) if rc != SQLITE_OK { @@ -160114,7 +160174,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26228, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26236, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -160124,7 +160184,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160139,7 +160199,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -160165,10 +160225,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26263, - ts + 26306, - ts + 26341, - ts + 26377, + ts + 26271, + ts + 26314, + ts + 26349, + ts + 26385, } // Aux columns counted by a u8 @@ -160205,7 +160265,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26414, + Xsqlite3_str_appendf(tls, pSql, ts+26422, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -160217,7 +160277,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26438, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26446, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -160240,7 +160300,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -160339,7 +160399,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26455, ts + 26466} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -160355,7 +160415,7 @@ var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(600) defer tls.Free(600) @@ -160399,11 +160459,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10805, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26468, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26476, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+48 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26474, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26478, 1) + Xsqlite3_str_append(tls, pOut, ts+26486, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -160418,11 +160478,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26480, -1) + Xsqlite3_result_error(tls, ctx, ts+26488, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -160448,15 +160508,15 @@ type RtreeCheck1 = struct { Frc int32 FzReport uintptr FnErr int32 -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -160469,7 +160529,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160497,7 +160557,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160509,7 +160569,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26513, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26521, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4013 /* "\n" */ @@ -160537,7 +160597,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160545,7 +160605,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26520, + ts+26528, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -160564,7 +160624,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26565, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26573, libc.VaList(bp+16, iNode)) } } @@ -160581,15 +160641,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(88) defer tls.Free(88) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26597, - ts + 26651, + ts + 26605, + ts + 26659, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -160604,23 +160664,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26699, + rtreeCheckAppendMsg(tls, pCheck, ts+26707, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26761, + ts+26769, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }(), iKey, iVal)) } } @@ -160637,7 +160697,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -160663,7 +160723,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26819, libc.VaList(bp, i, iCell, iNode)) + ts+26827, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -160683,7 +160743,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26867, libc.VaList(bp+24, i, iCell, iNode)) + ts+26875, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -160695,7 +160755,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160706,14 +160766,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26934, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26942, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26968, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26976, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -160721,7 +160781,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26998, + ts+27006, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -160749,20 +160809,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27053, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27061, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27084, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27092, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -160772,7 +160832,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -160792,13 +160852,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14432, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14440, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27151, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27159, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -160808,12 +160868,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24971, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24979, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27179, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27187, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -160828,8 +160888,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27210, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27217, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27218, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27225, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -160839,7 +160899,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27225, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27233, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -160879,13 +160939,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(4) defer tls.Free(4) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27229, -1) + ts+27237, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -160903,7 +160963,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17803 /* "ok" */ + return ts + 17811 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -160942,7 +161002,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -160968,7 +161028,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -160990,7 +161050,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -161006,7 +161066,7 @@ type GeoParse1 = struct { FnAlloc int32 FnErr int32 Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -161016,10 +161076,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -161029,7 +161089,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -161038,7 +161098,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200274:13: // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161110,7 +161170,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -161252,7 +161312,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161321,7 +161381,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161334,7 +161394,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161343,11 +161403,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27280, 1) + Xsqlite3_str_append(tls, x, ts+27288, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27282, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27290, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27293, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27301, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161357,7 +161417,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -161371,19 +161431,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep uint8 = uint8('\'') - Xsqlite3_str_appendf(tls, x, ts+27304, 0) + Xsqlite3_str_appendf(tls, x, ts+27312, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27322, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = uint8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if z != 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27346, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27342, 0) + Xsqlite3_str_appendf(tls, x, ts+27350, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161403,7 +161463,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -161436,7 +161496,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -161456,7 +161516,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -161475,7 +161535,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -161511,7 +161571,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -161531,7 +161591,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161576,7 +161636,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161717,7 +161777,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161730,13 +161790,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -161770,7 +161830,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -161797,7 +161857,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -161838,7 +161898,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -161876,7 +161936,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -161908,10 +161968,10 @@ type GeoEvent1 = struct { FpSeg uintptr FpNext uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -161921,20 +161981,20 @@ type GeoSegment1 = struct { F__ccgo_pad1 [3]byte Fidx uint32 FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -161968,7 +162028,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -161980,7 +162040,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -162010,7 +162070,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -162040,7 +162100,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -162075,7 +162135,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -162105,7 +162165,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162341,7 +162401,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -162357,7 +162417,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -162367,7 +162427,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -162407,7 +162467,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27355, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27363, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -162416,7 +162476,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27377, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27385, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -162424,7 +162484,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -162482,12 +162542,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -162501,7 +162561,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -162668,7 +162728,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -162694,7 +162754,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16166 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16174 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -162704,7 +162764,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27381 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27389 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -162712,14 +162772,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27387 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162784,7 +162844,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -162851,7 +162911,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27396, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27404, 0) __4: ; goto geopoly_update_end @@ -162995,15 +163055,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27436) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27444) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27452) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27460) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -163036,9 +163096,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint32(i) < uint32(unsafe.Sizeof(aFunc))/uint32(unsafe.Sizeof(struct { @@ -163068,7 +163128,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27467, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27475, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -163080,26 +163140,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27475 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27488 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27501 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27514 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27452 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27526 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27436 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27549 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27563 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27576 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27590 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27606 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27483 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27522 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27460 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27534 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27444 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27557 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27571 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27584 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27598 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27614 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27618 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27626 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -163107,30 +163167,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27637, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27645, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27647, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27655, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27658, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27666, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27381, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27389, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27669, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27677, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -163144,7 +163204,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -163153,7 +163213,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -163174,7 +163234,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -163202,13 +163262,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24957, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24965, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163228,7 +163288,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163680,7 +163740,7 @@ type sqlite3rbu = struct { FszTempLimit I64 FnRbu int32 FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -164081,7 +164141,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164146,7 +164206,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164208,7 +164268,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -164237,9 +164297,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 FzTbl uintptr @@ -164253,15 +164313,15 @@ type RbuState1 = struct { F__ccgo_pad2 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -164269,9 +164329,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -164290,16 +164350,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -164318,7 +164378,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -164341,7 +164401,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -164361,7 +164421,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164451,7 +164511,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164476,7 +164536,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -164493,7 +164553,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) return } @@ -164504,7 +164564,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -164519,7 +164579,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164537,7 +164597,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164561,7 +164621,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -164576,7 +164636,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))) @@ -164594,7 +164654,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -164624,7 +164684,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -164638,7 +164698,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -164647,7 +164707,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27700, uintptr(0), uintptr(0), p+36) + ts+27708, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -164719,7 +164779,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -164731,7 +164791,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24870, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24878, zIn, uint32(4)) == 0 { var i int32 for i = 4; int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -164749,7 +164809,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164759,9 +164819,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27871, libc.VaList(bp, func() uintptr { + ts+27879, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28021 /* "AND rootpage!=0 ..." */ + return ts + 28029 /* "AND rootpage!=0 ..." */ } return ts + 1534 /* "" */ }()))) @@ -164769,7 +164829,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28062) + ts+28070) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -164784,7 +164844,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -164810,7 +164870,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -164836,7 +164896,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -164853,7 +164913,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint32(2)*uint32(unsafe.Sizeof(uintptr(0))) + uint32(unsafe.Sizeof(int32(0))) + uint32(3)*uint32(unsafe.Sizeof(U8(0)))) * uint32(nCol)) var azNew uintptr @@ -164876,7 +164936,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -164899,7 +164959,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164949,7 +165009,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -164970,7 +165030,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+36, Xsqlite3_mprintf(tls, - ts+28187, libc.VaList(bp, zTab))) + ts+28195, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -164988,7 +165048,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*4, p+36, - Xsqlite3_mprintf(tls, ts+28306, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28314, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -165006,7 +165066,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28327, libc.VaList(bp+16, zIdx))) + ts+28335, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -165030,7 +165090,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28378, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28386, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -165069,7 +165129,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165079,7 +165139,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+36, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -165094,7 +165154,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+20, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 20 /* pXInfo */)), 1) if iCid >= 0 { @@ -165127,7 +165187,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165144,7 +165204,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+36, bp+56, pIter+60) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19353, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19361, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -165157,18 +165217,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28456, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28464, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28475, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28483, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+32) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*4)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28480, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28488, zName) { bRbuRowid = 1 } } @@ -165180,12 +165240,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28490, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28498, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28519 /* "may not have" */ + return ts + 28527 /* "may not have" */ } - return ts + 28532 /* "requires" */ + return ts + 28540 /* "requires" */ }())) } @@ -165194,7 +165254,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28541, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28549, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 60))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 1) @@ -165208,7 +165268,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28563, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28571, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 5) @@ -165249,7 +165309,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165258,8 +165318,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+28590, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14543 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28598, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14551 /* ", " */ } return zList } @@ -165268,7 +165328,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -165280,7 +165340,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zRet = rbuMPrintf(tls, p, ts+28599, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28607, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -165310,7 +165370,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -165319,25 +165379,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28612, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28620, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28644, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28652, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+28667) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28673, ts+28680, ts+4908) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+28675) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28681, ts+28688, ts+4908) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28688, + ts+28696, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28730, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28738, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -165369,7 +165429,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -165400,7 +165460,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -165437,7 +165497,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ __7: ; goto __5 @@ -165446,13 +165506,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28758, + zLhs = rbuMPrintf(tls, p, ts+28766, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28779, + zOrder = rbuMPrintf(tls, p, ts+28787, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28815, + zSelect = rbuMPrintf(tls, p, ts+28823, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ iCol++ goto __1 __2: @@ -165471,7 +165531,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28842, + Xsqlite3_mprintf(tls, ts+28850, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 180)))) { goto __13 @@ -165498,8 +165558,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28890, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14543 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28898, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14551 /* ", " */ goto __15 __15: iCol++ @@ -165511,7 +165571,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28897, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28905, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -165550,7 +165610,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(204) defer tls.Free(204) @@ -165568,7 +165628,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -165580,7 +165640,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28909, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28917, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FzSpan, zCollate)) zType = ts + 1534 /* "" */ } else { @@ -165594,37 +165654,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ } else { - zCol = ts + 28480 /* "rbu_rowid" */ + zCol = ts + 28488 /* "rbu_rowid" */ } zType = ts + 1099 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)) } - zRet = Xsqlite3_mprintf(tls, ts+28931, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28939, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28667 + return ts + 28675 } return ts + 1534 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28951, + zImpPK = Xsqlite3_mprintf(tls, ts+28959, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28972, + zImpCols = Xsqlite3_mprintf(tls, ts+28980, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29005, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29013, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14543 /* ", " */ - zAnd = ts + 21373 /* " AND " */ + zCom = ts + 14551 /* ", " */ + zAnd = ts + 21381 /* " AND " */ nBind++ } @@ -165661,7 +165721,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165672,11 +165732,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = Xsqlite3_mprintf(tls, ts+29029, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29037, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29041, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29049, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14543 /* ", " */ + zS = ts + 14551 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -165685,7 +165745,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29050, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29058, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -165699,24 +165759,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29065, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29073, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1534 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29079, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29087, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21381 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29091, libc.VaList(bp+40, zList)) + ts+29099, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1534 /* "" */ @@ -165724,8 +165784,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+29141, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21381 /* " AND " */ } } } @@ -165737,9 +165797,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29154, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29162, 0) } // Return a nul-terminated string containing the comma separated list of @@ -165757,7 +165817,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -165772,17 +165832,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29141, + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29180, + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29210, + zList = rbuMPrintf(tls, p, ts+29218, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } } @@ -165803,7 +165863,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -165833,26 +165893,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(64) defer tls.Free(64) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29247 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29255 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16054) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16062) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) } break } @@ -165865,15 +165925,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28667 /* " DESC" */ + zDesc = ts + 28675 /* " DESC" */ } else { zDesc = ts + 1534 /* "" */ } - z = rbuMPrintf(tls, p, ts+29260, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14543 /* ", " */ + z = rbuMPrintf(tls, p, ts+29268, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14551 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29271, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29279, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */))) } return z @@ -165896,7 +165956,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -165913,7 +165973,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, - ts+29275) + ts+29283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -165922,7 +165982,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -165932,23 +165992,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29325, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29333, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29347, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29355, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28667 /* " DESC" */ + return ts + 28675 /* " DESC" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29357, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29365, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29372, + ts+29380, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) } @@ -165972,7 +166032,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -165994,32 +166054,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29434 /* "PRIMARY KEY " */ + zPk = ts + 29442 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29447, + zSql = rbuMPrintf(tls, p, ts+29455, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29474 /* " NOT NULL" */ + return ts + 29482 /* " NOT NULL" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29484, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29492, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29491, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29499, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) @@ -166036,7 +166096,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -166046,12 +166106,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29538, + ts+29546, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -166073,7 +166133,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -166083,7 +166143,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29595) + ts+29603) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -166181,7 +166241,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -166193,7 +166253,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29661, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29669, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -166217,7 +166277,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29681, + ts+29689, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 604 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) @@ -166226,14 +166286,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, p+36, - Xsqlite3_mprintf(tls, ts+29746, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29754, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, p+36, - Xsqlite3_mprintf(tls, ts+29782, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29790, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -166250,7 +166310,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29816, + ts+29824, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -166258,9 +166318,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }() } return ts + 1534 /* "" */ @@ -166269,21 +166329,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29887, + ts+29895, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29948, + ts+29956, libc.VaList(bp+264, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -166321,17 +166381,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1534 } - return ts + 30107 + return ts + 30115 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, pz, Xsqlite3_mprintf(tls, - ts+30116, + ts+30124, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30152 /* ", _rowid_" */ + return ts + 30160 /* ", _rowid_" */ } return ts + 1534 /* "" */ }(), zBindings))) @@ -166343,28 +166403,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, pz, Xsqlite3_mprintf(tls, - ts+30162, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30170, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30190 /* ", rbu_rowid" */ + zRbuRowid = ts + 30198 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30202, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30210, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30278 /* ", 0 AS rbu_rowid" */ + return ts + 30286 /* ", 0 AS rbu_rowid" */ } return ts + 1534 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30295, + ts+30303, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -166372,7 +166432,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30594, + ts+30602, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -166386,9 +166446,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30693 /* ",_rowid_ " */ + zRbuRowid = ts + 30701 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30703 /* ",rbu_rowid" */ + zRbuRowid = ts + 30711 /* ",rbu_rowid" */ } } @@ -166401,20 +166461,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28750, 0) + zOrder = rbuMPrintf(tls, p, ts+28758, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+76, pz, Xsqlite3_mprintf(tls, - ts+30714, + ts+30722, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30762 /* "0 AS " */ + return ts + 30770 /* "0 AS " */ } return ts + 1534 /* "" */ }(), @@ -166427,7 +166487,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } return ts + 1534 /* "" */ }(), zOrder, @@ -166456,7 +166516,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -166507,9 +166567,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30107 /* "rbu_imp_" */ + zPrefix = ts + 30115 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30768, + zUpdate = Xsqlite3_mprintf(tls, ts+30776, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+4, p+36, zUpdate) @@ -166522,7 +166582,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -166545,7 +166605,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -166561,7 +166621,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166577,7 +166637,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30798, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30806, libc.VaList(bp, p+24))) for *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -166645,7 +166705,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -166657,21 +166717,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30828, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30836, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30855, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30863, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+24, ts+3237, uint32(4)) } else { libc.Xmemcpy(tls, p+24, ts+6332, uint32(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30873, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30881, libc.VaList(bp+24, p+24)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -166711,11 +166771,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30939, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30947, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24020, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24028, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*uint8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -166727,13 +166787,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30971, + zTarget = Xsqlite3_mprintf(tls, ts+30979, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ } - return ts + 31003 /* "&" */ + return ts + 31011 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ @@ -166752,21 +166812,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31005, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31013, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31020, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31028, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31037, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31045, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -166774,7 +166834,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -166785,7 +166845,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31081, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31089, 0) } } @@ -166807,7 +166867,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -166815,7 +166875,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -166848,7 +166908,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -166856,7 +166916,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166890,7 +166950,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31099, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31107, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -166940,7 +167000,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -167326,7 +167386,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 4 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31173) + ts+31181) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -167339,7 +167399,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31195, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31203, libc.VaList(bp, iCookie+1)) } } } @@ -167347,7 +167407,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -167364,7 +167424,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31222, + ts+31230, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -167402,16 +167462,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(28) defer tls.Free(28) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31380, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31388, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31395, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31403, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -167421,18 +167481,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31415, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31423, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31440) + ts+31448) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167446,12 +167506,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31548) + ts+31556) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, - ts+31613) + ts+31621) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167463,7 +167523,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31657, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31665, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -167471,7 +167531,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167485,8 +167545,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17139) - rbuCopyPragma(tls, p, ts+16250) + rbuCopyPragma(tls, p, ts+17147) + rbuCopyPragma(tls, p, ts+16258) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -167497,7 +167557,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31682, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31690, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -167523,10 +167583,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -167614,7 +167674,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -167632,7 +167692,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 48 @@ -167647,7 +167707,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31710, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31718, 0) } if rc == SQLITE_OK { @@ -167662,11 +167722,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31159, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31167, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -167681,7 +167741,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -167690,7 +167750,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]uint8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31735, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31743, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -167702,7 +167762,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -167712,7 +167772,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -167729,7 +167789,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31746, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31754, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 12 /* zErrmsg */)), -1) } else { @@ -167761,7 +167821,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -167772,7 +167832,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31818, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31826, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -167780,7 +167840,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31832) + ts+31840) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -167792,7 +167852,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31889) + ts+31897) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -167803,7 +167863,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167875,7 +167935,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31963, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31971, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -167897,12 +167957,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31995, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32003, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32027 /* "vacuum" */ + return ts + 32035 /* "vacuum" */ } - return ts + 32034 /* "update" */ + return ts + 32042 /* "update" */ }())) } } @@ -167910,7 +167970,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14432, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+36) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -167924,14 +167984,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16853) - rbuCopyPragma(tls, p, ts+16265) + rbuCopyPragma(tls, p, ts+16861) + rbuCopyPragma(tls, p, ts+16273) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32041, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32049, uintptr(0), uintptr(0), p+36) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -167941,7 +168001,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6332, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32057, uintptr(0), uintptr(0), p+36) + db, ts+32065, uintptr(0), uintptr(0), p+36) } } @@ -167976,7 +168036,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -167987,7 +168047,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -167995,13 +168055,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32081, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32089, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -168010,7 +168070,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -168026,12 +168086,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); i < nErrmsg-Size_t(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30107, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30115, uint32(8)) == 0 { var nDel int32 = 8 for int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -168044,13 +168104,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+36) } // Sync the db file if currently doing an incremental checkpoint @@ -168064,7 +168124,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+36) } // Close any open statement handles. @@ -168076,7 +168136,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32089, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32097, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -168109,13 +168169,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -168148,7 +168208,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168166,7 +168226,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -168175,7 +168235,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168194,19 +168254,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14432 /* "BEGIN" */ + zBegin = ts + 14440 /* "BEGIN" */ } else { - zBegin = ts + 32041 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32049 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32041, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32049, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168273,7 +168333,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -168290,7 +168350,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 224)) += nDiff @@ -168308,7 +168368,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -168330,7 +168390,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 100; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 56 { @@ -168355,7 +168415,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -168370,7 +168430,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -168402,7 +168462,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -168411,20 +168471,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168488,7 +168548,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168527,7 +168587,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -168541,7 +168601,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -168555,7 +168615,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -168575,7 +168635,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168595,7 +168655,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -168603,7 +168663,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -168611,7 +168671,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -168638,7 +168698,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32116, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32124, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -168663,7 +168723,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32139, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32147, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -168674,7 +168734,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168682,7 +168742,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168690,7 +168750,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168723,7 +168783,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168780,13 +168840,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168809,7 +168869,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -168851,7 +168911,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32150, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32158, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -168895,10 +168955,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -168907,7 +168967,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168952,7 +169012,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -168960,7 +169020,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -168970,7 +169030,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -168978,7 +169038,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -168986,7 +169046,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -168995,7 +169055,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -169004,7 +169064,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -169012,7 +169072,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -169020,13 +169080,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -169040,7 +169100,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -169101,17 +169161,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -169194,7 +169254,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -169265,7 +169325,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -169274,16 +169334,16 @@ type SessionChange1 = struct { FnRecord int32 FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -169294,13 +169354,13 @@ type SessionInput1 = struct { FxInput uintptr FpIn uintptr FbEof int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -169308,13 +169368,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -169324,13 +169384,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -169343,7 +169403,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -169351,7 +169411,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -169373,7 +169433,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -169461,7 +169521,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 40)) += I64(Xsqlite3_msize(tls, pRet)) @@ -169472,7 +169532,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 40)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -169495,14 +169555,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -169512,7 +169572,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -169525,7 +169585,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169591,7 +169651,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169617,7 +169677,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169660,7 +169720,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -169699,7 +169759,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -169738,7 +169798,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -169765,7 +169825,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -169840,7 +169900,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -169928,7 +169988,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -169992,7 +170052,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -170009,13 +170069,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11225, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11233, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32161, 0) + ts+32169, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1534, 0) } else { @@ -170028,7 +170088,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32282, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32290, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -170123,7 +170183,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170140,7 +170200,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11225, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -170159,15 +170219,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170183,7 +170243,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170199,21 +170259,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -170327,7 +170387,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -170623,7 +170683,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -170658,7 +170718,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170693,25 +170753,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170730,24 +170790,24 @@ func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:21176 type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -170755,13 +170815,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170777,7 +170837,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170787,9 +170847,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32311, + zRet = Xsqlite3_mprintf(tls, ts+32319, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ if zRet == uintptr(0) { break } @@ -170799,7 +170859,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170812,9 +170872,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32345, + ts+32353, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 32386 /* " OR " */ + zSep = ts + 32394 /* " OR " */ if zRet == uintptr(0) { break } @@ -170829,18 +170889,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32391, + ts+32399, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170868,7 +170928,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -170880,7 +170940,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32469, + ts+32477, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -170905,7 +170965,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171018,7 +171078,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32522, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32530, 0) __16: ; rc = SQLITE_SCHEMA @@ -171078,7 +171138,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -171114,7 +171174,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -171136,7 +171196,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -171174,7 +171234,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -171186,7 +171246,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -171237,7 +171297,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -171282,7 +171342,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -171305,7 +171365,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -171316,7 +171376,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 4)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -171327,7 +171387,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint32(nBlob)) *(*int32)(unsafe.Pointer(p + 4)) += nBlob @@ -171340,7 +171400,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint32(nStr)) @@ -171354,7 +171414,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171371,7 +171431,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -171392,7 +171452,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171452,7 +171512,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -171558,7 +171618,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171615,7 +171675,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171623,10 +171683,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11225, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32549, libc.VaList(bp, zDb)) + ts+32557, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = SQLITE_NOMEM } @@ -171635,18 +171695,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1534 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32659, bp+20) + sessionAppendStr(tls, bp+8, ts+32667, bp+20) sessionAppendIdent(tls, bp+8, zDb, bp+20) sessionAppendStr(tls, bp+8, ts+1547, bp+20) sessionAppendIdent(tls, bp+8, zTab, bp+20) - sessionAppendStr(tls, bp+8, ts+32674, bp+20) + sessionAppendStr(tls, bp+8, ts+32682, bp+20) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+20) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp+20) - sessionAppendStr(tls, bp+8, ts+32682, bp+20) + sessionAppendStr(tls, bp+8, ts+32690, bp+20) sessionAppendInteger(tls, bp+8, i+1, bp+20) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -171666,7 +171726,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171744,7 +171804,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -171765,7 +171825,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171787,7 +171847,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32688, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32696, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -171885,7 +171945,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+12 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32708, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32716, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -171895,7 +171955,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -171907,7 +171967,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -171915,7 +171975,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -171927,7 +171987,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -171935,7 +171995,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -171947,7 +172007,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -171960,7 +172020,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -171974,12 +172034,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -172005,12 +172065,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -172043,28 +172103,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -172082,7 +172142,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172115,7 +172175,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172140,7 +172200,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -172176,7 +172236,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -172194,7 +172254,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -172219,7 +172279,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -172261,7 +172321,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172280,7 +172340,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -172307,7 +172367,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172349,7 +172409,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172369,7 +172429,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -172404,7 +172464,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -172461,13 +172521,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -172537,7 +172597,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) == uintptr(0) { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -172568,7 +172628,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172588,14 +172648,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -172609,7 +172669,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -172628,7 +172688,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -172650,7 +172710,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -172674,7 +172734,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -172691,7 +172751,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -172703,7 +172763,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -172720,7 +172780,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -172956,7 +173016,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -173007,7 +173067,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -173022,7 +173082,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -173044,9 +173104,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -173066,9 +173126,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -173076,7 +173136,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173137,7 +173197,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint32(unsafe.Sizeof(SessionUpdate{})) * uint32(nU32) * uint32(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11225) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11233) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = SQLITE_NOMEM @@ -173149,24 +173209,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*12 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint32(nU32)*uint32(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32726, bp+12) + sessionAppendStr(tls, bp, ts+32734, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32739, bp+12) + sessionAppendStr(tls, bp, ts+32747, bp+12) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32745, bp+12) + sessionAppendStr(tls, bp, ts+32753, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1534 /* "" */ - sessionAppendStr(tls, bp, ts+32674, bp+12) + sessionAppendStr(tls, bp, ts+32682, bp+12) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) @@ -173174,13 +173234,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32750, bp+12) + ts+32758, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32682, bp+12) + sessionAppendStr(tls, bp, ts+32690, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } @@ -173210,7 +173270,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -173238,7 +173298,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173248,34 +173308,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32825, bp+12) + sessionAppendStr(tls, bp, ts+32833, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32674, bp+12) + sessionAppendStr(tls, bp, ts+32682, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32745, bp+12) + sessionAppendStr(tls, bp, ts+32753, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32843, bp+12) + sessionAppendStr(tls, bp, ts+32851, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32386, bp+12) + sessionAppendStr(tls, bp, ts+32394, bp+12) zSep = ts + 1534 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32682, bp+12) + sessionAppendStr(tls, bp, ts+32690, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32851 /* "AND " */ + zSep = ts + 32859 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4908, bp+12) @@ -173300,7 +173360,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6332, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } @@ -173312,7 +173372,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173320,19 +173380,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32856, bp+12) + sessionAppendStr(tls, bp, ts+32864, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21379, bp+12) + sessionAppendStr(tls, bp, ts+21387, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14543, bp+12) + sessionAppendStr(tls, bp, ts+14551, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32874, bp+12) + sessionAppendStr(tls, bp, ts+32882, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32885, bp+12) + sessionAppendStr(tls, bp, ts+32893, bp+12) } sessionAppendStr(tls, bp, ts+4908, bp+12) @@ -173343,7 +173403,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -173351,24 +173411,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11225, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11233, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32889) + ts+32897) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+33002) + ts+33010) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -173395,7 +173455,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173416,7 +173476,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -173440,7 +173500,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -173484,7 +173544,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173556,7 +173616,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173656,7 +173716,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173791,7 +173851,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173813,7 +173873,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33146, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33154, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -173829,7 +173889,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33175, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -173838,7 +173898,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173892,7 +173952,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -173910,10 +173970,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33186, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33194, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33212, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33220, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+128, 4 @@ -173983,20 +174043,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33242, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33250, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33286, + ts+33294, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 128)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 136)), uint32(*(*int32)(unsafe.Pointer(bp + 128)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33357, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33365, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11225) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11233) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -174054,14 +174114,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33417, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33425, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33471, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33479, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -174083,7 +174143,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174101,7 +174161,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174109,7 +174169,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174124,7 +174184,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174132,7 +174192,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174304,7 +174364,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174435,7 +174495,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174489,7 +174549,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -174504,7 +174564,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174522,12 +174582,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174544,12 +174604,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -174557,7 +174617,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174581,7 +174641,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174608,7 +174668,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -174649,7 +174709,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -174711,7 +174771,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174849,7 +174909,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -174864,7 +174924,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174879,7 +174939,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174895,7 +174955,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174911,7 +174971,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -174919,7 +174979,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -175008,7 +175068,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -175070,13 +175130,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -175111,14 +175171,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -175133,7 +175193,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -175144,7 +175204,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -175154,19 +175214,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [2]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -175198,7 +175258,7 @@ type Fts5Index1 = struct { FiStructVersion I64 FpStruct uintptr F__ccgo_pad2 [4]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -175209,16 +175269,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -175233,7 +175293,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -175244,7 +175304,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -175260,7 +175320,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -175269,7 +175329,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -175288,7 +175348,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -175299,7 +175359,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -175315,7 +175375,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -175324,7 +175384,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -175335,9 +175395,9 @@ type Fts5ExprNode1 = struct { FnChild int32 FapChild [1]uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -175346,39 +175406,39 @@ type Fts5Parse1 = struct { FapPhrase uintptr FpExpr uintptr FbPhraseToAnd int32 -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 FpColset uintptr FnPhrase int32 FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -175482,7 +175542,7 @@ type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ type Fts5YYMINORTYPE = struct { Ffts5yyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -175555,7 +175615,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -175570,23 +175630,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -175623,9 +175683,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [2]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -175634,9 +175694,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -175646,7 +175706,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 8 /* &.fts5yystack */ @@ -175665,7 +175725,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -175681,7 +175741,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -175739,7 +175799,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 12) @@ -175747,7 +175807,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+8 { fts5yy_pop_parser_stack(tls, pParser) @@ -175760,7 +175820,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -175784,7 +175844,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -175808,7 +175868,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -175819,7 +175879,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+8 { @@ -175829,7 +175889,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33499, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33507, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -175838,7 +175898,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 12 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -175887,7 +175947,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -175920,7 +175980,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -175932,7 +175992,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -176142,7 +176202,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176152,14 +176212,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33535, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -176188,7 +176248,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -176243,7 +176303,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -176305,7 +176365,7 @@ type CInstIter1 = struct { FnInst int32 FiStart int32 FiEnd int32 -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -176356,11 +176416,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -176403,7 +176463,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(CInstIter{}))) @@ -176435,12 +176495,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -176449,7 +176509,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176457,7 +176517,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33558, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33566, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -176465,7 +176525,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176520,7 +176580,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -176531,7 +176591,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33565 /* "wrong number of ..." */ + var zErr uintptr = ts + 33573 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176579,19 +176639,19 @@ type Fts5SFinder1 = struct { FnFirst int32 FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -176615,7 +176675,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -176644,7 +176704,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176702,7 +176762,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -176711,7 +176771,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -176734,7 +176794,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33615 /* "wrong number of ..." */ + var zErr uintptr = ts + 33623 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176926,17 +176986,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -176947,7 +177007,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -177041,7 +177101,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -177109,18 +177169,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(48) defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33663, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33671, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33679, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33681, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33689, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -177145,7 +177205,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -177160,7 +177220,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -177186,7 +177246,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -177198,21 +177258,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -177230,7 +177290,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -177242,7 +177302,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -177260,7 +177320,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -177276,26 +177336,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177357,14 +177417,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+8, pIter+16) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -177376,7 +177436,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -177388,9 +177448,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177407,7 +177467,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -177428,7 +177488,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -177453,7 +177513,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -177478,13 +177538,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177493,7 +177553,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177539,7 +177599,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint32(unsafe.Sizeof([512]uintptr{}))/uint32(unsafe.Sizeof(uintptr(0))))); i++ { @@ -177571,18 +177631,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { @@ -177595,7 +177655,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { p++ @@ -177606,11 +177666,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*uint8)(unsafe.Pointer(p))) { case 'n': @@ -177699,7 +177759,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q uint8 var iIn int32 = 1 var iOut int32 = 0 @@ -177744,7 +177804,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote uint8 // Quote character (if any ) quote = *(*uint8)(unsafe.Pointer(z)) @@ -177756,11 +177816,11 @@ func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ type Fts5Enum1 = struct { FzName uintptr FeVal int32 -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -177788,13 +177848,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(76) defer tls.Free(76) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33686, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33694, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -177821,14 +177881,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*uint8)(unsafe.Pointer(p))) < '0' || int32(*(*uint8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33693, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33701, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33724, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33732, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177839,7 +177899,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33757, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33765, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177852,7 +177912,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33794, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33802, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + Size_t(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, Sqlite3_int64(unsafe.Sizeof(uintptr(0)))*nArg) @@ -177861,7 +177921,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33811, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -177880,7 +177940,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33836, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33844, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -177895,14 +177955,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33870, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33878, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33878, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33886, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*uint8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33910, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33918, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -177910,9 +177970,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33916, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33924, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33930, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33938, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -177920,9 +177980,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33968, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33976, zCmd, nCmd) == 0 { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || int32(*(*uint8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33987, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -177933,25 +177993,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5026, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7905, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17244}, - {FzName: ts + 34014, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17252}, + {FzName: ts + 34022, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+44, zArg, pConfig+48)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34022, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34030, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34053, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34061, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -177969,7 +178029,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -178003,20 +178063,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22014) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16166) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34081, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22022) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16174) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34111) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34119) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34121, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34129, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -178026,7 +178086,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -178034,13 +178094,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34152, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34160, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34157, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34165, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34164, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34172, libc.VaList(bp+16, i)) } } } @@ -178059,7 +178119,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -178088,8 +178148,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*4)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22014) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34172, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22022) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34180, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -178123,7 +178183,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34201, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34209, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -178164,19 +178224,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33870 /* "content" */ + zTail = ts + 33878 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34221 /* "docsize" */ + zTail = ts + 34229 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34229, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34237, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16166, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16174, -1) } // Formulate the zContentExprlist text @@ -178192,7 +178252,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -178217,7 +178277,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -178225,18 +178285,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34240, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34248, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1534 } - return ts + 14543 + return ts + 14551 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34256, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34264, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34263, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22014)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34271, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22022)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -178267,7 +178327,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -178281,7 +178341,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -178308,7 +178368,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178372,13 +178432,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34289) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34297) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -178388,7 +178448,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34294) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34302) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -178398,7 +178458,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34311) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -178411,7 +178471,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34313) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34321) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -178421,7 +178481,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34323) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34331) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -178437,7 +178497,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22014) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22022) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 4 @@ -178460,11 +178520,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34335 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34343 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -178487,7 +178547,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 36))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34367) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34375) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40 /* bDummy */)) = 0 @@ -178502,7 +178562,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34375, + ts+34383, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -178537,7 +178597,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -178556,9 +178616,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -178570,12 +178630,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178637,7 +178697,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34440, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34448, 0) return FTS5_EOF } } @@ -178650,20 +178710,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34460, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34468, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = (int32(z2) - int32(z)) / 1 - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34491, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34499, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34494, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34502, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29877, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29885, uint32(3)) == 0 { tok = FTS5_AND } break @@ -178675,15 +178735,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -178761,7 +178821,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -178836,7 +178896,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -178848,7 +178908,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -178856,7 +178916,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -178897,7 +178957,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -178919,7 +178979,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -179083,7 +179143,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -179309,11 +179369,11 @@ type Fts5LookaheadReader1 = struct { F__ccgo_pad1 [4]byte FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+8, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -179321,7 +179381,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -179334,9 +179394,9 @@ type Fts5NearTrimmer1 = struct { Fwriter Fts5PoslistWriter FpOut uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -179353,7 +179413,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -179555,7 +179615,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -179575,7 +179635,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179602,7 +179662,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179659,7 +179719,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179725,7 +179785,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -179741,7 +179801,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -179750,7 +179810,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179776,7 +179836,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -179795,7 +179855,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -179863,7 +179923,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20 var rc int32 = SQLITE_OK @@ -179922,7 +179982,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -179941,7 +180001,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20)).FpIter @@ -179959,7 +180019,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var i int32 @@ -179975,7 +180035,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -180001,7 +180061,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -180051,7 +180111,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -180063,7 +180123,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32 + 1*4)) @@ -180093,7 +180153,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -180109,7 +180169,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -180162,7 +180222,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -180224,7 +180284,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -180256,7 +180316,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -180272,15 +180332,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180290,7 +180350,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -180315,7 +180375,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 20)).FbFirst = U8(1) } @@ -180327,7 +180387,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -180386,12 +180446,12 @@ func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhra type TokenCtx1 = struct { FpPhrase uintptr Frc int32 -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180460,12 +180520,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -180476,12 +180536,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -180498,7 +180558,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -180556,7 +180616,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -180651,17 +180711,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34498, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34506, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33535, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180673,7 +180733,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c uint8 = *(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34503, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34511, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -180692,7 +180752,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -180730,7 +180790,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -180752,7 +180812,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180770,7 +180830,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20376, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20384, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -180791,7 +180851,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5Colset{})) + uint32((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint32(unsafe.Sizeof(int32(0)))) @@ -180806,7 +180866,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -180830,7 +180890,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -180858,21 +180918,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34532, 0) + ts+34540, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -180923,7 +180983,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+32+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*4, pSub+32, uint32(nByte)) @@ -180943,7 +181003,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 12)))).FnTerm var ii int32 var nByte int32 @@ -180986,7 +181046,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181046,12 +181106,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+20)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34585, + ts+34593, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34635 /* "phrase" */ + return ts + 34643 /* "phrase" */ } - return ts + 34498 /* "NEAR" */ + return ts + 34506 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -181074,7 +181134,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -181120,7 +181180,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -181133,7 +181193,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -181143,7 +181203,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -181152,7 +181212,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -181173,7 +181233,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint32((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -181197,12 +181257,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -181212,7 +181272,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -181247,7 +181307,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181275,7 +181335,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)))).Fposlist.Fn = 0 } else { @@ -181286,7 +181346,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -181336,12 +181396,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -181392,7 +181452,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -181408,14 +181468,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -181443,7 +181503,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -181452,7 +181512,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -181466,7 +181526,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181475,7 +181535,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181486,7 +181546,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -181516,7 +181576,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -181565,7 +181625,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -181724,7 +181784,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181770,7 +181830,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -181812,7 +181872,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -181846,20 +181906,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+16) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*40 @@ -182085,7 +182145,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -182293,14 +182353,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -182309,18 +182369,18 @@ type Fts5DlidxLvl1 = struct { FiLeafPgno int32 F__ccgo_pad1 [4]byte FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer F__ccgo_pad1 [4]byte -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -182335,18 +182395,18 @@ type Fts5Iter1 = struct { FaFirst uintptr F__ccgo_pad2 [4]byte FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -182369,9 +182429,9 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad2 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr F__ccgo_pad1 [4]byte @@ -182380,9 +182440,9 @@ type Fts5DoclistIter1 = struct { FnPoslist int32 FnSize int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 Fwriter Fts5PageWriter @@ -182398,9 +182458,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -182409,38 +182469,38 @@ type Fts5Structure1 = struct { FnLevel int32 FaLevel [1]Fts5StructureLevel F__ccgo_pad2 [4]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -182448,7 +182508,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+36, nByte) } @@ -182466,7 +182526,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -182490,7 +182550,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182501,7 +182561,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -182513,7 +182573,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -182540,7 +182600,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34642, iRowid, 0, p+40) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34650, iRowid, 0, p+40) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -182586,11 +182646,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -182602,7 +182662,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -182617,7 +182677,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182628,7 +182688,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+44, Xsqlite3_mprintf(tls, - ts+34648, + ts+34656, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -182645,7 +182705,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182656,7 +182716,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34699, + ts+34707, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+48, zSql) != 0 { return @@ -182670,7 +182730,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182680,7 +182740,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+56, Xsqlite3_mprintf(tls, - ts+34748, + ts+34756, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -182692,7 +182752,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -182703,22 +182763,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -182729,7 +182789,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint32(unsafe.Sizeof(Fts5Structure{})) + uint32((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint32(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -182771,7 +182831,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182864,7 +182924,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -182884,7 +182944,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*12 var aNew uintptr @@ -182907,7 +182967,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182935,7 +182995,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 4 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182944,7 +183004,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+68, - Xsqlite3_mprintf(tls, ts+34788, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34796, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -182968,7 +183028,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -182985,7 +183045,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -182999,7 +183059,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -183052,14 +183112,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*12 @@ -183102,7 +183162,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -183151,7 +183211,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183187,7 +183247,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -183208,7 +183268,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -183221,7 +183281,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -183229,11 +183289,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -183254,7 +183314,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183316,7 +183376,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -183339,12 +183399,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -183354,7 +183414,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -183396,16 +183456,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -183435,7 +183495,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183464,7 +183524,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183509,7 +183569,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -183541,7 +183601,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183575,7 +183635,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -183597,7 +183657,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -183638,7 +183698,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183697,7 +183757,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -183747,7 +183807,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 80 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*96 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -183755,7 +183815,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183784,7 +183844,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -183889,7 +183949,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -184014,7 +184074,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -184114,7 +184174,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -184142,7 +184202,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -184376,7 +184436,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184384,7 +184444,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+60, Xsqlite3_mprintf(tls, - ts+34811, + ts+34819, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -184395,7 +184455,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -184465,7 +184525,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184521,7 +184581,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+68) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -184536,7 +184596,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -184588,7 +184648,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -184618,7 +184678,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -184668,7 +184728,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -184679,7 +184739,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -184702,7 +184762,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 80 + uintptr(iChanged)*96 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -184742,7 +184802,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 80 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*96 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -184753,7 +184813,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184792,7 +184852,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184817,12 +184877,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -184841,7 +184901,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -184857,21 +184917,21 @@ type PoslistCallbackCtx1 = struct { FpBuf uintptr FpColset uintptr FeState int32 -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -184881,7 +184941,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184907,7 +184967,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184987,7 +185047,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -185043,7 +185103,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -185094,7 +185154,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185155,7 +185215,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185163,7 +185223,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185183,7 +185243,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -185191,7 +185251,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+28) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+28) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185207,7 +185267,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -185269,7 +185329,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185291,7 +185351,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -185336,7 +185396,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -185539,7 +185599,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -185572,7 +185632,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -185580,13 +185640,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 80 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*96)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -185605,7 +185665,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 80 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*96 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -185618,7 +185678,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -185660,7 +185720,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -185673,7 +185733,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -185683,7 +185743,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -185704,7 +185764,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint32(unsafe.Sizeof(Fts5DlidxWriter{}))*uint32(nLvl))) @@ -185723,7 +185783,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -185745,7 +185805,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -185778,7 +185838,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+36, pWriter+76, nTerm, pTerm) @@ -185788,7 +185848,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -185801,7 +185861,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185817,7 +185877,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -185877,7 +185937,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 4 var iRowid I64 @@ -185913,14 +185973,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 4 var pPgidx uintptr = pWriter + 4 + 20 @@ -185996,7 +186056,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 4 @@ -186025,7 +186085,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186054,7 +186114,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 4 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -186078,7 +186138,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186099,7 +186159,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+52, Xsqlite3_mprintf(tls, - ts+34895, + ts+34903, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -186118,7 +186178,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186187,13 +186247,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -186352,7 +186412,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186402,7 +186462,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -186419,7 +186479,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186436,7 +186496,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -186446,14 +186506,14 @@ type Fts5FlushCtx1 = struct { FpIdx uintptr F__ccgo_pad1 [4]byte Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186478,7 +186538,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -186656,7 +186716,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -186665,7 +186725,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -186726,7 +186786,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186760,7 +186820,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186785,12 +186845,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+36, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -186817,7 +186877,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186849,7 +186909,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -186859,13 +186919,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186882,7 +186942,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -186938,11 +186998,11 @@ type PrefixMerger1 = struct { FaPos uintptr FpNext uintptr F__ccgo_pad1 [4]byte -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -186953,7 +187013,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -186966,7 +187026,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(936) defer tls.Free(936) @@ -187131,7 +187191,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 900 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187278,7 +187338,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -187298,7 +187358,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -187309,7 +187369,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -187320,7 +187380,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187339,7 +187399,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187350,13 +187410,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34952, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34960, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24870, ts+34960, 0, pzErr) + pConfig, ts+24878, ts+34968, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11365, - ts+34995, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11373, + ts+35003, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -187373,7 +187433,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -187394,7 +187454,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -187421,7 +187481,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -187443,7 +187503,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -187467,7 +187527,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187550,7 +187610,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -187558,7 +187618,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187578,14 +187638,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187603,7 +187663,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187616,7 +187676,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -187638,7 +187698,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -187646,7 +187706,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -187655,7 +187715,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187668,7 +187728,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34642, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34650, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */))) @@ -187677,7 +187737,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -187691,7 +187751,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -187711,7 +187771,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -187730,7 +187790,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187789,7 +187849,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+28) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187805,7 +187865,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35039, + ts+35047, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -187958,7 +188018,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -188017,7 +188077,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+80+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*96, uintptr(0), bp+8) - sqlite3Fts5BufferAppendBlob(tls, p+36, bp+8, uint32(4), ts+35125) + sqlite3Fts5BufferAppendBlob(tls, p+36, bp+8, uint32(4), ts+35133) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fn, bp+20, bp+24) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) & int64(0x7FFFFFFF)) @@ -188048,13 +188108,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -188087,7 +188147,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -188109,7 +188169,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -188117,9 +188177,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -188147,17 +188207,17 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr F__ccgo_pad1 [4]byte @@ -188166,18 +188226,18 @@ type Fts5Sorter1 = struct { FnIdx int32 FaIdx [1]int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -188211,20 +188271,20 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -188234,13 +188294,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -188258,7 +188318,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188316,11 +188376,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -188329,14 +188389,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 56)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -188407,7 +188467,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188428,7 +188488,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR } @@ -188569,7 +188629,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -188580,7 +188640,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -188606,7 +188666,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -188619,11 +188679,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 60)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -188666,7 +188726,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -188683,7 +188743,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188693,7 +188753,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 60)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 60)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -188727,7 +188787,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -188747,7 +188807,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -188776,7 +188836,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188835,7 +188895,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188863,7 +188923,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -188892,11 +188952,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35169, + ts+35177, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14543 /* ", " */ + return ts + 14551 /* ", " */ } return ts + 1534 /* "" */ }(), @@ -188908,9 +188968,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35224 /* "DESC" */ + return ts + 35232 /* "DESC" */ } - return ts + 35229 /* "ASC" */ + return ts + 35237 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -188930,7 +188990,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -188945,7 +189005,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188961,13 +189021,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35233, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35241, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5008, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35239, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35247, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -188977,7 +189037,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -188990,7 +189050,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -189002,7 +189062,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35267, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35275, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -189034,7 +189094,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35277, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35285, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -189043,7 +189103,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189066,21 +189126,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 60)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35298, libc.VaList(bp, z)) + ts+35306, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33681 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33689 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -189099,7 +189159,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -189139,7 +189199,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR __1: ; @@ -189374,7 +189434,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35331, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35339, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -189420,7 +189480,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -189431,7 +189491,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -189445,7 +189505,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -189475,7 +189535,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189519,7 +189579,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -189541,7 +189601,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189549,29 +189609,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35367, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35375, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35378, 0) + ts+35386, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35458, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35466, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35466, 0) + ts+35474, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16833, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16841, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35522, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35530, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35528, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -189590,7 +189650,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) if eType1 == SQLITE_INTEGER { @@ -189600,7 +189660,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -189623,7 +189683,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189645,7 +189705,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17378, z) { + 0 == Xsqlite3_stricmp(tls, ts+17386, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -189670,12 +189730,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35544, + ts+35552, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ } - return ts + 35581 /* "DELETE from" */ + return ts + 35589 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -189725,7 +189785,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -189737,7 +189797,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -189746,7 +189806,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -189754,7 +189814,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -189762,46 +189822,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -189818,7 +189878,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189875,7 +189935,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -189959,7 +190019,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -189969,7 +190029,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -189985,11 +190045,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -190001,7 +190061,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190059,7 +190119,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190097,7 +190157,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -190119,7 +190179,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190141,7 +190201,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190164,7 +190224,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190197,7 +190257,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190278,10 +190338,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190317,7 +190377,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -190326,7 +190386,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -190336,7 +190396,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190349,7 +190409,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35593, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35601, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -190359,7 +190419,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -190381,7 +190441,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -190445,7 +190505,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -190485,7 +190545,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -190504,12 +190564,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -190517,7 +190577,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190526,7 +190586,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190535,7 +190595,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -190544,7 +190604,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -190575,7 +190635,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -190604,7 +190664,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -190622,7 +190682,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -190638,7 +190698,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190654,7 +190714,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35614, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35622, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -190673,7 +190733,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 8 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35636, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35644, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -190689,7 +190749,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -190715,28 +190775,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35667) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35675) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35680, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35688, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName2))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -190747,10 +190807,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35771, ts + 33870, ts + 24870, ts + 34221, ts + 11365, -} /* sqlite3.c:234311:21 */ + ts + 35779, ts + 33878, ts + 24878, ts + 34229, ts + 11373, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -190771,7 +190831,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35778, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35786, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -190789,13 +190849,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35778, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35786, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35783, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35791, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -190833,7 +190893,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -190842,7 +190902,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -190850,7 +190910,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -190861,20 +190921,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 28 + uintptr(eStmt)*4)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35798, - ts + 35866, - ts + 35935, + ts + 35806, + ts + 35874, + ts + 35943, - ts + 35968, - ts + 36007, - ts + 36047, - ts + 36086, - ts + 36127, + ts + 35976, + ts + 36015, + ts + 36055, + ts + 36094, + ts + 36135, - ts + 36166, + ts + 36174, - ts + 36208, - ts + 36248, + ts + 36216, + ts + 36256, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -190951,7 +191011,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -190973,79 +191033,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36271, + ts+36279, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36375, + ts+36383, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36413, + ts+36421, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36451, + ts+36459, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24870, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11365, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35771, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24878, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11373, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35779, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34221, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34229, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33870, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33878, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(68) defer tls.Free(68) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36493, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36501, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36523, + ts+36531, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -191058,7 +191118,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191087,27 +191147,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36567, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36575, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36590, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36598, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33870, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33878, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34221, ts+36596, 0, pzErr) + pConfig, ts+34229, ts+36604, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35771, ts+36628, 1, pzErr) + pConfig, ts+35779, ts+36636, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -191119,7 +191179,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -191138,12 +191198,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -191160,7 +191220,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -191229,7 +191289,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191256,7 +191316,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+16, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -191270,7 +191330,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -191294,7 +191354,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191335,7 +191395,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -191347,12 +191407,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36645, + ts+36653, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36695, + ts+36703, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -191362,12 +191422,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -191431,15 +191491,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -191450,7 +191510,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191472,7 +191532,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191504,7 +191564,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -191549,7 +191609,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -191557,7 +191617,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36724, + zSql = Xsqlite3_mprintf(tls, ts+36732, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -191584,13 +191644,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191656,7 +191716,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -191754,14 +191814,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 40 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33870, bp+40) + rc = fts5StorageCount(tls, p, ts+33878, bp+40) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 40)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34221, bp+48) + rc = fts5StorageCount(tls, p, ts+34229, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -191781,7 +191841,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -191795,7 +191855,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 28 + uintptr(eStmt)*4)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -191805,7 +191865,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -191823,7 +191883,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191854,7 +191914,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -191872,7 +191932,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -191889,7 +191949,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -191903,12 +191963,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191963,13 +192023,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*uint8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -191979,12 +192039,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -192000,9 +192060,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint32(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36756) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36764) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36775) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -192019,7 +192079,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(aIn + uintptr(i))) @@ -192031,7 +192091,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -192111,7 +192171,7 @@ type Unicode61Tokenizer1 = struct { FnException int32 FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -192121,11 +192181,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -192180,7 +192240,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -192202,7 +192262,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -192212,7 +192272,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*uint8)(unsafe.Pointer(z)) != 0 { @@ -192232,7 +192292,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -192243,7 +192303,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36778 /* "L* N* Co" */ + var zCat uintptr = ts + 36786 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -192256,7 +192316,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36787) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36795) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -192267,18 +192327,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36798) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36806) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '2' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*uint8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36756) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36764) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36775) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36787) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36795) { // no-op } else { rc = SQLITE_ERROR @@ -192300,12 +192360,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 148 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -192561,7 +192621,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]uint8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -192570,10 +192630,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -192584,7 +192644,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -192592,7 +192652,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36816 /* "unicode61" */ + var zBase uintptr = ts + 36824 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -192637,9 +192697,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -192647,15 +192707,15 @@ type PorterRule1 = struct { FxCond uintptr FzOutput uintptr FnOutput int32 -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -192676,12 +192736,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -192691,7 +192751,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -192701,7 +192761,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -192719,14 +192779,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -192741,13 +192801,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36826, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192755,11 +192815,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36829, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36837, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192767,7 +192827,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36839, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192775,7 +192835,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192783,11 +192843,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36845, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192795,19 +192855,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36855, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36867, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36865, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36870, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192815,11 +192875,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192827,7 +192887,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36881, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192835,11 +192895,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36885, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192847,22 +192907,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint32(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint32(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36901, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -192870,34 +192914,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-3), uint32(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36909, aBuf+uintptr(nBuf-3), uint32(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36885, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36913, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36908, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36911, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36919, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36901, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36923, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36909, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -192907,143 +192967,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36885, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36934, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36933, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36941, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36938, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36829, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36837, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36901, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36909, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36953, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36961, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15379, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15387, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36958, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36919, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36970, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36870, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36878, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36973, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36977, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36985, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36901, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36985, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36909, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37001, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36885, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36885, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36893, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37012, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-7), uint32(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36897, uint32(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37026, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36905, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37030, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37034, uint32(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-7), uint32(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37046, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36897, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36905, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36911, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36919, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -193053,22 +193113,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37057, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37062, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37070, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -193076,21 +193136,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37067, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37073, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37034, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193098,7 +193158,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -193106,9 +193166,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37085, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -193118,18 +193178,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37091, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37095, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37103, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37098, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -193138,7 +193198,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37101, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -193155,7 +193215,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -193171,7 +193231,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193269,7 +193329,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -193290,20 +193350,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -193314,7 +193374,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37105) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37113) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -193334,7 +193394,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -193487,7 +193547,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -193501,27 +193561,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(64) defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36816, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36824, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37120, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37128, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37126, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37133, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -193547,7 +193607,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -193570,7 +193630,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -193641,7 +193701,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -193660,7 +193720,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -193721,7 +193781,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -193779,7 +193839,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -193791,9 +193851,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*uint8)(unsafe.Pointer(zCat))) { case 'C': @@ -193990,7 +194050,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -194169,7 +194229,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -194348,9 +194408,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -194390,7 +194450,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -194422,7 +194482,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194497,7 +194557,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -194673,7 +194733,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -194719,7 +194779,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -194732,7 +194792,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -194792,7 +194852,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -194832,7 +194892,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -194852,9 +194912,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -194862,7 +194922,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -194870,14 +194930,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37141) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37145) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37153) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37157) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37158, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37166, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -194887,14 +194947,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -194919,24 +194979,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4 /* azSchema */)) = [3]uintptr{ - ts + 37192, - ts + 37232, - ts + 37267, + ts + 37200, + ts + 37240, + ts + 37275, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23166, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23174, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37310, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37318, 0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -194989,11 +195049,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -195007,7 +195067,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -195075,7 +195135,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -195088,11 +195148,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37343, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37351, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37374, + ts+37382, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -195116,7 +195176,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 68 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37425, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37433, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -195142,7 +195202,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -195156,7 +195216,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+56) @@ -195165,7 +195225,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195196,7 +195256,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -195225,7 +195285,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -195369,7 +195429,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -195443,12 +195503,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -195521,16 +195581,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37451, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37459, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -195547,7 +195607,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -195574,966 +195634,966 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37461 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37469 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 4)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2568 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 208 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 336)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 36)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 84)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 132)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 16)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 56)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 136)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 176)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 216)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 256)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 296)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 336)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 376)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 416)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 496)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 536)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 576)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 616)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 656)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 696)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 700)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 704)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 708)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 736)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 740)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 748)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 4)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2568 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 208 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 336)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 36)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 84)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 132)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 16)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 56)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 136)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 176)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 216)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 256)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 296)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 336)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 376)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 416)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 496)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 536)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 576)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 616)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 656)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 696)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 700)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 704)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 708)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 736)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 740)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 748)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 28 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 40 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 52 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 64 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 76 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off64_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 88 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 100 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 136 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 172 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 196 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 208 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 220 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, X__mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 232 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 244 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 268 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 280 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 292 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr - }{libc.Xmremap})) // sqlite3.c:35283:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmremap})) // sqlite3.c:35292:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 316 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 328 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1028)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1036)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1044)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1028)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1036)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1044)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go index dbd6327c..b69ceaf4 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -2143,7 +2143,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2251,8 +2251,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3747,7 +3747,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5546,7 +5546,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -5571,7 +5571,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -5590,12 +5590,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -5624,7 +5624,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5732,7 +5732,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5838,7 +5838,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5944,7 +5944,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -6019,7 +6019,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -6084,7 +6084,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6109,7 +6109,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6125,7 +6125,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -6148,7 +6148,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6322,7 +6322,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6481,7 +6481,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6498,12 +6498,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6537,7 +6537,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6557,7 +6557,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6577,7 +6577,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6621,7 +6621,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6658,7 +6658,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -6678,13 +6678,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6714,7 +6714,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6727,7 +6727,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -6748,13 +6748,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6764,13 +6764,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6972,7 +6972,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7174,7 +7174,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7228,7 +7228,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7260,22 +7260,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7295,7 +7295,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7309,7 +7309,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7930,7 +7930,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7938,7 +7938,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -9777,13 +9777,13 @@ type Max_align_t = struct { // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -9794,7 +9794,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -9817,12 +9817,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -9845,7 +9845,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -9987,13 +9987,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -10001,7 +10001,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -10013,7 +10013,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -10023,7 +10023,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -10037,7 +10037,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -10048,7 +10048,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -10059,7 +10059,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -10069,7 +10069,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -10079,9 +10079,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -10096,7 +10096,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr uint8 @@ -10116,7 +10116,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -10138,7 +10138,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -10155,17 +10155,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -10180,17 +10180,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -10221,7 +10221,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -10231,7 +10231,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -10244,7 +10244,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -10263,10 +10263,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -10277,7 +10277,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -10288,9 +10288,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -10372,14 +10372,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -10398,21 +10398,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -10422,9 +10422,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -10435,9 +10435,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -10445,7 +10445,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -10470,14 +10470,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -10488,9 +10488,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -10516,15 +10516,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -10554,7 +10554,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -10563,14 +10563,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -10586,7 +10586,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -10596,7 +10596,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -10614,7 +10614,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -10627,7 +10627,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -10645,7 +10645,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -10659,7 +10659,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -10668,7 +10668,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -10678,9 +10678,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -10709,9 +10709,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -10745,7 +10745,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -10753,14 +10753,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -10771,7 +10771,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -10798,7 +10798,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -10869,7 +10869,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -10887,7 +10887,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -10958,7 +10958,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -10983,7 +10983,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -11022,7 +11022,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -11033,9 +11033,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -11139,11 +11139,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -11155,7 +11155,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -11183,7 +11183,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -11192,11 +11192,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -11261,7 +11261,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -11279,10 +11279,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -11358,7 +11358,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -11409,7 +11409,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -11503,7 +11503,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -11516,7 +11516,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -11581,7 +11581,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11604,7 +11604,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11626,7 +11626,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11652,7 +11652,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11676,7 +11676,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11702,7 +11702,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11726,7 +11726,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -11854,9 +11854,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1039, ts + 1053, ts + 1066, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -11923,10 +11923,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -11990,7 +11990,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -12050,12 +12050,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -12073,21 +12073,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -12103,7 +12103,7 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:219 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), uint8(SQLITE_AFF_BLOB), @@ -12111,7 +12111,7 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_INTEGER), uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]uint8{ uint8(0), uint8(SQLITE_BLOB), @@ -12119,7 +12119,7 @@ var Xsqlite3StdTypeMap = [6]uint8{ uint8(SQLITE_INTEGER), uint8(SQLITE_FLOAT), uint8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1086, ts + 1090, @@ -12127,7 +12127,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1099, ts + 1107, ts + 1112, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -12172,10 +12172,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -12198,10 +12198,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -12213,7 +12213,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -12267,7 +12267,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -12332,7 +12332,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -12346,7 +12346,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -12358,13 +12358,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12375,7 +12375,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]uint8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12383,7 +12383,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12398,7 +12398,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12410,20 +12410,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -12438,7 +12438,7 @@ var statMutex = [10]uint8{ uint8(1), // SQLITE_STATUS_PAGECACHE_SIZE uint8(0), // SQLITE_STATUS_SCRATCH_SIZE uint8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -12448,7 +12448,7 @@ var statMutex = [10]uint8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -12462,7 +12462,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -12470,14 +12470,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -12488,12 +12488,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -12511,7 +12511,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -12527,7 +12527,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -12537,7 +12537,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -12549,7 +12549,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -13135,14 +13135,14 @@ type DateTime1 = struct { FtzSet uint8 FisError uint8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -13169,7 +13169,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -13226,7 +13226,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -13242,7 +13242,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -13316,7 +13316,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13369,7 +13369,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = uint8(1) } @@ -13378,7 +13378,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -13434,7 +13434,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13485,7 +13485,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) @@ -13500,7 +13500,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(1) if r >= 0.0 && r < 5373484.5 { @@ -13523,7 +13523,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13552,12 +13552,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -13602,7 +13602,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -13621,13 +13621,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -13657,7 +13657,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -13682,7 +13682,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -13722,7 +13722,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) @@ -13750,7 +13750,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -13774,7 +13774,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -14100,7 +14100,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -14141,7 +14141,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14157,7 +14157,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14172,7 +14172,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -14221,7 +14221,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14249,7 +14249,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14301,7 +14301,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -14445,7 +14445,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -14454,7 +14454,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -14463,7 +14463,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -14472,7 +14472,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -14485,7 +14485,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1343}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1352}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1365}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -14537,7 +14537,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -14546,27 +14546,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -14576,27 +14576,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -14609,7 +14609,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -14618,7 +14618,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14626,7 +14626,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -14638,7 +14638,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -14647,23 +14647,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -14671,14 +14671,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -14686,7 +14686,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -14700,7 +14700,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -14710,14 +14710,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*uint8)(unsafe.Pointer(zPathOut)) = uint8(0) return (*struct { @@ -14725,7 +14725,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -14733,25 +14733,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -14768,13 +14768,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14783,7 +14783,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14808,7 +14808,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -14828,7 +14828,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -14838,7 +14838,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -14848,11 +14848,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -14874,7 +14874,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -14894,7 +14894,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14917,7 +14917,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14962,7 +14962,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -14993,8 +14993,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -15004,7 +15004,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -15013,14 +15013,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -15118,7 +15118,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15141,7 +15141,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -15150,7 +15150,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -15166,7 +15166,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15188,18 +15188,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -15208,7 +15208,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15223,7 +15223,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -15357,7 +15357,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -15391,7 +15391,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -15401,7 +15401,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15414,7 +15414,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -15425,7 +15425,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -15434,7 +15434,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -15443,7 +15443,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -15458,7 +15458,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -15497,40 +15497,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -15543,11 +15543,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -15610,7 +15610,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -15623,22 +15623,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -15654,7 +15654,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -15682,7 +15682,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -15699,7 +15699,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -15718,7 +15718,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -15741,12 +15741,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+24, 0) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -15754,7 +15754,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15769,7 +15769,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15782,7 +15782,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -15793,7 +15793,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -15840,7 +15840,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15869,7 +15869,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15879,7 +15879,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15887,27 +15887,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -15926,7 +15926,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -15937,7 +15937,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -15955,14 +15955,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -15988,7 +15988,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -15996,7 +15996,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -16057,7 +16057,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -16067,7 +16067,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -16075,7 +16075,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -16085,7 +16085,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -16097,7 +16097,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -16128,7 +16128,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16138,7 +16138,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -16176,7 +16176,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16196,7 +16196,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -16220,7 +16220,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -16234,7 +16234,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -16248,7 +16248,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -16266,7 +16266,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -16279,7 +16279,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -16295,7 +16295,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -16316,7 +16316,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+432, int32(0), 0) @@ -16332,7 +16332,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -16351,7 +16351,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -16380,7 +16380,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -16391,18 +16391,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: uint8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: uint8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -16429,7 +16429,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: uint8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: uint8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: uint8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -16440,7 +16440,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -16455,7 +16455,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -16470,7 +16470,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:2 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -16482,21 +16482,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -16510,7 +16510,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -16532,7 +16532,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -18021,7 +18021,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29902:29 */ // End of function @@ -18029,7 +18029,7 @@ var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -18056,7 +18056,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -18071,7 +18071,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -18125,7 +18125,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -18141,7 +18141,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sq // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) @@ -18151,7 +18151,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -18163,14 +18163,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -18184,7 +18184,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*uint8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = uint8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -18196,7 +18196,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -18214,10 +18214,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -18229,7 +18229,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -18237,7 +18237,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -18245,7 +18245,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -18254,7 +18254,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -18276,7 +18276,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -18287,7 +18287,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -18305,7 +18305,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -18327,7 +18327,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -18339,7 +18339,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -18359,7 +18359,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -18383,7 +18383,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -18398,7 +18398,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -18420,7 +18420,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -18438,7 +18438,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -18450,7 +18450,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -18505,7 +18505,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -18549,10 +18549,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -18631,16 +18631,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -18648,7 +18648,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -18670,7 +18670,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -18739,7 +18739,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -18766,7 +18766,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -18793,7 +18793,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -19118,7 +19118,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -19152,7 +19152,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -19184,7 +19184,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -19205,7 +19205,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -19564,7 +19564,7 @@ type Double_t = float64 /* math.h:150:16 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -19576,7 +19576,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19596,7 +19596,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -19608,7 +19608,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { @@ -19623,7 +19623,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -19633,7 +19633,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -19645,7 +19645,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -19656,7 +19656,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -19676,7 +19676,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -19703,7 +19703,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -19734,7 +19734,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -19759,7 +19759,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote uint8 var i int32 var j int32 @@ -19791,7 +19791,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*uint8)(unsafe.Pointer(z + uintptr(j))) = uint8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -19811,7 +19811,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -19829,7 +19829,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -19844,7 +19844,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -19856,7 +19856,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -19882,7 +19882,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -19906,7 +19906,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -19922,7 +19922,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -19965,7 +19965,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -20345,7 +20345,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -20386,7 +20386,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -20415,7 +20415,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -20537,7 +20537,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20570,7 +20570,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20632,7 +20632,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20645,7 +20645,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -20688,7 +20688,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -20734,7 +20734,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -20757,7 +20757,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -20910,7 +20910,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20978,7 +20978,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -20986,7 +20986,7 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20996,7 +20996,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -21007,7 +21007,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -21017,7 +21017,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -21035,7 +21035,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -21056,7 +21056,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1535) @@ -21075,7 +21075,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -21092,21 +21092,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023: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:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043: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:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -21120,7 +21120,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -21151,11 +21151,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -21173,11 +21173,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -21198,7 +21198,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -21250,7 +21250,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -21289,7 +21289,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21308,7 +21308,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21347,7 +21347,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -21358,7 +21358,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -21375,7 +21375,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -21390,7 +21390,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -21427,7 +21427,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -21471,7 +21471,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -21500,11 +21500,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -21533,7 +21533,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -21551,7 +21551,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -21600,7 +21600,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -21790,7 +21790,7 @@ var azName = [185]uintptr{ ts + 3189, ts + 3194, ts + 3202, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -23442,7 +23442,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -23475,7 +23475,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -23491,10 +23491,10 @@ type unixShmNode = struct { F__ccgo_pad2 [4]byte FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -23512,18 +23512,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -23549,16 +23549,16 @@ type unixFile = struct { FpMapRegion uintptr FsectorSize int32 FdeviceCharacteristics int32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -23583,7 +23583,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -23598,7 +23598,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -23666,14 +23666,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3410, FpCurrent: 0}, {FzName: ts + 3416}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { return 0 } @@ -23684,7 +23684,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -23721,7 +23721,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -23737,7 +23737,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -23775,7 +23775,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -23842,14 +23842,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -23859,7 +23859,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, int64(sz)) @@ -23875,7 +23875,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -23924,7 +23924,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -24025,12 +24025,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -24048,7 +24048,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24082,7 +24082,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3217, func() uintptr { @@ -24096,19 +24096,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -24118,7 +24118,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -24152,7 +24152,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -24211,7 +24211,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -24228,7 +24228,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -24264,7 +24264,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24330,7 +24330,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -24382,7 +24382,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24629,7 +24629,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -24650,7 +24650,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24784,7 +24784,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -24797,11 +24797,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -24811,7 +24811,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -24861,26 +24861,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -24921,7 +24921,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -24957,7 +24957,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -24999,7 +24999,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -25034,7 +25034,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -25133,7 +25133,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -25171,7 +25171,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -25226,7 +25226,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -25252,13 +25252,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -25315,7 +25315,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -25361,7 +25361,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -25388,7 +25388,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3329, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3329, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -25404,7 +25404,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25423,7 +25423,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -25435,7 +25435,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -25446,7 +25446,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -25461,7 +25461,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -25477,7 +25477,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -25508,7 +25508,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -25553,7 +25553,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -25568,7 +25568,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -25579,7 +25579,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25690,7 +25690,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -25711,7 +25711,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -25728,7 +25728,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -25738,7 +25738,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -25750,7 +25750,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25782,7 +25782,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25823,7 +25823,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size // Page size must be a power of 2 @@ -25837,7 +25837,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -25854,7 +25854,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -25869,7 +25869,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25913,7 +25913,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -25960,7 +25960,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -26056,7 +26056,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3212, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3212, zShm, 39446) goto shm_open_err __10: ; @@ -26124,7 +26124,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(132) defer tls.Free(132) @@ -26227,7 +26227,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39590) goto shmpage_out __14: ; @@ -26275,7 +26275,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -26333,7 +26333,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -26347,7 +26347,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -26454,7 +26454,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -26467,7 +26467,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -26510,7 +26510,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -26533,7 +26533,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3370 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -26567,7 +26567,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -26592,7 +26592,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -26629,7 +26629,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -26656,7 +26656,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -26717,33 +26717,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -26756,7 +26756,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -26766,7 +26766,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26823,7 +26823,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -26846,7 +26846,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -26864,17 +26864,17 @@ var azTempDirs = [6]uintptr{ ts + 3680, ts + 3689, ts + 1547, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3694) azTempDirs[1] = libc.Xgetenv(tls, ts+3708) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -26901,7 +26901,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -26945,7 +26945,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -26996,7 +26996,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -27032,7 +27032,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -27106,7 +27106,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(528) defer tls.Free(528) @@ -27304,7 +27304,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3212, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3212, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -27404,7 +27404,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27415,7 +27415,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41141) } return rc } @@ -27425,9 +27425,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -27444,7 +27444,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -27466,7 +27466,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -27489,7 +27489,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -27500,7 +27500,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3230, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3230, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = uint8('/') @@ -27509,7 +27509,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*uint8)(unsafe.Pointer(zOut + uintptr(iOff))) = uint8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3614, libc.VaList(bp, zPath)) @@ -27560,7 +27560,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -27586,7 +27586,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3410, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3410, zIn, 41322) } } else { bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000)) @@ -27600,20 +27600,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3401, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3401, zIn, 41340) } else { if int32(*(*uint8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint64(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint64(n)) @@ -27685,7 +27685,7 @@ type Dl_serinfo = struct { } } /* dlfcn.h:196:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -27695,7 +27695,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27709,7 +27709,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -27735,13 +27735,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27776,7 +27776,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -27789,7 +27789,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -27812,7 +27812,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -27826,12 +27826,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27847,7 +27847,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -28029,7 +28029,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -28067,14 +28067,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3763, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3773, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3653, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -28116,15 +28116,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -28138,9 +28138,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -28150,13 +28150,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -28173,7 +28173,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -28189,21 +28189,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -28241,7 +28241,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -28258,7 +28258,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -28280,7 +28280,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -28311,7 +28311,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -28326,14 +28326,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -28342,7 +28342,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -28386,7 +28386,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28415,13 +28415,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -28435,7 +28435,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -28446,7 +28446,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -28521,7 +28521,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -28532,7 +28532,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28542,7 +28542,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -28551,21 +28551,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -28573,7 +28573,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -28581,19 +28581,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -28601,7 +28601,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28624,7 +28624,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -28715,7 +28715,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28810,7 +28810,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -28832,7 +28832,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -28845,7 +28845,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -28874,7 +28874,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -28888,7 +28888,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -29025,7 +29025,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -29064,7 +29064,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -29079,7 +29079,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -29116,7 +29116,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -29279,7 +29279,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -29341,7 +29341,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -29353,7 +29353,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -29378,7 +29378,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -29391,7 +29391,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -29399,7 +29399,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -29413,7 +29413,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -29430,7 +29430,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -29477,7 +29477,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -29505,7 +29505,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -29556,7 +29556,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29576,7 +29576,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29592,7 +29592,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -29605,7 +29605,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -29614,7 +29614,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -29627,7 +29627,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -29642,7 +29642,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -29654,7 +29654,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -29663,7 +29663,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -29673,7 +29673,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -29682,7 +29682,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -29701,7 +29701,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -29735,19 +29735,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -29786,7 +29786,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -29829,7 +29829,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -29841,17 +29841,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -29859,7 +29859,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -29871,7 +29871,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -29888,20 +29888,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -30016,7 +30016,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -30102,7 +30102,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -30112,12 +30112,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -30125,9 +30125,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -30144,10 +30144,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -30165,7 +30165,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -30198,7 +30198,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -30243,7 +30243,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -30276,7 +30276,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -30306,7 +30306,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -30320,7 +30320,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -30358,7 +30358,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -30375,13 +30375,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -30399,7 +30399,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -30415,7 +30415,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -30456,7 +30456,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -30473,7 +30473,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -30491,7 +30491,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -30512,7 +30512,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -30560,7 +30560,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -30598,7 +30598,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -30607,7 +30607,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -30657,7 +30657,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -30680,7 +30680,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30695,7 +30695,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -30710,7 +30710,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -30828,7 +30828,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -30857,7 +30857,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -30868,7 +30868,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -30882,7 +30882,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30907,7 +30907,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -30938,7 +30938,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -30951,7 +30951,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30974,7 +30974,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30994,16 +30994,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -31014,7 +31014,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -31112,7 +31112,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -31125,13 +31125,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -31151,7 +31151,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -31170,7 +31170,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -31181,7 +31181,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -31204,7 +31204,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -31234,7 +31234,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -31269,7 +31269,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -31305,7 +31305,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31336,7 +31336,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -31367,7 +31367,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -31400,7 +31400,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -31433,7 +31433,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -31618,7 +31618,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -32387,7 +32387,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -32420,11 +32420,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -32447,7 +32447,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -32469,7 +32469,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32486,7 +32486,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32503,7 +32503,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -32530,7 +32530,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -32564,7 +32564,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -32598,7 +32598,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -32657,7 +32657,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -32686,7 +32686,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32721,7 +32721,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -32736,7 +32736,7 @@ var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -32846,7 +32846,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32956,7 +32956,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33016,21 +33016,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -33047,7 +33047,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -33076,7 +33076,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -33168,7 +33168,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -33193,7 +33193,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -33257,7 +33257,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -33384,7 +33384,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -33416,7 +33416,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -33461,7 +33461,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -33695,7 +33695,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33861,7 +33861,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33896,7 +33896,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -33928,7 +33928,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -33996,7 +33996,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -34131,39 +34131,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -34172,25 +34178,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -34199,10 +34205,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -34220,7 +34226,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -34229,24 +34235,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*uint8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -34254,14 +34260,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3845, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -34281,7 +34287,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34335,7 +34341,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -34362,7 +34368,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -34393,7 +34399,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -34424,7 +34430,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -34472,7 +34478,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34503,7 +34509,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34557,7 +34563,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34625,7 +34631,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -34734,18 +34740,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34761,13 +34767,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -34820,7 +34826,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -34884,7 +34890,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -34912,7 +34918,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -34949,7 +34955,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35018,7 +35024,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -35027,7 +35033,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -35058,7 +35064,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint64(N)) @@ -35081,7 +35087,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -35098,7 +35104,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -35143,7 +35149,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -35170,7 +35176,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -35189,7 +35195,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -35219,7 +35225,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -35229,7 +35235,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -35242,7 +35248,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35280,7 +35286,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -35329,7 +35335,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -35366,7 +35372,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -35480,7 +35486,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -35512,7 +35518,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35592,7 +35598,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -35616,7 +35622,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -35647,7 +35653,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -35673,7 +35679,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -35735,7 +35741,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -35782,7 +35788,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -35908,7 +35914,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -36227,7 +36233,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -36265,7 +36271,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -36376,7 +36382,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -36502,7 +36508,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -36651,7 +36657,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -36713,7 +36719,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -36726,7 +36732,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -36772,7 +36778,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -36844,7 +36850,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -36864,7 +36870,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -36902,7 +36908,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -36911,7 +36917,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -36927,7 +36933,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -36948,7 +36954,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -36960,13 +36966,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -36995,7 +37001,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -37077,7 +37083,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -37137,7 +37143,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -37187,7 +37193,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -37261,7 +37267,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37349,7 +37355,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -37390,7 +37396,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -37420,7 +37426,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37490,7 +37496,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -37513,7 +37519,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -37549,7 +37555,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37739,7 +37745,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -37796,7 +37802,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -37840,13 +37846,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -37855,7 +37861,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -37868,7 +37874,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -37878,7 +37884,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -37890,7 +37896,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -37930,7 +37936,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -37968,7 +37974,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -38029,30 +38035,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -38060,7 +38066,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -38087,7 +38093,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -38149,7 +38155,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -38209,21 +38215,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -38235,7 +38241,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -38261,7 +38267,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -38331,14 +38337,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -38353,7 +38359,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -38365,12 +38371,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -38382,7 +38388,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -38410,13 +38416,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -38426,7 +38432,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -38443,7 +38449,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -38479,7 +38485,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -38509,7 +38515,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38549,7 +38555,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -38560,7 +38566,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38572,7 +38578,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -38592,7 +38598,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38604,7 +38610,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -39183,7 +39189,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -39195,18 +39201,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -39214,7 +39220,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -39236,7 +39242,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -39267,7 +39273,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -39313,7 +39319,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -39321,13 +39327,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -39345,7 +39351,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -39377,7 +39383,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -39392,7 +39398,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -39416,7 +39422,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -39439,7 +39445,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -39481,7 +39487,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39492,7 +39498,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39501,7 +39507,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39512,7 +39518,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39524,12 +39530,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -39541,12 +39547,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -39560,7 +39566,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -39583,14 +39589,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -39608,7 +39614,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -39651,7 +39657,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -39692,7 +39698,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -39711,7 +39717,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -39826,7 +39832,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -40030,7 +40036,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -40056,7 +40062,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40128,7 +40134,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -40142,7 +40148,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -40189,7 +40195,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -40235,7 +40241,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -40281,10 +40287,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -40299,7 +40305,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -40383,7 +40389,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -40395,7 +40401,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -40414,7 +40420,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -40465,7 +40471,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -40596,7 +40602,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -40757,7 +40763,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40776,7 +40782,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40848,7 +40854,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -40917,7 +40923,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40997,7 +41003,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -41042,7 +41048,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -41308,7 +41314,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -41525,7 +41531,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -41599,7 +41605,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -41687,7 +41693,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -41701,7 +41707,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41768,7 +41774,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -41784,7 +41790,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -41801,7 +41807,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -41819,7 +41825,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -41851,7 +41857,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -41871,7 +41877,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -41908,7 +41914,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -41920,7 +41926,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -41951,7 +41957,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42005,12 +42011,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -42018,7 +42024,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -42040,7 +42046,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -42065,7 +42071,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -42119,7 +42125,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -42352,7 +42358,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42417,7 +42423,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -42461,7 +42467,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -42492,7 +42498,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -42526,14 +42532,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -42552,16 +42558,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -42591,7 +42597,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -42607,13 +42613,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -43134,7 +43140,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -43143,7 +43149,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -43152,7 +43158,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -43262,7 +43268,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -43358,7 +43364,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -43372,7 +43378,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -43381,7 +43387,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -43402,7 +43408,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -43430,7 +43436,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -43461,7 +43467,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -43484,7 +43490,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -43499,13 +43505,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -43517,7 +43523,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -43528,11 +43534,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -43555,7 +43561,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -43581,14 +43587,14 @@ var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:1 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -43605,7 +43611,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -43662,7 +43668,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -43713,7 +43719,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -43748,7 +43754,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -43772,7 +43778,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43791,7 +43797,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -43838,7 +43844,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -43858,20 +43864,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -43893,7 +43899,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -43930,7 +43936,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -43971,7 +43977,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43992,7 +43998,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -44011,7 +44017,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -44021,7 +44027,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -44034,7 +44040,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -44051,7 +44057,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44091,7 +44097,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -44099,12 +44105,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -44117,7 +44123,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -44139,7 +44145,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -44151,7 +44157,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -44176,7 +44182,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44199,7 +44205,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -44218,7 +44224,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -44226,7 +44232,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -44257,7 +44263,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44278,7 +44284,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -44288,7 +44294,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -44306,7 +44312,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -44333,7 +44339,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -44363,7 +44369,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -44373,7 +44379,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44450,7 +44456,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -44481,7 +44487,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(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) @@ -44497,7 +44503,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -44538,7 +44544,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -44555,7 +44561,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -44572,7 +44578,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -44590,7 +44596,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -44635,7 +44641,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -44645,7 +44651,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -44658,7 +44664,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -44667,14 +44673,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -44684,7 +44690,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -44746,7 +44752,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -44757,7 +44763,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -44792,7 +44798,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -44817,7 +44823,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -44846,7 +44852,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -44861,14 +44867,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -44884,7 +44890,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44909,7 +44915,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -44924,7 +44930,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -44975,7 +44981,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -44999,12 +45005,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -45015,11 +45021,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -45032,7 +45038,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -45040,7 +45046,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -45050,10 +45056,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -45087,7 +45093,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -45138,7 +45144,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -45146,7 +45152,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -45178,12 +45184,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -45195,11 +45201,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -45210,7 +45216,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -45218,7 +45224,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -45240,14 +45246,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -45260,7 +45266,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -45269,21 +45275,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -45301,7 +45307,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -45324,7 +45330,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -45336,7 +45342,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -45363,7 +45369,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45381,7 +45387,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -45393,11 +45399,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -45413,7 +45419,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45423,7 +45429,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -45454,7 +45460,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -45478,18 +45484,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -45501,13 +45507,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -45522,7 +45528,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -45542,7 +45548,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -45567,7 +45573,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -45988,7 +45994,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -46020,7 +46026,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -46053,7 +46059,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -46062,7 +46068,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -46112,7 +46118,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46129,7 +46135,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -46141,7 +46147,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46156,7 +46162,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46183,7 +46189,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46217,7 +46223,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -46230,7 +46236,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -46244,7 +46250,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -46260,7 +46266,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -46284,7 +46290,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -46304,7 +46310,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -46337,7 +46343,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -46362,7 +46368,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46531,7 +46537,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -46608,7 +46614,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -46621,7 +46627,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -46661,7 +46667,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -46703,7 +46709,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -46967,7 +46973,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47019,14 +47025,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -47054,7 +47060,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -47071,7 +47077,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -47086,7 +47092,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47097,7 +47103,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -47167,7 +47173,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -47189,7 +47195,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -47264,7 +47270,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -47288,7 +47294,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47302,7 +47308,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -47323,7 +47329,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -47346,7 +47352,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -47377,7 +47383,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -47427,7 +47433,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47450,7 +47456,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -47506,7 +47512,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -47535,7 +47541,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -47570,7 +47576,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -47599,7 +47605,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47621,7 +47627,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47687,7 +47693,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -47711,7 +47717,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47779,7 +47785,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -47792,7 +47798,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -47830,7 +47836,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -47838,7 +47844,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -47853,7 +47859,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -47863,13 +47869,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -47910,7 +47916,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -47919,7 +47925,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -47928,26 +47934,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -47960,7 +47966,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -47977,7 +47983,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -47999,7 +48005,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -48067,7 +48073,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -48109,7 +48115,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -48120,7 +48126,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -48131,7 +48137,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -48188,7 +48194,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -48248,7 +48254,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -48268,7 +48274,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -48276,7 +48282,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -48289,7 +48295,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -48316,7 +48322,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -48347,7 +48353,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -48358,11 +48364,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -48379,7 +48385,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -48409,7 +48415,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -48488,7 +48494,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -48509,7 +48515,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -48531,7 +48537,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -48552,7 +48558,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -48573,7 +48579,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -48592,7 +48598,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -48641,7 +48647,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48756,7 +48762,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -48885,7 +48891,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -48989,7 +48995,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -49038,7 +49044,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -49105,7 +49111,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -49115,7 +49121,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -49154,7 +49160,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -49191,7 +49197,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -49224,7 +49230,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -49264,7 +49270,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -49318,7 +49324,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -49352,7 +49358,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -49419,7 +49425,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -49500,7 +49506,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -49542,7 +49548,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -49587,7 +49593,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -49701,7 +49707,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -49876,7 +49882,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -49897,7 +49903,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -49967,7 +49973,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -49984,7 +49990,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -50065,14 +50071,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -50084,7 +50090,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -50099,7 +50105,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -50119,7 +50125,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -50151,7 +50157,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -50333,7 +50339,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -50351,7 +50357,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -50387,7 +50393,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50548,7 +50554,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -50625,11 +50631,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -50646,7 +50652,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -50654,7 +50660,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -50673,7 +50679,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -50704,12 +50710,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -50717,7 +50723,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -50767,7 +50773,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50805,7 +50811,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -50832,7 +50838,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -50884,7 +50890,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -50918,7 +50924,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -51058,7 +51064,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -51071,7 +51077,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -51169,7 +51175,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -51249,7 +51255,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -51551,7 +51557,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -51579,7 +51585,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -51758,7 +51764,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -51832,7 +51838,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -51905,7 +51911,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -51942,7 +51948,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -52026,7 +52032,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -52279,7 +52285,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -52501,7 +52507,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52552,13 +52558,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -52572,7 +52578,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -52691,7 +52697,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -52733,7 +52739,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52747,7 +52753,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -52771,7 +52777,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -52818,7 +52824,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -52890,7 +52896,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -53018,7 +53024,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -53081,7 +53087,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -53129,13 +53135,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) @@ -53243,7 +53249,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53270,7 +53276,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -53293,7 +53299,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -53375,7 +53381,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53403,11 +53409,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*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*iCellIdx)))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -53516,7 +53522,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1))))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -53593,7 +53599,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -53623,7 +53629,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -53666,7 +53672,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -53729,7 +53735,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -53739,7 +53745,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -53755,7 +53761,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -53769,7 +53775,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -53873,7 +53879,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53896,7 +53902,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -53918,7 +53924,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53928,7 +53934,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -54000,7 +54006,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -54026,7 +54032,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -54045,7 +54051,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -54071,7 +54077,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -54134,12 +54140,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54166,13 +54172,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -54183,7 +54189,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54205,7 +54211,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -54232,7 +54238,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -54316,7 +54322,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -54328,7 +54334,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -54367,7 +54373,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -54756,7 +54762,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -54990,7 +54996,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -55001,14 +55007,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -55022,7 +55028,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -55038,7 +55044,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -55061,7 +55067,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -55075,7 +55081,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -55088,7 +55094,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -55112,7 +55118,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -55152,7 +55158,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -55160,7 +55166,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -55192,29 +55198,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -55254,7 +55260,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -55286,7 +55292,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -55296,7 +55302,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4805, 0) return SQLITE_ERROR @@ -55310,7 +55316,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -55370,14 +55376,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55439,7 +55445,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55454,7 +55460,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -55464,7 +55470,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -55702,7 +55708,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -55760,13 +55766,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -55780,7 +55786,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -55801,7 +55807,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -55816,7 +55822,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -55830,7 +55836,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -55924,7 +55930,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -55962,7 +55968,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -55982,7 +55988,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -56038,7 +56044,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -56056,7 +56062,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -56071,7 +56077,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -56096,7 +56102,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -56118,7 +56124,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -56140,7 +56146,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -56166,7 +56172,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -56196,7 +56202,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -56218,7 +56224,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -56237,7 +56243,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -56256,7 +56262,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -56266,7 +56272,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -56278,8 +56284,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -56290,7 +56296,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56299,7 +56305,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -56320,7 +56326,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56330,7 +56336,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -56348,7 +56354,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -56361,7 +56367,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -56382,7 +56388,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -56391,7 +56397,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -56406,7 +56412,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -56423,7 +56429,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56450,7 +56456,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -56504,7 +56510,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -56521,7 +56527,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -56529,13 +56535,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -56550,7 +56556,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -56558,7 +56564,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -56568,14 +56574,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -56595,7 +56602,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -56608,7 +56615,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -56625,7 +56632,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -56641,13 +56648,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -56663,7 +56670,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -56685,7 +56692,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) @@ -56706,7 +56713,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -56819,11 +56826,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -56838,7 +56845,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56863,7 +56870,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -56908,7 +56915,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -56924,7 +56931,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -56941,7 +56948,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -56952,7 +56959,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -57008,7 +57015,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -57154,7 +57161,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -57402,7 +57409,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -57425,7 +57432,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57493,7 +57500,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -57538,7 +57545,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -57548,7 +57555,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57569,7 +57576,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -57584,14 +57591,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -57607,7 +57614,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -57622,14 +57629,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -57640,14 +57647,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -57667,7 +57674,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -57691,12 +57698,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -57706,7 +57713,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -57719,7 +57726,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -57750,7 +57757,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -57803,7 +57810,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -57812,7 +57819,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -57835,26 +57842,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -57867,7 +57874,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -57915,7 +57922,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -57929,7 +57936,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -57961,7 +57968,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) @@ -57971,7 +57978,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -57987,7 +57994,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -58011,7 +58018,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -58022,7 +58029,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -58033,7 +58040,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -58044,7 +58051,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -58079,14 +58086,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) @@ -58098,7 +58105,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -58111,12 +58118,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } @@ -58139,7 +58146,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -58268,7 +58275,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -58299,7 +58306,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -58315,7 +58322,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -58359,23 +58366,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -58384,7 +58391,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -58399,7 +58406,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -58410,26 +58417,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -58490,7 +58497,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -58505,18 +58512,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -58532,7 +58539,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -58556,7 +58563,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -58573,7 +58580,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -58620,7 +58627,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -58636,7 +58643,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -58657,7 +58664,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -58671,11 +58678,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -58838,7 +58845,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -58846,7 +58853,7 @@ var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -58873,7 +58880,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -58892,7 +58899,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -58907,7 +58914,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -58915,7 +58922,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -58925,7 +58932,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -58969,7 +58976,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -58981,7 +58988,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -59080,7 +59087,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -59109,7 +59116,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -59198,7 +59205,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -59213,7 +59220,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -59230,7 +59237,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -59263,7 +59270,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -59372,11 +59379,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4973, ts + 4978, ts + 4985, ts + 4988, ts + 4991, ts + 4994, ts + 4997, ts + 5000, ts + 5008, ts + 5011, ts + 5018, ts + 5026, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -59410,7 +59417,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -59426,7 +59433,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -59450,7 +59457,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -59481,7 +59488,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59506,7 +59513,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -59525,7 +59532,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -59753,7 +59760,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -59771,7 +59778,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -59814,7 +59821,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -59829,7 +59836,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -59852,7 +59859,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -60056,7 +60063,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -60066,7 +60073,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -60095,7 +60102,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60147,7 +60154,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -60171,7 +60178,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -60196,7 +60203,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -60217,7 +60224,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -60240,7 +60247,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60253,7 +60260,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -60265,7 +60272,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60283,7 +60290,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -60302,7 +60309,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -60377,10 +60384,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -60390,7 +60397,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -60439,7 +60446,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60490,7 +60497,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60517,7 +60524,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -60620,7 +60627,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -60634,7 +60641,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -60652,7 +60659,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60713,7 +60720,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -60756,7 +60763,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -60769,7 +60776,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -60809,7 +60816,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -60855,7 +60862,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -60949,7 +60956,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61012,7 +61019,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -61054,7 +61061,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -61119,7 +61126,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -61154,7 +61161,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -61215,7 +61222,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -61226,7 +61233,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61331,7 +61338,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61355,7 +61362,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -61393,7 +61400,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -61447,7 +61454,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -61532,7 +61539,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -61544,7 +61551,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -61560,7 +61567,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -61574,7 +61581,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -61582,7 +61589,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } @@ -61602,7 +61609,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) @@ -61610,12 +61617,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -61625,7 +61632,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -61645,7 +61652,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -61661,7 +61668,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61692,7 +61699,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -61708,7 +61715,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -61725,7 +61732,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -61777,7 +61784,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -61803,7 +61810,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } @@ -61811,7 +61818,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5200, 0) return 1 @@ -61821,7 +61828,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5245, 0) return 1 @@ -61833,7 +61840,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61866,7 +61873,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -61876,7 +61883,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -61896,7 +61903,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -61918,7 +61925,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -61940,7 +61947,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -61963,27 +61970,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -61993,7 +62000,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -62006,26 +62013,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -62094,20 +62101,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -62133,7 +62140,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -62148,7 +62155,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -62162,7 +62169,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -62175,12 +62182,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -62189,39 +62196,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -62229,19 +62236,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -62253,32 +62260,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -62288,7 +62295,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -62302,7 +62309,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5285, int64(-1), @@ -62310,7 +62317,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -62320,7 +62327,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -62330,7 +62337,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -62357,7 +62364,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -62524,14 +62531,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -62571,7 +62578,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -62584,7 +62591,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -62601,14 +62608,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -62666,13 +62673,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -62681,7 +62688,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62704,7 +62711,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -62724,7 +62731,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -62742,7 +62749,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -62765,7 +62772,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -62845,13 +62852,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -62861,7 +62868,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -62870,19 +62877,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -62917,7 +62924,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -62934,7 +62941,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -62944,43 +62951,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -62990,13 +62997,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -63016,7 +63023,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -63048,11 +63055,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -63061,44 +63068,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -63115,13 +63122,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -63129,7 +63136,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5318, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -63163,7 +63170,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -63189,16 +63196,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63209,11 +63216,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63224,7 +63231,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63234,7 +63241,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63247,11 +63254,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -63259,11 +63266,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -63312,7 +63319,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63323,7 +63330,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -63340,7 +63347,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -63352,7 +63359,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -63363,19 +63370,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -63398,7 +63405,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -63419,7 +63426,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -63428,7 +63435,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } @@ -63437,7 +63444,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } @@ -63445,7 +63452,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -63454,7 +63461,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -63467,7 +63474,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63493,7 +63500,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -63508,7 +63515,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -63523,7 +63530,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -63536,7 +63543,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -63550,7 +63557,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -63642,7 +63649,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63661,7 +63668,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63673,7 +63680,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63685,7 +63692,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -63699,7 +63706,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -63840,7 +63847,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63885,7 +63892,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -64108,7 +64115,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -64179,7 +64186,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -64201,7 +64208,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64247,7 +64254,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -64279,7 +64286,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sql // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -64291,7 +64298,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, uint8(affinity), enc) } @@ -64299,7 +64306,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64335,7 +64342,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -64349,13 +64356,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -64371,7 +64378,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -64395,7 +64402,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -64405,11 +64412,11 @@ var azTypes = [5]uintptr{ ts + 1112, ts + 1090, ts + 1535, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -66519,6 +66526,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -69538,7 +69549,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -69574,10 +69605,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -69585,13 +69616,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -69600,14 +69631,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -69615,12 +69646,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -69635,7 +69666,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -69653,13 +69684,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -69676,38 +69707,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -69717,27 +69748,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -69746,63 +69777,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -69810,55 +69841,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = uint8(0) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = uint8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -69873,20 +69904,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -69896,15 +69927,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -69939,81 +69970,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -70021,45 +70052,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -70084,14 +70115,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*uint8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -70099,30 +70130,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -70186,31 +70217,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*uint8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -70239,13 +70270,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -70255,77 +70286,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -70334,79 +70365,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -70415,22 +70446,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -70439,37 +70470,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -70484,7 +70515,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -70497,13 +70528,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -70522,20 +70553,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -70556,17 +70587,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5485, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -70577,16 +70608,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) @@ -70594,14 +70625,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -70609,121 +70640,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5536, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5558, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -70736,36 +70742,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -70773,48 +70804,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -70835,18 +70866,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -70854,43 +70885,43 @@ __519: ts+5612, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -70906,7 +70937,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -70948,66 +70979,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -71015,16 +71046,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -71044,20 +71075,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -71104,37 +71135,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -71224,13 +71255,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -71239,11 +71270,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -71255,24 +71286,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -71284,32 +71315,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -71329,10 +71360,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -71351,10 +71382,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -71409,7 +71440,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -71417,11 +71448,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1534 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -71430,71 +71461,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -71513,19 +71544,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -71540,10 +71571,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -71567,10 +71598,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -71695,7 +71726,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -71705,10 +71736,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -71717,29 +71748,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -71750,53 +71781,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -71821,97 +71852,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -71969,10 +72000,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -71981,60 +72012,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -72057,18 +72088,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -72080,10 +72111,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -72178,10 +72209,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; __99: // jump, in3 @@ -72194,15 +72225,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -72212,62 +72243,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -72275,31 +72306,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -72353,7 +72384,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -72363,14 +72394,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; __103: // jump, in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -72391,25 +72422,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -72467,89 +72498,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -72558,36 +72589,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -72642,56 +72673,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -72703,13 +72734,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -72720,13 +72751,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -72739,7 +72770,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -72765,10 +72796,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -72818,28 +72849,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -72851,13 +72882,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -72866,28 +72897,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -72927,16 +72958,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -72959,10 +72990,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -73012,29 +73043,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -73055,20 +73086,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -73079,36 +73110,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -73117,6 +73148,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -73124,11 +73159,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -73161,39 +73196,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -73209,29 +73244,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -73276,32 +73311,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -73384,18 +73419,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -73435,10 +73470,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -73448,10 +73483,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -73468,10 +73503,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -73494,17 +73529,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -73535,31 +73570,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5827) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5827) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -73606,25 +73641,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -73636,17 +73671,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -73660,16 +73695,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -73723,15 +73758,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -73745,19 +73780,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -73765,22 +73800,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -73816,13 +73851,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -73830,21 +73865,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -73870,23 +73905,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -73902,21 +73937,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -73937,10 +73972,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -73954,10 +73989,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -73978,15 +74013,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5844 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -73998,11 +74033,11 @@ __751: ts+5858, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -74012,38 +74047,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -74056,10 +74091,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -74131,22 +74166,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -74164,15 +74199,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -74191,18 +74226,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -74237,35 +74272,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -74300,37 +74335,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5901, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -74338,7 +74373,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -74347,10 +74382,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -74358,10 +74393,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -74383,24 +74418,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -74451,21 +74486,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -74482,25 +74517,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -74516,35 +74551,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -74561,11 +74596,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -74598,7 +74633,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -74608,10 +74643,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -74626,16 +74661,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -74648,17 +74683,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -74705,10 +74740,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -74736,75 +74771,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -74840,32 +74875,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -74887,32 +74922,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -74935,17 +74970,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -74955,18 +74990,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -74978,11 +75013,11 @@ __830: return ts + 5995 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -74990,29 +75025,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -75020,18 +75055,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -75041,10 +75076,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -75066,10 +75101,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -75085,17 +75120,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -75117,13 +75152,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -75166,25 +75201,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+6002, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -75200,16 +75235,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -75229,17 +75264,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -75253,10 +75288,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -75271,11 +75306,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -75283,10 +75318,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -75295,18 +75330,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -75324,10 +75359,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -75372,27 +75407,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -75400,10 +75435,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -75427,11 +75462,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -75440,40 +75475,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -75487,10 +75522,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -75505,21 +75540,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -75537,27 +75572,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -75591,43 +75626,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -75636,41 +75671,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -75695,16 +75730,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -75764,24 +75799,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -75792,38 +75827,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -75862,16 +75897,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -75921,67 +75956,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6031, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -76026,25 +76061,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -76053,46 +76088,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -76123,11 +76158,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6069, ts + 6078, ts + 6085, - ts + 6091} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6091} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -76158,7 +76193,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -76179,7 +76214,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -76196,7 +76231,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -76272,7 +76307,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -76593,7 +76628,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -76602,11 +76637,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -76625,14 +76660,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76691,14 +76726,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -76708,7 +76743,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -76724,7 +76759,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -76733,7 +76768,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76920,7 +76955,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -77071,7 +77106,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -77085,10 +77120,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -77099,18 +77134,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -77123,26 +77158,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -77152,10 +77187,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -77186,11 +77221,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -77207,7 +77242,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77311,7 +77346,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -77351,7 +77386,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -77366,7 +77401,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -77407,7 +77442,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77453,7 +77488,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77476,7 +77511,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77496,7 +77531,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77508,7 +77543,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77558,7 +77593,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -77618,7 +77653,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -77637,7 +77672,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -77733,7 +77768,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -77744,7 +77779,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -77764,7 +77799,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77783,14 +77818,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -77816,7 +77851,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -77841,7 +77876,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -77853,7 +77888,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -77870,7 +77905,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -77899,7 +77934,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -77918,7 +77953,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -77938,7 +77973,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -77962,7 +77997,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -77975,7 +78010,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -78014,7 +78049,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -78032,7 +78067,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -78089,7 +78124,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -78104,7 +78139,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -78133,7 +78168,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -78149,7 +78184,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -78172,7 +78207,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -78227,7 +78262,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78303,7 +78338,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -78314,7 +78349,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -78378,7 +78413,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78494,7 +78529,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -78540,7 +78575,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -78548,7 +78583,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -78571,7 +78606,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -78605,7 +78640,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -78632,7 +78667,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -78640,7 +78675,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78700,7 +78735,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -78770,7 +78805,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -78827,7 +78862,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -78843,7 +78878,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -78870,7 +78905,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78907,7 +78942,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -78923,7 +78958,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78974,7 +79009,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -79055,7 +79090,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79130,7 +79165,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -79175,7 +79210,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79217,7 +79252,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -79236,7 +79271,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79271,7 +79306,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79363,7 +79398,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -79410,23 +79445,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -79473,7 +79508,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -79483,7 +79518,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -79521,7 +79556,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -79587,7 +79622,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -79615,7 +79650,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -79625,14 +79660,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -79647,7 +79682,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -79659,7 +79694,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -79687,20 +79722,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -79729,7 +79764,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -79777,7 +79812,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -79819,7 +79854,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -79828,7 +79863,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -79857,7 +79892,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -79867,7 +79902,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -79909,7 +79944,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -79958,7 +79993,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -79989,13 +80024,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -80007,7 +80042,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -80015,7 +80050,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -80050,14 +80085,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -80090,7 +80125,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -80136,7 +80171,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -80153,7 +80188,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { @@ -80179,7 +80214,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -80198,7 +80233,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -80248,7 +80283,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -80963,7 +80998,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -81012,7 +81047,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81034,7 +81069,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81060,7 +81095,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -81541,7 +81576,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -81576,7 +81611,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -81620,7 +81655,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81643,7 +81678,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -81780,7 +81815,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81826,7 +81861,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -81837,7 +81872,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -81869,7 +81904,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81946,7 +81981,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -82245,7 +82280,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82286,7 +82321,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82343,7 +82378,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82377,7 +82412,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -82413,7 +82448,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return uint8(SQLITE_AFF_INTEGER) } @@ -82434,7 +82469,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -82477,7 +82512,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -82489,7 +82524,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82500,7 +82535,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -82511,7 +82546,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -82536,7 +82571,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -82608,7 +82643,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -82618,7 +82653,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -82627,7 +82662,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:102726:21: */ var aff1 uint8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -82652,7 +82687,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { / // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102748:13: */ var aff uint8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -82670,7 +82705,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:10272 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:102771:20: */ var aff uint8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -82683,7 +82718,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) i // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, uint8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -82699,7 +82734,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -82722,7 +82757,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -82732,7 +82767,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -82759,7 +82794,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -82767,7 +82802,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -82797,7 +82832,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -82831,7 +82866,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -82879,7 +82914,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -82903,7 +82938,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -82932,7 +82967,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -83020,7 +83055,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83042,7 +83077,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -83050,7 +83085,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -83059,7 +83094,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -83079,7 +83114,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83106,7 +83141,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -83116,7 +83151,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83143,7 +83178,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83191,7 +83226,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83206,7 +83241,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -83229,7 +83264,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -83247,7 +83282,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -83275,7 +83310,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -83327,7 +83362,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -83346,7 +83381,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83383,7 +83418,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83415,7 +83450,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83483,7 +83518,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -83513,7 +83548,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -83527,13 +83562,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -83545,7 +83580,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -83587,7 +83622,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -83609,7 +83644,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -83628,7 +83663,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -83645,7 +83680,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83755,7 +83790,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -83777,7 +83812,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -83787,14 +83822,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -83827,7 +83862,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -83835,7 +83870,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -83904,7 +83939,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -83957,7 +83992,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -83986,7 +84021,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84052,9 +84087,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -84071,7 +84106,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -84090,7 +84125,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -84113,7 +84148,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84210,7 +84245,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -84237,7 +84272,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -84263,7 +84298,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -84278,7 +84313,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84290,7 +84325,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -84302,7 +84337,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -84310,7 +84345,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -84327,7 +84362,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -84339,7 +84374,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6646) == 0 { return U32(EP_IsTrue) } @@ -84352,7 +84387,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -84366,7 +84401,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -84383,7 +84418,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -84429,7 +84464,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -84504,7 +84539,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -84528,7 +84563,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -84543,7 +84578,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -84551,12 +84586,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -84598,7 +84633,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -84634,7 +84669,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -84643,7 +84678,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -84695,7 +84730,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -84734,7 +84769,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -84787,7 +84822,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int3 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7592) == 0 { return 1 } @@ -84805,7 +84840,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -84863,7 +84898,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -84875,7 +84910,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -84964,7 +84999,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85182,7 +85217,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -85214,7 +85249,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85233,7 +85268,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -85261,7 +85296,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -85456,7 +85491,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -85579,7 +85614,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -85616,7 +85651,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85997,7 +86032,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86017,7 +86052,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -86063,7 +86098,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -86078,7 +86113,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -86097,7 +86132,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86148,7 +86183,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -86162,14 +86197,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -86188,7 +86223,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -86212,7 +86247,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -86220,7 +86255,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -86345,7 +86380,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -87414,7 +87449,7 @@ __3: return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -87431,7 +87466,7 @@ var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -87500,7 +87535,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -87525,7 +87560,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -87546,7 +87581,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -87559,7 +87594,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -87585,7 +87620,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -87667,7 +87702,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -87730,7 +87765,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87960,7 +87995,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88208,7 +88243,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -88228,7 +88263,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88282,7 +88317,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -88386,7 +88421,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -88413,7 +88448,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -88424,7 +88459,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -88550,7 +88585,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -88573,7 +88608,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -88682,7 +88717,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -88716,7 +88751,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -88734,7 +88769,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -88759,7 +88794,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -88797,7 +88832,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -88813,7 +88848,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -88853,7 +88888,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -88902,7 +88937,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -88935,7 +88970,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -88948,7 +88983,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88965,7 +89000,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88983,7 +89018,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -89174,7 +89209,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -89200,7 +89235,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -89225,7 +89260,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -89234,7 +89269,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -89244,7 +89279,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -89262,7 +89297,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -89280,7 +89315,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -89314,7 +89349,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89333,7 +89368,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89357,7 +89392,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -89373,7 +89408,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -89386,7 +89421,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -89571,7 +89606,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89586,7 +89621,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89732,7 +89767,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89849,7 +89884,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89877,7 +89912,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -90006,7 +90041,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -90018,7 +90053,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -90037,7 +90072,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -90049,7 +90084,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -90060,7 +90095,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -90101,7 +90136,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -90111,7 +90146,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -90143,7 +90178,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -90165,7 +90200,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -90188,7 +90223,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -90204,7 +90239,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -90227,7 +90262,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -90243,7 +90278,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -90265,7 +90300,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -90287,7 +90322,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -90311,7 +90346,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -90328,7 +90363,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -90342,34 +90377,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10807, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -90383,7 +90416,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90403,7 +90436,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10807, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10815, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -90453,7 +90486,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*uint8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = uint8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10813, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10821, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10805 /* " " */ @@ -90489,7 +90522,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -90587,7 +90620,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -90616,7 +90649,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -90655,7 +90688,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -90998,7 +91031,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -91009,7 +91042,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -91049,7 +91082,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -91183,7 +91216,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -91216,7 +91249,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -91330,7 +91363,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -91402,7 +91435,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -91442,7 +91475,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -91468,7 +91501,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10818, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10826, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -91488,7 +91521,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -91566,10 +91599,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10825, + Xsqlite3ErrorMsg(tls, pParse, ts+10833, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10853 /* "PRIMARY KEY" */ + return ts + 10861 /* "PRIMARY KEY" */ } return ts + 6078 /* "UNIQUE" */ }(), @@ -91582,7 +91615,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10865, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10873, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -91602,11 +91635,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10913, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10921, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11034, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11042, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -91721,16 +91754,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11052}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11073}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11093}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11112}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11131}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11060}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11081}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11101}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11139}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -91886,7 +91919,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -91927,7 +91960,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11154, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11162, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -91939,10 +91972,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11207, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11215, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -91963,10 +91996,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11225 /* "sqlite_stat1" */, FzCols: ts + 11238 /* "tbl,idx,stat" */}, - {FzName: ts + 11251 /* "sqlite_stat4" */, FzCols: ts + 11264 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11292 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11233 /* "sqlite_stat1" */, FzCols: ts + 11246 /* "tbl,idx,stat" */}, + {FzName: ts + 11259 /* "sqlite_stat4" */, FzCols: ts + 11272 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11300 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -91993,14 +92026,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -92011,12 +92044,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -92025,7 +92058,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -92040,7 +92073,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -92050,7 +92083,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -92065,7 +92098,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -92100,7 +92133,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -92195,7 +92228,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11305} /* sqlite3.c:111534:22 */ + FzName: ts + 11313} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -92206,7 +92239,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -92228,7 +92261,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -92246,7 +92279,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -92389,7 +92422,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -92441,7 +92474,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -92513,7 +92546,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11315} /* sqlite3.c:111824:22 */ + FzName: ts + 11323} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -92532,7 +92565,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -92566,7 +92599,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11325, + Xsqlite3_str_appendf(tls, bp+24, ts+11333, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -92576,7 +92609,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11330, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11338, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -92619,7 +92652,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11336, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11344, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -92633,9 +92666,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11342} /* sqlite3.c:111958:22 */ + FzName: ts + 11350} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -92644,7 +92677,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -92680,7 +92713,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11351, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11359, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -92698,7 +92731,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11225, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11233, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -92931,7 +92964,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -92993,7 +93026,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -93004,7 +93037,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -93012,7 +93045,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -93037,7 +93070,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -93046,9 +93079,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11365) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11373) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11369) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11377) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -93064,7 +93097,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93127,16 +93160,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -93165,15 +93198,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*uint8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11373, z) == 0 { + if Xsqlite3_strglob(tls, ts+11381, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11384, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11392, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11394, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11402, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -93195,7 +93228,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93257,7 +93290,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -93274,7 +93307,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -93332,7 +93365,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -93353,7 +93386,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93489,15 +93522,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11251, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11259, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11406, - ts+11460, + ts+11414, + ts+11468, zDb) } return rc @@ -93521,7 +93554,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93549,10 +93582,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11225, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11233, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11512, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11520, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -93628,7 +93661,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -93642,7 +93675,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6332, zName) == 0) } @@ -93660,7 +93693,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -93727,7 +93760,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11553, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11561, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -93740,7 +93773,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11556, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11564, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -93754,7 +93787,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11593, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11601, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -93825,7 +93858,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11623, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11631, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -93842,7 +93875,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11652, 0) + ts+11660, 0) rc = SQLITE_ERROR __23: ; @@ -93918,7 +93951,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11720, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11728, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -93953,7 +93986,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -94006,14 +94039,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11748, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11756, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11769, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11777, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -94021,7 +94054,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11803, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -94058,7 +94091,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -94137,7 +94170,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -94145,12 +94178,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11817} /* sqlite3.c:113383:24 */ + FzName: ts + 11825} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -94158,10 +94191,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11831} /* sqlite3.c:113403:24 */ + FzName: ts + 11839} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94173,7 +94206,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11845, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11853, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -94181,7 +94214,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -94206,7 +94239,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11869, + ts+11877, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -94242,7 +94275,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -94278,7 +94311,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -94293,15 +94326,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -94391,7 +94424,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -94404,8 +94437,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11915, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11923, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -94416,7 +94449,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94431,11 +94464,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11944, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11952, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11950, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11958, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -94450,7 +94483,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -94499,7 +94532,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -94521,7 +94554,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11977, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11985, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -94533,7 +94566,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -94542,7 +94575,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -94557,7 +94590,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -94591,7 +94624,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -94603,7 +94636,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -94627,7 +94660,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -94780,7 +94813,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -94831,7 +94864,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -94855,14 +94888,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12025) + ts+12033) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+5844) } @@ -94888,11 +94921,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5844) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12025) + ts+12033) } } } @@ -94907,7 +94940,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94928,7 +94961,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12044, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12052, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -94947,9 +94980,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12052 /* "no such view" */ + zMsg = ts + 12060 /* "no such view" */ } else { - zMsg = ts + 12065 /* "no such table" */ + zMsg = ts + 12073 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6527, libc.VaList(bp, zMsg, zDbase, zName)) @@ -94970,7 +95003,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -94984,13 +95017,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { - return ts + 12011 /* "sqlite_schema" */ + return ts + 12019 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12025+7) == 0 { - return ts + 11992 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 { + return ts + 12000 /* "sqlite_temp_sche..." */ } } return zName @@ -95006,7 +95039,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -95033,7 +95066,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -95049,7 +95082,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -95081,7 +95114,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -95107,7 +95140,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -95128,7 +95161,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -95150,14 +95183,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -95180,7 +95213,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -95197,7 +95230,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -95216,7 +95249,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -95235,7 +95268,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -95285,7 +95318,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -95322,7 +95355,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -95335,7 +95368,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -95357,7 +95390,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -95370,7 +95403,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5844) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -95383,7 +95416,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -95419,7 +95452,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -95443,7 +95476,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95452,13 +95485,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12079, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12087, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12096, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12104, libc.VaList(bp, pName1)) return -1 } } else { @@ -95470,7 +95503,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -95484,7 +95517,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95505,7 +95538,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8019, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12116, + Xsqlite3ErrorMsg(tls, pParse, ts+12124, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -95515,7 +95548,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -95526,7 +95559,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -95546,7 +95579,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -95593,7 +95626,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -95623,7 +95656,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -95646,7 +95679,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -95674,7 +95707,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 /* "sqlite_temp_mast..." */ + return ts + 12033 /* "sqlite_temp_mast..." */ } return ts + 5844 /* "sqlite_master" */ }()) @@ -95694,7 +95727,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12158, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12166, 0) return __4: ; @@ -95741,7 +95774,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -95781,7 +95814,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12199, + Xsqlite3ErrorMsg(tls, pParse, ts+12207, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10376 /* "view" */ @@ -95801,7 +95834,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12220, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12228, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -95904,8 +95937,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -95915,10 +95948,10 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12255, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12263, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -95937,12 +95970,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12272, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12280, 0) } else { } @@ -95963,7 +95996,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12255 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12263 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -95975,7 +96008,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12255, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12263, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -95987,7 +96020,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -96009,7 +96042,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -96021,13 +96054,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12329, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12337, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12336, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12344, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -96067,7 +96100,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12346, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12354, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -96106,7 +96139,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -96153,7 +96186,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96227,7 +96260,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* s // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -96239,11 +96272,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12372, + Xsqlite3ErrorMsg(tls, pParse, ts+12380, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12417, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12425, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -96280,7 +96313,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -96289,12 +96322,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12458, 0) + ts+12466, 0) } } @@ -96314,7 +96347,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96339,7 +96372,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12510, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12518, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -96428,7 +96461,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12551, 0) + ts+12559, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -96445,7 +96478,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96475,7 +96508,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -96510,7 +96543,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96530,7 +96563,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12607, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12615, 0) goto generated_done __2: ; @@ -96543,13 +96576,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12650, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12666, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -96582,7 +96615,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12665, + Xsqlite3ErrorMsg(tls, pParse, ts+12673, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -96605,7 +96638,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -96619,7 +96652,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -96654,7 +96687,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -96690,7 +96723,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -96725,12 +96758,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1534 /* "" */ - zSep2 = ts + 12696 /* "," */ + zSep2 = ts + 12704 /* "," */ zEnd = ts + 4908 /* ")" */ } else { - zSep = ts + 12698 /* "\n " */ - zSep2 = ts + 12702 /* ",\n " */ - zEnd = ts + 12707 /* "\n)" */ + zSep = ts + 12706 /* "\n " */ + zSep2 = ts + 12710 /* ",\n " */ + zEnd = ts + 12715 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -96738,7 +96771,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12710, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12718, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*uint8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = uint8('(') @@ -96778,15 +96811,15 @@ __6: var azType1 = [5]uintptr{ ts + 1534, - ts + 12724, - ts + 12730, - ts + 12735, - ts + 12740, -} /* sqlite3.c:115999:23 */ + ts + 12732, + ts + 12738, + ts + 12743, + ts + 12748, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -96815,7 +96848,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -96844,7 +96877,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -96864,7 +96897,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -96884,7 +96917,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -96917,7 +96950,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -96956,7 +96989,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -97119,7 +97152,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -97152,7 +97185,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -97196,7 +97229,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -97233,7 +97266,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -97289,10 +97322,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12746, + ts+12754, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12779, + Xsqlite3ErrorMsg(tls, pParse, ts+12787, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -97312,11 +97345,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12806, 0) + ts+12814, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12856, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12864, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -97360,7 +97393,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12888, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12896, 0) return } } @@ -97394,11 +97427,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8761 /* "table" */ - zType2 = ts + 12932 /* "TABLE" */ + zType2 = ts + 12940 /* "TABLE" */ } else { // A view zType = ts + 10376 /* "view" */ - zType2 = ts + 12938 /* "VIEW" */ + zType2 = ts + 12946 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -97423,6 +97456,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -97479,7 +97517,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12943, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12951, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -97487,7 +97525,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12958, + ts+12966, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -97505,14 +97543,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13056, + ts+13064, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13098, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13106, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -97549,7 +97587,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -97570,7 +97608,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13132, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13140, 0) goto create_view_fail __1: ; @@ -97667,7 +97705,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97707,7 +97745,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13168, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13176, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -97782,7 +97820,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -97812,7 +97850,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -97838,14 +97876,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13206, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -97859,7 +97897,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13213, + ts+13221, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -97868,7 +97906,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -97914,7 +97952,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -97923,17 +97961,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]uint8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13280, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13288, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -97966,7 +98004,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13294, + ts+13302, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -97978,7 +98016,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13339, + ts+13347, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -97997,7 +98035,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -98008,7 +98046,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3237, 4) == 0 { return 0 @@ -98029,7 +98067,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -98097,7 +98135,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -98159,7 +98197,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13406, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13414, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -98169,14 +98207,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13434, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13442, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13468, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13476, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -98191,7 +98229,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11369, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11377, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -98217,7 +98255,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -98256,7 +98294,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13500, + ts+13508, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -98269,7 +98307,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13563, 0) + ts+13571, 0) goto fk_end goto __7 __6: @@ -98354,7 +98392,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13657, + ts+13665, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -98440,7 +98478,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -98465,7 +98503,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98577,7 +98615,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -98602,7 +98640,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98611,12 +98649,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13703, + Xsqlite3ErrorMsg(tls, pParse, ts+13711, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13731 /* "FIRST" */ + return ts + 13739 /* "FIRST" */ } - return ts + 13737 /* "LAST" */ + return ts + 13745 /* "LAST" */ }())) return 1 } @@ -98635,7 +98673,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -98775,7 +98813,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13742, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13750, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -98796,7 +98834,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13748, + ts+13756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -98828,21 +98866,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13798, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13826, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13834, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13851, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 0) goto exit_create_index __17: ; @@ -98869,7 +98907,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13742, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13750, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -98884,7 +98922,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13885, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13893, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -98896,7 +98934,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13919, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13927, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -98925,7 +98963,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13943, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13951, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -98954,7 +98992,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -99000,7 +99038,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13742) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13750) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -99118,7 +99156,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13966, 0) + ts+13974, 0) goto exit_create_index __56: ; @@ -99348,7 +99386,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14027, libc.VaList(bp+48, 0)) + ts+14035, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -99404,8 +99442,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14069, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14077, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -99462,12 +99500,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14086, + zStmt = Xsqlite3MPrintf(tls, db, ts+14094, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1534 /* "" */ } - return ts + 14106 /* " UNIQUE" */ + return ts + 14114 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -99479,7 +99517,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14114, + ts+14122, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -99495,7 +99533,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14173, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14181, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -99591,7 +99629,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -99635,11 +99673,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -99674,7 +99712,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14200, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14208, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -99689,7 +99727,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14218, libc.VaList(bp+8, 0)) + ts+14226, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -99700,7 +99738,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -99730,9 +99768,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14291, + ts+14299, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11365, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11373, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -99758,7 +99796,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -99785,7 +99823,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99816,7 +99854,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -99830,7 +99868,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -99868,7 +99906,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99883,7 +99921,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14351, + Xsqlite3ErrorMsg(tls, pParse, ts+14359, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -99950,7 +99988,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -99989,7 +100027,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -100021,7 +100059,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -100084,7 +100122,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100095,12 +100133,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14387, + Xsqlite3ErrorMsg(tls, pParse, ts+14395, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14423 /* "ON" */ + return ts + 14431 /* "ON" */ } - return ts + 14426 /* "USING" */ + return ts + 14434 /* "USING" */ }())) goto append_from_error __1: @@ -100148,7 +100186,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -100170,7 +100208,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -100187,7 +100225,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -100211,7 +100249,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -100222,14 +100260,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14432, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14440, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -100257,7 +100295,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -100265,9 +100303,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14438 + return ts + 14446 } - return ts + 14447 + return ts + 14455 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -100279,7 +100317,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -100292,11 +100330,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14432, ts + 14454, ts + 14438} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14440, ts + 14462, ts + 14446} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100308,7 +100346,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14462, 0) + ts+14470, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -100322,13 +100360,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14546, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14554, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -100497,7 +100535,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -100512,7 +100550,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -100529,7 +100567,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -100571,7 +100609,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100631,14 +100669,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14563, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -100684,7 +100722,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100704,7 +100742,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -100712,7 +100750,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -100722,7 +100760,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100741,7 +100779,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14601, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, libc.VaList(bp, zName)) } } } @@ -100765,7 +100803,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -100795,7 +100833,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -100826,7 +100864,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -100841,7 +100879,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -100852,7 +100890,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100876,7 +100914,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -100921,7 +100959,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -100937,7 +100975,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -100957,7 +100995,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100979,7 +101017,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14631, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14639, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -101003,7 +101041,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -101044,7 +101082,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -101080,7 +101118,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -101092,7 +101130,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -101130,7 +101168,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -101210,7 +101248,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -101245,7 +101283,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -101292,7 +101330,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -101310,7 +101348,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -101331,7 +101369,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -101350,16 +101388,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14670, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14691, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14699, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -101368,7 +101406,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -101400,7 +101438,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -101951,7 +101989,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14729) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14737) __61: ; @@ -102006,7 +102044,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -102096,7 +102134,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11225) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11233) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -102143,7 +102181,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102232,7 +102270,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -102288,7 +102326,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -102316,7 +102354,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -102326,14 +102364,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -102363,7 +102401,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -102374,18 +102412,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102434,7 +102472,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102446,7 +102484,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) return } iVal = -iVal @@ -102488,7 +102526,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -102603,7 +102641,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -102640,7 +102678,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -102748,7 +102786,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102786,7 +102824,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14759, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14767, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -102802,7 +102840,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -102819,7 +102857,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102840,7 +102878,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102869,7 +102907,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102893,7 +102931,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -102911,7 +102949,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102926,7 +102964,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102935,7 +102973,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102950,20 +102988,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -103003,7 +103041,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -103189,13 +103227,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -103213,7 +103251,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -103236,7 +103274,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14764, -1) + Xsqlite3_result_error(tls, context, ts+14772, -1) return } if argc == 3 { @@ -103248,7 +103286,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14797, -1) + ts+14805, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -103276,7 +103314,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -103286,7 +103324,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -103297,7 +103335,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -103308,7 +103346,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103320,7 +103358,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -103335,7 +103373,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -103350,11 +103388,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]uint8{ uint8('0'), uint8('1'), uint8('2'), uint8('3'), uint8('4'), uint8('5'), uint8('6'), uint8('7'), uint8('8'), uint8('9'), uint8('A'), uint8('B'), uint8('C'), uint8('D'), uint8('E'), uint8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -103376,7 +103414,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14842, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14850, libc.VaList(bp+8, r1)) } } break @@ -103413,7 +103451,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14849, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14857, libc.VaList(bp+24, zArg)) break } @@ -103435,7 +103473,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -103458,7 +103496,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103472,7 +103510,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -103510,7 +103548,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -103548,7 +103586,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -103567,7 +103605,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -103656,7 +103694,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -103759,8 +103797,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -103769,7 +103807,7 @@ var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103807,7 +103845,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14852, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14860, 4, uintptr(0)) } } @@ -103820,10 +103858,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103835,7 +103873,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11977, -1) + Xsqlite3_result_error(tls, context, ts+11985, -1) return } @@ -103859,11 +103897,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -103873,7 +103911,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -103895,7 +103933,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -103918,12 +103956,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -103932,7 +103970,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -103940,7 +103978,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -103954,14 +103992,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -103975,7 +104013,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -103986,7 +104024,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -103996,7 +104034,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -104034,7 +104072,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -104047,11 +104085,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -104067,9 +104105,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -104134,7 +104172,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -104176,7 +104214,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -104184,7 +104222,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -104202,8 +104240,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14857, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14865, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -104213,7 +104251,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -104223,14 +104261,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14863, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14863, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -104248,7 +104286,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -104304,7 +104342,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -104333,11 +104371,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -104347,7 +104385,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -104404,18 +104442,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -104436,7 +104474,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -104462,13 +104500,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -104496,7 +104534,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -104507,109 +104545,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14868}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14888}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14901}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14919}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14876}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14896}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14909}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14927}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14928}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14951}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14977}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15002}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15011}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15022}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15029}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15060}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15060}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15060}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15064}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15068}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15075}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15110}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15133}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15139}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15145}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15149}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15156}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15181}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15213}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15230}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15248}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14936}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14959}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14985}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15010}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15019}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15037}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15068}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15068}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15068}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15072}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15076}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15083}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15098}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15104}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15131}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15141}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15153}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15157}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15171}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15182}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15189}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15204}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15238}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15256}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15304}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15308}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15314}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15312}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15316}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15322}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15337}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15351}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15345}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15359}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15364}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15370}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15376}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15383}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15398}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15408}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15412}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15422}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15437}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15378}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15384}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15391}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15406}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15410}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15430}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15435}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15441}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15445}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15466}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15478}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15449}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15453}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15458}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15463}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15486}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15491}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15499}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15502}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15342}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15507}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15499}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15510}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15515}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -104784,7 +104822,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -104895,7 +104933,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15511, + ts+15519, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -104930,7 +104968,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -105060,7 +105098,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -105087,7 +105125,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -105128,7 +105166,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -105252,7 +105290,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -105262,7 +105300,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -105276,7 +105314,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -105309,7 +105347,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -105372,7 +105410,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -105396,7 +105434,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -105420,7 +105458,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -105455,7 +105493,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -105657,7 +105695,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -105716,7 +105754,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -105784,7 +105822,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -105986,7 +106024,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -106007,7 +106045,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -106067,7 +106105,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -106109,7 +106147,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -106188,7 +106226,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -106246,7 +106284,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -106282,7 +106320,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -106295,7 +106333,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -106408,7 +106446,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -106462,7 +106500,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -106502,7 +106540,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -106516,7 +106554,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -106524,7 +106562,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -106535,7 +106573,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -106566,16 +106604,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -106676,7 +106714,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -106858,7 +106896,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -106948,7 +106989,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15556, + ts+15564, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -106973,7 +107014,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15597, + Xsqlite3ErrorMsg(tls, pParse, ts+15605, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -107145,7 +107186,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15629, + ts+15637, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -107155,7 +107196,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15681, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15689, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -107211,7 +107252,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15706, + Xsqlite3ErrorMsg(tls, pParse, ts+15714, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -107219,7 +107260,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15752, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15760, 0) goto insert_cleanup __57: ; @@ -107703,7 +107744,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15773) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15781) __123: ; @@ -107727,7 +107768,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -107754,7 +107795,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -107788,7 +107829,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -107799,7 +107840,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -107807,12 +107848,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -107825,7 +107866,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -107931,7 +107972,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -108048,7 +108089,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -108789,7 +108830,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -108806,7 +108847,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -108909,7 +108950,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -108987,7 +109028,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -109045,7 +109086,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -109066,18 +109107,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -109431,7 +109466,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -109452,7 +109487,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -109641,7 +109676,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -109975,7 +110010,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -109989,7 +110024,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -110033,7 +110068,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11977, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11985, 0) __3: ; return SQLITE_ERROR @@ -110043,7 +110078,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15787 /* "sqlite3_extensio..." */ + zEntry = ts + 15795 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -110063,7 +110098,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -110109,7 +110144,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15810, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15818, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -110123,7 +110158,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15819, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15827, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -110147,7 +110182,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15823, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15831, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -110165,7 +110200,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15829, libc.VaList(bp+16, zEntry, zFile)) + ts+15837, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -110192,7 +110227,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15872, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15880, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -110232,7 +110267,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15904, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15912, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -110242,10 +110277,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15941, -} /* sqlite3.c:129386:21 */ + ts + 15949, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -110256,7 +110291,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -110267,7 +110302,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -110287,15 +110322,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -110305,7 +110340,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -110346,7 +110381,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -110365,7 +110400,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -110380,7 +110415,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -110411,7 +110446,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15944, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15952, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -110457,67 +110492,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5008, - ts + 15983, + ts + 15991, ts + 8761, - ts + 15987, - ts + 15992, ts + 15995, - ts + 16005, - ts + 16015, - ts + 16021, - ts + 16025, - ts + 16030, - ts + 16035, + ts + 16000, + ts + 16003, + ts + 16013, + ts + 16023, + ts + 16029, + ts + 16033, + ts + 16038, ts + 16043, - ts + 16054, - ts + 16057, + ts + 16051, + ts + 16062, + ts + 16065, - ts + 16064, - ts + 16025, - ts + 16030, - ts + 16071, - ts + 16076, + ts + 16072, + ts + 16033, + ts + 16038, ts + 16079, - ts + 16086, - ts + 16021, - ts + 16025, - ts + 16092, - ts + 16097, - ts + 16102, - ts + 16025, - ts + 16106, - ts + 16030, + ts + 16084, + ts + 16087, + ts + 16094, + ts + 16029, + ts + 16033, + ts + 16100, + ts + 16105, + ts + 16110, + ts + 16033, ts + 16114, - ts + 16118, - ts + 16123, - ts + 11369, - ts + 11365, - ts + 16129, - ts + 16134, - ts + 16139, - ts + 15983, - ts + 16025, - ts + 16144, - ts + 16151, - ts + 16158, - ts + 8761, + ts + 16038, + ts + 16122, + ts + 16126, + ts + 16131, + ts + 11377, + ts + 11373, + ts + 16137, + ts + 16142, + ts + 16147, + ts + 15991, + ts + 16033, + ts + 16152, + ts + 16159, ts + 16166, + ts + 8761, + ts + 16174, ts + 5011, - ts + 16172, + ts + 16180, - ts + 15983, - ts + 16025, - ts + 16177, - ts + 16182, - ts + 15379, - ts + 16187, + ts + 15991, + ts + 16033, + ts + 16185, + ts + 16190, + ts + 15387, + ts + 16195, - ts + 16200, - ts + 16209, - ts + 16216, + ts + 16208, + ts + 16217, + ts + 16224, - ts + 16227, -} /* sqlite3.c:129831:19 */ + ts + 16235, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -110528,247 +110563,247 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16235, + { /* zName: */ FzName: ts + 16243, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16250, + { /* zName: */ FzName: ts + 16258, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16265, + { /* zName: */ FzName: ts + 16273, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16277, + { /* zName: */ FzName: ts + 16285, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16293, + { /* zName: */ FzName: ts + 16301, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16216, + { /* zName: */ FzName: ts + 16224, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16306, + { /* zName: */ FzName: ts + 16314, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16318, + { /* zName: */ FzName: ts + 16326, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16338, + { /* zName: */ FzName: ts + 16346, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16354, + { /* zName: */ FzName: ts + 16362, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16375, + { /* zName: */ FzName: ts + 16383, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16390, + { /* zName: */ FzName: ts + 16398, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16406, + { /* zName: */ FzName: ts + 16414, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16420, + { /* zName: */ FzName: ts + 16428, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16433, + { /* zName: */ FzName: ts + 16441, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16447, + { /* zName: */ FzName: ts + 16455, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16466, + { /* zName: */ FzName: ts + 16474, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16485, + { /* zName: */ FzName: ts + 16493, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16508, + { /* zName: */ FzName: ts + 16516, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16517, + { /* zName: */ FzName: ts + 16525, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16535, + { /* zName: */ FzName: ts + 16543, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16552, + { /* zName: */ FzName: ts + 16560, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16565, + { /* zName: */ FzName: ts + 16573, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16580, + { /* zName: */ FzName: ts + 16588, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16598, + { /* zName: */ FzName: ts + 16606, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16608, + { /* zName: */ FzName: ts + 16616, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16638, + { /* zName: */ FzName: ts + 16646, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16663, + { /* zName: */ FzName: ts + 16671, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16682, + { /* zName: */ FzName: ts + 16690, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16693, + { /* zName: */ FzName: ts + 16701, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16704, + { /* zName: */ FzName: ts + 16712, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16716, + { /* zName: */ FzName: ts + 16724, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16732, + { /* zName: */ FzName: ts + 16740, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16745, + { /* zName: */ FzName: ts + 16753, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16764, + { /* zName: */ FzName: ts + 16772, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16783, + { /* zName: */ FzName: ts + 16791, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16796, + { /* zName: */ FzName: ts + 16804, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16811, + { /* zName: */ FzName: ts + 16819, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16821, + { /* zName: */ FzName: ts + 16829, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16833, + { /* zName: */ FzName: ts + 16841, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16842, + { /* zName: */ FzName: ts + 16850, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16853, + { /* zName: */ FzName: ts + 16861, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16863, + { /* zName: */ FzName: ts + 16871, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16875, + { /* zName: */ FzName: ts + 16883, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16886, + { /* zName: */ FzName: ts + 16894, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16898, + { /* zName: */ FzName: ts + 16906, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16915, + { /* zName: */ FzName: ts + 16923, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16934, + { /* zName: */ FzName: ts + 16942, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16960, + { /* zName: */ FzName: ts + 16968, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16975, + { /* zName: */ FzName: ts + 16983, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16989, + { /* zName: */ FzName: ts + 16997, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17008, + { /* zName: */ FzName: ts + 17016, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17022, + { /* zName: */ FzName: ts + 17030, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17038, + { /* zName: */ FzName: ts + 17046, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17050, + { /* zName: */ FzName: ts + 17058, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17061, + { /* zName: */ FzName: ts + 17069, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17072, + { /* zName: */ FzName: ts + 17080, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17084, + { /* zName: */ FzName: ts + 17092, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17095, + { /* zName: */ FzName: ts + 17103, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17116, + { /* zName: */ FzName: ts + 17124, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17124, + { /* zName: */ FzName: ts + 17132, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17139, + { /* zName: */ FzName: ts + 17147, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17152, + { /* zName: */ FzName: ts + 17160, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17171, + { /* zName: */ FzName: ts + 17179, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17186, + { /* zName: */ FzName: ts + 17194, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -110784,7 +110819,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -110801,13 +110836,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17202)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17210)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -110816,12 +110851,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17227) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17235) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17237) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17245) { return PAGER_LOCKINGMODE_NORMAL } } @@ -110832,15 +110867,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7905) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17244) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17252) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17249) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17257) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -110855,12 +110890,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '2' { return int32(*(*uint8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16177) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16185) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17261) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17269) == 0 { return 2 } else { return 0 @@ -110870,13 +110905,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17268, 0) + ts+17276, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -110889,7 +110924,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -110903,7 +110938,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -110937,7 +110972,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -110947,7 +110982,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -110956,7 +110991,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -110972,23 +111007,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17330 /* "SET NULL" */ + zName = ts + 17338 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17339 /* "SET DEFAULT" */ + zName = ts + 17347 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17351 /* "CASCADE" */ + zName = ts + 17359 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17359 /* "RESTRICT" */ + zName = ts + 17367 /* "RESTRICT" */ break default: - zName = ts + 17368 /* "NO ACTION" */ + zName = ts + 17376 /* "NO ACTION" */ break } return zName @@ -110997,7 +111032,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -111006,11 +111041,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17378, ts + 17385, ts + 17393, ts + 17397, ts + 17261, ts + 17406, -} /* sqlite3.c:130656:15 */ + ts + 17386, ts + 17393, ts + 17401, ts + 17405, ts + 17269, ts + 17414, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -111037,7 +111072,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -111052,13 +111087,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17410 /* "w" */ + zType = ts + 17418 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17412 /* "a" */ + zType = ts + 17420 /* "a" */ } else { zType = ts + 7415 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17414, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17422, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -111066,15 +111101,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17421, ts + 17426, ts + 17434 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17429, ts + 17434, ts + 17442 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -111096,7 +111131,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -111343,7 +111378,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17442, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17450, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -111986,7 +112021,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17446) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17454) == 0) { goto __64 } b = 2 @@ -112075,7 +112110,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17237 /* "normal" */ + zRet = ts + 17245 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -112116,7 +112151,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17227 /* "exclusive" */ + zRet = ts + 17235 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -112481,7 +112516,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17451, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17459, 0) goto pragma_out __126: ; @@ -112527,7 +112562,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17476, 0) + ts+17484, 0) goto __133 __132: if !(iDb != 1) { @@ -112583,7 +112618,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17529) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17537) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -112697,9 +112732,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17535 /* "issisii" */ + return ts + 17543 /* "issisii" */ } - return ts + 17543 /* "issisi" */ + return ts + 17551 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -112784,7 +112819,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17550, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17558, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -112837,13 +112872,13 @@ __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12650 /* "virtual" */ + zType = ts + 12658 /* "virtual" */ goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17566 /* "shadow" */ + zType = ts + 17574 /* "shadow" */ goto __183 __182: zType = ts + 8761 /* "table" */ @@ -112853,7 +112888,7 @@ __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17573, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17581, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -112923,7 +112958,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17580, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17588, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -112933,7 +112968,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17585, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17593, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -112970,8 +113005,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17590, ts + 17592, ts + 16054} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17594, + *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17598, ts + 17600, ts + 16062} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17602, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -113005,7 +113040,7 @@ __199: __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17600, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17608, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -113028,7 +113063,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17612, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -113147,7 +113182,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17607, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17615, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -113155,7 +113190,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17616)) + ts+17624)) goto __227 __227: j2++ @@ -113356,7 +113391,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17621, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17629, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560 /* aiCols */))) @@ -113622,7 +113657,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17625, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17633, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -113724,7 +113759,7 @@ __304: goto __305 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17649, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17657, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { @@ -113746,7 +113781,7 @@ __305: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17669, + zErr = Xsqlite3MPrintf(tls, db, ts+17677, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -113790,7 +113825,7 @@ __313: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17691, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17699, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -113824,9 +113859,9 @@ __318: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17721) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17729) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17726) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17734) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -113866,7 +113901,7 @@ __322: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17747) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17755) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __319: @@ -113888,7 +113923,7 @@ __314: if !!(isQuick != 0) { goto __324 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17774) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17782) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __325: @@ -113939,7 +113974,7 @@ __266: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17803 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17811 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __329: @@ -114017,7 +114052,7 @@ __336: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __338 } - Xsqlite3ErrorMsg(tls, pParse, ts+17806, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17814, libc.VaList(bp+416, zRight)) __338: ; __333: @@ -114129,19 +114164,19 @@ __48: if !(zRight != 0) { goto __345 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17244) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17252) == 0) { goto __346 } eMode2 = SQLITE_CHECKPOINT_FULL goto __347 __346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17831) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17839) == 0) { goto __348 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __349 __348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17397) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17405) == 0) { goto __350 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -114328,7 +114363,7 @@ __365: __367: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17839, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17847, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __368 @@ -114479,9 +114514,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -114492,16 +114527,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -114510,27 +114545,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17857, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17862, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17868, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17877, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17886, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17902}, - {FzName: ts + 17909}, + {FzName: ts + 17865, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17870, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17876, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17885, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17902, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17910}, + {FzName: ts + 17917}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -114542,24 +114577,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -114576,7 +114611,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]uint8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17915) + Xsqlite3_str_appendall(tls, bp+32, ts+17923) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -114584,7 +114619,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17930, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17938, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -114597,16 +114632,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17937, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17945, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17943) + Xsqlite3_str_appendall(tls, bp+32, ts+17951) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17955) + Xsqlite3_str_appendall(tls, bp+32, ts+17963) j++ } Xsqlite3_str_append(tls, bp+32, ts+4908, 1) @@ -114633,7 +114668,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -114645,7 +114680,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114710,7 +114745,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -114723,7 +114758,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -114734,7 +114769,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -114742,7 +114777,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -114758,7 +114793,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -114804,13 +114839,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17970) + Xsqlite3_str_appendall(tls, bp+32, ts+17978) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17978, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17986, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17982, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17990, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -114826,14 +114861,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -114845,7 +114880,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -114863,12 +114898,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -114901,7 +114936,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114912,12 +114947,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17986, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+17994, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -114926,25 +114961,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4959 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18014, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18022, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18053, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18053, - ts + 18060, - ts + 18072, -} /* sqlite3.c:133149:23 */ + ts + 18061, + ts + 18068, + ts + 18080, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -114966,7 +115001,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115011,7 +115046,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -115049,13 +115084,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18083) + corruptSchema(tls, pData, argv, ts+18091) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } } @@ -115068,7 +115103,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -115101,13 +115136,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8761 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7825 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18096 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18104 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -115220,7 +115255,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11652) + ts+11660) rc = SQLITE_ERROR goto initone_error_out __13: @@ -115260,7 +115295,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18168) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18176) rc = SQLITE_ERROR goto initone_error_out __17: @@ -115282,7 +115317,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18192, + ts+18200, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -115369,7 +115404,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -115401,7 +115436,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -115420,7 +115455,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115473,7 +115508,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -115500,7 +115535,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -115556,7 +115591,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -115579,7 +115614,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) @@ -115592,7 +115627,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -115674,7 +115709,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18226, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18234, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -115701,7 +115736,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18256, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18264, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -115798,13 +115833,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -115833,7 +115868,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115872,14 +115907,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -115892,7 +115927,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -115909,7 +115944,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115922,7 +115957,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -115957,21 +115992,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -116005,7 +116040,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -116026,7 +116061,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -116056,7 +116091,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -116074,19 +116109,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -116115,7 +116150,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -116126,7 +116161,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -116176,14 +116211,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -116205,7 +116240,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -116248,18 +116283,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18275, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18283, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18319, 0) + ts+18327, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18374)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18382)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -116272,11 +116307,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -116310,7 +116345,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -116338,7 +116373,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -116383,7 +116418,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -116407,7 +116442,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -116442,7 +116477,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116474,7 +116509,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18408, libc.VaList(bp, 0)) + ts+18416, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -116498,7 +116533,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18458, 0) + ts+18466, 0) return 1 } @@ -116533,7 +116568,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18513, libc.VaList(bp+8, zName)) + ts+18521, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -116556,11 +116591,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -116569,7 +116604,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -116582,7 +116617,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -116725,7 +116760,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -116773,7 +116808,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116854,7 +116889,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116882,7 +116917,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -117238,7 +117273,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) if p != 0 { @@ -117256,7 +117291,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -117267,7 +117302,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -117287,7 +117322,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -117321,20 +117356,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18577 /* "UNION ALL" */ + z = ts + 18585 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18587 /* "INTERSECT" */ + z = ts + 18595 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18597 /* "EXCEPT" */ + z = ts + 18605 /* "EXCEPT" */ break default: - z = ts + 18604 /* "UNION" */ + z = ts + 18612 /* "UNION" */ break } return z @@ -117348,11 +117383,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18610, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18618, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -117365,7 +117400,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -117544,7 +117579,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -117622,7 +117657,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1099 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16166 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16174 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -117668,7 +117703,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -117725,7 +117760,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -117777,13 +117812,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16166 /* "rowid" */ + zCol = ts + 16174 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -117793,7 +117828,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -117825,7 +117860,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -117886,7 +117921,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16166 /* "rowid" */ + zName = ts + 16174 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -117899,7 +117934,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -117914,7 +117949,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18642, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18650, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -117957,7 +117992,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -118026,7 +118061,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -118061,7 +118096,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -118093,7 +118128,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -118150,7 +118185,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -118174,7 +118209,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -118243,7 +118278,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -118279,7 +118314,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18658, 0) return __1: ; @@ -118389,7 +118424,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18699, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18707, 0) goto end_of_recursive_query __15: ; @@ -118411,7 +118446,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18741, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18749, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -118454,7 +118489,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18747, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18755, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -118484,7 +118519,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -118504,11 +118539,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18762, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18770, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1534 /* "" */ } - return ts + 18785 /* "S" */ + return ts + 18793 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -118524,7 +118559,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -118560,7 +118595,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -118660,8 +118695,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18787, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18802, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18795, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) __8: ; @@ -118710,7 +118745,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18577, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18585, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -118786,7 +118821,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -118858,7 +118893,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -119023,15 +119058,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18842, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18850, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18888, + ts+18896, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -119054,7 +119089,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -119250,7 +119285,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -119457,7 +119492,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18970, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18978, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -119465,7 +119500,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18981, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18989, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -119479,7 +119514,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18986, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18994, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -119600,14 +119635,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -119620,7 +119655,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -119703,7 +119738,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -119713,7 +119748,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -119756,7 +119791,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -119772,7 +119807,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -119804,7 +119839,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -119837,7 +119872,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -119847,7 +119882,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -119874,7 +119909,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120044,7 +120079,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -120469,7 +120504,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -120477,7 +120512,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -120519,7 +120554,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -120554,7 +120589,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -120608,7 +120643,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -120675,7 +120710,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -120728,7 +120763,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -120799,7 +120834,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -120887,7 +120922,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -120903,12 +120938,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15060) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15068) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15064) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15072) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -120937,7 +120972,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -120977,7 +121012,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -120988,7 +121023,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18992, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19000, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -121016,7 +121051,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -121095,12 +121130,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19010, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19018, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -121114,7 +121149,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -121149,7 +121184,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -121182,7 +121217,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -121265,7 +121300,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19033, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19041, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -121292,7 +121327,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19053, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19061, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -121308,7 +121343,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19096 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19104 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -121334,7 +121369,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19119, + Xsqlite3ErrorMsg(tls, pParse, ts+19127, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -121345,9 +121380,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19157 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19165 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19191 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19199 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -121364,7 +121399,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -121380,7 +121415,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121395,7 +121430,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19229, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19237, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -121434,7 +121469,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -121522,7 +121557,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19241, + Xsqlite3ErrorMsg(tls, pParse, ts+19249, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -121541,7 +121576,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19280, + Xsqlite3ErrorMsg(tls, pParse, ts+19288, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -121549,7 +121584,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19311, + Xsqlite3ErrorMsg(tls, pParse, ts+19319, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -121714,7 +121749,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -121730,7 +121765,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19344, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19352, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -121750,9 +121785,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19353, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19361, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19371, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19379, 0) } } } @@ -121762,7 +121797,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19391, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19399, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -121783,7 +121818,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -121821,7 +121856,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -121869,7 +121904,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -121898,7 +121933,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -121923,7 +121958,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121951,13 +121986,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19422, 0) + ts+19430, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19473, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19481, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -121973,7 +122008,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -122012,7 +122047,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -122153,17 +122188,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19506, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19514, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19518 /* " USING COVERING ..." */ + return ts + 19526 /* " USING COVERING ..." */ } return ts + 1534 /* "" */ }(), @@ -122185,7 +122220,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -122231,7 +122266,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -122249,7 +122284,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -122290,7 +122325,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -122307,7 +122342,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -122508,7 +122543,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19541, + ts+19549, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -122594,7 +122629,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19595, + Xsqlite3ErrorMsg(tls, pParse, ts+19603, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -122834,7 +122869,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19635, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19643, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) @@ -122897,7 +122932,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19650, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19658, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -123419,9 +123454,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19666 /* "DISTINCT" */ + return ts + 19674 /* "DISTINCT" */ } - return ts + 19675 /* "GROUP BY" */ + return ts + 19683 /* "GROUP BY" */ }()) groupBySort = 1 @@ -123834,7 +123869,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19666) + explainTempTable(tls, pParse, ts+19674) __141: ; @@ -123846,9 +123881,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19684 /* "RIGHT PART OF OR..." */ + return ts + 19692 /* "RIGHT PART OF OR..." */ } - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -123904,7 +123939,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -123928,12 +123963,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124004,7 +124039,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19716, 0) + ts+19724, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -124064,7 +124099,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -124136,7 +124171,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -124167,7 +124202,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -124196,7 +124231,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -124234,7 +124269,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -124264,7 +124299,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19789, 0) goto trigger_cleanup __3: ; @@ -124325,7 +124360,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19827, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19835, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -124343,7 +124378,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) goto trigger_orphan_error __11: ; @@ -124358,7 +124393,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19827, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19835, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -124374,7 +124409,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19876, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19884, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -124391,7 +124426,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19902, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19910, 0) goto trigger_cleanup __18: ; @@ -124401,12 +124436,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19940, + Xsqlite3ErrorMsg(tls, pParse, ts+19948, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19977 /* "BEFORE" */ + return ts + 19985 /* "BEFORE" */ } - return ts + 19984 /* "AFTER" */ + return ts + 19992 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -124415,7 +124450,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19990, libc.VaList(bp+24, pTableName+8)) + ts+19998, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -124445,7 +124480,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -124541,7 +124576,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -124581,7 +124616,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19827, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19835, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -124618,13 +124653,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20036, + ts+20044, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20111, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20119, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -124665,7 +124700,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -124683,7 +124718,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -124700,10 +124735,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -124724,7 +124762,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124756,7 +124794,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124785,7 +124823,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124804,7 +124842,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -124824,7 +124862,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124890,7 +124928,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20140, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20148, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -124908,12 +124946,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -124931,7 +124969,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -124946,7 +124984,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20160, + ts+20168, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -124954,7 +124992,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -124985,7 +125023,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -125002,7 +125040,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125065,12 +125103,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20222, + ts+20230, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20270 /* "DELETE" */ + return ts + 20278 /* "DELETE" */ } - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ }())) __15: ; @@ -125129,7 +125167,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -125154,7 +125192,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -125166,7 +125204,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20284, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20292, 0) return 1 } @@ -125175,7 +125213,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -125216,7 +125254,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -125284,7 +125322,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -125371,7 +125409,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -125384,7 +125422,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -125441,7 +125479,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20326, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20334, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -125490,7 +125528,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -125519,7 +125557,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -125579,7 +125617,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -125627,7 +125665,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -125684,7 +125722,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125714,7 +125752,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -125735,7 +125773,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -125747,7 +125785,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -125791,7 +125829,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -125874,7 +125912,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -126155,7 +126193,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20340, + ts+20348, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -126187,7 +126225,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20376, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20384, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -127228,7 +127266,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20395) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20403) __169: ; @@ -127264,7 +127302,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127437,7 +127475,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -127450,14 +127488,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -127470,7 +127508,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -127496,7 +127534,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -127616,10 +127654,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*uint8)(unsafe.Pointer(bp + 216)) = uint8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20408, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20416, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20412, libc.VaList(bp+8, bp+216)) + ts+20420, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -127638,7 +127676,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -127660,7 +127698,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -127676,7 +127714,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -127710,7 +127748,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12079, -1) + ts+12087, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -127756,7 +127794,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127778,7 +127816,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20489, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20493, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20497, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -127796,7 +127834,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -127840,7 +127878,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -127897,7 +127935,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -127928,14 +127966,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20493) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20501) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20533) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20541) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -127946,7 +127984,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20576) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __5: ; @@ -127991,7 +128029,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20594, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20602, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -128012,7 +128050,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20625) goto end_of_vacuum __8: ; @@ -128028,7 +128066,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14432) + rc = execSql(tls, db, pzErrMsg, ts+14440) if !(rc != SQLITE_OK) { goto __9 } @@ -128080,7 +128118,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20644, + ts+20652, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -128090,7 +128128,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20752, + ts+20760, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -128105,7 +128143,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20806, + ts+20814, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -128122,7 +128160,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20957, + ts+20965, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -128235,7 +128273,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -128243,7 +128281,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -128283,7 +128321,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -128297,18 +128335,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -128329,7 +128367,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -128347,14 +128385,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -128364,7 +128402,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -128385,7 +128423,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -128422,7 +128460,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -128453,7 +128491,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -128479,7 +128517,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -128499,7 +128537,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128509,7 +128547,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -128525,7 +128563,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -128560,7 +128598,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -128571,7 +128609,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -128606,7 +128644,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21087, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21095, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -128618,7 +128656,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21111, + ts+21119, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -128628,7 +128666,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21210, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21218, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -128655,7 +128693,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -128663,7 +128701,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -128677,7 +128715,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -128698,7 +128736,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21237, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -128738,7 +128776,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21271, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21279, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -128752,7 +128790,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21301 /* "vtable construct..." */ + var zFormat uintptr = ts + 21309 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -128773,7 +128811,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16057, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16065, zType+uintptr(i), 6) && (i == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -128813,7 +128851,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -128832,7 +128870,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21347, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21355, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -128849,7 +128887,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -128869,7 +128907,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -128881,7 +128919,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128900,7 +128938,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21347, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -128921,7 +128959,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -128937,7 +128975,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -129011,7 +129049,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -129056,7 +129094,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -129086,7 +129124,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -129108,14 +129146,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -129126,7 +129164,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -129187,7 +129225,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -129235,7 +129273,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129302,7 +129340,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -129341,7 +129379,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129386,7 +129424,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -129403,19 +129441,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -129424,7 +129462,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -129452,7 +129490,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -129516,7 +129554,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -129556,23 +129594,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -129602,9 +129640,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -129631,9 +129669,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -129643,9 +129681,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -129665,9 +129703,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -129680,9 +129718,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -129697,24 +129735,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -129736,7 +129774,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129762,7 +129800,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129784,7 +129822,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -129806,13 +129844,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21366 /* "" */ + return ts + 21374 /* "" */ } if i == -1 { - return ts + 16166 /* "rowid" */ + return ts + 16174 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -129823,19 +129861,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -129846,11 +129884,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_append(tls, pStr, ts+4959, 1) } @@ -129871,7 +129909,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129884,27 +129922,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21381, 2) + Xsqlite3_str_append(tls, pStr, ts+21389, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21384 /* "%s=?" */ + return ts + 21392 /* "%s=?" */ } - return ts + 21389 /* "ANY(%s)" */ + return ts + 21397 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21397) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21405) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21399) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21407) } Xsqlite3_str_append(tls, pStr, ts+4908, 1) } @@ -129916,7 +129954,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -129951,11 +129989,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21401, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21409, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21407 /* "SEARCH" */ + return ts + 21415 /* "SEARCH" */ } - return ts + 21414 /* "SCAN" */ + return ts + 21422 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -129965,30 +130003,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10853 /* "PRIMARY KEY" */ + zFmt = ts + 10861 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21419 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21427 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21452 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21460 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21477 /* "COVERING INDEX %..." */ + zFmt = ts + 21485 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21495 /* "INDEX %s" */ + zFmt = ts + 21503 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21504, 7) + Xsqlite3_str_append(tls, bp+64, ts+21512, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp uint8 - var zRowid uintptr = ts + 16166 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21512, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16174 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21520, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = uint8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21543, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21551, libc.VaList(bp+32, zRowid)) cRangeOp = uint8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = uint8('>') @@ -129996,9 +130034,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = uint8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21553, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21561, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21558, + Xsqlite3_str_appendf(tls, bp+64, ts+21566, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -130017,7 +130055,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -130035,22 +130073,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21593, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21606, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21614, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21373, 5) + Xsqlite3_str_append(tls, bp+24, ts+21381, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4908, 1) @@ -130100,7 +130138,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -130133,7 +130171,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -130166,7 +130204,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -130204,7 +130242,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -130279,7 +130317,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130472,7 +130510,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -130509,6 +130547,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -130592,7 +130631,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -130633,7 +130672,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -130661,10 +130700,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -130681,7 +130720,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -130701,7 +130740,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -130723,7 +130762,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -130788,7 +130827,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -130834,7 +130873,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -130844,6 +130883,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -130876,7 +130918,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -130947,7 +130989,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -131009,53 +131050,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -131063,8 +131103,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -131700,6 +131740,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -131714,7 +131762,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -131731,7 +131781,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21622, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -131750,7 +131800,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21637, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -132098,24 +132148,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -132137,7 +132187,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -132179,14 +132229,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -132206,7 +132256,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -132233,7 +132283,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132405,7 +132455,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132510,18 +132560,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16015, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15337, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14863, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21638, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16023, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15345, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14871, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21646, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -132529,7 +132579,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -132538,7 +132588,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -132569,7 +132619,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -132702,7 +132752,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -133021,7 +133071,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 uint8 var aff2 uint8 var pColl uintptr @@ -133050,7 +133100,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -133085,7 +133135,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -133123,7 +133173,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -133164,7 +133214,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -133227,7 +133277,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21645, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21653, 0) return } } @@ -133411,7 +133461,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21686 /* "NOCASE" */ + return ts + 21694 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -133532,7 +133582,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -133555,7 +133605,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -133579,7 +133629,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -133631,7 +133681,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -133681,7 +133731,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -133694,7 +133744,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -133754,7 +133804,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -133784,7 +133834,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -133794,14 +133844,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -133818,7 +133868,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -133830,7 +133880,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133855,7 +133905,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21693, + Xsqlite3ErrorMsg(tls, pParse, ts+21701, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -133914,7 +133964,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -133944,16 +133994,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -133963,7 +134013,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -133988,7 +134038,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -134009,7 +134059,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { @@ -134030,14 +134080,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -134056,19 +134106,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{}))) } @@ -134078,7 +134128,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -134155,7 +134205,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -134175,14 +134225,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -134193,7 +134243,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -134297,7 +134347,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -134319,7 +134369,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -134374,7 +134424,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -134404,7 +134454,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -134425,7 +134475,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -134446,7 +134496,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -134516,7 +134566,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -134533,7 +134583,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -134576,7 +134626,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -134610,7 +134660,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -134696,7 +134746,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21729, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21737, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -134777,7 +134827,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21755 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21763 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -134968,7 +135018,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -135044,7 +135094,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -135068,7 +135123,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -135294,7 +135349,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -135321,7 +135376,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135359,7 +135414,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -135498,7 +135553,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -135511,7 +135566,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -135555,7 +135610,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -135670,7 +135725,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -135978,7 +136033,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -135987,7 +136042,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -136007,7 +136062,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) @@ -136024,13 +136079,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -136051,7 +136106,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -136077,7 +136132,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -136121,7 +136176,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -136180,7 +136235,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -136269,7 +136324,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -136376,7 +136431,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -136479,7 +136534,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -136547,7 +136602,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -136907,7 +136962,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -136949,7 +137004,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -137024,7 +137079,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -137309,7 +137364,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -137333,7 +137388,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -137435,7 +137490,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137508,7 +137563,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137557,7 +137612,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -137580,7 +137635,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -137603,7 +137658,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -137629,7 +137684,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -137658,7 +137713,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -137794,7 +137849,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -137919,7 +137974,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -137971,7 +138026,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21792, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21800, 0) rc = SQLITE_OK } else { goto __3 @@ -138007,7 +138062,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -138375,7 +138430,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) } @@ -138383,7 +138438,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -138430,7 +138485,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -138745,7 +138800,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21827, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21835, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -138837,7 +138892,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -138944,7 +138999,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -138955,7 +139010,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -139001,7 +139056,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -139076,7 +139131,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -139188,7 +139243,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -139252,7 +139307,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21845, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21853, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -139332,7 +139387,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21873, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21881, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -139873,7 +139928,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -140090,6 +140145,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -140271,7 +140328,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -140280,7 +140337,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -140296,13 +140353,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140312,7 +140369,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140330,9 +140387,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -140395,10 +140452,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21891, -1) + pCtx, ts+21899, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140408,7 +140465,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -140421,7 +140478,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140435,7 +140492,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140448,7 +140505,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140461,7 +140518,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -140471,7 +140528,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -140479,7 +140536,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140497,7 +140554,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -140507,7 +140564,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -140515,7 +140572,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -140529,13 +140586,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -140544,14 +140601,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21947, -1) + pCtx, ts+21955, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -140559,7 +140616,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -140585,10 +140642,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -140603,7 +140660,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -140617,7 +140674,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140625,7 +140682,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140641,17 +140698,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 21992)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22003)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22014)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22019)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22032)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22042)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22048)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22059)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22069)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22081)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22000)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22011)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22022)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22027)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22040)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22050)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22056)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22067)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22077)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22089)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22094 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -140660,7 +140717,7 @@ var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c: // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -140668,7 +140725,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -140683,7 +140740,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -140702,9 +140759,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140715,7 +140772,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22090, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22098, libc.VaList(bp, zName)) } return p } @@ -140735,7 +140792,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -140759,12 +140816,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22109, 0) + ts+22117, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22180, 0) + ts+22188, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -140803,16 +140860,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -140911,7 +140968,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -140935,7 +140992,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -140967,7 +141024,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -141013,7 +141070,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -141021,14 +141078,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22243, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22251, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -141038,12 +141095,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -141219,7 +141279,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -141230,7 +141290,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -141245,7 +141305,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -141258,7 +141318,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -141270,7 +141330,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -141303,7 +141363,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22269, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22277, 0) goto windowAllocErr __2: ; @@ -141339,7 +141399,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -141358,7 +141418,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141369,15 +141429,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22301 /* "PARTITION clause" */ + zErr = ts + 22309 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22318 /* "ORDER BY clause" */ + zErr = ts + 22326 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22334 /* "frame specificat..." */ + zErr = ts + 22342 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22354, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22362, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -141392,7 +141452,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -141400,7 +141460,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22387, 0) + ts+22395, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -141411,7 +141471,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -141431,7 +141491,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -141471,7 +141531,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -141547,7 +141607,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -141576,17 +141636,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22434, - ts + 22487, - ts + 21891, - ts + 22538, - ts + 22590, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22442, + ts + 22495, + ts + 21899, + ts + 22546, + ts + 22598, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -141611,19 +141671,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -141659,7 +141719,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -141766,7 +141826,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -141802,7 +141862,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -141909,7 +141969,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -141992,7 +142052,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -142027,7 +142087,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -142052,7 +142112,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -142089,7 +142149,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -142212,7 +142272,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -142360,7 +142420,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -142391,7 +142451,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142416,7 +142476,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142764,7 +142824,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -143161,17 +143221,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -143181,7 +143241,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -143200,19 +143260,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22640, + Xsqlite3ErrorMsg(tls, pParse, ts+22648, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } - return ts + 22682 /* "LIMIT" */ + return ts + 22690 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22688, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22696, 0) } } @@ -143220,7 +143280,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -143232,7 +143292,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -143270,7 +143330,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -143284,14 +143344,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22722, + Xsqlite3ErrorMsg(tls, pParse, ts+22730, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -143359,7 +143419,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -143628,7 +143688,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -143856,7 +143916,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -143916,7 +143976,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -143959,7 +144019,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -144019,7 +144079,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -144221,7 +144281,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -144243,9 +144303,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -144254,9 +144314,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -144266,7 +144326,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -144281,7 +144341,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -144440,7 +144500,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -144448,7 +144508,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -144471,7 +144531,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -144511,7 +144571,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -144522,7 +144582,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -144532,7 +144592,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22760, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22768, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -144541,7 +144601,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -144964,7 +145024,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -145371,7 +145431,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -145383,7 +145443,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -145528,21 +145588,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16166, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16174, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16079, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16087, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -146278,7 +146338,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22809) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22817) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -146429,7 +146489,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -146924,21 +146984,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+22842, 0) + ts+22850, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22937, 0) + ts+22945, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23021, 0) + ts+23029, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -147378,7 +147438,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -147388,9 +147448,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23106, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23114, 0) } //*********** End %syntax_error code ***************************************** @@ -147398,7 +147458,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -147428,7 +147488,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -147482,7 +147542,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -147533,7 +147593,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -147619,7 +147679,7 @@ var zKWText = [666]uint8{ uint8('W'), uint8('S'), uint8('U'), uint8('N'), uint8('B'), uint8('O'), uint8('U'), uint8('N'), uint8('D'), uint8('E'), uint8('D'), uint8('U'), uint8('N'), uint8('I'), uint8('O'), uint8('N'), uint8('U'), uint8('S'), uint8('I'), uint8('N'), uint8('G'), uint8('V'), uint8('A'), uint8('C'), uint8('U'), uint8('U'), uint8('M'), uint8('V'), uint8('I'), uint8('E'), uint8('W'), uint8('I'), uint8('N'), uint8('D'), uint8('O'), uint8('W'), uint8('B'), uint8('Y'), uint8('I'), uint8('N'), uint8('I'), uint8('T'), uint8('I'), uint8('A'), uint8('L'), uint8('L'), uint8('Y'), uint8('P'), uint8('R'), uint8('I'), uint8('M'), uint8('A'), uint8('R'), uint8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -147632,7 +147692,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -147649,7 +147709,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -147664,7 +147724,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -147680,7 +147740,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -147713,7 +147773,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -147846,7 +147906,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -148024,7 +148084,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -148033,7 +148093,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -148042,11 +148102,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -148069,13 +148129,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -148125,7 +148185,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148142,7 +148202,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148156,7 +148216,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148169,7 +148229,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -148531,7 +148591,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -148601,7 +148661,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23123, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23131, libc.VaList(bp, bp+2464)) break } } @@ -148624,7 +148684,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23148, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23156, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -148721,7 +148781,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -148824,7 +148884,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23159, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23167, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -148837,11 +148897,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19827, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19835, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23166, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23174, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23171, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23179, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -148854,9 +148914,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23181, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23189, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23193, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -148898,12 +148958,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -148930,7 +148990,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -148942,11 +149002,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -148959,14 +149019,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -148979,14 +149039,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -149017,7 +149077,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -149143,7 +149203,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -149182,7 +149242,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -149190,7 +149250,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -149460,7 +149520,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -149558,13 +149618,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149583,7 +149643,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -149612,7 +149672,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -149691,11 +149751,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -149717,7 +149777,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -149730,7 +149790,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -149744,7 +149804,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -149760,39 +149820,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -149807,7 +149867,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -149822,7 +149882,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -149849,7 +149909,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -149865,14 +149925,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -149896,7 +149956,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23193, 0) + ts+23201, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -149909,7 +149969,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -149946,11 +150006,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -149960,7 +150020,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -150070,7 +150130,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -150120,24 +150180,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23261 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23269 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23275 /* "abort due to ROL..." */ + zErr = ts + 23283 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23297 /* "another row avai..." */ + zErr = ts + 23305 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23319 /* "no more rows ava..." */ + zErr = ts + 23327 /* "no more rows ava..." */ break } @@ -150155,36 +150215,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23342, - ts + 23355, + ts + 23350, + ts + 23363, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23371, - ts + 23396, - ts + 23410, - ts + 23429, + ts + 23379, + ts + 23404, + ts + 23418, + ts + 23437, ts + 1470, - ts + 23454, - ts + 23491, - ts + 23503, - ts + 23518, - ts + 23551, - ts + 23569, - ts + 23594, - ts + 23623, + ts + 23462, + ts + 23499, + ts + 23511, + ts + 23526, + ts + 23559, + ts + 23577, + ts + 23602, + ts + 23631, /* SQLITE_EMPTY */ uintptr(0), ts + 5799, ts + 5285, - ts + 23640, - ts + 23658, - ts + 23676, + ts + 23648, + ts + 23666, + ts + 23684, /* SQLITE_NOLFS */ uintptr(0), - ts + 23710, + ts + 23718, /* SQLITE_FORMAT */ uintptr(0), - ts + 23731, - ts + 23757, - ts + 23780, - ts + 23801, -} /* sqlite3.c:169926:20 */ + ts + 23739, + ts + 23765, + ts + 23788, + ts + 23809, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -150193,7 +150253,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -150216,8 +150276,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -150226,7 +150286,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -150244,7 +150304,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -150257,7 +150317,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -150273,7 +150333,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -150287,7 +150347,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ libc.AtomicStoreNInt32(db+432, int32(1), 0) } @@ -150295,7 +150355,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -150305,7 +150365,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -150363,7 +150423,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23817, 0) + ts+23825, 0) return SQLITE_BUSY } else { @@ -150410,7 +150470,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -150452,22 +150512,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -150487,7 +150547,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150496,7 +150556,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23880, libc.VaList(bp, zName)) + ts+23888, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -150511,7 +150571,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -150537,7 +150597,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150555,7 +150615,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -150576,7 +150636,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150594,7 +150654,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150607,7 +150667,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150620,7 +150680,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150633,7 +150693,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -150645,7 +150705,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -150661,7 +150721,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -150679,7 +150739,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -150692,7 +150752,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -150703,7 +150763,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150732,7 +150792,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23931, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23939, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -150753,7 +150813,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -150777,7 +150837,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -150819,19 +150879,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -150853,7 +150913,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150865,7 +150925,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -150894,18 +150954,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150913,9 +150973,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150923,7 +150983,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -150933,13 +150993,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -150952,7 +151012,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -150962,7 +151022,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23952, 0) + ts+23960, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -151015,7 +151075,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -151027,7 +151087,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -151074,7 +151134,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -151107,7 +151167,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24020, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24028, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -151155,10 +151215,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24026, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24034, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24036, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24044, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -151280,7 +151340,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24064, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24072, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -151291,17 +151351,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24068, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24076, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24068 /* "cache" */ + zModeType = ts + 24076 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24074, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24082, zOpt, uint64(4)) == 0) { goto __32 } @@ -151340,7 +151400,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24079, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24087, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -151348,7 +151408,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24099, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24107, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -151391,7 +151451,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24123, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24131, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -151412,24 +151472,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24139, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24146, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24147, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24154, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24154, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24157, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17261, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24162, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24165, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24168, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17269, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*uint8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -151445,7 +151505,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -151597,10 +151657,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21686, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21694, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24164, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24172, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -151629,7 +151689,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -151686,7 +151746,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6332 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23166 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23174 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -151785,17 +151845,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -151806,7 +151866,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24170 /* "\x00\x00" */ + zFilename = ts + 24178 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -151827,12 +151887,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151844,7 +151904,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -151862,7 +151922,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -151873,7 +151933,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -151884,7 +151944,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -151892,7 +151952,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -151905,28 +151965,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24173, + Xsqlite3_log(tls, iErr, ts+24181, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24198) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24206) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24218) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24226) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24225) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24233) } // This is a convenience routine that makes sure that all thread-specific @@ -151934,12 +151994,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -152105,7 +152165,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24242, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24250, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -152123,7 +152183,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -152138,7 +152198,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -152151,7 +152211,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -152196,7 +152256,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -152655,7 +152715,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -152664,7 +152724,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+uint64(1)) return p + uintptr(n) + uintptr(1) @@ -152677,7 +152737,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -152708,7 +152768,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -152725,7 +152785,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -152734,7 +152794,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -152751,7 +152811,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -152761,7 +152821,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -152782,14 +152842,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -152802,7 +152862,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -152811,7 +152871,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -152826,7 +152886,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152837,7 +152897,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152848,7 +152908,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152871,7 +152931,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152914,7 +152974,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -152935,7 +152995,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -152944,7 +153004,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152956,7 +153016,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24270, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24278, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -152974,7 +153034,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -153019,11 +153079,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -153036,7 +153096,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -153046,13 +153106,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -153076,7 +153136,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -153119,7 +153179,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24278 /* "database is dead..." */ + return ts + 24286 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -153131,7 +153191,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -153157,7 +153217,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153261,7 +153321,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -153866,7 +153926,7 @@ var jsonIsSpace = [256]uint8{ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -153878,10 +153938,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]uint8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -153889,9 +153949,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -153904,9 +153964,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -153914,8 +153974,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24301, ts + 24307, -} /* sqlite3.c:193131:19 */ + ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24309, ts + 24315, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -153929,7 +153989,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]uint8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -153937,7 +153997,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -153945,7 +154005,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -153953,7 +154013,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -153961,7 +154021,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -153994,7 +154054,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -154006,7 +154066,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -154019,7 +154079,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -154028,7 +154088,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c uint8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -154043,7 +154103,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -154094,7 +154154,7 @@ __10: *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0' + int32(c)>>4) - c = uint8(*(*uint8)(unsafe.Pointer(ts + 24314 + uintptr(int32(c)&0xf)))) + c = uint8(*(*uint8)(unsafe.Pointer(ts + 24322 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -154114,11 +154174,11 @@ __4: var aSpecial = [32]uint8{ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8('b'), uint8('t'), uint8('n'), uint8(0), uint8('f'), uint8('r'), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -154151,7 +154211,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24331, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24339, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -154162,7 +154222,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -154189,7 +154249,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -154198,7 +154258,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -154208,7 +154268,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -154216,7 +154276,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -154318,7 +154378,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -154333,14 +154393,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z)))))<<12 + @@ -154351,7 +154411,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154632,7 +154692,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -154654,7 +154714,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -154669,7 +154729,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -154685,7 +154745,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c uint8 var j U32 var iThis int32 @@ -154912,7 +154972,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -154937,7 +154997,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24360, -1) + Xsqlite3_result_error(tls, pCtx, ts+24368, -1) } } jsonParseReset(tls, pParse) @@ -154948,7 +155008,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -154979,7 +155039,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) @@ -154999,7 +155059,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -155056,7 +155116,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -155079,7 +155139,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -155254,7 +155314,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*uint8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -155265,7 +155325,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24375, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24383, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -155278,11 +155338,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24379, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24387, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -155293,7 +155353,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155345,18 +155405,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24405, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24413, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -155387,7 +155447,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155404,7 +155464,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155427,7 +155487,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -155477,7 +155537,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155511,11 +155571,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24448, uint32(2)) + jsonAppendRaw(tls, bp, ts+24456, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4949, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24451, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24459, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -155571,7 +155631,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -155644,7 +155704,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -155676,7 +155736,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155688,14 +155748,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24454, -1) + ts+24462, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, uint8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24505, -1) + Xsqlite3_result_error(tls, ctx, ts+24513, -1) jsonReset(tls, bp) return } @@ -155715,7 +155775,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155784,7 +155844,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155803,7 +155863,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15270) + jsonWrongNumArgs(tls, ctx, ts+15278) return __2: ; @@ -155867,7 +155927,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -155892,9 +155952,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24539 /* "set" */ + return ts + 24547 /* "set" */ } - return ts + 24543 /* "insert" */ + return ts + 24551 /* "insert" */ }()) return __2: @@ -155965,7 +156025,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -155989,7 +156049,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -156003,7 +156063,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -156019,7 +156079,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -156044,16 +156104,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24550, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24558, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -156061,7 +156121,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -156103,7 +156163,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -156125,7 +156185,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -156149,16 +156209,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24553, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24561, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -156178,16 +156238,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -156202,7 +156262,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24556) + ts+24564) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -156215,13 +156275,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -156235,7 +156295,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -156246,7 +156306,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -156259,7 +156319,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -156268,13 +156328,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -156325,7 +156385,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -156342,19 +156402,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24639, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24647, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -156443,10 +156503,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24639, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24647, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -156470,7 +156530,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24650 /* "$" */ + zRoot = ts + 24658 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -156488,7 +156548,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -156498,7 +156558,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156573,7 +156633,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156602,7 +156662,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24360, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24368, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -156678,7 +156738,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -156692,36 +156752,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24652}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24657}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24686}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24699}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24702}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24706}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24718}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24730}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24741}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24752}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24764}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24777}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24796}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24824}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24660}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24665}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24694}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24707}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24710}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24714}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24726}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24738}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24749}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24760}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24772}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24785}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24804}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24815}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24832}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -156737,9 +156797,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24842 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24852 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24850 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24860 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -156786,7 +156846,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -156800,7 +156860,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -156821,9 +156881,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -156831,23 +156891,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -156856,20 +156916,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -156877,17 +156937,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -156913,16 +156973,16 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156935,12 +156995,12 @@ func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156953,7 +157013,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = i @@ -156964,7 +157024,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -156972,20 +157032,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -156993,7 +157053,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -157002,7 +157062,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -157017,7 +157077,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -157033,7 +157093,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -157042,7 +157102,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -157074,11 +157134,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24862, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24870, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24870, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24878, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -157152,7 +157212,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -157163,7 +157223,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -157176,7 +157236,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -157193,7 +157253,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -157217,7 +157277,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -157243,19 +157303,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -157271,23 +157331,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -157309,13 +157369,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -157323,7 +157383,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24875, + ts+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -157342,7 +157402,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -157360,7 +157420,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -157390,7 +157450,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -157406,7 +157466,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -157423,7 +157483,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -157535,7 +157595,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157633,7 +157693,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157688,7 +157748,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -157704,7 +157764,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -157723,7 +157783,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -157740,7 +157800,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -157760,7 +157820,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -157771,7 +157831,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -157788,7 +157848,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -157822,7 +157882,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -157858,7 +157918,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -157906,7 +157966,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -157999,7 +158059,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -158015,7 +158075,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158030,7 +158090,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -158091,7 +158151,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -158112,12 +158172,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24957) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24965) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -158144,7 +158204,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -158287,7 +158347,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -158394,7 +158454,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -158437,7 +158497,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -158458,7 +158518,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -158497,7 +158557,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -158512,7 +158572,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -158525,7 +158585,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -158600,7 +158660,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -158656,7 +158716,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -158692,7 +158752,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -158700,7 +158760,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -158722,7 +158782,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -158770,7 +158830,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -158826,7 +158886,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -158925,7 +158985,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -158959,7 +159019,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -159194,7 +159254,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -159229,7 +159289,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159279,7 +159339,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -159310,7 +159370,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -159339,7 +159399,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -159454,7 +159514,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -159484,7 +159544,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -159515,7 +159575,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -159526,7 +159586,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -159615,7 +159675,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -159629,7 +159689,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -159654,7 +159714,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -159662,7 +159722,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24971, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24979, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -159674,12 +159734,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24991, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24999, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25023, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25031, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -159693,7 +159753,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -159922,7 +159982,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -159931,7 +159991,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -159939,7 +159999,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -159947,7 +160007,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25060, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25068, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -159968,7 +160028,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -159981,11 +160041,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25205 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25213 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -159993,7 +160053,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11225, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11233, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -160025,7 +160085,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -160036,8 +160096,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25261, ts + 5011, ts + 16166, -} /* sqlite3.c:199185:21 */ + ts + 25269, ts + 5011, ts + 16174, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -160061,9 +160121,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -160080,19 +160140,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25266, + ts+25274, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25328, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25336, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25333, + ts+25341, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25397, + ts+25405, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25467, + ts+25475, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -160123,7 +160183,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25516 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25524 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -160135,7 +160195,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25624, + ts+25632, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -160143,18 +160203,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25669, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25677, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12696, 1) + Xsqlite3_str_append(tls, p, ts+12704, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25696, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25704, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25718, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25726, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25726, 0) + Xsqlite3_str_appendf(tls, p, ts+25734, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -160170,24 +160230,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25742, - ts + 25795, + ts + 25750, + ts + 25803, - ts + 25840, - ts + 25892, - ts + 25946, + ts + 25848, + ts + 25900, + ts + 25954, - ts + 25991, - ts + 26049, - ts + 26104, -} /* sqlite3.c:199232:21 */ + ts + 25999, + ts + 26057, + ts + 26112, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160218,7 +160278,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160226,7 +160286,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26151, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26159, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -160238,7 +160298,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26171, + ts+26179, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -160246,7 +160306,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26228, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26236, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -160256,7 +160316,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160271,7 +160331,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -160297,10 +160357,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26263, - ts + 26306, - ts + 26341, - ts + 26377, + ts + 26271, + ts + 26314, + ts + 26349, + ts + 26385, } // Aux columns counted by a u8 @@ -160337,7 +160397,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26414, + Xsqlite3_str_appendf(tls, pSql, ts+26422, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -160349,7 +160409,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26438, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26446, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -160372,7 +160432,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -160471,7 +160531,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26455, ts + 26466} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -160487,7 +160547,7 @@ var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -160531,11 +160591,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10805, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26468, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26476, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26474, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26478, 1) + Xsqlite3_str_append(tls, pOut, ts+26486, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -160550,11 +160610,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26480, -1) + Xsqlite3_result_error(tls, ctx, ts+26488, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -160582,15 +160642,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -160603,7 +160663,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160631,7 +160691,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160643,7 +160703,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26513, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26521, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4013 /* "\n" */ @@ -160671,7 +160731,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160679,7 +160739,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26520, + ts+26528, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -160698,7 +160758,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26565, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26573, libc.VaList(bp+16, iNode)) } } @@ -160715,15 +160775,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26597, - ts + 26651, + ts + 26605, + ts + 26659, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -160738,23 +160798,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26699, + rtreeCheckAppendMsg(tls, pCheck, ts+26707, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26761, + ts+26769, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }(), iKey, iVal)) } } @@ -160771,7 +160831,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -160797,7 +160857,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26819, libc.VaList(bp, i, iCell, iNode)) + ts+26827, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -160817,7 +160877,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26867, libc.VaList(bp+24, i, iCell, iNode)) + ts+26875, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -160829,7 +160889,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160840,14 +160900,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26934, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26942, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26968, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26976, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -160855,7 +160915,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26998, + ts+27006, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -160883,20 +160943,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27053, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27061, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27084, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27092, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -160906,7 +160966,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -160926,13 +160986,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14432, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14440, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27151, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27159, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -160942,12 +161002,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24971, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24979, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27179, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27187, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -160962,8 +161022,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27210, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27217, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27218, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27225, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -160973,7 +161033,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27225, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27233, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -161013,13 +161073,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27229, -1) + ts+27237, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -161037,7 +161097,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17803 /* "ok" */ + return ts + 17811 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -161076,7 +161136,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -161102,7 +161162,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -161124,7 +161184,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -161141,7 +161201,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -161151,10 +161211,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -161164,7 +161224,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -161173,7 +161233,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200274:13: // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161245,7 +161305,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -161387,7 +161447,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161456,7 +161516,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161469,7 +161529,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161478,11 +161538,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27280, 1) + Xsqlite3_str_append(tls, x, ts+27288, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27282, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27290, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27293, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27301, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161492,7 +161552,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -161506,19 +161566,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep uint8 = uint8('\'') - Xsqlite3_str_appendf(tls, x, ts+27304, 0) + Xsqlite3_str_appendf(tls, x, ts+27312, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27322, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = uint8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27346, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27342, 0) + Xsqlite3_str_appendf(tls, x, ts+27350, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161538,7 +161598,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -161571,7 +161631,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -161591,7 +161651,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -161610,7 +161670,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -161646,7 +161706,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -161666,7 +161726,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161711,7 +161771,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161852,7 +161912,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161865,13 +161925,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -161905,7 +161965,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -161932,7 +161992,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -161973,7 +162033,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -162011,7 +162071,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -162043,10 +162103,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -162057,20 +162117,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -162104,7 +162164,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -162116,7 +162176,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -162146,7 +162206,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -162176,7 +162236,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -162211,7 +162271,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -162241,7 +162301,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162477,7 +162537,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -162493,7 +162553,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -162503,7 +162563,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -162543,7 +162603,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27355, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27363, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -162552,7 +162612,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27377, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27385, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -162560,7 +162620,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -162618,12 +162678,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -162637,7 +162697,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -162804,7 +162864,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -162830,7 +162890,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16166 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16174 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -162840,7 +162900,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27381 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27389 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -162848,14 +162908,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27387 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162920,7 +162980,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -162987,7 +163047,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27396, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27404, 0) __4: ; goto geopoly_update_end @@ -163131,15 +163191,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27436) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27444) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27452) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27460) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -163172,9 +163232,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -163204,7 +163264,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27467, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27475, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -163216,26 +163276,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27475 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27488 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27501 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27514 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27452 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27526 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27436 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27549 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27563 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27576 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27590 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27606 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27483 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27522 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27460 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27534 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27444 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27557 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27571 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27584 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27598 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27614 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27618 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27626 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -163243,30 +163303,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27637, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27645, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27647, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27655, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27658, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27666, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27381, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27389, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27669, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27677, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -163280,7 +163340,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -163289,7 +163349,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -163310,7 +163370,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -163338,13 +163398,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24957, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24965, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163364,7 +163424,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163820,7 +163880,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -164221,7 +164281,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164286,7 +164346,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164348,7 +164408,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -164380,9 +164440,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -164397,16 +164457,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -164414,9 +164474,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -164435,16 +164495,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -164463,7 +164523,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -164486,7 +164546,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -164506,7 +164566,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164596,7 +164656,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164621,7 +164681,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -164638,7 +164698,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) return } @@ -164649,7 +164709,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -164664,7 +164724,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164682,7 +164742,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164706,7 +164766,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -164721,7 +164781,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -164739,7 +164799,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -164769,7 +164829,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -164783,7 +164843,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -164792,7 +164852,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27700, uintptr(0), uintptr(0), p+64) + ts+27708, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -164864,7 +164924,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -164876,7 +164936,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24870, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24878, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -164894,7 +164954,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164904,9 +164964,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27871, libc.VaList(bp, func() uintptr { + ts+27879, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28021 /* "AND rootpage!=0 ..." */ + return ts + 28029 /* "AND rootpage!=0 ..." */ } return ts + 1534 /* "" */ }()))) @@ -164914,7 +164974,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28062) + ts+28070) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -164929,7 +164989,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -164955,7 +165015,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -164981,7 +165041,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -164998,7 +165058,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -165021,7 +165081,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -165044,7 +165104,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -165094,7 +165154,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165115,7 +165175,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+28187, libc.VaList(bp, zTab))) + ts+28195, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -165133,7 +165193,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+28306, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28314, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -165151,7 +165211,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28327, libc.VaList(bp+16, zIdx))) + ts+28335, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -165175,7 +165235,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28378, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28386, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -165214,7 +165274,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -165224,7 +165284,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -165239,7 +165299,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -165272,7 +165332,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -165289,7 +165349,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19353, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19361, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -165302,18 +165362,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28456, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28464, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28475, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28483, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28480, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28488, zName) { bRbuRowid = 1 } } @@ -165325,12 +165385,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28490, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28498, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28519 /* "may not have" */ + return ts + 28527 /* "may not have" */ } - return ts + 28532 /* "requires" */ + return ts + 28540 /* "requires" */ }())) } @@ -165339,7 +165399,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28541, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28549, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -165353,7 +165413,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28563, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28571, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -165394,7 +165454,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165403,8 +165463,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+28590, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14543 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28598, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14551 /* ", " */ } return zList } @@ -165413,7 +165473,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -165425,7 +165485,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+28599, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28607, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -165455,7 +165515,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -165464,25 +165524,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28612, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28620, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28644, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28652, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+28667) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28673, ts+28680, ts+4908) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+28675) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28681, ts+28688, ts+4908) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28688, + ts+28696, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28730, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28738, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -165514,7 +165574,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -165545,7 +165605,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -165582,7 +165642,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ __7: ; goto __5 @@ -165591,13 +165651,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28758, + zLhs = rbuMPrintf(tls, p, ts+28766, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28779, + zOrder = rbuMPrintf(tls, p, ts+28787, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28815, + zSelect = rbuMPrintf(tls, p, ts+28823, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ iCol++ goto __1 __2: @@ -165616,7 +165676,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28842, + Xsqlite3_mprintf(tls, ts+28850, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -165643,8 +165703,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28890, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14543 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28898, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14551 /* ", " */ goto __15 __15: iCol++ @@ -165656,7 +165716,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28897, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28905, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -165695,7 +165755,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -165713,7 +165773,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -165725,7 +165785,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28909, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28917, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1534 /* "" */ } else { @@ -165739,37 +165799,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ } else { - zCol = ts + 28480 /* "rbu_rowid" */ + zCol = ts + 28488 /* "rbu_rowid" */ } zType = ts + 1099 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+28931, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28939, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28667 + return ts + 28675 } return ts + 1534 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28951, + zImpPK = Xsqlite3_mprintf(tls, ts+28959, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28972, + zImpCols = Xsqlite3_mprintf(tls, ts+28980, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29005, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29013, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14543 /* ", " */ - zAnd = ts + 21373 /* " AND " */ + zCom = ts + 14551 /* ", " */ + zAnd = ts + 21381 /* " AND " */ nBind++ } @@ -165806,7 +165866,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165817,11 +165877,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29029, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29037, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29041, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29049, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14543 /* ", " */ + zS = ts + 14551 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -165830,7 +165890,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29050, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29058, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -165844,24 +165904,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29065, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29073, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1534 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29079, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29087, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21381 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29091, libc.VaList(bp+40, zList)) + ts+29099, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1534 /* "" */ @@ -165869,8 +165929,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29141, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21381 /* " AND " */ } } } @@ -165882,9 +165942,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29154, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29162, 0) } // Return a nul-terminated string containing the comma separated list of @@ -165902,7 +165962,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -165917,17 +165977,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29141, + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29180, + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29210, + zList = rbuMPrintf(tls, p, ts+29218, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } } @@ -165948,7 +166008,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -165978,26 +166038,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29247 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29255 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16054) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16062) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) } break } @@ -166010,15 +166070,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28667 /* " DESC" */ + zDesc = ts + 28675 /* " DESC" */ } else { zDesc = ts + 1534 /* "" */ } - z = rbuMPrintf(tls, p, ts+29260, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14543 /* ", " */ + z = rbuMPrintf(tls, p, ts+29268, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14551 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29271, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29279, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -166041,7 +166101,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -166058,7 +166118,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29275) + ts+29283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -166067,7 +166127,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -166077,23 +166137,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29325, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29333, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29347, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29355, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28667 /* " DESC" */ + return ts + 28675 /* " DESC" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29357, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29365, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29372, + ts+29380, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) } @@ -166117,7 +166177,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -166139,32 +166199,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29434 /* "PRIMARY KEY " */ + zPk = ts + 29442 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29447, + zSql = rbuMPrintf(tls, p, ts+29455, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29474 /* " NOT NULL" */ + return ts + 29482 /* " NOT NULL" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29484, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29492, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29491, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29499, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) @@ -166181,7 +166241,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -166191,12 +166251,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29538, + ts+29546, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -166218,7 +166278,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -166228,7 +166288,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29595) + ts+29603) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -166326,7 +166386,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -166338,7 +166398,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29661, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29669, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -166362,7 +166422,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29681, + ts+29689, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) @@ -166371,14 +166431,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+29746, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29754, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+29782, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29790, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -166395,7 +166455,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29816, + ts+29824, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -166403,9 +166463,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }() } return ts + 1534 /* "" */ @@ -166414,21 +166474,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29887, + ts+29895, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29948, + ts+29956, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -166466,17 +166526,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1534 } - return ts + 30107 + return ts + 30115 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+30116, + ts+30124, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30152 /* ", _rowid_" */ + return ts + 30160 /* ", _rowid_" */ } return ts + 1534 /* "" */ }(), zBindings))) @@ -166488,28 +166548,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30162, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30170, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30190 /* ", rbu_rowid" */ + zRbuRowid = ts + 30198 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30202, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30210, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30278 /* ", 0 AS rbu_rowid" */ + return ts + 30286 /* ", 0 AS rbu_rowid" */ } return ts + 1534 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30295, + ts+30303, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -166517,7 +166577,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30594, + ts+30602, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -166531,9 +166591,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30693 /* ",_rowid_ " */ + zRbuRowid = ts + 30701 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30703 /* ",rbu_rowid" */ + zRbuRowid = ts + 30711 /* ",rbu_rowid" */ } } @@ -166546,20 +166606,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28750, 0) + zOrder = rbuMPrintf(tls, p, ts+28758, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+30714, + ts+30722, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30762 /* "0 AS " */ + return ts + 30770 /* "0 AS " */ } return ts + 1534 /* "" */ }(), @@ -166572,7 +166632,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } return ts + 1534 /* "" */ }(), zOrder, @@ -166601,7 +166661,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -166652,9 +166712,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30107 /* "rbu_imp_" */ + zPrefix = ts + 30115 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30768, + zUpdate = Xsqlite3_mprintf(tls, ts+30776, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -166667,7 +166727,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166690,7 +166750,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -166706,7 +166766,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -166722,7 +166782,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30798, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30806, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -166790,7 +166850,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -166802,21 +166862,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30828, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30836, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30855, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30863, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+48, ts+3237, uint64(4)) } else { libc.Xmemcpy(tls, p+48, ts+6332, uint64(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30873, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30881, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -166856,11 +166916,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30939, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30947, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24020, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24028, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*uint8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -166872,13 +166932,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30971, + zTarget = Xsqlite3_mprintf(tls, ts+30979, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ } - return ts + 31003 /* "&" */ + return ts + 31011 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ @@ -166897,21 +166957,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31005, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31013, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31020, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31028, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31037, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31045, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -166919,7 +166979,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -166930,7 +166990,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31081, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31089, 0) } } @@ -166952,7 +167012,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -166960,7 +167020,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -166993,7 +167053,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -167001,7 +167061,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, uintptr(0), uintptr(0), uintptr(0)) } } @@ -167035,7 +167095,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31099, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31107, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -167085,7 +167145,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -167471,7 +167531,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31173) + ts+31181) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -167484,7 +167544,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31195, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31203, libc.VaList(bp, iCookie+1)) } } } @@ -167492,7 +167552,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -167509,7 +167569,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31222, + ts+31230, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -167547,16 +167607,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31380, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31388, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31395, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31403, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -167566,18 +167626,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31415, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31423, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31440) + ts+31448) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167591,12 +167651,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31548) + ts+31556) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+31613) + ts+31621) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167608,7 +167668,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31657, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31665, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -167616,7 +167676,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167630,8 +167690,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17139) - rbuCopyPragma(tls, p, ts+16250) + rbuCopyPragma(tls, p, ts+17147) + rbuCopyPragma(tls, p, ts+16258) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -167642,7 +167702,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31682, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31690, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -167668,10 +167728,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -167759,7 +167819,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -167777,7 +167837,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -167792,7 +167852,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31710, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31718, 0) } if rc == SQLITE_OK { @@ -167807,11 +167867,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31159, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31167, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -167826,7 +167886,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -167835,7 +167895,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]uint8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31735, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31743, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -167847,7 +167907,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -167857,7 +167917,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167874,7 +167934,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31746, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31754, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -167906,7 +167966,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167917,7 +167977,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31818, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31826, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -167925,7 +167985,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31832) + ts+31840) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -167937,7 +167997,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31889) + ts+31897) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -167948,7 +168008,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -168020,7 +168080,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31963, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31971, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -168042,12 +168102,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31995, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32003, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32027 /* "vacuum" */ + return ts + 32035 /* "vacuum" */ } - return ts + 32034 /* "update" */ + return ts + 32042 /* "update" */ }())) } } @@ -168055,7 +168115,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14432, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -168069,14 +168129,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16853) - rbuCopyPragma(tls, p, ts+16265) + rbuCopyPragma(tls, p, ts+16861) + rbuCopyPragma(tls, p, ts+16273) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32041, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32049, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -168086,7 +168146,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6332, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32057, uintptr(0), uintptr(0), p+64) + db, ts+32065, uintptr(0), uintptr(0), p+64) } } @@ -168121,7 +168181,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -168132,7 +168192,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -168140,13 +168200,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32081, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32089, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -168155,7 +168215,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -168171,12 +168231,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30107, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30115, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -168189,13 +168249,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -168209,7 +168269,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -168221,7 +168281,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32089, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32097, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -168254,13 +168314,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -168293,7 +168353,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168311,7 +168371,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -168320,7 +168380,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168339,19 +168399,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14432 /* "BEGIN" */ + zBegin = ts + 14440 /* "BEGIN" */ } else { - zBegin = ts + 32041 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32049 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32041, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32049, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168418,7 +168478,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -168435,7 +168495,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -168453,7 +168513,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -168475,7 +168535,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -168500,7 +168560,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -168515,7 +168575,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -168547,7 +168607,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -168556,20 +168616,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168633,7 +168693,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168672,7 +168732,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -168686,7 +168746,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -168700,7 +168760,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -168720,7 +168780,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168740,7 +168800,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -168748,7 +168808,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -168756,7 +168816,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168783,7 +168843,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32116, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32124, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -168808,7 +168868,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32139, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32147, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -168819,7 +168879,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168827,7 +168887,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168835,7 +168895,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168868,7 +168928,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168925,13 +168985,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168954,7 +169014,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -168996,7 +169056,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32150, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32158, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -169040,10 +169100,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -169052,7 +169112,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169097,7 +169157,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -169105,7 +169165,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -169115,7 +169175,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -169123,7 +169183,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -169131,7 +169191,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -169140,7 +169200,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -169149,7 +169209,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -169157,7 +169217,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -169165,13 +169225,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -169185,7 +169245,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -169246,17 +169306,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -169339,7 +169399,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -169410,7 +169470,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -169420,16 +169480,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -169443,13 +169503,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -169457,13 +169517,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -169473,13 +169533,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -169492,7 +169552,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -169500,7 +169560,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -169522,7 +169582,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -169610,7 +169670,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -169621,7 +169681,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -169644,14 +169704,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -169661,7 +169721,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -169674,7 +169734,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169740,7 +169800,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169766,7 +169826,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169809,7 +169869,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -169848,7 +169908,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -169887,7 +169947,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -169914,7 +169974,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -169989,7 +170049,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -170077,7 +170137,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -170141,7 +170201,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170158,13 +170218,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11225, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11233, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32161, 0) + ts+32169, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1534, 0) } else { @@ -170177,7 +170237,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32282, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32290, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -170272,7 +170332,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170289,7 +170349,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11225, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -170308,15 +170368,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170332,7 +170392,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170348,21 +170408,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -170476,7 +170536,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -170772,7 +170832,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -170807,7 +170867,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170842,25 +170902,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170880,24 +170940,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -170905,13 +170965,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170927,7 +170987,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170937,9 +170997,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32311, + zRet = Xsqlite3_mprintf(tls, ts+32319, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ if zRet == uintptr(0) { break } @@ -170949,7 +171009,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170962,9 +171022,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32345, + ts+32353, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32386 /* " OR " */ + zSep = ts + 32394 /* " OR " */ if zRet == uintptr(0) { break } @@ -170979,18 +171039,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32391, + ts+32399, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171018,7 +171078,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -171030,7 +171090,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32469, + ts+32477, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -171055,7 +171115,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171168,7 +171228,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32522, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32530, 0) __16: ; rc = SQLITE_SCHEMA @@ -171228,7 +171288,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -171264,7 +171324,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -171286,7 +171346,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171324,7 +171384,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -171336,7 +171396,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -171387,7 +171447,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -171432,7 +171492,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -171455,7 +171515,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -171466,7 +171526,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -171477,7 +171537,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -171490,7 +171550,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr)) @@ -171504,7 +171564,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171521,7 +171581,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -171542,7 +171602,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171602,7 +171662,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171708,7 +171768,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171765,7 +171825,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -171773,10 +171833,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11225, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32549, libc.VaList(bp, zDb)) + ts+32557, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -171785,18 +171845,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1534 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32659, bp+24) + sessionAppendStr(tls, bp+8, ts+32667, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1547, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+32674, bp+24) + sessionAppendStr(tls, bp+8, ts+32682, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+32682, bp+24) + sessionAppendStr(tls, bp+8, ts+32690, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -171816,7 +171876,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171894,7 +171954,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -171915,7 +171975,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -171937,7 +171997,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32688, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32696, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -172035,7 +172095,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32708, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32716, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -172045,7 +172105,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -172057,7 +172117,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -172065,7 +172125,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -172077,7 +172137,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -172085,7 +172145,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -172097,7 +172157,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -172110,7 +172170,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -172124,12 +172184,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -172155,12 +172215,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -172193,28 +172253,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -172232,7 +172292,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172265,7 +172325,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172290,7 +172350,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -172326,7 +172386,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -172344,7 +172404,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -172369,7 +172429,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -172411,7 +172471,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172430,7 +172490,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -172457,7 +172517,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172499,7 +172559,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172519,7 +172579,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -172554,7 +172614,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -172611,13 +172671,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -172687,7 +172747,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -172718,7 +172778,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172738,14 +172798,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -172759,7 +172819,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -172778,7 +172838,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -172800,7 +172860,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -172824,7 +172884,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -172841,7 +172901,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -172853,7 +172913,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -172870,7 +172930,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -173106,7 +173166,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -173157,7 +173217,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -173172,7 +173232,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -173194,9 +173254,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -173218,9 +173278,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -173228,7 +173288,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173289,7 +173349,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11225) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11233) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -173301,24 +173361,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32726, bp+16) + sessionAppendStr(tls, bp, ts+32734, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32739, bp+16) + sessionAppendStr(tls, bp, ts+32747, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32745, bp+16) + sessionAppendStr(tls, bp, ts+32753, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1534 /* "" */ - sessionAppendStr(tls, bp, ts+32674, bp+16) + sessionAppendStr(tls, bp, ts+32682, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -173326,13 +173386,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32750, bp+16) + ts+32758, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32682, bp+16) + sessionAppendStr(tls, bp, ts+32690, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } @@ -173362,7 +173422,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -173390,7 +173450,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173400,34 +173460,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32825, bp+16) + sessionAppendStr(tls, bp, ts+32833, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32674, bp+16) + sessionAppendStr(tls, bp, ts+32682, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32745, bp+16) + sessionAppendStr(tls, bp, ts+32753, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32843, bp+16) + sessionAppendStr(tls, bp, ts+32851, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32386, bp+16) + sessionAppendStr(tls, bp, ts+32394, bp+16) zSep = ts + 1534 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32682, bp+16) + sessionAppendStr(tls, bp, ts+32690, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32851 /* "AND " */ + zSep = ts + 32859 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4908, bp+16) @@ -173452,7 +173512,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6332, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -173464,7 +173524,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173472,19 +173532,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32856, bp+16) + sessionAppendStr(tls, bp, ts+32864, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21379, bp+16) + sessionAppendStr(tls, bp, ts+21387, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14543, bp+16) + sessionAppendStr(tls, bp, ts+14551, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32874, bp+16) + sessionAppendStr(tls, bp, ts+32882, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32885, bp+16) + sessionAppendStr(tls, bp, ts+32893, bp+16) } sessionAppendStr(tls, bp, ts+4908, bp+16) @@ -173495,7 +173555,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -173503,24 +173563,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11225, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11233, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32889) + ts+32897) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33002) + ts+33010) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -173547,7 +173607,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173568,7 +173628,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -173592,7 +173652,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173636,7 +173696,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173708,7 +173768,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173808,7 +173868,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -173943,7 +174003,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173965,7 +174025,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33146, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33154, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -173981,7 +174041,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33175, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -173990,7 +174050,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -174044,7 +174104,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -174062,10 +174122,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33186, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33194, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33212, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33220, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -174135,20 +174195,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33242, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33250, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33286, + ts+33294, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33357, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33365, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11225) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11233) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -174206,14 +174266,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33417, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33425, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33471, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33479, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -174235,7 +174295,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174253,7 +174313,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174261,7 +174321,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174276,7 +174336,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174284,7 +174344,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174456,7 +174516,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -174587,7 +174647,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -174641,7 +174701,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -174656,7 +174716,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174674,12 +174734,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174696,12 +174756,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -174709,7 +174769,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174733,7 +174793,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174760,7 +174820,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -174801,7 +174861,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -174863,7 +174923,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -175001,7 +175061,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -175016,7 +175076,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175031,7 +175091,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175047,7 +175107,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175063,7 +175123,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -175071,7 +175131,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -175159,7 +175219,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -175221,13 +175281,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -175265,14 +175325,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -175287,7 +175347,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -175298,7 +175358,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -175308,19 +175368,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -175353,7 +175413,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -175364,16 +175424,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -175388,7 +175448,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -175399,7 +175459,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -175416,7 +175476,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -175425,7 +175485,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -175444,7 +175504,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -175455,7 +175515,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -175471,7 +175531,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -175480,7 +175540,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -175492,9 +175552,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -175504,25 +175564,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -175530,17 +175590,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -175645,7 +175705,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -175718,7 +175778,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -175733,23 +175793,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -175786,9 +175846,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -175797,9 +175857,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -175809,7 +175869,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -175828,7 +175888,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -175844,7 +175904,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -175902,7 +175962,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -175910,7 +175970,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -175923,7 +175983,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -175947,7 +176007,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -175971,7 +176031,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -175982,7 +176042,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -175992,7 +176052,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33499, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33507, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -176001,7 +176061,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -176050,7 +176110,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -176083,7 +176143,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -176095,7 +176155,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176305,7 +176365,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176315,14 +176375,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33535, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -176351,7 +176411,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176406,7 +176466,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -176469,7 +176529,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -176520,11 +176580,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -176567,7 +176627,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{}))) @@ -176600,12 +176660,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -176614,7 +176674,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176622,7 +176682,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33558, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33566, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -176630,7 +176690,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176685,7 +176745,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -176696,7 +176756,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33565 /* "wrong number of ..." */ + var zErr uintptr = ts + 33573 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176745,19 +176805,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -176781,7 +176841,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -176810,7 +176870,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176868,7 +176928,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -176877,7 +176937,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -176900,7 +176960,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33615 /* "wrong number of ..." */ + var zErr uintptr = ts + 33623 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -177092,17 +177152,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -177113,7 +177173,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -177207,7 +177267,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -177275,18 +177335,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33663, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33671, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33679, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33681, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33689, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -177311,7 +177371,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -177326,7 +177386,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -177352,7 +177412,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -177364,21 +177424,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -177396,7 +177456,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -177408,7 +177468,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -177426,7 +177486,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -177442,26 +177502,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177523,14 +177583,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -177542,7 +177602,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -177554,9 +177614,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177573,7 +177633,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -177594,7 +177654,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -177619,7 +177679,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -177644,13 +177704,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177659,7 +177719,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177705,7 +177765,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -177737,18 +177797,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { @@ -177761,7 +177821,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { p++ @@ -177772,11 +177832,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*uint8)(unsafe.Pointer(p))) { case 'n': @@ -177865,7 +177925,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q uint8 var iIn int32 = 1 var iOut int32 = 0 @@ -177910,7 +177970,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote uint8 // Quote character (if any ) quote = *(*uint8)(unsafe.Pointer(z)) @@ -177923,11 +177983,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -177955,13 +178015,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33686, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33694, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -177988,14 +178048,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*uint8)(unsafe.Pointer(p))) < '0' || int32(*(*uint8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33693, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33701, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33724, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33732, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -178006,7 +178066,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33757, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33765, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -178019,7 +178079,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33794, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33802, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -178028,7 +178088,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33811, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -178047,7 +178107,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33836, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33844, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -178062,14 +178122,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33870, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33878, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33878, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33886, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*uint8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33910, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33918, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -178077,9 +178137,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33916, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33924, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33930, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33938, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -178087,9 +178147,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33968, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33976, zCmd, nCmd) == 0 { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || int32(*(*uint8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33987, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -178100,25 +178160,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5026, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7905, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17244}, - {FzName: ts + 34014, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17252}, + {FzName: ts + 34022, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34022, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34030, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34053, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34061, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -178136,7 +178196,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -178170,20 +178230,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22014) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16166) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34081, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22022) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16174) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34111) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34119) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34121, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34129, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -178193,7 +178253,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -178201,13 +178261,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34152, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34160, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34157, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34165, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34164, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34172, libc.VaList(bp+16, i)) } } } @@ -178226,7 +178286,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -178255,8 +178315,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22014) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34172, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22022) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34180, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -178290,7 +178350,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34201, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34209, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -178331,19 +178391,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33870 /* "content" */ + zTail = ts + 33878 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34221 /* "docsize" */ + zTail = ts + 34229 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34229, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34237, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16166, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16174, -1) } // Formulate the zContentExprlist text @@ -178359,7 +178419,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -178384,7 +178444,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -178392,18 +178452,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34240, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34248, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1534 } - return ts + 14543 + return ts + 14551 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34256, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34264, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34263, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22014)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34271, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22022)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -178434,7 +178494,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -178448,7 +178508,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -178475,7 +178535,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178539,13 +178599,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34289) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34297) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -178555,7 +178615,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34294) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34302) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -178565,7 +178625,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34311) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -178578,7 +178638,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34313) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34321) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -178588,7 +178648,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34323) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34331) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -178604,7 +178664,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22014) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22022) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -178627,11 +178687,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34335 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34343 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -178654,7 +178714,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34367) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34375) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -178669,7 +178729,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34375, + ts+34383, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -178704,7 +178764,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -178723,9 +178783,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -178737,12 +178797,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178804,7 +178864,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34440, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34448, 0) return FTS5_EOF } } @@ -178817,20 +178877,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34460, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34468, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34491, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34499, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34494, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34502, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29877, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29885, uint64(3)) == 0 { tok = FTS5_AND } break @@ -178842,15 +178902,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -178928,7 +178988,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -179003,7 +179063,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -179015,7 +179075,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -179023,7 +179083,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -179064,7 +179124,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -179086,7 +179146,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -179250,7 +179310,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -179475,11 +179535,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -179487,7 +179547,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -179499,9 +179559,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -179518,7 +179578,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -179720,7 +179780,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -179740,7 +179800,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179767,7 +179827,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179824,7 +179884,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179890,7 +179950,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -179906,7 +179966,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -179915,7 +179975,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179941,7 +180001,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -179960,7 +180020,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -180028,7 +180088,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -180087,7 +180147,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -180106,7 +180166,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -180124,7 +180184,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -180140,7 +180200,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -180166,7 +180226,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -180216,7 +180276,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -180228,7 +180288,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -180258,7 +180318,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -180274,7 +180334,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -180327,7 +180387,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -180389,7 +180449,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -180421,7 +180481,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -180437,15 +180497,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180455,7 +180515,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -180480,7 +180540,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -180492,7 +180552,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -180552,12 +180612,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180626,12 +180686,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -180642,12 +180702,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -180664,7 +180724,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180722,7 +180782,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180817,17 +180877,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34498, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34506, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33535, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180839,7 +180899,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c uint8 = *(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34503, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34511, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -180858,7 +180918,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -180896,7 +180956,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -180918,7 +180978,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180936,7 +180996,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20376, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20384, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -180957,7 +181017,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -180972,7 +181032,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -180996,7 +181056,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -181024,21 +181084,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34532, 0) + ts+34540, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -181089,7 +181149,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte)) @@ -181109,7 +181169,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -181152,7 +181212,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181212,12 +181272,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34585, + ts+34593, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34635 /* "phrase" */ + return ts + 34643 /* "phrase" */ } - return ts + 34498 /* "NEAR" */ + return ts + 34506 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -181240,7 +181300,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -181286,7 +181346,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -181299,7 +181359,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -181309,7 +181369,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -181318,7 +181378,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -181339,7 +181399,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -181363,12 +181423,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -181378,7 +181438,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -181413,7 +181473,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -181441,7 +181501,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -181452,7 +181512,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -181502,12 +181562,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -181558,7 +181618,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -181574,14 +181634,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -181609,7 +181669,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -181618,7 +181678,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -181632,7 +181692,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181641,7 +181701,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181652,7 +181712,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -181682,7 +181742,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -181731,7 +181791,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -181890,7 +181950,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181936,7 +181996,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -181978,7 +182038,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -182012,20 +182072,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -182251,7 +182311,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -182459,14 +182519,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -182474,17 +182534,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -182498,18 +182558,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -182531,18 +182591,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -182559,9 +182619,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -182569,38 +182629,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -182608,7 +182668,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -182626,7 +182686,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -182650,7 +182710,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182661,7 +182721,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -182673,7 +182733,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -182700,7 +182760,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34642, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34650, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -182746,11 +182806,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -182762,7 +182822,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -182777,7 +182837,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182788,7 +182848,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+34648, + ts+34656, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -182805,7 +182865,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182816,7 +182876,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34699, + ts+34707, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -182830,7 +182890,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182840,7 +182900,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+34748, + ts+34756, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -182852,7 +182912,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -182863,22 +182923,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -182889,7 +182949,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -182931,7 +182991,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183024,7 +183084,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -183044,7 +183104,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -183067,7 +183127,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183095,7 +183155,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183104,7 +183164,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+34788, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34796, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -183128,7 +183188,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -183145,7 +183205,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -183159,7 +183219,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183212,14 +183272,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -183262,7 +183322,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -183311,7 +183371,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183347,7 +183407,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -183368,7 +183428,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -183381,7 +183441,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -183389,11 +183449,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -183414,7 +183474,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183476,7 +183536,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -183499,12 +183559,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -183514,7 +183574,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -183556,16 +183616,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -183595,7 +183655,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183624,7 +183684,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183669,7 +183729,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -183701,7 +183761,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183735,7 +183795,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -183757,7 +183817,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -183798,7 +183858,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183857,7 +183917,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -183907,7 +183967,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -183915,7 +183975,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183944,7 +184004,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -184049,7 +184109,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -184174,7 +184234,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -184274,7 +184334,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -184302,7 +184362,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -184536,7 +184596,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184544,7 +184604,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+34811, + ts+34819, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -184555,7 +184615,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -184625,7 +184685,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -184681,7 +184741,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -184696,7 +184756,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -184748,7 +184808,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -184778,7 +184838,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -184828,7 +184888,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -184839,7 +184899,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -184862,7 +184922,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -184902,7 +184962,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -184913,7 +184973,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184952,7 +185012,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184977,12 +185037,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -185001,7 +185061,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -185018,21 +185078,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -185042,7 +185102,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185068,7 +185128,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185148,7 +185208,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -185204,7 +185264,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -185255,7 +185315,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185316,7 +185376,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185324,7 +185384,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185344,7 +185404,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -185352,7 +185412,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185368,7 +185428,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -185430,7 +185490,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185452,7 +185512,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -185497,7 +185557,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -185700,7 +185760,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -185733,7 +185793,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -185741,13 +185801,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -185766,7 +185826,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -185779,7 +185839,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -185821,7 +185881,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -185834,7 +185894,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -185844,7 +185904,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -185865,7 +185925,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) @@ -185884,7 +185944,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -185906,7 +185966,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -185939,7 +185999,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -185949,7 +186009,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -185962,7 +186022,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185978,7 +186038,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -186038,7 +186098,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -186074,14 +186134,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -186157,7 +186217,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -186186,7 +186246,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186215,7 +186275,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -186239,7 +186299,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186260,7 +186320,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+34895, + ts+34903, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -186279,7 +186339,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186348,13 +186408,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -186513,7 +186573,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186563,7 +186623,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -186580,7 +186640,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186597,7 +186657,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -186606,14 +186666,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186638,7 +186698,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -186816,7 +186876,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -186825,7 +186885,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -186886,7 +186946,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186920,7 +186980,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186945,12 +187005,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -186977,7 +187037,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187009,7 +187069,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -187019,13 +187079,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187042,7 +187102,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187098,11 +187158,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -187113,7 +187173,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -187126,7 +187186,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -187291,7 +187351,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -187438,7 +187498,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -187458,7 +187518,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -187469,7 +187529,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -187480,7 +187540,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187499,7 +187559,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187510,13 +187570,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34952, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34960, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24870, ts+34960, 0, pzErr) + pConfig, ts+24878, ts+34968, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11365, - ts+34995, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11373, + ts+35003, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -187533,7 +187593,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -187554,7 +187614,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -187581,7 +187641,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -187603,7 +187663,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -187627,7 +187687,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187710,7 +187770,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -187718,7 +187778,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187738,14 +187798,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187763,7 +187823,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187776,7 +187836,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -187798,7 +187858,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -187806,7 +187866,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -187815,7 +187875,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187828,7 +187888,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34642, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34650, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -187837,7 +187897,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -187851,7 +187911,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -187871,7 +187931,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -187890,7 +187950,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187949,7 +188009,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187965,7 +188025,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35039, + ts+35047, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -188118,7 +188178,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -188177,7 +188237,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35125) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35133) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -188208,13 +188268,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -188247,7 +188307,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -188269,7 +188329,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -188277,9 +188337,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -188308,35 +188368,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -188370,21 +188430,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -188394,13 +188454,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -188418,7 +188478,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188476,11 +188536,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -188489,14 +188549,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -188567,7 +188627,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188588,7 +188648,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR } @@ -188729,7 +188789,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -188740,7 +188800,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -188766,7 +188826,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -188779,11 +188839,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -188826,7 +188886,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -188843,7 +188903,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188853,7 +188913,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -188887,7 +188947,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -188907,7 +188967,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -188936,7 +188996,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188995,7 +189055,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189023,7 +189083,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -189052,11 +189112,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35169, + ts+35177, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14543 /* ", " */ + return ts + 14551 /* ", " */ } return ts + 1534 /* "" */ }(), @@ -189068,9 +189128,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35224 /* "DESC" */ + return ts + 35232 /* "DESC" */ } - return ts + 35229 /* "ASC" */ + return ts + 35237 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -189090,7 +189150,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -189105,7 +189165,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189121,13 +189181,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35233, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35241, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5008, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35239, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35247, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -189137,7 +189197,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -189150,7 +189210,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -189162,7 +189222,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35267, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35275, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -189194,7 +189254,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35277, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35285, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -189203,7 +189263,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -189226,21 +189286,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35298, libc.VaList(bp, z)) + ts+35306, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33681 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33689 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -189259,7 +189319,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189299,7 +189359,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR __1: ; @@ -189534,7 +189594,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35331, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35339, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -189580,7 +189640,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -189591,7 +189651,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -189605,7 +189665,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -189635,7 +189695,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189679,7 +189739,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -189701,7 +189761,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189709,29 +189769,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35367, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35375, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35378, 0) + ts+35386, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35458, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35466, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35466, 0) + ts+35474, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16833, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16841, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35522, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35530, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35528, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -189750,7 +189810,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -189760,7 +189820,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -189783,7 +189843,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189805,7 +189865,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17378, z) { + 0 == Xsqlite3_stricmp(tls, ts+17386, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -189830,12 +189890,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35544, + ts+35552, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ } - return ts + 35581 /* "DELETE from" */ + return ts + 35589 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -189885,7 +189945,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -189897,7 +189957,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -189906,7 +189966,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -189914,7 +189974,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -189922,46 +189982,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -189978,7 +190038,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -190035,7 +190095,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -190119,7 +190179,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -190129,7 +190189,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -190145,11 +190205,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -190161,7 +190221,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -190219,7 +190279,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190257,7 +190317,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -190279,7 +190339,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190301,7 +190361,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190324,7 +190384,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190357,7 +190417,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190438,10 +190498,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190477,7 +190537,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -190486,7 +190546,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -190496,7 +190556,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190509,7 +190569,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35593, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35601, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -190519,7 +190579,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -190541,7 +190601,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -190605,7 +190665,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -190645,7 +190705,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -190664,12 +190724,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -190677,7 +190737,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190686,7 +190746,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190695,7 +190755,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -190704,7 +190764,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -190735,7 +190795,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -190764,7 +190824,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -190782,7 +190842,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -190798,7 +190858,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190814,7 +190874,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35614, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35622, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -190833,7 +190893,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35636, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35644, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -190849,7 +190909,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -190875,28 +190935,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35667) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35675) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35680, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35688, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -190907,10 +190967,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35771, ts + 33870, ts + 24870, ts + 34221, ts + 11365, -} /* sqlite3.c:234311:21 */ + ts + 35779, ts + 33878, ts + 24878, ts + 34229, ts + 11373, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -190931,7 +190991,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35778, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35786, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -190949,13 +191009,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35778, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35786, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35783, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35791, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -190993,7 +191053,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -191002,7 +191062,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -191010,7 +191070,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -191021,20 +191081,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35798, - ts + 35866, - ts + 35935, + ts + 35806, + ts + 35874, + ts + 35943, - ts + 35968, - ts + 36007, - ts + 36047, - ts + 36086, - ts + 36127, + ts + 35976, + ts + 36015, + ts + 36055, + ts + 36094, + ts + 36135, - ts + 36166, + ts + 36174, - ts + 36208, - ts + 36248, + ts + 36216, + ts + 36256, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -191111,7 +191171,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -191133,79 +191193,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36271, + ts+36279, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36375, + ts+36383, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36413, + ts+36421, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36451, + ts+36459, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24870, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11365, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35771, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24878, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11373, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35779, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34221, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34229, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33870, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33878, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36493, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36501, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36523, + ts+36531, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -191218,7 +191278,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191247,27 +191307,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36567, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36575, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36590, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36598, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33870, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33878, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34221, ts+36596, 0, pzErr) + pConfig, ts+34229, ts+36604, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35771, ts+36628, 1, pzErr) + pConfig, ts+35779, ts+36636, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -191279,7 +191339,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -191298,12 +191358,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -191320,7 +191380,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -191389,7 +191449,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191416,7 +191476,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -191430,7 +191490,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -191454,7 +191514,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191495,7 +191555,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -191507,12 +191567,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36645, + ts+36653, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36695, + ts+36703, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -191522,12 +191582,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -191591,15 +191651,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -191610,7 +191670,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191632,7 +191692,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191664,7 +191724,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -191709,7 +191769,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -191717,7 +191777,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36724, + zSql = Xsqlite3_mprintf(tls, ts+36732, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -191744,13 +191804,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191816,7 +191876,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -191914,14 +191974,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33870, bp+48) + rc = fts5StorageCount(tls, p, ts+33878, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34221, bp+56) + rc = fts5StorageCount(tls, p, ts+34229, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -191941,7 +192001,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -191955,7 +192015,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -191965,7 +192025,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -191983,7 +192043,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192014,7 +192074,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -192032,7 +192092,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -192049,7 +192109,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -192063,12 +192123,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192123,13 +192183,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*uint8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -192139,12 +192199,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -192160,9 +192220,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36756) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36764) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36775) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -192179,7 +192239,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(aIn + uintptr(i))) @@ -192191,7 +192251,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -192272,7 +192332,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -192282,11 +192342,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -192341,7 +192401,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -192363,7 +192423,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -192373,7 +192433,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*uint8)(unsafe.Pointer(z)) != 0 { @@ -192393,7 +192453,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -192404,7 +192464,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36778 /* "L* N* Co" */ + var zCat uintptr = ts + 36786 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -192417,7 +192477,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36787) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36795) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -192428,18 +192488,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36798) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36806) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '2' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*uint8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36756) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36764) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36775) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36787) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36795) { // no-op } else { rc = SQLITE_ERROR @@ -192461,12 +192521,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -192722,7 +192782,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]uint8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -192731,10 +192791,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -192745,7 +192805,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192753,7 +192813,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36816 /* "unicode61" */ + var zBase uintptr = ts + 36824 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -192798,9 +192858,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -192810,15 +192870,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -192839,12 +192899,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -192854,7 +192914,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -192864,7 +192924,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -192882,14 +192942,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -192904,13 +192964,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36826, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192918,11 +192978,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36829, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36837, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192930,7 +192990,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36839, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192938,7 +192998,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192946,11 +193006,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36845, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192958,19 +193018,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36855, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36867, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36865, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36870, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192978,11 +193038,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192990,7 +193050,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36881, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192998,11 +193058,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36885, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193010,22 +193070,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36901, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -193033,34 +193077,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36909, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36885, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36913, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36908, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36911, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36901, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36923, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -193070,143 +193130,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36934, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36933, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36941, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36938, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36829, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36837, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36901, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36953, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36961, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15379, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15387, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36958, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36970, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36870, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36878, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36973, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36977, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36985, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36901, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36985, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37001, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37012, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36897, uint64(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37026, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36905, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37030, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37034, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37046, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36897, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36905, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -193216,22 +193276,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37057, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37062, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37070, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -193239,21 +193299,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37067, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37073, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37034, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193261,7 +193321,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -193269,9 +193329,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37085, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -193281,18 +193341,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37091, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37095, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37103, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37098, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -193301,7 +193361,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37101, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -193318,7 +193378,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -193334,7 +193394,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193432,7 +193492,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -193453,20 +193513,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -193477,7 +193537,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37105) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37113) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -193497,7 +193557,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -193650,7 +193710,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -193664,27 +193724,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36816, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36824, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37120, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37128, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37126, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37133, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -193710,7 +193770,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -193733,7 +193793,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -193804,7 +193864,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -193823,7 +193883,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -193884,7 +193944,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -193942,7 +194002,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -193954,9 +194014,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*uint8)(unsafe.Pointer(zCat))) { case 'C': @@ -194153,7 +194213,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -194332,7 +194392,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -194511,9 +194571,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -194553,7 +194613,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -194585,7 +194645,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194660,7 +194720,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -194836,7 +194896,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -194882,7 +194942,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -194895,7 +194955,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -194955,7 +195015,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -194995,7 +195055,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -195016,9 +195076,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -195026,7 +195086,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -195034,14 +195094,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37141) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37145) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37153) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37157) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37158, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37166, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -195051,14 +195111,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -195083,24 +195143,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 37192, - ts + 37232, - ts + 37267, + ts + 37200, + ts + 37240, + ts + 37275, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23166, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23174, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37310, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37318, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -195153,11 +195213,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -195171,7 +195231,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -195239,7 +195299,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -195252,11 +195312,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37343, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37351, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37374, + ts+37382, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -195280,7 +195340,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37425, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37433, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -195306,7 +195366,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -195320,7 +195380,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -195329,7 +195389,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195360,7 +195420,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -195389,7 +195449,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -195533,7 +195593,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -195607,12 +195667,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -195685,16 +195745,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37451, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37459, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -195711,7 +195771,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -195738,966 +195798,966 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37461 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37469 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off64_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, X__mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 584 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr - }{libc.Xmremap})) // sqlite3.c:35283:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmremap})) // sqlite3.c:35292:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go new file mode 100644 index 00000000..e7cfcc67 --- /dev/null +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go @@ -0,0 +1,196684 @@ +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_riscv64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. + +package sqlite3 + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" + + "modernc.org/libc" + "modernc.org/libc/sys/types" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer +var _ *libc.TLS +var _ types.Size_t + +const ( + ACCESSPERMS = 511 + ADJ_ESTERROR = 0x0008 + ADJ_FREQUENCY = 0x0002 + ADJ_MAXERROR = 0x0004 + ADJ_MICRO = 0x1000 + ADJ_NANO = 0x2000 + ADJ_OFFSET = 0x0001 + ADJ_OFFSET_SINGLESHOT = 0x8001 + ADJ_OFFSET_SS_READ = 0xa001 + ADJ_SETOFFSET = 0x0100 + ADJ_STATUS = 0x0010 + ADJ_TAI = 0x0080 + ADJ_TICK = 0x4000 + ADJ_TIMECONST = 0x0020 + ALLPERMS = 4095 + AT_EACCESS = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -100 + AT_NO_AUTOMOUNT = 0x800 + AT_RECURSIVE = 0x8000 + AT_REMOVEDIR = 0x200 + AT_STATX_DONT_SYNC = 0x4000 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_SYNC_AS_STAT = 0x0000 + AT_STATX_SYNC_TYPE = 0x6000 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 + BIG_ENDIAN = 4321 + BITVEC_SZ = 512 + BITVEC_SZELEM = 8 + BTALLOC_ANY = 0 + BTALLOC_EXACT = 1 + BTALLOC_LE = 2 + BTCF_AtLast = 0x08 + BTCF_Incrblob = 0x10 + BTCF_Multiple = 0x20 + BTCF_Pinned = 0x40 + BTCF_ValidNKey = 0x02 + BTCF_ValidOvfl = 0x04 + BTCF_WriteFlag = 0x01 + BTCURSOR_MAX_DEPTH = 20 + BTREE_APPEND = 0x08 + BTREE_APPLICATION_ID = 8 + BTREE_AUTOVACUUM_FULL = 1 + BTREE_AUTOVACUUM_INCR = 2 + BTREE_AUTOVACUUM_NONE = 0 + BTREE_AUXDELETE = 0x04 + BTREE_BLOBKEY = 2 + BTREE_BULKLOAD = 0x00000001 + BTREE_DATA_VERSION = 15 + BTREE_DEFAULT_CACHE_SIZE = 3 + BTREE_FILE_FORMAT = 2 + BTREE_FORDELETE = 0x00000008 + BTREE_FREE_PAGE_COUNT = 0 + BTREE_HINT_RANGE = 0 + BTREE_INCR_VACUUM = 7 + BTREE_INTKEY = 1 + BTREE_LARGEST_ROOT_PAGE = 4 + BTREE_MEMORY = 2 + BTREE_OMIT_JOURNAL = 1 + BTREE_PREFORMAT = 0x80 + BTREE_SAVEPOSITION = 0x02 + BTREE_SCHEMA_VERSION = 1 + BTREE_SEEK_EQ = 0x00000002 + BTREE_SINGLE = 4 + BTREE_TEXT_ENCODING = 5 + BTREE_UNORDERED = 8 + BTREE_USER_VERSION = 6 + BTREE_WRCSR = 0x00000004 + BTS_EXCLUSIVE = 0x0040 + BTS_FAST_SECURE = 0x000c + BTS_INITIALLY_EMPTY = 0x0010 + BTS_NO_WAL = 0x0020 + BTS_OVERWRITE = 0x0008 + BTS_PAGESIZE_FIXED = 0x0002 + BTS_PENDING = 0x0080 + BTS_READ_ONLY = 0x0001 + BTS_SECURE_DELETE = 0x0004 + BUFSIZ = 8192 + BYTE_ORDER = 1234 + CACHE_STALE = 0 + CBRK = 0 + CC_AND = 24 + CC_BANG = 15 + CC_BOM = 30 + CC_COMMA = 23 + CC_DIGIT = 3 + CC_DOLLAR = 4 + CC_DOT = 26 + CC_EQ = 14 + CC_GT = 13 + CC_ID = 27 + CC_ILLEGAL = 28 + CC_KYWD = 2 + CC_KYWD0 = 1 + CC_LP = 17 + CC_LT = 12 + CC_MINUS = 11 + CC_NUL = 29 + CC_PERCENT = 22 + CC_PIPE = 10 + CC_PLUS = 20 + CC_QUOTE = 8 + CC_QUOTE2 = 9 + CC_RP = 18 + CC_SEMI = 19 + CC_SLASH = 16 + CC_SPACE = 7 + CC_STAR = 21 + CC_TILDA = 25 + CC_VARALPHA = 5 + CC_VARNUM = 6 + CC_X = 0 + CDISCARD = 15 + CDSUSP = 25 + CEOF = 4 + CEOL = 0 + CEOT = 4 + CERASE = 0177 + CFLUSH = 15 + CINTR = 3 + CKCNSTRNT_COLUMN = 0x01 + CKCNSTRNT_ROWID = 0x02 + CKILL = 21 + CLNEXT = 22 + CLOCK_BOOTTIME = 7 + CLOCK_BOOTTIME_ALARM = 9 + CLOCK_MONOTONIC = 1 + CLOCK_MONOTONIC_COARSE = 6 + CLOCK_MONOTONIC_RAW = 4 + CLOCK_PROCESS_CPUTIME_ID = 2 + CLOCK_REALTIME = 0 + CLOCK_REALTIME_ALARM = 8 + CLOCK_REALTIME_COARSE = 5 + CLOCK_TAI = 11 + CLOCK_THREAD_CPUTIME_ID = 3 + CLOSE_RANGE_CLOEXEC = 4 + CLOSE_RANGE_UNSHARE = 2 + CMIN = 1 + COLFLAG_BUSY = 0x0100 + COLFLAG_GENERATED = 0x0060 + COLFLAG_HASCOLL = 0x0200 + COLFLAG_HASTYPE = 0x0004 + COLFLAG_HIDDEN = 0x0002 + COLFLAG_NOINSERT = 0x0062 + COLFLAG_NOTAVAIL = 0x0080 + COLFLAG_PRIMKEY = 0x0001 + COLFLAG_SORTERREF = 0x0010 + COLFLAG_STORED = 0x0040 + COLFLAG_UNIQUE = 0x0008 + COLFLAG_VIRTUAL = 0x0020 + COLNAME_COLUMN = 4 + COLNAME_DATABASE = 2 + COLNAME_DECLTYPE = 1 + COLNAME_N = 5 + COLNAME_NAME = 0 + COLNAME_TABLE = 3 + COLTYPE_ANY = 1 + COLTYPE_BLOB = 2 + COLTYPE_CUSTOM = 0 + COLTYPE_INT = 3 + COLTYPE_INTEGER = 4 + COLTYPE_REAL = 5 + COLTYPE_TEXT = 6 + CQUIT = 034 + CREPRINT = 18 + CRPRNT = 18 + CSTART = 17 + CSTATUS = 0 + CSTOP = 19 + CSUSP = 26 + CTIME = 0 + CURSOR_FAULT = 4 + CURSOR_INVALID = 1 + CURSOR_REQUIRESEEK = 3 + CURSOR_SKIPNEXT = 2 + CURSOR_VALID = 0 + CURTYPE_BTREE = 0 + CURTYPE_PSEUDO = 3 + CURTYPE_SORTER = 1 + CURTYPE_VTAB = 2 + CWERASE = 23 + DBFLAG_EncodingFixed = 0x0040 + DBFLAG_InternalFunc = 0x0020 + DBFLAG_PreferBuiltin = 0x0002 + DBFLAG_SchemaChange = 0x0001 + DBFLAG_SchemaKnownOk = 0x0010 + DBFLAG_Vacuum = 0x0004 + DBFLAG_VacuumInto = 0x0008 + DB_ResetWanted = 0x0008 + DB_SchemaLoaded = 0x0001 + DB_UnresetViews = 0x0002 + DEFFILEMODE = 438 + DIRECT_MODE = 0 + DN_ACCESS = 0x00000001 + DN_ATTRIB = 0x00000020 + DN_CREATE = 0x00000004 + DN_DELETE = 0x00000008 + DN_MODIFY = 0x00000002 + DN_MULTISHOT = 0x80000000 + DN_RENAME = 0x00000010 + DOTLOCK_SUFFIX = ".lock" + E2BIG = 7 + EACCES = 13 + EADDRINUSE = 98 + EADDRNOTAVAIL = 99 + EADV = 68 + EAFNOSUPPORT = 97 + EAGAIN = 11 + EALREADY = 114 + EBADE = 52 + EBADF = 9 + EBADFD = 77 + EBADMSG = 74 + EBADR = 53 + EBADRQC = 56 + EBADSLT = 57 + EBFONT = 59 + EBUSY = 16 + ECANCELED = 125 + ECHILD = 10 + ECHRNG = 44 + ECOMM = 70 + ECONNABORTED = 103 + ECONNREFUSED = 111 + ECONNRESET = 104 + EDEADLK = 35 + EDEADLOCK = 35 + EDESTADDRREQ = 89 + EDOM = 33 + EDOTDOT = 73 + EDQUOT = 122 + EEXIST = 17 + EFAULT = 14 + EFBIG = 27 + EHOSTDOWN = 112 + EHOSTUNREACH = 113 + EHWPOISON = 133 + EIDRM = 43 + EILSEQ = 84 + EINPROGRESS = 115 + EINTR = 4 + EINVAL = 22 + EIO = 5 + EISCONN = 106 + EISDIR = 21 + EISNAM = 120 + EKEYEXPIRED = 127 + EKEYREJECTED = 129 + EKEYREVOKED = 128 + EL2HLT = 51 + EL2NSYNC = 45 + EL3HLT = 46 + EL3RST = 47 + ELIBACC = 79 + ELIBBAD = 80 + ELIBEXEC = 83 + ELIBMAX = 82 + ELIBSCN = 81 + ELNRNG = 48 + ELOOP = 40 + EMEDIUMTYPE = 124 + EMFILE = 24 + EMLINK = 31 + EMSGSIZE = 90 + EMULTIHOP = 72 + ENAMETOOLONG = 36 + ENAME_NAME = 0 + ENAME_SPAN = 1 + ENAME_TAB = 2 + ENAVAIL = 119 + ENETDOWN = 100 + ENETRESET = 102 + ENETUNREACH = 101 + ENFILE = 23 + ENOANO = 55 + ENOBUFS = 105 + ENOCSI = 50 + ENODATA = 61 + ENODEV = 19 + ENOENT = 2 + ENOEXEC = 8 + ENOKEY = 126 + ENOLCK = 37 + ENOLINK = 67 + ENOMEDIUM = 123 + ENOMEM = 12 + ENOMSG = 42 + ENONET = 64 + ENOPKG = 65 + ENOPROTOOPT = 92 + ENOSPC = 28 + ENOSR = 63 + ENOSTR = 60 + ENOSYS = 38 + ENOTBLK = 15 + ENOTCONN = 107 + ENOTDIR = 20 + ENOTEMPTY = 39 + ENOTNAM = 118 + ENOTRECOVERABLE = 131 + ENOTSOCK = 88 + ENOTSUP = 95 + ENOTTY = 25 + ENOTUNIQ = 76 + ENXIO = 6 + EOF = -1 + EOPNOTSUPP = 95 + EOVERFLOW = 75 + EOWNERDEAD = 130 + EPERM = 1 + EPFNOSUPPORT = 96 + EPIPE = 32 + EPROTO = 71 + EPROTONOSUPPORT = 93 + EPROTOTYPE = 91 + EP_Agg = 0x000010 + EP_CanBeNull = 0x100000 + EP_Collate = 0x000100 + EP_Commuted = 0x000200 + EP_ConstFunc = 0x080000 + EP_DblQuoted = 0x000040 + EP_Distinct = 0x000002 + EP_FixedCol = 0x000008 + EP_FromDDL = 0x40000000 + EP_FromJoin = 0x000001 + EP_HasFunc = 0x000004 + EP_IfNullRow = 0x020000 + EP_Immutable = 0x02 + EP_InfixFunc = 0x000080 + EP_IntValue = 0x000400 + EP_IsFalse = 0x20000000 + EP_IsTrue = 0x10000000 + EP_Leaf = 0x800000 + EP_MemToken = 0x010000 + EP_NoReduce = 0x01 + EP_Propagate = 2097412 + EP_Quoted = 0x4000000 + EP_Reduced = 0x002000 + EP_Skip = 0x001000 + EP_Static = 0x8000000 + EP_Subquery = 0x200000 + EP_Subrtn = 0x2000000 + EP_TokenOnly = 0x004000 + EP_Unlikely = 0x040000 + EP_VarSelect = 0x000020 + EP_Win = 0x008000 + EP_WinFunc = 0x1000000 + EP_xIsSelect = 0x000800 + ERANGE = 34 + EREMCHG = 78 + EREMOTE = 66 + EREMOTEIO = 121 + ERESTART = 85 + ERFKILL = 132 + EROFS = 30 + ESHUTDOWN = 108 + ESOCKTNOSUPPORT = 94 + ESPIPE = 29 + ESRCH = 3 + ESRMNT = 69 + ESTALE = 116 + ESTRPIPE = 86 + ETIME = 62 + ETIMEDOUT = 110 + ETOOMANYREFS = 109 + ETXTBSY = 26 + EUCLEAN = 117 + EUNATCH = 49 + EUSERS = 87 + EWOULDBLOCK = 11 + EXCLUDED_TABLE_NUMBER = 2 + EXCLUSIVE_LOCK = 4 + EXDEV = 18 + EXFULL = 54 + EXIT_FAILURE = 1 + EXIT_SUCCESS = 0 + EXPRDUP_REDUCE = 0x0001 + F2FS_FEATURE_ATOMIC_WRITE = 0x0004 + F2FS_IOCTL_MAGIC = 0xf5 + F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 + F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 + F2FS_IOC_START_ATOMIC_WRITE = 62721 + F2FS_IOC_START_VOLATILE_WRITE = 62723 + FALLOC_FL_COLLAPSE_RANGE = 0x08 + FALLOC_FL_INSERT_RANGE = 0x20 + FALLOC_FL_KEEP_SIZE = 0x01 + FALLOC_FL_NO_HIDE_STALE = 0x04 + FALLOC_FL_PUNCH_HOLE = 0x02 + FALLOC_FL_UNSHARE_RANGE = 0x40 + FALLOC_FL_ZERO_RANGE = 0x10 + FAPPEND = 1024 + FASYNC = 8192 + FD_CLOEXEC = 1 + FD_SETSIZE = 1024 + FFSYNC = 1052672 + FILENAME_MAX = 4096 + FIOASYNC = 0x5452 + FIOCLEX = 0x5451 + FIONBIO = 0x5421 + FIONCLEX = 0x5450 + FIONREAD = 0x541B + FIOQSIZE = 0x5460 + FLAG_SIGNED = 1 + FLAG_STRING = 4 + FNDELAY = 2048 + FNONBLOCK = 2048 + FOPEN_MAX = 16 + FP_FAST_FMA = 1 + FP_FAST_FMAF = 1 + FP_ILOGB0 = -2147483647 + FP_ILOGBNAN = 2147483647 + FP_INFINITE1 = 1 + FP_INT_DOWNWARD1 = 1 + FP_INT_TONEAREST1 = 4 + FP_INT_TONEARESTFROMZERO1 = 3 + FP_INT_TOWARDZERO1 = 2 + FP_INT_UPWARD1 = 0 + FP_LLOGB0 = -9223372036854775807 + FP_LLOGBNAN = 9223372036854775807 + FP_NAN1 = 0 + FP_NORMAL1 = 4 + FP_SUBNORMAL1 = 3 + FP_ZERO1 = 2 + FTS5CSR_EOF = 0x01 + FTS5CSR_FREE_ZRANK = 0x10 + FTS5CSR_REQUIRE_CONTENT = 0x02 + FTS5CSR_REQUIRE_DOCSIZE = 0x04 + FTS5CSR_REQUIRE_INST = 0x08 + FTS5CSR_REQUIRE_POSLIST = 0x40 + FTS5CSR_REQUIRE_RESEEK = 0x20 + FTS5INDEX_QUERY_DESC = 0x0002 + FTS5INDEX_QUERY_NOOUTPUT = 0x0020 + FTS5INDEX_QUERY_PREFIX = 0x0001 + FTS5INDEX_QUERY_SCAN = 0x0008 + FTS5INDEX_QUERY_SKIPEMPTY = 0x0010 + FTS5INDEX_QUERY_TEST_NOIDX = 0x0004 + FTS5_AND = 2 + FTS5_AVERAGES_ROWID = 1 + FTS5_BI_MATCH = 0x0001 + FTS5_BI_ORDER_DESC = 0x0080 + FTS5_BI_ORDER_RANK = 0x0020 + FTS5_BI_ORDER_ROWID = 0x0040 + FTS5_BI_RANK = 0x0002 + FTS5_BI_ROWID_EQ = 0x0004 + FTS5_BI_ROWID_GE = 0x0010 + FTS5_BI_ROWID_LE = 0x0008 + FTS5_CARET = 12 + FTS5_COLON = 5 + FTS5_COMMA = 13 + FTS5_CONTENT_EXTERNAL = 2 + FTS5_CONTENT_NONE = 1 + FTS5_CONTENT_NORMAL = 0 + FTS5_CORRUPT = 267 + FTS5_CURRENT_VERSION = 4 + FTS5_DATA_DLI_B = 1 + FTS5_DATA_HEIGHT_B = 5 + FTS5_DATA_ID_B = 16 + FTS5_DATA_PADDING = 20 + FTS5_DATA_PAGE_B = 31 + FTS5_DATA_ZERO_PADDING = 8 + FTS5_DEFAULT_AUTOMERGE = 4 + FTS5_DEFAULT_CRISISMERGE = 16 + FTS5_DEFAULT_HASHSIZE = 1048576 + FTS5_DEFAULT_NEARDIST = 10 + FTS5_DEFAULT_PAGE_SIZE = 4050 + FTS5_DEFAULT_RANK = "bm25" + FTS5_DEFAULT_USERMERGE = 4 + FTS5_DETAIL_COLUMNS = 2 + FTS5_DETAIL_FULL = 0 + FTS5_DETAIL_NONE = 1 + FTS5_EOF = 0 + FTS5_LCP = 7 + FTS5_LP = 10 + FTS5_MAIN_PREFIX = 48 + FTS5_MAX_PAGE_SIZE = 65536 + FTS5_MAX_PREFIX_INDEXES = 31 + FTS5_MAX_SEGMENT = 2000 + FTS5_MAX_TOKEN_SIZE = 32768 + FTS5_MERGE_NLIST = 16 + FTS5_MINUS = 6 + FTS5_MIN_DLIDX_SIZE = 4 + FTS5_NOT = 3 + FTS5_OPT_WORK_UNIT = 1000 + FTS5_OR = 1 + FTS5_PATTERN_GLOB = 66 + FTS5_PATTERN_LIKE = 65 + FTS5_PATTERN_NONE = 0 + FTS5_PLAN_MATCH = 1 + FTS5_PLAN_ROWID = 6 + FTS5_PLAN_SCAN = 5 + FTS5_PLAN_SORTED_MATCH = 4 + FTS5_PLAN_SOURCE = 2 + FTS5_PLAN_SPECIAL = 3 + FTS5_PLUS = 14 + FTS5_PORTER_MAX_TOKEN = 64 + FTS5_RANK_NAME = "rank" + FTS5_RCP = 8 + FTS5_REMOVE_DIACRITICS_COMPLEX = 2 + FTS5_REMOVE_DIACRITICS_NONE = 0 + FTS5_REMOVE_DIACRITICS_SIMPLE = 1 + FTS5_ROWID_NAME = "rowid" + FTS5_RP = 11 + FTS5_SEGITER_ONETERM = 0x01 + FTS5_SEGITER_REVERSE = 0x02 + FTS5_STAR = 15 + FTS5_STMT_DELETE_CONTENT = 5 + FTS5_STMT_DELETE_DOCSIZE = 7 + FTS5_STMT_INSERT_CONTENT = 3 + FTS5_STMT_LOOKUP = 2 + FTS5_STMT_LOOKUP_DOCSIZE = 8 + FTS5_STMT_REPLACE_CONFIG = 9 + FTS5_STMT_REPLACE_CONTENT = 4 + FTS5_STMT_REPLACE_DOCSIZE = 6 + FTS5_STMT_SCAN = 10 + FTS5_STMT_SCAN_ASC = 0 + FTS5_STMT_SCAN_DESC = 1 + FTS5_STRING = 9 + FTS5_STRUCTURE_ROWID = 10 + FTS5_TERM = 4 + FTS5_TOKENIZE_AUX = 0x0008 + FTS5_TOKENIZE_DOCUMENT = 0x0004 + FTS5_TOKENIZE_PREFIX = 0x0002 + FTS5_TOKENIZE_QUERY = 0x0001 + FTS5_TOKEN_COLOCATED = 0x0001 + FTS5_VOCAB_COL = 0 + FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" + FTS5_VOCAB_INSTANCE = 2 + FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" + FTS5_VOCAB_ROW = 1 + FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" + FTS5_VOCAB_TERM_EQ = 0x01 + FTS5_VOCAB_TERM_GE = 0x02 + FTS5_VOCAB_TERM_LE = 0x04 + FTS5_WORK_UNIT = 64 + FULLY_WITHIN = 2 + FUNC_PERFECT_MATCH = 6 + F_ADD_SEALS = 1033 + F_DUPFD = 0 + F_DUPFD_CLOEXEC = 1030 + F_EXLCK = 4 + F_GETFD = 1 + F_GETFL = 3 + F_GETLEASE = 1025 + F_GETLK = 5 + F_GETLK64 = 5 + F_GETOWN = 9 + F_GETOWN_EX = 16 + F_GETPIPE_SZ = 1032 + F_GETSIG = 11 + F_GET_FILE_RW_HINT = 1037 + F_GET_RW_HINT = 1035 + F_GET_SEALS = 1034 + F_LOCK = 1 + F_NOTIFY = 1026 + F_OFD_GETLK = 36 + F_OFD_SETLK = 37 + F_OFD_SETLKW = 38 + F_OK = 0 + F_RDLCK = 0 + F_SEAL_FUTURE_WRITE = 0x0010 + F_SEAL_GROW = 0x0004 + F_SEAL_SEAL = 0x0001 + F_SEAL_SHRINK = 0x0002 + F_SEAL_WRITE = 0x0008 + F_SETFD = 2 + F_SETFL = 4 + F_SETLEASE = 1024 + F_SETLK = 6 + F_SETLK64 = 6 + F_SETLKW = 7 + F_SETLKW64 = 7 + F_SETOWN = 8 + F_SETOWN_EX = 15 + F_SETPIPE_SZ = 1031 + F_SETSIG = 10 + F_SET_FILE_RW_HINT = 1038 + F_SET_RW_HINT = 1036 + F_SHLCK = 8 + F_TEST = 3 + F_TLOCK = 2 + F_ULOCK = 0 + F_UNLCK = 2 + F_WRLCK = 1 + GCC_VERSION = 11002000 + GEOPOLY_PI = 3.1415926535897932385 + HASHSIZE = 97 + HASHTABLE_HASH_1 = 383 + HASHTABLE_NPAGE = 4096 + HASHTABLE_NSLOT = 8192 + HAVE_FCHOWN = 1 + HAVE_FULLFSYNC = 0 + HAVE_GETHOSTUUID = 0 + HAVE_LSTAT = 1 + HAVE_MREMAP = 1 + HAVE_READLINK = 1 + HAVE_USLEEP = 1 + INCRINIT_NORMAL = 0 + INCRINIT_ROOT = 2 + INCRINIT_TASK = 1 + INITFLAG_AlterAdd = 0x0003 + INITFLAG_AlterDrop = 0x0002 + INITFLAG_AlterMask = 0x0003 + INITFLAG_AlterRename = 0x0001 + INLINEFUNC_affinity = 4 + INLINEFUNC_coalesce = 0 + INLINEFUNC_expr_compare = 3 + INLINEFUNC_expr_implies_expr = 2 + INLINEFUNC_iif = 5 + INLINEFUNC_implies_nonnull_row = 1 + INLINEFUNC_unlikely = 99 + INTERFACE = 1 + IN_INDEX_EPH = 2 + IN_INDEX_INDEX_ASC = 3 + IN_INDEX_INDEX_DESC = 4 + IN_INDEX_LOOP = 0x0004 + IN_INDEX_MEMBERSHIP = 0x0002 + IN_INDEX_NOOP = 5 + IN_INDEX_NOOP_OK = 0x0001 + IN_INDEX_ROWID = 1 + IOCSIZE_MASK = 1073676288 + IOCSIZE_SHIFT = 16 + IOC_IN = 1073741824 + IOC_INOUT = 3221225472 + IOC_OUT = 2147483648 + IsStat4 = 1 + JEACH_ATOM = 3 + JEACH_FULLKEY = 6 + JEACH_ID = 4 + JEACH_JSON = 8 + JEACH_KEY = 0 + JEACH_PARENT = 5 + JEACH_PATH = 7 + JEACH_ROOT = 9 + JEACH_TYPE = 2 + JEACH_VALUE = 1 + JNODE_APPEND = 0x20 + JNODE_ESCAPE = 0x02 + JNODE_LABEL = 0x40 + JNODE_PATCH = 0x10 + JNODE_RAW = 0x01 + JNODE_REMOVE = 0x04 + JNODE_REPLACE = 0x08 + JSON_ABPATH = 0x03 + JSON_ARRAY = 6 + JSON_CACHE_ID = -429938 + JSON_CACHE_SZ = 4 + JSON_FALSE = 2 + JSON_INT = 3 + JSON_ISSET = 0x04 + JSON_JSON = 0x01 + JSON_MAX_DEPTH = 2000 + JSON_NULL = 0 + JSON_OBJECT = 7 + JSON_REAL = 4 + JSON_SQL = 0x02 + JSON_STRING = 5 + JSON_SUBTYPE = 74 + JSON_TRUE = 1 + JT_CROSS = 0x0002 + JT_ERROR = 0x0040 + JT_INNER = 0x0001 + JT_LEFT = 0x0008 + JT_NATURAL = 0x0004 + JT_OUTER = 0x0020 + JT_RIGHT = 0x0010 + KEYINFO_ORDER_BIGNULL = 0x02 + KEYINFO_ORDER_DESC = 0x01 + LEGACY_SCHEMA_TABLE = "sqlite_master" + LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" + LITTLE_ENDIAN = 1234 + LM_ID_BASE = 0 + LM_ID_NEWLM = -1 + LOCATE_NOERR = 0x02 + LOCATE_VIEW = 0x01 + LOCK_EX = 2 + LOCK_MAND = 32 + LOCK_NB = 4 + LOCK_READ = 64 + LOCK_RW = 192 + LOCK_SH = 1 + LOCK_UN = 8 + LOCK_WRITE = 128 + LOOKASIDE_SMALL = 128 + L_INCR = 1 + L_SET = 0 + L_XTND = 2 + L_ctermid = 9 + L_cuserid = 9 + L_tmpnam = 20 + M10d_Any = 1 + M10d_No = 2 + M10d_Yes = 0 + MADV_COLD = 20 + MADV_DODUMP = 17 + MADV_DOFORK = 11 + MADV_DONTDUMP = 16 + MADV_DONTFORK = 10 + MADV_DONTNEED = 4 + MADV_FREE = 8 + MADV_HUGEPAGE = 14 + MADV_HWPOISON = 100 + MADV_KEEPONFORK = 19 + MADV_MERGEABLE = 12 + MADV_NOHUGEPAGE = 15 + MADV_NORMAL = 0 + MADV_PAGEOUT = 21 + MADV_POPULATE_READ = 22 + MADV_POPULATE_WRITE = 23 + MADV_RANDOM = 1 + MADV_REMOVE = 9 + MADV_SEQUENTIAL = 2 + MADV_UNMERGEABLE = 13 + MADV_WILLNEED = 3 + MADV_WIPEONFORK = 18 + MAP_ANON = 32 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x00800 + MAP_EXECUTABLE = 0x01000 + MAP_FILE = 0 + MAP_FIXED = 0x10 + MAP_FIXED_NOREPLACE = 0x100000 + MAP_GROWSDOWN = 0x00100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 26 + MAP_LOCKED = 0x02000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x04000 + MAP_POPULATE = 0x08000 + MAP_PRIVATE = 0x02 + MAP_SHARED = 0x01 + MAP_SHARED_VALIDATE = 0x03 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MAP_TYPE = 0x0f + MATH_ERREXCEPT = 2 + MATH_ERRNO = 1 + MAXFLOAT = 3.40282347e+38 + MAX_HANDLE_SZ = 128 + MAX_PATHNAME = 512 + MAX_SECTOR_SIZE = 0x10000 + MCL_CURRENT = 1 + MCL_FUTURE = 2 + MCL_ONFAULT = 4 + MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 + MEMTYPE_HEAP = 0x01 + MEMTYPE_LOOKASIDE = 0x02 + MEMTYPE_PCACHE = 0x04 + MEM_AffMask = 0x003f + MEM_Agg = 0x2000 + MEM_Blob = 0x0010 + MEM_Cleared = 0x0100 + MEM_Dyn = 0x0400 + MEM_Ephem = 0x1000 + MEM_FromBind = 0x0040 + MEM_Int = 0x0004 + MEM_IntReal = 0x0020 + MEM_Null = 0x0001 + MEM_Real = 0x0008 + MEM_Static = 0x0800 + MEM_Str = 0x0002 + MEM_Subtype = 0x8000 + MEM_Term = 0x0200 + MEM_TypeMask = 0xc1bf + MEM_Undefined = 0x0080 + MEM_Zero = 0x4000 + MFD_ALLOW_SEALING = 2 + MFD_CLOEXEC = 1 + MFD_HUGETLB = 4 + MLOCK_ONFAULT = 1 + MOD_CLKA = 32769 + MOD_CLKB = 16384 + MOD_ESTERROR = 8 + MOD_FREQUENCY = 2 + MOD_MAXERROR = 4 + MOD_MICRO = 4096 + MOD_NANO = 8192 + MOD_OFFSET = 1 + MOD_STATUS = 16 + MOD_TAI = 128 + MOD_TIMECONST = 32 + MREMAP_DONTUNMAP = 4 + MREMAP_FIXED = 2 + MREMAP_MAYMOVE = 1 + MSVC_VERSION = 0 + MS_ASYNC = 1 + MS_INVALIDATE = 2 + MS_SYNC = 4 + M_1_PI = 0.31830988618379067154 + M_1_PIf128 = 0 + M_1_PIf32 = 0 + M_1_PIf32x = 0 + M_1_PIf64 = 0 + M_1_PIf64x = 0 + M_1_PIl = 0.318309886183790671537767526745028724 + M_2_PI = 0.63661977236758134308 + M_2_PIf128 = 0 + M_2_PIf32 = 0 + M_2_PIf32x = 0 + M_2_PIf64 = 0 + M_2_PIf64x = 0 + M_2_PIl = 0.636619772367581343075535053490057448 + M_2_SQRTPI = 1.12837916709551257390 + M_2_SQRTPIf128 = 0 + M_2_SQRTPIf32 = 0 + M_2_SQRTPIf32x = 0 + M_2_SQRTPIf64 = 0 + M_2_SQRTPIf64x = 0 + M_2_SQRTPIl = 1.128379167095512573896158903121545172 + M_E = 2.7182818284590452354 + M_Ef128 = 0 + M_Ef32 = 0 + M_Ef32x = 0 + M_Ef64 = 0 + M_Ef64x = 0 + M_El = 2.718281828459045235360287471352662498 + M_LN10 = 2.30258509299404568402 + M_LN10f128 = 0 + M_LN10f32 = 0 + M_LN10f32x = 0 + M_LN10f64 = 0 + M_LN10f64x = 0 + M_LN10l = 2.302585092994045684017991454684364208 + M_LN2 = 0.69314718055994530942 + M_LN2f128 = 0 + M_LN2f32 = 0 + M_LN2f32x = 0 + M_LN2f64 = 0 + M_LN2f64x = 0 + M_LN2l = 0.693147180559945309417232121458176568 + M_LOG10E = 0.43429448190325182765 + M_LOG10Ef128 = 0 + M_LOG10Ef32 = 0 + M_LOG10Ef32x = 0 + M_LOG10Ef64 = 0 + M_LOG10Ef64x = 0 + M_LOG10El = 0.434294481903251827651128918916605082 + M_LOG2E = 1.4426950408889634074 + M_LOG2Ef128 = 0 + M_LOG2Ef32 = 0 + M_LOG2Ef32x = 0 + M_LOG2Ef64 = 0 + M_LOG2Ef64x = 0 + M_LOG2El = 1.442695040888963407359924681001892137 + M_PI = 3.14159265358979323846 + M_PI_2 = 1.57079632679489661923 + M_PI_2f128 = 0 + M_PI_2f32 = 0 + M_PI_2f32x = 0 + M_PI_2f64 = 0 + M_PI_2f64x = 0 + M_PI_2l = 1.570796326794896619231321691639751442 + M_PI_4 = 0.78539816339744830962 + M_PI_4f128 = 0 + M_PI_4f32 = 0 + M_PI_4f32x = 0 + M_PI_4f64 = 0 + M_PI_4f64x = 0 + M_PI_4l = 0.785398163397448309615660845819875721 + M_PIf128 = 0 + M_PIf32 = 0 + M_PIf32x = 0 + M_PIf64 = 0 + M_PIf64x = 0 + M_PIl = 3.141592653589793238462643383279502884 + M_SQRT1_2 = 0.70710678118654752440 + M_SQRT1_2f128 = 0 + M_SQRT1_2f32 = 0 + M_SQRT1_2f32x = 0 + M_SQRT1_2f64 = 0 + M_SQRT1_2f64x = 0 + M_SQRT1_2l = 0.707106781186547524400844362104849039 + M_SQRT2 = 1.41421356237309504880 + M_SQRT2f128 = 0 + M_SQRT2f32 = 0 + M_SQRT2f32x = 0 + M_SQRT2f64 = 0 + M_SQRT2f64x = 0 + M_SQRT2l = 1.414213562373095048801688724209698079 + NB = 3 + NCC = 8 + NC_AllowAgg = 0x000001 + NC_AllowWin = 0x004000 + NC_Complex = 0x002000 + NC_FromDDL = 0x040000 + NC_GenCol = 0x000008 + NC_HasAgg = 0x000010 + NC_HasWin = 0x008000 + NC_IdxExpr = 0x000020 + NC_InAggFunc = 0x020000 + NC_IsCheck = 0x000004 + NC_IsDDL = 0x010000 + NC_MinMaxAgg = 0x001000 + NC_NoSelect = 0x080000 + NC_OrderAgg = 0x8000000 + NC_PartIdx = 0x000002 + NC_SelfRef = 0x00002e + NC_UAggInfo = 0x000100 + NC_UBaseReg = 0x000400 + NC_UEList = 0x000080 + NC_UUpsert = 0x000200 + NC_VarSelect = 0x000040 + NDEBUG = 1 + NN = 1 + NOT_WITHIN = 0 + NO_LOCK = 0 + N_6PACK = 7 + N_AX25 = 5 + N_HCI = 15 + N_HDLC = 13 + N_IRDA = 11 + N_MASC = 8 + N_MOUSE = 2 + N_OR_COST = 3 + N_PPP = 3 + N_PROFIBUS_FDL = 10 + N_R3964 = 9 + N_SLIP = 1 + N_SMSBLOCK = 12 + N_SORT_BUCKET = 32 + N_STATEMENT = 8 + N_STRIP = 4 + N_SYNC_PPP = 14 + N_TTY = 0 + N_X25 = 6 + OE_Abort = 2 + OE_Cascade = 10 + OE_Default = 11 + OE_Fail = 3 + OE_Ignore = 4 + OE_None = 0 + OE_Replace = 5 + OE_Restrict = 7 + OE_Rollback = 1 + OE_SetDflt = 9 + OE_SetNull = 8 + OE_Update = 6 + OMIT_TEMPDB = 0 + ONEPASS_MULTI = 2 + ONEPASS_OFF = 0 + ONEPASS_SINGLE = 1 + OPFLAG_APPEND = 0x08 + OPFLAG_AUXDELETE = 0x04 + OPFLAG_BULKCSR = 0x01 + OPFLAG_EPHEM = 0x01 + OPFLAG_FORDELETE = 0x08 + OPFLAG_ISNOOP = 0x40 + OPFLAG_ISUPDATE = 0x04 + OPFLAG_LASTROWID = 0x20 + OPFLAG_LENGTHARG = 0x40 + OPFLAG_NCHANGE = 0x01 + OPFLAG_NOCHNG = 0x01 + OPFLAG_NOCHNG_MAGIC = 0x6d + OPFLAG_P2ISREG = 0x10 + OPFLAG_PERMUTE = 0x01 + OPFLAG_PREFORMAT = 0x80 + OPFLAG_SAVEPOSITION = 0x02 + OPFLAG_SEEKEQ = 0x02 + OPFLAG_TYPEOFARG = 0x80 + OPFLAG_USESEEKRESULT = 0x10 + OPFLG_IN1 = 0x02 + OPFLG_IN2 = 0x04 + OPFLG_IN3 = 0x08 + OPFLG_JUMP = 0x01 + OPFLG_OUT2 = 0x10 + OPFLG_OUT3 = 0x20 + OP_Abortable = 184 + OP_Add = 106 + OP_AddImm = 85 + OP_Affinity = 95 + OP_AggFinal = 164 + OP_AggInverse = 160 + OP_AggStep = 161 + OP_AggStep1 = 162 + OP_AggValue = 163 + OP_And = 44 + OP_AutoCommit = 1 + OP_BitAnd = 102 + OP_BitNot = 114 + OP_BitOr = 103 + OP_Blob = 76 + OP_Cast = 87 + OP_Checkpoint = 6 + OP_Clear = 144 + OP_Close = 121 + OP_CollSeq = 84 + OP_Column = 93 + OP_ColumnsUsed = 122 + OP_Compare = 89 + OP_Concat = 111 + OP_Copy = 79 + OP_Count = 97 + OP_CreateBtree = 146 + OP_CursorHint = 180 + OP_CursorLock = 166 + OP_CursorUnlock = 167 + OP_DecrJumpZero = 60 + OP_DeferredSeek = 140 + OP_Delete = 129 + OP_Destroy = 143 + OP_Divide = 109 + OP_DropIndex = 151 + OP_DropTable = 150 + OP_DropTrigger = 152 + OP_ElseEq = 58 + OP_EndCoroutine = 68 + OP_Eq = 53 + OP_Expire = 165 + OP_Explain = 183 + OP_Filter = 63 + OP_FilterAdd = 178 + OP_FinishSeek = 142 + OP_FkCheck = 82 + OP_FkCounter = 157 + OP_FkIfZero = 48 + OP_Found = 31 + OP_Function = 66 + OP_Ge = 57 + OP_Gosub = 12 + OP_Goto = 11 + OP_Gt = 54 + OP_Halt = 70 + OP_HaltIfNull = 69 + OP_IdxDelete = 139 + OP_IdxGE = 42 + OP_IdxGT = 40 + OP_IdxInsert = 137 + OP_IdxLE = 39 + OP_IdxLT = 41 + OP_IdxRowid = 141 + OP_If = 18 + OP_IfNoHope = 28 + OP_IfNot = 20 + OP_IfNotOpen = 27 + OP_IfNotZero = 59 + OP_IfNullRow = 22 + OP_IfPos = 49 + OP_IfSmaller = 35 + OP_IncrVacuum = 61 + OP_Init = 64 + OP_InitCoroutine = 13 + OP_Insert = 127 + OP_Int64 = 72 + OP_IntCopy = 81 + OP_Integer = 71 + OP_IntegrityCk = 154 + OP_IsNull = 50 + OP_IsNullOrType = 21 + OP_IsTrue = 90 + OP_JournalMode = 7 + OP_Jump = 16 + OP_Last = 34 + OP_Le = 55 + OP_LoadAnalysis = 149 + OP_Lt = 56 + OP_MakeRecord = 96 + OP_MaxPgcnt = 177 + OP_MemMax = 158 + OP_Move = 78 + OP_Multiply = 108 + OP_MustBeInt = 15 + OP_Ne = 52 + OP_NewRowid = 126 + OP_Next = 5 + OP_NoConflict = 29 + OP_Noop = 182 + OP_Not = 19 + OP_NotExists = 33 + OP_NotFound = 30 + OP_NotNull = 51 + OP_Null = 74 + OP_NullRow = 135 + OP_Offset = 92 + OP_OffsetLimit = 159 + OP_Once = 17 + OP_OpenAutoindex = 115 + OP_OpenDup = 113 + OP_OpenEphemeral = 116 + OP_OpenPseudo = 120 + OP_OpenRead = 101 + OP_OpenWrite = 112 + OP_Or = 43 + OP_Pagecount = 176 + OP_Param = 156 + OP_ParseSchema = 148 + OP_Permutation = 88 + OP_Prev = 4 + OP_Program = 47 + OP_PureFunc = 65 + OP_ReadCookie = 98 + OP_Real = 153 + OP_RealAffinity = 86 + OP_ReleaseReg = 181 + OP_Remainder = 110 + OP_ReopenIdx = 100 + OP_ResetCount = 130 + OP_ResetSorter = 145 + OP_ResultRow = 83 + OP_Return = 67 + OP_Rewind = 38 + OP_RowCell = 128 + OP_RowData = 133 + OP_RowSetAdd = 155 + OP_RowSetRead = 45 + OP_RowSetTest = 46 + OP_Rowid = 134 + OP_SCopy = 80 + OP_Savepoint = 0 + OP_SeekEnd = 136 + OP_SeekGE = 25 + OP_SeekGT = 26 + OP_SeekHit = 124 + OP_SeekLE = 24 + OP_SeekLT = 23 + OP_SeekRowid = 32 + OP_SeekScan = 123 + OP_Sequence = 125 + OP_SequenceTest = 119 + OP_SetCookie = 99 + OP_ShiftLeft = 104 + OP_ShiftRight = 105 + OP_SoftNull = 75 + OP_Sort = 37 + OP_SorterCompare = 131 + OP_SorterData = 132 + OP_SorterInsert = 138 + OP_SorterNext = 3 + OP_SorterOpen = 118 + OP_SorterSort = 36 + OP_SqlExec = 147 + OP_String = 73 + OP_String8 = 117 + OP_Subtract = 107 + OP_TableLock = 168 + OP_Trace = 179 + OP_Transaction = 2 + OP_TypeCheck = 94 + OP_VBegin = 169 + OP_VColumn = 174 + OP_VCreate = 170 + OP_VDestroy = 171 + OP_VFilter = 9 + OP_VInitIn = 173 + OP_VNext = 62 + OP_VOpen = 172 + OP_VRename = 175 + OP_VUpdate = 10 + OP_Vacuum = 8 + OP_Variable = 77 + OP_Yield = 14 + OP_ZeroOrNull = 91 + OS_VXWORKS = 0 + O_ACCMODE = 0003 + O_APPEND = 02000 + O_ASYNC = 020000 + O_BINARY = 0 + O_CLOEXEC = 524288 + O_CREAT = 0100 + O_DIRECT = 16384 + O_DIRECTORY = 65536 + O_DSYNC = 4096 + O_EXCL = 0200 + O_FSYNC = 1052672 + O_LARGEFILE = 0 + O_NDELAY = 2048 + O_NOATIME = 262144 + O_NOCTTY = 0400 + O_NOFOLLOW = 131072 + O_NONBLOCK = 04000 + O_PATH = 2097152 + O_RDONLY = 00 + O_RDWR = 02 + O_RSYNC = 1052672 + O_SYNC = 04010000 + O_TMPFILE = 4259840 + O_TRUNC = 01000 + O_WRONLY = 01 + P4_ADVANCE = -5 + P4_COLLSEQ = -2 + P4_DYNAMIC = -7 + P4_DYNBLOB = -17 + P4_EXPR = -10 + P4_FREE_IF_LE = -7 + P4_FUNCCTX = -16 + P4_FUNCDEF = -8 + P4_INT32 = -3 + P4_INT64 = -14 + P4_INTARRAY = -15 + P4_KEYINFO = -9 + P4_MEM = -11 + P4_NOTUSED = 0 + P4_REAL = -13 + P4_STATIC = -1 + P4_SUBPROGRAM = -4 + P4_TABLE = -6 + P4_TRANSIENT = 0 + P4_VTAB = -12 + P5_ConstraintCheck = 3 + P5_ConstraintFK = 4 + P5_ConstraintNotNull = 1 + P5_ConstraintUnique = 2 + PAGER_CACHESPILL = 0x20 + PAGER_CKPT_FULLFSYNC = 0x10 + PAGER_ERROR = 6 + PAGER_FLAGS_MASK = 0x38 + PAGER_FULLFSYNC = 0x08 + PAGER_GET_NOCONTENT = 0x01 + PAGER_GET_READONLY = 0x02 + PAGER_JOURNALMODE_DELETE = 0 + PAGER_JOURNALMODE_MEMORY = 4 + PAGER_JOURNALMODE_OFF = 2 + PAGER_JOURNALMODE_PERSIST = 1 + PAGER_JOURNALMODE_QUERY = -1 + PAGER_JOURNALMODE_TRUNCATE = 3 + PAGER_JOURNALMODE_WAL = 5 + PAGER_LOCKINGMODE_EXCLUSIVE = 1 + PAGER_LOCKINGMODE_NORMAL = 0 + PAGER_LOCKINGMODE_QUERY = -1 + PAGER_MEMORY = 0x0002 + PAGER_OMIT_JOURNAL = 0x0001 + PAGER_OPEN = 0 + PAGER_READER = 1 + PAGER_STAT_HIT = 0 + PAGER_STAT_MISS = 1 + PAGER_STAT_SPILL = 3 + PAGER_STAT_WRITE = 2 + PAGER_SYNCHRONOUS_EXTRA = 0x04 + PAGER_SYNCHRONOUS_FULL = 0x03 + PAGER_SYNCHRONOUS_MASK = 0x07 + PAGER_SYNCHRONOUS_NORMAL = 0x02 + PAGER_SYNCHRONOUS_OFF = 0x01 + PAGER_WRITER_CACHEMOD = 3 + PAGER_WRITER_DBMOD = 4 + PAGER_WRITER_FINISHED = 5 + PAGER_WRITER_LOCKED = 2 + PARSE_MODE_DECLARE_VTAB = 1 + PARSE_MODE_NORMAL = 0 + PARSE_MODE_RENAME = 2 + PARSE_MODE_UNMAP = 3 + PARTLY_WITHIN = 1 + PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 + PCACHE_DIRTYLIST_ADD = 2 + PCACHE_DIRTYLIST_FRONT = 3 + PCACHE_DIRTYLIST_REMOVE = 1 + PDP_ENDIAN = 3412 + PENDING_LOCK = 3 + PGHDR_CLEAN = 0x001 + PGHDR_DIRTY = 0x002 + PGHDR_DONT_WRITE = 0x010 + PGHDR_MMAP = 0x020 + PGHDR_NEED_SYNC = 0x008 + PGHDR_WAL_APPEND = 0x040 + PGHDR_WRITEABLE = 0x004 + PKEY_DISABLE_ACCESS = 0x1 + PKEY_DISABLE_WRITE = 0x2 + POSIX_FADV_DONTNEED = 4 + POSIX_FADV_NOREUSE = 5 + POSIX_FADV_NORMAL = 0 + POSIX_FADV_RANDOM = 1 + POSIX_FADV_SEQUENTIAL = 2 + POSIX_FADV_WILLNEED = 3 + POSIX_MADV_DONTNEED = 4 + POSIX_MADV_NORMAL = 0 + POSIX_MADV_RANDOM = 1 + POSIX_MADV_SEQUENTIAL = 2 + POSIX_MADV_WILLNEED = 3 + PREFERRED_SCHEMA_TABLE = "sqlite_schema" + PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x01000000 + PROT_GROWSUP = 0x02000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PTF_INTKEY = 0x01 + PTF_LEAF = 0x08 + PTF_LEAFDATA = 0x04 + PTF_ZERODATA = 0x02 + PTRMAP_BTREE = 5 + PTRMAP_FREEPAGE = 2 + PTRMAP_OVERFLOW1 = 3 + PTRMAP_OVERFLOW2 = 4 + PTRMAP_ROOTPAGE = 1 + P_tmpdir = "/tmp" + PragFlg_NeedSchema = 0x01 + PragFlg_NoColumns = 0x02 + PragFlg_NoColumns1 = 0x04 + PragFlg_ReadOnly = 0x08 + PragFlg_Result0 = 0x10 + PragFlg_Result1 = 0x20 + PragFlg_SchemaOpt = 0x40 + PragFlg_SchemaReq = 0x80 + PragTyp_ACTIVATE_EXTENSIONS = 0 + PragTyp_ANALYSIS_LIMIT = 1 + PragTyp_AUTO_VACUUM = 3 + PragTyp_BUSY_TIMEOUT = 5 + PragTyp_CACHE_SIZE = 6 + PragTyp_CACHE_SPILL = 7 + PragTyp_CASE_SENSITIVE_LIKE = 8 + PragTyp_COLLATION_LIST = 9 + PragTyp_COMPILE_OPTIONS = 10 + PragTyp_DATABASE_LIST = 12 + PragTyp_DATA_STORE_DIRECTORY = 11 + PragTyp_DEFAULT_CACHE_SIZE = 13 + PragTyp_ENCODING = 14 + PragTyp_FLAG = 4 + PragTyp_FOREIGN_KEY_CHECK = 15 + PragTyp_FOREIGN_KEY_LIST = 16 + PragTyp_FUNCTION_LIST = 17 + PragTyp_HARD_HEAP_LIMIT = 18 + PragTyp_HEADER_VALUE = 2 + PragTyp_INCREMENTAL_VACUUM = 19 + PragTyp_INDEX_INFO = 20 + PragTyp_INDEX_LIST = 21 + PragTyp_INTEGRITY_CHECK = 22 + PragTyp_JOURNAL_MODE = 23 + PragTyp_JOURNAL_SIZE_LIMIT = 24 + PragTyp_LOCKING_MODE = 26 + PragTyp_LOCK_PROXY_FILE = 25 + PragTyp_LOCK_STATUS = 44 + PragTyp_MMAP_SIZE = 28 + PragTyp_MODULE_LIST = 29 + PragTyp_OPTIMIZE = 30 + PragTyp_PAGE_COUNT = 27 + PragTyp_PAGE_SIZE = 31 + PragTyp_PRAGMA_LIST = 32 + PragTyp_SECURE_DELETE = 33 + PragTyp_SHRINK_MEMORY = 34 + PragTyp_SOFT_HEAP_LIMIT = 35 + PragTyp_STATS = 45 + PragTyp_SYNCHRONOUS = 36 + PragTyp_TABLE_INFO = 37 + PragTyp_TABLE_LIST = 38 + PragTyp_TEMP_STORE = 39 + PragTyp_TEMP_STORE_DIRECTORY = 40 + PragTyp_THREADS = 41 + PragTyp_WAL_AUTOCHECKPOINT = 42 + PragTyp_WAL_CHECKPOINT = 43 + RAND_MAX = 2147483647 + RBU_CREATE_STATE = "CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)" + RBU_DELETE = 2 + RBU_ENABLE_DELTA_CKSUM = 0 + RBU_EXCLUSIVE_CHECKPOINT = "rbu_exclusive_checkpoint" + RBU_IDX_DELETE = 4 + RBU_IDX_INSERT = 5 + RBU_INSERT = 1 + RBU_PK_EXTERNAL = 3 + RBU_PK_IPK = 2 + RBU_PK_NONE = 1 + RBU_PK_NOTABLE = 0 + RBU_PK_VTAB = 5 + RBU_PK_WITHOUT_ROWID = 4 + RBU_REPLACE = 3 + RBU_STAGE_CAPTURE = 3 + RBU_STAGE_CKPT = 4 + RBU_STAGE_DONE = 5 + RBU_STAGE_MOVE = 2 + RBU_STAGE_OAL = 1 + RBU_STATE_CKPT = 6 + RBU_STATE_COOKIE = 7 + RBU_STATE_DATATBL = 10 + RBU_STATE_IDX = 3 + RBU_STATE_OALSZ = 8 + RBU_STATE_PHASEONESTEP = 9 + RBU_STATE_PROGRESS = 5 + RBU_STATE_ROW = 4 + RBU_STATE_STAGE = 1 + RBU_STATE_TBL = 2 + RBU_UPDATE = 6 + READMARK_NOT_USED = 0xffffffff + READ_LOCK = 1 + RENAME_EXCHANGE = 2 + RENAME_NOREPLACE = 1 + RENAME_WHITEOUT = 4 + RESERVED_LOCK = 2 + RETURNING_TRIGGER_NAME = "sqlite_returning" + RNDAWAY = 0 + RNDTOWARDS = 0 + ROWSET_ALLOCATION_SIZE = 1024 + ROWSET_NEXT = 0x02 + ROWSET_SORTED = 0x01 + RTLD_BINDING_MASK = 0x3 + RTLD_DEEPBIND = 0x00008 + RTLD_GLOBAL = 0x00100 + RTLD_LAZY = 0x00001 + RTLD_LOCAL = 0 + RTLD_NODELETE = 0x01000 + RTLD_NOLOAD = 0x00004 + RTLD_NOW = 0x00002 + RTREE_CACHE_SZ = 5 + RTREE_CHECK_MAX_ERROR = 100 + RTREE_COORD_INT32 = 1 + RTREE_COORD_REAL32 = 0 + RTREE_DEFAULT_ROWEST = 1048576 + RTREE_EQ = 0x41 + RTREE_FALSE = 0x40 + RTREE_GE = 0x44 + RTREE_GT = 0x45 + RTREE_LE = 0x42 + RTREE_LT = 0x43 + RTREE_MATCH = 0x46 + RTREE_MAXCELLS = 51 + RTREE_MAX_AUX_COLUMN = 100 + RTREE_MAX_DEPTH = 40 + RTREE_MAX_DIMENSIONS = 5 + RTREE_MIN_ROWEST = 100 + RTREE_QUERY = 0x47 + RTREE_TRUE = 0x3f + RTREE_ZERO = 0.0 + RWF_WRITE_LIFE_NOT_SET = 0 + RWH_WRITE_LIFE_EXTREME = 5 + RWH_WRITE_LIFE_LONG = 4 + RWH_WRITE_LIFE_MEDIUM = 3 + RWH_WRITE_LIFE_NONE = 1 + RWH_WRITE_LIFE_NOT_SET = 0 + RWH_WRITE_LIFE_SHORT = 2 + R_OK = 4 + SAVEPOINT_BEGIN = 0 + SAVEPOINT_RELEASE = 1 + SAVEPOINT_ROLLBACK = 2 + SCHEMA_ROOT = 1 + SEEK_CUR = 1 + SEEK_DATA = 3 + SEEK_END = 2 + SEEK_HOLE = 4 + SEEK_SET = 0 + SELECTTRACE_ENABLED = 0 + SESSIONS_STRM_CHUNK_SIZE = 1024 + SESSION_MAX_BUFFER_SZ = 2147483391 + SESSION_UPDATE_CACHE_SZ = 12 + SF_Aggregate = 0x0000008 + SF_All = 0x0000002 + SF_ComplexResult = 0x0040000 + SF_Compound = 0x0000100 + SF_Converted = 0x0010000 + SF_CopyCte = 0x4000000 + SF_Distinct = 0x0000001 + SF_Expanded = 0x0000040 + SF_FixedLimit = 0x0004000 + SF_HasAgg = 0x0000010 + SF_HasTypeInfo = 0x0000080 + SF_IncludeHidden = 0x0020000 + SF_MaybeConvert = 0x0008000 + SF_MinMaxAgg = 0x0001000 + SF_MultiPart = 0x2000000 + SF_MultiValue = 0x0000400 + SF_NestedFrom = 0x0000800 + SF_NoopOrderBy = 0x0400000 + SF_OrderByReqd = 0x8000000 + SF_PushDown = 0x1000000 + SF_Recursive = 0x0002000 + SF_Resolved = 0x0000004 + SF_UFSrcCheck = 0x0800000 + SF_UsesEphemeral = 0x0000020 + SF_Values = 0x0000200 + SF_View = 0x0200000 + SF_WhereBegin = 0x0080000 + SF_WinRewrite = 0x0100000 + SHARED_LOCK = 1 + SHARED_SIZE = 510 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890B + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890C + SIOCDEVPRIVATE = 0x89F0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGRARP = 0x8961 + SIOCPROTOPRIVATE = 0x89E0 + SIOCRTMSG = 0x890D + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSRARP = 0x8962 + SIOGIFINDEX = 35123 + SLOT_2_0 = 0x001fc07f + SLOT_4_2_0 = 0xf01fc07f + SORTER_MAX_MERGE_COUNT = 16 + SORTER_TYPE_INTEGER = 0x01 + SORTER_TYPE_TEXT = 0x02 + SORTFLAG_UseSorter = 0x01 + SPILLFLAG_NOSYNC = 0x04 + SPILLFLAG_OFF = 0x01 + SPILLFLAG_ROLLBACK = 0x02 + SPLICE_F_GIFT = 8 + SPLICE_F_MORE = 4 + SPLICE_F_MOVE = 1 + SPLICE_F_NONBLOCK = 2 + SQLITE3EXT_H = 0 + SQLITE3_H = 0 + SQLITE3_TEXT = 3 + SQLITEINT_H = 0 + SQLITE_ABORT = 4 + SQLITE_ABORT_ROLLBACK = 516 + SQLITE_ACCESS_EXISTS = 0 + SQLITE_ACCESS_READ = 2 + SQLITE_ACCESS_READWRITE = 1 + SQLITE_AFF_BLOB = 0x41 + SQLITE_AFF_INTEGER = 0x44 + SQLITE_AFF_MASK = 0x47 + SQLITE_AFF_NONE = 0x40 + SQLITE_AFF_NUMERIC = 0x43 + SQLITE_AFF_REAL = 0x45 + SQLITE_AFF_TEXT = 0x42 + SQLITE_ALLOW_COVERING_INDEX_SCAN = 1 + SQLITE_ALTER_TABLE = 26 + SQLITE_AMALGAMATION = 1 + SQLITE_ANALYZE = 28 + SQLITE_ANY = 5 + SQLITE_API = 0 + SQLITE_APICALL = 0 + SQLITE_ASCII = 1 + SQLITE_ATOMIC_INTRINSICS = 1 + SQLITE_ATTACH = 24 + SQLITE_AUTH = 23 + SQLITE_AUTH_USER = 279 + SQLITE_AllOpts = 0xffffffff + SQLITE_AutoIndex = 0x00008000 + SQLITE_BIG_DBL = 0 + SQLITE_BLDF1_INDEXED = 0x0001 + SQLITE_BLDF1_UNIQUE = 0x0002 + SQLITE_BLDF2_2NDPASS = 0x0004 + SQLITE_BLOB = 4 + SQLITE_BTREE_H = 0 + SQLITE_BUSY = 5 + SQLITE_BUSY_RECOVERY = 261 + SQLITE_BUSY_SNAPSHOT = 517 + SQLITE_BUSY_TIMEOUT = 773 + SQLITE_BYTEORDER = 0 + SQLITE_BalancedMerge = 0x00200000 + SQLITE_BloomFilter = 0x00080000 + SQLITE_BloomPulldown = 0x00100000 + SQLITE_CALLBACK = 0 + SQLITE_CANTOPEN = 14 + SQLITE_CANTOPEN_CONVPATH = 1038 + SQLITE_CANTOPEN_DIRTYWAL = 1294 + SQLITE_CANTOPEN_FULLPATH = 782 + SQLITE_CANTOPEN_ISDIR = 526 + SQLITE_CANTOPEN_NOTEMPDIR = 270 + SQLITE_CANTOPEN_SYMLINK = 1550 + SQLITE_CDECL = 0 + SQLITE_CHANGESETAPPLY_INVERT = 0x0002 + SQLITE_CHANGESETAPPLY_NOSAVEPOINT = 0x0001 + SQLITE_CHANGESETSTART_INVERT = 0x0002 + SQLITE_CHANGESET_ABORT = 2 + SQLITE_CHANGESET_CONFLICT = 3 + SQLITE_CHANGESET_CONSTRAINT = 4 + SQLITE_CHANGESET_DATA = 1 + SQLITE_CHANGESET_FOREIGN_KEY = 5 + SQLITE_CHANGESET_NOTFOUND = 2 + SQLITE_CHANGESET_OMIT = 0 + SQLITE_CHANGESET_REPLACE = 1 + SQLITE_CHECKPOINT_FULL = 1 + SQLITE_CHECKPOINT_PASSIVE = 0 + SQLITE_CHECKPOINT_RESTART = 2 + SQLITE_CHECKPOINT_TRUNCATE = 3 + SQLITE_CONFIG_COVERING_INDEX_SCAN = 20 + SQLITE_CONFIG_GETMALLOC = 5 + SQLITE_CONFIG_GETMUTEX = 11 + SQLITE_CONFIG_GETPCACHE = 15 + SQLITE_CONFIG_GETPCACHE2 = 19 + SQLITE_CONFIG_HEAP = 8 + SQLITE_CONFIG_LOG = 16 + SQLITE_CONFIG_LOOKASIDE = 13 + SQLITE_CONFIG_MALLOC = 4 + SQLITE_CONFIG_MEMDB_MAXSIZE = 29 + SQLITE_CONFIG_MEMSTATUS = 9 + SQLITE_CONFIG_MMAP_SIZE = 22 + SQLITE_CONFIG_MULTITHREAD = 2 + SQLITE_CONFIG_MUTEX = 10 + SQLITE_CONFIG_PAGECACHE = 7 + SQLITE_CONFIG_PCACHE = 14 + SQLITE_CONFIG_PCACHE2 = 18 + SQLITE_CONFIG_PCACHE_HDRSZ = 24 + SQLITE_CONFIG_PMASZ = 25 + SQLITE_CONFIG_SCRATCH = 6 + SQLITE_CONFIG_SERIALIZED = 3 + SQLITE_CONFIG_SINGLETHREAD = 1 + SQLITE_CONFIG_SMALL_MALLOC = 27 + SQLITE_CONFIG_SORTERREF_SIZE = 28 + SQLITE_CONFIG_SQLLOG = 21 + SQLITE_CONFIG_STMTJRNL_SPILL = 26 + SQLITE_CONFIG_URI = 17 + SQLITE_CONFIG_WIN32_HEAPSIZE = 23 + SQLITE_CONSTRAINT = 19 + SQLITE_CONSTRAINT_CHECK = 275 + SQLITE_CONSTRAINT_COMMITHOOK = 531 + SQLITE_CONSTRAINT_DATATYPE = 3091 + SQLITE_CONSTRAINT_FOREIGNKEY = 787 + SQLITE_CONSTRAINT_FUNCTION = 1043 + SQLITE_CONSTRAINT_NOTNULL = 1299 + SQLITE_CONSTRAINT_PINNED = 2835 + SQLITE_CONSTRAINT_PRIMARYKEY = 1555 + SQLITE_CONSTRAINT_ROWID = 2579 + SQLITE_CONSTRAINT_TRIGGER = 1811 + SQLITE_CONSTRAINT_UNIQUE = 2067 + SQLITE_CONSTRAINT_VTAB = 2323 + SQLITE_COPY = 0 + SQLITE_CORE = 1 + SQLITE_CORRUPT = 11 + SQLITE_CORRUPT_INDEX = 779 + SQLITE_CORRUPT_SEQUENCE = 523 + SQLITE_CORRUPT_VTAB = 267 + SQLITE_CREATE_INDEX = 1 + SQLITE_CREATE_TABLE = 2 + SQLITE_CREATE_TEMP_INDEX = 3 + SQLITE_CREATE_TEMP_TABLE = 4 + SQLITE_CREATE_TEMP_TRIGGER = 5 + SQLITE_CREATE_TEMP_VIEW = 6 + SQLITE_CREATE_TRIGGER = 7 + SQLITE_CREATE_VIEW = 8 + SQLITE_CREATE_VTABLE = 29 + SQLITE_CacheSpill = 0x00000020 + SQLITE_CellSizeCk = 0x00200000 + SQLITE_CkptFullFSync = 0x00000010 + SQLITE_CountOfView = 0x00000200 + SQLITE_CoverIdxScan = 0x00000020 + SQLITE_CursorHints = 0x00000400 + SQLITE_DBCONFIG_DEFENSIVE = 1010 + SQLITE_DBCONFIG_DQS_DDL = 1014 + SQLITE_DBCONFIG_DQS_DML = 1013 + SQLITE_DBCONFIG_ENABLE_FKEY = 1002 + SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004 + SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION = 1005 + SQLITE_DBCONFIG_ENABLE_QPSG = 1007 + SQLITE_DBCONFIG_ENABLE_TRIGGER = 1003 + SQLITE_DBCONFIG_ENABLE_VIEW = 1015 + SQLITE_DBCONFIG_LEGACY_ALTER_TABLE = 1012 + SQLITE_DBCONFIG_LEGACY_FILE_FORMAT = 1016 + SQLITE_DBCONFIG_LOOKASIDE = 1001 + SQLITE_DBCONFIG_MAINDBNAME = 1000 + SQLITE_DBCONFIG_MAX = 1017 + SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE = 1006 + SQLITE_DBCONFIG_RESET_DATABASE = 1009 + SQLITE_DBCONFIG_TRIGGER_EQP = 1008 + SQLITE_DBCONFIG_TRUSTED_SCHEMA = 1017 + SQLITE_DBCONFIG_WRITABLE_SCHEMA = 1011 + SQLITE_DBSTATUS_CACHE_HIT = 7 + SQLITE_DBSTATUS_CACHE_MISS = 8 + SQLITE_DBSTATUS_CACHE_SPILL = 12 + SQLITE_DBSTATUS_CACHE_USED = 1 + SQLITE_DBSTATUS_CACHE_USED_SHARED = 11 + SQLITE_DBSTATUS_CACHE_WRITE = 9 + SQLITE_DBSTATUS_DEFERRED_FKS = 10 + SQLITE_DBSTATUS_LOOKASIDE_HIT = 4 + SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL = 6 + SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE = 5 + SQLITE_DBSTATUS_LOOKASIDE_USED = 0 + SQLITE_DBSTATUS_MAX = 12 + SQLITE_DBSTATUS_SCHEMA_USED = 2 + SQLITE_DBSTATUS_STMT_USED = 3 + SQLITE_DEFAULT_AUTOVACUUM = 0 + SQLITE_DEFAULT_CACHE_SIZE = -2000 + SQLITE_DEFAULT_FILE_FORMAT = 4 + SQLITE_DEFAULT_FILE_PERMISSIONS = 0644 + SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 + SQLITE_DEFAULT_LOOKASIDE = 40 + SQLITE_DEFAULT_MEMSTATUS = 1 + SQLITE_DEFAULT_MMAP_SIZE = 0 + SQLITE_DEFAULT_PAGE_SIZE = 4096 + SQLITE_DEFAULT_PCACHE_INITSZ = 20 + SQLITE_DEFAULT_PROXYDIR_PERMISSIONS = 0755 + SQLITE_DEFAULT_RECURSIVE_TRIGGERS = 0 + SQLITE_DEFAULT_SECTOR_SIZE = 4096 + SQLITE_DEFAULT_SORTERREF_SIZE = 0x7fffffff + SQLITE_DEFAULT_SYNCHRONOUS = 2 + SQLITE_DEFAULT_WAL_AUTOCHECKPOINT = 1000 + SQLITE_DEFAULT_WAL_SYNCHRONOUS = 2 + SQLITE_DEFAULT_WORKER_THREADS = 0 + SQLITE_DELETE = 9 + SQLITE_DENY = 1 + SQLITE_DEPRECATED = 0 + SQLITE_DESERIALIZE_FREEONCLOSE = 1 + SQLITE_DESERIALIZE_READONLY = 4 + SQLITE_DESERIALIZE_RESIZEABLE = 2 + SQLITE_DETACH = 25 + SQLITE_DETERMINISTIC = 0x000000800 + SQLITE_DIRECTONLY = 0x000080000 + SQLITE_DONE = 101 + SQLITE_DQS = 3 + SQLITE_DROP_INDEX = 10 + SQLITE_DROP_TABLE = 11 + SQLITE_DROP_TEMP_INDEX = 12 + SQLITE_DROP_TEMP_TABLE = 13 + SQLITE_DROP_TEMP_TRIGGER = 14 + SQLITE_DROP_TEMP_VIEW = 15 + SQLITE_DROP_TRIGGER = 16 + SQLITE_DROP_VIEW = 17 + SQLITE_DROP_VTABLE = 30 + SQLITE_Defensive = 0x10000000 + SQLITE_DeferFKs = 0x00080000 + SQLITE_DistinctOpt = 0x00000010 + SQLITE_DqsDDL = 0x20000000 + SQLITE_DqsDML = 0x40000000 + SQLITE_ECEL_DUP = 0x01 + SQLITE_ECEL_FACTOR = 0x02 + SQLITE_ECEL_OMITREF = 0x08 + SQLITE_ECEL_REF = 0x04 + SQLITE_EMPTY = 16 + SQLITE_ENABLE_COLUMN_METADATA = 1 + SQLITE_ENABLE_FTS5 = 1 + SQLITE_ENABLE_GEOPOLY = 1 + SQLITE_ENABLE_LOCKING_STYLE = 0 + SQLITE_ENABLE_MATH_FUNCTIONS = 1 + SQLITE_ENABLE_MEMORY_MANAGEMENT = 1 + SQLITE_ENABLE_OFFSET_SQL_FUNC = 1 + SQLITE_ENABLE_PREUPDATE_HOOK = 1 + SQLITE_ENABLE_RBU = 1 + SQLITE_ENABLE_RTREE = 1 + SQLITE_ENABLE_SESSION = 1 + SQLITE_ENABLE_SNAPSHOT = 1 + SQLITE_ENABLE_STAT4 = 1 + SQLITE_ENABLE_UNLOCK_NOTIFY = 1 + SQLITE_ERROR = 1 + SQLITE_ERROR_MISSING_COLLSEQ = 257 + SQLITE_ERROR_RETRY = 513 + SQLITE_ERROR_SNAPSHOT = 769 + SQLITE_EXPERIMENTAL = 0 + SQLITE_EXTENSION_INIT1 = 0 + SQLITE_EXTENSION_INIT3 = 0 + SQLITE_EnableQPSG = 0x00800000 + SQLITE_EnableTrigger = 0x00040000 + SQLITE_EnableView = 0x80000000 + SQLITE_FAIL = 3 + SQLITE_FAULTINJECTOR_COUNT = 1 + SQLITE_FAULTINJECTOR_MALLOC = 0 + SQLITE_FCNTL_BEGIN_ATOMIC_WRITE = 31 + SQLITE_FCNTL_BUSYHANDLER = 15 + SQLITE_FCNTL_CHUNK_SIZE = 6 + SQLITE_FCNTL_CKPT_DONE = 37 + SQLITE_FCNTL_CKPT_START = 39 + SQLITE_FCNTL_CKSM_FILE = 41 + SQLITE_FCNTL_COMMIT_ATOMIC_WRITE = 32 + SQLITE_FCNTL_COMMIT_PHASETWO = 22 + SQLITE_FCNTL_DATA_VERSION = 35 + SQLITE_FCNTL_DB_UNCHANGED = 0xca093fa0 + SQLITE_FCNTL_EXTERNAL_READER = 40 + SQLITE_FCNTL_FILE_POINTER = 7 + SQLITE_FCNTL_GET_LOCKPROXYFILE = 2 + SQLITE_FCNTL_HAS_MOVED = 20 + SQLITE_FCNTL_JOURNAL_POINTER = 28 + SQLITE_FCNTL_LAST_ERRNO = 4 + SQLITE_FCNTL_LOCKSTATE = 1 + SQLITE_FCNTL_LOCK_TIMEOUT = 34 + SQLITE_FCNTL_MMAP_SIZE = 18 + SQLITE_FCNTL_OVERWRITE = 11 + SQLITE_FCNTL_PDB = 30 + SQLITE_FCNTL_PERSIST_WAL = 10 + SQLITE_FCNTL_POWERSAFE_OVERWRITE = 13 + SQLITE_FCNTL_PRAGMA = 14 + SQLITE_FCNTL_RBU = 26 + SQLITE_FCNTL_RBUCNT = 5149216 + SQLITE_FCNTL_RESERVE_BYTES = 38 + SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 + SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 + SQLITE_FCNTL_SIZE_HINT = 5 + SQLITE_FCNTL_SIZE_LIMIT = 36 + SQLITE_FCNTL_SYNC = 21 + SQLITE_FCNTL_SYNC_OMITTED = 8 + SQLITE_FCNTL_TEMPFILENAME = 16 + SQLITE_FCNTL_TRACE = 19 + SQLITE_FCNTL_VFSNAME = 12 + SQLITE_FCNTL_VFS_POINTER = 27 + SQLITE_FCNTL_WAL_BLOCK = 24 + SQLITE_FCNTL_WIN32_AV_RETRY = 9 + SQLITE_FCNTL_WIN32_GET_HANDLE = 29 + SQLITE_FCNTL_WIN32_SET_HANDLE = 23 + SQLITE_FCNTL_ZIPVFS = 25 + SQLITE_FILE_HEADER = "SQLite format 3" + SQLITE_FLOAT = 2 + SQLITE_FORMAT = 24 + SQLITE_FP_PRECISION_LIMIT = 100000000 + SQLITE_FRAME_MAGIC = 0x879fb71e + SQLITE_FSFLAGS_IS_MSDOS = 0x1 + SQLITE_FULL = 13 + SQLITE_FUNCTION = 31 + SQLITE_FUNC_ANYORDER = 0x08000000 + SQLITE_FUNC_BUILTIN = 0x00800000 + SQLITE_FUNC_CASE = 0x0008 + SQLITE_FUNC_CONSTANT = 0x0800 + SQLITE_FUNC_COUNT = 0x0100 + SQLITE_FUNC_DIRECT = 0x00080000 + SQLITE_FUNC_ENCMASK = 0x0003 + SQLITE_FUNC_EPHEM = 0x0010 + SQLITE_FUNC_HASH_SZ = 23 + SQLITE_FUNC_INLINE = 0x00400000 + SQLITE_FUNC_INTERNAL = 0x00040000 + SQLITE_FUNC_LENGTH = 0x0040 + SQLITE_FUNC_LIKE = 0x0004 + SQLITE_FUNC_MINMAX = 0x1000 + SQLITE_FUNC_NEEDCOLL = 0x0020 + SQLITE_FUNC_OFFSET = 0x8000 + SQLITE_FUNC_SLOCHNG = 0x2000 + SQLITE_FUNC_SUBTYPE = 0x00100000 + SQLITE_FUNC_TEST = 0x4000 + SQLITE_FUNC_TYPEOF = 0x0080 + SQLITE_FUNC_UNLIKELY = 0x0400 + SQLITE_FUNC_UNSAFE = 0x00200000 + SQLITE_FUNC_WINDOW = 0x00010000 + SQLITE_FactorOutConst = 0x00000008 + SQLITE_ForeignKeys = 0x00004000 + SQLITE_Fts3Tokenizer = 0x00400000 + SQLITE_FullColNames = 0x00000004 + SQLITE_FullFSync = 0x00000008 + SQLITE_GET_LOCKPROXYFILE = 2 + SQLITE_GroupByOrder = 0x00000004 + SQLITE_HASH_H = 0 + SQLITE_HAVE_C99_MATH_FUNCS = 1 + SQLITE_IDXTYPE_APPDEF = 0 + SQLITE_IDXTYPE_IPK = 3 + SQLITE_IDXTYPE_PRIMARYKEY = 2 + SQLITE_IDXTYPE_UNIQUE = 1 + SQLITE_IGNORE = 2 + SQLITE_INDEX_CONSTRAINT_EQ = 2 + SQLITE_INDEX_CONSTRAINT_FUNCTION = 150 + SQLITE_INDEX_CONSTRAINT_GE = 32 + SQLITE_INDEX_CONSTRAINT_GLOB = 66 + SQLITE_INDEX_CONSTRAINT_GT = 4 + SQLITE_INDEX_CONSTRAINT_IS = 72 + SQLITE_INDEX_CONSTRAINT_ISNOT = 69 + SQLITE_INDEX_CONSTRAINT_ISNOTNULL = 70 + SQLITE_INDEX_CONSTRAINT_ISNULL = 71 + SQLITE_INDEX_CONSTRAINT_LE = 8 + SQLITE_INDEX_CONSTRAINT_LIKE = 65 + SQLITE_INDEX_CONSTRAINT_LIMIT = 73 + SQLITE_INDEX_CONSTRAINT_LT = 16 + SQLITE_INDEX_CONSTRAINT_MATCH = 64 + SQLITE_INDEX_CONSTRAINT_NE = 68 + SQLITE_INDEX_CONSTRAINT_OFFSET = 74 + SQLITE_INDEX_CONSTRAINT_REGEXP = 67 + SQLITE_INDEX_SCAN_UNIQUE = 1 + SQLITE_INNOCUOUS = 0x000200000 + SQLITE_INSERT = 18 + SQLITE_INTEGER = 1 + SQLITE_INTEGRITY_CHECK_ERROR_MAX = 100 + SQLITE_INTERNAL = 2 + SQLITE_INTERRUPT = 9 + SQLITE_IOCAP_ATOMIC = 0x00000001 + SQLITE_IOCAP_ATOMIC16K = 0x00000040 + SQLITE_IOCAP_ATOMIC1K = 0x00000004 + SQLITE_IOCAP_ATOMIC2K = 0x00000008 + SQLITE_IOCAP_ATOMIC32K = 0x00000080 + SQLITE_IOCAP_ATOMIC4K = 0x00000010 + SQLITE_IOCAP_ATOMIC512 = 0x00000002 + SQLITE_IOCAP_ATOMIC64K = 0x00000100 + SQLITE_IOCAP_ATOMIC8K = 0x00000020 + SQLITE_IOCAP_BATCH_ATOMIC = 0x00004000 + SQLITE_IOCAP_IMMUTABLE = 0x00002000 + SQLITE_IOCAP_POWERSAFE_OVERWRITE = 0x00001000 + SQLITE_IOCAP_SAFE_APPEND = 0x00000200 + SQLITE_IOCAP_SEQUENTIAL = 0x00000400 + SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN = 0x00000800 + SQLITE_IOERR = 10 + SQLITE_IOERR_ACCESS = 3338 + SQLITE_IOERR_AUTH = 7178 + SQLITE_IOERR_BEGIN_ATOMIC = 7434 + SQLITE_IOERR_BLOCKED = 2826 + SQLITE_IOERR_CHECKRESERVEDLOCK = 3594 + SQLITE_IOERR_CLOSE = 4106 + SQLITE_IOERR_COMMIT_ATOMIC = 7690 + SQLITE_IOERR_CONVPATH = 6666 + SQLITE_IOERR_CORRUPTFS = 8458 + SQLITE_IOERR_DATA = 8202 + SQLITE_IOERR_DELETE = 2570 + SQLITE_IOERR_DELETE_NOENT = 5898 + SQLITE_IOERR_DIR_CLOSE = 4362 + SQLITE_IOERR_DIR_FSYNC = 1290 + SQLITE_IOERR_FSTAT = 1802 + SQLITE_IOERR_FSYNC = 1034 + SQLITE_IOERR_GETTEMPPATH = 6410 + SQLITE_IOERR_LOCK = 3850 + SQLITE_IOERR_MMAP = 6154 + SQLITE_IOERR_NOMEM = 3082 + SQLITE_IOERR_NOMEM_BKPT = 3082 + SQLITE_IOERR_RDLOCK = 2314 + SQLITE_IOERR_READ = 266 + SQLITE_IOERR_ROLLBACK_ATOMIC = 7946 + SQLITE_IOERR_SEEK = 5642 + SQLITE_IOERR_SHMLOCK = 5130 + SQLITE_IOERR_SHMMAP = 5386 + SQLITE_IOERR_SHMOPEN = 4618 + SQLITE_IOERR_SHMSIZE = 4874 + SQLITE_IOERR_SHORT_READ = 522 + SQLITE_IOERR_TRUNCATE = 1546 + SQLITE_IOERR_UNLOCK = 2058 + SQLITE_IOERR_VNODE = 6922 + SQLITE_IOERR_WRITE = 778 + SQLITE_IgnoreChecks = 0x00000200 + SQLITE_JUMPIFNULL = 0x10 + SQLITE_LAST_ERRNO = 4 + SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 + SQLITE_LIMIT_ATTACHED = 7 + SQLITE_LIMIT_COLUMN = 2 + SQLITE_LIMIT_COMPOUND_SELECT = 4 + SQLITE_LIMIT_EXPR_DEPTH = 3 + SQLITE_LIMIT_FUNCTION_ARG = 6 + SQLITE_LIMIT_LENGTH = 0 + SQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8 + SQLITE_LIMIT_SQL_LENGTH = 1 + SQLITE_LIMIT_TRIGGER_DEPTH = 10 + SQLITE_LIMIT_VARIABLE_NUMBER = 9 + SQLITE_LIMIT_VDBE_OP = 5 + SQLITE_LIMIT_WORKER_THREADS = 11 + SQLITE_LOCKED = 6 + SQLITE_LOCKED_SHAREDCACHE = 262 + SQLITE_LOCKED_VTAB = 518 + SQLITE_LOCK_EXCLUSIVE = 4 + SQLITE_LOCK_NONE = 0 + SQLITE_LOCK_PENDING = 3 + SQLITE_LOCK_RESERVED = 2 + SQLITE_LOCK_SHARED = 1 + SQLITE_LegacyAlter = 0x04000000 + SQLITE_LegacyFileFmt = 0x00000002 + SQLITE_LoadExtFunc = 0x00020000 + SQLITE_LoadExtension = 0x00010000 + SQLITE_MALLOC_SOFT_LIMIT = 1024 + SQLITE_MATCH = 0 + SQLITE_MAX_ATTACHED = 10 + SQLITE_MAX_COLUMN = 2000 + SQLITE_MAX_COMPOUND_SELECT = 500 + SQLITE_MAX_DB = 12 + SQLITE_MAX_DEFAULT_PAGE_SIZE = 8192 + SQLITE_MAX_EXPR_DEPTH = 1000 + SQLITE_MAX_FILE_FORMAT = 4 + SQLITE_MAX_FUNCTION_ARG = 127 + SQLITE_MAX_LENGTH = 1000000000 + SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000 + SQLITE_MAX_MEMORY = 0 + SQLITE_MAX_MMAP_SIZE = 0x7fff0000 + SQLITE_MAX_PAGE_COUNT = 1073741823 + SQLITE_MAX_PAGE_SIZE = 65536 + SQLITE_MAX_PATHLEN = 4096 + SQLITE_MAX_PMASZ = 536870912 + SQLITE_MAX_SCHEMA_RETRY = 50 + SQLITE_MAX_SQL_LENGTH = 1000000000 + SQLITE_MAX_SRCLIST = 200 + SQLITE_MAX_SYMLINKS = 100 + SQLITE_MAX_TRIGGER_DEPTH = 1000 + SQLITE_MAX_VARIABLE_NUMBER = 32766 + SQLITE_MAX_VDBE_OP = 250000000 + SQLITE_MAX_WORKER_THREADS = 8 + SQLITE_MEMDB_DEFAULT_MAXSIZE = 1073741824 + SQLITE_MINIMUM_FILE_DESCRIPTOR = 3 + SQLITE_MISMATCH = 20 + SQLITE_MISUSE = 21 + SQLITE_MSVC_H = 0 + SQLITE_MUTEX_APPDEF = 1 + SQLITE_MUTEX_FAST = 0 + SQLITE_MUTEX_NOOP = 1 + SQLITE_MUTEX_RECURSIVE = 1 + SQLITE_MUTEX_STATIC_APP1 = 8 + SQLITE_MUTEX_STATIC_APP2 = 9 + SQLITE_MUTEX_STATIC_APP3 = 10 + SQLITE_MUTEX_STATIC_LRU = 6 + SQLITE_MUTEX_STATIC_LRU2 = 7 + SQLITE_MUTEX_STATIC_MAIN = 2 + SQLITE_MUTEX_STATIC_MASTER = 2 + SQLITE_MUTEX_STATIC_MEM = 3 + SQLITE_MUTEX_STATIC_MEM2 = 4 + SQLITE_MUTEX_STATIC_OPEN = 4 + SQLITE_MUTEX_STATIC_PMEM = 7 + SQLITE_MUTEX_STATIC_PRNG = 5 + SQLITE_MUTEX_STATIC_VFS1 = 11 + SQLITE_MUTEX_STATIC_VFS2 = 12 + SQLITE_MUTEX_STATIC_VFS3 = 13 + SQLITE_MX_JUMP_OPCODE = 64 + SQLITE_MinMaxOpt = 0x00010000 + SQLITE_NOLFS = 22 + SQLITE_NOMATCH = 1 + SQLITE_NOMEM = 7 + SQLITE_NOMEM_BKPT = 7 + SQLITE_NOTADB = 26 + SQLITE_NOTFOUND = 12 + SQLITE_NOTICE = 27 + SQLITE_NOTICE_RECOVER_ROLLBACK = 539 + SQLITE_NOTICE_RECOVER_WAL = 283 + SQLITE_NOTNULL = 0x90 + SQLITE_NOWILDCARDMATCH = 2 + SQLITE_NO_TSAN = 0 + SQLITE_NTUNE = 6 + SQLITE_NULL = 5 + SQLITE_NULLEQ = 0x80 + SQLITE_N_BTREE_META = 16 + SQLITE_N_KEYWORD = 147 + SQLITE_N_LIMIT = 12 + SQLITE_N_STDTYPE = 6 + SQLITE_NoCkptOnClose = 0x00000800 + SQLITE_NoSchemaError = 0x08000000 + SQLITE_NullCallback = 0x00000100 + SQLITE_OK = 0 + SQLITE_OK_LOAD_PERMANENTLY = 256 + SQLITE_OK_SYMLINK = 512 + SQLITE_OPEN_AUTOPROXY = 0x00000020 + SQLITE_OPEN_CREATE = 0x00000004 + SQLITE_OPEN_DELETEONCLOSE = 0x00000008 + SQLITE_OPEN_EXCLUSIVE = 0x00000010 + SQLITE_OPEN_EXRESCODE = 0x02000000 + SQLITE_OPEN_FULLMUTEX = 0x00010000 + SQLITE_OPEN_MAIN_DB = 0x00000100 + SQLITE_OPEN_MAIN_JOURNAL = 0x00000800 + SQLITE_OPEN_MASTER_JOURNAL = 0x00004000 + SQLITE_OPEN_MEMORY = 0x00000080 + SQLITE_OPEN_NOFOLLOW = 0x01000000 + SQLITE_OPEN_NOMUTEX = 0x00008000 + SQLITE_OPEN_PRIVATECACHE = 0x00040000 + SQLITE_OPEN_READONLY = 0x00000001 + SQLITE_OPEN_READWRITE = 0x00000002 + SQLITE_OPEN_SHAREDCACHE = 0x00020000 + SQLITE_OPEN_SUBJOURNAL = 0x00002000 + SQLITE_OPEN_SUPER_JOURNAL = 0x00004000 + SQLITE_OPEN_TEMP_DB = 0x00000200 + SQLITE_OPEN_TEMP_JOURNAL = 0x00001000 + SQLITE_OPEN_TRANSIENT_DB = 0x00000400 + SQLITE_OPEN_URI = 0x00000040 + SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_SETUP_H = 0 + SQLITE_OS_UNIX = 1 + SQLITE_OS_WIN = 0 + SQLITE_OmitNoopJoin = 0x00000100 + SQLITE_OmitOrderBy = 0x00040000 + SQLITE_OrderByIdxJoin = 0x00000040 + SQLITE_PAGER_H = 0 + SQLITE_PERM = 3 + SQLITE_POWERSAFE_OVERWRITE = 1 + SQLITE_PRAGMA = 19 + SQLITE_PREPARE_MASK = 0x0f + SQLITE_PREPARE_NORMALIZE = 0x02 + SQLITE_PREPARE_NO_VTAB = 0x04 + SQLITE_PREPARE_PERSISTENT = 0x01 + SQLITE_PREPARE_SAVESQL = 0x80 + SQLITE_PRINTF_INTERNAL = 0x01 + SQLITE_PRINTF_MALLOCED = 0x04 + SQLITE_PRINTF_SQLFUNC = 0x02 + SQLITE_PRINT_BUF_SIZE = 70 + SQLITE_PRIVATE = 0 + SQLITE_PROTOCOL = 15 + SQLITE_PTRSIZE = 8 + SQLITE_PropagateConst = 0x00008000 + SQLITE_PushDown = 0x00001000 + SQLITE_QUERY_PLANNER_LIMIT = 20000 + SQLITE_QUERY_PLANNER_LIMIT_INCR = 1000 + SQLITE_QueryFlattener = 0x00000001 + SQLITE_QueryOnly = 0x00100000 + SQLITE_RANGE = 25 + SQLITE_RBU_STATE_CHECKPOINT = 3 + SQLITE_RBU_STATE_DONE = 4 + SQLITE_RBU_STATE_ERROR = 5 + SQLITE_RBU_STATE_MOVE = 2 + SQLITE_RBU_STATE_OAL = 1 + SQLITE_RBU_UPDATE_CACHESIZE = 16 + SQLITE_READ = 20 + SQLITE_READONLY = 8 + SQLITE_READONLY_CANTINIT = 1288 + SQLITE_READONLY_CANTLOCK = 520 + SQLITE_READONLY_DBMOVED = 1032 + SQLITE_READONLY_DIRECTORY = 1544 + SQLITE_READONLY_RECOVERY = 264 + SQLITE_READONLY_ROLLBACK = 776 + SQLITE_RECURSIVE = 33 + SQLITE_REINDEX = 27 + SQLITE_REPLACE = 5 + SQLITE_ROLLBACK = 1 + SQLITE_ROW = 100 + SQLITE_ReadUncommit = 0x00000400 + SQLITE_RecTriggers = 0x00002000 + SQLITE_ResetDatabase = 0x02000000 + SQLITE_ReverseOrder = 0x00001000 + SQLITE_SAVEPOINT = 32 + SQLITE_SCANSTAT_EST = 2 + SQLITE_SCANSTAT_EXPLAIN = 4 + SQLITE_SCANSTAT_NAME = 3 + SQLITE_SCANSTAT_NLOOP = 0 + SQLITE_SCANSTAT_NVISIT = 1 + SQLITE_SCANSTAT_SELECTID = 5 + SQLITE_SCHEMA = 17 + SQLITE_SELECT = 21 + SQLITE_SERIALIZE_NOCOPY = 0x001 + SQLITE_SESSION_CONFIG_STRMSIZE = 1 + SQLITE_SESSION_OBJCONFIG_SIZE = 1 + SQLITE_SET_LOCKPROXYFILE = 3 + SQLITE_SHM_EXCLUSIVE = 8 + SQLITE_SHM_LOCK = 2 + SQLITE_SHM_NLOCK = 8 + SQLITE_SHM_SHARED = 4 + SQLITE_SHM_UNLOCK = 1 + SQLITE_SORTER_PMASZ = 250 + SQLITE_SOUNDEX = 1 + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" + SQLITE_SO_ASC = 0 + SQLITE_SO_DESC = 1 + SQLITE_SO_UNDEFINED = -1 + SQLITE_STAT4_SAMPLES = 24 + SQLITE_STATE_BUSY = 0x6d + SQLITE_STATE_CLOSED = 0xce + SQLITE_STATE_ERROR = 0xd5 + SQLITE_STATE_OPEN = 0x76 + SQLITE_STATE_SICK = 0xba + SQLITE_STATE_ZOMBIE = 0xa7 + SQLITE_STATUS_MALLOC_COUNT = 9 + SQLITE_STATUS_MALLOC_SIZE = 5 + SQLITE_STATUS_MEMORY_USED = 0 + SQLITE_STATUS_PAGECACHE_OVERFLOW = 2 + SQLITE_STATUS_PAGECACHE_SIZE = 7 + SQLITE_STATUS_PAGECACHE_USED = 1 + SQLITE_STATUS_PARSER_STACK = 6 + SQLITE_STATUS_SCRATCH_OVERFLOW = 4 + SQLITE_STATUS_SCRATCH_SIZE = 8 + SQLITE_STATUS_SCRATCH_USED = 3 + SQLITE_STDCALL = 0 + SQLITE_STMTJRNL_SPILL = 65536 + SQLITE_STMTSTATUS_AUTOINDEX = 3 + SQLITE_STMTSTATUS_FILTER_HIT = 8 + SQLITE_STMTSTATUS_FILTER_MISS = 7 + SQLITE_STMTSTATUS_FULLSCAN_STEP = 1 + SQLITE_STMTSTATUS_MEMUSED = 99 + SQLITE_STMTSTATUS_REPREPARE = 5 + SQLITE_STMTSTATUS_RUN = 6 + SQLITE_STMTSTATUS_SORT = 2 + SQLITE_STMTSTATUS_VM_STEP = 4 + SQLITE_SUBTYPE = 0x000100000 + SQLITE_SYNC_DATAONLY = 0x00010 + SQLITE_SYNC_FULL = 0x00003 + SQLITE_SYNC_NORMAL = 0x00002 + SQLITE_SYSAPI = 0 + SQLITE_SYSTEM_MALLOC = 1 + SQLITE_SeekScan = 0x00020000 + SQLITE_ShortColNames = 0x00000040 + SQLITE_SimplifyJoin = 0x00002000 + SQLITE_SkipScan = 0x00004000 + SQLITE_Stat4 = 0x00000800 + SQLITE_TCLAPI = 0 + SQLITE_TEMP_FILE_PREFIX = "etilqs_" + SQLITE_TEMP_STORE = 1 + SQLITE_TESTCTRL_ALWAYS = 13 + SQLITE_TESTCTRL_ASSERT = 12 + SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS = 10 + SQLITE_TESTCTRL_BITVEC_TEST = 8 + SQLITE_TESTCTRL_BYTEORDER = 22 + SQLITE_TESTCTRL_EXPLAIN_STMT = 19 + SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS = 29 + SQLITE_TESTCTRL_FAULT_INSTALL = 9 + SQLITE_TESTCTRL_FIRST = 5 + SQLITE_TESTCTRL_IMPOSTER = 25 + SQLITE_TESTCTRL_INTERNAL_FUNCTIONS = 17 + SQLITE_TESTCTRL_ISINIT = 23 + SQLITE_TESTCTRL_ISKEYWORD = 16 + SQLITE_TESTCTRL_LAST = 33 + SQLITE_TESTCTRL_LOCALTIME_FAULT = 18 + SQLITE_TESTCTRL_LOGEST = 33 + SQLITE_TESTCTRL_NEVER_CORRUPT = 20 + SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD = 19 + SQLITE_TESTCTRL_OPTIMIZATIONS = 15 + SQLITE_TESTCTRL_PARSER_COVERAGE = 26 + SQLITE_TESTCTRL_PENDING_BYTE = 11 + SQLITE_TESTCTRL_PRNG_RESET = 7 + SQLITE_TESTCTRL_PRNG_RESTORE = 6 + SQLITE_TESTCTRL_PRNG_SAVE = 5 + SQLITE_TESTCTRL_PRNG_SEED = 28 + SQLITE_TESTCTRL_RESERVE = 14 + SQLITE_TESTCTRL_RESULT_INTREAL = 27 + SQLITE_TESTCTRL_SCRATCHMALLOC = 17 + SQLITE_TESTCTRL_SEEK_COUNT = 30 + SQLITE_TESTCTRL_SORTER_MMAP = 24 + SQLITE_TESTCTRL_TRACEFLAGS = 31 + SQLITE_TESTCTRL_TUNE = 32 + SQLITE_TESTCTRL_VDBE_COVERAGE = 21 + SQLITE_TEXT = 3 + SQLITE_THREADSAFE = 1 + SQLITE_TOKEN_KEYWORD = 0x2 + SQLITE_TOKEN_QUOTED = 0x1 + SQLITE_TOOBIG = 18 + SQLITE_TRACE_CLOSE = 0x08 + SQLITE_TRACE_LEGACY = 0x40 + SQLITE_TRACE_NONLEGACY_MASK = 0x0f + SQLITE_TRACE_PROFILE = 0x02 + SQLITE_TRACE_ROW = 0x04 + SQLITE_TRACE_STMT = 0x01 + SQLITE_TRACE_XPROFILE = 0x80 + SQLITE_TRANSACTION = 22 + SQLITE_TXN_NONE = 0 + SQLITE_TXN_READ = 1 + SQLITE_TXN_WRITE = 2 + SQLITE_Transitive = 0x00000080 + SQLITE_TriggerEQP = 0x01000000 + SQLITE_TrustedSchema = 0x00000080 + SQLITE_UPDATE = 23 + SQLITE_USE_URI = 0 + SQLITE_UTF16 = 4 + SQLITE_UTF16BE = 3 + SQLITE_UTF16LE = 2 + SQLITE_UTF16_ALIGNED = 8 + SQLITE_UTF8 = 1 + SQLITE_VDBEINT_H = 0 + SQLITE_VDBE_H = 0 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 + SQLITE_VTABRISK_High = 2 + SQLITE_VTABRISK_Low = 0 + SQLITE_VTABRISK_Normal = 1 + SQLITE_VTAB_CONSTRAINT_SUPPORT = 1 + SQLITE_VTAB_DIRECTONLY = 3 + SQLITE_VTAB_INNOCUOUS = 2 + SQLITE_WAL_H = 0 + SQLITE_WARNING = 28 + SQLITE_WARNING_AUTOINDEX = 284 + SQLITE_WHEREINT_H = 0 + SQLITE_WIN32_DATA_DIRECTORY_TYPE = 1 + SQLITE_WIN32_TEMP_DIRECTORY_TYPE = 2 + SQLITE_WSD = 0 + SQLITE_WindowFunc = 0x00000002 + SQLITE_WriteSchema = 0x00000001 + SRT_Coroutine = 13 + SRT_Discard = 4 + SRT_DistFifo = 5 + SRT_DistQueue = 6 + SRT_EphemTab = 12 + SRT_Except = 2 + SRT_Exists = 3 + SRT_Fifo = 8 + SRT_Mem = 10 + SRT_Output = 9 + SRT_Queue = 7 + SRT_Set = 11 + SRT_Table = 14 + SRT_Union = 1 + SRT_Upfrom = 15 + STATX_ALL = 0x00000fff + STATX_ATIME = 0x00000020 + STATX_ATTR_APPEND = 0x00000020 + STATX_ATTR_AUTOMOUNT = 0x00001000 + STATX_ATTR_COMPRESSED = 0x00000004 + STATX_ATTR_DAX = 0x00200000 + STATX_ATTR_ENCRYPTED = 0x00000800 + STATX_ATTR_IMMUTABLE = 0x00000010 + STATX_ATTR_MOUNT_ROOT = 0x00002000 + STATX_ATTR_NODUMP = 0x00000040 + STATX_ATTR_VERITY = 0x00100000 + STATX_BASIC_STATS = 0x000007ff + STATX_BLOCKS = 0x00000400 + STATX_BTIME = 0x00000800 + STATX_CTIME = 0x00000080 + STATX_GID = 0x00000010 + STATX_INO = 0x00000100 + STATX_MNT_ID = 0x00001000 + STATX_MODE = 0x00000002 + STATX_MTIME = 0x00000040 + STATX_NLINK = 0x00000004 + STATX_SIZE = 0x00000200 + STATX_TYPE = 0x00000001 + STATX_UID = 0x00000008 + STATX__RESERVED = 0x80000000 + STAT_GET_NDLT = 4 + STAT_GET_NEQ = 2 + STAT_GET_NLT = 3 + STAT_GET_ROWID = 1 + STAT_GET_STAT1 = 0 + STA_CLK = 0x8000 + STA_CLOCKERR = 0x1000 + STA_DEL = 0x0020 + STA_FLL = 0x0008 + STA_FREQHOLD = 0x0080 + STA_INS = 0x0010 + STA_MODE = 0x4000 + STA_NANO = 0x2000 + STA_PLL = 0x0001 + STA_PPSERROR = 0x0800 + STA_PPSFREQ = 0x0002 + STA_PPSJITTER = 0x0200 + STA_PPSSIGNAL = 0x0100 + STA_PPSTIME = 0x0004 + STA_PPSWANDER = 0x0400 + STA_RONLY = 65280 + STA_UNSYNC = 0x0040 + STDERR_FILENO = 2 + STDIN_FILENO = 0 + STDOUT_FILENO = 1 + SYNC_FILE_RANGE_WAIT_AFTER = 4 + SYNC_FILE_RANGE_WAIT_BEFORE = 1 + SYNC_FILE_RANGE_WRITE = 2 + SYNC_FILE_RANGE_WRITE_AND_WAIT = 7 + S_BLKSIZE = 512 + S_IEXEC = 64 + S_IFBLK = 24576 + S_IFCHR = 8192 + S_IFDIR = 16384 + S_IFIFO = 4096 + S_IFLNK = 40960 + S_IFMT = 61440 + S_IFREG = 32768 + S_IFSOCK = 49152 + S_IREAD = 256 + S_IRGRP = 32 + S_IROTH = 4 + S_IRUSR = 256 + S_IRWXG = 56 + S_IRWXO = 7 + S_IRWXU = 448 + S_ISGID = 1024 + S_ISUID = 2048 + S_ISVTX = 512 + S_IWGRP = 16 + S_IWOTH = 2 + S_IWRITE = 128 + S_IWUSR = 128 + S_IXGRP = 8 + S_IXOTH = 1 + S_IXUSR = 64 + TABTYP_NORM = 0 + TABTYP_VIEW = 2 + TABTYP_VTAB = 1 + TCFLSH = 0x540B + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETX = 0x5432 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETSF = 0x5404 + TCSETSW = 0x5403 + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540A + TERM_ANDINFO = 0x0020 + TERM_CODED = 0x0004 + TERM_COPIED = 0x0008 + TERM_DYNAMIC = 0x0001 + TERM_HEURTRUTH = 0x2000 + TERM_HIGHTRUTH = 0x4000 + TERM_IS = 0x0800 + TERM_LIKE = 0x0400 + TERM_LIKECOND = 0x0200 + TERM_LIKEOPT = 0x0100 + TERM_OK = 0x0040 + TERM_ORINFO = 0x0010 + TERM_SLICE = 0x8000 + TERM_VARSELECT = 0x1000 + TERM_VIRTUAL = 0x0002 + TERM_VNULL = 0x0080 + TF_Autoincrement = 0x00000008 + TF_Ephemeral = 0x00004000 + TF_Eponymous = 0x00008000 + TF_HasGenerated = 0x00000060 + TF_HasHidden = 0x00000002 + TF_HasNotNull = 0x00000800 + TF_HasPrimaryKey = 0x00000004 + TF_HasStat1 = 0x00000010 + TF_HasStat4 = 0x00002000 + TF_HasStored = 0x00000040 + TF_HasVirtual = 0x00000020 + TF_NoVisibleRowid = 0x00000200 + TF_OOOHidden = 0x00000400 + TF_Readonly = 0x00000001 + TF_Shadow = 0x00001000 + TF_StatsUsed = 0x00000100 + TF_Strict = 0x00010000 + TF_WithoutRowid = 0x00000080 + TIMER_ABSTIME = 1 + TIMER_END = 0 + TIMER_START = 0 + TIME_UTC = 1 + TIOCCBRK = 0x5428 + TIOCCONS = 0x541D + TIOCEXCL = 0x540C + TIOCGETD = 0x5424 + TIOCGICOUNT = 0x545D + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540F + TIOCGPTPEER = 21569 + TIOCGRS485 = 0x542E + TIOCGSERIAL = 0x541E + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 21531 + TIOCLINUX = 0x541C + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545C + TIOCMSET = 0x5418 + TIOCM_CAR = 0x040 + TIOCM_CD = 64 + TIOCM_CTS = 0x020 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x002 + TIOCM_LE = 0x001 + TIOCM_RI = 128 + TIOCM_RNG = 0x080 + TIOCM_RTS = 0x004 + TIOCM_SR = 0x010 + TIOCM_ST = 0x008 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540D + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0 + TIOCPKT_DOSTOP = 32 + TIOCPKT_FLUSHREAD = 1 + TIOCPKT_FLUSHWRITE = 2 + TIOCPKT_IOCTL = 64 + TIOCPKT_NOSTOP = 16 + TIOCPKT_START = 8 + TIOCPKT_STOP = 4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540E + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545A + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545B + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x01 + TIOCSETD = 0x5423 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSRS485 = 0x542F + TIOCSSERIAL = 0x541F + TIOCSSOFTCAR = 0x541A + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TK_ABORT = 27 + TK_ACTION = 28 + TK_ADD = 163 + TK_AFTER = 29 + TK_AGG_COLUMN = 169 + TK_AGG_FUNCTION = 168 + TK_ALL = 135 + TK_ALTER = 162 + TK_ALWAYS = 96 + TK_ANALYZE = 30 + TK_AND = 44 + TK_ANY = 101 + TK_AS = 24 + TK_ASC = 31 + TK_ASTERISK = 180 + TK_ATTACH = 32 + TK_AUTOINCR = 126 + TK_BEFORE = 33 + TK_BEGIN = 5 + TK_BETWEEN = 48 + TK_BITAND = 102 + TK_BITNOT = 114 + TK_BITOR = 103 + TK_BLOB = 154 + TK_BY = 34 + TK_CASCADE = 35 + TK_CASE = 157 + TK_CAST = 36 + TK_CHECK = 124 + TK_COLLATE = 113 + TK_COLUMN = 167 + TK_COLUMNKW = 60 + TK_COMMA = 25 + TK_COMMIT = 10 + TK_CONCAT = 111 + TK_CONFLICT = 37 + TK_CONSTRAINT = 119 + TK_CREATE = 17 + TK_CTIME_KW = 100 + TK_CURRENT = 85 + TK_DATABASE = 38 + TK_DEFAULT = 120 + TK_DEFERRABLE = 131 + TK_DEFERRED = 7 + TK_DELETE = 128 + TK_DESC = 39 + TK_DETACH = 40 + TK_DISTINCT = 140 + TK_DO = 61 + TK_DOT = 141 + TK_DROP = 133 + TK_EACH = 41 + TK_ELSE = 160 + TK_END = 11 + TK_EQ = 53 + TK_ERROR = 182 + TK_ESCAPE = 58 + TK_EXCEPT = 136 + TK_EXCLUDE = 91 + TK_EXCLUSIVE = 9 + TK_EXISTS = 20 + TK_EXPLAIN = 2 + TK_FAIL = 42 + TK_FILTER = 166 + TK_FIRST = 83 + TK_FLOAT = 153 + TK_FOLLOWING = 86 + TK_FOR = 62 + TK_FOREIGN = 132 + TK_FROM = 142 + TK_FUNCTION = 172 + TK_GE = 57 + TK_GENERATED = 95 + TK_GROUP = 146 + TK_GROUPS = 92 + TK_GT = 54 + TK_HAVING = 147 + TK_ID = 59 + TK_IF = 18 + TK_IF_NULL_ROW = 179 + TK_IGNORE = 63 + TK_ILLEGAL = 184 + TK_IMMEDIATE = 8 + TK_IN = 49 + TK_INDEX = 161 + TK_INDEXED = 116 + TK_INITIALLY = 64 + TK_INSERT = 127 + TK_INSTEAD = 65 + TK_INTEGER = 155 + TK_INTERSECT = 137 + TK_INTO = 151 + TK_IS = 45 + TK_ISNOT = 171 + TK_ISNULL = 50 + TK_JOIN = 143 + TK_JOIN_KW = 118 + TK_KEY = 67 + TK_LAST = 84 + TK_LE = 55 + TK_LIKE_KW = 47 + TK_LIMIT = 148 + TK_LP = 22 + TK_LSHIFT = 104 + TK_LT = 56 + TK_MATCH = 46 + TK_MATERIALIZED = 97 + TK_MINUS = 107 + TK_NE = 52 + TK_NO = 66 + TK_NOT = 19 + TK_NOTHING = 152 + TK_NOTNULL = 51 + TK_NULL = 121 + TK_NULLS = 82 + TK_OF = 68 + TK_OFFSET = 69 + TK_ON = 115 + TK_OR = 43 + TK_ORDER = 145 + TK_OTHERS = 93 + TK_OVER = 165 + TK_PARTITION = 87 + TK_PLAN = 4 + TK_PLUS = 106 + TK_PRAGMA = 70 + TK_PRECEDING = 88 + TK_PRIMARY = 122 + TK_PTR = 112 + TK_QUERY = 3 + TK_RAISE = 71 + TK_RANGE = 89 + TK_RECURSIVE = 72 + TK_REFERENCES = 125 + TK_REGISTER = 176 + TK_REINDEX = 98 + TK_RELEASE = 14 + TK_REM = 110 + TK_RENAME = 99 + TK_REPLACE = 73 + TK_RESTRICT = 74 + TK_RETURNING = 150 + TK_ROLLBACK = 12 + TK_ROW = 75 + TK_ROWS = 76 + TK_RP = 23 + TK_RSHIFT = 105 + TK_SAVEPOINT = 13 + TK_SELECT = 138 + TK_SELECT_COLUMN = 178 + TK_SEMI = 1 + TK_SET = 130 + TK_SLASH = 109 + TK_SPACE = 183 + TK_SPAN = 181 + TK_STAR = 108 + TK_STRING = 117 + TK_TABLE = 16 + TK_TEMP = 21 + TK_THEN = 159 + TK_TIES = 94 + TK_TO = 15 + TK_TRANSACTION = 6 + TK_TRIGGER = 77 + TK_TRUEFALSE = 170 + TK_TRUTH = 175 + TK_UMINUS = 173 + TK_UNBOUNDED = 90 + TK_UNION = 134 + TK_UNIQUE = 123 + TK_UPDATE = 129 + TK_UPLUS = 174 + TK_USING = 144 + TK_VACUUM = 78 + TK_VALUES = 139 + TK_VARIABLE = 156 + TK_VECTOR = 177 + TK_VIEW = 79 + TK_VIRTUAL = 80 + TK_WHEN = 158 + TK_WHERE = 149 + TK_WINDOW = 164 + TK_WITH = 81 + TK_WITHOUT = 26 + TMP_MAX = 238328 + TRANS_NONE = 0 + TRANS_READ = 1 + TRANS_WRITE = 2 + TRIGGER_AFTER = 2 + TRIGGER_BEFORE = 1 + UNIXFILE_DELETE = 0x20 + UNIXFILE_DIRSYNC = 0x08 + UNIXFILE_EXCL = 0x01 + UNIXFILE_NOLOCK = 0x80 + UNIXFILE_PERSIST_WAL = 0x04 + UNIXFILE_PSOW = 0x10 + UNIXFILE_RDONLY = 0x02 + UNIXFILE_URI = 0x40 + UNIX_SHM_BASE = 120 + UNIX_SHM_DMS = 128 + UNKNOWN_LOCK = 5 + UTIME_NOW = 1073741823 + UTIME_OMIT = 1073741822 + VDBE_DISPLAY_P4 = 1 + VDBE_MAGIC_DEAD = 0x5606c3c8 + VDBE_MAGIC_HALT = 0x319c2973 + VDBE_MAGIC_INIT = 0x16bceaa5 + VDBE_MAGIC_RESET = 0x48fa9f76 + VDBE_MAGIC_RUN = 0x2df20da3 + WALINDEX_MAX_VERSION = 3007000 + WAL_ALL_BUT_WRITE = 1 + WAL_CKPT_LOCK = 1 + WAL_EXCLUSIVE_MODE = 1 + WAL_FRAME_HDRSIZE = 24 + WAL_HDRSIZE = 32 + WAL_HEAPMEMORY_MODE = 2 + WAL_LOCK_CKPT = 1 + WAL_LOCK_READ0 = 3 + WAL_LOCK_WRITE = 0 + WAL_MAGIC = 0x377f0682 + WAL_MAX_VERSION = 3007000 + WAL_NORMAL_MODE = 0 + WAL_NREADER = 5 + WAL_RDONLY = 1 + WAL_RDWR = 0 + WAL_RECOVER_LOCK = 2 + WAL_RETRY = -1 + WAL_SAVEPOINT_NDATA = 4 + WAL_SHM_RDONLY = 2 + WAL_WRITE_LOCK = 0 + WCONTINUED = 8 + WEXITED = 4 + WHERE_AGG_DISTINCT = 0x0400 + WHERE_AUTO_INDEX = 0x00004000 + WHERE_BIGNULL_SORT = 0x00080000 + WHERE_BLOOMFILTER = 0x00400000 + WHERE_BOTH_LIMIT = 0x00000030 + WHERE_BTM_LIMIT = 0x00000020 + WHERE_COLUMN_EQ = 0x00000001 + WHERE_COLUMN_IN = 0x00000004 + WHERE_COLUMN_NULL = 0x00000008 + WHERE_COLUMN_RANGE = 0x00000002 + WHERE_CONSTRAINT = 0x0000000f + WHERE_DISTINCTBY = 0x0080 + WHERE_DISTINCT_NOOP = 0 + WHERE_DISTINCT_ORDERED = 2 + WHERE_DISTINCT_UNIQUE = 1 + WHERE_DISTINCT_UNORDERED = 3 + WHERE_DUPLICATES_OK = 0x0010 + WHERE_GROUPBY = 0x0040 + WHERE_IDX_ONLY = 0x00000040 + WHERE_INDEXED = 0x00000200 + WHERE_IN_ABLE = 0x00000800 + WHERE_IN_EARLYOUT = 0x00040000 + WHERE_IN_SEEKSCAN = 0x00100000 + WHERE_IPK = 0x00000100 + WHERE_MULTI_OR = 0x00002000 + WHERE_OMIT_OFFSET = 0x01000000 + WHERE_ONEPASS_DESIRED = 0x0004 + WHERE_ONEPASS_MULTIROW = 0x0008 + WHERE_ONEROW = 0x00001000 + WHERE_ORDERBY_LIMIT = 0x0800 + WHERE_ORDERBY_MAX = 0x0002 + WHERE_ORDERBY_MIN = 0x0001 + WHERE_ORDERBY_NORMAL = 0x0000 + WHERE_OR_SUBCLAUSE = 0x0020 + WHERE_PARTIALIDX = 0x00020000 + WHERE_SELFCULL = 0x00800000 + WHERE_SKIPSCAN = 0x00008000 + WHERE_SORTBYGROUP = 0x0200 + WHERE_TOP_LIMIT = 0x00000010 + WHERE_TRANSCONS = 0x00200000 + WHERE_UNQ_WANTED = 0x00010000 + WHERE_USE_LIMIT = 0x4000 + WHERE_VIRTUALTABLE = 0x00000400 + WHERE_WANT_DISTINCT = 0x0100 + WINDOW_AGGINVERSE = 2 + WINDOW_AGGSTEP = 3 + WINDOW_ENDING_INT = 1 + WINDOW_ENDING_NUM = 4 + WINDOW_NTH_VALUE_INT = 2 + WINDOW_RETURN_ROW = 1 + WINDOW_STARTING_INT = 0 + WINDOW_STARTING_NUM = 3 + WNOHANG = 1 + WNOWAIT = 0x01000000 + WO_ALL = 0x1fff + WO_AND = 0x0400 + WO_AUX = 0x0040 + WO_EQ = 0x0002 + WO_EQUIV = 0x0800 + WO_GE = 32 + WO_GT = 4 + WO_IN = 0x0001 + WO_IS = 0x0080 + WO_ISNULL = 0x0100 + WO_LE = 8 + WO_LT = 16 + WO_NOOP = 0x1000 + WO_OR = 0x0200 + WO_SINGLE = 0x01ff + WRC_Abort = 2 + WRC_Continue = 0 + WRC_Prune = 1 + WRITE_LOCK = 2 + WSTOPPED = 2 + WUNTRACED = 2 + W_OK = 2 + XN_EXPR = -2 + XN_ROWID = -1 + X_OK = 1 + YYFALLBACK = 1 + YYNOCODE = 319 + YYNOERRORRECOVERY = 1 + YYNRULE = 402 + YYNRULE_WITH_ACTION = 340 + YYNSTATE = 574 + YYNTOKEN = 185 + YYPARSEFREENEVERNULL = 1 + YYSTACKDEPTH = 100 + YYWILDCARD = 101 + YY_ACCEPT_ACTION = 1234 + YY_ACTTAB_COUNT = 2070 + YY_ERROR_ACTION = 1233 + YY_MAX_REDUCE = 1637 + YY_MAX_SHIFT = 573 + YY_MAX_SHIFTREDUCE = 1232 + YY_MIN_REDUCE = 1236 + YY_MIN_SHIFTREDUCE = 831 + YY_NO_ACTION = 1235 + YY_REDUCE_COUNT = 408 + YY_REDUCE_MAX = 1715 + YY_REDUCE_MIN = -267 + YY_SHIFT_COUNT = 573 + YY_SHIFT_MAX = 2045 + YY_SHIFT_MIN = 0 + X_ALLOCA_H = 1 + X_ANSI_STDARG_H_ = 0 + X_ANSI_STDDEF_H = 0 + X_ASM_GENERIC_ERRNO_BASE_H = 0 + X_ASM_GENERIC_ERRNO_H = 0 + X_ASM_GENERIC_INT_LL64_H = 0 + X_ASM_GENERIC_IOCTL_H = 0 + X_ASM_GENERIC_TYPES_H = 0 + X_ASM_RISCV_BITSPERLONG_H = 0 + X_ASSERT_H = 1 + X_ATFILE_SOURCE = 1 + X_BITS_BYTESWAP_H = 1 + X_BITS_ENDIANNESS_H = 1 + X_BITS_ENDIAN_H = 1 + X_BITS_ERRNO_H = 1 + X_BITS_FLOATN_COMMON_H = 0 + X_BITS_FLOATN_H = 0 + X_BITS_LIBM_SIMD_DECL_STUBS_H = 1 + X_BITS_POSIX_OPT_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_STAT_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_STDIO_LIM_H = 1 + X_BITS_STRUCT_STAT_H = 1 + X_BITS_TIME64_H = 1 + X_BITS_TIMEX_H = 1 + X_BITS_TIME_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BITS_TYPES_LOCALE_T_H = 1 + X_BITS_TYPES___LOCALE_T_H = 1 + X_BITS_UINTN_IDENTITY_H = 1 + X_BSD_PTRDIFF_T_ = 0 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DEFAULT_SOURCE = 1 + X_DLFCN_H = 1 + X_DYNAMIC_STACK_SIZE_SOURCE = 1 + X_ENDIAN_H = 1 + X_ERRNO_H = 1 + X_FALLOC_H_ = 0 + X_FCNTL_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_FTS5INT_H = 0 + X_FTS5_H = 0 + X_FTSINT_H = 0 + X_GCC_MAX_ALIGN_T = 0 + X_GCC_PTRDIFF_T = 0 + X_GCC_SIZE_T = 0 + X_GCC_WCHAR_T = 0 + X_GETOPT_CORE_H = 1 + X_GETOPT_POSIX_H = 1 + X_GNU_SOURCE = 0 + X_IOC_DIRBITS = 2 + X_IOC_DIRMASK = 3 + X_IOC_DIRSHIFT = 30 + X_IOC_NONE = 0 + X_IOC_NRBITS = 8 + X_IOC_NRMASK = 255 + X_IOC_NRSHIFT = 0 + X_IOC_READ = 2 + X_IOC_SIZEBITS = 14 + X_IOC_SIZEMASK = 16383 + X_IOC_SIZESHIFT = 16 + X_IOC_TYPEBITS = 8 + X_IOC_TYPEMASK = 255 + X_IOC_TYPESHIFT = 8 + X_IOC_WRITE = 1 + X_IOFBF = 0 + X_IOLBF = 1 + X_IONBF = 2 + X_IO_EOF_SEEN = 0x0010 + X_IO_ERR_SEEN = 0x0020 + X_IO_USER_LOCK = 0x8000 + X_ISOC11_SOURCE = 1 + X_ISOC2X_SOURCE = 1 + X_ISOC95_SOURCE = 1 + X_ISOC99_SOURCE = 1 + X_LARGEFILE64_SOURCE = 1 + X_LARGEFILE_SOURCE = 1 + X_LARGE_FILE = 1 + X_LFS64_ASYNCHRONOUS_IO = 1 + X_LFS64_LARGEFILE = 1 + X_LFS64_STDIO = 1 + X_LFS_ASYNCHRONOUS_IO = 1 + X_LFS_LARGEFILE = 1 + X_LINUX_CLOSE_RANGE_H = 0 + X_LINUX_IOCTL_H = 0 + X_LINUX_POSIX_TYPES_H = 0 + X_LINUX_STAT_H = 0 + X_LINUX_TYPES_H = 0 + X_LP64 = 1 + X_MATH_H = 1 + X_OS_COMMON_H_ = 0 + X_POSIX2_CHAR_TERM = 200809 + X_POSIX2_C_BIND = 200809 + X_POSIX2_C_DEV = 200809 + X_POSIX2_C_VERSION = 200809 + X_POSIX2_LOCALEDEF = 200809 + X_POSIX2_SW_DEV = 200809 + X_POSIX2_VERSION = 200809 + X_POSIX_ADVISORY_INFO = 200809 + X_POSIX_ASYNCHRONOUS_IO = 200809 + X_POSIX_ASYNC_IO = 1 + X_POSIX_BARRIERS = 200809 + X_POSIX_CHOWN_RESTRICTED = 0 + X_POSIX_CLOCK_SELECTION = 200809 + X_POSIX_CPUTIME = 0 + X_POSIX_C_SOURCE = 200809 + X_POSIX_FSYNC = 200809 + X_POSIX_IPV6 = 200809 + X_POSIX_JOB_CONTROL = 1 + X_POSIX_MAPPED_FILES = 200809 + X_POSIX_MEMLOCK = 200809 + X_POSIX_MEMLOCK_RANGE = 200809 + X_POSIX_MEMORY_PROTECTION = 200809 + X_POSIX_MESSAGE_PASSING = 200809 + X_POSIX_MONOTONIC_CLOCK = 0 + X_POSIX_NO_TRUNC = 1 + X_POSIX_PRIORITIZED_IO = 200809 + X_POSIX_PRIORITY_SCHEDULING = 200809 + X_POSIX_RAW_SOCKETS = 200809 + X_POSIX_READER_WRITER_LOCKS = 200809 + X_POSIX_REALTIME_SIGNALS = 200809 + X_POSIX_REENTRANT_FUNCTIONS = 1 + X_POSIX_REGEXP = 1 + X_POSIX_SAVED_IDS = 1 + X_POSIX_SEMAPHORES = 200809 + X_POSIX_SHARED_MEMORY_OBJECTS = 200809 + X_POSIX_SHELL = 1 + X_POSIX_SOURCE = 1 + X_POSIX_SPAWN = 200809 + X_POSIX_SPIN_LOCKS = 200809 + X_POSIX_SPORADIC_SERVER = -1 + X_POSIX_SYNCHRONIZED_IO = 200809 + X_POSIX_THREADS = 200809 + X_POSIX_THREAD_ATTR_STACKADDR = 200809 + X_POSIX_THREAD_ATTR_STACKSIZE = 200809 + X_POSIX_THREAD_CPUTIME = 0 + X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 + X_POSIX_THREAD_PRIO_INHERIT = 200809 + X_POSIX_THREAD_PRIO_PROTECT = 200809 + X_POSIX_THREAD_PROCESS_SHARED = 200809 + X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 + X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 + X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 + X_POSIX_THREAD_SPORADIC_SERVER = -1 + X_POSIX_TIMEOUTS = 200809 + X_POSIX_TIMERS = 200809 + X_POSIX_TRACE = -1 + X_POSIX_TRACE_EVENT_FILTER = -1 + X_POSIX_TRACE_INHERIT = -1 + X_POSIX_TRACE_LOG = -1 + X_POSIX_TYPED_MEMORY_OBJECTS = -1 + X_POSIX_V6_ILP32_OFF32 = -1 + X_POSIX_V6_ILP32_OFFBIG = -1 + X_POSIX_V6_LP64_OFF64 = 1 + X_POSIX_V6_LPBIG_OFFBIG = -1 + X_POSIX_V7_ILP32_OFF32 = -1 + X_POSIX_V7_ILP32_OFFBIG = -1 + X_POSIX_V7_LP64_OFF64 = 1 + X_POSIX_V7_LPBIG_OFFBIG = -1 + X_POSIX_VDISABLE = 0 + X_POSIX_VERSION = 200809 + X_PTRDIFF_T = 0 + X_PTRDIFF_T_ = 0 + X_PTRDIFF_T_DECLARED = 0 + X_RWLOCK_INTERNAL_H = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_SQLITE3RBU_H = 0 + X_SQLITE3RTREE_H_ = 0 + X_SQLITE_OS_H_ = 0 + X_STATBUF_ST_BLKSIZE = 0 + X_STATBUF_ST_NSEC = 0 + X_STATBUF_ST_RDEV = 0 + X_STDARG_H = 0 + X_STDC_PREDEF_H = 1 + X_STDDEF_H = 0 + X_STDDEF_H_ = 0 + X_STDIO_H = 1 + X_STDLIB_H = 1 + X_STRINGS_H = 1 + X_STRING_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_IOCTL_H = 1 + X_SYS_MMAN_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_STAT_H = 1 + X_SYS_TIME_H = 1 + X_SYS_TTYDEFAULTS_H_ = 0 + X_SYS_TYPES_H = 1 + X_THREAD_MUTEX_INTERNAL_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_TIME_H = 1 + X_T_PTRDIFF = 0 + X_T_PTRDIFF_ = 0 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + X_T_WCHAR = 0 + X_T_WCHAR_ = 0 + X_UNISTD_H = 1 + X_VA_LIST = 0 + X_VA_LIST_ = 0 + X_VA_LIST_DEFINED = 0 + X_VA_LIST_T_H = 0 + X_WCHAR_T = 0 + X_WCHAR_T_ = 0 + X_WCHAR_T_DECLARED = 0 + X_WCHAR_T_DEFINED = 0 + X_WCHAR_T_DEFINED_ = 0 + X_WCHAR_T_H = 0 + X_XBS5_ILP32_OFF32 = -1 + X_XBS5_ILP32_OFFBIG = -1 + X_XBS5_LP64_OFF64 = 1 + X_XBS5_LPBIG_OFFBIG = -1 + X_XOPEN_ENH_I18N = 1 + X_XOPEN_LEGACY = 1 + X_XOPEN_REALTIME = 1 + X_XOPEN_REALTIME_THREADS = 1 + X_XOPEN_SHM = 1 + X_XOPEN_SOURCE = 700 + X_XOPEN_SOURCE_EXTENDED = 1 + X_XOPEN_UNIX = 1 + X_XOPEN_VERSION = 700 + X_XOPEN_XCU_VERSION = 4 + X_XOPEN_XPG2 = 1 + X_XOPEN_XPG3 = 1 + X_XOPEN_XPG4 = 1 + BBatch = 0 + EtBUFSIZE = 70 + EtCHARX = 8 + EtDECIMAL = 16 + EtDYNSTRING = 6 + EtEXP = 2 + EtFLOAT = 1 + EtGENERIC = 3 + EtINVALID = 17 + EtORDINAL = 15 + EtPERCENT = 7 + EtPOINTER = 13 + EtRADIX = 0 + EtSIZE = 4 + EtSQLESCAPE = 9 + EtSQLESCAPE2 = 10 + EtSQLESCAPE3 = 14 + EtSRCITEM = 12 + EtSTRING = 5 + EtTOKEN = 11 + Fts5YYNFTS5TOKEN = 16 + Fts5YYNOCODE = 27 + Fts5YYNOERRORRECOVERY = 1 + Fts5YYNRULE = 28 + Fts5YYNRULE_WITH_ACTION = 28 + Fts5YYNSTATE = 35 + Fts5YYPARSEFREENOTNULL = 1 + Fts5YYSTACKDEPTH = 100 + Fts5YY_ACCEPT_ACTION = 81 + Fts5YY_ACTTAB_COUNT = 105 + Fts5YY_ERROR_ACTION = 80 + Fts5YY_MAX_REDUCE = 110 + Fts5YY_MAX_SHIFT = 34 + Fts5YY_MAX_SHIFTREDUCE = 79 + Fts5YY_MIN_REDUCE = 83 + Fts5YY_MIN_SHIFTREDUCE = 52 + Fts5YY_NO_ACTION = 82 + Fts5YY_REDUCE_COUNT = 17 + Fts5YY_REDUCE_MAX = 67 + Fts5YY_REDUCE_MIN = -17 + Fts5YY_SHIFT_COUNT = 34 + Fts5YY_SHIFT_MAX = 93 + Fts5YY_SHIFT_MIN = 0 + Linux = 1 + Math_errhandling = 3 + Sqlite3Fts5ParserCTX_FETCH = 0 + Sqlite3Fts5ParserCTX_PARAM = 0 + Sqlite3Fts5ParserCTX_PDECL = 0 + Sqlite3Fts5ParserCTX_SDECL = 0 + Sqlite3Fts5ParserCTX_STORE = 0 + Sqlite3ParserARG_FETCH = 0 + Sqlite3ParserARG_PARAM = 0 + Sqlite3ParserARG_PDECL = 0 + Sqlite3ParserARG_SDECL = 0 + Sqlite3ParserARG_STORE = 0 + Sqlite3Parser_ENGINEALWAYSONSTACK = 1 + TkCREATE = 4 + TkEND = 7 + TkEXPLAIN = 3 + TkOTHER = 2 + TkSEMI = 0 + TkTEMP = 5 + TkTRIGGER = 6 + TkWS = 1 + Unix = 1 + WsdAutoextInit = 0 + WsdHooksInit = 0 + WsdStatInit = 0 +) + +// These are the possible values for the FLAGS argument to `dladdr1'. +// This indicates what extra information is stored at *EXTRA_INFO. +// It may also be zero, in which case the EXTRA_INFO argument is not used. +const ( /* dlfcn.h:108:1: */ + // Matching symbol table entry (const ElfNN_Sym *). + RTLD_DL_SYMENT = 1 + + // The object containing the address (struct link_map *). + RTLD_DL_LINKMAP = 2 +) + +// These are the possible values for the REQUEST argument to `dlinfo'. +const ( /* dlfcn.h:128:1: */ + // Treat ARG as `lmid_t *'; store namespace ID for HANDLE there. + RTLD_DI_LMID = 1 + + // Treat ARG as `struct link_map **'; + // store the `struct link_map *' for HANDLE there. + RTLD_DI_LINKMAP = 2 + + RTLD_DI_CONFIGADDR = 3 // Unsupported, defined by Solaris. + + // Treat ARG as `Dl_serinfo *' (see below), and fill in to describe the + // directories that will be searched for dependencies of this object. + // RTLD_DI_SERINFOSIZE fills in just the `dls_cnt' and `dls_size' + // entries to indicate the size of the buffer that must be passed to + // RTLD_DI_SERINFO to fill in the full information. + RTLD_DI_SERINFO = 4 + RTLD_DI_SERINFOSIZE = 5 + + // Treat ARG as `char *', and store there the directory name used to + // expand $ORIGIN in this shared object's dependency file names. + RTLD_DI_ORIGIN = 6 + + RTLD_DI_PROFILENAME = 7 // Unsupported, defined by Solaris. + RTLD_DI_PROFILEOUT = 8 // Unsupported, defined by Solaris. + + // Treat ARG as `size_t *', and store there the TLS module ID + // of this object's PT_TLS segment, as used in TLS relocations; + // store zero if this object does not define a PT_TLS segment. + RTLD_DI_TLS_MODID = 9 + + // Treat ARG as `void **', and store there a pointer to the calling + // thread's TLS block corresponding to this object's PT_TLS segment. + // Store a null pointer if this object does not define a PT_TLS + // segment, or if the calling thread has not allocated a block for it. + RTLD_DI_TLS_DATA = 10 + + RTLD_DI_MAX = 10 +) + +// Define macros for the return values of ilogb and llogb, based on +// __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. +// +// FP_ILOGB0 Expands to a value returned by `ilogb (0.0)'. +// FP_ILOGBNAN Expands to a value returned by `ilogb (NAN)'. +// FP_LLOGB0 Expands to a value returned by `llogb (0.0)'. +// FP_LLOGBNAN Expands to a value returned by `llogb (NAN)'. +// + +// Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. +// Copyright (C) 2016-2021 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 +// . + +// __FP_LOGB0_IS_MIN is defined to 1 if FP_ILOGB0 is INT_MIN, and 0 if +// it is -INT_MAX. __FP_LOGBNAN_IS_MIN is defined to 1 if FP_ILOGBNAN +// is INT_MIN, and 0 if it is INT_MAX. + +// Get the architecture specific values describing the floating-point +// evaluation. The following symbols will get defined: +// +// FP_FAST_FMA +// FP_FAST_FMAF +// FP_FAST_FMAL +// If defined it indicates that the `fma' function +// generally executes about as fast as a multiply and an add. +// This macro is defined only iff the `fma' function is +// implemented directly with a hardware multiply-add instructions. + +// Define FP_FAST_* macros. +// Copyright (C) 2016-2021 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 +// . + +// The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} +// builtins are supported. + +// Rounding direction macros for fromfp functions. +const ( /* math.h:251:1: */ + FP_INT_UPWARD = 0 + FP_INT_DOWNWARD = 1 + FP_INT_TOWARDZERO = 2 + FP_INT_TONEARESTFROMZERO = 3 + FP_INT_TONEAREST = 4 +) + +// Depending on the type of TG_ARG, call an appropriately suffixed +// version of FUNC with arguments (including parentheses) ARGS. +// Suffixed functions may not exist for long double if it has the same +// format as double, or for other types with the same format as float, +// double or long double. The behavior is undefined if the argument +// does not have a real floating type. The definition may use a +// conditional expression, so all suffixed versions of FUNC must +// return the same type (FUNC may include a cast if necessary rather +// than being a single identifier). + +// ISO C99 defines some generic macros which work on any data type. + +// All floating-point numbers can be put in one of these categories. +const ( /* math.h:928:1: */ + FP_NAN = 0 + FP_INFINITE = 1 + FP_ZERO = 2 + FP_SUBNORMAL = 3 + FP_NORMAL = 4 +) + +// Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; +// the `_SC_*' symbols for the NAME argument to `sysconf'; +// and the `_CS_*' symbols for the NAME argument to `confstr'. +// `sysconf', `pathconf', and `confstr' NAME values. Generic version. +// Copyright (C) 1993-2021 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 +// . + +// Values for the NAME argument to `pathconf' and `fpathconf'. +const ( /* confname.h:24:1: */ + X_PC_LINK_MAX = 0 + X_PC_MAX_CANON = 1 + X_PC_MAX_INPUT = 2 + X_PC_NAME_MAX = 3 + X_PC_PATH_MAX = 4 + X_PC_PIPE_BUF = 5 + X_PC_CHOWN_RESTRICTED = 6 + X_PC_NO_TRUNC = 7 + X_PC_VDISABLE = 8 + X_PC_SYNC_IO = 9 + X_PC_ASYNC_IO = 10 + X_PC_PRIO_IO = 11 + X_PC_SOCK_MAXBUF = 12 + X_PC_FILESIZEBITS = 13 + X_PC_REC_INCR_XFER_SIZE = 14 + X_PC_REC_MAX_XFER_SIZE = 15 + X_PC_REC_MIN_XFER_SIZE = 16 + X_PC_REC_XFER_ALIGN = 17 + X_PC_ALLOC_SIZE_MIN = 18 + X_PC_SYMLINK_MAX = 19 + X_PC_2_SYMLINKS = 20 +) + +// Values for the NAME argument to `confstr'. +const ( /* confname.h:539:1: */ + X_CS_PATH = 0 // The default search path. + + X_CS_V6_WIDTH_RESTRICTED_ENVS = 1 + + X_CS_GNU_LIBC_VERSION = 2 + X_CS_GNU_LIBPTHREAD_VERSION = 3 + + X_CS_V5_WIDTH_RESTRICTED_ENVS = 4 + + X_CS_V7_WIDTH_RESTRICTED_ENVS = 5 + + X_CS_LFS_CFLAGS = 1000 + X_CS_LFS_LDFLAGS = 1001 + X_CS_LFS_LIBS = 1002 + X_CS_LFS_LINTFLAGS = 1003 + X_CS_LFS64_CFLAGS = 1004 + X_CS_LFS64_LDFLAGS = 1005 + X_CS_LFS64_LIBS = 1006 + X_CS_LFS64_LINTFLAGS = 1007 + + X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100 + X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 + X_CS_XBS5_ILP32_OFF32_LIBS = 1102 + X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 + X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 + X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 + X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106 + X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 + X_CS_XBS5_LP64_OFF64_CFLAGS = 1108 + X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109 + X_CS_XBS5_LP64_OFF64_LIBS = 1110 + X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 + X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 + X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 + X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 + X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 + + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 + X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 + X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 + X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126 + X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 + X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 + + X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 + X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 + X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 + X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 + X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 + X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 + X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 + X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 + X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 + X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 + X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142 + X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 + X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 + X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 + X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 + X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 + + X_CS_V6_ENV = 1148 + X_CS_V7_ENV = 1149 +) + +// Values for the argument to `sysconf'. +const ( /* confname.h:71:1: */ + X_SC_ARG_MAX = 0 + X_SC_CHILD_MAX = 1 + X_SC_CLK_TCK = 2 + X_SC_NGROUPS_MAX = 3 + X_SC_OPEN_MAX = 4 + X_SC_STREAM_MAX = 5 + X_SC_TZNAME_MAX = 6 + X_SC_JOB_CONTROL = 7 + X_SC_SAVED_IDS = 8 + X_SC_REALTIME_SIGNALS = 9 + X_SC_PRIORITY_SCHEDULING = 10 + X_SC_TIMERS = 11 + X_SC_ASYNCHRONOUS_IO = 12 + X_SC_PRIORITIZED_IO = 13 + X_SC_SYNCHRONIZED_IO = 14 + X_SC_FSYNC = 15 + X_SC_MAPPED_FILES = 16 + X_SC_MEMLOCK = 17 + X_SC_MEMLOCK_RANGE = 18 + X_SC_MEMORY_PROTECTION = 19 + X_SC_MESSAGE_PASSING = 20 + X_SC_SEMAPHORES = 21 + X_SC_SHARED_MEMORY_OBJECTS = 22 + X_SC_AIO_LISTIO_MAX = 23 + X_SC_AIO_MAX = 24 + X_SC_AIO_PRIO_DELTA_MAX = 25 + X_SC_DELAYTIMER_MAX = 26 + X_SC_MQ_OPEN_MAX = 27 + X_SC_MQ_PRIO_MAX = 28 + X_SC_VERSION = 29 + X_SC_PAGESIZE = 30 + X_SC_RTSIG_MAX = 31 + X_SC_SEM_NSEMS_MAX = 32 + X_SC_SEM_VALUE_MAX = 33 + X_SC_SIGQUEUE_MAX = 34 + X_SC_TIMER_MAX = 35 + + // Values for the argument to `sysconf' + // corresponding to _POSIX2_* symbols. + X_SC_BC_BASE_MAX = 36 + X_SC_BC_DIM_MAX = 37 + X_SC_BC_SCALE_MAX = 38 + X_SC_BC_STRING_MAX = 39 + X_SC_COLL_WEIGHTS_MAX = 40 + X_SC_EQUIV_CLASS_MAX = 41 + X_SC_EXPR_NEST_MAX = 42 + X_SC_LINE_MAX = 43 + X_SC_RE_DUP_MAX = 44 + X_SC_CHARCLASS_NAME_MAX = 45 + + X_SC_2_VERSION = 46 + X_SC_2_C_BIND = 47 + X_SC_2_C_DEV = 48 + X_SC_2_FORT_DEV = 49 + X_SC_2_FORT_RUN = 50 + X_SC_2_SW_DEV = 51 + X_SC_2_LOCALEDEF = 52 + + X_SC_PII = 53 + X_SC_PII_XTI = 54 + X_SC_PII_SOCKET = 55 + X_SC_PII_INTERNET = 56 + X_SC_PII_OSI = 57 + X_SC_POLL = 58 + X_SC_SELECT = 59 + X_SC_UIO_MAXIOV = 60 + X_SC_IOV_MAX = 60 + X_SC_PII_INTERNET_STREAM = 61 + X_SC_PII_INTERNET_DGRAM = 62 + X_SC_PII_OSI_COTS = 63 + X_SC_PII_OSI_CLTS = 64 + X_SC_PII_OSI_M = 65 + X_SC_T_IOV_MAX = 66 + + // Values according to POSIX 1003.1c (POSIX threads). + X_SC_THREADS = 67 + X_SC_THREAD_SAFE_FUNCTIONS = 68 + X_SC_GETGR_R_SIZE_MAX = 69 + X_SC_GETPW_R_SIZE_MAX = 70 + X_SC_LOGIN_NAME_MAX = 71 + X_SC_TTY_NAME_MAX = 72 + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73 + X_SC_THREAD_KEYS_MAX = 74 + X_SC_THREAD_STACK_MIN = 75 + X_SC_THREAD_THREADS_MAX = 76 + X_SC_THREAD_ATTR_STACKADDR = 77 + X_SC_THREAD_ATTR_STACKSIZE = 78 + X_SC_THREAD_PRIORITY_SCHEDULING = 79 + X_SC_THREAD_PRIO_INHERIT = 80 + X_SC_THREAD_PRIO_PROTECT = 81 + X_SC_THREAD_PROCESS_SHARED = 82 + + X_SC_NPROCESSORS_CONF = 83 + X_SC_NPROCESSORS_ONLN = 84 + X_SC_PHYS_PAGES = 85 + X_SC_AVPHYS_PAGES = 86 + X_SC_ATEXIT_MAX = 87 + X_SC_PASS_MAX = 88 + + X_SC_XOPEN_VERSION = 89 + X_SC_XOPEN_XCU_VERSION = 90 + X_SC_XOPEN_UNIX = 91 + X_SC_XOPEN_CRYPT = 92 + X_SC_XOPEN_ENH_I18N = 93 + X_SC_XOPEN_SHM = 94 + + X_SC_2_CHAR_TERM = 95 + X_SC_2_C_VERSION = 96 + X_SC_2_UPE = 97 + + X_SC_XOPEN_XPG2 = 98 + X_SC_XOPEN_XPG3 = 99 + X_SC_XOPEN_XPG4 = 100 + + X_SC_CHAR_BIT = 101 + X_SC_CHAR_MAX = 102 + X_SC_CHAR_MIN = 103 + X_SC_INT_MAX = 104 + X_SC_INT_MIN = 105 + X_SC_LONG_BIT = 106 + X_SC_WORD_BIT = 107 + X_SC_MB_LEN_MAX = 108 + X_SC_NZERO = 109 + X_SC_SSIZE_MAX = 110 + X_SC_SCHAR_MAX = 111 + X_SC_SCHAR_MIN = 112 + X_SC_SHRT_MAX = 113 + X_SC_SHRT_MIN = 114 + X_SC_UCHAR_MAX = 115 + X_SC_UINT_MAX = 116 + X_SC_ULONG_MAX = 117 + X_SC_USHRT_MAX = 118 + + X_SC_NL_ARGMAX = 119 + X_SC_NL_LANGMAX = 120 + X_SC_NL_MSGMAX = 121 + X_SC_NL_NMAX = 122 + X_SC_NL_SETMAX = 123 + X_SC_NL_TEXTMAX = 124 + + X_SC_XBS5_ILP32_OFF32 = 125 + X_SC_XBS5_ILP32_OFFBIG = 126 + X_SC_XBS5_LP64_OFF64 = 127 + X_SC_XBS5_LPBIG_OFFBIG = 128 + + X_SC_XOPEN_LEGACY = 129 + X_SC_XOPEN_REALTIME = 130 + X_SC_XOPEN_REALTIME_THREADS = 131 + + X_SC_ADVISORY_INFO = 132 + X_SC_BARRIERS = 133 + X_SC_BASE = 134 + X_SC_C_LANG_SUPPORT = 135 + X_SC_C_LANG_SUPPORT_R = 136 + X_SC_CLOCK_SELECTION = 137 + X_SC_CPUTIME = 138 + X_SC_THREAD_CPUTIME = 139 + X_SC_DEVICE_IO = 140 + X_SC_DEVICE_SPECIFIC = 141 + X_SC_DEVICE_SPECIFIC_R = 142 + X_SC_FD_MGMT = 143 + X_SC_FIFO = 144 + X_SC_PIPE = 145 + X_SC_FILE_ATTRIBUTES = 146 + X_SC_FILE_LOCKING = 147 + X_SC_FILE_SYSTEM = 148 + X_SC_MONOTONIC_CLOCK = 149 + X_SC_MULTI_PROCESS = 150 + X_SC_SINGLE_PROCESS = 151 + X_SC_NETWORKING = 152 + X_SC_READER_WRITER_LOCKS = 153 + X_SC_SPIN_LOCKS = 154 + X_SC_REGEXP = 155 + X_SC_REGEX_VERSION = 156 + X_SC_SHELL = 157 + X_SC_SIGNALS = 158 + X_SC_SPAWN = 159 + X_SC_SPORADIC_SERVER = 160 + X_SC_THREAD_SPORADIC_SERVER = 161 + X_SC_SYSTEM_DATABASE = 162 + X_SC_SYSTEM_DATABASE_R = 163 + X_SC_TIMEOUTS = 164 + X_SC_TYPED_MEMORY_OBJECTS = 165 + X_SC_USER_GROUPS = 166 + X_SC_USER_GROUPS_R = 167 + X_SC_2_PBS = 168 + X_SC_2_PBS_ACCOUNTING = 169 + X_SC_2_PBS_LOCATE = 170 + X_SC_2_PBS_MESSAGE = 171 + X_SC_2_PBS_TRACK = 172 + X_SC_SYMLOOP_MAX = 173 + X_SC_STREAMS = 174 + X_SC_2_PBS_CHECKPOINT = 175 + + X_SC_V6_ILP32_OFF32 = 176 + X_SC_V6_ILP32_OFFBIG = 177 + X_SC_V6_LP64_OFF64 = 178 + X_SC_V6_LPBIG_OFFBIG = 179 + + X_SC_HOST_NAME_MAX = 180 + X_SC_TRACE = 181 + X_SC_TRACE_EVENT_FILTER = 182 + X_SC_TRACE_INHERIT = 183 + X_SC_TRACE_LOG = 184 + + X_SC_LEVEL1_ICACHE_SIZE = 185 + X_SC_LEVEL1_ICACHE_ASSOC = 186 + X_SC_LEVEL1_ICACHE_LINESIZE = 187 + X_SC_LEVEL1_DCACHE_SIZE = 188 + X_SC_LEVEL1_DCACHE_ASSOC = 189 + X_SC_LEVEL1_DCACHE_LINESIZE = 190 + X_SC_LEVEL2_CACHE_SIZE = 191 + X_SC_LEVEL2_CACHE_ASSOC = 192 + X_SC_LEVEL2_CACHE_LINESIZE = 193 + X_SC_LEVEL3_CACHE_SIZE = 194 + X_SC_LEVEL3_CACHE_ASSOC = 195 + X_SC_LEVEL3_CACHE_LINESIZE = 196 + X_SC_LEVEL4_CACHE_SIZE = 197 + X_SC_LEVEL4_CACHE_ASSOC = 198 + X_SC_LEVEL4_CACHE_LINESIZE = 199 + // Leave room here, maybe we need a few more cache levels some day. + + X_SC_IPV6 = 235 + X_SC_RAW_SOCKETS = 236 + + X_SC_V7_ILP32_OFF32 = 237 + X_SC_V7_ILP32_OFFBIG = 238 + X_SC_V7_LP64_OFF64 = 239 + X_SC_V7_LPBIG_OFFBIG = 240 + + X_SC_SS_REPL_MAX = 241 + + X_SC_TRACE_EVENT_NAME_MAX = 242 + X_SC_TRACE_NAME_MAX = 243 + X_SC_TRACE_SYS_MAX = 244 + X_SC_TRACE_USER_EVENT_MAX = 245 + + X_SC_XOPEN_STREAMS = 246 + + X_SC_THREAD_ROBUST_PRIO_INHERIT = 247 + X_SC_THREAD_ROBUST_PRIO_PROTECT = 248 + + X_SC_MINSIGSTKSZ = 249 + + X_SC_SIGSTKSZ = 250 +) + +// open/fcntl. + +// open file description locks. +// +// Usually record locks held by a process are released on *any* close and are +// not inherited across a fork. +// +// These cmd values will set locks that conflict with process-associated record +// locks, but are "owned" by the opened file description, not the process. +// This means that they are inherited across fork or clone with CLONE_FILES +// like BSD (flock) locks, and they are only released automatically when the +// last reference to the the file description against which they were acquired +// is put. + +// For now, Linux has no separate synchronicity options for read +// operations. We define O_RSYNC therefore as the same as O_SYNC +// since this is a superset. + +// Values for the second argument to `fcntl'. + +// Set / get write life time hints. + +// For F_[GET|SET]FD. + +// For posix fcntl() and `l_type' field of a `struct flock' for lockf(). + +// For old implementation of BSD flock. + +// Operations for BSD flock, also used by the kernel implementation. + +// Types of directory notifications that may be requested with F_NOTIFY. + +// Owner types. +const ( /* fcntl-linux.h:265:1: */ + F_OWNER_TID = 0 // Kernel thread. + F_OWNER_PID = 1 // Process. + F_OWNER_PGRP = 2 // Process group. + F_OWNER_GID = 2 +) + +// Values for the first argument to `getitimer' and `setitimer'. +const ( /* time.h:114:1: */ + // Timers run in real time. + ITIMER_REAL = 0 + // Timers run only when the process is executing. + ITIMER_VIRTUAL = 1 + // Timers run when the process is executing and when + // the system is executing on behalf of the process. + ITIMER_PROF = 2 +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +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 /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// ***************************************************************************** +// +// This file is an amalgamation of many separate C source files from SQLite +// version 3.38.1. By combining all the individual C code files into this +// single large file, the entire code can be compiled as a single translation +// unit. This allows many compilers to do optimizations that would not be +// possible if the files were compiled separately. Performance improvements +// of 5% or more are commonly seen when SQLite is compiled as a single +// translation unit. +// +// This file is all you need to compile SQLite. To use SQLite in other +// programs, you need this file and the "sqlite3.h" header file that defines +// the programming interface to the SQLite library. (If you do not have +// the "sqlite3.h" header file at hand, you will find a copy embedded within +// the text of this file. Search for "Begin file sqlite3.h" to find the start +// of the embedded sqlite3.h header file.) Additional code files may be needed +// if you want a wrapper to interface SQLite with your choice of programming +// language. The code for the "sqlite3" command-line shell is also in a +// separate file. This file contains only code for the core SQLite library. +//************* Begin file sqliteInt.h ************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// Internal interface definitions for SQLite. +// + +// Special Comments: +// +// Some comments have special meaning to the tools that measure test +// coverage: +// +// NO_TEST - The branches on this line are not +// measured by branch coverage. This is +// used on lines of code that actually +// implement parts of coverage testing. +// +// OPTIMIZATION-IF-TRUE - This branch is allowed to alway be false +// and the correct answer is still obtained, +// though perhaps more slowly. +// +// OPTIMIZATION-IF-FALSE - This branch is allowed to alway be true +// and the correct answer is still obtained, +// though perhaps more slowly. +// +// PREVENTS-HARMLESS-OVERREAD - This branch prevents a buffer overread +// that would be harmless and undetectable +// if it did occur. +// +// In all cases, the special comment must be enclosed in the usual +// slash-asterisk...asterisk-slash comment marks, with no spaces between the +// asterisks and the comment text. + +// Make sure the Tcl calling convention macro is defined. This macro is +// only used by test code and Tcl integration code. + +// Include the header file used to customize the compiler options for MSVC. +// This should be done first so that it can successfully prevent spurious +// compiler warnings due to subsequent content in this file and other files +// that are included by this file. +//************* Include msvc.h in the middle of sqliteInt.h ***************** +//************* Begin file msvc.h ******************************************* +// 2015 January 12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code that is specific to MSVC. + +//************* End of msvc.h *********************************************** +//************* Continuing where we left off in sqliteInt.h ***************** + +// Special setup for VxWorks +//************* Include vxworks.h in the middle of sqliteInt.h ************** +//************* Begin file vxworks.h **************************************** +// 2015-03-02 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code that is specific to Wind River's VxWorks +// This is not VxWorks. + +//************* End of vxworks.h ******************************************** +//************* Continuing where we left off in sqliteInt.h ***************** + +// These #defines should enable >2GB file support on POSIX if the +// underlying operating system supports it. If the OS lacks +// large file support, or if the OS is windows, these should be no-ops. +// +// Ticket #2739: The _LARGEFILE_SOURCE macro must appear before any +// system #includes. Hence, this block of code must be the very first +// code in all source files. +// +// Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch +// on the compiler command line. This is necessary if you are compiling +// on a recent machine (ex: Red Hat 7.2) but you want your code to work +// on an older machine (ex: Red Hat 6.0). If you compile on Red Hat 7.2 +// without this option, LFS is enable. But LFS does not exist in the kernel +// in Red Hat 6.0, so the code won't work. Hence, for maximum binary +// portability you should omit LFS. +// +// The previous paragraph was written in 2005. (This paragraph is written +// on 2008-11-28.) These days, all Linux kernels support large files, so +// you should probably leave LFS enabled. But some embedded platforms might +// lack LFS in which case the SQLITE_DISABLE_LFS macro might still be useful. +// +// Similar is true for Mac OS X. LFS is only supported on Mac OS X 9 and later. + +// The GCC_VERSION and MSVC_VERSION macros are used to +// conditionally include optimizations for each of these compilers. A +// value of 0 means that compiler is not being used. The +// SQLITE_DISABLE_INTRINSIC macro means do not use any compiler-specific +// optimizations, and hence set all compiler macros to 0 +// +// There was once also a CLANG_VERSION macro. However, we learn that the +// version numbers in clang are for "marketing" only and are inconsistent +// and unreliable. Fortunately, all versions of clang also recognize the +// gcc version numbers and have reasonable settings for gcc version numbers, +// so the GCC_VERSION macro will be set to a correct non-zero value even +// when compiling with clang. + +// Some C99 functions in "math.h" are only present for MSVC when its version +// is associated with Visual Studio 2013 or higher. + +// Needed for various definitions... + +// Macro to disable warnings about missing "break" at the end of a "case". + +// For MinGW, check to see if we can include the header file containing its +// version information, among other things. Normally, this internal MinGW +// header file would [only] be included automatically by other MinGW header +// files; however, the contained version information is now required by this +// header file to work around binary compatibility issues (see below) and +// this is the only known way to reliably obtain it. This entire #if block +// would be completely unnecessary if there was any other way of detecting +// MinGW via their preprocessor (e.g. if they customized their GCC to define +// some MinGW-specific macros). When compiling for MinGW, either the +// _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be +// defined; otherwise, detection of conditions specific to MinGW will be +// disabled. + +// For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T +// define is required to maintain binary compatibility with the MSVC runtime +// library in use (e.g. for Windows XP). + +// Optionally #include a user-defined header, whereby compilation options +// may be set prior to where they take effect, but after platform setup. +// If SQLITE_CUSTOM_INCLUDE=? is defined, its value names the #include +// file. + +// The public SQLite interface. The _FILE_OFFSET_BITS macro must appear +// first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for +// MinGW. +//************* Include sqlite3.h in the middle of sqliteInt.h ************** +//************* Begin file sqlite3.h **************************************** +// 2001-09-15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface that the SQLite library +// presents to client programs. If a C-function, structure, datatype, +// or constant definition does not appear in this file, then it is +// not a published API of SQLite, is subject to change without +// notice, and should not be referenced by programs that use SQLite. +// +// Some of the definitions that are in this file are marked as +// "experimental". Experimental interfaces are normally new +// features recently added to SQLite. We do not anticipate changes +// to experimental interfaces but reserve the right to make minor changes +// if experience from use "in the wild" suggest such changes are prudent. +// +// The official C-language API documentation for SQLite is derived +// from comments in this file. This file is the authoritative source +// on how SQLite interfaces are supposed to operate. +// +// The name of this file under configuration management is "sqlite.h.in". +// The makefile makes some minor changes to this file (such as inserting +// the version number) and changes its name to "sqlite3.h" as +// part of the build process. +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.15 Variable arguments + +// Define __gnuc_va_list. + +type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */ + +// Define the standard macros for the user, +// if this invocation was from the user program. + +// Define va_list, if desired, from __gnuc_va_list. +// We deliberately do not define va_list when called from +// stdio.h, because ANSI C says that stdio.h is not supposed to define +// va_list. stdio.h needs to have access to that data type, +// but must not use that name. It should use the name __gnuc_va_list, +// which is safe because it is reserved for the implementation. + +// The macro _VA_LIST_ is the same thing used by this file in Ultrix. +// But on BSD NET2 we must not test or define or undef it. +// (Note that the comments in NET 2's ansi.h +// are incorrect for _VA_LIST_--see stdio.h!) +// The macro _VA_LIST_DEFINED is used in Windows NT 3.5 +// The macro _VA_LIST is used in SCO Unix 3.2. +// The macro _VA_LIST_T_H is used in the Bull dpx2 +// The macro __va_list__ is used by BeOS. +type Va_list = X__gnuc_va_list /* stdarg.h:99:24 */ + +// Make sure we can call this stuff from C++. + +// Facilitate override of interface linkage and calling conventions. +// Be aware that these macros may not be used within this particular +// translation of the amalgamation and its associated header file. +// +// The SQLITE_EXTERN and SQLITE_API macros are used to instruct the +// compiler that the target identifier should have external linkage. +// +// The SQLITE_CDECL macro is used to set the calling convention for +// public functions that accept a variable number of arguments. +// +// The SQLITE_APICALL macro is used to set the calling convention for +// public functions that accept a fixed number of arguments. +// +// The SQLITE_STDCALL macro is no longer used and is now deprecated. +// +// The SQLITE_CALLBACK macro is used to set the calling convention for +// function pointers. +// +// The SQLITE_SYSAPI macro is used to set the calling convention for +// functions provided by the operating system. +// +// Currently, the SQLITE_CDECL, SQLITE_APICALL, SQLITE_CALLBACK, and +// SQLITE_SYSAPI macros are used only when building for environments +// that require non-default calling conventions. + +// These no-op macros are used in front of interfaces to mark those +// interfaces as either deprecated or experimental. New applications +// should not use deprecated interfaces - they are supported for backwards +// compatibility only. Application writers should be aware that +// experimental interfaces are subject to change in point releases. +// +// These macros used to resolve to various kinds of compiler magic that +// would generate warning messages when they were used. But that +// compiler magic ended up generating such a flurry of bug reports +// that we have taken it all out and gone back to using simple +// noop macros. + +// Ensure these symbols were not defined by some previous header file. + +// CAPI3REF: Compile-Time Library Version Numbers +// +// ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header +// evaluates to a string literal that is the SQLite version in the +// format "X.Y.Z" where X is the major version number (always 3 for +// SQLite3) and Y is the minor version number and Z is the release number.)^ +// ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer +// with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same +// numbers used in [SQLITE_VERSION].)^ +// The SQLITE_VERSION_NUMBER for any given release of SQLite will also +// be larger than the release from which it is derived. Either Y will +// be held constant and Z will be incremented or else Y will be incremented +// and Z will be reset to zero. +// +// Since [version 3.6.18] ([dateof:3.6.18]), +// SQLite source code has been stored in the +// Fossil configuration management +// system. ^The SQLITE_SOURCE_ID macro evaluates to +// a string which identifies a particular check-in of SQLite +// within its configuration management system. ^The SQLITE_SOURCE_ID +// string contains the date and time of the check-in (UTC) and a SHA1 +// or SHA3-256 hash of the entire source tree. If the source code has +// been edited in any way since it was last checked in, then the last +// four hexadecimal digits of the hash may be modified. +// +// See also: [sqlite3_libversion()], +// [sqlite3_libversion_number()], [sqlite3_sourceid()], +// [sqlite_version()] and [sqlite_source_id()]. + +// CAPI3REF: Run-Time Library Version Numbers +// KEYWORDS: sqlite3_version sqlite3_sourceid +// +// These interfaces provide the same information as the [SQLITE_VERSION], +// [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros +// but are associated with the library instead of the header file. ^(Cautious +// programmers might include assert() statements in their application to +// verify that values returned by these interfaces match the macros in +// the header, and thus ensure that the application is +// compiled with matching library and header files. +// +// +// assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); +// assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); +// assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); +// +// +// ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] +// macro. ^The sqlite3_libversion() function returns a pointer to the +// to the sqlite3_version[] string constant. The sqlite3_libversion() +// function is provided for use in DLLs since DLL users usually do not have +// direct access to string constants within the DLL. ^The +// sqlite3_libversion_number() function returns an integer equal to +// [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns +// a pointer to a string constant whose value is the same as the +// [SQLITE_SOURCE_ID] C preprocessor macro. Except if SQLite is built +// using an edited copy of [the amalgamation], then the last four characters +// of the hash might be different from [SQLITE_SOURCE_ID].)^ +// +// See also: [sqlite_version()] and [sqlite_source_id()]. +var Xsqlite3_version = *(*[7]uint8)(unsafe.Pointer(ts)) /* sqlite3.c:491:23 */ + +// CAPI3REF: Database Connection Handle +// KEYWORDS: {database connection} {database connections} +// +// Each open SQLite database is represented by a pointer to an instance of +// the opaque structure named "sqlite3". It is useful to think of an sqlite3 +// pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and +// [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] +// and [sqlite3_close_v2()] are its destructors. There are many other +// interfaces (such as +// [sqlite3_prepare_v2()], [sqlite3_create_function()], and +// [sqlite3_busy_timeout()] to name but three) that are methods on an +// sqlite3 object. +type sqlite3 = struct { + FpVfs uintptr + FpVdbe uintptr + FpDfltColl uintptr + Fmutex uintptr + FaDb uintptr + FnDb int32 + FmDbFlags U32 + Fflags U64 + FlastRowid I64 + FszMmap I64 + FnSchemaLock U32 + FopenFlags uint32 + FerrCode int32 + FerrByteOffset int32 + FerrMask int32 + FiSysErrno int32 + FdbOptFlags U32 + Fenc U8 + FautoCommit U8 + Ftemp_store U8 + FmallocFailed U8 + FbBenignMalloc U8 + FdfltLockMode U8 + FnextAutovac int8 + FsuppressErr U8 + FvtabOnConflict U8 + FisTransactionSavepoint U8 + FmTrace U8 + FnoSharedCache U8 + FnSqlExec U8 + FeOpenState U8 + F__ccgo_pad1 [2]byte + FnextPagesize int32 + FnChange I64 + FnTotalChange I64 + FaLimit [12]int32 + FnMaxSorterMmap int32 + F__ccgo_pad2 [4]byte + Finit struct { + FnewTnum Pgno + FiDb U8 + Fbusy U8 + F__ccgo_pad1 [2]byte + ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1 */ + F__ccgo_pad2 [7]byte + FazInit uintptr + } + FnVdbeActive int32 + FnVdbeRead int32 + FnVdbeWrite int32 + FnVdbeExec int32 + FnVDestroy int32 + FnExtension int32 + FaExtension uintptr + Ftrace struct{ FxLegacy uintptr } + FpTraceArg uintptr + FxProfile uintptr + FpProfileArg uintptr + FpCommitArg uintptr + FxCommitCallback uintptr + FpRollbackArg uintptr + FxRollbackCallback uintptr + FpUpdateArg uintptr + FxUpdateCallback uintptr + FpAutovacPagesArg uintptr + FxAutovacDestr uintptr + FxAutovacPages uintptr + FpParse uintptr + FpPreUpdateArg uintptr + FxPreUpdateCallback uintptr + FpPreUpdate uintptr + FxWalCallback uintptr + FpWalArg uintptr + FxCollNeeded uintptr + FxCollNeeded16 uintptr + FpCollNeededArg uintptr + FpErr uintptr + Fu1 struct { + F__ccgo_pad1 [0]uint64 + FisInterrupted int32 + F__ccgo_pad2 [4]byte + } + Flookaside Lookaside + FxAuth Sqlite3_xauth + FpAuthArg uintptr + FxProgress uintptr + FpProgressArg uintptr + FnProgressOps uint32 + FnVTrans int32 + FaModule Hash + FpVtabCtx uintptr + FaVTrans uintptr + FpDisconnect uintptr + FaFunc Hash + FaCollSeq Hash + FbusyHandler BusyHandler + FaDbStatic [2]Db + FpSavepoint uintptr + FnAnalysisLimit int32 + FbusyTimeout int32 + FnSavepoint int32 + FnStatement int32 + FnDeferredCons I64 + FnDeferredImmCons I64 + FpnBytesFreed uintptr + FpBlockingConnection uintptr + FpUnlockConnection uintptr + FpUnlockArg uintptr + FxUnlockNotify uintptr + FpNextBlocked uintptr +} /* sqlite3.c:578:9 */ + +// CAPI3REF: Database Connection Handle +// KEYWORDS: {database connection} {database connections} +// +// Each open SQLite database is represented by a pointer to an instance of +// the opaque structure named "sqlite3". It is useful to think of an sqlite3 +// pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and +// [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] +// and [sqlite3_close_v2()] are its destructors. There are many other +// interfaces (such as +// [sqlite3_prepare_v2()], [sqlite3_create_function()], and +// [sqlite3_busy_timeout()] to name but three) that are methods on an +// sqlite3 object. +type Sqlite3 = sqlite3 /* sqlite3.c:578:24 */ + +// CAPI3REF: 64-Bit Integer Types +// KEYWORDS: sqlite_int64 sqlite_uint64 +// +// Because there is no cross-platform way to specify 64-bit integer types +// SQLite includes typedefs for 64-bit signed and unsigned integers. +// +// The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions. +// The sqlite_int64 and sqlite_uint64 types are supported for backwards +// compatibility only. +// +// ^The sqlite3_int64 and sqlite_int64 types can store integer values +// between -9223372036854775808 and +9223372036854775807 inclusive. ^The +// sqlite3_uint64 and sqlite_uint64 types can store integer values +// between 0 and +18446744073709551615 inclusive. +type Sqlite_int64 = int64 /* sqlite3.c:607:25 */ +type Sqlite_uint64 = uint64 /* sqlite3.c:608:34 */ +type Sqlite3_int64 = Sqlite_int64 /* sqlite3.c:610:22 */ +type Sqlite3_uint64 = Sqlite_uint64 /* sqlite3.c:611:23 */ + +// The type for a callback function. +// This is legacy and deprecated. It is included for historical +// compatibility and is not documented. +type Sqlite3_callback = uintptr /* sqlite3.c:667:13 */ + +// CAPI3REF: Result Codes +// KEYWORDS: {result code definitions} +// +// Many SQLite functions return an integer result code from the set shown +// here in order to indicate success or failure. +// +// New error codes may be added in future versions of SQLite. +// +// See also: [extended result code definitions] +// beginning-of-error-codes +// end-of-error-codes + +// CAPI3REF: Extended Result Codes +// KEYWORDS: {extended result code definitions} +// +// In its default configuration, SQLite API routines return one of 30 integer +// [result codes]. However, experience has shown that many of +// these result codes are too coarse-grained. They do not provide as +// much information about problems as programmers might like. In an effort to +// address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8] +// and later) include +// support for additional result codes that provide more detailed information +// about errors. These [extended result codes] are enabled or disabled +// on a per database connection basis using the +// [sqlite3_extended_result_codes()] API. Or, the extended code for +// the most recent error can be obtained using +// [sqlite3_extended_errcode()]. + +// CAPI3REF: Flags For File Open Operations +// +// These bit values are intended for use in the +// 3rd parameter to the [sqlite3_open_v2()] interface and +// in the 4th parameter to the [sqlite3_vfs.xOpen] method. +// +// Only those flags marked as "Ok for sqlite3_open_v2()" may be +// used as the third argument to the [sqlite3_open_v2()] interface. +// The other flags have historically been ignored by sqlite3_open_v2(), +// though future versions of SQLite might change so that an error is +// raised if any of the disallowed bits are passed into sqlite3_open_v2(). +// Applications should not depend on the historical behavior. +// +// Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into +// [sqlite3_open_v2()] does *not* cause the underlying database file +// to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into +// [sqlite3_open_v2()] has historically be a no-op and might become an +// error in future versions of SQLite. + +// Reserved: 0x00F00000 +// Legacy compatibility: + +// CAPI3REF: Device Characteristics +// +// The xDeviceCharacteristics method of the [sqlite3_io_methods] +// object returns an integer which is a vector of these +// bit values expressing I/O characteristics of the mass storage +// device that holds the file that the [sqlite3_io_methods] +// refers to. +// +// The SQLITE_IOCAP_ATOMIC property means that all writes of +// any size are atomic. The SQLITE_IOCAP_ATOMICnnn values +// mean that writes of blocks that are nnn bytes in size and +// are aligned to an address which is an integer multiple of +// nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means +// that when data is appended to a file, the data is appended +// first then the size of the file is extended, never the other +// way around. The SQLITE_IOCAP_SEQUENTIAL property means that +// information is written to disk in the same order as calls +// to xWrite(). The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that +// after reboot following a crash or power loss, the only bytes in a +// file that were written at the application level might have changed +// and that adjacent bytes, even bytes within the same sector are +// guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN +// flag indicates that a file cannot be deleted when open. The +// SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on +// read-only media and cannot be changed even by processes with +// elevated privileges. +// +// The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying +// filesystem supports doing multiple write operations atomically when those +// write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and +// [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. + +// CAPI3REF: File Locking Levels +// +// SQLite uses one of these integer values as the second +// argument to calls it makes to the xLock() and xUnlock() methods +// of an [sqlite3_io_methods] object. + +// CAPI3REF: Synchronization Type Flags +// +// When SQLite invokes the xSync() method of an +// [sqlite3_io_methods] object it uses a combination of +// these integer values as the second argument. +// +// When the SQLITE_SYNC_DATAONLY flag is used, it means that the +// sync operation only needs to flush data to mass storage. Inode +// information need not be flushed. If the lower four bits of the flag +// equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. +// If the lower four bits equal SQLITE_SYNC_FULL, that means +// to use Mac OS X style fullsync instead of fsync(). +// +// Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags +// with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL +// settings. The [synchronous pragma] determines when calls to the +// xSync VFS method occur and applies uniformly across all platforms. +// The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how +// energetic or rigorous or forceful the sync operations are and +// only make a difference on Mac OSX for the default SQLite code. +// (Third-party VFS implementations might also make the distinction +// between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the +// operating systems natively supported by SQLite, only Mac OSX +// cares about the difference.) + +// CAPI3REF: OS Interface Open File Handle +// +// An [sqlite3_file] object represents an open file in the +// [sqlite3_vfs | OS interface layer]. Individual OS interface +// implementations will +// want to subclass this object by appending additional fields +// for their own use. The pMethods entry is a pointer to an +// [sqlite3_io_methods] object that defines methods for performing +// I/O operations on the open file. +type sqlite3_file = struct{ FpMethods uintptr } /* sqlite3.c:578:9 */ + +// CAPI3REF: Result Codes +// KEYWORDS: {result code definitions} +// +// Many SQLite functions return an integer result code from the set shown +// here in order to indicate success or failure. +// +// New error codes may be added in future versions of SQLite. +// +// See also: [extended result code definitions] +// beginning-of-error-codes +// end-of-error-codes + +// CAPI3REF: Extended Result Codes +// KEYWORDS: {extended result code definitions} +// +// In its default configuration, SQLite API routines return one of 30 integer +// [result codes]. However, experience has shown that many of +// these result codes are too coarse-grained. They do not provide as +// much information about problems as programmers might like. In an effort to +// address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8] +// and later) include +// support for additional result codes that provide more detailed information +// about errors. These [extended result codes] are enabled or disabled +// on a per database connection basis using the +// [sqlite3_extended_result_codes()] API. Or, the extended code for +// the most recent error can be obtained using +// [sqlite3_extended_errcode()]. + +// CAPI3REF: Flags For File Open Operations +// +// These bit values are intended for use in the +// 3rd parameter to the [sqlite3_open_v2()] interface and +// in the 4th parameter to the [sqlite3_vfs.xOpen] method. +// +// Only those flags marked as "Ok for sqlite3_open_v2()" may be +// used as the third argument to the [sqlite3_open_v2()] interface. +// The other flags have historically been ignored by sqlite3_open_v2(), +// though future versions of SQLite might change so that an error is +// raised if any of the disallowed bits are passed into sqlite3_open_v2(). +// Applications should not depend on the historical behavior. +// +// Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into +// [sqlite3_open_v2()] does *not* cause the underlying database file +// to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into +// [sqlite3_open_v2()] has historically be a no-op and might become an +// error in future versions of SQLite. + +// Reserved: 0x00F00000 +// Legacy compatibility: + +// CAPI3REF: Device Characteristics +// +// The xDeviceCharacteristics method of the [sqlite3_io_methods] +// object returns an integer which is a vector of these +// bit values expressing I/O characteristics of the mass storage +// device that holds the file that the [sqlite3_io_methods] +// refers to. +// +// The SQLITE_IOCAP_ATOMIC property means that all writes of +// any size are atomic. The SQLITE_IOCAP_ATOMICnnn values +// mean that writes of blocks that are nnn bytes in size and +// are aligned to an address which is an integer multiple of +// nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means +// that when data is appended to a file, the data is appended +// first then the size of the file is extended, never the other +// way around. The SQLITE_IOCAP_SEQUENTIAL property means that +// information is written to disk in the same order as calls +// to xWrite(). The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that +// after reboot following a crash or power loss, the only bytes in a +// file that were written at the application level might have changed +// and that adjacent bytes, even bytes within the same sector are +// guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN +// flag indicates that a file cannot be deleted when open. The +// SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on +// read-only media and cannot be changed even by processes with +// elevated privileges. +// +// The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying +// filesystem supports doing multiple write operations atomically when those +// write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and +// [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. + +// CAPI3REF: File Locking Levels +// +// SQLite uses one of these integer values as the second +// argument to calls it makes to the xLock() and xUnlock() methods +// of an [sqlite3_io_methods] object. + +// CAPI3REF: Synchronization Type Flags +// +// When SQLite invokes the xSync() method of an +// [sqlite3_io_methods] object it uses a combination of +// these integer values as the second argument. +// +// When the SQLITE_SYNC_DATAONLY flag is used, it means that the +// sync operation only needs to flush data to mass storage. Inode +// information need not be flushed. If the lower four bits of the flag +// equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. +// If the lower four bits equal SQLITE_SYNC_FULL, that means +// to use Mac OS X style fullsync instead of fsync(). +// +// Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags +// with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL +// settings. The [synchronous pragma] determines when calls to the +// xSync VFS method occur and applies uniformly across all platforms. +// The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how +// energetic or rigorous or forceful the sync operations are and +// only make a difference on Mac OSX for the default SQLite code. +// (Third-party VFS implementations might also make the distinction +// between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the +// operating systems natively supported by SQLite, only Mac OSX +// cares about the difference.) + +// CAPI3REF: OS Interface Open File Handle +// +// An [sqlite3_file] object represents an open file in the +// [sqlite3_vfs | OS interface layer]. Individual OS interface +// implementations will +// want to subclass this object by appending additional fields +// for their own use. The pMethods entry is a pointer to an +// [sqlite3_io_methods] object that defines methods for performing +// I/O operations on the open file. +type Sqlite3_file = sqlite3_file /* sqlite3.c:1028:29 */ +type sqlite3_io_methods = struct { + FiVersion int32 + F__ccgo_pad1 [4]byte + FxClose uintptr + FxRead uintptr + FxWrite uintptr + FxTruncate uintptr + FxSync uintptr + FxFileSize uintptr + FxLock uintptr + FxUnlock uintptr + FxCheckReservedLock uintptr + FxFileControl uintptr + FxSectorSize uintptr + FxDeviceCharacteristics uintptr + FxShmMap uintptr + FxShmLock uintptr + FxShmBarrier uintptr + FxShmUnmap uintptr + FxFetch uintptr + FxUnfetch uintptr +} /* sqlite3.c:578:9 */ + +// CAPI3REF: OS Interface File Virtual Methods Object +// +// Every file opened by the [sqlite3_vfs.xOpen] method populates an +// [sqlite3_file] object (or, more commonly, a subclass of the +// [sqlite3_file] object) with a pointer to an instance of this object. +// This object defines the methods used to perform various operations +// against the open file represented by the [sqlite3_file] object. +// +// If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element +// to a non-NULL pointer, then the sqlite3_io_methods.xClose method +// may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed. The +// only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen] +// is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element +// to NULL. +// +// The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or +// [SQLITE_SYNC_FULL]. The first choice is the normal fsync(). +// The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY] +// flag may be ORed in to indicate that only the data of the file +// and not its inode needs to be synced. +// +// The integer values to xLock() and xUnlock() are one of +//
      +//
    • [SQLITE_LOCK_NONE], +//
    • [SQLITE_LOCK_SHARED], +//
    • [SQLITE_LOCK_RESERVED], +//
    • [SQLITE_LOCK_PENDING], or +//
    • [SQLITE_LOCK_EXCLUSIVE]. +//
    +// xLock() increases the lock. xUnlock() decreases the lock. +// The xCheckReservedLock() method checks whether any database connection, +// either in this process or in some other process, is holding a RESERVED, +// PENDING, or EXCLUSIVE lock on the file. It returns true +// if such a lock exists and false otherwise. +// +// The xFileControl() method is a generic interface that allows custom +// VFS implementations to directly control an open file using the +// [sqlite3_file_control()] interface. The second "op" argument is an +// integer opcode. The third argument is a generic pointer intended to +// point to a structure that may contain arguments or space in which to +// write return values. Potential uses for xFileControl() might be +// functions to enable blocking locks with timeouts, to change the +// locking strategy (for example to use dot-file locks), to inquire +// about the status of a lock, or to break stale locks. The SQLite +// core reserves all opcodes less than 100 for its own use. +// A [file control opcodes | list of opcodes] less than 100 is available. +// Applications that define a custom xFileControl method should use opcodes +// greater than 100 to avoid conflicts. VFS implementations should +// return [SQLITE_NOTFOUND] for file control opcodes that they do not +// recognize. +// +// The xSectorSize() method returns the sector size of the +// device that underlies the file. The sector size is the +// minimum write that can be performed without disturbing +// other bytes in the file. The xDeviceCharacteristics() +// method returns a bit vector describing behaviors of the +// underlying device: +// +//
      +//
    • [SQLITE_IOCAP_ATOMIC] +//
    • [SQLITE_IOCAP_ATOMIC512] +//
    • [SQLITE_IOCAP_ATOMIC1K] +//
    • [SQLITE_IOCAP_ATOMIC2K] +//
    • [SQLITE_IOCAP_ATOMIC4K] +//
    • [SQLITE_IOCAP_ATOMIC8K] +//
    • [SQLITE_IOCAP_ATOMIC16K] +//
    • [SQLITE_IOCAP_ATOMIC32K] +//
    • [SQLITE_IOCAP_ATOMIC64K] +//
    • [SQLITE_IOCAP_SAFE_APPEND] +//
    • [SQLITE_IOCAP_SEQUENTIAL] +//
    • [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN] +//
    • [SQLITE_IOCAP_POWERSAFE_OVERWRITE] +//
    • [SQLITE_IOCAP_IMMUTABLE] +//
    • [SQLITE_IOCAP_BATCH_ATOMIC] +//
    +// +// The SQLITE_IOCAP_ATOMIC property means that all writes of +// any size are atomic. The SQLITE_IOCAP_ATOMICnnn values +// mean that writes of blocks that are nnn bytes in size and +// are aligned to an address which is an integer multiple of +// nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means +// that when data is appended to a file, the data is appended +// first then the size of the file is extended, never the other +// way around. The SQLITE_IOCAP_SEQUENTIAL property means that +// information is written to disk in the same order as calls +// to xWrite(). +// +// If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill +// in the unread portions of the buffer with zeros. A VFS that +// fails to zero-fill short reads might seem to work. However, +// failure to zero-fill short reads will eventually lead to +// database corruption. +type Sqlite3_io_methods = sqlite3_io_methods /* sqlite3.c:1127:35 */ + +// CAPI3REF: Loadable Extension Thunk +// +// A pointer to the opaque sqlite3_api_routines structure is passed as +// the third parameter to entry points of [loadable extensions]. This +// structure must be typedefed in order to work around compiler warnings +// on some platforms. +type sqlite3_api_routines = struct { + Faggregate_context uintptr + Faggregate_count uintptr + Fbind_blob uintptr + Fbind_double uintptr + Fbind_int uintptr + Fbind_int64 uintptr + Fbind_null uintptr + Fbind_parameter_count uintptr + Fbind_parameter_index uintptr + Fbind_parameter_name uintptr + Fbind_text uintptr + Fbind_text16 uintptr + Fbind_value uintptr + Fbusy_handler uintptr + Fbusy_timeout uintptr + Fchanges uintptr + Fclose uintptr + Fcollation_needed uintptr + Fcollation_needed16 uintptr + Fcolumn_blob uintptr + Fcolumn_bytes uintptr + Fcolumn_bytes16 uintptr + Fcolumn_count uintptr + Fcolumn_database_name uintptr + Fcolumn_database_name16 uintptr + Fcolumn_decltype uintptr + Fcolumn_decltype16 uintptr + Fcolumn_double uintptr + Fcolumn_int uintptr + Fcolumn_int64 uintptr + Fcolumn_name uintptr + Fcolumn_name16 uintptr + Fcolumn_origin_name uintptr + Fcolumn_origin_name16 uintptr + Fcolumn_table_name uintptr + Fcolumn_table_name16 uintptr + Fcolumn_text uintptr + Fcolumn_text16 uintptr + Fcolumn_type uintptr + Fcolumn_value uintptr + Fcommit_hook uintptr + Fcomplete uintptr + Fcomplete16 uintptr + Fcreate_collation uintptr + Fcreate_collation16 uintptr + Fcreate_function uintptr + Fcreate_function16 uintptr + Fcreate_module uintptr + Fdata_count uintptr + Fdb_handle uintptr + Fdeclare_vtab uintptr + Fenable_shared_cache uintptr + Ferrcode uintptr + Ferrmsg uintptr + Ferrmsg16 uintptr + Fexec uintptr + Fexpired uintptr + Ffinalize uintptr + Ffree uintptr + Ffree_table uintptr + Fget_autocommit uintptr + Fget_auxdata uintptr + Fget_table uintptr + Fglobal_recover uintptr + Finterruptx uintptr + Flast_insert_rowid uintptr + Flibversion uintptr + Flibversion_number uintptr + Fmalloc uintptr + Fmprintf uintptr + Fopen uintptr + Fopen16 uintptr + Fprepare uintptr + Fprepare16 uintptr + Fprofile uintptr + Fprogress_handler uintptr + Frealloc uintptr + Freset uintptr + Fresult_blob uintptr + Fresult_double uintptr + Fresult_error uintptr + Fresult_error16 uintptr + Fresult_int uintptr + Fresult_int64 uintptr + Fresult_null uintptr + Fresult_text uintptr + Fresult_text16 uintptr + Fresult_text16be uintptr + Fresult_text16le uintptr + Fresult_value uintptr + Frollback_hook uintptr + Fset_authorizer uintptr + Fset_auxdata uintptr + Fxsnprintf uintptr + Fstep uintptr + Ftable_column_metadata uintptr + Fthread_cleanup uintptr + Ftotal_changes uintptr + Ftrace uintptr + Ftransfer_bindings uintptr + Fupdate_hook uintptr + Fuser_data uintptr + Fvalue_blob uintptr + Fvalue_bytes uintptr + Fvalue_bytes16 uintptr + Fvalue_double uintptr + Fvalue_int uintptr + Fvalue_int64 uintptr + Fvalue_numeric_type uintptr + Fvalue_text uintptr + Fvalue_text16 uintptr + Fvalue_text16be uintptr + Fvalue_text16le uintptr + Fvalue_type uintptr + Fvmprintf uintptr + Foverload_function uintptr + Fprepare_v2 uintptr + Fprepare16_v2 uintptr + Fclear_bindings uintptr + Fcreate_module_v2 uintptr + Fbind_zeroblob uintptr + Fblob_bytes uintptr + Fblob_close uintptr + Fblob_open uintptr + Fblob_read uintptr + Fblob_write uintptr + Fcreate_collation_v2 uintptr + Ffile_control uintptr + Fmemory_highwater uintptr + Fmemory_used uintptr + Fmutex_alloc uintptr + Fmutex_enter uintptr + Fmutex_free uintptr + Fmutex_leave uintptr + Fmutex_try uintptr + Fopen_v2 uintptr + Frelease_memory uintptr + Fresult_error_nomem uintptr + Fresult_error_toobig uintptr + Fsleep uintptr + Fsoft_heap_limit uintptr + Fvfs_find uintptr + Fvfs_register uintptr + Fvfs_unregister uintptr + Fxthreadsafe uintptr + Fresult_zeroblob uintptr + Fresult_error_code uintptr + Ftest_control uintptr + Frandomness uintptr + Fcontext_db_handle uintptr + Fextended_result_codes uintptr + Flimit uintptr + Fnext_stmt uintptr + Fsql uintptr + Fstatus uintptr + Fbackup_finish uintptr + Fbackup_init uintptr + Fbackup_pagecount uintptr + Fbackup_remaining uintptr + Fbackup_step uintptr + Fcompileoption_get uintptr + Fcompileoption_used uintptr + Fcreate_function_v2 uintptr + Fdb_config uintptr + Fdb_mutex uintptr + Fdb_status uintptr + Fextended_errcode uintptr + Flog uintptr + Fsoft_heap_limit64 uintptr + Fsourceid uintptr + Fstmt_status uintptr + Fstrnicmp uintptr + Funlock_notify uintptr + Fwal_autocheckpoint uintptr + Fwal_checkpoint uintptr + Fwal_hook uintptr + Fblob_reopen uintptr + Fvtab_config uintptr + Fvtab_on_conflict uintptr + Fclose_v2 uintptr + Fdb_filename uintptr + Fdb_readonly uintptr + Fdb_release_memory uintptr + Ferrstr uintptr + Fstmt_busy uintptr + Fstmt_readonly uintptr + Fstricmp uintptr + Furi_boolean uintptr + Furi_int64 uintptr + Furi_parameter uintptr + Fxvsnprintf uintptr + Fwal_checkpoint_v2 uintptr + Fauto_extension uintptr + Fbind_blob64 uintptr + Fbind_text64 uintptr + Fcancel_auto_extension uintptr + Fload_extension uintptr + Fmalloc64 uintptr + Fmsize uintptr + Frealloc64 uintptr + Freset_auto_extension uintptr + Fresult_blob64 uintptr + Fresult_text64 uintptr + Fstrglob uintptr + Fvalue_dup uintptr + Fvalue_free uintptr + Fresult_zeroblob64 uintptr + Fbind_zeroblob64 uintptr + Fvalue_subtype uintptr + Fresult_subtype uintptr + Fstatus64 uintptr + Fstrlike uintptr + Fdb_cacheflush uintptr + Fsystem_errno uintptr + Ftrace_v2 uintptr + Fexpanded_sql uintptr + Fset_last_insert_rowid uintptr + Fprepare_v3 uintptr + Fprepare16_v3 uintptr + Fbind_pointer uintptr + Fresult_pointer uintptr + Fvalue_pointer uintptr + Fvtab_nochange uintptr + Fvalue_nochange uintptr + Fvtab_collation uintptr + Fkeyword_count uintptr + Fkeyword_name uintptr + Fkeyword_check uintptr + Fstr_new uintptr + Fstr_finish uintptr + Fstr_appendf uintptr + Fstr_vappendf uintptr + Fstr_append uintptr + Fstr_appendall uintptr + Fstr_appendchar uintptr + Fstr_reset uintptr + Fstr_errcode uintptr + Fstr_length uintptr + Fstr_value uintptr + Fcreate_window_function uintptr + Fnormalized_sql uintptr + Fstmt_isexplain uintptr + Fvalue_frombind uintptr + Fdrop_modules uintptr + Fhard_heap_limit64 uintptr + Furi_key uintptr + Ffilename_database uintptr + Ffilename_journal uintptr + Ffilename_wal uintptr + Fcreate_filename uintptr + Ffree_filename uintptr + Fdatabase_file_object uintptr + Ftxn_state uintptr + Fchanges64 uintptr + Ftotal_changes64 uintptr + Fautovacuum_pages uintptr + Ferror_offset uintptr + Fvtab_rhs_value uintptr + Fvtab_distinct uintptr + Fvtab_in uintptr + Fvtab_in_first uintptr + Fvtab_in_next uintptr +} /* sqlite3.c:1560:9 */ + +// CAPI3REF: Loadable Extension Thunk +// +// A pointer to the opaque sqlite3_api_routines structure is passed as +// the third parameter to entry points of [loadable extensions]. This +// structure must be typedefed in order to work around compiler warnings +// on some platforms. +type Sqlite3_api_routines = sqlite3_api_routines /* sqlite3.c:1560:37 */ + +// CAPI3REF: OS Interface Object +// +// An instance of the sqlite3_vfs object defines the interface between +// the SQLite core and the underlying operating system. The "vfs" +// in the name of the object stands for "virtual file system". See +// the [VFS | VFS documentation] for further information. +// +// The VFS interface is sometimes extended by adding new methods onto +// the end. Each time such an extension occurs, the iVersion field +// is incremented. The iVersion value started out as 1 in +// SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2 +// with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased +// to 3 with SQLite [version 3.7.6] on [dateof:3.7.6]. Additional fields +// may be appended to the sqlite3_vfs object and the iVersion value +// may increase again in future versions of SQLite. +// Note that due to an oversight, the structure +// of the sqlite3_vfs object changed in the transition from +// SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0] +// and yet the iVersion field was not increased. +// +// The szOsFile field is the size of the subclassed [sqlite3_file] +// structure used by this VFS. mxPathname is the maximum length of +// a pathname in this VFS. +// +// Registered sqlite3_vfs objects are kept on a linked list formed by +// the pNext pointer. The [sqlite3_vfs_register()] +// and [sqlite3_vfs_unregister()] interfaces manage this list +// in a thread-safe way. The [sqlite3_vfs_find()] interface +// searches the list. Neither the application code nor the VFS +// implementation should use the pNext pointer. +// +// The pNext field is the only field in the sqlite3_vfs +// structure that SQLite will ever modify. SQLite will only access +// or modify this field while holding a particular static mutex. +// The application should never modify anything within the sqlite3_vfs +// object once the object has been registered. +// +// The zName field holds the name of the VFS module. The name must +// be unique across all VFS modules. +// +// [[sqlite3_vfs.xOpen]] +// ^SQLite guarantees that the zFilename parameter to xOpen +// is either a NULL pointer or string obtained +// from xFullPathname() with an optional suffix added. +// ^If a suffix is added to the zFilename parameter, it will +// consist of a single "-" character followed by no more than +// 11 alphanumeric and/or "-" characters. +// ^SQLite further guarantees that +// the string will be valid and unchanged until xClose() is +// called. Because of the previous sentence, +// the [sqlite3_file] can safely store a pointer to the +// filename if it needs to remember the filename for some reason. +// If the zFilename parameter to xOpen is a NULL pointer then xOpen +// must invent its own temporary name for the file. ^Whenever the +// xFilename parameter is NULL it will also be the case that the +// flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. +// +// The flags argument to xOpen() includes all bits set in +// the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] +// or [sqlite3_open16()] is used, then flags includes at least +// [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. +// If xOpen() opens a file read-only then it sets *pOutFlags to +// include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. +// +// ^(SQLite will also add one of the following flags to the xOpen() +// call, depending on the object being opened: +// +//
      +//
    • [SQLITE_OPEN_MAIN_DB] +//
    • [SQLITE_OPEN_MAIN_JOURNAL] +//
    • [SQLITE_OPEN_TEMP_DB] +//
    • [SQLITE_OPEN_TEMP_JOURNAL] +//
    • [SQLITE_OPEN_TRANSIENT_DB] +//
    • [SQLITE_OPEN_SUBJOURNAL] +//
    • [SQLITE_OPEN_SUPER_JOURNAL] +//
    • [SQLITE_OPEN_WAL] +//
    )^ +// +// The file I/O implementation can use the object type flags to +// change the way it deals with files. For example, an application +// that does not care about crash recovery or rollback might make +// the open of a journal file a no-op. Writes to this journal would +// also be no-ops, and any attempt to read the journal would return +// SQLITE_IOERR. Or the implementation might recognize that a database +// file will be doing page-aligned sector reads and writes in a random +// order and set up its I/O subsystem accordingly. +// +// SQLite might also add one of the following flags to the xOpen method: +// +//
      +//
    • [SQLITE_OPEN_DELETEONCLOSE] +//
    • [SQLITE_OPEN_EXCLUSIVE] +//
    +// +// The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be +// deleted when it is closed. ^The [SQLITE_OPEN_DELETEONCLOSE] +// will be set for TEMP databases and their journals, transient +// databases, and subjournals. +// +// ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction +// with the [SQLITE_OPEN_CREATE] flag, which are both directly +// analogous to the O_EXCL and O_CREAT flags of the POSIX open() +// API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the +// SQLITE_OPEN_CREATE, is used to indicate that file should always +// be created, and that it is an error if it already exists. +// It is not used to indicate the file should be opened +// for exclusive access. +// +// ^At least szOsFile bytes of memory are allocated by SQLite +// to hold the [sqlite3_file] structure passed as the third +// argument to xOpen. The xOpen method does not have to +// allocate the structure; it should just fill it in. Note that +// the xOpen method must set the sqlite3_file.pMethods to either +// a valid [sqlite3_io_methods] object or to NULL. xOpen must do +// this even if the open fails. SQLite expects that the sqlite3_file.pMethods +// element will be valid after xOpen returns regardless of the success +// or failure of the xOpen call. +// +// [[sqlite3_vfs.xAccess]] +// ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] +// to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to +// test whether a file is readable and writable, or [SQLITE_ACCESS_READ] +// to test whether a file is at least readable. The SQLITE_ACCESS_READ +// flag is never actually used and is not implemented in the built-in +// VFSes of SQLite. The file is named by the second argument and can be a +// directory. The xAccess method returns [SQLITE_OK] on success or some +// non-zero error code if there is an I/O error or if the name of +// the file given in the second argument is illegal. If SQLITE_OK +// is returned, then non-zero or zero is written into *pResOut to indicate +// whether or not the file is accessible. +// +// ^SQLite will always allocate at least mxPathname+1 bytes for the +// output buffer xFullPathname. The exact size of the output buffer +// is also passed as a parameter to both methods. If the output buffer +// is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is +// handled as a fatal error by SQLite, vfs implementations should endeavor +// to prevent this by setting mxPathname to a sufficiently large value. +// +// The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() +// interfaces are not strictly a part of the filesystem, but they are +// included in the VFS structure for completeness. +// The xRandomness() function attempts to return nBytes bytes +// of good-quality randomness into zOut. The return value is +// the actual number of bytes of randomness obtained. +// The xSleep() method causes the calling thread to sleep for at +// least the number of microseconds given. ^The xCurrentTime() +// method returns a Julian Day Number for the current date and time as +// a floating point value. +// ^The xCurrentTimeInt64() method returns, as an integer, the Julian +// Day Number multiplied by 86400000 (the number of milliseconds in +// a 24-hour day). +// ^SQLite will use the xCurrentTimeInt64() method to get the current +// date and time if that method is available (if iVersion is 2 or +// greater and the function pointer is not NULL) and will fall back +// to xCurrentTime() if xCurrentTimeInt64() is unavailable. +// +// ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces +// are not used by the SQLite core. These optional interfaces are provided +// by some VFSes to facilitate testing of the VFS code. By overriding +// system calls with functions under its control, a test program can +// simulate faults and error conditions that would otherwise be difficult +// or impossible to induce. The set of system calls that can be overridden +// varies from one VFS to another, and from one version of the same VFS to the +// next. Applications that use these interfaces must be prepared for any +// or all of these interfaces to be NULL or for their behavior to change +// from one release to the next. Applications must not attempt to access +// any of these methods if the iVersion of the VFS is less than 3. +type sqlite3_vfs = struct { + FiVersion int32 + FszOsFile int32 + FmxPathname int32 + F__ccgo_pad1 [4]byte + FpNext uintptr + FzName uintptr + FpAppData uintptr + FxOpen uintptr + FxDelete uintptr + FxAccess uintptr + FxFullPathname uintptr + FxDlOpen uintptr + FxDlError uintptr + FxDlSym uintptr + FxDlClose uintptr + FxRandomness uintptr + FxSleep uintptr + FxCurrentTime uintptr + FxGetLastError uintptr + FxCurrentTimeInt64 uintptr + FxSetSystemCall uintptr + FxGetSystemCall uintptr + FxNextSystemCall uintptr +} /* sqlite3.c:578:9 */ + +// CAPI3REF: OS Interface Object +// +// An instance of the sqlite3_vfs object defines the interface between +// the SQLite core and the underlying operating system. The "vfs" +// in the name of the object stands for "virtual file system". See +// the [VFS | VFS documentation] for further information. +// +// The VFS interface is sometimes extended by adding new methods onto +// the end. Each time such an extension occurs, the iVersion field +// is incremented. The iVersion value started out as 1 in +// SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2 +// with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased +// to 3 with SQLite [version 3.7.6] on [dateof:3.7.6]. Additional fields +// may be appended to the sqlite3_vfs object and the iVersion value +// may increase again in future versions of SQLite. +// Note that due to an oversight, the structure +// of the sqlite3_vfs object changed in the transition from +// SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0] +// and yet the iVersion field was not increased. +// +// The szOsFile field is the size of the subclassed [sqlite3_file] +// structure used by this VFS. mxPathname is the maximum length of +// a pathname in this VFS. +// +// Registered sqlite3_vfs objects are kept on a linked list formed by +// the pNext pointer. The [sqlite3_vfs_register()] +// and [sqlite3_vfs_unregister()] interfaces manage this list +// in a thread-safe way. The [sqlite3_vfs_find()] interface +// searches the list. Neither the application code nor the VFS +// implementation should use the pNext pointer. +// +// The pNext field is the only field in the sqlite3_vfs +// structure that SQLite will ever modify. SQLite will only access +// or modify this field while holding a particular static mutex. +// The application should never modify anything within the sqlite3_vfs +// object once the object has been registered. +// +// The zName field holds the name of the VFS module. The name must +// be unique across all VFS modules. +// +// [[sqlite3_vfs.xOpen]] +// ^SQLite guarantees that the zFilename parameter to xOpen +// is either a NULL pointer or string obtained +// from xFullPathname() with an optional suffix added. +// ^If a suffix is added to the zFilename parameter, it will +// consist of a single "-" character followed by no more than +// 11 alphanumeric and/or "-" characters. +// ^SQLite further guarantees that +// the string will be valid and unchanged until xClose() is +// called. Because of the previous sentence, +// the [sqlite3_file] can safely store a pointer to the +// filename if it needs to remember the filename for some reason. +// If the zFilename parameter to xOpen is a NULL pointer then xOpen +// must invent its own temporary name for the file. ^Whenever the +// xFilename parameter is NULL it will also be the case that the +// flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. +// +// The flags argument to xOpen() includes all bits set in +// the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] +// or [sqlite3_open16()] is used, then flags includes at least +// [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. +// If xOpen() opens a file read-only then it sets *pOutFlags to +// include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. +// +// ^(SQLite will also add one of the following flags to the xOpen() +// call, depending on the object being opened: +// +//
      +//
    • [SQLITE_OPEN_MAIN_DB] +//
    • [SQLITE_OPEN_MAIN_JOURNAL] +//
    • [SQLITE_OPEN_TEMP_DB] +//
    • [SQLITE_OPEN_TEMP_JOURNAL] +//
    • [SQLITE_OPEN_TRANSIENT_DB] +//
    • [SQLITE_OPEN_SUBJOURNAL] +//
    • [SQLITE_OPEN_SUPER_JOURNAL] +//
    • [SQLITE_OPEN_WAL] +//
    )^ +// +// The file I/O implementation can use the object type flags to +// change the way it deals with files. For example, an application +// that does not care about crash recovery or rollback might make +// the open of a journal file a no-op. Writes to this journal would +// also be no-ops, and any attempt to read the journal would return +// SQLITE_IOERR. Or the implementation might recognize that a database +// file will be doing page-aligned sector reads and writes in a random +// order and set up its I/O subsystem accordingly. +// +// SQLite might also add one of the following flags to the xOpen method: +// +//
      +//
    • [SQLITE_OPEN_DELETEONCLOSE] +//
    • [SQLITE_OPEN_EXCLUSIVE] +//
    +// +// The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be +// deleted when it is closed. ^The [SQLITE_OPEN_DELETEONCLOSE] +// will be set for TEMP databases and their journals, transient +// databases, and subjournals. +// +// ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction +// with the [SQLITE_OPEN_CREATE] flag, which are both directly +// analogous to the O_EXCL and O_CREAT flags of the POSIX open() +// API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the +// SQLITE_OPEN_CREATE, is used to indicate that file should always +// be created, and that it is an error if it already exists. +// It is not used to indicate the file should be opened +// for exclusive access. +// +// ^At least szOsFile bytes of memory are allocated by SQLite +// to hold the [sqlite3_file] structure passed as the third +// argument to xOpen. The xOpen method does not have to +// allocate the structure; it should just fill it in. Note that +// the xOpen method must set the sqlite3_file.pMethods to either +// a valid [sqlite3_io_methods] object or to NULL. xOpen must do +// this even if the open fails. SQLite expects that the sqlite3_file.pMethods +// element will be valid after xOpen returns regardless of the success +// or failure of the xOpen call. +// +// [[sqlite3_vfs.xAccess]] +// ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] +// to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to +// test whether a file is readable and writable, or [SQLITE_ACCESS_READ] +// to test whether a file is at least readable. The SQLITE_ACCESS_READ +// flag is never actually used and is not implemented in the built-in +// VFSes of SQLite. The file is named by the second argument and can be a +// directory. The xAccess method returns [SQLITE_OK] on success or some +// non-zero error code if there is an I/O error or if the name of +// the file given in the second argument is illegal. If SQLITE_OK +// is returned, then non-zero or zero is written into *pResOut to indicate +// whether or not the file is accessible. +// +// ^SQLite will always allocate at least mxPathname+1 bytes for the +// output buffer xFullPathname. The exact size of the output buffer +// is also passed as a parameter to both methods. If the output buffer +// is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is +// handled as a fatal error by SQLite, vfs implementations should endeavor +// to prevent this by setting mxPathname to a sufficiently large value. +// +// The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() +// interfaces are not strictly a part of the filesystem, but they are +// included in the VFS structure for completeness. +// The xRandomness() function attempts to return nBytes bytes +// of good-quality randomness into zOut. The return value is +// the actual number of bytes of randomness obtained. +// The xSleep() method causes the calling thread to sleep for at +// least the number of microseconds given. ^The xCurrentTime() +// method returns a Julian Day Number for the current date and time as +// a floating point value. +// ^The xCurrentTimeInt64() method returns, as an integer, the Julian +// Day Number multiplied by 86400000 (the number of milliseconds in +// a 24-hour day). +// ^SQLite will use the xCurrentTimeInt64() method to get the current +// date and time if that method is available (if iVersion is 2 or +// greater and the function pointer is not NULL) and will fall back +// to xCurrentTime() if xCurrentTimeInt64() is unavailable. +// +// ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces +// are not used by the SQLite core. These optional interfaces are provided +// by some VFSes to facilitate testing of the VFS code. By overriding +// system calls with functions under its control, a test program can +// simulate faults and error conditions that would otherwise be difficult +// or impossible to induce. The set of system calls that can be overridden +// varies from one VFS to another, and from one version of the same VFS to the +// next. Applications that use these interfaces must be prepared for any +// or all of these interfaces to be NULL or for their behavior to change +// from one release to the next. Applications must not attempt to access +// any of these methods if the iVersion of the VFS is less than 3. +type Sqlite3_vfs = sqlite3_vfs /* sqlite3.c:1731:28 */ +type Sqlite3_syscall_ptr = uintptr /* sqlite3.c:1732:14 */ + +// CAPI3REF: Memory Allocation Routines +// +// An instance of this object defines the interface between SQLite +// and low-level memory allocation routines. +// +// This object is used in only one place in the SQLite interface. +// A pointer to an instance of this object is the argument to +// [sqlite3_config()] when the configuration option is +// [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. +// By creating an instance of this object +// and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) +// during configuration, an application can specify an alternative +// memory allocation subsystem for SQLite to use for all of its +// dynamic memory needs. +// +// Note that SQLite comes with several [built-in memory allocators] +// that are perfectly adequate for the overwhelming majority of applications +// and that this object is only useful to a tiny minority of applications +// with specialized memory allocation requirements. This object is +// also used during testing of SQLite in order to specify an alternative +// memory allocator that simulates memory out-of-memory conditions in +// order to verify that SQLite recovers gracefully from such +// conditions. +// +// The xMalloc, xRealloc, and xFree methods must work like the +// malloc(), realloc() and free() functions from the standard C library. +// ^SQLite guarantees that the second argument to +// xRealloc is always a value returned by a prior call to xRoundup. +// +// xSize should return the allocated size of a memory allocation +// previously obtained from xMalloc or xRealloc. The allocated size +// is always at least as big as the requested size but may be larger. +// +// The xRoundup method returns what would be the allocated size of +// a memory allocation given a particular requested size. Most memory +// allocators round up memory allocations at least to the next multiple +// of 8. Some allocators round up to a larger multiple or to a power of 2. +// Every memory allocation request coming in through [sqlite3_malloc()] +// or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, +// that causes the corresponding memory allocation to fail. +// +// The xInit method initializes the memory allocator. For example, +// it might allocate any required mutexes or initialize internal data +// structures. The xShutdown method is invoked (indirectly) by +// [sqlite3_shutdown()] and should deallocate any resources acquired +// by xInit. The pAppData pointer is used as the only parameter to +// xInit and xShutdown. +// +// SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes +// the xInit method, so the xInit method need not be threadsafe. The +// xShutdown method is only called from [sqlite3_shutdown()] so it does +// not need to be threadsafe either. For all other methods, SQLite +// holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the +// [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which +// it is by default) and so the methods are automatically serialized. +// However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other +// methods must be threadsafe or else make their own arrangements for +// serialization. +// +// SQLite will never invoke xInit() more than once without an intervening +// call to xShutdown(). +type sqlite3_mem_methods = struct { + FxMalloc uintptr + FxFree uintptr + FxRealloc uintptr + FxSize uintptr + FxRoundup uintptr + FxInit uintptr + FxShutdown uintptr + FpAppData uintptr +} /* sqlite3.c:2029:9 */ + +// CAPI3REF: Memory Allocation Routines +// +// An instance of this object defines the interface between SQLite +// and low-level memory allocation routines. +// +// This object is used in only one place in the SQLite interface. +// A pointer to an instance of this object is the argument to +// [sqlite3_config()] when the configuration option is +// [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. +// By creating an instance of this object +// and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) +// during configuration, an application can specify an alternative +// memory allocation subsystem for SQLite to use for all of its +// dynamic memory needs. +// +// Note that SQLite comes with several [built-in memory allocators] +// that are perfectly adequate for the overwhelming majority of applications +// and that this object is only useful to a tiny minority of applications +// with specialized memory allocation requirements. This object is +// also used during testing of SQLite in order to specify an alternative +// memory allocator that simulates memory out-of-memory conditions in +// order to verify that SQLite recovers gracefully from such +// conditions. +// +// The xMalloc, xRealloc, and xFree methods must work like the +// malloc(), realloc() and free() functions from the standard C library. +// ^SQLite guarantees that the second argument to +// xRealloc is always a value returned by a prior call to xRoundup. +// +// xSize should return the allocated size of a memory allocation +// previously obtained from xMalloc or xRealloc. The allocated size +// is always at least as big as the requested size but may be larger. +// +// The xRoundup method returns what would be the allocated size of +// a memory allocation given a particular requested size. Most memory +// allocators round up memory allocations at least to the next multiple +// of 8. Some allocators round up to a larger multiple or to a power of 2. +// Every memory allocation request coming in through [sqlite3_malloc()] +// or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, +// that causes the corresponding memory allocation to fail. +// +// The xInit method initializes the memory allocator. For example, +// it might allocate any required mutexes or initialize internal data +// structures. The xShutdown method is invoked (indirectly) by +// [sqlite3_shutdown()] and should deallocate any resources acquired +// by xInit. The pAppData pointer is used as the only parameter to +// xInit and xShutdown. +// +// SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes +// the xInit method, so the xInit method need not be threadsafe. The +// xShutdown method is only called from [sqlite3_shutdown()] so it does +// not need to be threadsafe either. For all other methods, SQLite +// holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the +// [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which +// it is by default) and so the methods are automatically serialized. +// However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other +// methods must be threadsafe or else make their own arrangements for +// serialization. +// +// SQLite will never invoke xInit() more than once without an intervening +// call to xShutdown(). +type Sqlite3_mem_methods = sqlite3_mem_methods /* sqlite3.c:2029:36 */ + +// CAPI3REF: Dynamically Typed Value Object +// KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} +// +// SQLite uses the sqlite3_value object to represent all values +// that can be stored in a database table. SQLite uses dynamic typing +// for the values it stores. ^Values stored in sqlite3_value objects +// can be integers, floating point values, strings, BLOBs, or NULL. +// +// An sqlite3_value object may be either "protected" or "unprotected". +// Some interfaces require a protected sqlite3_value. Other interfaces +// will accept either a protected or an unprotected sqlite3_value. +// Every interface that accepts sqlite3_value arguments specifies +// whether or not it requires a protected sqlite3_value. The +// [sqlite3_value_dup()] interface can be used to construct a new +// protected sqlite3_value from an unprotected sqlite3_value. +// +// The terms "protected" and "unprotected" refer to whether or not +// a mutex is held. An internal mutex is held for a protected +// sqlite3_value object but no mutex is held for an unprotected +// sqlite3_value object. If SQLite is compiled to be single-threaded +// (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) +// or if SQLite is run in one of reduced mutex modes +// [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] +// then there is no distinction between protected and unprotected +// sqlite3_value objects and they can be used interchangeably. However, +// for maximum code portability it is recommended that applications +// still make the distinction between protected and unprotected +// sqlite3_value objects even when not strictly required. +// +// ^The sqlite3_value objects that are passed as parameters into the +// implementation of [application-defined SQL functions] are protected. +// ^The sqlite3_value objects returned by [sqlite3_vtab_rhs_value()] +// are protected. +// ^The sqlite3_value object returned by +// [sqlite3_column_value()] is unprotected. +// Unprotected sqlite3_value objects may only be used as arguments +// to [sqlite3_result_value()], [sqlite3_bind_value()], and +// [sqlite3_value_dup()]. +// The [sqlite3_value_blob | sqlite3_value_type()] family of +// interfaces require protected sqlite3_value objects. +type sqlite3_value = struct { + Fu struct{ Fr float64 } + Fflags U16 + Fenc U8 + FeSubtype U8 + Fn int32 + Fz uintptr + FzMalloc uintptr + FszMalloc int32 + FuTemp U32 + Fdb uintptr + FxDel uintptr +} /* sqlite3.c:578:9 */ + +// CAPI3REF: Dynamically Typed Value Object +// KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} +// +// SQLite uses the sqlite3_value object to represent all values +// that can be stored in a database table. SQLite uses dynamic typing +// for the values it stores. ^Values stored in sqlite3_value objects +// can be integers, floating point values, strings, BLOBs, or NULL. +// +// An sqlite3_value object may be either "protected" or "unprotected". +// Some interfaces require a protected sqlite3_value. Other interfaces +// will accept either a protected or an unprotected sqlite3_value. +// Every interface that accepts sqlite3_value arguments specifies +// whether or not it requires a protected sqlite3_value. The +// [sqlite3_value_dup()] interface can be used to construct a new +// protected sqlite3_value from an unprotected sqlite3_value. +// +// The terms "protected" and "unprotected" refer to whether or not +// a mutex is held. An internal mutex is held for a protected +// sqlite3_value object but no mutex is held for an unprotected +// sqlite3_value object. If SQLite is compiled to be single-threaded +// (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) +// or if SQLite is run in one of reduced mutex modes +// [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] +// then there is no distinction between protected and unprotected +// sqlite3_value objects and they can be used interchangeably. However, +// for maximum code portability it is recommended that applications +// still make the distinction between protected and unprotected +// sqlite3_value objects even when not strictly required. +// +// ^The sqlite3_value objects that are passed as parameters into the +// implementation of [application-defined SQL functions] are protected. +// ^The sqlite3_value objects returned by [sqlite3_vtab_rhs_value()] +// are protected. +// ^The sqlite3_value object returned by +// [sqlite3_column_value()] is unprotected. +// Unprotected sqlite3_value objects may only be used as arguments +// to [sqlite3_result_value()], [sqlite3_bind_value()], and +// [sqlite3_value_dup()]. +// The [sqlite3_value_blob | sqlite3_value_type()] family of +// interfaces require protected sqlite3_value objects. +type Sqlite3_value = sqlite3_value /* sqlite3.c:4675:30 */ + +// CAPI3REF: SQL Function Context Object +// +// The context in which an SQL function executes is stored in an +// sqlite3_context object. ^A pointer to an sqlite3_context object +// is always first parameter to [application-defined SQL functions]. +// The application-defined SQL function implementation will pass this +// pointer through into calls to [sqlite3_result_int | sqlite3_result()], +// [sqlite3_aggregate_context()], [sqlite3_user_data()], +// [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], +// and/or [sqlite3_set_auxdata()]. +type sqlite3_context = struct { + FpOut uintptr + FpFunc uintptr + FpMem uintptr + FpVdbe uintptr + FiOp int32 + FisError int32 + FskipFlag U8 + Fargc U8 + F__ccgo_pad1 [6]byte + Fargv [1]uintptr +} /* sqlite3.c:578:9 */ + +// CAPI3REF: SQL Function Context Object +// +// The context in which an SQL function executes is stored in an +// sqlite3_context object. ^A pointer to an sqlite3_context object +// is always first parameter to [application-defined SQL functions]. +// The application-defined SQL function implementation will pass this +// pointer through into calls to [sqlite3_result_int | sqlite3_result()], +// [sqlite3_aggregate_context()], [sqlite3_user_data()], +// [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], +// and/or [sqlite3_set_auxdata()]. +type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ + +// CAPI3REF: Constants Defining Special Destructor Behavior +// +// These are special values for the destructor that is passed in as the +// final argument to routines like [sqlite3_result_blob()]. ^If the destructor +// argument is SQLITE_STATIC, it means that the content pointer is constant +// and will never change. It does not need to be destroyed. ^The +// SQLITE_TRANSIENT value means that the content will likely change in +// the near future and that SQLite should make its own private copy of +// the content before returning. +// +// The typedef is necessary to work around problems in certain +// C++ compilers. +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ + +// The interface to the virtual-table mechanism is currently considered +// to be experimental. The interface might change in incompatible ways. +// If this is a problem for you, do not use the interface at this time. +// +// When the virtual-table mechanism stabilizes, we will declare the +// interface fixed, support it indefinitely, and remove this comment. + +// Structures used by the virtual table interface +type sqlite3_vtab = struct { + FpModule uintptr + FnRef int32 + F__ccgo_pad1 [4]byte + FzErrMsg uintptr +} /* sqlite3.c:578:9 */ + +// The interface to the virtual-table mechanism is currently considered +// to be experimental. The interface might change in incompatible ways. +// If this is a problem for you, do not use the interface at this time. +// +// When the virtual-table mechanism stabilizes, we will declare the +// interface fixed, support it indefinitely, and remove this comment. + +// Structures used by the virtual table interface +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ +type sqlite3_index_info = struct { + FnConstraint int32 + F__ccgo_pad1 [4]byte + FaConstraint uintptr + FnOrderBy int32 + F__ccgo_pad2 [4]byte + FaOrderBy uintptr + FaConstraintUsage uintptr + FidxNum int32 + F__ccgo_pad3 [4]byte + FidxStr uintptr + FneedToFreeIdxStr int32 + ForderByConsumed int32 + FestimatedCost float64 + FestimatedRows Sqlite3_int64 + FidxFlags int32 + F__ccgo_pad4 [4]byte + FcolUsed Sqlite3_uint64 +} /* sqlite3.c:7244:9 */ + +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ + +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ +type sqlite3_module = struct { + FiVersion int32 + F__ccgo_pad1 [4]byte + FxCreate uintptr + FxConnect uintptr + FxBestIndex uintptr + FxDisconnect uintptr + FxDestroy uintptr + FxOpen uintptr + FxClose uintptr + FxFilter uintptr + FxNext uintptr + FxEof uintptr + FxColumn uintptr + FxRowid uintptr + FxUpdate uintptr + FxBegin uintptr + FxSync uintptr + FxCommit uintptr + FxRollback uintptr + FxFindFunction uintptr + FxRename uintptr + FxSavepoint uintptr + FxRelease uintptr + FxRollbackTo uintptr + FxShadowName uintptr +} /* sqlite3.c:578:9 */ + +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ + +// CAPI3REF: Virtual Table Indexing Information +// KEYWORDS: sqlite3_index_info +// +// The sqlite3_index_info structure and its substructures is used as part +// of the [virtual table] interface to +// pass information into and receive the reply from the [xBestIndex] +// method of a [virtual table module]. The fields under **Inputs** are the +// inputs to xBestIndex and are read-only. xBestIndex inserts its +// results into the **Outputs** fields. +// +// ^(The aConstraint[] array records WHERE clause constraints of the form: +// +//
    column OP expr
    +// +// where OP is =, <, <=, >, or >=.)^ ^(The particular operator is +// stored in aConstraint[].op using one of the +// [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ +// ^(The index of the column is stored in +// aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the +// expr on the right-hand side can be evaluated (and thus the constraint +// is usable) and false if it cannot.)^ +// +// ^The optimizer automatically inverts terms of the form "expr OP column" +// and makes other simplifications to the WHERE clause in an attempt to +// get as many WHERE clause terms into the form shown above as possible. +// ^The aConstraint[] array only reports WHERE clause terms that are +// relevant to the particular virtual table being queried. +// +// ^Information about the ORDER BY clause is stored in aOrderBy[]. +// ^Each term of aOrderBy records a column of the ORDER BY clause. +// +// The colUsed field indicates which columns of the virtual table may be +// required by the current scan. Virtual table columns are numbered from +// zero in the order in which they appear within the CREATE TABLE statement +// passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), +// the corresponding bit is set within the colUsed mask if the column may be +// required by SQLite. If the table has at least 64 columns and any column +// to the right of the first 63 is required, then bit 63 of colUsed is also +// set. In other words, column iCol may be required if the expression +// (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to +// non-zero. +// +// The [xBestIndex] method must fill aConstraintUsage[] with information +// about what parameters to pass to xFilter. ^If argvIndex>0 then +// the right-hand side of the corresponding aConstraint[] is evaluated +// and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit +// is true, then the constraint is assumed to be fully handled by the +// virtual table and might not be checked again by the byte code.)^ ^(The +// aConstraintUsage[].omit flag is an optimization hint. When the omit flag +// is left in its default setting of false, the constraint will always be +// checked separately in byte code. If the omit flag is change to true, then +// the constraint may or may not be checked in byte code. In other words, +// when the omit flag is true there is no guarantee that the constraint will +// not be checked again using byte code.)^ +// +// ^The idxNum and idxPtr values are recorded and passed into the +// [xFilter] method. +// ^[sqlite3_free()] is used to free idxPtr if and only if +// needToFreeIdxPtr is true. +// +// ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in +// the correct order to satisfy the ORDER BY clause so that no separate +// sorting step is required. +// +// ^The estimatedCost value is an estimate of the cost of a particular +// strategy. A cost of N indicates that the cost of the strategy is similar +// to a linear scan of an SQLite table with N rows. A cost of log(N) +// indicates that the expense of the operation is similar to that of a +// binary search on a unique indexed field of an SQLite table with N rows. +// +// ^The estimatedRows value is an estimate of the number of rows that +// will be returned by the strategy. +// +// The xBestIndex method may optionally populate the idxFlags field with a +// mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - +// SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite +// assumes that the strategy may visit at most one row. +// +// Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then +// SQLite also assumes that if a call to the xUpdate() method is made as +// part of the same statement to delete or update a virtual table row and the +// implementation returns SQLITE_CONSTRAINT, then there is no need to rollback +// any database changes. In other words, if the xUpdate() returns +// SQLITE_CONSTRAINT, the database contents must be exactly as they were +// before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not +// set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by +// the xUpdate method are automatically rolled back by SQLite. +// +// IMPORTANT: The estimatedRows field was added to the sqlite3_index_info +// structure for SQLite [version 3.8.2] ([dateof:3.8.2]). +// If a virtual table extension is +// used with an SQLite version earlier than 3.8.2, the results of attempting +// to read or write the estimatedRows field are undefined (but are likely +// to include crashing the application). The estimatedRows field should +// therefore only be used if [sqlite3_libversion_number()] returns a +// value greater than or equal to 3008002. Similarly, the idxFlags field +// was added for [version 3.9.0] ([dateof:3.9.0]). +// It may therefore only be used if +// sqlite3_libversion_number() returns a value greater than or equal to +// 3009000. +type sqlite3_index_constraint = struct { + FiColumn int32 + Fop uint8 + Fusable uint8 + F__ccgo_pad1 [2]byte + FiTermOffset int32 +} /* sqlite3.c:7244:9 */ + +// CAPI3REF: Virtual Table Indexing Information +// KEYWORDS: sqlite3_index_info +// +// The sqlite3_index_info structure and its substructures is used as part +// of the [virtual table] interface to +// pass information into and receive the reply from the [xBestIndex] +// method of a [virtual table module]. The fields under **Inputs** are the +// inputs to xBestIndex and are read-only. xBestIndex inserts its +// results into the **Outputs** fields. +// +// ^(The aConstraint[] array records WHERE clause constraints of the form: +// +//
    column OP expr
    +// +// where OP is =, <, <=, >, or >=.)^ ^(The particular operator is +// stored in aConstraint[].op using one of the +// [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ +// ^(The index of the column is stored in +// aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the +// expr on the right-hand side can be evaluated (and thus the constraint +// is usable) and false if it cannot.)^ +// +// ^The optimizer automatically inverts terms of the form "expr OP column" +// and makes other simplifications to the WHERE clause in an attempt to +// get as many WHERE clause terms into the form shown above as possible. +// ^The aConstraint[] array only reports WHERE clause terms that are +// relevant to the particular virtual table being queried. +// +// ^Information about the ORDER BY clause is stored in aOrderBy[]. +// ^Each term of aOrderBy records a column of the ORDER BY clause. +// +// The colUsed field indicates which columns of the virtual table may be +// required by the current scan. Virtual table columns are numbered from +// zero in the order in which they appear within the CREATE TABLE statement +// passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), +// the corresponding bit is set within the colUsed mask if the column may be +// required by SQLite. If the table has at least 64 columns and any column +// to the right of the first 63 is required, then bit 63 of colUsed is also +// set. In other words, column iCol may be required if the expression +// (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to +// non-zero. +// +// The [xBestIndex] method must fill aConstraintUsage[] with information +// about what parameters to pass to xFilter. ^If argvIndex>0 then +// the right-hand side of the corresponding aConstraint[] is evaluated +// and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit +// is true, then the constraint is assumed to be fully handled by the +// virtual table and might not be checked again by the byte code.)^ ^(The +// aConstraintUsage[].omit flag is an optimization hint. When the omit flag +// is left in its default setting of false, the constraint will always be +// checked separately in byte code. If the omit flag is change to true, then +// the constraint may or may not be checked in byte code. In other words, +// when the omit flag is true there is no guarantee that the constraint will +// not be checked again using byte code.)^ +// +// ^The idxNum and idxPtr values are recorded and passed into the +// [xFilter] method. +// ^[sqlite3_free()] is used to free idxPtr if and only if +// needToFreeIdxPtr is true. +// +// ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in +// the correct order to satisfy the ORDER BY clause so that no separate +// sorting step is required. +// +// ^The estimatedCost value is an estimate of the cost of a particular +// strategy. A cost of N indicates that the cost of the strategy is similar +// to a linear scan of an SQLite table with N rows. A cost of log(N) +// indicates that the expense of the operation is similar to that of a +// binary search on a unique indexed field of an SQLite table with N rows. +// +// ^The estimatedRows value is an estimate of the number of rows that +// will be returned by the strategy. +// +// The xBestIndex method may optionally populate the idxFlags field with a +// mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - +// SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite +// assumes that the strategy may visit at most one row. +// +// Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then +// SQLite also assumes that if a call to the xUpdate() method is made as +// part of the same statement to delete or update a virtual table row and the +// implementation returns SQLITE_CONSTRAINT, then there is no need to rollback +// any database changes. In other words, if the xUpdate() returns +// SQLITE_CONSTRAINT, the database contents must be exactly as they were +// before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not +// set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by +// the xUpdate method are automatically rolled back by SQLite. +// +// IMPORTANT: The estimatedRows field was added to the sqlite3_index_info +// structure for SQLite [version 3.8.2] ([dateof:3.8.2]). +// If a virtual table extension is +// used with an SQLite version earlier than 3.8.2, the results of attempting +// to read or write the estimatedRows field are undefined (but are likely +// to include crashing the application). The estimatedRows field should +// therefore only be used if [sqlite3_libversion_number()] returns a +// value greater than or equal to 3008002. Similarly, the idxFlags field +// was added for [version 3.9.0] ([dateof:3.9.0]). +// It may therefore only be used if +// sqlite3_libversion_number() returns a value greater than or equal to +// 3009000. +type sqlite3_index_orderby = struct { + FiColumn int32 + Fdesc uint8 + F__ccgo_pad1 [3]byte +} /* sqlite3.c:7244:9 */ + +// CAPI3REF: Virtual Table Indexing Information +// KEYWORDS: sqlite3_index_info +// +// The sqlite3_index_info structure and its substructures is used as part +// of the [virtual table] interface to +// pass information into and receive the reply from the [xBestIndex] +// method of a [virtual table module]. The fields under **Inputs** are the +// inputs to xBestIndex and are read-only. xBestIndex inserts its +// results into the **Outputs** fields. +// +// ^(The aConstraint[] array records WHERE clause constraints of the form: +// +//
    column OP expr
    +// +// where OP is =, <, <=, >, or >=.)^ ^(The particular operator is +// stored in aConstraint[].op using one of the +// [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ +// ^(The index of the column is stored in +// aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the +// expr on the right-hand side can be evaluated (and thus the constraint +// is usable) and false if it cannot.)^ +// +// ^The optimizer automatically inverts terms of the form "expr OP column" +// and makes other simplifications to the WHERE clause in an attempt to +// get as many WHERE clause terms into the form shown above as possible. +// ^The aConstraint[] array only reports WHERE clause terms that are +// relevant to the particular virtual table being queried. +// +// ^Information about the ORDER BY clause is stored in aOrderBy[]. +// ^Each term of aOrderBy records a column of the ORDER BY clause. +// +// The colUsed field indicates which columns of the virtual table may be +// required by the current scan. Virtual table columns are numbered from +// zero in the order in which they appear within the CREATE TABLE statement +// passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), +// the corresponding bit is set within the colUsed mask if the column may be +// required by SQLite. If the table has at least 64 columns and any column +// to the right of the first 63 is required, then bit 63 of colUsed is also +// set. In other words, column iCol may be required if the expression +// (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to +// non-zero. +// +// The [xBestIndex] method must fill aConstraintUsage[] with information +// about what parameters to pass to xFilter. ^If argvIndex>0 then +// the right-hand side of the corresponding aConstraint[] is evaluated +// and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit +// is true, then the constraint is assumed to be fully handled by the +// virtual table and might not be checked again by the byte code.)^ ^(The +// aConstraintUsage[].omit flag is an optimization hint. When the omit flag +// is left in its default setting of false, the constraint will always be +// checked separately in byte code. If the omit flag is change to true, then +// the constraint may or may not be checked in byte code. In other words, +// when the omit flag is true there is no guarantee that the constraint will +// not be checked again using byte code.)^ +// +// ^The idxNum and idxPtr values are recorded and passed into the +// [xFilter] method. +// ^[sqlite3_free()] is used to free idxPtr if and only if +// needToFreeIdxPtr is true. +// +// ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in +// the correct order to satisfy the ORDER BY clause so that no separate +// sorting step is required. +// +// ^The estimatedCost value is an estimate of the cost of a particular +// strategy. A cost of N indicates that the cost of the strategy is similar +// to a linear scan of an SQLite table with N rows. A cost of log(N) +// indicates that the expense of the operation is similar to that of a +// binary search on a unique indexed field of an SQLite table with N rows. +// +// ^The estimatedRows value is an estimate of the number of rows that +// will be returned by the strategy. +// +// The xBestIndex method may optionally populate the idxFlags field with a +// mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - +// SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite +// assumes that the strategy may visit at most one row. +// +// Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then +// SQLite also assumes that if a call to the xUpdate() method is made as +// part of the same statement to delete or update a virtual table row and the +// implementation returns SQLITE_CONSTRAINT, then there is no need to rollback +// any database changes. In other words, if the xUpdate() returns +// SQLITE_CONSTRAINT, the database contents must be exactly as they were +// before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not +// set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by +// the xUpdate method are automatically rolled back by SQLite. +// +// IMPORTANT: The estimatedRows field was added to the sqlite3_index_info +// structure for SQLite [version 3.8.2] ([dateof:3.8.2]). +// If a virtual table extension is +// used with an SQLite version earlier than 3.8.2, the results of attempting +// to read or write the estimatedRows field are undefined (but are likely +// to include crashing the application). The estimatedRows field should +// therefore only be used if [sqlite3_libversion_number()] returns a +// value greater than or equal to 3008002. Similarly, the idxFlags field +// was added for [version 3.9.0] ([dateof:3.9.0]). +// It may therefore only be used if +// sqlite3_libversion_number() returns a value greater than or equal to +// 3009000. +type sqlite3_index_constraint_usage = struct { + FargvIndex int32 + Fomit uint8 + F__ccgo_pad1 [3]byte +} /* sqlite3.c:7244:9 */ + +// CAPI3REF: Mutex Methods Object +// +// An instance of this structure defines the low-level routines +// used to allocate and use mutexes. +// +// Usually, the default mutex implementations provided by SQLite are +// sufficient, however the application has the option of substituting a custom +// implementation for specialized deployments or systems for which SQLite +// does not provide a suitable implementation. In this case, the application +// creates and populates an instance of this structure to pass +// to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. +// Additionally, an instance of this structure can be used as an +// output variable when querying the system for the current mutex +// implementation, using the [SQLITE_CONFIG_GETMUTEX] option. +// +// ^The xMutexInit method defined by this structure is invoked as +// part of system initialization by the sqlite3_initialize() function. +// ^The xMutexInit routine is called by SQLite exactly once for each +// effective call to [sqlite3_initialize()]. +// +// ^The xMutexEnd method defined by this structure is invoked as +// part of system shutdown by the sqlite3_shutdown() function. The +// implementation of this method is expected to release all outstanding +// resources obtained by the mutex methods implementation, especially +// those obtained by the xMutexInit method. ^The xMutexEnd() +// interface is invoked exactly once for each call to [sqlite3_shutdown()]. +// +// ^(The remaining seven methods defined by this structure (xMutexAlloc, +// xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and +// xMutexNotheld) implement the following interfaces (respectively): +// +//
      +//
    • [sqlite3_mutex_alloc()]
    • +//
    • [sqlite3_mutex_free()]
    • +//
    • [sqlite3_mutex_enter()]
    • +//
    • [sqlite3_mutex_try()]
    • +//
    • [sqlite3_mutex_leave()]
    • +//
    • [sqlite3_mutex_held()]
    • +//
    • [sqlite3_mutex_notheld()]
    • +//
    )^ +// +// The only difference is that the public sqlite3_XXX functions enumerated +// above silently ignore any invocations that pass a NULL pointer instead +// of a valid mutex handle. The implementations of the methods defined +// by this structure are not required to handle this case. The results +// of passing a NULL pointer instead of a valid mutex handle are undefined +// (i.e. it is acceptable to provide an implementation that segfaults if +// it is passed a NULL pointer). +// +// The xMutexInit() method must be threadsafe. It must be harmless to +// invoke xMutexInit() multiple times within the same process and without +// intervening calls to xMutexEnd(). Second and subsequent calls to +// xMutexInit() must be no-ops. +// +// xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] +// and its associates). Similarly, xMutexAlloc() must not use SQLite memory +// allocation for a static mutex. ^However xMutexAlloc() may use SQLite +// memory allocation for a fast or recursive mutex. +// +// ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is +// called, but only if the prior call to xMutexInit returned SQLITE_OK. +// If xMutexInit fails in any way, it is expected to clean up after itself +// prior to returning. +type sqlite3_mutex_methods = struct { + FxMutexInit uintptr + FxMutexEnd uintptr + FxMutexAlloc uintptr + FxMutexFree uintptr + FxMutexEnter uintptr + FxMutexTry uintptr + FxMutexLeave uintptr + FxMutexHeld uintptr + FxMutexNotheld uintptr +} /* sqlite3.c:8110:9 */ + +// CAPI3REF: Mutex Methods Object +// +// An instance of this structure defines the low-level routines +// used to allocate and use mutexes. +// +// Usually, the default mutex implementations provided by SQLite are +// sufficient, however the application has the option of substituting a custom +// implementation for specialized deployments or systems for which SQLite +// does not provide a suitable implementation. In this case, the application +// creates and populates an instance of this structure to pass +// to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. +// Additionally, an instance of this structure can be used as an +// output variable when querying the system for the current mutex +// implementation, using the [SQLITE_CONFIG_GETMUTEX] option. +// +// ^The xMutexInit method defined by this structure is invoked as +// part of system initialization by the sqlite3_initialize() function. +// ^The xMutexInit routine is called by SQLite exactly once for each +// effective call to [sqlite3_initialize()]. +// +// ^The xMutexEnd method defined by this structure is invoked as +// part of system shutdown by the sqlite3_shutdown() function. The +// implementation of this method is expected to release all outstanding +// resources obtained by the mutex methods implementation, especially +// those obtained by the xMutexInit method. ^The xMutexEnd() +// interface is invoked exactly once for each call to [sqlite3_shutdown()]. +// +// ^(The remaining seven methods defined by this structure (xMutexAlloc, +// xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and +// xMutexNotheld) implement the following interfaces (respectively): +// +//
      +//
    • [sqlite3_mutex_alloc()]
    • +//
    • [sqlite3_mutex_free()]
    • +//
    • [sqlite3_mutex_enter()]
    • +//
    • [sqlite3_mutex_try()]
    • +//
    • [sqlite3_mutex_leave()]
    • +//
    • [sqlite3_mutex_held()]
    • +//
    • [sqlite3_mutex_notheld()]
    • +//
    )^ +// +// The only difference is that the public sqlite3_XXX functions enumerated +// above silently ignore any invocations that pass a NULL pointer instead +// of a valid mutex handle. The implementations of the methods defined +// by this structure are not required to handle this case. The results +// of passing a NULL pointer instead of a valid mutex handle are undefined +// (i.e. it is acceptable to provide an implementation that segfaults if +// it is passed a NULL pointer). +// +// The xMutexInit() method must be threadsafe. It must be harmless to +// invoke xMutexInit() multiple times within the same process and without +// intervening calls to xMutexEnd(). Second and subsequent calls to +// xMutexInit() must be no-ops. +// +// xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] +// and its associates). Similarly, xMutexAlloc() must not use SQLite memory +// allocation for a static mutex. ^However xMutexAlloc() may use SQLite +// memory allocation for a fast or recursive mutex. +// +// ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is +// called, but only if the prior call to xMutexInit returned SQLITE_OK. +// If xMutexInit fails in any way, it is expected to clean up after itself +// prior to returning. +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ + +// CAPI3REF: Dynamic String Object +// KEYWORDS: {dynamic string} +// +// An instance of the sqlite3_str object contains a dynamically-sized +// string under construction. +// +// The lifecycle of an sqlite3_str object is as follows: +//
      +//
    1. ^The sqlite3_str object is created using [sqlite3_str_new()]. +//
    2. ^Text is appended to the sqlite3_str object using various +// methods, such as [sqlite3_str_appendf()]. +//
    3. ^The sqlite3_str object is destroyed and the string it created +// is returned using the [sqlite3_str_finish()] interface. +//
    +type sqlite3_str = struct { + Fdb uintptr + FzText uintptr + FnAlloc U32 + FmxAlloc U32 + FnChar U32 + FaccError U8 + FprintfFlags U8 + F__ccgo_pad1 [2]byte +} /* sqlite3.c:8374:9 */ + +// CAPI3REF: Dynamic String Object +// KEYWORDS: {dynamic string} +// +// An instance of the sqlite3_str object contains a dynamically-sized +// string under construction. +// +// The lifecycle of an sqlite3_str object is as follows: +//
      +//
    1. ^The sqlite3_str object is created using [sqlite3_str_new()]. +//
    2. ^Text is appended to the sqlite3_str object using various +// methods, such as [sqlite3_str_appendf()]. +//
    3. ^The sqlite3_str object is destroyed and the string it created +// is returned using the [sqlite3_str_finish()] interface. +//
    +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ + +// CAPI3REF: Custom Page Cache Object +// +// The sqlite3_pcache_page object represents a single page in the +// page cache. The page cache will allocate instances of this +// object. Various methods of the page cache use pointers to instances +// of this object as parameters or as their return value. +// +// See [sqlite3_pcache_methods2] for additional information. +type sqlite3_pcache_page = struct { + FpBuf uintptr + FpExtra uintptr +} /* sqlite3.c:578:9 */ + +// CAPI3REF: Custom Page Cache Object +// +// The sqlite3_pcache_page object represents a single page in the +// page cache. The page cache will allocate instances of this +// object. Various methods of the page cache use pointers to instances +// of this object as parameters or as their return value. +// +// See [sqlite3_pcache_methods2] for additional information. +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ + +// CAPI3REF: Application Defined Page Cache. +// KEYWORDS: {page cache} +// +// ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can +// register an alternative page cache implementation by passing in an +// instance of the sqlite3_pcache_methods2 structure.)^ +// In many applications, most of the heap memory allocated by +// SQLite is used for the page cache. +// By implementing a +// custom page cache using this API, an application can better control +// the amount of memory consumed by SQLite, the way in which +// that memory is allocated and released, and the policies used to +// determine exactly which parts of a database file are cached and for +// how long. +// +// The alternative page cache mechanism is an +// extreme measure that is only needed by the most demanding applications. +// The built-in page cache is recommended for most uses. +// +// ^(The contents of the sqlite3_pcache_methods2 structure are copied to an +// internal buffer by SQLite within the call to [sqlite3_config]. Hence +// the application may discard the parameter after the call to +// [sqlite3_config()] returns.)^ +// +// [[the xInit() page cache method]] +// ^(The xInit() method is called once for each effective +// call to [sqlite3_initialize()])^ +// (usually only once during the lifetime of the process). ^(The xInit() +// method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^ +// The intent of the xInit() method is to set up global data structures +// required by the custom page cache implementation. +// ^(If the xInit() method is NULL, then the +// built-in default page cache is used instead of the application defined +// page cache.)^ +// +// [[the xShutdown() page cache method]] +// ^The xShutdown() method is called by [sqlite3_shutdown()]. +// It can be used to clean up +// any outstanding resources before process shutdown, if required. +// ^The xShutdown() method may be NULL. +// +// ^SQLite automatically serializes calls to the xInit method, +// so the xInit method need not be threadsafe. ^The +// xShutdown method is only called from [sqlite3_shutdown()] so it does +// not need to be threadsafe either. All other methods must be threadsafe +// in multithreaded applications. +// +// ^SQLite will never invoke xInit() more than once without an intervening +// call to xShutdown(). +// +// [[the xCreate() page cache methods]] +// ^SQLite invokes the xCreate() method to construct a new cache instance. +// SQLite will typically create one cache instance for each open database file, +// though this is not guaranteed. ^The +// first parameter, szPage, is the size in bytes of the pages that must +// be allocated by the cache. ^szPage will always a power of two. ^The +// second parameter szExtra is a number of bytes of extra storage +// associated with each page cache entry. ^The szExtra parameter will +// a number less than 250. SQLite will use the +// extra szExtra bytes on each page to store metadata about the underlying +// database page on disk. The value passed into szExtra depends +// on the SQLite version, the target platform, and how SQLite was compiled. +// ^The third argument to xCreate(), bPurgeable, is true if the cache being +// created will be used to cache database pages of a file stored on disk, or +// false if it is used for an in-memory database. The cache implementation +// does not have to do anything special based with the value of bPurgeable; +// it is purely advisory. ^On a cache where bPurgeable is false, SQLite will +// never invoke xUnpin() except to deliberately delete a page. +// ^In other words, calls to xUnpin() on a cache with bPurgeable set to +// false will always have the "discard" flag set to true. +// ^Hence, a cache created with bPurgeable false will +// never contain any unpinned pages. +// +// [[the xCachesize() page cache method]] +// ^(The xCachesize() method may be called at any time by SQLite to set the +// suggested maximum cache-size (number of pages stored by) the cache +// instance passed as the first argument. This is the value configured using +// the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable +// parameter, the implementation is not required to do anything with this +// value; it is advisory only. +// +// [[the xPagecount() page cache methods]] +// The xPagecount() method must return the number of pages currently +// stored in the cache, both pinned and unpinned. +// +// [[the xFetch() page cache methods]] +// The xFetch() method locates a page in the cache and returns a pointer to +// an sqlite3_pcache_page object associated with that page, or a NULL pointer. +// The pBuf element of the returned sqlite3_pcache_page object will be a +// pointer to a buffer of szPage bytes used to store the content of a +// single database page. The pExtra element of sqlite3_pcache_page will be +// a pointer to the szExtra bytes of extra storage that SQLite has requested +// for each entry in the page cache. +// +// The page to be fetched is determined by the key. ^The minimum key value +// is 1. After it has been retrieved using xFetch, the page is considered +// to be "pinned". +// +// If the requested page is already in the page cache, then the page cache +// implementation must return a pointer to the page buffer with its content +// intact. If the requested page is not already in the cache, then the +// cache implementation should use the value of the createFlag +// parameter to help it determined what action to take: +// +//
    +//
    createFlag Behavior when page is not already in cache +//
    0 Do not allocate a new page. Return NULL. +//
    1 Allocate a new page if it easy and convenient to do so. +// Otherwise return NULL. +//
    2 Make every effort to allocate a new page. Only return +// NULL if allocating a new page is effectively impossible. +//
    +// +// ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite +// will only use a createFlag of 2 after a prior call with a createFlag of 1 +// failed.)^ In between the xFetch() calls, SQLite may +// attempt to unpin one or more cache pages by spilling the content of +// pinned pages to disk and synching the operating system disk cache. +// +// [[the xUnpin() page cache method]] +// ^xUnpin() is called by SQLite with a pointer to a currently pinned page +// as its second argument. If the third parameter, discard, is non-zero, +// then the page must be evicted from the cache. +// ^If the discard parameter is +// zero, then the page may be discarded or retained at the discretion of +// page cache implementation. ^The page cache implementation +// may choose to evict unpinned pages at any time. +// +// The cache must not perform any reference counting. A single +// call to xUnpin() unpins the page regardless of the number of prior calls +// to xFetch(). +// +// [[the xRekey() page cache methods]] +// The xRekey() method is used to change the key value associated with the +// page passed as the second argument. If the cache +// previously contains an entry associated with newKey, it must be +// discarded. ^Any prior cache entry associated with newKey is guaranteed not +// to be pinned. +// +// When SQLite calls the xTruncate() method, the cache must discard all +// existing cache entries with page numbers (keys) greater than or equal +// to the value of the iLimit parameter passed to xTruncate(). If any +// of these pages are pinned, they are implicitly unpinned, meaning that +// they can be safely discarded. +// +// [[the xDestroy() page cache method]] +// ^The xDestroy() method is used to delete a cache allocated by xCreate(). +// All resources associated with the specified cache should be freed. ^After +// calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] +// handle invalid, and will not use it with any other sqlite3_pcache_methods2 +// functions. +// +// [[the xShrink() page cache method]] +// ^SQLite invokes the xShrink() method when it wants the page cache to +// free up as much of heap memory as possible. The page cache implementation +// is not obligated to free any memory, but well-behaved implementations should +// do their best. +type sqlite3_pcache_methods2 = struct { + FiVersion int32 + F__ccgo_pad1 [4]byte + FpArg uintptr + FxInit uintptr + FxShutdown uintptr + FxCreate uintptr + FxCachesize uintptr + FxPagecount uintptr + FxFetch uintptr + FxUnpin uintptr + FxRekey uintptr + FxTruncate uintptr + FxDestroy uintptr + FxShrink uintptr +} /* sqlite3.c:9044:9 */ + +// CAPI3REF: Application Defined Page Cache. +// KEYWORDS: {page cache} +// +// ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can +// register an alternative page cache implementation by passing in an +// instance of the sqlite3_pcache_methods2 structure.)^ +// In many applications, most of the heap memory allocated by +// SQLite is used for the page cache. +// By implementing a +// custom page cache using this API, an application can better control +// the amount of memory consumed by SQLite, the way in which +// that memory is allocated and released, and the policies used to +// determine exactly which parts of a database file are cached and for +// how long. +// +// The alternative page cache mechanism is an +// extreme measure that is only needed by the most demanding applications. +// The built-in page cache is recommended for most uses. +// +// ^(The contents of the sqlite3_pcache_methods2 structure are copied to an +// internal buffer by SQLite within the call to [sqlite3_config]. Hence +// the application may discard the parameter after the call to +// [sqlite3_config()] returns.)^ +// +// [[the xInit() page cache method]] +// ^(The xInit() method is called once for each effective +// call to [sqlite3_initialize()])^ +// (usually only once during the lifetime of the process). ^(The xInit() +// method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^ +// The intent of the xInit() method is to set up global data structures +// required by the custom page cache implementation. +// ^(If the xInit() method is NULL, then the +// built-in default page cache is used instead of the application defined +// page cache.)^ +// +// [[the xShutdown() page cache method]] +// ^The xShutdown() method is called by [sqlite3_shutdown()]. +// It can be used to clean up +// any outstanding resources before process shutdown, if required. +// ^The xShutdown() method may be NULL. +// +// ^SQLite automatically serializes calls to the xInit method, +// so the xInit method need not be threadsafe. ^The +// xShutdown method is only called from [sqlite3_shutdown()] so it does +// not need to be threadsafe either. All other methods must be threadsafe +// in multithreaded applications. +// +// ^SQLite will never invoke xInit() more than once without an intervening +// call to xShutdown(). +// +// [[the xCreate() page cache methods]] +// ^SQLite invokes the xCreate() method to construct a new cache instance. +// SQLite will typically create one cache instance for each open database file, +// though this is not guaranteed. ^The +// first parameter, szPage, is the size in bytes of the pages that must +// be allocated by the cache. ^szPage will always a power of two. ^The +// second parameter szExtra is a number of bytes of extra storage +// associated with each page cache entry. ^The szExtra parameter will +// a number less than 250. SQLite will use the +// extra szExtra bytes on each page to store metadata about the underlying +// database page on disk. The value passed into szExtra depends +// on the SQLite version, the target platform, and how SQLite was compiled. +// ^The third argument to xCreate(), bPurgeable, is true if the cache being +// created will be used to cache database pages of a file stored on disk, or +// false if it is used for an in-memory database. The cache implementation +// does not have to do anything special based with the value of bPurgeable; +// it is purely advisory. ^On a cache where bPurgeable is false, SQLite will +// never invoke xUnpin() except to deliberately delete a page. +// ^In other words, calls to xUnpin() on a cache with bPurgeable set to +// false will always have the "discard" flag set to true. +// ^Hence, a cache created with bPurgeable false will +// never contain any unpinned pages. +// +// [[the xCachesize() page cache method]] +// ^(The xCachesize() method may be called at any time by SQLite to set the +// suggested maximum cache-size (number of pages stored by) the cache +// instance passed as the first argument. This is the value configured using +// the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable +// parameter, the implementation is not required to do anything with this +// value; it is advisory only. +// +// [[the xPagecount() page cache methods]] +// The xPagecount() method must return the number of pages currently +// stored in the cache, both pinned and unpinned. +// +// [[the xFetch() page cache methods]] +// The xFetch() method locates a page in the cache and returns a pointer to +// an sqlite3_pcache_page object associated with that page, or a NULL pointer. +// The pBuf element of the returned sqlite3_pcache_page object will be a +// pointer to a buffer of szPage bytes used to store the content of a +// single database page. The pExtra element of sqlite3_pcache_page will be +// a pointer to the szExtra bytes of extra storage that SQLite has requested +// for each entry in the page cache. +// +// The page to be fetched is determined by the key. ^The minimum key value +// is 1. After it has been retrieved using xFetch, the page is considered +// to be "pinned". +// +// If the requested page is already in the page cache, then the page cache +// implementation must return a pointer to the page buffer with its content +// intact. If the requested page is not already in the cache, then the +// cache implementation should use the value of the createFlag +// parameter to help it determined what action to take: +// +// +//
    createFlag Behavior when page is not already in cache +//
    0 Do not allocate a new page. Return NULL. +//
    1 Allocate a new page if it easy and convenient to do so. +// Otherwise return NULL. +//
    2 Make every effort to allocate a new page. Only return +// NULL if allocating a new page is effectively impossible. +//
    +// +// ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite +// will only use a createFlag of 2 after a prior call with a createFlag of 1 +// failed.)^ In between the xFetch() calls, SQLite may +// attempt to unpin one or more cache pages by spilling the content of +// pinned pages to disk and synching the operating system disk cache. +// +// [[the xUnpin() page cache method]] +// ^xUnpin() is called by SQLite with a pointer to a currently pinned page +// as its second argument. If the third parameter, discard, is non-zero, +// then the page must be evicted from the cache. +// ^If the discard parameter is +// zero, then the page may be discarded or retained at the discretion of +// page cache implementation. ^The page cache implementation +// may choose to evict unpinned pages at any time. +// +// The cache must not perform any reference counting. A single +// call to xUnpin() unpins the page regardless of the number of prior calls +// to xFetch(). +// +// [[the xRekey() page cache methods]] +// The xRekey() method is used to change the key value associated with the +// page passed as the second argument. If the cache +// previously contains an entry associated with newKey, it must be +// discarded. ^Any prior cache entry associated with newKey is guaranteed not +// to be pinned. +// +// When SQLite calls the xTruncate() method, the cache must discard all +// existing cache entries with page numbers (keys) greater than or equal +// to the value of the iLimit parameter passed to xTruncate(). If any +// of these pages are pinned, they are implicitly unpinned, meaning that +// they can be safely discarded. +// +// [[the xDestroy() page cache method]] +// ^The xDestroy() method is used to delete a cache allocated by xCreate(). +// All resources associated with the specified cache should be freed. ^After +// calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] +// handle invalid, and will not use it with any other sqlite3_pcache_methods2 +// functions. +// +// [[the xShrink() page cache method]] +// ^SQLite invokes the xShrink() method when it wants the page cache to +// free up as much of heap memory as possible. The page cache implementation +// is not obligated to free any memory, but well-behaved implementations should +// do their best. +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ + +// This is the obsolete pcache_methods object that has now been replaced +// by sqlite3_pcache_methods2. This object is not used by SQLite. It is +// retained in the header file for backwards compatibility only. +type sqlite3_pcache_methods = struct { + FpArg uintptr + FxInit uintptr + FxShutdown uintptr + FxCreate uintptr + FxCachesize uintptr + FxPagecount uintptr + FxFetch uintptr + FxUnpin uintptr + FxRekey uintptr + FxTruncate uintptr + FxDestroy uintptr +} /* sqlite3.c:9067:9 */ + +// This is the obsolete pcache_methods object that has now been replaced +// by sqlite3_pcache_methods2. This object is not used by SQLite. It is +// retained in the header file for backwards compatibility only. +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ + +// CAPI3REF: Online Backup Object +// +// The sqlite3_backup object records state information about an ongoing +// online backup operation. ^The sqlite3_backup object is created by +// a call to [sqlite3_backup_init()] and is destroyed by a call to +// [sqlite3_backup_finish()]. +// +// See Also: [Using the SQLite Online Backup API] +type sqlite3_backup = struct { + FpDestDb uintptr + FpDest uintptr + FiDestSchema U32 + FbDestLocked int32 + FiNext Pgno + F__ccgo_pad1 [4]byte + FpSrcDb uintptr + FpSrc uintptr + Frc int32 + FnRemaining Pgno + FnPagecount Pgno + FisAttached int32 + FpNext uintptr +} /* sqlite3.c:578:9 */ + +// CAPI3REF: Online Backup Object +// +// The sqlite3_backup object records state information about an ongoing +// online backup operation. ^The sqlite3_backup object is created by +// a call to [sqlite3_backup_init()] and is destroyed by a call to +// [sqlite3_backup_finish()]. +// +// See Also: [Using the SQLite Online Backup API] +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ + +// CAPI3REF: Database Snapshot +// KEYWORDS: {snapshot} {sqlite3_snapshot} +// +// An instance of the snapshot object records the state of a [WAL mode] +// database for some specific point in history. +// +// In [WAL mode], multiple [database connections] that are open on the +// same database file can each be reading a different historical version +// of the database file. When a [database connection] begins a read +// transaction, that connection sees an unchanging copy of the database +// as it existed for the point in time when the transaction first started. +// Subsequent changes to the database from other connections are not seen +// by the reader until a new read transaction is started. +// +// The sqlite3_snapshot object records state information about an historical +// version of the database file so that it is possible to later open a new read +// transaction that sees that historical version of the database rather than +// the most recent version. +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ + +// CAPI3REF: Database Snapshot +// KEYWORDS: {snapshot} {sqlite3_snapshot} +// +// An instance of the snapshot object records the state of a [WAL mode] +// database for some specific point in history. +// +// In [WAL mode], multiple [database connections] that are open on the +// same database file can each be reading a different historical version +// of the database file. When a [database connection] begins a read +// transaction, that connection sees an unchanging copy of the database +// as it existed for the point in time when the transaction first started. +// Subsequent changes to the database from other connections are not seen +// by the reader until a new read transaction is started. +// +// The sqlite3_snapshot object records state information about an historical +// version of the database file so that it is possible to later open a new read +// transaction that sees that historical version of the database rather than +// the most recent version. +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ + +// CAPI3REF: Flags for sqlite3_deserialize() +// +// The following are allowed values for 6th argument (the F argument) to +// the [sqlite3_deserialize(D,S,P,N,M,F)] interface. +// +// The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization +// in the P argument is held in memory obtained from [sqlite3_malloc64()] +// and that SQLite should take ownership of this memory and automatically +// free it when it has finished using it. Without this flag, the caller +// is responsible for freeing any dynamically allocated memory. +// +// The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to +// grow the size of the database using calls to [sqlite3_realloc64()]. This +// flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used. +// Without this flag, the deserialized database cannot increase in size beyond +// the number of bytes specified by the M parameter. +// +// The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database +// should be treated as read-only. + +// Undo the hack that converts floating point types to integer for +// builds on processors without floating point support. + +//******* Begin file sqlite3rtree.h ******** +// 2010 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +type sqlite3_rtree_geometry = struct { + FpContext uintptr + FnParam int32 + F__ccgo_pad1 [4]byte + FaParam uintptr + FpUser uintptr + FxDelUser uintptr +} /* sqlite3.c:10716:9 */ + +// CAPI3REF: Flags for sqlite3_deserialize() +// +// The following are allowed values for 6th argument (the F argument) to +// the [sqlite3_deserialize(D,S,P,N,M,F)] interface. +// +// The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization +// in the P argument is held in memory obtained from [sqlite3_malloc64()] +// and that SQLite should take ownership of this memory and automatically +// free it when it has finished using it. Without this flag, the caller +// is responsible for freeing any dynamically allocated memory. +// +// The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to +// grow the size of the database using calls to [sqlite3_realloc64()]. This +// flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used. +// Without this flag, the deserialized database cannot increase in size beyond +// the number of bytes specified by the M parameter. +// +// The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database +// should be treated as read-only. + +// Undo the hack that converts floating point types to integer for +// builds on processors without floating point support. + +//******* Begin file sqlite3rtree.h ******** +// 2010 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ +type sqlite3_rtree_query_info = struct { + FpContext uintptr + FnParam int32 + F__ccgo_pad1 [4]byte + FaParam uintptr + FpUser uintptr + FxDelUser uintptr + FaCoord uintptr + FanQueue uintptr + FnCoord int32 + FiLevel int32 + FmxLevel int32 + F__ccgo_pad2 [4]byte + FiRowid Sqlite3_int64 + FrParentScore Sqlite3_rtree_dbl + FeParentWithin int32 + FeWithin int32 + FrScore Sqlite3_rtree_dbl + FapSqlParam uintptr +} /* sqlite3.c:10717:9 */ + +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ + +// The double-precision datatype used by RTree depends on the +// SQLITE_RTREE_INT_ONLY compile-time option. +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ + +// Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. + +//******* End of sqlite3rtree.h ******** +//******* Begin file sqlite3session.h ******** + +// Make sure we can call this stuff from C++. + +// CAPI3REF: Session Object Handle +// +// An instance of this object is a [session] that can be used to +// record changes to a database. +type sqlite3_session = struct { + Fdb uintptr + FzDb uintptr + FbEnableSize int32 + FbEnable int32 + FbIndirect int32 + FbAutoAttach int32 + Frc int32 + F__ccgo_pad1 [4]byte + FpFilterCtx uintptr + FxTableFilter uintptr + FnMalloc I64 + FnMaxChangesetSize I64 + FpZeroBlob uintptr + FpNext uintptr + FpTable uintptr + Fhook SessionHook +} /* sqlite3.c:10832:9 */ + +// Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. + +//******* End of sqlite3rtree.h ******** +//******* Begin file sqlite3session.h ******** + +// Make sure we can call this stuff from C++. + +// CAPI3REF: Session Object Handle +// +// An instance of this object is a [session] that can be used to +// record changes to a database. +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ + +// CAPI3REF: Changeset Iterator Handle +// +// An instance of this object acts as a cursor for iterating +// over the elements of a [changeset] or [patchset]. +type sqlite3_changeset_iter = struct { + Fin SessionInput + Ftblhdr SessionBuffer + FbPatchset int32 + FbInvert int32 + FbSkipEmpty int32 + Frc int32 + FpConflict uintptr + FzTab uintptr + FnCol int32 + Fop int32 + FbIndirect int32 + F__ccgo_pad1 [4]byte + FabPK uintptr + FapValue uintptr +} /* sqlite3.c:10840:9 */ + +// CAPI3REF: Changeset Iterator Handle +// +// An instance of this object acts as a cursor for iterating +// over the elements of a [changeset] or [patchset]. +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ + +// CAPI3REF: Changegroup Handle +// +// A changegroup is an object used to combine two or more +// [changesets] or [patchsets] +type sqlite3_changegroup = struct { + Frc int32 + FbPatch int32 + FpList uintptr +} /* sqlite3.c:11692:9 */ + +// CAPI3REF: Changegroup Handle +// +// A changegroup is an object used to combine two or more +// [changesets] or [patchsets] +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ + +// CAPI3REF: Flags for sqlite3changeset_apply_v2 +// +// The following flags may passed via the 9th parameter to +// [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]: +// +//
    +//
    SQLITE_CHANGESETAPPLY_NOSAVEPOINT
    +// Usually, the sessions module encloses all operations performed by +// a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The +// SAVEPOINT is committed if the changeset or patchset is successfully +// applied, or rolled back if an error occurs. Specifying this flag +// causes the sessions module to omit this savepoint. In this case, if the +// caller has an open transaction or savepoint when apply_v2() is called, +// it may revert the partially applied changeset by rolling it back. +// +//
    SQLITE_CHANGESETAPPLY_INVERT
    +// Invert the changeset before applying it. This is equivalent to inverting +// a changeset using sqlite3changeset_invert() before applying it. It is +// an error to specify this flag with a patchset. + +// CAPI3REF: Constants Passed To The Conflict Handler +// +// Values that may be passed as the second argument to a conflict-handler. +// +//
    +//
    SQLITE_CHANGESET_DATA
    +// The conflict handler is invoked with CHANGESET_DATA as the second argument +// when processing a DELETE or UPDATE change if a row with the required +// PRIMARY KEY fields is present in the database, but one or more other +// (non primary-key) fields modified by the update do not contain the +// expected "before" values. +// +// The conflicting row, in this case, is the database row with the matching +// primary key. +// +//
    SQLITE_CHANGESET_NOTFOUND
    +// The conflict handler is invoked with CHANGESET_NOTFOUND as the second +// argument when processing a DELETE or UPDATE change if a row with the +// required PRIMARY KEY fields is not present in the database. +// +// There is no conflicting row in this case. The results of invoking the +// sqlite3changeset_conflict() API are undefined. +// +//
    SQLITE_CHANGESET_CONFLICT
    +// CHANGESET_CONFLICT is passed as the second argument to the conflict +// handler while processing an INSERT change if the operation would result +// in duplicate primary key values. +// +// The conflicting row in this case is the database row with the matching +// primary key. +// +//
    SQLITE_CHANGESET_FOREIGN_KEY
    +// If foreign key handling is enabled, and applying a changeset leaves the +// database in a state containing foreign key violations, the conflict +// handler is invoked with CHANGESET_FOREIGN_KEY as the second argument +// exactly once before the changeset is committed. If the conflict handler +// returns CHANGESET_OMIT, the changes, including those that caused the +// foreign key constraint violation, are committed. Or, if it returns +// CHANGESET_ABORT, the changeset is rolled back. +// +// No current or conflicting row information is provided. The only function +// it is possible to call on the supplied sqlite3_changeset_iter handle +// is sqlite3changeset_fk_conflicts(). +// +//
    SQLITE_CHANGESET_CONSTRAINT
    +// If any other constraint violation occurs while applying a change (i.e. +// a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is +// invoked with CHANGESET_CONSTRAINT as the second argument. +// +// There is no conflicting row in this case. The results of invoking the +// sqlite3changeset_conflict() API are undefined. +// +//
    + +// CAPI3REF: Constants Returned By The Conflict Handler +// +// A conflict handler callback must return one of the following three values. +// +//
    +//
    SQLITE_CHANGESET_OMIT
    +// If a conflict handler returns this value no special action is taken. The +// change that caused the conflict is not applied. The session module +// continues to the next change in the changeset. +// +//
    SQLITE_CHANGESET_REPLACE
    +// This value may only be returned if the second argument to the conflict +// handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this +// is not the case, any changes applied so far are rolled back and the +// call to sqlite3changeset_apply() returns SQLITE_MISUSE. +// +// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict +// handler, then the conflicting row is either updated or deleted, depending +// on the type of change. +// +// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict +// handler, then the conflicting row is removed from the database and a +// second attempt to apply the change is made. If this second attempt fails, +// the original row is restored to the database before continuing. +// +//
    SQLITE_CHANGESET_ABORT
    +// If this value is returned, any changes applied so far are rolled back +// and the call to sqlite3changeset_apply() returns SQLITE_ABORT. +//
    + +// CAPI3REF: Rebasing changesets +// EXPERIMENTAL +// +// Suppose there is a site hosting a database in state S0. And that +// modifications are made that move that database to state S1 and a +// changeset recorded (the "local" changeset). Then, a changeset based +// on S0 is received from another site (the "remote" changeset) and +// applied to the database. The database is then in state +// (S1+"remote"), where the exact state depends on any conflict +// resolution decisions (OMIT or REPLACE) made while applying "remote". +// Rebasing a changeset is to update it to take those conflict +// resolution decisions into account, so that the same conflicts +// do not have to be resolved elsewhere in the network. +// +// For example, if both the local and remote changesets contain an +// INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)": +// +// local: INSERT INTO t1 VALUES(1, 'v1'); +// remote: INSERT INTO t1 VALUES(1, 'v2'); +// +// and the conflict resolution is REPLACE, then the INSERT change is +// removed from the local changeset (it was overridden). Or, if the +// conflict resolution was "OMIT", then the local changeset is modified +// to instead contain: +// +// UPDATE t1 SET b = 'v2' WHERE a=1; +// +// Changes within the local changeset are rebased as follows: +// +//
    +//
    Local INSERT
    +// This may only conflict with a remote INSERT. If the conflict +// resolution was OMIT, then add an UPDATE change to the rebased +// changeset. Or, if the conflict resolution was REPLACE, add +// nothing to the rebased changeset. +// +//
    Local DELETE
    +// This may conflict with a remote UPDATE or DELETE. In both cases the +// only possible resolution is OMIT. If the remote operation was a +// DELETE, then add no change to the rebased changeset. If the remote +// operation was an UPDATE, then the old.* fields of change are updated +// to reflect the new.* values in the UPDATE. +// +//
    Local UPDATE
    +// This may conflict with a remote UPDATE or DELETE. If it conflicts +// with a DELETE, and the conflict resolution was OMIT, then the update +// is changed into an INSERT. Any undefined values in the new.* record +// from the update change are filled in using the old.* values from +// the conflicting DELETE. Or, if the conflict resolution was REPLACE, +// the UPDATE change is simply omitted from the rebased changeset. +// +// If conflict is with a remote UPDATE and the resolution is OMIT, then +// the old.* values are rebased using the new.* values in the remote +// change. Or, if the resolution is REPLACE, then the change is copied +// into the rebased changeset with updates to columns also updated by +// the conflicting remote UPDATE removed. If this means no columns would +// be updated, the change is omitted. +//
    +// +// A local change may be rebased against multiple remote changes +// simultaneously. If a single key is modified by multiple remote +// changesets, they are combined as follows before the local changeset +// is rebased: +// +//
      +//
    • If there has been one or more REPLACE resolutions on a +// key, it is rebased according to a REPLACE. +// +//
    • If there have been no REPLACE resolutions on a key, then +// the local changeset is rebased according to the most recent +// of the OMIT resolutions. +//
    +// +// Note that conflict resolutions from multiple remote changesets are +// combined on a per-field basis, not per-row. This means that in the +// case of multiple remote UPDATE operations, some fields of a single +// local change may be rebased for REPLACE while others are rebased for +// OMIT. +// +// In order to rebase a local changeset, the remote changeset must first +// be applied to the local database using sqlite3changeset_apply_v2() and +// the buffer of rebase information captured. Then: +// +//
      +//
    1. An sqlite3_rebaser object is created by calling +// sqlite3rebaser_create(). +//
    2. The new object is configured with the rebase buffer obtained from +// sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure(). +// If the local changeset is to be rebased against multiple remote +// changesets, then sqlite3rebaser_configure() should be called +// multiple times, in the same order that the multiple +// sqlite3changeset_apply_v2() calls were made. +//
    3. Each local changeset is rebased by calling sqlite3rebaser_rebase(). +//
    4. The sqlite3_rebaser object is deleted by calling +// sqlite3rebaser_delete(). +//
    +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ + +// CAPI3REF: Flags for sqlite3changeset_apply_v2 +// +// The following flags may passed via the 9th parameter to +// [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]: +// +//
    +//
    SQLITE_CHANGESETAPPLY_NOSAVEPOINT
    +// Usually, the sessions module encloses all operations performed by +// a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The +// SAVEPOINT is committed if the changeset or patchset is successfully +// applied, or rolled back if an error occurs. Specifying this flag +// causes the sessions module to omit this savepoint. In this case, if the +// caller has an open transaction or savepoint when apply_v2() is called, +// it may revert the partially applied changeset by rolling it back. +// +//
    SQLITE_CHANGESETAPPLY_INVERT
    +// Invert the changeset before applying it. This is equivalent to inverting +// a changeset using sqlite3changeset_invert() before applying it. It is +// an error to specify this flag with a patchset. + +// CAPI3REF: Constants Passed To The Conflict Handler +// +// Values that may be passed as the second argument to a conflict-handler. +// +//
    +//
    SQLITE_CHANGESET_DATA
    +// The conflict handler is invoked with CHANGESET_DATA as the second argument +// when processing a DELETE or UPDATE change if a row with the required +// PRIMARY KEY fields is present in the database, but one or more other +// (non primary-key) fields modified by the update do not contain the +// expected "before" values. +// +// The conflicting row, in this case, is the database row with the matching +// primary key. +// +//
    SQLITE_CHANGESET_NOTFOUND
    +// The conflict handler is invoked with CHANGESET_NOTFOUND as the second +// argument when processing a DELETE or UPDATE change if a row with the +// required PRIMARY KEY fields is not present in the database. +// +// There is no conflicting row in this case. The results of invoking the +// sqlite3changeset_conflict() API are undefined. +// +//
    SQLITE_CHANGESET_CONFLICT
    +// CHANGESET_CONFLICT is passed as the second argument to the conflict +// handler while processing an INSERT change if the operation would result +// in duplicate primary key values. +// +// The conflicting row in this case is the database row with the matching +// primary key. +// +//
    SQLITE_CHANGESET_FOREIGN_KEY
    +// If foreign key handling is enabled, and applying a changeset leaves the +// database in a state containing foreign key violations, the conflict +// handler is invoked with CHANGESET_FOREIGN_KEY as the second argument +// exactly once before the changeset is committed. If the conflict handler +// returns CHANGESET_OMIT, the changes, including those that caused the +// foreign key constraint violation, are committed. Or, if it returns +// CHANGESET_ABORT, the changeset is rolled back. +// +// No current or conflicting row information is provided. The only function +// it is possible to call on the supplied sqlite3_changeset_iter handle +// is sqlite3changeset_fk_conflicts(). +// +//
    SQLITE_CHANGESET_CONSTRAINT
    +// If any other constraint violation occurs while applying a change (i.e. +// a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is +// invoked with CHANGESET_CONSTRAINT as the second argument. +// +// There is no conflicting row in this case. The results of invoking the +// sqlite3changeset_conflict() API are undefined. +// +//
    + +// CAPI3REF: Constants Returned By The Conflict Handler +// +// A conflict handler callback must return one of the following three values. +// +//
    +//
    SQLITE_CHANGESET_OMIT
    +// If a conflict handler returns this value no special action is taken. The +// change that caused the conflict is not applied. The session module +// continues to the next change in the changeset. +// +//
    SQLITE_CHANGESET_REPLACE
    +// This value may only be returned if the second argument to the conflict +// handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this +// is not the case, any changes applied so far are rolled back and the +// call to sqlite3changeset_apply() returns SQLITE_MISUSE. +// +// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict +// handler, then the conflicting row is either updated or deleted, depending +// on the type of change. +// +// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict +// handler, then the conflicting row is removed from the database and a +// second attempt to apply the change is made. If this second attempt fails, +// the original row is restored to the database before continuing. +// +//
    SQLITE_CHANGESET_ABORT
    +// If this value is returned, any changes applied so far are rolled back +// and the call to sqlite3changeset_apply() returns SQLITE_ABORT. +//
    + +// CAPI3REF: Rebasing changesets +// EXPERIMENTAL +// +// Suppose there is a site hosting a database in state S0. And that +// modifications are made that move that database to state S1 and a +// changeset recorded (the "local" changeset). Then, a changeset based +// on S0 is received from another site (the "remote" changeset) and +// applied to the database. The database is then in state +// (S1+"remote"), where the exact state depends on any conflict +// resolution decisions (OMIT or REPLACE) made while applying "remote". +// Rebasing a changeset is to update it to take those conflict +// resolution decisions into account, so that the same conflicts +// do not have to be resolved elsewhere in the network. +// +// For example, if both the local and remote changesets contain an +// INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)": +// +// local: INSERT INTO t1 VALUES(1, 'v1'); +// remote: INSERT INTO t1 VALUES(1, 'v2'); +// +// and the conflict resolution is REPLACE, then the INSERT change is +// removed from the local changeset (it was overridden). Or, if the +// conflict resolution was "OMIT", then the local changeset is modified +// to instead contain: +// +// UPDATE t1 SET b = 'v2' WHERE a=1; +// +// Changes within the local changeset are rebased as follows: +// +//
    +//
    Local INSERT
    +// This may only conflict with a remote INSERT. If the conflict +// resolution was OMIT, then add an UPDATE change to the rebased +// changeset. Or, if the conflict resolution was REPLACE, add +// nothing to the rebased changeset. +// +//
    Local DELETE
    +// This may conflict with a remote UPDATE or DELETE. In both cases the +// only possible resolution is OMIT. If the remote operation was a +// DELETE, then add no change to the rebased changeset. If the remote +// operation was an UPDATE, then the old.* fields of change are updated +// to reflect the new.* values in the UPDATE. +// +//
    Local UPDATE
    +// This may conflict with a remote UPDATE or DELETE. If it conflicts +// with a DELETE, and the conflict resolution was OMIT, then the update +// is changed into an INSERT. Any undefined values in the new.* record +// from the update change are filled in using the old.* values from +// the conflicting DELETE. Or, if the conflict resolution was REPLACE, +// the UPDATE change is simply omitted from the rebased changeset. +// +// If conflict is with a remote UPDATE and the resolution is OMIT, then +// the old.* values are rebased using the new.* values in the remote +// change. Or, if the resolution is REPLACE, then the change is copied +// into the rebased changeset with updates to columns also updated by +// the conflicting remote UPDATE removed. If this means no columns would +// be updated, the change is omitted. +//
    +// +// A local change may be rebased against multiple remote changes +// simultaneously. If a single key is modified by multiple remote +// changesets, they are combined as follows before the local changeset +// is rebased: +// +//
      +//
    • If there has been one or more REPLACE resolutions on a +// key, it is rebased according to a REPLACE. +// +//
    • If there have been no REPLACE resolutions on a key, then +// the local changeset is rebased according to the most recent +// of the OMIT resolutions. +//
    +// +// Note that conflict resolutions from multiple remote changesets are +// combined on a per-field basis, not per-row. This means that in the +// case of multiple remote UPDATE operations, some fields of a single +// local change may be rebased for REPLACE while others are rebased for +// OMIT. +// +// In order to rebase a local changeset, the remote changeset must first +// be applied to the local database using sqlite3changeset_apply_v2() and +// the buffer of rebase information captured. Then: +// +//
      +//
    1. An sqlite3_rebaser object is created by calling +// sqlite3rebaser_create(). +//
    2. The new object is configured with the rebase buffer obtained from +// sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure(). +// If the local changeset is to be rebased against multiple remote +// changesets, then sqlite3rebaser_configure() should be called +// multiple times, in the same order that the multiple +// sqlite3changeset_apply_v2() calls were made. +//
    3. Each local changeset is rebased by calling sqlite3rebaser_rebase(). +//
    4. The sqlite3_rebaser object is deleted by calling +// sqlite3rebaser_delete(). +//
    +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ + +// CAPI3REF: Values for sqlite3session_config(). + +// Make sure we can call this stuff from C++. + +//******* End of sqlite3session.h ******** +//******* Begin file fts5.h ******** +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Interfaces to extend FTS5. Using the interfaces defined in this file, +// FTS5 may be extended with: +// +// * custom tokenizers, and +// * custom auxiliary functions. + +// ************************************************************************ +// +// CUSTOM AUXILIARY FUNCTIONS +// +// Virtual table implementations may overload SQL functions by implementing +// the sqlite3_module.xFindFunction() method. + +type Fts5ExtensionApi1 = struct { + FiVersion int32 + F__ccgo_pad1 [4]byte + FxUserData uintptr + FxColumnCount uintptr + FxRowCount uintptr + FxColumnTotalSize uintptr + FxTokenize uintptr + FxPhraseCount uintptr + FxPhraseSize uintptr + FxInstCount uintptr + FxInst uintptr + FxRowid uintptr + FxColumnText uintptr + FxColumnSize uintptr + FxQueryPhrase uintptr + FxSetAuxdata uintptr + FxGetAuxdata uintptr + FxPhraseFirst uintptr + FxPhraseNext uintptr + FxPhraseFirstColumn uintptr + FxPhraseNextColumn uintptr +} /* sqlite3.c:12572:9 */ + +// CAPI3REF: Values for sqlite3session_config(). + +// Make sure we can call this stuff from C++. + +//******* End of sqlite3session.h ******** +//******* Begin file fts5.h ******** +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Interfaces to extend FTS5. Using the interfaces defined in this file, +// FTS5 may be extended with: +// +// * custom tokenizers, and +// * custom auxiliary functions. + +// ************************************************************************ +// +// CUSTOM AUXILIARY FUNCTIONS +// +// Virtual table implementations may overload SQL functions by implementing +// the sqlite3_module.xFindFunction() method. + +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ +type Fts5PhraseIter1 = struct { + Fa uintptr + Fb uintptr +} /* sqlite3.c:12574:9 */ + +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ + +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ +type fts5_tokenizer = struct { + FxCreate uintptr + FxDelete uintptr + FxTokenize uintptr +} /* sqlite3.c:13035:9 */ + +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ + +// Flags that may be passed as the third argument to xTokenize() + +// Flags that may be passed by the tokenizer implementation back to FTS5 +// as the third argument to the supplied xToken callback. + +// +// END OF CUSTOM TOKENIZERS +// + +// ************************************************************************ +// +// FTS5 EXTENSION REGISTRATION API +type fts5_api = struct { + FiVersion int32 + F__ccgo_pad1 [4]byte + FxCreateTokenizer uintptr + FxFindTokenizer uintptr + FxCreateFunction uintptr +} /* sqlite3.c:13071:9 */ + +// Flags that may be passed as the third argument to xTokenize() + +// Flags that may be passed by the tokenizer implementation back to FTS5 +// as the third argument to the supplied xToken callback. + +// +// END OF CUSTOM TOKENIZERS +// + +// ************************************************************************ +// +// FTS5 EXTENSION REGISTRATION API +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ + +// +// END OF REGISTRATION API +// + +//******* End of fts5.h ******** + +//************* End of sqlite3.h ******************************************** +//************* Continuing where we left off in sqliteInt.h ***************** + +// Include the configuration header output by 'configure' if we're using the +// autoconf-based build + +//************* Include sqliteLimit.h in the middle of sqliteInt.h ********** +//************* Begin file sqliteLimit.h ************************************ +// 2007 May 7 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file defines various limits of what SQLite can process. + +// The maximum length of a TEXT or BLOB in bytes. This also +// limits the size of a row in a table or index. +// +// The hard limit is the ability of a 32-bit signed integer +// to count the size: 2^31-1 or 2147483647. + +// This is the maximum number of +// +// * Columns in a table +// * Columns in an index +// * Columns in a view +// * Terms in the SET clause of an UPDATE statement +// * Terms in the result set of a SELECT statement +// * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement. +// * Terms in the VALUES clause of an INSERT statement +// +// The hard upper limit here is 32676. Most database people will +// tell you that in a well-normalized database, you usually should +// not have more than a dozen or so columns in any table. And if +// that is the case, there is no point in having more than a few +// dozen values in any of the other situations described above. + +// The maximum length of a single SQL statement in bytes. +// +// It used to be the case that setting this value to zero would +// turn the limit off. That is no longer true. It is not possible +// to turn this limit off. + +// The maximum depth of an expression tree. This is limited to +// some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might +// want to place more severe limits on the complexity of an +// expression. A value of 0 means that there is no limit. + +// The maximum number of terms in a compound SELECT statement. +// The code generator for compound SELECT statements does one +// level of recursion for each term. A stack overflow can result +// if the number of terms is too large. In practice, most SQL +// never has more than 3 or 4 terms. Use a value of 0 to disable +// any limit on the number of terms in a compount SELECT. + +// The maximum number of opcodes in a VDBE program. +// Not currently enforced. + +// The maximum number of arguments to an SQL function. + +// The suggested maximum number of in-memory pages to use for +// the main database table and for temporary tables. +// +// IMPLEMENTATION-OF: R-30185-15359 The default suggested cache size is -2000, +// which means the cache size is limited to 2048000 bytes of memory. +// IMPLEMENTATION-OF: R-48205-43578 The default suggested cache size can be +// altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options. + +// The default number of frames to accumulate in the log file before +// checkpointing the database in WAL mode. + +// The maximum number of attached databases. This must be between 0 +// and 125. The upper bound of 125 is because the attached databases are +// counted using a signed 8-bit integer which has a maximum value of 127 +// and we have to allow 2 extra counts for the "main" and "temp" databases. + +// The maximum value of a ?nnn wildcard that the parser will accept. +// If the value exceeds 32767 then extra space is required for the Expr +// structure. But otherwise, we believe that the number can be as large +// as a signed 32-bit integer can hold. + +// Maximum page size. The upper bound on this value is 65536. This a limit +// imposed by the use of 16-bit offsets within each page. +// +// Earlier versions of SQLite allowed the user to change this value at +// compile time. This is no longer permitted, on the grounds that it creates +// a library that is technically incompatible with an SQLite library +// compiled with a different limit. If a process operating on a database +// with a page-size of 65536 bytes crashes, then an instance of SQLite +// compiled with the default page-size limit will not be able to rollback +// the aborted transaction. This could lead to database corruption. + +// The default size of a database page. + +// Ordinarily, if no value is explicitly provided, SQLite creates databases +// with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain +// device characteristics (sector-size and atomic write() support), +// SQLite may choose a larger value. This constant is the maximum value +// SQLite will choose on its own. + +// Maximum number of pages in one database file. +// +// This is really just the default value for the max_page_count pragma. +// This value can be lowered (or raised) at run-time using that the +// max_page_count macro. + +// Maximum length (in bytes) of the pattern in a LIKE or GLOB +// operator. + +// Maximum depth of recursion for triggers. +// +// A value of 1 means that a trigger program will not be able to itself +// fire any triggers. A value of 0 means that no trigger programs at all +// may be executed. + +//************* End of sqliteLimit.h **************************************** +//************* Continuing where we left off in sqliteInt.h ***************** + +// Disable nuisance warnings on Borland compilers + +// WAL mode depends on atomic aligned 32-bit loads and stores in a few +// places. The following macros try to make this explicit. + +// Include standard header files as necessary + +// The following macros are used to cast pointers to integers and +// integers to pointers. The way you do this varies from one compiler +// to the next, so we have developed the following set of #if statements +// to generate appropriate macros for a wide range of compilers. +// +// The correct "ANSI" way to do this is to use the intptr_t type. +// Unfortunately, that typedef is not available on all compilers, or +// if it is available, it requires an #include of specific headers +// that vary from one machine to the next. +// +// Ticket #3860: The llvm-gcc-4.2 compiler from Apple chokes on +// the ((void*)&((char*)0)[X]) construct. But MSVC chokes on ((void*)(X)). +// So we have to define the macros in different ways depending on the +// compiler. + +// A macro to hint to the compiler that a function should not be +// inlined. + +// Make sure that the compiler intrinsics we desire are enabled when +// compiling with an appropriate version of MSVC unless prevented by +// the SQLITE_DISABLE_INTRINSIC define. + +// The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2. +// 0 means mutexes are permanently disable and the library is never +// threadsafe. 1 means the library is serialized which is the highest +// level of threadsafety. 2 means the library is multithreaded - multiple +// threads can use SQLite as long as no two threads try to use the same +// database connection at the same time. +// +// Older versions of SQLite used an optional THREADSAFE macro. +// We support that for legacy. +// +// To ensure that the correct value of "THREADSAFE" is reported when querying +// for compile-time options at runtime (e.g. "PRAGMA compile_options"), this +// logic is partially replicated in ctime.c. If it is updated here, it should +// also be updated there. + +// Powersafe overwrite is on by default. But can be turned off using +// the -DSQLITE_POWERSAFE_OVERWRITE=0 command-line option. + +// EVIDENCE-OF: R-25715-37072 Memory allocation statistics are enabled by +// default unless SQLite is compiled with SQLITE_DEFAULT_MEMSTATUS=0 in +// which case memory allocation statistics are disabled by default. + +// Exactly one of the following macros must be defined in order to +// specify which memory allocation subsystem to use. +// +// SQLITE_SYSTEM_MALLOC // Use normal system malloc() +// SQLITE_WIN32_MALLOC // Use Win32 native heap API +// SQLITE_ZERO_MALLOC // Use a stub allocator that always fails +// SQLITE_MEMDEBUG // Debugging version of system malloc() +// +// On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the +// assert() macro is enabled, each call into the Win32 native heap subsystem +// will cause HeapValidate to be called. If heap validation should fail, an +// assertion will be triggered. +// +// If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as +// the default. + +// If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the +// sizes of memory allocations below this value where possible. + +// We need to define _XOPEN_SOURCE as follows in order to enable +// recursive mutexes on most Unix systems and fchmod() on OpenBSD. +// But _XOPEN_SOURCE define causes problems for Mac OS X, so omit +// it. + +// NDEBUG and SQLITE_DEBUG are opposites. It should always be true that +// defined(NDEBUG)==!defined(SQLITE_DEBUG). If this is not currently true, +// make it true by defining or undefining NDEBUG. +// +// Setting NDEBUG makes the code smaller and faster by disabling the +// assert() statements in the code. So we want the default action +// to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG +// is set. Thus NDEBUG becomes an opt-in rather than an opt-out +// feature. + +// Enable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_DEBUG is turned on. + +// The testcase() macro is used to aid in coverage testing. When +// doing coverage testing, the condition inside the argument to +// testcase() must be evaluated both true and false in order to +// get full branch coverage. The testcase() macro is inserted +// to help ensure adequate test coverage in places where simple +// condition/decision coverage is inadequate. For example, testcase() +// can be used to make sure boundary values are tested. For +// bitmask tests, testcase() can be used to make sure each bit +// is significant and used at least once. On switch statements +// where multiple cases go to the same block of code, testcase() +// can insure that all cases are evaluated. + +// The TESTONLY macro is used to enclose variable declarations or +// other bits of code that are needed to support the arguments +// within testcase() and assert() macros. + +// Sometimes we need a small amount of code such as a variable initialization +// to setup for a later assert() statement. We do not want this code to +// appear when assert() is disabled. The following macro is therefore +// used to contain that setup code. The "VVA" acronym stands for +// "Verification, Validation, and Accreditation". In other words, the +// code within VVA_ONLY() will only run during verification processes. + +// Disable ALWAYS() and NEVER() (make them pass-throughs) for coverage +// and mutation testing + +// The ALWAYS and NEVER macros surround boolean expressions which +// are intended to always be true or false, respectively. Such +// expressions could be omitted from the code completely. But they +// are included in a few cases in order to enhance the resilience +// of SQLite to unexpected behavior - to make the code "self-healing" +// or "ductile" rather than being "brittle" and crashing at the first +// hint of unplanned behavior. +// +// In other words, ALWAYS and NEVER are added for defensive code. +// +// When doing coverage testing ALWAYS and NEVER are hard-coded to +// be true and false so that the unreachable code they specify will +// not be counted as untested code. + +// Some conditionals are optimizations only. In other words, if the +// conditionals are replaced with a constant 1 (true) or 0 (false) then +// the correct answer is still obtained, though perhaps not as quickly. +// +// The following macros mark these optimizations conditionals. + +// Some malloc failures are only possible if SQLITE_TEST_REALLOC_STRESS is +// defined. We need to defend against those failures when testing with +// SQLITE_TEST_REALLOC_STRESS, but we don't want the unreachable branches +// during a normal build. The following macro can be used to disable tests +// that are always false except when SQLITE_TEST_REALLOC_STRESS is set. + +// Declarations used for tracing the operating system interfaces. + +// Is the sqlite3ErrName() function needed in the build? Currently, +// it is needed by "mutex_w32.c" (when debugging), "os_win.c" (when +// OSTRACE is enabled), and by several "test*.c" files (which are +// compiled using SQLITE_TEST). + +// SQLITE_ENABLE_EXPLAIN_COMMENTS is incompatible with SQLITE_OMIT_EXPLAIN + +// SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTERTABLE + +// Return true (non-zero) if the input is an integer that is too large +// to fit in 32-bits. This macro is used inside of various testcase() +// macros to verify that we have tested SQLite for large-file support. + +// The macro unlikely() is a hint that surrounds a boolean +// expression that is usually false. Macro likely() surrounds +// a boolean expression that is usually true. These hints could, +// in theory, be used by the compiler to generate better code, but +// currently they are just comments for human readers. + +//************* Include hash.h in the middle of sqliteInt.h ***************** +//************* Begin file hash.h ******************************************* +// 2001 September 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This is the header file for the generic hash-table implementation +// used in SQLite. + +// Forward declarations of structures. +type Hash1 = struct { + Fhtsize uint32 + Fcount uint32 + Ffirst uintptr + Fht uintptr +} /* sqlite3.c:578:9 */ + +// +// END OF REGISTRATION API +// + +//******* End of fts5.h ******** + +//************* End of sqlite3.h ******************************************** +//************* Continuing where we left off in sqliteInt.h ***************** + +// Include the configuration header output by 'configure' if we're using the +// autoconf-based build + +//************* Include sqliteLimit.h in the middle of sqliteInt.h ********** +//************* Begin file sqliteLimit.h ************************************ +// 2007 May 7 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file defines various limits of what SQLite can process. + +// The maximum length of a TEXT or BLOB in bytes. This also +// limits the size of a row in a table or index. +// +// The hard limit is the ability of a 32-bit signed integer +// to count the size: 2^31-1 or 2147483647. + +// This is the maximum number of +// +// * Columns in a table +// * Columns in an index +// * Columns in a view +// * Terms in the SET clause of an UPDATE statement +// * Terms in the result set of a SELECT statement +// * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement. +// * Terms in the VALUES clause of an INSERT statement +// +// The hard upper limit here is 32676. Most database people will +// tell you that in a well-normalized database, you usually should +// not have more than a dozen or so columns in any table. And if +// that is the case, there is no point in having more than a few +// dozen values in any of the other situations described above. + +// The maximum length of a single SQL statement in bytes. +// +// It used to be the case that setting this value to zero would +// turn the limit off. That is no longer true. It is not possible +// to turn this limit off. + +// The maximum depth of an expression tree. This is limited to +// some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might +// want to place more severe limits on the complexity of an +// expression. A value of 0 means that there is no limit. + +// The maximum number of terms in a compound SELECT statement. +// The code generator for compound SELECT statements does one +// level of recursion for each term. A stack overflow can result +// if the number of terms is too large. In practice, most SQL +// never has more than 3 or 4 terms. Use a value of 0 to disable +// any limit on the number of terms in a compount SELECT. + +// The maximum number of opcodes in a VDBE program. +// Not currently enforced. + +// The maximum number of arguments to an SQL function. + +// The suggested maximum number of in-memory pages to use for +// the main database table and for temporary tables. +// +// IMPLEMENTATION-OF: R-30185-15359 The default suggested cache size is -2000, +// which means the cache size is limited to 2048000 bytes of memory. +// IMPLEMENTATION-OF: R-48205-43578 The default suggested cache size can be +// altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options. + +// The default number of frames to accumulate in the log file before +// checkpointing the database in WAL mode. + +// The maximum number of attached databases. This must be between 0 +// and 125. The upper bound of 125 is because the attached databases are +// counted using a signed 8-bit integer which has a maximum value of 127 +// and we have to allow 2 extra counts for the "main" and "temp" databases. + +// The maximum value of a ?nnn wildcard that the parser will accept. +// If the value exceeds 32767 then extra space is required for the Expr +// structure. But otherwise, we believe that the number can be as large +// as a signed 32-bit integer can hold. + +// Maximum page size. The upper bound on this value is 65536. This a limit +// imposed by the use of 16-bit offsets within each page. +// +// Earlier versions of SQLite allowed the user to change this value at +// compile time. This is no longer permitted, on the grounds that it creates +// a library that is technically incompatible with an SQLite library +// compiled with a different limit. If a process operating on a database +// with a page-size of 65536 bytes crashes, then an instance of SQLite +// compiled with the default page-size limit will not be able to rollback +// the aborted transaction. This could lead to database corruption. + +// The default size of a database page. + +// Ordinarily, if no value is explicitly provided, SQLite creates databases +// with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain +// device characteristics (sector-size and atomic write() support), +// SQLite may choose a larger value. This constant is the maximum value +// SQLite will choose on its own. + +// Maximum number of pages in one database file. +// +// This is really just the default value for the max_page_count pragma. +// This value can be lowered (or raised) at run-time using that the +// max_page_count macro. + +// Maximum length (in bytes) of the pattern in a LIKE or GLOB +// operator. + +// Maximum depth of recursion for triggers. +// +// A value of 1 means that a trigger program will not be able to itself +// fire any triggers. A value of 0 means that no trigger programs at all +// may be executed. + +//************* End of sqliteLimit.h **************************************** +//************* Continuing where we left off in sqliteInt.h ***************** + +// Disable nuisance warnings on Borland compilers + +// WAL mode depends on atomic aligned 32-bit loads and stores in a few +// places. The following macros try to make this explicit. + +// Include standard header files as necessary + +// The following macros are used to cast pointers to integers and +// integers to pointers. The way you do this varies from one compiler +// to the next, so we have developed the following set of #if statements +// to generate appropriate macros for a wide range of compilers. +// +// The correct "ANSI" way to do this is to use the intptr_t type. +// Unfortunately, that typedef is not available on all compilers, or +// if it is available, it requires an #include of specific headers +// that vary from one machine to the next. +// +// Ticket #3860: The llvm-gcc-4.2 compiler from Apple chokes on +// the ((void*)&((char*)0)[X]) construct. But MSVC chokes on ((void*)(X)). +// So we have to define the macros in different ways depending on the +// compiler. + +// A macro to hint to the compiler that a function should not be +// inlined. + +// Make sure that the compiler intrinsics we desire are enabled when +// compiling with an appropriate version of MSVC unless prevented by +// the SQLITE_DISABLE_INTRINSIC define. + +// The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2. +// 0 means mutexes are permanently disable and the library is never +// threadsafe. 1 means the library is serialized which is the highest +// level of threadsafety. 2 means the library is multithreaded - multiple +// threads can use SQLite as long as no two threads try to use the same +// database connection at the same time. +// +// Older versions of SQLite used an optional THREADSAFE macro. +// We support that for legacy. +// +// To ensure that the correct value of "THREADSAFE" is reported when querying +// for compile-time options at runtime (e.g. "PRAGMA compile_options"), this +// logic is partially replicated in ctime.c. If it is updated here, it should +// also be updated there. + +// Powersafe overwrite is on by default. But can be turned off using +// the -DSQLITE_POWERSAFE_OVERWRITE=0 command-line option. + +// EVIDENCE-OF: R-25715-37072 Memory allocation statistics are enabled by +// default unless SQLite is compiled with SQLITE_DEFAULT_MEMSTATUS=0 in +// which case memory allocation statistics are disabled by default. + +// Exactly one of the following macros must be defined in order to +// specify which memory allocation subsystem to use. +// +// SQLITE_SYSTEM_MALLOC // Use normal system malloc() +// SQLITE_WIN32_MALLOC // Use Win32 native heap API +// SQLITE_ZERO_MALLOC // Use a stub allocator that always fails +// SQLITE_MEMDEBUG // Debugging version of system malloc() +// +// On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the +// assert() macro is enabled, each call into the Win32 native heap subsystem +// will cause HeapValidate to be called. If heap validation should fail, an +// assertion will be triggered. +// +// If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as +// the default. + +// If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the +// sizes of memory allocations below this value where possible. + +// We need to define _XOPEN_SOURCE as follows in order to enable +// recursive mutexes on most Unix systems and fchmod() on OpenBSD. +// But _XOPEN_SOURCE define causes problems for Mac OS X, so omit +// it. + +// NDEBUG and SQLITE_DEBUG are opposites. It should always be true that +// defined(NDEBUG)==!defined(SQLITE_DEBUG). If this is not currently true, +// make it true by defining or undefining NDEBUG. +// +// Setting NDEBUG makes the code smaller and faster by disabling the +// assert() statements in the code. So we want the default action +// to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG +// is set. Thus NDEBUG becomes an opt-in rather than an opt-out +// feature. + +// Enable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_DEBUG is turned on. + +// The testcase() macro is used to aid in coverage testing. When +// doing coverage testing, the condition inside the argument to +// testcase() must be evaluated both true and false in order to +// get full branch coverage. The testcase() macro is inserted +// to help ensure adequate test coverage in places where simple +// condition/decision coverage is inadequate. For example, testcase() +// can be used to make sure boundary values are tested. For +// bitmask tests, testcase() can be used to make sure each bit +// is significant and used at least once. On switch statements +// where multiple cases go to the same block of code, testcase() +// can insure that all cases are evaluated. + +// The TESTONLY macro is used to enclose variable declarations or +// other bits of code that are needed to support the arguments +// within testcase() and assert() macros. + +// Sometimes we need a small amount of code such as a variable initialization +// to setup for a later assert() statement. We do not want this code to +// appear when assert() is disabled. The following macro is therefore +// used to contain that setup code. The "VVA" acronym stands for +// "Verification, Validation, and Accreditation". In other words, the +// code within VVA_ONLY() will only run during verification processes. + +// Disable ALWAYS() and NEVER() (make them pass-throughs) for coverage +// and mutation testing + +// The ALWAYS and NEVER macros surround boolean expressions which +// are intended to always be true or false, respectively. Such +// expressions could be omitted from the code completely. But they +// are included in a few cases in order to enhance the resilience +// of SQLite to unexpected behavior - to make the code "self-healing" +// or "ductile" rather than being "brittle" and crashing at the first +// hint of unplanned behavior. +// +// In other words, ALWAYS and NEVER are added for defensive code. +// +// When doing coverage testing ALWAYS and NEVER are hard-coded to +// be true and false so that the unreachable code they specify will +// not be counted as untested code. + +// Some conditionals are optimizations only. In other words, if the +// conditionals are replaced with a constant 1 (true) or 0 (false) then +// the correct answer is still obtained, though perhaps not as quickly. +// +// The following macros mark these optimizations conditionals. + +// Some malloc failures are only possible if SQLITE_TEST_REALLOC_STRESS is +// defined. We need to defend against those failures when testing with +// SQLITE_TEST_REALLOC_STRESS, but we don't want the unreachable branches +// during a normal build. The following macro can be used to disable tests +// that are always false except when SQLITE_TEST_REALLOC_STRESS is set. + +// Declarations used for tracing the operating system interfaces. + +// Is the sqlite3ErrName() function needed in the build? Currently, +// it is needed by "mutex_w32.c" (when debugging), "os_win.c" (when +// OSTRACE is enabled), and by several "test*.c" files (which are +// compiled using SQLITE_TEST). + +// SQLITE_ENABLE_EXPLAIN_COMMENTS is incompatible with SQLITE_OMIT_EXPLAIN + +// SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTERTABLE + +// Return true (non-zero) if the input is an integer that is too large +// to fit in 32-bits. This macro is used inside of various testcase() +// macros to verify that we have tested SQLite for large-file support. + +// The macro unlikely() is a hint that surrounds a boolean +// expression that is usually false. Macro likely() surrounds +// a boolean expression that is usually true. These hints could, +// in theory, be used by the compiler to generate better code, but +// currently they are just comments for human readers. + +//************* Include hash.h in the middle of sqliteInt.h ***************** +//************* Begin file hash.h ******************************************* +// 2001 September 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This is the header file for the generic hash-table implementation +// used in SQLite. + +// Forward declarations of structures. +type Hash = Hash1 /* sqlite3.c:13744:21 */ +type HashElem1 = struct { + Fnext uintptr + Fprev uintptr + Fdata uintptr + FpKey uintptr +} /* sqlite3.c:578:9 */ + +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ + +// A complete hash table is an instance of the following structure. +// The internals of this structure are intended to be opaque -- client +// code should not attempt to access or modify the fields of this structure +// directly. Change this structure only by using the routines below. +// However, some of the "procedures" and "functions" for modifying and +// accessing this structure are really macros, so we can't really make +// this structure opaque. +// +// All elements of the hash table are on a single doubly-linked list. +// Hash.first points to the head of this list. +// +// There are Hash.htsize buckets. Each bucket points to a spot in +// the global doubly-linked list. The contents of the bucket are the +// element pointed to plus the next _ht.count-1 elements in the list. +// +// Hash.htsize and Hash.ht may be zero. In that case lookup is done +// by a linear search of the global list. For small tables, the +// Hash.ht table is never allocated because if there are few elements +// in the table, it is faster to do a linear search than to manage +// the hash table. +type _ht = struct { + Fcount uint32 + F__ccgo_pad1 [4]byte + Fchain uintptr +} /* sqlite3.c:578:9 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.15 Variable arguments + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1991-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// Bit size of the time_t type at glibc build time, RISC-V case. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// RV32 and RV64 both use 64-bit time_t + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S_TYPE and __U_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Chris Metcalf , 2011. +// +// 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 +// . + +// See for the meaning of these macros. This file exists so +// that need not vary across different GNU platforms. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// And for getitimer, setitimer and rusage + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. RISC-V version. +// Copyright (C) 2020-2021 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 +// . + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. +type X__suseconds64_t = int64 /* types.h:163:33 */ + +type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:169:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:172:12 */ + +// Type to represent block size. +type X__blksize_t = int32 /* types.h:175:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:180:28 */ +type X__blkcnt64_t = int64 /* types.h:181:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:184:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:188:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:192:28 */ + +type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:197:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:199:33 */ + +// These few don't really vary by system, they always correspond +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:204:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:207:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:210:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:215:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Integral type unchanged by default argument promotions that can +// hold any value corresponding to members of the extended character +// set, as well as at least one value that does not correspond to any +// member of the extended character set. + +// Conversion state information. +type X__mbstate_t = struct { + F__count int32 + F__value struct{ F__wch uint32 } +} /* __mbstate_t.h:21:3 */ + +// The tag name of this struct is _G_fpos_t to preserve historic +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. +type _G_fpos_t = struct { + F__pos X__off_t + F__state X__mbstate_t +} /* __fpos_t.h:10:9 */ + +// The tag name of this struct is _G_fpos_t to preserve historic +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. +type X__fpos_t = _G_fpos_t /* __fpos_t.h:14:3 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// The tag name of this struct is _G_fpos64_t to preserve historic +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. +type _G_fpos64_t = struct { + F__pos X__off64_t + F__state X__mbstate_t +} /* __fpos64_t.h:10:9 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// The tag name of this struct is _G_fpos64_t to preserve historic +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. +type X__fpos64_t = _G_fpos64_t /* __fpos64_t.h:14:3 */ + +type _IO_FILE = struct { + F_flags int32 + F__ccgo_pad1 [4]byte + F_IO_read_ptr uintptr + F_IO_read_end uintptr + F_IO_read_base uintptr + F_IO_write_base uintptr + F_IO_write_ptr uintptr + F_IO_write_end uintptr + F_IO_buf_base uintptr + F_IO_buf_end uintptr + F_IO_save_base uintptr + F_IO_backup_base uintptr + F_IO_save_end uintptr + F_markers uintptr + F_chain uintptr + F_fileno int32 + F_flags2 int32 + F_old_offset X__off_t + F_cur_column uint16 + F_vtable_offset int8 + F_shortbuf [1]uint8 + F__ccgo_pad2 [4]byte + F_lock uintptr + F_offset X__off64_t + F_codecvt uintptr + F_wide_data uintptr + F_freeres_list uintptr + F_freeres_buf uintptr + F__pad5 Size_t + F_mode int32 + F_unused2 [20]uint8 +} /* __FILE.h:4:1 */ + +type X__FILE = _IO_FILE /* __FILE.h:5:25 */ + +// The opaque type of streams. This is the definition used elsewhere. +type FILE = _IO_FILE /* FILE.h:7:25 */ + +// The structure with the cookie function pointers. +// The tag name of this struct is _IO_cookie_io_functions_t to +// preserve historic C++ mangled names for functions taking +// cookie_io_functions_t arguments. That name should not be used in +// new code. +type _IO_cookie_io_functions_t = struct { + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fclose uintptr +} /* cookie_io_functions_t.h:55:9 */ + +// The structure with the cookie function pointers. +// The tag name of this struct is _IO_cookie_io_functions_t to +// preserve historic C++ mangled names for functions taking +// cookie_io_functions_t arguments. That name should not be used in +// new code. +type Cookie_io_functions_t = _IO_cookie_io_functions_t /* cookie_io_functions_t.h:61:3 */ + +type Off_t = X__off64_t /* stdio.h:65:19 */ +type Off64_t = X__off64_t /* stdio.h:70:19 */ + +type Ssize_t = X__ssize_t /* stdio.h:77:19 */ + +// The type of the second argument to `fgetpos' and `fsetpos'. +type Fpos_t = X__fpos64_t /* stdio.h:86:20 */ +type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */ + +// A null pointer constant. + +// XPG requires a few symbols from being defined. +// Definitions of flag bits for `waitpid' et al. +// Copyright (C) 1992-2021 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 +// . + +// Bits in the third argument to `waitpid'. + +// Bits in the fourth argument to `waitid'. + +// Definitions of status bits for `wait' et al. +// Copyright (C) 1992-2021 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 +// . + +// Everything extant so far uses these same bits. + +// If WIFEXITED(STATUS), the low-order 8 bits of the status. + +// If WIFSIGNALED(STATUS), the terminating signal. + +// If WIFSTOPPED(STATUS), the signal that stopped the child. + +// Nonzero if STATUS indicates normal termination. + +// Nonzero if STATUS indicates termination by a signal. + +// Nonzero if STATUS indicates the child is stopped. + +// Nonzero if STATUS indicates the child continued after a stop. We only +// define this if provides the WCONTINUED flag bit. + +// Nonzero if STATUS indicates the child dumped core. + +// Macros for constructing status values. + +// Define the macros also would define this way. + +// _FloatN API tests for enablement. +// Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +// Copyright (C) 2017-2021 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 +// . + +// Returned by `div'. +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:5 */ + +// Returned by `ldiv'. +type Ldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:70:5 */ + +// Returned by `lldiv'. +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:80:5 */ + +// Parallel versions of the functions above which take the locale to +// use as an additional parameter. These are GNU extensions inspired +// by the POSIX.1-2008 extended locale API. +// Definition of locale_t. +// Copyright (C) 2017-2021 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 +// . + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2021 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper , 1997. +// +// 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 +// . + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type __locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ +type Ino64_t = X__ino64_t /* types.h:54:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:10:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +type Useconds_t = X__useconds_t /* types.h:134:22 */ +type Suseconds_t = X__suseconds_t /* types.h:138:23 */ + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Copyright (C) 1991-2021 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 +// . + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2021 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 +// . + +// We don't use `memset' because this would require a prototype and +// the array isn't too big. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// A time value that is accurate to the nearest +// microsecond but also has a range of years. +type timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// has nanoseconds instead of microseconds. +type timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:11:1 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ Ffds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +type Blkcnt64_t = X__blkcnt64_t /* types.h:219:22 */ // Type to count number of disk blocks. +type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:220:24 */ // Type to count file system blocks. +type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:221:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type __pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2021 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 +// . + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2021 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 +// . + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Machine-specific pthread type layouts. RISC-V version. +// Copyright (C) 2011-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = __pthread_internal_list /* thread-shared-types.h:53:3 */ + +type __pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = __pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// Default mutex implementation struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// Generic struct for both POSIX and C11 mutexes. New ports are expected +// to use the default layout, however architecture can redefine it to +// add arch-specific extension (such as lock-elision). The struct have +// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. + +type __pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int32 + F__list X__pthread_list_t +} /* struct_mutex.h:27:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// RISC-V internal rwlock struct definitions. +// Copyright (C) 2019-2021 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 +// . + +// There is a lot of padding in this structure. While it's not strictly +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. +type __pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__pad1 uint64 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:27:1 */ + +// Common definition of pthread_cond_t. + +type __pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ +type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ + +type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ + +// Thread identifiers. The structure of the attribute type is not +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type pthread_attr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]uint8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = pthread_attr_t /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data __pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data __pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data __pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]uint8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]uint8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]uint8 +} /* pthreadtypes.h:118:3 */ + +// Reentrant versions of the `random' family of functions. +// These functions all use the following data structure to contain +// state, rather than global state variables. + +type random_data = struct { + Ffptr uintptr + Frptr uintptr + Fstate uintptr + Frand_type int32 + Frand_deg int32 + Frand_sep int32 + F__ccgo_pad1 [4]byte + Fend_ptr uintptr +} /* stdlib.h:423:1 */ + +// Data structure for communication with thread safe versions. This +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. +type drand48_data = struct { + F__x [3]uint16 + F__old_x [3]uint16 + F__c uint16 + F__init uint16 + F__a uint64 +} /* stdlib.h:490:1 */ + +// Shorthand for type of comparison functions. +type X__compar_fn_t = uintptr /* stdlib.h:814:13 */ + +type Comparison_fn_t = X__compar_fn_t /* stdlib.h:817:23 */ +type X__compar_d_fn_t = uintptr /* stdlib.h:821:13 */ + +// If this symbol has done its job, get rid of it. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Offset of member MEMBER in a struct of type TYPE. + +// Type whose alignment is supported in every context and is at least +// as great as that of any standard type not using alignment +// specifiers. +type Max_align_t = struct { + F__max_align_ll int64 + F__max_align_ld float64 +} /* stddef.h:426:3 */ + +// Use a macro to replace memcpy() if compiled with SQLITE_INLINE_MEMCPY. +// This allows better measurements of where memcpy() is used when running +// cachegrind. But this macro version of memcpy() is very slow so it +// should not be used in production. This is a performance measurement +// hack only. + +// If compiling for a processor that lacks floating point support, +// substitute integer for floating-point + +// OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0 +// afterward. Having this macro allows us to cause the C compiler +// to omit code used by TEMP tables without messy #ifndef statements. + +// The "file format" number is an integer that is incremented whenever +// the VDBE-level file format changes. The following macros define the +// the default file format for new databases and the maximum file format +// that the library can read. + +// Determine whether triggers are recursive by default. This can be +// changed at run-time using a pragma. + +// Provide a default value for SQLITE_TEMP_STORE in case it is not specified +// on the command-line + +// If no value has been provided for SQLITE_MAX_WORKER_THREADS, or if +// SQLITE_TEMP_STORE is set to 3 (never use temporary files), set it +// to zero. + +// The default initial allocation for the pagecache when using separate +// pagecaches for each database connection. A positive number is the +// number of pages. A negative number N translations means that a buffer +// of -1024*N bytes is allocated and used for as many pages as it will hold. +// +// The default value of "20" was chosen to minimize the run-time of the +// speedtest1 test program with options: --shrink-memory --reprepare + +// Default value for the SQLITE_CONFIG_SORTERREF_SIZE option. + +// The compile-time options SQLITE_MMAP_READWRITE and +// SQLITE_ENABLE_BATCH_ATOMIC_WRITE are not compatible with one another. +// You must choose one or the other (or neither) but not both. + +// GCC does not define the offsetof() macro so we'll have to do it +// ourselves. + +// Macros to compute minimum and maximum of two numbers. + +// Swap two objects of type TYPE. + +// Check to see if this machine uses EBCDIC. (Yes, believe it or +// not, there are still machines out there that use EBCDIC.) + +// Integers of known sizes. These typedefs might change for architectures +// where the sizes very. Preprocessor macros are available so that the +// types can be conveniently redefined at compile-type. Like this: +// +// cc '-DUINTPTR_TYPE=long long int' ... +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer + +// SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value +// that can be stored in a u32 without loss of data. The value +// is 0x00000000ffffffff. But because of quirks of some compilers, we +// have to specify the value in the less intuitive manner shown: + +// The datatype used to store estimates of the number of rows in a +// table or index. This is an unsigned integer type. For 99.9% of +// the world, a 32-bit integer is sufficient. But a 64-bit integer +// can be used at compile-time if desired. +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default + +// Estimated quantities used for query planning are stored as 16-bit +// logarithms. For quantity X, the value stored is 10*log2(X). This +// gives a possible range of values of approximately 1.0e986 to 1e-986. +// But the allowed values are "grainy". Not every value is representable. +// For example, quantities 16 and 17 are both represented by a LogEst +// of 40. However, since LogEst quantities are suppose to be estimates, +// not exact values, this imprecision is not a problem. +// +// "LogEst" is short for "Logarithmic Estimate". +// +// Examples: +// 1 -> 0 20 -> 43 10000 -> 132 +// 2 -> 10 25 -> 46 25000 -> 146 +// 3 -> 16 100 -> 66 1000000 -> 199 +// 4 -> 20 1000 -> 99 1048576 -> 200 +// 10 -> 33 1024 -> 100 4294967296 -> 320 +// +// The LogEst can be negative to indicate fractional values. +// Examples: +// +// 0.5 -> -10 0.1 -> -33 0.0625 -> -40 +type LogEst = int16 /* sqlite3.c:14268:20 */ + +// Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer + +// The uptr type is an unsigned integer large enough to hold a pointer +type Uptr = U64 /* sqlite3.c:14293:15 */ + +// The SQLITE_WITHIN(P,S,E) macro checks to see if pointer P points to +// something between S (inclusive) and E (exclusive). +// +// In other words, S is a buffer and E is a pointer to the first byte after +// the end of buffer S. This macro returns true if P points to something +// contained within the buffer S. + +// Macros to determine whether the machine is big or little endian, +// and whether or not that determination is run-time or compile-time. +// +// For best performance, an attempt is made to guess at the byte-order +// using C-preprocessor macros. If that is unsuccessful, or if +// -DSQLITE_BYTEORDER=0 is set, then byte-order is determined +// at run-time. +var Xsqlite3one int32 = 1 /* sqlite3.c:14339:13 */ + +// An instance of the following structure is used to store the busy-handler +// callback for a given sqlite handle. +// +// The sqlite.busyHandler member of the sqlite struct contains the busy +// callback for the database handle. Each pager opened via the sqlite +// handle is passed a pointer to sqlite.busyHandler. The busy-handler +// callback is currently invoked only from within pager.c. +type BusyHandler1 = struct { + FxBusyHandler uintptr + FpBusyArg uintptr + FnBusy int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +// An instance of the following structure is used to store the busy-handler +// callback for a given sqlite handle. +// +// The sqlite.busyHandler member of the sqlite struct contains the busy +// callback for the database handle. Each pager opened via the sqlite +// handle is passed a pointer to sqlite.busyHandler. The busy-handler +// callback is currently invoked only from within pager.c. +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ + +// Name of table that holds the database schema. +// +// The PREFERRED names are used whereever possible. But LEGACY is also +// used for backwards compatibility. +// +// 1. Queries can use either the PREFERRED or the LEGACY names +// 2. The sqlite3_set_authorizer() callback uses the LEGACY name +// 3. The PRAGMA table_list statement uses the PREFERRED name +// +// The LEGACY names are stored in the internal symbol hash table +// in support of (2). Names are translated using sqlite3PreferredTableName() +// for (3). The sqlite3FindTable() function takes care of translating +// names for (1). +// +// Note that "sqlite_temp_schema" can also be called "temp.sqlite_schema". + +// The root-page of the schema table. + +// The name of the schema table. The name is different for TEMP. + +// A convenience macro that returns the number of elements in +// an array. + +// Determine if the argument is a power of two + +// The following value as a destructor means to use sqlite3DbFree(). +// The sqlite3DbFree() routine requires two parameters instead of the +// one parameter that destructors normally want. So we have to introduce +// this magic value that the code knows to handle differently. Any +// pointer will work here as long as it is distinct from SQLITE_STATIC +// and SQLITE_TRANSIENT. + +// When SQLITE_OMIT_WSD is defined, it means that the target platform does +// not support Writable Static Data (WSD) such as global and static variables. +// All variables must either be on the stack or dynamically allocated from +// the heap. When WSD is unsupported, the variable declarations scattered +// throughout the SQLite code must become constants instead. The SQLITE_WSD +// macro is used for this purpose. And instead of referencing the variable +// directly, we use its constant as a key to lookup the run-time allocated +// buffer that holds real variable. The constant is also the initializer +// for the run-time allocated buffer. +// +// In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL +// macros become no-ops and have zero performance impact. + +// The following macros are used to suppress compiler warnings and to +// make it clear to human readers when a function parameter is deliberately +// left unused within the body of a function. This usually happens when +// a function is called via a function pointer. For example the +// implementation of an SQL aggregate step callback may not use the +// parameter indicating the number of arguments passed to the aggregate, +// if it knows that this is enforced elsewhere. +// +// When a function parameter is not used at all within the body of a function, +// it is generally named "NotUsed" or "NotUsed2" to make things even clearer. +// However, these macros may also be used to suppress warnings related to +// parameters that may or may not be used depending on compilation options. +// For example those parameters only used in assert() statements. In these +// cases the parameters are named as per the usual conventions. + +// Forward references to structures +type AggInfo1 = struct { + FdirectMode U8 + FuseSortingIdx U8 + F__ccgo_pad1 [2]byte + FsortingIdx int32 + FsortingIdxPTab int32 + FnSortingColumn int32 + FmnReg int32 + FmxReg int32 + FpGroupBy uintptr + FaCol uintptr + FnColumn int32 + FnAccumulator int32 + FaFunc uintptr + FnFunc int32 + FselId U32 +} /* sqlite3.c:578:9 */ + +// Name of table that holds the database schema. +// +// The PREFERRED names are used whereever possible. But LEGACY is also +// used for backwards compatibility. +// +// 1. Queries can use either the PREFERRED or the LEGACY names +// 2. The sqlite3_set_authorizer() callback uses the LEGACY name +// 3. The PRAGMA table_list statement uses the PREFERRED name +// +// The LEGACY names are stored in the internal symbol hash table +// in support of (2). Names are translated using sqlite3PreferredTableName() +// for (3). The sqlite3FindTable() function takes care of translating +// names for (1). +// +// Note that "sqlite_temp_schema" can also be called "temp.sqlite_schema". + +// The root-page of the schema table. + +// The name of the schema table. The name is different for TEMP. + +// A convenience macro that returns the number of elements in +// an array. + +// Determine if the argument is a power of two + +// The following value as a destructor means to use sqlite3DbFree(). +// The sqlite3DbFree() routine requires two parameters instead of the +// one parameter that destructors normally want. So we have to introduce +// this magic value that the code knows to handle differently. Any +// pointer will work here as long as it is distinct from SQLITE_STATIC +// and SQLITE_TRANSIENT. + +// When SQLITE_OMIT_WSD is defined, it means that the target platform does +// not support Writable Static Data (WSD) such as global and static variables. +// All variables must either be on the stack or dynamically allocated from +// the heap. When WSD is unsupported, the variable declarations scattered +// throughout the SQLite code must become constants instead. The SQLITE_WSD +// macro is used for this purpose. And instead of referencing the variable +// directly, we use its constant as a key to lookup the run-time allocated +// buffer that holds real variable. The constant is also the initializer +// for the run-time allocated buffer. +// +// In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL +// macros become no-ops and have zero performance impact. + +// The following macros are used to suppress compiler warnings and to +// make it clear to human readers when a function parameter is deliberately +// left unused within the body of a function. This usually happens when +// a function is called via a function pointer. For example the +// implementation of an SQL aggregate step callback may not use the +// parameter indicating the number of arguments passed to the aggregate, +// if it knows that this is enforced elsewhere. +// +// When a function parameter is not used at all within the body of a function, +// it is generally named "NotUsed" or "NotUsed2" to make things even clearer. +// However, these macros may also be used to suppress warnings related to +// parameters that may or may not be used depending on compilation options. +// For example those parameters only used in assert() statements. In these +// cases the parameters are named as per the usual conventions. + +// Forward references to structures +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ +type AuthContext1 = struct { + FzAuthContext uintptr + FpParse uintptr +} /* sqlite3.c:14575:9 */ + +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ +type AutoincInfo1 = struct { + FpNext uintptr + FpTab uintptr + FiDb int32 + FregCtr int32 +} /* sqlite3.c:578:9 */ + +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ +type Bitvec1 = struct { + FiSize U32 + FnSet U32 + FiDivisor U32 + F__ccgo_pad1 [4]byte + Fu struct { + F__ccgo_pad1 [0]uint64 + FaBitmap [496]U8 + } +} /* sqlite3.c:578:9 */ + +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ +type CollSeq1 = struct { + FzName uintptr + Fenc U8 + F__ccgo_pad1 [7]byte + FpUser uintptr + FxCmp uintptr + FxDel uintptr +} /* sqlite3.c:578:9 */ + +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ +type Column1 = struct { + FzCnName uintptr + FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ + F__ccgo_pad1 [1]byte + Faffinity uint8 + FszEst U8 + FhName U8 + F__ccgo_pad2 [1]byte + FiDflt U16 + FcolFlags U16 + F__ccgo_pad3 [6]byte +} /* sqlite3.c:578:9 */ + +type Column = Column1 /* sqlite3.c:14579:23 */ +type Cte1 = struct { + FzName uintptr + FpCols uintptr + FpSelect uintptr + FzCteErr uintptr + FpUse uintptr + FeM10d U8 + F__ccgo_pad1 [7]byte +} /* sqlite3.c:578:9 */ + +type Cte = Cte1 /* sqlite3.c:14580:20 */ +type CteUse1 = struct { + FnUse int32 + FaddrM9e int32 + FregRtn int32 + FiCur int32 + FnRowEst LogEst + FeM10d U8 + F__ccgo_pad1 [1]byte +} /* sqlite3.c:578:9 */ + +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ +type Db1 = struct { + FzDbSName uintptr + FpBt uintptr + Fsafety_level U8 + FbSyncSet U8 + F__ccgo_pad1 [6]byte + FpSchema uintptr +} /* sqlite3.c:578:9 */ + +type Db = Db1 /* sqlite3.c:14582:19 */ +type DbFixer1 = struct { + FpParse uintptr + Fw Walker + FpSchema uintptr + FbTemp U8 + F__ccgo_pad1 [7]byte + FzDb uintptr + FzType uintptr + FpName uintptr +} /* sqlite3.c:14583:9 */ + +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ +type Schema1 = struct { + Fschema_cookie int32 + FiGeneration int32 + FtblHash Hash + FidxHash Hash + FtrigHash Hash + FfkeyHash Hash + FpSeqTab uintptr + Ffile_format U8 + Fenc U8 + FschemaFlags U16 + Fcache_size int32 +} /* sqlite3.c:578:9 */ + +type Schema = Schema1 /* sqlite3.c:14584:23 */ +type Expr1 = struct { + Fop U8 + FaffExpr uint8 + Fop2 U8 + F__ccgo_pad1 [1]byte + Fflags U32 + Fu struct{ FzToken uintptr } + FpLeft uintptr + FpRight uintptr + Fx struct{ FpList uintptr } + FnHeight int32 + FiTable int32 + FiColumn YnVar + FiAgg I16 + Fw struct{ FiRightJoinTable int32 } + FpAggInfo uintptr + Fy struct{ FpTab uintptr } +} /* sqlite3.c:578:9 */ + +type Expr = Expr1 /* sqlite3.c:14585:21 */ +type ExprList1 = struct { + FnExpr int32 + FnAlloc int32 + Fa [1]struct { + FpExpr uintptr + FzEName uintptr + FsortFlags U8 + F__ccgo_pad1 [3]byte + FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */ + F__ccgo_pad2 [3]byte + Fu struct { + F__ccgo_pad1 [0]uint32 + Fx struct { + FiOrderByCol U16 + FiAlias U16 + } + } + F__ccgo_pad3 [4]byte + } +} /* sqlite3.c:578:9 */ + +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ +type FKey1 = struct { + FpFrom uintptr + FpNextFrom uintptr + FzTo uintptr + FpNextTo uintptr + FpPrevTo uintptr + FnCol int32 + FisDeferred U8 + FaAction [2]U8 + F__ccgo_pad1 [1]byte + FapTrigger [2]uintptr + FaCol [1]struct { + FiFrom int32 + F__ccgo_pad1 [4]byte + FzCol uintptr + } +} /* sqlite3.c:14587:9 */ + +type FKey = FKey1 /* sqlite3.c:14587:21 */ +type FuncDestructor1 = struct { + FnRef int32 + F__ccgo_pad1 [4]byte + FxDestroy uintptr + FpUserData uintptr +} /* sqlite3.c:14588:9 */ + +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ +type FuncDef1 = struct { + FnArg I8 + F__ccgo_pad1 [3]byte + FfuncFlags U32 + FpUserData uintptr + FpNext uintptr + FxSFunc uintptr + FxFinalize uintptr + FxValue uintptr + FxInverse uintptr + FzName uintptr + Fu struct{ FpHash uintptr } +} /* sqlite3.c:578:9 */ + +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ + +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ +type IdList1 = struct { + Fa uintptr + FnId int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +type IdList = IdList1 /* sqlite3.c:14591:23 */ +type Index1 = struct { + FzName uintptr + FaiColumn uintptr + FaiRowLogEst uintptr + FpTable uintptr + FzColAff uintptr + FpNext uintptr + FpSchema uintptr + FaSortOrder uintptr + FazColl uintptr + FpPartIdxWhere uintptr + FaColExpr uintptr + Ftnum Pgno + FszIdxRow LogEst + FnKeyCol U16 + FnColumn U16 + FonError U8 + F__ccgo_pad1 [1]byte + FidxType uint16 /* unsigned idxType: 2, unsigned bUnordered: 1, unsigned uniqNotNull: 1, unsigned isResized: 1, unsigned isCovering: 1, unsigned noSkipScan: 1, unsigned hasStat1: 1, unsigned bNoQuery: 1, unsigned bAscKeyBug: 1, unsigned bHasVCol: 1 */ + F__ccgo_pad2 [2]byte + FnSample int32 + FnSampleCol int32 + FaAvgEq uintptr + FaSample uintptr + FaiRowEst uintptr + FnRowEst0 TRowcnt + F__ccgo_pad3 [4]byte + FcolNotIdxed Bitmask +} /* sqlite3.c:578:9 */ + +type Index = Index1 /* sqlite3.c:14592:22 */ +type IndexSample1 = struct { + Fp uintptr + Fn int32 + F__ccgo_pad1 [4]byte + FanEq uintptr + FanLt uintptr + FanDLt uintptr +} /* sqlite3.c:578:9 */ + +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ +type KeyInfo1 = struct { + FnRef U32 + Fenc U8 + F__ccgo_pad1 [1]byte + FnKeyField U16 + FnAllField U16 + F__ccgo_pad2 [6]byte + Fdb uintptr + FaSortFlags uintptr + FaColl [1]uintptr +} /* sqlite3.c:578:9 */ + +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ +type Lookaside1 = struct { + FbDisable U32 + Fsz U16 + FszTrue U16 + FbMalloced U8 + F__ccgo_pad1 [3]byte + FnSlot U32 + FanStat [3]U32 + F__ccgo_pad2 [4]byte + FpInit uintptr + FpFree uintptr + FpSmallInit uintptr + FpSmallFree uintptr + FpMiddle uintptr + FpStart uintptr + FpEnd uintptr +} /* sqlite3.c:578:9 */ + +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ +type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ + +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ +type Module1 = struct { + FpModule uintptr + FzName uintptr + FnRefModule int32 + F__ccgo_pad1 [4]byte + FpAux uintptr + FxDestroy uintptr + FpEpoTab uintptr +} /* sqlite3.c:578:9 */ + +type Module = Module1 /* sqlite3.c:14598:23 */ +type NameContext1 = struct { + FpParse uintptr + FpSrcList uintptr + FuNC struct{ FpEList uintptr } + FpNext uintptr + FnRef int32 + FnNcErr int32 + FncFlags int32 + F__ccgo_pad1 [4]byte + FpWinSelect uintptr +} /* sqlite3.c:14599:9 */ + +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ +type Parse1 = struct { + Fdb uintptr + FzErrMsg uintptr + FpVdbe uintptr + Frc int32 + FcolNamesSet U8 + FcheckSchema U8 + Fnested U8 + FnTempReg U8 + FisMultiWrite U8 + FmayAbort U8 + FhasCompound U8 + FokConstFactor U8 + FdisableLookaside U8 + FdisableVtab U8 + F__ccgo_pad1 [2]byte + FnRangeReg int32 + FiRangeReg int32 + FnErr int32 + FnTab int32 + FnMem int32 + FszOpAlloc int32 + FiSelfTab int32 + FnLabel int32 + FnLabelAlloc int32 + F__ccgo_pad2 [4]byte + FaLabel uintptr + FpConstExpr uintptr + FconstraintName Token + FwriteMask YDbMask + FcookieMask YDbMask + FregRowid int32 + FregRoot int32 + FnMaxArg int32 + FnSelect int32 + FnTableLock int32 + F__ccgo_pad3 [4]byte + FaTableLock uintptr + FpAinc uintptr + FpToplevel uintptr + FpTriggerTab uintptr + FpTriggerPrg uintptr + FpCleanup uintptr + Fu1 struct { + F__ccgo_pad1 [0]uint64 + FaddrCrTab int32 + F__ccgo_pad2 [4]byte + } + FnQueryLoop U32 + Foldmask U32 + Fnewmask U32 + FeTriggerOp U8 + FbReturning U8 + FeOrconf U8 + FdisableTriggers U8 + FaTempReg [8]int32 + FpOuterParse uintptr + FsNameToken Token + FsLastToken Token + FnVar YnVar + FiPkSortOrder U8 + Fexplain U8 + FeParseMode U8 + F__ccgo_pad4 [3]byte + FnVtabLock int32 + FnHeight int32 + FaddrExplain int32 + F__ccgo_pad5 [4]byte + FpVList uintptr + FpReprepare uintptr + FzTail uintptr + FpNewTable uintptr + FpNewIndex uintptr + FpNewTrigger uintptr + FzAuthContext uintptr + FsArg Token + FapVtabLock uintptr + FpWith uintptr + FpRename uintptr +} /* sqlite3.c:578:9 */ + +type Parse = Parse1 /* sqlite3.c:14600:22 */ +type ParseCleanup1 = struct { + FpNext uintptr + FpPtr uintptr + FxCleanup uintptr +} /* sqlite3.c:578:9 */ + +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ +type PreUpdate1 = struct { + Fv uintptr + FpCsr uintptr + Fop int32 + F__ccgo_pad1 [4]byte + FaRecord uintptr + Fkeyinfo KeyInfo + FpUnpacked uintptr + FpNewUnpacked uintptr + FiNewReg int32 + FiBlobWrite int32 + FiKey1 I64 + FiKey2 I64 + FaNew uintptr + FpTab uintptr + FpPk uintptr +} /* sqlite3.c:578:9 */ + +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ +type PrintfArguments1 = struct { + FnArg int32 + FnUsed int32 + FapArg uintptr +} /* sqlite3.c:14603:9 */ + +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ +type RenameToken1 = struct { + Fp uintptr + Ft Token + FpNext uintptr +} /* sqlite3.c:578:9 */ + +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ +type Returning1 = struct { + FpParse uintptr + FpReturnEL uintptr + FretTrig Trigger + FretTStep TriggerStep + FiRetCur int32 + FnRetCol int32 + FiRetReg int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:14605:9 */ + +type Returning = Returning1 /* sqlite3.c:14605:26 */ +type RowSet1 = struct { + FpChunk uintptr + Fdb uintptr + FpEntry uintptr + FpLast uintptr + FpFresh uintptr + FpForest uintptr + FnFresh U16 + FrsFlags U16 + FiBatch int32 +} /* sqlite3.c:14606:9 */ + +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ +type Savepoint1 = struct { + FzName uintptr + FnDeferredCons I64 + FnDeferredImmCons I64 + FpNext uintptr +} /* sqlite3.c:578:9 */ + +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ +type Select1 = struct { + Fop U8 + F__ccgo_pad1 [1]byte + FnSelectRow LogEst + FselFlags U32 + FiLimit int32 + FiOffset int32 + FselId U32 + FaddrOpenEphm [2]int32 + F__ccgo_pad2 [4]byte + FpEList uintptr + FpSrc uintptr + FpWhere uintptr + FpGroupBy uintptr + FpHaving uintptr + FpOrderBy uintptr + FpPrior uintptr + FpNext uintptr + FpLimit uintptr + FpWith uintptr + FpWin uintptr + FpWinDefn uintptr +} /* sqlite3.c:578:9 */ + +type Select = Select1 /* sqlite3.c:14608:23 */ +type SQLiteThread1 = struct { + FxTask uintptr + FpIn uintptr + FpResult uintptr +} /* sqlite3.c:14609:9 */ + +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ +type SelectDest1 = struct { + FeDest U8 + F__ccgo_pad1 [3]byte + FiSDParm int32 + FiSDParm2 int32 + FiSdst int32 + FnSdst int32 + F__ccgo_pad2 [4]byte + FzAffSdst uintptr + FpOrderBy uintptr +} /* sqlite3.c:14610:9 */ + +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ +type SrcItem1 = struct { + FpSchema uintptr + FzDatabase uintptr + FzName uintptr + FzAlias uintptr + FpTab uintptr + FpSelect uintptr + FaddrFillSub int32 + FregReturn int32 + FregResult int32 + Ffg struct { + F__ccgo_pad1 [0]uint32 + Fjointype U8 + F__ccgo_pad2 [3]byte + FnotIndexed uint16 /* unsigned notIndexed: 1, unsigned isIndexedBy: 1, unsigned isTabFunc: 1, unsigned isCorrelated: 1, unsigned viaCoroutine: 1, unsigned isRecursive: 1, unsigned fromDDL: 1, unsigned isCte: 1, unsigned notCte: 1 */ + F__ccgo_pad3 [2]byte + } + FiCursor int32 + FpOn uintptr + FpUsing uintptr + FcolUsed Bitmask + Fu1 struct{ FzIndexedBy uintptr } + Fu2 struct{ FpIBIndex uintptr } +} /* sqlite3.c:578:9 */ + +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ +type SrcList1 = struct { + FnSrc int32 + FnAlloc U32 + Fa [1]SrcItem +} /* sqlite3.c:578:9 */ + +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str +type Table1 = struct { + FzName uintptr + FaCol uintptr + FpIndex uintptr + FzColAff uintptr + FpCheck uintptr + Ftnum Pgno + FnTabRef U32 + FtabFlags U32 + FiPKey I16 + FnCol I16 + FnNVCol I16 + FnRowLogEst LogEst + FszTabRow LogEst + FkeyConf U8 + FeTabType U8 + Fu struct { + Ftab struct { + FaddColOffset int32 + F__ccgo_pad1 [4]byte + FpFKey uintptr + FpDfltList uintptr + } + } + FpTrigger uintptr + FpSchema uintptr +} /* sqlite3.c:578:9 */ + +// Internal alias for sqlite3_str +type Table = Table1 /* sqlite3.c:14614:22 */ +type TableLock1 = struct { + FiDb int32 + FiTab Pgno + FisWriteLock U8 + F__ccgo_pad1 [7]byte + FzLockName uintptr +} /* sqlite3.c:578:9 */ + +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ +type Token1 = struct { + Fz uintptr + Fn uint32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +type Token = Token1 /* sqlite3.c:14616:22 */ +type Trigger1 = struct { + FzName uintptr + Ftable uintptr + Fop U8 + Ftr_tm U8 + FbReturning U8 + F__ccgo_pad1 [5]byte + FpWhen uintptr + FpColumns uintptr + FpSchema uintptr + FpTabSchema uintptr + Fstep_list uintptr + FpNext uintptr +} /* sqlite3.c:578:9 */ + +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ +type TriggerPrg1 = struct { + FpTrigger uintptr + FpNext uintptr + FpProgram uintptr + Forconf int32 + FaColmask [2]U32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ +type TriggerStep1 = struct { + Fop U8 + Forconf U8 + F__ccgo_pad1 [6]byte + FpTrig uintptr + FpSelect uintptr + FzTarget uintptr + FpFrom uintptr + FpWhere uintptr + FpExprList uintptr + FpIdList uintptr + FpUpsert uintptr + FzSpan uintptr + FpNext uintptr + FpLast uintptr +} /* sqlite3.c:578:9 */ + +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ +type UnpackedRecord1 = struct { + FpKeyInfo uintptr + FaMem uintptr + FnField U16 + Fdefault_rc I8 + FerrCode U8 + Fr1 I8 + Fr2 I8 + FeqSeen U8 + F__ccgo_pad1 [1]byte +} /* sqlite3.c:578:9 */ + +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ +type Upsert1 = struct { + FpUpsertTarget uintptr + FpUpsertTargetWhere uintptr + FpUpsertSet uintptr + FpUpsertWhere uintptr + FpNextUpsert uintptr + FisDoUpdate U8 + F__ccgo_pad1 [7]byte + FpToFree uintptr + FpUpsertIdx uintptr + FpUpsertSrc uintptr + FregData int32 + FiDataCur int32 + FiIdxCur int32 + F__ccgo_pad2 [4]byte +} /* sqlite3.c:578:9 */ + +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ +type VTable1 = struct { + Fdb uintptr + FpMod uintptr + FpVtab uintptr + FnRef int32 + FbConstraint U8 + FeVtabRisk U8 + F__ccgo_pad1 [2]byte + FiSavepoint int32 + F__ccgo_pad2 [4]byte + FpNext uintptr +} /* sqlite3.c:578:9 */ + +type VTable = VTable1 /* sqlite3.c:14623:23 */ +type VtabCtx1 = struct { + FpVTable uintptr + FpTab uintptr + FpPrior uintptr + FbDeclared int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ +type Walker1 = struct { + FpParse uintptr + FxExprCallback uintptr + FxSelectCallback uintptr + FxSelectCallback2 uintptr + FwalkerDepth int32 + FeCode U16 + F__ccgo_pad1 [2]byte + Fu struct{ FpNC uintptr } +} /* sqlite3.c:14583:9 */ + +type Walker = Walker1 /* sqlite3.c:14625:23 */ +type WhereInfo1 = struct { + FpParse uintptr + FpTabList uintptr + FpOrderBy uintptr + FpResultSet uintptr + FpWhere uintptr + FpLimit uintptr + FaiCurOnePass [2]int32 + FiContinue int32 + FiBreak int32 + FsavedNQueryLoop int32 + FwctrlFlags U16 + FiLimit LogEst + FnLevel U8 + FnOBSat I8 + FeOnePass U8 + FeDistinct U8 + FbDeferredSeek uint8 /* unsigned bDeferredSeek: 1, unsigned untestedTerms: 1, unsigned bOrderedInnerLoop: 1, unsigned sorted: 1 */ + F__ccgo_pad1 [1]byte + FnRowOut LogEst + FiTop int32 + FiEndWhere int32 + FpLoops uintptr + FpExprMods uintptr + FrevMask Bitmask + FsWC WhereClause + FsMaskSet WhereMaskSet + Fa [1]WhereLevel +} /* sqlite3.c:14626:9 */ + +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ +type Window1 = struct { + FzName uintptr + FzBase uintptr + FpPartition uintptr + FpOrderBy uintptr + FeFrmType U8 + FeStart U8 + FeEnd U8 + FbImplicitFrame U8 + FeExclude U8 + F__ccgo_pad1 [3]byte + FpStart uintptr + FpEnd uintptr + FppThis uintptr + FpNextWin uintptr + FpFilter uintptr + FpFunc uintptr + FiEphCsr int32 + FregAccum int32 + FregResult int32 + FcsrApp int32 + FregApp int32 + FregPart int32 + FpOwner uintptr + FnBufferCol int32 + FiArgCol int32 + FregOne int32 + FregStartRowid int32 + FregEndRowid int32 + FbExprArgs U8 + F__ccgo_pad2 [3]byte +} /* sqlite3.c:578:9 */ + +type Window = Window1 /* sqlite3.c:14627:23 */ +type With1 = struct { + FnCte int32 + FbView int32 + FpOuter uintptr + Fa [1]Cte +} /* sqlite3.c:578:9 */ + +type With = With1 /* sqlite3.c:14628:21 */ + +// The bitmask datatype defined below is used for various optimizations. +// +// Changing this from a 64-bit to a 32-bit type limits the number of +// tables in a join to 32 instead of 64. But it also reduces the size +// of the library by 738 bytes on ix86. +type Bitmask = U64 /* sqlite3.c:14641:15 */ + +// The number of bits in a Bitmask. "BMS" means "BitMask Size". + +// A bit in a Bitmask + +// A VList object records a mapping between parameters/variables/wildcards +// in the SQL statement (such as $abc, @pqr, or :xyz) and the integer +// variable number associated with that parameter. See the format description +// on the sqlite3VListAdd() routine for more information. A VList is really +// just an array of integers. +type VList = int32 /* sqlite3.c:14664:13 */ + +// Defer sourcing vdbe.h and btree.h until after the "u8" and +// "BusyHandler" typedefs. vdbe.h also requires a few of the opaque +// pointer types (i.e. FuncDef) defined above. +//************* Include pager.h in the middle of sqliteInt.h **************** +//************* Begin file pager.h ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface that the sqlite page cache +// subsystem. The page cache subsystem reads and writes a file a page +// at a time and provides a journal for rollback. + +// Default maximum size for persistent journal files. A negative +// value means no limit. This value may be overridden using the +// sqlite3PagerJournalSizeLimit() API. See also "PRAGMA journal_size_limit". + +// The type used to represent a page number. The first page in a file +// is called page 1. 0 is used to represent "not a page". +type Pgno = U32 /* sqlite3.c:14705:13 */ + +// Each open file is managed by a separate instance of the "Pager" structure. +type Pager1 = struct { + FpVfs uintptr + FexclusiveMode U8 + FjournalMode U8 + FuseJournal U8 + FnoSync U8 + FfullSync U8 + FextraSync U8 + FsyncFlags U8 + FwalSyncFlags U8 + FtempFile U8 + FnoLock U8 + FreadOnly U8 + FmemDb U8 + FmemVfs U8 + FeState U8 + FeLock U8 + FchangeCountDone U8 + FsetSuper U8 + FdoNotSpill U8 + FsubjInMemory U8 + FbUseFetch U8 + FhasHeldSharedLock U8 + F__ccgo_pad1 [3]byte + FdbSize Pgno + FdbOrigSize Pgno + FdbFileSize Pgno + FdbHintSize Pgno + FerrCode int32 + FnRec int32 + FcksumInit U32 + FnSubRec U32 + FpInJournal uintptr + Ffd uintptr + Fjfd uintptr + Fsjfd uintptr + FjournalOff I64 + FjournalHdr I64 + FpBackup uintptr + FaSavepoint uintptr + FnSavepoint int32 + FiDataVersion U32 + FdbFileVers [16]uint8 + FnMmapOut int32 + F__ccgo_pad2 [4]byte + FszMmap Sqlite3_int64 + FpMmapFreelist uintptr + FnExtra U16 + FnReserve I16 + FvfsFlags U32 + FsectorSize U32 + FmxPgno Pgno + FpageSize I64 + FjournalSizeLimit I64 + FzFilename uintptr + FzJournal uintptr + FxBusyHandler uintptr + FpBusyHandlerArg uintptr + FaStat [4]int32 + FxReiniter uintptr + FxGet uintptr + FpTmpSpace uintptr + FpPCache uintptr + FpWal uintptr + FzWal uintptr +} /* sqlite3.c:578:9 */ + +// Each open file is managed by a separate instance of the "Pager" structure. +type Pager = Pager1 /* sqlite3.c:14710:22 */ + +// Handle type for pages. +type PgHdr2 = struct { + FpPage uintptr + FpData uintptr + FpExtra uintptr + FpCache uintptr + FpDirty uintptr + FpPager uintptr + Fpgno Pgno + Fflags U16 + FnRef I16 + FpDirtyNext uintptr + FpDirtyPrev uintptr +} /* sqlite3.c:578:9 */ + +// Handle type for pages. +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ + +// Functions to support testing and debugging. + +//************* End of pager.h ********************************************** +//************* Continuing where we left off in sqliteInt.h ***************** +//************* Include btree.h in the middle of sqliteInt.h **************** +//************* Begin file btree.h ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface that the sqlite B-Tree file +// subsystem. See comments in the source code for a detailed description +// of what each interface routine does. + +// TODO: This definition is just included so other modules compile. It +// needs to be revisited. + +// If defined as non-zero, auto-vacuum is enabled by default. Otherwise +// it must be turned on for each database using "PRAGMA auto_vacuum = 1". + +// Forward declarations of structure +type Btree1 = struct { + Fdb uintptr + FpBt uintptr + FinTrans U8 + Fsharable U8 + Flocked U8 + FhasIncrblobCur U8 + FwantToLock int32 + FnBackup int32 + FiBDataVersion U32 + FpNext uintptr + FpPrev uintptr + Flock BtLock +} /* sqlite3.c:578:9 */ + +// Functions to support testing and debugging. + +//************* End of pager.h ********************************************** +//************* Continuing where we left off in sqliteInt.h ***************** +//************* Include btree.h in the middle of sqliteInt.h **************** +//************* Begin file btree.h ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface that the sqlite B-Tree file +// subsystem. See comments in the source code for a detailed description +// of what each interface routine does. + +// TODO: This definition is just included so other modules compile. It +// needs to be revisited. + +// If defined as non-zero, auto-vacuum is enabled by default. Otherwise +// it must be turned on for each database using "PRAGMA auto_vacuum = 1". + +// Forward declarations of structure +type Btree = Btree1 /* sqlite3.c:14958:22 */ +type BtCursor1 = struct { + FeState U8 + FcurFlags U8 + FcurPagerFlags U8 + Fhints U8 + FskipNext int32 + FpBtree uintptr + FaOverflow uintptr + FpKey uintptr + FpBt uintptr + FpNext uintptr + Finfo CellInfo + FnKey I64 + FpgnoRoot Pgno + FiPage I8 + FcurIntKey U8 + Fix U16 + FaiIdx [19]U16 + F__ccgo_pad1 [2]byte + FpKeyInfo uintptr + FpPage uintptr + FapPage [19]uintptr +} /* sqlite3.c:578:9 */ + +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ +type BtShared1 = struct { + FpPager uintptr + Fdb uintptr + FpCursor uintptr + FpPage1 uintptr + FopenFlags U8 + FautoVacuum U8 + FincrVacuum U8 + FbDoTruncate U8 + FinTransaction U8 + Fmax1bytePayload U8 + FnReserveWanted U8 + F__ccgo_pad1 [1]byte + FbtsFlags U16 + FmaxLocal U16 + FminLocal U16 + FmaxLeaf U16 + FminLeaf U16 + F__ccgo_pad2 [2]byte + FpageSize U32 + FusableSize U32 + FnTransaction int32 + FnPage U32 + F__ccgo_pad3 [4]byte + FpSchema uintptr + FxFreeSchema uintptr + Fmutex uintptr + FpHasContent uintptr + FnRef int32 + F__ccgo_pad4 [4]byte + FpNext uintptr + FpLock uintptr + FpWriter uintptr + FpTmpSpace uintptr + FnPreformatSize int32 + F__ccgo_pad5 [4]byte +} /* sqlite3.c:578:9 */ + +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ +type BtreePayload1 = struct { + FpKey uintptr + FnKey Sqlite3_int64 + FpData uintptr + FaMem uintptr + FnMem U16 + F__ccgo_pad1 [2]byte + FnData int32 + FnZero int32 + F__ccgo_pad2 [4]byte +} /* sqlite3.c:14961:9 */ + +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ + +//************* End of btree.h ********************************************** +//************* Continuing where we left off in sqliteInt.h ***************** +//************* Include vdbe.h in the middle of sqliteInt.h ***************** +//************* Begin file vdbe.h ******************************************* +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// Header file for the Virtual DataBase Engine (VDBE) +// +// This header defines the interface to the virtual database engine +// or VDBE. The VDBE implements an abstract machine that runs a +// simple program to access and modify the underlying database. +// #include + +// A single VDBE is an opaque structure named "Vdbe". Only routines +// in the source file sqliteVdbe.c are allowed to see the insides +// of this structure. +type Vdbe1 = struct { + Fdb uintptr + FpPrev uintptr + FpNext uintptr + FpParse uintptr + FnVar YnVar + F__ccgo_pad1 [2]byte + FiVdbeMagic U32 + FnMem int32 + FnCursor int32 + FcacheCtr U32 + Fpc int32 + Frc int32 + F__ccgo_pad2 [4]byte + FnChange I64 + FiStatement int32 + F__ccgo_pad3 [4]byte + FiCurrentTime I64 + FnFkConstraint I64 + FnStmtDefCons I64 + FnStmtDefImmCons I64 + FaMem uintptr + FapArg uintptr + FapCsr uintptr + FaVar uintptr + FaOp uintptr + FnOp int32 + FnOpAlloc int32 + FaColName uintptr + FpResultSet uintptr + FzErrMsg uintptr + FpVList uintptr + FstartTime I64 + FnResColumn U16 + FerrorAction U8 + FminWriteFileFormat U8 + FprepFlags U8 + FdoingRerun U8 + F__ccgo_pad4 [2]byte + Fexpired uint16 /* bft expired: 2, bft explain: 2, bft changeCntOn: 1, bft runOnlyOnce: 1, bft usesStmtJournal: 1, bft readOnly: 1, bft bIsReader: 1 */ + F__ccgo_pad5 [2]byte + FbtreeMask YDbMask + FlockMask YDbMask + FaCounter [9]U32 + FzSql uintptr + FpFree uintptr + FpFrame uintptr + FpDelFrame uintptr + FnFrame int32 + Fexpmask U32 + FpProgram uintptr + FpAuxData uintptr +} /* sqlite3.c:578:9 */ + +//************* End of btree.h ********************************************** +//************* Continuing where we left off in sqliteInt.h ***************** +//************* Include vdbe.h in the middle of sqliteInt.h ***************** +//************* Begin file vdbe.h ******************************************* +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// Header file for the Virtual DataBase Engine (VDBE) +// +// This header defines the interface to the virtual database engine +// or VDBE. The VDBE implements an abstract machine that runs a +// simple program to access and modify the underlying database. +// #include + +// A single VDBE is an opaque structure named "Vdbe". Only routines +// in the source file sqliteVdbe.c are allowed to see the insides +// of this structure. +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ + +// The names of the following types declared in vdbeInt.h are required +// for the VdbeOp definition. +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ +type SubProgram1 = struct { + FaOp uintptr + FnOp int32 + FnMem int32 + FnCsr int32 + F__ccgo_pad1 [4]byte + FaOnce uintptr + Ftoken uintptr + FpNext uintptr +} /* sqlite3.c:578:9 */ + +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ + +// A single instruction of the virtual machine has an opcode +// and as many as three operands. The instruction is recorded +// as an instance of the following structure: +type VdbeOp1 = struct { + Fopcode U8 + Fp4type int8 + Fp5 U16 + Fp1 int32 + Fp2 int32 + Fp3 int32 + Fp4 struct { + F__ccgo_pad1 [0]uint64 + Fi int32 + F__ccgo_pad2 [4]byte + } +} /* sqlite3.c:578:9 */ + +// A single instruction of the virtual machine has an opcode +// and as many as three operands. The instruction is recorded +// as an instance of the following structure: +type p4union = struct { + F__ccgo_pad1 [0]uint64 + Fi int32 + F__ccgo_pad2 [4]byte +} /* sqlite3.c:578:9 */ + +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ + +// A smaller version of VdbeOp used for the VdbeAddOpList() function because +// it takes up less space. +type VdbeOpList1 = struct { + Fopcode U8 + Fp1 int8 + Fp2 int8 + Fp3 int8 +} /* sqlite3.c:15436:1 */ + +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ + +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ + +// Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on +// each VDBE opcode. +// +// Use the SQLITE_ENABLE_MODULE_COMMENTS macro to see some extra no-op +// comments in VDBE programs that show key decision points in the code +// generator. + +// The VdbeCoverage macros are used to set a coverage testing point +// for VDBE branch instructions. The coverage testing points are line +// numbers in the sqlite3.c source file. VDBE branch coverage testing +// only works with an amalagmation build. That's ok since a VDBE branch +// coverage build designed for testing the test suite only. No application +// should ever ship with VDBE branch coverage measuring turned on. +// +// VdbeCoverage(v) // Mark the previously coded instruction +// // as a branch +// +// VdbeCoverageIf(v, conditional) // Mark previous if conditional true +// +// VdbeCoverageAlwaysTaken(v) // Previous branch is always taken +// +// VdbeCoverageNeverTaken(v) // Previous branch is never taken +// +// VdbeCoverageNeverNull(v) // Previous three-way branch is only +// // taken on the first two ways. The +// // NULL option is not possible +// +// VdbeCoverageEqNe(v) // Previous OP_Jump is only interested +// // in distingishing equal and not-equal. +// +// Every VDBE branch operation must be tagged with one of the macros above. +// If not, then when "make test" is run with -DSQLITE_VDBE_COVERAGE and +// -DSQLITE_DEBUG then an ALWAYS() will fail in the vdbeTakeBranch() +// routine in vdbe.c, alerting the developer to the missed tag. +// +// During testing, the test application will invoke +// sqlite3_test_control(SQLITE_TESTCTRL_VDBE_COVERAGE,...) to set a callback +// routine that is invoked as each bytecode branch is taken. The callback +// contains the sqlite3.c source line number ov the VdbeCoverage macro and +// flags to indicate whether or not the branch was taken. The test application +// is responsible for keeping track of this and reporting byte-code branches +// that are never taken. +// +// See the VdbeBranchTaken() macro and vdbeTakeBranch() function in the +// vdbe.c source file for additional information. + +//************* End of vdbe.h *********************************************** +//************* Continuing where we left off in sqliteInt.h ***************** +//************* Include pcache.h in the middle of sqliteInt.h *************** +//************* Begin file pcache.h ***************************************** +// 2008 August 05 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface that the sqlite page cache +// subsystem. + +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ +type PCache2 = struct { + FpDirty uintptr + FpDirtyTail uintptr + FpSynced uintptr + FnRefSum int32 + FszCache int32 + FszSpill int32 + FszPage int32 + FszExtra int32 + FbPurgeable U8 + FeCreate U8 + F__ccgo_pad1 [2]byte + FxStress uintptr + FpStress uintptr + FpCache uintptr +} /* sqlite3.c:578:9 */ + +type PCache = PCache2 /* sqlite3.c:15991:23 */ + +// typedef for the authorization callback function. +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ + +// This is an extra SQLITE_TRACE macro that indicates "legacy" tracing +// in the style of sqlite3_trace() + +// Maximum number of sqlite3.aDb[] entries. This is the number of attached +// databases plus 2 for "main" and "temp". + +// Each database connection is an instance of the following structure. +type sqlite3InitInfo = struct { + FnewTnum Pgno + FiDb U8 + Fbusy U8 + F__ccgo_pad1 [2]byte + ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1 */ + F__ccgo_pad2 [7]byte + FazInit uintptr +} /* sqlite3.c:578:9 */ + +// Allowed values for Table.tabFlags. +// +// TF_OOOHidden applies to tables or view that have hidden columns that are +// followed by non-hidden columns. Example: "CREATE VIRTUAL TABLE x USING +// vtab1(a HIDDEN, b);". Since "b" is a non-hidden column but "a" is hidden, +// the TF_OOOHidden attribute would apply in this case. Such tables require +// special handling during INSERT processing. The "OOO" means "Out Of Order". +// +// Constraints: +// +// TF_HasVirtual == COLFLAG_VIRTUAL +// TF_HasStored == COLFLAG_STORED +// TF_HasHidden == COLFLAG_HIDDEN + +// Allowed values for Table.eTabType + +// Test to see whether or not a table is a virtual table. This is +// done as a macro so that it will be optimized out when virtual +// table support is omitted from the build. + +// Macros to determine if a column is hidden. IsOrdinaryHiddenColumn() +// only works for non-virtual tables (ordinary tables and views) and is +// always false unless SQLITE_ENABLE_HIDDEN_COLUMNS is defined. The +// IsHiddenColumn() macro is general purpose. + +// Does the table have a rowid + +// Each foreign key constraint is an instance of the following structure. +// +// A foreign key is associated with two tables. The "from" table is +// the table that contains the REFERENCES clause that creates the foreign +// key. The "to" table is the table that is named in the REFERENCES clause. +// Consider this example: +// +// CREATE TABLE ex1( +// a INTEGER PRIMARY KEY, +// b INTEGER CONSTRAINT fk1 REFERENCES ex2(x) +// ); +// +// For foreign key "fk1", the from-table is "ex1" and the to-table is "ex2". +// Equivalent names: +// +// from-table == child-table +// to-table == parent-table +// +// Each REFERENCES clause generates an instance of the following structure +// which is attached to the from-table. The to-table need not exist when +// the from-table is created. The existence of the to-table is not checked. +// +// The list of all parents for child Table X is held at X.pFKey. +// +// A list of all children for a table named Z (which might not even exist) +// is held in Schema.fkeyHash with a hash key of Z. +type sColMap = struct { + FiFrom int32 + F__ccgo_pad1 [4]byte + FzCol uintptr +} /* sqlite3.c:14587:9 */ + +// An instance of this structure contains information needed to generate +// code for a SELECT that contains aggregate functions. +// +// If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a +// pointer to this structure. The Expr.iAgg field is the index in +// AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate +// code for that node. +// +// AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the +// original Select structure that describes the SELECT statement. These +// fields do not need to be freed when deallocating the AggInfo structure. +type AggInfo_col = struct { + FpTab uintptr + FpCExpr uintptr + FiTable int32 + FiMem int32 + FiColumn I16 + FiSorterColumn I16 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +// An instance of this structure contains information needed to generate +// code for a SELECT that contains aggregate functions. +// +// If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a +// pointer to this structure. The Expr.iAgg field is the index in +// AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate +// code for that node. +// +// AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the +// original Select structure that describes the SELECT statement. These +// fields do not need to be freed when deallocating the AggInfo structure. +type AggInfo_func = struct { + FpFExpr uintptr + FpFunc uintptr + FiMem int32 + FiDistinct int32 + FiDistAddr int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +// The datatype ynVar is a signed integer, either 16-bit or 32-bit. +// Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater +// than 32767 we have to make it 32-bit. 16-bit is preferred because +// it uses less memory in the Expr object, which is a big memory user +// in systems with lots of prepared statements. And few applications +// need more than about 10 or 20 variables. But some extreme users want +// to have prepared statements with over 32766 variables, and for them +// the option is available (at compile-time). +type YnVar = I16 /* sqlite3.c:17979:13 */ + +// The following are the meanings of bits in the Expr.flags field. +// Value restrictions: +// +// EP_Agg == NC_HasAgg == SF_HasAgg +// EP_Win == NC_HasWin +// 0x400000 // Available +// 0x80000000 // Available + +// The EP_Propagate mask is a set of properties that automatically propagate +// upwards into parent nodes. + +// Macros can be used to test, set, or clear bits in the +// Expr.flags field. + +// Macros used to ensure that the correct members of unions are accessed +// in Expr. + +// Flags for use with Expr.vvaFlags + +// The ExprSetVVAProperty() macro is used for Verification, Validation, +// and Accreditation only. It works like ExprSetProperty() during VVA +// processes but is a no-op for delivery. + +// Macros to determine the number of bytes required by a normal Expr +// struct, an Expr struct with the EP_Reduced flag set in Expr.flags +// and an Expr struct with the EP_TokenOnly flag set. + +// Flags passed to the sqlite3ExprDup() function. See the header comment +// above sqlite3ExprDup() for details. + +// True if the expression passed as an argument was a function with +// an OVER() clause (a window function). + +// A list of expressions. Each expression may optionally have a +// name. An expr/name combination can be used in several ways, such +// as the list of "expr AS ID" fields following a "SELECT" or in the +// list of "ID = expr" items in an UPDATE. A list of expressions can +// also be used as the argument to a function, in which case the a.zName +// field is not used. +// +// In order to try to keep memory usage down, the Expr.a.zEName field +// is used for multiple purposes: +// +// eEName Usage +// ---------- ------------------------- +// ENAME_NAME (1) the AS of result set column +// (2) COLUMN= of an UPDATE +// +// ENAME_TAB DB.TABLE.NAME used to resolve names +// of subqueries +// +// ENAME_SPAN Text of the original result set +// expression. +type ExprList_item = struct { + FpExpr uintptr + FzEName uintptr + FsortFlags U8 + F__ccgo_pad1 [3]byte + FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */ + F__ccgo_pad2 [3]byte + Fu struct { + F__ccgo_pad1 [0]uint32 + Fx struct { + FiOrderByCol U16 + FiAlias U16 + } + } + F__ccgo_pad3 [4]byte +} /* sqlite3.c:578:9 */ + +// Allowed values for Expr.a.eEName + +// An instance of this structure can hold a simple list of identifiers, +// such as the list "a,b,c" in the following statements: +// +// INSERT INTO t(a,b,c) VALUES ...; +// CREATE INDEX idx ON t(a,b,c); +// CREATE TRIGGER trig BEFORE UPDATE ON t(a,b,c) ...; +// +// The IdList.a.idx field is used when the IdList represents the list of +// column names after a table name in an INSERT statement. In the statement +// +// INSERT INTO t(a,b,c) ... +// +// If "a" is the k-th column of table "t", then IdList.a[0].idx==k. +type IdList_item = struct { + FzName uintptr + Fidx int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +// The yDbMask datatype for the bitmask of all attached databases. +type YDbMask = uint32 /* sqlite3.c:18758:24 */ + +// A pointer to this structure is used to communicate information +// from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. +type InitData = struct { + Fdb uintptr + FpzErrMsg uintptr + FiDb int32 + Frc int32 + FmInitFlags U32 + FnInitRow U32 + FmxPage Pgno + F__ccgo_pad1 [4]byte +} /* sqlite3.c:19119:3 */ + +// Allowed values for mInitFlags + +// Tuning parameters are set using SQLITE_TESTCTRL_TUNE and are controlled +// on debug-builds of the CLI using ".testctrl tune ID VALUE". Tuning +// parameters are for temporary use during development, to help find +// optimial values for parameters in the query planner. The should not +// be used on trunk check-ins. They are a temporary mechanism available +// for transient development builds only. +// +// Tuning parameters are numbered starting with 1. + +// Structure containing global configuration data for the SQLite library. +// +// This structure also contains some state information. +type Sqlite3Config = struct { + FbMemstat int32 + FbCoreMutex U8 + FbFullMutex U8 + FbOpenUri U8 + FbUseCis U8 + FbSmallMalloc U8 + FbExtraSchemaChecks U8 + F__ccgo_pad1 [2]byte + FmxStrlen int32 + FneverCorrupt int32 + FszLookaside int32 + FnLookaside int32 + FnStmtSpill int32 + Fm Sqlite3_mem_methods + Fmutex Sqlite3_mutex_methods + Fpcache2 Sqlite3_pcache_methods2 + FpHeap uintptr + FnHeap int32 + FmnReq int32 + FmxReq int32 + F__ccgo_pad2 [4]byte + FszMmap Sqlite3_int64 + FmxMmap Sqlite3_int64 + FpPage uintptr + FszPage int32 + FnPage int32 + FmxParserStack int32 + FsharedCacheEnabled int32 + FszPma U32 + FisInit int32 + FinProgress int32 + FisMutexInit int32 + FisMallocInit int32 + FisPCacheInit int32 + FnRefInitMutex int32 + F__ccgo_pad3 [4]byte + FpInitMutex uintptr + FxLog uintptr + FpLogArg uintptr + FmxMemdbSize Sqlite3_int64 + FxTestCallback uintptr + FbLocaltimeFault int32 + F__ccgo_pad4 [4]byte + FxAltLocaltime uintptr + FiOnceResetThreshold int32 + FszSorterRef U32 + FiPrngSeed uint32 + F__ccgo_pad5 [4]byte +} /* sqlite3.c:19150:1 */ + +// This macro is used inside of assert() statements to indicate that +// the assert is only valid on a well-formed database. Instead of: +// +// assert( X ); +// +// One writes: +// +// assert( X || CORRUPT_DB ); +// +// CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate +// that the database is definitely corrupt, only that it might be corrupt. +// For most test cases, CORRUPT_DB is set to false using a special +// sqlite3_test_control(). This enables assert() statements to prove +// things that are always true for well-formed databases. + +// Context pointer passed down through the tree-walk. +type RefSrcList = struct { + Fdb uintptr + FpRef uintptr + FnExclude I64 + FaiExclude uintptr +} /* sqlite3.c:19250:5 */ + +// This macro is used inside of assert() statements to indicate that +// the assert is only valid on a well-formed database. Instead of: +// +// assert( X ); +// +// One writes: +// +// assert( X || CORRUPT_DB ); +// +// CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate +// that the database is definitely corrupt, only that it might be corrupt. +// For most test cases, CORRUPT_DB is set to false using a special +// sqlite3_test_control(). This enables assert() statements to prove +// things that are always true for well-formed databases. + +// Context pointer passed down through the tree-walk. +type IdxCover = struct { + FpIdx uintptr + FiCur int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:19252:5 */ + +// This macro is used inside of assert() statements to indicate that +// the assert is only valid on a well-formed database. Instead of: +// +// assert( X ); +// +// One writes: +// +// assert( X || CORRUPT_DB ); +// +// CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate +// that the database is definitely corrupt, only that it might be corrupt. +// For most test cases, CORRUPT_DB is set to false using a special +// sqlite3_test_control(). This enables assert() statements to prove +// things that are always true for well-formed databases. + +// Context pointer passed down through the tree-walk. +type IdxExprTrans1 = struct { + FpIdxExpr uintptr + FiTabCur int32 + FiIdxCur int32 + FiIdxCol int32 + FiTabCol int32 + FpWInfo uintptr + Fdb uintptr +} /* sqlite3.c:19253:5 */ + +// This macro is used inside of assert() statements to indicate that +// the assert is only valid on a well-formed database. Instead of: +// +// assert( X ); +// +// One writes: +// +// assert( X || CORRUPT_DB ); +// +// CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate +// that the database is definitely corrupt, only that it might be corrupt. +// For most test cases, CORRUPT_DB is set to false using a special +// sqlite3_test_control(). This enables assert() statements to prove +// things that are always true for well-formed databases. + +// Context pointer passed down through the tree-walk. +type WindowRewrite1 = struct { + FpWin uintptr + FpSrc uintptr + FpSub uintptr + FpTab uintptr + FpSubSelect uintptr +} /* sqlite3.c:19256:5 */ + +// This macro is used inside of assert() statements to indicate that +// the assert is only valid on a well-formed database. Instead of: +// +// assert( X ); +// +// One writes: +// +// assert( X || CORRUPT_DB ); +// +// CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate +// that the database is definitely corrupt, only that it might be corrupt. +// For most test cases, CORRUPT_DB is set to false using a special +// sqlite3_test_control(). This enables assert() statements to prove +// things that are always true for well-formed databases. + +// Context pointer passed down through the tree-walk. +type WhereConst1 = struct { + FpParse uintptr + FpOomFault uintptr + FnConst int32 + FnChng int32 + FbHasAffBlob int32 + F__ccgo_pad1 [4]byte + FapExpr uintptr +} /* sqlite3.c:19257:5 */ + +// This macro is used inside of assert() statements to indicate that +// the assert is only valid on a well-formed database. Instead of: +// +// assert( X ); +// +// One writes: +// +// assert( X || CORRUPT_DB ); +// +// CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate +// that the database is definitely corrupt, only that it might be corrupt. +// For most test cases, CORRUPT_DB is set to false using a special +// sqlite3_test_control(). This enables assert() statements to prove +// things that are always true for well-formed databases. + +// Context pointer passed down through the tree-walk. +type RenameCtx1 = struct { + FpList uintptr + FnList int32 + FiCol int32 + FpTab uintptr + FzOld uintptr +} /* sqlite3.c:19258:5 */ + +//************* End of sqliteInt.h ****************************************** +//************* Begin file os_common.h ************************************** +// 2004 May 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains macros and a little bit of code that is common to +// all of the platform-specific files (os_*.c) and is #included into those +// files. +// +// This file should be #included by the os_*.c files only. It is not a +// general purpose header file. + +// At least two bugs have slipped in because we changed the MEMORY_DEBUG +// macro to SQLITE_DEBUG and some older makefiles have not yet made the +// switch. The following code should catch this problem at compile-time. + +// Macros for performance tracing. Normally turned off. Only works +// on i486 hardware. + +// If we compile with the SQLITE_TEST macro set, then the following block +// of code will give us the ability to simulate a disk I/O error. This +// is used for testing the I/O recovery logic. + +// When testing, keep a count of the number of open files. + +//************* End of os_common.h ****************************************** +//************* Begin file ctime.c ****************************************** +// DO NOT EDIT! +// This file is automatically generated by the script in the canonical +// SQLite source tree at tool/mkctimec.tcl. +// +// To modify this header, edit any of the various lists in that script +// which specify categories of generated conditionals in this file. + +// 2010 February 23 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file implements routines used to report what compile-time options +// SQLite was built with. + +// Include the configuration header output by 'configure' if we're using the +// autoconf-based build + +// These macros are provided to "stringify" the value of the define +// for those options in which the value is meaningful. + +// Like CTIMEOPT_VAL, but especially for SQLITE_DEFAULT_LOOKASIDE. This +// option requires a separate macro because legal values contain a single +// comma. e.g. (-DSQLITE_DEFAULT_LOOKASIDE="100,100") +// #include "sqliteInt.h" + +// An array of names of all compile-time options. This array should +// be sorted A-Z. +// +// This array looks large, but in a typical installation actually uses +// only a handful of compile-time options, so most times this array is usually +// rather short and uses little memory space. +var sqlite3azCompileOpt = [51]uintptr{ + + ts + 7, + ts + 27, + ts + 47, + ts + 66, + ts + 91, + ts + 113, + ts + 143, + ts + 163, + ts + 186, + ts + 211, + ts + 238, + ts + 263, + ts + 285, + ts + 317, + ts + 343, + ts + 368, + ts + 391, + ts + 403, + ts + 418, + ts + 440, + ts + 465, + ts + 488, + ts + 510, + ts + 521, + ts + 534, + ts + 549, + ts + 565, + ts + 578, + ts + 599, + ts + 623, + ts + 646, + ts + 662, + ts + 678, + ts + 702, + ts + 729, + ts + 749, + ts + 770, + ts + 792, + ts + 822, + ts + 847, + ts + 873, + ts + 893, + ts + 919, + ts + 942, + ts + 968, + ts + 990, + ts + 1011, + ts + 1022, + ts + 1030, + ts + 1044, + ts + 1057, +} /* sqlite3.c:20868:19 */ + +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ + *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) + return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) +} + +//************* End of ctime.c ********************************************** +//************* Begin file global.c ***************************************** +// 2008 June 13 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains definitions of global variables and constants. +// #include "sqliteInt.h" + +// An array to map all upper-case characters into their corresponding +// lower-case character. +// +// SQLite only considers US-ASCII (or EBCDIC) characters. We do not +// handle case conversions for the UTF character set since the tables +// involved are nearly as big or bigger than SQLite itself. +var Xsqlite3UpperToLower = [274]uint8{ + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), + uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), + uint8(36), uint8(37), uint8(38), uint8(39), uint8(40), uint8(41), uint8(42), uint8(43), uint8(44), uint8(45), uint8(46), uint8(47), uint8(48), uint8(49), uint8(50), uint8(51), uint8(52), uint8(53), + uint8(54), uint8(55), uint8(56), uint8(57), uint8(58), uint8(59), uint8(60), uint8(61), uint8(62), uint8(63), uint8(64), uint8(97), uint8(98), uint8(99), uint8(100), uint8(101), uint8(102), uint8(103), + uint8(104), uint8(105), uint8(106), uint8(107), uint8(108), uint8(109), uint8(110), uint8(111), uint8(112), uint8(113), uint8(114), uint8(115), uint8(116), uint8(117), uint8(118), uint8(119), uint8(120), uint8(121), + uint8(122), uint8(91), uint8(92), uint8(93), uint8(94), uint8(95), uint8(96), uint8(97), uint8(98), uint8(99), uint8(100), uint8(101), uint8(102), uint8(103), uint8(104), uint8(105), uint8(106), uint8(107), + uint8(108), uint8(109), uint8(110), uint8(111), uint8(112), uint8(113), uint8(114), uint8(115), uint8(116), uint8(117), uint8(118), uint8(119), uint8(120), uint8(121), uint8(122), uint8(123), uint8(124), uint8(125), + uint8(126), uint8(127), uint8(128), uint8(129), uint8(130), uint8(131), uint8(132), uint8(133), uint8(134), uint8(135), uint8(136), uint8(137), uint8(138), uint8(139), uint8(140), uint8(141), uint8(142), uint8(143), + uint8(144), uint8(145), uint8(146), uint8(147), uint8(148), uint8(149), uint8(150), uint8(151), uint8(152), uint8(153), uint8(154), uint8(155), uint8(156), uint8(157), uint8(158), uint8(159), uint8(160), uint8(161), + uint8(162), uint8(163), uint8(164), uint8(165), uint8(166), uint8(167), uint8(168), uint8(169), uint8(170), uint8(171), uint8(172), uint8(173), uint8(174), uint8(175), uint8(176), uint8(177), uint8(178), uint8(179), + uint8(180), uint8(181), uint8(182), uint8(183), uint8(184), uint8(185), uint8(186), uint8(187), uint8(188), uint8(189), uint8(190), uint8(191), uint8(192), uint8(193), uint8(194), uint8(195), uint8(196), uint8(197), + uint8(198), uint8(199), uint8(200), uint8(201), uint8(202), uint8(203), uint8(204), uint8(205), uint8(206), uint8(207), uint8(208), uint8(209), uint8(210), uint8(211), uint8(212), uint8(213), uint8(214), uint8(215), + uint8(216), uint8(217), uint8(218), uint8(219), uint8(220), uint8(221), uint8(222), uint8(223), uint8(224), uint8(225), uint8(226), uint8(227), uint8(228), uint8(229), uint8(230), uint8(231), uint8(232), uint8(233), + uint8(234), uint8(235), uint8(236), uint8(237), uint8(238), uint8(239), uint8(240), uint8(241), uint8(242), uint8(243), uint8(244), uint8(245), uint8(246), uint8(247), uint8(248), uint8(249), uint8(250), uint8(251), + uint8(252), uint8(253), uint8(254), uint8(255), + // All of the upper-to-lower conversion data is above. The following + // 18 integers are completely unrelated. They are appended to the + // sqlite3UpperToLower[] array to avoid UBSAN warnings. Here's what is + // going on: + // + // The SQL comparison operators (<>, =, >, <=, <, and >=) are implemented + // by invoking sqlite3MemCompare(A,B) which compares values A and B and + // returns negative, zero, or positive if A is less then, equal to, or + // greater than B, respectively. Then the true false results is found by + // consulting sqlite3aLTb[opcode], sqlite3aEQb[opcode], or + // sqlite3aGTb[opcode] depending on whether the result of compare(A,B) + // is negative, zero, or positive, where opcode is the specific opcode. + // The only works because the comparison opcodes are consecutive and in + // this order: NE EQ GT LE LT GE. Various assert()s throughout the code + // ensure that is the case. + // + // These elements must be appended to another array. Otherwise the + // index (here shown as [256-OP_Ne]) would be out-of-bounds and thus + // be undefined behavior. That's goofy, but the C-standards people thought + // it was a good idea, so here we are. + // NE EQ GT LE LT GE + uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero + uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero + uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ + +// The following 256 byte lookup table is used to support SQLites built-in +// equivalents to the following standard library functions: +// +// isspace() 0x01 +// isalpha() 0x02 +// isdigit() 0x04 +// isalnum() 0x06 +// isxdigit() 0x08 +// toupper() 0x20 +// SQLite identifier character 0x40 +// Quote character 0x80 +// +// Bit 0x20 is set if the mapped character requires translation to upper +// case. i.e. if the character is a lower-case ASCII character. +// If x is a lower-case ASCII character, then its upper-case equivalent +// is (x - 0x20). Therefore toupper() can be implemented as: +// +// (x & ~(map[x]&0x20)) +// +// The equivalent of tolower() is implemented using the sqlite3UpperToLower[] +// array. tolower() is used more often than toupper() by SQLite. +// +// Bit 0x40 is set if the character is non-alphanumeric and can be used in an +// SQLite identifier. Identifiers are alphanumerics, "_", "$", and any +// non-ASCII UTF character. Hence the test for whether or not a character is +// part of an identifier is 0x46. +var Xsqlite3CtypeMap = [256]uint8{ + uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 00..07 ........ + uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), // 08..0f ........ + uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 10..17 ........ + uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 18..1f ........ + uint8(0x01), uint8(0x00), uint8(0x80), uint8(0x00), uint8(0x40), uint8(0x00), uint8(0x00), uint8(0x80), // 20..27 !"#$%&' + uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 28..2f ()*+,-./ + uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), // 30..37 01234567 + uint8(0x0c), uint8(0x0c), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 38..3f 89:;<=>? + + uint8(0x00), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x02), // 40..47 @ABCDEFG + uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), // 48..4f HIJKLMNO + uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), // 50..57 PQRSTUVW + uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x80), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x40), // 58..5f XYZ[\]^_ + uint8(0x80), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x22), // 60..67 `abcdefg + uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), // 68..6f hijklmno + uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), // 70..77 pqrstuvw + uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 78..7f xyz{|}~. + + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 80..87 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 88..8f ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 90..97 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 98..9f ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // a0..a7 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // a8..af ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // b0..b7 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // b8..bf ........ + + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // c0..c7 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // c8..cf ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // d0..d7 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // d8..df ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e0..e7 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ + uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ +} /* sqlite3.c:21721:36 */ + +// EVIDENCE-OF: R-02982-34736 In order to maintain full backwards +// compatibility for legacy applications, the URI filename capability is +// disabled by default. +// +// EVIDENCE-OF: R-38799-08373 URI filenames can be enabled or disabled +// using the SQLITE_USE_URI=1 or SQLITE_USE_URI=0 compile-time options. +// +// EVIDENCE-OF: R-43642-56306 By default, URI handling is globally +// disabled. The default value may be changed by compiling with the +// SQLITE_USE_URI symbol defined. + +// EVIDENCE-OF: R-38720-18127 The default setting is determined by the +// SQLITE_ALLOW_COVERING_INDEX_SCAN compile-time option, or is "on" if +// that compile-time option is omitted. + +// The minimum PMA size is set to this value multiplied by the database +// page size in bytes. + +// Statement journals spill to disk when their size exceeds the following +// threshold (in bytes). 0 means that statement journals are created and +// written to disk immediately (the default behavior for SQLite versions +// before 3.12.0). -1 means always keep the entire statement journal in +// memory. (The statement journal is also always held entirely in memory +// if journal_mode=MEMORY or if temp_store=MEMORY, regardless of this +// setting.) + +// The default lookaside-configuration, the format "SZ,N". SZ is the +// number of bytes in each lookaside slot (should be a multiple of 8) +// and N is the number of slots. The lookaside-configuration can be +// changed as start-time using sqlite3_config(SQLITE_CONFIG_LOOKASIDE) +// or at run-time for an individual database connection using +// sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE); +// +// With the two-size-lookaside enhancement, less lookaside is required. +// The default configuration of 1200,40 actually provides 30 1200-byte slots +// and 93 128-byte slots, which is more lookaside than is available +// using the older 1200,100 configuration without two-size-lookaside. + +// The default maximum size of an in-memory database created using +// sqlite3_deserialize() + +// The following singleton contains the global configuration for +// the SQLite library. +var Xsqlite3Config = Sqlite3Config{ + FbMemstat: SQLITE_DEFAULT_MEMSTATUS, // bMemstat + FbCoreMutex: U8(1), // bCoreMutex + FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), + FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), // bSmallMalloc + FbExtraSchemaChecks: U8(1), // bExtraSchemaChecks + FmxStrlen: 0x7ffffffe, // neverCorrupt + FszLookaside: 1200, FnLookaside: 40, // szLookaside, nLookaside + FnStmtSpill: 64 * 1024, + FmxMmap: int64(SQLITE_MAX_MMAP_SIZE), // szPage + FnPage: SQLITE_DEFAULT_PCACHE_INITSZ, // sharedCacheEnabled + FszPma: U32(SQLITE_SORTER_PMASZ), // pLogArg + FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime + FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold + FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed +} /* sqlite3.c:21841:48 */ + +// Hash table for global functions - functions common to all +// database connections. After initialization, this table is +// read-only. +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ + +// The value of the "pending" byte must be 0x40000000 (1 byte past the +// 1-gibabyte boundary) in a compatible database. SQLite never uses +// the database page that contains the pending byte. It never attempts +// to read or write that page. The pending byte page is set aside +// for use by the VFS layers as space for managing file locks. +// +// During testing, it is often desirable to move the pending byte to +// a different position in the file. This allows code that has to +// deal with the pending byte to run on files that are much smaller +// than 1 GiB. The sqlite3_test_control() interface can be used to +// move the pending byte. +// +// IMPORTANT: Changing the pending byte to any value other than +// 0x40000000 results in an incompatible database file format! +// Changing the pending byte during operation will result in undefined +// and incorrect behavior. +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ + +// Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ + +// #include "opcodes.h" +// Properties of opcodes. The OPFLG_INITIALIZER macro is +// created by mkopcodeh.awk during compilation. Data is obtained +// from the comments following the "case OP_xxxx:" statements in +// the vdbe.c file. +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ + +// Name of the default collating sequence +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1070)) /* sqlite3.c:21965:27 */ + +// Standard typenames. These names must match the COLTYPE_* definitions. +// Adjust the SQLITE_N_STDTYPE value if adding or removing entries. +// +// sqlite3StdType[] The actual names of the datatypes. +// +// sqlite3StdTypeLen[] The length (in bytes) of each entry +// in sqlite3StdType[]. +// +// sqlite3StdTypeAffinity[] The affinity associated with each entry +// in sqlite3StdType[]. +// +// sqlite3StdTypeMap[] The type value (as returned from +// sqlite3_column_type() or sqlite3_value_type()) +// for each entry in sqlite3StdType[]. +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ +var Xsqlite3StdTypeAffinity = [6]uint8{ + uint8(SQLITE_AFF_NUMERIC), + uint8(SQLITE_AFF_BLOB), + uint8(SQLITE_AFF_INTEGER), + uint8(SQLITE_AFF_INTEGER), + uint8(SQLITE_AFF_REAL), + uint8(SQLITE_AFF_TEXT), +} /* sqlite3.c:21984:27 */ +var Xsqlite3StdTypeMap = [6]uint8{ + uint8(0), + uint8(SQLITE_BLOB), + uint8(SQLITE_INTEGER), + uint8(SQLITE_INTEGER), + uint8(SQLITE_FLOAT), + uint8(SQLITE_TEXT), +} /* sqlite3.c:21992:27 */ +var Xsqlite3StdType = [6]uintptr{ + ts + 1077, + ts + 1081, + ts + 1086, + ts + 1090, + ts + 1098, + ts + 1103, +} /* sqlite3.c:22000:27 */ + +//************* End of global.c ********************************************* +//************* Begin file status.c ***************************************** +// 2008 June 18 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This module implements the sqlite3_status() interface and related +// functionality. +// #include "sqliteInt.h" +//************* Include vdbeInt.h in the middle of status.c ***************** +//************* Begin file vdbeInt.h **************************************** +// 2003 September 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This is the header file for information that is private to the +// VDBE. This information used to all be at the top of the single +// source code file "vdbe.c". When that file became too big (over +// 6000 lines long) it was split up into several smaller files and +// this header information was factored out. + +// The maximum number of times that a statement will try to reparse +// itself before giving up and returning SQLITE_SCHEMA. + +// VDBE_DISPLAY_P4 is true or false depending on whether or not the +// "explain" P4 display logic is enabled. + +// SQL is translated into a sequence of instructions to be +// executed by a virtual machine. Each instruction is an instance +// of the following structure. +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ + +// Boolean values +type Bool = uint32 /* sqlite3.c:22079:18 */ + +// Opaque type used by code in vdbesort.c +type VdbeSorter1 = struct { + FmnPmaSize int32 + FmxPmaSize int32 + FmxKeysize int32 + Fpgsz int32 + FpReader uintptr + FpMerger uintptr + Fdb uintptr + FpKeyInfo uintptr + FpUnpacked uintptr + Flist SorterList + FiMemory int32 + FnMemory int32 + FbUsePMA U8 + FbUseThreads U8 + FiPrev U8 + FnTask U8 + FtypeMask U8 + F__ccgo_pad1 [3]byte + FaTask [1]SortSubtask +} /* sqlite3.c:22082:9 */ + +// Opaque type used by code in vdbesort.c +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ + +// Elements of the linked list at Vdbe.pAuxData +type AuxData1 = struct { + FiAuxOp int32 + FiAuxArg int32 + FpAux uintptr + FxDeleteAux uintptr + FpNextAux uintptr +} /* sqlite3.c:578:9 */ + +// Elements of the linked list at Vdbe.pAuxData +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ + +// Types of VDBE cursors + +// A VdbeCursor is an superclass (a wrapper) for various cursor objects: +// +// * A b-tree cursor +// - In the main database or in an ephemeral database +// - On either an index or a table +// * A sorter +// * A virtual table +// * A one-row "pseudotable" stored in a single register +type VdbeCursor1 = struct { + FeCurType U8 + FiDb I8 + FnullRow U8 + FdeferredMoveto U8 + FisTable U8 + F__ccgo_pad1 [3]byte + FisEphemeral uint8 /* Bool isEphemeral: 1, Bool useRandomRowid: 1, Bool isOrdered: 1, Bool hasBeenDuped: 1 */ + F__ccgo_pad2 [1]byte + FseekHit U16 + F__ccgo_pad3 [4]byte + Fub struct{ FpBtx uintptr } + FseqCount I64 + FcacheStatus U32 + FseekResult int32 + FpAltCursor uintptr + Fuc struct{ FpCursor uintptr } + FpKeyInfo uintptr + FiHdrOffset U32 + FpgnoRoot Pgno + FnField I16 + FnHdrParsed U16 + F__ccgo_pad4 [4]byte + FmovetoTarget I64 + FaOffset uintptr + FaRow uintptr + FpayloadSize U32 + FszRow U32 + FaType [1]U32 + F__ccgo_pad5 [4]byte +} /* sqlite3.c:578:9 */ + +// Types of VDBE cursors + +// A VdbeCursor is an superclass (a wrapper) for various cursor objects: +// +// * A b-tree cursor +// - In the main database or in an ephemeral database +// - On either an index or a table +// * A sorter +// * A virtual table +// * A one-row "pseudotable" stored in a single register +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ + +// A value for VdbeCursor.cacheStatus that means the cache is always invalid. + +// When a sub-program is executed (OP_Program), a structure of this type +// is allocated to store the current value of the program counter, as +// well as the current memory cell array and various other frame specific +// values stored in the Vdbe struct. When the sub-program is finished, +// these values are copied back to the Vdbe from the VdbeFrame structure, +// restoring the state of the VM to as it was before the sub-program +// began executing. +// +// The memory for a VdbeFrame object is allocated and managed by a memory +// cell in the parent (calling) frame. When the memory cell is deleted or +// overwritten, the VdbeFrame object is not freed immediately. Instead, it +// is linked into the Vdbe.pDelFrame list. The contents of the Vdbe.pDelFrame +// list is deleted when the VM is reset in VdbeHalt(). The reason for doing +// this instead of deleting the VdbeFrame immediately is to avoid recursive +// calls to sqlite3VdbeMemRelease() when the memory cells belonging to the +// child frame are released. +// +// The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is +// set to NULL if the currently executing frame is the main program. +type VdbeFrame1 = struct { + Fv uintptr + FpParent uintptr + FaOp uintptr + FanExec uintptr + FaMem uintptr + FapCsr uintptr + FaOnce uintptr + Ftoken uintptr + FlastRowid I64 + FpAuxData uintptr + FnCursor int32 + Fpc int32 + FnOp int32 + FnMem int32 + FnChildMem int32 + FnChildCsr int32 + FnChange I64 + FnDbChange I64 +} /* sqlite3.c:578:9 */ + +// A value for VdbeCursor.cacheStatus that means the cache is always invalid. + +// When a sub-program is executed (OP_Program), a structure of this type +// is allocated to store the current value of the program counter, as +// well as the current memory cell array and various other frame specific +// values stored in the Vdbe struct. When the sub-program is finished, +// these values are copied back to the Vdbe from the VdbeFrame structure, +// restoring the state of the VM to as it was before the sub-program +// began executing. +// +// The memory for a VdbeFrame object is allocated and managed by a memory +// cell in the parent (calling) frame. When the memory cell is deleted or +// overwritten, the VdbeFrame object is not freed immediately. Instead, it +// is linked into the Vdbe.pDelFrame list. The contents of the Vdbe.pDelFrame +// list is deleted when the VM is reset in VdbeHalt(). The reason for doing +// this instead of deleting the VdbeFrame immediately is to avoid recursive +// calls to sqlite3VdbeMemRelease() when the memory cells belonging to the +// child frame are released. +// +// The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is +// set to NULL if the currently executing frame is the main program. +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ + +// Magic number for sanity checking on VdbeFrame objects + +// Return a pointer to the array of registers allocated for use +// by a VdbeFrame. + +// Internally, the vdbe manipulates nearly all SQL values as Mem +// structures. Each Mem struct may cache multiple representations (string, +// integer etc.) of the same value. +type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ + +// A bitfield type for use inside of structures. Always follow with :N where +// N is the number of bits. +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type + +// The ScanStatus object holds a single value for the +// sqlite3_stmt_scanstatus() interface. +type ScanStatus1 = struct { + FaddrExplain int32 + FaddrLoop int32 + FaddrVisit int32 + FiSelectID int32 + FnEst LogEst + F__ccgo_pad1 [6]byte + FzName uintptr +} /* sqlite3.c:22380:9 */ + +// Bit Field Type + +// The ScanStatus object holds a single value for the +// sqlite3_stmt_scanstatus() interface. +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ + +// The DblquoteStr object holds the text of a double-quoted +// string for a prepared statement. A linked list of these objects +// is constructed during statement parsing and is held on Vdbe.pDblStr. +// When computing a normalized SQL statement for an SQL statement, that +// list is consulted for each double-quoted identifier to see if the +// identifier should really be a string literal. +type DblquoteStr1 = struct { + FpNextStr uintptr + Fz [8]uint8 +} /* sqlite3.c:22397:9 */ + +// The DblquoteStr object holds the text of a double-quoted +// string for a prepared statement. A linked list of these objects +// is constructed during statement parsing and is held on Vdbe.pDblStr. +// When computing a normalized SQL statement for an SQL statement, that +// list is consulted for each double-quoted identifier to see if the +// identifier should really be a string literal. +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ + +// An instance of this object is used to pass an vector of values into +// OP_VFilter, the xFilter method of a virtual table. The vector is the +// set of values on the right-hand side of an IN constraint. +// +// The value as passed into xFilter is an sqlite3_value with a "pointer" +// type, such as is generated by sqlite3_result_pointer() and read by +// sqlite3_value_pointer. Such values have MEM_Term|MEM_Subtype|MEM_Null +// and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces +// know how to use this object to step through all the values in the +// right operand of the IN constraint. +type ValueList1 = struct { + FpCsr uintptr + FpOut uintptr +} /* sqlite3.c:22525:9 */ + +// An instance of this object is used to pass an vector of values into +// OP_VFilter, the xFilter method of a virtual table. The vector is the +// set of values on the right-hand side of an IN constraint. +// +// The value as passed into xFilter is an sqlite3_value with a "pointer" +// type, such as is generated by sqlite3_result_pointer() and read by +// sqlite3_value_pointer. Such values have MEM_Term|MEM_Subtype|MEM_Null +// and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces +// know how to use this object to step through all the values in the +// right operand of the IN constraint. +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ + +//************* End of vdbeInt.h ******************************************** +//************* Continuing where we left off in status.c ******************** + +// Variables in which to record status information. +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ +type sqlite3StatType = struct { + FnowValue [10]Sqlite3StatValueType + FmxValue [10]Sqlite3StatValueType +} /* sqlite3.c:22692:9 */ + +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ + +// Elements of sqlite3Stat[] are protected by either the memory allocator +// mutex, or by the pcache1 mutex. The following array determines which. +var statMutex = [10]uint8{ + uint8(0), // SQLITE_STATUS_MEMORY_USED + uint8(1), // SQLITE_STATUS_PAGECACHE_USED + uint8(1), // SQLITE_STATUS_PAGECACHE_OVERFLOW + uint8(0), // SQLITE_STATUS_SCRATCH_USED + uint8(0), // SQLITE_STATUS_SCRATCH_OVERFLOW + uint8(0), // SQLITE_STATUS_MALLOC_SIZE + uint8(0), // SQLITE_STATUS_PARSER_STACK + uint8(1), // SQLITE_STATUS_PAGECACHE_SIZE + uint8(0), // SQLITE_STATUS_SCRATCH_SIZE + uint8(0), // SQLITE_STATUS_MALLOC_COUNT +} /* sqlite3.c:22702:19 */ + +// The "wsdStat" macro will resolve to the status information +// state vector. If writable static data is unsupported on the target, +// we have to locate the state vector at run-time. In the more common +// case where writable static data is supported, wsdStat can refer directly +// to the "sqlite3Stat" state vector declared above. + +// Return the current value of a status parameter. The caller must +// be holding the appropriate mutex. +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ + + return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) +} + +// Add N to the value of a status record. The caller must hold the +// appropriate mutex. (Locking is checked by assert()). +// +// The StatusUp() routine can accept positive or negative values for N. +// The value of N is added to the current status value and the high-water +// mark is adjusted if necessary. +// +// The StatusDown() routine lowers the current value by N. The highwater +// mark is unchanged. N must be non-negative for StatusDown(). +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ + + *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) + if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { + *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) + } +} + +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ + + *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) +} + +// Adjust the highwater mark if necessary. +// The caller must hold the appropriate mutex. +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ + var newValue Sqlite3StatValueType + + newValue = Sqlite3StatValueType(X) + + if newValue > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { + *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) = newValue + } +} + +// Query status information. +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ + var pMutex uintptr + _ = pMutex + + if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { + return Xsqlite3MisuseError(tls, 22808) + } + if statMutex[op] != 0 { + pMutex = Xsqlite3Pcache1Mutex(tls) + } else { + pMutex = Xsqlite3MallocMutex(tls) + } + Xsqlite3_mutex_enter(tls, pMutex) + *(*Sqlite3_int64)(unsafe.Pointer(pCurrent)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) + *(*Sqlite3_int64)(unsafe.Pointer(pHighwater)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) + if resetFlag != 0 { + *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) + } + Xsqlite3_mutex_leave(tls, pMutex) + _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 + return SQLITE_OK +} + +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + *(*Sqlite3_int64)(unsafe.Pointer(bp /* iCur */)) = int64(0) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iHwtr */)) = int64(0) + var rc int32 + rc = Xsqlite3_status64(tls, op, bp, bp+8, resetFlag) + if rc == 0 { + *(*int32)(unsafe.Pointer(pCurrent)) = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp /* iCur */))) + *(*int32)(unsafe.Pointer(pHighwater)) = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iHwtr */))) + } + return rc +} + +// Return the number of LookasideSlot elements on the linked list +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ + var cnt U32 = U32(0) + for p != 0 { + p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext + cnt++ + } + return cnt +} + +// Count the number of slots of lookaside memory that are outstanding +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ + var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) + var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) + nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) + nFree = nFree + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree) + if pHighwater != 0 { + *(*int32)(unsafe.Pointer(pHighwater)) = int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot - nInit) + } + return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot - (nInit + nFree)) +} + +// Query status information for a single database connection +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var rc int32 = SQLITE_OK // Return code + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + switch op { + case SQLITE_DBSTATUS_LOOKASIDE_USED: + { + *(*int32)(unsafe.Pointer(pCurrent)) = Xsqlite3LookasideUsed(tls, db, pHighwater) + if resetFlag != 0 { + var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree + if p != 0 { + for (*LookasideSlot)(unsafe.Pointer(p)).FpNext != 0 { + p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext + } + (*LookasideSlot)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree = uintptr(0) + } + p = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree + if p != 0 { + for (*LookasideSlot)(unsafe.Pointer(p)).FpNext != 0 { + p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext + } + (*LookasideSlot)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = uintptr(0) + } + } + break + + } + + case SQLITE_DBSTATUS_LOOKASIDE_HIT: + fallthrough + case SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE: + fallthrough + case SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: + { + + *(*int32)(unsafe.Pointer(pCurrent)) = 0 + *(*int32)(unsafe.Pointer(pHighwater)) = int32(*(*U32)(unsafe.Pointer(db + 440 + 16 + uintptr(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)*4))) + if resetFlag != 0 { + *(*U32)(unsafe.Pointer(db + 440 + 16 + uintptr(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)*4)) = U32(0) + } + break + + } + + // Return an approximation for the amount of memory currently used + // by all pagers associated with the given database connection. The + // highwater mark is meaningless and is returned as zero. + case SQLITE_DBSTATUS_CACHE_USED_SHARED: + fallthrough + case SQLITE_DBSTATUS_CACHE_USED: + { + var totalUsed int32 = 0 + var i int32 + Xsqlite3BtreeEnterAll(tls, db) + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + var pPager uintptr = Xsqlite3BtreePager(tls, pBt) + var nByte int32 = Xsqlite3PagerMemUsed(tls, pPager) + if op == SQLITE_DBSTATUS_CACHE_USED_SHARED { + nByte = nByte / Xsqlite3BtreeConnectionCount(tls, pBt) + } + totalUsed = totalUsed + nByte + } + } + Xsqlite3BtreeLeaveAll(tls, db) + *(*int32)(unsafe.Pointer(pCurrent)) = totalUsed + *(*int32)(unsafe.Pointer(pHighwater)) = 0 + break + + } + + // *pCurrent gets an accurate estimate of the amount of memory used + // to store the schema for all databases (main, temp, and any ATTACHed + // databases. *pHighwater is set to zero. + case SQLITE_DBSTATUS_SCHEMA_USED: + { + var i int32 // Used to iterate through schemas + *(*int32)(unsafe.Pointer(bp /* nByte */)) = 0 // Used to accumulate return value + + Xsqlite3BtreeEnterAll(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp /* &nByte */ + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpSchema + if pSchema != uintptr(0) { + var p uintptr + + *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(uint32((*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, int32(unsafe.Sizeof(HashElem{})))) * ((*Schema)(unsafe.Pointer(pSchema)).FtblHash.Fcount + + (*Schema)(unsafe.Pointer(pSchema)).FtrigHash.Fcount + + (*Schema)(unsafe.Pointer(pSchema)).FidxHash.Fcount + + (*Schema)(unsafe.Pointer(pSchema)).FfkeyHash.Fcount)) + *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FtblHash.Fht)) + *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FtrigHash.Fht)) + *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FidxHash.Fht)) + *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FfkeyHash.Fht)) + + for p = (*Hash)(unsafe.Pointer(pSchema + 56)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + Xsqlite3DeleteTrigger(tls, db, (*HashElem)(unsafe.Pointer(p)).Fdata) + } + for p = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + Xsqlite3DeleteTable(tls, db, (*HashElem)(unsafe.Pointer(p)).Fdata) + } + } + } + (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + Xsqlite3BtreeLeaveAll(tls, db) + + *(*int32)(unsafe.Pointer(pHighwater)) = 0 + *(*int32)(unsafe.Pointer(pCurrent)) = *(*int32)(unsafe.Pointer(bp /* nByte */)) + break + + } + + // *pCurrent gets an accurate estimate of the amount of memory used + // to store all prepared statements. + // *pHighwater is set to zero. + case SQLITE_DBSTATUS_STMT_USED: + { + var pVdbe uintptr // Used to iterate through VMs + *(*int32)(unsafe.Pointer(bp + 4 /* nByte */)) = 0 // Used to accumulate return value + + (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 /* &nByte */ + for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { + Xsqlite3VdbeClearObject(tls, db, pVdbe) + Xsqlite3DbFree(tls, db, pVdbe) + } + (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + + *(*int32)(unsafe.Pointer(pHighwater)) = 0 // IMP: R-64479-57858 + *(*int32)(unsafe.Pointer(pCurrent)) = *(*int32)(unsafe.Pointer(bp + 4 /* nByte */)) + + break + + } + + // Set *pCurrent to the total cache hits or misses encountered by all + // pagers the database handle is connected to. *pHighwater is always set + // to zero. + case SQLITE_DBSTATUS_CACHE_SPILL: + op = SQLITE_DBSTATUS_CACHE_WRITE + 1 + fallthrough + case SQLITE_DBSTATUS_CACHE_HIT: + fallthrough + case SQLITE_DBSTATUS_CACHE_MISS: + fallthrough + case SQLITE_DBSTATUS_CACHE_WRITE: + { + var i int32 + *(*int32)(unsafe.Pointer(bp + 8 /* nRet */)) = 0 + + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpBt != 0 { + var pPager uintptr = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpBt) + Xsqlite3PagerCacheStat(tls, pPager, op, resetFlag, bp+8) + } + } + *(*int32)(unsafe.Pointer(pHighwater)) = 0 // IMP: R-42420-56072 + // IMP: R-54100-20147 + // IMP: R-29431-39229 + *(*int32)(unsafe.Pointer(pCurrent)) = *(*int32)(unsafe.Pointer(bp + 8 /* nRet */)) + break + + } + + // Set *pCurrent to non-zero if there are unresolved deferred foreign + // key constraints. Set *pCurrent to zero if all foreign key constraints + // have been satisfied. The *pHighwater is always set to zero. + case SQLITE_DBSTATUS_DEFERRED_FKS: + { + *(*int32)(unsafe.Pointer(pHighwater)) = 0 // IMP: R-11967-56545 + *(*int32)(unsafe.Pointer(pCurrent)) = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons > int64(0)) + break + + } + + default: + { + rc = SQLITE_ERROR + + } + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +//************* End of status.c ********************************************* +//************* Begin file date.c ******************************************* +// 2003 October 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C functions that implement date and time +// functions for SQLite. +// +// There is only one exported symbol in this file - the function +// sqlite3RegisterDateTimeFunctions() found at the bottom of the file. +// All other code has file scope. +// +// SQLite processes all times and dates as julian day numbers. The +// dates and times are stored as the number of days since noon +// in Greenwich on November 24, 4714 B.C. according to the Gregorian +// calendar system. +// +// 1970-01-01 00:00:00 is JD 2440587.5 +// 2000-01-01 00:00:00 is JD 2451544.5 +// +// This implementation requires years to be expressed as a 4-digit number +// which means that only dates between 0000-01-01 and 9999-12-31 can +// be represented, even though julian day numbers allow a much wider +// range of dates. +// +// The Gregorian calendar system is used for all dates and times, +// even those that predate the Gregorian calendar. Historians usually +// use the julian calendar for dates prior to 1582-10-15 and for some +// dates afterwards, depending on locale. Beware of this difference. +// +// The conversion algorithms are implemented based on descriptions +// in the following text: +// +// Jean Meeus +// Astronomical Algorithms, 2nd Edition, 1998 +// ISBN 0-943396-61-1 +// Willmann-Bell, Inc +// Richmond, Virginia (USA) +// #include "sqliteInt.h" +// #include +// #include +// Copyright (C) 1991-2021 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 +// . + +// ISO C99 Standard: 7.23 Date and time + +// Copyright (C) 1991-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// If this symbol has done its job, get rid of it. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Offset of member MEMBER in a struct of type TYPE. + +// This defines CLOCKS_PER_SEC, which is the number of processor clock +// ticks per second, and possibly a number of other constants. +// System-dependent timing definitions. Linux version. +// Copyright (C) 1996-2021 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 +// . + +// Never include this file directly; use instead. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// ISO/IEC 9899:1999 7.23.1: Components of time +// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +// the number per second of the value returned by the `clock' function. +// CAE XSH, Issue 4, Version 2: +// The value of CLOCKS_PER_SEC is required to be 1 million on all +// XSI-conformant systems. + +// Identifier for system-wide realtime clock. +// Monotonic system-wide clock. +// High-resolution timer from the CPU. +// Thread-specific CPU-time clock. +// Monotonic system-wide clock, not adjusted for frequency scaling. +// Identifier for system-wide realtime clock, updated only on ticks. +// Monotonic system-wide clock, updated only on ticks. +// Monotonic system-wide clock that includes time spent in suspension. +// Like CLOCK_REALTIME but also wakes suspended system. +// Like CLOCK_BOOTTIME but also wakes suspended system. +// Like CLOCK_REALTIME but in International Atomic Time. + +// Flag to indicate time is absolute. + +// Copyright (C) 1995-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// These definitions from linux/timex.h as of 3.18. + +type timex = struct { + Fmodes uint32 + F__ccgo_pad1 [4]byte + Foffset X__syscall_slong_t + Ffreq X__syscall_slong_t + Fmaxerror X__syscall_slong_t + Festerror X__syscall_slong_t + Fstatus int32 + F__ccgo_pad2 [4]byte + Fconstant X__syscall_slong_t + Fprecision X__syscall_slong_t + Ftolerance X__syscall_slong_t + Ftime struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t + } + Ftick X__syscall_slong_t + Fppsfreq X__syscall_slong_t + Fjitter X__syscall_slong_t + Fshift int32 + F__ccgo_pad3 [4]byte + Fstabil X__syscall_slong_t + Fjitcnt X__syscall_slong_t + Fcalcnt X__syscall_slong_t + Ferrcnt X__syscall_slong_t + Fstbcnt X__syscall_slong_t + Ftai int32 + __164 uint32 /* int : 32 */ + __168 uint32 /* int : 32 */ + __172 uint32 /* int : 32 */ + __176 uint32 /* int : 32 */ + __180 uint32 /* int : 32 */ + __184 uint32 /* int : 32 */ + __188 uint32 /* int : 32 */ + __192 uint32 /* int : 32 */ + __196 uint32 /* int : 32 */ + __200 uint32 /* int : 32 */ + __204 uint32 /* int : 32 */ +} /* timex.h:26:1 */ + +// Many of the typedefs and structs whose official home is this header +// may also need to be defined by other headers. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// ISO C `broken-down time' structure. +type tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* struct_tm.h:7:1 */ + +// NB: Include guard matches what uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// NB: Include guard matches what uses. + +// POSIX.1b structure for timer start values and intervals. +type itimerspec = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } +} /* struct_itimerspec.h:8:1 */ + +// The MSVC CRT on Windows CE may not have a localtime() function. +// So declare a substitute. The substitute function itself is +// defined in "os_win.c". + +// A structure for holding a single date and time. +type DateTime1 = struct { + FiJD Sqlite3_int64 + FY int32 + FM int32 + FD int32 + Fh int32 + Fm int32 + Ftz int32 + Fs float64 + FvalidJD uint8 + FrawS uint8 + FvalidYMD uint8 + FvalidHMS uint8 + FvalidTZ uint8 + FtzSet uint8 + FisError uint8 + F__ccgo_pad1 [1]byte +} /* sqlite3.c:23127:9 */ + +// The MSVC CRT on Windows CE may not have a localtime() function. +// So declare a substitute. The substitute function itself is +// defined in "os_win.c". + +// A structure for holding a single date and time. +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ + +// Convert zDate into one or more integers according to the conversion +// specifier zFormat. +// +// zFormat[] contains 4 characters for each integer converted, except for +// the last integer which is specified by three characters. The meaning +// of a four-character format specifiers ABCD is: +// +// A: number of digits to convert. Always "2" or "4". +// B: minimum value. Always "0" or "1". +// C: maximum value, decoded as: +// a: 12 +// b: 14 +// c: 24 +// d: 31 +// e: 59 +// f: 9999 +// D: the separator character, or \000 to indicate this is the +// last number to convert. +// +// Example: To translate an ISO-8601 date YYYY-MM-DD, the format would +// be "40f-21a-20c". The "40f-" indicates the 4-digit year followed by "-". +// The "21a-" indicates the 2-digit month followed by "-". The "20c" indicates +// the 2-digit day which is the last integer in the set. +// +// The function returns the number of successful conversions. +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ + var ap Va_list + _ = ap + var cnt int32 + var nextC uint8 + var N uint8 + var min uint8 + var val int32 + var max U16 + cnt = 0 + ap = va +__1: + N = uint8(int32(*(*uint8)(unsafe.Pointer(zFormat))) - '0') + min = uint8(int32(*(*uint8)(unsafe.Pointer(zFormat + 1))) - '0') + val = 0 + + max = aMx[int32(*(*uint8)(unsafe.Pointer(zFormat + 2)))-'a'] + nextC = *(*uint8)(unsafe.Pointer(zFormat + 3)) + val = 0 +__4: + if !(libc.PostDecUint8(&N, 1) != 0) { + goto __5 + } + if !!(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))])&0x04 != 0) { + goto __6 + } + goto end_getDigits +__6: + ; + val = val*10 + int32(*(*uint8)(unsafe.Pointer(zDate))) - '0' + zDate++ + goto __4 +__5: + ; + if !(val < int32(min) || val > int32(max) || int32(nextC) != 0 && int32(nextC) != int32(*(*uint8)(unsafe.Pointer(zDate)))) { + goto __7 + } + goto end_getDigits +__7: + ; + *(*int32)(unsafe.Pointer(libc.VaUintptr(&ap))) = val + zDate++ + cnt++ + zFormat += uintptr(4) + goto __2 +__2: + if nextC != 0 { + goto __1 + } + goto __3 +__3: + ; +end_getDigits: + _ = ap + return cnt +} + +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ + +// Parse a timezone extension on the end of a date-time. +// The extension is of the form: +// +// (+/-)HH:MM +// +// Or the "zulu" notation: +// +// Z +// +// If the parse is successful, write the number of minutes +// of change in p->tz and return 0. If a parser error occurs, +// return non-zero. +// +// A missing specifier is not considered an error. +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var sgn int32 + // var nHr int32 at bp+16, 4 + + // var nMn int32 at bp+20, 4 + + var c int32 + sgn = 0 +__1: + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))])&0x01 != 0) { + goto __2 + } + zDate++ + goto __1 +__2: + ; + (*DateTime)(unsafe.Pointer(p)).Ftz = 0 + c = int32(*(*uint8)(unsafe.Pointer(zDate))) + if !(c == '-') { + goto __3 + } + sgn = -1 + goto __4 +__3: + if !(c == '+') { + goto __5 + } + sgn = +1 + goto __6 +__5: + if !(c == 'Z' || c == 'z') { + goto __7 + } + zDate++ + goto zulu_time + goto __8 +__7: + return libc.Bool32(c != 0) +__8: + ; +__6: + ; +__4: + ; + zDate++ + if !(getDigits(tls, zDate, ts+1108, libc.VaList(bp, bp+16, bp+20)) != 2) { + goto __9 + } + return 1 +__9: + ; + zDate += uintptr(5) + (*DateTime)(unsafe.Pointer(p)).Ftz = sgn * (*(*int32)(unsafe.Pointer(bp + 20)) + *(*int32)(unsafe.Pointer(bp + 16))*60) +zulu_time: +__10: + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))])&0x01 != 0) { + goto __11 + } + zDate++ + goto __10 +__11: + ; + (*DateTime)(unsafe.Pointer(p)).FtzSet = uint8(1) + return libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zDate))) != 0) +} + +// Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF. +// The HH, MM, and SS must each be exactly 2 digits. The +// fractional seconds FFFF can be one or more digits. +// +// Return 1 if there is a parsing error and 0 on success. +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + // var h int32 at bp+24, 4 + + // var m int32 at bp+28, 4 + + // var s int32 at bp+32, 4 + + var ms float64 = 0.0 + if getDigits(tls, zDate, ts+1116, libc.VaList(bp, bp+24, bp+28)) != 2 { + return 1 + } + zDate += uintptr(5) + if int32(*(*uint8)(unsafe.Pointer(zDate))) == ':' { + zDate++ + if getDigits(tls, zDate, ts+1124, libc.VaList(bp+16, bp+32)) != 1 { + return 1 + } + zDate += uintptr(2) + if int32(*(*uint8)(unsafe.Pointer(zDate))) == '.' && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate + 1)))])&0x04 != 0 { + var rScale float64 = 1.0 + zDate++ + for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))])&0x04 != 0 { + ms = ms*10.0 + float64(*(*uint8)(unsafe.Pointer(zDate))) - float64('0') + rScale = rScale * 10.0 + zDate++ + } + ms = ms / rScale + } + } else { + *(*int32)(unsafe.Pointer(bp + 32 /* s */)) = 0 + } + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1) + (*DateTime)(unsafe.Pointer(p)).Fh = *(*int32)(unsafe.Pointer(bp + 24 /* h */)) + (*DateTime)(unsafe.Pointer(p)).Fm = *(*int32)(unsafe.Pointer(bp + 28 /* m */)) + (*DateTime)(unsafe.Pointer(p)).Fs = float64(*(*int32)(unsafe.Pointer(bp + 32))) + ms + if parseTimezone(tls, zDate, p) != 0 { + return 1 + } + (*DateTime)(unsafe.Pointer(p)).FvalidTZ = func() uint8 { + if (*DateTime)(unsafe.Pointer(p)).Ftz != 0 { + return uint8(1) + } + return uint8(0) + }() + return 0 +} + +// Put the DateTime object into its error state. +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) + (*DateTime)(unsafe.Pointer(p)).FisError = uint8(1) +} + +// Convert from YYYY-MM-DD HH:MM:SS to julian day. We always assume +// that the YYYY-MM-DD is according to the Gregorian calendar. +// +// Reference: Meeus page 61 +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ + var Y int32 + var M int32 + var D int32 + var A int32 + var B int32 + var X1 int32 + var X2 int32 + + if (*DateTime)(unsafe.Pointer(p)).FvalidJD != 0 { + return + } + if (*DateTime)(unsafe.Pointer(p)).FvalidYMD != 0 { + Y = (*DateTime)(unsafe.Pointer(p)).FY + M = (*DateTime)(unsafe.Pointer(p)).FM + D = (*DateTime)(unsafe.Pointer(p)).FD + } else { + Y = 2000 // If no YMD specified, assume 2000-Jan-01 + M = 1 + D = 1 + } + if Y < -4713 || Y > 9999 || (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + datetimeError(tls, p) + return + } + if M <= 2 { + Y-- + M = M + 12 + } + A = Y / 100 + B = 2 - A + A/4 + X1 = 36525 * (Y + 4716) / 100 + X2 = 306001 * (M + 1) / 10000 + (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) + if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(p)) += Sqlite3_int64((*DateTime)(unsafe.Pointer(p)).Fh*3600000+(*DateTime)(unsafe.Pointer(p)).Fm*60000) + libc.Int64FromFloat64((*DateTime)(unsafe.Pointer(p)).Fs*float64(1000)) + if (*DateTime)(unsafe.Pointer(p)).FvalidTZ != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(p)) -= Sqlite3_int64((*DateTime)(unsafe.Pointer(p)).Ftz * 60000) + (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) + } + } +} + +// Parse dates of the form +// +// YYYY-MM-DD HH:MM:SS.FFF +// YYYY-MM-DD HH:MM:SS +// YYYY-MM-DD HH:MM +// YYYY-MM-DD +// +// Write the result into the DateTime structure and return 0 +// on success and 1 if the input string is not a well-formed +// date. +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + // var Y int32 at bp+24, 4 + + // var M int32 at bp+28, 4 + + // var D int32 at bp+32, 4 + + var neg int32 + + if int32(*(*uint8)(unsafe.Pointer(zDate))) == '-' { + zDate++ + neg = 1 + } else { + neg = 0 + } + if getDigits(tls, zDate, ts+1128, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + return 1 + } + zDate += uintptr(10) + for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))])&0x01 != 0 || 'T' == int32(*(*U8)(unsafe.Pointer(zDate))) { + zDate++ + } + if parseHhMmSs(tls, zDate, p) == 0 { + // We got the time + } else if int32(*(*uint8)(unsafe.Pointer(zDate))) == 0 { + (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0) + } else { + return 1 + } + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1) + (*DateTime)(unsafe.Pointer(p)).FY = func() int32 { + if neg != 0 { + return -*(*int32)(unsafe.Pointer(bp + 24 /* Y */)) + } + return *(*int32)(unsafe.Pointer(bp + 24 /* Y */)) + }() + (*DateTime)(unsafe.Pointer(p)).FM = *(*int32)(unsafe.Pointer(bp + 28 /* M */)) + (*DateTime)(unsafe.Pointer(p)).FD = *(*int32)(unsafe.Pointer(bp + 32 /* D */)) + if (*DateTime)(unsafe.Pointer(p)).FvalidTZ != 0 { + computeJD(tls, p) + } + return 0 +} + +// Set the time to the current time reported by the VFS. +// +// Return the number of errors. +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ + (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) + if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) + return 0 + } else { + return 1 + } + return int32(0) +} + +// Input "r" is a numeric quantity which might be a julian day number, +// or the number of seconds since 1970. If the value if r is within +// range of a julian day number, install it as such and set validJD. +// If the value is a valid unix timestamp, put it in p->s and set p->rawS. +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ + (*DateTime)(unsafe.Pointer(p)).Fs = r + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(1) + if r >= 0.0 && r < 5373484.5 { + (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64(r*86400000.0 + 0.5) + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) + } +} + +// Attempt to parse the given string into a julian day number. Return +// the number of errors. +// +// The following are acceptable forms for the input string: +// +// YYYY-MM-DD HH:MM:SS.FFF +/-HH:MM +// DDDD.DD +// now +// +// In the first form, the +/-HH:MM is always optional. The fractional +// seconds extension (the ".FFF") is optional. The seconds portion +// (":SS.FFF") is option. The year and date can be omitted as long +// as there is a time string. The time string can be omitted as long +// as there is a year and date. +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var r float64 at bp, 8 + + if parseYyyyMmDd(tls, zDate, p) == 0 { + return 0 + } else if parseHhMmSs(tls, zDate, p) == 0 { + return 0 + } else if Xsqlite3StrICmp(tls, zDate, ts+1140) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + return setDateTimeToCurrent(tls, context, p) + } else if Xsqlite3AtoF(tls, zDate, bp, Xsqlite3Strlen30(tls, zDate), uint8(SQLITE_UTF8)) > 0 { + setRawDateNumber(tls, p, *(*float64)(unsafe.Pointer(bp /* r */))) + return 0 + } + return 1 +} + +// The julian day number for 9999-12-31 23:59:59.999 is 5373484.4999999. +// Multiplying this by 86400000 gives 464269060799999 as the maximum value +// for DateTime.iJD. +// +// But some older compilers (ex: gcc 4.2.1 on older Macs) cannot deal with +// such a large integer literal, so we have to encode it. + +// Return TRUE if the given julian day number is within range. +// +// The input is the JulianDay times 86400000. +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ + return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) +} + +// Compute the Year, Month, and Day from the julian day number. +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ + var Z int32 + var A int32 + var B int32 + var C int32 + var D int32 + var E int32 + var X1 int32 + if (*DateTime)(unsafe.Pointer(p)).FvalidYMD != 0 { + return + } + if !(int32((*DateTime)(unsafe.Pointer(p)).FvalidJD) != 0) { + (*DateTime)(unsafe.Pointer(p)).FY = 2000 + (*DateTime)(unsafe.Pointer(p)).FM = 1 + (*DateTime)(unsafe.Pointer(p)).FD = 1 + } else if !(validJulianDay(tls, (*DateTime)(unsafe.Pointer(p)).FiJD) != 0) { + datetimeError(tls, p) + return + } else { + Z = int32(((*DateTime)(unsafe.Pointer(p)).FiJD + int64(43200000)) / int64(86400000)) + A = libc.Int32FromFloat64((float64(Z) - 1867216.25) / 36524.25) + A = Z + 1 + A - A/4 + B = A + 1524 + C = libc.Int32FromFloat64((float64(B) - 122.1) / 365.25) + D = 36525 * (C & 32767) / 100 + E = libc.Int32FromFloat64(float64(B-D) / 30.6001) + X1 = libc.Int32FromFloat64(30.6001 * float64(E)) + (*DateTime)(unsafe.Pointer(p)).FD = B - D - X1 + (*DateTime)(unsafe.Pointer(p)).FM = func() int32 { + if E < 14 { + return E - 1 + } + return E - 13 + }() + (*DateTime)(unsafe.Pointer(p)).FY = func() int32 { + if (*DateTime)(unsafe.Pointer(p)).FM > 2 { + return C - 4716 + } + return C - 4715 + }() + } + (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1) +} + +// Compute the Hour, Minute, and Seconds from the julian day number. +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ + var s int32 + if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { + return + } + computeJD(tls, p) + s = int32(((*DateTime)(unsafe.Pointer(p)).FiJD + int64(43200000)) % int64(86400000)) + (*DateTime)(unsafe.Pointer(p)).Fs = float64(s) / 1000.0 + s = libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(p)).Fs) + *(*float64)(unsafe.Pointer(p + 32)) -= float64(s) + (*DateTime)(unsafe.Pointer(p)).Fh = s / 3600 + s = s - (*DateTime)(unsafe.Pointer(p)).Fh*3600 + (*DateTime)(unsafe.Pointer(p)).Fm = s / 60 + *(*float64)(unsafe.Pointer(p + 32)) += float64(s - (*DateTime)(unsafe.Pointer(p)).Fm*60) + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1) +} + +// Compute both YMD and HMS +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ + computeYMD(tls, p) + computeHMS(tls, p) +} + +// Clear the YMD and HMS and the TZ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ + (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) +} + +// On recent Windows platforms, the localtime_s() function is available +// as part of the "Secure CRT". It is essentially equivalent to +// localtime_r() available under most POSIX platforms, except that the +// order of the parameters is reversed. +// +// See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx. +// +// If the user has not indicated to use localtime_r() or localtime_s() +// already, check for an MSVC build environment that provides +// localtime_s(). + +// The following routine implements the rough equivalent of localtime_r() +// using whatever operating-system specific localtime facility that +// is available. This routine returns 0 on success and +// non-zero on any kind of error. +// +// If the sqlite3GlobalConfig.bLocaltimeFault variable is non-zero then this +// routine will always fail. If bLocaltimeFault is nonzero and +// sqlite3GlobalConfig.xAltLocaltime is not NULL, then xAltLocaltime() is +// invoked in place of the OS-defined localtime() function. +// +// EVIDENCE-OF: R-62172-00036 In this implementation, the standard C +// library function localtime_r() is used to assist in the calculation of +// local time. +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ + var rc int32 + var pX uintptr + var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + Xsqlite3_mutex_enter(tls, mutex) + pX = libc.Xlocaltime(tls, t) + if Xsqlite3Config.FbLocaltimeFault != 0 { + if Xsqlite3Config.FxAltLocaltime != uintptr(0) && + 0 == (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.FxAltLocaltime})).f(tls, t, pTm) { + pX = pTm + } else { + pX = uintptr(0) + } + } + if pX != 0 { + *(*tm)(unsafe.Pointer(pTm)) = *(*tm)(unsafe.Pointer(pX)) + } + Xsqlite3_mutex_leave(tls, mutex) + rc = libc.Bool32(pX == uintptr(0)) + return rc +} + +// Assuming the input DateTime is UTC, move it to its localtime equivalent. +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + // var t Time_t at bp+104, 8 + + // var sLocal tm at bp, 56 + + var iYearDiff int32 + + // Initialize the contents of sLocal to avoid a compiler warning. + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(tm{}))) + + computeJD(tls, p) + if (*DateTime)(unsafe.Pointer(p)).FiJD < int64(2108667600)*int64(100000) || + (*DateTime)(unsafe.Pointer(p)).FiJD > int64(2130141456)*int64(100000) { + // EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only + // works for years between 1970 and 2037. For dates outside this range, + // SQLite attempts to map the year into an equivalent year within this + // range, do the calculation, then map the year back. + *(*DateTime)(unsafe.Pointer(bp + 56 /* x */)) = *(*DateTime)(unsafe.Pointer(p)) + computeYMD_HMS(tls, bp+56) + iYearDiff = 2000 + (*DateTime)(unsafe.Pointer(bp+56)).FY%4 - (*DateTime)(unsafe.Pointer(bp+56)).FY + *(*int32)(unsafe.Pointer(bp + 56 + 8)) += iYearDiff + (*DateTime)(unsafe.Pointer(bp + 56 /* &x */)).FvalidJD = uint8(0) + computeJD(tls, bp+56) + *(*Time_t)(unsafe.Pointer(bp + 104 /* t */)) = Time_t((*DateTime)(unsafe.Pointer(bp+56)).FiJD/int64(1000) - int64(21086676)*int64(10000)) + } else { + iYearDiff = 0 + *(*Time_t)(unsafe.Pointer(bp + 104 /* t */)) = Time_t((*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000)) + } + if osLocaltime(tls, bp+104, bp) != 0 { + Xsqlite3_result_error(tls, pCtx, ts+1144, -1) + return SQLITE_ERROR + } + (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff + (*DateTime)(unsafe.Pointer(p)).FM = (*tm)(unsafe.Pointer(bp)).Ftm_mon + 1 + (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday + (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour + (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 + (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1) + (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1) + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FisError = uint8(0) + return SQLITE_OK +} + +// The following table defines various date transformations of the form +// +// 'NNN days' +// +// Where NNN is an arbitrary floating-point number and "days" can be one +// of several units of time. +var aXformType = [6]struct { + FnName U8 + FzName [7]uint8 + FrLimit float32 + FrXform float32 +}{ + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1167 /* "second" */)), FrLimit: 4.6427e+14, FrXform: 1.0}, + {FnName: U8(6), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1174 /* "minute" */)), FrLimit: 7.7379e+12, FrXform: 60.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1181 /* "hour\x00\x00" */)), FrLimit: 1.2897e+11, FrXform: 3600.0}, + {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1188 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, + {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1195 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, + {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1202 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, +} /* sqlite3.c:23690:3 */ + +// Process a modifier to a date-time stamp. The modifiers are +// as follows: +// +// NNN days +// NNN hours +// NNN minutes +// NNN.NNNN seconds +// NNN months +// NNN years +// start of month +// start of year +// start of week +// start of day +// weekday N +// unixepoch +// localtime +// utc +// +// Return 0 on success and 1 if there is any kind of error. If the error +// is in a system call (i.e. localtime()), then an error message is written +// to context pCtx. If the error is an unrecognized modifier, no error is +// written to pCtx. +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ + bp := tls.Alloc(104) + defer tls.Free(104) + + var rc int32 = 1 + // var r float64 at bp+48, 8 + + switch int32(Xsqlite3UpperToLower[U8(*(*uint8)(unsafe.Pointer(z)))]) { + case 'a': + { + // auto + // + // If rawS is available, then interpret as a julian day number, or + // a unix timestamp, depending on its magnitude. + if Xsqlite3_stricmp(tls, z, ts+1209) == 0 { + if idx > 1 { + return 1 + } // IMP: R-33611-57934 + if !(int32((*DateTime)(unsafe.Pointer(p)).FrawS) != 0) || (*DateTime)(unsafe.Pointer(p)).FvalidJD != 0 { + rc = 0 + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + } else if (*DateTime)(unsafe.Pointer(p)).Fs >= float64(int64(-21086676)*int64(10000)) && + (*DateTime)(unsafe.Pointer(p)).Fs <= float64(int64(25340230)*int64(10000)+int64(799)) { + *(*float64)(unsafe.Pointer(bp + 48 /* r */)) = (*DateTime)(unsafe.Pointer(p)).Fs*1000.0 + 210866760000000.0 + clearYMD_HMS_TZ(tls, p) + (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 48)) + 0.5) + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + rc = 0 + } + } + break + + } + case 'j': + { + // julianday + // + // Always interpret the prior number as a julian-day value. If this + // is not the first modifier, or if the prior argument is not a numeric + // value in the allowed range of julian day numbers understood by + // SQLite (0..5373484.5) then the result will be NULL. + if Xsqlite3_stricmp(tls, z, ts+1214) == 0 { + if idx > 1 { + return 1 + } // IMP: R-31176-64601 + if (*DateTime)(unsafe.Pointer(p)).FvalidJD != 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + rc = 0 + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + } + } + break + + } + case 'l': + { + // localtime + // + // Assuming the current time value is UTC (a.k.a. GMT), shift it to + // show local time. + if Xsqlite3_stricmp(tls, z, ts+1224) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + rc = toLocaltime(tls, p, pCtx) + } + break + + } + case 'u': + { + // unixepoch + // + // Treat the current value of p->s as the number of + // seconds since 1970. Convert to a real julian day number. + if Xsqlite3_stricmp(tls, z, ts+1234) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if idx > 1 { + return 1 + } // IMP: R-49255-55373 + *(*float64)(unsafe.Pointer(bp + 48 /* r */)) = (*DateTime)(unsafe.Pointer(p)).Fs*1000.0 + 210866760000000.0 + if *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 464269060800000.0 { + clearYMD_HMS_TZ(tls, p) + (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 48)) + 0.5) + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + rc = 0 + } + } else if Xsqlite3_stricmp(tls, z, ts+1244) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { + var iOrigJD I64 // Original localtime + var iGuess I64 // Guess at the corresponding utc time + var cnt int32 = 0 // Safety to prevent infinite loop + var iErr int32 // Guess is off by this much + + computeJD(tls, p) + iGuess = libc.AssignInt64(&iOrigJD, (*DateTime)(unsafe.Pointer(p)).FiJD) + iErr = 0 + for __ccgo := true; __ccgo; __ccgo = iErr != 0 && libc.PostIncInt32(&cnt, 1) < 3 { + // var new DateTime at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(DateTime{}))) + iGuess = iGuess - I64(iErr) + (*DateTime)(unsafe.Pointer(bp /* &new */)).FiJD = iGuess + (*DateTime)(unsafe.Pointer(bp /* &new */)).FvalidJD = uint8(1) + rc = toLocaltime(tls, bp, pCtx) + if rc != 0 { + return rc + } + computeJD(tls, bp) + iErr = int32((*DateTime)(unsafe.Pointer(bp)).FiJD - iOrigJD) + } + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) + (*DateTime)(unsafe.Pointer(p)).FiJD = iGuess + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) + (*DateTime)(unsafe.Pointer(p)).FtzSet = uint8(1) + } + rc = SQLITE_OK + } + break + + } + case 'w': + { + // weekday N + // + // Move the date to the same time on the next occurrence of + // weekday N where 0==Sunday, 1==Monday, and so forth. If the + // date is already on the appropriate weekday, this is a no-op. + if Xsqlite3_strnicmp(tls, z, ts+1248, 8) == 0 && + Xsqlite3AtoF(tls, z+8, bp+48, Xsqlite3Strlen30(tls, z+8), uint8(SQLITE_UTF8)) > 0 && + float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) && n >= 0 && *(*float64)(unsafe.Pointer(bp + 48)) < float64(7) { + var Z Sqlite3_int64 + computeYMD_HMS(tls, p) + (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) + computeJD(tls, p) + Z = ((*DateTime)(unsafe.Pointer(p)).FiJD + int64(129600000)) / int64(86400000) % int64(7) + if Z > Sqlite3_int64(n) { + Z = Z - int64(7) + } + *(*Sqlite3_int64)(unsafe.Pointer(p)) += (Sqlite3_int64(n) - Z) * int64(86400000) + clearYMD_HMS_TZ(tls, p) + rc = 0 + } + break + + } + case 's': + { + // start of TTTTT + // + // Move the date backwards to the beginning of the current day, + // or month or year. + if Xsqlite3_strnicmp(tls, z, ts+1257, 9) != 0 { + break + } + if !(int32((*DateTime)(unsafe.Pointer(p)).FvalidJD) != 0) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidYMD) != 0) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidHMS) != 0) { + break + } + z += uintptr(9) + computeYMD(tls, p) + (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1) + (*DateTime)(unsafe.Pointer(p)).Fh = libc.AssignPtrInt32(p+24, 0) + (*DateTime)(unsafe.Pointer(p)).Fs = 0.0 + (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) + if Xsqlite3_stricmp(tls, z, ts+1267) == 0 { + (*DateTime)(unsafe.Pointer(p)).FD = 1 + rc = 0 + } else if Xsqlite3_stricmp(tls, z, ts+1273) == 0 { + (*DateTime)(unsafe.Pointer(p)).FM = 1 + (*DateTime)(unsafe.Pointer(p)).FD = 1 + rc = 0 + } else if Xsqlite3_stricmp(tls, z, ts+1278) == 0 { + rc = 0 + } + break + + } + case '+': + fallthrough + case '-': + fallthrough + case '0': + fallthrough + case '1': + fallthrough + case '2': + fallthrough + case '3': + fallthrough + case '4': + fallthrough + case '5': + fallthrough + case '6': + fallthrough + case '7': + fallthrough + case '8': + fallthrough + case '9': + { + var rRounder float64 + var i int32 + for n = 1; *(*uint8)(unsafe.Pointer(z + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(z + uintptr(n)))) != ':' && !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(n))))])&0x01 != 0); n++ { + } + if Xsqlite3AtoF(tls, z, bp+48, n, uint8(SQLITE_UTF8)) <= 0 { + rc = 1 + break + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(n)))) == ':' { + // A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the + // specified number of hours, minutes, seconds, and fractional seconds + // to the time. The ".FFF" may be omitted. The ":SS.FFF" may be + // omitted. + var z2 uintptr = z + // var tx DateTime at bp+56, 48 + + var day Sqlite3_int64 + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z2)))])&0x04 != 0) { + z2++ + } + libc.Xmemset(tls, bp+56, 0, uint64(unsafe.Sizeof(DateTime{}))) + if parseHhMmSs(tls, z2, bp+56) != 0 { + break + } + computeJD(tls, bp+56) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 56)) -= int64(43200000) + day = (*DateTime)(unsafe.Pointer(bp+56)).FiJD / int64(86400000) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 56)) -= day * int64(86400000) + if int32(*(*uint8)(unsafe.Pointer(z))) == '-' { + (*DateTime)(unsafe.Pointer(bp + 56 /* &tx */)).FiJD = -(*DateTime)(unsafe.Pointer(bp + 56 /* &tx */)).FiJD + } + computeJD(tls, p) + clearYMD_HMS_TZ(tls, p) + *(*Sqlite3_int64)(unsafe.Pointer(p)) += (*DateTime)(unsafe.Pointer(bp + 56)).FiJD + rc = 0 + break + } + + // If control reaches this point, it means the transformation is + // one of the forms like "+NNN days". + z += uintptr(n) + for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x01 != 0 { + z++ + } + n = Xsqlite3Strlen30(tls, z) + if n > 10 || n < 3 { + break + } + if int32(Xsqlite3UpperToLower[U8(*(*uint8)(unsafe.Pointer(z + uintptr(n-1))))]) == 's' { + n-- + } + computeJD(tls, p) + rc = 1 + if *(*float64)(unsafe.Pointer(bp + 48)) < float64(0) { + rRounder = -0.5 + } else { + rRounder = +0.5 + } + for i = 0; i < int32(uint64(unsafe.Sizeof(aXformType))/uint64(unsafe.Sizeof(struct { + FnName U8 + FzName [7]uint8 + FrLimit float32 + FrXform float32 + }{}))); i++ { + if int32(aXformType[i].FnName) == n && + Xsqlite3_strnicmp(tls, uintptr(unsafe.Pointer(&aXformType))+uintptr(i)*16+1, z, n) == 0 && + *(*float64)(unsafe.Pointer(bp + 48)) > float64(-aXformType[i].FrLimit) && *(*float64)(unsafe.Pointer(bp + 48)) < float64(aXformType[i].FrLimit) { + switch i { + case 4: + { // Special processing to add months + var x int32 + + computeYMD_HMS(tls, p) + *(*int32)(unsafe.Pointer(p + 12)) += int32(*(*float64)(unsafe.Pointer(bp + 48))) + if (*DateTime)(unsafe.Pointer(p)).FM > 0 { + x = ((*DateTime)(unsafe.Pointer(p)).FM - 1) / 12 + } else { + x = ((*DateTime)(unsafe.Pointer(p)).FM - 12) / 12 + } + *(*int32)(unsafe.Pointer(p + 8)) += x + *(*int32)(unsafe.Pointer(p + 12)) -= x * 12 + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) + *(*float64)(unsafe.Pointer(bp + 48 /* r */)) -= float64(int32(*(*float64)(unsafe.Pointer(bp + 48 /* r */)))) + break + + } + fallthrough + case 5: + { // Special processing to add years + var y int32 = int32(*(*float64)(unsafe.Pointer(bp + 48 /* r */))) + + computeYMD_HMS(tls, p) + *(*int32)(unsafe.Pointer(p + 8)) += y + (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) + *(*float64)(unsafe.Pointer(bp + 48 /* r */)) -= float64(int32(*(*float64)(unsafe.Pointer(bp + 48 /* r */)))) + break + + } + } + computeJD(tls, p) + *(*Sqlite3_int64)(unsafe.Pointer(p)) += libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 48))*1000.0*float64(aXformType[i].FrXform) + rRounder) + rc = 0 + break + } + } + clearYMD_HMS_TZ(tls, p) + break + + } + default: + { + break + + } + } + return rc +} + +// Process time function arguments. argv[0] is a date-time stamp. +// argv[1] and following are modifiers. Parse them all and write +// the resulting time into the DateTime structure p. Return 0 +// on success and 1 if there are any errors. +// +// If there are zero parameters (if even argv[0] is undefined) +// then assume a default value of "now" for argv[0]. +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ + var i int32 + var n int32 + var z uintptr + var eType int32 + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) + if argc == 0 { + if !(Xsqlite3NotPureFunc(tls, context) != 0) { + return 1 + } + return setDateTimeToCurrent(tls, context, p) + } + if libc.AssignInt32(&eType, Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) == SQLITE_FLOAT || + eType == SQLITE_INTEGER { + setRawDateNumber(tls, p, Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv)))) + } else { + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if !(z != 0) || parseDateOrTime(tls, context, z, p) != 0 { + return 1 + } + } + for i = 1; i < argc; i++ { + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + if z == uintptr(0) || parseModifier(tls, context, z, n, p, i) != 0 { + return 1 + } + } + computeJD(tls, p) + if (*DateTime)(unsafe.Pointer(p)).FisError != 0 || !(validJulianDay(tls, (*DateTime)(unsafe.Pointer(p)).FiJD) != 0) { + return 1 + } + return 0 +} + +// The following routines implement the various date and time functions +// of SQLite. + +// julianday( TIMESTRING, MOD, MOD, ...) +// +// Return the julian day number of the date specified in the arguments +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var x DateTime at bp, 48 + + if isDate(tls, context, argc, argv, bp) == 0 { + computeJD(tls, bp) + Xsqlite3_result_double(tls, context, float64((*DateTime)(unsafe.Pointer(bp)).FiJD)/86400000.0) + } +} + +// unixepoch( TIMESTRING, MOD, MOD, ...) +// +// Return the number of seconds (including fractional seconds) since +// the unix epoch of 1970-01-01 00:00:00 GMT. +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var x DateTime at bp, 48 + + if isDate(tls, context, argc, argv, bp) == 0 { + computeJD(tls, bp) + Xsqlite3_result_int64(tls, context, (*DateTime)(unsafe.Pointer(bp)).FiJD/int64(1000)-int64(21086676)*int64(10000)) + } +} + +// datetime( TIMESTRING, MOD, MOD, ...) +// +// Return YYYY-MM-DD HH:MM:SS +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + // var x DateTime at bp, 48 + + if isDate(tls, context, argc, argv, bp) == 0 { + var Y int32 + var s int32 + // var zBuf [24]uint8 at bp+48, 24 + + computeYMD_HMS(tls, bp) + Y = (*DateTime)(unsafe.Pointer(bp /* &x */)).FY + if Y < 0 { + Y = -Y + } + *(*uint8)(unsafe.Pointer(bp + 48 + 1)) = uint8('0' + Y/1000%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 2)) = uint8('0' + Y/100%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 3)) = uint8('0' + Y/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 4)) = uint8('0' + Y%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 5)) = uint8('-') + *(*uint8)(unsafe.Pointer(bp + 48 + 6)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FM/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 7)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FM%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 8)) = uint8('-') + *(*uint8)(unsafe.Pointer(bp + 48 + 9)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FD/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 10)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FD%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 11)) = uint8(' ') + *(*uint8)(unsafe.Pointer(bp + 48 + 12)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 13)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 14)) = uint8(':') + *(*uint8)(unsafe.Pointer(bp + 48 + 15)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 16)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 17)) = uint8(':') + s = libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp /* &x */)).Fs) + *(*uint8)(unsafe.Pointer(bp + 48 + 18)) = uint8('0' + s/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 19)) = uint8('0' + s%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 20)) = uint8(0) + if (*DateTime)(unsafe.Pointer(bp)).FY < 0 { + *(*uint8)(unsafe.Pointer(bp + 48)) = uint8('-') + Xsqlite3_result_text(tls, context, bp+48, 20, libc.UintptrFromInt32(-1)) + } else { + Xsqlite3_result_text(tls, context, bp+48+1, 19, libc.UintptrFromInt32(-1)) + } + } +} + +// time( TIMESTRING, MOD, MOD, ...) +// +// Return HH:MM:SS +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // var x DateTime at bp, 48 + + if isDate(tls, context, argc, argv, bp) == 0 { + var s int32 + // var zBuf [16]uint8 at bp+48, 16 + + computeHMS(tls, bp) + *(*uint8)(unsafe.Pointer(bp + 48)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 1)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 2)) = uint8(':') + *(*uint8)(unsafe.Pointer(bp + 48 + 3)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 4)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 5)) = uint8(':') + s = libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp /* &x */)).Fs) + *(*uint8)(unsafe.Pointer(bp + 48 + 6)) = uint8('0' + s/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 7)) = uint8('0' + s%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 8)) = uint8(0) + Xsqlite3_result_text(tls, context, bp+48, 8, libc.UintptrFromInt32(-1)) + } +} + +// date( TIMESTRING, MOD, MOD, ...) +// +// Return YYYY-MM-DD +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // var x DateTime at bp, 48 + + if isDate(tls, context, argc, argv, bp) == 0 { + var Y int32 + // var zBuf [16]uint8 at bp+48, 16 + + computeYMD(tls, bp) + Y = (*DateTime)(unsafe.Pointer(bp /* &x */)).FY + if Y < 0 { + Y = -Y + } + *(*uint8)(unsafe.Pointer(bp + 48 + 1)) = uint8('0' + Y/1000%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 2)) = uint8('0' + Y/100%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 3)) = uint8('0' + Y/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 4)) = uint8('0' + Y%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 5)) = uint8('-') + *(*uint8)(unsafe.Pointer(bp + 48 + 6)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FM/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 7)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FM%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 8)) = uint8('-') + *(*uint8)(unsafe.Pointer(bp + 48 + 9)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FD/10%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 10)) = uint8('0' + (*DateTime)(unsafe.Pointer(bp)).FD%10) + *(*uint8)(unsafe.Pointer(bp + 48 + 11)) = uint8(0) + if (*DateTime)(unsafe.Pointer(bp)).FY < 0 { + *(*uint8)(unsafe.Pointer(bp + 48)) = uint8('-') + Xsqlite3_result_text(tls, context, bp+48, 11, libc.UintptrFromInt32(-1)) + } else { + Xsqlite3_result_text(tls, context, bp+48+1, 10, libc.UintptrFromInt32(-1)) + } + } +} + +// strftime( FORMAT, TIMESTRING, MOD, MOD, ...) +// +// Return a string described by FORMAT. Conversions as follows: +// +// %d day of month +// %f ** fractional seconds SS.SSS +// %H hour 00-24 +// %j day of year 000-366 +// %J ** julian day number +// %m month 01-12 +// %M minute 00-59 +// %s seconds since 1970-01-01 +// %S seconds 00-59 +// %w day of week 0-6 sunday==0 +// %W week of year 00-53 +// %Y year 0000-9999 +// %% % +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ + bp := tls.Alloc(216) + defer tls.Free(216) + + // var x DateTime at bp+88, 48 + + var i Size_t + var j Size_t + var db uintptr + var zFmt uintptr + // var sRes Sqlite3_str at bp+136, 32 + + if argc == 0 { + return + } + zFmt = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if zFmt == uintptr(0) || isDate(tls, context, argc-1, argv+uintptr(1)*8, bp+88) != 0 { + return + } + db = Xsqlite3_context_db_handle(tls, context) + Xsqlite3StrAccumInit(tls, bp+136, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) + + computeJD(tls, bp+88) + computeYMD_HMS(tls, bp+88) + for i = libc.AssignUint64(&j, uint64(0)); *(*uint8)(unsafe.Pointer(zFmt + uintptr(i))) != 0; i++ { + if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) != '%' { + continue + } + if j < i { + Xsqlite3_str_append(tls, bp+136, zFmt+uintptr(j), int32(i-j)) + } + i++ + j = i + uint64(1) + switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) { + case 'd': + { + Xsqlite3_str_appendf(tls, bp+136, ts+1282, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FD)) + break + + } + case 'f': + { + var s float64 = (*DateTime)(unsafe.Pointer(bp + 88 /* &x */)).Fs + if s > 59.999 { + s = 59.999 + } + Xsqlite3_str_appendf(tls, bp+136, ts+1287, libc.VaList(bp+8, s)) + break + + } + case 'H': + { + Xsqlite3_str_appendf(tls, bp+136, ts+1282, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fh)) + break + + } + case 'W': + fallthrough // Fall thru + case 'j': + { + var nDay int32 // Number of days since 1st day of year + *(*DateTime)(unsafe.Pointer(bp + 168 /* y */)) = *(*DateTime)(unsafe.Pointer(bp + 88 /* x */)) + (*DateTime)(unsafe.Pointer(bp + 168 /* &y */)).FvalidJD = uint8(0) + (*DateTime)(unsafe.Pointer(bp + 168 /* &y */)).FM = 1 + (*DateTime)(unsafe.Pointer(bp + 168 /* &y */)).FD = 1 + computeJD(tls, bp+168) + nDay = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD - (*DateTime)(unsafe.Pointer(bp+168)).FiJD + int64(43200000)) / int64(86400000)) + if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { + var wd int32 // 0=Monday, 1=Tuesday, ... 6=Sunday + wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1282, libc.VaList(bp+24, (nDay+7-wd)/7)) + } else { + Xsqlite3_str_appendf(tls, bp+136, ts+1294, libc.VaList(bp+32, nDay+1)) + } + break + + } + case 'J': + { + Xsqlite3_str_appendf(tls, bp+136, ts+1299, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + break + + } + case 'm': + { + Xsqlite3_str_appendf(tls, bp+136, ts+1282, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FM)) + break + + } + case 'M': + { + Xsqlite3_str_appendf(tls, bp+136, ts+1282, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fm)) + break + + } + case 's': + { + var iS I64 = (*DateTime)(unsafe.Pointer(bp+88)).FiJD/int64(1000) - int64(21086676)*int64(10000) + Xsqlite3_str_appendf(tls, bp+136, ts+1305, libc.VaList(bp+64, iS)) + break + + } + case 'S': + { + Xsqlite3_str_appendf(tls, bp+136, ts+1282, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fs))) + break + + } + case 'w': + { + Xsqlite3_str_appendchar(tls, bp+136, 1, + uint8(int32(uint8(((*DateTime)(unsafe.Pointer(bp+88)).FiJD+int64(129600000))/int64(86400000)%int64(7)))+'0')) + break + + } + case 'Y': + { + Xsqlite3_str_appendf(tls, bp+136, ts+1310, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FY)) + break + + } + case '%': + { + Xsqlite3_str_appendchar(tls, bp+136, 1, uint8('%')) + break + + } + default: + { + Xsqlite3_str_reset(tls, bp+136) + return + + } + } + } + if j < i { + Xsqlite3_str_append(tls, bp+136, zFmt+uintptr(j), int32(i-j)) + } + Xsqlite3ResultStrAccum(tls, context, bp+136) +} + +// current_time() +// +// This function returns the same value as time('now'). +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ + _ = NotUsed + _ = NotUsed2 + timeFunc(tls, context, 0, uintptr(0)) +} + +// current_date() +// +// This function returns the same value as date('now'). +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ + _ = NotUsed + _ = NotUsed2 + dateFunc(tls, context, 0, uintptr(0)) +} + +// current_timestamp() +// +// This function returns the same value as datetime('now'). +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ + _ = NotUsed + _ = NotUsed2 + datetimeFunc(tls, context, 0, uintptr(0)) +} + +// This function registered all of the above C functions as SQL +// functions. This should be the only routine in this file with +// external linkage. +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ + Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) +} + +var aDateTimeFuncs = [9]FuncDef{ + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1214}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1234}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1315}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1320}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1325}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1334}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1343}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1356}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1374}} /* sqlite3.c:24400:18 */ + +//************* End of date.c *********************************************** +//************* Begin file os.c ********************************************* +// 2005 November 29 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains OS interface code that is common to all +// architectures. +// #include "sqliteInt.h" + +// If we compile with the SQLITE_TEST macro set, then the following block +// of code will give us the ability to simulate a disk I/O error. This +// is used for testing the I/O recovery logic. + +// When testing, also keep a count of the number of open files. + +// The default SQLite sqlite3_vfs implementations do not allocate +// memory (actually, os_unix.c allocates a small amount of memory +// from within OsOpen()), but some third-party implementations may. +// So we test the effects of a malloc() failing and the sqlite3OsXXX() +// function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro. +// +// The following functions are instrumented for malloc() failure +// testing: +// +// sqlite3OsRead() +// sqlite3OsWrite() +// sqlite3OsSync() +// sqlite3OsFileSize() +// sqlite3OsLock() +// sqlite3OsCheckReservedLock() +// sqlite3OsFileControl() +// sqlite3OsShmMap() +// sqlite3OsOpen() +// sqlite3OsDelete() +// sqlite3OsAccess() +// sqlite3OsFullPathname() +// + +// The following routines are convenience wrappers around methods +// of the sqlite3_file object. This is mostly just syntactic sugar. All +// of this would be completely automatic if SQLite were coded using +// C++ instead of plain old C. +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ + if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { + (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods)).FxClose})).f(tls, pId) + (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) + } +} + +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) +} + +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) +} + +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ + return (*struct { + f func(*libc.TLS, uintptr, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) +} + +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ + + if flags != 0 { + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSync})).f(tls, id, flags) + } + return SQLITE_OK +} + +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) +} + +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) +} + +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) +} + +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxCheckReservedLock})).f(tls, id, pResOut) +} + +// Use sqlite3OsFileControl() when we are doing something that might fail +// and we need to know about the failures. Use sqlite3OsFileControlHint() +// when simply tossing information over the wall to the VFS and we do not +// really care if the VFS receives and understands the information since it +// is only a hint and can be safely ignored. The sqlite3OsFileControlHint() +// routine has no return value since the return value would be meaningless. +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ + if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { + return SQLITE_NOTFOUND + } + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) +} + +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ + if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) + } +} + +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ + var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize + return func() int32 { + if xSectorSize != 0 { + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xSectorSize})).f(tls, id) + } + return SQLITE_DEFAULT_SECTOR_SIZE + }() +} + +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ + if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { + return 0 + } + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) +} + +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ + return (*struct { + f func(*libc.TLS, uintptr, int32, int32, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) +} + +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) +} + +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) +} + +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmMap})).f(tls, id, iPage, pgsz, bExtend, pp) +} + +// The real implementation of xFetch and xUnfetch +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) +} + +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ + return (*struct { + f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) +} + +// The next group of routines are convenience wrappers around the +// VFS methods. +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ + var rc int32 + + // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed + // down into the VFS layer. Some SQLITE_OPEN_ flags (for example, + // SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before + // reaching the VFS. + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) + + return rc +} + +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ + + if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete})).f(tls, pVfs, zPath, dirSync) + } + return SQLITE_OK +} + +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ + + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) +} + +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ + + *(*uint8)(unsafe.Pointer(zPathOut)) = uint8(0) + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) +} + +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ + + // tag-20210611-1 + return (*struct { + f func(*libc.TLS, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) +} + +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) +} + +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ + return (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) +} + +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) +} + +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ + if Xsqlite3Config.FiPrngSeed != 0 { + libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) + if nByte > int32(unsafe.Sizeof(uint32(0))) { + nByte = int32(unsafe.Sizeof(uint32(0))) + } + libc.Xmemcpy(tls, zBufOut, uintptr(unsafe.Pointer(&Xsqlite3Config))+432, uint64(nByte)) + return SQLITE_OK + } else { + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxRandomness})).f(tls, pVfs, nByte, zBufOut) + } + return int32(0) + +} + +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) +} + +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ + if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError})).f(tls, pVfs, 0, uintptr(0)) + } + return 0 +} + +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + // IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64() + // method to get the current date and time if that method is available + // (if iVersion is 2 or greater and the function pointer is not NULL) and + // will fall back to xCurrentTime() if xCurrentTimeInt64() is + // unavailable. + if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion >= 2 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64 != 0 { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64})).f(tls, pVfs, pTimeOut) + } else { + // var r float64 at bp, 8 + + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTime})).f(tls, pVfs, bp /* &r */) + *(*Sqlite3_int64)(unsafe.Pointer(pTimeOut)) = libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp)) * 86400000.0) + } + return rc +} + +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ + var rc int32 + var pFile uintptr + pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) + if pFile != 0 { + rc = Xsqlite3OsOpen(tls, pVfs, zFile, pFile, flags, pOutFlags) + if rc != SQLITE_OK { + Xsqlite3_free(tls, pFile) + *(*uintptr)(unsafe.Pointer(ppFile)) = uintptr(0) + } else { + *(*uintptr)(unsafe.Pointer(ppFile)) = pFile + } + } else { + *(*uintptr)(unsafe.Pointer(ppFile)) = uintptr(0) + rc = SQLITE_NOMEM + } + + return rc +} + +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ + + Xsqlite3OsClose(tls, pFile) + Xsqlite3_free(tls, pFile) +} + +// This function is a wrapper around the OS specific implementation of +// sqlite3_os_init(). The purpose of the wrapper is to provide the +// ability to simulate a malloc failure, so that the handling of an +// error in sqlite3_os_init() by the upper layers can be tested. +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ + var p uintptr = Xsqlite3_malloc(tls, 10) + if p == uintptr(0) { + return SQLITE_NOMEM + } + Xsqlite3_free(tls, p) + return Xsqlite3_os_init(tls) +} + +// The list of all registered VFS implementations. +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ + +// Locate a VFS by name. If no name is given, simply return the +// first VFS on the list. +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ + var pVfs uintptr = uintptr(0) + var mutex uintptr + var rc int32 = Xsqlite3_initialize(tls) + if rc != 0 { + return uintptr(0) + } + mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + Xsqlite3_mutex_enter(tls, mutex) + for pVfs = vfsList; pVfs != 0; pVfs = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext { + if zVfs == uintptr(0) { + break + } + if libc.Xstrcmp(tls, zVfs, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName) == 0 { + break + } + } + Xsqlite3_mutex_leave(tls, mutex) + return pVfs +} + +// Unlink a VFS from the linked list +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ + + if pVfs == uintptr(0) { + // No-op + } else if vfsList == pVfs { + vfsList = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext + } else if vfsList != 0 { + var p uintptr = vfsList + for (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext != 0 && (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext != pVfs { + p = (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext + } + if (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext == pVfs { + (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext + } + } +} + +// Register a VFS with the system. It is harmless to register the same +// VFS multiple times. The new VFS becomes the default if makeDflt is +// true. +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ + var mutex uintptr + var rc int32 = Xsqlite3_initialize(tls) + if rc != 0 { + return rc + } + + mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + Xsqlite3_mutex_enter(tls, mutex) + vfsUnlink(tls, pVfs) + if makeDflt != 0 || vfsList == uintptr(0) { + (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext = vfsList + vfsList = pVfs + } else { + (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext = (*Sqlite3_vfs)(unsafe.Pointer(vfsList)).FpNext + (*Sqlite3_vfs)(unsafe.Pointer(vfsList)).FpNext = pVfs + } + + Xsqlite3_mutex_leave(tls, mutex) + return SQLITE_OK +} + +// Unregister a VFS so that it is no longer accessible. +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ + var mutex uintptr + var rc int32 = Xsqlite3_initialize(tls) + if rc != 0 { + return rc + } + mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + Xsqlite3_mutex_enter(tls, mutex) + vfsUnlink(tls, pVfs) + Xsqlite3_mutex_leave(tls, mutex) + return SQLITE_OK +} + +//************* End of os.c ************************************************* +//************* Begin file fault.c ****************************************** +// 2008 Jan 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code to support the concept of "benign" +// malloc failures (when the xMalloc() or xRealloc() method of the +// sqlite3_mem_methods structure fails to allocate a block of memory +// and returns 0). +// +// Most malloc failures are non-benign. After they occur, SQLite +// abandons the current operation and returns an error code (usually +// SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily +// fatal. For example, if a malloc fails while resizing a hash table, this +// is completely recoverable simply by not carrying out the resize. The +// hash table will continue to function normally. So a malloc failure +// during a hash table resize is a benign fault. + +// #include "sqliteInt.h" + +// Global variables. +type BenignMallocHooks1 = struct { + FxBenignBegin uintptr + FxBenignEnd uintptr +} /* sqlite3.c:24902:9 */ + +//************* End of os.c ************************************************* +//************* Begin file fault.c ****************************************** +// 2008 Jan 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code to support the concept of "benign" +// malloc failures (when the xMalloc() or xRealloc() method of the +// sqlite3_mem_methods structure fails to allocate a block of memory +// and returns 0). +// +// Most malloc failures are non-benign. After they occur, SQLite +// abandons the current operation and returns an error code (usually +// SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily +// fatal. For example, if a malloc fails while resizing a hash table, this +// is completely recoverable simply by not carrying out the resize. The +// hash table will continue to function normally. So a malloc failure +// during a hash table resize is a benign fault. + +// #include "sqliteInt.h" + +// Global variables. +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ + +// The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks +// structure. If writable static data is unsupported on the target, +// we have to locate the state vector at run-time. In the more common +// case where writable static data is supported, wsdHooks can refer directly +// to the "sqlite3Hooks" state vector declared above. + +// Register hooks to call when sqlite3BeginBenignMalloc() and +// sqlite3EndBenignMalloc() are called, respectively. +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ + + sqlite3Hooks.FxBenignBegin = xBenignBegin + sqlite3Hooks.FxBenignEnd = xBenignEnd +} + +// This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that +// subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() +// indicates that subsequent malloc failures are non-benign. +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ + + if sqlite3Hooks.FxBenignBegin != 0 { + (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) + } +} + +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ + + if sqlite3Hooks.FxBenignEnd != 0 { + (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) + } +} + +//************* End of fault.c ********************************************** +//************* Begin file mem0.c ******************************************* +// 2008 October 28 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains a no-op memory allocation drivers for use when +// SQLITE_ZERO_MALLOC is defined. The allocation drivers implemented +// here always fail. SQLite will not operate with these drivers. These +// are merely placeholders. Real drivers must be substituted using +// sqlite3_config() before SQLite will operate. +// #include "sqliteInt.h" + +// This version of the memory allocator is the default. It is +// used when no other memory allocator is specified using compile-time +// macros. + +//************* End of mem0.c *********************************************** +//************* Begin file mem1.c ******************************************* +// 2007 August 14 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains low-level memory allocation drivers for when +// SQLite will use the standard C-library malloc/realloc/free interface +// to obtain the memory it needs. +// +// This file contains implementations of the low-level memory allocation +// routines specified in the sqlite3_mem_methods object. The content of +// this file is only used if SQLITE_SYSTEM_MALLOC is defined. The +// SQLITE_SYSTEM_MALLOC macro is defined automatically if neither the +// SQLITE_MEMDEBUG nor the SQLITE_WIN32_MALLOC macros are defined. The +// default configuration is to use memory allocation routines in this +// file. +// +// C-preprocessor macro summary: +// +// HAVE_MALLOC_USABLE_SIZE The configure script sets this symbol if +// the malloc_usable_size() interface exists +// on the target platform. Or, this symbol +// can be set manually, if desired. +// If an equivalent interface exists by +// a different name, using a separate -D +// option to rename it. +// +// SQLITE_WITHOUT_ZONEMALLOC Some older macs lack support for the zone +// memory allocator. Set this symbol to enable +// building on older macs. +// +// SQLITE_WITHOUT_MSIZE Set this symbol to disable the use of +// _msize() on windows systems. This might +// be necessary when compiling for Delphi, +// for example. +// #include "sqliteInt.h" + +// This version of the memory allocator is the default. It is +// used when no other memory allocator is specified using compile-time +// macros. + +// Use standard C library malloc and free on non-Apple systems. +// Also used by Apple systems if SQLITE_WITHOUT_ZONEMALLOC is defined. + +// The malloc.h header file is needed for malloc_usable_size() function +// on some systems (e.g. Linux). + +// Include the malloc.h header file, if necessary. Also set define macro +// SQLITE_MALLOCSIZE to the appropriate function name, which is _msize() +// for MSVC and malloc_usable_size() for most other systems (e.g. Linux). +// The memory size function can always be overridden manually by defining +// the macro SQLITE_MALLOCSIZE to the desired function name. + +// Like malloc(), but remember the size of the allocation +// so that we can find it later using sqlite3MemSize(). +// +// For this low-level routine, we are guaranteed that nByte>0 because +// cases of nByte<=0 will be intercepted and dealt with by higher level +// routines. +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr + + p = libc.Xmalloc(tls, uint64(nByte+8)) + if p != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) + p += 8 + } else { + + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1387, libc.VaList(bp, nByte)) + } + return p +} + +// Like free() but works for allocations obtained from sqlite3MemMalloc() +// or sqlite3MemRealloc(). +// +// For this low-level routine, we already know that pPrior!=0 since +// cases where pPrior==0 will have been intecepted and dealt with +// by higher-level routines. +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ + var p uintptr = pPrior + + p -= 8 + libc.Xfree(tls, p) +} + +// Report the allocated size of a prior return from xMalloc() +// or xRealloc(). +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ + var p uintptr + + p = pPrior + p -= 8 + return int32(*(*Sqlite3_int64)(unsafe.Pointer(p))) +} + +// Like realloc(). Resize an allocation previously obtained from +// sqlite3MemMalloc(). +// +// For this low-level interface, we know that pPrior!=0. Cases where +// pPrior==0 while have been intercepted by higher-level routine and +// redirected to xMalloc. Similarly, we know that nByte>0 because +// cases where nByte<=0 will have been intercepted by higher-level +// routines and redirected to xFree. +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var p uintptr = pPrior + + // EV: R-46199-30249 + p -= 8 + p = libc.Xrealloc(tls, p, uint64(nByte+8)) + if p != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(p)) = Sqlite3_int64(nByte) + p += 8 + } else { + + Xsqlite3_log(tls, SQLITE_NOMEM, + ts+1425, + libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) + } + return p +} + +// Round up a request size to the next valid allocation size. +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ + return (n + 7) & libc.CplInt32(7) +} + +// Initialize this module. +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ + _ = NotUsed + return SQLITE_OK +} + +// Deinitialize this module. +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ + _ = NotUsed + return +} + +// This routine is the only routine in this file with external linkage. +// +// Populate the low-level memory allocation function pointers in +// sqlite3GlobalConfig.m with pointers to the routines in this file. +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp, uintptr(unsafe.Pointer(&defaultMethods)))) +} + +var defaultMethods = Sqlite3_mem_methods{ + FxMalloc: 0, + FxFree: 0, + FxRealloc: 0, + FxSize: 0, + FxRoundup: 0, + FxInit: 0, + FxShutdown: 0, +} /* sqlite3.c:25298:36 */ + +//************* End of mem1.c *********************************************** +//************* Begin file mem2.c ******************************************* +// 2007 August 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains low-level memory allocation drivers for when +// SQLite will use the standard C-library malloc/realloc/free interface +// to obtain the memory it needs while adding lots of additional debugging +// information to each allocation in order to help detect and fix memory +// leaks and memory usage errors. +// +// This file contains implementations of the low-level memory allocation +// routines specified in the sqlite3_mem_methods object. +// #include "sqliteInt.h" + +// This version of the memory allocator is used only if the +// SQLITE_MEMDEBUG macro is defined + +//************* End of mem2.c *********************************************** +//************* Begin file mem3.c ******************************************* +// 2007 October 14 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C functions that implement a memory +// allocation subsystem for use by SQLite. +// +// This version of the memory allocation subsystem omits all +// use of malloc(). The SQLite user supplies a block of memory +// before calling sqlite3_initialize() from which allocations +// are made and returned by the xMalloc() and xRealloc() +// implementations. Once sqlite3_initialize() has been called, +// the amount of memory available to SQLite is fixed and cannot +// be changed. +// +// This version of the memory allocation subsystem is included +// in the build only if SQLITE_ENABLE_MEMSYS3 is defined. +// #include "sqliteInt.h" + +// This version of the memory allocator is only built into the library +// SQLITE_ENABLE_MEMSYS3 is defined. Defining this symbol does not +// mean that the library will use a memory-pool by default, just that +// it is available. The mempool allocator is activated by calling +// sqlite3_config(). + +//************* End of mem3.c *********************************************** +//************* Begin file mem5.c ******************************************* +// 2007 October 14 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C functions that implement a memory +// allocation subsystem for use by SQLite. +// +// This version of the memory allocation subsystem omits all +// use of malloc(). The application gives SQLite a block of memory +// before calling sqlite3_initialize() from which allocations +// are made and returned by the xMalloc() and xRealloc() +// implementations. Once sqlite3_initialize() has been called, +// the amount of memory available to SQLite is fixed and cannot +// be changed. +// +// This version of the memory allocation subsystem is included +// in the build only if SQLITE_ENABLE_MEMSYS5 is defined. +// +// This memory allocator uses the following algorithm: +// +// 1. All memory allocation sizes are rounded up to a power of 2. +// +// 2. If two adjacent free blocks are the halves of a larger block, +// then the two blocks are coalesced into the single larger block. +// +// 3. New memory is allocated from the first available free block. +// +// This algorithm is described in: J. M. Robson. "Bounds for Some Functions +// Concerning Dynamic Storage Allocation". Journal of the Association for +// Computing Machinery, Volume 21, Number 8, July 1974, pages 491-499. +// +// Let n be the size of the largest allocation divided by the minimum +// allocation size (after rounding all sizes up to a power of 2.) Let M +// be the maximum amount of memory ever outstanding at one time. Let +// N be the total amount of memory available for allocation. Robson +// proved that this memory allocator will never breakdown due to +// fragmentation as long as the following constraint holds: +// +// N >= M*(1 + log2(n)/2) - n + 1 +// +// The sqlite3_status() logic tracks the maximum values of n and M so +// that an application can, at any time, verify this constraint. +// #include "sqliteInt.h" + +// This version of the memory allocator is used only when +// SQLITE_ENABLE_MEMSYS5 is defined. + +//************* End of mem5.c *********************************************** +//************* Begin file mutex.c ****************************************** +// 2007 August 14 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C functions that implement mutexes. +// +// This file contains code that is common across all mutex implementations. +// #include "sqliteInt.h" + +// Initialize the mutex system. +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ + var rc int32 = SQLITE_OK + if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { + // If the xMutexAlloc method has not been set, then the user did not + // install a mutex implementation via sqlite3_config() prior to + // sqlite3_initialize() being called. This block copies pointers to + // the default implementation into the sqlite3GlobalConfig structure. + var pFrom uintptr + var pTo uintptr = uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 + + if Xsqlite3Config.FbCoreMutex != 0 { + pFrom = Xsqlite3DefaultMutex(tls) + } else { + pFrom = Xsqlite3NoopMutex(tls) + } + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexInit = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexInit + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexEnd = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexEnd + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexFree = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexFree + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexEnter = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexEnter + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexTry = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexTry + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexLeave = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexLeave + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexHeld = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexHeld + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexNotheld = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexNotheld + + (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexAlloc = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexAlloc + } + + rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexInit})).f(tls) + + return rc +} + +// Shutdown the mutex system. This call frees resources allocated by +// sqlite3MutexInit(). +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ + var rc int32 = SQLITE_OK + if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { + rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) + } + + return rc +} + +// Retrieve a pointer to a static mutex or allocate a new dynamic one. +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ + if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { + return uintptr(0) + } + if id > SQLITE_MUTEX_RECURSIVE && Xsqlite3MutexInit(tls) != 0 { + return uintptr(0) + } + + return (*struct { + f func(*libc.TLS, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) +} + +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ + if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { + return uintptr(0) + } + + return (*struct { + f func(*libc.TLS, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) +} + +// Free a dynamic mutex. +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ + if p != 0 { + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) + } +} + +// Obtain the mutex p. If some other thread already has the mutex, block +// until it can be obtained. +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ + if p != 0 { + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) + } +} + +// Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another +// thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ + var rc int32 = SQLITE_OK + if p != 0 { + + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexTry})).f(tls, p) + } + return rc +} + +// The sqlite3_mutex_leave() routine exits a mutex that was previously +// entered by the same thread. The behavior is undefined if the mutex +// is not currently entered. If a NULL pointer is passed as an argument +// this function is a no-op. +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ + if p != 0 { + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) + } +} + +//************* End of mutex.c ********************************************** +//************* Begin file mutex_noop.c ************************************* +// 2008 October 07 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C functions that implement mutexes. +// +// This implementation in this file does not provide any mutual +// exclusion and is thus suitable for use only in applications +// that use SQLite in a single thread. The routines defined +// here are place-holders. Applications can substitute working +// mutex routines at start-time using the +// +// sqlite3_config(SQLITE_CONFIG_MUTEX,...) +// +// interface. +// +// If compiled with SQLITE_DEBUG, then additional logic is inserted +// that does error checking on mutexes to make sure they are being +// called correctly. +// #include "sqliteInt.h" + +// Stub routines for all mutex methods. +// +// This routines provide no mutual exclusion or error checking. +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ + return SQLITE_OK +} + +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ + return SQLITE_OK +} + +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ + _ = id + return uintptr(8) +} + +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ + _ = p + return +} + +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ + _ = p + return +} + +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ + _ = p + return SQLITE_OK +} + +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ + _ = p + return +} + +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ + + return uintptr(unsafe.Pointer(&sMutex)) +} + +var sMutex = Sqlite3_mutex_methods{ + FxMutexInit: 0, + FxMutexEnd: 0, + FxMutexAlloc: 0, + FxMutexFree: 0, + FxMutexEnter: 0, + FxMutexTry: 0, + FxMutexLeave: 0, +} /* sqlite3.c:27531:38 */ + +// If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation +// is used regardless of the run-time threadsafety setting. +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ + return Xsqlite3NoopMutex(tls) +} + +//************* End of mutex_noop.c ***************************************** +//************* Begin file mutex_unix.c ************************************* +// 2007 August 28 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C functions that implement mutexes for pthreads +// #include "sqliteInt.h" + +// The code in this file is only used if we are compiling threadsafe +// under unix with pthreads. +// +// Note that this implementation requires a version of pthreads that +// supports recursive mutexes. + +//************* End of mutex_unix.c ***************************************** +//************* Begin file mutex_w32.c ************************************** +// 2007 August 14 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C functions that implement mutexes for Win32. +// #include "sqliteInt.h" + +// The code in this file is only used if we are compiling multithreaded +// on a Win32 system. + +//************* End of mutex_w32.c ****************************************** +//************* Begin file malloc.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Memory allocation functions used throughout sqlite. +// #include "sqliteInt.h" +// #include + +// Attempt to release up to n bytes of non-essential memory currently +// held by SQLite. An example of non-essential memory is memory used to +// cache database pages that are not currently in use. +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ + return Xsqlite3PcacheReleaseMemory(tls, n) +} + +// Default value of the hard heap limit. 0 means "no limit". + +// State information local to the memory allocation subsystem. +type Mem0Global = struct { + Fmutex uintptr + FalarmThreshold Sqlite3_int64 + FhardLimit Sqlite3_int64 + FnearlyFull int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:28632:19 */ + +// Default value of the hard heap limit. 0 means "no limit". + +// State information local to the memory allocation subsystem. +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ + +// Return the memory allocator mutex. sqlite3_status() needs it. +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ + return mem0.Fmutex +} + +// Deprecated external interface. It used to set an alarm callback +// that was invoked when memory usage grew too large. Now it is a +// no-op. +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ + _ = xCallback + _ = pArg + _ = iThreshold + return SQLITE_OK +} + +// Set the soft heap-size limit for the library. An argument of +// zero disables the limit. A negative argument is a no-op used to +// obtain the return value. +// +// The return value is the value of the heap limit just before this +// interface was called. +// +// If the hard heap limit is enabled, then the soft heap limit cannot +// be disabled nor raised above the hard heap limit. +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ + var priorLimit Sqlite3_int64 + var excess Sqlite3_int64 + var nUsed Sqlite3_int64 + var rc int32 = Xsqlite3_initialize(tls) + if rc != 0 { + return int64(-1) + } + Xsqlite3_mutex_enter(tls, mem0.Fmutex) + priorLimit = mem0.FalarmThreshold + if n < int64(0) { + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + return priorLimit + } + if mem0.FhardLimit > int64(0) && (n > mem0.FhardLimit || n == int64(0)) { + n = mem0.FhardLimit + } + mem0.FalarmThreshold = n + nUsed = Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED) + libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&mem0))+24, int32(libc.Bool32(n > int64(0) && n <= nUsed)), 0) + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + excess = Xsqlite3_memory_used(tls) - n + if excess > int64(0) { + Xsqlite3_release_memory(tls, int32(excess&int64(0x7fffffff))) + } + return priorLimit +} + +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ + if n < 0 { + n = 0 + } + Xsqlite3_soft_heap_limit64(tls, int64(n)) +} + +// Set the hard heap-size limit for the library. An argument of zero +// disables the hard heap limit. A negative argument is a no-op used +// to obtain the return value without affecting the hard heap limit. +// +// The return value is the value of the hard heap limit just prior to +// calling this interface. +// +// Setting the hard heap limit will also activate the soft heap limit +// and constrain the soft heap limit to be no more than the hard heap +// limit. +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ + var priorLimit Sqlite3_int64 + var rc int32 = Xsqlite3_initialize(tls) + if rc != 0 { + return int64(-1) + } + Xsqlite3_mutex_enter(tls, mem0.Fmutex) + priorLimit = mem0.FhardLimit + if n >= int64(0) { + mem0.FhardLimit = n + if n < mem0.FalarmThreshold || mem0.FalarmThreshold == int64(0) { + mem0.FalarmThreshold = n + } + } + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + return priorLimit +} + +// Initialize the memory allocation subsystem. +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ + var rc int32 + if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { + Xsqlite3MemSetDefault(tls) + } + mem0.Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MEM) + if Xsqlite3Config.FpPage == uintptr(0) || Xsqlite3Config.FszPage < 512 || + Xsqlite3Config.FnPage <= 0 { + Xsqlite3Config.FpPage = uintptr(0) + Xsqlite3Config.FszPage = 0 + } + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxInit})).f(tls, Xsqlite3Config.Fm.FpAppData) + if rc != SQLITE_OK { + libc.Xmemset(tls, uintptr(unsafe.Pointer(&mem0)), 0, uint64(unsafe.Sizeof(mem0))) + } + return rc +} + +// Return true if the heap is currently under memory pressure - in other +// words if the amount of heap used is close to the limit set by +// sqlite3_soft_heap_limit(). +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ + return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+24, 0) +} + +// Deinitialize the memory allocation subsystem. +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ + if Xsqlite3Config.Fm.FxShutdown != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) + } + libc.Xmemset(tls, uintptr(unsafe.Pointer(&mem0)), 0, uint64(unsafe.Sizeof(mem0))) +} + +// Return the amount of memory currently checked out. +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var res Sqlite3_int64 at bp, 8 + + // var mx Sqlite3_int64 at bp+8, 8 + + Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp, bp+8, 0) + return *(*Sqlite3_int64)(unsafe.Pointer(bp /* res */)) +} + +// Return the maximum amount of memory that has ever been +// checked out since either the beginning of this process +// or since the most recent reset. +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var res Sqlite3_int64 at bp, 8 + + // var mx Sqlite3_int64 at bp+8, 8 + + Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp, bp+8, resetFlag) + return *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* mx */)) +} + +// Trigger the alarm +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ + if mem0.FalarmThreshold <= int64(0) { + return + } + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + Xsqlite3_release_memory(tls, nByte) + Xsqlite3_mutex_enter(tls, mem0.Fmutex) +} + +// Do a memory allocation with statistics and alarms. Assume the +// lock is already held. +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ + var p uintptr + var nFull int32 + + // In Firefox (circa 2017-02-08), xRoundup() is remapped to an internal + // implementation of malloc_good_size(), which must be called in debug + // mode and specifically when the DMD "Dark Matter Detector" is enabled + // or else a crash results. Hence, do not attempt to optimize out the + // following xRoundup() call. + nFull = (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, n) + + Xsqlite3StatusHighwater(tls, SQLITE_STATUS_MALLOC_SIZE, n) + if mem0.FalarmThreshold > int64(0) { + var nUsed Sqlite3_int64 = Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED) + if nUsed >= mem0.FalarmThreshold-Sqlite3_int64(nFull) { + libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&mem0))+24, int32(1), 0) + sqlite3MallocAlarm(tls, nFull) + if mem0.FhardLimit != 0 { + nUsed = Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED) + if nUsed >= mem0.FhardLimit-Sqlite3_int64(nFull) { + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + return + } + } + } else { + libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&mem0))+24, int32(0), 0) + } + } + p = (*struct { + f func(*libc.TLS, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, nFull) + if p == uintptr(0) && mem0.FalarmThreshold > int64(0) { + sqlite3MallocAlarm(tls, nFull) + p = (*struct { + f func(*libc.TLS, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, nFull) + } + if p != 0 { + nFull = Xsqlite3MallocSize(tls, p) + Xsqlite3StatusUp(tls, SQLITE_STATUS_MEMORY_USED, nFull) + Xsqlite3StatusUp(tls, SQLITE_STATUS_MALLOC_COUNT, 1) + } + *(*uintptr)(unsafe.Pointer(pp)) = p +} + +// Allocate memory. This routine is like sqlite3_malloc() except that it +// assumes the memory subsystem has already been initialized. +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var p uintptr at bp, 8 + + if n == uint64(0) || n >= uint64(0x7fffff00) { + // A memory allocation of a number of bytes which is near the maximum + // signed integer value might cause an integer overflow inside of the + // xMalloc(). Hence we limit the maximum size to 0x7fffff00, giving + // 255 bytes of overhead. SQLite itself will never use anything near + // this amount. The only way to reach the limit is with sqlite3_malloc() + *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) + } else if Xsqlite3Config.FbMemstat != 0 { + Xsqlite3_mutex_enter(tls, mem0.Fmutex) + mallocWithAlarm(tls, int32(n), bp) + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + } else { + *(*uintptr)(unsafe.Pointer(bp /* p */)) = (*struct { + f func(*libc.TLS, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, int32(n)) + } + // IMP: R-11148-40995 + return *(*uintptr)(unsafe.Pointer(bp /* p */)) +} + +// This version of the memory allocation is for use by the application. +// First make sure the memory subsystem is initialized, then do the +// allocation. +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ + if Xsqlite3_initialize(tls) != 0 { + return uintptr(0) + } + if n <= 0 { + return uintptr(0) + } + return Xsqlite3Malloc(tls, uint64(n)) +} + +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ + if Xsqlite3_initialize(tls) != 0 { + return uintptr(0) + } + return Xsqlite3Malloc(tls, n) +} + +// TRUE if p is a lookaside memory allocation from db +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ + return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) +} + +// Return the size of a memory allocation previously obtained from +// sqlite3Malloc() or sqlite3_malloc(). +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ + + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) +} + +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ + if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { + return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) + } + return LOOKASIDE_SMALL +} + +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ + + if db != 0 { + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { + + return LOOKASIDE_SMALL + } + if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) { + + return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) + } + } + } + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) +} + +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ + + if p != 0 { + return uint64((*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p)) + } + return uint64(0) +} + +// Free memory previously obtained from sqlite3Malloc(). +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ + if p == uintptr(0) { + return + } // IMP: R-49053-54554 + + if Xsqlite3Config.FbMemstat != 0 { + Xsqlite3_mutex_enter(tls, mem0.Fmutex) + Xsqlite3StatusDown(tls, SQLITE_STATUS_MEMORY_USED, Xsqlite3MallocSize(tls, p)) + Xsqlite3StatusDown(tls, SQLITE_STATUS_MALLOC_COUNT, 1) + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxFree})).f(tls, p) + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + } else { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxFree})).f(tls, p) + } +} + +// Add the size of memory allocation "p" to the count in +// *db->pnBytesFreed. +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ + *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) +} + +// Free memory that might be associated with a particular database +// connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. +// The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ + + if db != 0 { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + measureAllocationSize(tls, db, p) + return + } + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { + var pBuf uintptr = p + (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = pBuf + return + } + if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) { + var pBuf uintptr = p + (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree = pBuf + return + } + } + } + + Xsqlite3_free(tls, p) +} + +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ + + if p != 0 { + Xsqlite3DbFreeNN(tls, db, p) + } +} + +// Change the size of an existing memory allocation +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ + var nOld int32 + var nNew int32 + var nDiff int32 + var pNew uintptr + + if pOld == uintptr(0) { + return Xsqlite3Malloc(tls, nBytes) // IMP: R-04300-56712 + } + if nBytes == uint64(0) { + Xsqlite3_free(tls, pOld) // IMP: R-26507-47431 + return uintptr(0) + } + if nBytes >= uint64(0x7fffff00) { + // The 0x7ffff00 limit term is explained in comments on sqlite3Malloc() + return uintptr(0) + } + nOld = Xsqlite3MallocSize(tls, pOld) + // IMPLEMENTATION-OF: R-46199-30249 SQLite guarantees that the second + // argument to xRealloc is always a value returned by a prior call to + // xRoundup. + nNew = (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, int32(nBytes)) + if nOld == nNew { + pNew = pOld + } else if Xsqlite3Config.FbMemstat != 0 { + var nUsed Sqlite3_int64 + Xsqlite3_mutex_enter(tls, mem0.Fmutex) + Xsqlite3StatusHighwater(tls, SQLITE_STATUS_MALLOC_SIZE, int32(nBytes)) + nDiff = nNew - nOld + if nDiff > 0 && libc.AssignInt64(&nUsed, Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED)) >= mem0.FalarmThreshold-Sqlite3_int64(nDiff) { + sqlite3MallocAlarm(tls, nDiff) + if mem0.FhardLimit > int64(0) && nUsed >= mem0.FhardLimit-Sqlite3_int64(nDiff) { + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + return uintptr(0) + } + } + pNew = (*struct { + f func(*libc.TLS, uintptr, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew) + if pNew == uintptr(0) && mem0.FalarmThreshold > int64(0) { + sqlite3MallocAlarm(tls, int32(nBytes)) + pNew = (*struct { + f func(*libc.TLS, uintptr, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew) + } + if pNew != 0 { + nNew = Xsqlite3MallocSize(tls, pNew) + Xsqlite3StatusUp(tls, SQLITE_STATUS_MEMORY_USED, nNew-nOld) + } + Xsqlite3_mutex_leave(tls, mem0.Fmutex) + } else { + pNew = (*struct { + f func(*libc.TLS, uintptr, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew) + } + // IMP: R-11148-40995 + return pNew +} + +// The public interface to sqlite3Realloc. Make sure that the memory +// subsystem is initialized prior to invoking sqliteRealloc. +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ + if Xsqlite3_initialize(tls) != 0 { + return uintptr(0) + } + if n < 0 { + n = 0 + } // IMP: R-26507-47431 + return Xsqlite3Realloc(tls, pOld, uint64(n)) +} + +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ + if Xsqlite3_initialize(tls) != 0 { + return uintptr(0) + } + return Xsqlite3Realloc(tls, pOld, n) +} + +// Allocate and zero memory. +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ + var p uintptr = Xsqlite3Malloc(tls, n) + if p != 0 { + libc.Xmemset(tls, p, 0, Size_t(n)) + } + return p +} + +// Allocate and zero memory. If the allocation fails, make +// the mallocFailed flag in the connection pointer. +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ + var p uintptr + + p = Xsqlite3DbMallocRaw(tls, db, n) + if p != 0 { + libc.Xmemset(tls, p, 0, Size_t(n)) + } + return p +} + +// Finish the work of sqlite3DbMallocRawNN for the unusual and +// slower case when the allocation cannot be fulfilled using lookaside. +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ + var p uintptr + + p = Xsqlite3Malloc(tls, n) + if !(p != 0) { + Xsqlite3OomFault(tls, db) + } + + return p +} + +// Allocate memory, either lookaside (if possible) or heap. +// If the allocation fails, set the mallocFailed flag in +// the connection pointer. +// +// If db!=0 and db->mallocFailed is true (indicating a prior malloc +// failure on the same database connection) then always return 0. +// Hence for a particular database connection, once malloc starts +// failing, it fails consistently until mallocFailed is reset. +// This is an important assumption. There are many places in the +// code that do things like this: +// +// int *a = (int*)sqlite3DbMallocRaw(db, 100); +// int *b = (int*)sqlite3DbMallocRaw(db, 200); +// if( b ) a[10] = 9; +// +// In other words, if a subsequent malloc (ex: "b") worked, it is assumed +// that all prior mallocs (ex: "a") worked too. +// +// The sqlite3MallocRawNN() variant guarantees that the "db" parameter is +// not a NULL pointer. +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ + var p uintptr + if db != 0 { + return Xsqlite3DbMallocRawNN(tls, db, n) + } + p = Xsqlite3Malloc(tls, n) + + return p +} + +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ + var pBuf uintptr + + if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable) != 0) { + *(*U32)(unsafe.Pointer(db + 440 + 16 + 1*4))++ + } else if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return uintptr(0) + } + return dbMallocRawFinish(tls, db, n) + } + if n <= uint64(LOOKASIDE_SMALL) { + if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree) != uintptr(0) { + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext + *(*U32)(unsafe.Pointer(db + 440 + 16))++ + return pBuf + } else if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) != uintptr(0) { + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext + *(*U32)(unsafe.Pointer(db + 440 + 16))++ + return pBuf + } + } + if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) != uintptr(0) { + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext + *(*U32)(unsafe.Pointer(db + 440 + 16))++ + return pBuf + } else if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) != uintptr(0) { + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext + *(*U32)(unsafe.Pointer(db + 440 + 16))++ + return pBuf + } else { + *(*U32)(unsafe.Pointer(db + 440 + 16 + 2*4))++ + } + return dbMallocRawFinish(tls, db, n) +} + +// Resize the block of memory pointed to by p to n bytes. If the +// resize fails, set the mallocFailed flag in the connection object. +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ + + if p == uintptr(0) { + return Xsqlite3DbMallocRawNN(tls, db, n) + } + + if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { + if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { + if n <= uint64(LOOKASIDE_SMALL) { + return p + } + } else if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) { + if n <= U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) { + return p + } + } + } + return dbReallocFinish(tls, db, p, n) +} + +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ + var pNew uintptr = uintptr(0) + + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { + if isLookaside(tls, db, p) != 0 { + pNew = Xsqlite3DbMallocRawNN(tls, db, n) + if pNew != 0 { + libc.Xmemcpy(tls, pNew, p, uint64(lookasideMallocSize(tls, db, p))) + Xsqlite3DbFree(tls, db, p) + } + } else { + + pNew = Xsqlite3Realloc(tls, p, n) + if !(pNew != 0) { + Xsqlite3OomFault(tls, db) + } + + } + } + return pNew +} + +// Attempt to reallocate p. If the reallocation fails, then free p +// and set the mallocFailed flag in the database connection. +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ + var pNew uintptr + pNew = Xsqlite3DbRealloc(tls, db, p, n) + if !(pNew != 0) { + Xsqlite3DbFree(tls, db, p) + } + return pNew +} + +// Make a copy of a string in memory obtained from sqliteMalloc(). These +// functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This +// is because when memory debugging is turned on, these two functions are +// called via macros that record the current file and line number in the +// ThreadData structure. +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ + var zNew uintptr + var n Size_t + if z == uintptr(0) { + return uintptr(0) + } + n = libc.Xstrlen(tls, z) + uint64(1) + zNew = Xsqlite3DbMallocRaw(tls, db, uint64(n)) + if zNew != 0 { + libc.Xmemcpy(tls, zNew, z, n) + } + return zNew +} + +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ + var zNew uintptr + + if z != 0 { + zNew = Xsqlite3DbMallocRawNN(tls, db, n+uint64(1)) + } else { + zNew = uintptr(0) + } + if zNew != 0 { + libc.Xmemcpy(tls, zNew, z, Size_t(n)) + *(*uint8)(unsafe.Pointer(zNew + uintptr(n))) = uint8(0) + } + return zNew +} + +// The text between zStart and zEnd represents a phrase within a larger +// SQL statement. Make a copy of this phrase in space obtained form +// sqlite3DbMalloc(). Omit leading and trailing whitespace. +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ + var n int32 + for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart)))])&0x01 != 0 { + zStart++ + } + n = int32((int64(zEnd) - int64(zStart)) / 1) + for n > 0 && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart + uintptr(n-1))))])&0x01 != 0 { + n-- + } + return Xsqlite3DbStrNDup(tls, db, zStart, uint64(n)) +} + +// Free any prior content in *pz and replace it with a copy of zNew. +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) + *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) +} + +// Call this routine to record the fact that an OOM (out-of-memory) error +// has happened. This routine will set db->mallocFailed, and also +// temporarily disable the lookaside memory allocator and interrupt +// any running VDBEs. +// +// Always return a NULL pointer so that this routine can be invoked using +// +// return sqlite3OomFault(db); +// +// and thereby avoid unnecessary stack frame allocations for the overwhelmingly +// common case where no OOM occurs. +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { + (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) + if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { + libc.AtomicStoreNInt32(db+432, int32(1), 0) + } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) + if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1461, 0) + (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM + } + } + return uintptr(0) +} + +// This routine reactivates the memory allocator and clears the +// db->mallocFailed flag as necessary. +// +// The memory allocator is not restarted if there are running +// VDBEs. +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { + (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) + libc.AtomicStoreNInt32(db+432, int32(0), 0) + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { + if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { + return uint16(0) + } + return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue + }() + } +} + +// Take actions at the end of an API call to deal with error codes. +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { + Xsqlite3OomClear(tls, db) + Xsqlite3Error(tls, db, SQLITE_NOMEM) + return SQLITE_NOMEM + } + return rc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask +} + +// This function must be called before exiting any API function (i.e. +// returning control to the user) that has called sqlite3_malloc or +// sqlite3_realloc. +// +// The returned value is normally a copy of the second argument to this +// function. However, if a malloc() failure has occurred since the previous +// invocation SQLITE_NOMEM is returned instead. +// +// If an OOM as occurred, then the connection error-code (the value +// returned by sqlite3_errcode()) is set to SQLITE_NOMEM. +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ + // If the db handle must hold the connection handle mutex here. + // Otherwise the read (and possible write) of db->mallocFailed + // is unsafe, as is the call to sqlite3Error(). + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc != 0 { + return apiHandleError(tls, db, rc) + } + return rc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask +} + +//************* End of malloc.c ********************************************* +//************* Begin file printf.c ***************************************** +// The "printf" code that follows dates from the 1980's. It is in +// the public domain. +// +// +// +// This file contains code for a set of "printf"-like routines. These +// routines format strings much like the printf() from the standard C +// library, though the implementation here has enhancements to support +// SQLite. +// #include "sqliteInt.h" + +// Conversion types fall into various categories as defined by the +// following enumeration. +// The rest are extensions, not normally found in printf() + +// An "etByte" is an 8-bit unsigned value. +type EtByte = uint8 /* sqlite3.c:29470:23 */ + +// Each builtin conversion character (ex: the 'd' in "%d") is described +// by an instance of the following structure +type et_info = struct { + Ffmttype uint8 + Fbase EtByte + Fflags EtByte + Ftype EtByte + Fcharset EtByte + Fprefix EtByte +} /* sqlite3.c:29476:9 */ + +// Each builtin conversion character (ex: the 'd' in "%d") is described +// by an instance of the following structure +type Et_info = et_info /* sqlite3.c:29483:3 */ + +// Allowed values for et_info.flags + +// The following table is searched linearly, so it is good to put the +// most frequently used conversion types first. +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1475)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1508)) /* sqlite3.c:29497:19 */ +var fmtinfo = [23]Et_info{ + {Ffmttype: uint8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, + {Ffmttype: uint8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, + {Ffmttype: uint8('g'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(30)}, + {Ffmttype: uint8('z'), Fflags: EtByte(4), Ftype: EtByte(EtDYNSTRING)}, + {Ffmttype: uint8('q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE)}, + {Ffmttype: uint8('Q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE2)}, + {Ffmttype: uint8('w'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE3)}, + {Ffmttype: uint8('c'), Ftype: EtByte(EtCHARX)}, + {Ffmttype: uint8('o'), Fbase: EtByte(8), Fprefix: EtByte(2)}, + {Ffmttype: uint8('u'), Fbase: EtByte(10), Ftype: EtByte(EtDECIMAL)}, + {Ffmttype: uint8('x'), Fbase: EtByte(16), Fcharset: EtByte(16), Fprefix: EtByte(1)}, + {Ffmttype: uint8('X'), Fbase: EtByte(16), Fprefix: EtByte(4)}, + {Ffmttype: uint8('f'), Fflags: EtByte(1), Ftype: EtByte(EtFLOAT)}, + {Ffmttype: uint8('e'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(30)}, + {Ffmttype: uint8('E'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(14)}, + {Ffmttype: uint8('G'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(14)}, + {Ffmttype: uint8('i'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, + {Ffmttype: uint8('n'), Ftype: EtByte(EtSIZE)}, + {Ffmttype: uint8('%'), Ftype: EtByte(EtPERCENT)}, + {Ffmttype: uint8('p'), Fbase: EtByte(16), Ftype: EtByte(EtPOINTER), Fprefix: EtByte(1)}, + + // All the rest are undocumented and are for internal use only + {Ffmttype: uint8('T'), Ftype: EtByte(EtTOKEN)}, + {Ffmttype: uint8('S'), Ftype: EtByte(EtSRCITEM)}, + {Ffmttype: uint8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, +} /* sqlite3.c:29498:22 */ + +// Notes: +// +// %S Takes a pointer to SrcItem. Shows name or database.name +// %!S Like %S but prefer the zName over the zAlias + +// Floating point constants used for rounding +var arRound = [10]float64{ + 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, + 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, +} /* sqlite3.c:29535:21 */ + +// If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point +// conversions will work. +// "*val" is a double such that 0.1 <= *val < 10.0 +// Return the ascii code for the leading digit of *val, then +// multiply "*val" by 10.0 to renormalize. +// +// Example: +// input: *val = 3.14159 +// output: *val = 1.4159 function return = '3' +// +// The counter *cnt is incremented each time. After counter exceeds +// 16 (the number of significant digits in a 64-bit float) '0' is +// always returned. +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:29558:13: */ + var digit int32 + var d float64 + if *(*int32)(unsafe.Pointer(cnt)) <= 0 { + return uint8('0') + } + *(*int32)(unsafe.Pointer(cnt))-- + digit = int32(*(*float64)(unsafe.Pointer(val))) + d = float64(digit) + digit = digit + '0' + *(*float64)(unsafe.Pointer(val)) = (*(*float64)(unsafe.Pointer(val)) - d) * 10.0 + return uint8(digit) +} + +// Set the StrAccum object to an error mode. +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ + + (*StrAccum)(unsafe.Pointer(p)).FaccError = eError + if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { + Xsqlite3_str_reset(tls, p) + } + if int32(eError) == SQLITE_TOOBIG { + Xsqlite3ErrorToParser(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, int32(eError)) + } +} + +// Extra argument values from a PrintfArguments object +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ + if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { + return int64(0) + } + 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:29588: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:29592:13: */ + if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { + return uintptr(0) + } + return Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) +} + +// Allocate memory for a temporary buffer needed for printf rendering. +// +// If the requested size of the temp buffer is larger than the size +// of the output buffer in pAccum, then cause an SQLITE_TOOBIG error. +// Do the size check before the memory allocation to prevent rogue +// SQL from requesting large allocations using the precision or width +// field of the printf() function. +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ + var z uintptr + if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { + return uintptr(0) + } + if n > Sqlite3_int64((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnAlloc) && n > Sqlite3_int64((*Sqlite3_str)(unsafe.Pointer(pAccum)).FmxAlloc) { + Xsqlite3StrAccumSetError(tls, pAccum, uint8(SQLITE_TOOBIG)) + return uintptr(0) + } + z = Xsqlite3DbMallocRaw(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, uint64(n)) + if z == uintptr(0) { + Xsqlite3StrAccumSetError(tls, pAccum, uint8(SQLITE_NOMEM)) + } + return z +} + +// On machines with a small stack size, you can redefine the +// SQLITE_PRINT_BUF_SIZE to be something smaller, if desired. + +// Hard limit on the precision of floating-point conversions. + +// Render a string given by "fmt" into the StrAccum object. +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ + bp := tls.Alloc(108) + defer tls.Free(108) + + var c int32 // Next character in the format string + var bufpt uintptr // Pointer to the conversion buffer + var precision int32 // Precision of the current field + var length int32 // Length of the field + var idx int32 // A general purpose loop counter + var width int32 // Width of the current field + var flag_leftjustify EtByte // True if "-" flag is present + var flag_prefix EtByte // '+' or ' ' or 0 for prefix + var flag_alternateform EtByte // True if "#" flag is present + var flag_altform2 EtByte // True if "!" flag is present + var flag_zeropad EtByte // True if field width constant starts with zero + var flag_long EtByte // 1 for the "l" flag, 2 for "ll", 0 by default + var done EtByte // Loop termination flag + var cThousand EtByte // Thousands separator for %d and %u + var xtype EtByte // Conversion paradigm + var bArgList U8 // True for SQLITE_PRINTF_SQLFUNC + var prefix uint8 // Prefix character. "+" or "-" or " " or '\0'. + var longvalue Sqlite_uint64 // Value for integer types + // var realvalue float64 at bp+96, 8 + // Value for real types + var infop uintptr // Pointer to the appropriate info structure + var zOut uintptr // Rendering buffer + var nOut int32 // Size of the rendering buffer + var zExtra uintptr // Malloced memory used by some conversion + var exp int32 + var e2 int32 // exponent of real numbers + // var nsd int32 at bp+104, 4 + // Number of significant digits returned + var rounder float64 // Used for rounding floating point values + var flag_dp EtByte // True if decimal point should be shown + var flag_rtz EtByte // True if trailing zeros should be removed + var pArgList uintptr // Arguments for SQLITE_PRINTF_SQLFUNC + // var buf [70]uint8 at bp+8, 70 + + var wx uint32 + var px uint32 + var v I64 + var n U64 + var x int32 + var cset uintptr + var base U8 + var nn int32 // Number of "," to insert + var ix int32 // Add "0" or "0x" + var pre uintptr + var x1 uint8 + // var rx float64 at bp+88, 8 + + // var u Sqlite3_uint64 at bp+80, 8 + + var ex int32 + var scale float64 + var szBufNeeded I64 + var i int32 + var nPad int32 + var ch uint32 + // Set length to the number of bytes needed in order to display + // precision characters + var z uintptr + // Adjust width to account for extra bytes in UTF-8 characters + var ii int32 // %w: Escape " characters + var i1 int32 + var j int32 + var k int32 + var n1 int32 + var isnull int32 + var needQuote int32 + var ch1 uint8 + var q uint8 // Quote character + var escarg uintptr + // %#T means an Expr pointer that uses Expr.u.zToken + var pExpr uintptr + // %T means a Token pointer + var pToken uintptr + var pItem uintptr + xtype = EtByte(EtINVALID) + zExtra = uintptr(0) + pArgList = uintptr(0) // Conversion buffer + + // pAccum never starts out with an empty buffer that was obtained from + // malloc(). This precondition is required by the mprintf("%z...") + // optimization. + + bufpt = uintptr(0) + if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_SQLFUNC != 0) { + goto __1 + } + pArgList = libc.VaUintptr(&ap) + bArgList = U8(1) + goto __2 +__1: + bArgList = U8(0) +__2: + ; +__3: + if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(fmt)))) != 0) { + goto __5 + } + if !(c != '%') { + goto __6 + } + bufpt = fmt +__7: + fmt++ + goto __8 +__8: + if *(*uint8)(unsafe.Pointer(fmt)) != 0 && int32(*(*uint8)(unsafe.Pointer(fmt))) != '%' { + goto __7 + } + goto __9 +__9: + ; + Xsqlite3_str_append(tls, pAccum, bufpt, int32((int64(fmt)-int64(bufpt))/1)) + if !(int32(*(*uint8)(unsafe.Pointer(fmt))) == 0) { + goto __10 + } + goto __5 +__10: + ; +__6: + ; + if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { + goto __11 + } + Xsqlite3_str_append(tls, pAccum, ts+1515, 1) + goto __5 +__11: + ; + // Find out what flags are present + flag_leftjustify = libc.AssignUint8(&flag_prefix, libc.AssignUint8(&cThousand, libc.AssignUint8(&flag_alternateform, libc.AssignUint8(&flag_altform2, libc.AssignUint8(&flag_zeropad, EtByte(0)))))) + done = EtByte(0) + width = 0 + flag_long = EtByte(0) + precision = -1 +__12: + switch c { + case '-': + goto __16 + case '+': + goto __17 + case ' ': + goto __18 + case '#': + goto __19 + case '!': + goto __20 + case '0': + goto __21 + case ',': + goto __22 + default: + goto __23 + case 'l': + goto __24 + case '1': + goto __25 + case '2': + goto __26 + case '3': + goto __27 + case '4': + goto __28 + case '5': + goto __29 + case '6': + goto __30 + case '7': + goto __31 + case '8': + goto __32 + case '9': + goto __33 + case '*': + goto __34 + case '.': + goto __35 + } + goto __15 +__16: + flag_leftjustify = EtByte(1) + goto __15 +__17: + flag_prefix = EtByte('+') + goto __15 +__18: + flag_prefix = EtByte(' ') + goto __15 +__19: + flag_alternateform = EtByte(1) + goto __15 +__20: + flag_altform2 = EtByte(1) + goto __15 +__21: + flag_zeropad = EtByte(1) + goto __15 +__22: + cThousand = EtByte(',') + goto __15 +__23: + done = EtByte(1) + goto __15 +__24: + flag_long = EtByte(1) + c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) + if !(c == 'l') { + goto __36 + } + c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) + flag_long = EtByte(2) +__36: + ; + done = EtByte(1) + goto __15 + +__25: +__26: +__27: +__28: +__29: +__30: +__31: +__32: +__33: + wx = uint32(c - '0') +__37: + if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) >= '0' && c <= '9') { + goto __38 + } + wx = wx*uint32(10) + uint32(c) - uint32('0') + goto __37 +__38: + ; + + width = int32(wx & uint32(0x7fffffff)) + if !(c != '.' && c != 'l') { + goto __39 + } + done = EtByte(1) + goto __40 +__39: + fmt-- +__40: + ; + goto __15 + +__34: + if !(bArgList != 0) { + goto __41 + } + width = int32(getIntArg(tls, pArgList)) + goto __42 +__41: + width = int32(libc.VaInt32(&ap)) +__42: + ; + if !(width < 0) { + goto __43 + } + flag_leftjustify = EtByte(1) + if width >= -2147483647 { + width = -width + } else { + width = 0 + } +__43: + ; + if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(fmt + 1)))) != '.' && c != 'l') { + goto __44 + } + c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) + done = EtByte(1) +__44: + ; + goto __15 + +__35: + c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) + if !(c == '*') { + goto __45 + } + if !(bArgList != 0) { + goto __47 + } + precision = int32(getIntArg(tls, pArgList)) + goto __48 +__47: + precision = int32(libc.VaInt32(&ap)) +__48: + ; + if !(precision < 0) { + goto __49 + } + if precision >= -2147483647 { + precision = -precision + } else { + precision = -1 + } +__49: + ; + c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) + goto __46 +__45: + px = uint32(0) +__50: + if !(c >= '0' && c <= '9') { + goto __51 + } + px = px*uint32(10) + uint32(c) - uint32('0') + c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) + goto __50 +__51: + ; + + precision = int32(px & uint32(0x7fffffff)) +__46: + ; + if !(c == 'l') { + goto __52 + } + fmt-- + goto __53 +__52: + done = EtByte(1) +__53: + ; + goto __15 + +__15: + ; + goto __13 +__13: + if !(done != 0) && libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) != 0 { + goto __12 + } + goto __14 +__14: + ; + + // Fetch the info entry for the field + infop = uintptr(unsafe.Pointer(&fmtinfo)) + xtype = EtByte(EtINVALID) + idx = 0 +__54: + if !(idx < int32(uint64(unsafe.Sizeof(fmtinfo))/uint64(unsafe.Sizeof(Et_info{})))) { + goto __56 + } + if !(c == int32(fmtinfo[idx].Ffmttype)) { + goto __57 + } + infop = uintptr(unsafe.Pointer(&fmtinfo)) + uintptr(idx)*6 + xtype = (*Et_info)(unsafe.Pointer(infop)).Ftype + goto __56 +__57: + ; + goto __55 +__55: + idx++ + goto __54 + goto __56 +__56: + ; + + // At this point, variables are initialized as follows: + // + // flag_alternateform TRUE if a '#' is present. + // flag_altform2 TRUE if a '!' is present. + // flag_prefix '+' or ' ' or zero + // flag_leftjustify TRUE if a '-' is present or if the + // field width was negative. + // flag_zeropad TRUE if the width began with 0. + // flag_long 1 for "l", 2 for "ll" + // width The specified field width. This is + // always non-negative. Zero is the default. + // precision The specified precision. The default + // is -1. + // xtype The class of the conversion. + // infop Pointer to the appropriate info struct. + + switch int32(xtype) { + case EtPOINTER: + goto __59 + case EtORDINAL: + goto __60 + case EtRADIX: + goto __61 + case EtDECIMAL: + goto __62 + case EtFLOAT: + goto __63 + case EtEXP: + goto __64 + case EtGENERIC: + goto __65 + case EtSIZE: + goto __66 + case EtPERCENT: + goto __67 + case EtCHARX: + goto __68 + case EtSTRING: + goto __69 + case EtDYNSTRING: + goto __70 + case EtSQLESCAPE: + goto __71 // %q: Escape ' characters + case EtSQLESCAPE2: + goto __72 // %Q: Escape ' and enclose in '...' + case EtSQLESCAPE3: + goto __73 + case EtTOKEN: + goto __74 + case EtSRCITEM: + goto __75 + default: + goto __76 + } + goto __58 +__59: + if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(I64(0))) { + flag_long = uint8(2) + } else { + if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(int64(0))) { + flag_long = uint8(1) + } else { + flag_long = uint8(0) + } + } +__60: +__61: + cThousand = EtByte(0) +__62: + if !(int32((*Et_info)(unsafe.Pointer(infop)).Fflags)&FLAG_SIGNED != 0) { + goto __77 + } + if !(bArgList != 0) { + goto __79 + } + v = getIntArg(tls, pArgList) + goto __80 +__79: + if !(flag_long != 0) { + goto __81 + } + if !(int32(flag_long) == 2) { + goto __83 + } + v = I64(libc.VaInt64(&ap)) + goto __84 +__83: + v = I64(libc.VaInt64(&ap)) +__84: + ; + goto __82 +__81: + v = I64(libc.VaInt32(&ap)) +__82: + ; +__80: + ; + if !(v < int64(0)) { + goto __85 + } + + longvalue = Sqlite_uint64(^v) + longvalue++ + prefix = uint8('-') + goto __86 +__85: + longvalue = Sqlite_uint64(v) + prefix = uint8(flag_prefix) +__86: + ; + goto __78 +__77: + if !(bArgList != 0) { + goto __87 + } + longvalue = U64(getIntArg(tls, pArgList)) + goto __88 +__87: + if !(flag_long != 0) { + goto __89 + } + if !(int32(flag_long) == 2) { + goto __91 + } + longvalue = Sqlite_uint64(libc.VaUint64(&ap)) + goto __92 +__91: + longvalue = Sqlite_uint64(libc.VaUint64(&ap)) +__92: + ; + goto __90 +__89: + longvalue = Sqlite_uint64(libc.VaUint32(&ap)) +__90: + ; +__88: + ; + prefix = uint8(0) +__78: + ; + if !(longvalue == uint64(0)) { + goto __93 + } + flag_alternateform = EtByte(0) +__93: + ; + if !(flag_zeropad != 0 && precision < width-libc.Bool32(int32(prefix) != 0)) { + goto __94 + } + precision = width - libc.Bool32(int32(prefix) != 0) +__94: + ; + if !(precision < SQLITE_PRINT_BUF_SIZE-10-SQLITE_PRINT_BUF_SIZE/3) { + goto __95 + } + nOut = SQLITE_PRINT_BUF_SIZE + zOut = bp + 8 /* &buf[0] */ + goto __96 +__95: + n = U64(precision) + uint64(10) + if !(cThousand != 0) { + goto __97 + } + n = n + U64(precision/3) +__97: + ; + zOut = libc.AssignUintptr(&zExtra, printfTempBuf(tls, pAccum, int64(n))) + if !(zOut == uintptr(0)) { + goto __98 + } + return +__98: + ; + nOut = int32(n) +__96: + ; + bufpt = zOut + uintptr(nOut-1) + if !(int32(xtype) == EtORDINAL) { + goto __99 + } + x = int32(longvalue % uint64(10)) + if !(x >= 4 || longvalue/uint64(10)%uint64(10) == uint64(1)) { + goto __100 + } + x = 0 +__100: + ; + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[x*2+1] + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[x*2] +__99: + ; + + cset = uintptr(unsafe.Pointer(&aDigits)) + uintptr((*Et_info)(unsafe.Pointer(infop)).Fcharset) + base = (*Et_info)(unsafe.Pointer(infop)).Fbase +__101: // Convert to ascii + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = *(*uint8)(unsafe.Pointer(cset + uintptr(longvalue%Sqlite_uint64(base)))) + longvalue = longvalue / Sqlite_uint64(base) + goto __102 +__102: + if longvalue > uint64(0) { + goto __101 + } + goto __103 +__103: + ; + + length = int32((int64(zOut+uintptr(nOut-1)) - int64(bufpt)) / 1) +__104: + if !(precision > length) { + goto __105 + } + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = uint8('0') // Zero pad + length++ + goto __104 +__105: + ; + if !(cThousand != 0) { + goto __106 + } + nn = (length - 1) / 3 // Number of "," to insert + ix = (length-1)%3 + 1 + bufpt -= uintptr(nn) + idx = 0 +__107: + if !(nn > 0) { + goto __109 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(idx))) = *(*uint8)(unsafe.Pointer(bufpt + uintptr(idx+nn))) + ix-- + if !(ix == 0) { + goto __110 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PreIncInt32(&idx, 1)))) = uint8(cThousand) + nn-- + ix = 3 +__110: + ; + goto __108 +__108: + idx++ + goto __107 + goto __109 +__109: + ; +__106: + ; + if !(prefix != 0) { + goto __111 + } + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = prefix +__111: + ; // Add sign + if !(flag_alternateform != 0 && (*Et_info)(unsafe.Pointer(infop)).Fprefix != 0) { + goto __112 + } + pre = uintptr(unsafe.Pointer(&aPrefix)) + uintptr((*Et_info)(unsafe.Pointer(infop)).Fprefix) +__113: + if !(int32(libc.AssignUint8(&x1, *(*uint8)(unsafe.Pointer(pre)))) != 0) { + goto __115 + } + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = x1 + goto __114 +__114: + pre++ + goto __113 + goto __115 +__115: + ; +__112: + ; + length = int32((int64(zOut+uintptr(nOut-1)) - int64(bufpt)) / 1) + goto __58 +__63: +__64: +__65: + if !(bArgList != 0) { + goto __116 + } + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = getDoubleArg(tls, pArgList) + goto __117 +__116: + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = float64(libc.VaFloat64(&ap)) +__117: + ; + if !(precision < 0) { + goto __118 + } + precision = 6 +__118: + ; // Set default precision + if !(precision > SQLITE_FP_PRECISION_LIMIT) { + goto __119 + } + precision = SQLITE_FP_PRECISION_LIMIT +__119: + ; + if !(*(*float64)(unsafe.Pointer(bp + 96)) < 0.0) { + goto __120 + } + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = -*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) + prefix = uint8('-') + goto __121 +__120: + prefix = uint8(flag_prefix) +__121: + ; + if !(int32(xtype) == EtGENERIC && precision > 0) { + goto __122 + } + precision-- +__122: + ; + + idx = precision & 0xfff + rounder = arRound[idx%10] +__123: + if !(idx >= 10) { + goto __124 + } + rounder = rounder * 1.0e-10 + idx = idx - 10 + goto __123 +__124: + ; + if !(int32(xtype) == EtFLOAT) { + goto __125 + } + *(*float64)(unsafe.Pointer(bp + 88 /* rx */)) = *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) + libc.Xmemcpy(tls, bp+80, bp+88, uint64(unsafe.Sizeof(Sqlite3_uint64(0)))) + ex = -1023 + int32(*(*Sqlite3_uint64)(unsafe.Pointer(bp + 80))>>52&uint64(0x7ff)) + if !(precision+ex/3 < 15) { + goto __126 + } + rounder = rounder + *(*float64)(unsafe.Pointer(bp + 96))*3e-16 +__126: + ; + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder +__125: + ; + // Normalize realvalue to within 10.0 > realvalue >= 1.0 + exp = 0 + if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 96))) != 0) { + goto __127 + } + bufpt = ts + 1517 /* "NaN" */ + length = 3 + goto __58 +__127: + ; + if !(*(*float64)(unsafe.Pointer(bp + 96)) > 0.0) { + goto __128 + } + scale = 1.0 +__129: + if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 1e100*scale && exp <= 350) { + goto __130 + } + scale = scale * 1e100 + exp = exp + 100 + goto __129 +__130: + ; +__131: + if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 1e10*scale && exp <= 350) { + goto __132 + } + scale = scale * 1e10 + exp = exp + 10 + goto __131 +__132: + ; +__133: + if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 10.0*scale && exp <= 350) { + goto __134 + } + scale = scale * 10.0 + exp++ + goto __133 +__134: + ; + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) /= scale +__135: + if !(*(*float64)(unsafe.Pointer(bp + 96)) < 1e-8) { + goto __136 + } + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 1e8 + exp = exp - 8 + goto __135 +__136: + ; +__137: + if !(*(*float64)(unsafe.Pointer(bp + 96)) < 1.0) { + goto __138 + } + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 10.0 + exp-- + goto __137 +__138: + ; + if !(exp > 350) { + goto __139 + } + bufpt = bp + 8 /* &buf[0] */ + *(*uint8)(unsafe.Pointer(bp + 8)) = prefix + libc.Xmemcpy(tls, bp+8+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1521, uint64(4)) + length = 3 + libc.Bool32(int32(prefix) != 0) + goto __58 +__139: + ; +__128: + ; + bufpt = bp + 8 /* &buf[0] */ + // If the field type is etGENERIC, then convert to either etEXP + // or etFLOAT, as appropriate. + if !(int32(xtype) != EtFLOAT) { + goto __140 + } + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder + if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 10.0) { + goto __141 + } + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 0.1 + exp++ +__141: + ; +__140: + ; + if !(int32(xtype) == EtGENERIC) { + goto __142 + } + flag_rtz = libc.BoolUint8(!(flag_alternateform != 0)) + if !(exp < -4 || exp > precision) { + goto __144 + } + xtype = EtByte(EtEXP) + goto __145 +__144: + precision = precision - exp + xtype = EtByte(EtFLOAT) +__145: + ; + goto __143 +__142: + flag_rtz = flag_altform2 +__143: + ; + if !(int32(xtype) == EtEXP) { + goto __146 + } + e2 = 0 + goto __147 +__146: + e2 = exp +__147: + ; + // Size of a temporary buffer needed + szBufNeeded = func() int64 { + if e2 > 0 { + return int64(e2) + } + return int64(0) + }() + I64(precision) + I64(width) + int64(15) + if !(szBufNeeded > int64(SQLITE_PRINT_BUF_SIZE)) { + goto __148 + } + bufpt = libc.AssignUintptr(&zExtra, printfTempBuf(tls, pAccum, szBufNeeded)) + if !(bufpt == uintptr(0)) { + goto __149 + } + return +__149: + ; +__148: + ; + + zOut = bufpt + *(*int32)(unsafe.Pointer(bp + 104 /* nsd */)) = 16 + int32(flag_altform2)*10 + flag_dp = EtByte(func() int32 { + if precision > 0 { + return 1 + } + return 0 + }() | int32(flag_alternateform) | int32(flag_altform2)) + // The sign in front of the number + if !(prefix != 0) { + goto __150 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = prefix +__150: + ; + // Digits prior to the decimal point + if !(e2 < 0) { + goto __151 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('0') + goto __152 +__151: + ; +__153: + if !(e2 >= 0) { + goto __155 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96, bp+104) + goto __154 +__154: + e2-- + goto __153 + goto __155 +__155: + ; +__152: + ; + // The decimal point + if !(flag_dp != 0) { + goto __156 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('.') +__156: + ; + // "0" digits after the decimal point but before the first + // significant digit of the number + e2++ +__157: + if !(e2 < 0) { + goto __159 + } + + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('0') + goto __158 +__158: + precision-- + e2++ + goto __157 + goto __159 +__159: + ; + // Significant digits after the decimal point +__160: + if !(libc.PostDecInt32(&precision, 1) > 0) { + goto __161 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96, bp+104) + goto __160 +__161: + ; + // Remove trailing zeros and the "." if no digits follow the "." + if !(flag_rtz != 0 && flag_dp != 0) { + goto __162 + } +__163: + if !(int32(*(*uint8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '0') { + goto __164 + } + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = uint8(0) + goto __163 +__164: + ; + + if !(int32(*(*uint8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '.') { + goto __165 + } + if !(flag_altform2 != 0) { + goto __166 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('0') + goto __167 +__166: + *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = uint8(0) +__167: + ; +__165: + ; +__162: + ; + // Add the "eNNN" suffix + if !(int32(xtype) == EtEXP) { + goto __168 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = aDigits[(*Et_info)(unsafe.Pointer(infop)).Fcharset] + if !(exp < 0) { + goto __169 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('-') + exp = -exp + goto __170 +__169: + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('+') +__170: + ; + if !(exp >= 100) { + goto __171 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8(exp/100 + '0') // 100's digit + exp = exp % 100 +__171: + ; + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8(exp/10 + '0') // 10's digit + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8(exp%10 + '0') // 1's digit +__168: + ; + *(*uint8)(unsafe.Pointer(bufpt)) = uint8(0) + + // The converted number is in buf[] and zero terminated. Output it. + // Note that the number is in the usual order, not reversed as with + // integer conversions. + length = int32((int64(bufpt) - int64(zOut)) / 1) + bufpt = zOut + + // Special case: Add leading zeros if the flag_zeropad flag is + // set and we are not left justified + if !(flag_zeropad != 0 && !(flag_leftjustify != 0) && length < width) { + goto __172 + } + nPad = width - length + i = width +__173: + if !(i >= nPad) { + goto __175 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(i))) = *(*uint8)(unsafe.Pointer(bufpt + uintptr(i-nPad))) + goto __174 +__174: + i-- + goto __173 + goto __175 +__175: + ; + i = libc.Bool32(int32(prefix) != 0) +__176: + if !(libc.PostDecInt32(&nPad, 1) != 0) { + goto __177 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('0') + goto __176 +__177: + ; + length = width +__172: + ; + goto __58 +__66: + if !!(bArgList != 0) { + goto __178 + } + *(*int32)(unsafe.Pointer(libc.VaUintptr(&ap))) = int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar) +__178: + ; + length = libc.AssignInt32(&width, 0) + goto __58 +__67: + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8('%') + bufpt = bp + 8 /* &buf[0] */ + length = 1 + goto __58 +__68: + if !(bArgList != 0) { + goto __179 + } + bufpt = getTextArg(tls, pArgList) + length = 1 + if !(bufpt != 0) { + goto __181 + } + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))))) + if !(c&0xc0 == 0xc0) { + goto __183 + } +__184: + if !(length < 4 && int32(*(*uint8)(unsafe.Pointer(bufpt)))&0xc0 == 0x80) { + goto __185 + } + *(*uint8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&length, 1)))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) + goto __184 +__185: + ; +__183: + ; + goto __182 +__181: + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(0) +__182: + ; + goto __180 +__179: + ch = uint32(libc.VaUint32(&ap)) + if !(ch < uint32(0x00080)) { + goto __186 + } + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(ch & uint32(0xff)) + length = 1 + goto __187 +__186: + if !(ch < uint32(0x00800)) { + goto __188 + } + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(0xc0 + int32(U8(ch>>6&uint32(0x1f)))) + *(*uint8)(unsafe.Pointer(bp + 8 + 1)) = uint8(0x80 + int32(U8(ch&uint32(0x3f)))) + length = 2 + goto __189 +__188: + if !(ch < uint32(0x10000)) { + goto __190 + } + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(0xe0 + int32(U8(ch>>12&uint32(0x0f)))) + *(*uint8)(unsafe.Pointer(bp + 8 + 1)) = uint8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) + *(*uint8)(unsafe.Pointer(bp + 8 + 2)) = uint8(0x80 + int32(U8(ch&uint32(0x3f)))) + length = 3 + goto __191 +__190: + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8(0xf0 + int32(U8(ch>>18&uint32(0x07)))) + *(*uint8)(unsafe.Pointer(bp + 8 + 1)) = uint8(0x80 + int32(U8(ch>>12&uint32(0x3f)))) + *(*uint8)(unsafe.Pointer(bp + 8 + 2)) = uint8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) + *(*uint8)(unsafe.Pointer(bp + 8 + 3)) = uint8(0x80 + int32(U8(ch&uint32(0x3f)))) + length = 4 +__191: + ; +__189: + ; +__187: + ; +__180: + ; + if !(precision > 1) { + goto __192 + } + width = width - (precision - 1) + if !(width > 1 && !(flag_leftjustify != 0)) { + goto __193 + } + Xsqlite3_str_appendchar(tls, pAccum, width-1, uint8(' ')) + width = 0 +__193: + ; +__194: + if !(libc.PostDecInt32(&precision, 1) > 1) { + goto __195 + } + Xsqlite3_str_append(tls, pAccum, bp+8, length) + goto __194 +__195: + ; +__192: + ; + bufpt = bp + 8 /* &buf[0] */ + flag_altform2 = EtByte(1) + goto adjust_width_for_utf8 +__69: +__70: + if !(bArgList != 0) { + goto __196 + } + bufpt = getTextArg(tls, pArgList) + xtype = EtByte(EtSTRING) + goto __197 +__196: + bufpt = libc.VaUintptr(&ap) +__197: + ; + if !(bufpt == uintptr(0)) { + goto __198 + } + bufpt = ts + 1525 /* "" */ + goto __199 +__198: + if !(int32(xtype) == EtDYNSTRING) { + goto __200 + } + if !((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar == U32(0) && + (*Sqlite3_str)(unsafe.Pointer(pAccum)).FmxAlloc != 0 && + width == 0 && + precision < 0 && + int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError) == 0) { + goto __201 + } + // Special optimization for sqlite3_mprintf("%z..."): + // Extend an existing memory allocation rather than creating + // a new one. + + (*Sqlite3_str)(unsafe.Pointer(pAccum)).FzText = bufpt + (*Sqlite3_str)(unsafe.Pointer(pAccum)).FnAlloc = U32(Xsqlite3DbMallocSize(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, bufpt)) + (*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar = U32(0x7fffffff & int32(libc.Xstrlen(tls, bufpt))) + *(*U8)(unsafe.Pointer(pAccum + 29)) |= U8(SQLITE_PRINTF_MALLOCED) + length = 0 + goto __58 +__201: + ; + zExtra = bufpt +__200: + ; +__199: + ; + if !(precision >= 0) { + goto __202 + } + if !(flag_altform2 != 0) { + goto __204 + } + // Set length to the number of bytes needed in order to display + // precision characters + z = bufpt +__206: + if !(libc.PostDecInt32(&precision, 1) > 0 && *(*uint8)(unsafe.Pointer(z)) != 0) { + goto __207 + } + if !(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0) { + goto __208 + } +__209: + if !(int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80) { + goto __210 + } + z++ + goto __209 +__210: + ; +__208: + ; + + goto __206 +__207: + ; + length = int32((int64(z) - int64(bufpt)) / 1) + goto __205 +__204: + length = 0 +__211: + if !(length < precision && *(*uint8)(unsafe.Pointer(bufpt + uintptr(length))) != 0) { + goto __213 + } + goto __212 +__212: + length++ + goto __211 + goto __213 +__213: + ; +__205: + ; + goto __203 +__202: + length = 0x7fffffff & int32(libc.Xstrlen(tls, bufpt)) +__203: + ; +adjust_width_for_utf8: + if !(flag_altform2 != 0 && width > 0) { + goto __214 + } + // Adjust width to account for extra bytes in UTF-8 characters + ii = length - 1 +__215: + if !(ii >= 0) { + goto __216 + } + if !(int32(*(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostDecInt32(&ii, 1)))))&0xc0 == 0x80) { + goto __217 + } + width++ +__217: + ; + goto __215 +__216: + ; +__214: + ; + goto __58 +__71: // %q: Escape ' characters +__72: // %Q: Escape ' and enclose in '...' +__73: + q = func() uint8 { + if int32(xtype) == EtSQLESCAPE3 { + return uint8('"') + } + return uint8('\'') + }() + + if !(bArgList != 0) { + goto __218 + } + escarg = getTextArg(tls, pArgList) + goto __219 +__218: + escarg = libc.VaUintptr(&ap) +__219: + ; + isnull = libc.Bool32(escarg == uintptr(0)) + if !(isnull != 0) { + goto __220 + } + escarg = func() uintptr { + if int32(xtype) == EtSQLESCAPE2 { + return ts + 1526 + } + return ts + 1531 + }() +__220: + ; + // For %q, %Q, and %w, the precision is the number of bytes (or + // characters if the ! flags is present) to use from the input. + // Because of the extra quoting characters inserted, the number + // of output characters may be larger than the precision. + k = precision + i1 = libc.AssignInt32(&n1, 0) +__221: + if !(k != 0 && int32(libc.AssignUint8(&ch1, *(*uint8)(unsafe.Pointer(escarg + uintptr(i1))))) != 0) { + goto __223 + } + if !(int32(ch1) == int32(q)) { + goto __224 + } + n1++ +__224: + ; + if !(flag_altform2 != 0 && int32(ch1)&0xc0 == 0xc0) { + goto __225 + } +__226: + if !(int32(*(*uint8)(unsafe.Pointer(escarg + uintptr(i1+1))))&0xc0 == 0x80) { + goto __227 + } + i1++ + goto __226 +__227: + ; +__225: + ; + goto __222 +__222: + i1++ + k-- + goto __221 + goto __223 +__223: + ; + needQuote = libc.Bool32(!(isnull != 0) && int32(xtype) == EtSQLESCAPE2) + n1 = n1 + (i1 + 3) + if !(n1 > SQLITE_PRINT_BUF_SIZE) { + goto __228 + } + bufpt = libc.AssignUintptr(&zExtra, printfTempBuf(tls, pAccum, int64(n1))) + if !(bufpt == uintptr(0)) { + goto __230 + } + return +__230: + ; + goto __229 +__228: + bufpt = bp + 8 /* &buf[0] */ +__229: + ; + j = 0 + if !(needQuote != 0) { + goto __231 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q +__231: + ; + k = i1 + i1 = 0 +__232: + if !(i1 < k) { + goto __234 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = libc.AssignUint8(&ch1, *(*uint8)(unsafe.Pointer(escarg + uintptr(i1)))) + if !(int32(ch1) == int32(q)) { + goto __235 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = ch1 +__235: + ; + goto __233 +__233: + i1++ + goto __232 + goto __234 +__234: + ; + if !(needQuote != 0) { + goto __236 + } + *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q +__236: + ; + *(*uint8)(unsafe.Pointer(bufpt + uintptr(j))) = uint8(0) + length = j + goto adjust_width_for_utf8 + +__74: + if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_INTERNAL == 0) { + goto __237 + } + return +__237: + ; + if !(flag_alternateform != 0) { + goto __238 + } + // %#T means an Expr pointer that uses Expr.u.zToken + pExpr = libc.VaUintptr(&ap) + if !(pExpr != 0 && !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != U32(0))) { + goto __240 + } + Xsqlite3_str_appendall(tls, pAccum, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3RecordErrorOffsetOfExpr(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, pExpr) +__240: + ; + goto __239 +__238: + // %T means a Token pointer + pToken = libc.VaUintptr(&ap) + + if !(pToken != 0 && (*Token)(unsafe.Pointer(pToken)).Fn != 0) { + goto __241 + } + Xsqlite3_str_append(tls, pAccum, (*Token)(unsafe.Pointer(pToken)).Fz, int32((*Token)(unsafe.Pointer(pToken)).Fn)) + Xsqlite3RecordErrorByteOffset(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, (*Token)(unsafe.Pointer(pToken)).Fz) +__241: + ; +__239: + ; + length = libc.AssignInt32(&width, 0) + goto __58 + +__75: + if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_INTERNAL == 0) { + goto __242 + } + return +__242: + ; + pItem = libc.VaUintptr(&ap) + + if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 && !(flag_altform2 != 0)) { + goto __243 + } + Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + goto __244 +__243: + if !((*SrcItem)(unsafe.Pointer(pItem)).FzName != 0) { + goto __245 + } + if !((*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0) { + goto __247 + } + Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3_str_append(tls, pAccum, ts+1538, 1) +__247: + ; + Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) + goto __246 +__245: + if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) { + goto __248 + } + Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + goto __249 +__248: + if !((*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0) { + goto __250 + } + Xsqlite3_str_appendf(tls, pAccum, ts+1540, libc.VaList(bp, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselId)) +__250: + ; +__249: + ; +__246: + ; +__244: + ; + length = libc.AssignInt32(&width, 0) + goto __58 + +__76: + ; + return + +__58: + ; // End switch over the format type + // The text of the conversion is pointed to by "bufpt" and is + // "length" characters long. The field width is "width". Do + // the output. Both length and width are in bytes, not characters, + // at this point. If the "!" flag was present on string conversions + // indicating that width and precision should be expressed in characters, + // then the values have been translated prior to reaching this point. + width = width - length + if !(width > 0) { + goto __251 + } + if !!(flag_leftjustify != 0) { + goto __253 + } + Xsqlite3_str_appendchar(tls, pAccum, width, uint8(' ')) +__253: + ; + Xsqlite3_str_append(tls, pAccum, bufpt, length) + if !(flag_leftjustify != 0) { + goto __254 + } + Xsqlite3_str_appendchar(tls, pAccum, width, uint8(' ')) +__254: + ; + goto __252 +__251: + Xsqlite3_str_append(tls, pAccum, bufpt, length) +__252: + ; + + if !(zExtra != 0) { + goto __255 + } + Xsqlite3DbFree(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, zExtra) + zExtra = uintptr(0) +__255: + ; + goto __4 +__4: + fmt++ + goto __3 + goto __5 +__5: + // End for loop over the format string +} + +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1552)) /* sqlite3.c:29902:29 */ + +// End of function + +// The z string points to the first character of a token that is +// associated with an error. If db does not already have an error +// byte offset recorded, try to compute the error byte offset for +// z and set the error byte offset in db. +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ + var pParse uintptr + var zText uintptr + var zEnd uintptr + + if db == uintptr(0) { + return + } + if (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset != -2 { + return + } + pParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse + if pParse == uintptr(0) { + return + } + zText = (*Parse)(unsafe.Pointer(pParse)).FzTail + if zText == uintptr(0) { + return + } + zEnd = zText + uintptr(libc.Xstrlen(tls, zText)) + if Uptr(z) >= Uptr(zText) && Uptr(z) < Uptr(zEnd) { + (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = int32((int64(z) - int64(zText)) / 1) + } +} + +// If pExpr has a byte offset for the start of a token, record that as +// as the error offset. +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ + for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + } + if pExpr == uintptr(0) { + return + } + (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = *(*int32)(unsafe.Pointer(pExpr + 52)) +} + +// Enlarge the memory allocation on a StrAccum object so that it is +// able to accept at least N more bytes of text. +// +// Return the number of bytes of text that StrAccum is able to accept +// after the attempted enlargement. The value returned might be zero. +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ + var zNew uintptr + // Only called if really needed + if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { + + return 0 + } + if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc == U32(0) { + Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_TOOBIG)) + return int32((*StrAccum)(unsafe.Pointer(p)).FnAlloc - (*StrAccum)(unsafe.Pointer(p)).FnChar - U32(1)) + } else { + var zOld uintptr + if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { + zOld = (*StrAccum)(unsafe.Pointer(p)).FzText + } else { + zOld = uintptr(0) + } + var szNew I64 = I64((*StrAccum)(unsafe.Pointer(p)).FnChar) + szNew = szNew + (Sqlite3_int64(N) + int64(1)) + if szNew+I64((*StrAccum)(unsafe.Pointer(p)).FnChar) <= I64((*StrAccum)(unsafe.Pointer(p)).FmxAlloc) { + // Force exponential buffer size growth as long as it does not overflow, + // to avoid having to call this routine too often + szNew = szNew + I64((*StrAccum)(unsafe.Pointer(p)).FnChar) + } + if szNew > I64((*StrAccum)(unsafe.Pointer(p)).FmxAlloc) { + Xsqlite3_str_reset(tls, p) + Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_TOOBIG)) + return 0 + } else { + (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(int32(szNew)) + } + if (*StrAccum)(unsafe.Pointer(p)).Fdb != 0 { + zNew = Xsqlite3DbRealloc(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, zOld, uint64((*StrAccum)(unsafe.Pointer(p)).FnAlloc)) + } else { + zNew = Xsqlite3Realloc(tls, zOld, uint64((*StrAccum)(unsafe.Pointer(p)).FnAlloc)) + } + if zNew != 0 { + + if !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) && (*StrAccum)(unsafe.Pointer(p)).FnChar > U32(0) { + libc.Xmemcpy(tls, zNew, (*StrAccum)(unsafe.Pointer(p)).FzText, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar)) + } + (*StrAccum)(unsafe.Pointer(p)).FzText = zNew + (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(Xsqlite3DbMallocSize(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, zNew)) + *(*U8)(unsafe.Pointer(p + 29)) |= U8(SQLITE_PRINTF_MALLOCED) + } else { + Xsqlite3_str_reset(tls, p) + Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_NOMEM)) + return 0 + } + } + return N +} + +// Append N copies of character c to the given string buffer. +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:30441:17: */ + + if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { + return + } + for libc.PostDecInt32(&N, 1) > 0 { + *(*uint8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr(libc.PostIncUint32(&(*Sqlite3_str)(unsafe.Pointer(p)).FnChar, 1)))) = c + } +} + +// The StrAccum "p" is not large enough to accept N new bytes of z[]. +// So enlarge if first, then do the append. +// +// This is a helper routine to sqlite3_str_append() that does special-case +// work (enlarging the buffer) using tail recursion, so that the +// sqlite3_str_append() routine can use fast calling semantics. +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ + N = Xsqlite3StrAccumEnlarge(tls, p, N) + if N > 0 { + libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) + *(*U32)(unsafe.Pointer(p + 24)) += U32(N) + } +} + +// Append N bytes of text from z to the StrAccum object. Increase the +// size of the memory allocation for StrAccum if necessary. +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ + + if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { + enlargeAndAppend(tls, p, z, N) + } else if N != 0 { + + *(*U32)(unsafe.Pointer(p + 24)) += U32(N) + libc.Xmemcpy(tls, (*Sqlite3_str)(unsafe.Pointer(p)).FzText+uintptr((*Sqlite3_str)(unsafe.Pointer(p)).FnChar-U32(N)), z, uint64(N)) + } +} + +// Append the complete text of zero-terminated string z[] to the p string. +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ + Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) +} + +// Finish off a string by making sure it is zero-terminated. +// Return a pointer to the resulting string. Return a NULL +// pointer if any kind of error was encountered. +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ + var zText uintptr + + zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) + if zText != 0 { + libc.Xmemcpy(tls, zText, (*StrAccum)(unsafe.Pointer(p)).FzText, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) + *(*U8)(unsafe.Pointer(p + 29)) |= U8(SQLITE_PRINTF_MALLOCED) + } else { + Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_NOMEM)) + } + (*StrAccum)(unsafe.Pointer(p)).FzText = zText + return zText +} + +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ + if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { + *(*uint8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = uint8(0) + if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { + return strAccumFinishRealloc(tls, p) + } + } + return (*StrAccum)(unsafe.Pointer(p)).FzText +} + +// Use the content of the StrAccum passed as the second argument +// as the result of an SQL function. +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ + if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { + Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) + Xsqlite3_str_reset(tls, p) + } else if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { + Xsqlite3_result_text(tls, pCtx, (*StrAccum)(unsafe.Pointer(p)).FzText, int32((*StrAccum)(unsafe.Pointer(p)).FnChar), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) + } else { + Xsqlite3_result_text(tls, pCtx, ts+1525, 0, uintptr(0)) + Xsqlite3_str_reset(tls, p) + } +} + +// This singleton is an sqlite3_str object that is returned if +// sqlite3_malloc() fails to provide space for a real one. This +// sqlite3_str object accepts no new text and always returns +// an SQLITE_NOMEM error. +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ + +// Finalize a string created using sqlite3_str_new(). +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ + var z uintptr + if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { + z = Xsqlite3StrAccumFinish(tls, p) + Xsqlite3_free(tls, p) + } else { + z = uintptr(0) + } + return z +} + +// Return any error code associated with p +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ + if p != 0 { + return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) + } + return SQLITE_NOMEM +} + +// Return the current length of p in bytes +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ + if p != 0 { + return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) + } + return 0 +} + +// Return the current value for p +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ + if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { + return uintptr(0) + } + *(*uint8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr((*Sqlite3_str)(unsafe.Pointer(p)).FnChar))) = uint8(0) + return (*Sqlite3_str)(unsafe.Pointer(p)).FzText +} + +// Reset an StrAccum string. Reclaim all malloced memory. +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ + if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { + Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) + *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) + } + (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(0) + (*StrAccum)(unsafe.Pointer(p)).FnChar = U32(0) + (*StrAccum)(unsafe.Pointer(p)).FzText = uintptr(0) +} + +// Initialize a string accumulator. +// +// p: The accumulator to be initialized. +// db: Pointer to a database connection. May be NULL. Lookaside +// memory is used if not NULL. db->mallocFailed is set appropriately +// when not NULL. +// zBase: An initial buffer. May be NULL in which case the initial buffer +// is malloced. +// n: Size of zBase in bytes. If total space requirements never exceed +// n then no memory allocations ever occur. +// mx: Maximum number of bytes to accumulate. If mx==0 then no memory +// allocations will ever occur. +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ + (*StrAccum)(unsafe.Pointer(p)).FzText = zBase + (*StrAccum)(unsafe.Pointer(p)).Fdb = db + (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) + (*StrAccum)(unsafe.Pointer(p)).FmxAlloc = U32(mx) + (*StrAccum)(unsafe.Pointer(p)).FnChar = U32(0) + (*StrAccum)(unsafe.Pointer(p)).FaccError = U8(0) + (*StrAccum)(unsafe.Pointer(p)).FprintfFlags = U8(0) +} + +// Allocate and initialize a new dynamic string object +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ + var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) + if p != 0 { + Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, + func() int32 { + if db != 0 { + return *(*int32)(unsafe.Pointer(db + 136)) + } + return SQLITE_MAX_LENGTH + }()) + } else { + p = uintptr(unsafe.Pointer(&sqlite3OomStr)) + } + return p +} + +// Print into memory obtained from sqliteMalloc(). Use the internal +// %-conversion extensions. +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ + bp := tls.Alloc(102) + defer tls.Free(102) + + var z uintptr + // var zBase [70]uint8 at bp+32, 70 + + // var acc StrAccum at bp, 32 + + Xsqlite3StrAccumInit(tls, bp, db, bp+32, int32(unsafe.Sizeof([70]uint8{})), + *(*int32)(unsafe.Pointer(db + 136))) + (*StrAccum)(unsafe.Pointer(bp /* &acc */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) + z = Xsqlite3StrAccumFinish(tls, bp) + if int32((*StrAccum)(unsafe.Pointer(bp)).FaccError) == SQLITE_NOMEM { + Xsqlite3OomFault(tls, db) + } + return z +} + +// Print into memory obtained from sqliteMalloc(). Use the internal +// %-conversion extensions. +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ + var ap Va_list + _ = ap + var z uintptr + ap = va + z = Xsqlite3VMPrintf(tls, db, zFormat, ap) + _ = ap + return z +} + +// Print into memory obtained from sqlite3_malloc(). Omit the internal +// %-conversion extensions. +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ + bp := tls.Alloc(102) + defer tls.Free(102) + + var z uintptr + // var zBase [70]uint8 at bp+32, 70 + + // var acc StrAccum at bp, 32 + + if Xsqlite3_initialize(tls) != 0 { + return uintptr(0) + } + Xsqlite3StrAccumInit(tls, bp, uintptr(0), bp+32, int32(unsafe.Sizeof([70]uint8{})), SQLITE_MAX_LENGTH) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) + z = Xsqlite3StrAccumFinish(tls, bp) + return z +} + +// Print into memory obtained from sqlite3_malloc()(). Omit the internal +// %-conversion extensions. +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ + var ap Va_list + _ = ap + var z uintptr + if Xsqlite3_initialize(tls) != 0 { + return uintptr(0) + } + ap = va + z = Xsqlite3_vmprintf(tls, zFormat, ap) + _ = ap + return z +} + +// sqlite3_snprintf() works like snprintf() except that it ignores the +// current locale settings. This is important for SQLite because we +// are not able to use a "," as the decimal point in place of "." as +// specified by some locales. +// +// Oops: The first two arguments of sqlite3_snprintf() are backwards +// from the snprintf() standard. Unfortunately, it is too late to change +// this without breaking compatibility, so we just have to live with the +// mistake. +// +// sqlite3_vsnprintf() is the varargs version. +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + // var acc StrAccum at bp, 32 + + if n <= 0 { + return zBuf + } + Xsqlite3StrAccumInit(tls, bp, uintptr(0), zBuf, n, 0) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) + *(*uint8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = uint8(0) + return zBuf +} + +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ + var z uintptr + var ap Va_list + _ = ap + ap = va + z = Xsqlite3_vsnprintf(tls, n, zBuf, zFormat, ap) + _ = ap + return z +} + +// This is the routine that actually formats the sqlite3_log() message. +// We house it in a separate routine from sqlite3_log() to avoid using +// stack space on small-stack systems when logging is disabled. +// +// sqlite3_log() must render into a static buffer. It cannot dynamically +// allocate memory because it might be called while the memory allocator +// mutex is held. +// +// sqlite3_str_vappendf() might ask for *temporary* memory allocations for +// certain format characters (%q) or for very large precisions or widths. +// Care must be taken that any sqlite3_log() calls that occur while the +// memory mutex is held do not use these mechanisms. +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ + bp := tls.Alloc(242) + defer tls.Free(242) + + // var acc StrAccum at bp, 32 + // String accumulator + // var zMsg [210]uint8 at bp+32, 210 + // Complete log message + + Xsqlite3StrAccumInit(tls, bp, uintptr(0), bp+32, int32(unsafe.Sizeof([210]uint8{})), 0) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.FxLog})).f(tls, Xsqlite3Config.FpLogArg, iErrCode, + Xsqlite3StrAccumFinish(tls, bp /* &acc */)) +} + +// Format and write a message to the log if logging is enabled. +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ + var ap Va_list + _ = ap // Vararg list + if Xsqlite3Config.FxLog != 0 { + ap = va + renderLogMsg(tls, iErrCode, zFormat, ap) + _ = ap + } +} + +// variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument +// can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ + var ap Va_list + _ = ap + ap = va + Xsqlite3_str_vappendf(tls, p, zFormat, ap) + _ = ap +} + +//************* End of printf.c ********************************************* +//************* Begin file treeview.c *************************************** +// 2015-06-08 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains C code to implement the TreeView debugging routines. +// These routines print a parse tree to standard output for debugging and +// analysis. +// +// The interfaces in this file is only available when compiling +// with SQLITE_DEBUG. +// #include "sqliteInt.h" + +//************* End of treeview.c ******************************************* +//************* Begin file random.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code to implement a pseudo-random number +// generator (PRNG) for SQLite. +// +// Random numbers are used by some of the database backends in order +// to generate random integer keys for tables or random filenames. +// #include "sqliteInt.h" + +// All threads share a single random number generator. +// This structure is the current state of the generator. +type sqlite3PrngType = struct { + FisInit uint8 + Fi uint8 + Fj uint8 + Fs [256]uint8 +} /* sqlite3.c:31654:19 */ + +//************* End of printf.c ********************************************* +//************* Begin file treeview.c *************************************** +// 2015-06-08 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains C code to implement the TreeView debugging routines. +// These routines print a parse tree to standard output for debugging and +// analysis. +// +// The interfaces in this file is only available when compiling +// with SQLITE_DEBUG. +// #include "sqliteInt.h" + +//************* End of treeview.c ******************************************* +//************* Begin file random.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code to implement a pseudo-random number +// generator (PRNG) for SQLite. +// +// Random numbers are used by some of the database backends in order +// to generate random integer keys for tables or random filenames. +// #include "sqliteInt.h" + +// All threads share a single random number generator. +// This structure is the current state of the generator. +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ + +// Return N random bytes. +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ + bp := tls.Alloc(256) + defer tls.Free(256) + + var t uint8 + var zBuf uintptr = pBuf + + // The "wsdPrng" macro will resolve to the pseudo-random number generator + // state vector. If writable static data is unsupported on the target, + // we have to locate the state vector at run-time. In the more common + // case where writable static data is supported, wsdPrng can refer directly + // to the "sqlite3Prng" state vector declared above. + + var mutex uintptr + + if Xsqlite3_initialize(tls) != 0 { + return + } + + mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_PRNG) + + Xsqlite3_mutex_enter(tls, mutex) + if N <= 0 || pBuf == uintptr(0) { + sqlite3Prng.FisInit = uint8(0) + Xsqlite3_mutex_leave(tls, mutex) + return + } + + // Initialize the state of the random number generator once, + // the first time this routine is called. The seed value does + // not need to contain a lot of randomness since we are not + // trying to do secure encryption or anything like that... + // + // Nothing in this file or anywhere else in SQLite does any kind of + // encryption. The RC4 algorithm is being used as a PRNG (pseudo-random + // number generator) not as an encryption device. + if !(int32(sqlite3Prng.FisInit) != 0) { + var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) + var i int32 + // var k [256]uint8 at bp, 256 + + sqlite3Prng.Fj = uint8(0) + sqlite3Prng.Fi = uint8(0) + if pVfs == uintptr(0) { + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]uint8{}))) + } else { + Xsqlite3OsRandomness(tls, pVfs, 256, bp) + } + for i = 0; i < 256; i++ { + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) + } + for i = 0; i < 256; i++ { + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 2)) += uint8(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i)))) + int32(*(*uint8)(unsafe.Pointer(bp + uintptr(i))))) + t = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = t + } + sqlite3Prng.FisInit = uint8(1) + } + + for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&N, 1) != 0 { + sqlite3Prng.Fi++ + t = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fi))) + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 2)) += uint8(int32(t)) + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fi))) = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) = t + t = uint8(int32(t) + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fi))))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zBuf, 1))) = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(t))) + } + Xsqlite3_mutex_leave(tls, mutex) +} + +// For testing purposes, we sometimes want to preserve the state of +// PRNG and restore the PRNG to its saved state at a later time, or +// to reset the PRNG to its initial state. These routines accomplish +// those tasks. +// +// The sqlite3_test_control() interface calls these routines to +// control the PRNG. +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ + +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ + libc.Xmemcpy(tls, + uintptr(unsafe.Pointer(&sqlite3SavedPrng)), + uintptr(unsafe.Pointer(&sqlite3Prng)), + uint64(unsafe.Sizeof(sqlite3Prng))) +} + +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ + libc.Xmemcpy(tls, + uintptr(unsafe.Pointer(&sqlite3Prng)), + uintptr(unsafe.Pointer(&sqlite3SavedPrng)), + uint64(unsafe.Sizeof(sqlite3Prng))) +} + +// Create a new thread +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ + var p uintptr + + *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) + p = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(SQLiteThread{}))) + if p == uintptr(0) { + return SQLITE_NOMEM + } + if int32(p)/17&1 != 0 { + (*SQLiteThread)(unsafe.Pointer(p)).FxTask = xTask + (*SQLiteThread)(unsafe.Pointer(p)).FpIn = pIn + } else { + (*SQLiteThread)(unsafe.Pointer(p)).FxTask = uintptr(0) + (*SQLiteThread)(unsafe.Pointer(p)).FpResult = (*struct { + f func(*libc.TLS, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{xTask})).f(tls, pIn) + } + *(*uintptr)(unsafe.Pointer(ppThread)) = p + return SQLITE_OK +} + +// Get the results of the thread +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ + + if p == uintptr(0) { + return SQLITE_NOMEM + } + if (*SQLiteThread)(unsafe.Pointer(p)).FxTask != 0 { + *(*uintptr)(unsafe.Pointer(ppOut)) = (*struct { + f func(*libc.TLS, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*SQLiteThread)(unsafe.Pointer(p)).FxTask})).f(tls, (*SQLiteThread)(unsafe.Pointer(p)).FpIn) + } else { + *(*uintptr)(unsafe.Pointer(ppOut)) = (*SQLiteThread)(unsafe.Pointer(p)).FpResult + } + Xsqlite3_free(tls, p) + + return SQLITE_OK +} + +//***************************** End Single-Threaded ************************ + +//************* End of threads.c ******************************************** +//************* Begin file utf.c ******************************************** +// 2004 April 13 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains routines used to translate between UTF-8, +// UTF-16, UTF-16BE, and UTF-16LE. +// +// Notes on UTF-8: +// +// Byte-0 Byte-1 Byte-2 Byte-3 Value +// 0xxxxxxx 00000000 00000000 0xxxxxxx +// 110yyyyy 10xxxxxx 00000000 00000yyy yyxxxxxx +// 1110zzzz 10yyyyyy 10xxxxxx 00000000 zzzzyyyy yyxxxxxx +// 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx 000uuuuu zzzzyyyy yyxxxxxx +// +// +// Notes on UTF-16: (with wwww+1==uuuuu) +// +// Word-0 Word-1 Value +// 110110ww wwzzzzyy 110111yy yyxxxxxx 000uuuuu zzzzyyyy yyxxxxxx +// zzzzyyyy yyxxxxxx 00000000 zzzzyyyy yyxxxxxx +// +// +// BOM or Byte Order Mark: +// 0xff 0xfe little-endian utf-16 follows +// 0xfe 0xff big-endian utf-16 follows +// +// #include "sqliteInt.h" +// #include +// #include "vdbeInt.h" + +// This lookup table is used to help decode the first byte of +// a multi-byte UTF8 character. +var sqlite3Utf8Trans1 = [64]uint8{ + uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), + uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), + uint8(0x10), uint8(0x11), uint8(0x12), uint8(0x13), uint8(0x14), uint8(0x15), uint8(0x16), uint8(0x17), + uint8(0x18), uint8(0x19), uint8(0x1a), uint8(0x1b), uint8(0x1c), uint8(0x1d), uint8(0x1e), uint8(0x1f), + uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), + uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), + uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), + uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), +} /* sqlite3.c:32101:28 */ + +// Translate a single UTF-8 character. Return the unicode value. +// +// During translation, assume that the byte that zTerm points +// is a 0x00. +// +// Write a pointer to the next unread byte back into *pzNext. +// +// Notes On Invalid UTF-8: +// +// * This routine never allows a 7-bit character (0x00 through 0x7f) to +// be encoded as a multi-byte character. Any multi-byte character that +// attempts to encode a value between 0x00 and 0x7f is rendered as 0xfffd. +// +// * This routine never allows a UTF16 surrogate value to be encoded. +// If a multi-byte character attempts to encode a value between +// 0xd800 and 0xe000 then it is rendered as 0xfffd. +// +// * Bytes in the range of 0x80 through 0xbf which occur as the first +// byte of a character are interpreted as single-byte characters +// and rendered as themselves even though they are technically +// invalid characters. +// +// * This routine accepts over-length UTF8 encodings +// for unicode values 0x80 and greater. It does not change over-length +// encodings to 0xfffd as some systems recommend. +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ + var c uint32 + + // Same as READ_UTF8() above but without the zTerm parameter. + // For this routine, we assume the UTF8 string is always zero-terminated. + c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(pz)), 1)))) + if c >= uint32(0xc0) { + c = uint32(sqlite3Utf8Trans1[c-uint32(0xc0)]) + for int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pz)))))&0xc0 == 0x80 { + c = c<<6 + uint32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(pz)), 1))))) + } + if c < uint32(0x80) || + c&0xFFFFF800 == uint32(0xD800) || + c&0xFFFFFFFE == uint32(0xFFFE) { + c = uint32(0xFFFD) + } + } + return c +} + +// If the TRANSLATE_TRACE macro is defined, the value of each Mem is +// printed on stderr on the way into and out of sqlite3VdbeMemTranslate(). +// #define TRANSLATE_TRACE 1 + +// This routine transforms the internal text encoding used by pMem to +// desiredEnc. It is an error if the string is already of the desired +// encoding, or if *pMem does not contain a string value. +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ + var len Sqlite3_int64 // Maximum length of output string in bytes + var zOut uintptr // Output buffer + var zIn uintptr // Input iterator + var zTerm uintptr // End of input + var z uintptr // Output iterator + var c uint32 + var temp U8 + var rc int32 + var c2 int32 + var c21 int32 + + // If the translation is between UTF-16 little and big endian, then + // all that is required is to swap the byte order. This case is handled + // differently from the others. + if !(int32((*Mem)(unsafe.Pointer(pMem)).Fenc) != SQLITE_UTF8 && int32(desiredEnc) != SQLITE_UTF8) { + goto __1 + } + rc = Xsqlite3VdbeMemMakeWriteable(tls, pMem) + if !(rc != SQLITE_OK) { + goto __2 + } + + return SQLITE_NOMEM +__2: + ; + zIn = (*Mem)(unsafe.Pointer(pMem)).Fz + zTerm = zIn + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn&libc.CplInt32(1)) +__3: + if !(zIn < zTerm) { + goto __4 + } + temp = *(*uint8)(unsafe.Pointer(zIn)) + *(*uint8)(unsafe.Pointer(zIn)) = *(*uint8)(unsafe.Pointer(zIn + uintptr(1))) + zIn++ + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))) = temp + goto __3 +__4: + ; + (*Mem)(unsafe.Pointer(pMem)).Fenc = desiredEnc + goto translate_out +__1: + ; + + // Set len to the maximum number of bytes required in the output buffer. + if !(int32(desiredEnc) == SQLITE_UTF8) { + goto __5 + } + // When converting from UTF-16, the maximum growth results from + // translating a 2-byte character to a 4-byte UTF-8 character. + // A single byte is required for the output string + // nul-terminator. + *(*int32)(unsafe.Pointer(pMem + 12)) &= libc.CplInt32(1) + len = int64(2)*Sqlite3_int64((*Mem)(unsafe.Pointer(pMem)).Fn) + int64(1) + goto __6 +__5: + // When converting from UTF-8 to UTF-16 the maximum growth is caused + // when a 1-byte UTF-8 character is translated into a 2-byte UTF-16 + // character. Two bytes are required in the output buffer for the + // nul-terminator. + len = int64(2)*Sqlite3_int64((*Mem)(unsafe.Pointer(pMem)).Fn) + int64(2) +__6: + ; + + // Set zIn to point at the start of the input buffer and zTerm to point 1 + // byte past the end. + // + // Variable zOut is set to point at the output buffer, space obtained + // from sqlite3_malloc(). + zIn = (*Mem)(unsafe.Pointer(pMem)).Fz + zTerm = zIn + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn) + zOut = Xsqlite3DbMallocRaw(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, uint64(len)) + if !!(zOut != 0) { + goto __7 + } + return SQLITE_NOMEM +__7: + ; + z = zOut + + if !(int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == SQLITE_UTF8) { + goto __8 + } + if !(int32(desiredEnc) == SQLITE_UTF16LE) { + goto __10 + } + // UTF-8 -> UTF-16 Little-endian +__12: + if !(zIn < zTerm) { + goto __13 + } + c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + if !(c >= uint32(0xc0)) { + goto __14 + } + c = uint32(sqlite3Utf8Trans1[c-uint32(0xc0)]) +__15: + if !(zIn != zTerm && int32(*(*uint8)(unsafe.Pointer(zIn)))&0xc0 == 0x80) { + goto __16 + } + c = c<<6 + uint32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))) + goto __15 +__16: + ; + if !(c < uint32(0x80) || c&0xFFFFF800 == uint32(0xD800) || c&0xFFFFFFFE == uint32(0xFFFE)) { + goto __17 + } + c = uint32(0xFFFD) +__17: + ; +__14: + ; + + if !(c <= uint32(0xFFFF)) { + goto __18 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c >> 8 & uint32(0x00FF)) + goto __19 +__18: + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c>>10&uint32(0x003F) + (c-uint32(0x10000))>>10&uint32(0x00C0)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00D8) + (c-uint32(0x10000))>>18&uint32(0x03)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00DC) + c>>8&uint32(0x03)) +__19: + ; + + goto __12 +__13: + ; + goto __11 +__10: + ; + // UTF-8 -> UTF-16 Big-endian +__20: + if !(zIn < zTerm) { + goto __21 + } + c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + if !(c >= uint32(0xc0)) { + goto __22 + } + c = uint32(sqlite3Utf8Trans1[c-uint32(0xc0)]) +__23: + if !(zIn != zTerm && int32(*(*uint8)(unsafe.Pointer(zIn)))&0xc0 == 0x80) { + goto __24 + } + c = c<<6 + uint32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))) + goto __23 +__24: + ; + if !(c < uint32(0x80) || c&0xFFFFF800 == uint32(0xD800) || c&0xFFFFFFFE == uint32(0xFFFE)) { + goto __25 + } + c = uint32(0xFFFD) +__25: + ; +__22: + ; + + if !(c <= uint32(0xFFFF)) { + goto __26 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c >> 8 & uint32(0x00FF)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) + goto __27 +__26: + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00D8) + (c-uint32(0x10000))>>18&uint32(0x03)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c>>10&uint32(0x003F) + (c-uint32(0x10000))>>10&uint32(0x00C0)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00DC) + c>>8&uint32(0x03)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) +__27: + ; + + goto __20 +__21: + ; +__11: + ; + (*Mem)(unsafe.Pointer(pMem)).Fn = int32((int64(z) - int64(zOut)) / 1) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0) + goto __9 +__8: + ; + if !(int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == SQLITE_UTF16LE) { + goto __28 + } + // UTF-16 Little-endian -> UTF-8 +__30: + if !(zIn < zTerm) { + goto __31 + } + c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + c = c + uint32(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))<<8) + if !(c >= uint32(0xd800) && c < uint32(0xe000)) { + goto __32 + } + if !(zIn < zTerm) { + goto __33 + } + c2 = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + c2 = c2 + int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))<<8 + c = uint32(c2&0x03FF) + c&uint32(0x003F)<<10 + (c&uint32(0x03C0)+uint32(0x0040))<<10 +__33: + ; +__32: + ; + if !(c < uint32(0x00080)) { + goto __34 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0xFF)) + goto __35 +__34: + if !(c < uint32(0x00800)) { + goto __36 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xC0 + int32(U8(c>>6&uint32(0x1F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) + goto __37 +__36: + if !(c < uint32(0x10000)) { + goto __38 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xE0 + int32(U8(c>>12&uint32(0x0F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) + goto __39 +__38: + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xF0 + int32(U8(c>>18&uint32(0x07)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>12&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) +__39: + ; +__37: + ; +__35: + ; + + goto __30 +__31: + ; + goto __29 +__28: + // UTF-16 Big-endian -> UTF-8 +__40: + if !(zIn < zTerm) { + goto __41 + } + c = uint32(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) << 8) + c = c + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + if !(c >= uint32(0xd800) && c < uint32(0xe000)) { + goto __42 + } + if !(zIn < zTerm) { + goto __43 + } + c21 = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) << 8 + c21 = c21 + int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + c = uint32(c21&0x03FF) + c&uint32(0x003F)<<10 + (c&uint32(0x03C0)+uint32(0x0040))<<10 +__43: + ; +__42: + ; + if !(c < uint32(0x00080)) { + goto __44 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0xFF)) + goto __45 +__44: + if !(c < uint32(0x00800)) { + goto __46 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xC0 + int32(U8(c>>6&uint32(0x1F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) + goto __47 +__46: + if !(c < uint32(0x10000)) { + goto __48 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xE0 + int32(U8(c>>12&uint32(0x0F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) + goto __49 +__48: + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xF0 + int32(U8(c>>18&uint32(0x07)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>12&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) +__49: + ; +__47: + ; +__45: + ; + + goto __40 +__41: + ; +__29: + ; + (*Mem)(unsafe.Pointer(pMem)).Fn = int32((int64(z) - int64(zOut)) / 1) +__9: + ; + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + + c = uint32(MEM_Str | MEM_Term | int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_AffMask|MEM_Subtype)) + Xsqlite3VdbeMemRelease(tls, pMem) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(c) + (*Mem)(unsafe.Pointer(pMem)).Fenc = desiredEnc + (*Mem)(unsafe.Pointer(pMem)).Fz = zOut + (*Mem)(unsafe.Pointer(pMem)).FzMalloc = (*Mem)(unsafe.Pointer(pMem)).Fz + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = Xsqlite3DbMallocSize(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).Fz) + +translate_out: + return SQLITE_OK +} + +// This routine checks for a byte-order mark at the beginning of the +// UTF-16 string stored in *pMem. If one is present, it is removed and +// the encoding of the Mem adjusted. This routine does not do any +// byte-swapping, it just sets Mem.enc appropriately. +// +// The allocation (static, dynamic etc.) and encoding of the Mem may be +// changed by this function. +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ + var rc int32 = SQLITE_OK + var bom U8 = U8(0) + + if (*Mem)(unsafe.Pointer(pMem)).Fn > 1 { + var b1 U8 = *(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz)) + var b2 U8 = *(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(1))) + if int32(b1) == 0xFE && int32(b2) == 0xFF { + bom = U8(SQLITE_UTF16BE) + } + if int32(b1) == 0xFF && int32(b2) == 0xFE { + bom = U8(SQLITE_UTF16LE) + } + } + + if bom != 0 { + rc = Xsqlite3VdbeMemMakeWriteable(tls, pMem) + if rc == SQLITE_OK { + *(*int32)(unsafe.Pointer(pMem + 12)) -= 2 + libc.Xmemmove(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, (*Mem)(unsafe.Pointer(pMem)).Fz+2, uint64((*Mem)(unsafe.Pointer(pMem)).Fn)) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = uint8(0) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn+1))) = uint8(0) + *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(MEM_Term) + (*Mem)(unsafe.Pointer(pMem)).Fenc = bom + } + } + return rc +} + +// pZ is a UTF-8 encoded unicode string. If nByte is less than zero, +// return the number of unicode characters in pZ up to (but not including) +// the first 0x00 byte. If nByte is not less than zero, return the +// number of unicode characters in the first nByte of pZ (or up to +// the first 0x00, whichever comes first). +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ + var r int32 = 0 + var z uintptr = zIn + var zTerm uintptr + if nByte >= 0 { + zTerm = z + uintptr(nByte) + } else { + zTerm = libc.UintptrFromInt32(-1) + } + + for int32(*(*U8)(unsafe.Pointer(z))) != 0 && z < zTerm { + { + if int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { + for int32(*(*U8)(unsafe.Pointer(z)))&0xc0 == 0x80 { + z++ + } + } + } + + r++ + } + return r +} + +// This test function is not currently used by the automated test-suite. +// Hence it is only available in debug builds. + +// Convert a UTF-16 string in the native encoding into a UTF-8 string. +// Memory to hold the UTF-8 string is obtained from sqlite3_malloc and must +// be freed by the calling function. +// +// NULL is returned if there is an allocation error. +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + // var m Mem at bp, 56 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(bp /* &m */)).Fdb = db + Xsqlite3VdbeMemSetStr(tls, bp, z, int64(nByte), enc, uintptr(0)) + Xsqlite3VdbeChangeEncoding(tls, bp, SQLITE_UTF8) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3VdbeMemRelease(tls, bp) + (*Mem)(unsafe.Pointer(bp /* &m */)).Fz = uintptr(0) + } + + return (*Mem)(unsafe.Pointer(bp /* &m */)).Fz +} + +// zIn is a UTF-16 encoded unicode string at least nChar characters long. +// Return the number of bytes in the first nChar unicode characters +// in pZ. nChar must be non-negative. +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ + var c int32 + var z uintptr = zIn + var n int32 = 0 + + if func() int32 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return SQLITE_UTF16BE + } + return SQLITE_UTF16LE + }() == SQLITE_UTF16LE { + z++ + } + for n < nChar { + c = int32(*(*uint8)(unsafe.Pointer(z))) + z += uintptr(2) + if c >= 0xd8 && c < 0xdc && int32(*(*uint8)(unsafe.Pointer(z))) >= 0xdc && int32(*(*uint8)(unsafe.Pointer(z))) < 0xe0 { + z += uintptr(2) + } + n++ + } + return int32((int64(z)-int64(zIn))/1) - + libc.Bool32(func() int32 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return SQLITE_UTF16BE + } + return SQLITE_UTF16LE + }() == SQLITE_UTF16LE) +} + +//************* End of utf.c ************************************************ +//************* Begin file util.c ******************************************* +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// Utility functions used throughout sqlite. +// +// This file contains functions for allocating memory, comparing +// strings, and stuff like that. +// +// #include "sqliteInt.h" +// #include +// Declarations for math functions. +// Copyright (C) 1991-2021 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 +// . + +// ISO C99 Standard: 7.12 Mathematics + +// Handle feature test macros at the start of a header. +// Copyright (C) 2016-2021 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 +// . + +// This header is internal to glibc and should not be included outside +// of glibc headers. Headers including it must define +// __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header +// cannot have multiple include guards because ISO C feature test +// macros depend on the definition of the macro when an affected +// header is included, not when the first system header is +// included. + +// Copyright (C) 1991-2021 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 +// . + +// ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ +// macro. + +// ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ +// macro. Most but not all symbols enabled by that macro in TS +// 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in +// Annex F still require a new feature test macro +// __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define +// __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS +// 18661-1 are not included in C2X (and thus should depend on +// __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are +// enabled). +// +// __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS +// 18661-1 not included in C2X. +// +// __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS +// 18661-1 that are also included in C2X (with no feature test macro +// required in C2X). +// +// __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1 +// that are included in C2X but conditional on +// __STDC_WANT_IEC_60559_EXT__. (There are currently no features +// conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS +// 18661-1.) + +// ISO/IEC TS 18661-4:2015 defines the +// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction +// functions, the symbols from this TS are enabled unconditionally in +// C2X. + +// ISO/IEC TS 18661-3:2015 defines the +// __STDC_WANT_IEC_60559_TYPES_EXT__ macro. + +// Get definitions of __intmax_t and __uintmax_t. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get machine-dependent vector math functions declarations. +// Platform-specific SIMD declarations of math functions. +// Copyright (C) 2014-2021 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 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 +// . + +// Get default empty definitions required for __MATHCALL_VEC unfolding. +// Plaform-specific analogue of this header should redefine them with specific +// SIMD declarations. +// Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h. +// Copyright (C) 2014-2021 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 +// . + +// Needed definitions could be generated with: +// for func in $(grep __MATHCALL_VEC math/bits/mathcalls.h | sed -r "s|__MATHCALL_VEC.?\(||; s|,.*||"); do +// echo "#define __DECL_SIMD_${func}"; +// echo "#define __DECL_SIMD_${func}f"; +// echo "#define __DECL_SIMD_${func}l"; +// done +// + +// Gather machine dependent type support. +// Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +// Copyright (C) 2017-2021 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 +// . + +// Value returned on overflow. With IEEE 754 floating point, this is +// +Infinity, otherwise the largest representable positive value. + +// IEEE positive infinity. + +// IEEE Not A Number. + +// Signaling NaN macros, if supported. + +// Get __GLIBC_FLT_EVAL_METHOD. +// Define __GLIBC_FLT_EVAL_METHOD. +// Copyright (C) 2016-2021 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 +// . + +// __GLIBC_FLT_EVAL_METHOD is the value of FLT_EVAL_METHOD used to +// determine the evaluation method typedefs such as float_t and +// double_t. It must be a value from C11 or TS 18661-3:2015, and not +// -1. + +// In the default version of this header, follow __FLT_EVAL_METHOD__. +// -1 is mapped to 2 (considering evaluation as long double to be a +// conservatively safe assumption), and if __FLT_EVAL_METHOD__ is not +// defined then assume there is no excess precision and use the value +// 0. + +// Define the following typedefs. +// +// float_t floating-point type at least as wide as `float' used +// to evaluate `float' expressions +// double_t floating-point type at least as wide as `double' used +// to evaluate `double' expressions +type Float_t = float32 /* math.h:163:15 */ +type Double_t = float64 /* math.h:164:16 */ + +// GCC bug 66462 means we cannot use the math builtins with -fsignaling-nan, +// so disable builtins if this is enabled. When fixed in a newer GCC, +// the __SUPPORT_SNAN__ check may be skipped for those versions. + +// Return number of classification appropriate for X. +// The check for __cplusplus allows the use of the builtin, even +// when optimization for size is on. This is provided for +// libstdc++, only to let its configure test work when it is built +// with -Os. No further use of this definition of fpclassify is +// expected in C++ mode, since libstdc++ provides its own version +// of fpclassify in cmath (which undefines fpclassify). + +// Return nonzero value if sign of X is negative. + +// Return nonzero value if X is not +-Inf or NaN. + +// Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. + +// Return nonzero value if X is a NaN. We could use `fpclassify' but +// we already have this functions `__isnan' and it is faster. + +// Return nonzero value if X is positive or negative infinity. + +// Bitmasks for the math_errhandling macro. + +// By default all math functions support both errno and exception handling +// (except for soft floating point implementations which may only support +// errno handling). If errno handling is disabled, exceptions are still +// supported by GLIBC. Set math_errhandling to 0 with -ffast-math (this is +// nonconforming but it is more useful than leaving it undefined). + +// Define iscanonical macro. +// Copyright (C) 2016-2021 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 +// . + +// Return nonzero value if X is canonical. By default, we only have +// IEEE interchange binary formats, in which all values are canonical, +// but the argument must still be converted to its semantic type for +// any exceptions arising from the conversion, before being +// discarded. + +// Return nonzero value if X is a signaling NaN. + +// Return nonzero value if X is subnormal. + +// Return nonzero value if X is zero. + +// X/Open wants another strange constant. + +// Some useful constants. + +// The above constants are not adequate for computation using `long double's. +// Therefore we provide as an extension constants with similar names as a +// GNU extension. Provide enough digits for the 128-bit IEEE quad. + +// ISO C99 defines some macros to compare number while taking care for +// unordered numbers. Many FPUs provide special instructions to support +// these operations. Generic support in GCC for these as builtins went +// in 2.97, but not all cpus added their patterns until 3.1. Therefore +// we enable the builtins from 3.1 onwards and use a generic implementation +// othwerwise. + +// An expression whose type has the widest of the evaluation formats +// of X and Y (which are of floating-point types). + +// Return X == Y but raising "invalid" and setting errno if X or Y is +// a NaN. + +// Calls to sqlite3FaultSim() are used to simulate a failure during testing, +// or to bypass normal error detection during testing in order to let +// execute proceed futher downstream. +// +// In deployment, sqlite3FaultSim() *always* return SQLITE_OK (0). The +// sqlite3FaultSim() function only returns non-zero during testing. +// +// During testing, if the test harness has set a fault-sim callback using +// a call to sqlite3_test_control(SQLITE_TESTCTRL_FAULT_INSTALL), then +// each call to sqlite3FaultSim() is relayed to that application-supplied +// callback and the integer return value form the application-supplied +// callback is returned by sqlite3FaultSim(). +// +// The integer argument to sqlite3FaultSim() is a code to identify which +// sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() +// should have a unique code. To prevent legacy testing applications from +// breaking, the codes should not be changed or reused. +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ + var xCallback uintptr = Xsqlite3Config.FxTestCallback + if xCallback != 0 { + return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) + } + return SQLITE_OK +} + +// Return true if the floating point value is Not a Number (NaN). +// +// Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. +// Otherwise, we have our own implementation that works on most systems. +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + *(*float64)(unsafe.Pointer(bp + 8)) = x + + var rc int32 // The value return + // var y U64 at bp, 8 + + libc.Xmemcpy(tls, bp, bp+8, uint64(unsafe.Sizeof(U64(0)))) + rc = libc.Bool32(*(*U64)(unsafe.Pointer(bp))&(U64(uint64(0x7ff))<<52) == U64(uint64(0x7ff))<<52 && *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<52-uint64(1)) != uint64(0)) + + return rc +} + +// Compute a string length that is limited to what can be stored in +// lower 30 bits of a 32-bit signed integer. +// +// The value returned will never be negative. Nor will it ever be greater +// than the actual length of the string. For very long strings (greater +// than 1GiB) the value returned might be less than the true string length. +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ + if z == uintptr(0) { + return 0 + } + return 0x3fffffff & int32(libc.Xstrlen(tls, z)) +} + +// Return the declared type of a column. Or return zDflt if the column +// has no declared type. +// +// The column type is an extra string stored after the zero-terminator on +// the column name if and only if the COLFLAG_HASTYPE flag is set. +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { + return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) + } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { + + return Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)-1)&0xf<<28>>28] + } else { + return zDflt + } + return uintptr(0) +} + +// Helper function for sqlite3Error() - called rarely. Broken out into +// a separate routine to avoid unnecessary register saves on entry to +// sqlite3Error(). +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ + if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { + Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + } + Xsqlite3SystemError(tls, db, err_code) +} + +// Set the current error code to err_code and clear any prior error message. +// Also set iSysErrno (by calling sqlite3System) if the err_code indicates +// that would be appropriate. +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ + + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code + if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { + sqlite3ErrorFinish(tls, db, err_code) + } else { + (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 + } +} + +// The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state +// and error message. +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ + + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK + (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 + if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { + Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + } +} + +// Load the sqlite3.iSysErrno field if that is an appropriate thing +// to do based on the SQLite error code in rc. +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ + if rc == SQLITE_IOERR|int32(12)<<8 { + return + } + rc = rc & 0xff + if rc == SQLITE_CANTOPEN || rc == SQLITE_IOERR { + (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno = Xsqlite3OsGetLastError(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs) + } +} + +// Set the most recent error code and error string for the sqlite +// handle "db". The error code is set to "err_code". +// +// If it is not NULL, string zFormat specifies the format of the +// error string. zFormat and any string tokens that follow it are +// assumed to be encoded in UTF-8. +// +// To clear the most recent error for sqlite handle "db", sqlite3Error +// should be called with err_code set to SQLITE_OK and zFormat set +// to NULL. +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ + + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code + Xsqlite3SystemError(tls, db, err_code) + if zFormat == uintptr(0) { + Xsqlite3Error(tls, db, err_code) + } else if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 || libc.AssignPtrUintptr(db+424, Xsqlite3ValueNew(tls, db)) != uintptr(0) { + var z uintptr + var ap Va_list + _ = ap + ap = va + z = Xsqlite3VMPrintf(tls, db, zFormat, ap) + _ = ap + Xsqlite3ValueSetStr(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr, -1, z, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) + } +} + +// Add an error message to pParse->zErrMsg and increment pParse->nErr. +// +// This function should be used to report any error that occurs while +// compiling an SQL statement (i.e. within sqlite3_prepare()). The +// last thing the sqlite3_prepare() function does is copy the error +// stored by this function into the database handle using sqlite3Error(). +// Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used +// during statement execution (sqlite3_step() etc.). +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ + var zMsg uintptr + var ap Va_list + _ = ap + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -2 + ap = va + zMsg = Xsqlite3VMPrintf(tls, db, zFormat, ap) + _ = ap + if (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset < -1 { + (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 + } + if (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr != 0 { + Xsqlite3DbFree(tls, db, zMsg) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + } + } else { + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = zMsg + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FpWith = uintptr(0) + } +} + +// If database connection db is currently parsing SQL, then transfer +// error code errCode to that parser if the parser has not already +// encountered some other kind of error. +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ + var pParse uintptr + if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { + return errCode + } + (*Parse)(unsafe.Pointer(pParse)).Frc = errCode + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return errCode +} + +// Convert an SQL-style quoted string into a normal string by removing +// the quote characters. The conversion is done in-place. If the +// input does not begin with a quote character, then this routine +// is a no-op. +// +// The input string must be zero-terminated. A new zero-terminator +// is added to the dequoted string. +// +// The return value is -1 if no dequoting occurs or the length of the +// dequoted string, exclusive of the zero terminator, if dequoting does +// occur. +// +// 2002-02-14: This routine is extended to remove MS-Access style +// brackets from around identifiers. For example: "[a-b-c]" becomes +// "a-b-c". +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ + var quote uint8 + var i int32 + var j int32 + if z == uintptr(0) { + return + } + quote = *(*uint8)(unsafe.Pointer(z)) + if !(int32(Xsqlite3CtypeMap[uint8(quote)])&0x80 != 0) { + return + } + if int32(quote) == '[' { + quote = uint8(']') + } + i = 1 + j = 0 + for ; ; i++ { + + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == int32(quote) { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i+1)))) == int32(quote) { + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = quote + i++ + } else { + break + } + } else { + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = *(*uint8)(unsafe.Pointer(z + uintptr(i))) + } + } + *(*uint8)(unsafe.Pointer(z + uintptr(j))) = uint8(0) +} + +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ + + *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { + if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { + return uint32(EP_Quoted | EP_DblQuoted) + } + return uint32(EP_Quoted) + }() + Xsqlite3Dequote(tls, *(*uintptr)(unsafe.Pointer(p + 8))) +} + +// If the input token p is quoted, try to adjust the token to remove +// the quotes. This is not always possible: +// +// "abc" -> abc +// "ab""cd" -> (not possible because of the interior "") +// +// Remove the quotes if possible. This is a optimization. The overall +// system should still return the correct answer even if this routine +// is always a no-op. +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ + var i uint32 + if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { + return + } + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(p)).Fz)))])&0x80 != 0) { + return + } + for i = uint32(1); i < (*Token)(unsafe.Pointer(p)).Fn-uint32(1); i++ { + if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(p)).Fz + uintptr(i))))])&0x80 != 0 { + return + } + } + *(*uint32)(unsafe.Pointer(p + 8)) -= uint32(2) + (*Token)(unsafe.Pointer(p)).Fz++ +} + +// Generate a Token object from a string +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ + (*Token)(unsafe.Pointer(p)).Fz = z + (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) +} + +// Convenient short-hand + +// Some systems have stricmp(). Others have strcasecmp(). Because +// there is no consistency, we will define our own. +// +// IMPLEMENTATION-OF: R-30243-02494 The sqlite3_stricmp() and +// sqlite3_strnicmp() APIs allow applications and extensions to compare +// the contents of two buffers containing UTF-8 strings in a +// case-independent fashion, using the same definition of "case +// independence" that SQLite uses internally when comparing identifiers. +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ + if zLeft == uintptr(0) { + if zRight != 0 { + return -1 + } + return 0 + } else if zRight == uintptr(0) { + return 1 + } + return Xsqlite3StrICmp(tls, zLeft, zRight) +} + +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ + var a uintptr + var b uintptr + var c int32 + var x int32 + a = zLeft + b = zRight + for { + c = int32(*(*uint8)(unsafe.Pointer(a))) + x = int32(*(*uint8)(unsafe.Pointer(b))) + if c == x { + if c == 0 { + break + } + } else { + c = int32(Xsqlite3UpperToLower[c]) - int32(Xsqlite3UpperToLower[x]) + if c != 0 { + break + } + } + a++ + b++ + } + return c +} + +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ + var a uintptr + var b uintptr + if zLeft == uintptr(0) { + if zRight != 0 { + return -1 + } + return 0 + } else if zRight == uintptr(0) { + return 1 + } + a = zLeft + b = zRight + for libc.PostDecInt32(&N, 1) > 0 && int32(*(*uint8)(unsafe.Pointer(a))) != 0 && int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(a))]) == int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(b))]) { + a++ + b++ + } + if N < 0 { + return 0 + } + return int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(a))]) - int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(b))]) +} + +// Compute an 8-bit hash on a string that is insensitive to case differences +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ + var h U8 = U8(0) + if z == uintptr(0) { + return U8(0) + } + for *(*uint8)(unsafe.Pointer(z)) != 0 { + h = U8(int32(h) + int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z)))])) + z++ + } + return h +} + +// Compute 10 to the E-th power. Examples: E==1 results in 10. +// E==2 results in 100. E==50 results in 1.0e50. +// +// This routine only works for values of E between 1 and 341. +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ + var x float64 = 10.0 + var r float64 = 1.0 + for 1 != 0 { + if E&1 != 0 { + r = r * x + } + E >>= 1 + if E == 0 { + break + } + x = x * x + } + return r +} + +// The string z[] is an text representation of a real number. +// Convert this string to a double and write it into *pResult. +// +// The string z[] is length bytes in length (bytes, not characters) and +// uses the encoding enc. The string is not necessarily zero-terminated. +// +// Return TRUE if the result is a valid real number (or integer) and FALSE +// if the string is empty or contains extraneous text. More specifically +// return +// 1 => The input string is a pure integer +// 2 or more => The input has a decimal point or eNNN clause +// 0 or less => The input string is not a valid number +// -1 => Not a valid number, but has a valid prefix which +// includes a decimal point and/or an eNNN clause +// +// Valid numbers are in one of these formats: +// +// [+-]digits[E[+-]digits] +// [+-]digits.[digits][E[+-]digits] +// [+-].digits[E[+-]digits] +// +// Leading and trailing whitespace is ignored for the purpose of determining +// validity. +// +// If some prefix of the input string is a valid number, this routine +// returns FALSE but it still converts the prefix and writes the result +// into *pResult. +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ + var incr int32 + var zEnd uintptr + // sign * significand * (10 ^ (esign * exponent)) + var sign int32 // sign of significand + var s I64 // significand + var d int32 // adjust exponent for shifting decimal point + var esign int32 // sign of exponent + var e int32 // exponent + var eValid int32 // True exponent is either not used or is well-formed + var result float64 + var nDigit int32 // Number of digits processed + var eType int32 + var i int32 //OPTIMIZATION-IF-TRUE + var scale float64 + var scale1 float64 + sign = 1 + s = int64(0) + d = 0 + esign = 1 + e = 0 + eValid = 1 + nDigit = 0 + eType = 1 // 1: pure integer, 2+: fractional -1 or less: bad UTF16 + + *(*float64)(unsafe.Pointer(pResult)) = 0.0 // Default return value, in case of an error + if !(length == 0) { + goto __1 + } + return 0 +__1: + ; + + if !(int32(enc) == SQLITE_UTF8) { + goto __2 + } + incr = 1 + zEnd = z + uintptr(length) + goto __3 +__2: + incr = 2 + length = length & libc.CplInt32(1) + + i = 3 - int32(enc) +__4: + if !(i < length && int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == 0) { + goto __6 + } + goto __5 +__5: + i = i + 2 + goto __4 + goto __6 +__6: + ; + if !(i < length) { + goto __7 + } + eType = -100 +__7: + ; + zEnd = z + uintptr(i^1) + z += uintptr(int32(enc) & 1) +__3: + ; + + // skip leading spaces +__8: + if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x01 != 0) { + goto __9 + } + z += uintptr(incr) + goto __8 +__9: + ; + if !(z >= zEnd) { + goto __10 + } + return 0 +__10: + ; + + // get sign of significand + if !(int32(*(*uint8)(unsafe.Pointer(z))) == '-') { + goto __11 + } + sign = -1 + z += uintptr(incr) + goto __12 +__11: + if !(int32(*(*uint8)(unsafe.Pointer(z))) == '+') { + goto __13 + } + z += uintptr(incr) +__13: + ; +__12: + ; + + // copy max significant digits to significand +__14: + if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x04 != 0) { + goto __15 + } + s = s*int64(10) + I64(int32(*(*uint8)(unsafe.Pointer(z)))-'0') + z += uintptr(incr) + nDigit++ + if !(s >= (int64(0xffffffff)|I64(int64(0x7fffffff))<<32-int64(9))/int64(10)) { + goto __16 + } + // skip non-significant significand digits + // (increase exponent by d to shift decimal left) +__17: + if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x04 != 0) { + goto __18 + } + z += uintptr(incr) + d++ + goto __17 +__18: + ; +__16: + ; + goto __14 +__15: + ; + if !(z >= zEnd) { + goto __19 + } + goto do_atof_calc +__19: + ; + + // if decimal point is present + if !(int32(*(*uint8)(unsafe.Pointer(z))) == '.') { + goto __20 + } + z += uintptr(incr) + eType++ + // copy digits from after decimal to significand + // (decrease exponent by d to shift decimal right) +__21: + if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x04 != 0) { + goto __22 + } + if !(s < (int64(0xffffffff)|I64(int64(0x7fffffff))<<32-int64(9))/int64(10)) { + goto __23 + } + s = s*int64(10) + I64(int32(*(*uint8)(unsafe.Pointer(z)))-'0') + d-- + nDigit++ +__23: + ; + z += uintptr(incr) + goto __21 +__22: + ; +__20: + ; + if !(z >= zEnd) { + goto __24 + } + goto do_atof_calc +__24: + ; + + // if exponent is present + if !(int32(*(*uint8)(unsafe.Pointer(z))) == 'e' || int32(*(*uint8)(unsafe.Pointer(z))) == 'E') { + goto __25 + } + z += uintptr(incr) + eValid = 0 + eType++ + + // This branch is needed to avoid a (harmless) buffer overread. The + // special comment alerts the mutation tester that the correct answer + // is obtained even if the branch is omitted + if !(z >= zEnd) { + goto __26 + } + goto do_atof_calc +__26: + ; //PREVENTS-HARMLESS-OVERREAD + + // get sign of exponent + if !(int32(*(*uint8)(unsafe.Pointer(z))) == '-') { + goto __27 + } + esign = -1 + z += uintptr(incr) + goto __28 +__27: + if !(int32(*(*uint8)(unsafe.Pointer(z))) == '+') { + goto __29 + } + z += uintptr(incr) +__29: + ; +__28: + ; + // copy digits to exponent +__30: + if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x04 != 0) { + goto __31 + } + if e < 10000 { + e = e*10 + (int32(*(*uint8)(unsafe.Pointer(z))) - '0') + } else { + e = 10000 + } + z += uintptr(incr) + eValid = 1 + goto __30 +__31: + ; +__25: + ; + + // skip trailing spaces +__32: + if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x01 != 0) { + goto __33 + } + z += uintptr(incr) + goto __32 +__33: + ; + +do_atof_calc: + // adjust exponent by d, and update sign + e = e*esign + d + if !(e < 0) { + goto __34 + } + esign = -1 + e = e * -1 + goto __35 +__34: + esign = 1 +__35: + ; + + if !(s == int64(0)) { + goto __36 + } + // In the IEEE 754 standard, zero is signed. + if sign < 0 { + result = -libc.Float64FromFloat64(float64(0)) + } else { + result = float64(0) + } + goto __37 +__36: + // Attempt to reduce exponent. + // + // Branches that are not required for the correct answer but which only + // help to obtain the correct answer faster are marked with special + // comments, as a hint to the mutation tester. +__38: + if !(e > 0) { + goto __39 + } //OPTIMIZATION-IF-TRUE + if !(esign > 0) { + goto __40 + } + if !(s >= (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/int64(10)) { + goto __42 + } + goto __39 +__42: + ; //OPTIMIZATION-IF-FALSE + s = s * int64(10) + goto __41 +__40: + if !(s%int64(10) != int64(0)) { + goto __43 + } + goto __39 +__43: + ; //OPTIMIZATION-IF-FALSE + s = s / int64(10) +__41: + ; + e-- + goto __38 +__39: + ; + + // adjust the sign of significand + if sign < 0 { + s = -s + } else { + s = s + } + + if !(e == 0) { + goto __44 + } //OPTIMIZATION-IF-TRUE + result = float64(s) + goto __45 +__44: + // attempt to handle extremely small/large numbers better + if !(e > 307) { + goto __46 + } //OPTIMIZATION-IF-TRUE + if !(e < 342) { + goto __48 + } //OPTIMIZATION-IF-TRUE + scale = sqlite3Pow10(tls, e-308) + if !(esign < 0) { + goto __50 + } + result = float64(s) / scale + result = result / 1.0e+308 + goto __51 +__50: + result = float64(s) * scale + result = result * 1.0e+308 +__51: + ; + goto __49 +__48: + ; + if !(esign < 0) { + goto __52 + } + result = 0.0 * float64(s) + goto __53 +__52: + result = float64(libc.X__builtin_inff(tls) * float32(s)) +__53: + ; +__49: + ; + goto __47 +__46: + scale1 = sqlite3Pow10(tls, e) + if !(esign < 0) { + goto __54 + } + result = float64(s) / scale1 + goto __55 +__54: + result = float64(s) * scale1 +__55: + ; +__47: + ; +__45: + ; +__37: + ; + + // store the result + *(*float64)(unsafe.Pointer(pResult)) = result + + // return true if number and no extra non-whitespace chracters after + if !(z == zEnd && nDigit > 0 && eValid != 0 && eType > 0) { + goto __56 + } + return eType + goto __57 +__56: + if !(eType >= 2 && (eType == 3 || eValid != 0) && nDigit > 0) { + goto __58 + } + return -1 + goto __59 +__58: + return 0 +__59: + ; +__57: + ; + return int32(0) +} + +// Render an signed 64-bit integer as text. Store the result in zOut[]. +// +// The caller must ensure that zOut[] is at least 21 bytes in size. +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ + bp := tls.Alloc(22) + defer tls.Free(22) + + var i int32 + var x U64 + // var zTemp [22]uint8 at bp, 22 + + if v < int64(0) { + if v == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { + x = U64(uint64(1)) << 63 + } else { + x = U64(-v) + } + } else { + x = U64(v) + } + i = int32(uint64(unsafe.Sizeof([22]uint8{})) - uint64(2)) + *(*uint8)(unsafe.Pointer(bp + 21)) = uint8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = uint8(x%uint64(10) + uint64('0')) + x = x / uint64(10) + } + if v < int64(0) { + *(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = uint8('-') + } + libc.Xmemcpy(tls, zOut, bp+uintptr(i+1), uint64(unsafe.Sizeof([22]uint8{}))-uint64(1)-uint64(i)) +} + +// Compare the 19-character string zNum against the text representation +// value 2^63: 9223372036854775808. Return negative, zero, or positive +// if zNum is less than, equal to, or greater than the string. +// Note that zNum must contain exactly 19 characters. +// +// Unlike memcmp() this routine is guaranteed to return the difference +// in the values of the last digit if the only difference is in the +// last digit. So, for example, +// +// compare2pow63("9223372036854775800", 1) +// +// will return -8. +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ + var c int32 = 0 + var i int32 + // 012345678901234567 + var pow63 uintptr = ts + 1561 /* "9223372036854775..." */ + for i = 0; c == 0 && i < 18; i++ { + c = (int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*uint8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 + } + if c == 0 { + c = int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(18*incr)))) - '8' + + } + return c +} + +// Convert zNum to a 64-bit signed integer. zNum must be decimal. This +// routine does *not* accept hexadecimal notation. +// +// Returns: +// +// -1 Not even a prefix of the input text looks like an integer +// 0 Successful transformation. Fits in a 64-bit signed integer. +// 1 Excess non-space text after the integer value +// 2 Integer too large for a 64-bit signed integer or is malformed +// 3 Special case of 9223372036854775808 +// +// length is the number of bytes in the string (bytes, not characters). +// The string is not necessarily zero-terminated. The encoding is +// given by enc. +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ + var incr int32 + var u U64 = uint64(0) + var neg int32 = 0 // assume positive + var i int32 + var c int32 = 0 + var nonNum int32 = 0 // True if input contains UTF16 with high byte non-zero + var rc int32 // Baseline return code + var zStart uintptr + var zEnd uintptr = zNum + uintptr(length) + + if int32(enc) == SQLITE_UTF8 { + incr = 1 + } else { + incr = 2 + length = length & libc.CplInt32(1) + + for i = 3 - int32(enc); i < length && int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i)))) == 0; i = i + 2 { + } + nonNum = libc.Bool32(i < length) + zEnd = zNum + uintptr(i^1) + zNum += uintptr(int32(enc) & 1) + } + for zNum < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum)))])&0x01 != 0 { + zNum += uintptr(incr) + } + if zNum < zEnd { + if int32(*(*uint8)(unsafe.Pointer(zNum))) == '-' { + neg = 1 + zNum += uintptr(incr) + } else if int32(*(*uint8)(unsafe.Pointer(zNum))) == '+' { + zNum += uintptr(incr) + } + } + zStart = zNum + for zNum < zEnd && int32(*(*uint8)(unsafe.Pointer(zNum))) == '0' { + zNum += uintptr(incr) + } // Skip leading zeros. + for i = 0; zNum+uintptr(i) < zEnd && libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i))))) >= '0' && c <= '9'; i = i + incr { + u = u*uint64(10) + U64(c) - uint64('0') + } + + if u > uint64(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { + // This test and assignment is needed only to suppress UB warnings + // from clang and -fsanitize=undefined. This test and assignment make + // the code a little larger and slower, and no harm comes from omitting + // them, but we must appaise the undefined-behavior pharisees. + *(*I64)(unsafe.Pointer(pNum)) = func() int64 { + if neg != 0 { + return int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) + } + return int64(0xffffffff) | I64(int64(0x7fffffff))<<32 + }() + } else if neg != 0 { + *(*I64)(unsafe.Pointer(pNum)) = -I64(u) + } else { + *(*I64)(unsafe.Pointer(pNum)) = I64(u) + } + rc = 0 + if i == 0 && zStart == zNum { // No digits + rc = -1 + } else if nonNum != 0 { // UTF16 with high-order bytes non-zero + rc = 1 + } else if zNum+uintptr(i) < zEnd { // Extra bytes at the end + var jj int32 = i + for __ccgo := true; __ccgo; __ccgo = zNum+uintptr(jj) < zEnd { + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + uintptr(jj))))])&0x01 != 0) { + rc = 1 // Extra non-space text after the integer + break + } + jj = jj + incr + } + } + if i < 19*incr { + // Less than 19 digits, so we know that it fits in 64 bits + + return rc + } else { + // zNum is a 19-digit numbers. Compare it against 9223372036854775808. + if i > 19*incr { + c = 1 + } else { + c = compare2pow63(tls, zNum, incr) + } + if c < 0 { + // zNum is less than 9223372036854775808 so it fits + + return rc + } else { + *(*I64)(unsafe.Pointer(pNum)) = func() int64 { + if neg != 0 { + return int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) + } + return int64(0xffffffff) | I64(int64(0x7fffffff))<<32 + }() + if c > 0 { + // zNum is greater than 9223372036854775808 so it overflows + return 2 + } else { + // zNum is exactly 9223372036854775808. Fits if negative. The + // special case 2 overflow if positive + + if neg != 0 { + return rc + } + return 3 + } + } + } + return int32(0) +} + +// Transform a UTF-8 integer literal, in either decimal or hexadecimal, +// into a 64-bit signed integer. This routine accepts hexadecimal literals, +// whereas sqlite3Atoi64() does not. +// +// Returns: +// +// 0 Successful transformation. Fits in a 64-bit signed integer. +// 1 Excess text after the integer value +// 2 Integer too large for a 64-bit signed integer or is malformed +// 3 Special case of 9223372036854775808 +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if int32(*(*uint8)(unsafe.Pointer(z))) == '0' && + (int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'x' || int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'X') { + *(*U64)(unsafe.Pointer(bp /* u */)) = uint64(0) + var i int32 + var k int32 + for i = 2; int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == '0'; i++ { + } + for k = i; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(k))))])&0x08 != 0; k++ { + *(*U64)(unsafe.Pointer(bp /* u */)) = *(*U64)(unsafe.Pointer(bp))*uint64(16) + U64(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + uintptr(k)))))) + } + libc.Xmemcpy(tls, pOut, bp, uint64(8)) + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(k)))) == 0 && k-i <= 16 { + return 0 + } + return 2 + } else { + return Xsqlite3Atoi64(tls, z, pOut, Xsqlite3Strlen30(tls, z), uint8(SQLITE_UTF8)) + } + return int32(0) +} + +// If zNum represents an integer that will fit in 32-bits, then set +// *pValue to that integer and return true. Otherwise return false. +// +// This routine accepts both decimal and hexadecimal notation for integers. +// +// Any non-numeric characters that following zNum are ignored. +// This is different from sqlite3Atoi64() which requires the +// input number to be zero-terminated. +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var v Sqlite_int64 = int64(0) + var i int32 + var c int32 + var neg int32 = 0 + if int32(*(*uint8)(unsafe.Pointer(zNum))) == '-' { + neg = 1 + zNum++ + } else if int32(*(*uint8)(unsafe.Pointer(zNum))) == '+' { + zNum++ + } else if int32(*(*uint8)(unsafe.Pointer(zNum))) == '0' && + (int32(*(*uint8)(unsafe.Pointer(zNum + 1))) == 'x' || int32(*(*uint8)(unsafe.Pointer(zNum + 1))) == 'X') && + int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + 2)))])&0x08 != 0 { + *(*U32)(unsafe.Pointer(bp /* u */)) = U32(0) + zNum += uintptr(2) + for int32(*(*uint8)(unsafe.Pointer(zNum))) == '0' { + zNum++ + } + for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + uintptr(i))))])&0x08 != 0 && i < 8; i++ { + *(*U32)(unsafe.Pointer(bp /* u */)) = *(*U32)(unsafe.Pointer(bp))*U32(16) + U32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i)))))) + } + if *(*U32)(unsafe.Pointer(bp))&0x80000000 == U32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + uintptr(i))))])&0x08 == 0 { + libc.Xmemcpy(tls, pValue, bp, uint64(4)) + return 1 + } else { + return 0 + } + } + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum)))])&0x04 != 0) { + return 0 + } + for int32(*(*uint8)(unsafe.Pointer(zNum))) == '0' { + zNum++ + } + for i = 0; i < 11 && libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i))))-'0') >= 0 && c <= 9; i++ { + v = v*int64(10) + Sqlite_int64(c) + } + + // The longest decimal representation of a 32 bit integer is 10 digits: + // + // 1234567890 + // 2^31 -> 2147483648 + + if i > 10 { + return 0 + } + + if v-Sqlite_int64(neg) > int64(2147483647) { + return 0 + } + if neg != 0 { + v = -v + } + *(*int32)(unsafe.Pointer(pValue)) = int32(v) + return 1 +} + +// Return a 32-bit integer value extracted from a string. If the +// string is not an integer, just return 0. +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* x */)) = 0 + Xsqlite3GetInt32(tls, z, bp) + return *(*int32)(unsafe.Pointer(bp /* x */)) +} + +// Try to convert z into an unsigned 32-bit integer. Return true on +// success and false if there is an error. +// +// Only decimal notation is accepted. +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ + var v U64 = uint64(0) + var i int32 + for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { + v = v*uint64(10) + U64(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) - uint64('0') + if v > uint64(4294967296) { + *(*U32)(unsafe.Pointer(pI)) = U32(0) + return 0 + } + } + if i == 0 || int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != 0 { + *(*U32)(unsafe.Pointer(pI)) = U32(0) + return 0 + } + *(*U32)(unsafe.Pointer(pI)) = U32(v) + return 1 +} + +// The variable-length integer encoding is as follows: +// +// KEY: +// A = 0xxxxxxx 7 bits of data and one flag bit +// B = 1xxxxxxx 7 bits of data and one flag bit +// C = xxxxxxxx 8 bits of data +// +// 7 bits - A +// 14 bits - BA +// 21 bits - BBA +// 28 bits - BBBA +// 35 bits - BBBBA +// 42 bits - BBBBBA +// 49 bits - BBBBBBA +// 56 bits - BBBBBBBA +// 64 bits - BBBBBBBBC + +// Write a 64-bit variable-length integer to memory starting at p[0]. +// The length of data write will be between 1 and 9 bytes. The number +// of bytes written is returned. +// +// A variable-length integer consists of the lower 7 bits of each byte +// for all bytes that have the 8th bit set and one byte with the 8th +// bit clear. Except, if we get to the 9th byte, it stores the full +// 8 bits and is the last byte. +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ + bp := tls.Alloc(10) + defer tls.Free(10) + + var i int32 + var j int32 + var n int32 + // var buf [10]U8 at bp, 10 + + if v&(U64(uint64(0xff000000))<<32) != 0 { + *(*uint8)(unsafe.Pointer(p + 8)) = U8(v) + v >>= 8 + for i = 7; i >= 0; i-- { + *(*uint8)(unsafe.Pointer(p + uintptr(i))) = U8(v&uint64(0x7f) | uint64(0x80)) + v >>= 7 + } + return 9 + } + n = 0 + for __ccgo := true; __ccgo; __ccgo = v != uint64(0) { + *(*U8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&n, 1)))) = U8(v&uint64(0x7f) | uint64(0x80)) + v >>= 7 + } + *(*U8)(unsafe.Pointer(bp)) &= U8(0x7f) + + i = 0 + j = n - 1 +__1: + if !(j >= 0) { + goto __3 + } + { + *(*uint8)(unsafe.Pointer(p + uintptr(i))) = *(*U8)(unsafe.Pointer(bp + uintptr(j))) + + } + goto __2 +__2: + j-- + i++ + goto __1 + goto __3 +__3: + ; + return n +} + +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ + if v <= uint64(0x7f) { + *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) + return 1 + } + if v <= uint64(0x3fff) { + *(*uint8)(unsafe.Pointer(p)) = uint8(v>>7&uint64(0x7f) | uint64(0x80)) + *(*uint8)(unsafe.Pointer(p + 1)) = uint8(v & uint64(0x7f)) + return 2 + } + return putVarint64(tls, p, v) +} + +// Bitmasks used by sqlite3GetVarint(). These precomputed constants +// are defined here rather than simply putting the constant expressions +// inline in order to work around bugs in the RVT compiler. +// +// SLOT_2_0 A mask for (0x7f<<14) | 0x7f +// +// SLOT_4_2_0 A mask for (0x7f<<28) | SLOT_2_0 + +// Read a 64-bit variable-length integer from memory starting at p[0]. +// Return the number of bytes read. The value is stored in *v. +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ + var a U32 + var b U32 + var s U32 + + if int32(*(*int8)(unsafe.Pointer(p))) >= 0 { + *(*U64)(unsafe.Pointer(v)) = U64(*(*uint8)(unsafe.Pointer(p))) + return U8(1) + } + if int32(*(*int8)(unsafe.Pointer(p + 1))) >= 0 { + *(*U64)(unsafe.Pointer(v)) = U64(U32(int32(*(*uint8)(unsafe.Pointer(p)))&0x7f)<<7 | U32(*(*uint8)(unsafe.Pointer(p + 1)))) + return U8(2) + } + + // Verify that constants are precomputed correctly + + a = U32(*(*uint8)(unsafe.Pointer(p))) << 14 + b = U32(*(*uint8)(unsafe.Pointer(p + 1))) + p += uintptr(2) + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0<<14 | p2 (unmasked) + if !(a&U32(0x80) != 0) { + a = a & U32(SLOT_2_0) + b = b & U32(0x7f) + b = b << 7 + a = a | b + *(*U64)(unsafe.Pointer(v)) = U64(a) + return U8(3) + } + + // CSE1 from below + a = a & U32(SLOT_2_0) + p++ + b = b << 14 + b = b | U32(*(*uint8)(unsafe.Pointer(p))) + // b: p1<<14 | p3 (unmasked) + if !(b&U32(0x80) != 0) { + b = b & U32(SLOT_2_0) + // moved CSE1 up + // a &= (0x7f<<14)|(0x7f); + a = a << 7 + a = a | b + *(*U64)(unsafe.Pointer(v)) = U64(a) + return U8(4) + } + + // a: p0<<14 | p2 (masked) + // b: p1<<14 | p3 (unmasked) + // 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) + // moved CSE1 up + // a &= (0x7f<<14)|(0x7f); + b = b & U32(SLOT_2_0) + s = a + // s: p0<<14 | p2 (masked) + + p++ + a = a << 14 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0<<28 | p2<<14 | p4 (unmasked) + if !(a&U32(0x80) != 0) { + // we can skip these cause they were (effectively) done above + // while calculating s + // a &= (0x7f<<28)|(0x7f<<14)|(0x7f); + // b &= (0x7f<<14)|(0x7f); + b = b << 7 + a = a | b + s = s >> 18 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(5) + } + + // 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) + s = s << 7 + s = s | b + // s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) + + p++ + b = b << 14 + b = b | U32(*(*uint8)(unsafe.Pointer(p))) + // b: p1<<28 | p3<<14 | p5 (unmasked) + if !(b&U32(0x80) != 0) { + // we can skip this cause it was (effectively) done above in calc'ing s + // b &= (0x7f<<28)|(0x7f<<14)|(0x7f); + a = a & U32(SLOT_2_0) + a = a << 7 + a = a | b + s = s >> 18 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(6) + } + + p++ + a = a << 14 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p2<<28 | p4<<14 | p6 (unmasked) + if !(a&U32(0x80) != 0) { + a = a & SLOT_4_2_0 + b = b & U32(SLOT_2_0) + b = b << 7 + a = a | b + s = s >> 11 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(7) + } + + // CSE2 from below + a = a & U32(SLOT_2_0) + p++ + b = b << 14 + b = b | U32(*(*uint8)(unsafe.Pointer(p))) + // b: p3<<28 | p5<<14 | p7 (unmasked) + if !(b&U32(0x80) != 0) { + b = b & SLOT_4_2_0 + // moved CSE2 up + // a &= (0x7f<<14)|(0x7f); + a = a << 7 + a = a | b + s = s >> 4 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(8) + } + + p++ + a = a << 15 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p4<<29 | p6<<15 | p8 (unmasked) + + // moved CSE2 up + // a &= (0x7f<<29)|(0x7f<<15)|(0xff); + b = b & U32(SLOT_2_0) + b = b << 8 + a = a | b + + s = s << 4 + b = U32(*(*uint8)(unsafe.Pointer(p + libc.UintptrFromInt32(-4)))) + b = b & U32(0x7f) + b = b >> 3 + s = s | b + + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + + return U8(9) +} + +// Read a 32-bit variable-length integer from memory starting at p[0]. +// Return the number of bytes read. The value is stored in *v. +// +// If the varint stored in p[0] is larger than can fit in a 32-bit unsigned +// integer, then set *v to 0xffffffff. +// +// A MACRO version, getVarint32, is provided which inlines the +// single-byte case. All code should use the MACRO version as +// this function assumes the single-byte case has already been handled. +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var a U32 + var b U32 + + // The 1-byte case. Overwhelmingly the most common. Handled inline + // by the getVarin32() macro + a = U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0 (unmasked) + + // The 2-byte case + p++ + b = U32(*(*uint8)(unsafe.Pointer(p))) + // b: p1 (unmasked) + if !(b&U32(0x80) != 0) { + // Values between 128 and 16383 + a = a & U32(0x7f) + a = a << 7 + *(*U32)(unsafe.Pointer(v)) = a | b + return U8(2) + } + + // The 3-byte case + p++ + a = a << 14 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0<<14 | p2 (unmasked) + if !(a&U32(0x80) != 0) { + // Values between 16384 and 2097151 + a = a & U32(int32(0x7f)<<14|0x7f) + b = b & U32(0x7f) + b = b << 7 + *(*U32)(unsafe.Pointer(v)) = a | b + return U8(3) + } + + /* A 32-bit varint is used to store size information in btrees. + ** Objects are rarely larger than 2MiB limit of a 3-byte varint. + ** A 3-byte varint is sufficient, for example, to record the size + ** of a 1048569-byte BLOB or string. + ** + ** We only unroll the first 1-, 2-, and 3- byte cases. The very + ** rare larger cases can be handled by the slower 64-bit varint + ** routine. + */ + { + // var v64 U64 at bp, 8 + + var n U8 + + n = Xsqlite3GetVarint(tls, p-uintptr(2), bp) + + if *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<32-uint64(1)) != *(*U64)(unsafe.Pointer(bp)) { + *(*U32)(unsafe.Pointer(v)) = 0xffffffff + } else { + *(*U32)(unsafe.Pointer(v)) = U32(*(*U64)(unsafe.Pointer(bp /* v64 */))) + } + return n + + } + return U8(0) + +} + +// Return the number of bytes that will be needed to store the given +// 64-bit integer. +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ + var i int32 + for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { + } + return i +} + +// Read or write a four-byte big-endian integer value. +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ + + return uint32(*(*U8)(unsafe.Pointer(p)))<<24 | uint32(int32(*(*U8)(unsafe.Pointer(p + 1)))<<16) | uint32(int32(*(*U8)(unsafe.Pointer(p + 2)))<<8) | uint32(*(*U8)(unsafe.Pointer(p + 3))) +} + +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ + *(*uint8)(unsafe.Pointer(p)) = U8(v >> 24) + *(*uint8)(unsafe.Pointer(p + 1)) = U8(v >> 16) + *(*uint8)(unsafe.Pointer(p + 2)) = U8(v >> 8) + *(*uint8)(unsafe.Pointer(p + 3)) = U8(v) +} + +// Translate a single byte of Hex into an integer. +// This routine only works if h really is a valid hexadecimal +// character: 0..9a..fA..F +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ + + h = h + 9*(1&(h>>6)) + return U8(h & 0xf) +} + +// Convert a BLOB literal of the form "x'hhhhhh'" into its binary +// value. Return a pointer to its binary value. Space to hold the +// binary value has been obtained from malloc and must be freed by +// the calling routine. +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ + var zBlob uintptr + var i int32 + + zBlob = Xsqlite3DbMallocRawNN(tls, db, uint64(n/2+1)) + n-- + if zBlob != 0 { + for i = 0; i < n; i = i + 2 { + *(*uint8)(unsafe.Pointer(zBlob + uintptr(i/2))) = uint8(int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))))<<4 | int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i+1))))))) + } + *(*uint8)(unsafe.Pointer(zBlob + uintptr(i/2))) = uint8(0) + } + return zBlob +} + +// Log an error that is an API call on a connection pointer that should +// not have been used. The "type" of connection pointer is given as the +// argument. The zType is a word like "NULL" or "closed" or "invalid". +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + Xsqlite3_log(tls, SQLITE_MISUSE, + ts+1580, + libc.VaList(bp, zType)) +} + +// Check to make sure we have a valid db pointer. This test is not +// foolproof but it does provide some measure of protection against +// misuse of the interface such as passing in db pointers that are +// NULL or which have been previously closed. If this routine returns +// 1 it means that the db pointer is valid and 0 if it should not be +// dereferenced for any reason. The calling function should invoke +// SQLITE_MISUSE immediately. +// +// sqlite3SafetyCheckOk() requires that the db pointer be valid for +// use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to +// open properly and is not fit for general use but which can be +// used as an argument to sqlite3_errmsg() or sqlite3_close(). +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ + var eOpenState U8 + if db == uintptr(0) { + logBadConnection(tls, ts+1526) + return 0 + } + eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState + if int32(eOpenState) != SQLITE_STATE_OPEN { + if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { + + logBadConnection(tls, ts+1625) + } + return 0 + } else { + return 1 + } + return int32(0) +} + +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ + var eOpenState U8 + eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState + if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { + + logBadConnection(tls, ts+1634) + return 0 + } else { + return 1 + } + return int32(0) +} + +// Attempt to add, substract, or multiply the 64-bit signed value iB against +// the other 64-bit signed integer at *pA and store the result in *pA. +// Return 0 on success. Or if the operation would have resulted in an +// overflow, leave *pA unchanged and return 1. +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023: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:34043: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:34058:20: */ + return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) +} + +// Compute the absolute value of a 32-bit signed integer, of possible. Or +// if the integer has a value of -2147483648, return +2147483647 +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ + if x >= 0 { + return x + } + if x == libc.Int32FromUint32(0x80000000) { + return 0x7fffffff + } + return -x +} + +// Find (an approximate) sum of two LogEst values. This computation is +// not a simple "+" operator because LogEst is stored as a logarithmic +// value. +// +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ + if int32(a) >= int32(b) { + if int32(a) > int32(b)+49 { + return a + } + if int32(a) > int32(b)+31 { + return LogEst(int32(a) + 1) + } + return LogEst(int32(a) + int32(x[int32(a)-int32(b)])) + } else { + if int32(b) > int32(a)+49 { + return b + } + if int32(b) > int32(a)+31 { + return LogEst(int32(b) + 1) + } + return LogEst(int32(b) + int32(x[int32(b)-int32(a)])) + } + return LogEst(0) +} + +var x = [32]uint8{ + uint8(10), uint8(10), // 0,1 + uint8(9), uint8(9), // 2,3 + uint8(8), uint8(8), // 4,5 + uint8(7), uint8(7), uint8(7), // 6,7,8 + uint8(6), uint8(6), uint8(6), // 9,10,11 + uint8(5), uint8(5), uint8(5), // 12-14 + uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 + uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 + uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 +} /* sqlite3.c:34128:30 */ + +// Convert an integer into a LogEst. In other words, compute an +// approximation for 10*log2(x). +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ + var y LogEst = int16(40) + if x < uint64(8) { + if x < uint64(2) { + return int16(0) + } + for x < uint64(8) { + y = int16(int32(y) - 10) + x <<= 1 + } + } else { + var i int32 = 60 - libc.X__builtin_clzll(tls, x) + y = LogEst(int32(y) + i*10) + x >>= i + } + return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) +} + +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ + +// Convert a double into a LogEst +// In other words, compute an approximation for 10*log2(x). +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ + bp := tls.Alloc(16) + defer tls.Free(16) + *(*float64)(unsafe.Pointer(bp + 8)) = x + + // var a U64 at bp, 8 + + var e LogEst + + if *(*float64)(unsafe.Pointer(bp + 8)) <= float64(1) { + return int16(0) + } + if *(*float64)(unsafe.Pointer(bp + 8)) <= float64(2000000000) { + return Xsqlite3LogEst(tls, U64(*(*float64)(unsafe.Pointer(bp + 8 /* x */)))) + } + libc.Xmemcpy(tls, bp, bp+8, uint64(8)) + e = LogEst(*(*U64)(unsafe.Pointer(bp))>>52 - uint64(1022)) + return LogEst(int32(e) * 10) +} + +// Convert a LogEst into an integer. +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ + var n U64 + n = U64(int32(x) % 10) + x = int16(int32(x) / 10) + if n >= uint64(5) { + n = n - uint64(2) + } else if n >= uint64(1) { + n = n - uint64(1) + } + if int32(x) > 60 { + return uint64(int64(0xffffffff) | I64(int64(0x7fffffff))<<32) + } + if int32(x) >= 3 { + return (n + uint64(8)) << (int32(x) - 3) + } + return (n + uint64(8)) >> (3 - int32(x)) +} + +// Add a new name/number pair to a VList. This might require that the +// VList object be reallocated, so return the new VList. If an OOM +// error occurs, the original VList returned and the +// db->mallocFailed flag is set. +// +// A VList is really just an array of integers. To destroy a VList, +// simply pass it to sqlite3DbFree(). +// +// The first integer is the number of integers allocated for the whole +// VList. The second integer is the number of integers actually used. +// Each name/number pair is encoded by subsequent groups of 3 or more +// integers. +// +// Each name/number pair starts with two integers which are the numeric +// value for the pair and the size of the name/number pair, respectively. +// The text name overlays one or more following integers. The text name +// is always zero-terminated. +// +// Conceptually: +// +// struct VList { +// int nAlloc; // Number of allocated slots +// int nUsed; // Number of used slots +// struct VListEntry { +// int iValue; // Value for this entry +// int nSlot; // Slots used by this entry +// // ... variable name goes here +// } a[0]; +// } +// +// During code generation, pointers to the variable names within the +// VList are taken. When that happens, nAlloc is set to zero as an +// indication that the VList may never again be enlarged, since the +// accompanying realloc() would invalidate the pointers. +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ + var nInt int32 // number of sizeof(int) objects needed for zName + var z uintptr // Pointer to where zName will be stored + var i int32 // Index in pIn[] where zName is stored + + nInt = nName/4 + 3 + // Verify ok to add new elements + if pIn == uintptr(0) || *(*VList)(unsafe.Pointer(pIn + 1*4))+nInt > *(*VList)(unsafe.Pointer(pIn)) { + // Enlarge the allocation + var nAlloc Sqlite3_int64 = func() int64 { + if pIn != 0 { + return int64(2) * Sqlite3_int64(*(*VList)(unsafe.Pointer(pIn))) + } + return int64(10) + }() + Sqlite3_int64(nInt) + var pOut uintptr = Xsqlite3DbRealloc(tls, db, pIn, uint64(nAlloc)*uint64(unsafe.Sizeof(int32(0)))) + if pOut == uintptr(0) { + return pIn + } + if pIn == uintptr(0) { + *(*VList)(unsafe.Pointer(pOut + 1*4)) = 2 + } + pIn = pOut + *(*VList)(unsafe.Pointer(pIn)) = VList(nAlloc) + } + i = *(*VList)(unsafe.Pointer(pIn + 1*4)) + *(*VList)(unsafe.Pointer(pIn + uintptr(i)*4)) = iVal + *(*VList)(unsafe.Pointer(pIn + uintptr(i+1)*4)) = nInt + z = pIn + uintptr(i+2)*4 + *(*VList)(unsafe.Pointer(pIn + 1*4)) = i + nInt + + libc.Xmemcpy(tls, z, zName, uint64(nName)) + *(*uint8)(unsafe.Pointer(z + uintptr(nName))) = uint8(0) + return pIn +} + +// Return a pointer to the name of a variable in the given VList that +// has the value iVal. Or return a NULL if there is no such variable in +// the list +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ + var i int32 + var mx int32 + if pIn == uintptr(0) { + return uintptr(0) + } + mx = *(*VList)(unsafe.Pointer(pIn + 1*4)) + i = 2 + for __ccgo := true; __ccgo; __ccgo = i < mx { + if *(*VList)(unsafe.Pointer(pIn + uintptr(i)*4)) == iVal { + return pIn + uintptr(i+2)*4 + } + i = i + *(*VList)(unsafe.Pointer(pIn + uintptr(i+1)*4)) + } + return uintptr(0) +} + +// Return the number of the variable named zName, if it is in VList. +// or return 0 if there is no such variable. +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ + var i int32 + var mx int32 + if pIn == uintptr(0) { + return 0 + } + mx = *(*VList)(unsafe.Pointer(pIn + 1*4)) + i = 2 + for __ccgo := true; __ccgo; __ccgo = i < mx { + var z uintptr = pIn + uintptr(i+2)*4 + if libc.Xstrncmp(tls, z, zName, uint64(nName)) == 0 && int32(*(*uint8)(unsafe.Pointer(z + uintptr(nName)))) == 0 { + return *(*VList)(unsafe.Pointer(pIn + uintptr(i)*4)) + } + i = i + *(*VList)(unsafe.Pointer(pIn + uintptr(i+1)*4)) + } + return 0 +} + +//************* End of util.c *********************************************** +//************* Begin file hash.c ******************************************* +// 2001 September 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This is the implementation of generic hash-tables +// used in SQLite. +// #include "sqliteInt.h" +// #include + +// Turn bulk memory into a hash table object by initializing the +// fields of the Hash structure. +// +// "pNew" is a pointer to the hash table that is to be initialized. +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ + + (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) + (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) + (*Hash)(unsafe.Pointer(pNew)).Fhtsize = uint32(0) + (*Hash)(unsafe.Pointer(pNew)).Fht = uintptr(0) +} + +// Remove all entries from a hash table. Reclaim all memory. +// Call this routine to delete a hash table or to reset a hash table +// to the empty state. +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ + var elem uintptr // For looping over all elements of the table + + elem = (*Hash)(unsafe.Pointer(pH)).Ffirst + (*Hash)(unsafe.Pointer(pH)).Ffirst = uintptr(0) + Xsqlite3_free(tls, (*Hash)(unsafe.Pointer(pH)).Fht) + (*Hash)(unsafe.Pointer(pH)).Fht = uintptr(0) + (*Hash)(unsafe.Pointer(pH)).Fhtsize = uint32(0) + for elem != 0 { + var next_elem uintptr = (*HashElem)(unsafe.Pointer(elem)).Fnext + Xsqlite3_free(tls, elem) + elem = next_elem + } + (*Hash)(unsafe.Pointer(pH)).Fcount = uint32(0) +} + +// The hashing function. +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ + var h uint32 = uint32(0) + var c uint8 + for int32(libc.AssignUint8(&c, uint8(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE + // Knuth multiplicative hashing. (Sorting & Searching, p. 510). + // 0x9e3779b1 is 2654435761 which is the closest prime number to + // (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2. + h = h + uint32(Xsqlite3UpperToLower[c]) + h = h * 0x9e3779b1 + } + return h +} + +// Link pNew element into the hash table pH. If pEntry!=0 then also +// insert pNew into the pEntry hash bucket. +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ + var pHead uintptr // First element already in pEntry + if pEntry != 0 { + if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { + pHead = (*_ht)(unsafe.Pointer(pEntry)).Fchain + } else { + pHead = uintptr(0) + } + (*_ht)(unsafe.Pointer(pEntry)).Fcount++ + (*_ht)(unsafe.Pointer(pEntry)).Fchain = pNew + } else { + pHead = uintptr(0) + } + if pHead != 0 { + (*HashElem)(unsafe.Pointer(pNew)).Fnext = pHead + (*HashElem)(unsafe.Pointer(pNew)).Fprev = (*HashElem)(unsafe.Pointer(pHead)).Fprev + if (*HashElem)(unsafe.Pointer(pHead)).Fprev != 0 { + (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(pHead)).Fprev)).Fnext = pNew + } else { + (*Hash)(unsafe.Pointer(pH)).Ffirst = pNew + } + (*HashElem)(unsafe.Pointer(pHead)).Fprev = pNew + } else { + (*HashElem)(unsafe.Pointer(pNew)).Fnext = (*Hash)(unsafe.Pointer(pH)).Ffirst + if (*Hash)(unsafe.Pointer(pH)).Ffirst != 0 { + (*HashElem)(unsafe.Pointer((*Hash)(unsafe.Pointer(pH)).Ffirst)).Fprev = pNew + } + (*HashElem)(unsafe.Pointer(pNew)).Fprev = uintptr(0) + (*Hash)(unsafe.Pointer(pH)).Ffirst = pNew + } +} + +// Resize the hash table so that it cantains "new_size" buckets. +// +// The hash table might fail to resize if sqlite3_malloc() fails or +// if the new size is the same as the prior size. +// Return TRUE if the resize occurs and false if not. +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ + var new_ht uintptr // The new hash table + var elem uintptr + var next_elem uintptr // For looping over existing elements + + if uint64(new_size)*uint64(unsafe.Sizeof(_ht{})) > uint64(SQLITE_MALLOC_SOFT_LIMIT) { + new_size = uint32(uint64(SQLITE_MALLOC_SOFT_LIMIT) / uint64(unsafe.Sizeof(_ht{}))) + } + if new_size == (*Hash)(unsafe.Pointer(pH)).Fhtsize { + return 0 + } + + // The inability to allocates space for a larger hash table is + // a performance hit but it is not a fatal error. So mark the + // allocation as a benign. Use sqlite3Malloc()/memset(0) instead of + // sqlite3MallocZero() to make the allocation, as sqlite3MallocZero() + // only zeroes the requested number of bytes whereas this module will + // use the actual amount of space allocated for the hash table (which + // may be larger than the requested amount). + Xsqlite3BeginBenignMalloc(tls) + new_ht = Xsqlite3Malloc(tls, uint64(uint64(new_size)*uint64(unsafe.Sizeof(_ht{})))) + Xsqlite3EndBenignMalloc(tls) + + if new_ht == uintptr(0) { + return 0 + } + Xsqlite3_free(tls, (*Hash)(unsafe.Pointer(pH)).Fht) + (*Hash)(unsafe.Pointer(pH)).Fht = new_ht + (*Hash)(unsafe.Pointer(pH)).Fhtsize = libc.AssignUint32(&new_size, uint32(uint64(Xsqlite3MallocSize(tls, new_ht))/uint64(unsafe.Sizeof(_ht{})))) + libc.Xmemset(tls, new_ht, 0, uint64(new_size)*uint64(unsafe.Sizeof(_ht{}))) + elem = (*Hash)(unsafe.Pointer(pH)).Ffirst + (*Hash)(unsafe.Pointer(pH)).Ffirst = uintptr(0) + for ; elem != 0; elem = next_elem { + var h uint32 = strHash(tls, (*HashElem)(unsafe.Pointer(elem)).FpKey) % new_size + next_elem = (*HashElem)(unsafe.Pointer(elem)).Fnext + insertElement(tls, pH, new_ht+uintptr(h)*16, elem) + } + return 1 +} + +// This function (for internal use only) locates an element in an +// hash table that matches the given key. If no element is found, +// a pointer to a static null element with HashElem.data==0 is returned. +// If pH is not NULL, then the hash for this key is written to *pH. +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ + var elem uintptr // Used to loop thru the element list + var count uint32 // Number of elements left to test + var h uint32 + + if (*Hash)(unsafe.Pointer(pH)).Fht != 0 { //OPTIMIZATION-IF-TRUE + var pEntry uintptr + h = strHash(tls, pKey) % (*Hash)(unsafe.Pointer(pH)).Fhtsize + pEntry = (*Hash)(unsafe.Pointer(pH)).Fht + uintptr(h)*16 + elem = (*_ht)(unsafe.Pointer(pEntry)).Fchain + count = (*_ht)(unsafe.Pointer(pEntry)).Fcount + } else { + h = uint32(0) + elem = (*Hash)(unsafe.Pointer(pH)).Ffirst + count = (*Hash)(unsafe.Pointer(pH)).Fcount + } + if pHash != 0 { + *(*uint32)(unsafe.Pointer(pHash)) = h + } + for libc.PostDecUint32(&count, 1) != 0 { + + if Xsqlite3StrICmp(tls, (*HashElem)(unsafe.Pointer(elem)).FpKey, pKey) == 0 { + return elem + } + elem = (*HashElem)(unsafe.Pointer(elem)).Fnext + } + return uintptr(unsafe.Pointer(&nullElement)) +} + +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ + +// Remove a single entry from the hash table given a pointer to that +// element and a hash on the element's key. +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ + var pEntry uintptr + if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { + (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext + } else { + (*Hash)(unsafe.Pointer(pH)).Ffirst = (*HashElem)(unsafe.Pointer(elem)).Fnext + } + if (*HashElem)(unsafe.Pointer(elem)).Fnext != 0 { + (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fnext)).Fprev = (*HashElem)(unsafe.Pointer(elem)).Fprev + } + if (*Hash)(unsafe.Pointer(pH)).Fht != 0 { + pEntry = (*Hash)(unsafe.Pointer(pH)).Fht + uintptr(h)*16 + if (*_ht)(unsafe.Pointer(pEntry)).Fchain == elem { + (*_ht)(unsafe.Pointer(pEntry)).Fchain = (*HashElem)(unsafe.Pointer(elem)).Fnext + } + + (*_ht)(unsafe.Pointer(pEntry)).Fcount-- + } + Xsqlite3_free(tls, elem) + (*Hash)(unsafe.Pointer(pH)).Fcount-- + if (*Hash)(unsafe.Pointer(pH)).Fcount == uint32(0) { + + Xsqlite3HashClear(tls, pH) + } +} + +// Attempt to locate an element of the hash table pH with a key +// that matches pKey. Return the data for this element if it is +// found, or NULL if there is no match. +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ + + return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata +} + +// Insert an element into the hash table pH. The key is pKey +// and the data is "data". +// +// If no element exists with a matching key, then a new +// element is created and NULL is returned. +// +// If another element already exists with the same key, then the +// new data replaces the old data and the old data is returned. +// The key is not copied in this instance. If a malloc fails, then +// the new data is returned and the hash table is unchanged. +// +// If the "data" parameter to this function is NULL, then the +// element corresponding to "key" is removed from the hash table. +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var h uint32 at bp, 4 + // the hash of the key modulo hash table size + var elem uintptr // Used to loop thru the element list + var new_elem uintptr // New element added to the pH + + elem = findElementWithHash(tls, pH, pKey, bp) + if (*HashElem)(unsafe.Pointer(elem)).Fdata != 0 { + var old_data uintptr = (*HashElem)(unsafe.Pointer(elem)).Fdata + if data == uintptr(0) { + removeElementGivenHash(tls, pH, elem, *(*uint32)(unsafe.Pointer(bp /* h */))) + } else { + (*HashElem)(unsafe.Pointer(elem)).Fdata = data + (*HashElem)(unsafe.Pointer(elem)).FpKey = pKey + } + return old_data + } + if data == uintptr(0) { + return uintptr(0) + } + new_elem = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(HashElem{}))) + if new_elem == uintptr(0) { + return data + } + (*HashElem)(unsafe.Pointer(new_elem)).FpKey = pKey + (*HashElem)(unsafe.Pointer(new_elem)).Fdata = data + (*Hash)(unsafe.Pointer(pH)).Fcount++ + if (*Hash)(unsafe.Pointer(pH)).Fcount >= uint32(10) && (*Hash)(unsafe.Pointer(pH)).Fcount > uint32(2)*(*Hash)(unsafe.Pointer(pH)).Fhtsize { + if rehash(tls, pH, (*Hash)(unsafe.Pointer(pH)).Fcount*uint32(2)) != 0 { + + *(*uint32)(unsafe.Pointer(bp /* h */)) = strHash(tls, pKey) % (*Hash)(unsafe.Pointer(pH)).Fhtsize + } + } + insertElement(tls, pH, func() uintptr { + if (*Hash)(unsafe.Pointer(pH)).Fht != 0 { + return (*Hash)(unsafe.Pointer(pH)).Fht + uintptr(*(*uint32)(unsafe.Pointer(bp)))*16 + } + return uintptr(0) + }(), new_elem) + return uintptr(0) +} + +//************* End of hash.c *********************************************** +//************* Begin file opcodes.c **************************************** +// Automatically generated. Do not edit +// See the tool/mkopcodec.tcl script for details. +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ + return azName[i] +} + +var azName = [185]uintptr{ + ts + 1642, + ts + 1652, + ts + 1663, + ts + 1675, + ts + 1686, + ts + 1691, + ts + 1696, + ts + 1707, + ts + 1719, + ts + 1726, + ts + 1734, + ts + 1742, + ts + 1747, + ts + 1753, + ts + 1767, + ts + 1773, + ts + 1783, + ts + 1788, + ts + 1793, + ts + 1796, + ts + 1800, + ts + 1806, + ts + 1819, + ts + 1829, + ts + 1836, + ts + 1843, + ts + 1850, + ts + 1857, + ts + 1867, + ts + 1876, + ts + 1887, + ts + 1896, + ts + 1902, + ts + 1912, + ts + 1922, + ts + 1927, + ts + 1937, + ts + 1948, + ts + 1953, + ts + 1960, + ts + 1966, + ts + 1972, + ts + 1978, + ts + 1984, + ts + 1987, + ts + 1991, + ts + 2002, + ts + 2013, + ts + 2021, + ts + 2030, + ts + 2036, + ts + 2043, + ts + 2051, + ts + 2054, + ts + 2057, + ts + 2060, + ts + 2063, + ts + 2066, + ts + 2069, + ts + 2076, + ts + 2086, + ts + 2099, + ts + 2110, + ts + 2116, + ts + 2123, + ts + 2128, + ts + 2137, + ts + 2146, + ts + 2153, + ts + 2166, + ts + 2177, + ts + 2182, + ts + 2190, + ts + 2196, + ts + 2203, + ts + 2208, + ts + 2217, + ts + 2222, + ts + 2231, + ts + 2236, + ts + 2241, + ts + 2247, + ts + 2255, + ts + 2263, + ts + 2273, + ts + 2281, + ts + 2288, + ts + 2301, + ts + 2306, + ts + 2318, + ts + 2326, + ts + 2333, + ts + 2344, + ts + 2351, + ts + 2358, + ts + 2368, + ts + 2377, + ts + 2388, + ts + 2394, + ts + 2405, + ts + 2415, + ts + 2425, + ts + 2434, + ts + 2441, + ts + 2447, + ts + 2457, + ts + 2468, + ts + 2472, + ts + 2481, + ts + 2490, + ts + 2497, + ts + 2507, + ts + 2514, + ts + 2524, + ts + 2532, + ts + 2539, + ts + 2553, + ts + 2567, + ts + 2575, + ts + 2586, + ts + 2599, + ts + 2610, + ts + 2616, + ts + 2628, + ts + 2637, + ts + 2645, + ts + 2654, + ts + 2663, + ts + 2670, + ts + 2678, + ts + 2685, + ts + 2696, + ts + 2710, + ts + 2721, + ts + 2729, + ts + 2735, + ts + 2743, + ts + 2751, + ts + 2761, + ts + 2774, + ts + 2784, + ts + 2797, + ts + 2806, + ts + 2817, + ts + 2825, + ts + 2831, + ts + 2843, + ts + 2855, + ts + 2863, + ts + 2875, + ts + 2888, + ts + 2898, + ts + 2908, + ts + 2920, + ts + 2925, + ts + 2937, + ts + 2947, + ts + 2953, + ts + 2963, + ts + 2970, + ts + 2982, + ts + 2993, + ts + 3001, + ts + 3010, + ts + 3019, + ts + 3028, + ts + 3035, + ts + 3046, + ts + 3059, + ts + 3069, + ts + 3076, + ts + 3084, + ts + 3093, + ts + 3099, + ts + 3107, + ts + 3115, + ts + 3123, + ts + 3133, + ts + 3142, + ts + 3152, + ts + 3158, + ts + 3169, + ts + 3180, + ts + 3185, + ts + 3193, +} /* sqlite3.c:34589:20 */ + +//************* End of opcodes.c ******************************************** +//************* Begin file os_unix.c **************************************** +// 2004 May 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains the VFS implementation for unix-like operating systems +// include Linux, MacOSX, *BSD, QNX, VxWorks, AIX, HPUX, and others. +// +// There are actually several different VFS implementations in this file. +// The differences are in the way that file locking is done. The default +// implementation uses Posix Advisory Locks. Alternative implementations +// use flock(), dot-files, various proprietary locking schemas, or simply +// skip locking all together. +// +// This source file is organized into divisions where the logic for various +// subfunctions is contained within the appropriate division. PLEASE +// KEEP THE STRUCTURE OF THIS FILE INTACT. New code should be placed +// in the correct division and should be clearly labeled. +// +// The layout of divisions is as follows: +// +// * General-purpose declarations and utility functions. +// * Unique file ID logic used by VxWorks. +// * Various locking primitive implementations (all except proxy locking): +// + for Posix Advisory Locks +// + for no-op locks +// + for dot-file locks +// + for flock() locking +// + for named semaphore locks (VxWorks only) +// + for AFP filesystem locks (MacOSX only) +// * sqlite3_file methods not associated with locking. +// * Definitions of sqlite3_io_methods objects for all locking +// methods plus "finder" functions for each locking method. +// * sqlite3_vfs method implementations. +// * Locking primitives for the proxy uber-locking-method. (MacOSX only) +// * Definitions of sqlite3_vfs objects for all locking methods +// plus implementations of sqlite3_os_init() and sqlite3_os_end(). +// #include "sqliteInt.h" + +// There are various methods for file locking used for concurrency +// control: +// +// 1. POSIX locking (the default), +// 2. No locking, +// 3. Dot-file locking, +// 4. flock() locking, +// 5. AFP locking (OSX only), +// 6. Named POSIX semaphores (VXWorks only), +// 7. proxy locking. (OSX only) +// +// Styles 4, 5, and 7 are only available of SQLITE_ENABLE_LOCKING_STYLE +// is defined to 1. The SQLITE_ENABLE_LOCKING_STYLE also enables automatic +// selection of the appropriate locking style based on the filesystem +// where the database is located. + +// Use pread() and pwrite() if they are available + +// standard include files. +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.6 Primitive System Data Types + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 5.6 File Characteristics + +// Copyright (C) 1991-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// NB: Include guard matches what uses. + +// The Single Unix specification says that some more types are +// available here. + +// Copyright (C) 1992-2021 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 +// . + +// Definition for struct stat. +// Copyright (C) 2020-2021 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 +// . + +// Endian macros for string.h functions +// Copyright (C) 1992-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +type stat = struct { + Fst_dev X__dev_t + Fst_ino X__ino64_t + Fst_mode X__mode_t + Fst_nlink X__nlink_t + Fst_uid X__uid_t + Fst_gid X__gid_t + Fst_rdev X__dev_t + F__pad1 X__dev_t + Fst_size X__off64_t + Fst_blksize X__blksize_t + F__pad2 int32 + Fst_blocks X__blkcnt64_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [2]int32 +} /* struct_stat.h:44:1 */ + +type stat64 = struct { + Fst_dev X__dev_t + Fst_ino X__ino64_t + Fst_mode X__mode_t + Fst_nlink X__nlink_t + Fst_uid X__uid_t + Fst_gid X__gid_t + Fst_rdev X__dev_t + F__pad1 X__dev_t + Fst_size X__off64_t + Fst_blksize X__blksize_t + F__pad2 int32 + Fst_blocks X__blkcnt64_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [2]int32 +} /* struct_stat.h:85:1 */ + +// statx-related definitions and declarations. Linux version. +// Copyright (C) 2018-2021 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 +// . + +// This interface is based on in Linux. + +// Use the Linux kernel header if available. + +// Use "" to work around incorrect macro expansion of the +// __has_include argument (GCC PR 80005). +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +// int-ll64 is used everywhere now. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +// asm-generic/int-ll64.h +// +// Integer declarations for architectures which use "long long" +// for 64-bit types. + +// SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note +// Copyright (C) 2012 ARM Ltd. +// Copyright (C) 2015 Regents of the University of California + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// There seems to be no way of detecting this automatically from user +// space, so 64 bit architectures should override this in their +// bitsperlong.h. In particular, an architecture that supports +// both 32 and 64 bit user space must not rely on CONFIG_64BIT +// to decide it, but rather check a compiler provided macro. + +// __xx is ok: it doesn't pollute the POSIX namespace. Use these in the +// header files exported to user space + +type X__s8 = int8 /* int-ll64.h:20:25 */ +type X__u8 = uint8 /* int-ll64.h:21:23 */ + +type X__s16 = int16 /* int-ll64.h:23:26 */ +type X__u16 = uint16 /* int-ll64.h:24:24 */ + +type X__s32 = int32 /* int-ll64.h:26:24 */ +type X__u32 = uint32 /* int-ll64.h:27:22 */ + +type X__s64 = int64 /* int-ll64.h:30:44 */ +type X__u64 = uint64 /* int-ll64.h:31:42 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This allows for 1024 file descriptors: if NR_OPEN is ever grown +// beyond that you'll have to change this too. But 1024 fd's seem to be +// enough even for such "real" unices like OSF/1, so hopefully this is +// one limit that doesn't have to be changed [again]. +// +// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in +// (and thus ) - but this is a more logical +// place for them. Solved by having dummy defines in . + +// This macro may have been defined in . But we always +// use the one here. + +type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ + +// Type of a signal handler. +type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ + +// Type of a SYSV IPC key. +type X__kernel_key_t = int32 /* posix_types.h:33:13 */ +type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note +// Copyright (C) 2012 ARM Ltd. +// Copyright (C) 2015 Regents of the University of California + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. +// +// First the types that are often defined in different ways across +// architectures, so that you can override them. + +type X__kernel_long_t = int64 /* posix_types.h:15:15 */ +type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ + +type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ + +type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ + +type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ + +type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ + +type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ +type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ + +type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ + +type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ + +type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ +type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ + +type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */ +type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */ + +type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */ + +// Most 32 bit architectures use "unsigned int" size_t, +// and all 64 bit architectures use "unsigned long" size_t. +type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ +type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ +type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ + +type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ + +// anything below here should be completely generic +type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ +type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ +type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ +type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ +type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ +type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ +type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ +type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ +type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ +type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ +type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ + +// Below are truly Linux-specific types that should never collide with +// any application/library that wants linux/types.h. + +type X__le16 = X__u16 /* types.h:24:25 */ +type X__be16 = X__u16 /* types.h:25:25 */ +type X__le32 = X__u32 /* types.h:26:25 */ +type X__be32 = X__u32 /* types.h:27:25 */ +type X__le64 = X__u64 /* types.h:28:25 */ +type X__be64 = X__u64 /* types.h:29:25 */ + +type X__sum16 = X__u16 /* types.h:31:25 */ +type X__wsum = X__u32 /* types.h:32:25 */ + +// aligned_u64 should be used in defining kernel<->userspace ABIs to avoid +// common 32/64-bit compat problems. +// 64-bit values align to 4-byte boundaries on x86_32 (and possibly other +// architectures) and to 8-byte boundaries on 64-bit architectures. The new +// aligned_64 type enforces 8-byte alignment so that structs containing +// aligned_64 values have the same alignment on 32-bit and 64-bit architectures. +// No conversions are necessary between 32-bit user-space and a 64-bit kernel. + +type X__poll_t = uint32 /* types.h:47:28 */ + +// Timestamp structure for the timestamps in struct statx. +// +// tv_sec holds the number of seconds before (negative) or after (positive) +// 00:00:00 1st January 1970 UTC. +// +// tv_nsec holds a number of nanoseconds (0..999,999,999) after the tv_sec time. +// +// __reserved is held in case we need a yet finer resolution. +type statx_timestamp = struct { + Ftv_sec X__s64 + Ftv_nsec X__u32 + F__reserved X__s32 +} /* stat.h:56:1 */ + +// Structures for the extended file attribute retrieval system call +// (statx()). +// +// The caller passes a mask of what they're specifically interested in as a +// parameter to statx(). What statx() actually got will be indicated in +// st_mask upon return. +// +// For each bit in the mask argument: +// +// - if the datum is not supported: +// +// - the bit will be cleared, and +// +// - the datum will be set to an appropriate fabricated value if one is +// available (eg. CIFS can take a default uid and gid), otherwise +// +// - the field will be cleared; +// +// - otherwise, if explicitly requested: +// +// - the datum will be synchronised to the server if AT_STATX_FORCE_SYNC is +// set or if the datum is considered out of date, and +// +// - the field will be filled in and the bit will be set; +// +// - otherwise, if not requested, but available in approximate form without any +// effort, it will be filled in anyway, and the bit will be set upon return +// (it might not be up to date, however, and no attempt will be made to +// synchronise the internal state first); +// +// - otherwise the field and the bit will be cleared before returning. +// +// Items in STATX_BASIC_STATS may be marked unavailable on return, but they +// will have values installed for compatibility purposes so that stat() and +// co. can be emulated in userspace. +type statx = struct { + Fstx_mask X__u32 + Fstx_blksize X__u32 + Fstx_attributes X__u64 + Fstx_nlink X__u32 + Fstx_uid X__u32 + Fstx_gid X__u32 + Fstx_mode X__u16 + F__spare0 [1]X__u16 + Fstx_ino X__u64 + Fstx_size X__u64 + Fstx_blocks X__u64 + Fstx_attributes_mask X__u64 + Fstx_atime struct { + Ftv_sec X__s64 + Ftv_nsec X__u32 + F__reserved X__s32 + } + Fstx_btime struct { + Ftv_sec X__s64 + Ftv_nsec X__u32 + F__reserved X__s32 + } + Fstx_ctime struct { + Ftv_sec X__s64 + Ftv_nsec X__u32 + F__reserved X__s32 + } + Fstx_mtime struct { + Ftv_sec X__s64 + Ftv_nsec X__u32 + F__reserved X__s32 + } + Fstx_rdev_major X__u32 + Fstx_rdev_minor X__u32 + Fstx_dev_major X__u32 + Fstx_dev_minor X__u32 + Fstx_mnt_id X__u64 + F__spare2 X__u64 + F__spare3 [12]X__u64 +} /* stat.h:99:1 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 6.5 File Control Operations + +// Copyright (C) 1991-2021 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 +// . + +// This must be early so can define types winningly. + +// Get __mode_t, __dev_t and __off_t . +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Get the definitions of O_*, F_*, FD_*: all the +// numbers and flag bits for `open', `fcntl', et al. +// O_*, F_*, FD_* bit values for Linux / RISC-V. +// Copyright (C) 2011-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// In 64-bit ISA files are always with 64bit off_t and F_*LK64 are the same as +// non-64-bit versions. It will need to be revised for 128-bit. + +type flock = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start X__off_t + Fl_len X__off_t + Fl_pid X__pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:36:1 */ + +type flock64 = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start X__off64_t + Fl_len X__off64_t + Fl_pid X__pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:51:1 */ + +// Include generic Linux declarations. +// O_*, F_*, FD_* bit values for Linux. +// Copyright (C) 2001-2021 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 +// . + +// This file contains shared definitions between Linux architectures +// and is included by to declare them. The various +// #ifndef cases allow the architecture specific file to define those +// values with different values. +// +// A minimal contains just: +// +// struct flock {...} +// #ifdef __USE_LARGEFILE64 +// struct flock64 {...} +// #endif +// #include + +// Define struct iovec. +// Copyright (C) 1996-2021 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) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// If this symbol has done its job, get rid of it. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Offset of member MEMBER in a struct of type TYPE. + +// Structure for scatter/gather I/O. +type iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* struct_iovec.h:26:1 */ + +// Structure to use with F_GETOWN_EX and F_SETOWN_EX. +type f_owner_ex = struct { + Ftype uint32 + Fpid X__pid_t +} /* fcntl-linux.h:274:1 */ + +// Types of seals. + +// Hint values for F_{GET,SET}_RW_HINT. + +// Define some more compatibility macros to be backward compatible with +// BSD systems which did not managed to hide these kernel macros. + +// Advise to `posix_fadvise'. + +// Flags for SYNC_FILE_RANGE. +// SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are +// written to disk before returning. + +// Flags for SPLICE and VMSPLICE. + +// Flags for fallocate. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// FALLOC_FL_COLLAPSE_RANGE is used to remove a range of a file +// without leaving a hole in the file. The contents of the file beyond +// the range being removed is appended to the start offset of the range +// being removed (i.e. the hole that was punched is "collapsed"), +// resulting in a file layout that looks like the range that was +// removed never existed. As such collapsing a range of a file changes +// the size of the file, reducing it by the same length of the range +// that has been removed by the operation. +// +// Different filesystems may implement different limitations on the +// granularity of the operation. Most will limit operations to +// filesystem block size boundaries, but this boundary may be larger or +// smaller depending on the filesystem and/or the configuration of the +// filesystem or file. +// +// Attempting to collapse a range that crosses the end of the file is +// considered an illegal operation - just use ftruncate(2) if you need +// to collapse a range that crosses EOF. + +// FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably +// without issuing data IO. Blocks should be preallocated for the regions that +// span holes in the file, and the entire range is preferable converted to +// unwritten extents - even though file system may choose to zero out the +// extent or do whatever which will result in reading zeros from the range +// while the range remains allocated for the file. +// +// This can be also used to preallocate blocks past EOF in the same way as +// with fallocate. Flag FALLOC_FL_KEEP_SIZE should cause the inode +// size to remain the same. + +// FALLOC_FL_INSERT_RANGE is use to insert space within the file size without +// overwriting any existing data. The contents of the file beyond offset are +// shifted towards right by len bytes to create a hole. As such, this +// operation will increase the size of the file by len bytes. +// +// Different filesystems may implement different limitations on the granularity +// of the operation. Most will limit operations to filesystem block size +// boundaries, but this boundary may be larger or smaller depending on +// the filesystem and/or the configuration of the filesystem or file. +// +// Attempting to insert space using this flag at OR beyond the end of +// the file is considered an illegal operation - just use ftruncate(2) or +// fallocate(2) with mode 0 for such type of operations. + +// FALLOC_FL_UNSHARE_RANGE is used to unshare shared blocks within the +// file size without overwriting any existing data. The purpose of this +// call is to preemptively reallocate any blocks that are subject to +// copy-on-write. +// +// Different filesystems may implement different limitations on the +// granularity of the operation. Most will limit operations to filesystem +// block size boundaries, but this boundary may be larger or smaller +// depending on the filesystem and/or the configuration of the filesystem +// or file. +// +// This flag can only be used with allocate-mode fallocate, which is +// to say that it cannot be used with the punch, zero, collapse, or +// insert range modes. + +// File handle structure. +type file_handle = struct { + F__ccgo_pad1 [0]uint32 + Fhandle_bytes uint32 + Fhandle_type int32 +} /* fcntl-linux.h:358:1 */ + +// Define some inlines helping to catch common problems. + +// Copyright (C) 1991-2021 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-2021 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 +// . + +// Get the list of `ioctl' requests and related constants. +// Copyright (C) 1996-2021 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 +// . + +// Use the definitions from the kernel header files. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// ioctl command encoding: 32 bits total, command in lower 16 bits, +// size of the parameter structure in the lower 14 bits of the +// upper 16 bits. +// Encoding the size of the parameter structure in the ioctl request +// is useful for catching programs compiled with old versions +// and to avoid overwriting user space outside the user buffer area. +// The highest 2 bits are reserved for indicating the ``access mode''. +// NOTE: This limits the max parameter size to 16kB -1 ! + +// The following is for compatibility across the various Linux +// platforms. The generic ioctl numbering scheme doesn't really enforce +// a type field. De facto, however, the top 8 bits of the lower 16 +// bits are indeed used as a type field, so we might just as well make +// this explicit here. Please be sure to use the decoding macros +// below from now on. + +// Let any architecture override either of the following before +// including this file. + +// Direction bits, which any architecture can choose to override +// before including this file. +// +// NOTE: _IOC_WRITE means userland is writing and kernel is +// reading. _IOC_READ means userland is reading and kernel is writing. + +// Used to create numbers. +// +// NOTE: _IOW means userland is writing and kernel is reading. _IOR +// means userland is reading and kernel is writing. + +// used to decode ioctl numbers.. + +// ...and for the drivers/sound files... + +// These are the most common definitions for tty ioctl numbers. +// Most of them do not use the recommended _IOC(), but there is +// probably some source code out there hardcoding the number, +// so we might as well use them for all new platforms. +// +// The architectures that use different values here typically +// try to be compatible with some Unix variants for the same +// architecture. + +// 0x54 is just a magic number to make these relatively unique ('T') + +// Some arches already define FIOQSIZE due to a historical +// conflict with a Hayes modem-specific ioctl value. + +// Used for packet mode + +// Routing table calls. + +// Socket configuration controls. + +// ARP cache control calls. +// 0x8950 - 0x8952 * obsolete calls, don't re-use + +// RARP cache control calls. + +// Driver configuration calls + +// DLCI configuration calls + +// Device private ioctl calls. + +// These 16 ioctls are available to devices via the do_ioctl() device +// vector. Each device should include this file and redefine these +// names as their own. Because these are device dependent it is a good +// idea _NOT_ to issue them to random objects and hope. + +// These 16 ioctl calls are protocol private + +// Define some types used by `ioctl' requests. +// Structure types for pre-termios terminal ioctls. Linux version. +// Copyright (C) 1996-2021 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 +// . + +// Get definition of constants for use with `ioctl'. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +type winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} /* ioctl-types.h:27:1 */ + +type termio = struct { + Fc_iflag uint16 + Fc_oflag uint16 + Fc_cflag uint16 + Fc_lflag uint16 + Fc_line uint8 + Fc_cc [8]uint8 + F__ccgo_pad1 [1]byte +} /* ioctl-types.h:36:1 */ + +// Copyright (C) 1991-2021 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 +// . + +// POSIX Standard: 2.10 Symbolic Constants + +// Copyright (C) 1991-2021 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 +// . + +// These may be used to determine what facilities are present at compile time. +// Their values can be obtained at run time from `sysconf'. + +// POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. + +// These are not #ifdef __USE_POSIX2 because they are +// in the theoretically application-owned namespace. + +// The utilities on GNU systems also correspond to this version. + +// The utilities on GNU systems also correspond to this version. + +// This symbol was required until the 2001 edition of POSIX. + +// If defined, the implementation supports the +// C Language Bindings Option. + +// If defined, the implementation supports the +// C Language Development Utilities Option. + +// If defined, the implementation supports the +// Software Development Utilities Option. + +// If defined, the implementation supports the +// creation of locales with the localedef utility. + +// X/Open version number to which the library conforms. It is selectable. + +// Commands and utilities from XPG4 are available. + +// We are compatible with the old published standards as well. + +// The X/Open Unix extensions are available. + +// The enhanced internationalization capabilities according to XPG4.2 +// are present. + +// The legacy interfaces are also available. + +// Get values of POSIX options: +// +// If these symbols are defined, the corresponding features are +// always available. If not, they may be available sometimes. +// The current values can be obtained with `sysconf'. +// +// _POSIX_JOB_CONTROL Job control is supported. +// _POSIX_SAVED_IDS Processes have a saved set-user-ID +// and a saved set-group-ID. +// _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. +// _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. +// _POSIX_TIMERS POSIX.4 clocks and timers are supported. +// _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. +// _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. +// _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. +// _POSIX_FSYNC The fsync function is present. +// _POSIX_MAPPED_FILES Mapping of files to memory is supported. +// _POSIX_MEMLOCK Locking of all memory is supported. +// _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. +// _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. +// _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. +// _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. +// _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. +// _POSIX_THREADS POSIX.1c pthreads are supported. +// _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. +// _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. +// _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. +// _POSIX_THREAD_PRIORITY_SCHEDULING +// POSIX.1c thread execution scheduling supported. +// _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. +// _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. +// _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. +// _POSIX_PII Protocol-independent interfaces are supported. +// _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. +// _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. +// _POSIX_PII_INTERNET Internet family of protocols supported. +// _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. +// _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. +// _POSIX_PII_OSI ISO/OSI family of protocols supported. +// _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. +// _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. +// _POSIX_POLL Implementation supports `poll' function. +// _POSIX_SELECT Implementation supports `select' and `pselect'. +// +// _XOPEN_REALTIME X/Open realtime support is available. +// _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. +// _XOPEN_SHM Shared memory interface according to XPG4.2. +// +// _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit +// int, long, pointer, and off_t types. +// _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit +// int, long, and pointer and off_t with at least +// 64 bits. +// _XBS5_LP64_OFF64 Implementation provides environment with 32-bit +// int, and 64-bit long, pointer, and off_t types. +// _XBS5_LPBIG_OFFBIG Implementation provides environment with at +// least 32 bits int and long, pointer, and off_t +// with at least 64 bits. +// +// If any of these symbols is defined as -1, the corresponding option is not +// true for any file. If any is defined as other than -1, the corresponding +// option is true for all files. If a symbol is not defined at all, the value +// for a specific file can be obtained from `pathconf' and `fpathconf'. +// +// _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change +// the owner of a file. `chown' can only be used +// to change the group ID of a file to a group of +// which the calling process is a member. +// _POSIX_NO_TRUNC Pathname components longer than +// NAME_MAX generate an error. +// _POSIX_VDISABLE If defined, if the value of an element of the +// `c_cc' member of `struct termios' is +// _POSIX_VDISABLE, no character will have the +// effect associated with that element. +// _POSIX_SYNC_IO Synchronous I/O may be performed. +// _POSIX_ASYNC_IO Asynchronous I/O may be performed. +// _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. +// +// Support for the Large File Support interface is not generally available. +// If it is available the following constants are defined to one. +// _LFS64_LARGEFILE Low-level I/O supports large files. +// _LFS64_STDIO Standard I/O supports large files. +// + +// Define POSIX options for Linux. +// Copyright (C) 1996-2021 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; see the file COPYING.LIB. If +// not, see . + +// Job control is supported. + +// Processes have a saved set-user-ID and a saved set-group-ID. + +// Priority scheduling is not supported with the correct semantics, +// but GNU/Linux applications expect that the corresponding interfaces +// are available, even though the semantics do not meet the POSIX +// requirements. See glibc bug 14829. + +// Synchronizing file data is supported. + +// The fsync function is present. + +// Mapping of files to memory is supported. + +// Locking of all memory is supported. + +// Locking of ranges of memory is supported. + +// Setting of memory protections is supported. + +// Some filesystems allow all users to change file ownership. + +// `c_cc' member of 'struct termios' structure can be disabled by +// using the value _POSIX_VDISABLE. + +// Filenames are not silently truncated. + +// X/Open realtime support is available. + +// X/Open thread realtime support is available. + +// XPG4.2 shared memory is supported. + +// Tell we have POSIX threads. + +// We have the reentrant functions described in POSIX. + +// We provide priority scheduling for threads. + +// We support user-defined stack sizes. + +// We support user-defined stacks. + +// We support priority inheritence. + +// We support priority protection, though only for non-robust +// mutexes. + +// We support priority inheritence for robust mutexes. + +// We do not support priority protection for robust mutexes. + +// We support POSIX.1b semaphores. + +// Real-time signals are supported. + +// We support asynchronous I/O. +// Alternative name for Unix98. +// Support for prioritization is also available. + +// The LFS support in asynchronous I/O is also available. + +// The rest of the LFS is also available. + +// POSIX shared memory objects are implemented. + +// CPU-time clocks support needs to be checked at runtime. + +// Clock support in threads must be also checked at runtime. + +// GNU libc provides regular expression handling. + +// Reader/Writer locks are available. + +// We have a POSIX shell. + +// We support the Timeouts option. + +// We support spinlocks. + +// The `spawn' function family is supported. + +// We have POSIX timers. + +// The barrier functions are available. + +// POSIX message queues are available. + +// Thread process-shared synchronization is supported. + +// The monotonic clock might be available. + +// The clock selection interfaces are available. + +// Advisory information interfaces are available. + +// IPv6 support is available. + +// Raw socket support is available. + +// We have at least one terminal. + +// Neither process nor thread sporadic server interfaces is available. + +// trace.h is not available. + +// Typed memory objects are not available. + +// Get the environment definitions from Unix98. +// Copyright (C) 2020-2021 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 +// . + +// Determine the wordsize from the preprocessor defines. RISC-V version. +// Copyright (C) 2002-2021 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 +// . + +// This header should define the following symbols under the described +// situations. A value `1' means that the model is always supported, +// `-1' means it is never supported. Undefined means it cannot be +// statically decided. +// +// _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type +// _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type +// +// _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type +// _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type +// +// The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, +// _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, +// _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were +// used in previous versions of the Unix standard and are available +// only for compatibility. + +// We can never provide environments with 32-bit wide pointers. +// We also have no use (for now) for an environment with bigger pointers +// and offsets. + +// By default we have 64-bit wide `long int', pointers and `off_t'. + +// Standard file descriptors. + +// All functions that are not declared anywhere else. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// Copyright (C) 1989-2021 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC 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 General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +// ISO C Standard: 7.17 Common definitions + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// If this symbol has done its job, get rid of it. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Offset of member MEMBER in a struct of type TYPE. + +// The Single Unix specification says that some more types are +// available here. + +type Intptr_t = X__intptr_t /* unistd.h:267:20 */ + +type Socklen_t = X__socklen_t /* unistd.h:274:21 */ + +// #include +// Copyright (C) 1991-2021 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-2021 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 +// . + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2021 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 +// . + +// Never include this file directly; use instead. + +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2021 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 +// . + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets + +// Macros for converting between `struct timeval' and `struct timespec'. + +// Structure crudely representing a timezone. +// This is obsolete and should never be used. +type timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:52:1 */ + +// Type of the second argument to `getitimer' and +// the second and third arguments `setitimer'. +type itimerval = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t + } +} /* time.h:130:1 */ + +// Use the nicer parameter type only in GNU mode and not for C++ since the +// strict C++ rules prevent the automatic promotion. +type X__itimer_which_t = uint32 /* time.h:141:29 */ + +// Define error_t. +// Copyright (C) 1991-2021 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 +// . + +type Error_t = int32 /* error_t.h:22:13 */ + +// Try to determine if gethostuuid() is available based on standard +// macros. This might sometimes compute the wrong value for some +// obscure platforms. For those cases, simply compile with one of +// the following: +// +// -DHAVE_GETHOSTUUID=0 +// -DHAVE_GETHOSTUUID=1 +// +// None if this matters except when building on Apple products with +// -DSQLITE_ENABLE_LOCKING_STYLE. + +// Allowed values of unixFile.fsFlags + +// If we are to be thread-safe, include the pthreads header. +// # include + +// Default permissions when creating a new file + +// Default permissions when creating auto proxy dir + +// Maximum supported path-length. + +// Maximum supported symbolic links + +// Always cast the getpid() return type for compatibility with +// kernel modules in VxWorks. + +// Only set the lastErrno if the error code is a real error and not +// a normal expected return code of SQLITE_BUSY or SQLITE_OK + +// Forward references +type unixShm = struct { + FpShmNode uintptr + FpNext uintptr + FhasMutex U8 + Fid U8 + FsharedMask U16 + FexclMask U16 + F__ccgo_pad1 [2]byte +} /* sqlite3.c:34978:9 */ + +// Try to determine if gethostuuid() is available based on standard +// macros. This might sometimes compute the wrong value for some +// obscure platforms. For those cases, simply compile with one of +// the following: +// +// -DHAVE_GETHOSTUUID=0 +// -DHAVE_GETHOSTUUID=1 +// +// None if this matters except when building on Apple products with +// -DSQLITE_ENABLE_LOCKING_STYLE. + +// Allowed values of unixFile.fsFlags + +// If we are to be thread-safe, include the pthreads header. +// # include + +// Default permissions when creating a new file + +// Default permissions when creating auto proxy dir + +// Maximum supported path-length. + +// Maximum supported symbolic links + +// Always cast the getpid() return type for compatibility with +// kernel modules in VxWorks. + +// Only set the lastErrno if the error code is a real error and not +// a normal expected return code of SQLITE_BUSY or SQLITE_OK + +// Forward references +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory +type unixShmNode = struct { + FpInode uintptr + FpShmMutex uintptr + FzFilename uintptr + FhShm int32 + FszRegion int32 + FnRegion U16 + FisReadonly U8 + FisUnlocked U8 + F__ccgo_pad1 [4]byte + FapRegion uintptr + FnRef int32 + F__ccgo_pad2 [4]byte + FpFirst uintptr + FaLock [8]int32 +} /* sqlite3.c:34978:9 */ + +// Connection shared memory +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance +type unixInodeInfo = struct { + FfileId struct { + Fdev Dev_t + Fino U64 + } + FpLockMutex uintptr + FnShared int32 + FnLock int32 + FeFileLock uint8 + FbProcessLock uint8 + F__ccgo_pad1 [6]byte + FpUnused uintptr + FnRef int32 + F__ccgo_pad2 [4]byte + FpShmNode uintptr + FpNext uintptr + FpPrev uintptr +} /* sqlite3.c:34978:9 */ + +// Shared memory instance +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node +type UnixUnusedFd1 = struct { + Ffd int32 + Fflags int32 + FpNext uintptr +} /* sqlite3.c:34978:9 */ + +// An i-node +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ + +// The unixFile structure is subclass of sqlite3_file specific to the unix +// VFS implementations. +type unixFile = struct { + FpMethod uintptr + FpVfs uintptr + FpInode uintptr + Fh int32 + FeFileLock uint8 + F__ccgo_pad1 [1]byte + FctrlFlags uint16 + FlastErrno int32 + F__ccgo_pad2 [4]byte + FlockingContext uintptr + FpPreallocatedUnused uintptr + FzPath uintptr + FpShm uintptr + FszChunk int32 + FnFetchOut int32 + FmmapSize Sqlite3_int64 + FmmapSizeActual Sqlite3_int64 + FmmapSizeMax Sqlite3_int64 + FpMapRegion uintptr + FsectorSize int32 + FdeviceCharacteristics int32 +} /* sqlite3.c:34999:9 */ + +// The unixFile structure is subclass of sqlite3_file specific to the unix +// VFS implementations. +type UnixFile = unixFile /* sqlite3.c:34999:25 */ + +// This variable holds the process id (pid) from when the xRandomness() +// 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:35060:14 */ + +// Allowed values for the unixFile.ctrlFlags bitmask: + +// Include code that is common to all os_*.c files +// #include "os_common.h" + +// Define various macros that are missing from some systems. + +// The threadid macro resolves to the thread-id or to 0. Used for +// testing and debugging only. + +// HAVE_MREMAP defaults to true on Linux and false everywhere else. + +// Explicitly call the 64-bit version of lseek() on Android. Otherwise, lseek() +// is the 32-bit version, even if _FILE_OFFSET_BITS=64 is defined. + +// Linux-specific IOCTL magic numbers used for controlling F2FS + +// Different Unix systems declare open() in different ways. Same use +// open(const char*,int,mode_t). Others use open(const char*,int,...). +// The difference is important when using a pointer to the function. +// +// The safest way to deal with the problem is to always use this wrapper +// which always has the same well-defined interface. +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + return libc.Xopen(tls, zFile, flags, libc.VaList(bp, mode)) +} + +// Many system calls are accessed through pointer-to-functions so that +// they may be overridden at runtime to facilitate fault injection during +// testing and sandboxing. The following array holds the names and pointers +// to all overrideable system calls. +type unix_syscall = struct { + FzName uintptr + FpCurrent Sqlite3_syscall_ptr + FpDefault Sqlite3_syscall_ptr +} /* sqlite3.c:35165:8 */ + +// Many system calls are accessed through pointer-to-functions so that +// they may be overridden at runtime to facilitate fault injection during +// testing and sandboxing. The following array holds the names and pointers +// to all overrideable system calls. +var aSyscall = [29]unix_syscall{ + {FzName: ts + 3203, FpCurrent: 0}, + + {FzName: ts + 3208, FpCurrent: 0}, + + {FzName: ts + 3214, FpCurrent: 0}, + + {FzName: ts + 3221, FpCurrent: 0}, + + {FzName: ts + 3228, FpCurrent: 0}, + + // The DJGPP compiler environment looks mostly like Unix, but it + // lacks the fcntl() system call. So redefine fcntl() to be something + // that always succeeds. This means that locking does not occur under + // DJGPP. But it is DOS - what did you expect? + {FzName: ts + 3233, FpCurrent: 0}, + + {FzName: ts + 3239, FpCurrent: 0}, + + {FzName: ts + 3249, FpCurrent: 0}, + + {FzName: ts + 3255, FpCurrent: 0}, + + {FzName: ts + 3260}, + + {FzName: ts + 3266}, + + {FzName: ts + 3274, FpCurrent: 0}, + + {FzName: ts + 3280}, + + {FzName: ts + 3287}, + + {FzName: ts + 3296, FpCurrent: 0}, + + {FzName: ts + 3303}, + + {FzName: ts + 3313, FpCurrent: 0}, + + {FzName: ts + 3320, FpCurrent: 0}, + + {FzName: ts + 3334, FpCurrent: 0}, + + {FzName: ts + 3340, FpCurrent: 0}, + + {FzName: ts + 3346, FpCurrent: 0}, + + {FzName: ts + 3353, FpCurrent: 0}, + + {FzName: ts + 3361, FpCurrent: 0}, + + {FzName: ts + 3366, FpCurrent: 0}, + + {FzName: ts + 3373, FpCurrent: 0}, + + {FzName: ts + 3380, FpCurrent: 0}, + + {FzName: ts + 3392, FpCurrent: 0}, + + {FzName: ts + 3401, FpCurrent: 0}, + + {FzName: ts + 3407}, +} /* sqlite3.c:35169: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 +// we are not running as root. +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ + if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { + return 0 + } + return (*(*func(*libc.TLS, int32, Uid_t, Gid_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 20*24 + 8)))(tls, fd, uid, gid) +} + +// This is the xSetSystemCall() method of sqlite3_vfs for all of the +// "unix" VFSes. Return SQLITE_OK opon successfully updating the +// system call pointer, or SQLITE_NOTFOUND if there is no configurable +// system call named zName. +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ + var i uint32 + var rc int32 = SQLITE_NOTFOUND + + _ = pNotUsed + if zName == uintptr(0) { + // If no zName is given, restore all system calls to their default + // settings and return NULL + rc = SQLITE_OK + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(unix_syscall{})); i++ { + if aSyscall[i].FpDefault != 0 { + aSyscall[i].FpCurrent = aSyscall[i].FpDefault + } + } + } else { + // If zName is specified, operate on only the one system call + // specified. + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(unix_syscall{})); i++ { + if libc.Xstrcmp(tls, zName, aSyscall[i].FzName) == 0 { + if aSyscall[i].FpDefault == uintptr(0) { + aSyscall[i].FpDefault = aSyscall[i].FpCurrent + } + rc = SQLITE_OK + if pNewFunc == uintptr(0) { + pNewFunc = aSyscall[i].FpDefault + } + aSyscall[i].FpCurrent = pNewFunc + break + } + } + } + return rc +} + +// Return the value of a system call. Return NULL if zName is not a +// recognized system call name. NULL is also returned if the system call +// is currently undefined. +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ + var i uint32 + + _ = pNotUsed + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(unix_syscall{})); i++ { + if libc.Xstrcmp(tls, zName, aSyscall[i].FzName) == 0 { + return aSyscall[i].FpCurrent + } + } + return uintptr(0) +} + +// Return the name of the first system call after zName. If zName==NULL +// then return the name of the first system call. Return NULL if zName +// is the last system call or if zName is not the name of a valid +// system call. +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ + var i int32 = -1 + + _ = p + if zName != 0 { + for i = 0; i < int32(uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(unix_syscall{})))-1; i++ { + if libc.Xstrcmp(tls, zName, aSyscall[i].FzName) == 0 { + break + } + } + } + for i++; i < int32(uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(unix_syscall{}))); i++ { + if aSyscall[i].FpCurrent != uintptr(0) { + return aSyscall[i].FzName + } + } + return uintptr(0) +} + +// Do not accept any file descriptor less than this value, in order to avoid +// opening database file using file descriptors that are commonly used for +// standard input, output, and error. + +// Invoke open(). Do so multiple times, until it either succeeds or +// fails for some reason other than EINTR. +// +// If the file creation mode "m" is 0 then set it to the default for +// SQLite. The default is SQLITE_DEFAULT_FILE_PERMISSIONS (normally +// 0644) as modified by the system umask. If m is not 0, then +// make the file creation mode be exactly m ignoring the umask. +// +// The m parameter will be non-zero only when creating -wal, -journal, +// and -shm files. We want those files to have *exactly* the same +// permissions as their original database, unadulterated by the umask. +// In that way, if a database file is -rw-rw-rw or -rw-rw-r-, and a +// transaction crashes and leaves behind hot journals, then any +// process that is able to write to the database will also be able to +// recover the hot journals. +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + var fd int32 + var m2 Mode_t + if m != 0 { + m2 = m + } else { + m2 = uint32(SQLITE_DEFAULT_FILE_PERMISSIONS) + } + for 1 != 0 { + fd = (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, z, f|02000000, int32(m2)) + if fd < 0 { + if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { + continue + } + break + } + if fd >= SQLITE_MINIMUM_FILE_DESCRIPTOR { + break + } + (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, fd) + Xsqlite3_log(tls, SQLITE_WARNING, + ts+3413, libc.VaList(bp, z, fd)) + fd = -1 + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls, ts+3456, O_RDONLY, int32(m)) < 0 { + break + } + } + if fd >= 0 { + if m != Mode_t(0) { + // var statbuf stat at bp+16, 128 + + if (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, fd, bp+16) == 0 && + (*stat)(unsafe.Pointer(bp+16)).Fst_size == int64(0) && + (*stat)(unsafe.Pointer(bp+16)).Fst_mode&X__mode_t(0777) != m { + (*(*func(*libc.TLS, int32, Mode_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 14*24 + 8)))(tls, fd, m) + } + } + } + return fd +} + +// Helper functions to obtain and relinquish the global mutex. The +// global mutex is used to protect the unixInodeInfo and +// vxworksFileId objects used by this file, all of which may be +// shared by multiple threads. +// +// Function unixMutexHeld() is used to assert() that the global mutex +// is held when required. This function is only used as part of assert() +// statements. e.g. +// +// unixEnterMutex() +// assert( unixMutexHeld() ); +// unixEnterLeave() +// +// To prevent deadlock, the global unixBigLock must must be acquired +// before the unixInodeInfo.pLockMutex mutex, if both are held. It is +// OK to get the pLockMutex without holding unixBigLock first, but if +// that happens, the unixBigLock mutex must not be acquired until after +// pLockMutex is released. +// +// OK: enter(unixBigLock), enter(pLockInfo) +// OK: enter(unixBigLock) +// OK: enter(pLockInfo) +// ERROR: enter(pLockInfo), enter(unixBigLock) +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ + +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ + // Not a recursive mutex + Xsqlite3_mutex_enter(tls, unixBigLock) +} + +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ + + Xsqlite3_mutex_leave(tls, unixBigLock) +} + +// Retry ftruncate() calls that fail due to EINTR +// +// All calls to ftruncate() within this file should be made through +// this wrapper. On the Android platform, bypassing the logic below +// could lead to a corrupt database. +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ + var rc int32 + for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { + rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, int64(sz)) + } + return rc +} + +// This routine translates a standard POSIX errno code into something +// useful to the clients of the sqlite3 functions. Specifically, it is +// intended to translate a variety of "try again" errors into SQLITE_BUSY +// and a variety of "please close the file descriptor NOW" errors into +// SQLITE_IOERR +// +// Errors during initialization of locks, or file system support for locks, +// should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ + + switch posixError { + case EACCES: + fallthrough + case EAGAIN: + fallthrough + case ETIMEDOUT: + fallthrough + case EBUSY: + fallthrough + case EINTR: + fallthrough + case ENOLCK: + // random NFS retry error, unless during file system support + // introspection, in which it actually means what it says + return SQLITE_BUSY + + case EPERM: + return SQLITE_PERM + + default: + return sqliteIOErr + } + return int32(0) +} + +// ***************************************************************************** +// +// Begin Unique File ID Utility Used By VxWorks *************** +// +// On most versions of unix, we can get a unique ID for a file by concatenating +// the device number and the inode number. But this does not work on VxWorks. +// On VxWorks, a unique file id must be based on the canonical filename. +// +// A pointer to an instance of the following structure can be used as a +// unique file ID in VxWorks. Each instance of this structure contains +// a copy of the canonical filename. There is also a reference count. +// The structure is reclaimed when the number of pointers to it drops to +// zero. +// +// There are never very many files open at one time and lookups are not +// a performance-critical path, so it is sufficient to put these +// structures on a linked list. +type vxworksFileId = struct { + FpNext uintptr + FnRef int32 + FnName int32 + FzCanonicalName uintptr +} /* sqlite3.c:35686:1 */ + +// ************** End of Unique File ID Utility Used By VxWorks **************** +// +// + +// ***************************************************************************** +// +// Posix Advisory Locking **************************** +// +// POSIX advisory locks are broken by design. ANSI STD 1003.1 (1996) +// section 6.5.2.2 lines 483 through 490 specify that when a process +// sets or clears a lock, that operation overrides any prior locks set +// by the same process. It does not explicitly say so, but this implies +// that it overrides locks set by the same process using a different +// file descriptor. Consider this test case: +// +// int fd1 = open("./file1", O_RDWR|O_CREAT, 0644); +// int fd2 = open("./file2", O_RDWR|O_CREAT, 0644); +// +// Suppose ./file1 and ./file2 are really the same file (because +// one is a hard or symbolic link to the other) then if you set +// an exclusive lock on fd1, then try to get an exclusive lock +// on fd2, it works. I would have expected the second lock to +// fail since there was already a lock on the file due to fd1. +// But not so. Since both locks came from the same process, the +// second overrides the first, even though they were on different +// file descriptors opened on different file names. +// +// This means that we cannot use POSIX locks to synchronize file access +// among competing threads of the same process. POSIX locks will work fine +// to synchronize access for threads in separate processes, but not +// threads within the same process. +// +// To work around the problem, SQLite has to manage file locks internally +// on its own. Whenever a new database is opened, we have to find the +// specific inode of the database file (the inode is determined by the +// st_dev and st_ino fields of the stat structure that fstat() fills in) +// and check for locks already existing on that inode. When locks are +// created or removed, we have to look at our own internal record of the +// locks to see if another thread has previously set a lock on that same +// inode. +// +// (Aside: The use of inode numbers as unique IDs does not work on VxWorks. +// For VxWorks, we have to use the alternative unique ID system based on +// canonical filename and implemented in the previous division.) +// +// The sqlite3_file structure for POSIX is no longer just an integer file +// descriptor. It is now a structure that holds the integer file +// descriptor and a pointer to a structure that describes the internal +// locks on the corresponding inode. There is one locking structure +// per inode, so if the same inode is opened twice, both unixFile structures +// point to the same locking structure. The locking structure keeps +// a reference count (so we will know when to delete it) and a "cnt" +// field that tells us its internal lock status. cnt==0 means the +// file is unlocked. cnt==-1 means the file has an exclusive lock. +// cnt>0 means there are cnt shared locks on the file. +// +// Any attempt to lock or unlock a file first checks the locking +// structure. The fcntl() system call is only invoked to set a +// POSIX lock if the internal lock structure transitions between +// a locked and an unlocked state. +// +// But wait: there are yet more problems with POSIX advisory locks. +// +// If you close a file descriptor that points to a file that has locks, +// all locks on that file that are owned by the current process are +// released. To work around this problem, each unixInodeInfo object +// maintains a count of the number of pending locks on tha inode. +// When an attempt is made to close an unixFile, if there are +// other unixFile open on the same inode that are holding locks, the call +// to close() the file descriptor is deferred until all of the locks clear. +// The unixInodeInfo structure keeps a list of file descriptors that need to +// be closed and that list is walked (and cleared) when the last lock +// clears. +// +// Yet another problem: LinuxThreads do not play well with posix locks. +// +// Many older versions of linux use the LinuxThreads library which is +// not posix compliant. Under LinuxThreads, a lock created by thread +// A cannot be modified or overridden by a different thread B. +// Only thread A can modify the lock. Locking behavior is correct +// if the appliation uses the newer Native Posix Thread Library (NPTL) +// on linux - with NPTL a lock created by thread A can override locks +// in thread B. But there is no way to know at compile-time which +// threading library is being used. So there is no way to know at +// compile-time whether or not thread A can override locks on thread B. +// One has to do a run-time check to discover the behavior of the +// current process. +// +// SQLite used to support LinuxThreads. But support for LinuxThreads +// was dropped beginning with version 3.7.0. SQLite will still work with +// LinuxThreads provided that (1) there is no more than one connection +// per database file in the same process and (2) database connections +// do not move across threads. + +// An instance of the following structure serves as the key used +// to locate a particular unixInodeInfo object. +type unixFileId = struct { + Fdev Dev_t + Fino U64 +} /* sqlite3.c:34978:9 */ + +// A lists of all unixInodeInfo objects. +// +// Must hold unixBigLock in order to read or write this variable. +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ + +// All unixInodeInfo objects + +// +// This function - unixLogErrorAtLine(), is only ever called via the macro +// unixLogError(). +// +// It is invoked after an error occurs in an OS function and errno has been +// set. It logs a message using sqlite3_log() containing the current value of +// errno and, if possible, the human-readable equivalent from strerror() or +// strerror_r(). +// +// The first argument passed to the macro should be the error code that +// will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN). +// The two subsequent arguments should be the name of the OS function that +// failed (e.g. "unlink", "open") and the associated file-system path, +// if any. +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var zErr uintptr // Message from strerror() or equivalent + var iErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) // Saved syscall error number + + // If this is not a threadsafe build (SQLITE_THREADSAFE==0), then use + // the strerror() function to obtain the human-readable error message + // equivalent to errno. Otherwise, use strerror_r(). + // This is a threadsafe build, but strerror_r() is not available. + zErr = ts + 1525 /* "" */ + + if zPath == uintptr(0) { + zPath = ts + 1525 /* "" */ + } + Xsqlite3_log(tls, errcode, + ts+3466, + libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) + + return errcode +} + +// Close a file descriptor. +// +// We assume that close() almost always works, since it is only in a +// very sick application or on a very sick platform that it might fail. +// If it does fail, simply leak the file descriptor, but do log the +// error. +// +// Note that it is not safe to retry close() after EINTR since the +// file descriptor might have already been reused by another thread. +// So we don't even try to recover from an EINTR. Just log the error +// and move on. +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ + if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3208, + func() uintptr { + if pFile != 0 { + return (*UnixFile)(unsafe.Pointer(pFile)).FzPath + } + return uintptr(0) + }(), lineno) + } +} + +// Set the pFile->lastErrno. Do this in a subroutine as that provides +// a convenient place to set a breakpoint. +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ + (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error +} + +// Close all file descriptors accumuated in the unixInodeInfo->pUnused list. +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ + var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode + var p uintptr + var pNext uintptr + + for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { + pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) + Xsqlite3_free(tls, p) + } + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) +} + +// Release a unixInodeInfo structure previously allocated by findInodeInfo(). +// +// The global mutex must be held when this routine is called, but the mutex +// on the inode being deleted must NOT be held. +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ + var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode + + if pInode != 0 { + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnRef-- + if (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnRef == 0 { + + Xsqlite3_mutex_enter(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + closePendingFds(tls, pFile) + Xsqlite3_mutex_leave(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + if (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpPrev != 0 { + + (*UnixInodeInfo)(unsafe.Pointer((*UnixInodeInfo)(unsafe.Pointer(pInode)).FpPrev)).FpNext = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpNext + } else { + + inodeList = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpNext + } + if (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpNext != 0 { + + (*UnixInodeInfo)(unsafe.Pointer((*UnixInodeInfo)(unsafe.Pointer(pInode)).FpNext)).FpPrev = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpPrev + } + Xsqlite3_mutex_free(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + Xsqlite3_free(tls, pInode) + } + } +} + +// Given a file descriptor, locate the unixInodeInfo object that +// describes that file descriptor. Create a new one if necessary. The +// return value might be uninitialized if an error occurs. +// +// The global mutex must held when calling this routine. +// +// Return an appropriate error code. +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + var rc int32 // System call return code + var fd int32 // The file descriptor for pFile + // var fileId unixFileId at bp+128, 16 + // Lookup key for the unixInodeInfo + // var statbuf stat at bp, 128 + // Low-level file information + var pInode uintptr = uintptr(0) // Candidate unixInodeInfo object + + // Get low-level information about the file that we can used to + // create a unique name for the file. + fd = (*UnixFile)(unsafe.Pointer(pFile)).Fh + rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, fd, bp) + if rc != 0 { + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + return SQLITE_IOERR + } + + libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(unixFileId{}))) + (*unixFileId)(unsafe.Pointer(bp + 128 /* &fileId */)).Fdev = (*stat)(unsafe.Pointer(bp /* &statbuf */)).Fst_dev + (*unixFileId)(unsafe.Pointer(bp + 128 /* &fileId */)).Fino = U64((*stat)(unsafe.Pointer(bp /* &statbuf */)).Fst_ino) + + pInode = inodeList + for pInode != 0 && libc.Xmemcmp(tls, bp+128, pInode, uint64(unsafe.Sizeof(unixFileId{}))) != 0 { + pInode = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpNext + } + if pInode == uintptr(0) { + pInode = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(UnixInodeInfo{}))) + if pInode == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pInode, 0, uint64(unsafe.Sizeof(UnixInodeInfo{}))) + libc.Xmemcpy(tls, pInode, bp+128, uint64(unsafe.Sizeof(unixFileId{}))) + if Xsqlite3Config.FbCoreMutex != 0 { + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) + if (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex == uintptr(0) { + Xsqlite3_free(tls, pInode) + return SQLITE_NOMEM + } + } + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnRef = 1 + + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpNext = inodeList + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpPrev = uintptr(0) + if inodeList != 0 { + (*UnixInodeInfo)(unsafe.Pointer(inodeList)).FpPrev = pInode + } + inodeList = pInode + } else { + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnRef++ + } + *(*uintptr)(unsafe.Pointer(ppInode)) = pInode + return SQLITE_OK +} + +// Return TRUE if pFile has been renamed or unlinked since it was first opened. +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + // var buf stat at bp, 128 + + return libc.Bool32((*UnixFile)(unsafe.Pointer(pFile)).FpInode != uintptr(0) && ((*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) != 0 || + U64((*stat)(unsafe.Pointer(bp)).Fst_ino) != (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpInode)).FfileId.Fino)) +} + +// Check a unixFile that is a database. Verify the following: +// +// (1) There is exactly one hard link on the file +// (2) The file is not a symbolic link +// (3) The file has not been renamed or unlinked +// +// Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ + bp := tls.Alloc(160) + defer tls.Free(160) + + // var buf stat at bp+32, 128 + + var rc int32 + + // These verifications occurs for the main database only + if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_NOLOCK != 0 { + return + } + + rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp+32) + if rc != 0 { + Xsqlite3_log(tls, SQLITE_WARNING, ts+3497, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + return + } + if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == X__nlink_t(0) { + Xsqlite3_log(tls, SQLITE_WARNING, ts+3521, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + return + } + if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > X__nlink_t(1) { + Xsqlite3_log(tls, SQLITE_WARNING, ts+3550, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + return + } + if fileHasMoved(tls, pFile) != 0 { + Xsqlite3_log(tls, SQLITE_WARNING, ts+3577, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + return + } +} + +// This routine checks if there is a RESERVED lock held on the specified +// file by this or any other process. If such a lock is held, set *pResOut +// to a non-zero value otherwise *pResOut is set to zero. The return value +// is set to SQLITE_OK unless an I/O error occurs during lock checking. +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var rc int32 = SQLITE_OK + var reserved int32 = 0 + var pFile uintptr = id + + Xsqlite3_mutex_enter(tls, (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpInode)).FpLockMutex) + + // Check if a thread in this process holds such a lock + if int32((*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpInode)).FeFileLock) > SHARED_LOCK { + reserved = 1 + } + + // Otherwise see if some other process holds it. + if !(reserved != 0) && !(int32((*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpInode)).FbProcessLock) != 0) { + // var lock flock at bp+8, 32 + + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte + 1) + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_len = int64(1) + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_type = int16(F_WRLCK) + if (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, F_GETLK64, libc.VaList(bp, bp+8)) != 0 { + rc = SQLITE_IOERR | int32(14)<<8 + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) != F_UNLCK { + reserved = 1 + } + } + + Xsqlite3_mutex_leave(tls, (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpInode)).FpLockMutex) + + *(*int32)(unsafe.Pointer(pResOut)) = reserved + return rc +} + +// Set a posix-advisory-lock. +// +// There are two versions of this routine. If compiled with +// SQLITE_ENABLE_SETLK_TIMEOUT then the routine has an extra parameter +// which is a pointer to a unixFile. If the unixFile->iBusyTimeout +// value is set, then it is the number of milliseconds to wait before +// failing the lock. The iBusyTimeout value is always reset back to +// zero on each call. +// +// If SQLITE_ENABLE_SETLK_TIMEOUT is not defined, then do a non-blocking +// attempt to set the lock. + +// Attempt to set a system-lock on the file pFile. The lock is +// described by pLock. +// +// If the pFile was opened read/write from unix-excl, then the only lock +// ever obtained is an exclusive lock, and it is obtained exactly once +// the first time any lock is attempted. All subsequent system locking +// operations become no-ops. Locking operations still happen internally, +// in order to coordinate access between separate database connections +// within this process, but all of that is handled in memory and the +// operating system does not participate. +// +// This function is a pass-through to fcntl(F_SETLK) if pFile is using +// any VFS other than "unix-excl" or if pFile is opened on "unix-excl" +// and is read-only. +// +// Zero is returned if the call completes successfully, or -1 if a call +// to fcntl() fails. In this case, errno is set appropriately (by fcntl()). +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var rc int32 + var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode + + if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&(UNIXFILE_EXCL|UNIXFILE_RDONLY) == UNIXFILE_EXCL { + if int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0 { + // var lock flock at bp+16, 32 + + (*flock)(unsafe.Pointer(bp + 16 /* &lock */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp + 16 /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte + 2) + (*flock)(unsafe.Pointer(bp + 16 /* &lock */)).Fl_len = int64(SHARED_SIZE) + (*flock)(unsafe.Pointer(bp + 16 /* &lock */)).Fl_type = int16(F_WRLCK) + rc = (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, F_SETLK64, libc.VaList(bp, bp+16)) + if rc < 0 { + return rc + } + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock = uint8(1) + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnLock++ + } else { + rc = 0 + } + } else { + rc = (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, F_SETLK64, libc.VaList(bp+8, pLock)) + } + return rc +} + +// Lock the file with the lock specified by parameter eFileLock - one +// of the following: +// +// (1) SHARED_LOCK +// (2) RESERVED_LOCK +// (3) PENDING_LOCK +// (4) EXCLUSIVE_LOCK +// +// Sometimes when requesting one lock state, additional lock states +// are inserted in between. The locking might fail on one of the later +// transitions leaving the lock state different from what it started but +// still short of its goal. The following chart shows the allowed +// transitions and the inserted intermediate states: +// +// UNLOCKED -> SHARED +// SHARED -> RESERVED +// SHARED -> (PENDING) -> EXCLUSIVE +// RESERVED -> (PENDING) -> EXCLUSIVE +// PENDING -> EXCLUSIVE +// +// This routine will only increase a lock. Use the sqlite3OsUnlock() +// routine to lower a locking level. +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + // The following describes the implementation of the various locks and + // lock transitions in terms of the POSIX advisory shared and exclusive + // lock primitives (called read-locks and write-locks below, to avoid + // confusion with SQLite lock names). The algorithms are complicated + // slightly in order to be compatible with Windows95 systems simultaneously + // accessing the same database file, in case that is ever required. + // + // Symbols defined in os.h indentify the 'pending byte' and the 'reserved + // byte', each single bytes at well known offsets, and the 'shared byte + // range', a range of 510 bytes at a well known offset. + // + // To obtain a SHARED lock, a read-lock is obtained on the 'pending + // byte'. If this is successful, 'shared byte range' is read-locked + // and the lock on the 'pending byte' released. (Legacy note: When + // SQLite was first developed, Windows95 systems were still very common, + // and Widnows95 lacks a shared-lock capability. So on Windows95, a + // single randomly selected by from the 'shared byte range' is locked. + // Windows95 is now pretty much extinct, but this work-around for the + // lack of shared-locks on Windows95 lives on, for backwards + // compatibility.) + // + // A process may only obtain a RESERVED lock after it has a SHARED lock. + // A RESERVED lock is implemented by grabbing a write-lock on the + // 'reserved byte'. + // + // A process may only obtain a PENDING lock after it has obtained a + // SHARED lock. A PENDING lock is implemented by obtaining a write-lock + // on the 'pending byte'. This ensures that no new SHARED locks can be + // obtained, but existing SHARED locks are allowed to persist. A process + // does not have to obtain a RESERVED lock on the way to a PENDING lock. + // This property is used by the algorithm for rolling back a journal file + // after a crash. + // + // An EXCLUSIVE lock, obtained after a PENDING lock is held, is + // implemented by obtaining a write-lock on the entire 'shared byte + // range'. Since all other locks require a read-lock on one of the bytes + // within this range, this ensures that no other locks are held on the + // database. + var rc int32 + var pFile uintptr + var pInode uintptr + // var lock flock at bp, 32 + + var tErrno int32 + rc = SQLITE_OK + pFile = id + tErrno = 0 + + // If there is already a lock of this type or more restrictive on the + // unixFile, do nothing. Don't use the end_lock: exit path, as + // unixEnterMutex() hasn't been called yet. + if !(int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) >= eFileLock) { + goto __1 + } + + return SQLITE_OK +__1: + ; + + // Make sure the locking sequence is correct. + // (1) We never move from unlocked to anything higher than shared lock. + // (2) SQLite never explicitly requests a pendig lock. + // (3) A shared lock is always held when a reserve lock is requested. + + // This mutex is needed because pFile->pInode is shared across threads + pInode = (*UnixFile)(unsafe.Pointer(pFile)).FpInode + Xsqlite3_mutex_enter(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + + // If some thread using this PID has a lock via a different unixFile* + // handle that precludes the requested lock, return BUSY. + if !(int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) != int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock) && (int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock) >= PENDING_LOCK || eFileLock > SHARED_LOCK)) { + goto __2 + } + rc = SQLITE_BUSY + goto end_lock +__2: + ; + + // If a SHARED lock is requested, and some thread using this PID already + // has a SHARED or RESERVED lock, then increment reference counts and + // return SQLITE_OK. + if !(eFileLock == SHARED_LOCK && (int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock) == SHARED_LOCK || int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock) == RESERVED_LOCK)) { + goto __3 + } + + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(SHARED_LOCK) + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared++ + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnLock++ + goto end_lock +__3: + ; + + // A PENDING lock is needed before acquiring a SHARED lock and before + // acquiring an EXCLUSIVE lock. For the SHARED lock, the PENDING will + // be released. + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_len = 1 + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_whence = int16(SEEK_SET) + if !(eFileLock == SHARED_LOCK || + eFileLock == EXCLUSIVE_LOCK && int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) < PENDING_LOCK) { + goto __4 + } + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_type = func() int16 { + if eFileLock == SHARED_LOCK { + return int16(F_RDLCK) + } + return int16(F_WRLCK) + }() + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte) + if !(unixFileLock(tls, pFile, bp) != 0) { + goto __5 + } + tErrno = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) + rc = sqliteErrorFromPosixError(tls, tErrno, SQLITE_IOERR|int32(15)<<8) + if !(rc != SQLITE_BUSY) { + goto __6 + } + storeLastErrno(tls, pFile, tErrno) +__6: + ; + goto end_lock +__5: + ; +__4: + ; + + // If control gets to this point, then actually go ahead and make + // operating system calls for the specified lock. + if !(eFileLock == SHARED_LOCK) { + goto __7 + } + + // Now get the read-lock + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte + 2) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_len = int64(SHARED_SIZE) + if !(unixFileLock(tls, pFile, bp) != 0) { + goto __9 + } + tErrno = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) + rc = sqliteErrorFromPosixError(tls, tErrno, SQLITE_IOERR|int32(15)<<8) +__9: + ; + + // Drop the temporary PENDING lock + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_len = 1 + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_type = int16(F_UNLCK) + if !(unixFileLock(tls, pFile, bp) != 0 && rc == SQLITE_OK) { + goto __10 + } + // This could happen with a network mount + tErrno = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) + rc = SQLITE_IOERR | int32(8)<<8 +__10: + ; + + if !(rc != 0) { + goto __11 + } + if !(rc != SQLITE_BUSY) { + goto __13 + } + storeLastErrno(tls, pFile, tErrno) +__13: + ; + goto end_lock + goto __12 +__11: + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(SHARED_LOCK) + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnLock++ + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared = 1 +__12: + ; + goto __8 +__7: + if !(eFileLock == EXCLUSIVE_LOCK && (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared > 1) { + goto __14 + } + // We are trying for an exclusive lock but another thread in this + // same process is still holding a shared lock. + rc = SQLITE_BUSY + goto __15 +__14: + // The request was for a RESERVED or EXCLUSIVE lock. It is + // assumed that there is a SHARED or greater lock on the file + // already. + ; + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_type = int16(F_WRLCK) + + if !(eFileLock == RESERVED_LOCK) { + goto __16 + } + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte + 1) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_len = 1 + goto __17 +__16: + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte + 2) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_len = int64(SHARED_SIZE) +__17: + ; + + if !(unixFileLock(tls, pFile, bp) != 0) { + goto __18 + } + tErrno = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) + rc = sqliteErrorFromPosixError(tls, tErrno, SQLITE_IOERR|int32(15)<<8) + if !(rc != SQLITE_BUSY) { + goto __19 + } + storeLastErrno(tls, pFile, tErrno) +__19: + ; +__18: + ; +__15: + ; +__8: + ; + + if !(rc == SQLITE_OK) { + goto __20 + } + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(eFileLock) + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(eFileLock) + goto __21 +__20: + if !(eFileLock == EXCLUSIVE_LOCK) { + goto __22 + } + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(PENDING_LOCK) + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(PENDING_LOCK) +__22: + ; +__21: + ; + +end_lock: + Xsqlite3_mutex_leave(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + + return rc +} + +// Add the file descriptor used by file handle pFile to the corresponding +// pUnused list. +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ + var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode + var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused + + (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = p + (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 + (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused = uintptr(0) +} + +// Lower the locking level on file descriptor pFile to eFileLock. eFileLock +// must be either NO_LOCK or SHARED_LOCK. +// +// If the locking level of the file descriptor is already at or below +// the requested locking level, this routine is a no-op. +// +// If handleNFSUnlock is true, then on downgrading an EXCLUSIVE_LOCK to SHARED +// the byte range is divided into 2 parts and the first part is unlocked then +// set to a read lock, then the other part is simply unlocked. This works +// around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to +// remove the write lock on a region when a read lock is set. +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pFile uintptr + var pInode uintptr + // var lock flock at bp, 32 + + var rc int32 + pFile = id + rc = SQLITE_OK + + if !(int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) <= eFileLock) { + goto __1 + } + return SQLITE_OK +__1: + ; + pInode = (*UnixFile)(unsafe.Pointer(pFile)).FpInode + Xsqlite3_mutex_enter(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + + if !(int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) > SHARED_LOCK) { + goto __2 + } + + // downgrading to a shared lock on NFS involves clearing the write lock + // before establishing the readlock - to avoid a race condition we downgrade + // the lock in 2 blocks, so that part of the range will be covered by a + // write lock until the rest is covered by a read lock: + // 1: [WWWWW] + // 2: [....W] + // 3: [RRRRW] + // 4: [RRRR.] + if !(eFileLock == SHARED_LOCK) { + goto __3 + } + _ = handleNFSUnlock + + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_type = int16(F_RDLCK) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte + 2) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_len = int64(SHARED_SIZE) + if !(unixFileLock(tls, pFile, bp) != 0) { + goto __4 + } + // In theory, the call to unixFileLock() cannot fail because another + // process is holding an incompatible lock. If it does, this + // indicates that the other process is not following the locking + // protocol. If this happens, return SQLITE_IOERR_RDLOCK. Returning + // SQLITE_BUSY would confuse the upper layer (in practice it causes + // an assert to fail). + rc = SQLITE_IOERR | int32(9)<<8 + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + goto end_unlock +__4: + ; + +__3: + ; + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_type = int16(F_UNLCK) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = X__off_t(Xsqlite3PendingByte) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_len = 2 + if !(unixFileLock(tls, pFile, bp) == 0) { + goto __5 + } + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(SHARED_LOCK) + goto __6 +__5: + rc = SQLITE_IOERR | int32(8)<<8 + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + goto end_unlock +__6: + ; +__2: + ; + if !(eFileLock == NO_LOCK) { + goto __7 + } + // Decrement the shared lock counter. Release the lock using an + // OS call only when all threads in this same process have released + // the lock. + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared-- + if !((*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared == 0) { + goto __8 + } + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_type = int16(F_UNLCK) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp /* &lock */)).Fl_start = libc.AssignPtrInt64(bp+16, 0) + if !(unixFileLock(tls, pFile, bp) == 0) { + goto __9 + } + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(NO_LOCK) + goto __10 +__9: + rc = SQLITE_IOERR | int32(8)<<8 + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(NO_LOCK) + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(NO_LOCK) +__10: + ; +__8: + ; + + // Decrement the count of locks against this same file. When the + // count reaches zero, close any other file descriptors whose close + // was deferred because of outstanding locks. + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnLock-- + + if !((*UnixInodeInfo)(unsafe.Pointer(pInode)).FnLock == 0) { + goto __11 + } + closePendingFds(tls, pFile) +__11: + ; +__7: + ; + +end_unlock: + Xsqlite3_mutex_leave(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + if !(rc == SQLITE_OK) { + goto __12 + } + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(eFileLock) +__12: + ; + return rc +} + +// Lower the locking level on file descriptor pFile to eFileLock. eFileLock +// must be either NO_LOCK or SHARED_LOCK. +// +// If the locking level of the file descriptor is already at or below +// the requested locking level, this routine is a no-op. +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ + + return posixUnlock(tls, id, eFileLock, 0) +} + +// This function performs the parts of the "close file" operation +// common to all locking schemes. It closes the directory and file +// handles, if they are valid, and sets all fields of the unixFile +// structure to 0. +// +// It is *not* necessary to hold the mutex when this routine is called, +// even on VxWorks. A mutex will be acquired on VxWorks by the +// vxworksReleaseFileId() routine. +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ + var pFile uintptr = id + unixUnmapfile(tls, pFile) + if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) + (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 + } + + Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused) + libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(UnixFile{}))) + return SQLITE_OK +} + +// Close a file. +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ + var rc int32 = SQLITE_OK + var pFile uintptr = id + var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode + + verifyDbFile(tls, pFile) + unixUnlock(tls, id, NO_LOCK) + + unixEnterMutex(tls) + + // unixFile.pInode is always valid here. Otherwise, a different close + // routine (e.g. nolockClose()) would be called instead. + + Xsqlite3_mutex_enter(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + if (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnLock != 0 { + // If there are outstanding locks, do not actually close the file just + // yet because that would clear those locks. Instead, add the file + // descriptor to pInode->pUnused list. It will be automatically closed + // when the last lock is cleared. + setPendingFd(tls, pFile) + } + Xsqlite3_mutex_leave(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + releaseInodeInfo(tls, pFile) + + rc = closeUnixFile(tls, id) + unixLeaveMutex(tls) + return rc +} + +// ************* End of the posix advisory lock implementation ***************** +// +// + +// ***************************************************************************** +// +// No-op Locking ********************************** +// +// Of the various locking implementations available, this is by far the +// simplest: locking is ignored. No attempt is made to lock the database +// file for reading or writing. +// +// This locking mode is appropriate for use on read-only databases +// (ex: databases that are burned into CD-ROM, for example.) It can +// also be used if the application employs some external mechanism to +// prevent simultaneous access of the same database by two or more +// database connections. But there is a serious risk of database +// corruption if this locking mode is used in situations where multiple +// database connections are accessing the same database file at the same +// time and one or more of those connections are writing. + +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ + _ = NotUsed + *(*int32)(unsafe.Pointer(pResOut)) = 0 + return SQLITE_OK +} + +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ + _ = NotUsed + _ = NotUsed2 + return SQLITE_OK +} + +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ + _ = NotUsed + _ = NotUsed2 + return SQLITE_OK +} + +// Close the file. +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ + return closeUnixFile(tls, id) +} + +// ****************** End of the no-op lock implementation ********************* +// +// + +// ***************************************************************************** +// +// Begin dot-file Locking ****************************** +// +// The dotfile locking implementation uses the existence of separate lock +// files (really a directory) to control access to the database. This works +// on just about every filesystem imaginable. But there are serious downsides: +// +// (1) There is zero concurrency. A single reader blocks all other +// connections from reading or writing the database. +// +// (2) An application crash or power loss can leave stale lock files +// sitting around that need to be cleared manually. +// +// Nevertheless, a dotlock is an appropriate locking mode for use if no +// other locking strategy is available. +// +// Dotfile locking works by creating a subdirectory in the same directory as +// the database and with the same name but with a ".lock" extension added. +// The existence of a lock directory implies an EXCLUSIVE lock. All other +// lock types (SHARED, RESERVED, PENDING) are mapped into EXCLUSIVE. + +// The file suffix added to the data base filename in order to create the +// lock directory. + +// This routine checks if there is a RESERVED lock held on the specified +// file by this or any other process. If such a lock is held, set *pResOut +// to a non-zero value otherwise *pResOut is set to zero. The return value +// is set to SQLITE_OK unless an I/O error occurs during lock checking. +// +// In dotfile locking, either a lock exists or it does not. So in this +// variation of CheckReservedLock(), *pResOut is set to true if any lock +// is held on the file and false if the file is unlocked. +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ + var rc int32 = SQLITE_OK + var reserved int32 = 0 + var pFile uintptr = id + + reserved = libc.Bool32((*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 2*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext, 0) == 0) + + *(*int32)(unsafe.Pointer(pResOut)) = reserved + return rc +} + +// Lock the file with the lock specified by parameter eFileLock - one +// of the following: +// +// (1) SHARED_LOCK +// (2) RESERVED_LOCK +// (3) PENDING_LOCK +// (4) EXCLUSIVE_LOCK +// +// Sometimes when requesting one lock state, additional lock states +// are inserted in between. The locking might fail on one of the later +// transitions leaving the lock state different from what it started but +// still short of its goal. The following chart shows the allowed +// transitions and the inserted intermediate states: +// +// UNLOCKED -> SHARED +// SHARED -> RESERVED +// SHARED -> (PENDING) -> EXCLUSIVE +// RESERVED -> (PENDING) -> EXCLUSIVE +// PENDING -> EXCLUSIVE +// +// This routine will only increase a lock. Use the sqlite3OsUnlock() +// routine to lower a locking level. +// +// With dotfile locking, we really only support state (4): EXCLUSIVE. +// But we track the other locking levels internally. +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ + var pFile uintptr = id + var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext + var rc int32 = SQLITE_OK + + // If we have any lock, then the lock file already exists. All we have + // to do is adjust our internal record of the lock level. + if int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) > NO_LOCK { + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(eFileLock) + // Always update the timestamp on the old file + libc.Xutimes(tls, zLockFile, uintptr(0)) + return SQLITE_OK + } + + // grab an exclusive lock + rc = (*(*func(*libc.TLS, uintptr, Mode_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 18*24 + 8)))(tls, zLockFile, uint32(0777)) + if rc < 0 { + // failed to open/create the lock directory + var tErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) + if EEXIST == tErrno { + rc = SQLITE_BUSY + } else { + rc = sqliteErrorFromPosixError(tls, tErrno, SQLITE_IOERR|int32(15)<<8) + if rc != SQLITE_BUSY { + storeLastErrno(tls, pFile, tErrno) + } + } + return rc + } + + // got it, set the type and return ok + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(eFileLock) + return rc +} + +// Lower the locking level on file descriptor pFile to eFileLock. eFileLock +// must be either NO_LOCK or SHARED_LOCK. +// +// If the locking level of the file descriptor is already at or below +// the requested locking level, this routine is a no-op. +// +// When the locking level reaches NO_LOCK, delete the lock file. +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ + var pFile uintptr = id + var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext + var rc int32 + + // no-op if possible + if int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) == eFileLock { + return SQLITE_OK + } + + // To downgrade to shared, simply update our internal notion of the + // lock state. No need to mess with the file on disk. + if eFileLock == SHARED_LOCK { + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(SHARED_LOCK) + return SQLITE_OK + } + + // To fully unlock the database, delete the lock file + + rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 19*24 + 8)))(tls, zLockFile) + if rc < 0 { + var tErrno int32 = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) + if tErrno == ENOENT { + rc = SQLITE_OK + } else { + rc = SQLITE_IOERR | int32(8)<<8 + storeLastErrno(tls, pFile, tErrno) + } + return rc + } + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(NO_LOCK) + return SQLITE_OK +} + +// Close a file. Make sure the lock has been released before closing. +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ + var pFile uintptr = id + + dotlockUnlock(tls, id, NO_LOCK) + Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext) + return closeUnixFile(tls, id) +} + +// ***************** End of the dot-file lock implementation ******************* +// +// + +// ***************************************************************************** +// +// Begin flock Locking ******************************** +// +// Use the flock() system call to do file locking. +// +// flock() locking is like dot-file locking in that the various +// fine-grain locking levels supported by SQLite are collapsed into +// a single exclusive lock. In other words, SHARED, RESERVED, and +// PENDING locks are the same thing as an EXCLUSIVE lock. SQLite +// still works when you do this, but concurrency is reduced since +// only a single process can be reading the database at a time. +// +// Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off + +// ****************** End of the flock lock implementation ********************* +// +// + +// ***************************************************************************** +// +// Begin Named Semaphore Locking ************************ +// +// Named semaphore locking is only supported on VxWorks. +// +// Semaphore locking is like dot-lock and flock in that it really only +// supports EXCLUSIVE locking. Only a single process can read or write +// the database file at a time. This reduces potential concurrency, but +// makes the lock implementation much easier. +// +// Named semaphore locking is only available on VxWorks. +// +// End of the named semaphore lock implementation **************** +// + +// ***************************************************************************** +// +// Begin AFP Locking ********************************* +// +// AFP is the Apple Filing Protocol. AFP is a network filesystem found +// on Apple Macintosh computers - both OS9 and OSX. +// +// Third-party implementations of AFP are available. But this code here +// only works on OSX. + +// +// The code above is the AFP lock implementation. The code is specific +// to MacOSX and does not work on other unix platforms. No alternative +// is available. If you don't compile for a mac, then the "unix-afp" +// VFS is not available. +// +// End of the AFP lock implementation ********************** +// + +// ***************************************************************************** +// +// Begin NFS Locking ******************************* + +// +// The code above is the NFS lock implementation. The code is specific +// to MacOSX and does not work on other unix platforms. No alternative +// is available. +// +// End of the NFS lock implementation ********************** +// + +// ***************************************************************************** +// +// Non-locking sqlite3_file methods ***************************** +// +// The next division contains implementations for all methods of the +// sqlite3_file object other than the locking methods. The locking +// methods were defined in divisions above (one locking method per +// division). Those methods that are common to all locking modes +// are gather together into this division. + +// Seek to the offset passed as the second argument, then read cnt +// bytes into pBuf. Return the number of bytes actually read. +// +// NB: If you define USE_PREAD or USE_PREAD64, then it might also +// be necessary to define _XOPEN_SOURCE to be 500. This varies from +// one system to another. Since SQLite does not define USE_PREAD +// in any form by default, we will not attempt to define _XOPEN_SOURCE. +// See tickets #2741 and #2681. +// +// To avoid stomping the errno value on a failed read the lastErrno value +// is set before returning. +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ + var got int32 + var prior int32 = 0 + var newOffset I64 + + for __ccgo := true; __ccgo; __ccgo = got > 0 { + newOffset = I64(libc.Xlseek(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, int64(offset), SEEK_SET)) + + if newOffset < int64(0) { + storeLastErrno(tls, id, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + return -1 + } + got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, pBuf, uint64(cnt))) + if got == cnt { + break + } + if got < 0 { + if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { + got = 1 + continue + } + prior = 0 + storeLastErrno(tls, id, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + break + } else if got > 0 { + cnt = cnt - got + offset = offset + Sqlite3_int64(got) + prior = prior + got + pBuf = uintptr(got) + pBuf + } + } + + return got + prior +} + +// Read data from a file into a buffer. Return SQLITE_OK if all +// bytes were read successfully and SQLITE_IOERR if anything goes +// wrong. +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ + var pFile uintptr = id + var got int32 + + // If this is a database file (not a journal, super-journal or temp + // file), the bytes in the locking range should never be read or written. + + // Deal with as much of this read request as possible by transfering + // data from the memory mapping using memcpy(). + if offset < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { + if offset+Sqlite3_int64(amt) <= (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { + libc.Xmemcpy(tls, pBuf, (*UnixFile)(unsafe.Pointer(pFile)).FpMapRegion+uintptr(offset), uint64(amt)) + return SQLITE_OK + } else { + var nCopy int32 = int32((*UnixFile)(unsafe.Pointer(pFile)).FmmapSize - offset) + libc.Xmemcpy(tls, pBuf, (*UnixFile)(unsafe.Pointer(pFile)).FpMapRegion+uintptr(offset), uint64(nCopy)) + pBuf = pBuf + uintptr(nCopy) + amt = amt - nCopy + offset = offset + Sqlite3_int64(nCopy) + } + } + + got = seekAndRead(tls, pFile, offset, pBuf, amt) + if got == amt { + return SQLITE_OK + } else if got < 0 { + // pFile->lastErrno has been set by seekAndRead(). + // Usually we return SQLITE_IOERR_READ here, though for some + // kinds of errors we return SQLITE_IOERR_CORRUPTFS. The + // SQLITE_IOERR_CORRUPTFS will be converted into SQLITE_CORRUPT + // prior to returning to the application by the sqlite3ApiExit() + // routine. + switch (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno { + case ERANGE: + fallthrough + case EIO: + fallthrough + case ENXIO: + return SQLITE_IOERR | int32(33)<<8 + } + return SQLITE_IOERR | int32(1)<<8 + } else { + storeLastErrno(tls, pFile, 0) // not a system error + // Unread parts of the buffer must be zero-filled + libc.Xmemset(tls, pBuf+uintptr(got), 0, uint64(amt-got)) + return SQLITE_IOERR | int32(2)<<8 + } + return int32(0) +} + +// Attempt to seek the file-descriptor passed as the first argument to +// absolute offset iOff, then attempt to write nBuf bytes of data from +// pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, +// return the actual number of bytes written (which may be less than +// nBuf). +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ + var rc int32 = 0 // Value returned by system call + + nBuf = nBuf & 0x1ffff + + for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { + var iSeek I64 = I64(libc.Xlseek(tls, fd, int64(iOff), SEEK_SET)) + + if iSeek < int64(0) { + rc = -1 + break + } + rc = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 11*24 + 8)))(tls, fd, pBuf, uint64(nBuf))) + } + + if rc < 0 { + *(*int32)(unsafe.Pointer(piErrno)) = *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) + } + return rc +} + +// Seek to the offset in id->offset then read cnt bytes into pBuf. +// Return the number of bytes actually read. Update the offset. +// +// To avoid stomping the errno value on a failed write the lastErrno value +// is set before returning. +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ + return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) +} + +// Write data from a buffer into a file. Return SQLITE_OK on success +// or some other error code on failure. +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ + var pFile uintptr = id + var wrote int32 = 0 + + // If this is a database file (not a journal, super-journal or temp + // file), the bytes in the locking range should never be read or written. + + for libc.AssignInt32(&wrote, seekAndWrite(tls, pFile, offset, pBuf, amt)) < amt && wrote > 0 { + amt = amt - wrote + offset = offset + Sqlite3_int64(wrote) + pBuf = pBuf + uintptr(wrote) + } + + if amt > wrote { + if wrote < 0 && (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno != ENOSPC { + // lastErrno set by seekAndWrite + return SQLITE_IOERR | int32(3)<<8 + } else { + storeLastErrno(tls, pFile, 0) // not a system error + return SQLITE_FULL + } + } + + return SQLITE_OK +} + +// We do not trust systems to provide a working fdatasync(). Some do. +// Others do no. To be safe, we will stick with the (slightly slower) +// fsync(). If you know that your system does support fdatasync() correctly, +// then simply compile with -Dfdatasync=fdatasync or -DHAVE_FDATASYNC + +// Define HAVE_FULLFSYNC to 0 or 1 depending on whether or not +// the F_FULLFSYNC macro is defined. F_FULLFSYNC is currently +// only available on Mac OS X. But that could change. + +// The fsync() system call does not work as advertised on many +// unix systems. The following procedure is an attempt to make +// it work better. +// +// The SQLITE_NO_SYNC macro disables all fsync()s. This is useful +// for testing when we want to run through the test suite quickly. +// You are strongly advised *not* to deploy with SQLITE_NO_SYNC +// enabled, however, since with SQLITE_NO_SYNC enabled, an OS crash +// or power failure will likely corrupt the database file. +// +// SQLite sets the dataOnly flag if the size of the file is unchanged. +// The idea behind dataOnly is that it should only write the file content +// to disk, not the inode. We only set dataOnly if the file size is +// unchanged since the file size is part of the inode. However, +// Ted Ts'o tells us that fdatasync() will also write the inode if the +// file size has changed. The only real difference between fdatasync() +// and fsync(), Ted tells us, is that fdatasync() will not flush the +// inode if the mtime or owner or other inode attributes have changed. +// We only care about the file size, not the other file attributes, so +// as far as SQLite is concerned, an fdatasync() is always adequate. +// So, we always use fdatasync() if it is available, regardless of +// the value of the dataOnly flag. +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ + var rc int32 + + // The following "ifdef/elif/else/" block has the same structure as + // the one below. It is replicated here solely to avoid cluttering + // up the real code with the UNUSED_PARAMETER() macros. + _ = fullSync + _ = dataOnly + + // Record the number of times that we do a normal fsync() and + // FULLSYNC. This is used during testing to verify that this procedure + // gets called with the correct arguments. + + // If we compiled with the SQLITE_NO_SYNC flag, then syncing is a + // no-op. But go ahead and call fstat() to validate the file + // descriptor as we need a method to provoke a failure during + // coverate testing. + rc = libc.Xfsync(tls, fd) + + if 0 != 0 && rc != -1 { + rc = 0 + } + return rc +} + +// Open a file descriptor to the directory containing file zFilename. +// If successful, *pFd is set to the opened file descriptor and +// SQLITE_OK is returned. If an error occurs, either SQLITE_NOMEM +// or SQLITE_CANTOPEN is returned and *pFd is set to an undefined +// value. +// +// The directory file descriptor is used for only one thing - to +// fsync() a directory to make sure file creation and deletion events +// are flushed to disk. Such fsyncs are not needed on newer +// journaling filesystems, but are required on older filesystems. +// +// This routine can be overridden using the xSetSysCall interface. +// The ability to override this routine was added in support of the +// chromium sandbox. Opening a directory is a security risk (we are +// told) so making it overrideable allows the chromium sandbox to +// replace this routine with a harmless no-op. To make this routine +// a no-op, replace it with a stub that returns SQLITE_OK but leaves +// *pFd set to a negative number. +// +// If SQLITE_OK is returned, the caller is responsible for closing +// the file descriptor *pFd using close(). +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ + bp := tls.Alloc(521) + defer tls.Free(521) + + var ii int32 + var fd int32 = -1 + // var zDirname [513]uint8 at bp+8, 513 + + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3605, libc.VaList(bp, zFilename)) + for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*uint8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii)))) != '/'; ii-- { + } + if ii > 0 { + *(*uint8)(unsafe.Pointer(bp + 8 + uintptr(ii))) = uint8(0) + } else { + if int32(*(*uint8)(unsafe.Pointer(bp + 8))) != '/' { + *(*uint8)(unsafe.Pointer(bp + 8)) = uint8('.') + } + *(*uint8)(unsafe.Pointer(bp + 8 + 1)) = uint8(0) + } + fd = robust_open(tls, bp+8, O_RDONLY|O_BINARY, uint32(0)) + if fd >= 0 { + + } + *(*int32)(unsafe.Pointer(pFd)) = fd + if fd >= 0 { + return SQLITE_OK + } + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3320, bp+8, 38498) +} + +// Make sure all writes to a particular file are committed to disk. +// +// If dataOnly==0 then both the file itself and its metadata (file +// size, access time, etc) are synced. If dataOnly!=0 then only the +// file data is synced. +// +// Under Unix, also make sure that the directory entry for the file +// has been created by fsync-ing the directory that contains the file. +// If we do not do this and we encounter a power failure, the directory +// entry for the journal might not exist after we reboot. The next +// SQLite to access the file will not know that the journal exists (because +// the directory entry for the journal was never created) and the transaction +// will not roll back - possibly leading to database corruption. +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 + var pFile uintptr = id + + var isDataOnly int32 = flags & SQLITE_SYNC_DATAONLY + var isFullsync int32 = libc.Bool32(flags&0x0F == SQLITE_SYNC_FULL) + + // Check that one of SQLITE_SYNC_NORMAL or FULL was passed + + // Unix cannot, but some systems may return SQLITE_FULL from here. This + // line is to test that doing so does not cause any problems. + + rc = full_fsync(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly) + + if rc != 0 { + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3608, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) + } + + // Also fsync the directory containing the file if the DIRSYNC flag + // is set. This is a one-time occurrence. Many systems (examples: AIX) + // are unable to fsync a directory, so ignore errors on the fsync. + if int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&UNIXFILE_DIRSYNC != 0 { + // var dirfd int32 at bp, 4 + + rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) + if rc == SQLITE_OK { + full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) + } else { + + rc = SQLITE_OK + } + *(*uint16)(unsafe.Pointer(pFile + 30)) &= libc.Uint16FromInt32(libc.CplInt32(UNIXFILE_DIRSYNC)) + } + return rc +} + +// Truncate an open file to a specified size +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ + var pFile uintptr = id + var rc int32 + + // If the user has configured a chunk-size for this file, truncate the + // file so that it consists of an integer number of chunks (i.e. the + // actual file size after the operation may be larger than the requested + // size). + if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk > 0 { + nByte = (nByte + I64((*UnixFile)(unsafe.Pointer(pFile)).FszChunk) - int64(1)) / I64((*UnixFile)(unsafe.Pointer(pFile)).FszChunk) * I64((*UnixFile)(unsafe.Pointer(pFile)).FszChunk) + } + + rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) + if rc != 0 { + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3239, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) + } else { + + // If the file was just truncated to a size smaller than the currently + // mapped region, reduce the effective mapping size as well. SQLite will + // use read() and write() to access data beyond this point from now on. + if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { + (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte + } + + return SQLITE_OK + } + return int32(0) +} + +// Determine the current size of a file in bytes +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + var rc int32 + // var buf stat at bp, 128 + + rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, bp) + + if rc != 0 { + storeLastErrno(tls, id, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + return SQLITE_IOERR | int32(7)<<8 + } + *(*I64)(unsafe.Pointer(pSize)) = I64((*stat)(unsafe.Pointer(bp /* &buf */)).Fst_size) + + // When opening a zero-size database, the findInodeInfo() procedure + // writes a single byte into that file in order to work around a bug + // in the OS-X msdos filesystem. In order to avoid problems with upper + // layers, we need to report this file size as zero even though it is + // really 1. Ticket #3260. + if *(*I64)(unsafe.Pointer(pSize)) == int64(1) { + *(*I64)(unsafe.Pointer(pSize)) = int64(0) + } + + return SQLITE_OK +} + +// This function is called to handle the SQLITE_FCNTL_SIZE_HINT +// file-control operation. Enlarge the database to nBytes in size +// (rounded up to the next chunk-size). If the database is already +// nBytes or larger, this routine is a no-op. +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk > 0 { + var nSize I64 // Required file size + // var buf stat at bp, 128 + // Used to hold return values of fstat() + + if (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp) != 0 { + return SQLITE_IOERR | int32(7)<<8 + } + + nSize = (nByte + I64((*UnixFile)(unsafe.Pointer(pFile)).FszChunk) - int64(1)) / I64((*UnixFile)(unsafe.Pointer(pFile)).FszChunk) * I64((*UnixFile)(unsafe.Pointer(pFile)).FszChunk) + if nSize > I64((*stat)(unsafe.Pointer(bp)).Fst_size) { + + // If the OS does not have posix_fallocate(), fake it. Write a + // single byte to the last byte in each block that falls entirely + // within the extended region. Then, if required, a single byte + // at offset (nSize-1), to set the size of the file correctly. + // This is a similar technique to that used by glibc on systems + // that do not have a real fallocate() call. + var nBlk int32 = (*stat)(unsafe.Pointer(bp /* &buf */)).Fst_blksize // File-system block size + var nWrite int32 = 0 // Number of bytes written by seekAndWrite + var iWrite I64 // Next offset to write to + + iWrite = I64((*stat)(unsafe.Pointer(bp)).Fst_size/X__off64_t(nBlk)*X__off64_t(nBlk) + X__off64_t(nBlk) - int64(1)) + + for ; iWrite < nSize+I64(nBlk)-int64(1); iWrite = iWrite + I64(nBlk) { + if iWrite >= nSize { + iWrite = nSize - int64(1) + } + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1525, 1) + if nWrite != 1 { + return SQLITE_IOERR | int32(3)<<8 + } + } + } + } + + if (*UnixFile)(unsafe.Pointer(pFile)).FmmapSizeMax > int64(0) && nByte > (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { + var rc int32 + if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { + if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { + storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3239, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) + } + } + + rc = unixMapfile(tls, pFile, nByte) + return rc + } + + return SQLITE_OK +} + +// If *pArg is initially negative then this is a query. Set *pArg to +// 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. +// +// If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ + if *(*int32)(unsafe.Pointer(pArg)) < 0 { + *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) + } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { + *(*uint16)(unsafe.Pointer(pFile + 30)) &= uint16(^int32(mask)) + } else { + *(*uint16)(unsafe.Pointer(pFile + 30)) |= uint16(int32(mask)) + } +} + +// Information and control of an open file handle. +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pFile uintptr = id + switch op { + + case SQLITE_FCNTL_LOCKSTATE: + { + *(*int32)(unsafe.Pointer(pArg)) = int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) + return SQLITE_OK + + } + case SQLITE_FCNTL_LAST_ERRNO: + { + *(*int32)(unsafe.Pointer(pArg)) = (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno + return SQLITE_OK + + } + case SQLITE_FCNTL_CHUNK_SIZE: + { + (*UnixFile)(unsafe.Pointer(pFile)).FszChunk = *(*int32)(unsafe.Pointer(pArg)) + return SQLITE_OK + + } + case SQLITE_FCNTL_SIZE_HINT: + { + var rc int32 + + rc = fcntlSizeHint(tls, pFile, *(*I64)(unsafe.Pointer(pArg))) + + return rc + + } + case SQLITE_FCNTL_PERSIST_WAL: + { + unixModeBit(tls, pFile, uint8(UNIXFILE_PERSIST_WAL), pArg) + return SQLITE_OK + + } + case SQLITE_FCNTL_POWERSAFE_OVERWRITE: + { + unixModeBit(tls, pFile, uint8(UNIXFILE_PSOW), pArg) + return SQLITE_OK + + } + case SQLITE_FCNTL_VFSNAME: + { + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + return SQLITE_OK + + } + case SQLITE_FCNTL_TEMPFILENAME: + { + var zTFile uintptr = Xsqlite3_malloc64(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FmxPathname)) + if zTFile != 0 { + unixGetTempname(tls, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FmxPathname, zTFile) + *(*uintptr)(unsafe.Pointer(pArg)) = zTFile + } + return SQLITE_OK + + } + case SQLITE_FCNTL_HAS_MOVED: + { + *(*int32)(unsafe.Pointer(pArg)) = fileHasMoved(tls, pFile) + return SQLITE_OK + + } + case SQLITE_FCNTL_MMAP_SIZE: + { + var newLimit I64 = *(*I64)(unsafe.Pointer(pArg)) + var rc int32 = SQLITE_OK + if newLimit > Xsqlite3Config.FmxMmap { + newLimit = Xsqlite3Config.FmxMmap + } + + // The value of newLimit may be eventually cast to (size_t) and passed + // to mmap(). Restrict its value to 2GB if (size_t) is not at least a + // 64-bit type. + if newLimit > int64(0) && uint64(unsafe.Sizeof(Size_t(0))) < uint64(8) { + newLimit = newLimit & int64(0x7FFFFFFF) + } + + *(*I64)(unsafe.Pointer(pArg)) = (*UnixFile)(unsafe.Pointer(pFile)).FmmapSizeMax + if newLimit >= int64(0) && newLimit != (*UnixFile)(unsafe.Pointer(pFile)).FmmapSizeMax && (*UnixFile)(unsafe.Pointer(pFile)).FnFetchOut == 0 { + (*UnixFile)(unsafe.Pointer(pFile)).FmmapSizeMax = newLimit + if (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize > int64(0) { + unixUnmapfile(tls, pFile) + rc = unixMapfile(tls, pFile, int64(-1)) + } + } + return rc + + } + + case SQLITE_FCNTL_EXTERNAL_READER: + { + return unixFcntlExternalReader(tls, id, pArg) + + } + } + return SQLITE_NOTFOUND +} + +// If pFd->sectorSize is non-zero when this function is called, it is a +// no-op. Otherwise, the values of pFd->sectorSize and +// pFd->deviceCharacteristics are set according to the file-system +// characteristics. +// +// There are two versions of this function. One for QNX and one for all +// other systems. +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ + + if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { + + // Set the POWERSAFE_OVERWRITE flag if requested. + if int32((*UnixFile)(unsafe.Pointer(pFd)).FctrlFlags)&UNIXFILE_PSOW != 0 { + *(*int32)(unsafe.Pointer(pFd + 116)) |= SQLITE_IOCAP_POWERSAFE_OVERWRITE + } + + (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize = SQLITE_DEFAULT_SECTOR_SIZE + } +} + +// Return the sector size in bytes of the underlying block device for +// the specified file. This is almost always 512 bytes, but may be +// larger for some devices. +// +// SQLite code assumes this function cannot fail. It also assumes that +// if two files are created in the same file-system directory (i.e. +// a database and its journal file) that the sector size will be the +// same for both. +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ + var pFd uintptr = id + setDeviceCharacteristics(tls, pFd) + return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize +} + +// Return the device characteristics for the file. +// +// This VFS is set up to return SQLITE_IOCAP_POWERSAFE_OVERWRITE by default. +// However, that choice is controversial since technically the underlying +// file system does not always provide powersafe overwrites. (In other +// words, after a power-loss event, parts of the file that were never +// written might end up being altered.) However, non-PSOW behavior is very, +// very rare. And asserting PSOW makes a large reduction in the amount +// of required I/O for journaling, since a lot of padding is eliminated. +// Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control +// available to turn it off and URI query parameter available to turn it off. +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ + var pFd uintptr = id + setDeviceCharacteristics(tls, pFd) + return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics +} + +// Return the system page size. +// +// This function should not be called directly by other code in this file. +// Instead, it should be called via macro osGetpagesize(). +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ + return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) +} + +// Constants used for locking + +// Use F_GETLK to check whether or not there are any readers with open +// wal-mode transactions in other processes on database file pFile. If +// no error occurs, return SQLITE_OK and set (*piOut) to 1 if there are +// such transactions, or 0 otherwise. If an error occurs, return an +// SQLite error code. The final value of *piOut is undefined in this +// case. +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var rc int32 = SQLITE_OK + *(*int32)(unsafe.Pointer(piOut)) = 0 + if (*UnixFile)(unsafe.Pointer(pFile)).FpShm != 0 { + var pShmNode uintptr = (*UnixShm)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpShm)).FpShmNode + // var f flock at bp+8, 32 + + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(flock{}))) + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_type = int16(F_WRLCK) + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_start = int64((22+SQLITE_SHM_NLOCK)*4 + 3) + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_len = int64(SQLITE_SHM_NLOCK - 3) + + Xsqlite3_mutex_enter(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex) + if (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, F_GETLK64, libc.VaList(bp, bp+8)) < 0 { + rc = SQLITE_IOERR | int32(15)<<8 + } else { + *(*int32)(unsafe.Pointer(piOut)) = libc.Bool32(int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) != F_UNLCK) + } + Xsqlite3_mutex_leave(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex) + } + + return rc +} + +// Apply posix advisory locks for all bytes from ofst through ofst+n-1. +// +// Locks block if the mask is exactly UNIX_SHM_C and are non-blocking +// otherwise. +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var pShmNode uintptr // Apply locks to this open shared-memory segment + // var f flock at bp+8, 32 + // The posix advisory locking structure + var rc int32 = SQLITE_OK // Result code form fcntl() + + // Access to the unixShmNode object is serialized by the caller + pShmNode = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpInode)).FpShmNode + + // Shared locks never span more than one byte + + // Locks are within range + + if (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm >= 0 { + var res int32 + // Initialize the locking parameters + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_type = int16(lockType) + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_start = X__off_t(ofst) + (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_len = X__off_t(n) + res = (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, F_SETLK64, libc.VaList(bp, bp+8)) + if res == -1 { + rc = SQLITE_BUSY + } + } + + // Update the global lock state and do debug tracing + + return rc +} + +// Return the minimum number of 32KB shm regions that should be mapped at +// a time, assuming that each mapping must be an integer multiple of the +// current system page-size. +// +// Usually, this is 1. The exception seems to be systems that are configured +// to use 64KB pages - in this case each mapping must cover at least two +// shm regions. +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ + var shmsz int32 = 32 * 1024 // SHM region size + var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size + // Page size must be a power of 2 + if pgsz < shmsz { + return 1 + } + return pgsz / shmsz +} + +// Purge the unixShmNodeList list of all entries with unixShmNode.nRef==0. +// +// This is not a VFS shared-memory method; it is a utility function called +// by VFS shared-memory methods. +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ + var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode + + if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { + var nShmPerMap int32 = unixShmRegionPerMap(tls) + var i int32 + + Xsqlite3_mutex_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FpShmMutex) + for i = 0; i < int32((*UnixShmNode)(unsafe.Pointer(p)).FnRegion); i = i + nShmPerMap { + if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { + (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FapRegion + uintptr(i)*8)), uint64((*UnixShmNode)(unsafe.Pointer(p)).FszRegion)) + } else { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FapRegion + uintptr(i)*8))) + } + } + Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) + if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) + (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 + } + (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) + Xsqlite3_free(tls, p) + } +} + +// The DMS lock has not yet been taken on shm file pShmNode. Attempt to +// take it now. Return SQLITE_OK if successful, or an SQLite error +// code otherwise. +// +// If the DMS cannot be locked because this is a readonly_shm=1 +// connection and no other process already holds a lock, return +// SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + // var lock flock at bp+8, 32 + + var rc int32 = SQLITE_OK + + // Use F_GETLK to determine the locks other processes are holding + // on the DMS byte. If it indicates that another process is holding + // a SHARED lock, then this process may also take a SHARED lock + // and proceed with opening the *-shm file. + // + // Or, if no other process is holding any lock, then this process + // is the first to open it. In this case take an EXCLUSIVE lock on the + // DMS byte and truncate the *-shm file to zero bytes in size. Then + // downgrade to a SHARED lock on the DMS byte. + // + // If another process is holding an EXCLUSIVE lock on the DMS byte, + // return SQLITE_BUSY to the caller (it will try again). An earlier + // version of this code attempted the SHARED lock at this point. But + // this introduced a subtle race condition: if the process holding + // EXCLUSIVE failed just before truncating the *-shm file, then this + // process might open and use the *-shm file without truncating it. + // And if the *-shm file has been corrupted by a power failure or + // system crash, the database itself may also become corrupt. + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_whence = int16(SEEK_SET) + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_start = int64((22+SQLITE_SHM_NLOCK)*4 + SQLITE_SHM_NLOCK) + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_len = int64(1) + (*flock)(unsafe.Pointer(bp + 8 /* &lock */)).Fl_type = int16(F_WRLCK) + if (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, F_GETLK64, libc.VaList(bp, bp+8)) != 0 { + rc = SQLITE_IOERR | int32(15)<<8 + } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_UNLCK { + if (*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0 { + (*UnixShmNode)(unsafe.Pointer(pShmNode)).FisUnlocked = U8(1) + rc = SQLITE_READONLY | int32(5)<<8 + } else { + rc = unixShmSystemLock(tls, pDbFd, F_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) + // The first connection to attach must truncate the -shm file. We + // truncate to 3 bytes (an arbitrary small number, less than the + // -shm header size) rather than 0 as a system debugging aid, to + // help detect if a -shm file truncation is legitimate or is the work + // or a rogue process. + if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3239, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) + } + } + } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { + rc = SQLITE_BUSY + } + + if rc == SQLITE_OK { + + rc = unixShmSystemLock(tls, pDbFd, F_RDLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) + } + return rc +} + +// Open a shared-memory area associated with open database file pDbFd. +// This particular implementation uses mmapped files. +// +// The file used to implement shared-memory is in the same directory +// as the open database file and has the same name as the open database +// file with the "-shm" suffix added. For example, if the database file +// is "/home/user1/config.db" then the file that is created and mmapped +// for shared memory will be called "/home/user1/config.db-shm". +// +// Another approach to is to use files in /dev/shm or /dev/tmp or an +// some other tmpfs mount. But if a file in a different directory +// from the database file is used, then differing access permissions +// or a chroot() might cause two different processes on the same +// database to end up using different files for shared memory - +// meaning that their memory would not really be shared - resulting +// in database corruption. Nevertheless, this tmpfs file usage +// can be enabled at compile-time using -DSQLITE_SHM_DIRECTORY="/dev/shm" +// or the equivalent. The use of the SQLITE_SHM_DIRECTORY compile-time +// option results in an incompatible build of SQLite; builds of SQLite +// that with differing SQLITE_SHM_DIRECTORY settings attempt to use the +// same database file at the same time, database corruption will likely +// result. The SQLITE_SHM_DIRECTORY compile-time option is considered +// "unsupported" and may go away in a future SQLite release. +// +// When opening a new shared-memory file, if no other instances of that +// file are currently open, in this process or in other processes, then +// the file must be truncated to zero length or have its header cleared. +// +// If the original database file (pDbFd) is using the "unix-excl" VFS +// that means that an exclusive lock is held on the database file and +// that no other processes are able to read or write the database. In +// that case, we do not really need shared memory. No shared memory +// file is created. The shared memory will be simulated with heap memory. +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var p uintptr // The connection to be opened + var pShmNode uintptr // The underlying mmapped file + var rc int32 // Result code + var pInode uintptr // The inode of fd + var zShm uintptr // Name of the file used for SHM + var nShmFilename int32 + // var sStat stat at bp+8, 128 + // fstat() info for database file + var zBasePath uintptr + p = uintptr(0) + rc = SQLITE_OK // Size of the SHM filename in bytes + + // Allocate space for the new unixShm object. + p = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(unixShm{}))) + if !(p == uintptr(0)) { + goto __1 + } + return SQLITE_NOMEM +__1: + ; + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(unixShm{}))) + + // Check to see if a unixShmNode object already exists. Reuse an existing + // one if present. Create a new one if necessary. + + unixEnterMutex(tls) + pInode = (*UnixFile)(unsafe.Pointer(pDbFd)).FpInode + pShmNode = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpShmNode + if !(pShmNode == uintptr(0)) { + goto __2 + } // fstat() info for database file + zBasePath = (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath + + // Call fstat() to figure out the permissions on the database file. If + // a new *-shm file is created, an attempt will be made to create it + // with the same permissions. + if !((*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).Fh, bp+8) != 0) { + goto __3 + } + rc = SQLITE_IOERR | int32(7)<<8 + goto shm_open_err +__3: + ; + + nShmFilename = 6 + int32(libc.Xstrlen(tls, zBasePath)) + pShmNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(unixShmNode{}))+uint64(nShmFilename))) + if !(pShmNode == uintptr(0)) { + goto __4 + } + rc = SQLITE_NOMEM + goto shm_open_err +__4: + ; + libc.Xmemset(tls, pShmNode, 0, uint64(unsafe.Sizeof(unixShmNode{}))+uint64(nShmFilename)) + zShm = libc.AssignPtrUintptr(pShmNode+16, pShmNode+1*96) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3619, libc.VaList(bp, zBasePath)) + + (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 + (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode + (*unixShmNode)(unsafe.Pointer(pShmNode)).FpInode = (*UnixFile)(unsafe.Pointer(pDbFd)).FpInode + if !(Xsqlite3Config.FbCoreMutex != 0) { + goto __5 + } + (*unixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) + if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex == uintptr(0)) { + goto __6 + } + rc = SQLITE_NOMEM + goto shm_open_err +__6: + ; +__5: + ; + + if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { + goto __7 + } + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3626, 0)) { + goto __8 + } + (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0400000, + (*stat)(unsafe.Pointer(bp+8)).Fst_mode&X__mode_t(0777)) +__8: + ; + if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { + goto __9 + } + (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDONLY|0400000, + (*stat)(unsafe.Pointer(bp+8)).Fst_mode&X__mode_t(0777)) + if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { + goto __10 + } + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3203, zShm, 39446) + goto shm_open_err +__10: + ; + (*unixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly = U8(1) +__9: + ; + + // If this process is running as root, make sure that the SHM file + // is owned by the same user that owns the original database. Otherwise, + // the original owner will not be able to connect. + robustFchown(tls, (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm, (*stat)(unsafe.Pointer(bp+8 /* &sStat */)).Fst_uid, (*stat)(unsafe.Pointer(bp+8 /* &sStat */)).Fst_gid) + + rc = unixLockSharedMemory(tls, pDbFd, pShmNode) + if !(rc != SQLITE_OK && rc != SQLITE_READONLY|int32(5)<<8) { + goto __11 + } + goto shm_open_err +__11: + ; +__7: + ; +__2: + ; + + // Make the new connection a child of the unixShmNode + (*unixShm)(unsafe.Pointer(p)).FpShmNode = pShmNode + (*unixShmNode)(unsafe.Pointer(pShmNode)).FnRef++ + (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm = p + unixLeaveMutex(tls) + + // The reference count on pShmNode has already been incremented under + // the cover of the unixEnterMutex() mutex and the pointer from the + // new (struct unixShm) object to the pShmNode has been set. All that is + // left to do is to link the new object into the linked list starting + // at pShmNode->pFirst. This must be done while holding the + // pShmNode->pShmMutex. + Xsqlite3_mutex_enter(tls, (*unixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex) + (*unixShm)(unsafe.Pointer(p)).FpNext = (*unixShmNode)(unsafe.Pointer(pShmNode)).FpFirst + (*unixShmNode)(unsafe.Pointer(pShmNode)).FpFirst = p + Xsqlite3_mutex_leave(tls, (*unixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex) + return rc + + // Jump here on any error +shm_open_err: + unixShmPurge(tls, pDbFd) // This call frees pShmNode if required + Xsqlite3_free(tls, p) + unixLeaveMutex(tls) + return rc +} + +// This function is called to obtain a pointer to region iRegion of the +// shared-memory associated with the database file fd. Shared-memory regions +// are numbered starting from zero. Each shared-memory region is szRegion +// bytes in size. +// +// If an error occurs, an error code is returned and *pp is set to NULL. +// +// Otherwise, if the bExtend parameter is 0 and the requested shared-memory +// region has not been allocated (by any client, including one running in a +// separate process), then *pp is set to NULL and SQLITE_OK returned. If +// bExtend is non-zero and the requested shared-memory region has not yet +// been allocated, it is allocated by this function. +// +// If the shared-memory region has already been allocated or is allocated by +// this call as described above, then it is mapped into this processes +// address space (if it is not already), *pp is set to point to the mapped +// memory and SQLITE_OK returned. +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ + bp := tls.Alloc(132) + defer tls.Free(132) + + var pDbFd uintptr + var p uintptr + var pShmNode uintptr + var rc int32 + var nShmPerMap int32 + var nReqRegion int32 + var zFile uintptr + // var x int32 at bp+128, 4 + + var iPg int32 + var nMap int32 + var i int32 + var pMem uintptr + var apNew uintptr // New apRegion[] array + var nByte int32 // Minimum required file size + // var sStat stat at bp, 128 + pDbFd = fd + rc = SQLITE_OK + nShmPerMap = unixShmRegionPerMap(tls) + + // If the shared-memory file has not yet been opened, open it now. + if !((*UnixFile)(unsafe.Pointer(pDbFd)).FpShm == uintptr(0)) { + goto __1 + } + rc = unixOpenSharedMemory(tls, pDbFd) + if !(rc != SQLITE_OK) { + goto __2 + } + return rc +__2: + ; +__1: + ; + + p = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm + pShmNode = (*UnixShm)(unsafe.Pointer(p)).FpShmNode + Xsqlite3_mutex_enter(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex) + if !((*UnixShmNode)(unsafe.Pointer(pShmNode)).FisUnlocked != 0) { + goto __3 + } + rc = unixLockSharedMemory(tls, pDbFd, pShmNode) + if !(rc != SQLITE_OK) { + goto __4 + } + goto shmpage_out +__4: + ; + (*UnixShmNode)(unsafe.Pointer(pShmNode)).FisUnlocked = U8(0) +__3: + ; + + // Minimum number of regions required to be mapped. + nReqRegion = (iRegion + nShmPerMap) / nShmPerMap * nShmPerMap + + if !(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion) < nReqRegion) { + goto __5 + } // New apRegion[] array + nByte = nReqRegion * szRegion // Used by fstat() + + (*UnixShmNode)(unsafe.Pointer(pShmNode)).FszRegion = szRegion + + if !((*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm >= 0) { + goto __6 + } + // The requested region is not mapped into this processes address space. + // Check to see if it has been allocated (i.e. if the wal-index file is + // large enough to contain the requested region). + if !((*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, bp) != 0) { + goto __7 + } + rc = SQLITE_IOERR | int32(19)<<8 + goto shmpage_out +__7: + ; + + if !((*stat)(unsafe.Pointer(bp)).Fst_size < X__off64_t(nByte)) { + goto __8 + } + // The requested memory region does not exist. If bExtend is set to + // false, exit early. *pp will be set to NULL and SQLITE_OK returned. + if !!(bExtend != 0) { + goto __9 + } + goto shmpage_out + goto __10 +__9: + + // Write to the last byte of each newly allocated or extended page + ; + iPg = int32((*stat)(unsafe.Pointer(bp)).Fst_size / X__off64_t(pgsz)) +__11: + if !(iPg < nByte/pgsz) { + goto __13 + } + *(*int32)(unsafe.Pointer(bp + 128 /* x */)) = 0 + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1525, 1, bp+128) != 1) { + goto __14 + } + zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3274, zFile, 39590) + goto shmpage_out +__14: + ; + goto __12 +__12: + iPg++ + goto __11 + goto __13 +__13: + ; +__10: + ; +__8: + ; +__6: + ; + + // Map the requested memory region into this processes address space. + apNew = Xsqlite3_realloc(tls, + (*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion, int32(uint64(nReqRegion)*uint64(unsafe.Sizeof(uintptr(0))))) + if !!(apNew != 0) { + goto __15 + } + rc = SQLITE_IOERR | int32(12)<<8 + goto shmpage_out +__15: + ; + (*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion = apNew +__16: + if !(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion) < nReqRegion) { + goto __17 + } + nMap = szRegion * nShmPerMap + if !((*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm >= 0) { + goto __18 + } + pMem = (*(*func(*libc.TLS, uintptr, Size_t, int32, int32, int32, Off_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 22*24 + 8)))(tls, uintptr(0), uint64(nMap), + func() int32 { + if (*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0 { + return PROT_READ + } + return PROT_READ | PROT_WRITE + }(), + MAP_SHARED, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(I64(szRegion)*I64((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion))) + if !(pMem == libc.UintptrFromInt32(-1)) { + goto __20 + } + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3361, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) + goto shmpage_out +__20: + ; + goto __19 +__18: + pMem = Xsqlite3_malloc64(tls, uint64(nMap)) + if !(pMem == uintptr(0)) { + goto __21 + } + rc = SQLITE_NOMEM + goto shmpage_out +__21: + ; + libc.Xmemset(tls, pMem, 0, uint64(nMap)) +__19: + ; + + i = 0 +__22: + if !(i < nShmPerMap) { + goto __24 + } + *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion)+i)*8)) = pMem + uintptr(szRegion*i) + goto __23 +__23: + i++ + goto __22 + goto __24 +__24: + ; + *(*U16)(unsafe.Pointer(pShmNode + 32)) += U16(nShmPerMap) + goto __16 +__17: + ; +__5: + ; + +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)) + goto __26 +__25: + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) +__26: + ; + if !((*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0 && rc == SQLITE_OK) { + goto __27 + } + rc = SQLITE_READONLY +__27: + ; + Xsqlite3_mutex_leave(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex) + return rc +} + +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ + +// Check that the pShmNode->aLock[] array comports with the locking bitmasks +// held by each client. Return true if it does, or false otherwise. This +// is to be used in an assert(). e.g. +// +// assert( assertLockingArrayOk(pShmNode) ); + +// Change the lock state for a shared-memory segment. +// +// Note that the relationship between SHAREd and EXCLUSIVE locks is a little +// different here than in posix. In xShmLock(), one can go from unlocked +// to shared and back or from unlocked to exclusive and back. But one may +// not go from shared to exclusive or from exclusive to shared. +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ + var pDbFd uintptr = fd // Connection holding shared memory + var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked + var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode + var rc int32 = SQLITE_OK // Result code + var mask U16 // Mask of locks to take or release + var aLock uintptr = pShmNode + 64 /* &.aLock */ + + // Check that, if this to be a blocking lock, no locks that occur later + // in the following list than the lock being obtained are already held: + // + // 1. Checkpointer lock (ofst==1). + // 2. Write lock (ofst==0). + // 3. Read locks (ofst>=3 && ofst func() int32 { + if int32((*UnixShm)(unsafe.Pointer(p)).FsharedMask)&(int32(1)<nRef has reached 0, then close the underlying + // shared-memory file, too + + unixEnterMutex(tls) + + (*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRef-- + if (*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRef == 0 { + if deleteFlag != 0 && (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm >= 0 { + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename) + } + unixShmPurge(tls, pDbFd) + } + unixLeaveMutex(tls) + + return SQLITE_OK +} + +// If it is currently memory mapped, unmap file pFd. +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ + + if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { + (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) + (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion = uintptr(0) + (*UnixFile)(unsafe.Pointer(pFd)).FmmapSize = int64(0) + (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual = int64(0) + } +} + +// Attempt to set the size of the memory mapping maintained by file +// descriptor pFd to nNew bytes. Any existing mapping is discarded. +// +// If successful, this function sets the following variables: +// +// unixFile.pMapRegion +// unixFile.mmapSize +// unixFile.mmapSizeActual +// +// If unsuccessful, an error message is logged via sqlite3_log() and +// the three variables above are zeroed. In this case SQLite should +// continue accessing the database using the xRead() and xWrite() +// methods. +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ + var zErr uintptr = ts + 3361 /* "mmap" */ + var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file + var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping + var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual // Size of pOrig region in bytes + var pNew uintptr = uintptr(0) // Location of new mapping + var flags int32 = PROT_READ // Flags to pass to mmap() + + if pOrig != 0 { + var nReuse I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSize + var pReq uintptr = pOrig + uintptr(nReuse) + + // Unmap any pages of the existing mapping that cannot be reused. + if nReuse != nOrig { + (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, pReq, uint64(nOrig-nReuse)) + } + + pNew = (*(*func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 24*24 + 8)))(tls, pOrig, uint64(nReuse), uint64(nNew), MREMAP_MAYMOVE, 0) + zErr = ts + 3373 /* "mremap" */ + + // The attempt to extend the existing mapping failed. Free it. + if pNew == libc.UintptrFromInt32(-1) || pNew == uintptr(0) { + (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, pOrig, uint64(nReuse)) + } + } + + // If pNew is still NULL, try to create an entirely new mapping. + if pNew == uintptr(0) { + pNew = (*(*func(*libc.TLS, uintptr, Size_t, int32, int32, int32, Off_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 22*24 + 8)))(tls, uintptr(0), uint64(nNew), flags, MAP_SHARED, h, int64(0)) + } + + if pNew == libc.UintptrFromInt32(-1) { + pNew = uintptr(0) + nNew = int64(0) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) + + // If the mmap() above failed, assume that all subsequent mmap() calls + // will probably fail too. Fall back to using xRead/xWrite exclusively + // in this case. + (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) + } + (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion = pNew + (*UnixFile)(unsafe.Pointer(pFd)).FmmapSize = libc.AssignPtrInt64(pFd+88, nNew) +} + +// Memory map or remap the file opened by file-descriptor pFd (if the file +// is already mapped, the existing mapping is replaced by the new). Or, if +// there already exists a mapping for this file, and there are still +// outstanding xFetch() references to it, this function is a no-op. +// +// If parameter nByte is non-negative, then it is the requested size of +// the mapping to create. Otherwise, if nByte is less than zero, then the +// requested size is the size of the file on disk. The actual size of the +// created mapping is either the requested size or the value configured +// using SQLITE_FCNTL_MMAP_LIMIT, whichever is smaller. +// +// SQLITE_OK is returned if no error occurs (even if the mapping is not +// recreated as a result of outstanding references) or an SQLite error +// code otherwise. +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + if (*UnixFile)(unsafe.Pointer(pFd)).FnFetchOut > 0 { + return SQLITE_OK + } + + if nMap < int64(0) { + // var statbuf stat at bp, 128 + // Low-level file information + if (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).Fh, bp) != 0 { + return SQLITE_IOERR | int32(7)<<8 + } + nMap = I64((*stat)(unsafe.Pointer(bp /* &statbuf */)).Fst_size) + } + if nMap > (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax { + nMap = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax + } + + if nMap != (*UnixFile)(unsafe.Pointer(pFd)).FmmapSize { + unixRemapfile(tls, pFd, nMap) + } + + return SQLITE_OK +} + +// If possible, return a pointer to a mapping of file fd starting at offset +// iOff. The mapping must be valid for at least nAmt bytes. +// +// If such a pointer can be obtained, store it in *pp and return SQLITE_OK. +// Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK. +// Finally, if an error does occur, return an SQLite error code. The final +// value of *pp is undefined in this case. +// +// If this function does return a pointer, the caller must eventually +// release the reference by calling unixUnfetch(). +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ + var pFd uintptr = fd // The underlying database file + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + + if (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax > int64(0) { + if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion == uintptr(0) { + var rc int32 = unixMapfile(tls, pFd, int64(-1)) + if rc != SQLITE_OK { + return rc + } + } + if (*UnixFile)(unsafe.Pointer(pFd)).FmmapSize >= iOff+I64(nAmt) { + *(*uintptr)(unsafe.Pointer(pp)) = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion + uintptr(iOff) + (*UnixFile)(unsafe.Pointer(pFd)).FnFetchOut++ + } + } + return SQLITE_OK +} + +// If the third argument is non-NULL, then this function releases a +// reference obtained by an earlier call to unixFetch(). The second +// argument passed to this function must be the same as the corresponding +// argument that was passed to the unixFetch() invocation. +// +// Or, if the third argument is NULL, then this function is being called +// to inform the VFS layer that, according to POSIX, any existing mapping +// may now be invalid and should be unmapped. +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ + var pFd uintptr = fd // The underlying database file + _ = iOff + + // If p==0 (unmap the entire file) then there must be no outstanding + // xFetch references. Or, if p!=0 (meaning it is an xFetch reference), + // then there must be at least one outstanding. + + // If p!=0, it must match the iOff value. + + if p != 0 { + (*UnixFile)(unsafe.Pointer(pFd)).FnFetchOut-- + } else { + unixUnmapfile(tls, pFd) + } + + return SQLITE_OK +} + +// +// Here ends the implementation of all sqlite3_file methods. +// +// End sqlite3_file Methods ******************************* +// + +// This division contains definitions of sqlite3_io_methods objects that +// implement various file locking strategies. It also contains definitions +// of "finder" functions. A finder-function is used to locate the appropriate +// sqlite3_io_methods object for a particular database file. The pAppData +// field of the sqlite3_vfs VFS objects are initialized to be pointers to +// the correct finder-function for that VFS. +// +// Most finder functions return a pointer to a fixed sqlite3_io_methods +// object. The only interesting finder-function is autolockIoFinder, which +// looks at the filesystem type and tries to guess the best locking +// strategy from that. +// +// For finder-function F, two objects are created: +// +// (1) The real finder-function named "FImpt()". +// +// (2) A constant pointer to this function named just "F". +// +// +// A pointer to the F pointer is used as the pAppData value for VFS +// objects. We have to do this instead of letting pAppData point +// directly at the finder-function since C90 rules prevent a void* +// from be cast into a function pointer. +// +// +// Each instance of this macro generates two objects: +// +// * A constant sqlite3_io_methods object call METHOD that has locking +// methods CLOSE, LOCK, UNLOCK, CKRESLOCK. +// +// * An I/O method finder function called FINDER that returns a pointer +// to the METHOD object in the previous bullet. + +// Here are all of the sqlite3_io_methods objects for each of the +// locking strategies. Functions that return pointers to these methods +// are also created. +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ + +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ + _ = z + _ = p + return uintptr(unsafe.Pointer(&posixIoMethods)) +} + +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ + +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ + _ = z + _ = p + return uintptr(unsafe.Pointer(&nolockIoMethods)) +} + +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ + +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ + _ = z + _ = p + return uintptr(unsafe.Pointer(&dotlockIoMethods)) +} + +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ + +// The proxy locking method is a "super-method" in the sense that it +// opens secondary file descriptors for the conch and lock files and +// it uses proxy, dot-file, AFP, and flock() locking methods on those +// secondary files. For this reason, the division that implements +// proxy locking is located much further down in the file. But we need +// to go ahead and define the sqlite3_io_methods and finder function +// for proxy locking here. So we forward declare the I/O methods. + +// nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set + +// An abstract type for a pointer to an IO method finder function: +type Finder_type = uintptr /* sqlite3.c:40397:34 */ + +// *************************************************************************** +// +// sqlite3_vfs methods **************************** +// +// This division contains the implementation of methods on the +// sqlite3_vfs object. + +// Initialize the contents of the unixFile structure pointed to by pId. +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pLockingStyle uintptr + var pNew uintptr = pId + var rc int32 = SQLITE_OK + + // No locking occurs in temporary files + + (*UnixFile)(unsafe.Pointer(pNew)).Fh = h + (*UnixFile)(unsafe.Pointer(pNew)).FpVfs = pVfs + (*UnixFile)(unsafe.Pointer(pNew)).FzPath = zFilename + (*UnixFile)(unsafe.Pointer(pNew)).FctrlFlags = uint16(U8(ctrlFlags)) + (*UnixFile)(unsafe.Pointer(pNew)).FmmapSizeMax = Xsqlite3Config.FszMmap + if Xsqlite3_uri_boolean(tls, func() uintptr { + if ctrlFlags&UNIXFILE_URI != 0 { + return zFilename + } + return uintptr(0) + }(), + ts+3639, SQLITE_POWERSAFE_OVERWRITE) != 0 { + *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_PSOW) + } + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3644) == 0 { + *(*uint16)(unsafe.Pointer(pNew + 30)) |= uint16(UNIXFILE_EXCL) + } + + if ctrlFlags&UNIXFILE_NOLOCK != 0 { + pLockingStyle = uintptr(unsafe.Pointer(&nolockIoMethods)) + } else { + pLockingStyle = (*(**struct { + f func(*libc.TLS, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData}))).f(tls, zFilename, pNew) + } + + if pLockingStyle == uintptr(unsafe.Pointer(&posixIoMethods)) { + unixEnterMutex(tls) + rc = findInodeInfo(tls, pNew, pNew+16) + if rc != SQLITE_OK { + // If an error occurred in findInodeInfo(), close the file descriptor + // immediately, before releasing the mutex. findInodeInfo() may fail + // in two scenarios: + // + // (a) A call to fstat() failed. + // (b) A malloc failed. + // + // Scenario (b) may only occur if the process is holding no other + // file descriptors open on the same file. If there were other file + // descriptors on this file, then no malloc would be required by + // findInodeInfo(). If this is the case, it is quite safe to close + // handle h - as it is guaranteed that no posix locks will be released + // by doing so. + // + // If scenario (a) caused the error then things are not so safe. The + // implicit assumption here is that if fstat() fails, things are in + // such bad shape that dropping a lock or two doesn't matter much. + robust_close(tls, pNew, h, 40488) + h = -1 + } + unixLeaveMutex(tls) + } else if pLockingStyle == uintptr(unsafe.Pointer(&dotlockIoMethods)) { + // Dotfile locking uses the file path so it needs to be included in + // the dotlockLockingContext + var zLockFile uintptr + var nFilename int32 + + nFilename = int32(libc.Xstrlen(tls, zFilename)) + 6 + zLockFile = Xsqlite3_malloc64(tls, uint64(nFilename)) + if zLockFile == uintptr(0) { + rc = SQLITE_NOMEM + } else { + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3654, libc.VaList(bp, zFilename)) + } + (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile + } + + storeLastErrno(tls, pNew, 0) + if rc != SQLITE_OK { + if h >= 0 { + robust_close(tls, pNew, h, 40573) + } + } else { + (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle + + verifyDbFile(tls, pNew) + } + return rc +} + +// Directories to consider for temp files. +var azTempDirs = [6]uintptr{ + uintptr(0), + uintptr(0), + ts + 3662, + ts + 3671, + ts + 3680, + ts + 1538, +} /* sqlite3.c:40585:19 */ + +// Initialize first two members of azTempDirs[] array. +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ + azTempDirs[0] = libc.Xgetenv(tls, ts+3685) + azTempDirs[1] = libc.Xgetenv(tls, ts+3699) +} + +// Return the name of a directory in which to put temporary files. +// If no suitable temporary file directory can be found, return NULL. +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + var i uint32 = uint32(0) + // var buf stat at bp, 128 + + var zDir uintptr = Xsqlite3_temp_directory + + for 1 != 0 { + if zDir != uintptr(0) && + (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4*24 + 8)))(tls, zDir, bp) == 0 && + (*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0040000) && + (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 2*24 + 8)))(tls, zDir, 03) == 0 { + return zDir + } + if uint64(i) >= uint64(unsafe.Sizeof(azTempDirs))/uint64(unsafe.Sizeof(uintptr(0))) { + break + } + zDir = azTempDirs[libc.PostIncUint32(&i, 1)] + } + return uintptr(0) +} + +// Create a temporary file name in zBuf. zBuf must be allocated +// by the calling process and must be big enough to hold at least +// pVfs->mxPathname bytes. +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var zDir uintptr + var iLimit int32 = 0 + + // 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. + *(*uint8)(unsafe.Pointer(zBuf)) = uint8(0) + + zDir = unixTempFileDir(tls) + if zDir == uintptr(0) { + return SQLITE_IOERR | int32(25)<<8 + } + for __ccgo := true; __ccgo; __ccgo = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 2*24 + 8)))(tls, zBuf, 0) == 0 { + + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) + + *(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = uint8(0) + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3706, + libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24 /* r */)), 0)) + if int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { + return SQLITE_ERROR + } + } + return SQLITE_OK +} + +// Search for an unused file descriptor that was opened on the database +// file (not a journal or super-journal file) identified by pathname +// zPath with SQLITE_OPEN_XXX flags matching those passed as the second +// argument to this function. +// +// Such a file descriptor may exist if a database connection was closed +// but the associated file descriptor could not be closed because some +// other file descriptor open on the same file is holding a file-lock. +// Refer to comments in the unixClose() function and the lengthy comment +// describing "Posix Advisory Locking" at the start of this file for +// further details. Also, ticket #4018. +// +// If a suitable file descriptor is found, then it is returned. If no +// such file descriptor is located, -1 is returned. +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + var pUnused uintptr = uintptr(0) + + // Do not search for an unused file descriptor on vxworks. Not because + // vxworks would not benefit from the change (it might, we're not sure), + // but because no way to test it is currently available. It is better + // not to risk breaking vxworks support for the sake of such an obscure + // feature. + // var sStat stat at bp, 128 + // Results of stat() call + + unixEnterMutex(tls) + + // A stat() call may fail for various reasons. If this happens, it is + // almost certain that an open() call on the same path will also fail. + // For this reason, if an error occurs in the stat() call here, it is + // ignored and -1 is returned. The caller will try to open a new file + // descriptor on the same path, fail, and return an error to SQLite. + // + // Even if a subsequent open() call does succeed, the consequences of + // not searching for a reusable file descriptor are not dire. + if inodeList != uintptr(0) && 0 == (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4*24 + 8)))(tls, zPath, bp) { + var pInode uintptr + + pInode = inodeList + for pInode != 0 && ((*UnixInodeInfo)(unsafe.Pointer(pInode)).FfileId.Fdev != (*stat)(unsafe.Pointer(bp)).Fst_dev || + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FfileId.Fino != U64((*stat)(unsafe.Pointer(bp)).Fst_ino)) { + pInode = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpNext + } + if pInode != 0 { + var pp uintptr + + Xsqlite3_mutex_enter(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + flags = flags & (SQLITE_OPEN_READONLY | SQLITE_OPEN_READWRITE) + for pp = pInode + 40; *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*UnixUnusedFd)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fflags != flags; pp = *(*uintptr)(unsafe.Pointer(pp)) + 8 { + } + pUnused = *(*uintptr)(unsafe.Pointer(pp)) + if pUnused != 0 { + *(*uintptr)(unsafe.Pointer(pp)) = (*UnixUnusedFd)(unsafe.Pointer(pUnused)).FpNext + } + Xsqlite3_mutex_leave(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) + } + } + unixLeaveMutex(tls) + return pUnused +} + +// Find the mode, uid and gid of file zFile. +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + // var sStat stat at bp, 128 + // Output of stat() on database file + var rc int32 = SQLITE_OK + if 0 == (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4*24 + 8)))(tls, zFile, bp) { + *(*Mode_t)(unsafe.Pointer(pMode)) = (*stat)(unsafe.Pointer(bp)).Fst_mode & X__mode_t(0777) + *(*Uid_t)(unsafe.Pointer(pUid)) = (*stat)(unsafe.Pointer(bp /* &sStat */)).Fst_uid + *(*Gid_t)(unsafe.Pointer(pGid)) = (*stat)(unsafe.Pointer(bp /* &sStat */)).Fst_gid + } else { + rc = SQLITE_IOERR | int32(7)<<8 + } + return rc +} + +// This function is called by unixOpen() to determine the unix permissions +// to create new files with. If no error occurs, then SQLITE_OK is returned +// and a value suitable for passing as the third argument to open(2) is +// written to *pMode. If an IO error occurs, an SQLite error code is +// returned and the value of *pMode is not modified. +// +// In most cases, this routine sets *pMode to 0, which will become +// an indication to robust_open() to create the file using +// SQLITE_DEFAULT_FILE_PERMISSIONS adjusted by the umask. +// But if the file being opened is a WAL or regular journal file, then +// this function queries the file-system for the permissions on the +// corresponding database file and sets *pMode to this value. Whenever +// possible, WAL and journal files are created using the same permissions +// as the associated database file. +// +// If the SQLITE_ENABLE_8_3_NAMES option is enabled, then the +// original filename is unavailable. But 8_3_NAMES is only used for +// FAT filesystems and permissions do not matter there, so just use +// the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ + bp := tls.Alloc(513) + defer tls.Free(513) + + var rc int32 = SQLITE_OK // Return Code + *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0) + *(*Uid_t)(unsafe.Pointer(pUid)) = Uid_t(0) + *(*Gid_t)(unsafe.Pointer(pGid)) = Gid_t(0) + if flags&(SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) != 0 { + // var zDb [513]uint8 at bp, 513 + // Database file path + var nDb int32 // Number of valid bytes in zDb + + // zPath is a path to a WAL or journal file. The following block derives + // the path to the associated database file from zPath. This block handles + // the following naming conventions: + // + // "-journal" + // "-wal" + // "-journalNN" + // "-walNN" + // + // where NN is a decimal number. The NN naming schemes are + // used by the test_multiplex.c module. + nDb = Xsqlite3Strlen30(tls, zPath) - 1 + for int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(nDb)))) != '-' { + // In normal operation, the journal file name will always contain + // a '-' character. However in 8+3 filename mode, or if a corrupt + // rollback journal specifies a super-journal with a goofy name, then + // the '-' might be missing. + if nDb == 0 || int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(nDb)))) == '.' { + return SQLITE_OK + } + nDb-- + } + libc.Xmemcpy(tls, bp, zPath, uint64(nDb)) + *(*uint8)(unsafe.Pointer(bp + uintptr(nDb))) = uint8(0) + + rc = getFileMode(tls, bp, pMode, pUid, pGid) + } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { + *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) + } else if flags&SQLITE_OPEN_URI != 0 { + // If this is a main database file and the file was opened using a URI + // filename, check for the "modeof" parameter. If present, interpret + // its value as a filename and try to copy the mode, uid and gid from + // that file. + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3723) + if z != 0 { + rc = getFileMode(tls, z, pMode, pUid, pGid) + } + } + return rc +} + +// Open the file zPath. +// +// Previously, the SQLite OS layer used three functions in place of this +// one: +// +// sqlite3OsOpenReadWrite(); +// sqlite3OsOpenReadOnly(); +// sqlite3OsOpenExclusive(); +// +// These calls correspond to the following combinations of flags: +// +// ReadWrite() -> (READWRITE | CREATE) +// ReadOnly() -> (READONLY) +// OpenExclusive() -> (READWRITE | CREATE | EXCLUSIVE) +// +// The old OpenExclusive() accepted a boolean argument - "delFlag". If +// true, the file was configured to be automatically deleted when the +// file handle closed. To achieve the same effect using this new +// interface, add the DELETEONCLOSE flag to those specified above for +// OpenExclusive(). +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ + bp := tls.Alloc(528) + defer tls.Free(528) + + var p uintptr + var fd int32 // File descriptor returned by open() + var openFlags int32 // Flags to pass to open() + var eType int32 // Type of file to open + var noLock int32 // True to omit locking primitives + var rc int32 // Function Return Code + var ctrlFlags int32 // UNIXFILE_* flags + + var isExclusive int32 + var isDelete int32 + var isCreate int32 + var isReadonly int32 + var isReadWrite int32 + + // If creating a super- or main-file journal, this function will open + // a file-descriptor on the directory too. The first time unixSync() + // is called the directory file descriptor will be fsync()ed and close()d. + var isNewJrnl int32 + + // If argument zPath is a NULL pointer, this function is required to open + // a temporary file. Use this buffer to store the file name in. + // var zTmpname [514]uint8 at bp, 514 + + var zName uintptr + var pUnused uintptr + var rc2 int32 + // var openMode Mode_t at bp+516, 4 + // Permissions to create file with + // var uid Uid_t at bp+520, 4 + // Userid for the file + // var gid Gid_t at bp+524, 4 + p = pFile + fd = -1 + openFlags = 0 + eType = flags & 0x0FFF00 + rc = SQLITE_OK + ctrlFlags = 0 + isExclusive = flags & SQLITE_OPEN_EXCLUSIVE + isDelete = flags & SQLITE_OPEN_DELETEONCLOSE + isCreate = flags & SQLITE_OPEN_CREATE + isReadonly = flags & SQLITE_OPEN_READONLY + isReadWrite = flags & SQLITE_OPEN_READWRITE + isNewJrnl = libc.Bool32(isCreate != 0 && (eType == SQLITE_OPEN_SUPER_JOURNAL || + eType == SQLITE_OPEN_MAIN_JOURNAL || + eType == SQLITE_OPEN_WAL)) + zName = zPath + + // Check the following statements are true: + // + // (a) Exactly one of the READWRITE and READONLY flags must be set, and + // (b) if CREATE is set, then READWRITE must also be set, and + // (c) if EXCLUSIVE is set, then CREATE must also be set. + // (d) if DELETEONCLOSE is set, then CREATE must also be set. + + // The main DB, main journal, WAL file and super-journal are never + // automatically deleted. Nor are they ever temporary files. + + // Assert that the upper layer has set one of the "file-type" flags. + + // Detect a pid change and reset the PRNG. There is a race condition + // here such that two or more threads all trying to open databases at + // the same instant might all reset the PRNG. But multiple resets + // are harmless. + if !(randomnessPid != libc.Xgetpid(tls)) { + goto __1 + } + randomnessPid = libc.Xgetpid(tls) + Xsqlite3_randomness(tls, 0, uintptr(0)) +__1: + ; + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(UnixFile{}))) + + if !(eType == SQLITE_OPEN_MAIN_DB) { + goto __2 + } + pUnused = findReusableFd(tls, zName, flags) + if !(pUnused != 0) { + goto __4 + } + fd = (*UnixUnusedFd)(unsafe.Pointer(pUnused)).Ffd + goto __5 +__4: + pUnused = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(UnixUnusedFd{}))) + if !!(pUnused != 0) { + goto __6 + } + return SQLITE_NOMEM +__6: + ; +__5: + ; + (*UnixFile)(unsafe.Pointer(p)).FpPreallocatedUnused = pUnused + + // Database filenames are double-zero terminated if they are not + // URIs with parameters. Hence, they can always be passed into + // sqlite3_uri_parameter(). + + goto __3 +__2: + if !!(zName != 0) { + goto __7 + } + // If zName is NULL, the upper layer is requesting a temp file. + + rc = unixGetTempname(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname, bp) + if !(rc != SQLITE_OK) { + goto __8 + } + return rc +__8: + ; + zName = bp /* &zTmpname[0] */ + + // Generated temporary filenames are always double-zero terminated + // for use by sqlite3_uri_parameter(). + +__7: + ; +__3: + ; + + // Determine the value of the flags parameter passed to POSIX function + // open(). These must be calculated even if open() is not called, as + // they may be stored as part of the file handle and used by the + // 'conch file' locking functions later on. + if !(isReadonly != 0) { + goto __9 + } + openFlags = openFlags | O_RDONLY +__9: + ; + if !(isReadWrite != 0) { + goto __10 + } + openFlags = openFlags | O_RDWR +__10: + ; + if !(isCreate != 0) { + goto __11 + } + openFlags = openFlags | O_CREAT +__11: + ; + if !(isExclusive != 0) { + goto __12 + } + openFlags = openFlags | (O_EXCL | 0400000) +__12: + ; + openFlags = openFlags | (0 | O_BINARY | 0400000) + + if !(fd < 0) { + goto __13 + } // Groupid for the file + rc = findCreateFileMode(tls, zName, flags, bp+516, bp+520, bp+524) + if !(rc != SQLITE_OK) { + goto __14 + } + + return rc +__14: + ; + fd = robust_open(tls, zName, openFlags, *(*Mode_t)(unsafe.Pointer(bp + 516 /* openMode */))) + + if !(fd < 0) { + goto __15 + } + if !(isNewJrnl != 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EACCES && (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 2*24 + 8)))(tls, zName, F_OK) != 0) { + goto __16 + } + // If unable to create a journal because the directory is not + // writable, change the error code to indicate that. + rc = SQLITE_READONLY | int32(6)<<8 + goto __17 +__16: + if !(*(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != EISDIR && isReadWrite != 0) { + goto __18 + } + // Failed to open the file for read/write access. Try read-only. + flags = flags & libc.CplInt32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE) + openFlags = openFlags & libc.CplInt32(O_RDWR|O_CREAT) + flags = flags | SQLITE_OPEN_READONLY + openFlags = openFlags | O_RDONLY + isReadonly = 1 + fd = robust_open(tls, zName, openFlags, *(*Mode_t)(unsafe.Pointer(bp + 516 /* openMode */))) +__18: + ; +__17: + ; +__15: + ; + if !(fd < 0) { + goto __19 + } + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3203, zName, 41002) + if !(rc == SQLITE_OK) { + goto __20 + } + rc = rc2 +__20: + ; + goto open_finished +__19: + ; + + // The owner of the rollback journal or WAL file should always be the + // same as the owner of the database file. Try to ensure that this is + // the case. The chown() system call will be a no-op if the current + // process lacks root privileges, be we should at least try. Without + // this step, if a root process opens a database file, it can leave + // behinds a journal/WAL that is owned by root and hence make the + // database inaccessible to unprivileged processes. + // + // If openMode==0, then that means uid and gid are not set correctly + // (probably because SQLite is configured to use 8+3 filename mode) and + // in that case we do not want to attempt the chown(). + if !(*(*Mode_t)(unsafe.Pointer(bp + 516)) != 0 && flags&(SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) != 0) { + goto __21 + } + robustFchown(tls, fd, *(*Uid_t)(unsafe.Pointer(bp + 520 /* uid */)), *(*Gid_t)(unsafe.Pointer(bp + 524 /* gid */))) +__21: + ; +__13: + ; + + if !(pOutFlags != 0) { + goto __22 + } + *(*int32)(unsafe.Pointer(pOutFlags)) = flags +__22: + ; + + if !((*UnixFile)(unsafe.Pointer(p)).FpPreallocatedUnused != 0) { + goto __23 + } + (*UnixUnusedFd)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(p)).FpPreallocatedUnused)).Ffd = fd + (*UnixUnusedFd)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(p)).FpPreallocatedUnused)).Fflags = flags & (SQLITE_OPEN_READONLY | SQLITE_OPEN_READWRITE) +__23: + ; + + if !(isDelete != 0) { + goto __24 + } + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, zName) +__24: + ; + + // Set up appropriate ctrlFlags + if !(isDelete != 0) { + goto __25 + } + ctrlFlags = ctrlFlags | UNIXFILE_DELETE +__25: + ; + if !(isReadonly != 0) { + goto __26 + } + ctrlFlags = ctrlFlags | UNIXFILE_RDONLY +__26: + ; + noLock = libc.Bool32(eType != SQLITE_OPEN_MAIN_DB) + if !(noLock != 0) { + goto __27 + } + ctrlFlags = ctrlFlags | UNIXFILE_NOLOCK +__27: + ; + if !(isNewJrnl != 0) { + goto __28 + } + ctrlFlags = ctrlFlags | UNIXFILE_DIRSYNC +__28: + ; + if !(flags&SQLITE_OPEN_URI != 0) { + goto __29 + } + ctrlFlags = ctrlFlags | UNIXFILE_URI +__29: + ; + + rc = fillInUnixFile(tls, pVfs, fd, pFile, zPath, ctrlFlags) + +open_finished: + if !(rc != SQLITE_OK) { + goto __30 + } + Xsqlite3_free(tls, (*UnixFile)(unsafe.Pointer(p)).FpPreallocatedUnused) +__30: + ; + return rc +} + +// Delete the file at zPath. If the dirSync argument is true, fsync() +// the directory after deleting the file. +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 = SQLITE_OK + _ = NotUsed + + if (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, zPath) == -1 { + if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == ENOENT { + rc = SQLITE_IOERR | int32(23)<<8 + } else { + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3313, zPath, 41141) + } + return rc + } + if dirSync&1 != 0 { + // var fd int32 at bp, 4 + + rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) + if rc == SQLITE_OK { + if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3730, zPath, 41151) + } + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) + } else { + + rc = SQLITE_OK + } + } + return rc +} + +// Test the existence of or access permissions of file zPath. The +// test performed depends on the value of flags: +// +// SQLITE_ACCESS_EXISTS: Return 1 if the file exists +// SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable. +// SQLITE_ACCESS_READONLY: Return 1 if the file is readable. +// +// Otherwise return 0. +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + _ = NotUsed + + // The spec says there are three possible values for flags. But only + // two of them are actually used + + if flags == SQLITE_ACCESS_EXISTS { + // var buf stat at bp, 128 + + *(*int32)(unsafe.Pointer(pResOut)) = libc.Bool32(0 == (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4*24 + 8)))(tls, zPath, bp) && (!((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0100000)) || (*stat)(unsafe.Pointer(bp)).Fst_size > int64(0))) + } else { + *(*int32)(unsafe.Pointer(pResOut)) = libc.Bool32((*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 2*24 + 8)))(tls, zPath, W_OK|R_OK) == 0) + } + return SQLITE_OK +} + +// If the last component of the pathname in z[0]..z[j-1] is something +// other than ".." then back it out and return true. If the last +// component is empty or if it is ".." then return false. +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ + var j int32 = *(*int32)(unsafe.Pointer(pJ)) + var i int32 + if j <= 0 { + return 0 + } + for i = j - 1; i > 0 && int32(*(*uint8)(unsafe.Pointer(z + uintptr(i-1)))) != '/'; i-- { + } + if i == 0 { + return 0 + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == '.' && i == j-2 && int32(*(*uint8)(unsafe.Pointer(z + uintptr(i+1)))) == '.' { + return 0 + } + *(*int32)(unsafe.Pointer(pJ)) = i - 1 + return 1 +} + +// Convert a relative pathname into a full pathname. Also +// simplify the pathname as follows: +// +// Remove all instances of /./ +// Remove all isntances of /X/../ for any X +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var nPath int32 = Xsqlite3Strlen30(tls, zPath) + var iOff int32 = 0 + var i int32 + // var j int32 at bp+8, 4 + + if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { + if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3221, zPath, 41230) + } + iOff = Xsqlite3Strlen30(tls, zOut) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = uint8('/') + } + if iOff+nPath+1 > nOut { + // SQLite assumes that xFullPathname() nul-terminates the output buffer + // even if it returns an error. + *(*uint8)(unsafe.Pointer(zOut + uintptr(iOff))) = uint8(0) + return Xsqlite3CantopenError(tls, 41239) + } + Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3605, libc.VaList(bp, zPath)) + + // Remove duplicate '/' characters. Except, two // at the beginning + // of a pathname is allowed since this is important on windows. + for i = libc.AssignPtrInt32(bp+8 /* j */, 1); *(*uint8)(unsafe.Pointer(zOut + uintptr(i))) != 0; i++ { + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* j */)), 1)))) = *(*uint8)(unsafe.Pointer(zOut + uintptr(i))) + for int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i)))) == '/' && int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i+1)))) == '/' { + i++ + } + } + *(*uint8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = uint8(0) + + for i = libc.AssignPtrInt32(bp+8 /* j */, 0); *(*uint8)(unsafe.Pointer(zOut + uintptr(i))) != 0; i++ { + if int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i)))) == '/' { + // Skip over internal "/." directory components + if int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i+1)))) == '.' && int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i+2)))) == '/' { + i = i + 1 + continue + } + + // If this is a "/.." directory component then back out the + // previous term of the directory if it is something other than "..". + if int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i+1)))) == '.' && + int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i+2)))) == '.' && + int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i+3)))) == '/' && + unixBackupDir(tls, zOut, bp+8) != 0 { + i = i + 2 + continue + } + } + if *(*int32)(unsafe.Pointer(bp + 8)) >= 0 { + *(*uint8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = *(*uint8)(unsafe.Pointer(zOut + uintptr(i))) + } + *(*int32)(unsafe.Pointer(bp + 8 /* j */))++ + } + if *(*int32)(unsafe.Pointer(bp + 8)) == 0 { + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* j */)), 1)))) = uint8('/') + } + *(*uint8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = uint8(0) + return SQLITE_OK +} + +// Turn a relative pathname into a full pathname. The relative path +// is stored as a nul-terminated string in the buffer pointed to by +// zPath. +// +// zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes +// (in this case, MAX_PATHNAME bytes). The full-path is written to +// this buffer before returning. +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + var rc int32 = SQLITE_OK + var nByte int32 + var nLink int32 = 0 // Number of symbolic links followed so far + var zIn uintptr = zPath // Input path for each iteration of loop + var zDel uintptr = uintptr(0) + + _ = pVfs + + // 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. This function could fail if, for example, the + // current working directory has been unlinked. + + for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK { + + // Call stat() on path zIn. Set bLink to true if the path is a symbolic + // link, or false otherwise. + var bLink int32 = 0 + // var buf stat at bp, 128 + + if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { + if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != ENOENT { + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3401, zIn, 41322) + } + } else { + bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000)) + } + + if bLink != 0 { + nLink++ + if zDel == uintptr(0) { + zDel = Xsqlite3_malloc(tls, nOut) + if zDel == uintptr(0) { + rc = SQLITE_NOMEM + } + } else if nLink >= SQLITE_MAX_SYMLINKS { + rc = Xsqlite3CantopenError(tls, 41334) + } + + if rc == SQLITE_OK { + nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) + if nByte < 0 { + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3392, zIn, 41340) + } else { + if int32(*(*uint8)(unsafe.Pointer(zDel))) != '/' { + var n int32 + for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { + } + if nByte+n+1 > nOut { + rc = Xsqlite3CantopenError(tls, 41346) + } else { + libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint64(nByte+1)) + libc.Xmemcpy(tls, zDel, zIn, uint64(n)) + nByte = nByte + n + } + } + *(*uint8)(unsafe.Pointer(zDel + uintptr(nByte))) = uint8(0) + } + } + + zIn = zDel + } + + if rc == SQLITE_OK && zIn != zOut { + rc = mkFullPathname(tls, zIn, zOut, nOut) + } + if bLink == 0 { + break + } + zIn = zOut + } + + Xsqlite3_free(tls, zDel) + if rc == SQLITE_OK && nLink != 0 { + rc = SQLITE_OK | int32(2)<<8 + } + return rc +} + +// If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT +// the run-time address of the symbol called NAME in the next shared +// object is returned. The "next" relation is defined by the order +// the shared objects were loaded. + +// If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT +// the run-time address of the symbol called NAME in the global scope +// is returned. + +// Type for namespace indices. +type Lmid_t = int64 /* dlfcn.h:44:18 */ + +// Structure containing information about object searched using +// `dladdr'. +type Dl_info = struct { + Fdli_fname uintptr + Fdli_fbase uintptr + Fdli_sname uintptr + Fdli_saddr uintptr +} /* dlfcn.h:94:3 */ + +// This is the type of elements in `Dl_serinfo', below. +// The `dls_name' member points to space in the buffer passed to `dlinfo'. +type Dl_serpath = struct { + Fdls_name uintptr + Fdls_flags uint32 + F__ccgo_pad1 [4]byte +} /* dlfcn.h:175:3 */ + +// This is the structure that must be passed (by reference) to `dlinfo' for +// the RTLD_DI_SERINFO and RTLD_DI_SERINFOSIZE requests. +type Dl_serinfo = struct { + Fdls_size Size_t + Fdls_cnt uint32 + F__ccgo_pad1 [4]byte + F__16 struct { + F__ccgo_pad1 [0]uint64 + Fdls_serpath [0]Dl_serpath + F__ccgo_pad2 [16]byte + } +} /* dlfcn.h:196:3 */ + +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ + _ = NotUsed + return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) +} + +// SQLite calls this function immediately after a call to unixDlSym() or +// unixDlOpen() fails (returns a null pointer). If a more detailed error +// message is available, it is written to zBufOut. If no error message +// is available, zBufOut is left unmodified and SQLite uses a default +// error message. +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var zErr uintptr + _ = NotUsed + unixEnterMutex(tls) + zErr = libc.Xdlerror(tls) + if zErr != 0 { + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3605, libc.VaList(bp, zErr)) + } + unixLeaveMutex(tls) +} + +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 + // returns a void* which is really a pointer to a function. So how do we + // use dlsym() with -pedantic-errors? + // + // Variable x below is defined to be a pointer to a function taking + // parameters void* and const char* and returning a pointer to a function. + // We initialize x by assigning it a pointer to the dlsym() function. + // (That assignment requires a cast.) Then we call the function that + // x points to. + // + // This work-around is unlikely to work correctly on any system where + // you really cannot cast a function pointer into void*. But then, on the + // other hand, dlsym() will not work on such a system either, so we have + // not really lost anything. + var x uintptr + _ = NotUsed + x = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) uintptr + }{libc.Xdlsym})) + return (*struct { + f func(*libc.TLS, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) +} + +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ + _ = NotUsed + libc.Xdlclose(tls, pHandle) +} + +// Write nBuf bytes of random data to the supplied buffer zBuf. +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + _ = NotUsed + + // We have to initialize zBuf to prevent valgrind from reporting + // errors. The reports issued by valgrind are incorrect - we would + // prefer that the randomness be increased by making use of the + // uninitialized space in zBuf - but valgrind errors tend to worry + // some users. Rather than argue, it seems easier just to initialize + // the whole array and silence valgrind, even if that means less randomness + // in the random seed. + // + // When testing, initializing zBuf[] to zero is all we do. That means + // that we always use the same random number sequence. This makes the + // tests repeatable. + libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) + randomnessPid = libc.Xgetpid(tls) + { + var fd int32 + var got int32 + fd = robust_open(tls, ts+3736, O_RDONLY, uint32(0)) + if fd < 0 { + // var t Time_t at bp, 8 + + libc.Xtime(tls, bp) + libc.Xmemcpy(tls, zBuf, bp, uint64(unsafe.Sizeof(Time_t(0)))) + libc.Xmemcpy(tls, zBuf+8, uintptr(unsafe.Pointer(&randomnessPid)), uint64(unsafe.Sizeof(randomnessPid))) + + nBuf = int32(uint64(unsafe.Sizeof(Time_t(0))) + uint64(unsafe.Sizeof(randomnessPid))) + } else { + for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { + got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) + } + robust_close(tls, uintptr(0), fd, 41471) + } + + } + return nBuf +} + +// Sleep for a little while. Return the amount of time slept. +// The argument is the number of microseconds we want to sleep. +// The return value is the number of microseconds of sleep actually +// requested from the underlying operating system, a number which +// might be greater than or equal to the argument, but not less +// than the argument. +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ + if microseconds >= 1000000 { + libc.Xsleep(tls, uint32(microseconds/1000000)) + } + if microseconds%1000000 != 0 { + libc.Xusleep(tls, uint32(microseconds%1000000)) + } + _ = NotUsed + return microseconds +} + +// 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. + +// 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 +// other words, write into *piNow the number of milliseconds since the Julian +// epoch of noon in Greenwich on November 24, 4714 B.C according to the +// proleptic Gregorian calendar. +// +// On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date +// cannot be found. +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 = SQLITE_OK + // var sNow timeval at bp, 16 + + libc.Xgettimeofday(tls, bp, uintptr(0)) // Cannot fail given valid arguments + *(*Sqlite3_int64)(unsafe.Pointer(piNow)) = unixEpoch + int64(1000)*Sqlite3_int64((*timeval)(unsafe.Pointer(bp)).Ftv_sec) + Sqlite3_int64((*timeval)(unsafe.Pointer(bp)).Ftv_usec/int64(1000)) + + _ = NotUsed + return rc +} + +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ + +// Find the current time (in Universal Coordinated Time). Write the +// current time and date as a Julian Day number into *prNow and +// return 0. Return 1 if the time and date cannot be found. +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */)) = int64(0) + var rc int32 + _ = NotUsed + rc = unixCurrentTimeInt64(tls, uintptr(0), bp) + *(*float64)(unsafe.Pointer(prNow)) = float64(*(*Sqlite3_int64)(unsafe.Pointer(bp))) / 86400000.0 + return rc +} + +// The xGetLastError() method is designed to return a better +// low-level error message when operating-system problems come up +// during SQLite operation. Only the integer return code is currently +// used. +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ + _ = NotUsed + _ = NotUsed2 + _ = NotUsed3 + return *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) +} + +// +// End of sqlite3_vfs methods *************************** +// + +// ***************************************************************************** +// +// Begin Proxy Locking ******************************** +// +// Proxy locking is a "uber-locking-method" in this sense: It uses the +// other locking methods on secondary lock files. Proxy locking is a +// meta-layer over top of the primitive locking implemented above. For +// this reason, the division that implements of proxy locking is deferred +// until late in the file (here) after all of the other I/O methods have +// been defined - so that the primitive locking methods are available +// as services to help with the implementation of proxy locking. +// +// +// +// The default locking schemes in SQLite use byte-range locks on the +// database file to coordinate safe, concurrent access by multiple readers +// and writers [http://sqlite.org/lockingv3.html]. The five file locking +// states (UNLOCKED, PENDING, SHARED, RESERVED, EXCLUSIVE) are implemented +// as POSIX read & write locks over fixed set of locations (via fsctl), +// on AFP and SMB only exclusive byte-range locks are available via fsctl +// with _IOWR('z', 23, struct ByteRangeLockPB2) to track the same 5 states. +// To simulate a F_RDLCK on the shared range, on AFP a randomly selected +// address in the shared range is taken for a SHARED lock, the entire +// shared range is taken for an EXCLUSIVE lock): +// +// PENDING_BYTE 0x40000000 +// RESERVED_BYTE 0x40000001 +// SHARED_RANGE 0x40000002 -> 0x40000200 +// +// This works well on the local file system, but shows a nearly 100x +// slowdown in read performance on AFP because the AFP client disables +// the read cache when byte-range locks are present. Enabling the read +// cache exposes a cache coherency problem that is present on all OS X +// supported network file systems. NFS and AFP both observe the +// close-to-open semantics for ensuring cache coherency +// [http://nfs.sourceforge.net/#faq_a8], which does not effectively +// address the requirements for concurrent database access by multiple +// readers and writers +// [http://www.nabble.com/SQLite-on-NFS-cache-coherency-td15655701.html]. +// +// To address the performance and cache coherency issues, proxy file locking +// changes the way database access is controlled by limiting access to a +// single host at a time and moving file locks off of the database file +// and onto a proxy file on the local file system. +// +// +// Using proxy locks +// ----------------- +// +// C APIs +// +// sqlite3_file_control(db, dbname, SQLITE_FCNTL_SET_LOCKPROXYFILE, +// | ":auto:"); +// sqlite3_file_control(db, dbname, SQLITE_FCNTL_GET_LOCKPROXYFILE, +// &); +// +// +// SQL pragmas +// +// PRAGMA [database.]lock_proxy_file= | :auto: +// PRAGMA [database.]lock_proxy_file +// +// Specifying ":auto:" means that if there is a conch file with a matching +// host ID in it, the proxy path in the conch file will be used, otherwise +// a proxy path based on the user's temp dir +// (via confstr(_CS_DARWIN_USER_TEMP_DIR,...)) will be used and the +// actual proxy file name is generated from the name and path of the +// database file. For example: +// +// For database path "/Users/me/foo.db" +// The lock path will be "/sqliteplocks/_Users_me_foo.db:auto:") +// +// Once a lock proxy is configured for a database connection, it can not +// be removed, however it may be switched to a different proxy path via +// the above APIs (assuming the conch file is not being held by another +// connection or process). +// +// +// How proxy locking works +// ----------------------- +// +// Proxy file locking relies primarily on two new supporting files: +// +// * conch file to limit access to the database file to a single host +// at a time +// +// * proxy file to act as a proxy for the advisory locks normally +// taken on the database +// +// The conch file - to use a proxy file, sqlite must first "hold the conch" +// by taking an sqlite-style shared lock on the conch file, reading the +// contents and comparing the host's unique host ID (see below) and lock +// proxy path against the values stored in the conch. The conch file is +// stored in the same directory as the database file and the file name +// is patterned after the database file name as ".-conch". +// If the conch file does not exist, or its contents do not match the +// host ID and/or proxy path, then the lock is escalated to an exclusive +// lock and the conch file contents is updated with the host ID and proxy +// path and the lock is downgraded to a shared lock again. If the conch +// is held by another process (with a shared lock), the exclusive lock +// will fail and SQLITE_BUSY is returned. +// +// The proxy file - a single-byte file used for all advisory file locks +// normally taken on the database file. This allows for safe sharing +// of the database file for multiple readers and writers on the same +// host (the conch ensures that they all use the same local lock file). +// +// Requesting the lock proxy does not immediately take the conch, it is +// only taken when the first request to lock database file is made. +// This matches the semantics of the traditional locking behavior, where +// opening a connection to a database file does not take a lock on it. +// The shared lock and an open file descriptor are maintained until +// the connection to the database is closed. +// +// The proxy file and the lock file are never deleted so they only need +// to be created the first time they are used. +// +// Configuration options +// --------------------- +// +// SQLITE_PREFER_PROXY_LOCKING +// +// Database files accessed on non-local file systems are +// automatically configured for proxy locking, lock files are +// named automatically using the same logic as +// PRAGMA lock_proxy_file=":auto:" +// +// SQLITE_PROXY_DEBUG +// +// Enables the logging of error messages during host id file +// retrieval and creation +// +// LOCKPROXYDIR +// +// Overrides the default directory used for lock proxy files that +// are named automatically via the ":auto:" setting +// +// SQLITE_DEFAULT_PROXYDIR_PERMISSIONS +// +// Permissions to use when creating a directory for storing the +// lock proxy files, only used when LOCKPROXYDIR is not set. +// +// +// As mentioned above, when compiled with SQLITE_PREFER_PROXY_LOCKING, +// setting the environment variable SQLITE_FORCE_PROXY_LOCKING to 1 will +// force proxy locking to be used for every database file opened, and 0 +// will force automatic proxy locking to be disabled for all database +// files (explicitly calling the SQLITE_FCNTL_SET_LOCKPROXYFILE pragma or +// sqlite_file_control API is not affected by SQLITE_FORCE_PROXY_LOCKING). + +// Proxy locking is only available on MacOSX +// +// The proxy locking style is intended for use with AFP filesystems. +// And since AFP is only supported on MacOSX, the proxy locking is also +// restricted to MacOSX. +// +// +// End of the proxy lock implementation ********************** +// + +// Initialize the operating system interface. +// +// This routine registers all VFS implementations for unix-like operating +// systems. This routine, and the sqlite3_os_end() routine that follows, +// should be the only routines in this file that are visible from other +// files. +// +// This routine is called once during SQLite initialization and by a +// single thread. The memory allocation and mutex subsystems have not +// necessarily been initialized when this routine is called, and so they +// should not be used. +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ + var i uint32 // Loop counter + + // Double-check that the aSyscall[] array has been constructed + // correctly. See ticket [bb3a86e890c8e96ab] + + // Register all VFSes defined in the aVfs[] array + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aVfs))/uint64(unsafe.Sizeof(Sqlite3_vfs{})); i++ { + Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&aVfs))+uintptr(i)*168, libc.Bool32(i == uint32(0))) + } + unixBigLock = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) + + // Validate lock assumptions + // Number of available locks + // Start of locking area + // Locks: + // WRITE UNIX_SHM_BASE 120 + // CKPT UNIX_SHM_BASE+1 121 + // RECOVER UNIX_SHM_BASE+2 122 + // READ-0 UNIX_SHM_BASE+3 123 + // READ-1 UNIX_SHM_BASE+4 124 + // READ-2 UNIX_SHM_BASE+5 125 + // READ-3 UNIX_SHM_BASE+6 126 + // READ-4 UNIX_SHM_BASE+7 127 + // DMS UNIX_SHM_BASE+8 128 + // Byte offset of the deadman-switch + + // Initialize temp file dir array. + unixTempFileInit(tls) + + return SQLITE_OK +} + +var aVfs = [4]Sqlite3_vfs{ + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3749, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3754, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3764, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3644, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, +} /* sqlite3.c:42836:22 */ + +// Shutdown the operating system interface. +// +// Some operating systems might need to do some cleanup in this routine, +// to release dynamically allocated objects. But not on unix. +// This routine is a no-op for unix. +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ + unixBigLock = uintptr(0) + return SQLITE_OK +} + +//************* End of os_unix.c ******************************************** +//************* Begin file os_win.c ***************************************** +// 2004 May 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code that is specific to Windows. +// #include "sqliteInt.h" + +//************* End of os_win.c ********************************************* +//************* Begin file memdb.c ****************************************** +// 2016-09-07 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file implements an in-memory VFS. A database is held as a contiguous +// block of memory. +// +// This file also implements interface sqlite3_serialize() and +// sqlite3_deserialize(). +// #include "sqliteInt.h" + +// Forward declaration of objects used by this utility +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ +type MemFile1 = struct { + Fbase Sqlite3_file + FpStore uintptr + FeLock int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:49096:9 */ + +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ +type MemStore1 = struct { + Fsz Sqlite3_int64 + FszAlloc Sqlite3_int64 + FszMax Sqlite3_int64 + FaData uintptr + FpMutex uintptr + FnMmap int32 + FmFlags uint32 + FnRdLock int32 + FnWrLock int32 + FnRef int32 + F__ccgo_pad1 [4]byte + FzFName uintptr +} /* sqlite3.c:49096:9 */ + +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ + +// File-scope variables for holding the memdb files that are accessible +// to multiple database connections in separate threads. +// +// Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. +type MemFS = struct { + FnMemStore int32 + F__ccgo_pad1 [4]byte + FapMemStore uintptr +} /* sqlite3.c:49167:8 */ + +// File-scope variables for holding the memdb files that are accessible +// to multiple database connections in separate threads. +// +// Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. +var memdb_g MemFS /* sqlite3.c:49170:3: */ + +var memdb_vfs = Sqlite3_vfs{ + FiVersion: 2, // szOsFile (set when registered) + FmxPathname: 1024, // pNext + FzName: ts + 3777, + FxOpen: 0, /* memdbDelete, */ // xDelete + FxAccess: 0, // xAccess + FxFullPathname: 0, // xFullPathname + FxDlOpen: 0, // xDlOpen + FxDlError: 0, // xDlError + FxDlSym: 0, // xDlSym + FxDlClose: 0, // xDlClose + FxRandomness: 0, // xRandomness + FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime + FxGetLastError: 0, // xGetLastError + FxCurrentTimeInt64: 0, // xNextSystemCall +} /* sqlite3.c:49206:20 */ + +var memdb_io_methods = Sqlite3_io_methods{ + FiVersion: 3, // iVersion + FxClose: 0, // xClose + FxRead: 0, // xRead + FxWrite: 0, // xWrite + FxTruncate: 0, // xTruncate + FxSync: 0, // xSync + FxFileSize: 0, // xFileSize + FxLock: 0, // xLock + FxUnlock: 0, /* memdbCheckReservedLock, */ // xCheckReservedLock + FxFileControl: 0, /* memdbSectorSize,*/ // xSectorSize + FxDeviceCharacteristics: 0, // xShmUnmap + FxFetch: 0, // xFetch + FxUnfetch: 0, // xUnfetch +} /* sqlite3.c:49231:33 */ + +// Enter/leave the mutex on a MemStore +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ + Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) +} + +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ + Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) +} + +// Close an memdb-file. +// Free the underlying MemStore object when its refcount drops to zero +// or less. +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { + var i int32 + var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) + Xsqlite3_mutex_enter(tls, pVfsMutex) + for i = 0; i < memdb_g.FnMemStore; i++ { + if *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) == p { + memdbEnter(tls, p) + if (*MemStore)(unsafe.Pointer(p)).FnRef == 1 { + *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(libc.PreDecInt32(&memdb_g.FnMemStore, 1))*8)) + if memdb_g.FnMemStore == 0 { + Xsqlite3_free(tls, memdb_g.FapMemStore) + memdb_g.FapMemStore = uintptr(0) + } + } + break + } + } + Xsqlite3_mutex_leave(tls, pVfsMutex) + } else { + memdbEnter(tls, p) + } + (*MemStore)(unsafe.Pointer(p)).FnRef-- + if (*MemStore)(unsafe.Pointer(p)).FnRef <= 0 { + if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_FREEONCLOSE) != 0 { + Xsqlite3_free(tls, (*MemStore)(unsafe.Pointer(p)).FaData) + } + memdbLeave(tls, p) + Xsqlite3_mutex_free(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) + Xsqlite3_free(tls, p) + } else { + memdbLeave(tls, p) + } + return SQLITE_OK +} + +// Read data from an memdb-file. +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + memdbEnter(tls, p) + if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { + libc.Xmemset(tls, zBuf, 0, uint64(iAmt)) + if iOfst < (*MemStore)(unsafe.Pointer(p)).Fsz { + libc.Xmemcpy(tls, zBuf, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr(iOfst), uint64((*MemStore)(unsafe.Pointer(p)).Fsz-iOfst)) + } + memdbLeave(tls, p) + return SQLITE_IOERR | int32(2)<<8 + } + libc.Xmemcpy(tls, zBuf, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr(iOfst), uint64(iAmt)) + memdbLeave(tls, p) + return SQLITE_OK +} + +// Try to enlarge the memory allocation to hold at least sz bytes +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ + var pNew uintptr + if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { + return SQLITE_FULL + } + if newSz > (*MemStore)(unsafe.Pointer(p)).FszMax { + return SQLITE_FULL + } + newSz = newSz * int64(2) + if newSz > (*MemStore)(unsafe.Pointer(p)).FszMax { + newSz = (*MemStore)(unsafe.Pointer(p)).FszMax + } + pNew = Xsqlite3Realloc(tls, (*MemStore)(unsafe.Pointer(p)).FaData, uint64(newSz)) + if pNew == uintptr(0) { + return SQLITE_IOERR | int32(12)<<8 + } + (*MemStore)(unsafe.Pointer(p)).FaData = pNew + (*MemStore)(unsafe.Pointer(p)).FszAlloc = newSz + return SQLITE_OK +} + +// Write data to an memdb-file. +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + memdbEnter(tls, p) + if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + // Can't happen: memdbLock() will return SQLITE_READONLY before + // reaching this point + memdbLeave(tls, p) + return SQLITE_IOERR | int32(3)<<8 + } + if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { + var rc int32 + if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).FszAlloc && + libc.AssignInt32(&rc, memdbEnlarge(tls, p, iOfst+Sqlite_int64(iAmt))) != SQLITE_OK { + memdbLeave(tls, p) + return rc + } + if iOfst > (*MemStore)(unsafe.Pointer(p)).Fsz { + libc.Xmemset(tls, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr((*MemStore)(unsafe.Pointer(p)).Fsz), 0, uint64(iOfst-(*MemStore)(unsafe.Pointer(p)).Fsz)) + } + (*MemStore)(unsafe.Pointer(p)).Fsz = iOfst + Sqlite_int64(iAmt) + } + libc.Xmemcpy(tls, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr(iOfst), z, uint64(iAmt)) + memdbLeave(tls, p) + return SQLITE_OK +} + +// Truncate an memdb-file. +// +// In rollback mode (which is always the case for memdb, as it does not +// support WAL mode) the truncate() method is only used to reduce +// the size of a file, never to increase the size. +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + var rc int32 = SQLITE_OK + memdbEnter(tls, p) + if size > (*MemStore)(unsafe.Pointer(p)).Fsz { + // This can only happen with a corrupt wal mode db + rc = SQLITE_CORRUPT + } else { + (*MemStore)(unsafe.Pointer(p)).Fsz = size + } + memdbLeave(tls, p) + return rc +} + +// Sync an memdb-file. +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ + _ = pFile + _ = flags + return SQLITE_OK +} + +// Return the current file-size of an memdb-file. +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + memdbEnter(tls, p) + *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz + memdbLeave(tls, p) + return SQLITE_OK +} + +// Lock an memdb-file. +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + var rc int32 = SQLITE_OK + if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + if eLock > SQLITE_LOCK_SHARED { + if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock <= SQLITE_LOCK_SHARED { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + } + } else if eLock == SQLITE_LOCK_SHARED { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + } else { + + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + } + + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +// File control method. For custom operations on an memdb-file. +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + var rc int32 = SQLITE_NOTFOUND + memdbEnter(tls, p) + if op == SQLITE_FCNTL_VFSNAME { + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3783, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + rc = SQLITE_OK + } + if op == SQLITE_FCNTL_SIZE_LIMIT { + var iLimit Sqlite3_int64 = *(*Sqlite3_int64)(unsafe.Pointer(pArg)) + if iLimit < (*MemStore)(unsafe.Pointer(p)).Fsz { + if iLimit < int64(0) { + iLimit = (*MemStore)(unsafe.Pointer(p)).FszMax + } else { + iLimit = (*MemStore)(unsafe.Pointer(p)).Fsz + } + } + (*MemStore)(unsafe.Pointer(p)).FszMax = iLimit + *(*Sqlite3_int64)(unsafe.Pointer(pArg)) = iLimit + rc = SQLITE_OK + } + memdbLeave(tls, p) + return rc +} + +// Return the device characteristic flags supported by an memdb-file. +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ + _ = pFile + return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL +} + +// Fetch a page of a memory-mapped file +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + memdbEnter(tls, p) + if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + } else { + (*MemStore)(unsafe.Pointer(p)).FnMmap++ + *(*uintptr)(unsafe.Pointer(pp)) = (*MemStore)(unsafe.Pointer(p)).FaData + uintptr(iOfst) + } + memdbLeave(tls, p) + return SQLITE_OK +} + +// Release a memory-mapped page +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ + var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore + _ = iOfst + _ = pPage + memdbEnter(tls, p) + (*MemStore)(unsafe.Pointer(p)).FnMmap-- + memdbLeave(tls, p) + return SQLITE_OK +} + +// Open an mem file handle. +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ + var pFile uintptr = pFd + var p uintptr = uintptr(0) + var szName int32 + _ = pVfs + + libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) + szName = Xsqlite3Strlen30(tls, zName) + if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + var i int32 + var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) + Xsqlite3_mutex_enter(tls, pVfsMutex) + for i = 0; i < memdb_g.FnMemStore; i++ { + if libc.Xstrcmp(tls, (*MemStore)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)))).FzFName, zName) == 0 { + p = *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) + break + } + } + if p == uintptr(0) { + var apNew uintptr + p = Xsqlite3Malloc(tls, uint64(uint64(unsafe.Sizeof(MemStore{}))+uint64(szName)+uint64(3))) + if p == uintptr(0) { + Xsqlite3_mutex_leave(tls, pVfsMutex) + return SQLITE_NOMEM + } + apNew = Xsqlite3Realloc(tls, memdb_g.FapMemStore, + uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(memdb_g.FnMemStore+1))) + if apNew == uintptr(0) { + Xsqlite3_free(tls, p) + Xsqlite3_mutex_leave(tls, pVfsMutex) + return SQLITE_NOMEM + } + *(*uintptr)(unsafe.Pointer(apNew + uintptr(libc.PostIncInt32(&memdb_g.FnMemStore, 1))*8)) = p + memdb_g.FapMemStore = apNew + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemStore{}))) + (*MemStore)(unsafe.Pointer(p)).FmFlags = uint32(SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE) + (*MemStore)(unsafe.Pointer(p)).FszMax = Xsqlite3Config.FmxMemdbSize + (*MemStore)(unsafe.Pointer(p)).FzFName = p + 1*72 + libc.Xmemcpy(tls, (*MemStore)(unsafe.Pointer(p)).FzFName, zName, uint64(szName+1)) + (*MemStore)(unsafe.Pointer(p)).FpMutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) + if (*MemStore)(unsafe.Pointer(p)).FpMutex == uintptr(0) { + memdb_g.FnMemStore-- + Xsqlite3_free(tls, p) + Xsqlite3_mutex_leave(tls, pVfsMutex) + return SQLITE_NOMEM + } + (*MemStore)(unsafe.Pointer(p)).FnRef = 1 + memdbEnter(tls, p) + } else { + memdbEnter(tls, p) + (*MemStore)(unsafe.Pointer(p)).FnRef++ + } + Xsqlite3_mutex_leave(tls, pVfsMutex) + } else { + p = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(MemStore{}))) + if p == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemStore{}))) + (*MemStore)(unsafe.Pointer(p)).FmFlags = uint32(SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE) + (*MemStore)(unsafe.Pointer(p)).FszMax = Xsqlite3Config.FmxMemdbSize + } + (*MemFile)(unsafe.Pointer(pFile)).FpStore = p + if pOutFlags != uintptr(0) { + *(*int32)(unsafe.Pointer(pOutFlags)) = flags | SQLITE_OPEN_MEMORY + } + (*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods = uintptr(unsafe.Pointer(&memdb_io_methods)) + memdbLeave(tls, p) + return SQLITE_OK +} + +// Test for access permissions. Return true if the requested permission +// is available, or false otherwise. +// +// With memdb, no files ever exist on disk. So always return false. +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ + _ = pVfs + _ = zPath + _ = flags + *(*int32)(unsafe.Pointer(pResOut)) = 0 + return SQLITE_OK +} + +// Populate buffer zOut with the full canonical pathname corresponding +// to the pathname in zPath. zOut is guaranteed to point to a buffer +// of at least (INST_MAX_PATHNAME+1) bytes. +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + _ = pVfs + Xsqlite3_snprintf(tls, nOut, zOut, ts+3605, libc.VaList(bp, zPath)) + return SQLITE_OK +} + +// Open the dynamic library located at zPath and return a handle. +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ + return (*struct { + f func(*libc.TLS, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) +} + +// Populate the buffer zErrMsg (size nByte bytes) with a human readable +// utf-8 string describing the most recent error encountered associated +// with dynamic libraries. +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) +} + +// Return a pointer to the symbol zSymbol in the dynamic library pHandle. +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ + return (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) +} + +// Close the dynamic library handle pHandle. +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) +} + +// Populate the buffer pointed to by zBufOut with nByte bytes of +// random data. +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) +} + +// Sleep for nMicro microseconds. Return the number of microseconds +// actually slept. +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) +} + +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) +} + +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ + return (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) +} + +// Translate a database connection pointer and schema name into a +// MemFile pointer. +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) + var pStore uintptr + var rc int32 = Xsqlite3_file_control(tls, db, zSchema, SQLITE_FCNTL_FILE_POINTER, bp) + if rc != 0 { + return uintptr(0) + } + if (*MemFile)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbase.FpMethods != uintptr(unsafe.Pointer(&memdb_io_methods)) { + return uintptr(0) + } + pStore = (*MemFile)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpStore + memdbEnter(tls, pStore) + if (*MemStore)(unsafe.Pointer(pStore)).FzFName != uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) + } + memdbLeave(tls, pStore) + return *(*uintptr)(unsafe.Pointer(bp /* p */)) +} + +// Return the serialization of a database +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var p uintptr + var iDb int32 + var pBt uintptr + var sz Sqlite3_int64 + var szPage int32 = 0 + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) + var pOut uintptr + var zSql uintptr + var rc int32 + + if zSchema == uintptr(0) { + zSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName + } + p = memdbFromDbSchema(tls, db, zSchema) + iDb = Xsqlite3FindDbName(tls, db, zSchema) + if piSize != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = int64(-1) + } + if iDb < 0 { + return uintptr(0) + } + if p != 0 { + var pStore uintptr = (*MemFile)(unsafe.Pointer(p)).FpStore + + if piSize != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = (*MemStore)(unsafe.Pointer(pStore)).Fsz + } + if mFlags&uint32(SQLITE_SERIALIZE_NOCOPY) != 0 { + pOut = (*MemStore)(unsafe.Pointer(pStore)).FaData + } else { + pOut = Xsqlite3_malloc64(tls, uint64((*MemStore)(unsafe.Pointer(pStore)).Fsz)) + if pOut != 0 { + libc.Xmemcpy(tls, pOut, (*MemStore)(unsafe.Pointer(pStore)).FaData, uint64((*MemStore)(unsafe.Pointer(pStore)).Fsz)) + } + } + return pOut + } + pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt + if pBt == uintptr(0) { + return uintptr(0) + } + szPage = Xsqlite3BtreeGetPageSize(tls, pBt) + zSql = Xsqlite3_mprintf(tls, ts+3798, libc.VaList(bp, zSchema)) + if zSql != 0 { + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) + } else { + rc = SQLITE_NOMEM + } + Xsqlite3_free(tls, zSql) + if rc != 0 { + return uintptr(0) + } + rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + if rc != SQLITE_ROW { + pOut = uintptr(0) + } else { + sz = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) * Sqlite_int64(szPage) + if piSize != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = sz + } + if mFlags&uint32(SQLITE_SERIALIZE_NOCOPY) != 0 { + pOut = uintptr(0) + } else { + pOut = Xsqlite3_malloc64(tls, uint64(sz)) + if pOut != 0 { + var nPage int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) + var pPager uintptr = Xsqlite3BtreePager(tls, pBt) + var pgno int32 + for pgno = 1; pgno <= nPage; pgno++ { + *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */)) = uintptr(0) + var pTo uintptr = pOut + uintptr(Sqlite3_int64(szPage)*Sqlite3_int64(pgno-1)) + rc = Xsqlite3PagerGet(tls, pPager, uint32(pgno), bp+16, 0) + if rc == SQLITE_OK { + libc.Xmemcpy(tls, pTo, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */))), uint64(szPage)) + } else { + libc.Xmemset(tls, pTo, 0, uint64(szPage)) + } + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */))) + } + } + } + } + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + return pOut +} + +// Convert zSchema to a MemDB and initialize its content. +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var p uintptr + var zSql uintptr + // var pStmt uintptr at bp+8, 8 + + var rc int32 + var iDb int32 + var pStore uintptr + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if !(zSchema == uintptr(0)) { + goto __1 + } + zSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName +__1: + ; + iDb = Xsqlite3FindDbName(tls, db, zSchema) + + if !(iDb < 2 && iDb != 0) { + goto __2 + } + rc = SQLITE_ERROR + goto end_deserialize +__2: + ; + zSql = Xsqlite3_mprintf(tls, ts+3821, libc.VaList(bp, zSchema)) + if !(zSql == uintptr(0)) { + goto __3 + } + rc = SQLITE_NOMEM + goto __4 +__3: + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) + Xsqlite3_free(tls, zSql) +__4: + ; + if !(rc != 0) { + goto __5 + } + goto end_deserialize +__5: + ; + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb) + libc.SetBitFieldPtr8Uint32(db+192+8, uint32(1), 2, 0x4) + rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 2, 0x4) + if !(rc != SQLITE_DONE) { + goto __6 + } + rc = SQLITE_ERROR + goto end_deserialize +__6: + ; + p = memdbFromDbSchema(tls, db, zSchema) + if !(p == uintptr(0)) { + goto __7 + } + rc = SQLITE_ERROR + goto __8 +__7: + pStore = (*MemFile)(unsafe.Pointer(p)).FpStore + (*MemStore)(unsafe.Pointer(pStore)).FaData = pData + pData = uintptr(0) + (*MemStore)(unsafe.Pointer(pStore)).Fsz = szDb + (*MemStore)(unsafe.Pointer(pStore)).FszAlloc = szBuf + (*MemStore)(unsafe.Pointer(pStore)).FszMax = szBuf + if !((*MemStore)(unsafe.Pointer(pStore)).FszMax < Xsqlite3Config.FmxMemdbSize) { + goto __9 + } + (*MemStore)(unsafe.Pointer(pStore)).FszMax = Xsqlite3Config.FmxMemdbSize +__9: + ; + (*MemStore)(unsafe.Pointer(pStore)).FmFlags = mFlags + rc = SQLITE_OK +__8: + ; + +end_deserialize: + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + if !(pData != 0 && mFlags&uint32(SQLITE_DESERIALIZE_FREEONCLOSE) != uint32(0)) { + goto __10 + } + Xsqlite3_free(tls, pData) +__10: + ; + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// This routine is called when the extension is loaded. +// Register the new VFS. +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ + var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) + var sz uint32 + if pLower == uintptr(0) { + return SQLITE_ERROR + } + sz = uint32((*Sqlite3_vfs)(unsafe.Pointer(pLower)).FszOsFile) + memdb_vfs.FpAppData = pLower + // The following conditional can only be true when compiled for + // Windows x86 and SQLITE_MAX_MMAP_SIZE=0. We always leave + // it in, to be safe, but it is marked as NO_TEST since there + // is no way to reach it under most builds. + if uint64(sz) < uint64(unsafe.Sizeof(MemFile{})) { + sz = uint32(unsafe.Sizeof(MemFile{})) + } //NO_TEST + memdb_vfs.FszOsFile = int32(sz) + return Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&memdb_vfs)), 0) +} + +// Create a new bitmap object able to handle bits between 0 and iSize, +// inclusive. Return a pointer to the new object. Return NULL if +// malloc fails. +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ + var p uintptr + + p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) + if p != 0 { + (*Bitvec)(unsafe.Pointer(p)).FiSize = iSize + } + return p +} + +// Check to see if the i-th bit is set. Return true or false. +// If p is NULL (if the bitmap has not been created) or if +// i is out of range, then return false. +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ + + i-- + if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { + return 0 + } + for (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0 { + var bin U32 = i / (*Bitvec)(unsafe.Pointer(p)).FiDivisor + i = i % (*Bitvec)(unsafe.Pointer(p)).FiDivisor + p = *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) + if !(p != 0) { + return 0 + } + } + if uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) <= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM) { + return libc.Bool32(int32(*(*U8)(unsafe.Pointer(p + 16 + uintptr(i/U32(BITVEC_SZELEM)))))&(int32(1)<<(i&U32(BITVEC_SZELEM-1))) != 0) + } else { + var h U32 = U32(uint64(libc.PostIncUint32(&i, 1)*U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) + for *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) != 0 { + if *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) == i { + return 1 + } + h = U32(uint64(h+U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) + } + return 0 + } + return int32(0) +} + +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ + return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) +} + +// Set the i-th bit. Return 0 on success and an error code if +// anything goes wrong. +// +// This routine might cause sub-bitmaps to be allocated. Failing +// to get the memory needed to hold the sub-bitmap is the only +// that can go wrong with an insert, assuming p and i are valid. +// +// The calling function must ensure that p is a valid Bitvec object +// and that the value for "i" is within range of the Bitvec object. +// Otherwise the behavior is undefined. +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ + var h U32 + var bin U32 + var j uint32 + var rc int32 + var aiValues uintptr + if !(p == uintptr(0)) { + goto __1 + } + return SQLITE_OK +__1: + ; + + i-- +__2: + if !(uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) > (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM) && (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0) { + goto __3 + } + bin = i / (*Bitvec)(unsafe.Pointer(p)).FiDivisor + i = i % (*Bitvec)(unsafe.Pointer(p)).FiDivisor + if !(*(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) == uintptr(0)) { + goto __4 + } + *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) = Xsqlite3BitvecCreate(tls, (*Bitvec)(unsafe.Pointer(p)).FiDivisor) + if !(*(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) == uintptr(0)) { + goto __5 + } + return SQLITE_NOMEM +__5: + ; +__4: + ; + p = *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) + goto __2 +__3: + ; + if !(uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) <= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM)) { + goto __6 + } + *(*U8)(unsafe.Pointer(p + 16 + uintptr(i/U32(BITVEC_SZELEM)))) |= U8(int32(1) << (i & U32(BITVEC_SZELEM-1))) + return SQLITE_OK +__6: + ; + h = U32(uint64(libc.PostIncUint32(&i, 1)*U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) + // if there wasn't a hash collision, and this doesn't + // completely fill the hash, then just add it without + // worring about sub-dividing and re-hashing. + if !!(int32(*(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4))) != 0) { + goto __7 + } + if !(uint64((*Bitvec)(unsafe.Pointer(p)).FnSet) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))-uint64(1)) { + goto __8 + } + goto bitvec_set_end + goto __9 +__8: + goto bitvec_set_rehash +__9: + ; +__7: + ; + // there was a collision, check to see if it's already + // in hash, if not, try to find a spot for it +__10: + if !(*(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) == i) { + goto __13 + } + return SQLITE_OK +__13: + ; + h++ + if !(uint64(h) >= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))) { + goto __14 + } + h = U32(0) +__14: + ; + goto __11 +__11: + if *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) != 0 { + goto __10 + } + goto __12 +__12: + ; + // we didn't find it in the hash. h points to the first + // available free spot. check to see if this is going to + // make our hash too "full". +bitvec_set_rehash: + if !(uint64((*Bitvec)(unsafe.Pointer(p)).FnSet) >= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))/uint64(2)) { + goto __15 + } + aiValues = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(unsafe.Sizeof([124]U32{}))) + if !(aiValues == uintptr(0)) { + goto __16 + } + return SQLITE_NOMEM + goto __17 +__16: + libc.Xmemcpy(tls, aiValues, p+16, uint64(unsafe.Sizeof([124]U32{}))) + libc.Xmemset(tls, p+16, 0, uint64(unsafe.Sizeof([62]uintptr{}))) + (*Bitvec)(unsafe.Pointer(p)).FiDivisor = U32((uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) + (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) / ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(uintptr(0))))) + rc = Xsqlite3BitvecSet(tls, p, i) + j = uint32(0) +__18: + if !(uint64(j) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))) { + goto __20 + } + if !(*(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) != 0) { + goto __21 + } + rc = rc | Xsqlite3BitvecSet(tls, p, *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4))) +__21: + ; + goto __19 +__19: + j++ + goto __18 + goto __20 +__20: + ; + Xsqlite3DbFree(tls, uintptr(0), aiValues) + return rc +__17: + ; +__15: + ; +bitvec_set_end: + (*Bitvec)(unsafe.Pointer(p)).FnSet++ + *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) = i + return SQLITE_OK +} + +// Clear the i-th bit. +// +// pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage +// that BitvecClear can use to rebuilt its hash table. +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ + if p == uintptr(0) { + return + } + + i-- + for (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0 { + var bin U32 = i / (*Bitvec)(unsafe.Pointer(p)).FiDivisor + i = i % (*Bitvec)(unsafe.Pointer(p)).FiDivisor + p = *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) + if !(p != 0) { + return + } + } + if uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) <= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM) { + *(*U8)(unsafe.Pointer(p + 16 + uintptr(i/U32(BITVEC_SZELEM)))) &= U8(^(int32(1) << (i & U32(BITVEC_SZELEM-1)))) + } else { + var j uint32 + var aiValues uintptr = pBuf + libc.Xmemcpy(tls, aiValues, p+16, uint64(unsafe.Sizeof([124]U32{}))) + libc.Xmemset(tls, p+16, 0, uint64(unsafe.Sizeof([124]U32{}))) + (*Bitvec)(unsafe.Pointer(p)).FnSet = U32(0) + for j = uint32(0); uint64(j) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0))); j++ { + if *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) != 0 && *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) != i+U32(1) { + var h U32 = U32(uint64((*(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4))-U32(1))*U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) + (*Bitvec)(unsafe.Pointer(p)).FnSet++ + for *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) != 0 { + h++ + if uint64(h) >= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0))) { + h = U32(0) + } + } + *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) = *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) + } + } + } +} + +// Destroy a bitmap object. Reclaim all memory used. +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ + if p == uintptr(0) { + return + } + if (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0 { + var i uint32 + for i = uint32(0); uint64(i) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(uintptr(0))); i++ { + Xsqlite3BitvecDestroy(tls, *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(i)*8))) + } + } + Xsqlite3_free(tls, p) +} + +// Return the value of the iSize parameter specified when Bitvec *p +// was created. +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ + return (*Bitvec)(unsafe.Pointer(p)).FiSize +} + +// Let V[] be an array of unsigned characters sufficient to hold +// up to N bits. Let I be an integer between 0 and N. 0<=I 0) { + goto __11 + } + nx = 0 +__11: + ; + pc = pc + nx + *(*int32)(unsafe.Pointer(bp /* i */)) = *(*int32)(unsafe.Pointer(bp)) & 0x7fffffff % sz + if !(op&1 != 0) { + goto __12 + } + *(*uint8)(unsafe.Pointer(pV + uintptr((*(*int32)(unsafe.Pointer(bp))+1)>>3))) |= uint8(int32(1) << ((*(*int32)(unsafe.Pointer(bp)) + 1) & 7)) + if !(op != 5) { + goto __14 + } + if !(Xsqlite3BitvecSet(tls, pBitvec, uint32(*(*int32)(unsafe.Pointer(bp))+1)) != 0) { + goto __15 + } + goto bitvec_end +__15: + ; +__14: + ; + goto __13 +__12: + *(*uint8)(unsafe.Pointer(pV + uintptr((*(*int32)(unsafe.Pointer(bp))+1)>>3))) &= uint8(^(int32(1) << ((*(*int32)(unsafe.Pointer(bp)) + 1) & 7))) + Xsqlite3BitvecClear(tls, pBitvec, uint32(*(*int32)(unsafe.Pointer(bp))+1), pTmpSpace) +__13: + ; + goto __2 +__3: + ; + + // Test to make sure the linear array exactly matches the + // Bitvec object. Start with the assumption that they do + // match (rc==0). Change rc to non-zero if a discrepancy + // is found. + rc = int32(U32(Xsqlite3BitvecTest(tls, uintptr(0), uint32(0))+Xsqlite3BitvecTest(tls, pBitvec, uint32(sz+1))+ + Xsqlite3BitvecTest(tls, pBitvec, uint32(0))) + + (Xsqlite3BitvecSize(tls, pBitvec) - U32(sz))) + *(*int32)(unsafe.Pointer(bp /* i */)) = 1 +__16: + if !(*(*int32)(unsafe.Pointer(bp)) <= sz) { + goto __18 + } + if !(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pV + uintptr(*(*int32)(unsafe.Pointer(bp))>>3))))&(int32(1)<<(*(*int32)(unsafe.Pointer(bp))&7)) != 0) != Xsqlite3BitvecTest(tls, pBitvec, uint32(*(*int32)(unsafe.Pointer(bp))))) { + goto __19 + } + rc = *(*int32)(unsafe.Pointer(bp /* i */)) + goto __18 +__19: + ; + goto __17 +__17: + *(*int32)(unsafe.Pointer(bp /* i */))++ + goto __16 + goto __18 +__18: + ; + + // Free allocated structure +bitvec_end: + Xsqlite3_free(tls, pTmpSpace) + Xsqlite3_free(tls, pV) + Xsqlite3BitvecDestroy(tls, pBitvec) + return rc +} + +//********************************* Test and Debug Logic ********************* +// Debug tracing macros. Enable by by changing the "0" to "1" and +// recompiling. +// +// When sqlite3PcacheTrace is 1, single line trace messages are issued. +// When sqlite3PcacheTrace is 2, a dump of the pcache showing all cache entries +// is displayed for many operations, resulting in a lot of output. + +// Check invariants on a PgHdr entry. Return true if everything is OK. +// Return false if any invariant is violated. +// +// This routine is for use inside of assert() statements only. For +// example: +// +// assert( sqlite3PcachePageSanity(pPg) ); + +//********************************* Linked List Management ******************* + +// Allowed values for second argument to pcacheManageDirtyList() + +// Manage pPage's participation on the dirty list. Bits of the addRemove +// argument determines what operation to do. The 0x01 bit means first +// remove pPage from the dirty list. The 0x02 means add pPage back to +// the dirty list. Doing both moves pPage to the front of the dirty list. +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ + var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache + + if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { + + // Update the PCache1.pSynced variable if necessary. + if (*PCache)(unsafe.Pointer(p)).FpSynced == pPage { + (*PCache)(unsafe.Pointer(p)).FpSynced = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev + } + + if (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext != 0 { + (*PgHdr)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext)).FpDirtyPrev = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev + } else { + + (*PCache)(unsafe.Pointer(p)).FpDirtyTail = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev + } + if (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev != 0 { + (*PgHdr)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev)).FpDirtyNext = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext + } else { + // If there are now no dirty pages in the cache, set eCreate to 2. + // This is an optimization that allows sqlite3PcacheFetch() to skip + // searching for a dirty page to eject from the cache when it might + // otherwise have to. + + (*PCache)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext + + if (*PCache)(unsafe.Pointer(p)).FpDirty == uintptr(0) { //OPTIMIZATION-IF-TRUE + + (*PCache)(unsafe.Pointer(p)).FeCreate = U8(2) + } + } + } + if int32(addRemove)&PCACHE_DIRTYLIST_ADD != 0 { + (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev = uintptr(0) + (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext = (*PCache)(unsafe.Pointer(p)).FpDirty + if (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext != 0 { + + (*PgHdr)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext)).FpDirtyPrev = pPage + } else { + (*PCache)(unsafe.Pointer(p)).FpDirtyTail = pPage + if (*PCache)(unsafe.Pointer(p)).FbPurgeable != 0 { + + (*PCache)(unsafe.Pointer(p)).FeCreate = U8(1) + } + } + (*PCache)(unsafe.Pointer(p)).FpDirty = pPage + + // If pSynced is NULL and this page has a clear NEED_SYNC flag, set + // pSynced to point to it. Checking the NEED_SYNC flag is an + // optimization, as if pSynced points to a page with the NEED_SYNC + // flag set sqlite3PcacheFetchStress() searches through all newer + // entries of the dirty-list for a page with NEED_SYNC clear anyway. + if !(int32((*PCache)(unsafe.Pointer(p)).FpSynced) != 0) && + 0 == int32((*PgHdr)(unsafe.Pointer(pPage)).Fflags)&PGHDR_NEED_SYNC { + (*PCache)(unsafe.Pointer(p)).FpSynced = pPage + } + } + +} + +// Wrapper around the pluggable caches xUnpin method. If the cache is +// being used for an in-memory database, this function is a no-op. +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ + if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { + + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxUnpin})).f(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 0) + + } +} + +// Compute the number of pages of cache requested. p->szCache is the +// cache size requested by the "PRAGMA cache_size" statement. +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ + if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { + // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the + // suggested cache size is set to N. + return (*PCache)(unsafe.Pointer(p)).FszCache + } else { + var n I64 + // IMPLEMANTATION-OF: R-59858-46238 If the argument N is negative, then the + // number of cache pages is adjusted to be a number of pages that would + // use approximately abs(N*1024) bytes of memory based on the current + // page size. + n = int64(-1024) * I64((*PCache)(unsafe.Pointer(p)).FszCache) / I64((*PCache)(unsafe.Pointer(p)).FszPage+(*PCache)(unsafe.Pointer(p)).FszExtra) + if n > int64(1000000000) { + n = int64(1000000000) + } + return int32(n) + } + return int32(0) +} + +// ************************************************** General Interfaces ****** +// +// +// Initialize and shutdown the page cache subsystem. Neither of these +// functions are threadsafe. +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ + if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { + // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the + // built-in default page cache is used instead of the application defined + // page cache. + Xsqlite3PCacheSetDefault(tls) + + } + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) +} + +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ + if Xsqlite3Config.Fpcache2.FxShutdown != 0 { + // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) + } +} + +// Return the size in bytes of a PCache object. +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ + return int32(unsafe.Sizeof(PCache{})) +} + +// Create a new PCache object. Storage space to hold the object +// has already been allocated and is passed in as the p pointer. +// The caller discovers how much space needs to be allocated by +// calling sqlite3PcacheSize(). +// +// szExtra is some extra space allocated for each page. The first +// 8 bytes of the extra space will be zeroed as the page is allocated, +// but remaining content will be uninitialized. Though it is opaque +// to this module, the extra space really ends up being the MemPage +// structure in the pager. +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) + (*PCache)(unsafe.Pointer(p)).FszPage = 1 + (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra + // First 8 bytes will be zeroed + (*PCache)(unsafe.Pointer(p)).FbPurgeable = U8(bPurgeable) + (*PCache)(unsafe.Pointer(p)).FeCreate = U8(2) + (*PCache)(unsafe.Pointer(p)).FxStress = xStress + (*PCache)(unsafe.Pointer(p)).FpStress = pStress + (*PCache)(unsafe.Pointer(p)).FszCache = 100 + (*PCache)(unsafe.Pointer(p)).FszSpill = 1 + + return Xsqlite3PcacheSetPageSize(tls, p, szPage) +} + +// Change the page size for PCache object. The caller must ensure that there +// are no outstanding page references when this function is called. +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ + + if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { + var pNew uintptr + pNew = (*struct { + f func(*libc.TLS, int32, int32, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCreate})).f(tls, + szPage, int32(uint64((*PCache)(unsafe.Pointer(pCache)).FszExtra)+(uint64(unsafe.Sizeof(PgHdr{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))), + int32((*PCache)(unsafe.Pointer(pCache)).FbPurgeable)) + if pNew == uintptr(0) { + return SQLITE_NOMEM + } + (*struct { + f func(*libc.TLS, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCachesize})).f(tls, pNew, numberOfCachePages(tls, pCache)) + if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) + } + (*PCache)(unsafe.Pointer(pCache)).FpCache = pNew + (*PCache)(unsafe.Pointer(pCache)).FszPage = szPage + + } + return SQLITE_OK +} + +// Try to obtain a page from the cache. +// +// This routine returns a pointer to an sqlite3_pcache_page object if +// such an object is already in cache, or if a new one is created. +// This routine returns a NULL pointer if the object was not in cache +// and could not be created. +// +// The createFlags should be 0 to check for existing pages and should +// be 3 (not 1, but 3) to try to create a new page. +// +// If the createFlag is 0, then NULL is always returned if the page +// is not already in the cache. If createFlag is 1, then a new page +// is created only if that can be done without spilling dirty pages +// and without exceeding the cache size limit. +// +// The caller needs to invoke sqlite3PcacheFetchFinish() to properly +// initialize the sqlite3_pcache_page object and convert it into a +// PgHdr object. The sqlite3PcacheFetch() and sqlite3PcacheFetchFinish() +// routines are split this way for performance reasons. When separated +// they can both (usually) operate without having to push values to +// the stack on entry and pop them back off on exit, which saves a +// lot of pushing and popping. +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ + var eCreate int32 + var pRes uintptr + + // eCreate defines what to do if the page does not exist. + // 0 Do not allocate a new page. (createFlag==0) + // 1 Allocate a new page if doing so is inexpensive. + // (createFlag==1 AND bPurgeable AND pDirty) + // 2 Allocate a new page even it doing so is difficult. + // (createFlag==1 AND !(bPurgeable AND pDirty) + eCreate = createFlag & int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) + + pRes = (*struct { + f func(*libc.TLS, uintptr, uint32, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, eCreate) + + return pRes +} + +// If the sqlite3PcacheFetch() routine is unable to allocate a new +// page because no clean pages are available for reuse and the cache +// size limit has been reached, then this routine can be invoked to +// try harder to allocate a page. This routine might invoke the stress +// callback to spill dirty pages to the journal. It will then try to +// allocate the new page and will only fail to allocate a new page on +// an OOM error. +// +// This routine should be invoked only after sqlite3PcacheFetch() fails. +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ + var pPg uintptr + if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { + return 0 + } + + if Xsqlite3PcachePagecount(tls, pCache) > (*PCache)(unsafe.Pointer(pCache)).FszSpill { + // Find a dirty page to write-out and recycle. First try to find a + // page that does not require a journal-sync (one with PGHDR_NEED_SYNC + // cleared), but if that is not possible settle for any other + // unreferenced dirty page. + // + // If the LRU page in the dirty list that has a clear PGHDR_NEED_SYNC + // flag is currently referenced, then the following may leave pSynced + // set incorrectly (pointing to other than the LRU page with NEED_SYNC + // cleared). This is Ok, as pSynced is just an optimization. + for pPg = (*PCache)(unsafe.Pointer(pCache)).FpSynced; pPg != 0 && ((*PgHdr)(unsafe.Pointer(pPg)).FnRef != 0 || int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0); pPg = (*PgHdr)(unsafe.Pointer(pPg)).FpDirtyPrev { + } + (*PCache)(unsafe.Pointer(pCache)).FpSynced = pPg + if !(pPg != 0) { + for pPg = (*PCache)(unsafe.Pointer(pCache)).FpDirtyTail; pPg != 0 && (*PgHdr)(unsafe.Pointer(pPg)).FnRef != 0; pPg = (*PgHdr)(unsafe.Pointer(pPg)).FpDirtyPrev { + } + } + if pPg != 0 { + var rc int32 + + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*PCache)(unsafe.Pointer(pCache)).FxStress})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpStress, pPg) + + if rc != SQLITE_OK && rc != SQLITE_BUSY { + return rc + } + } + } + *(*uintptr)(unsafe.Pointer(ppPage)) = (*struct { + f func(*libc.TLS, uintptr, uint32, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, 2) + if *(*uintptr)(unsafe.Pointer(ppPage)) == uintptr(0) { + return SQLITE_NOMEM + } + return SQLITE_OK +} + +// This is a helper routine for sqlite3PcacheFetchFinish() +// +// In the uncommon case where the page being fetched has not been +// initialized, this routine is invoked to do the initialization. +// This routine is broken out into a separate function since it +// requires extra stack manipulation that can be avoided in the common +// case. +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ + var pPgHdr uintptr + + pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra + + libc.Xmemset(tls, pPgHdr+32, 0, uint64(unsafe.Sizeof(PgHdr{}))-uint64(uintptr(0)+32)) + (*PgHdr)(unsafe.Pointer(pPgHdr)).FpPage = pPage + (*PgHdr)(unsafe.Pointer(pPgHdr)).FpData = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpBuf + (*PgHdr)(unsafe.Pointer(pPgHdr)).FpExtra = pPgHdr + 1*72 + libc.Xmemset(tls, (*PgHdr)(unsafe.Pointer(pPgHdr)).FpExtra, 0, uint64(8)) + (*PgHdr)(unsafe.Pointer(pPgHdr)).FpCache = pCache + (*PgHdr)(unsafe.Pointer(pPgHdr)).Fpgno = pgno + (*PgHdr)(unsafe.Pointer(pPgHdr)).Fflags = U16(PGHDR_CLEAN) + return Xsqlite3PcacheFetchFinish(tls, pCache, pgno, pPage) +} + +// This routine converts the sqlite3_pcache_page object returned by +// sqlite3PcacheFetch() into an initialized PgHdr object. This routine +// must be called after sqlite3PcacheFetch() in order to get a usable +// result. +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ + var pPgHdr uintptr + + pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra + + if !(int32((*PgHdr)(unsafe.Pointer(pPgHdr)).FpPage) != 0) { + return pcacheFetchFinishWithInit(tls, pCache, pgno, pPage) + } + (*PCache)(unsafe.Pointer(pCache)).FnRefSum++ + (*PgHdr)(unsafe.Pointer(pPgHdr)).FnRef++ + + return pPgHdr +} + +// Decrement the reference count on a page. If the page is clean and the +// reference count drops to 0, then it is made eligible for recycling. +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ + + (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- + if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { + if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_CLEAN != 0 { + pcacheUnpin(tls, p) + } else { + pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } + } +} + +// Increase the reference count of a supplied page by 1. +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ + + (*PgHdr)(unsafe.Pointer(p)).FnRef++ + (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ +} + +// Drop a page from the cache. There must be exactly one reference to the +// page. This function deletes that reference, so after it returns the +// page pointed to by p is invalid. +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ + + if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { + pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) + } + (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxUnpin})).f(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 1) +} + +// Make sure the page is marked as dirty. If it isn't dirty already, +// make it so. +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ + + if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE + *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) + if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_CLEAN != 0 { + *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) + + pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } + + } +} + +// Make sure the page is marked as clean. If it isn't clean already, +// make it so. +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ + + pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) + *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) + *(*U16)(unsafe.Pointer(p + 52)) |= U16(PGHDR_CLEAN) + + if int32((*PgHdr)(unsafe.Pointer(p)).FnRef) == 0 { + pcacheUnpin(tls, p) + } +} + +// Make every page in the cache clean. +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ + var p uintptr + + for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { + Xsqlite3PcacheMakeClean(tls, p) + } +} + +// Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ + var p uintptr + + for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { + *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) + } + (*PCache)(unsafe.Pointer(pCache)).FpSynced = (*PCache)(unsafe.Pointer(pCache)).FpDirtyTail +} + +// Clear the PGHDR_NEED_SYNC flag from all dirty pages. +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ + var p uintptr + for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { + *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) + } + (*PCache)(unsafe.Pointer(pCache)).FpSynced = (*PCache)(unsafe.Pointer(pCache)).FpDirtyTail +} + +// Change the page number of page p to newPgno. +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ + var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache + + (*struct { + f func(*libc.TLS, uintptr, uintptr, uint32, uint32) + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxRekey})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, (*PgHdr)(unsafe.Pointer(p)).Fpgno, newPgno) + (*PgHdr)(unsafe.Pointer(p)).Fpgno = newPgno + if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 && int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_NEED_SYNC != 0 { + pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } +} + +// Drop every cache entry whose page number is greater than "pgno". The +// caller must ensure that there are no outstanding references to any pages +// other than page 1 with a page number greater than pgno. +// +// If there is a reference to page 1 and the pgno parameter passed to this +// function is 0, then the data area associated with page 1 is zeroed, but +// the page object is not dropped. +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ + if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { + var p uintptr + var pNext uintptr + + for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = pNext { + pNext = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext + // This routine never gets call with a positive pgno except right + // after sqlite3PcacheCleanAll(). So if there are dirty pages, + // it must be that pgno==0. + + if (*PgHdr)(unsafe.Pointer(p)).Fpgno > pgno { + + Xsqlite3PcacheMakeClean(tls, p) + } + } + if pgno == Pgno(0) && (*PCache)(unsafe.Pointer(pCache)).FnRefSum != 0 { + var pPage1 uintptr + pPage1 = (*struct { + f func(*libc.TLS, uintptr, uint32, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, uint32(1), 0) + if pPage1 != 0 { // Page 1 is always available in cache, because + // pCache->nRefSum>0 + libc.Xmemset(tls, (*Sqlite3_pcache_page)(unsafe.Pointer(pPage1)).FpBuf, 0, uint64((*PCache)(unsafe.Pointer(pCache)).FszPage)) + pgno = Pgno(1) + } + } + (*struct { + f func(*libc.TLS, uintptr, uint32) + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxTruncate})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno+Pgno(1)) + } +} + +// Close a cache. +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) +} + +// Discard the contents of the cache. +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ + Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) +} + +// Merge two lists of pages connected by pDirty and in pgno order. +// Do not bother fixing the pDirtyPrev pointers. +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + // var result PgHdr at bp, 72 + + var pTail uintptr + pTail = bp /* &result */ + + for { + if (*PgHdr)(unsafe.Pointer(pA)).Fpgno < (*PgHdr)(unsafe.Pointer(pB)).Fpgno { + (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pA + pTail = pA + pA = (*PgHdr)(unsafe.Pointer(pA)).FpDirty + if pA == uintptr(0) { + (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pB + break + } + } else { + (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pB + pTail = pB + pB = (*PgHdr)(unsafe.Pointer(pB)).FpDirty + if pB == uintptr(0) { + (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pA + break + } + } + } + return (*PgHdr)(unsafe.Pointer(bp /* &result */)).FpDirty +} + +// Sort the list of pages in accending order by pgno. Pages are +// connected by pDirty pointers. The pDirtyPrev pointers are +// corrupted by this sort. +// +// Since there cannot be more than 2^31 distinct pages in a database, +// there cannot be more than 31 buckets required by the merge sorter. +// One extra bucket is added to catch overflow in case something +// ever changes to make the previous sentence incorrect. +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ + bp := tls.Alloc(256) + defer tls.Free(256) + + // var a [32]uintptr at bp, 256 + + var p uintptr + var i int32 + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([32]uintptr{}))) + for pIn != 0 { + p = pIn + pIn = (*PgHdr)(unsafe.Pointer(p)).FpDirty + (*PgHdr)(unsafe.Pointer(p)).FpDirty = uintptr(0) + for i = 0; i < N_SORT_BUCKET-1; i++ { + if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = p + break + } else { + p = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), p) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = uintptr(0) + } + } + if i == N_SORT_BUCKET-1 { + // To get here, there need to be 2^(N_SORT_BUCKET) elements in + // the input list. But that is impossible. + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), p) + } + } + p = *(*uintptr)(unsafe.Pointer(bp)) + for i = 1; i < N_SORT_BUCKET; i++ { + if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { + continue + } + if p != 0 { + p = pcacheMergeDirtyList(tls, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) + } else { + p = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) + } + } + return p +} + +// Return a list of all dirty pages in the cache, sorted by page number. +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ + var p uintptr + for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { + (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext + } + return pcacheSortDirtyList(tls, (*PCache)(unsafe.Pointer(pCache)).FpDirty) +} + +// Return the total number of references to all pages held by the cache. +// +// This is not the total number of pages referenced, but the sum of the +// reference count for all pages. +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ + return (*PCache)(unsafe.Pointer(pCache)).FnRefSum +} + +// Return the number of references to the page supplied as an argument. +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ + return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) +} + +// Return the total number of pages in the cache. +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ + + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxPagecount})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) +} + +// Set the suggested cache-size value. +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ + + (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage + (*struct { + f func(*libc.TLS, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCachesize})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, + numberOfCachePages(tls, pCache)) +} + +// Set the suggested cache-spill value. Make no changes if if the +// argument is zero. Return the effective cache-spill size, which will +// be the larger of the szSpill and szCache. +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ + var res int32 + + if mxPage != 0 { + if mxPage < 0 { + mxPage = int32(int64(-1024) * I64(mxPage) / I64((*PCache)(unsafe.Pointer(p)).FszPage+(*PCache)(unsafe.Pointer(p)).FszExtra)) + } + (*PCache)(unsafe.Pointer(p)).FszSpill = mxPage + } + res = numberOfCachePages(tls, p) + if res < (*PCache)(unsafe.Pointer(p)).FszSpill { + res = (*PCache)(unsafe.Pointer(p)).FszSpill + } + return res +} + +// Free up as much memory as possible from the page cache. +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) +} + +// Return the size of the header added by this middleware layer +// in the page-cache hierarchy. +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ + return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) +} + +// Return the number of dirty pages currently in the cache, as a percentage +// of the configured cache size. +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ + var pDirty uintptr + var nDirty int32 = 0 + var nCache int32 = numberOfCachePages(tls, pCache) + for pDirty = (*PCache)(unsafe.Pointer(pCache)).FpDirty; pDirty != 0; pDirty = (*PgHdr)(unsafe.Pointer(pDirty)).FpDirtyNext { + nDirty++ + } + if nCache != 0 { + return int32(I64(nDirty) * int64(100) / I64(nCache)) + } + return 0 +} + +//************* End of pcache.c ********************************************* +//************* Begin file pcache1.c **************************************** +// 2008 November 05 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file implements the default page cache implementation (the +// sqlite3_pcache interface). It also contains part of the implementation +// of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features. +// If the default page cache implementation is overridden, then neither of +// these two features are available. +// +// A Page cache line looks like this: +// +// ------------------------------------------------------------- +// | database page content | PgHdr1 | MemPage | PgHdr | +// ------------------------------------------------------------- +// +// The database page content is up front (so that buffer overreads tend to +// flow harmlessly into the PgHdr1, MemPage, and PgHdr extensions). MemPage +// is the extension added by the btree.c module containing information such +// as the database page number and how that database page is used. PgHdr +// is added by the pcache.c layer and contains information used to keep track +// of which pages are "dirty". PgHdr1 is an extension added by this +// module (pcache1.c). The PgHdr1 header is a subclass of sqlite3_pcache_page. +// PgHdr1 contains information needed to look up a page by its page number. +// The superclass sqlite3_pcache_page.pBuf points to the start of the +// database page content and sqlite3_pcache_page.pExtra points to PgHdr. +// +// The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at +// runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size). The +// sizes of the extensions sum to 272 bytes on x64 for 3.8.10, but this +// size can vary according to architecture, compile-time options, and +// SQLite library version number. +// +// If SQLITE_PCACHE_SEPARATE_HEADER is defined, then the extension is obtained +// using a separate memory allocation from the database page content. This +// seeks to overcome the "clownshoe" problem (also called "internal +// fragmentation" in academic literature) of allocating a few bytes more +// than a power of two with the memory allocator rounding up to the next +// power of two, and leaving the rounded-up space unused. +// +// This module tracks pointers to PgHdr1 objects. Only pcache.c communicates +// with this module. Information is passed back and forth as PgHdr1 pointers. +// +// The pcache.c and pager.c modules deal pointers to PgHdr objects. +// The btree.c module deals with pointers to MemPage objects. +// +// SOURCE OF PAGE CACHE MEMORY: +// +// Memory for a page might come from any of three sources: +// +// (1) The general-purpose memory allocator - sqlite3Malloc() +// (2) Global page-cache memory provided using sqlite3_config() with +// SQLITE_CONFIG_PAGECACHE. +// (3) PCache-local bulk allocation. +// +// The third case is a chunk of heap memory (defaulting to 100 pages worth) +// that is allocated when the page cache is created. The size of the local +// bulk allocation can be adjusted using +// +// sqlite3_config(SQLITE_CONFIG_PAGECACHE, (void*)0, 0, N). +// +// If N is positive, then N pages worth of memory are allocated using a single +// sqlite3Malloc() call and that memory is used for the first N pages allocated. +// Or if N is negative, then -1024*N bytes of memory are allocated and used +// for as many pages as can be accomodated. +// +// Only one of (2) or (3) can be used. Once the memory available to (2) or +// (3) is exhausted, subsequent allocations fail over to the general-purpose +// memory allocator (1). +// +// Earlier versions of SQLite used only methods (1) and (2). But experiments +// show that method (3) with N==100 provides about a 5% performance boost for +// common workloads. +// #include "sqliteInt.h" + +type PCache11 = struct { + FpGroup uintptr + FpnPurgeable uintptr + FszPage int32 + FszExtra int32 + FszAlloc int32 + FbPurgeable int32 + FnMin uint32 + FnMax uint32 + Fn90pct uint32 + FiMaxKey uint32 + FnPurgeableDummy uint32 + FnRecyclable uint32 + FnPage uint32 + FnHash uint32 + FapHash uintptr + FpFree uintptr + FpBulk uintptr +} /* sqlite3.c:51339:9 */ + +//************* End of pcache.c ********************************************* +//************* Begin file pcache1.c **************************************** +// 2008 November 05 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file implements the default page cache implementation (the +// sqlite3_pcache interface). It also contains part of the implementation +// of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features. +// If the default page cache implementation is overridden, then neither of +// these two features are available. +// +// A Page cache line looks like this: +// +// ------------------------------------------------------------- +// | database page content | PgHdr1 | MemPage | PgHdr | +// ------------------------------------------------------------- +// +// The database page content is up front (so that buffer overreads tend to +// flow harmlessly into the PgHdr1, MemPage, and PgHdr extensions). MemPage +// is the extension added by the btree.c module containing information such +// as the database page number and how that database page is used. PgHdr +// is added by the pcache.c layer and contains information used to keep track +// of which pages are "dirty". PgHdr1 is an extension added by this +// module (pcache1.c). The PgHdr1 header is a subclass of sqlite3_pcache_page. +// PgHdr1 contains information needed to look up a page by its page number. +// The superclass sqlite3_pcache_page.pBuf points to the start of the +// database page content and sqlite3_pcache_page.pExtra points to PgHdr. +// +// The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at +// runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size). The +// sizes of the extensions sum to 272 bytes on x64 for 3.8.10, but this +// size can vary according to architecture, compile-time options, and +// SQLite library version number. +// +// If SQLITE_PCACHE_SEPARATE_HEADER is defined, then the extension is obtained +// using a separate memory allocation from the database page content. This +// seeks to overcome the "clownshoe" problem (also called "internal +// fragmentation" in academic literature) of allocating a few bytes more +// than a power of two with the memory allocator rounding up to the next +// power of two, and leaving the rounded-up space unused. +// +// This module tracks pointers to PgHdr1 objects. Only pcache.c communicates +// with this module. Information is passed back and forth as PgHdr1 pointers. +// +// The pcache.c and pager.c modules deal pointers to PgHdr objects. +// The btree.c module deals with pointers to MemPage objects. +// +// SOURCE OF PAGE CACHE MEMORY: +// +// Memory for a page might come from any of three sources: +// +// (1) The general-purpose memory allocator - sqlite3Malloc() +// (2) Global page-cache memory provided using sqlite3_config() with +// SQLITE_CONFIG_PAGECACHE. +// (3) PCache-local bulk allocation. +// +// The third case is a chunk of heap memory (defaulting to 100 pages worth) +// that is allocated when the page cache is created. The size of the local +// bulk allocation can be adjusted using +// +// sqlite3_config(SQLITE_CONFIG_PAGECACHE, (void*)0, 0, N). +// +// If N is positive, then N pages worth of memory are allocated using a single +// sqlite3Malloc() call and that memory is used for the first N pages allocated. +// Or if N is negative, then -1024*N bytes of memory are allocated and used +// for as many pages as can be accomodated. +// +// Only one of (2) or (3) can be used. Once the memory available to (2) or +// (3) is exhausted, subsequent allocations fail over to the general-purpose +// memory allocator (1). +// +// Earlier versions of SQLite used only methods (1) and (2). But experiments +// show that method (3) with N==100 provides about a 5% performance boost for +// common workloads. +// #include "sqliteInt.h" + +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ +type PgHdr11 = struct { + Fpage Sqlite3_pcache_page + FiKey uint32 + FisBulkLocal U16 + FisAnchor U16 + FpNext uintptr + FpCache uintptr + FpLruNext uintptr + FpLruPrev uintptr +} /* sqlite3.c:51339:9 */ + +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ + +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ +type PGroup1 = struct { + Fmutex uintptr + FnMaxPage uint32 + FnMinPage uint32 + FmxPinned uint32 + FnPurgeable uint32 + Flru PgHdr1 +} /* sqlite3.c:51339:9 */ + +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ + +// Global data used by this cache. +type PCacheGlobal = struct { + Fgrp PGroup + FisInit int32 + FseparateCache int32 + FnInitPage int32 + FszSlot int32 + FnSlot int32 + FnReserve int32 + FpStart uintptr + FpEnd uintptr + Fmutex uintptr + FpFree uintptr + FnFreeSlot int32 + FbUnderPressure int32 +} /* sqlite3.c:51459:19 */ + +// Global data used by this cache. +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ + +// All code in this file should access the global structure above via the +// alias "pcache1". This ensures that the WSD emulation is used when +// compiling for systems that do not support real WSD. + +// Macros to enter and leave the PCache LRU mutex. + +//**************************************************************************** +//******* Page Allocation/SQLITE_CONFIG_PCACHE Related Functions ************* + +// This function is called during initialization if a static buffer is +// supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE +// verb to sqlite3_config(). Parameter pBuf points to an allocation large +// enough to contain 'n' buffers of 'sz' bytes each. +// +// This routine is called from sqlite3_initialize() and so it is guaranteed +// to be serialized already. There is no need for further mutexing. +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ + if pcache1_g.FisInit != 0 { + var p uintptr + if pBuf == uintptr(0) { + sz = libc.AssignInt32(&n, 0) + } + if n == 0 { + sz = 0 + } + sz = sz & libc.CplInt32(7) + pcache1_g.FszSlot = sz + pcache1_g.FnSlot = libc.AssignPtrInt32(uintptr(unsafe.Pointer(&pcache1_g))+136, n) + pcache1_g.FnReserve = func() int32 { + if n > 90 { + return 10 + } + return n/10 + 1 + }() + pcache1_g.FpStart = pBuf + pcache1_g.FpFree = uintptr(0) + pcache1_g.FbUnderPressure = 0 + for libc.PostDecInt32(&n, 1) != 0 { + p = pBuf + (*PgFreeslot)(unsafe.Pointer(p)).FpNext = pcache1_g.FpFree + pcache1_g.FpFree = p + pBuf = pBuf + uintptr(sz) + } + pcache1_g.FpEnd = pBuf + } +} + +// Try to initialize the pCache->pFree and pCache->pBulk fields. Return +// true if pCache->pFree ends up containing one or more free pages. +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ + var szBulk I64 + var zBulk uintptr + if pcache1_g.FnInitPage == 0 { + return 0 + } + // Do not bother with a bulk allocation if the cache size very small + if (*PCache1)(unsafe.Pointer(pCache)).FnMax < uint32(3) { + return 0 + } + Xsqlite3BeginBenignMalloc(tls) + if pcache1_g.FnInitPage > 0 { + szBulk = I64((*PCache1)(unsafe.Pointer(pCache)).FszAlloc) * I64(pcache1_g.FnInitPage) + } else { + szBulk = int64(-1024) * I64(pcache1_g.FnInitPage) + } + if szBulk > I64((*PCache1)(unsafe.Pointer(pCache)).FszAlloc)*I64((*PCache1)(unsafe.Pointer(pCache)).FnMax) { + szBulk = I64((*PCache1)(unsafe.Pointer(pCache)).FszAlloc) * I64((*PCache1)(unsafe.Pointer(pCache)).FnMax) + } + zBulk = libc.AssignPtrUintptr(pCache+80, Xsqlite3Malloc(tls, uint64(szBulk))) + Xsqlite3EndBenignMalloc(tls) + if zBulk != 0 { + var nBulk int32 = Xsqlite3MallocSize(tls, zBulk) / (*PCache1)(unsafe.Pointer(pCache)).FszAlloc + for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&nBulk, 1) != 0 { + var pX uintptr = zBulk + uintptr((*PCache1)(unsafe.Pointer(pCache)).FszPage) + (*PgHdr1)(unsafe.Pointer(pX)).Fpage.FpBuf = zBulk + (*PgHdr1)(unsafe.Pointer(pX)).Fpage.FpExtra = pX + 1*56 + (*PgHdr1)(unsafe.Pointer(pX)).FisBulkLocal = U16(1) + (*PgHdr1)(unsafe.Pointer(pX)).FisAnchor = U16(0) + (*PgHdr1)(unsafe.Pointer(pX)).FpNext = (*PCache1)(unsafe.Pointer(pCache)).FpFree + (*PgHdr1)(unsafe.Pointer(pX)).FpLruPrev = uintptr(0) // Initializing this saves a valgrind error + (*PCache1)(unsafe.Pointer(pCache)).FpFree = pX + zBulk += uintptr((*PCache1)(unsafe.Pointer(pCache)).FszAlloc) + } + } + return libc.Bool32((*PCache1)(unsafe.Pointer(pCache)).FpFree != uintptr(0)) +} + +// Malloc function used within this file to allocate space from the buffer +// configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no +// such buffer exists or there is no space left in it, this function falls +// back to sqlite3Malloc(). +// +// Multiple threads can run this routine at the same time. Global variables +// in pcache1 need to be protected via mutex. +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ + var p uintptr = uintptr(0) + + if nByte <= pcache1_g.FszSlot { + Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) + p = pcache1_g.FpFree + if p != 0 { + pcache1_g.FpFree = (*PgFreeslot)(unsafe.Pointer(pcache1_g.FpFree)).FpNext + pcache1_g.FnFreeSlot-- + pcache1_g.FbUnderPressure = libc.Bool32(pcache1_g.FnFreeSlot < pcache1_g.FnReserve) + + Xsqlite3StatusHighwater(tls, SQLITE_STATUS_PAGECACHE_SIZE, nByte) + Xsqlite3StatusUp(tls, SQLITE_STATUS_PAGECACHE_USED, 1) + } + Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) + } + if p == uintptr(0) { + // Memory is not available in the SQLITE_CONFIG_PAGECACHE pool. Get + // it from sqlite3Malloc instead. + p = Xsqlite3Malloc(tls, uint64(nByte)) + if p != 0 { + var sz int32 = Xsqlite3MallocSize(tls, p) + Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) + Xsqlite3StatusHighwater(tls, SQLITE_STATUS_PAGECACHE_SIZE, nByte) + Xsqlite3StatusUp(tls, SQLITE_STATUS_PAGECACHE_OVERFLOW, sz) + Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) + } + + } + return p +} + +// Free an allocated buffer obtained from pcache1Alloc(). +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ + if p == uintptr(0) { + return + } + if Uptr(p) >= Uptr(pcache1_g.FpStart) && Uptr(p) < Uptr(pcache1_g.FpEnd) { + var pSlot uintptr + Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) + Xsqlite3StatusDown(tls, SQLITE_STATUS_PAGECACHE_USED, 1) + pSlot = p + (*PgFreeslot)(unsafe.Pointer(pSlot)).FpNext = pcache1_g.FpFree + pcache1_g.FpFree = pSlot + pcache1_g.FnFreeSlot++ + pcache1_g.FbUnderPressure = libc.Bool32(pcache1_g.FnFreeSlot < pcache1_g.FnReserve) + + Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) + } else { + + { + var nFreed int32 = 0 + nFreed = Xsqlite3MallocSize(tls, p) + Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) + Xsqlite3StatusDown(tls, SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed) + Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) + + } + Xsqlite3_free(tls, p) + } +} + +// Return the size of a pcache allocation +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ + if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { + return pcache1_g.FszSlot + } else { + var iSize int32 + + iSize = Xsqlite3MallocSize(tls, p) + + return iSize + } + return int32(0) +} + +// Allocate a new page object initially associated with cache pCache. +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ + var p uintptr = uintptr(0) + var pPg uintptr + + if (*PCache1)(unsafe.Pointer(pCache)).FpFree != 0 || (*PCache1)(unsafe.Pointer(pCache)).FnPage == uint32(0) && pcache1InitBulk(tls, pCache) != 0 { + + p = (*PCache1)(unsafe.Pointer(pCache)).FpFree + (*PCache1)(unsafe.Pointer(pCache)).FpFree = (*PgHdr1)(unsafe.Pointer(p)).FpNext + (*PgHdr1)(unsafe.Pointer(p)).FpNext = uintptr(0) + } else { + // The group mutex must be released before pcache1Alloc() is called. This + // is because it might call sqlite3_release_memory(), which assumes that + // this mutex is not held. + + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) + if benignMalloc != 0 { + Xsqlite3BeginBenignMalloc(tls) + } + pPg = pcache1Alloc(tls, (*PCache1)(unsafe.Pointer(pCache)).FszAlloc) + if benignMalloc != 0 { + Xsqlite3EndBenignMalloc(tls) + } + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) + if pPg == uintptr(0) { + return uintptr(0) + } + p = pPg + uintptr((*PCache1)(unsafe.Pointer(pCache)).FszPage) + (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpBuf = pPg + (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpExtra = p + 1*56 + (*PgHdr1)(unsafe.Pointer(p)).FisBulkLocal = U16(0) + (*PgHdr1)(unsafe.Pointer(p)).FisAnchor = U16(0) + (*PgHdr1)(unsafe.Pointer(p)).FpLruPrev = uintptr(0) // Initializing this saves a valgrind error + } + *(*uint32)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable))++ + return p +} + +// Free a page object allocated by pcache1AllocPage(). +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ + var pCache uintptr + + pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache + + if (*PgHdr1)(unsafe.Pointer(p)).FisBulkLocal != 0 { + (*PgHdr1)(unsafe.Pointer(p)).FpNext = (*PCache1)(unsafe.Pointer(pCache)).FpFree + (*PCache1)(unsafe.Pointer(pCache)).FpFree = p + } else { + pcache1Free(tls, (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpBuf) + } + *(*uint32)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable))-- +} + +// Malloc function used by SQLite to obtain space from the buffer configured +// using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer +// exists, this function falls back to sqlite3Malloc(). +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ + // These allocations are never very large + return pcache1Alloc(tls, sz) +} + +// Free an allocated buffer obtained from sqlite3PageMalloc(). +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ + pcache1Free(tls, p) +} + +// Return true if it desirable to avoid allocating a new page cache +// entry. +// +// If memory was allocated specifically to the page cache using +// SQLITE_CONFIG_PAGECACHE but that memory has all been used, then +// it is desirable to avoid allocating a new page cache entry because +// presumably SQLITE_CONFIG_PAGECACHE was suppose to be sufficient +// for all page cache needs and we should not need to spill the +// allocation onto the heap. +// +// Or, the heap is used for all page cache memory but the heap is +// under memory pressure, then again it is desirable to avoid +// allocating a new page cache entry in order to avoid stressing +// the heap even further. +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ + if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { + return pcache1_g.FbUnderPressure + } else { + return Xsqlite3HeapNearlyFull(tls) + } + return int32(0) +} + +//**************************************************************************** +//******* General Implementation Functions *********************************** + +// This function is used to resize the hash table used by the cache passed +// as the first argument. +// +// The PCache mutex must be held when this function is called. +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ + var apNew uintptr + var nNew uint32 + var i uint32 + + nNew = (*PCache1)(unsafe.Pointer(p)).FnHash * uint32(2) + if nNew < uint32(256) { + nNew = uint32(256) + } + + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(p)).FpGroup)).Fmutex) + if (*PCache1)(unsafe.Pointer(p)).FnHash != 0 { + Xsqlite3BeginBenignMalloc(tls) + } + apNew = Xsqlite3MallocZero(tls, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nNew))) + if (*PCache1)(unsafe.Pointer(p)).FnHash != 0 { + Xsqlite3EndBenignMalloc(tls) + } + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(p)).FpGroup)).Fmutex) + if apNew != 0 { + for i = uint32(0); i < (*PCache1)(unsafe.Pointer(p)).FnHash; i++ { + var pPage uintptr + var pNext uintptr = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(p)).FapHash + uintptr(i)*8)) + for libc.AssignUintptr(&pPage, pNext) != uintptr(0) { + var h uint32 = (*PgHdr1)(unsafe.Pointer(pPage)).FiKey % nNew + pNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext + (*PgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*8)) + *(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*8)) = pPage + } + } + Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(p)).FapHash) + (*PCache1)(unsafe.Pointer(p)).FapHash = apNew + (*PCache1)(unsafe.Pointer(p)).FnHash = nNew + } +} + +// This function is used internally to remove the page pPage from the +// PGroup LRU list, if is part of it. If pPage is not part of the PGroup +// LRU list, then this function is a no-op. +// +// The PGroup mutex must be held when this function is called. +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ + + (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext + (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev + (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext = uintptr(0) + // pPage->pLruPrev = 0; + // No need to clear pLruPrev as it is never accessed if pLruNext is 0 + + (*PCache1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpCache)).FnRecyclable-- + return pPage +} + +// Remove the page supplied as an argument from the hash table +// (PCache1.apHash structure) that it is currently stored in. +// Also free the page if freePage is true. +// +// The PGroup mutex must be held when this function is called. +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ + var h uint32 + var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache + var pp uintptr + + h = (*PgHdr1)(unsafe.Pointer(pPage)).FiKey % (*PCache1)(unsafe.Pointer(pCache)).FnHash + for pp = (*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8; *(*uintptr)(unsafe.Pointer(pp)) != pPage; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + } + *(*uintptr)(unsafe.Pointer(pp)) = (*PgHdr1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext + + (*PCache1)(unsafe.Pointer(pCache)).FnPage-- + if freeFlag != 0 { + pcache1FreePage(tls, pPage) + } +} + +// If there are currently more than nMaxPage pages allocated, try +// to recycle pages to reduce the number allocated to nMaxPage. +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ + var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup + var p uintptr + + for (*PGroup)(unsafe.Pointer(pGroup)).FnPurgeable > (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage && + int32((*PgHdr1)(unsafe.Pointer(libc.AssignUintptr(&p, (*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev))).FisAnchor) == 0 { + + pcache1PinPage(tls, p) + pcache1RemoveFromHash(tls, p, 1) + } + if (*PCache1)(unsafe.Pointer(pCache)).FnPage == uint32(0) && (*PCache1)(unsafe.Pointer(pCache)).FpBulk != 0 { + Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(pCache)).FpBulk) + (*PCache1)(unsafe.Pointer(pCache)).FpBulk = libc.AssignPtrUintptr(pCache+72, uintptr(0)) + } +} + +// Discard all pages from cache pCache with a page number (key value) +// greater than or equal to iLimit. Any pinned pages that meet this +// criteria are unpinned before they are discarded. +// +// The PCache mutex must be held when this function is called. +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ + var h uint32 + var iStop uint32 + + if (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey-iLimit < (*PCache1)(unsafe.Pointer(pCache)).FnHash { + // If we are just shaving the last few pages off the end of the + // cache, then there is no point in scanning the entire hash table. + // Only scan those hash slots that might contain pages that need to + // be removed. + h = iLimit % (*PCache1)(unsafe.Pointer(pCache)).FnHash + iStop = (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey % (*PCache1)(unsafe.Pointer(pCache)).FnHash + + } else { + // This is the general case where many pages are being removed. + // It is necessary to scan the entire hash table + h = (*PCache1)(unsafe.Pointer(pCache)).FnHash / uint32(2) + iStop = h - uint32(1) + } + for { + var pp uintptr + var pPage uintptr + + pp = (*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8 + for libc.AssignUintptr(&pPage, *(*uintptr)(unsafe.Pointer(pp))) != uintptr(0) { + if (*PgHdr1)(unsafe.Pointer(pPage)).FiKey >= iLimit { + (*PCache1)(unsafe.Pointer(pCache)).FnPage-- + *(*uintptr)(unsafe.Pointer(pp)) = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext + if (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext != uintptr(0) { + pcache1PinPage(tls, pPage) + } + pcache1FreePage(tls, pPage) + } else { + pp = pPage + 24 + + } + } + if h == iStop { + break + } + h = (h + uint32(1)) % (*PCache1)(unsafe.Pointer(pCache)).FnHash + } + +} + +//**************************************************************************** +//******* sqlite3_pcache Methods ********************************************* + +// Implementation of the sqlite3_pcache.xInit method. +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ + _ = NotUsed + + libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) + + // The pcache1.separateCache variable is true if each PCache has its own + // private PGroup (mode-1). pcache1.separateCache is false if the single + // PGroup in pcache1.grp is used for all page caches (mode-2). + // + // * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT + // + // * Use a unified cache in single-threaded applications that have + // configured a start-time buffer for use as page-cache memory using + // sqlite3_config(SQLITE_CONFIG_PAGECACHE, pBuf, sz, N) with non-NULL + // pBuf argument. + // + // * Otherwise use separate caches (mode-1) + pcache1_g.FseparateCache = 0 + + if Xsqlite3Config.FbCoreMutex != 0 { + pcache1_g.Fgrp.Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_LRU) + pcache1_g.Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_PMEM) + } + if pcache1_g.FseparateCache != 0 && + Xsqlite3Config.FnPage != 0 && + Xsqlite3Config.FpPage == uintptr(0) { + pcache1_g.FnInitPage = Xsqlite3Config.FnPage + } else { + pcache1_g.FnInitPage = 0 + } + pcache1_g.Fgrp.FmxPinned = uint32(10) + pcache1_g.FisInit = 1 + return SQLITE_OK +} + +// Implementation of the sqlite3_pcache.xShutdown method. +// Note that the static mutex allocated in xInit does +// not need to be freed. +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ + _ = NotUsed + + libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) +} + +// Implementation of the sqlite3_pcache.xCreate method. +// +// Allocate a new cache. +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ + var pCache uintptr // The newly created page cache + var pGroup uintptr // The group the new page cache will belong to + var sz int32 // Bytes of memory required to allocate the new cache + + sz = int32(uint64(unsafe.Sizeof(PCache1{})) + uint64(unsafe.Sizeof(PGroup{}))*uint64(pcache1_g.FseparateCache)) + pCache = Xsqlite3MallocZero(tls, uint64(sz)) + if pCache != 0 { + if pcache1_g.FseparateCache != 0 { + pGroup = pCache + 1*88 + (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = uint32(10) + } else { + pGroup = uintptr(unsafe.Pointer(&pcache1_g)) + } + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + if int32((*PGroup)(unsafe.Pointer(pGroup)).Flru.FisAnchor) == 0 { + (*PGroup)(unsafe.Pointer(pGroup)).Flru.FisAnchor = U16(1) + (*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev = libc.AssignPtrUintptr(pGroup+24+40, pGroup+24) + } + (*PCache1)(unsafe.Pointer(pCache)).FpGroup = pGroup + (*PCache1)(unsafe.Pointer(pCache)).FszPage = szPage + (*PCache1)(unsafe.Pointer(pCache)).FszExtra = szExtra + (*PCache1)(unsafe.Pointer(pCache)).FszAlloc = int32(uint64(szPage+szExtra) + (uint64(unsafe.Sizeof(PgHdr1{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) + (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable = func() int32 { + if bPurgeable != 0 { + return 1 + } + return 0 + }() + pcache1ResizeHash(tls, pCache) + if bPurgeable != 0 { + (*PCache1)(unsafe.Pointer(pCache)).FnMin = uint32(10) + *(*uint32)(unsafe.Pointer(pGroup + 12)) += (*PCache1)(unsafe.Pointer(pCache)).FnMin + (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + uint32(10) - (*PGroup)(unsafe.Pointer(pGroup)).FnMinPage + (*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable = pGroup + 20 + } else { + (*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable = pCache + 48 + } + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + if (*PCache1)(unsafe.Pointer(pCache)).FnHash == uint32(0) { + pcache1Destroy(tls, pCache) + pCache = uintptr(0) + } + } + return pCache +} + +// Implementation of the sqlite3_pcache.xCachesize method. +// +// Configure the cache_size limit for a cache. +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ + var pCache uintptr = p + var n U32 + + if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { + var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + n = U32(nMax) + if n > uint32(0x7fff0000)-(*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage+(*PCache1)(unsafe.Pointer(pCache)).FnMax { + n = uint32(0x7fff0000) - (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + (*PCache1)(unsafe.Pointer(pCache)).FnMax + } + *(*uint32)(unsafe.Pointer(pGroup + 8)) += n - (*PCache1)(unsafe.Pointer(pCache)).FnMax + (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + uint32(10) - (*PGroup)(unsafe.Pointer(pGroup)).FnMinPage + (*PCache1)(unsafe.Pointer(pCache)).FnMax = n + (*PCache1)(unsafe.Pointer(pCache)).Fn90pct = (*PCache1)(unsafe.Pointer(pCache)).FnMax * uint32(9) / uint32(10) + pcache1EnforceMaxPage(tls, pCache) + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + } +} + +// Implementation of the sqlite3_pcache.xShrink method. +// +// Free up as much memory as possible. +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ + var pCache uintptr = p + if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { + var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup + var savedMaxPage uint32 + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + savedMaxPage = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage = uint32(0) + pcache1EnforceMaxPage(tls, pCache) + (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage = savedMaxPage + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + } +} + +// Implementation of the sqlite3_pcache.xPagecount method. +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ + var n int32 + var pCache uintptr = p + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) + n = int32((*PCache1)(unsafe.Pointer(pCache)).FnPage) + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) + return n +} + +// Implement steps 3, 4, and 5 of the pcache1Fetch() algorithm described +// in the header of the pcache1Fetch() procedure. +// +// This steps are broken out into a separate procedure because they are +// usually not needed, and by avoiding the stack initialization required +// for these steps, the main pcache1Fetch() procedure can run faster. +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ + var nPinned uint32 + var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup + var pPage uintptr = uintptr(0) + + // Step 3: Abort if createFlag is 1 but the cache is nearly full + + nPinned = (*PCache1)(unsafe.Pointer(pCache)).FnPage - (*PCache1)(unsafe.Pointer(pCache)).FnRecyclable + + if createFlag == 1 && (nPinned >= (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned || + nPinned >= (*PCache1)(unsafe.Pointer(pCache)).Fn90pct || + pcache1UnderMemoryPressure(tls, pCache) != 0 && (*PCache1)(unsafe.Pointer(pCache)).FnRecyclable < nPinned) { + return uintptr(0) + } + + if (*PCache1)(unsafe.Pointer(pCache)).FnPage >= (*PCache1)(unsafe.Pointer(pCache)).FnHash { + pcache1ResizeHash(tls, pCache) + } + + // Step 4. Try to recycle a page. + if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 && + !(int32((*PgHdr1)(unsafe.Pointer((*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev)).FisAnchor) != 0) && + ((*PCache1)(unsafe.Pointer(pCache)).FnPage+uint32(1) >= (*PCache1)(unsafe.Pointer(pCache)).FnMax || pcache1UnderMemoryPressure(tls, pCache) != 0) { + var pOther uintptr + pPage = (*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev + + pcache1RemoveFromHash(tls, pPage, 0) + pcache1PinPage(tls, pPage) + pOther = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache + if (*PCache1)(unsafe.Pointer(pOther)).FszAlloc != (*PCache1)(unsafe.Pointer(pCache)).FszAlloc { + pcache1FreePage(tls, pPage) + pPage = uintptr(0) + } else { + *(*uint32)(unsafe.Pointer(pGroup + 20)) -= uint32((*PCache1)(unsafe.Pointer(pOther)).FbPurgeable - (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable) + } + } + + // Step 5. If a usable page buffer has still not been found, + // attempt to allocate a new one. + if !(pPage != 0) { + pPage = pcache1AllocPage(tls, pCache, libc.Bool32(createFlag == 1)) + } + + if pPage != 0 { + var h uint32 = iKey % (*PCache1)(unsafe.Pointer(pCache)).FnHash + (*PCache1)(unsafe.Pointer(pCache)).FnPage++ + (*PgHdr1)(unsafe.Pointer(pPage)).FiKey = iKey + (*PgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) + (*PgHdr1)(unsafe.Pointer(pPage)).FpCache = pCache + (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext = uintptr(0) + // pPage->pLruPrev = 0; + // No need to clear pLruPrev since it is not accessed when pLruNext==0 + *(*uintptr)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).Fpage.FpExtra)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) = pPage + if iKey > (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { + (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey = iKey + } + } + return pPage +} + +// Implementation of the sqlite3_pcache.xFetch method. +// +// Fetch a page by key value. +// +// Whether or not a new page may be allocated by this function depends on +// the value of the createFlag argument. 0 means do not allocate a new +// page. 1 means allocate a new page if space is easily available. 2 +// means to try really hard to allocate a new page. +// +// For a non-purgeable cache (a cache used as the storage for an in-memory +// database) there is really no difference between createFlag 1 and 2. So +// the calling function (pcache.c) will never have a createFlag of 1 on +// a non-purgeable cache. +// +// There are three different approaches to obtaining space for a page, +// depending on the value of parameter createFlag (which may be 0, 1 or 2). +// +// 1. Regardless of the value of createFlag, the cache is searched for a +// copy of the requested page. If one is found, it is returned. +// +// 2. If createFlag==0 and the page is not already in the cache, NULL is +// returned. +// +// 3. If createFlag is 1, and the page is not already in the cache, then +// return NULL (do not allocate a new page) if any of the following +// conditions are true: +// +// (a) the number of pages pinned by the cache is greater than +// PCache1.nMax, or +// +// (b) the number of pages pinned by the cache is greater than +// the sum of nMax for all purgeable caches, less the sum of +// nMin for all other purgeable caches, or +// +// 4. If none of the first three conditions apply and the cache is marked +// as purgeable, and if one of the following is true: +// +// (a) The number of pages allocated for the cache is already +// PCache1.nMax, or +// +// (b) The number of pages allocated for all purgeable caches is +// already equal to or greater than the sum of nMax for all +// purgeable caches, +// +// (c) The system is under memory pressure and wants to avoid +// unnecessary pages cache entry allocations +// +// then attempt to recycle a page from the LRU list. If it is the right +// size, return the recycled buffer. Otherwise, free the buffer and +// proceed to step 5. +// +// 5. Otherwise, allocate and return a new page buffer. +// +// There are two versions of this routine. pcache1FetchWithMutex() is +// the general case. pcache1FetchNoMutex() is a faster implementation for +// the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper +// invokes the appropriate routine. +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ + var pCache uintptr = p + var pPage uintptr = uintptr(0) + + // Step 1: Search the hash table for an existing entry. + pPage = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(iKey%(*PCache1)(unsafe.Pointer(pCache)).FnHash)*8)) + for pPage != 0 && (*PgHdr1)(unsafe.Pointer(pPage)).FiKey != iKey { + pPage = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext + } + + // Step 2: If the page was found in the hash table, then return it. + // If the page was not in the hash table and createFlag is 0, abort. + // Otherwise (page not in hash and createFlag!=0) continue with + // subsequent steps to try to create the page. + if pPage != 0 { + if (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext != uintptr(0) { + return pcache1PinPage(tls, pPage) + } else { + return pPage + } + } else if createFlag != 0 { + // Steps 3, 4, and 5 implemented by this subroutine + return pcache1FetchStage2(tls, pCache, iKey, createFlag) + } else { + return uintptr(0) + } + return uintptr(0) +} + +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ + var pCache uintptr = p + var pPage uintptr + + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) + pPage = pcache1FetchNoMutex(tls, p, iKey, createFlag) + + 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:52305:28: */ + var pCache uintptr = p + + if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { + return pcache1FetchWithMutex(tls, p, iKey, createFlag) + } else { + return pcache1FetchNoMutex(tls, p, iKey, createFlag) + } + return uintptr(0) +} + +// Implementation of the sqlite3_pcache.xUnpin method. +// +// Mark a page as unpinned (eligible for asynchronous recycling). +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ + var pCache uintptr = p + var pPage uintptr = pPg + var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup + + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + + // It is an error to call this function if the page is already + // part of the PGroup LRU list. + + if reuseUnlikely != 0 || (*PGroup)(unsafe.Pointer(pGroup)).FnPurgeable > (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage { + pcache1RemoveFromHash(tls, pPage, 1) + } else { + // Add the page to the PGroup LRU list. + var ppFirst uintptr = pGroup + 24 + 40 + (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev = pGroup + 24 + (*PgHdr1)(unsafe.Pointer(libc.AssignPtrUintptr(pPage+40, *(*uintptr)(unsafe.Pointer(ppFirst))))).FpLruPrev = pPage + *(*uintptr)(unsafe.Pointer(ppFirst)) = pPage + (*PCache1)(unsafe.Pointer(pCache)).FnRecyclable++ + } + + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) +} + +// Implementation of the sqlite3_pcache.xRekey method. +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ + var pCache uintptr = p + var pPage uintptr = pPg + var pp uintptr + var h uint32 + + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) + + h = iOld % (*PCache1)(unsafe.Pointer(pCache)).FnHash + pp = (*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8 + for *(*uintptr)(unsafe.Pointer(pp)) != pPage { + pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 + } + *(*uintptr)(unsafe.Pointer(pp)) = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext + + h = iNew % (*PCache1)(unsafe.Pointer(pCache)).FnHash + (*PgHdr1)(unsafe.Pointer(pPage)).FiKey = iNew + (*PgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) + *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) = pPage + if iNew > (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { + (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey = iNew + } + + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) +} + +// Implementation of the sqlite3_pcache.xTruncate method. +// +// Discard all unpinned pages in the cache with a page number equal to +// or greater than parameter iLimit. Any pinned pages with a page number +// equal to or greater than iLimit are implicitly unpinned. +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ + var pCache uintptr = p + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) + if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { + pcache1TruncateUnsafe(tls, pCache, iLimit) + (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey = iLimit - uint32(1) + } + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) +} + +// Implementation of the sqlite3_pcache.xDestroy method. +// +// Destroy a cache allocated using pcache1Create(). +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ + var pCache uintptr = p + var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup + + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + if (*PCache1)(unsafe.Pointer(pCache)).FnPage != 0 { + pcache1TruncateUnsafe(tls, pCache, uint32(0)) + } + + *(*uint32)(unsafe.Pointer(pGroup + 8)) -= (*PCache1)(unsafe.Pointer(pCache)).FnMax + + *(*uint32)(unsafe.Pointer(pGroup + 12)) -= (*PCache1)(unsafe.Pointer(pCache)).FnMin + (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + uint32(10) - (*PGroup)(unsafe.Pointer(pGroup)).FnMinPage + pcache1EnforceMaxPage(tls, pCache) + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) + Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(pCache)).FpBulk) + Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(pCache)).FapHash) + Xsqlite3_free(tls, pCache) +} + +// This function is called during initialization (sqlite3_initialize()) to +// install the default pluggable cache module, assuming the user has not +// already provided an alternative. +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + Xsqlite3_config(tls, SQLITE_CONFIG_PCACHE2, libc.VaList(bp, uintptr(unsafe.Pointer(&defaultMethods1)))) +} + +var defaultMethods1 = Sqlite3_pcache_methods2{ + FiVersion: 1, // pArg + FxInit: 0, // xInit + FxShutdown: 0, // xShutdown + FxCreate: 0, // xCreate + FxCachesize: 0, // xCachesize + FxPagecount: 0, // xPagecount + FxFetch: 0, // xFetch + FxUnpin: 0, // xUnpin + FxRekey: 0, // xRekey + FxTruncate: 0, // xTruncate + FxDestroy: 0, // xDestroy + FxShrink: 0, // xShrink +} /* sqlite3.c:52450:40 */ + +// Return the size of the header on each page of this PCACHE implementation. +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ + return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) +} + +// Return the global mutex used by this PCACHE implementation. The +// sqlite3_status() routine needs access to this mutex. +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ + return pcache1_g.Fmutex +} + +// This function is called to free superfluous dynamically allocated memory +// held by the pager system. Memory in use by any SQLite pager allocated +// by the current thread may be sqlite3_free()ed. +// +// nReq is the number of bytes of memory required. Once this much has +// been released, the function returns. The return value is the total number +// of bytes of memory released. +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ + var nFree int32 = 0 + + if Xsqlite3Config.FpPage == uintptr(0) { + var p uintptr + Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(uintptr(unsafe.Pointer(&pcache1_g)))).Fmutex) + for (nReq < 0 || nFree < nReq) && + libc.AssignUintptr(&p, pcache1_g.Fgrp.Flru.FpLruPrev) != uintptr(0) && + int32((*PgHdr1)(unsafe.Pointer(p)).FisAnchor) == 0 { + nFree = nFree + pcache1MemSize(tls, (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpBuf) + + pcache1PinPage(tls, p) + pcache1RemoveFromHash(tls, p, 1) + } + Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(uintptr(unsafe.Pointer(&pcache1_g)))).Fmutex) + } + return nFree +} + +//************* End of pcache1.c ******************************************** +//************* Begin file rowset.c ***************************************** +// 2008 December 3 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This module implements an object we call a "RowSet". +// +// The RowSet object is a collection of rowids. Rowids +// are inserted into the RowSet in an arbitrary order. Inserts +// can be intermixed with tests to see if a given rowid has been +// previously inserted into the RowSet. +// +// After all inserts are finished, it is possible to extract the +// elements of the RowSet in sorted order. Once this extraction +// process has started, no new elements may be inserted. +// +// Hence, the primitive operations for a RowSet are: +// +// CREATE +// INSERT +// TEST +// SMALLEST +// DESTROY +// +// The CREATE and DESTROY primitives are the constructor and destructor, +// obviously. The INSERT primitive adds a new element to the RowSet. +// TEST checks to see if an element is already in the RowSet. SMALLEST +// extracts the least value from the RowSet. +// +// The INSERT primitive might allocate additional memory. Memory is +// allocated in chunks so most INSERTs do no allocation. There is an +// upper bound on the size of allocated memory. No memory is freed +// until DESTROY. +// +// The TEST primitive includes a "batch" number. The TEST primitive +// will only see elements that were inserted before the last change +// in the batch number. In other words, if an INSERT occurs between +// two TESTs where the TESTs have the same batch nubmer, then the +// value added by the INSERT will not be visible to the second TEST. +// The initial batch number is zero, so if the very first TEST contains +// a non-zero batch number, it will see all prior INSERTs. +// +// No INSERTs may occurs after a SMALLEST. An assertion will fail if +// that is attempted. +// +// The cost of an INSERT is roughly constant. (Sometimes new memory +// has to be allocated on an INSERT.) The cost of a TEST with a new +// batch number is O(NlogN) where N is the number of elements in the RowSet. +// The cost of a TEST using the same batch number is O(logN). The cost +// of the first SMALLEST is O(NlogN). Second and subsequent SMALLEST +// primitives are constant time. The cost of DESTROY is O(N). +// +// TEST and SMALLEST may not be used by the same RowSet. This used to +// be possible, but the feature was not used, so it was removed in order +// to simplify the code. +// #include "sqliteInt.h" + +// Target size for allocation chunks. + +// The number of rowset entries per allocation chunk. + +// Each entry in a RowSet is an instance of the following object. +// +// This same object is reused to store a linked list of trees of RowSetEntry +// objects. In that alternative use, pRight points to the next entry +// in the list, pLeft points to the tree, and v is unused. The +// RowSet.pForest value points to the head of this forest list. +type RowSetEntry = struct { + Fv I64 + FpRight uintptr + FpLeft uintptr +} /* sqlite3.c:14606:9 */ + +// RowSetEntry objects are allocated in large chunks (instances of the +// following structure) to reduce memory allocation overhead. The +// chunks are kept on a linked list so that they can be deallocated +// when the RowSet is destroyed. +type RowSetChunk = struct { + FpNextChunk uintptr + FaEntry [42]struct { + Fv I64 + FpRight uintptr + FpLeft uintptr + } +} /* sqlite3.c:14606:9 */ + +// Allowed values for RowSet.rsFlags + +// Allocate a RowSet object. Return NULL if a memory allocation +// error occurs. +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ + var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) + if p != 0 { + var N int32 = Xsqlite3DbMallocSize(tls, db, p) + (*RowSet)(unsafe.Pointer(p)).FpChunk = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).Fdb = db + (*RowSet)(unsafe.Pointer(p)).FpEntry = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).FpLast = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).FpForest = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).FpFresh = uintptr((uint64(unsafe.Sizeof(RowSet{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) + p + (*RowSet)(unsafe.Pointer(p)).FnFresh = U16((uint64(N) - (uint64(unsafe.Sizeof(RowSet{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) / uint64(unsafe.Sizeof(RowSetEntry{}))) + (*RowSet)(unsafe.Pointer(p)).FrsFlags = U16(ROWSET_SORTED) + (*RowSet)(unsafe.Pointer(p)).FiBatch = 0 + } + return p +} + +// Deallocate all chunks from a RowSet. This frees all memory that +// the RowSet has allocated over its lifetime. This routine is +// the destructor for the RowSet. +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ + var p uintptr = pArg + var pChunk uintptr + var pNextChunk uintptr + for pChunk = (*RowSet)(unsafe.Pointer(p)).FpChunk; pChunk != 0; pChunk = pNextChunk { + pNextChunk = (*RowSetChunk)(unsafe.Pointer(pChunk)).FpNextChunk + Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(p)).Fdb, pChunk) + } + (*RowSet)(unsafe.Pointer(p)).FpChunk = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).FnFresh = U16(0) + (*RowSet)(unsafe.Pointer(p)).FpEntry = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).FpLast = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).FpForest = uintptr(0) + (*RowSet)(unsafe.Pointer(p)).FrsFlags = U16(ROWSET_SORTED) +} + +// Deallocate all chunks from a RowSet. This frees all memory that +// the RowSet has allocated over its lifetime. This routine is +// the destructor for the RowSet. +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ + Xsqlite3RowSetClear(tls, pArg) + Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) +} + +// Allocate a new RowSetEntry object that is associated with the +// given RowSet. Return a pointer to the new and completely uninitialized +// object. +// +// In an OOM situation, the RowSet.db->mallocFailed flag is set and this +// routine returns NULL. +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ + + if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE + // We could allocate a fresh RowSetEntry each time one is needed, but it + // is more efficient to pull a preallocated entry from the pool + var pNew uintptr + pNew = Xsqlite3DbMallocRawNN(tls, (*RowSet)(unsafe.Pointer(p)).Fdb, uint64(unsafe.Sizeof(RowSetChunk{}))) + if pNew == uintptr(0) { + return uintptr(0) + } + (*RowSetChunk)(unsafe.Pointer(pNew)).FpNextChunk = (*RowSet)(unsafe.Pointer(p)).FpChunk + (*RowSet)(unsafe.Pointer(p)).FpChunk = pNew + (*RowSet)(unsafe.Pointer(p)).FpFresh = pNew + 8 /* &.aEntry */ + (*RowSet)(unsafe.Pointer(p)).FnFresh = uint16(uint64(ROWSET_ALLOCATION_SIZE-8) / uint64(unsafe.Sizeof(RowSetEntry{}))) + } + (*RowSet)(unsafe.Pointer(p)).FnFresh-- + return libc.PostIncUintptr(&(*RowSet)(unsafe.Pointer(p)).FpFresh, 24) +} + +// Insert a new value into a RowSet. +// +// The mallocFailed flag of the database connection is set if a +// memory allocation fails. +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ + var pEntry uintptr // The new entry + var pLast uintptr // The last prior entry + + // This routine is never called after sqlite3RowSetNext() + + pEntry = rowSetEntryAlloc(tls, p) + if pEntry == uintptr(0) { + return + } + (*RowSetEntry)(unsafe.Pointer(pEntry)).Fv = rowid + (*RowSetEntry)(unsafe.Pointer(pEntry)).FpRight = uintptr(0) + pLast = (*RowSet)(unsafe.Pointer(p)).FpLast + if pLast != 0 { + if rowid <= (*RowSetEntry)(unsafe.Pointer(pLast)).Fv { //OPTIMIZATION-IF-FALSE + // Avoid unnecessary sorts by preserving the ROWSET_SORTED flags + // where possible + *(*U16)(unsafe.Pointer(p + 50)) &= libc.Uint16FromInt32(libc.CplInt32(ROWSET_SORTED)) + } + (*RowSetEntry)(unsafe.Pointer(pLast)).FpRight = pEntry + } else { + (*RowSet)(unsafe.Pointer(p)).FpEntry = pEntry + } + (*RowSet)(unsafe.Pointer(p)).FpLast = pEntry +} + +// Merge two lists of RowSetEntry objects. Remove duplicates. +// +// The input lists are connected via pRight pointers and are +// assumed to each already be in sorted order. +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + // var head RowSetEntry at bp, 24 + + var pTail uintptr + + pTail = bp /* &head */ + + for { + + if (*RowSetEntry)(unsafe.Pointer(pA)).Fv <= (*RowSetEntry)(unsafe.Pointer(pB)).Fv { + if (*RowSetEntry)(unsafe.Pointer(pA)).Fv < (*RowSetEntry)(unsafe.Pointer(pB)).Fv { + pTail = libc.AssignPtrUintptr(pTail+8, pA) + } + pA = (*RowSetEntry)(unsafe.Pointer(pA)).FpRight + if pA == uintptr(0) { + (*RowSetEntry)(unsafe.Pointer(pTail)).FpRight = pB + break + } + } else { + pTail = libc.AssignPtrUintptr(pTail+8, pB) + pB = (*RowSetEntry)(unsafe.Pointer(pB)).FpRight + if pB == uintptr(0) { + (*RowSetEntry)(unsafe.Pointer(pTail)).FpRight = pA + break + } + } + } + return (*RowSetEntry)(unsafe.Pointer(bp /* &head */)).FpRight +} + +// Sort all elements on the list of RowSetEntry objects into order of +// increasing v. +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ + bp := tls.Alloc(320) + defer tls.Free(320) + + var i uint32 + var pNext uintptr + // var aBucket [40]uintptr at bp, 320 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([40]uintptr{}))) + for pIn != 0 { + pNext = (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight + (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight = uintptr(0) + for i = uint32(0); *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*8)) != 0; i++ { + pIn = rowSetEntryMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), pIn) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = pIn + pIn = pNext + } + pIn = *(*uintptr)(unsafe.Pointer(bp)) + for i = uint32(1); uint64(i) < uint64(unsafe.Sizeof([40]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))); i++ { + if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { + continue + } + if pIn != 0 { + pIn = rowSetEntryMerge(tls, pIn, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) + } else { + pIn = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) + } + } + return pIn +} + +// The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. +// Convert this tree into a linked list connected by the pRight pointers +// and return pointers to the first and last elements of the new list. +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*RowSetEntry)(unsafe.Pointer(pIn)).FpLeft != 0 { + // var p uintptr at bp, 8 + + rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pIn)).FpLeft, ppFirst, bp) + (*RowSetEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpRight = pIn + } else { + *(*uintptr)(unsafe.Pointer(ppFirst)) = pIn + } + if (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight != 0 { + rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight, pIn+8, ppLast) + } else { + *(*uintptr)(unsafe.Pointer(ppLast)) = pIn + } + +} + +// Convert a sorted list of elements (connected by pRight) into a binary +// tree with depth of iDepth. A depth of 1 means the tree contains a single +// node taken from the head of *ppList. A depth of 2 means a tree with +// three nodes. And so forth. +// +// Use as many entries from the input list as required and update the +// *ppList to point to the unused elements of the list. If the input +// list contains too few elements, then construct an incomplete tree +// and leave *ppList set to NULL. +// +// Return a pointer to the root of the constructed binary tree. +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ + var p uintptr // Root of the new tree + var pLeft uintptr // Left subtree + if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE + // Prevent unnecessary deep recursion when we run out of entries + return uintptr(0) + } + if iDepth > 1 { //OPTIMIZATION-IF-TRUE + // This branch causes a *balanced* tree to be generated. A valid tree + // is still generated without this branch, but the tree is wildly + // unbalanced and inefficient. + pLeft = rowSetNDeepTree(tls, ppList, iDepth-1) + p = *(*uintptr)(unsafe.Pointer(ppList)) + if p == uintptr(0) { //OPTIMIZATION-IF-FALSE + // It is safe to always return here, but the resulting tree + // would be unbalanced + return pLeft + } + (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = pLeft + *(*uintptr)(unsafe.Pointer(ppList)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight + (*RowSetEntry)(unsafe.Pointer(p)).FpRight = rowSetNDeepTree(tls, ppList, iDepth-1) + } else { + p = *(*uintptr)(unsafe.Pointer(ppList)) + *(*uintptr)(unsafe.Pointer(ppList)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight + (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = libc.AssignPtrUintptr(p+8, uintptr(0)) + } + return p +} + +// Convert a sorted list of elements into a binary tree. Make the tree +// as deep as it needs to be in order to contain the entire list. +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = pList + + var iDepth int32 // Depth of the tree so far + var p uintptr // Current tree root + var pLeft uintptr // Left subtree + + p = *(*uintptr)(unsafe.Pointer(bp /* pList */)) + *(*uintptr)(unsafe.Pointer(bp /* pList */)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight + (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = libc.AssignPtrUintptr(p+8, uintptr(0)) + for iDepth = 1; *(*uintptr)(unsafe.Pointer(bp /* pList */)) != 0; iDepth++ { + pLeft = p + p = *(*uintptr)(unsafe.Pointer(bp /* pList */)) + *(*uintptr)(unsafe.Pointer(bp /* pList */)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight + (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = pLeft + (*RowSetEntry)(unsafe.Pointer(p)).FpRight = rowSetNDeepTree(tls, bp, iDepth) + } + return p +} + +// Extract the smallest element from the RowSet. +// Write the element into *pRowid. Return 1 on success. Return +// 0 if the RowSet is already empty. +// +// After this routine has been called, the sqlite3RowSetInsert() +// routine may not be called again. +// +// This routine may not be called after sqlite3RowSetTest() has +// been used. Older versions of RowSet allowed that, but as the +// capability was not used by the code generator, it was removed +// for code economy. +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ + + // Cannot be used with sqlite3RowSetText() + + // Merge the forest into a single sorted list on first call + if int32((*RowSet)(unsafe.Pointer(p)).FrsFlags)&ROWSET_NEXT == 0 { //OPTIMIZATION-IF-FALSE + if int32((*RowSet)(unsafe.Pointer(p)).FrsFlags)&ROWSET_SORTED == 0 { //OPTIMIZATION-IF-FALSE + (*RowSet)(unsafe.Pointer(p)).FpEntry = rowSetEntrySort(tls, (*RowSet)(unsafe.Pointer(p)).FpEntry) + } + *(*U16)(unsafe.Pointer(p + 50)) |= U16(ROWSET_SORTED | ROWSET_NEXT) + } + + // Return the next entry on the list + if (*RowSet)(unsafe.Pointer(p)).FpEntry != 0 { + *(*I64)(unsafe.Pointer(pRowid)) = (*RowSetEntry)(unsafe.Pointer((*RowSet)(unsafe.Pointer(p)).FpEntry)).Fv + (*RowSet)(unsafe.Pointer(p)).FpEntry = (*RowSetEntry)(unsafe.Pointer((*RowSet)(unsafe.Pointer(p)).FpEntry)).FpRight + if (*RowSet)(unsafe.Pointer(p)).FpEntry == uintptr(0) { //OPTIMIZATION-IF-TRUE + // Free memory immediately, rather than waiting on sqlite3_finalize() + Xsqlite3RowSetClear(tls, p) + } + return 1 + } else { + return 0 + } + return int32(0) +} + +// Check to see if element iRowid was inserted into the rowset as +// part of any insert batch prior to iBatch. Return 1 or 0. +// +// If this is the first test of a new batch and if there exist entries +// on pRowSet->pEntry, then sort those entries into the forest at +// pRowSet->pForest so that they can be tested. +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var p uintptr + var pTree uintptr + + // This routine is never called after sqlite3RowSetNext() + + // Sort entries into the forest on the first test of a new batch. + // To save unnecessary work, only do this when the batch number changes. + if iBatch != (*RowSet)(unsafe.Pointer(pRowSet)).FiBatch { //OPTIMIZATION-IF-FALSE + p = (*RowSet)(unsafe.Pointer(pRowSet)).FpEntry + if p != 0 { + var ppPrevTree uintptr = pRowSet + 40 + if int32((*RowSet)(unsafe.Pointer(pRowSet)).FrsFlags)&ROWSET_SORTED == 0 { //OPTIMIZATION-IF-FALSE + // Only sort the current set of entries if they need it + p = rowSetEntrySort(tls, p) + } + for pTree = (*RowSet)(unsafe.Pointer(pRowSet)).FpForest; pTree != 0; pTree = (*RowSetEntry)(unsafe.Pointer(pTree)).FpRight { + ppPrevTree = pTree + 8 + if (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft == uintptr(0) { + (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft = rowSetListToTree(tls, p) + break + } else { + // var pAux uintptr at bp, 8 + + // var pTail uintptr at bp+8, 8 + + rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft, bp, bp+8) + (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft = uintptr(0) + p = rowSetEntryMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* pAux */)), p) + } + } + if pTree == uintptr(0) { + *(*uintptr)(unsafe.Pointer(ppPrevTree)) = libc.AssignUintptr(&pTree, rowSetEntryAlloc(tls, pRowSet)) + if pTree != 0 { + (*RowSetEntry)(unsafe.Pointer(pTree)).Fv = int64(0) + (*RowSetEntry)(unsafe.Pointer(pTree)).FpRight = uintptr(0) + (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft = rowSetListToTree(tls, p) + } + } + (*RowSet)(unsafe.Pointer(pRowSet)).FpEntry = uintptr(0) + (*RowSet)(unsafe.Pointer(pRowSet)).FpLast = uintptr(0) + *(*U16)(unsafe.Pointer(pRowSet + 50)) |= U16(ROWSET_SORTED) + } + (*RowSet)(unsafe.Pointer(pRowSet)).FiBatch = iBatch + } + + // Test to see if the iRowid value appears anywhere in the forest. + // Return 1 if it does and 0 if not. + for pTree = (*RowSet)(unsafe.Pointer(pRowSet)).FpForest; pTree != 0; pTree = (*RowSetEntry)(unsafe.Pointer(pTree)).FpRight { + p = (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft + for p != 0 { + if (*RowSetEntry)(unsafe.Pointer(p)).Fv < iRowid { + p = (*RowSetEntry)(unsafe.Pointer(p)).FpRight + } else if (*RowSetEntry)(unsafe.Pointer(p)).Fv > iRowid { + p = (*RowSetEntry)(unsafe.Pointer(p)).FpLeft + } else { + return 1 + } + } + } + return 0 +} + +//************* End of rowset.c ********************************************* +//************* Begin file pager.c ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This is the implementation of the page cache subsystem or "pager". +// +// The pager is used to access a database disk file. It implements +// atomic commit and rollback through the use of a journal file that +// is separate from the database file. The pager also implements file +// locking to prevent two processes from writing the same database +// file simultaneously, or one process from reading the database while +// another is writing. +// #include "sqliteInt.h" +//************* Include wal.h in the middle of pager.c ********************** +//************* Begin file wal.h ******************************************** +// 2010 February 1 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface to the write-ahead logging +// system. Refer to the comments below and the header comment attached to +// the implementation of each function in log.c for further details. + +// #include "sqliteInt.h" + +// Macros for extracting appropriate sync flags for either transaction +// commits (WAL_SYNC_FLAGS(X)) or for checkpoint ops (CKPT_SYNC_FLAGS(X)): + +// Connection to a write-ahead log (WAL) file. +// There is one object of this type for each pager. +type Wal1 = struct { + FpVfs uintptr + FpDbFd uintptr + FpWalFd uintptr + FiCallback U32 + F__ccgo_pad1 [4]byte + FmxWalSize I64 + FnWiData int32 + FszFirstBlock int32 + FapWiData uintptr + FszPage U32 + FreadLock I16 + FsyncFlags U8 + FexclusiveMode U8 + FwriteLock U8 + FckptLock U8 + FreadOnly U8 + FtruncateOnCommit U8 + FsyncHeader U8 + FpadToSectorBoundary U8 + FbShmUnreliable U8 + F__ccgo_pad2 [1]byte + Fhdr WalIndexHdr + FminFrame U32 + FiReCksum U32 + FzWalName uintptr + FnCkpt U32 + F__ccgo_pad3 [4]byte + FpSnapshot uintptr +} /* sqlite3.c:578:9 */ + +//************* End of rowset.c ********************************************* +//************* Begin file pager.c ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This is the implementation of the page cache subsystem or "pager". +// +// The pager is used to access a database disk file. It implements +// atomic commit and rollback through the use of a journal file that +// is separate from the database file. The pager also implements file +// locking to prevent two processes from writing the same database +// file simultaneously, or one process from reading the database while +// another is writing. +// #include "sqliteInt.h" +//************* Include wal.h in the middle of pager.c ********************** +//************* Begin file wal.h ******************************************** +// 2010 February 1 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface to the write-ahead logging +// system. Refer to the comments below and the header comment attached to +// the implementation of each function in log.c for further details. + +// #include "sqliteInt.h" + +// Macros for extracting appropriate sync flags for either transaction +// commits (WAL_SYNC_FLAGS(X)) or for checkpoint ops (CKPT_SYNC_FLAGS(X)): + +// Connection to a write-ahead log (WAL) file. +// There is one object of this type for each pager. +type Wal = Wal1 /* sqlite3.c:53125:20 */ + +//************* End of wal.h ************************************************ +//************* Continuing where we left off in pager.c ********************* + +// ****************** NOTES ON THE DESIGN OF THE PAGER ************************ +// +// +// This comment block describes invariants that hold when using a rollback +// journal. These invariants do not apply for journal_mode=WAL, +// journal_mode=MEMORY, or journal_mode=OFF. +// +// Within this comment block, a page is deemed to have been synced +// automatically as soon as it is written when PRAGMA synchronous=OFF. +// Otherwise, the page is not synced until the xSync method of the VFS +// is called successfully on the file containing the page. +// +// Definition: A page of the database file is said to be "overwriteable" if +// one or more of the following are true about the page: +// +// (a) The original content of the page as it was at the beginning of +// the transaction has been written into the rollback journal and +// synced. +// +// (b) The page was a freelist leaf page at the start of the transaction. +// +// (c) The page number is greater than the largest page that existed in +// the database file at the start of the transaction. +// +// (1) A page of the database file is never overwritten unless one of the +// following are true: +// +// (a) The page and all other pages on the same sector are overwriteable. +// +// (b) The atomic page write optimization is enabled, and the entire +// transaction other than the update of the transaction sequence +// number consists of a single page change. +// +// (2) The content of a page written into the rollback journal exactly matches +// both the content in the database when the rollback journal was written +// and the content in the database at the beginning of the current +// transaction. +// +// (3) Writes to the database file are an integer multiple of the page size +// in length and are aligned on a page boundary. +// +// (4) Reads from the database file are either aligned on a page boundary and +// an integer multiple of the page size in length or are taken from the +// first 100 bytes of the database file. +// +// (5) All writes to the database file are synced prior to the rollback journal +// being deleted, truncated, or zeroed. +// +// (6) If a super-journal file is used, then all writes to the database file +// are synced prior to the super-journal being deleted. +// +// Definition: Two databases (or the same database at two points it time) +// are said to be "logically equivalent" if they give the same answer to +// all queries. Note in particular the content of freelist leaf +// pages can be changed arbitrarily without affecting the logical equivalence +// of the database. +// +// (7) At any time, if any subset, including the empty set and the total set, +// of the unsynced changes to a rollback journal are removed and the +// journal is rolled back, the resulting database file will be logically +// equivalent to the database file at the beginning of the transaction. +// +// (8) When a transaction is rolled back, the xTruncate method of the VFS +// is called to restore the database file to the same size it was at +// the beginning of the transaction. (In some VFSes, the xTruncate +// method is a no-op, but that does not change the fact the SQLite will +// invoke it.) +// +// (9) Whenever the database file is modified, at least one bit in the range +// of bytes from 24 through 39 inclusive will be changed prior to releasing +// the EXCLUSIVE lock, thus signaling other connections on the same +// database to flush their caches. +// +// (10) The pattern of bits in bytes 24 through 39 shall not repeat in less +// than one billion transactions. +// +// (11) A database file is well-formed at the beginning and at the conclusion +// of every transaction. +// +// (12) An EXCLUSIVE lock is held on the database file when writing to +// the database file. +// +// (13) A SHARED lock is held on the database file while reading any +// content out of the database file. +// +// + +// Macros for troubleshooting. Normally turned off + +// The following two macros are used within the PAGERTRACE() macros above +// to print out file-descriptors. +// +// PAGERID() takes a pointer to a Pager struct as its argument. The +// associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file +// struct as its argument. + +// The Pager.eState variable stores the current 'state' of a pager. A +// pager may be in any one of the seven states shown in the following +// state diagram. +// +// OPEN <------+------+ +// | | | +// V | | +// +---------> READER-------+ | +// | | | +// | V | +// |<-------WRITER_LOCKED------> ERROR +// | | ^ +// | V | +// |<------WRITER_CACHEMOD-------->| +// | | | +// | V | +// |<-------WRITER_DBMOD---------->| +// | | | +// | V | +// +<------WRITER_FINISHED-------->+ +// +// +// List of state transitions and the C [function] that performs each: +// +// OPEN -> READER [sqlite3PagerSharedLock] +// READER -> OPEN [pager_unlock] +// +// READER -> WRITER_LOCKED [sqlite3PagerBegin] +// WRITER_LOCKED -> WRITER_CACHEMOD [pager_open_journal] +// WRITER_CACHEMOD -> WRITER_DBMOD [syncJournal] +// WRITER_DBMOD -> WRITER_FINISHED [sqlite3PagerCommitPhaseOne] +// WRITER_*** -> READER [pager_end_transaction] +// +// WRITER_*** -> ERROR [pager_error] +// ERROR -> OPEN [pager_unlock] +// +// +// OPEN: +// +// The pager starts up in this state. Nothing is guaranteed in this +// state - the file may or may not be locked and the database size is +// unknown. The database may not be read or written. +// +// * No read or write transaction is active. +// * Any lock, or no lock at all, may be held on the database file. +// * The dbSize, dbOrigSize and dbFileSize variables may not be trusted. +// +// READER: +// +// In this state all the requirements for reading the database in +// rollback (non-WAL) mode are met. Unless the pager is (or recently +// was) in exclusive-locking mode, a user-level read transaction is +// open. The database size is known in this state. +// +// A connection running with locking_mode=normal enters this state when +// it opens a read-transaction on the database and returns to state +// OPEN after the read-transaction is completed. However a connection +// running in locking_mode=exclusive (including temp databases) remains in +// this state even after the read-transaction is closed. The only way +// a locking_mode=exclusive connection can transition from READER to OPEN +// is via the ERROR state (see below). +// +// * A read transaction may be active (but a write-transaction cannot). +// * A SHARED or greater lock is held on the database file. +// * The dbSize variable may be trusted (even if a user-level read +// transaction is not active). The dbOrigSize and dbFileSize variables +// may not be trusted at this point. +// * If the database is a WAL database, then the WAL connection is open. +// * Even if a read-transaction is not open, it is guaranteed that +// there is no hot-journal in the file-system. +// +// WRITER_LOCKED: +// +// The pager moves to this state from READER when a write-transaction +// is first opened on the database. In WRITER_LOCKED state, all locks +// required to start a write-transaction are held, but no actual +// modifications to the cache or database have taken place. +// +// In rollback mode, a RESERVED or (if the transaction was opened with +// BEGIN EXCLUSIVE) EXCLUSIVE lock is obtained on the database file when +// moving to this state, but the journal file is not written to or opened +// to in this state. If the transaction is committed or rolled back while +// in WRITER_LOCKED state, all that is required is to unlock the database +// file. +// +// IN WAL mode, WalBeginWriteTransaction() is called to lock the log file. +// If the connection is running with locking_mode=exclusive, an attempt +// is made to obtain an EXCLUSIVE lock on the database file. +// +// * A write transaction is active. +// * If the connection is open in rollback-mode, a RESERVED or greater +// lock is held on the database file. +// * If the connection is open in WAL-mode, a WAL write transaction +// is open (i.e. sqlite3WalBeginWriteTransaction() has been successfully +// called). +// * The dbSize, dbOrigSize and dbFileSize variables are all valid. +// * The contents of the pager cache have not been modified. +// * The journal file may or may not be open. +// * Nothing (not even the first header) has been written to the journal. +// +// WRITER_CACHEMOD: +// +// A pager moves from WRITER_LOCKED state to this state when a page is +// first modified by the upper layer. In rollback mode the journal file +// is opened (if it is not already open) and a header written to the +// start of it. The database file on disk has not been modified. +// +// * A write transaction is active. +// * A RESERVED or greater lock is held on the database file. +// * The journal file is open and the first header has been written +// to it, but the header has not been synced to disk. +// * The contents of the page cache have been modified. +// +// WRITER_DBMOD: +// +// The pager transitions from WRITER_CACHEMOD into WRITER_DBMOD state +// when it modifies the contents of the database file. WAL connections +// never enter this state (since they do not modify the database file, +// just the log file). +// +// * A write transaction is active. +// * An EXCLUSIVE or greater lock is held on the database file. +// * The journal file is open and the first header has been written +// and synced to disk. +// * The contents of the page cache have been modified (and possibly +// written to disk). +// +// WRITER_FINISHED: +// +// It is not possible for a WAL connection to enter this state. +// +// A rollback-mode pager changes to WRITER_FINISHED state from WRITER_DBMOD +// state after the entire transaction has been successfully written into the +// database file. In this state the transaction may be committed simply +// by finalizing the journal file. Once in WRITER_FINISHED state, it is +// not possible to modify the database further. At this point, the upper +// layer must either commit or rollback the transaction. +// +// * A write transaction is active. +// * An EXCLUSIVE or greater lock is held on the database file. +// * All writing and syncing of journal and database data has finished. +// If no error occurred, all that remains is to finalize the journal to +// commit the transaction. If an error did occur, the caller will need +// to rollback the transaction. +// +// ERROR: +// +// The ERROR state is entered when an IO or disk-full error (including +// SQLITE_IOERR_NOMEM) occurs at a point in the code that makes it +// difficult to be sure that the in-memory pager state (cache contents, +// db size etc.) are consistent with the contents of the file-system. +// +// Temporary pager files may enter the ERROR state, but in-memory pagers +// cannot. +// +// For example, if an IO error occurs while performing a rollback, +// the contents of the page-cache may be left in an inconsistent state. +// At this point it would be dangerous to change back to READER state +// (as usually happens after a rollback). Any subsequent readers might +// report database corruption (due to the inconsistent cache), and if +// they upgrade to writers, they may inadvertently corrupt the database +// file. To avoid this hazard, the pager switches into the ERROR state +// instead of READER following such an error. +// +// Once it has entered the ERROR state, any attempt to use the pager +// to read or write data returns an error. Eventually, once all +// outstanding transactions have been abandoned, the pager is able to +// transition back to OPEN state, discarding the contents of the +// page-cache and any other in-memory state at the same time. Everything +// is reloaded from disk (and, if necessary, hot-journal rollback peformed) +// when a read-transaction is next opened on the pager (transitioning +// the pager into READER state). At that point the system has recovered +// from the error. +// +// Specifically, the pager jumps into the ERROR state if: +// +// 1. An error occurs while attempting a rollback. This happens in +// function sqlite3PagerRollback(). +// +// 2. An error occurs while attempting to finalize a journal file +// following a commit in function sqlite3PagerCommitPhaseTwo(). +// +// 3. An error occurs while attempting to write to the journal or +// database file in function pagerStress() in order to free up +// memory. +// +// In other cases, the error is returned to the b-tree layer. The b-tree +// layer then attempts a rollback operation. If the error condition +// persists, the pager enters the ERROR state via condition (1) above. +// +// Condition (3) is necessary because it can be triggered by a read-only +// statement executed within a transaction. In this case, if the error +// code were simply returned to the user, the b-tree layer would not +// automatically attempt a rollback, as it assumes that an error in a +// read-only statement cannot leave the pager in an internally inconsistent +// state. +// +// * The Pager.errCode variable is set to something other than SQLITE_OK. +// * There are one or more outstanding references to pages (after the +// last reference is dropped the pager should move back to OPEN state). +// * The pager is not an in-memory pager. +// +// +// Notes: +// +// * A pager is never in WRITER_DBMOD or WRITER_FINISHED state if the +// connection is open in WAL mode. A WAL connection is always in one +// of the first four states. +// +// * Normally, a connection open in exclusive mode is never in PAGER_OPEN +// state. There are two exceptions: immediately after exclusive-mode has +// been turned on (and before any read or write transactions are +// executed), and when the pager is leaving the "error state". +// +// * See also: assert_pager_state(). + +// The Pager.eLock variable is almost always set to one of the +// following locking-states, according to the lock currently held on +// the database file: NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK. +// This variable is kept up to date as locks are taken and released by +// the pagerLockDb() and pagerUnlockDb() wrappers. +// +// If the VFS xLock() or xUnlock() returns an error other than SQLITE_BUSY +// (i.e. one of the SQLITE_IOERR subtypes), it is not clear whether or not +// the operation was successful. In these circumstances pagerLockDb() and +// pagerUnlockDb() take a conservative approach - eLock is always updated +// when unlocking the file, and only updated when locking the file if the +// VFS call is successful. This way, the Pager.eLock variable may be set +// to a less exclusive (lower) value than the lock that is actually held +// at the system level, but it is never set to a more exclusive value. +// +// This is usually safe. If an xUnlock fails or appears to fail, there may +// be a few redundant xLock() calls or a lock may be held for longer than +// required, but nothing really goes wrong. +// +// The exception is when the database file is unlocked as the pager moves +// from ERROR to OPEN state. At this point there may be a hot-journal file +// in the file-system that needs to be rolled back (as part of an OPEN->SHARED +// transition, by the same pager or any other). If the call to xUnlock() +// fails at this point and the pager is left holding an EXCLUSIVE lock, this +// can confuse the call to xCheckReservedLock() call made later as part +// of hot-journal detection. +// +// xCheckReservedLock() is defined as returning true "if there is a RESERVED +// lock held by this process or any others". So xCheckReservedLock may +// return true because the caller itself is holding an EXCLUSIVE lock (but +// doesn't know it because of a previous error in xUnlock). If this happens +// a hot-journal may be mistaken for a journal being created by an active +// transaction in another process, causing SQLite to read from the database +// without rolling it back. +// +// To work around this, if a call to xUnlock() fails when unlocking the +// database in the ERROR state, Pager.eLock is set to UNKNOWN_LOCK. It +// is only changed back to a real locking state after a successful call +// to xLock(EXCLUSIVE). Also, the code to do the OPEN->SHARED state transition +// omits the check for a hot-journal if Pager.eLock is set to UNKNOWN_LOCK +// lock. Instead, it assumes a hot-journal exists and obtains an EXCLUSIVE +// lock on the database file before attempting to roll it back. See function +// PagerSharedLock() for more detail. +// +// Pager.eLock may only be set to UNKNOWN_LOCK when the pager is in +// PAGER_OPEN state. + +// The maximum allowed sector size. 64KiB. If the xSectorsize() method +// returns a value larger than this, then MAX_SECTOR_SIZE is used instead. +// This could conceivably cause corruption following a power failure on +// such a system. This is currently an undocumented limit. + +// An instance of the following structure is allocated for each active +// savepoint and statement transaction in the system. All such structures +// are stored in the Pager.aSavepoint[] array, which is allocated and +// resized using sqlite3Realloc(). +// +// When a savepoint is created, the PagerSavepoint.iHdrOffset field is +// set to 0. If a journal-header is written into the main journal while +// the savepoint is active, then iHdrOffset is set to the byte offset +// immediately following the last journal record written into the main +// journal before the journal-header. This is required during savepoint +// rollback (see pagerPlaybackSavepoint()). +type PagerSavepoint1 = struct { + FiOffset I64 + FiHdrOffset I64 + FpInSavepoint uintptr + FnOrig Pgno + FiSubRec Pgno + FbTruncateOnRelease int32 + FaWalData [4]U32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:578:9 */ + +//************* End of wal.h ************************************************ +//************* Continuing where we left off in pager.c ********************* + +// ****************** NOTES ON THE DESIGN OF THE PAGER ************************ +// +// +// This comment block describes invariants that hold when using a rollback +// journal. These invariants do not apply for journal_mode=WAL, +// journal_mode=MEMORY, or journal_mode=OFF. +// +// Within this comment block, a page is deemed to have been synced +// automatically as soon as it is written when PRAGMA synchronous=OFF. +// Otherwise, the page is not synced until the xSync method of the VFS +// is called successfully on the file containing the page. +// +// Definition: A page of the database file is said to be "overwriteable" if +// one or more of the following are true about the page: +// +// (a) The original content of the page as it was at the beginning of +// the transaction has been written into the rollback journal and +// synced. +// +// (b) The page was a freelist leaf page at the start of the transaction. +// +// (c) The page number is greater than the largest page that existed in +// the database file at the start of the transaction. +// +// (1) A page of the database file is never overwritten unless one of the +// following are true: +// +// (a) The page and all other pages on the same sector are overwriteable. +// +// (b) The atomic page write optimization is enabled, and the entire +// transaction other than the update of the transaction sequence +// number consists of a single page change. +// +// (2) The content of a page written into the rollback journal exactly matches +// both the content in the database when the rollback journal was written +// and the content in the database at the beginning of the current +// transaction. +// +// (3) Writes to the database file are an integer multiple of the page size +// in length and are aligned on a page boundary. +// +// (4) Reads from the database file are either aligned on a page boundary and +// an integer multiple of the page size in length or are taken from the +// first 100 bytes of the database file. +// +// (5) All writes to the database file are synced prior to the rollback journal +// being deleted, truncated, or zeroed. +// +// (6) If a super-journal file is used, then all writes to the database file +// are synced prior to the super-journal being deleted. +// +// Definition: Two databases (or the same database at two points it time) +// are said to be "logically equivalent" if they give the same answer to +// all queries. Note in particular the content of freelist leaf +// pages can be changed arbitrarily without affecting the logical equivalence +// of the database. +// +// (7) At any time, if any subset, including the empty set and the total set, +// of the unsynced changes to a rollback journal are removed and the +// journal is rolled back, the resulting database file will be logically +// equivalent to the database file at the beginning of the transaction. +// +// (8) When a transaction is rolled back, the xTruncate method of the VFS +// is called to restore the database file to the same size it was at +// the beginning of the transaction. (In some VFSes, the xTruncate +// method is a no-op, but that does not change the fact the SQLite will +// invoke it.) +// +// (9) Whenever the database file is modified, at least one bit in the range +// of bytes from 24 through 39 inclusive will be changed prior to releasing +// the EXCLUSIVE lock, thus signaling other connections on the same +// database to flush their caches. +// +// (10) The pattern of bits in bytes 24 through 39 shall not repeat in less +// than one billion transactions. +// +// (11) A database file is well-formed at the beginning and at the conclusion +// of every transaction. +// +// (12) An EXCLUSIVE lock is held on the database file when writing to +// the database file. +// +// (13) A SHARED lock is held on the database file while reading any +// content out of the database file. +// +// + +// Macros for troubleshooting. Normally turned off + +// The following two macros are used within the PAGERTRACE() macros above +// to print out file-descriptors. +// +// PAGERID() takes a pointer to a Pager struct as its argument. The +// associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file +// struct as its argument. + +// The Pager.eState variable stores the current 'state' of a pager. A +// pager may be in any one of the seven states shown in the following +// state diagram. +// +// OPEN <------+------+ +// | | | +// V | | +// +---------> READER-------+ | +// | | | +// | V | +// |<-------WRITER_LOCKED------> ERROR +// | | ^ +// | V | +// |<------WRITER_CACHEMOD-------->| +// | | | +// | V | +// |<-------WRITER_DBMOD---------->| +// | | | +// | V | +// +<------WRITER_FINISHED-------->+ +// +// +// List of state transitions and the C [function] that performs each: +// +// OPEN -> READER [sqlite3PagerSharedLock] +// READER -> OPEN [pager_unlock] +// +// READER -> WRITER_LOCKED [sqlite3PagerBegin] +// WRITER_LOCKED -> WRITER_CACHEMOD [pager_open_journal] +// WRITER_CACHEMOD -> WRITER_DBMOD [syncJournal] +// WRITER_DBMOD -> WRITER_FINISHED [sqlite3PagerCommitPhaseOne] +// WRITER_*** -> READER [pager_end_transaction] +// +// WRITER_*** -> ERROR [pager_error] +// ERROR -> OPEN [pager_unlock] +// +// +// OPEN: +// +// The pager starts up in this state. Nothing is guaranteed in this +// state - the file may or may not be locked and the database size is +// unknown. The database may not be read or written. +// +// * No read or write transaction is active. +// * Any lock, or no lock at all, may be held on the database file. +// * The dbSize, dbOrigSize and dbFileSize variables may not be trusted. +// +// READER: +// +// In this state all the requirements for reading the database in +// rollback (non-WAL) mode are met. Unless the pager is (or recently +// was) in exclusive-locking mode, a user-level read transaction is +// open. The database size is known in this state. +// +// A connection running with locking_mode=normal enters this state when +// it opens a read-transaction on the database and returns to state +// OPEN after the read-transaction is completed. However a connection +// running in locking_mode=exclusive (including temp databases) remains in +// this state even after the read-transaction is closed. The only way +// a locking_mode=exclusive connection can transition from READER to OPEN +// is via the ERROR state (see below). +// +// * A read transaction may be active (but a write-transaction cannot). +// * A SHARED or greater lock is held on the database file. +// * The dbSize variable may be trusted (even if a user-level read +// transaction is not active). The dbOrigSize and dbFileSize variables +// may not be trusted at this point. +// * If the database is a WAL database, then the WAL connection is open. +// * Even if a read-transaction is not open, it is guaranteed that +// there is no hot-journal in the file-system. +// +// WRITER_LOCKED: +// +// The pager moves to this state from READER when a write-transaction +// is first opened on the database. In WRITER_LOCKED state, all locks +// required to start a write-transaction are held, but no actual +// modifications to the cache or database have taken place. +// +// In rollback mode, a RESERVED or (if the transaction was opened with +// BEGIN EXCLUSIVE) EXCLUSIVE lock is obtained on the database file when +// moving to this state, but the journal file is not written to or opened +// to in this state. If the transaction is committed or rolled back while +// in WRITER_LOCKED state, all that is required is to unlock the database +// file. +// +// IN WAL mode, WalBeginWriteTransaction() is called to lock the log file. +// If the connection is running with locking_mode=exclusive, an attempt +// is made to obtain an EXCLUSIVE lock on the database file. +// +// * A write transaction is active. +// * If the connection is open in rollback-mode, a RESERVED or greater +// lock is held on the database file. +// * If the connection is open in WAL-mode, a WAL write transaction +// is open (i.e. sqlite3WalBeginWriteTransaction() has been successfully +// called). +// * The dbSize, dbOrigSize and dbFileSize variables are all valid. +// * The contents of the pager cache have not been modified. +// * The journal file may or may not be open. +// * Nothing (not even the first header) has been written to the journal. +// +// WRITER_CACHEMOD: +// +// A pager moves from WRITER_LOCKED state to this state when a page is +// first modified by the upper layer. In rollback mode the journal file +// is opened (if it is not already open) and a header written to the +// start of it. The database file on disk has not been modified. +// +// * A write transaction is active. +// * A RESERVED or greater lock is held on the database file. +// * The journal file is open and the first header has been written +// to it, but the header has not been synced to disk. +// * The contents of the page cache have been modified. +// +// WRITER_DBMOD: +// +// The pager transitions from WRITER_CACHEMOD into WRITER_DBMOD state +// when it modifies the contents of the database file. WAL connections +// never enter this state (since they do not modify the database file, +// just the log file). +// +// * A write transaction is active. +// * An EXCLUSIVE or greater lock is held on the database file. +// * The journal file is open and the first header has been written +// and synced to disk. +// * The contents of the page cache have been modified (and possibly +// written to disk). +// +// WRITER_FINISHED: +// +// It is not possible for a WAL connection to enter this state. +// +// A rollback-mode pager changes to WRITER_FINISHED state from WRITER_DBMOD +// state after the entire transaction has been successfully written into the +// database file. In this state the transaction may be committed simply +// by finalizing the journal file. Once in WRITER_FINISHED state, it is +// not possible to modify the database further. At this point, the upper +// layer must either commit or rollback the transaction. +// +// * A write transaction is active. +// * An EXCLUSIVE or greater lock is held on the database file. +// * All writing and syncing of journal and database data has finished. +// If no error occurred, all that remains is to finalize the journal to +// commit the transaction. If an error did occur, the caller will need +// to rollback the transaction. +// +// ERROR: +// +// The ERROR state is entered when an IO or disk-full error (including +// SQLITE_IOERR_NOMEM) occurs at a point in the code that makes it +// difficult to be sure that the in-memory pager state (cache contents, +// db size etc.) are consistent with the contents of the file-system. +// +// Temporary pager files may enter the ERROR state, but in-memory pagers +// cannot. +// +// For example, if an IO error occurs while performing a rollback, +// the contents of the page-cache may be left in an inconsistent state. +// At this point it would be dangerous to change back to READER state +// (as usually happens after a rollback). Any subsequent readers might +// report database corruption (due to the inconsistent cache), and if +// they upgrade to writers, they may inadvertently corrupt the database +// file. To avoid this hazard, the pager switches into the ERROR state +// instead of READER following such an error. +// +// Once it has entered the ERROR state, any attempt to use the pager +// to read or write data returns an error. Eventually, once all +// outstanding transactions have been abandoned, the pager is able to +// transition back to OPEN state, discarding the contents of the +// page-cache and any other in-memory state at the same time. Everything +// is reloaded from disk (and, if necessary, hot-journal rollback peformed) +// when a read-transaction is next opened on the pager (transitioning +// the pager into READER state). At that point the system has recovered +// from the error. +// +// Specifically, the pager jumps into the ERROR state if: +// +// 1. An error occurs while attempting a rollback. This happens in +// function sqlite3PagerRollback(). +// +// 2. An error occurs while attempting to finalize a journal file +// following a commit in function sqlite3PagerCommitPhaseTwo(). +// +// 3. An error occurs while attempting to write to the journal or +// database file in function pagerStress() in order to free up +// memory. +// +// In other cases, the error is returned to the b-tree layer. The b-tree +// layer then attempts a rollback operation. If the error condition +// persists, the pager enters the ERROR state via condition (1) above. +// +// Condition (3) is necessary because it can be triggered by a read-only +// statement executed within a transaction. In this case, if the error +// code were simply returned to the user, the b-tree layer would not +// automatically attempt a rollback, as it assumes that an error in a +// read-only statement cannot leave the pager in an internally inconsistent +// state. +// +// * The Pager.errCode variable is set to something other than SQLITE_OK. +// * There are one or more outstanding references to pages (after the +// last reference is dropped the pager should move back to OPEN state). +// * The pager is not an in-memory pager. +// +// +// Notes: +// +// * A pager is never in WRITER_DBMOD or WRITER_FINISHED state if the +// connection is open in WAL mode. A WAL connection is always in one +// of the first four states. +// +// * Normally, a connection open in exclusive mode is never in PAGER_OPEN +// state. There are two exceptions: immediately after exclusive-mode has +// been turned on (and before any read or write transactions are +// executed), and when the pager is leaving the "error state". +// +// * See also: assert_pager_state(). + +// The Pager.eLock variable is almost always set to one of the +// following locking-states, according to the lock currently held on +// the database file: NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK. +// This variable is kept up to date as locks are taken and released by +// the pagerLockDb() and pagerUnlockDb() wrappers. +// +// If the VFS xLock() or xUnlock() returns an error other than SQLITE_BUSY +// (i.e. one of the SQLITE_IOERR subtypes), it is not clear whether or not +// the operation was successful. In these circumstances pagerLockDb() and +// pagerUnlockDb() take a conservative approach - eLock is always updated +// when unlocking the file, and only updated when locking the file if the +// VFS call is successful. This way, the Pager.eLock variable may be set +// to a less exclusive (lower) value than the lock that is actually held +// at the system level, but it is never set to a more exclusive value. +// +// This is usually safe. If an xUnlock fails or appears to fail, there may +// be a few redundant xLock() calls or a lock may be held for longer than +// required, but nothing really goes wrong. +// +// The exception is when the database file is unlocked as the pager moves +// from ERROR to OPEN state. At this point there may be a hot-journal file +// in the file-system that needs to be rolled back (as part of an OPEN->SHARED +// transition, by the same pager or any other). If the call to xUnlock() +// fails at this point and the pager is left holding an EXCLUSIVE lock, this +// can confuse the call to xCheckReservedLock() call made later as part +// of hot-journal detection. +// +// xCheckReservedLock() is defined as returning true "if there is a RESERVED +// lock held by this process or any others". So xCheckReservedLock may +// return true because the caller itself is holding an EXCLUSIVE lock (but +// doesn't know it because of a previous error in xUnlock). If this happens +// a hot-journal may be mistaken for a journal being created by an active +// transaction in another process, causing SQLite to read from the database +// without rolling it back. +// +// To work around this, if a call to xUnlock() fails when unlocking the +// database in the ERROR state, Pager.eLock is set to UNKNOWN_LOCK. It +// is only changed back to a real locking state after a successful call +// to xLock(EXCLUSIVE). Also, the code to do the OPEN->SHARED state transition +// omits the check for a hot-journal if Pager.eLock is set to UNKNOWN_LOCK +// lock. Instead, it assumes a hot-journal exists and obtains an EXCLUSIVE +// lock on the database file before attempting to roll it back. See function +// PagerSharedLock() for more detail. +// +// Pager.eLock may only be set to UNKNOWN_LOCK when the pager is in +// PAGER_OPEN state. + +// The maximum allowed sector size. 64KiB. If the xSectorsize() method +// returns a value larger than this, then MAX_SECTOR_SIZE is used instead. +// This could conceivably cause corruption following a power failure on +// such a system. This is currently an undocumented limit. + +// An instance of the following structure is allocated for each active +// savepoint and statement transaction in the system. All such structures +// are stored in the Pager.aSavepoint[] array, which is allocated and +// resized using sqlite3Realloc(). +// +// When a savepoint is created, the PagerSavepoint.iHdrOffset field is +// set to 0. If a journal-header is written into the main journal while +// the savepoint is active, then iHdrOffset is set to the byte offset +// immediately following the last journal record written into the main +// journal before the journal-header. This is required during savepoint +// rollback (see pagerPlaybackSavepoint()). +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ + +// Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains +// the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS +// or CACHE_WRITE to sqlite3_db_status(). + +// The following global variables hold counters used for +// testing purposes only. These variables do not exist in +// a non-testing build. These variables are not thread-safe. + +// Journal files begin with the following magic string. The data +// was obtained from /dev/random. It is used only as a sanity check. +// +// Since version 2.8.0, the journal format contains additional sanity +// checking information. If the power fails while the journal is being +// written, semi-random garbage data might appear in the journal +// file after power is restored. If an attempt is then made +// to roll the journal back, the database could be corrupted. The additional +// sanity checking data is an attempt to discover the garbage in the +// journal and ignore it. +// +// The sanity checking information for the new journal format consists +// of a 32-bit checksum on each page of data. The checksum covers both +// the page number and the pPager->pageSize bytes of data for the page. +// This cksum is initialized to a 32-bit random value that appears in the +// journal file right after the header. The random initializer is important, +// because garbage data that appears at the end of a journal is likely +// data that was once in other files that have now been deleted. If the +// garbage data came from an obsolete journal file, the checksums might +// be correct. But by initializing the checksum to random value which +// is different for every journal, we minimize that risk. +var aJournalMagic = [8]uint8{ + uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), +} /* sqlite3.c:53958:28 */ + +// Set the Pager.xGet method for the appropriate routine used to fetch +// content from the pager. +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ + if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { + (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 + }{getPageError})) + } else if (*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0 { + (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 + }{getPageMMap})) + } else { + (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 + }{getPageNormal})) + } +} + +// Return true if it is necessary to write page *pPg into the sub-journal. +// A page needs to be written into the sub-journal if there exists one +// or more open savepoints for which: +// +// * The page-number is less than or equal to PagerSavepoint.nOrig, and +// * The bit corresponding to the page-number is not set in +// PagerSavepoint.pInSavepoint. +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager + var p uintptr + var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno + var i int32 + for i = 0; i < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; i++ { + p = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(i)*56 + if (*PagerSavepoint)(unsafe.Pointer(p)).FnOrig >= pgno && 0 == Xsqlite3BitvecTestNotNull(tls, (*PagerSavepoint)(unsafe.Pointer(p)).FpInSavepoint, pgno) { + for i = i + 1; i < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; i++ { + (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(i)*56)).FbTruncateOnRelease = 0 + } + return 1 + } + } + return 0 +} + +// Read a 32-bit integer from the given file descriptor. Store the integer +// that is read in *pRes. Return SQLITE_OK if everything worked, or an +// error code is something goes wrong. +// +// All values are stored on disk as big-endian. +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var ac [4]uint8 at bp, 4 + + var rc int32 = Xsqlite3OsRead(tls, fd, bp, int32(unsafe.Sizeof([4]uint8{})), offset) + if rc == SQLITE_OK { + *(*U32)(unsafe.Pointer(pRes)) = Xsqlite3Get4byte(tls, bp) + } + return rc +} + +// Write a 32-bit integer into a string buffer in big-endian byte order. + +// Write a 32-bit integer into the given file descriptor. Return SQLITE_OK +// on success or an error code is something goes wrong. +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var ac [4]uint8 at bp, 4 + + Xsqlite3Put4byte(tls, bp, val) + return Xsqlite3OsWrite(tls, fd, bp, 4, offset) +} + +// Unlock the database file to level eLock, which must be either NO_LOCK +// or SHARED_LOCK. Regardless of whether or not the call to xUnlock() +// succeeds, set the Pager.eLock variable to match the (attempted) new lock. +// +// Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is +// called, do not modify it. See the comment above the #define of +// UNKNOWN_LOCK for an explanation of this. +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ + var rc int32 = SQLITE_OK + + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { + + if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { + rc = SQLITE_OK + } else { + rc = Xsqlite3OsUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, eLock) + } + if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) != EXCLUSIVE_LOCK+1 { + (*Pager)(unsafe.Pointer(pPager)).FeLock = U8(eLock) + } + + } + (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile // ticket fb3b3024ea238d5c + return rc +} + +// Lock the database file to level eLock, which must be either SHARED_LOCK, +// RESERVED_LOCK or EXCLUSIVE_LOCK. If the caller is successful, set the +// Pager.eLock variable to the new locking state. +// +// Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is +// called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. +// See the comment above the #define of UNKNOWN_LOCK for an explanation +// of this. +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ + var rc int32 = SQLITE_OK + + if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { + if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { + rc = SQLITE_OK + } else { + rc = Xsqlite3OsLock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, eLock) + } + if rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeLock) != EXCLUSIVE_LOCK+1 || eLock == EXCLUSIVE_LOCK) { + (*Pager)(unsafe.Pointer(pPager)).FeLock = U8(eLock) + + } + } + return rc +} + +// This function determines whether or not the atomic-write or +// atomic-batch-write optimizations can be used with this pager. The +// atomic-write optimization can be used if: +// +// (a) the value returned by OsDeviceCharacteristics() indicates that +// a database page may be written atomically, and +// (b) the value returned by OsSectorSize() is less than or equal +// to the page size. +// +// If it can be used, then the value returned is the size of the journal +// file when it contains rollback data for exactly one page. +// +// The atomic-batch-write optimization can be used if OsDeviceCharacteristics() +// returns a value with the SQLITE_IOCAP_BATCH_ATOMIC bit set. -1 is +// returned in this case. +// +// If neither optimization can be used, 0 is returned. +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ + + _ = pPager + + return 0 +} + +// If SQLITE_CHECK_PAGES is defined then we do some sanity checking +// on the cache using a hash function. This is used for testing +// and debugging only. + +// When this is called the journal file for pager pPager must be open. +// This function attempts to read a super-journal file name from the +// end of the file and, if successful, copies it into memory supplied +// by the caller. See comments above writeSuperJournal() for the format +// used to store a super-journal file name at the end of a journal file. +// +// zSuper must point to a buffer of at least nSuper bytes allocated by +// the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is +// enough space to write the super-journal name). If the super-journal +// name in the journal is longer than nSuper bytes (including a +// nul-terminator), then this is handled as if no super-journal name +// were present in the journal. +// +// If a super-journal file name is present at the end of the journal +// file, then it is copied into the buffer pointed to by zSuper. A +// nul-terminator byte is appended to the buffer following the +// super-journal file name. +// +// If it is determined that no super-journal file name is present +// zSuper[0] is set to 0 and SQLITE_OK returned. +// +// If an error occurs while reading from the journal file, an SQLite +// error code is returned. +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 // Return code + // var len U32 at bp+8, 4 + // Length in bytes of super-journal name + // var szJ I64 at bp, 8 + // Total size in bytes of journal file pJrnl + // var cksum U32 at bp+12, 4 + // MJ checksum value read from journal + var u U32 // Unsigned loop counter + // var aMagic [8]uint8 at bp+16, 8 + // A buffer to hold the magic header + *(*uint8)(unsafe.Pointer(zSuper)) = uint8(0) + + if SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsFileSize(tls, pJrnl, bp)) || + *(*I64)(unsafe.Pointer(bp)) < int64(16) || + SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, pJrnl, *(*I64)(unsafe.Pointer(bp))-int64(16), bp+8)) || + *(*U32)(unsafe.Pointer(bp + 8)) >= nSuper || + I64(*(*U32)(unsafe.Pointer(bp + 8))) > *(*I64)(unsafe.Pointer(bp))-int64(16) || + *(*U32)(unsafe.Pointer(bp + 8)) == U32(0) || + SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, pJrnl, *(*I64)(unsafe.Pointer(bp))-int64(12), bp+12)) || + SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsRead(tls, pJrnl, bp+16, 8, *(*I64)(unsafe.Pointer(bp))-int64(8))) || + libc.Xmemcmp(tls, bp+16, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(8)) != 0 || + SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsRead(tls, pJrnl, zSuper, int32(*(*U32)(unsafe.Pointer(bp + 8))), *(*I64)(unsafe.Pointer(bp))-int64(16)-I64(*(*U32)(unsafe.Pointer(bp + 8))))) { + return rc + } + + // See if the checksum matches the super-journal name + for u = U32(0); u < *(*U32)(unsafe.Pointer(bp + 8 /* len */)); u++ { + *(*U32)(unsafe.Pointer(bp + 12 /* cksum */)) -= U32(*(*uint8)(unsafe.Pointer(zSuper + uintptr(u)))) + } + if *(*U32)(unsafe.Pointer(bp + 12)) != 0 { + // If the checksum doesn't add up, then one or more of the disk sectors + // containing the super-journal filename is corrupted. This means + // definitely roll back, so just return SQLITE_OK and report a (nul) + // super-journal filename. + *(*U32)(unsafe.Pointer(bp + 8 /* len */)) = U32(0) + } + *(*uint8)(unsafe.Pointer(zSuper + uintptr(*(*U32)(unsafe.Pointer(bp + 8 /* len */))))) = uint8(0) + *(*uint8)(unsafe.Pointer(zSuper + uintptr(*(*U32)(unsafe.Pointer(bp + 8))+U32(1)))) = uint8(0) + + return SQLITE_OK +} + +// Return the offset of the sector boundary at or immediately +// following the value in pPager->journalOff, assuming a sector +// size of pPager->sectorSize bytes. +// +// i.e for a sector size of 512: +// +// Pager.journalOff Return value +// --------------------------------------- +// 0 0 +// 512 512 +// 100 512 +// 2000 2048 +// +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ + var offset I64 = int64(0) + var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + if c != 0 { + offset = ((c-int64(1))/I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) + int64(1)) * I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) + } + + return offset +} + +// The journal file must be open when this function is called. +// +// This function is a no-op if the journal file has not been written to +// within the current transaction (i.e. if Pager.journalOff==0). +// +// If doTruncate is non-zero or the Pager.journalSizeLimit variable is +// set to 0, then truncate the journal file to zero bytes in size. Otherwise, +// zero the 28-byte header at the start of the journal file. In either case, +// if the pager is not in no-sync mode, sync the journal file immediately +// after writing or truncating it. +// +// If Pager.journalSizeLimit is set to a positive, non-zero value, and +// following the truncation or zeroing described above the size of the +// journal file in bytes is larger than this value, then truncate the +// journal file to Pager.journalSizeLimit bytes. The journal file does +// not need to be synced following this operation. +// +// If an IO error occurs, abandon processing and return the IO error code. +// Otherwise, return SQLITE_OK. +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK // Return code + + if (*Pager)(unsafe.Pointer(pPager)).FjournalOff != 0 { + var iLimit I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit // Local cache of jsl + + if doTruncate != 0 || iLimit == int64(0) { + rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int64(0)) + } else { + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, uintptr(unsafe.Pointer(&zeroHdr)), int32(unsafe.Sizeof(zeroHdr)), int64(0)) + } + if rc == SQLITE_OK && !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { + rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_DATAONLY|int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) + } + + // At this point the transaction is committed but the write lock + // is still held on the file. If there is a size limit configured for + // the persistent journal and the journal file currently consumes more + // space than that limit allows for, truncate it now. There is no need + // to sync the file following this operation. + if rc == SQLITE_OK && iLimit > int64(0) { + // var sz I64 at bp, 8 + + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp) + if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) > iLimit { + rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iLimit) + } + } + } + return rc +} + +var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54605:25 */ + +// The journal file must be open when this routine is called. A journal +// header (JOURNAL_HDR_SZ bytes) is written into the journal file at the +// current location. +// +// The format for the journal header is as follows: +// - 8 bytes: Magic identifying journal format. +// - 4 bytes: Number of records in journal, or -1 no-sync mode is on. +// - 4 bytes: Random number used for page hash. +// - 4 bytes: Initial database page count. +// - 4 bytes: Sector size used by the process that wrote this journal. +// - 4 bytes: Database page size. +// +// Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ + var rc int32 = SQLITE_OK // Return code + var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header + var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader + var nWrite U32 // Bytes of header sector written + var ii int32 // Loop counter + + // Journal file must be open. + + if nHeader > (*Pager)(unsafe.Pointer(pPager)).FsectorSize { + nHeader = (*Pager)(unsafe.Pointer(pPager)).FsectorSize + } + + // If there are active savepoints and any of them were created + // since the most recent journal header was written, update the + // PagerSavepoint.iHdrOffset fields now. + for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { + if (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FiHdrOffset == int64(0) { + (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(ii)*56)).FiHdrOffset = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + } + } + + (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = libc.AssignPtrInt64(pPager+96, journalHdrOffset(tls, pPager)) + + // Write the nRec Field - the number of page records that follow this + // journal header. Normally, zero is written to this value at this time. + // After the records are added to the journal (and the journal synced, + // if in full-sync mode), the zero is overwritten with the true number + // of records (see syncJournal()). + // + // A faster alternative is to write 0xFFFFFFFF to the nRec field. When + // reading the journal this value tells SQLite to assume that the + // rest of the journal file contains valid page records. This assumption + // is dangerous, as if a failure occurred whilst writing to the journal + // file it may contain some garbage data. There are two scenarios + // where this risk can be ignored: + // + // * When the pager is in no-sync mode. Corruption can follow a + // power failure in this case anyway. + // + // * When the SQLITE_IOCAP_SAFE_APPEND flag is set. This guarantees + // that garbage data is never appended to the journal file. + + if (*Pager)(unsafe.Pointer(pPager)).FnoSync != 0 || int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY || + Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_SAFE_APPEND != 0 { + libc.Xmemcpy(tls, zHeader, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(unsafe.Sizeof(aJournalMagic))) + Xsqlite3Put4byte(tls, zHeader+8, 0xffffffff) + } else { + libc.Xmemset(tls, zHeader, 0, uint64(unsafe.Sizeof(aJournalMagic))+uint64(4)) + } + + // The random check-hash initializer + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), pPager+56) + Xsqlite3Put4byte(tls, zHeader+12, (*Pager)(unsafe.Pointer(pPager)).FcksumInit) + // The initial database size + Xsqlite3Put4byte(tls, zHeader+16, (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize) + // The assumed sector size for this process + Xsqlite3Put4byte(tls, zHeader+20, (*Pager)(unsafe.Pointer(pPager)).FsectorSize) + + // The page size + Xsqlite3Put4byte(tls, zHeader+24, uint32((*Pager)(unsafe.Pointer(pPager)).FpageSize)) + + // Initializing the tail of the buffer is not necessary. Everything + // works find if the following memset() is omitted. But initializing + // the memory prevents valgrind from complaining, so we are willing to + // take the performance hit. + libc.Xmemset(tls, zHeader+28, 0, + uint64(nHeader)-(uint64(unsafe.Sizeof(aJournalMagic))+uint64(20))) + + // In theory, it is only necessary to write the 28 bytes that the + // journal header consumes to the journal file here. Then increment the + // Pager.journalOff variable by JOURNAL_HDR_SZ so that the next + // record is written to the following sector (leaving a gap in the file + // that will be implicitly filled in by the OS). + // + // However it has been discovered that on some systems this pattern can + // be significantly slower than contiguously writing data to the file, + // even if that means explicitly writing data to the block of + // (JOURNAL_HDR_SZ - 28) bytes that will not be used. So that is what + // is done. + // + // The loop is required here in case the sector-size is larger than the + // database page size. Since the zHeader buffer is only Pager.pageSize + // bytes in size, more than one call to sqlite3OsWrite() may be required + // to populate the entire journal header sector. + for nWrite = U32(0); rc == SQLITE_OK && nWrite < (*Pager)(unsafe.Pointer(pPager)).FsectorSize; nWrite = nWrite + nHeader { + + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zHeader, int32(nHeader), (*Pager)(unsafe.Pointer(pPager)).FjournalOff) + + *(*I64)(unsafe.Pointer(pPager + 96)) += I64(nHeader) + } + + return rc +} + +// The journal file must be open when this is called. A journal header file +// (JOURNAL_HDR_SZ bytes) is read from the current location in the journal +// file. The current location in the journal file is given by +// pPager->journalOff. See comments above function writeJournalHdr() for +// a description of the journal header format. +// +// If the header is read successfully, *pNRec is set to the number of +// page records following this header and *pDbSize is set to the size of the +// database before the transaction began, in pages. Also, pPager->cksumInit +// is set to the value read from the journal header. SQLITE_OK is returned +// in this case. +// +// If the journal header file appears to be corrupted, SQLITE_DONE is +// returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes +// cannot be read from the journal file an error code is returned. +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 // Return code + // var aMagic [8]uint8 at bp, 8 + // A buffer to hold the magic header + var iHdrOff I64 // Offset of journal header being read + + // Journal file must be open. + + // Advance Pager.journalOff to the start of the next sector. If the + // journal file is too small for there to be a header stored at this + // point, return SQLITE_DONE. + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = journalHdrOffset(tls, pPager) + if (*Pager)(unsafe.Pointer(pPager)).FjournalOff+I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) > journalSize { + return SQLITE_DONE + } + iHdrOff = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + + // Read in the first 8 bytes of the journal header. If they do not match + // the magic string found at the start of each journal header, return + // SQLITE_DONE. If an IO error occurs, return an error code. Otherwise, + // proceed. + if isHot != 0 || iHdrOff != (*Pager)(unsafe.Pointer(pPager)).FjournalHdr { + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp, int32(unsafe.Sizeof([8]uint8{})), iHdrOff) + if rc != 0 { + return rc + } + if libc.Xmemcmp(tls, bp, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(unsafe.Sizeof([8]uint8{}))) != 0 { + return SQLITE_DONE + } + } + + // Read the first three 32-bit fields of the journal header: The nRec + // field, the checksum-initializer and the database size at the start + // of the transaction. Return an error code if anything goes wrong. + if SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(8), pNRec)) || + SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(12), pPager+56)) || + SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(16), pDbSize)) { + return rc + } + + if (*Pager)(unsafe.Pointer(pPager)).FjournalOff == int64(0) { + // var iPageSize U32 at bp+12, 4 + // Page-size field of journal header + // var iSectorSize U32 at bp+8, 4 + // Sector-size field of journal header + + // Read the page-size and sector-size journal header fields. + if SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(20), bp+8)) || + SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(24), bp+12)) { + return rc + } + + // Versions of SQLite prior to 3.5.8 set the page-size field of the + // journal header to zero. In this case, assume that the Pager.pageSize + // variable is already set to the correct page size. + if *(*U32)(unsafe.Pointer(bp + 12)) == U32(0) { + *(*U32)(unsafe.Pointer(bp + 12 /* iPageSize */)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) + } + + // Check that the values read from the page-size and sector-size fields + // are within range. To be 'in range', both values need to be a power + // of two greater than or equal to 512 or 32, and not greater than their + // respective compile time maximum limits. + if *(*U32)(unsafe.Pointer(bp + 12)) < U32(512) || *(*U32)(unsafe.Pointer(bp + 8)) < U32(32) || + *(*U32)(unsafe.Pointer(bp + 12)) > U32(SQLITE_MAX_PAGE_SIZE) || *(*U32)(unsafe.Pointer(bp + 8)) > U32(MAX_SECTOR_SIZE) || + (*(*U32)(unsafe.Pointer(bp + 12))-U32(1))&*(*U32)(unsafe.Pointer(bp + 12)) != U32(0) || (*(*U32)(unsafe.Pointer(bp + 8))-U32(1))&*(*U32)(unsafe.Pointer(bp + 8)) != U32(0) { + // If the either the page-size or sector-size in the journal-header is + // invalid, then the process that wrote the journal-header must have + // crashed before the header was synced. In this case stop reading + // the journal file here. + return SQLITE_DONE + } + + // Update the page-size to match the value read from the journal. + // Use a testcase() macro to make sure that malloc failure within + // PagerSetPagesize() is tested. + rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+12, -1) + + // Update the assumed sector-size to match the value used by + // the process that created this journal. If this journal was + // created by a process other than this one, then this routine + // is being called from within pager_playback(). The local value + // of Pager.sectorSize is restored at the end of that routine. + (*Pager)(unsafe.Pointer(pPager)).FsectorSize = *(*U32)(unsafe.Pointer(bp + 8 /* iSectorSize */)) + } + + *(*I64)(unsafe.Pointer(pPager + 96)) += I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) + return rc +} + +// Write the supplied super-journal name into the journal file for pager +// pPager at the current location. The super-journal name must be the last +// thing written to a journal file. If the pager is in full-sync mode, the +// journal file descriptor is advanced to the next sector boundary before +// anything is written. The format is: +// +// + 4 bytes: PAGER_MJ_PGNO. +// + N bytes: super-journal filename in utf-8. +// + 4 bytes: N (length of super-journal name in bytes, no nul-terminator). +// + 4 bytes: super-journal name checksum. +// + 8 bytes: aJournalMagic[]. +// +// The super-journal page checksum is the sum of the bytes in thesuper-journal +// name, where each byte is interpreted as a signed 8-bit integer. +// +// If zSuper is a NULL pointer (occurs for a single database transaction), +// this call is a no-op. +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 // Return code + var nSuper int32 // Length of string zSuper + var iHdrOff I64 // Offset of header in journal file + // var jrnlSize I64 at bp, 8 + // Size of journal file on disk + var cksum U32 = U32(0) // Checksum of string zSuper + + if !(zSuper != 0) || + int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY || + !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) { + return SQLITE_OK + } + (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(1) + + // Calculate the length in bytes and the checksum of zSuper + for nSuper = 0; *(*uint8)(unsafe.Pointer(zSuper + uintptr(nSuper))) != 0; nSuper++ { + cksum = cksum + U32(*(*uint8)(unsafe.Pointer(zSuper + uintptr(nSuper)))) + } + + // If in full-sync mode, advance to the next disk sector before writing + // the super-journal name. This is in case the previous page written to + // the journal has already been synced. + if (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 { + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = journalHdrOffset(tls, pPager) + } + iHdrOff = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + + // Write the super-journal data to the end of the journal file. If + // an error occurs, return the error code to the caller. + if 0 != libc.AssignInt32(&rc, write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff, Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)))) || + 0 != libc.AssignInt32(&rc, Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, nSuper, iHdrOff+int64(4))) || + 0 != libc.AssignInt32(&rc, write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(4)+I64(nSuper), uint32(nSuper))) || + 0 != libc.AssignInt32(&rc, write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(4)+I64(nSuper)+int64(4), cksum)) || + 0 != libc.AssignInt32(&rc, Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, uintptr(unsafe.Pointer(&aJournalMagic)), 8, + iHdrOff+int64(4)+I64(nSuper)+int64(8))) { + return rc + } + *(*I64)(unsafe.Pointer(pPager + 96)) += I64(nSuper + 20) + + // If the pager is in peristent-journal mode, then the physical + // journal-file may extend past the end of the super-journal name + // and 8 bytes of magic data just written to the file. This is + // dangerous because the code to rollback a hot-journal file + // will not be able to find the super-journal name to determine + // whether or not the journal is hot. + // + // Easiest thing to do in this scenario is to truncate the journal + // file to the required size. + if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp)) && + *(*I64)(unsafe.Pointer(bp)) > (*Pager)(unsafe.Pointer(pPager)).FjournalOff { + rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, (*Pager)(unsafe.Pointer(pPager)).FjournalOff) + } + return rc +} + +// Discard the entire contents of the in-memory page-cache. +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ + (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ + Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) + Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) +} + +// Return the pPager->iDataVersion value +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ + return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion +} + +// Free all structures in the Pager.aSavepoint[] array and set both +// Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal +// if it is open and the pager is not in exclusive mode. +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ + var ii int32 // Iterator for looping through Pager.aSavepoint + for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { + Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) + } + if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) || Xsqlite3JournalIsInMemory(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd) != 0 { + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd) + } + Xsqlite3_free(tls, (*Pager)(unsafe.Pointer(pPager)).FaSavepoint) + (*Pager)(unsafe.Pointer(pPager)).FaSavepoint = uintptr(0) + (*Pager)(unsafe.Pointer(pPager)).FnSavepoint = 0 + (*Pager)(unsafe.Pointer(pPager)).FnSubRec = U32(0) +} + +// Set the bit number pgno in the PagerSavepoint.pInSavepoint +// bitvecs of all open savepoints. Return SQLITE_OK if successful +// or SQLITE_NOMEM if a malloc failure occurs. +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ + var ii int32 // Loop counter + var rc int32 = SQLITE_OK // Result code + + for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { + var p uintptr = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(ii)*56 + if pgno <= (*PagerSavepoint)(unsafe.Pointer(p)).FnOrig { + rc = rc | Xsqlite3BitvecSet(tls, (*PagerSavepoint)(unsafe.Pointer(p)).FpInSavepoint, pgno) + + } + } + return rc +} + +// This function is a no-op if the pager is in exclusive mode and not +// in the ERROR state. Otherwise, it switches the pager to PAGER_OPEN +// state. +// +// If the pager is not in exclusive-access mode, the database file is +// completely unlocked. If the file is unlocked and the file-system does +// not exhibit the UNDELETABLE_WHEN_OPEN property, the journal file is +// closed (if it is open). +// +// If the pager is in ERROR state when this function is called, the +// contents of the pager cache are discarded before switching back to +// the OPEN state. Regardless of whether the pager is in exclusive-mode +// or not, any journal file left in the file-system will be treated +// as a hot-journal and rolled back the next time a read-transaction +// is opened (by this or by any other connection). +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ + + Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) + (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) + releaseAllSavepoints(tls, pPager) + + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + + Xsqlite3WalEndReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) + } else if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { + var rc int32 // Error code returned by pagerUnlockDb() + var iDc int32 + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { + iDc = Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd) + } else { + iDc = 0 + } + + // If the operating system support deletion of open files, then + // close the journal file when dropping the database lock. Otherwise + // another connection with journal_mode=delete might delete the file + // out from under us. + + if 0 == iDc&SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN || + 1 != int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode)&5 { + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + } + + // If the pager is in the ERROR state and the call to unlock the database + // file fails, set the current lock to UNKNOWN_LOCK. See the comment + // above the #define for UNKNOWN_LOCK for an explanation of why this + // is necessary. + rc = pagerUnlockDb(tls, pPager, NO_LOCK) + if rc != SQLITE_OK && int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_ERROR { + (*Pager)(unsafe.Pointer(pPager)).FeLock = U8(EXCLUSIVE_LOCK + 1) + } + + // The pager state may be changed from PAGER_ERROR to PAGER_OPEN here + // without clearing the error code. This is intentional - the error + // code is cleared and the cache reset in the block below. + + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) + } + + // If Pager.errCode is set, the contents of the pager cache cannot be + // trusted. Now that there are no outstanding references to the pager, + // it can safely move back to PAGER_OPEN state. This happens in both + // normal and exclusive-locking mode. + + if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { + if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { + pager_reset(tls, pPager) + (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = U8(0) + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) + } else { + (*Pager)(unsafe.Pointer(pPager)).FeState = func() uint8 { + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { + return uint8(PAGER_OPEN) + } + return uint8(PAGER_READER) + }() + } + if (*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0 { + Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int64(0), uintptr(0)) + } + (*Pager)(unsafe.Pointer(pPager)).FerrCode = SQLITE_OK + setGetterMethod(tls, pPager) + } + + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) + (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = int64(0) + (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(0) +} + +// This function is called whenever an IOERR or FULL error that requires +// the pager to transition into the ERROR state may ahve occurred. +// The first argument is a pointer to the pager structure, the second +// the error-code about to be returned by a pager API function. The +// value returned is a copy of the second argument to this function. +// +// If the second argument is SQLITE_FULL, SQLITE_IOERR or one of the +// IOERR sub-codes, the pager enters the ERROR state and the error code +// is stored in Pager.errCode. While the pager remains in the ERROR state, +// all major API calls on the Pager will immediately return Pager.errCode. +// +// The ERROR state indicates that the contents of the pager-cache +// cannot be trusted. This state can be cleared by completely discarding +// the contents of the pager-cache. If a transaction was active when +// the persistent error occurred, then the rollback journal may need +// to be replayed to restore the contents of the database file (as if +// it were a hot-journal). +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ + var rc2 int32 = rc & 0xff + + if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { + (*Pager)(unsafe.Pointer(pPager)).FerrCode = rc + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_ERROR) + setGetterMethod(tls, pPager) + } + return rc +} + +// The write transaction open on pPager is being committed (bCommit==1) +// or rolled back (bCommit==0). +// +// Return TRUE if and only if all dirty pages should be flushed to disk. +// +// Rules: +// +// * For non-TEMP databases, always sync to disk. This is necessary +// for transactions to be durable. +// +// * Sync TEMP database only on a COMMIT (not a ROLLBACK) when the backing +// file has been created already (via a spill on pagerStress()) and +// when the number of dirty pages in memory exceeds 25% of the total +// cache size. +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ + if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { + return 1 + } + if !(bCommit != 0) { + return 0 + } + if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0)) { + return 0 + } + return libc.Bool32(Xsqlite3PCachePercentDirty(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) >= 25) +} + +// This routine ends a transaction. A transaction is usually ended by +// either a COMMIT or a ROLLBACK operation. This routine may be called +// after rollback of a hot-journal, or if an error occurs while opening +// the journal file or writing the very first journal-header of a +// database transaction. +// +// This routine is never called in PAGER_ERROR state. If it is called +// in PAGER_NONE or PAGER_SHARED state and the lock held is less +// exclusive than a RESERVED lock, it is a no-op. +// +// Otherwise, any active savepoints are released. +// +// If the journal file is open, then it is "finalized". Once a journal +// file has been finalized it is not possible to use it to roll back a +// transaction. Nor will it be considered to be a hot-journal by this +// or any other database connection. Exactly how a journal is finalized +// depends on whether or not the pager is running in exclusive mode and +// the current journal-mode (Pager.journalMode value), as follows: +// +// journalMode==MEMORY +// Journal file descriptor is simply closed. This destroys an +// in-memory journal. +// +// journalMode==TRUNCATE +// Journal file is truncated to zero bytes in size. +// +// journalMode==PERSIST +// The first 28 bytes of the journal file are zeroed. This invalidates +// the first journal header in the file, and hence the entire journal +// file. An invalid journal file cannot be rolled back. +// +// journalMode==DELETE +// The journal file is closed and deleted using sqlite3OsDelete(). +// +// If the pager is running in exclusive mode, this method of finalizing +// the journal file is never used. Instead, if the journalMode is +// DELETE and the pager is in exclusive mode, the method described under +// journalMode==PERSIST is used instead. +// +// After the journal is finalized, the pager moves to PAGER_READER state. +// If running in non-exclusive rollback mode, the lock on the file is +// downgraded to a SHARED_LOCK. +// +// SQLITE_OK is returned if no error occurs. If an error occurs during +// any of the IO operations to finalize the journal file or unlock the +// database then the IO error code is returned to the user. If the +// operation to finalize the journal file fails, then the code still +// tries to unlock the database file if not in exclusive mode. If the +// unlock operation fails as well, then the first error code related +// to the first error encountered (the journal finalization one) is +// returned. +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ + var rc int32 = SQLITE_OK // Error code from journal finalization operation + var rc2 int32 = SQLITE_OK // Error code from db file unlock operation + + // Do nothing if the pager does not have an open write transaction + // or at least a RESERVED lock. This function may be called when there + // is no write-transaction active but a RESERVED or greater lock is + // held under two circumstances: + // + // 1. After a successful hot-journal rollback, it is called with + // eState==PAGER_NONE and eLock==EXCLUSIVE_LOCK. + // + // 2. If a connection with locking_mode=exclusive holding an EXCLUSIVE + // lock switches back to locking_mode=normal and then executes a + // read-transaction, this function is called with eState==PAGER_READER + // and eLock==EXCLUSIVE_LOCK when the read-transaction is closed. + + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) < PAGER_WRITER_LOCKED && int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < RESERVED_LOCK { + return SQLITE_OK + } + + releaseAllSavepoints(tls, pPager) + + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { + + // Finalize the journal file. + if Xsqlite3JournalIsInMemory(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) != 0 { + // assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ); + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + } else if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_TRUNCATE { + if (*Pager)(unsafe.Pointer(pPager)).FjournalOff == int64(0) { + rc = SQLITE_OK + } else { + rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int64(0)) + if rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 { + // Make sure the new file size is written into the inode right away. + // Otherwise the journal might resurrect following a power loss and + // cause the last transaction to roll back. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=1072773 + rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) + } + } + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) + } else if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_PERSIST || + (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_WAL { + rc = zeroJournalHdr(tls, pPager, libc.Bool32(hasSuper != 0 || (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0)) + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) + } else { + // This branch may be executed with Pager.journalMode==MEMORY if + // a hot-journal was just rolled back. In this case the journal + // file should be closed and deleted. If this connection writes to + // the database file, it will do so using an in-memory journal. + var bDelete int32 = libc.BoolInt32(!((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0)) + + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + if bDelete != 0 { + rc = Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, int32((*Pager)(unsafe.Pointer(pPager)).FextraSync)) + } + } + } + + Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) + (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) + (*Pager)(unsafe.Pointer(pPager)).FnRec = 0 + if rc == SQLITE_OK { + if (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 || pagerFlushOnCommit(tls, pPager, bCommit) != 0 { + Xsqlite3PcacheCleanAll(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + } else { + Xsqlite3PcacheClearWritable(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + } + Xsqlite3PcacheTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, (*Pager)(unsafe.Pointer(pPager)).FdbSize) + } + + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + // Drop the WAL write-lock, if any. Also, if the connection was in + // locking_mode=exclusive mode but is no longer, drop the EXCLUSIVE + // lock held on the database file. + rc2 = Xsqlite3WalEndWriteTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) + + } else if rc == SQLITE_OK && bCommit != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbFileSize > (*Pager)(unsafe.Pointer(pPager)).FdbSize { + // This branch is taken when committing a transaction in rollback-journal + // mode if the database file on disk is larger than the database image. + // At this point the journal has been finalized and the transaction + // successfully committed, but the EXCLUSIVE lock is still held on the + // file. So it is safe to truncate the database file to its minimum + // required size. + + rc = pager_truncate(tls, pPager, (*Pager)(unsafe.Pointer(pPager)).FdbSize) + } + + if rc == SQLITE_OK && bCommit != 0 { + rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_COMMIT_PHASETWO, uintptr(0)) + if rc == SQLITE_NOTFOUND { + rc = SQLITE_OK + } + } + + if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) && + (!((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) || Xsqlite3WalExclusiveMode(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, 0) != 0) { + rc2 = pagerUnlockDb(tls, pPager, SHARED_LOCK) + } + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_READER) + (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(0) + + return func() int32 { + if rc == SQLITE_OK { + return rc2 + } + return rc + }() +} + +// Execute a rollback if a transaction is active and unlock the +// database file. +// +// If the pager has already entered the ERROR state, do not attempt +// the rollback at this time. Instead, pager_unlock() is called. The +// call to pager_unlock() will discard all in-memory pages, unlock +// the database file and move the pager back to OPEN state. If this +// means that there is a hot-journal left in the file-system, the next +// connection to obtain a shared lock on the pager (which may be this one) +// will roll it back. +// +// If the pager has not already entered the ERROR state, but an IO or +// malloc error occurs during a rollback, then this will itself cause +// the pager to enter the ERROR state. Which will be cleared by the +// call to pager_unlock(), as described above. +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { + + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { + Xsqlite3BeginBenignMalloc(tls) + Xsqlite3PagerRollback(tls, pPager) + Xsqlite3EndBenignMalloc(tls) + } else if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { + + pager_end_transaction(tls, pPager, 0, 0) + } + } + pager_unlock(tls, pPager) +} + +// Parameter aData must point to a buffer of pPager->pageSize bytes +// of data. Compute and return a checksum based ont the contents of the +// page of data and the current value of pPager->cksumInit. +// +// This is not a real checksum. It is really just the sum of the +// random initial value (pPager->cksumInit) and every 200th byte +// of the page data, starting with byte offset (pPager->pageSize%200). +// Each byte is interpreted as an 8-bit unsigned integer. +// +// Changing the formula used to compute this checksum results in an +// incompatible journal file format. +// +// If journal corruption occurs due to a power failure, the most likely +// scenario is that one end or the other of the record will be changed. +// It is much less likely that the two ends of the journal record will be +// correct and the middle be corrupt. Thus, this "checksum" scheme, +// though fast and simple, catches the mostly likely kind of corruption. +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ + var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return + var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter + for i > 0 { + cksum = cksum + U32(*(*U8)(unsafe.Pointer(aData + uintptr(i)))) + i = i - 200 + } + return cksum +} + +// Read a single page from either the journal file (if isMainJrnl==1) or +// from the sub-journal (if isMainJrnl==0) and playback that page. +// The page begins at offset *pOffset into the file. The *pOffset +// value is increased to the start of the next page in the journal. +// +// The main rollback journal uses checksums - the statement journal does +// not. +// +// If the page number of the page record read from the (sub-)journal file +// is greater than the current value of Pager.dbSize, then playback is +// skipped and SQLITE_OK is returned. +// +// If pDone is not NULL, then it is a record of pages that have already +// been played back. If the page at *pOffset has already been played back +// (if the corresponding pDone bit is set) then skip the playback. +// Make sure the pDone bit corresponding to the *pOffset page is set +// prior to returning. +// +// If the page record is successfully read from the (sub-)journal file +// and played back, then SQLITE_OK is returned. If an IO error occurs +// while reading the record from the (sub-)journal file or while writing +// to the database file, then the IO error code is returned. If data +// is successfully read from the (sub-)journal file but appears to be +// corrupted, SQLITE_DONE is returned. Data is considered corrupted in +// two circumstances: +// +// * If the record page-number is illegal (0 or PAGER_MJ_PGNO), or +// * If the record is being rolled back from the main journal file +// and the checksum field does not match the record content. +// +// Neither of these two scenarios are possible during a savepoint rollback. +// +// If this is a savepoint rollback, then memory may have to be dynamically +// allocated by this function. If this is the case and an allocation fails, +// SQLITE_NOMEM is returned. +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 + // var pPg uintptr at bp+8, 8 + // An existing page in the cache + // var pgno Pgno at bp, 4 + // The page number of a page in journal + // var cksum U32 at bp+4, 4 + // Checksum used for sanity checking + var aData uintptr // Temporary storage for the page + var jfd uintptr // The file descriptor for the journal file + var isSynced int32 // True if journal page is synced + + // isMainJrnl is 0 or 1 + // isSavepnt is 0 or 1 + // pDone always used on sub-journals + // pDone never used on non-savepoint + + aData = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + // Temp storage must have already been allocated + + // Either the state is greater than PAGER_WRITER_CACHEMOD (a transaction + // or savepoint rollback done at the request of the caller) or this is + // a hot-journal rollback. If it is a hot-journal rollback, the pager + // is in state OPEN and holds an EXCLUSIVE lock. Hot-journal rollback + // only reads from the main journal, not the sub-journal. + + // Read the page number and page data from the journal or sub-journal + // file. Return an error code to the caller if an IO error occurs. + if isMainJrnl != 0 { + jfd = (*Pager)(unsafe.Pointer(pPager)).Fjfd + } else { + jfd = (*Pager)(unsafe.Pointer(pPager)).Fsjfd + } + rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset)), bp) + if rc != SQLITE_OK { + return rc + } + rc = Xsqlite3OsRead(tls, jfd, aData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), *(*I64)(unsafe.Pointer(pOffset))+int64(4)) + if rc != SQLITE_OK { + return rc + } + *(*I64)(unsafe.Pointer(pOffset)) += (*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(4) + I64(isMainJrnl*4) + + // Sanity checking on the page. This is more important that I originally + // thought. If a power failure occurs while the journal is being written, + // it could cause invalid data to be written into the journal. We need to + // detect this invalid data (with high probability) and ignore it. + if *(*Pgno)(unsafe.Pointer(bp)) == Pgno(0) || *(*Pgno)(unsafe.Pointer(bp)) == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)) { + + return SQLITE_DONE + } + if *(*Pgno)(unsafe.Pointer(bp)) > (*Pager)(unsafe.Pointer(pPager)).FdbSize || Xsqlite3BitvecTest(tls, pDone, *(*Pgno)(unsafe.Pointer(bp))) != 0 { + return SQLITE_OK + } + if isMainJrnl != 0 { + rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset))-int64(4), bp+4) + if rc != 0 { + return rc + } + if !(isSavepnt != 0) && pager_cksum(tls, pPager, aData) != *(*U32)(unsafe.Pointer(bp + 4)) { + return SQLITE_DONE + } + } + + // If this page has already been played back before during the current + // rollback, then don't bother to play it back again. + if pDone != 0 && libc.AssignInt32(&rc, Xsqlite3BitvecSet(tls, pDone, *(*Pgno)(unsafe.Pointer(bp)))) != SQLITE_OK { + return rc + } + + // When playing back page 1, restore the nReserve setting + if *(*Pgno)(unsafe.Pointer(bp)) == Pgno(1) && int32((*Pager)(unsafe.Pointer(pPager)).FnReserve) != int32(*(*U8)(unsafe.Pointer(aData + 20))) { + (*Pager)(unsafe.Pointer(pPager)).FnReserve = I16(*(*U8)(unsafe.Pointer(aData + 20))) + } + + // If the pager is in CACHEMOD state, then there must be a copy of this + // page in the pager cache. In this case just update the pager cache, + // not the database file. The page is left marked dirty in this case. + // + // An exception to the above rule: If the database is in no-sync mode + // and a page is moved during an incremental vacuum then the page may + // not be in the pager cache. Later: if a malloc() or IO error occurs + // during a Movepage() call, then the page may not be in the cache + // either. So the condition described in the above paragraph is not + // assert()able. + // + // If in WRITER_DBMOD, WRITER_FINISHED or OPEN state, then we update the + // pager cache if it exists and the main file. The page is then marked + // not dirty. Since this code is only executed in PAGER_OPEN state for + // a hot-journal rollback, it is guaranteed that the page-cache is empty + // if the pager is in OPEN state. + // + // Ticket #1171: The statement journal might contain page content that is + // different from the page content at the start of the transaction. + // This occurs when a page is changed prior to the start of a statement + // then changed again within the statement. When rolling back such a + // statement we must not write to the original database unless we know + // for certain that original page contents are synced into the main rollback + // journal. Otherwise, a power loss might leave modified data in the + // database file without an entry in the rollback journal that can + // restore the database to its original form. Two conditions must be + // met before writing to the database files. (1) the database must be + // locked. (2) we know that the original page content is fully synced + // in the main journal either because the page is not in cache or else + // the page is marked as needSync==0. + // + // 2008-04-14: When attempting to vacuum a corrupt database file, it + // is possible to fail a statement on a database that does not yet exist. + // Do not attempt to write if database file has never been opened. + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)) = uintptr(0) + } else { + *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)) = Xsqlite3PagerLookup(tls, pPager, *(*Pgno)(unsafe.Pointer(bp /* pgno */))) + } + + if isMainJrnl != 0 { + isSynced = libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FnoSync != 0 || *(*I64)(unsafe.Pointer(pOffset)) <= (*Pager)(unsafe.Pointer(pPager)).FjournalHdr) + } else { + isSynced = libc.Bool32(*(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) || 0 == int32((*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fflags)&PGHDR_NEED_SYNC) + } + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) && + (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) && + isSynced != 0 { + var ofst I64 = I64(*(*Pgno)(unsafe.Pointer(bp))-Pgno(1)) * (*Pager)(unsafe.Pointer(pPager)).FpageSize + + // Write the data read from the journal back into the database file. + // This is usually safe even for an encrypted database - as the data + // was encrypted before it was written to the journal file. The exception + // is if the data was just read from an in-memory sub-journal. In that + // case it must be encrypted here before it is copied into the database + // file. + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, aData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), ofst) + + if *(*Pgno)(unsafe.Pointer(bp)) > (*Pager)(unsafe.Pointer(pPager)).FdbFileSize { + (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = *(*Pgno)(unsafe.Pointer(bp /* pgno */)) + } + if (*Pager)(unsafe.Pointer(pPager)).FpBackup != 0 { + Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, *(*Pgno)(unsafe.Pointer(bp /* pgno */)), aData) + } + } else if !(isMainJrnl != 0) && *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) { + // If this is a rollback of a savepoint and data was not written to + // the database and the page is not in-memory, there is a potential + // problem. When the page is next fetched by the b-tree layer, it + // will be read from the database file, which may or may not be + // current. + // + // There are a couple of different ways this can happen. All are quite + // obscure. When running in synchronous mode, this can only happen + // if the page is on the free-list at the start of the transaction, then + // populated, then moved using sqlite3PagerMovepage(). + // + // The solution is to add an in-memory page to the cache containing + // the data just read from the sub-journal. Mark the page as dirty + // and if the pager requires a journal-sync, then mark the page as + // requiring a journal-sync before it is written. + + *(*U8)(unsafe.Pointer(pPager + 25)) |= U8(SPILLFLAG_ROLLBACK) + rc = Xsqlite3PagerGet(tls, pPager, *(*Pgno)(unsafe.Pointer(bp /* pgno */)), bp+8, 1) + + *(*U8)(unsafe.Pointer(pPager + 25)) &= libc.Uint8FromInt32(libc.CplInt32(SPILLFLAG_ROLLBACK)) + if rc != SQLITE_OK { + return rc + } + Xsqlite3PcacheMakeDirty(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) + } + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + // No page should ever be explicitly rolled back that is in use, except + // for page 1 which is held in use in order to keep the lock on the + // database active. However such a page may be rolled back as a result + // of an internal error resulting in an automatic call to + // sqlite3PagerRollback(). + var pData uintptr + pData = (*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)))).FpData + libc.Xmemcpy(tls, pData, aData, uint64((*Pager)(unsafe.Pointer(pPager)).FpageSize)) + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxReiniter})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) + // It used to be that sqlite3PcacheMakeClean(pPg) was called here. But + // that call was dangerous and had no detectable benefit since the cache + // is normally cleaned by sqlite3PcacheCleanAll() after rollback and so + // has been removed. + + // If this was page 1, then restore the value of Pager.dbFileVers. + // Do this before any decoding. + if *(*Pgno)(unsafe.Pointer(bp)) == Pgno(1) { + libc.Xmemcpy(tls, pPager+136, pData+24, uint64(unsafe.Sizeof([16]uint8{}))) + } + Xsqlite3PcacheRelease(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) + } + return rc +} + +// Parameter zSuper is the name of a super-journal file. A single journal +// file that referred to the super-journal file has just been rolled back. +// This routine checks if it is possible to delete the super-journal file, +// and does so if it is. +// +// Argument zSuper may point to Pager.pTmpSpace. So that buffer is not +// available for use within this function. +// +// When a super-journal file is created, it is populated with the names +// of all of its child journals, one after another, formatted as utf-8 +// encoded text. The end of each child journal file is marked with a +// nul-terminator byte (0x00). i.e. the entire contents of a super-journal +// file for a transaction involving two databases might be: +// +// "/home/bill/a.db-journal\x00/home/bill/b.db-journal\x00" +// +// A super-journal file may only be deleted once all of its child +// journals have been rolled back. +// +// This function reads the contents of the super-journal file into +// memory and loops through each of the child journal names. For +// each child journal, it checks if: +// +// * if the child journal exists, and if so +// * if the child journal contains a reference to super-journal +// file zSuper +// +// If a child journal can be found that matches both of the criteria +// above, this function returns without doing anything. Otherwise, if +// no such child journal can be found, file zSuper is deleted from +// the file-system using sqlite3OsDelete(). +// +// If an IO error within this function, an error code is returned. This +// function allocates memory by calling sqlite3Malloc(). If an allocation +// fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors +// occur, SQLITE_OK is returned. +// +// TODO: This function allocates a single block of memory to load +// the entire contents of the super-journal file. This could be +// a couple of kilobytes or so - potentially larger than the page +// size. +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var pVfs uintptr + var rc int32 // Return code + var pSuper uintptr // Malloc'd super-journal file descriptor + var pJournal uintptr // Malloc'd child-journal file descriptor + var zSuperJournal uintptr // Contents of super-journal file + // var nSuperJournal I64 at bp, 8 + // Size of super-journal file + var zJournal uintptr // Pointer to one journal within MJ file + var zSuperPtr uintptr // Space to hold super-journal filename + var zFree uintptr // Free this buffer + var nSuperPtr int32 + var flags int32 + // One of the journals pointed to by the super-journal exists. + // Open it and check if it points at the super-journal. If + // so, return without deleting the super-journal file. + // NB: zJournal is really a MAIN_JOURNAL. But call it a + // SUPER_JOURNAL here so that the VFS will not send the zJournal + // name into sqlite3_database_file_object(). + var c int32 + var flags1 int32 + // var exists int32 at bp+8, 4 + pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs + zSuperJournal = uintptr(0) + zFree = uintptr(0) // Amount of space allocated to zSuperPtr[] + + // Allocate space for both the pJournal and pSuper file descriptors. + // If successful, open the super-journal file for reading. + pSuper = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile*2)) + if !!(pSuper != 0) { + goto __1 + } + rc = SQLITE_NOMEM + pJournal = uintptr(0) + goto __2 +__1: + flags = SQLITE_OPEN_READONLY | SQLITE_OPEN_SUPER_JOURNAL + rc = Xsqlite3OsOpen(tls, pVfs, zSuper, pSuper, flags, uintptr(0)) + pJournal = pSuper + uintptr((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile) +__2: + ; + if !(rc != SQLITE_OK) { + goto __3 + } + goto delsuper_out +__3: + ; + + // Load the entire super-journal file into space obtained from + // sqlite3_malloc() and pointed to by zSuperJournal. Also obtain + // sufficient space (in zSuperPtr) to hold the names of super-journal + // files extracted from regular rollback-journals. + rc = Xsqlite3OsFileSize(tls, pSuper, bp) + if !(rc != SQLITE_OK) { + goto __4 + } + goto delsuper_out +__4: + ; + nSuperPtr = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + 1 + zFree = Xsqlite3Malloc(tls, uint64(int64(4)+*(*I64)(unsafe.Pointer(bp))+I64(nSuperPtr)+int64(2))) + if !!(zFree != 0) { + goto __5 + } + rc = SQLITE_NOMEM + goto delsuper_out +__5: + ; + *(*uint8)(unsafe.Pointer(zFree)) = libc.AssignPtrUint8(zFree+1, libc.AssignPtrUint8(zFree+2, libc.AssignPtrUint8(zFree+3, uint8(0)))) + zSuperJournal = zFree + 4 + zSuperPtr = zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp))+int64(2)) + rc = Xsqlite3OsRead(tls, pSuper, zSuperJournal, int32(*(*I64)(unsafe.Pointer(bp /* nSuperJournal */))), int64(0)) + if !(rc != SQLITE_OK) { + goto __6 + } + goto delsuper_out +__6: + ; + *(*uint8)(unsafe.Pointer(zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp /* nSuperJournal */))))) = uint8(0) + *(*uint8)(unsafe.Pointer(zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp))+int64(1)))) = uint8(0) + + zJournal = zSuperJournal +__7: + if !(I64((int64(zJournal)-int64(zSuperJournal))/1) < *(*I64)(unsafe.Pointer(bp))) { + goto __8 + } + rc = Xsqlite3OsAccess(tls, pVfs, zJournal, SQLITE_ACCESS_EXISTS, bp+8) + if !(rc != SQLITE_OK) { + goto __9 + } + goto delsuper_out +__9: + ; + if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) { + goto __10 + } + flags1 = SQLITE_OPEN_READONLY | SQLITE_OPEN_SUPER_JOURNAL + rc = Xsqlite3OsOpen(tls, pVfs, zJournal, pJournal, flags1, uintptr(0)) + if !(rc != SQLITE_OK) { + goto __11 + } + goto delsuper_out +__11: + ; + + rc = readSuperJournal(tls, pJournal, zSuperPtr, uint32(nSuperPtr)) + Xsqlite3OsClose(tls, pJournal) + if !(rc != SQLITE_OK) { + goto __12 + } + goto delsuper_out +__12: + ; + + c = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zSuperPtr))) != 0 && libc.Xstrcmp(tls, zSuperPtr, zSuper) == 0) + if !(c != 0) { + goto __13 + } + // We have a match. Do not delete the super-journal file. + goto delsuper_out +__13: + ; +__10: + ; + zJournal += uintptr(Xsqlite3Strlen30(tls, zJournal) + 1) + goto __7 +__8: + ; + + Xsqlite3OsClose(tls, pSuper) + rc = Xsqlite3OsDelete(tls, pVfs, zSuper, 0) + +delsuper_out: + Xsqlite3_free(tls, zFree) + if !(pSuper != 0) { + goto __14 + } + Xsqlite3OsClose(tls, pSuper) + + Xsqlite3_free(tls, pSuper) +__14: + ; + return rc +} + +// This function is used to change the actual size of the database +// file in the file-system. This only happens when committing a transaction, +// or rolling back a transaction (including rolling back a hot-journal). +// +// If the main database file is not open, or the pager is not in either +// DBMOD or OPEN state, this function is a no-op. Otherwise, the size +// of the file is changed to nPage pages (nPage*pPager->pageSize bytes). +// If the file on disk is currently larger than nPage pages, then use the VFS +// xTruncate() method to truncate it. +// +// Or, it might be the case that the file on disk is smaller than +// nPage pages. Some operating system implementations can get confused if +// you try to truncate a file to some size that is larger than it +// currently is, so detect this case and write a single zero byte to +// the end of the new file instead. +// +// If successful, return SQLITE_OK. If an IO error occurs while modifying +// the database file, return the error code to the caller. +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) && + (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) { + // var currentSize I64 at bp, 8 + + var newSize I64 + var szPage int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize) + + // TODO: Is it safe to use Pager.dbFileSize here? + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) + newSize = I64(szPage) * I64(nPage) + if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) != newSize { + if *(*I64)(unsafe.Pointer(bp)) > newSize { + rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, newSize) + } else if *(*I64)(unsafe.Pointer(bp))+I64(szPage) <= newSize { + var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + libc.Xmemset(tls, pTmp, 0, uint64(szPage)) + + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, pTmp, szPage, newSize-I64(szPage)) + } + if rc == SQLITE_OK { + (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = nPage + } + } + } + return rc +} + +// Return a sanitized version of the sector-size of OS file pFile. The +// return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ + var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) + if iRet < 32 { + iRet = 512 + } else if iRet > MAX_SECTOR_SIZE { + + iRet = MAX_SECTOR_SIZE + } + return iRet +} + +// Set the value of the Pager.sectorSize variable for the given +// pager based on the value returned by the xSectorSize method +// of the open database file. The sector size will be used +// to determine the size and alignment of journal header and +// super-journal pointers within created journal files. +// +// For temporary files the effective sector size is always 512 bytes. +// +// Otherwise, for non-temporary files, the effective sector size is +// the value returned by the xSectorSize() method rounded up to 32 if +// it is less than 32, or rounded down to MAX_SECTOR_SIZE if it +// is greater than MAX_SECTOR_SIZE. +// +// If the file has the SQLITE_IOCAP_POWERSAFE_OVERWRITE property, then set +// the effective sector size to its minimum value (512). The purpose of +// pPager->sectorSize is to define the "blast radius" of bytes that +// might change if a crash occurs while writing to a single byte in +// that range. But with POWERSAFE_OVERWRITE, the blast radius is zero +// (that is what POWERSAFE_OVERWRITE means), so we minimize the sector +// size. For backwards compatibility of the rollback journal file format, +// we cannot reduce the effective sector size below 512. +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ + + if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || + Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { + // Sector size doesn't matter for temporary files. Also, the file + // may not have been opened yet, in which case the OsSectorSize() + // call will segfault. + (*Pager)(unsafe.Pointer(pPager)).FsectorSize = U32(512) + } else { + (*Pager)(unsafe.Pointer(pPager)).FsectorSize = U32(Xsqlite3SectorSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)) + } +} + +// Playback the journal and thus restore the database file to +// the state it was in before we started making changes. +// +// The journal file format is as follows: +// +// (1) 8 byte prefix. A copy of aJournalMagic[]. +// (2) 4 byte big-endian integer which is the number of valid page records +// in the journal. If this value is 0xffffffff, then compute the +// number of page records from the journal size. +// (3) 4 byte big-endian integer which is the initial value for the +// sanity checksum. +// (4) 4 byte integer which is the number of pages to truncate the +// database to during a rollback. +// (5) 4 byte big-endian integer which is the sector size. The header +// is this many bytes in size. +// (6) 4 byte big-endian integer which is the page size. +// (7) zero padding out to the next sector size. +// (8) Zero or more pages instances, each as follows: +// + 4 byte page number. +// + pPager->pageSize bytes of data. +// + 4 byte checksum +// +// When we speak of the journal header, we mean the first 7 items above. +// Each entry in the journal is an instance of the 8th item. +// +// Call the value from the second bullet "nRec". nRec is the number of +// valid page entries in the journal. In most cases, you can compute the +// value of nRec from the size of the journal file. But if a power +// failure occurred while the journal was being written, it could be the +// case that the size of the journal file had already been increased but +// the extra entries had not yet made it safely to disk. In such a case, +// the value of nRec computed from the file size would be too large. For +// that reason, we always use the nRec value in the header. +// +// If the nRec value is 0xffffffff it means that nRec should be computed +// from the file size. This value is used when the user selects the +// no-sync option for the journal. A power failure could lead to corruption +// in this case. But for things like temporary table (which will be +// deleted when the power is restored) we don't care. +// +// If the file opened as the journal file is not a well-formed +// journal file then all pages up to the first corrupted page are rolled +// back (or no pages if the journal header is corrupted). The journal file +// is then deleted and SQLITE_OK returned, just as if no corruption had +// been encountered. +// +// If an I/O or malloc() error occurs, the journal-file is not deleted +// and an error code is returned. +// +// The isHot parameter indicates that we are trying to rollback a journal +// that might be a hot journal. Or, it could be that the journal is +// preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE. +// If the journal really is hot, reset the pager cache prior rolling +// back any content. If the journal is merely persistent, no reset is +// needed. +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var pVfs uintptr + // var szJ I64 at bp+16, 8 + // Size of the journal file in bytes + // var nRec U32 at bp+28, 4 + // Number of Records in the journal + var u U32 // Unsigned loop counter + // var mxPg Pgno at bp+32, 4 + // Size of the original file in pages + var rc int32 // Result code of a subroutine + // var res int32 at bp+24, 4 + // Value returned by sqlite3OsAccess() + var zSuper uintptr // Name of super-journal file if any + var needPagerReset int32 // True to reset page prior to first page rollback + var nPlayback int32 // Total number of pages restored from journal + // var savedPageSize U32 at bp+36, 4 + pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs + *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) = Pgno(0) + *(*int32)(unsafe.Pointer(bp + 24 /* res */)) = 1 + zSuper = uintptr(0) + nPlayback = 0 + *(*U32)(unsafe.Pointer(bp + 36 /* savedPageSize */)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) + + // Figure out how many records are in the journal. Abort early if + // the journal is empty. + + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16) + if !(rc != SQLITE_OK) { + goto __1 + } + goto end_playback +__1: + ; + + // Read the super-journal name from the journal, if it is present. + // If a super-journal file name is specified, but the file is not + // present on disk, then the journal is not hot and does not need to be + // played back. + // + // TODO: Technically the following is an error because it assumes that + // buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that + // (pPager->pageSize >= pPager->pVfs->mxPathname+1). Using os_unix.c, + // mxPathname is 512, which is the same as the minimum allowable value + // for pageSize. + zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) + if !(rc == SQLITE_OK && *(*uint8)(unsafe.Pointer(zSuper)) != 0) { + goto __2 + } + rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+24) +__2: + ; + zSuper = uintptr(0) + if !(rc != SQLITE_OK || !(*(*int32)(unsafe.Pointer(bp + 24)) != 0)) { + goto __3 + } + goto end_playback +__3: + ; + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) + needPagerReset = isHot + + // This loop terminates either when a readJournalHdr() or + // pager_playback_one_page() call returns SQLITE_DONE or an IO error + // occurs. +__4: + if !(1 != 0) { + goto __5 + } + // Read the next journal header from the journal file. If there are + // not enough bytes left in the journal file for a complete header, or + // it is corrupted, then a process must have failed while writing it. + // This indicates nothing more needs to be rolled back. + rc = readJournalHdr(tls, pPager, isHot, *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)), bp+28, bp+32) + if !(rc != SQLITE_OK) { + goto __6 + } + if !(rc == SQLITE_DONE) { + goto __7 + } + rc = SQLITE_OK +__7: + ; + goto end_playback +__6: + ; + + // If nRec is 0xffffffff, then this journal was created by a process + // working in no-sync mode. This means that the rest of the journal + // file consists of pages, there are no more journal headers. Compute + // the value of nRec based on this assumption. + if !(*(*U32)(unsafe.Pointer(bp + 28)) == 0xffffffff) { + goto __8 + } + + *(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) = U32(int32((*(*I64)(unsafe.Pointer(bp + 16)) - I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize)) / ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(8)))) +__8: + ; + + // If nRec is 0 and this rollback is of a transaction created by this + // process and if this is the final header in the journal, then it means + // that this part of the journal was being filled but has not yet been + // synced to disk. Compute the number of pages based on the remaining + // size of the file. + // + // The third term of the test was added to fix ticket #2565. + // When rolling back a hot journal, nRec==0 always means that the next + // chunk of the journal contains zero pages to be rolled back. But + // when doing a ROLLBACK and the nRec==0 chunk is the last chunk in + // the journal, it means that the journal might contain additional + // pages that need to be rolled back and that the number of pages + // should be computed based on the journal file size. + if !(*(*U32)(unsafe.Pointer(bp + 28)) == U32(0) && !(isHot != 0) && (*Pager)(unsafe.Pointer(pPager)).FjournalHdr+I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) == (*Pager)(unsafe.Pointer(pPager)).FjournalOff) { + goto __9 + } + *(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) = U32(int32((*(*I64)(unsafe.Pointer(bp + 16)) - (*Pager)(unsafe.Pointer(pPager)).FjournalOff) / ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(8)))) +__9: + ; + + // If this is the first header read from the journal, truncate the + // database file back to its original size. + if !((*Pager)(unsafe.Pointer(pPager)).FjournalOff == I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize)) { + goto __10 + } + rc = pager_truncate(tls, pPager, *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */))) + if !(rc != SQLITE_OK) { + goto __11 + } + goto end_playback +__11: + ; + (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; +__10: + ; + + // Copy original pages out of the journal and back into the + // database file and/or page cache. + u = U32(0) +__13: + if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { + goto __15 + } + if !(needPagerReset != 0) { + goto __16 + } + pager_reset(tls, pPager) + needPagerReset = 0 +__16: + ; + rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) + if !(rc == SQLITE_OK) { + goto __17 + } + nPlayback++ + goto __18 +__17: + if !(rc == SQLITE_DONE) { + goto __19 + } + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) + goto __15 + goto __20 +__19: + if !(rc == SQLITE_IOERR|int32(2)<<8) { + goto __21 + } + // If the journal has been truncated, simply stop reading and + // processing the journal. This might happen if the journal was + // not completely written and synced prior to a crash. In that + // case, the database should have never been written in the + // first place so it is OK to simply abandon the rollback. + rc = SQLITE_OK + goto end_playback + goto __22 +__21: + // If we are unable to rollback, quit and return the error + // code. This will cause the pager to enter the error state + // so that no further harm will be done. Perhaps the next + // process to come along will be able to rollback the database. + goto end_playback +__22: + ; +__20: + ; +__18: + ; + goto __14 +__14: + u++ + goto __13 + goto __15 +__15: + ; + goto __4 +__5: + ; + //NOTREACHED + +end_playback: + if !(rc == SQLITE_OK) { + goto __23 + } + rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) +__23: + ; + // Following a rollback, the database file should be back in its original + // state prior to the start of the transaction, so invoke the + // SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the + // assertion that the transaction counter was modified. + + // If this playback is happening automatically as a result of an IO or + // malloc error that occurred after the change-counter was updated but + // before the transaction was committed, then the change-counter + // modification may just have been reverted. If this happens in exclusive + // mode, then subsequent transactions performed by the connection will not + // update the change-counter at all. This may lead to cache inconsistency + // problems for other processes at some point in the future. So, just + // in case this has happened, clear the changeCountDone flag now. + (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile + + if !(rc == SQLITE_OK) { + goto __24 + } + // Leave 4 bytes of space before the super-journal filename in memory. + // This is because it may end up being passed to sqlite3OsOpen(), in + // which case it requires 4 0x00 bytes in memory immediately before + // the filename. + zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 + rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) + +__24: + ; + if !(rc == SQLITE_OK && + (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { + goto __25 + } + rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) +__25: + ; + if !(rc == SQLITE_OK) { + goto __26 + } + rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zSuper))) != 0), 0) + +__26: + ; + if !(rc == SQLITE_OK && *(*uint8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { + goto __27 + } + // If there was a super-journal and this routine will return success, + // see if it is possible to delete the super-journal. + + libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) + rc = pager_delsuper(tls, pPager, zSuper) + +__27: + ; + if !(isHot != 0 && nPlayback != 0) { + goto __28 + } + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3836, + libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) +__28: + ; + + // The Pager.sectorSize variable may have been updated while rolling + // back a journal created by a process with a different sector size + // value. Reset it to the correct value for this process. + setSectorSize(tls, pPager) + return rc +} + +// Read the content for page pPg out of the database file (or out of +// the WAL if that is where the most recent copy if found) into +// pPg->pData. A shared lock or greater must be held on the database +// file before this function is called. +// +// If page 1 is read, then the value of Pager.dbFileVers[] is set to +// the value read from the database file. +// +// If an IO error occurs, then the IO error is returned to the caller. +// Otherwise, SQLITE_OK is returned. +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager // Pager object associated with page pPg + var rc int32 = SQLITE_OK // Return code + + *(*U32)(unsafe.Pointer(bp /* iFrame */)) = U32(0) // Frame of WAL containing pgno + + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno, bp) + if rc != 0 { + return rc + } + } + if *(*U32)(unsafe.Pointer(bp)) != 0 { + rc = Xsqlite3WalReadFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, *(*U32)(unsafe.Pointer(bp /* iFrame */)), int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), (*PgHdr)(unsafe.Pointer(pPg)).FpData) + } else { + var iOffset I64 = I64((*PgHdr)(unsafe.Pointer(pPg)).Fpgno-Pgno(1)) * (*Pager)(unsafe.Pointer(pPager)).FpageSize + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, (*PgHdr)(unsafe.Pointer(pPg)).FpData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), iOffset) + if rc == SQLITE_IOERR|int32(2)<<8 { + rc = SQLITE_OK + } + } + + if (*PgHdr)(unsafe.Pointer(pPg)).Fpgno == Pgno(1) { + if rc != 0 { + // If the read is unsuccessful, set the dbFileVers[] to something + // that will never be a valid file version. dbFileVers[] is a copy + // of bytes 24..39 of the database. Bytes 28..31 should always be + // zero or the size of the database in page. Bytes 32..35 and 35..39 + // should be page numbers which are never 0xffffffff. So filling + // pPager->dbFileVers[] with all 0xff bytes should suffice. + // + // For an encrypted database, the situation is more complex: bytes + // 24..39 of the database are white noise. But the probability of + // white noise equaling 16 bytes of 0xff is vanishingly small so + // we should still be ok. + libc.Xmemset(tls, pPager+136, 0xff, uint64(unsafe.Sizeof([16]uint8{}))) + } else { + var dbFileVers uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpData + 24 + libc.Xmemcpy(tls, pPager+136, dbFileVers, uint64(unsafe.Sizeof([16]uint8{}))) + } + } + + return rc +} + +// Update the value of the change-counter at offsets 24 and 92 in +// the header and the sqlite version number at offset 96. +// +// This is an unconditional update. See also the pager_incr_changecounter() +// routine which only updates the change-counter if the update is actually +// needed, as determined by the pPager->changeCountDone state variable. +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ + var change_counter U32 + if pPg == uintptr(0) { + return + } + + // Increment the value just read and write it back to byte 24. + change_counter = Xsqlite3Get4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpPager+136) + U32(1) + Xsqlite3Put4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData+uintptr(24), change_counter) + + // Also store the SQLite version number in bytes 96..99 and in + // bytes 92..95 store the change counter for which the version number + // is valid. + Xsqlite3Put4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData+uintptr(92), change_counter) + Xsqlite3Put4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData+uintptr(96), uint32(SQLITE_VERSION_NUMBER)) +} + +// This function is invoked once for each page that has already been +// written into the log file when a WAL transaction is rolled back. +// Parameter iPg is the page number of said page. The pCtx argument +// is actually a pointer to the Pager structure. +// +// If page iPg is present in the cache, and has no outstanding references, +// it is discarded. Otherwise, if there are one or more outstanding +// references, the page content is reloaded from the database. If the +// attempt to reload content from the database is required and fails, +// return an SQLite error code. Otherwise, SQLITE_OK. +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ + var rc int32 = SQLITE_OK + var pPager uintptr = pCtx + var pPg uintptr + + pPg = Xsqlite3PagerLookup(tls, pPager, iPg) + if pPg != 0 { + if Xsqlite3PcachePageRefcount(tls, pPg) == 1 { + Xsqlite3PcacheDrop(tls, pPg) + } else { + rc = readDbPage(tls, pPg) + if rc == SQLITE_OK { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxReiniter})).f(tls, pPg) + } + Xsqlite3PagerUnrefNotNull(tls, pPg) + } + } + + // Normally, if a transaction is rolled back, any backup processes are + // updated as data is copied out of the rollback journal and into the + // database. This is not generally possible with a WAL database, as + // rollback involves simply truncating the log file. Therefore, if one + // or more frames have already been written to the log (and therefore + // also copied into the backup databases) as part of this transaction, + // the backups must be restarted. + Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) + + return rc +} + +// This function is called to rollback a transaction on a WAL database. +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ + var rc int32 // Return Code + var pList uintptr // List of dirty pages to revert + + // For all pages in the cache that are currently dirty or have already + // been written (but not committed) to the log file, do one of the + // following: + // + // + Discard the cached page (if refcount==0), or + // + Reload page content from the database (if refcount>0). + (*Pager)(unsafe.Pointer(pPager)).FdbSize = (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize + rc = Xsqlite3WalUndo(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Pgno) int32 + }{pagerUndoCallback})), pPager) + pList = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + for pList != 0 && rc == SQLITE_OK { + var pNext uintptr = (*PgHdr)(unsafe.Pointer(pList)).FpDirty + rc = pagerUndoCallback(tls, pPager, (*PgHdr)(unsafe.Pointer(pList)).Fpgno) + pList = pNext + } + + return rc +} + +// This function is a wrapper around sqlite3WalFrames(). As well as logging +// the contents of the list of pages headed by pList (connected by pDirty), +// this function notifies any active backup processes that the pages have +// changed. +// +// The list of pages passed into this routine is always sorted by page number. +// Hence, if page 1 appears anywhere on the list, it will be the first page. +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = pList + + var rc int32 // Return code + var nList int32 // Number of pages in pList + var p uintptr // For looping over pages + + if isCommit != 0 { + // If a WAL transaction is being committed, there is no point in writing + // any pages with page numbers greater than nTruncate into the WAL file. + // They will never be read by any client. So remove them from the pDirty + // list here. + var ppNext uintptr = bp /* &pList */ + nList = 0 + for p = *(*uintptr)(unsafe.Pointer(bp /* pList */)); libc.AssignPtrUintptr(ppNext, p) != uintptr(0); p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { + if (*PgHdr)(unsafe.Pointer(p)).Fpgno <= nTruncate { + ppNext = p + 32 + nList++ + } + } + + } else { + nList = 1 + } + *(*int32)(unsafe.Pointer(pPager + 240 + 2*4)) += nList + + if (*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fpgno == Pgno(1) { + pager_write_changecounter(tls, *(*uintptr)(unsafe.Pointer(bp /* pList */))) + } + rc = Xsqlite3WalFrames(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, + int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), *(*uintptr)(unsafe.Pointer(bp /* pList */)), nTruncate, isCommit, int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags)) + if rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FpBackup != 0 { + for p = *(*uintptr)(unsafe.Pointer(bp /* pList */)); p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { + Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, (*PgHdr)(unsafe.Pointer(p)).Fpgno, (*PgHdr)(unsafe.Pointer(p)).FpData) + } + } + + return rc +} + +// Begin a read transaction on the WAL. +// +// This routine used to be called "pagerOpenSnapshot()" because it essentially +// makes a snapshot of the database at the current point in time and preserves +// that snapshot for use by the reader in spite of concurrently changes by +// other writers or checkpointers. +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 // Return code + *(*int32)(unsafe.Pointer(bp /* changed */)) = 0 // True if cache must be reset + + // sqlite3WalEndReadTransaction() was not called for the previous + // transaction in locking_mode=EXCLUSIVE. So call it now. If we + // are in locking_mode=NORMAL and EndRead() was previously called, + // the duplicate call is harmless. + Xsqlite3WalEndReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) + + rc = Xsqlite3WalBeginReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, bp) + if rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp)) != 0 { + pager_reset(tls, pPager) + if (*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0 { + Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int64(0), uintptr(0)) + } + } + + return rc +} + +// This function is called as part of the transition from PAGER_OPEN +// to PAGER_READER state to determine the size of the database file +// in pages (assuming the page size currently stored in Pager.pageSize). +// +// If no error occurs, SQLITE_OK is returned and the size of the database +// in pages is stored in *pnPage. Otherwise, an error code (perhaps +// SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var nPage Pgno // Value to return via *pnPage + + // Query the WAL sub-system for the database size. The WalDbsize() + // function returns zero if the WAL is not open (i.e. Pager.pWal==0), or + // if the database size is not available. The database size is not + // available from the WAL sub-system if the log file is empty or + // contains no valid committed transactions. + + nPage = Xsqlite3WalDbsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) + + // If the number of pages in the database is not available from the + // WAL sub-system, determine the page count based on the size of + // the database file. If the size of the database file is not an + // integer multiple of the page-size, round up the result. + if nPage == Pgno(0) && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { + *(*I64)(unsafe.Pointer(bp /* n */)) = int64(0) // Size of db file in bytes + var rc int32 = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) + if rc != SQLITE_OK { + return rc + } + nPage = Pgno((*(*I64)(unsafe.Pointer(bp)) + (*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(1)) / (*Pager)(unsafe.Pointer(pPager)).FpageSize) + } + + // If the current number of pages in the file is greater than the + // configured maximum pager number, increase the allowed limit so + // that the file can be read. + if nPage > (*Pager)(unsafe.Pointer(pPager)).FmxPgno { + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = nPage + } + + *(*Pgno)(unsafe.Pointer(pnPage)) = nPage + return SQLITE_OK +} + +// Check if the *-wal file that corresponds to the database opened by pPager +// exists if the database is not empy, or verify that the *-wal file does +// not exist (by deleting it) if the database file is empty. +// +// If the database is not empty and the *-wal file exists, open the pager +// in WAL mode. If the database is empty or if no *-wal file exists and +// if no error occurs, make sure Pager.journalMode is not set to +// PAGER_JOURNALMODE_WAL. +// +// Return SQLITE_OK or an error code. +// +// The caller must hold a SHARED lock on the database file to call this +// function. Because an EXCLUSIVE lock on the db file is required to delete +// a WAL on a none-empty database, this ensures there is no race condition +// between the xAccess() below and an xDelete() being executed by some +// other connection. +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + + if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) { + // var isWal int32 at bp, 4 + // True if WAL file exists + rc = Xsqlite3OsAccess(tls, + (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp) + if rc == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp)) != 0 { + // var nPage Pgno at bp+4, 4 + // Size of the database file + + rc = pagerPagecount(tls, pPager, bp+4) + if rc != 0 { + return rc + } + if *(*Pgno)(unsafe.Pointer(bp + 4)) == Pgno(0) { + rc = Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, 0) + } else { + + rc = Xsqlite3PagerOpenWal(tls, pPager, uintptr(0)) + } + } else if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { + (*Pager)(unsafe.Pointer(pPager)).FjournalMode = U8(PAGER_JOURNALMODE_DELETE) + } + } + } + return rc +} + +// Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback +// the entire super-journal file. The case pSavepoint==NULL occurs when +// a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction +// savepoint. +// +// When pSavepoint is not NULL (meaning a non-transaction savepoint is +// being rolled back), then the rollback consists of up to three stages, +// performed in the order specified: +// +// * Pages are played back from the main journal starting at byte +// offset PagerSavepoint.iOffset and continuing to +// PagerSavepoint.iHdrOffset, or to the end of the main journal +// file if PagerSavepoint.iHdrOffset is zero. +// +// * If PagerSavepoint.iHdrOffset is not zero, then pages are played +// back starting from the journal header immediately following +// PagerSavepoint.iHdrOffset to the end of the main journal file. +// +// * Pages are then played back from the sub-journal file, starting +// with the PagerSavepoint.iSubRec and continuing to the end of +// the journal file. +// +// Throughout the rollback process, each time a page is rolled back, the +// corresponding bit is set in a bitvec structure (variable pDone in the +// implementation below). This is used to ensure that a page is only +// rolled back the first time it is encountered in either journal. +// +// If pSavepoint is NULL, then pages are only played back from the main +// journal file. There is no need for a bitvec in this case. +// +// In either case, before playback commences the Pager.dbSize variable +// is reset to the value that it held at the start of the savepoint +// (or transaction). No page with a page-number greater than this value +// is played back. If one is encountered it is simply skipped. +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var szJ I64 // Effective size of the main journal + var iHdrOff I64 // End of first segment of main-journal records + var rc int32 = SQLITE_OK // Return code + var pDone uintptr = uintptr(0) // Bitvec to ensure pages played back only once + + // Allocate a bitvec to use to store the set of pages rolled back + if pSavepoint != 0 { + pDone = Xsqlite3BitvecCreate(tls, (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FnOrig) + if !(pDone != 0) { + return SQLITE_NOMEM + } + } + + // Set the database size back to the value it was before the savepoint + // being reverted was opened. + (*Pager)(unsafe.Pointer(pPager)).FdbSize = func() uint32 { + if pSavepoint != 0 { + return (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FnOrig + } + return (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize + }() + (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile + + if !(pSavepoint != 0) && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + return pagerRollbackWal(tls, pPager) + } + + // Use pPager->journalOff as the effective size of the main rollback + // journal. The actual file might be larger than this in + // PAGER_JOURNALMODE_TRUNCATE or PAGER_JOURNALMODE_PERSIST. But anything + // past pPager->journalOff is off-limits to us. + szJ = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + + // Begin by rolling back records from the main journal starting at + // PagerSavepoint.iOffset and continuing to the next journal header. + // There might be records in the main journal that have a page number + // greater than the current database size (pPager->dbSize) but those + // will be skipped automatically. Pages are added to pDone as they + // are played back. + if pSavepoint != 0 && !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { + if (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiHdrOffset != 0 { + iHdrOff = (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiHdrOffset + } else { + iHdrOff = szJ + } + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiOffset + for rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FjournalOff < iHdrOff { + rc = pager_playback_one_page(tls, pPager, pPager+96, pDone, 1, 1) + } + + } else { + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) + } + + // Continue rolling back records out of the main journal starting at + // the first journal header seen and continuing until the effective end + // of the main journal file. Continue to skip out-of-range pages and + // continue adding pages rolled back to pDone. + for rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FjournalOff < szJ { + var ii U32 // Loop counter + *(*U32)(unsafe.Pointer(bp /* nJRec */)) = U32(0) // Number of Journal Records + // var dummy U32 at bp+4, 4 + + rc = readJournalHdr(tls, pPager, 0, szJ, bp, bp+4) + + // The "pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff" + // test is related to ticket #2565. See the discussion in the + // pager_playback() function for additional information. + if *(*U32)(unsafe.Pointer(bp)) == U32(0) && + (*Pager)(unsafe.Pointer(pPager)).FjournalHdr+I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) == (*Pager)(unsafe.Pointer(pPager)).FjournalOff { + *(*U32)(unsafe.Pointer(bp /* nJRec */)) = U32((szJ - (*Pager)(unsafe.Pointer(pPager)).FjournalOff) / ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(8))) + } + for ii = U32(0); rc == SQLITE_OK && ii < *(*U32)(unsafe.Pointer(bp /* nJRec */)) && (*Pager)(unsafe.Pointer(pPager)).FjournalOff < szJ; ii++ { + rc = pager_playback_one_page(tls, pPager, pPager+96, pDone, 1, 1) + } + + } + + // Finally, rollback pages from the sub-journal. Page that were + // previously rolled back out of the main journal (and are hence in pDone) + // will be skipped. Out-of-range pages are also skipped. + if pSavepoint != 0 { + var ii U32 // Loop counter + *(*I64)(unsafe.Pointer(bp + 8 /* offset */)) = I64((*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiSubRec) * (int64(4) + (*Pager)(unsafe.Pointer(pPager)).FpageSize) + + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + rc = Xsqlite3WalSavepointUndo(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSavepoint+36) + } + for ii = (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiSubRec; rc == SQLITE_OK && ii < (*Pager)(unsafe.Pointer(pPager)).FnSubRec; ii++ { + + rc = pager_playback_one_page(tls, pPager, bp+8, pDone, 0, 1) + } + + } + + Xsqlite3BitvecDestroy(tls, pDone) + if rc == SQLITE_OK { + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = szJ + } + + return rc +} + +// Change the maximum number of in-memory pages that are allowed +// before attempting to recycle clean and unused pages. +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ + Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) +} + +// Change the maximum number of in-memory pages that are allowed +// before attempting to spill pages to journal. +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ + return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) +} + +// Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var fd uintptr = (*Pager)(unsafe.Pointer(pPager)).Ffd + if (*Sqlite3_file)(unsafe.Pointer(fd)).FpMethods != uintptr(0) && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(fd)).FpMethods)).FiVersion >= 3 { + // var sz Sqlite3_int64 at bp, 8 + + *(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = (*Pager)(unsafe.Pointer(pPager)).FszMmap + (*Pager)(unsafe.Pointer(pPager)).FbUseFetch = U8(libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp)) > int64(0))) + setGetterMethod(tls, pPager) + Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_MMAP_SIZE, bp) + } +} + +// Change the maximum size of any memory mapping made of the database file. +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ + (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap + pagerFixMaplimit(tls, pPager) +} + +// Free as much memory as possible from the pager. +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ + Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) +} + +// Adjust settings of the pager to those specified in the pgFlags parameter. +// +// The "level" in pgFlags & PAGER_SYNCHRONOUS_MASK sets the robustness +// of the database to damage due to OS crashes or power failures by +// changing the number of syncs()s when writing the journals. +// There are four levels: +// +// OFF sqlite3OsSync() is never called. This is the default +// for temporary and transient files. +// +// NORMAL The journal is synced once before writes begin on the +// database. This is normally adequate protection, but +// it is theoretically possible, though very unlikely, +// that an inopertune power failure could leave the journal +// in a state which would cause damage to the database +// when it is rolled back. +// +// FULL The journal is synced twice before writes begin on the +// database (with some additional information - the nRec field +// of the journal header - being written in between the two +// syncs). If we assume that writing a +// single disk sector is atomic, then this mode provides +// assurance that the journal will not be corrupted to the +// point of causing damage to the database during rollback. +// +// EXTRA This is like FULL except that is also syncs the directory +// that contains the rollback journal after the rollback +// journal is unlinked. +// +// The above is for a rollback-journal mode. For WAL mode, OFF continues +// to mean that no syncs ever occur. NORMAL means that the WAL is synced +// prior to the start of checkpoint and that the database file is synced +// at the conclusion of the checkpoint if the entire content of the WAL +// was written back into the database. But no sync operations occur for +// an ordinary commit in NORMAL mode with WAL. FULL means that the WAL +// file is synced following each commit operation, in addition to the +// syncs associated with NORMAL. There is no difference between FULL +// and EXTRA for WAL mode. +// +// Do not confuse synchronous=FULL with SQLITE_SYNC_FULL. The +// SQLITE_SYNC_FULL macro means to use the MacOSX-style full-fsync +// using fcntl(F_FULLFSYNC). SQLITE_SYNC_NORMAL means to do an +// ordinary fsync() call. There is no difference between SQLITE_SYNC_FULL +// and SQLITE_SYNC_NORMAL on platforms other than MacOSX. But the +// synchronous=FULL versus synchronous=NORMAL setting determines when +// the xSync primitive is called and is relevant to all platforms. +// +// Numeric values associated with these states are OFF==1, NORMAL=2, +// and FULL=3. +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ + var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) + if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { + (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) + (*Pager)(unsafe.Pointer(pPager)).FfullSync = U8(0) + (*Pager)(unsafe.Pointer(pPager)).FextraSync = U8(0) + } else { + (*Pager)(unsafe.Pointer(pPager)).FnoSync = func() uint8 { + if level == uint32(PAGER_SYNCHRONOUS_OFF) { + return uint8(1) + } + return uint8(0) + }() + (*Pager)(unsafe.Pointer(pPager)).FfullSync = func() uint8 { + if level >= uint32(PAGER_SYNCHRONOUS_FULL) { + return uint8(1) + } + return uint8(0) + }() + (*Pager)(unsafe.Pointer(pPager)).FextraSync = func() uint8 { + if level == uint32(PAGER_SYNCHRONOUS_EXTRA) { + return uint8(1) + } + return uint8(0) + }() + } + if (*Pager)(unsafe.Pointer(pPager)).FnoSync != 0 { + (*Pager)(unsafe.Pointer(pPager)).FsyncFlags = U8(0) + } else if pgFlags&uint32(PAGER_FULLFSYNC) != 0 { + (*Pager)(unsafe.Pointer(pPager)).FsyncFlags = U8(SQLITE_SYNC_FULL) + } else { + (*Pager)(unsafe.Pointer(pPager)).FsyncFlags = U8(SQLITE_SYNC_NORMAL) + } + (*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags = U8(int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags) << 2) + if (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 { + *(*U8)(unsafe.Pointer(pPager + 15)) |= U8(int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) + } + if pgFlags&uint32(PAGER_CKPT_FULLFSYNC) != 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { + *(*U8)(unsafe.Pointer(pPager + 15)) |= U8(int32(SQLITE_SYNC_FULL) << 2) + } + if pgFlags&uint32(PAGER_CACHESPILL) != 0 { + *(*U8)(unsafe.Pointer(pPager + 25)) &= libc.Uint8FromInt32(libc.CplInt32(SPILLFLAG_OFF)) + } else { + *(*U8)(unsafe.Pointer(pPager + 25)) |= U8(SPILLFLAG_OFF) + } +} + +// The following global variable is incremented whenever the library +// attempts to open a temporary file. This information is used for +// testing and analysis only. + +// Open a temporary file. +// +// Write the file descriptor into *pFile. Return SQLITE_OK on success +// or some other error code if we fail. The OS will automatically +// delete the temporary file when it is closed. +// +// The flags passed to the VFS layer xOpen() call are those specified +// by parameter vfsFlags ORed with the following: +// +// SQLITE_OPEN_READWRITE +// SQLITE_OPEN_CREATE +// SQLITE_OPEN_EXCLUSIVE +// SQLITE_OPEN_DELETEONCLOSE +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ + var rc int32 // Return code + + vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) + rc = Xsqlite3OsOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, uintptr(0), pFile, vfsFlags, uintptr(0)) + + return rc +} + +// Set the busy handler function. +// +// The pager invokes the busy-handler if sqlite3OsLock() returns +// SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock, +// or when trying to upgrade from a RESERVED lock to an EXCLUSIVE +// lock. It does *not* invoke the busy handler when upgrading from +// SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE +// (which occurs during hot-journal rollback). Summary: +// +// Transition | Invokes xBusyHandler +// -------------------------------------------------------- +// NO_LOCK -> SHARED_LOCK | Yes +// SHARED_LOCK -> RESERVED_LOCK | No +// SHARED_LOCK -> EXCLUSIVE_LOCK | No +// RESERVED_LOCK -> EXCLUSIVE_LOCK | Yes +// +// If the busy-handler callback returns non-zero, the lock is +// retried. If it returns zero, then the SQLITE_BUSY error is +// returned to the caller of the pager API function. +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ + var ap uintptr + (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler + (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg + ap = pPager + 224 + + Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_BUSYHANDLER, ap) +} + +// Change the page size used by the Pager object. The new page size +// is passed in *pPageSize. +// +// If the pager is in the error state when this function is called, it +// is a no-op. The value returned is the error state error code (i.e. +// one of SQLITE_IOERR, an SQLITE_IOERR_xxx sub-code or SQLITE_FULL). +// +// Otherwise, if all of the following are true: +// +// * the new page size (value of *pPageSize) is valid (a power +// of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and +// +// * there are no outstanding page references, and +// +// * the database is either not an in-memory database or it is +// an in-memory database that currently consists of zero pages. +// +// then the pager object page size is set to *pPageSize. +// +// If the page size is changed, then this function uses sqlite3PagerMalloc() +// to obtain a new Pager.pTmpSpace buffer. If this allocation attempt +// fails, SQLITE_NOMEM is returned and the page size remains unchanged. +// In all other cases, SQLITE_OK is returned. +// +// If the page size is not changed, either because one of the enumerated +// conditions above is not true, the pager was in error state when this +// function was called, or because the memory allocation attempt failed, +// then *pPageSize is set to the old, retained page size before returning. +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + + // It is not possible to do a full assert_pager_state() here, as this + // function may be called from within PagerOpen(), before the state + // of the Pager object is internally consistent. + // + // At one point this function returned an error if the pager was in + // PAGER_ERROR state. But since PAGER_ERROR state guarantees that + // there is at least one outstanding page reference, this function + // is a no-op for that case anyhow. + + var pageSize U32 = *(*U32)(unsafe.Pointer(pPageSize)) + + if (int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) == 0 || (*Pager)(unsafe.Pointer(pPager)).FdbSize == Pgno(0)) && + Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 && + pageSize != 0 && pageSize != U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) { + var pNew uintptr = uintptr(0) // New temp space + *(*I64)(unsafe.Pointer(bp /* nByte */)) = int64(0) + + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) > PAGER_OPEN && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) + } + if rc == SQLITE_OK { + // 8 bytes of zeroed overrun space is sufficient so that the b-tree + // cell header parser will never run off the end of the allocation + pNew = Xsqlite3PageMalloc(tls, int32(pageSize+U32(8))) + if !(pNew != 0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, pNew+uintptr(pageSize), 0, uint64(8)) + } + } + + if rc == SQLITE_OK { + pager_reset(tls, pPager) + rc = Xsqlite3PcacheSetPageSize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, int32(pageSize)) + } + if rc == SQLITE_OK { + Xsqlite3PageFree(tls, (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace) + (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace = pNew + (*Pager)(unsafe.Pointer(pPager)).FdbSize = Pgno((*(*I64)(unsafe.Pointer(bp)) + I64(pageSize) - int64(1)) / I64(pageSize)) + (*Pager)(unsafe.Pointer(pPager)).FpageSize = I64(pageSize) + } else { + Xsqlite3PageFree(tls, pNew) + } + } + + *(*U32)(unsafe.Pointer(pPageSize)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) + if rc == SQLITE_OK { + if nReserve < 0 { + nReserve = int32((*Pager)(unsafe.Pointer(pPager)).FnReserve) + } + + (*Pager)(unsafe.Pointer(pPager)).FnReserve = I16(nReserve) + pagerFixMaplimit(tls, pPager) + } + return rc +} + +// Return a pointer to the "temporary page" buffer held internally +// by the pager. This is a buffer that is big enough to hold the +// entire content of a database page. This buffer is used internally +// during rollback and will be overwritten whenever a rollback +// occurs. But other modules are free to use it too, as long as +// no rollbacks are happening. +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ + return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace +} + +// Attempt to set the maximum database page count if mxPage is positive. +// Make no changes if mxPage is zero or negative. And never reduce the +// maximum page count below the current size of the database. +// +// Regardless of mxPage, return the current maximum page count. +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ + if mxPage > Pgno(0) { + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage + } + // Called only by OP_MaxPgcnt + // assert( pPager->mxPgno>=pPager->dbSize ); + // OP_MaxPgcnt ensures that the parameter passed to this function is not + // less than the total number of valid pages in the database. But this + // may be less than Pager.dbSize, and so the assert() above is not valid + return (*Pager)(unsafe.Pointer(pPager)).FmxPgno +} + +// The following set of routines are used to disable the simulated +// I/O error mechanism. These routines are used to avoid simulated +// errors in places where we do not care about errors. +// +// Unless -DSQLITE_TEST=1 is used, these routines are all no-ops +// and generate no code. + +// Read the first N bytes from the beginning of the file into memory +// that pDest points to. +// +// If the pager was opened on a transient file (zFilename==""), or +// opened on a file less than N bytes in size, the output buffer is +// zeroed and SQLITE_OK returned. The rationale for this is that this +// function is used to read database headers, and a new transient or +// zero sized database has a header than consists entirely of zeroes. +// +// If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, +// the error code is returned to the caller and the contents of the +// output buffer undefined. +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ + var rc int32 = SQLITE_OK + libc.Xmemset(tls, pDest, 0, uint64(N)) + + // This routine is only called by btree immediately after creating + // the Pager object. There has not been an opportunity to transition + // to WAL mode yet. + + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { + + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, pDest, N, int64(0)) + if rc == SQLITE_IOERR|int32(2)<<8 { + rc = SQLITE_OK + } + } + return rc +} + +// This function may only be called when a read-transaction is open on +// the pager. It returns the total number of pages in the database. +// +// However, if the file is between 1 and bytes in size, then +// this is considered a 1 page file. +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ + + *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) +} + +// Try to obtain a lock of type locktype on the database file. If +// a similar or greater lock is already held, this function is a no-op +// (returning SQLITE_OK immediately). +// +// Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke +// the busy callback if the lock is currently not available. Repeat +// until the busy callback returns false or until the attempt to +// obtain the lock succeeds. +// +// Return SQLITE_OK on success and an error code if we cannot obtain +// the lock. If the lock is obtained successfully, set the Pager.state +// variable to locktype before returning. +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ + var rc int32 // Return code + + // Check that this is either a no-op (because the requested lock is + // already held), or one of the transitions that the busy-handler + // may be invoked during, according to the comment above + // sqlite3PagerSetBusyhandler(). + + for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_BUSY && (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxBusyHandler})).f(tls, (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg) != 0 { + rc = pagerLockDb(tls, pPager, locktype) + } + return rc +} + +// Function assertTruncateConstraint(pPager) checks that one of the +// following is true for all dirty pages currently in the page-cache: +// +// a) The page number is less than or equal to the size of the +// current database image, in pages, OR +// +// b) if the page content were written at this time, it would not +// be necessary to write the current content out to the sub-journal. +// +// If the condition asserted by this function were not true, and the +// dirty page were to be discarded from the cache via the pagerStress() +// routine, pagerStress() would not write the current page content to +// the database file. If a savepoint transaction were rolled back after +// this happened, the correct behavior would be to restore the current +// content of the page. However, since this content is not present in either +// the database file or the portion of the rollback journal and +// sub-journal rolled back the content could not be restored and the +// database image would become corrupt. It is therefore fortunate that +// this circumstance cannot arise. + +// Truncate the in-memory database file image to nPage pages. This +// function does not actually modify the database file on disk. It +// just sets the internal state of the pager object so that the +// truncation will be done when the current transaction is committed. +// +// This function is only called right before committing a transaction. +// Once this function has been called, the transaction must either be +// rolled back or committed. It is not safe to call this function and +// then continue writing to the database. +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ + + (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage + + // At one point the code here called assertTruncateConstraint() to + // ensure that all pages being truncated away by this operation are, + // if one or more savepoints are open, present in the savepoint + // journal so that they can be restored if the savepoint is rolled + // back. This is no longer necessary as this function is now only + // called right before committing a transaction. So although the + // Pager object may still have open savepoints (Pager.nSavepoint!=0), + // they cannot be rolled back. So the assertTruncateConstraint() call + // is no longer correct. +} + +// This function is called before attempting a hot-journal rollback. It +// syncs the journal file to disk, then sets pPager->journalHdr to the +// size of the journal file so that the pager_playback() routine knows +// that the entire journal file has been synced. +// +// Syncing a hot-journal to disk before attempting to roll it back ensures +// that if a power-failure occurs during the rollback, the process that +// attempts rollback following system recovery sees the same journal +// content as this process. +// +// If everything goes as planned, SQLITE_OK is returned. Otherwise, +// an SQLite error code. +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ + var rc int32 = SQLITE_OK + if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { + rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) + } + if rc == SQLITE_OK { + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, pPager+104) + } + return rc +} + +// Obtain a reference to a memory mapped page object for page number pgno. +// The new object will use the pointer pData, obtained from xFetch(). +// If successful, set *ppPage to point to the new page reference +// and return SQLITE_OK. Otherwise, return an SQLite error code and set +// *ppPage to zero. +// +// Page references obtained by calling this function should be released +// by calling pagerReleaseMapPage(). +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ + var p uintptr // Memory mapped page to return + + if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { + *(*uintptr)(unsafe.Pointer(ppPage)) = libc.AssignUintptr(&p, (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist) + (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist = (*PgHdr)(unsafe.Pointer(p)).FpDirty + (*PgHdr)(unsafe.Pointer(p)).FpDirty = uintptr(0) + + libc.Xmemset(tls, (*PgHdr)(unsafe.Pointer(p)).FpExtra, 0, uint64(8)) + } else { + *(*uintptr)(unsafe.Pointer(ppPage)) = libc.AssignUintptr(&p, Xsqlite3MallocZero(tls, uint64(uint64(unsafe.Sizeof(PgHdr{}))+uint64((*Pager)(unsafe.Pointer(pPager)).FnExtra)))) + if p == uintptr(0) { + Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, pData) + return SQLITE_NOMEM + } + (*PgHdr)(unsafe.Pointer(p)).FpExtra = p + 1*72 + (*PgHdr)(unsafe.Pointer(p)).Fflags = U16(PGHDR_MMAP) + (*PgHdr)(unsafe.Pointer(p)).FnRef = int16(1) + (*PgHdr)(unsafe.Pointer(p)).FpPager = pPager + } + + (*PgHdr)(unsafe.Pointer(p)).Fpgno = pgno + (*PgHdr)(unsafe.Pointer(p)).FpData = pData + (*Pager)(unsafe.Pointer(pPager)).FnMmapOut++ + + return SQLITE_OK +} + +// Release a reference to page pPg. pPg must have been returned by an +// earlier call to pagerAcquireMapPage(). +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager + (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- + (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist + (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist = pPg + + Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64((*PgHdr)(unsafe.Pointer(pPg)).Fpgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, (*PgHdr)(unsafe.Pointer(pPg)).FpData) +} + +// Free all PgHdr objects stored in the Pager.pMmapFreelist list. +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ + var p uintptr + var pNext uintptr + for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { + pNext = (*PgHdr)(unsafe.Pointer(p)).FpDirty + Xsqlite3_free(tls, p) + } +} + +// Verify that the database file has not be deleted or renamed out from +// under the pager. Return SQLITE_OK if the database is still where it ought +// to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error +// code from sqlite3OsAccess()) if the database has gone missing. +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* bHasMoved */)) = 0 + var rc int32 + + if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { + return SQLITE_OK + } + if (*Pager)(unsafe.Pointer(pPager)).FdbSize == Pgno(0) { + return SQLITE_OK + } + + rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_HAS_MOVED, bp) + if rc == SQLITE_NOTFOUND { + // If the HAS_MOVED file-control is unimplemented, assume that the file + // has not been moved. That is the historical behavior of SQLite: prior to + // version 3.8.3, it never checked + rc = SQLITE_OK + } else if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { + rc = SQLITE_READONLY | int32(4)<<8 + } + return rc +} + +// Shutdown the page cache. Free all memory and close all files. +// +// If a transaction was in progress when this routine is called, that +// transaction is rolled back. All outstanding pages are invalidated +// and their memory is freed. Any attempt to use a page associated +// with this page cache after this function returns will likely +// result in a coredump. +// +// This function always succeeds. If a transaction is active an attempt +// is made to roll it back. If an error occurs during the rollback +// a hot journal may be left in the filesystem but no error is returned +// to the caller. +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ + var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + + Xsqlite3BeginBenignMalloc(tls) + pagerFreeMapHdrs(tls, pPager) + // pPager->errCode = 0; + (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(0) + { + var a uintptr = uintptr(0) + + if db != 0 && uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NoCkptOnClose) && + SQLITE_OK == databaseIsUnmoved(tls, pPager) { + a = pTmp + } + Xsqlite3WalClose(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags), int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), a) + (*Pager)(unsafe.Pointer(pPager)).FpWal = uintptr(0) + + } + pager_reset(tls, pPager) + if (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { + pager_unlock(tls, pPager) + } else { + // If it is open, sync the journal file before calling UnlockAndRollback. + // If this is not done, then an unsynced portion of the open journal + // file may be played back into the database. If a power failure occurs + // while this is happening, the database could become corrupt. + // + // If an error occurs while trying to sync the journal, shift the pager + // into the ERROR state. This causes UnlockAndRollback to unlock the + // database and close the journal file without attempting to roll it + // back or finalize it. The next database user will have to do hot-journal + // rollback before accessing the database file. + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { + pager_error(tls, pPager, pagerSyncHotJournal(tls, pPager)) + } + pagerUnlockAndRollback(tls, pPager) + } + Xsqlite3EndBenignMalloc(tls) + + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd) + Xsqlite3PageFree(tls, pTmp) + Xsqlite3PcacheClose(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + + Xsqlite3_free(tls, pPager) + return SQLITE_OK +} + +// Increment the reference count for page pPg. +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ + Xsqlite3PcacheRef(tls, pPg) +} + +// Sync the journal. In other words, make sure all the pages that have +// been written to the journal have actually reached the surface of the +// disk and can be restored in the event of a hot-journal rollback. +// +// If the Pager.noSync flag is set, then this function is a no-op. +// Otherwise, the actions required depend on the journal-mode and the +// device characteristics of the file-system, as follows: +// +// * If the journal file is an in-memory journal file, no action need +// be taken. +// +// * Otherwise, if the device does not support the SAFE_APPEND property, +// then the nRec field of the most recently written journal header +// is updated to contain the number of journal records that have +// been written following it. If the pager is operating in full-sync +// mode, then the journal file is synced before this field is updated. +// +// * If the device does not support the SEQUENTIAL property, then +// journal file is synced. +// +// Or, in pseudo-code: +// +// if( NOT ){ +// if( NOT SAFE_APPEND ){ +// if( ) xSync(); +// +// } +// if( NOT SEQUENTIAL ) xSync(); +// } +// +// If successful, this routine clears the PGHDR_NEED_SYNC flag of every +// page currently held in memory before returning SQLITE_OK. If an IO +// error is encountered, then the IO error code is returned to the caller. +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var rc int32 // Return code + + rc = Xsqlite3PagerExclusiveLock(tls, pPager) + if rc != SQLITE_OK { + return rc + } + + if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { + + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_MEMORY { + var iDc int32 = Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd) + + if 0 == iDc&SQLITE_IOCAP_SAFE_APPEND { + // This block deals with an obscure problem. If the last connection + // that wrote to this database was operating in persistent-journal + // mode, then the journal file may at this point actually be larger + // than Pager.journalOff bytes. If the next thing in the journal + // file happens to be a journal-header (written as part of the + // previous connection's transaction), and a crash or power-failure + // occurs after nRec is updated but before this connection writes + // anything else to the journal file (or commits/rolls back its + // transaction), then SQLite may become confused when doing the + // hot-journal rollback following recovery. It may roll back all + // of this connections data, then proceed to rolling back the old, + // out-of-date data that follows it. Database corruption. + // + // To work around this, if the journal file does appear to contain + // a valid header following Pager.journalOff, then write a 0x00 + // byte to the start of it to prevent it from being recognized. + // + // Variable iNextHdrOffset is set to the offset at which this + // problematic header will occur, if it exists. aMagic is used + // as a temporary buffer to inspect the first couple of bytes of + // the potential journal header. + var iNextHdrOffset I64 + // var aMagic [8]U8 at bp+12, 8 + + // var zHeader [12]U8 at bp, 12 + + libc.Xmemcpy(tls, bp, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(unsafe.Sizeof(aJournalMagic))) + Xsqlite3Put4byte(tls, bp+8, uint32((*Pager)(unsafe.Pointer(pPager)).FnRec)) + + iNextHdrOffset = journalHdrOffset(tls, pPager) + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+12, 8, iNextHdrOffset) + if rc == SQLITE_OK && 0 == libc.Xmemcmp(tls, bp+12, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(8)) { + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, uintptr(unsafe.Pointer(&zerobyte)), 1, iNextHdrOffset) + } + if rc != SQLITE_OK && rc != SQLITE_IOERR|int32(2)<<8 { + return rc + } + + // Write the nRec value into the journal file header. If in + // full-synchronous mode, sync the journal first. This ensures that + // all data has really hit the disk before nRec is updated to mark + // it as a candidate for rollback. + // + // This is not required if the persistent media supports the + // SAFE_APPEND property. Because in this case it is not possible + // for garbage data to be appended to the file, the nRec field + // is populated with 0xFFFFFFFF when the journal header is written + // and never needs to be updated. + if (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 && 0 == iDc&SQLITE_IOCAP_SEQUENTIAL { + + rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) + if rc != SQLITE_OK { + return rc + } + } + + rc = Xsqlite3OsWrite(tls, + (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp, int32(unsafe.Sizeof([12]U8{})), (*Pager)(unsafe.Pointer(pPager)).FjournalHdr) + if rc != SQLITE_OK { + return rc + } + } + if 0 == iDc&SQLITE_IOCAP_SEQUENTIAL { + + rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)|func() int32 { + if int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags) == SQLITE_SYNC_FULL { + return SQLITE_SYNC_DATAONLY + } + return 0 + }()) + if rc != SQLITE_OK { + return rc + } + } + + (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + if newHdr != 0 && 0 == iDc&SQLITE_IOCAP_SAFE_APPEND { + (*Pager)(unsafe.Pointer(pPager)).FnRec = 0 + rc = writeJournalHdr(tls, pPager) + if rc != SQLITE_OK { + return rc + } + } + } else { + (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + } + } + + // Unless the pager is in noSync mode, the journal file was just + // successfully synced. Either way, clear the PGHDR_NEED_SYNC flag on + // all pages. + Xsqlite3PcacheClearSyncFlags(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_DBMOD) + + return SQLITE_OK +} + +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ + +// The argument is the first in a linked list of dirty pages connected +// by the PgHdr.pDirty pointer. This function writes each one of the +// in-memory pages in the list to the database file. The argument may +// be NULL, representing an empty list. In this case this function is +// a no-op. +// +// The pager must hold at least a RESERVED lock when this function +// is called. Before writing anything to the database file, this lock +// is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained, +// SQLITE_BUSY is returned and no data is written to the database file. +// +// If the pager is a temp-file pager and the actual file-system file +// is not yet open, it is created and opened before any data is +// written out. +// +// Once the lock has been upgraded and, if necessary, the file opened, +// the pages are written out to the database file in list order. Writing +// a page is skipped if it meets either of the following criteria: +// +// * The page number is greater than Pager.dbSize, or +// * The PGHDR_DONT_WRITE flag is set on the page. +// +// If writing out a page causes the database file to grow, Pager.dbFileSize +// is updated accordingly. If page 1 is written out, then the value cached +// in Pager.dbFileVers[] is updated to match the new value stored in +// the database file. +// +// If everything is successful, SQLITE_OK is returned. If an IO error +// occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot +// be obtained, SQLITE_BUSY is returned. +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK // Return code + + // This function is only called for rollback pagers in WRITER_DBMOD state. + + // If the file is a temp-file has not yet been opened, open it now. It + // is not possible for rc to be other than SQLITE_OK if this branch + // is taken, as pager_wait_on_lock() is a no-op for temp-files. + if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0)) { + + rc = pagerOpentemp(tls, pPager, (*Pager)(unsafe.Pointer(pPager)).Ffd, int32((*Pager)(unsafe.Pointer(pPager)).FvfsFlags)) + } + + // Before the first write, give the VFS a hint of what the final + // file size will be. + + if rc == SQLITE_OK && + (*Pager)(unsafe.Pointer(pPager)).FdbHintSize < (*Pager)(unsafe.Pointer(pPager)).FdbSize && + ((*PgHdr)(unsafe.Pointer(pList)).FpDirty != 0 || (*PgHdr)(unsafe.Pointer(pList)).Fpgno > (*Pager)(unsafe.Pointer(pPager)).FdbHintSize) { + *(*Sqlite3_int64)(unsafe.Pointer(bp /* szFile */)) = (*Pager)(unsafe.Pointer(pPager)).FpageSize * Sqlite3_int64((*Pager)(unsafe.Pointer(pPager)).FdbSize) + Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SIZE_HINT, bp) + (*Pager)(unsafe.Pointer(pPager)).FdbHintSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize + } + + for rc == SQLITE_OK && pList != 0 { + var pgno Pgno = (*PgHdr)(unsafe.Pointer(pList)).Fpgno + + // If there are dirty pages in the page cache with page numbers greater + // than Pager.dbSize, this means sqlite3PagerTruncateImage() was called to + // make the file smaller (presumably by auto-vacuum code). Do not write + // any such pages to the file. + // + // Also, do not write out any page that has the PGHDR_DONT_WRITE flag + // set (set by sqlite3PagerDontWrite()). + if pgno <= (*Pager)(unsafe.Pointer(pPager)).FdbSize && 0 == int32((*PgHdr)(unsafe.Pointer(pList)).Fflags)&PGHDR_DONT_WRITE { + var offset I64 = I64(pgno-Pgno(1)) * (*Pager)(unsafe.Pointer(pPager)).FpageSize // Offset to write + var pData uintptr // Data to write + + if (*PgHdr)(unsafe.Pointer(pList)).Fpgno == Pgno(1) { + pager_write_changecounter(tls, pList) + } + + pData = (*PgHdr)(unsafe.Pointer(pList)).FpData + + // Write out the page data. + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, pData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), offset) + + // If page 1 was just written, update Pager.dbFileVers to match + // the value now stored in the database file. If writing this + // page caused the database file to grow, update dbFileSize. + if pgno == Pgno(1) { + libc.Xmemcpy(tls, pPager+136, pData+24, uint64(unsafe.Sizeof([16]uint8{}))) + } + if pgno > (*Pager)(unsafe.Pointer(pPager)).FdbFileSize { + (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = pgno + } + *(*int32)(unsafe.Pointer(pPager + 240 + 2*4))++ + + // Update any backup objects copying the contents of this pager. + Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) + + } else { + + } + + pList = (*PgHdr)(unsafe.Pointer(pList)).FpDirty + } + + return rc +} + +// Ensure that the sub-journal file is open. If it is already open, this +// function is a no-op. +// +// SQLITE_OK is returned if everything goes according to plan. An +// SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() +// fails. +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ + var rc int32 = SQLITE_OK + if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { + var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | + SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | + SQLITE_OPEN_DELETEONCLOSE + var nStmtSpill int32 = Xsqlite3Config.FnStmtSpill + if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY || (*Pager)(unsafe.Pointer(pPager)).FsubjInMemory != 0 { + nStmtSpill = -1 + } + rc = Xsqlite3JournalOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, uintptr(0), (*Pager)(unsafe.Pointer(pPager)).Fsjfd, flags, nStmtSpill) + } + return rc +} + +// Append a record of the current state of page pPg to the sub-journal. +// +// If successful, set the bit corresponding to pPg->pgno in the bitvecs +// for all open savepoints before returning. +// +// This function returns SQLITE_OK if everything is successful, an IO +// error code if the attempt to write to the sub-journal fails, or +// SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint +// bitvec. +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ + var rc int32 = SQLITE_OK + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager + if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { + + // Open the sub-journal, if it has not already been opened + + rc = openSubJournal(tls, pPager) + + // If the sub-journal was opened successfully (or was already open), + // write the journal record into the file. + if rc == SQLITE_OK { + var pData uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpData + var offset I64 = I64((*Pager)(unsafe.Pointer(pPager)).FnSubRec) * (int64(4) + (*Pager)(unsafe.Pointer(pPager)).FpageSize) + var pData2 uintptr + pData2 = pData + + rc = write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd, offset, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) + if rc == SQLITE_OK { + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd, pData2, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), offset+int64(4)) + } + } + } + if rc == SQLITE_OK { + (*Pager)(unsafe.Pointer(pPager)).FnSubRec++ + + rc = addToSavepointBitvecs(tls, pPager, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) + } + return rc +} + +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ + if subjRequiresPage(tls, pPg) != 0 { + return subjournalPage(tls, pPg) + } else { + return SQLITE_OK + } + return int32(0) +} + +// This function is called by the pcache layer when it has reached some +// soft memory limit. The first argument is a pointer to a Pager object +// (cast as a void*). The pager is always 'purgeable' (not an in-memory +// database). The second argument is a reference to a page that is +// currently dirty but has no outstanding references. The page +// is always associated with the Pager object passed as the first +// argument. +// +// The job of this function is to make pPg clean by writing its contents +// out to the database file, if possible. This may involve syncing the +// journal file. +// +// If successful, sqlite3PcacheMakeClean() is called on the page and +// SQLITE_OK returned. If an IO error occurs while trying to make the +// page clean, the IO error code is returned. If the page cannot be +// made clean for some other reason, but no error occurs, then SQLITE_OK +// is returned by sqlite3PcacheMakeClean() is not called. +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ + var pPager uintptr = p + var rc int32 = SQLITE_OK + + // The doNotSpill NOSYNC bit is set during times when doing a sync of + // journal (and adding a new header) is not allowed. This occurs + // during calls to sqlite3PagerWrite() while trying to journal multiple + // pages belonging to the same sector. + // + // The doNotSpill ROLLBACK and OFF bits inhibits all cache spilling + // regardless of whether or not a sync is required. This is set during + // a rollback or by user request, respectively. + // + // Spilling is also prohibited when in an error state since that could + // lead to database corruption. In the current implementation it + // is impossible for sqlite3PcacheFetch() to be called with createFlag==3 + // while in the error state, hence it is impossible for this routine to + // be called in the error state. Nevertheless, we include a NEVER() + // test for the error state as a safeguard against future changes. + if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { + return SQLITE_OK + } + + if (*Pager)(unsafe.Pointer(pPager)).FdoNotSpill != 0 && + (int32((*Pager)(unsafe.Pointer(pPager)).FdoNotSpill)&(SPILLFLAG_ROLLBACK|SPILLFLAG_OFF) != 0 || + int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0) { + return SQLITE_OK + } + + *(*int32)(unsafe.Pointer(pPager + 240 + 3*4))++ + (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = uintptr(0) + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + // Write a single frame for this page to the log. + rc = subjournalPageIfRequired(tls, pPg) + if rc == SQLITE_OK { + rc = pagerWalFrames(tls, pPager, pPg, uint32(0), 0) + } + } else { + + // Sync the journal file if required. + if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0 || + int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_CACHEMOD { + rc = syncJournal(tls, pPager, 1) + } + + // Write the contents of the page out to the database file. + if rc == SQLITE_OK { + + rc = pager_write_pagelist(tls, pPager, pPg) + } + } + + // Mark the page as clean. + if rc == SQLITE_OK { + + Xsqlite3PcacheMakeClean(tls, pPg) + } + + return pager_error(tls, pPager, rc) +} + +// Flush all unreferenced dirty pages to disk. +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ + var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode + if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { + var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + + for rc == SQLITE_OK && pList != 0 { + var pNext uintptr = (*PgHdr)(unsafe.Pointer(pList)).FpDirty + if int32((*PgHdr)(unsafe.Pointer(pList)).FnRef) == 0 { + rc = pagerStress(tls, pPager, pList) + } + pList = pNext + } + } + + return rc +} + +// Allocate and initialize a new Pager object and put a pointer to it +// in *ppPager. The pager should eventually be freed by passing it +// to sqlite3PagerClose(). +// +// The zFilename argument is the path to the database file to open. +// If zFilename is NULL then a randomly-named temporary file is created +// and used as the file to be cached. Temporary files are be deleted +// automatically when they are closed. If zFilename is ":memory:" then +// all information is held in cache. It is never written to disk. +// This can be used to implement an in-memory database. +// +// The nExtra parameter specifies the number of bytes of space allocated +// along with each page reference. This space is available to the user +// via the sqlite3PagerGetExtra() API. When a new page is allocated, the +// first 8 bytes of this space are zeroed but the remainder is uninitialized. +// (The extra space is used by btree as the MemPage object.) +// +// The flags argument is used to specify properties that affect the +// operation of the pager. It should be passed some bitwise combination +// of the PAGER_* flags. +// +// The vfsFlags parameter is a bitmask to pass to the flags parameter +// of the xOpen() method of the supplied VFS when opening files. +// +// If the pager object is allocated and the specified file opened +// successfully, SQLITE_OK is returned and *ppPager set to point to +// the new pager object. If an error occurs, *ppPager is set to NULL +// and error code returned. This function may return SQLITE_NOMEM +// (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or +// various SQLITE_IO_XXX errors. +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pPtr uintptr + _ = pPtr + // var pPager uintptr at bp, 8 + // Pager object to allocate and return + var rc int32 // Return code + var tempFile int32 // True for temp files (incl. in-memory files) + var memDb int32 // True if this is an in-memory file + var memJM int32 // Memory journal mode + var readOnly int32 // True if this is a read-only file + var journalFileSize int32 // Bytes to allocate for each journal fd + var zPathname uintptr // Full path to database file + var nPathname int32 // Number of bytes in zPathname + var useJournal int32 // False to omit journal + var pcacheSize int32 // Bytes to allocate for PCache + // var szPageDflt U32 at bp+12, 4 + // Default page size + var zUri uintptr // URI args to copy + var nUriByte int32 // Number of bytes of URI args at *zUri + var nUri int32 + var z uintptr + var iDc int32 + // var fout int32 at bp+8, 4 + *(*uintptr)(unsafe.Pointer(bp /* pPager */)) = uintptr(0) + rc = SQLITE_OK + tempFile = 0 + memDb = 0 + memJM = 0 + readOnly = 0 + zPathname = uintptr(0) + nPathname = 0 + useJournal = libc.Bool32(flags&PAGER_OMIT_JOURNAL == 0) + pcacheSize = Xsqlite3PcacheSize(tls) + *(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */)) = U32(SQLITE_DEFAULT_PAGE_SIZE) + zUri = uintptr(0) + nUriByte = 1 + nUri = 0 // Number of URI parameters + + // Figure out how much space is required for each journal file-handle + // (there are two of them, the main journal and the sub-journal). + journalFileSize = (Xsqlite3JournalSize(tls, pVfs) + 7) & libc.CplInt32(7) + + // Set the output variable to NULL in case an error occurs. + *(*uintptr)(unsafe.Pointer(ppPager)) = uintptr(0) + + if !(flags&PAGER_MEMORY != 0) { + goto __1 + } + memDb = 1 + if !(zFilename != 0 && *(*uint8)(unsafe.Pointer(zFilename)) != 0) { + goto __2 + } + zPathname = Xsqlite3DbStrDup(tls, uintptr(0), zFilename) + if !(zPathname == uintptr(0)) { + goto __3 + } + return SQLITE_NOMEM +__3: + ; + nPathname = Xsqlite3Strlen30(tls, zPathname) + zFilename = uintptr(0) +__2: + ; +__1: + ; + + // Compute and store the full pathname in an allocated buffer pointed + // to by zPathname, length nPathname. Or, if this is a temporary file, + // leave both nPathname and zPathname set to 0. + if !(zFilename != 0 && *(*uint8)(unsafe.Pointer(zFilename)) != 0) { + goto __4 + } + nPathname = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + 1 + zPathname = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(nPathname*2)) + if !(zPathname == uintptr(0)) { + goto __5 + } + return SQLITE_NOMEM +__5: + ; + *(*uint8)(unsafe.Pointer(zPathname)) = uint8(0) // Make sure initialized even if FullPathname() fails + rc = Xsqlite3OsFullPathname(tls, pVfs, zFilename, nPathname, zPathname) + if !(rc != SQLITE_OK) { + goto __6 + } + if !(rc == SQLITE_OK|int32(2)<<8) { + goto __7 + } + if !(vfsFlags&SQLITE_OPEN_NOFOLLOW != 0) { + goto __8 + } + rc = SQLITE_CANTOPEN | int32(6)<<8 + goto __9 +__8: + rc = SQLITE_OK +__9: + ; +__7: + ; +__6: + ; + nPathname = Xsqlite3Strlen30(tls, zPathname) + z = libc.AssignUintptr(&zUri, zFilename+uintptr(Xsqlite3Strlen30(tls, zFilename)+1)) +__10: + if !(*(*uint8)(unsafe.Pointer(z)) != 0) { + goto __11 + } + z += uintptr(libc.Xstrlen(tls, z) + uint64(1)) + z += uintptr(libc.Xstrlen(tls, z) + uint64(1)) + nUri++ + goto __10 +__11: + ; + nUriByte = int32((int64(z+1) - int64(zUri)) / 1) + + if !(rc == SQLITE_OK && nPathname+8 > (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname) { + goto __12 + } + // This branch is taken when the journal path required by + // the database being opened will be more than pVfs->mxPathname + // bytes in length. This means the database cannot be opened, + // as it will not be possible to open the journal file or even + // check for a hot-journal before reading. + rc = Xsqlite3CantopenError(tls, 57957) +__12: + ; + if !(rc != SQLITE_OK) { + goto __13 + } + Xsqlite3DbFree(tls, uintptr(0), zPathname) + return rc +__13: + ; +__4: + ; + + // Allocate memory for the Pager structure, PCache object, the + // three file descriptors, the database file name and the journal + // file name. The layout in memory is as follows: + // + // Pager object (sizeof(Pager) bytes) + // PCache object (sqlite3PcacheSize() bytes) + // Database file handle (pVfs->szOsFile bytes) + // Sub-journal file handle (journalFileSize bytes) + // Main journal file handle (journalFileSize bytes) + // Ptr back to the Pager (sizeof(Pager*) bytes) + // \0\0\0\0 database prefix (4 bytes) + // Database file name (nPathname+1 bytes) + // URI query parameters (nUriByte bytes) + // Journal filename (nPathname+8+1 bytes) + // WAL filename (nPathname+4+1 bytes) + // \0\0\0 terminator (3 bytes) + // + // Some 3rd-party software, over which we have no control, depends on + // the specific order of the filenames and the \0 separators between them + // so that it can (for example) find the database filename given the WAL + // filename without using the sqlite3_filename_database() API. This is a + // misuse of SQLite and a bug in the 3rd-party software, but the 3rd-party + // software is in widespread use, so we try to avoid changing the filename + // order and formatting if possible. In particular, the details of the + // filename format expected by 3rd-party software should be as follows: + // + // - Main Database Path + // - \0 + // - Multiple URI components consisting of: + // - Key + // - \0 + // - Value + // - \0 + // - \0 + // - Journal Path + // - \0 + // - WAL Path (zWALName) + // - \0 + // + // The sqlite3_create_filename() interface and the databaseFilename() utility + // that is used by sqlite3_filename_database() and kin also depend on the + // specific formatting and order of the various filenames, so if the format + // changes here, be sure to change it there as well. + pPtr = Xsqlite3MallocZero(tls, + uint64((uint64(unsafe.Sizeof(Pager{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))+uint64((pcacheSize+7)&libc.CplInt32(7))+uint64(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+7)&libc.CplInt32(7))+uint64(journalFileSize*2)+uint64(unsafe.Sizeof(uintptr(0)))+uint64(4)+uint64(nPathname)+uint64(1)+uint64(nUriByte)+uint64(nPathname)+uint64(8)+uint64(1)+uint64(nPathname)+uint64(4)+uint64(1)+uint64(3))) + + if !!(pPtr != 0) { + goto __14 + } + Xsqlite3DbFree(tls, uintptr(0), zPathname) + return SQLITE_NOMEM +__14: + ; + *(*uintptr)(unsafe.Pointer(bp /* pPager */)) = pPtr + pPtr += uintptr((uint64(unsafe.Sizeof(Pager{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpPCache = pPtr + pPtr += uintptr((pcacheSize + 7) & libc.CplInt32(7)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd = pPtr + pPtr += uintptr(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile + 7) & libc.CplInt32(7)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Fsjfd = pPtr + pPtr += uintptr(journalFileSize) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Fjfd = pPtr + pPtr += uintptr(journalFileSize) + + libc.Xmemcpy(tls, pPtr, bp, uint64(unsafe.Sizeof(uintptr(0)))) + pPtr += uintptr(unsafe.Sizeof(uintptr(0))) + + // Fill in the Pager.zFilename and pPager.zQueryParam fields + pPtr += uintptr(4) // Skip zero prefix + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename = pPtr + if !(nPathname > 0) { + goto __15 + } + libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) + pPtr += uintptr(nPathname + 1) + if !(zUri != 0) { + goto __16 + } + libc.Xmemcpy(tls, pPtr, zUri, uint64(nUriByte)) + pPtr += uintptr(nUriByte) + goto __17 +__16: + pPtr++ +__17: + ; +__15: + ; + + // Fill in Pager.zJournal + if !(nPathname > 0) { + goto __18 + } + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzJournal = pPtr + libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) + pPtr += uintptr(nPathname) + libc.Xmemcpy(tls, pPtr, ts+3863, uint64(8)) + pPtr += uintptr(8 + 1) + goto __19 +__18: + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzJournal = uintptr(0) +__19: + ; + + // Fill in Pager.zWal + if !(nPathname > 0) { + goto __20 + } + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzWal = pPtr + libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) + pPtr += uintptr(nPathname) + libc.Xmemcpy(tls, pPtr, ts+3872, uint64(4)) + pPtr += uintptr(4 + 1) + goto __21 +__20: + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzWal = uintptr(0) +__21: + ; + _ = pPtr // Suppress warning about unused pPtr value + + if !(nPathname != 0) { + goto __22 + } + Xsqlite3DbFree(tls, uintptr(0), zPathname) +__22: + ; + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpVfs = pVfs + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FvfsFlags = U32(vfsFlags) + + // Open the pager file. + if !(zFilename != 0 && *(*uint8)(unsafe.Pointer(zFilename)) != 0) { + goto __23 + } + *(*int32)(unsafe.Pointer(bp + 8 /* fout */)) = 0 // VFS flags returned by xOpen() + rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd, vfsFlags, bp+8) + + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FmemVfs = U8(libc.AssignInt32(&memJM, libc.Bool32(*(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_MEMORY != 0))) + readOnly = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) + + // If the file was successfully opened for read/write access, + // choose a default page size in case we have to create the + // database file. The default page size is the maximum of: + // + // + SQLITE_DEFAULT_PAGE_SIZE, + // + The value returned by sqlite3OsSectorSize() + // + The largest page size that can be written atomically. + if !(rc == SQLITE_OK) { + goto __25 + } + iDc = Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd) + if !!(readOnly != 0) { + goto __26 + } + setSectorSize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) + + if !(*(*U32)(unsafe.Pointer(bp + 12)) < (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FsectorSize) { + goto __27 + } + if !((*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FsectorSize > U32(SQLITE_MAX_DEFAULT_PAGE_SIZE)) { + goto __28 + } + *(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */)) = U32(SQLITE_MAX_DEFAULT_PAGE_SIZE) + goto __29 +__28: + *(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */)) = (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FsectorSize +__29: + ; +__27: + ; +__26: + ; + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+3877, 0)) + if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3884, 0) != 0) { + goto __30 + } + vfsFlags = vfsFlags | SQLITE_OPEN_READONLY + goto act_like_temp_file +__30: + ; +__25: + ; + goto __24 +__23: + // If a temporary file is requested, it is not opened immediately. + // In this case we accept the default page size and delay actually + // opening the file until the first call to OsWrite(). + // + // This branch is also run for an in-memory database. An in-memory + // database is the same as a temp-file that is never written out to + // disk and uses an in-memory rollback journal. + // + // This branch also runs for files marked as immutable. +act_like_temp_file: + tempFile = 1 + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FeState = U8(PAGER_READER) // Pretend we already have a lock + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FeLock = U8(EXCLUSIVE_LOCK) // Pretend we are in EXCLUSIVE mode + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(1) // Do no locking + readOnly = vfsFlags & SQLITE_OPEN_READONLY +__24: + ; + + // The following call to PagerSetPagesize() serves to set the value of + // Pager.pageSize and to allocate the Pager.pTmpSpace buffer. + if !(rc == SQLITE_OK) { + goto __31 + } + + rc = Xsqlite3PagerSetPagesize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */)), bp+12, -1) + +__31: + ; + + // Initialize the PCache object. + if !(rc == SQLITE_OK) { + goto __32 + } + nExtra = (nExtra + 7) & libc.CplInt32(7) + + rc = Xsqlite3PcacheOpen(tls, int32(*(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */))), nExtra, libc.BoolInt32(!(memDb != 0)), + func() uintptr { + if !(memDb != 0) { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{pagerStress})) + } + return uintptr(0) + }(), *(*uintptr)(unsafe.Pointer(bp /* pPager */)), (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpPCache) +__32: + ; + + // If an error occurred above, free the Pager structure and close the file. + if !(rc != SQLITE_OK) { + goto __33 + } + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd) + Xsqlite3PageFree(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpTmpSpace) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) + return rc +__33: + ; + + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FuseJournal = U8(useJournal) + // pPager->stmtOpen = 0; + // pPager->stmtInUse = 0; + // pPager->nRef = 0; + // pPager->stmtSize = 0; + // pPager->stmtJSize = 0; + // pPager->nPage = 0; + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FmxPgno = Pgno(SQLITE_MAX_PAGE_COUNT) + // pPager->state = PAGER_UNLOCK; + // pPager->errMask = 0; + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FtempFile = U8(tempFile) + + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FexclusiveMode = U8(tempFile) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FchangeCountDone = (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FtempFile + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FmemDb = U8(memDb) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FreadOnly = U8(readOnly) + + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoSync = (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FtempFile + if !((*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoSync != 0) { + goto __34 + } + + goto __35 +__34: + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FfullSync = U8(1) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FextraSync = U8(0) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FsyncFlags = U8(SQLITE_SYNC_NORMAL) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FwalSyncFlags = U8(SQLITE_SYNC_NORMAL | int32(SQLITE_SYNC_NORMAL)<<2) +__35: + ; + // pPager->pFirst = 0; + // pPager->pFirstSynced = 0; + // pPager->pLast = 0; + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnExtra = U16(nExtra) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalSizeLimit = int64(-1) + + setSectorSize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) + if !!(useJournal != 0) { + goto __36 + } + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalMode = U8(PAGER_JOURNALMODE_OFF) + goto __37 +__36: + if !(memDb != 0 || memJM != 0) { + goto __38 + } + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalMode = U8(PAGER_JOURNALMODE_MEMORY) +__38: + ; +__37: + ; + // pPager->xBusyHandler = 0; + // pPager->pBusyHandlerArg = 0; + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FxReiniter = xReinit + setGetterMethod(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) + // memset(pPager->aHash, 0, sizeof(pPager->aHash)); + // pPager->szMmap = SQLITE_DEFAULT_MMAP_SIZE // will be set by btree.c + + *(*uintptr)(unsafe.Pointer(ppPager)) = *(*uintptr)(unsafe.Pointer(bp /* pPager */)) + return SQLITE_OK +} + +// Return the sqlite3_file for the main database given the name +// of the corresonding WAL or Journal name as passed into +// xOpen. +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ + var pPager uintptr + for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { + zName-- + } + pPager = *(*uintptr)(unsafe.Pointer(zName - uintptr(4) - uintptr(uint64(unsafe.Sizeof(uintptr(0)))))) + return (*Pager)(unsafe.Pointer(pPager)).Ffd +} + +// This function is called after transitioning from PAGER_UNLOCK to +// PAGER_SHARED state. It tests if there is a hot journal present in +// the file-system for the given pager. A hot journal is one that +// needs to be played back. According to this function, a hot-journal +// file exists if the following criteria are met: +// +// * The journal file exists in the file system, and +// * No process holds a RESERVED or greater lock on the database file, and +// * The database file itself is greater than 0 bytes in size, and +// * The first byte of the journal file exists and is not 0x00. +// +// If the current size of the database file is 0 but a journal file +// exists, that is probably an old journal left over from a prior +// database with the same name. In this case the journal file is +// just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK +// is returned. +// +// This routine does not check if there is a super-journal filename +// at the end of the file. If there is, and that super-journal file +// does not exist, then the journal file is not really hot. In this +// case this routine will return a false-positive. The pager_playback() +// routine will discover that the journal file is not really hot and +// will not roll it back. +// +// If a hot-journal file is found to exist, *pExists is set to 1 and +// SQLITE_OK returned. If no hot-journal file is present, *pExists is +// set to 0 and SQLITE_OK returned. If an IO error occurs while trying +// to determine whether or not a hot-journal file exists, the IO error +// code is returned and the value of *pExists is undefined. +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ + bp := tls.Alloc(17) + defer tls.Free(17) + + var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs + var rc int32 = SQLITE_OK // Return code + *(*int32)(unsafe.Pointer(bp /* exists */)) = 1 // True if a journal file is present + var jrnlOpen int32 = libc.BoolInt32(!!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0))) + + *(*int32)(unsafe.Pointer(pExists)) = 0 + if !(jrnlOpen != 0) { + rc = Xsqlite3OsAccess(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp) + } + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { + *(*int32)(unsafe.Pointer(bp + 4 /* locked */)) = 0 // True if some process holds a RESERVED lock + + // Race condition here: Another process might have been holding the + // the RESERVED lock and have a journal open at the sqlite3OsAccess() + // call above, but then delete the journal and drop the lock before + // we get to the following sqlite3OsCheckReservedLock() call. If that + // is the case, this routine might think there is a hot journal when + // in fact there is none. This results in a false-positive which will + // be dealt with by the playback routine. Ticket #3883. + rc = Xsqlite3OsCheckReservedLock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+4) + if rc == SQLITE_OK && !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) { + // var nPage Pgno at bp+8, 4 + // Number of pages in database file + + rc = pagerPagecount(tls, pPager, bp+8) + if rc == SQLITE_OK { + // If the database is zero pages in size, that means that either (1) the + // journal is a remnant from a prior database with the same name where + // the database file but not the journal was deleted, or (2) the initial + // transaction that populates a new database is being rolled back. + // In either case, the journal file can be deleted. However, take care + // not to delete the journal file if it is already open due to + // journal_mode=PERSIST. + if *(*Pgno)(unsafe.Pointer(bp + 8)) == Pgno(0) && !(jrnlOpen != 0) { + Xsqlite3BeginBenignMalloc(tls) + if pagerLockDb(tls, pPager, RESERVED_LOCK) == SQLITE_OK { + Xsqlite3OsDelete(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, 0) + if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { + pagerUnlockDb(tls, pPager, SHARED_LOCK) + } + } + Xsqlite3EndBenignMalloc(tls) + } else { + // The journal file exists and no other connection has a reserved + // or greater lock on the database file. Now check that there is + // at least one non-zero bytes at the start of the journal file. + // If there is, then we consider this journal to be hot. If not, + // it can be ignored. + if !(jrnlOpen != 0) { + *(*int32)(unsafe.Pointer(bp + 12 /* f */)) = SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_JOURNAL + rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, *(*int32)(unsafe.Pointer(bp + 12 /* f */)), bp+12) + } + if rc == SQLITE_OK { + *(*U8)(unsafe.Pointer(bp + 16 /* first */)) = U8(0) + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16, 1, int64(0)) + if rc == SQLITE_IOERR|int32(2)<<8 { + rc = SQLITE_OK + } + if !(jrnlOpen != 0) { + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + } + *(*int32)(unsafe.Pointer(pExists)) = libc.Bool32(int32(*(*U8)(unsafe.Pointer(bp + 16))) != 0) + } else if rc == SQLITE_CANTOPEN { + // If we cannot open the rollback journal file in order to see if + // it has a zero header, that might be due to an I/O error, or + // it might be due to the race condition described above and in + // ticket #3883. Either way, assume that the journal is hot. + // This might be a false positive. But if it is, then the + // automatic journal playback and recovery mechanism will deal + // with it under an EXCLUSIVE lock where we do not need to + // worry so much with race conditions. + *(*int32)(unsafe.Pointer(pExists)) = 1 + rc = SQLITE_OK + } + } + } + } + } + + return rc +} + +// This function is called to obtain a shared lock on the database file. +// It is illegal to call sqlite3PagerGet() until after this function +// has been successfully called. If a shared-lock is already held when +// this function is called, it is a no-op. +// +// The following operations are also performed by this function. +// +// 1) If the pager is currently in PAGER_OPEN state (no lock held +// on the database file), then an attempt is made to obtain a +// SHARED lock on the database file. Immediately after obtaining +// the SHARED lock, the file-system is checked for a hot-journal, +// which is played back if present. Following any hot-journal +// rollback, the contents of the cache are validated by checking +// the 'change-counter' field of the database file header and +// discarded if they are found to be invalid. +// +// 2) If the pager is running in exclusive-mode, and there are currently +// no outstanding references to any pages, and is in the error state, +// then an attempt is made to clear the error state by discarding +// the contents of the page cache and rolling back any open journal +// file. +// +// If everything is successful, SQLITE_OK is returned. If an IO error +// occurs while locking the database, checking for a hot-journal file or +// rolling back a journal file, the IO error code is returned. +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + var rc int32 + // var fout int32 at bp+8, 4 + + var f int32 + var pVfs uintptr + // var bExists int32 at bp+4, 4 + + // The shared-lock has just been acquired then check to + // see if the database has been modified. If the database has changed, + // flush the cache. The hasHeldSharedLock flag prevents this from + // occurring on the very first access to a file, in order to save a + // single unnecessary sqlite3OsRead() call at the start-up. + // + // Database changes are detected by looking at 15 bytes beginning + // at offset 24 into the file. The first 4 of these 16 bytes are + // a 32-bit counter that is incremented with each change. The + // other bytes change randomly with each file change when + // a codec is in use. + // + // There is a vanishingly small chance that a change will not be + // detected. The chance of an undetected change is so small that + // it can be neglected. + // var dbFileVers [16]uint8 at bp+12, 16 + + // var bHotJournal int32 at bp, 4 + rc = SQLITE_OK // Return code + + // This routine is only called from b-tree and only when there are no + // outstanding pages. This implies that the pager state should either + // be OPEN or READER. READER is only possible if the pager is or was in + // exclusive access mode. + + if !(!((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) && int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) { + goto __1 + } + *(*int32)(unsafe.Pointer(bp /* bHotJournal */)) = 1 // True if there exists a hot journal-file + + rc = pager_wait_on_lock(tls, pPager, SHARED_LOCK) + if !(rc != SQLITE_OK) { + goto __2 + } + + goto failed +__2: + ; + + // If a journal file exists, and there is no RESERVED lock on the + // database file, then it either needs to be played back or deleted. + if !(int32((*Pager)(unsafe.Pointer(pPager)).FeLock) <= SHARED_LOCK) { + goto __3 + } + rc = hasHotJournal(tls, pPager, bp) +__3: + ; + if !(rc != SQLITE_OK) { + goto __4 + } + goto failed +__4: + ; + if !(*(*int32)(unsafe.Pointer(bp)) != 0) { + goto __5 + } + if !((*Pager)(unsafe.Pointer(pPager)).FreadOnly != 0) { + goto __6 + } + rc = SQLITE_READONLY | int32(3)<<8 + goto failed +__6: + ; + + // Get an EXCLUSIVE lock on the database file. At this point it is + // important that a RESERVED lock is not obtained on the way to the + // EXCLUSIVE lock. If it were, another process might open the + // database file, detect the RESERVED lock, and conclude that the + // database is safe to read while this process is still rolling the + // hot-journal back. + // + // Because the intermediate RESERVED lock is not requested, any + // other process attempting to access the database file will get to + // this point in the code and fail to obtain its own EXCLUSIVE lock + // on the database file. + // + // Unless the pager is in locking_mode=exclusive mode, the lock is + // downgraded to SHARED_LOCK before this function returns. + rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) + if !(rc != SQLITE_OK) { + goto __7 + } + goto failed +__7: + ; + + // If it is not already open and the file exists on disk, open the + // journal for read/write access. Write access is required because + // in exclusive-access mode the file descriptor will be kept open + // and possibly used for a transaction later on. Also, write-access + // is usually required to finalize the journal in journal_mode=persist + // mode (and also for journal_mode=truncate on some systems). + // + // If the journal does not exist, it usually means that some + // other connection managed to get in and roll it back before + // this connection obtained the exclusive lock above. Or, it + // may mean that the pager was in the error-state when this + // function was called and the journal file does not exist. + if !(!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF) { + goto __8 + } + pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs // True if journal file exists + rc = Xsqlite3OsAccess(tls, + pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp+4) + if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 4)) != 0) { + goto __9 + } + *(*int32)(unsafe.Pointer(bp + 8 /* fout */)) = 0 + f = SQLITE_OPEN_READWRITE | SQLITE_OPEN_MAIN_JOURNAL + + rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, f, bp+8) + + if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { + goto __10 + } + rc = Xsqlite3CantopenError(tls, 58487) + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) +__10: + ; +__9: + ; +__8: + ; + + // Playback and delete the journal. Drop the database write + // lock and reacquire the read lock. Purge the cache before + // playing back the hot-journal so that we don't end up with + // an inconsistent cache. Sync the hot journal before playing + // it back since the process that crashed and left the hot journal + // probably did not sync it and we are required to always sync + // the journal before playing it back. + if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) { + goto __11 + } + + rc = pagerSyncHotJournal(tls, pPager) + if !(rc == SQLITE_OK) { + goto __13 + } + rc = pager_playback(tls, pPager, libc.BoolInt32(!((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0))) + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) +__13: + ; + goto __12 +__11: + if !!(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { + goto __14 + } + pagerUnlockDb(tls, pPager, SHARED_LOCK) +__14: + ; +__12: + ; + + if !(rc != SQLITE_OK) { + goto __15 + } + // This branch is taken if an error occurs while trying to open + // or roll back a hot-journal while holding an EXCLUSIVE lock. The + // pager_unlock() routine will be called before returning to unlock + // the file. If the unlock attempt fails, then Pager.eLock must be + // set to UNKNOWN_LOCK (see the comment above the #define for + // UNKNOWN_LOCK above for an explanation). + // + // In order to get pager_unlock() to do this, set Pager.eState to + // PAGER_ERROR now. This is not actually counted as a transition + // to ERROR state in the state diagram at the top of this file, + // since we know that the same call to pager_unlock() will very + // shortly transition the pager object to the OPEN state. Calling + // assert_pager_state() would fail now, as it should not be possible + // to be in ERROR state when there are zero outstanding page + // references. + pager_error(tls, pPager, rc) + goto failed +__15: + ; + +__5: + ; + + if !(!(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && (*Pager)(unsafe.Pointer(pPager)).FhasHeldSharedLock != 0) { + goto __16 + } + + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+12, int32(unsafe.Sizeof([16]uint8{})), int64(24)) + if !(rc != SQLITE_OK) { + goto __17 + } + if !(rc != SQLITE_IOERR|int32(2)<<8) { + goto __18 + } + goto failed +__18: + ; + libc.Xmemset(tls, bp+12, 0, uint64(unsafe.Sizeof([16]uint8{}))) +__17: + ; + + if !(libc.Xmemcmp(tls, pPager+136, bp+12, uint64(unsafe.Sizeof([16]uint8{}))) != 0) { + goto __19 + } + pager_reset(tls, pPager) + + // Unmap the database file. It is possible that external processes + // may have truncated the database file and then extended it back + // to its original size while this process was not holding a lock. + // In this case there may exist a Pager.pMap mapping that appears + // to be the right size but is not actually valid. Avoid this + // possibility by unmapping the db here. + if !((*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0) { + goto __20 + } + Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int64(0), uintptr(0)) +__20: + ; +__19: + ; +__16: + ; + + // If there is a WAL file in the file-system, open this database in WAL + // mode. Otherwise, the following function call is a no-op. + rc = pagerOpenWalIfPresent(tls, pPager) + +__1: + ; + + if !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { + goto __21 + } + + rc = pagerBeginReadTransaction(tls, pPager) +__21: + ; + + if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 && int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN && rc == SQLITE_OK) { + goto __22 + } + rc = pagerPagecount(tls, pPager, pPager+32) +__22: + ; + +failed: + if !(rc != SQLITE_OK) { + goto __23 + } + + pager_unlock(tls, pPager) + + goto __24 +__23: + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_READER) + (*Pager)(unsafe.Pointer(pPager)).FhasHeldSharedLock = U8(1) +__24: + ; + return rc +} + +// If the reference count has reached zero, rollback any active +// transaction and unlock the pager. +// +// Except, in locking_mode=EXCLUSIVE when there is nothing to in +// the rollback journal, the unlock is not performed and there is +// nothing to rollback, so this routine is a no-op. +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ + if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { + // because page1 is never memory mapped + pagerUnlockAndRollback(tls, pPager) + } +} + +// The page getter methods each try to acquire a reference to a +// page with page number pgno. If the requested reference is +// successfully obtained, it is copied to *ppPage and SQLITE_OK returned. +// +// There are different implementations of the getter method depending +// on the current state of the pager. +// +// getPageNormal() -- The normal getter +// getPageError() -- Used if the pager is in an error state +// getPageMmap() -- Used if memory-mapped I/O is enabled +// +// If the requested page is already in the cache, it is returned. +// Otherwise, a new page object is allocated and populated with data +// read from the database file. In some cases, the pcache module may +// choose not to allocate a new page object and may reuse an existing +// object with no outstanding references. +// +// The extra data appended to a page is always initialized to zeros the +// first time a page is loaded into memory. If the page requested is +// already in the cache when this function is called, then the extra +// data is left as it was when the page object was last used. +// +// If the database image is smaller than the requested page or if +// the flags parameter contains the PAGER_GET_NOCONTENT bit and the +// requested page is not already stored in the cache, then no +// actual disk read occurs. In this case the memory image of the +// page is initialized to all zeros. +// +// If PAGER_GET_NOCONTENT is true, it means that we do not care about +// the contents of the page. This occurs in two scenarios: +// +// a) When reading a free-list leaf page from the database, and +// +// b) When a savepoint is being rolled back and we need to load +// a new page into the cache to be filled with the data read +// from the savepoint journal. +// +// If PAGER_GET_NOCONTENT is true, then the data returned is zeroed instead +// of being read from the database. Additionally, the bits corresponding +// to pgno in Pager.pInJournal (bitvec of pages already written to the +// journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open +// savepoints are set. This means if the page is made writable at any +// point in the future, using a call to sqlite3PagerWrite(), its contents +// will not be journaled. This saves IO. +// +// The acquisition might fail for several reasons. In all cases, +// an appropriate error code is returned and *ppPage is set to NULL. +// +// See also sqlite3PagerLookup(). Both this routine and Lookup() attempt +// to find a page in the in-memory cache first. If the page is not already +// in memory, this routine goes to disk to read it in whereas Lookup() +// just returns 0. This routine acquires a read-lock the first time it +// has to go to disk, and could also playback an old journal if necessary. +// Since Lookup() never goes to disk, it never has to deal with locks +// or journal files. +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + var pPg uintptr + var noContent U8 // True if PAGER_GET_NOCONTENT is set + // var pBase uintptr at bp, 8 + rc = SQLITE_OK + + if !(pgno == Pgno(0)) { + goto __1 + } + return Xsqlite3CorruptError(tls, 58700) +__1: + ; + *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) + if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) { + goto __2 + } + pPg = uintptr(0) + rc = Xsqlite3PcacheFetchStress(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, bp) + if !(rc != SQLITE_OK) { + goto __3 + } + goto pager_acquire_err +__3: + ; + if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) { + goto __4 + } + rc = SQLITE_NOMEM + goto pager_acquire_err +__4: + ; +__2: + ; + pPg = libc.AssignPtrUintptr(ppPage, Xsqlite3PcacheFetchFinish(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, *(*uintptr)(unsafe.Pointer(bp /* pBase */)))) + + noContent = U8(libc.Bool32(flags&PAGER_GET_NOCONTENT != 0)) + if !((*PgHdr)(unsafe.Pointer(pPg)).FpPager != 0 && !(noContent != 0)) { + goto __5 + } + // In this case the pcache already contains an initialized copy of + // the page. Return without further ado. + + *(*int32)(unsafe.Pointer(pPager + 240))++ + return SQLITE_OK + + goto __6 +__5: + // The pager cache has created a new page. Its content needs to + // be initialized. But first some error checks: + // + // (*) obsolete. Was: maximum page number is 2^31 + // (2) Never try to fetch the locking page + if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { + goto __7 + } + rc = Xsqlite3CorruptError(tls, 58732) + goto pager_acquire_err +__7: + ; + + (*PgHdr)(unsafe.Pointer(pPg)).FpPager = pPager + + if !(!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0)) || (*Pager)(unsafe.Pointer(pPager)).FdbSize < pgno || noContent != 0) { + goto __8 + } + if !(pgno > (*Pager)(unsafe.Pointer(pPager)).FmxPgno) { + goto __10 + } + rc = SQLITE_FULL + goto pager_acquire_err +__10: + ; + if !(noContent != 0) { + goto __11 + } + // Failure to set the bits in the InJournal bit-vectors is benign. + // It merely means that we might do some extra work to journal a + // page that does not need to be journaled. Nevertheless, be sure + // to test the case where a malloc error occurs while trying to set + // a bit in a bit vector. + Xsqlite3BeginBenignMalloc(tls) + if !(pgno <= (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize) { + goto __12 + } + Xsqlite3BitvecSet(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, pgno) + +__12: + ; + addToSavepointBitvecs(tls, pPager, pgno) + + Xsqlite3EndBenignMalloc(tls) +__11: + ; + libc.Xmemset(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData, 0, uint64((*Pager)(unsafe.Pointer(pPager)).FpageSize)) + + goto __9 +__8: + ; + *(*int32)(unsafe.Pointer(pPager + 240 + 1*4))++ + rc = readDbPage(tls, pPg) + if !(rc != SQLITE_OK) { + goto __13 + } + goto pager_acquire_err +__13: + ; +__9: + ; + +__6: + ; + return SQLITE_OK + +pager_acquire_err: + ; + if !(pPg != 0) { + goto __14 + } + Xsqlite3PcacheDrop(tls, pPg) +__14: + ; + pagerUnlockIfUnused(tls, pPager) + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) + return rc +} + +// The page getter for when memory-mapped I/O is enabled +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */)) = uintptr(0) + *(*U32)(unsafe.Pointer(bp /* iFrame */)) = U32(0) // Frame to read from WAL file + + // It is acceptable to use a read-only (mmap) page for any page except + // page 1 if there is no write-transaction open or the ACQUIRE_READONLY + // flag was specified by the caller. And so long as the db is not a + // temporary or in-memory database. + var bMmapOk int32 = libc.Bool32(pgno > Pgno(1) && + (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) + + // Optimization note: Adding the "pgno<=1" term before "pgno==0" here + // allows the compiler optimizer to reuse the results of the "pgno>1" + // test in the previous statement, and avoid testing pgno==0 in the + // common case where pgno is large. + if pgno <= Pgno(1) && pgno == Pgno(0) { + return Xsqlite3CorruptError(tls, 58811) + } + + if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pgno, bp) + if rc != SQLITE_OK { + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) + return rc + } + } + if bMmapOk != 0 && *(*U32)(unsafe.Pointer(bp)) == U32(0) { + *(*uintptr)(unsafe.Pointer(bp + 8 /* pData */)) = uintptr(0) + rc = Xsqlite3OsFetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, + I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), bp+8) + if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) > PAGER_READER || (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { + *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */)) = Xsqlite3PagerLookup(tls, pPager, pgno) + } + if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) { + rc = pagerAcquireMapPage(tls, pPager, pgno, *(*uintptr)(unsafe.Pointer(bp + 8 /* pData */)), bp+16) + } else { + Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, *(*uintptr)(unsafe.Pointer(bp + 8 /* pData */))) + } + if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { + + *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */)) + return SQLITE_OK + } + } + if rc != SQLITE_OK { + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) + return rc + } + } + return getPageNormal(tls, pPager, pgno, ppPage, flags) +} + +// The page getter method for when the pager is an error state +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ + _ = pgno + _ = flags + + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) + return (*Pager)(unsafe.Pointer(pPager)).FerrCode +} + +// Dispatch all page fetch requests to the appropriate getter method. +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ + // printf("PAGE %u\n", pgno); fflush(stdout); + return (*struct { + f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxGet})).f(tls, pPager, pgno, ppPage, flags) +} + +// Acquire a page if it is already in the in-memory cache. Do +// not read the page from disk. Return a pointer to the page, +// or 0 if the page is not in cache. +// +// See also sqlite3PagerGet(). The difference between this routine +// and sqlite3PagerGet() is that _get() will go to the disk and read +// in the page if the page is not already in cache. This routine +// returns NULL if the page is not in cache or if a disk I/O error +// has ever happened. +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ + var pPage uintptr + + pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) + + if pPage == uintptr(0) { + return uintptr(0) + } + return Xsqlite3PcacheFetchFinish(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, pPage) +} + +// Release a page reference. +// +// The sqlite3PagerUnref() and sqlite3PagerUnrefNotNull() may only be +// used if we know that the page being released is not the last page. +// The btree layer always holds page1 open until the end, so these first +// to routines can be used to release any page other than BtShared.pPage1. +// +// Use sqlite3PagerUnrefPageOne() to release page1. This latter routine +// checks the total number of outstanding pages and if the number of +// pages reaches zero it drops the database lock. +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ + + if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { + // Page1 is never memory mapped + pagerReleaseMapPage(tls, pPg) + } else { + Xsqlite3PcacheRelease(tls, pPg) + } + // Do not use this routine to release the last reference to page1 + +} + +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ + if pPg != 0 { + Xsqlite3PagerUnrefNotNull(tls, pPg) + } +} + +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ + var pPager uintptr + + // Page1 is never memory mapped + pPager = (*DbPage)(unsafe.Pointer(pPg)).FpPager + Xsqlite3PcacheRelease(tls, pPg) + pagerUnlockIfUnused(tls, pPager) +} + +// This function is called at the start of every write transaction. +// There must already be a RESERVED or EXCLUSIVE lock on the database +// file when this routine is called. +// +// Open the journal file for pager pPager and write a journal header +// to the start of it. If there are active savepoints, open the sub-journal +// as well. This function is only used when the journal file is being +// opened to write a rollback log for a transaction. It is not used +// when opening a hot journal file to roll it back. +// +// If the journal file is already open (as it may be in exclusive mode), +// then this function just writes a journal header to the start of the +// already open file. +// +// Whether or not the journal file is opened by this function, the +// Pager.pInJournal bitvec structure is allocated. +// +// Return SQLITE_OK if everything is successful. Otherwise, return +// SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or +// an IO error code if opening or writing the journal file fails. +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ + var rc int32 = SQLITE_OK // Return code + var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer + + // If already in the error state, this function is a no-op. But on + // the other hand, this routine is never called if we are already in + // an error state. + if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { + return (*Pager)(unsafe.Pointer(pPager)).FerrCode + } + + if !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { + (*Pager)(unsafe.Pointer(pPager)).FpInJournal = Xsqlite3BitvecCreate(tls, (*Pager)(unsafe.Pointer(pPager)).FdbSize) + if (*Pager)(unsafe.Pointer(pPager)).FpInJournal == uintptr(0) { + return SQLITE_NOMEM + } + + // Open the journal file if it is not already open. + if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) { + if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY { + Xsqlite3MemJournalOpen(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + } else { + var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE + var nSpill int32 + + if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { + flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + nSpill = Xsqlite3Config.FnStmtSpill + } else { + flags = flags | SQLITE_OPEN_MAIN_JOURNAL + nSpill = jrnlBufferSize(tls, pPager) + } + + // Verify that the database still has the same name as it did when + // it was originally opened. + rc = databaseIsUnmoved(tls, pPager) + if rc == SQLITE_OK { + rc = Xsqlite3JournalOpen(tls, + pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, flags, nSpill) + } + } + + } + + // Write the first journal header to the journal file and open + // the sub-journal if necessary. + if rc == SQLITE_OK { + // TODO: Check if all of these are really required. + (*Pager)(unsafe.Pointer(pPager)).FnRec = 0 + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) + (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(0) + (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = int64(0) + rc = writeJournalHdr(tls, pPager) + } + } + + if rc != SQLITE_OK { + Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) + (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) + } else { + + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_CACHEMOD) + } + + return rc +} + +// Begin a write-transaction on the specified pager object. If a +// write-transaction has already been opened, this function is a no-op. +// +// If the exFlag argument is false, then acquire at least a RESERVED +// lock on the database file. If exFlag is true, then acquire at least +// an EXCLUSIVE lock. If such a lock is already held, no locking +// functions need be called. +// +// If the subjInMemory argument is non-zero, then any sub-journal opened +// within this transaction will be opened as an in-memory file. This +// has no effect if the sub-journal is already opened (as it may be when +// running in exclusive mode) or if the transaction does not require a +// sub-journal. If the subjInMemory argument is zero, then any required +// sub-journal is implemented in-memory if pPager is an in-memory database, +// or using a temporary file otherwise. +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ + var rc int32 = SQLITE_OK + + if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { + return (*Pager)(unsafe.Pointer(pPager)).FerrCode + } + + (*Pager)(unsafe.Pointer(pPager)).FsubjInMemory = U8(subjInMemory) + + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER { + + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + // If the pager is configured to use locking_mode=exclusive, and an + // exclusive lock on the database is not already held, obtain it now. + if (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 && Xsqlite3WalExclusiveMode(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, -1) != 0 { + rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) + if rc != SQLITE_OK { + return rc + } + Xsqlite3WalExclusiveMode(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, 1) + } + + // Grab the write lock on the log file. If successful, upgrade to + // PAGER_RESERVED state. Otherwise, return an error code to the caller. + // The busy-handler is not invoked if another connection already + // holds the write-lock. If possible, the upper layer will call it. + rc = Xsqlite3WalBeginWriteTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) + } else { + // Obtain a RESERVED lock on the database file. If the exFlag parameter + // is true, then immediately upgrade this to an EXCLUSIVE lock. The + // busy-handler callback can be used when upgrading to the EXCLUSIVE + // lock, but not when obtaining the RESERVED lock. + rc = pagerLockDb(tls, pPager, RESERVED_LOCK) + if rc == SQLITE_OK && exFlag != 0 { + rc = pager_wait_on_lock(tls, pPager, EXCLUSIVE_LOCK) + } + } + + if rc == SQLITE_OK { + // Change to WRITER_LOCKED state. + // + // WAL mode sets Pager.eState to PAGER_WRITER_LOCKED or CACHEMOD + // when it has an open transaction, but never to DBMOD or FINISHED. + // This is because in those states the code to roll back savepoint + // transactions may copy data from the sub-journal into the database + // file as well as into the page cache. Which would be incorrect in + // WAL mode. + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_LOCKED) + (*Pager)(unsafe.Pointer(pPager)).FdbHintSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize + (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize + (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) + } + + } + + return rc +} + +// Write page pPg onto the end of the rollback journal. +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager + var rc int32 + var cksum U32 + var pData2 uintptr + var iOff I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + + // We should never write to the journal file the page that + // contains the database locks. The following assert verifies + // that we do not. + + pData2 = (*PgHdr)(unsafe.Pointer(pPg)).FpData + cksum = pager_cksum(tls, pPager, pData2) + + // Even if an IO or diskfull error occurs while journalling the + // page in the block above, set the need-sync flag for the page. + // Otherwise, when the transaction is rolled back, the logic in + // playback_one_page() will think that the page needs to be restored + // in the database file. And if an IO error occurs while doing so, + // then corruption may follow. + *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_NEED_SYNC) + + rc = write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iOff, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) + if rc != SQLITE_OK { + return rc + } + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, pData2, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), iOff+int64(4)) + if rc != SQLITE_OK { + return rc + } + rc = write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iOff+(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(4), cksum) + if rc != SQLITE_OK { + return rc + } + + *(*I64)(unsafe.Pointer(pPager + 96)) += int64(8) + (*Pager)(unsafe.Pointer(pPager)).FpageSize + (*Pager)(unsafe.Pointer(pPager)).FnRec++ + + rc = Xsqlite3BitvecSet(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) + + rc = rc | addToSavepointBitvecs(tls, pPager, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) + + return rc +} + +// Mark a single data page as writeable. The page is written into the +// main journal or sub-journal as required. If the page is written into +// one of the journals, the corresponding bit is set in the +// Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs +// of any open savepoints as appropriate. +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager + var rc int32 = SQLITE_OK + + // This routine is not called unless a write-transaction has already + // been started. The journal file may or may not be open at this point. + // It is never called in the ERROR state. + + // The journal file needs to be opened. Higher level routines have already + // obtained the necessary locks to begin the write-transaction, but the + // rollback journal might not yet be open. Open it now if this is the case. + // + // This is done before calling sqlite3PcacheMakeDirty() on the page. + // Otherwise, if it were done after calling sqlite3PcacheMakeDirty(), then + // an error might occur and the pager would end up in WRITER_LOCKED state + // with pages marked as dirty in the cache. + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_LOCKED { + rc = pager_open_journal(tls, pPager) + if rc != SQLITE_OK { + return rc + } + } + + // Mark the page that is about to be modified as dirty. + Xsqlite3PcacheMakeDirty(tls, pPg) + + // If a rollback journal is in use, them make sure the page that is about + // to change is in the rollback journal, or if the page is a new page off + // then end of the file, make sure it is marked as PGHDR_NEED_SYNC. + + if (*Pager)(unsafe.Pointer(pPager)).FpInJournal != uintptr(0) && + Xsqlite3BitvecTestNotNull(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) == 0 { + + if (*PgHdr)(unsafe.Pointer(pPg)).Fpgno <= (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize { + rc = pagerAddPageToRollbackJournal(tls, pPg) + if rc != SQLITE_OK { + return rc + } + } else { + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_WRITER_DBMOD { + *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_NEED_SYNC) + } + + } + } + + // The PGHDR_DIRTY bit is set above when the page was added to the dirty-list + // and before writing the page into the rollback journal. Wait until now, + // after the page has been successfully journalled, before setting the + // PGHDR_WRITEABLE bit that indicates that the page can be safely modified. + *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_WRITEABLE) + + // If the statement journal is open and the page is not in it, + // then write the page into the statement journal. + if (*Pager)(unsafe.Pointer(pPager)).FnSavepoint > 0 { + rc = subjournalPageIfRequired(tls, pPg) + } + + // Update the database size and return. + if (*Pager)(unsafe.Pointer(pPager)).FdbSize < (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { + (*Pager)(unsafe.Pointer(pPager)).FdbSize = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno + } + return rc +} + +// This is a variant of sqlite3PagerWrite() that runs when the sector size +// is larger than the page size. SQLite makes the (reasonable) assumption that +// all bytes of a sector are written together by hardware. Hence, all bytes of +// a sector need to be journalled in case of a power loss in the middle of +// a write. +// +// Usually, the sector size is less than or equal to the page size, in which +// case pages can be individually written. This routine only runs in the +// exceptional case where the page size is smaller than the sector size. +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK // Return code + var nPageCount Pgno // Total number of pages in database file + var pg1 Pgno // First page of the sector pPg is located on. + var nPage int32 = 0 // Number of pages starting at pg1 to journal + var ii int32 // Loop counter + var needSync int32 = 0 // True if any page has PGHDR_NEED_SYNC + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager // The pager that owns pPg + var nPagePerSector Pgno = Pgno(I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) / (*Pager)(unsafe.Pointer(pPager)).FpageSize) + + // Set the doNotSpill NOSYNC bit to 1. This is because we cannot allow + // a journal header to be written between the pages journaled by + // this function. + + *(*U8)(unsafe.Pointer(pPager + 25)) |= U8(SPILLFLAG_NOSYNC) + + // This trick assumes that both the page-size and sector-size are + // an integer power of 2. It sets variable pg1 to the identifier + // of the first page of the sector pPg is located on. + pg1 = ((*PgHdr)(unsafe.Pointer(pPg)).Fpgno-Pgno(1)) & ^(nPagePerSector-Pgno(1)) + Pgno(1) + + nPageCount = (*Pager)(unsafe.Pointer(pPager)).FdbSize + if (*PgHdr)(unsafe.Pointer(pPg)).Fpgno > nPageCount { + nPage = int32((*PgHdr)(unsafe.Pointer(pPg)).Fpgno - pg1 + Pgno(1)) + } else if pg1+nPagePerSector-Pgno(1) > nPageCount { + nPage = int32(nPageCount + Pgno(1) - pg1) + } else { + nPage = int32(nPagePerSector) + } + + for ii = 0; ii < nPage && rc == SQLITE_OK; ii++ { + var pg Pgno = pg1 + Pgno(ii) + // var pPage uintptr at bp, 8 + + if pg == (*PgHdr)(unsafe.Pointer(pPg)).Fpgno || !(Xsqlite3BitvecTest(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, pg) != 0) { + if pg != Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)) { + rc = Xsqlite3PagerGet(tls, pPager, pg, bp, 0) + if rc == SQLITE_OK { + rc = pager_write(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + if int32((*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags)&PGHDR_NEED_SYNC != 0 { + needSync = 1 + } + Xsqlite3PagerUnrefNotNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + } + } + } else if libc.AssignPtrUintptr(bp, Xsqlite3PagerLookup(tls, pPager, pg)) != uintptr(0) { + if int32((*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags)&PGHDR_NEED_SYNC != 0 { + needSync = 1 + } + Xsqlite3PagerUnrefNotNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + } + } + + // If the PGHDR_NEED_SYNC flag is set for any of the nPage pages + // starting at pg1, then it needs to be set for all of them. Because + // writing to any of these nPage pages may damage the others, the + // journal file must contain sync()ed copies of all of them + // before any of them can be written out to the database file. + if rc == SQLITE_OK && needSync != 0 { + + for ii = 0; ii < nPage; ii++ { + var pPage uintptr = Xsqlite3PagerLookup(tls, pPager, pg1+Pgno(ii)) + if pPage != 0 { + *(*U16)(unsafe.Pointer(pPage + 52)) |= U16(PGHDR_NEED_SYNC) + Xsqlite3PagerUnrefNotNull(tls, pPage) + } + } + } + + *(*U8)(unsafe.Pointer(pPager + 25)) &= libc.Uint8FromInt32(libc.CplInt32(SPILLFLAG_NOSYNC)) + return rc +} + +// Mark a data page as writeable. This routine must be called before +// making changes to a page. The caller must check the return value +// of this function and be careful not to change any page data unless +// this routine returns SQLITE_OK. +// +// The difference between this function and pager_write() is that this +// function also deals with the special case where 2 or more pages +// fit on a single disk sector. In this case all co-resident pages +// must have been written to the journal file before returning. +// +// If an error occurs, SQLITE_NOMEM or an IO error code is returned +// as appropriate. Otherwise, SQLITE_OK. +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager + + if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { + if (*Pager)(unsafe.Pointer(pPager)).FnSavepoint != 0 { + return subjournalPageIfRequired(tls, pPg) + } + return SQLITE_OK + } else if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { + return (*Pager)(unsafe.Pointer(pPager)).FerrCode + } else if (*Pager)(unsafe.Pointer(pPager)).FsectorSize > U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) { + + return pagerWriteLargeSector(tls, pPg) + } else { + return pager_write(tls, pPg) + } + return int32(0) +} + +// Return TRUE if the page given in the argument was previously passed +// to sqlite3PagerWrite(). In other words, return TRUE if it is ok +// to change the content of the page. + +// A call to this routine tells the pager that it is not necessary to +// write the information on page pPg back to the disk, even though +// that page might be marked as dirty. This happens, for example, when +// the page has been added as a leaf of the freelist and so its +// content no longer matters. +// +// The overlying software layer calls this routine when all of the data +// on the given page is unused. The pager marks the page as clean so +// that it does not get written to disk. +// +// Tests show that this optimization can quadruple the speed of large +// DELETE operations. +// +// This optimization cannot be used with a temp-file, as the page may +// have been dirty at the start of the transaction. In that case, if +// memory pressure forces page pPg out of the cache, the data does need +// to be written out to disk so that it may be read back in if the +// current transaction is rolled back. +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ + var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager + if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { + + *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_DONT_WRITE) + *(*U16)(unsafe.Pointer(pPg + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_WRITEABLE)) + + } +} + +// This routine is called to increment the value of the database file +// change-counter, stored as a 4-byte big-endian integer starting at +// byte offset 24 of the pager file. The secondary change counter at +// 92 is also updated, as is the SQLite version number at offset 96. +// +// But this only happens if the pPager->changeCountDone flag is false. +// To avoid excess churning of page 1, the update only happens once. +// See also the pager_write_changecounter() routine that does an +// unconditional update of the change counters. +// +// If the isDirectMode flag is zero, then this is done by calling +// sqlite3PagerWrite() on page 1, then modifying the contents of the +// page data. In this case the file will be updated when the current +// transaction is committed. +// +// The isDirectMode flag may only be non-zero if the library was compiled +// with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case, +// if isDirect is non-zero, then the database file is updated directly +// by writing an updated version of page 1 using a call to the +// sqlite3OsWrite() function. +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + + // Declare and initialize constant integer 'isDirect'. If the + // atomic-write optimization is enabled in this build, then isDirect + // is initialized to the value passed as the isDirectMode parameter + // to this function. Otherwise, it is always set to zero. + // + // The idea is that if the atomic-write optimization is not + // enabled at compile time, the compiler can omit the tests of + // 'isDirect' below, as well as the block enclosed in the + // "if( isDirect )" condition. + + _ = isDirectMode + + if !(int32((*Pager)(unsafe.Pointer(pPager)).FchangeCountDone) != 0) && (*Pager)(unsafe.Pointer(pPager)).FdbSize > Pgno(0) { + // var pPgHdr uintptr at bp, 8 + // Reference to page 1 + + // Open page 1 of the file for writing. + rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp, 0) + + // If page one was fetched successfully, and this function is not + // operating in direct-mode, make page 1 writable. When not in + // direct mode, page 1 is always held in cache and hence the PagerGet() + // above is always successful - hence the ALWAYS on rc==SQLITE_OK. + if !(0 != 0) && rc == SQLITE_OK { + rc = Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) + } + + if rc == SQLITE_OK { + // Actually do the update of the change counter + pager_write_changecounter(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) + + // If running in direct mode, write the contents of page 1 to the file. + if 0 != 0 { + var zBuf uintptr + + zBuf = (*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPgHdr */)))).FpData + if rc == SQLITE_OK { + rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, zBuf, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), int64(0)) + *(*int32)(unsafe.Pointer(pPager + 240 + 2*4))++ + } + if rc == SQLITE_OK { + // Update the pager's copy of the change-counter. Otherwise, the + // next time a read transaction is opened the cache will be + // flushed (as the change-counter values will not match). + var pCopy uintptr = zBuf + 24 + libc.Xmemcpy(tls, pPager+136, pCopy, uint64(unsafe.Sizeof([16]uint8{}))) + (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = U8(1) + } + } else { + (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = U8(1) + } + } + + // Release the page reference. + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) + } + return rc +} + +// Sync the database file to disk. This is a no-op for in-memory databases +// or pages with the Pager.noSync flag set. +// +// If successful, or if called on a pager for which it is a no-op, this +// function returns SQLITE_OK. Otherwise, an IO error code is returned. +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ + var rc int32 = SQLITE_OK + var pArg uintptr = zSuper + rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) + if rc == SQLITE_NOTFOUND { + rc = SQLITE_OK + } + if rc == SQLITE_OK && !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { + + rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) + } + return rc +} + +// This function may only be called while a write-transaction is active in +// rollback. If the connection is in WAL mode, this call is a no-op. +// Otherwise, if the connection does not already have an EXCLUSIVE lock on +// the database file, an attempt is made to obtain one. +// +// If the EXCLUSIVE lock is already held or the attempt to obtain it is +// successful, or the connection is in WAL mode, SQLITE_OK is returned. +// Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is +// returned. +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ + var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode + + if rc == SQLITE_OK { + + if 0 == libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { + rc = pager_wait_on_lock(tls, pPager, EXCLUSIVE_LOCK) + } + } + return rc +} + +// Sync the database file for the pager pPager. zSuper points to the name +// of a super-journal file that should be written into the individual +// journal file. zSuper may be NULL, which is interpreted as no +// super-journal (a single database transaction). +// +// This routine ensures that: +// +// * The database file change-counter is updated, +// * the journal is synced (unless the atomic-write optimization is used), +// * all dirty pages are written to the database file, +// * the database file is truncated (if required), and +// * the database file synced. +// +// The only thing that remains to commit the transaction is to finalize +// (delete, truncate or zero the first part of) the journal file (or +// delete the super-journal file if specified). +// +// Note that if zSuper==NULL, this does not overwrite a previous value +// passed to an sqlite3PagerCommitPhaseOne() call. +// +// If the final parameter - noSync - is true, then the database file itself +// is not synced. The caller must call sqlite3PagerSync() directly to +// sync the database file before calling CommitPhaseTwo() to delete the +// journal file in this case. +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + // var pPageOne uintptr at bp, 8 + + var nNew Pgno + var pList uintptr + rc = SQLITE_OK // Return code + + // If a prior error occurred, report that error again. + if !((*Pager)(unsafe.Pointer(pPager)).FerrCode != 0) { + goto __1 + } + return (*Pager)(unsafe.Pointer(pPager)).FerrCode +__1: + ; + + // Provide the ability to easily simulate an I/O error during testing + if !(Xsqlite3FaultSim(tls, 400) != 0) { + goto __2 + } + return SQLITE_IOERR +__2: + ; + + // If no database changes have been made, return early. + if !(int32((*Pager)(unsafe.Pointer(pPager)).FeState) < PAGER_WRITER_CACHEMOD) { + goto __3 + } + return SQLITE_OK +__3: + ; + + if !(0 == pagerFlushOnCommit(tls, pPager, 1)) { + goto __4 + } + // If this is an in-memory db, or no pages have been written to, or this + // function has already been called, it is mostly a no-op. However, any + // backup in progress needs to be restarted. + Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) + goto __5 +__4: + if !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { + goto __6 + } + *(*uintptr)(unsafe.Pointer(bp /* pPageOne */)) = uintptr(0) + pList = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + if !(pList == uintptr(0)) { + goto __8 + } + // Must have at least one page for the WAL commit flag. + // Ticket [2d1a5c67dfc2363e44f29d9bbd57f] 2011-05-18 + rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp, 0) + pList = *(*uintptr)(unsafe.Pointer(bp /* pPageOne */)) + (*PgHdr)(unsafe.Pointer(pList)).FpDirty = uintptr(0) +__8: + ; + + if !(pList != 0) { + goto __9 + } + rc = pagerWalFrames(tls, pPager, pList, (*Pager)(unsafe.Pointer(pPager)).FdbSize, 1) +__9: + ; + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageOne */))) + if !(rc == SQLITE_OK) { + goto __10 + } + Xsqlite3PcacheCleanAll(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) +__10: + ; + goto __7 +__6: + // The bBatch boolean is true if the batch-atomic-write commit method + // should be used. No rollback journal is created if batch-atomic-write + // is enabled. + + rc = pager_incr_changecounter(tls, pPager, 0) + if !(rc != SQLITE_OK) { + goto __11 + } + goto commit_phase_one_exit +__11: + ; + + // Write the super-journal name into the journal file. If a + // super-journal file name has already been written to the journal file, + // or if zSuper is NULL (no super-journal), then this call is a no-op. + rc = writeSuperJournal(tls, pPager, zSuper) + if !(rc != SQLITE_OK) { + goto __12 + } + goto commit_phase_one_exit +__12: + ; + + // Sync the journal file and write all dirty pages to the database. + // If the atomic-update optimization is being used, this sync will not + // create the journal file or perform any real IO. + // + // Because the change-counter page was just modified, unless the + // atomic-update optimization is used it is almost certain that the + // journal requires a sync here. However, in locking_mode=exclusive + // on a system under memory pressure it is just possible that this is + // not the case. In this case it is likely enough that the redundant + // xSync() call will be changed to a no-op by the OS anyhow. + rc = syncJournal(tls, pPager, 0) + if !(rc != SQLITE_OK) { + goto __13 + } + goto commit_phase_one_exit +__13: + ; + + pList = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + + if !(BBatch == 0) { + goto __14 + } + rc = pager_write_pagelist(tls, pPager, pList) +__14: + ; + if !(rc != SQLITE_OK) { + goto __15 + } + + goto commit_phase_one_exit +__15: + ; + Xsqlite3PcacheCleanAll(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) + + // If the file on disk is smaller than the database image, use + // pager_truncate to grow the file here. This can happen if the database + // image was extended as part of the current transaction and then the + // last page in the db image moved to the free-list. In this case the + // last page is never written out to disk, leaving the database file + // undersized. Fix this now if it is the case. + if !((*Pager)(unsafe.Pointer(pPager)).FdbSize > (*Pager)(unsafe.Pointer(pPager)).FdbFileSize) { + goto __16 + } + nNew = (*Pager)(unsafe.Pointer(pPager)).FdbSize - Pgno(libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FdbSize == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)))) + + rc = pager_truncate(tls, pPager, nNew) + if !(rc != SQLITE_OK) { + goto __17 + } + goto commit_phase_one_exit +__17: + ; +__16: + ; + + // Finally, sync the database file. + if !!(noSync != 0) { + goto __18 + } + rc = Xsqlite3PagerSync(tls, pPager, zSuper) +__18: + ; + +__7: + ; +__5: + ; + +commit_phase_one_exit: + if !(rc == SQLITE_OK && !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0))) { + goto __19 + } + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_FINISHED) +__19: + ; + return rc +} + +// When this function is called, the database file has been completely +// updated to reflect the changes made by the current transaction and +// synced to disk. The journal file still exists in the file-system +// though, and if a failure occurs at this point it will eventually +// be used as a hot-journal and the current transaction rolled back. +// +// This function finalizes the journal file, either by deleting, +// truncating or partially zeroing it, so that it cannot be used +// for hot-journal rollback. Once this is done the transaction is +// irrevocably committed. +// +// If an error occurs, an IO error code is returned and the pager +// moves into the error state. Otherwise, SQLITE_OK is returned. +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ + var rc int32 = SQLITE_OK // Return code + + // This routine should not be called if a prior error has occurred. + // But if (due to a coding error elsewhere in the system) it does get + // called, just return the same error code without doing anything. + if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { + return (*Pager)(unsafe.Pointer(pPager)).FerrCode + } + (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ + + // An optimization. If the database was not actually modified during + // this transaction, the pager is running in exclusive-mode and is + // using persistent journals, then this function is a no-op. + // + // The start of the journal file currently contains a single journal + // header with the nRec field set to 0. If such a journal is used as + // a hot-journal during hot-journal rollback, 0 changes will be made + // to the database file. So there is no need to zero the journal + // header. Since the pager is in exclusive mode, there is no need + // to drop any locks either. + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_LOCKED && + (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 && + int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_PERSIST { + + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_READER) + return SQLITE_OK + } + + rc = pager_end_transaction(tls, pPager, int32((*Pager)(unsafe.Pointer(pPager)).FsetSuper), 1) + return pager_error(tls, pPager, rc) +} + +// If a write transaction is open, then all changes made within the +// transaction are reverted and the current write-transaction is closed. +// The pager falls back to PAGER_READER state if successful, or PAGER_ERROR +// state if an error occurs. +// +// If the pager is already in PAGER_ERROR state when this function is called, +// it returns Pager.errCode immediately. No work is performed in this case. +// +// Otherwise, in rollback mode, this function performs two functions: +// +// 1) It rolls back the journal file, restoring all database file and +// in-memory cache pages to the state they were in when the transaction +// was opened, and +// +// 2) It finalizes the journal file, so that it is not used for hot +// rollback at any point in the future. +// +// Finalization of the journal file (task 2) is only performed if the +// rollback is successful. +// +// In WAL mode, all cache-entries containing data modified within the +// current transaction are either expelled from the cache or reverted to +// their pre-transaction state by re-reading data from the database or +// WAL files. The WAL transaction is then closed. +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ + var rc int32 = SQLITE_OK // Return code + + // PagerRollback() is a no-op if called in READER or OPEN state. If + // the pager is already in the ERROR state, the rollback is not + // attempted here. Instead, the error code is returned to the caller. + + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_ERROR { + return (*Pager)(unsafe.Pointer(pPager)).FerrCode + } + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) <= PAGER_READER { + return SQLITE_OK + } + + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + var rc2 int32 + rc = Xsqlite3PagerSavepoint(tls, pPager, SAVEPOINT_ROLLBACK, -1) + rc2 = pager_end_transaction(tls, pPager, int32((*Pager)(unsafe.Pointer(pPager)).FsetSuper), 0) + if rc == SQLITE_OK { + rc = rc2 + } + } else if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_LOCKED { + var eState int32 = int32((*Pager)(unsafe.Pointer(pPager)).FeState) + rc = pager_end_transaction(tls, pPager, 0, 0) + if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) && eState > PAGER_WRITER_LOCKED { + // This can happen using journal_mode=off. Move the pager to the error + // state to indicate that the contents of the cache may not be trusted. + // Any active readers will get SQLITE_ABORT. + (*Pager)(unsafe.Pointer(pPager)).FerrCode = SQLITE_ABORT + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_ERROR) + setGetterMethod(tls, pPager) + return rc + } + } else { + rc = pager_playback(tls, pPager, 0) + } + + // If an error occurs during a ROLLBACK, we can no longer trust the pager + // cache. So call pager_error() on the way out to make any error persistent. + return pager_error(tls, pPager, rc) +} + +// Return TRUE if the database file is opened read-only. Return FALSE +// if the database is (in theory) writable. +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ + return (*Pager)(unsafe.Pointer(pPager)).FreadOnly +} + +// Return the approximate number of bytes of memory currently +// used by the pager and its associated cache. +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ + var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) + return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ + Xsqlite3MallocSize(tls, pPager)) + + (*Pager)(unsafe.Pointer(pPager)).FpageSize) +} + +// Return the number of references to the specified page. +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ + return Xsqlite3PcachePageRefcount(tls, pPage) +} + +// Parameter eStat must be one of SQLITE_DBSTATUS_CACHE_HIT, _MISS, _WRITE, +// or _WRITE+1. The SQLITE_DBSTATUS_CACHE_WRITE+1 case is a translation +// of SQLITE_DBSTATUS_CACHE_SPILL. The _SPILL case is not contiguous because +// it was added later. +// +// Before returning, *pnVal is incremented by the +// current cache hit or miss count, according to the value of eStat. If the +// reset parameter is non-zero, the cache hit or miss count is zeroed before +// returning. +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ + + eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT + *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) + if reset != 0 { + *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) = 0 + } +} + +// Return true if this is an in-memory or temp-file backed pager. +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ + return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) +} + +// Check that there are at least nSavepoint savepoints open. If there are +// currently less than nSavepoints open, then open one or more savepoints +// to make up the difference. If the number of savepoints is already +// equal to nSavepoint, then this function is a no-op. +// +// If a memory allocation fails, SQLITE_NOMEM is returned. If an error +// occurs while opening the sub-journal file, then an IO error code is +// returned. Otherwise, SQLITE_OK. +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ + var rc int32 = SQLITE_OK // Return code + var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints + var ii int32 // Iterator variable + var aNew uintptr // New Pager.aSavepoint array + + // Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM + // if the allocation fails. Otherwise, zero the new portion in case a + // malloc failure occurs while populating it in the for(...) loop below. + aNew = Xsqlite3Realloc(tls, + (*Pager)(unsafe.Pointer(pPager)).FaSavepoint, uint64(uint64(unsafe.Sizeof(PagerSavepoint{}))*uint64(nSavepoint))) + if !(aNew != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, aNew+uintptr(nCurrent)*56, 0, uint64(nSavepoint-nCurrent)*uint64(unsafe.Sizeof(PagerSavepoint{}))) + (*Pager)(unsafe.Pointer(pPager)).FaSavepoint = aNew + + // Populate the PagerSavepoint structures just allocated. + for ii = nCurrent; ii < nSavepoint; ii++ { + (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FnOrig = (*Pager)(unsafe.Pointer(pPager)).FdbSize + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) && (*Pager)(unsafe.Pointer(pPager)).FjournalOff > int64(0) { + (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FiOffset = (*Pager)(unsafe.Pointer(pPager)).FjournalOff + } else { + (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FiOffset = I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) + } + (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FiSubRec = (*Pager)(unsafe.Pointer(pPager)).FnSubRec + (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FpInSavepoint = Xsqlite3BitvecCreate(tls, (*Pager)(unsafe.Pointer(pPager)).FdbSize) + (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FbTruncateOnRelease = 1 + if !(int32((*PagerSavepoint)(unsafe.Pointer(aNew+uintptr(ii)*56)).FpInSavepoint) != 0) { + return SQLITE_NOMEM + } + if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + Xsqlite3WalSavepoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, aNew+uintptr(ii)*56+36) + } + (*Pager)(unsafe.Pointer(pPager)).FnSavepoint = ii + 1 + } + + return rc +} + +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ + + if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { + return pagerOpenSavepoint(tls, pPager, nSavepoint) + } else { + return SQLITE_OK + } + return int32(0) +} + +// This function is called to rollback or release (commit) a savepoint. +// The savepoint to release or rollback need not be the most recently +// created savepoint. +// +// Parameter op is always either SAVEPOINT_ROLLBACK or SAVEPOINT_RELEASE. +// If it is SAVEPOINT_RELEASE, then release and destroy the savepoint with +// index iSavepoint. If it is SAVEPOINT_ROLLBACK, then rollback all changes +// that have occurred since the specified savepoint was created. +// +// The savepoint to rollback or release is identified by parameter +// iSavepoint. A value of 0 means to operate on the outermost savepoint +// (the first created). A value of (Pager.nSavepoint-1) means operate +// on the most recently created savepoint. If iSavepoint is greater than +// (Pager.nSavepoint-1), then this function is a no-op. +// +// If a negative value is passed to this function, then the current +// transaction is rolled back. This is different to calling +// sqlite3PagerRollback() because this function does not terminate +// the transaction or unlock the database, it just restores the +// contents of the database to its original state. +// +// In any case, all savepoints with an index greater than iSavepoint +// are destroyed. If this is a release operation (op==SAVEPOINT_RELEASE), +// then savepoint iSavepoint is also destroyed. +// +// This function may return SQLITE_NOMEM if a memory allocation fails, +// or an IO error code if an IO error occurs while rolling back a +// savepoint. If no errors occur, SQLITE_OK is returned. +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ + var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode + + if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { + var ii int32 // Iterator variable + var nNew int32 // Number of remaining savepoints after this op. + + // Figure out how many savepoints will still be active after this + // operation. Store this value in nNew. Then free resources associated + // with any savepoints that are destroyed by this operation. + nNew = iSavepoint + func() int32 { + if op == SAVEPOINT_RELEASE { + return 0 + } + return 1 + }() + for ii = nNew; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { + Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) + } + (*Pager)(unsafe.Pointer(pPager)).FnSavepoint = nNew + + // Truncate the sub-journal so that it only includes the parts + // that are still in use. + if op == SAVEPOINT_RELEASE { + var pRel uintptr = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(nNew)*56 + if (*PagerSavepoint)(unsafe.Pointer(pRel)).FbTruncateOnRelease != 0 && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0) { + // Only truncate if it is an in-memory sub-journal. + if Xsqlite3JournalIsInMemory(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd) != 0 { + var sz I64 = ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(4)) * I64((*PagerSavepoint)(unsafe.Pointer(pRel)).FiSubRec) + rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd, sz) + + } + (*Pager)(unsafe.Pointer(pPager)).FnSubRec = (*PagerSavepoint)(unsafe.Pointer(pRel)).FiSubRec + } + } else if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) || (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { + var pSavepoint uintptr + if nNew == 0 { + pSavepoint = uintptr(0) + } else { + pSavepoint = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(nNew-1)*56 + } + rc = pagerPlaybackSavepoint(tls, pPager, pSavepoint) + + } + + } + + return rc +} + +// Return the full pathname of the database file. +// +// Except, if the pager is in-memory only, then return an empty string if +// nullIfMemDb is true. This routine is called with nullIfMemDb==1 when +// used to report the filename to the user, for compatibility with legacy +// behavior. But when the Btree needs to know the filename for matching to +// shared cache, it uses nullIfMemDb==0 so that in-memory databases can +// participate in shared-cache. +// +// The return value to this routine is always safe to use with +// sqlite3_uri_parameter() and sqlite3_filename_database() and friends. +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ + if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { + return uintptr(unsafe.Pointer(&zFake)) + 4 + } + return (*Pager)(unsafe.Pointer(pPager)).FzFilename +} + +var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:60211:21 */ + +// Return the VFS structure for the pager. +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ + return (*Pager)(unsafe.Pointer(pPager)).FpVfs +} + +// Return the file handle for the database file associated +// with the pager. This might return NULL if the file has +// not yet been opened. +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ + return (*Pager)(unsafe.Pointer(pPager)).Ffd +} + +// Return the file handle for the journal file (if it exists). +// This will be either the rollback journal or the WAL file. +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ + if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { + return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) + } + return (*Pager)(unsafe.Pointer(pPager)).Fjfd +} + +// Return the full pathname of the journal file. +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ + return (*Pager)(unsafe.Pointer(pPager)).FzJournal +} + +// Move the page pPg to location pgno in the file. +// +// There must be no references to the page previously located at +// pgno (which we call pPgOld) though that page is allowed to be +// in cache. If the page previously located at pgno is not already +// in the rollback journal, it is not put there by by this routine. +// +// References to the page pPg remain valid. Updating any +// meta-data associated with pPg (i.e. data stored in the nExtra bytes +// allocated along with the page) is the responsibility of the caller. +// +// A transaction must be active when this routine is called. It used to be +// required that a statement transaction was not active, but this restriction +// has been removed (CREATE INDEX needs to move a page when a statement +// transaction is active). +// +// If the fourth argument, isCommit, is non-zero, then this page is being +// moved as part of a database reorganization just before the transaction +// is being committed. In this case, it is guaranteed that the database page +// pPg refers to will not be written to again within this transaction. +// +// This function may return SQLITE_NOMEM or an IO error code if an error +// occurs. Otherwise, it returns SQLITE_OK. +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pPgOld uintptr // The page being overwritten. + var needSyncPgno Pgno = Pgno(0) // Old value of pPg->pgno, if sync is required + var rc int32 // Return code + var origPgno Pgno // The original page number + + // In order to be able to rollback, an in-memory database must journal + // the page we are moving from. + + if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { + rc = Xsqlite3PagerWrite(tls, pPg) + if rc != 0 { + return rc + } + } + + // If the page being moved is dirty and has not been saved by the latest + // savepoint, then save the current contents of the page into the + // sub-journal now. This is required to handle the following scenario: + // + // BEGIN; + // + // SAVEPOINT one; + // + // ROLLBACK TO one; + // + // If page X were not written to the sub-journal here, it would not + // be possible to restore its contents when the "ROLLBACK TO one" + // statement were is processed. + // + // subjournalPage() may need to allocate space to store pPg->pgno into + // one or more savepoint bitvecs. This is the reason this function + // may return SQLITE_NOMEM. + if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && + SQLITE_OK != libc.AssignInt32(&rc, subjournalPageIfRequired(tls, pPg)) { + return rc + } + + // If the journal needs to be sync()ed before page pPg->pgno can + // be written to, store pPg->pgno in local variable needSyncPgno. + // + // If the isCommit flag is set, there is no need to remember that + // the journal needs to be sync()ed before database page pPg->pgno + // can be written to. The caller has already promised not to write to it. + if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0 && !(isCommit != 0) { + needSyncPgno = (*DbPage)(unsafe.Pointer(pPg)).Fpgno + + } + + // If the cache contains a page with page-number pgno, remove it + // from its hash chain. Also, if the PGHDR_NEED_SYNC flag was set for + // page pgno before the 'move' operation, it needs to be retained + // for the page moved there. + *(*U16)(unsafe.Pointer(pPg + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) + pPgOld = Xsqlite3PagerLookup(tls, pPager, pgno) + + if pPgOld != 0 { + if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { + Xsqlite3PagerUnrefNotNull(tls, pPgOld) + return Xsqlite3CorruptError(tls, 60350) + } + *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) + if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { + // Do not discard pages from an in-memory database since we might + // need to rollback later. Just move the page out of the way. + Xsqlite3PcacheMove(tls, pPgOld, (*Pager)(unsafe.Pointer(pPager)).FdbSize+Pgno(1)) + } else { + Xsqlite3PcacheDrop(tls, pPgOld) + } + } + + origPgno = (*DbPage)(unsafe.Pointer(pPg)).Fpgno + Xsqlite3PcacheMove(tls, pPg, pgno) + Xsqlite3PcacheMakeDirty(tls, pPg) + + // For an in-memory database, make sure the original page continues + // to exist, in case the transaction needs to roll back. Use pPgOld + // as the original page since it has already been allocated. + if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 && pPgOld != 0 { + Xsqlite3PcacheMove(tls, pPgOld, origPgno) + Xsqlite3PagerUnrefNotNull(tls, pPgOld) + } + + if needSyncPgno != 0 { + // If needSyncPgno is non-zero, then the journal file needs to be + // sync()ed before any data is written to database file page needSyncPgno. + // Currently, no such page exists in the page-cache and the + // "is journaled" bitvec flag has been set. This needs to be remedied by + // loading the page into the pager-cache and setting the PGHDR_NEED_SYNC + // flag. + // + // If the attempt to load the page into the page-cache fails, (due + // to a malloc() or IO failure), clear the bit in the pInJournal[] + // array. Otherwise, if the page is loaded and written again in + // this transaction, it may be written to the database file before + // it is synced into the journal file. This way, it may end up in + // the journal file twice, but that is not a problem. + // var pPgHdr uintptr at bp, 8 + + rc = Xsqlite3PagerGet(tls, pPager, needSyncPgno, bp, 0) + if rc != SQLITE_OK { + if needSyncPgno <= (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize { + + Xsqlite3BitvecClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, needSyncPgno, (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace) + } + return rc + } + *(*U16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 52)) |= U16(PGHDR_NEED_SYNC) + Xsqlite3PcacheMakeDirty(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) + Xsqlite3PagerUnrefNotNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) + } + + return SQLITE_OK +} + +// The page handle passed as the first argument refers to a dirty page +// with a page number other than iNew. This function changes the page's +// page number to iNew and sets the value of the PgHdr.flags field to +// the value passed as the third parameter. +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ + + (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags + Xsqlite3PcacheMove(tls, pPg, iNew) +} + +// Return a pointer to the data for the specified page. +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ + + return (*DbPage)(unsafe.Pointer(pPg)).FpData +} + +// Return a pointer to the Pager.nExtra bytes of "extra" space +// allocated along with the specified page. +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ + return (*DbPage)(unsafe.Pointer(pPg)).FpExtra +} + +// Get/set the locking-mode for this pager. Parameter eMode must be one +// of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or +// PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then +// the locking-mode is set to the value specified. +// +// The returned value is either PAGER_LOCKINGMODE_NORMAL or +// PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) +// locking-mode. +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ + + if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { + (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) + } + return int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) +} + +// Set the journal-mode for this pager. Parameter eMode must be one of: +// +// PAGER_JOURNALMODE_DELETE +// PAGER_JOURNALMODE_TRUNCATE +// PAGER_JOURNALMODE_PERSIST +// PAGER_JOURNALMODE_OFF +// PAGER_JOURNALMODE_MEMORY +// PAGER_JOURNALMODE_WAL +// +// The journalmode is set to the value specified if the change is allowed. +// The change may be disallowed for the following reasons: +// +// * An in-memory database can only have its journal_mode set to _OFF +// or _MEMORY. +// +// * Temporary databases cannot have _WAL journalmode. +// +// The returned indicate the current (possibly updated) journal-mode. +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ + var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode + + // The eMode parameter is always valid + + // This routine is only called from the OP_JournalMode opcode, and + // the logic there will never allow a temporary file to be changed + // to WAL mode. + + // Do allow the journalmode of an in-memory database to be set to + // anything other than MEMORY or OFF + if (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { + + if eMode != PAGER_JOURNALMODE_MEMORY && eMode != PAGER_JOURNALMODE_OFF { + eMode = int32(eOld) + } + } + + if eMode != int32(eOld) { + + // Change the journal mode. + + (*Pager)(unsafe.Pointer(pPager)).FjournalMode = U8(eMode) + + // When transistioning from TRUNCATE or PERSIST to any other journal + // mode except WAL, unless the pager is in locking_mode=exclusive mode, + // delete the journal file. + + if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) && int32(eOld)&5 == 1 && eMode&1 == 0 { + // In this case we would like to delete the journal file. If it is + // not possible, then that is not a problem. Deleting the journal file + // here is an optimization only. + // + // Before deleting the journal file, obtain a RESERVED lock on the + // database file. This ensures that the journal file is not deleted + // while it is in use by some other client. + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) >= RESERVED_LOCK { + Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, 0) + } else { + var rc int32 = SQLITE_OK + var state int32 = int32((*Pager)(unsafe.Pointer(pPager)).FeState) + + if state == PAGER_OPEN { + rc = Xsqlite3PagerSharedLock(tls, pPager) + } + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER { + + rc = pagerLockDb(tls, pPager, RESERVED_LOCK) + } + if rc == SQLITE_OK { + Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, 0) + } + if rc == SQLITE_OK && state == PAGER_READER { + pagerUnlockDb(tls, pPager, SHARED_LOCK) + } else if state == PAGER_OPEN { + pager_unlock(tls, pPager) + } + + } + } else if eMode == PAGER_JOURNALMODE_OFF { + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + } + } + + // Return the new journal mode + return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) +} + +// Return the current journal mode. +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ + return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) +} + +// Return TRUE if the pager is in a state where it is OK to change the +// journalmode. Journalmode changes can only happen when the database +// is unmodified. +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ + + if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { + return 0 + } + if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) && (*Pager)(unsafe.Pointer(pPager)).FjournalOff > int64(0) { + return 0 + } + return 1 +} + +// Get/set the size-limit used for persistent journal files. +// +// Setting the size limit to -1 means no limit is enforced. +// An attempt to set a limit smaller than -1 is a no-op. +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ + if iLimit >= int64(-1) { + (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit + Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) + } + return (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit +} + +// Return a pointer to the pPager->pBackup variable. The backup module +// in backup.c maintains the content of this variable. This module +// uses it opaquely as an argument to sqlite3BackupRestart() and +// sqlite3BackupUpdate() only. +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ + return pPager + 112 +} + +// Unless this is an in-memory or temporary database, clear the pager cache. +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ + + if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { + pager_reset(tls, pPager) + } +} + +// This function is called when the user invokes "PRAGMA wal_checkpoint", +// "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint() +// or wal_blocking_checkpoint() API functions. +// +// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ + var rc int32 = SQLITE_OK + if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { + // This only happens when a database file is zero bytes in size opened and + // then "PRAGMA journal_mode=WAL" is run and then sqlite3_wal_checkpoint() + // is invoked without any intervening transactions. We need to start + // a transaction to initialize pWal. The PRAGMA table_list statement is + // used for this since it starts transactions on every database file, + // including all ATTACHed databases. This seems expensive for a single + // sqlite3_wal_checkpoint() call, but it happens very rarely. + // https://sqlite.org/forum/forumpost/fd0f19d229156939 + Xsqlite3_exec(tls, db, ts+3894, uintptr(0), uintptr(0), uintptr(0)) + } + if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { + rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, + func() uintptr { + if eMode == SQLITE_CHECKPOINT_PASSIVE { + return uintptr(0) + } + return (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler + }(), + (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg, + int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags), int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace, + pnLog, pnCkpt) + } + return rc +} + +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ + return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) +} + +// Return true if the underlying VFS for the given pager supports the +// primitives necessary for write-ahead logging. +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ + var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods + if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { + return 0 + } + return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 || (*Sqlite3_io_methods)(unsafe.Pointer(pMethods)).FiVersion >= 2 && (*Sqlite3_io_methods)(unsafe.Pointer(pMethods)).FxShmMap != 0) +} + +// Attempt to take an exclusive lock on the database file. If a PENDING lock +// is obtained instead, immediately release it. +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ + var rc int32 // Return code + + rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) + if rc != SQLITE_OK { + // If the attempt to grab the exclusive lock failed, release the + // pending lock that may have been obtained instead. + pagerUnlockDb(tls, pPager, SHARED_LOCK) + } + + return rc +} + +// Call sqlite3WalOpen() to open the WAL handle. If the pager is in +// exclusive-locking mode when this function is called, take an EXCLUSIVE +// lock on the database file and use heap-memory to store the wal-index +// in. Otherwise, use the normal shared-memory. +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ + var rc int32 = SQLITE_OK + + // If the pager is already in exclusive-mode, the WAL module will use + // heap-memory for the wal-index instead of the VFS shared-memory + // implementation. Take the exclusive lock now, before opening the WAL + // file, to make sure this is safe. + if (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 { + rc = pagerExclusiveLock(tls, pPager) + } + + // Open the connection to the log file. If this operation fails, + // (e.g. due to malloc() failure), return an error code. + if rc == SQLITE_OK { + rc = Xsqlite3WalOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, + (*Pager)(unsafe.Pointer(pPager)).Ffd, (*Pager)(unsafe.Pointer(pPager)).FzWal, int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode), + (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit, pPager+288) + } + pagerFixMaplimit(tls, pPager) + + return rc +} + +// The caller must be holding a SHARED lock on the database file to call +// this function. +// +// If the pager passed as the first argument is open on a real database +// file (not a temp file or an in-memory database), and the WAL file +// is not already open, make an attempt to open it now. If successful, +// return SQLITE_OK. If an error occurs or the VFS used by the pager does +// not support the xShmXXX() methods, return an error code. *pbOpen is +// not modified in either case. +// +// If the pager is open on a temp-file (or in-memory database), or if +// the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK +// without doing anything. +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ + var rc int32 = SQLITE_OK // Return code + + if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { + if !(Xsqlite3PagerWalSupported(tls, pPager) != 0) { + return SQLITE_CANTOPEN + } + + // Close any rollback journal previously open + Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) + + rc = pagerOpenWal(tls, pPager) + if rc == SQLITE_OK { + (*Pager)(unsafe.Pointer(pPager)).FjournalMode = U8(PAGER_JOURNALMODE_WAL) + (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) + } + } else { + *(*int32)(unsafe.Pointer(pbOpen)) = 1 + } + + return rc +} + +// This function is called to close the connection to the log file prior +// to switching from WAL to rollback mode. +// +// Before closing the log file, this function attempts to take an +// EXCLUSIVE lock on the database file. If this cannot be obtained, an +// error (SQLITE_BUSY) is returned and the log connection is not closed. +// If successful, the EXCLUSIVE lock is not released before returning. +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 = SQLITE_OK + + // If the log file is not already open, but does exist in the file-system, + // it may need to be checkpointed before the connection can switch to + // rollback mode. Open it now so this can happen. + if !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { + *(*int32)(unsafe.Pointer(bp /* logexists */)) = 0 + rc = pagerLockDb(tls, pPager, SHARED_LOCK) + if rc == SQLITE_OK { + rc = Xsqlite3OsAccess(tls, + (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp) + } + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { + rc = pagerOpenWal(tls, pPager) + } + } + + // Checkpoint and close the log. Because an EXCLUSIVE lock is held on + // the database file, the log and log-summary files will be deleted. + if rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { + rc = pagerExclusiveLock(tls, pPager) + if rc == SQLITE_OK { + rc = Xsqlite3WalClose(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags), + int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace) + (*Pager)(unsafe.Pointer(pPager)).FpWal = uintptr(0) + pagerFixMaplimit(tls, pPager) + if rc != 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { + pagerUnlockDb(tls, pPager, SHARED_LOCK) + } + } + } + return rc +} + +// If this is a WAL database, obtain a snapshot handle for the snapshot +// currently open. Otherwise, return an error. +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ + var rc int32 = SQLITE_ERROR + if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { + rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) + } + return rc +} + +// If this is a WAL database, store a pointer to pSnapshot. Next time a +// read transaction is opened, attempt to read from the snapshot it +// identifies. If this is not a WAL database, return an error. +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ + var rc int32 = SQLITE_OK + if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { + Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) + } else { + rc = SQLITE_ERROR + } + return rc +} + +// If this is a WAL database, call sqlite3WalSnapshotRecover(). If this +// is not a WAL database, return an error. +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ + var rc int32 + if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { + rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) + } else { + rc = SQLITE_ERROR + } + return rc +} + +// The caller currently has a read transaction open on the database. +// If this is not a WAL database, SQLITE_ERROR is returned. Otherwise, +// this function takes a SHARED lock on the CHECKPOINTER slot and then +// checks if the snapshot passed as the second argument is still +// available. If so, SQLITE_OK is returned. +// +// If the snapshot is not available, SQLITE_ERROR is returned. Or, if +// the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error +// occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER +// lock is released before returning. +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ + var rc int32 + if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { + rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) + } else { + rc = SQLITE_ERROR + } + return rc +} + +// Release a lock obtained by an earlier successful call to +// sqlite3PagerSnapshotCheck(). +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ + + Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) +} + +//************* End of pager.c ********************************************** +//************* Begin file wal.c ******************************************** +// 2010 February 1 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains the implementation of a write-ahead log (WAL) used in +// "journal_mode=WAL" mode. +// +// WRITE-AHEAD LOG (WAL) FILE FORMAT +// +// A WAL file consists of a header followed by zero or more "frames". +// Each frame records the revised content of a single page from the +// database file. All changes to the database are recorded by writing +// frames into the WAL. Transactions commit when a frame is written that +// contains a commit marker. A single WAL can and usually does record +// multiple transactions. Periodically, the content of the WAL is +// transferred back into the database file in an operation called a +// "checkpoint". +// +// A single WAL file can be used multiple times. In other words, the +// WAL can fill up with frames and then be checkpointed and then new +// frames can overwrite the old ones. A WAL always grows from beginning +// toward the end. Checksums and counters attached to each frame are +// used to determine which frames within the WAL are valid and which +// are leftovers from prior checkpoints. +// +// The WAL header is 32 bytes in size and consists of the following eight +// big-endian 32-bit unsigned integer values: +// +// 0: Magic number. 0x377f0682 or 0x377f0683 +// 4: File format version. Currently 3007000 +// 8: Database page size. Example: 1024 +// 12: Checkpoint sequence number +// 16: Salt-1, random integer incremented with each checkpoint +// 20: Salt-2, a different random integer changing with each ckpt +// 24: Checksum-1 (first part of checksum for first 24 bytes of header). +// 28: Checksum-2 (second part of checksum for first 24 bytes of header). +// +// Immediately following the wal-header are zero or more frames. Each +// frame consists of a 24-byte frame-header followed by a bytes +// of page data. The frame-header is six big-endian 32-bit unsigned +// integer values, as follows: +// +// 0: Page number. +// 4: For commit records, the size of the database image in pages +// after the commit. For all other records, zero. +// 8: Salt-1 (copied from the header) +// 12: Salt-2 (copied from the header) +// 16: Checksum-1. +// 20: Checksum-2. +// +// A frame is considered valid if and only if the following conditions are +// true: +// +// (1) The salt-1 and salt-2 values in the frame-header match +// salt values in the wal-header +// +// (2) The checksum values in the final 8 bytes of the frame-header +// exactly match the checksum computed consecutively on the +// WAL header and the first 8 bytes and the content of all frames +// up to and including the current frame. +// +// The checksum is computed using 32-bit big-endian integers if the +// magic number in the first 4 bytes of the WAL is 0x377f0683 and it +// is computed using little-endian if the magic number is 0x377f0682. +// The checksum values are always stored in the frame header in a +// big-endian format regardless of which byte order is used to compute +// the checksum. The checksum is computed by interpreting the input as +// an even number of unsigned 32-bit integers: x[0] through x[N]. The +// algorithm used for the checksum is as follows: +// +// for i from 0 to n-1 step 2: +// s0 += x[i] + s1; +// s1 += x[i+1] + s0; +// endfor +// +// Note that s0 and s1 are both weighted checksums using fibonacci weights +// in reverse order (the largest fibonacci weight occurs on the first element +// of the sequence being summed.) The s1 value spans all 32-bit +// terms of the sequence whereas s0 omits the final term. +// +// On a checkpoint, the WAL is first VFS.xSync-ed, then valid content of the +// WAL is transferred into the database, then the database is VFS.xSync-ed. +// The VFS.xSync operations serve as write barriers - all writes launched +// before the xSync must complete before any write that launches after the +// xSync begins. +// +// After each checkpoint, the salt-1 value is incremented and the salt-2 +// value is randomized. This prevents old and new frames in the WAL from +// being considered valid at the same time and being checkpointing together +// following a crash. +// +// READER ALGORITHM +// +// To read a page from the database (call it page number P), a reader +// first checks the WAL to see if it contains page P. If so, then the +// last valid instance of page P that is a followed by a commit frame +// or is a commit frame itself becomes the value read. If the WAL +// contains no copies of page P that are valid and which are a commit +// frame or are followed by a commit frame, then page P is read from +// the database file. +// +// To start a read transaction, the reader records the index of the last +// valid frame in the WAL. The reader uses this recorded "mxFrame" value +// for all subsequent read operations. New transactions can be appended +// to the WAL, but as long as the reader uses its original mxFrame value +// and ignores the newly appended content, it will see a consistent snapshot +// of the database from a single point in time. This technique allows +// multiple concurrent readers to view different versions of the database +// content simultaneously. +// +// The reader algorithm in the previous paragraphs works correctly, but +// because frames for page P can appear anywhere within the WAL, the +// reader has to scan the entire WAL looking for page P frames. If the +// WAL is large (multiple megabytes is typical) that scan can be slow, +// and read performance suffers. To overcome this problem, a separate +// data structure called the wal-index is maintained to expedite the +// search for frames of a particular page. +// +// WAL-INDEX FORMAT +// +// Conceptually, the wal-index is shared memory, though VFS implementations +// might choose to implement the wal-index using a mmapped file. Because +// the wal-index is shared memory, SQLite does not support journal_mode=WAL +// on a network filesystem. All users of the database must be able to +// share memory. +// +// In the default unix and windows implementation, the wal-index is a mmapped +// file whose name is the database name with a "-shm" suffix added. For that +// reason, the wal-index is sometimes called the "shm" file. +// +// The wal-index is transient. After a crash, the wal-index can (and should +// be) reconstructed from the original WAL file. In fact, the VFS is required +// to either truncate or zero the header of the wal-index when the last +// connection to it closes. Because the wal-index is transient, it can +// use an architecture-specific format; it does not have to be cross-platform. +// Hence, unlike the database and WAL file formats which store all values +// as big endian, the wal-index can store multi-byte values in the native +// byte order of the host computer. +// +// The purpose of the wal-index is to answer this question quickly: Given +// a page number P and a maximum frame index M, return the index of the +// last frame in the wal before frame M for page P in the WAL, or return +// NULL if there are no frames for page P in the WAL prior to M. +// +// The wal-index consists of a header region, followed by an one or +// more index blocks. +// +// The wal-index header contains the total number of frames within the WAL +// in the mxFrame field. +// +// Each index block except for the first contains information on +// HASHTABLE_NPAGE frames. The first index block contains information on +// HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and +// HASHTABLE_NPAGE are selected so that together the wal-index header and +// first index block are the same size as all other index blocks in the +// wal-index. The values are: +// +// HASHTABLE_NPAGE 4096 +// HASHTABLE_NPAGE_ONE 4062 +// +// Each index block contains two sections, a page-mapping that contains the +// database page number associated with each wal frame, and a hash-table +// that allows readers to query an index block for a specific page number. +// The page-mapping is an array of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE +// for the first index block) 32-bit page numbers. The first entry in the +// first index-block contains the database page number corresponding to the +// first frame in the WAL file. The first entry in the second index block +// in the WAL file corresponds to the (HASHTABLE_NPAGE_ONE+1)th frame in +// the log, and so on. +// +// The last index block in a wal-index usually contains less than the full +// complement of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE) page-numbers, +// depending on the contents of the WAL file. This does not change the +// allocated size of the page-mapping array - the page-mapping array merely +// contains unused entries. +// +// Even without using the hash table, the last frame for page P +// can be found by scanning the page-mapping sections of each index block +// starting with the last index block and moving toward the first, and +// within each index block, starting at the end and moving toward the +// beginning. The first entry that equals P corresponds to the frame +// holding the content for that page. +// +// The hash table consists of HASHTABLE_NSLOT 16-bit unsigned integers. +// HASHTABLE_NSLOT = 2*HASHTABLE_NPAGE, and there is one entry in the +// hash table for each page number in the mapping section, so the hash +// table is never more than half full. The expected number of collisions +// prior to finding a match is 1. Each entry of the hash table is an +// 1-based index of an entry in the mapping section of the same +// index block. Let K be the 1-based index of the largest entry in +// the mapping section. (For index blocks other than the last, K will +// always be exactly HASHTABLE_NPAGE (4096) and for the last index block +// K will be (mxFrame%HASHTABLE_NPAGE).) Unused slots of the hash table +// contain a value of 0. +// +// To look for page P in the hash table, first compute a hash iKey on +// P as follows: +// +// iKey = (P * 383) % HASHTABLE_NSLOT +// +// Then start scanning entries of the hash table, starting with iKey +// (wrapping around to the beginning when the end of the hash table is +// reached) until an unused hash slot is found. Let the first unused slot +// be at index iUnused. (iUnused might be less than iKey if there was +// wrap-around.) Because the hash table is never more than half full, +// the search is guaranteed to eventually hit an unused entry. Let +// iMax be the value between iKey and iUnused, closest to iUnused, +// where aHash[iMax]==P. If there is no iMax entry (if there exists +// no hash slot such that aHash[i]==p) then page P is not in the +// current index block. Otherwise the iMax-th mapping entry of the +// current index block corresponds to the last entry that references +// page P. +// +// A hash search begins with the last index block and moves toward the +// first index block, looking for entries corresponding to page P. On +// average, only two or three slots in each index block need to be +// examined in order to either find the last entry for page P, or to +// establish that no such entry exists in the block. Each index block +// holds over 4000 entries. So two or three index blocks are sufficient +// to cover a typical 10 megabyte WAL file, assuming 1K pages. 8 or 10 +// comparisons (on average) suffice to either locate a frame in the +// WAL or to establish that the frame does not exist in the WAL. This +// is much faster than scanning the entire 10MB WAL. +// +// Note that entries are added in order of increasing K. Hence, one +// reader might be using some value K0 and a second reader that started +// at a later time (after additional transactions were added to the WAL +// and to the wal-index) might be using a different value K1, where K1>K0. +// Both readers can use the same hash table and mapping section to get +// the correct result. There may be entries in the hash table with +// K>K0 but to the first reader, those entries will appear to be unused +// slots in the hash table and so the first reader will get an answer as +// if no values greater than K0 had ever been inserted into the hash table +// in the first place - which is what reader one wants. Meanwhile, the +// second reader using K1 will see additional values that were inserted +// later, which is exactly what reader two wants. +// +// When a rollback occurs, the value of K is decreased. Hash table entries +// that correspond to frames greater than the new K value are removed +// from the hash table at this point. + +// #include "wal.h" + +// Trace output macros + +// The maximum (and only) versions of the wal and wal-index formats +// that may be interpreted by this version of SQLite. +// +// If a client begins recovering a WAL file and finds that (a) the checksum +// values in the wal-header are correct and (b) the version field is not +// WAL_MAX_VERSION, recovery fails and SQLite returns SQLITE_CANTOPEN. +// +// Similarly, if a client successfully reads a wal-index header (i.e. the +// checksum test is successful) and finds that the version field is not +// WALINDEX_MAX_VERSION, then no read-transaction is opened and SQLite +// returns SQLITE_CANTOPEN. + +// Index numbers for various locking bytes. WAL_NREADER is the number +// of available reader locks and should be at least 3. The default +// is SQLITE_SHM_NLOCK==8 and WAL_NREADER==5. +// +// Technically, the various VFSes are free to implement these locks however +// they see fit. However, compatibility is encouraged so that VFSes can +// interoperate. The standard implemention used on both unix and windows +// is for the index number to indicate a byte offset into the +// WalCkptInfo.aLock[] array in the wal-index header. In other words, all +// locks are on the shm file. The WALINDEX_LOCK_OFFSET constant (which +// should be 120) is the location in the shm file for the first locking +// byte. + +// Object declarations +type WalIndexHdr1 = struct { + FiVersion U32 + Funused U32 + FiChange U32 + FisInit U8 + FbigEndCksum U8 + FszPage U16 + FmxFrame U32 + FnPage U32 + FaFrameCksum [2]U32 + FaSalt [2]U32 + FaCksum [2]U32 +} /* sqlite3.c:578:9 */ + +//************* End of pager.c ********************************************** +//************* Begin file wal.c ******************************************** +// 2010 February 1 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains the implementation of a write-ahead log (WAL) used in +// "journal_mode=WAL" mode. +// +// WRITE-AHEAD LOG (WAL) FILE FORMAT +// +// A WAL file consists of a header followed by zero or more "frames". +// Each frame records the revised content of a single page from the +// database file. All changes to the database are recorded by writing +// frames into the WAL. Transactions commit when a frame is written that +// contains a commit marker. A single WAL can and usually does record +// multiple transactions. Periodically, the content of the WAL is +// transferred back into the database file in an operation called a +// "checkpoint". +// +// A single WAL file can be used multiple times. In other words, the +// WAL can fill up with frames and then be checkpointed and then new +// frames can overwrite the old ones. A WAL always grows from beginning +// toward the end. Checksums and counters attached to each frame are +// used to determine which frames within the WAL are valid and which +// are leftovers from prior checkpoints. +// +// The WAL header is 32 bytes in size and consists of the following eight +// big-endian 32-bit unsigned integer values: +// +// 0: Magic number. 0x377f0682 or 0x377f0683 +// 4: File format version. Currently 3007000 +// 8: Database page size. Example: 1024 +// 12: Checkpoint sequence number +// 16: Salt-1, random integer incremented with each checkpoint +// 20: Salt-2, a different random integer changing with each ckpt +// 24: Checksum-1 (first part of checksum for first 24 bytes of header). +// 28: Checksum-2 (second part of checksum for first 24 bytes of header). +// +// Immediately following the wal-header are zero or more frames. Each +// frame consists of a 24-byte frame-header followed by a bytes +// of page data. The frame-header is six big-endian 32-bit unsigned +// integer values, as follows: +// +// 0: Page number. +// 4: For commit records, the size of the database image in pages +// after the commit. For all other records, zero. +// 8: Salt-1 (copied from the header) +// 12: Salt-2 (copied from the header) +// 16: Checksum-1. +// 20: Checksum-2. +// +// A frame is considered valid if and only if the following conditions are +// true: +// +// (1) The salt-1 and salt-2 values in the frame-header match +// salt values in the wal-header +// +// (2) The checksum values in the final 8 bytes of the frame-header +// exactly match the checksum computed consecutively on the +// WAL header and the first 8 bytes and the content of all frames +// up to and including the current frame. +// +// The checksum is computed using 32-bit big-endian integers if the +// magic number in the first 4 bytes of the WAL is 0x377f0683 and it +// is computed using little-endian if the magic number is 0x377f0682. +// The checksum values are always stored in the frame header in a +// big-endian format regardless of which byte order is used to compute +// the checksum. The checksum is computed by interpreting the input as +// an even number of unsigned 32-bit integers: x[0] through x[N]. The +// algorithm used for the checksum is as follows: +// +// for i from 0 to n-1 step 2: +// s0 += x[i] + s1; +// s1 += x[i+1] + s0; +// endfor +// +// Note that s0 and s1 are both weighted checksums using fibonacci weights +// in reverse order (the largest fibonacci weight occurs on the first element +// of the sequence being summed.) The s1 value spans all 32-bit +// terms of the sequence whereas s0 omits the final term. +// +// On a checkpoint, the WAL is first VFS.xSync-ed, then valid content of the +// WAL is transferred into the database, then the database is VFS.xSync-ed. +// The VFS.xSync operations serve as write barriers - all writes launched +// before the xSync must complete before any write that launches after the +// xSync begins. +// +// After each checkpoint, the salt-1 value is incremented and the salt-2 +// value is randomized. This prevents old and new frames in the WAL from +// being considered valid at the same time and being checkpointing together +// following a crash. +// +// READER ALGORITHM +// +// To read a page from the database (call it page number P), a reader +// first checks the WAL to see if it contains page P. If so, then the +// last valid instance of page P that is a followed by a commit frame +// or is a commit frame itself becomes the value read. If the WAL +// contains no copies of page P that are valid and which are a commit +// frame or are followed by a commit frame, then page P is read from +// the database file. +// +// To start a read transaction, the reader records the index of the last +// valid frame in the WAL. The reader uses this recorded "mxFrame" value +// for all subsequent read operations. New transactions can be appended +// to the WAL, but as long as the reader uses its original mxFrame value +// and ignores the newly appended content, it will see a consistent snapshot +// of the database from a single point in time. This technique allows +// multiple concurrent readers to view different versions of the database +// content simultaneously. +// +// The reader algorithm in the previous paragraphs works correctly, but +// because frames for page P can appear anywhere within the WAL, the +// reader has to scan the entire WAL looking for page P frames. If the +// WAL is large (multiple megabytes is typical) that scan can be slow, +// and read performance suffers. To overcome this problem, a separate +// data structure called the wal-index is maintained to expedite the +// search for frames of a particular page. +// +// WAL-INDEX FORMAT +// +// Conceptually, the wal-index is shared memory, though VFS implementations +// might choose to implement the wal-index using a mmapped file. Because +// the wal-index is shared memory, SQLite does not support journal_mode=WAL +// on a network filesystem. All users of the database must be able to +// share memory. +// +// In the default unix and windows implementation, the wal-index is a mmapped +// file whose name is the database name with a "-shm" suffix added. For that +// reason, the wal-index is sometimes called the "shm" file. +// +// The wal-index is transient. After a crash, the wal-index can (and should +// be) reconstructed from the original WAL file. In fact, the VFS is required +// to either truncate or zero the header of the wal-index when the last +// connection to it closes. Because the wal-index is transient, it can +// use an architecture-specific format; it does not have to be cross-platform. +// Hence, unlike the database and WAL file formats which store all values +// as big endian, the wal-index can store multi-byte values in the native +// byte order of the host computer. +// +// The purpose of the wal-index is to answer this question quickly: Given +// a page number P and a maximum frame index M, return the index of the +// last frame in the wal before frame M for page P in the WAL, or return +// NULL if there are no frames for page P in the WAL prior to M. +// +// The wal-index consists of a header region, followed by an one or +// more index blocks. +// +// The wal-index header contains the total number of frames within the WAL +// in the mxFrame field. +// +// Each index block except for the first contains information on +// HASHTABLE_NPAGE frames. The first index block contains information on +// HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and +// HASHTABLE_NPAGE are selected so that together the wal-index header and +// first index block are the same size as all other index blocks in the +// wal-index. The values are: +// +// HASHTABLE_NPAGE 4096 +// HASHTABLE_NPAGE_ONE 4062 +// +// Each index block contains two sections, a page-mapping that contains the +// database page number associated with each wal frame, and a hash-table +// that allows readers to query an index block for a specific page number. +// The page-mapping is an array of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE +// for the first index block) 32-bit page numbers. The first entry in the +// first index-block contains the database page number corresponding to the +// first frame in the WAL file. The first entry in the second index block +// in the WAL file corresponds to the (HASHTABLE_NPAGE_ONE+1)th frame in +// the log, and so on. +// +// The last index block in a wal-index usually contains less than the full +// complement of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE) page-numbers, +// depending on the contents of the WAL file. This does not change the +// allocated size of the page-mapping array - the page-mapping array merely +// contains unused entries. +// +// Even without using the hash table, the last frame for page P +// can be found by scanning the page-mapping sections of each index block +// starting with the last index block and moving toward the first, and +// within each index block, starting at the end and moving toward the +// beginning. The first entry that equals P corresponds to the frame +// holding the content for that page. +// +// The hash table consists of HASHTABLE_NSLOT 16-bit unsigned integers. +// HASHTABLE_NSLOT = 2*HASHTABLE_NPAGE, and there is one entry in the +// hash table for each page number in the mapping section, so the hash +// table is never more than half full. The expected number of collisions +// prior to finding a match is 1. Each entry of the hash table is an +// 1-based index of an entry in the mapping section of the same +// index block. Let K be the 1-based index of the largest entry in +// the mapping section. (For index blocks other than the last, K will +// always be exactly HASHTABLE_NPAGE (4096) and for the last index block +// K will be (mxFrame%HASHTABLE_NPAGE).) Unused slots of the hash table +// contain a value of 0. +// +// To look for page P in the hash table, first compute a hash iKey on +// P as follows: +// +// iKey = (P * 383) % HASHTABLE_NSLOT +// +// Then start scanning entries of the hash table, starting with iKey +// (wrapping around to the beginning when the end of the hash table is +// reached) until an unused hash slot is found. Let the first unused slot +// be at index iUnused. (iUnused might be less than iKey if there was +// wrap-around.) Because the hash table is never more than half full, +// the search is guaranteed to eventually hit an unused entry. Let +// iMax be the value between iKey and iUnused, closest to iUnused, +// where aHash[iMax]==P. If there is no iMax entry (if there exists +// no hash slot such that aHash[i]==p) then page P is not in the +// current index block. Otherwise the iMax-th mapping entry of the +// current index block corresponds to the last entry that references +// page P. +// +// A hash search begins with the last index block and moves toward the +// first index block, looking for entries corresponding to page P. On +// average, only two or three slots in each index block need to be +// examined in order to either find the last entry for page P, or to +// establish that no such entry exists in the block. Each index block +// holds over 4000 entries. So two or three index blocks are sufficient +// to cover a typical 10 megabyte WAL file, assuming 1K pages. 8 or 10 +// comparisons (on average) suffice to either locate a frame in the +// WAL or to establish that the frame does not exist in the WAL. This +// is much faster than scanning the entire 10MB WAL. +// +// Note that entries are added in order of increasing K. Hence, one +// reader might be using some value K0 and a second reader that started +// at a later time (after additional transactions were added to the WAL +// and to the wal-index) might be using a different value K1, where K1>K0. +// Both readers can use the same hash table and mapping section to get +// the correct result. There may be entries in the hash table with +// K>K0 but to the first reader, those entries will appear to be unused +// slots in the hash table and so the first reader will get an answer as +// if no values greater than K0 had ever been inserted into the hash table +// in the first place - which is what reader one wants. Meanwhile, the +// second reader using K1 will see additional values that were inserted +// later, which is exactly what reader two wants. +// +// When a rollback occurs, the value of K is decreased. Hash table entries +// that correspond to frames greater than the new K value are removed +// from the hash table at this point. + +// #include "wal.h" + +// Trace output macros + +// The maximum (and only) versions of the wal and wal-index formats +// that may be interpreted by this version of SQLite. +// +// If a client begins recovering a WAL file and finds that (a) the checksum +// values in the wal-header are correct and (b) the version field is not +// WAL_MAX_VERSION, recovery fails and SQLite returns SQLITE_CANTOPEN. +// +// Similarly, if a client successfully reads a wal-index header (i.e. the +// checksum test is successful) and finds that the version field is not +// WALINDEX_MAX_VERSION, then no read-transaction is opened and SQLite +// returns SQLITE_CANTOPEN. + +// Index numbers for various locking bytes. WAL_NREADER is the number +// of available reader locks and should be at least 3. The default +// is SQLITE_SHM_NLOCK==8 and WAL_NREADER==5. +// +// Technically, the various VFSes are free to implement these locks however +// they see fit. However, compatibility is encouraged so that VFSes can +// interoperate. The standard implemention used on both unix and windows +// is for the index number to indicate a byte offset into the +// WalCkptInfo.aLock[] array in the wal-index header. In other words, all +// locks are on the shm file. The WALINDEX_LOCK_OFFSET constant (which +// should be 120) is the location in the shm file for the first locking +// byte. + +// Object declarations +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ +type WalIterator1 = struct { + FiPrior U32 + FnSegment int32 + FaSegment [1]struct { + FiNext int32 + F__ccgo_pad1 [4]byte + FaIndex uintptr + FaPgno uintptr + FnEntry int32 + FiZero int32 + } +} /* sqlite3.c:61245:9 */ + +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ +type WalCkptInfo1 = struct { + FnBackfill U32 + FaReadMark [5]U32 + FaLock [8]U8 + FnBackfillAttempted U32 + FnotUsed0 U32 +} /* sqlite3.c:61246:9 */ + +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ + +// Candidate values for Wal.exclusiveMode. + +// Possible values for WAL.readOnly + +// Each page of the wal-index mapping contains a hash-table made up of +// an array of HASHTABLE_NSLOT elements of the following type. +type Ht_slot = U16 /* sqlite3.c:61501:13 */ + +// This structure is used to implement an iterator that loops through +// all frames in the WAL in database page order. Where two or more frames +// correspond to the same database page, the iterator visits only the +// frame most recently written to the WAL (in other words, the frame with +// the largest index). +// +// The internals of this structure are only accessed by: +// +// walIteratorInit() - Create a new iterator, +// walIteratorNext() - Step an iterator, +// walIteratorFree() - Free an iterator. +// +// This functionality is used by the checkpoint code (see walCheckpoint()). +type WalSegment = struct { + FiNext int32 + F__ccgo_pad1 [4]byte + FaIndex uintptr + FaPgno uintptr + FnEntry int32 + FiZero int32 +} /* sqlite3.c:61245:9 */ + +// Define the parameters of the hash tables in the wal-index file. There +// is a hash-table following every HASHTABLE_NPAGE page numbers in the +// wal-index. +// +// Changing any of these constants will alter the wal-index format and +// create incompatibilities. + +// The block of page numbers associated with the first hash-table in a +// wal-index is smaller than usual. This is so that there is a complete +// hash-table on each aligned 32KB page of the wal-index. + +// The wal-index is divided into pages of WALINDEX_PGSZ bytes each. + +// Obtain a pointer to the iPage'th page of the wal-index. The wal-index +// is broken into pages of WALINDEX_PGSZ bytes. Wal-index pages are +// numbered from zero. +// +// If the wal-index is currently smaller the iPage pages then the size +// of the wal-index might be increased, but only if it is safe to do +// so. It is safe to enlarge the wal-index if pWal->writeLock is true +// or pWal->exclusiveMode==WAL_HEAPMEMORY_MODE. +// +// Three possible result scenarios: +// +// (1) rc==SQLITE_OK and *ppPage==Requested-Wal-Index-Page +// (2) rc>=SQLITE_ERROR and *ppPage==NULL +// (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 +// +// Scenario (3) can only occur when pWal->writeLock is false and iPage==0 +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ + var rc int32 = SQLITE_OK + + // Enlarge the pWal->apWiData[] array if required + if (*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage { + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(iPage+1)) + var apNew uintptr + libc.AtomicStoreUintptr(&apNew, uintptr(Xsqlite3Realloc(tls, (*Wal)(unsafe.Pointer(pWal)).FapWiData, uint64(nByte)))) + if !(apNew != 0) { + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) + return SQLITE_NOMEM + } + libc.Xmemset(tls, apNew+uintptr((*Wal)(unsafe.Pointer(pWal)).FnWiData)*8, 0, + uint64(unsafe.Sizeof(uintptr(0)))*uint64(iPage+1-(*Wal)(unsafe.Pointer(pWal)).FnWiData)) + (*Wal)(unsafe.Pointer(pWal)).FapWiData = apNew + (*Wal)(unsafe.Pointer(pWal)).FnWiData = iPage + 1 + } + + // Request a pointer to the required page from the VFS + + if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE { + *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)) = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))) + if !(int32(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8))) != 0) { + rc = SQLITE_NOMEM + } + } else { + rc = Xsqlite3OsShmMap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, iPage, int32(uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))), + int32((*Wal)(unsafe.Pointer(pWal)).FwriteLock), (*Wal)(unsafe.Pointer(pWal)).FapWiData+uintptr(iPage)*8) + + if rc == SQLITE_OK { + if iPage > 0 && Xsqlite3FaultSim(tls, 600) != 0 { + rc = SQLITE_NOMEM + } + } else if rc&0xff == SQLITE_READONLY { + *(*U8)(unsafe.Pointer(pWal + 66)) |= U8(WAL_SHM_RDONLY) + if rc == SQLITE_READONLY { + rc = SQLITE_OK + } + } + } + + *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)) + + return rc +} + +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) + } + return SQLITE_OK +} + +// Return a pointer to the WalCkptInfo structure in the wal-index. +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ + + return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 +} + +// Return a pointer to the WalIndexHdr structure in the wal-index. +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ + + return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) +} + +// The argument to this macro must be of type u32. On a little-endian +// architecture, it returns the u32 value that results from interpreting +// the 4 bytes as a big-endian value. On a big-endian architecture, it +// returns the value that would be produced by interpreting the 4 bytes +// of the input value as a little-endian integer. + +// Generate or extend an 8 byte checksum based on the data in +// array aByte[] and the initial values of aIn[0] and aIn[1] (or +// initial values of 0 and 0 if aIn==NULL). +// +// The checksum is written back into aOut[] before returning. +// +// nByte must be a positive multiple of 8. +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ + var s1 U32 + var s2 U32 + var aData uintptr = a + var aEnd uintptr = a + uintptr(nByte) + + if aIn != 0 { + s1 = *(*U32)(unsafe.Pointer(aIn)) + s2 = *(*U32)(unsafe.Pointer(aIn + 1*4)) + } else { + s1 = libc.AssignUint32(&s2, U32(0)) + } + + if nativeCksum != 0 { + for __ccgo := true; __ccgo; __ccgo = aData < aEnd { + s1 = s1 + (*(*U32)(unsafe.Pointer(libc.PostIncUintptr(&aData, 4))) + s2) + s2 = s2 + (*(*U32)(unsafe.Pointer(libc.PostIncUintptr(&aData, 4))) + s1) + } + } else { + for __ccgo1 := true; __ccgo1; __ccgo1 = aData < aEnd { + s1 = s1 + (*(*U32)(unsafe.Pointer(aData))&U32(0x000000FF)<<24 + *(*U32)(unsafe.Pointer(aData))&U32(0x0000FF00)<<8 + *(*U32)(unsafe.Pointer(aData))&U32(0x00FF0000)>>8 + *(*U32)(unsafe.Pointer(aData))&0xFF000000>>24 + s2) + s2 = s2 + (*(*U32)(unsafe.Pointer(aData + 1*4))&U32(0x000000FF)<<24 + *(*U32)(unsafe.Pointer(aData + 1*4))&U32(0x0000FF00)<<8 + *(*U32)(unsafe.Pointer(aData + 1*4))&U32(0x00FF0000)>>8 + *(*U32)(unsafe.Pointer(aData + 1*4))&0xFF000000>>24 + s1) + aData += 4 * uintptr(2) + } + } + + *(*U32)(unsafe.Pointer(aOut)) = s1 + *(*U32)(unsafe.Pointer(aOut + 1*4)) = s2 +} + +// If there is the possibility of concurrent access to the SHM file +// from multiple threads and/or processes, then do a memory barrier. +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ + if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { + Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) + } +} + +// Add the SQLITE_NO_TSAN as part of the return-type of a function +// definition as a hint that the function contains constructs that +// might give false-positive TSAN warnings. +// +// See tag-20200519-1. + +// Write the header information in pWal->hdr into the wal-index. +// +// The checksum on pWal->hdr is updated before it is written. +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ + var aHdr uintptr = walIndexHdr(tls, pWal) + var nCksum int32 = int32(uintptr(0) + 40) + + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FisInit = U8(1) + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion = U32(WALINDEX_MAX_VERSION) + walChecksumBytes(tls, 1, pWal+72, nCksum, uintptr(0), pWal+72+40) + // Possible TSAN false-positive. See tag-20200519-1 + libc.Xmemcpy(tls, aHdr+1*48, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) + walShmBarrier(tls, pWal) + libc.Xmemcpy(tls, aHdr, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) +} + +// This function encodes a single frame header and writes it to a buffer +// supplied by the caller. A frame-header is made up of a series of +// 4-byte big-endian integers, as follows: +// +// 0: Page number. +// 4: For commit records, the size of the database image in pages +// after the commit. For all other records, zero. +// 8: Salt-1 (copied from the wal-header) +// 12: Salt-2 (copied from the wal-header) +// 16: Checksum-1. +// 20: Checksum-2. +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ + var nativeCksum int32 // True for native byte-order checksums + var aCksum uintptr = pWal + 72 + 24 + + Xsqlite3Put4byte(tls, aFrame, iPage) + Xsqlite3Put4byte(tls, aFrame+4, nTruncate) + if (*Wal)(unsafe.Pointer(pWal)).FiReCksum == U32(0) { + libc.Xmemcpy(tls, aFrame+8, pWal+72+32, uint64(8)) + + nativeCksum = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)) + walChecksumBytes(tls, nativeCksum, aFrame, 8, aCksum, aCksum) + walChecksumBytes(tls, nativeCksum, aData, int32((*Wal)(unsafe.Pointer(pWal)).FszPage), aCksum, aCksum) + + Xsqlite3Put4byte(tls, aFrame+16, *(*U32)(unsafe.Pointer(aCksum))) + Xsqlite3Put4byte(tls, aFrame+20, *(*U32)(unsafe.Pointer(aCksum + 1*4))) + } else { + libc.Xmemset(tls, aFrame+8, 0, uint64(16)) + } +} + +// Check to see if the frame with header in aFrame[] and content +// in aData[] is valid. If it is a valid frame, fill *piPage and +// *pnTruncate and return true. Return if the frame is not valid. +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ + var nativeCksum int32 // True for native byte-order checksums + var aCksum uintptr = pWal + 72 + 24 + var pgno U32 // Page number of the frame + + // A frame is only valid if the salt values in the frame-header + // match the salt values in the wal-header. + if libc.Xmemcmp(tls, pWal+72+32, aFrame+8, uint64(8)) != 0 { + return 0 + } + + // A frame is only valid if the page number is creater than zero. + pgno = Xsqlite3Get4byte(tls, aFrame) + if pgno == U32(0) { + return 0 + } + + // A frame is only valid if a checksum of the WAL header, + // all prior frams, the first 16 bytes of this frame-header, + // and the frame-data matches the checksum in the last 8 + // bytes of this frame-header. + nativeCksum = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)) + walChecksumBytes(tls, nativeCksum, aFrame, 8, aCksum, aCksum) + walChecksumBytes(tls, nativeCksum, aData, int32((*Wal)(unsafe.Pointer(pWal)).FszPage), aCksum, aCksum) + if *(*U32)(unsafe.Pointer(aCksum)) != Xsqlite3Get4byte(tls, aFrame+16) || + *(*U32)(unsafe.Pointer(aCksum + 1*4)) != Xsqlite3Get4byte(tls, aFrame+20) { + // Checksum failed. + return 0 + } + + // If we reach this point, the frame is valid. Return the page number + // and the new database size. + *(*U32)(unsafe.Pointer(piPage)) = pgno + *(*U32)(unsafe.Pointer(pnTruncate)) = Xsqlite3Get4byte(tls, aFrame+4) + return 1 +} + +// Set or release locks on the WAL. Locks are either shared or exclusive. +// A lock cannot be moved directly between shared and exclusive - it must go +// through the unlocked state first. +// +// In locking_mode=EXCLUSIVE, all of these routines become no-ops. +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ + var rc int32 + if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { + return SQLITE_OK + } + rc = Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, 1, + SQLITE_SHM_LOCK|SQLITE_SHM_SHARED) + + return rc +} + +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ + if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { + return + } + Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, 1, + SQLITE_SHM_UNLOCK|SQLITE_SHM_SHARED) + +} + +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ + var rc int32 + if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { + return SQLITE_OK + } + rc = Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, n, + SQLITE_SHM_LOCK|SQLITE_SHM_EXCLUSIVE) + + return rc +} + +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ + if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { + return + } + Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, n, + SQLITE_SHM_UNLOCK|SQLITE_SHM_EXCLUSIVE) + +} + +// Compute a hash on a page number. The resulting hash value must land +// between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances +// the hash to the next value in the event of a collision. +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ + + return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) +} + +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ + return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) +} + +// An instance of the WalHashLoc object is used to describe the location +// of a page hash table in the wal-index. This becomes the return value +// from walHashGet(). +type WalHashLoc1 = struct { + FaHash uintptr + FaPgno uintptr + FiZero U32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:61926:9 */ + +// An instance of the WalHashLoc object is used to describe the location +// of a page hash table in the wal-index. This becomes the return value +// from walHashGet(). +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ + +// Return pointers to the hash table and page number array stored on +// page iHash of the wal-index. The wal-index is broken into 32KB pages +// numbered starting from 0. +// +// Set output variable pLoc->aHash to point to the start of the hash table +// in the wal-index file. Set pLoc->iZero to one less than the frame +// number of the first frame indexed by this hash table. If a +// slot in the hash table is set to N, it refers to frame number +// (pLoc->iZero+N) in the log. +// +// Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the +// first frame indexed by the hash table, frame (pLoc->iZero). +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ + var rc int32 // Return code + + rc = walIndexPage(tls, pWal, iHash, pLoc+8) + + if (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno != 0 { + (*WalHashLoc)(unsafe.Pointer(pLoc)).FaHash = (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno + 4096*4 + if iHash == 0 { + (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno = (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno + 34*4 + (*WalHashLoc)(unsafe.Pointer(pLoc)).FiZero = U32(0) + } else { + (*WalHashLoc)(unsafe.Pointer(pLoc)).FiZero = U32(uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0))) + uint64((iHash-1)*HASHTABLE_NPAGE)) + } + } else if rc == SQLITE_OK { + rc = SQLITE_ERROR + } + return rc +} + +// Return the number of the wal-index page that contains the hash-table +// and page-number array that contain entries corresponding to WAL frame +// iFrame. The wal-index is broken up into 32KB pages. Wal-index pages +// are numbered starting from 0. +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ + var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) + + return iHash +} + +// Return the page number associated with frame iFrame in this WAL. +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ + var iHash int32 = walFramePage(tls, iFrame) + if iHash == 0 { + return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) + } + return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iHash)*8)) + uintptr((uint64(iFrame-U32(1))-(uint64(HASHTABLE_NPAGE)-(uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))))%uint64(HASHTABLE_NPAGE))*4)) +} + +// Remove entries from the hash table that point to WAL slots greater +// than pWal->hdr.mxFrame. +// +// This function is called whenever pWal->hdr.mxFrame is decreased due +// to a rollback or savepoint. +// +// At most only the hash table containing pWal->hdr.mxFrame needs to be +// updated. Any later hash tables will be automatically cleared when +// pWal->hdr.mxFrame advances to the point where those hash tables are +// actually needed. +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + // var sLoc WalHashLoc at bp, 24 + // Hash table location + var iLimit int32 = 0 // Zero values greater than this + var nByte int32 // Number of bytes to zero in aPgno[] + var i int32 // Used to iterate through aHash[] + + if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0) { + return + } + + // Obtain pointers to the hash-table and page-number array containing + // the entry that corresponds to frame pWal->hdr.mxFrame. It is guaranteed + // that the page said hash-table and array reside on is already mapped.(1) + + i = walHashGet(tls, pWal, walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame), bp) + if i != 0 { + return + } // Defense-in-depth, in case (1) above is wrong + + // Zero all hash-table entries that correspond to frame numbers greater + // than pWal->hdr.mxFrame. + iLimit = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame - (*WalHashLoc)(unsafe.Pointer(bp)).FiZero) + + for i = 0; i < HASHTABLE_NPAGE*2; i++ { + if int32(*(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaHash + uintptr(i)*2))) > iLimit { + *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(i)*2)) = Ht_slot(0) + } + } + + // Zero the entries in the aPgno array that correspond to frames with + // frame numbers greater than pWal->hdr.mxFrame. + nByte = int32((int64((*WalHashLoc)(unsafe.Pointer(bp)).FaHash) - int64((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno+uintptr(iLimit)*4)) / 1) + + libc.Xmemset(tls, (*WalHashLoc)(unsafe.Pointer(bp)).FaPgno+uintptr(iLimit)*4, 0, uint64(nByte)) + +} + +// Set an entry in the wal-index that will map database page number +// pPage into WAL frame iFrame. +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 // Return code + // var sLoc WalHashLoc at bp, 24 + // Wal-index hash table location + + rc = walHashGet(tls, pWal, walFramePage(tls, iFrame), bp) + + // Assuming the wal-index file was successfully mapped, populate the + // page number array and hash table entry. + if rc == SQLITE_OK { + var iKey int32 // Hash table key + var idx int32 // Value to write to hash-table slot + var nCollide int32 // Number of hash collisions + + idx = int32(iFrame - (*WalHashLoc)(unsafe.Pointer(bp)).FiZero) + + // If this is the first entry to be added to this hash-table, zero the + // entire hash table and aPgno[] array before proceeding. + if idx == 1 { + var nByte int32 = int32((int64((*WalHashLoc)(unsafe.Pointer(bp)).FaHash+8192*2) - int64((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno)) / 1) + + libc.Xmemset(tls, (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno, 0, uint64(nByte)) + } + + // If the entry in aPgno[] is already set, then the previous writer + // must have exited unexpectedly in the middle of a transaction (after + // writing one or more dirty pages to the WAL to free up memory). + // Remove the remnants of that writers uncommitted transaction from + // the hash-table before writing any new entries. + if *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) != 0 { + walCleanupHash(tls, pWal) + + } + + // Write the aPgno[] array entry and the hash-table slot. + nCollide = idx + for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { + if libc.PostDecInt32(&nCollide, 1) == 0 { + return Xsqlite3CorruptError(tls, 62114) + } + } + *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage + libc.AtomicStoreNUint16((*WalHashLoc)(unsafe.Pointer(bp)).FaHash+uintptr(iKey)*2, uint16(Ht_slot(idx)), 0) + + } + + return rc +} + +// Recover the wal-index by reading the write-ahead log file. +// +// This routine first tries to establish an exclusive lock on the +// wal-index to prevent other threads/processes from doing anything +// with the WAL or wal-index while recovery is running. The +// WAL_RECOVER_LOCK is also held so that other threads will know +// that this thread is running recovery. If unable to establish +// the necessary locks, this routine returns SQLITE_BUSY. +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var rc int32 // Return Code + // var nSize I64 at bp+16, 8 + // Size of log file + // var aFrameCksum [2]U32 at bp+72, 8 + + var iLock int32 + var iOffset I64 + // var pgno U32 at bp+64, 4 + // Database page number for frame + // var nTruncate U32 at bp+68, 4 + + // var aShare uintptr at bp+56, 8 + + var iFrame U32 // Index of last frame read + var iLast U32 + var iFirst U32 + var nHdr U32 + var nHdr32 U32 + // var aBuf [32]U8 at bp+24, 32 + // Buffer to load WAL header into + var aPrivate uintptr // Heap copy of *-shm hash being populated + var aFrame uintptr // Malloc'd buffer to load entire frame + var szFrame int32 // Number of bytes in buffer aFrame[] + var aData uintptr // Pointer to data part of aFrame buffer + var szPage int32 // Page size according to the log + var magic U32 // Magic value read from WAL header + var version U32 // Magic value read from WAL header + var isValid int32 // True if this frame is valid + var iPg U32 // Current 32KB wal-index page + var iLastFrame U32 + var pInfo uintptr + var i int32 + *(*[2]U32)(unsafe.Pointer(bp + 72 /* aFrameCksum */)) = [2]U32{U32(0), U32(0)} // Lock offset to lock for checkpoint + + // Obtain an exclusive lock on all byte in the locking range not already + // locked by the caller. The caller is guaranteed to have locked the + // WAL_WRITE_LOCK byte, and may have also locked the WAL_CKPT_LOCK byte. + // If successful, the same bytes that are locked here are unlocked before + // this function returns. + + iLock = WAL_ALL_BUT_WRITE + int32((*Wal)(unsafe.Pointer(pWal)).FckptLock) + rc = walLockExclusive(tls, pWal, iLock, 3+0-iLock) + if !(rc != 0) { + goto __1 + } + return rc +__1: + ; + + libc.Xmemset(tls, pWal+72, 0, uint64(unsafe.Sizeof(WalIndexHdr{}))) + + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16) + if !(rc != SQLITE_OK) { + goto __2 + } + goto recovery_error +__2: + ; + + if !(*(*I64)(unsafe.Pointer(bp + 16)) > int64(WAL_HDRSIZE)) { + goto __3 + } // Buffer to load WAL header into + aPrivate = uintptr(0) // Heap copy of *-shm hash being populated + aFrame = uintptr(0) // Last frame in wal, based on nSize alone + + // Read in the WAL header. + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+24, WAL_HDRSIZE, int64(0)) + if !(rc != SQLITE_OK) { + goto __4 + } + goto recovery_error +__4: + ; + + // If the database page size is not a power of two, or is greater than + // SQLITE_MAX_PAGE_SIZE, conclude that the WAL file contains no valid + // data. Similarly, if the 'magic' value is invalid, ignore the whole + // WAL file. + magic = Xsqlite3Get4byte(tls, bp+24) + szPage = int32(Xsqlite3Get4byte(tls, bp+24+8)) + if !(magic&0xFFFFFFFE != U32(WAL_MAGIC) || + szPage&(szPage-1) != 0 || + szPage > SQLITE_MAX_PAGE_SIZE || + szPage < 512) { + goto __5 + } + goto finished +__5: + ; + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = U8(magic & U32(0x00000001)) + (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(szPage) + (*Wal)(unsafe.Pointer(pWal)).FnCkpt = Xsqlite3Get4byte(tls, bp+24+12) + libc.Xmemcpy(tls, pWal+72+32, bp+24+16, uint64(8)) + + // Verify that the WAL header checksum is correct + walChecksumBytes(tls, libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)), + bp+24, WAL_HDRSIZE-2*4, uintptr(0), pWal+72+24) + if !(*(*U32)(unsafe.Pointer(pWal + 72 + 24)) != Xsqlite3Get4byte(tls, bp+24+24) || + *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) != Xsqlite3Get4byte(tls, bp+24+28)) { + goto __6 + } + goto finished +__6: + ; + + // Verify that the version number on the WAL format is one that + // are able to understand + version = Xsqlite3Get4byte(tls, bp+24+4) + if !(version != U32(WAL_MAX_VERSION)) { + goto __7 + } + rc = Xsqlite3CantopenError(tls, 62246) + goto finished +__7: + ; + + // Malloc a buffer to read frames into. + szFrame = szPage + WAL_FRAME_HDRSIZE + aFrame = Xsqlite3_malloc64(tls, uint64(uint64(szFrame)+(uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))))) + if !!(aFrame != 0) { + goto __8 + } + rc = SQLITE_NOMEM + goto recovery_error +__8: + ; + aData = aFrame + 24 + aPrivate = aData + uintptr(szPage) + + // Read all frames from the log file. + iLastFrame = U32((*(*I64)(unsafe.Pointer(bp + 16)) - int64(WAL_HDRSIZE)) / I64(szFrame)) + iPg = U32(0) +__9: + if !(iPg <= U32(walFramePage(tls, iLastFrame))) { + goto __11 + } // Index of last frame read + iLast = func() uint32 { + if uint64(iLastFrame) < uint64(HASHTABLE_NPAGE)-(uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iPg*U32(HASHTABLE_NPAGE)) { + return iLastFrame + } + return uint32(uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0))) + uint64(iPg*U32(HASHTABLE_NPAGE))) + }() + iFirst = U32(uint64(1) + func() uint64 { + if iPg == U32(0) { + return uint64(0) + } + return uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0))) + uint64((iPg-U32(1))*U32(HASHTABLE_NPAGE)) + }()) + rc = walIndexPage(tls, pWal, int32(iPg), bp+56) + + if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { + goto __12 + } + goto __11 +__12: + ; + *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPg)*8)) = aPrivate + + iFrame = iFirst +__13: + if !(iFrame <= iLast) { + goto __15 + } + iOffset = int64(WAL_HDRSIZE) + I64(iFrame-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) // dbsize field from frame header + + // Read and decode the next log frame. + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aFrame, szFrame, iOffset) + if !(rc != SQLITE_OK) { + goto __16 + } + goto __15 +__16: + ; + isValid = walDecodeFrame(tls, pWal, bp+64, bp+68, aData, aFrame) + if !!(isValid != 0) { + goto __17 + } + goto __15 +__17: + ; + rc = walIndexAppend(tls, pWal, iFrame, *(*U32)(unsafe.Pointer(bp + 64 /* pgno */))) + if !(rc != SQLITE_OK) { + goto __18 + } + goto __15 +__18: + ; + + // If nTruncate is non-zero, this is a commit record. + if !(*(*U32)(unsafe.Pointer(bp + 68)) != 0) { + goto __19 + } + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = iFrame + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage = *(*U32)(unsafe.Pointer(bp + 68 /* nTruncate */)) + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage = U16(szPage&0xff00 | szPage>>16) + + *(*U32)(unsafe.Pointer(bp + 72)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) + *(*U32)(unsafe.Pointer(bp + 72 + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) +__19: + ; + goto __14 +__14: + iFrame++ + goto __13 + goto __15 +__15: + ; + *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPg)*8)) = *(*uintptr)(unsafe.Pointer(bp + 56 /* aShare */)) + nHdr = func() uint32 { + if iPg == U32(0) { + return uint32(uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2) + uint64(unsafe.Sizeof(WalCkptInfo{}))) + } + return uint32(0) + }() + nHdr32 = U32(uint64(nHdr) / uint64(unsafe.Sizeof(U32(0)))) + // Memcpy() should work fine here, on all reasonable implementations. + // Technically, memcpy() might change the destination to some + // intermediate value before setting to the final value, and that might + // cause a concurrent reader to malfunction. Memcpy() is allowed to + // do that, according to the spec, but no memcpy() implementation that + // we know of actually does that, which is why we say that memcpy() + // is safe for this. Memcpy() is certainly a lot faster. + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 56))+uintptr(nHdr32)*4, aPrivate+uintptr(nHdr32)*4, uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))-uint64(nHdr)) + if !(iFrame <= iLast) { + goto __20 + } + goto __11 +__20: + ; + goto __10 +__10: + iPg++ + goto __9 + goto __11 +__11: + ; + + Xsqlite3_free(tls, aFrame) +__3: + ; + +finished: + if !(rc == SQLITE_OK) { + goto __21 + } + *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(bp + 72)) + *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 72 + 1*4)) + walIndexWriteHdr(tls, pWal) + + // Reset the checkpoint-header. This is safe because this thread is + // currently holding locks that exclude all other writers and + // checkpointers. Then set the values of read-mark slots 1 through N. + libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal))) + (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill = U32(0) + (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + *(*U32)(unsafe.Pointer(pInfo + 4)) = U32(0) + i = 1 +__22: + if !(i < SQLITE_SHM_NLOCK-3) { + goto __24 + } + rc = walLockExclusive(tls, pWal, 3+i, 1) + if !(rc == SQLITE_OK) { + goto __25 + } + if !(i == 1 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0) { + goto __27 + } + *(*U32)(unsafe.Pointer(pInfo + 4 + uintptr(i)*4)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + goto __28 +__27: + *(*U32)(unsafe.Pointer(pInfo + 4 + uintptr(i)*4)) = READMARK_NOT_USED +__28: + ; + walUnlockExclusive(tls, pWal, 3+i, 1) + goto __26 +__25: + if !(rc != SQLITE_BUSY) { + goto __29 + } + goto recovery_error +__29: + ; +__26: + ; + goto __23 +__23: + i++ + goto __22 + goto __24 +__24: + ; + + // If more than one frame was recovered from the log file, report an + // event via sqlite3_log(). This is to help with identifying performance + // problems caused by applications routinely shutting down without + // checkpointing the log file. + if !((*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage != 0) { + goto __30 + } + Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, + ts+3912, + libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) +__30: + ; +__21: + ; + +recovery_error: + ; + walUnlockExclusive(tls, pWal, iLock, 3+0-iLock) + return rc +} + +// Close an open wal-index. +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ + if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { + var i int32 + for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8)) = uintptr(0) + } + } + if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { + Xsqlite3OsShmUnmap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, isDelete) + } +} + +// Open a connection to the WAL file zWalName. The database file must +// already be opened on connection pDbFd. The buffer that zWalName points +// to must remain valid for the lifetime of the returned Wal* handle. +// +// A SHARED lock should be held on the database file when this function +// is called. The purpose of this SHARED lock is to prevent any other +// client from unlinking the WAL or wal-index file. If another process +// were to do this just after this client opened one of these files, the +// system would be badly broken. +// +// If the log file is successfully opened, SQLITE_OK is returned and +// *ppWal is set to point to a new WAL handle. If an error occurs, +// an SQLite error code is returned and *ppWal is left unmodified. +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 // Return Code + var pRet uintptr // Object to allocate and return + // var flags int32 at bp, 4 + // Flags passed to OsOpen() + + // Verify the values of various constants. Any changes to the values + // of these constants would result in an incompatible on-disk format + // for the -shm file. Any change that causes one of these asserts to + // fail is a backward compatibility problem, even if the change otherwise + // works. + // + // This table also serves as a helpful cross-reference when trying to + // interpret hex dumps of the -shm file. + + // In the amalgamation, the os_unix.c and os_win.c source files come before + // this source file. Verify that the #defines of the locking byte offsets + // in os_unix.c and os_win.c agree with the WALINDEX_LOCK_OFFSET value. + // For that matter, if the lock offset ever changes from its initial design + // value of 120, we need to know that so there is an assert() to check it. + + // Allocate an instance of struct Wal to return. + *(*uintptr)(unsafe.Pointer(ppWal)) = uintptr(0) + pRet = Xsqlite3MallocZero(tls, uint64(uint64(unsafe.Sizeof(Wal{}))+uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile))) + if !(pRet != 0) { + return SQLITE_NOMEM + } + + (*Wal)(unsafe.Pointer(pRet)).FpVfs = pVfs + (*Wal)(unsafe.Pointer(pRet)).FpWalFd = pRet + 1*152 + (*Wal)(unsafe.Pointer(pRet)).FpDbFd = pDbFd + (*Wal)(unsafe.Pointer(pRet)).FreadLock = int16(-1) + (*Wal)(unsafe.Pointer(pRet)).FmxWalSize = mxWalSize + (*Wal)(unsafe.Pointer(pRet)).FzWalName = zWalName + (*Wal)(unsafe.Pointer(pRet)).FsyncHeader = U8(1) + (*Wal)(unsafe.Pointer(pRet)).FpadToSectorBoundary = U8(1) + (*Wal)(unsafe.Pointer(pRet)).FexclusiveMode = func() uint8 { + if bNoShm != 0 { + return uint8(WAL_HEAPMEMORY_MODE) + } + return uint8(WAL_NORMAL_MODE) + }() + + // Open file handle on the write-ahead log file. + *(*int32)(unsafe.Pointer(bp /* flags */)) = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_WAL + rc = Xsqlite3OsOpen(tls, pVfs, zWalName, (*Wal)(unsafe.Pointer(pRet)).FpWalFd, *(*int32)(unsafe.Pointer(bp /* flags */)), bp) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp))&SQLITE_OPEN_READONLY != 0 { + (*Wal)(unsafe.Pointer(pRet)).FreadOnly = U8(WAL_RDONLY) + } + + if rc != SQLITE_OK { + walIndexClose(tls, pRet, 0) + Xsqlite3OsClose(tls, (*Wal)(unsafe.Pointer(pRet)).FpWalFd) + Xsqlite3_free(tls, pRet) + } else { + var iDC int32 = Xsqlite3OsDeviceCharacteristics(tls, pDbFd) + if iDC&SQLITE_IOCAP_SEQUENTIAL != 0 { + (*Wal)(unsafe.Pointer(pRet)).FsyncHeader = U8(0) + } + if iDC&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { + (*Wal)(unsafe.Pointer(pRet)).FpadToSectorBoundary = U8(0) + } + *(*uintptr)(unsafe.Pointer(ppWal)) = pRet + + } + return rc +} + +// Change the size to which the WAL file is trucated on each reset. +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ + if pWal != 0 { + (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit + } +} + +// Find the smallest page number out of all pages held in the WAL that +// has not been returned by any prior invocation of this method on the +// same WalIterator object. Write into *piFrame the frame index where +// that page was last written into the WAL. Write into *piPage the page +// number. +// +// Return 0 on success. If there are no pages in the WAL with a page +// number larger than *piPage, then return 1. +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ + var iMin U32 // Result pgno must be greater than iMin + var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number + var i int32 // For looping through segments + + iMin = (*WalIterator)(unsafe.Pointer(p)).FiPrior + + for i = (*WalIterator)(unsafe.Pointer(p)).FnSegment - 1; i >= 0; i-- { + var pSegment uintptr = p + 8 + uintptr(i)*32 + for (*WalSegment)(unsafe.Pointer(pSegment)).FiNext < (*WalSegment)(unsafe.Pointer(pSegment)).FnEntry { + var iPg U32 = *(*U32)(unsafe.Pointer((*WalSegment)(unsafe.Pointer(pSegment)).FaPgno + uintptr(*(*Ht_slot)(unsafe.Pointer((*WalSegment)(unsafe.Pointer(pSegment)).FaIndex + uintptr((*WalSegment)(unsafe.Pointer(pSegment)).FiNext)*2)))*4)) + if iPg > iMin { + if iPg < iRet { + iRet = iPg + *(*U32)(unsafe.Pointer(piFrame)) = U32((*WalSegment)(unsafe.Pointer(pSegment)).FiZero + int32(*(*Ht_slot)(unsafe.Pointer((*WalSegment)(unsafe.Pointer(pSegment)).FaIndex + uintptr((*WalSegment)(unsafe.Pointer(pSegment)).FiNext)*2)))) + } + break + } + (*WalSegment)(unsafe.Pointer(pSegment)).FiNext++ + } + } + + *(*U32)(unsafe.Pointer(piPage)) = libc.AssignPtrUint32(p, iRet) + return libc.Bool32(iRet == 0xFFFFFFFF) +} + +// This function merges two sorted lists into a single sorted list. +// +// aLeft[] and aRight[] are arrays of indices. The sort key is +// aContent[aLeft[]] and aContent[aRight[]]. Upon entry, the following +// is guaranteed for all J= nRight || *(*U32)(unsafe.Pointer(aContent + uintptr(*(*Ht_slot)(unsafe.Pointer(aLeft + uintptr(iLeft)*2)))*4)) < *(*U32)(unsafe.Pointer(aContent + uintptr(*(*Ht_slot)(unsafe.Pointer(aRight + uintptr(iRight)*2)))*4))) { + logpage = *(*Ht_slot)(unsafe.Pointer(aLeft + uintptr(libc.PostIncInt32(&iLeft, 1))*2)) + } else { + logpage = *(*Ht_slot)(unsafe.Pointer(aRight + uintptr(libc.PostIncInt32(&iRight, 1))*2)) + } + dbpage = *(*U32)(unsafe.Pointer(aContent + uintptr(logpage)*4)) + + *(*Ht_slot)(unsafe.Pointer(aTmp + uintptr(libc.PostIncInt32(&iOut, 1))*2)) = logpage + if iLeft < nLeft && *(*U32)(unsafe.Pointer(aContent + uintptr(*(*Ht_slot)(unsafe.Pointer(aLeft + uintptr(iLeft)*2)))*4)) == dbpage { + iLeft++ + } + + } + + *(*uintptr)(unsafe.Pointer(paRight)) = aLeft + *(*int32)(unsafe.Pointer(pnRight)) = iOut + libc.Xmemcpy(tls, aLeft, aTmp, uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(iOut)) +} + +// Sort the elements in list aList using aContent[] as the sort key. +// Remove elements with duplicate keys, preferring to keep the +// larger aList[] values. +// +// The aList[] entries are indices into aContent[]. The values in +// aList[] are to be sorted so that for all J0). + + iLast = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + + // Allocate space for the WalIterator object. + nSegment = walFramePage(tls, iLast) + 1 + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(WalIterator{})) + + uint64(nSegment-1)*uint64(unsafe.Sizeof(WalSegment{})) + + uint64(iLast)*uint64(unsafe.Sizeof(Ht_slot(0)))) + p = Xsqlite3_malloc64(tls, uint64(nByte)) + if !(p != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, p, 0, uint64(nByte)) + (*WalIterator)(unsafe.Pointer(p)).FnSegment = nSegment + + // Allocate temporary space used by the merge-sort routine. This block + // of memory will be freed before this function returns. + aTmp = Xsqlite3_malloc64(tls, + uint64(uint64(unsafe.Sizeof(Ht_slot(0)))*func() uint64 { + if iLast > U32(HASHTABLE_NPAGE) { + return uint64(HASHTABLE_NPAGE) + } + return uint64(iLast) + }())) + if !(aTmp != 0) { + rc = SQLITE_NOMEM + } + + for i = walFramePage(tls, nBackfill+U32(1)); rc == SQLITE_OK && i < nSegment; i++ { + // var sLoc WalHashLoc at bp, 24 + + rc = walHashGet(tls, pWal, i, bp) + if rc == SQLITE_OK { + var j int32 // Counter variable + // var nEntry int32 at bp+24, 4 + // Number of entries in this segment + var aIndex uintptr // Sorted index for this segment + + if i+1 == nSegment { + *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)) = int32(iLast - (*WalHashLoc)(unsafe.Pointer(bp)).FiZero) + } else { + *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)) = int32((int64((*WalHashLoc)(unsafe.Pointer(bp)).FaHash) - int64((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno)) / 4) + } + aIndex = p + 8 + uintptr((*WalIterator)(unsafe.Pointer(p)).FnSegment)*32 + uintptr((*WalHashLoc)(unsafe.Pointer(bp)).FiZero)*2 + (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FiZero++ + + for j = 0; j < *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)); j++ { + *(*Ht_slot)(unsafe.Pointer(aIndex + uintptr(j)*2)) = Ht_slot(j) + } + walMergesort(tls, (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno, aTmp, aIndex, bp+24) + (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FiZero = int32((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FiZero) + (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FnEntry = *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)) + (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FaIndex = aIndex + (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FaPgno = (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + } + } + Xsqlite3_free(tls, aTmp) + + if rc != SQLITE_OK { + walIteratorFree(tls, p) + p = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(pp)) = p + return rc +} + +// Attempt to obtain the exclusive WAL lock defined by parameters lockIdx and +// n. If the attempt fails and parameter xBusy is not NULL, then it is a +// busy-handler function. Invoke it and retry the lock until either the +// lock is successfully obtained or the busy-handler returns 0. +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ + var rc int32 + for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xBusy})).f(tls, pBusyArg) != 0 { + rc = walLockExclusive(tls, pWal, lockIdx, n) + } + return rc +} + +// The cache of the wal-index header must be valid to call this function. +// Return the page-size in bytes used by the database. +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ + return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 +} + +// The following is guaranteed when this function is called: +// +// a) the WRITER lock is held, +// b) the entire log file has been checkpointed, and +// c) any existing readers are reading exclusively from the database +// file - there are no readers that may attempt to read a frame from +// the log file. +// +// This function updates the shared-memory structures so that the next +// client to write to the database (which may be this one) does so by +// writing frames into the start of the log file. +// +// The value of parameter salt1 is used as the aSalt[1] value in the +// new wal-index header. It should be passed a pseudo-random value (i.e. +// one obtained from sqlite3_randomness()). +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + *(*U32)(unsafe.Pointer(bp)) = salt1 + + var pInfo uintptr = walCkptInfo(tls, pWal) + var i int32 // Loop counter + var aSalt uintptr = pWal + 72 + 32 // Big-endian salt values + (*Wal)(unsafe.Pointer(pWal)).FnCkpt++ + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = U32(0) + Xsqlite3Put4byte(tls, aSalt, U32(1)+Xsqlite3Get4byte(tls, aSalt)) + libc.Xmemcpy(tls, pWal+72+32+1*4, bp, uint64(4)) + walIndexWriteHdr(tls, pWal) + libc.AtomicStoreNInt32(pInfo, int32(0), 0) + (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = U32(0) + *(*U32)(unsafe.Pointer(pInfo + 4 + 1*4)) = U32(0) + for i = 2; i < SQLITE_SHM_NLOCK-3; i++ { + *(*U32)(unsafe.Pointer(pInfo + 4 + uintptr(i)*4)) = READMARK_NOT_USED + } + +} + +// Copy as much content as we can from the WAL back into the database file +// in response to an sqlite3_wal_checkpoint() request or the equivalent. +// +// The amount of information copies from WAL to database might be limited +// by active readers. This routine will never overwrite a database page +// that a concurrent reader might be using. +// +// All I/O barrier operations (a.k.a fsyncs) occur in this routine when +// SQLite is in WAL-mode in synchronous=NORMAL. That means that if +// checkpoints are always run by a background thread or background +// process, foreground threads will never block on a lengthy fsync call. +// +// Fsync is called on the WAL before writing content out of the WAL and +// into the database. This ensures that if the new content is persistent +// in the WAL and can be recovered following a power-loss or hard reset. +// +// Fsync is also called on the database file if (and only if) the entire +// WAL content is copied into the database file. This second fsync makes +// it safe to delete the WAL since the new content will persist in the +// database file. +// +// This routine uses and updates the nBackfill field of the wal-index header. +// This is the only routine that will increase the value of nBackfill. +// (A WAL reset or recovery will revert nBackfill to zero, but not increase +// its value.) +// +// The caller must be holding sufficient locks to ensure that no other +// checkpoint is running (in any other thread or process) at the same +// time. +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + var rc int32 // Return code + var szPage int32 // Database page-size + // var pIter uintptr at bp, 8 + // Wal iterator context + // var iDbpage U32 at bp+24, 4 + // Next database page to write + // var iFrame U32 at bp+28, 4 + // Wal frame containing data for iDbpage + var mxSafeFrame U32 // Max frame that can be backfilled + var mxPage U32 // Max database page to write + var i int32 // Loop counter + var pInfo uintptr + var iMark U32 + var y U32 + // var nReq I64 at bp+16, 8 + + // var nSize I64 at bp+8, 8 + + var iOffset I64 + var szDb I64 + var nBackfill U32 + // var salt1 U32 at bp+32, 4 + rc = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) + *(*U32)(unsafe.Pointer(bp + 24 /* iDbpage */)) = U32(0) + *(*U32)(unsafe.Pointer(bp + 28 /* iFrame */)) = U32(0) // The checkpoint status information + + szPage = walPagesize(tls, pWal) + + libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal))) + if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) { + goto __1 + } + + // EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked + // in the SQLITE_CHECKPOINT_PASSIVE mode. + + // Compute in mxSafeFrame the index of the last frame of the WAL that is + // safe to write into the database. Frames beyond mxSafeFrame might + // overwrite database pages that are in use by active readers and thus + // cannot be backfilled from the WAL. + mxSafeFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + mxPage = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage + i = 1 +__2: + if !(i < SQLITE_SHM_NLOCK-3) { + goto __4 + } + y = U32(libc.AtomicLoadNUint32(pInfo+4+uintptr(i)*4, 0)) + if !(mxSafeFrame > y) { + goto __5 + } + + rc = walBusyLock(tls, pWal, xBusy, pBusyArg, 3+i, 1) + if !(rc == SQLITE_OK) { + goto __6 + } + iMark = func() uint32 { + if i == 1 { + return mxSafeFrame + } + return READMARK_NOT_USED + }() + libc.AtomicStoreNUint32(pInfo+4+uintptr(i)*4, uint32(iMark), 0) + walUnlockExclusive(tls, pWal, 3+i, 1) + goto __7 +__6: + if !(rc == SQLITE_BUSY) { + goto __8 + } + mxSafeFrame = y + xBusy = uintptr(0) + goto __9 +__8: + goto walcheckpoint_out +__9: + ; +__7: + ; +__5: + ; + goto __3 +__3: + i++ + goto __2 + goto __4 +__4: + ; + + // Allocate the iterator + if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < mxSafeFrame) { + goto __10 + } + rc = walIteratorInit(tls, pWal, (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill, bp) + +__10: + ; + + if !(*(*uintptr)(unsafe.Pointer(bp)) != 0 && + libc.AssignInt32(&rc, walBusyLock(tls, pWal, xBusy, pBusyArg, 3+0, 1)) == SQLITE_OK) { + goto __11 + } + nBackfill = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill + + (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = mxSafeFrame + + // Sync the WAL to disk + rc = Xsqlite3OsSync(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, sync_flags>>2&0x03) + + // If the database may grow as a result of this checkpoint, hint + // about the eventual size of the db file to the VFS layer. + if !(rc == SQLITE_OK) { + goto __12 + } + *(*I64)(unsafe.Pointer(bp + 16 /* nReq */)) = I64(mxPage) * I64(szPage) // Current size of database file + Xsqlite3OsFileControl(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_CKPT_START, uintptr(0)) + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp+8) + if !(rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 8)) < *(*I64)(unsafe.Pointer(bp + 16))) { + goto __13 + } + if !(*(*I64)(unsafe.Pointer(bp + 8))+int64(65536)+I64((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame)*I64(szPage) < *(*I64)(unsafe.Pointer(bp + 16))) { + goto __14 + } + // If the size of the final database is larger than the current + // database plus the amount of data in the wal file, plus the + // maximum size of the pending-byte page (65536 bytes), then + // must be corruption somewhere. + rc = Xsqlite3CorruptError(tls, 63060) + goto __15 +__14: + Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) +__15: + ; +__13: + ; + +__12: + ; + + // Iterate through the contents of the WAL, copying data to the db file +__16: + if !(rc == SQLITE_OK && 0 == walIteratorNext(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+24, bp+28)) { + goto __17 + } + + if !(libc.AtomicLoadNInt32(db+432, 0) != 0) { + goto __18 + } + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + rc = SQLITE_NOMEM + } else { + rc = SQLITE_INTERRUPT + } + goto __17 +__18: + ; + if !(*(*U32)(unsafe.Pointer(bp + 28)) <= nBackfill || *(*U32)(unsafe.Pointer(bp + 28)) > mxSafeFrame || *(*U32)(unsafe.Pointer(bp + 24)) > mxPage) { + goto __19 + } + goto __16 +__19: + ; + iOffset = int64(WAL_HDRSIZE) + I64(*(*U32)(unsafe.Pointer(bp + 28))-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) + // testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL file + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, zBuf, szPage, iOffset) + if !(rc != SQLITE_OK) { + goto __20 + } + goto __17 +__20: + ; + iOffset = I64(*(*U32)(unsafe.Pointer(bp + 24))-U32(1)) * I64(szPage) + + rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, zBuf, szPage, iOffset) + if !(rc != SQLITE_OK) { + goto __21 + } + goto __17 +__21: + ; + goto __16 +__17: + ; + Xsqlite3OsFileControl(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_CKPT_DONE, uintptr(0)) + + // If work was actually accomplished... + if !(rc == SQLITE_OK) { + goto __22 + } + if !(mxSafeFrame == (*WalIndexHdr)(unsafe.Pointer(walIndexHdr(tls, pWal))).FmxFrame) { + goto __23 + } + szDb = I64((*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage) * I64(szPage) + + rc = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, szDb) + if !(rc == SQLITE_OK) { + goto __24 + } + rc = Xsqlite3OsSync(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, sync_flags>>2&0x03) +__24: + ; +__23: + ; + if !(rc == SQLITE_OK) { + goto __25 + } + libc.AtomicStoreNUint32(pInfo, uint32(mxSafeFrame), 0) +__25: + ; +__22: + ; + + // Release the reader lock held while backfilling + walUnlockExclusive(tls, pWal, 3+0, 1) +__11: + ; + + if !(rc == SQLITE_BUSY) { + goto __26 + } + // Reset the return code so as not to report a checkpoint failure + // just because there are active readers. + rc = SQLITE_OK +__26: + ; +__1: + ; + + // If this is an SQLITE_CHECKPOINT_RESTART or TRUNCATE operation, and the + // entire wal file has been copied into the database file, then block + // until all readers have finished using the wal file. This ensures that + // the next process to write to the database restarts the wal file. + if !(rc == SQLITE_OK && eMode != SQLITE_CHECKPOINT_PASSIVE) { + goto __27 + } + + if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) { + goto __28 + } + rc = SQLITE_BUSY + goto __29 +__28: + if !(eMode >= SQLITE_CHECKPOINT_RESTART) { + goto __30 + } + Xsqlite3_randomness(tls, 4, bp+32) + + rc = walBusyLock(tls, pWal, xBusy, pBusyArg, 3+1, SQLITE_SHM_NLOCK-3-1) + if !(rc == SQLITE_OK) { + goto __31 + } + if !(eMode == SQLITE_CHECKPOINT_TRUNCATE) { + goto __32 + } + // IMPLEMENTATION-OF: R-44699-57140 This mode works the same way as + // SQLITE_CHECKPOINT_RESTART with the addition that it also + // truncates the log file to zero bytes just prior to a + // successful return. + // + // In theory, it might be safe to do this without updating the + // wal-index header in shared memory, as all subsequent reader or + // writer clients should see that the entire log file has been + // checkpointed and behave accordingly. This seems unsafe though, + // as it would leave the system in a state where the contents of + // the wal-index header do not match the contents of the + // file-system. To avoid this, update the wal-index header to + // indicate that the log file contains zero valid frames. + walRestartHdr(tls, pWal, *(*U32)(unsafe.Pointer(bp + 32 /* salt1 */))) + rc = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, int64(0)) +__32: + ; + walUnlockExclusive(tls, pWal, 3+1, SQLITE_SHM_NLOCK-3-1) +__31: + ; +__30: + ; +__29: + ; +__27: + ; + +walcheckpoint_out: + walIteratorFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + return rc +} + +// If the WAL file is currently larger than nMax bytes in size, truncate +// it to exactly nMax bytes. If an error occurs while doing so, ignore it. +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var sz I64 at bp+8, 8 + + var rx int32 + Xsqlite3BeginBenignMalloc(tls) + rx = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+8) + if rx == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 8)) > nMax { + rx = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, nMax) + } + Xsqlite3EndBenignMalloc(tls) + if rx != 0 { + Xsqlite3_log(tls, rx, ts+3949, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + } +} + +// Close a connection to a log file. +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 = SQLITE_OK + if pWal != 0 { + var isDelete int32 = 0 // True to unlink wal and wal-index files + + // If an EXCLUSIVE lock can be obtained on the database file (using the + // ordinary, rollback-mode locking methods, this guarantees that the + // connection associated with this log file is the only connection to + // the database. In this case checkpoint the database and unlink both + // the wal and wal-index files. + // + // The EXCLUSIVE lock is not released before returning. + if zBuf != uintptr(0) && + SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3OsLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_LOCK_EXCLUSIVE)) { + if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_NORMAL_MODE { + (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_EXCLUSIVE_MODE) + } + rc = Xsqlite3WalCheckpoint(tls, pWal, db, + SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0), sync_flags, nBuf, zBuf, uintptr(0), uintptr(0)) + if rc == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp /* bPersist */)) = -1 + Xsqlite3OsFileControlHint(tls, + (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_PERSIST_WAL, bp) + if *(*int32)(unsafe.Pointer(bp)) != 1 { + // Try to delete the WAL file if the checkpoint completed and + // fsyned (rc==SQLITE_OK) and if we are not in persistent-wal + // mode (!bPersist) + isDelete = 1 + } else if (*Wal)(unsafe.Pointer(pWal)).FmxWalSize >= int64(0) { + // Try to truncate the WAL file to zero bytes if the checkpoint + // completed and fsynced (rc==SQLITE_OK) and we are in persistent + // WAL mode (bPersist) and if the PRAGMA journal_size_limit is a + // non-negative value (pWal->mxWalSize>=0). Note that we truncate + // to zero bytes as truncating to the journal_size_limit might + // leave a corrupt WAL file on disk. + walLimitSize(tls, pWal, int64(0)) + } + } + } + + walIndexClose(tls, pWal, isDelete) + Xsqlite3OsClose(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd) + if isDelete != 0 { + Xsqlite3BeginBenignMalloc(tls) + Xsqlite3OsDelete(tls, (*Wal)(unsafe.Pointer(pWal)).FpVfs, (*Wal)(unsafe.Pointer(pWal)).FzWalName, 0) + Xsqlite3EndBenignMalloc(tls) + } + + Xsqlite3_free(tls, (*Wal)(unsafe.Pointer(pWal)).FapWiData) + Xsqlite3_free(tls, pWal) + } + return rc +} + +// Try to read the wal-index header. Return 0 on success and 1 if +// there is a problem. +// +// The wal-index is in shared memory. Another thread or process might +// be writing the header at the same time this procedure is trying to +// read it, which might result in inconsistency. A dirty read is detected +// by verifying that both copies of the header are the same and also by +// a checksum on the header. +// +// If and only if the read is consistent and the header is different from +// pWal->hdr, then pWal->hdr is updated to the content of the new header +// and *pChanged is set to 1. +// +// If the checksum cannot be verified return non-zero. If the header +// is read successfully and the checksum verified, return zero. +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ + bp := tls.Alloc(104) + defer tls.Free(104) + + // var aCksum [2]U32 at bp+96, 8 + // Checksum on the header content + // var h1 WalIndexHdr at bp, 48 + + // var h2 WalIndexHdr at bp+48, 48 + // Two copies of the header content + var aHdr uintptr // Header in shared memory + + // The first page of the wal-index must be mapped at this point. + + // Read the header. This might happen concurrently with a write to the + // same area of shared memory on a different CPU in a SMP, + // meaning it is possible that an inconsistent snapshot is read + // from the file. If this happens, return non-zero. + // + // tag-20200519-1: + // There are two copies of the header at the beginning of the wal-index. + // When reading, read [0] first then [1]. Writes are in the reverse order. + // Memory barriers are used to prevent the compiler or the hardware from + // reordering the reads and writes. TSAN and similar tools can sometimes + // give false-positive warnings about these accesses because the tools do not + // account for the double-read and the memory barrier. The use of mutexes + // here would be problematic as the memory being accessed is potentially + // shared among multiple processes and not all mutex implementions work + // reliably in that environment. + libc.AtomicStoreUintptr(&aHdr, uintptr(walIndexHdr(tls, pWal))) + libc.Xmemcpy(tls, bp, aHdr, uint64(unsafe.Sizeof(WalIndexHdr{}))) // Possible TSAN false-positive + walShmBarrier(tls, pWal) + libc.Xmemcpy(tls, bp+48, aHdr+1*48, uint64(unsafe.Sizeof(WalIndexHdr{}))) + + if libc.Xmemcmp(tls, bp, bp+48, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + return 1 // Dirty read + } + if int32((*WalIndexHdr)(unsafe.Pointer(bp)).FisInit) == 0 { + return 1 // Malformed header - probably all zeros + } + walChecksumBytes(tls, 1, bp, int32(uint64(unsafe.Sizeof(WalIndexHdr{}))-uint64(unsafe.Sizeof([2]U32{}))), uintptr(0), bp+96) + if *(*U32)(unsafe.Pointer(bp + 96)) != *(*U32)(unsafe.Pointer(bp + 40)) || *(*U32)(unsafe.Pointer(bp + 96 + 1*4)) != *(*U32)(unsafe.Pointer(bp + 40 + 1*4)) { + return 1 // Checksum does not match + } + + if libc.Xmemcmp(tls, pWal+72, bp, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + *(*int32)(unsafe.Pointer(pChanged)) = 1 + libc.Xmemcpy(tls, pWal+72, bp, uint64(unsafe.Sizeof(WalIndexHdr{}))) + (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16) + + } + + // The header was successfully read. Return zero. + return 0 +} + +// This is the value that walTryBeginRead returns when it needs to +// be retried. + +// Read the wal-index header from the wal-index and into pWal->hdr. +// If the wal-header appears to be corrupt, try to reconstruct the +// wal-index from the WAL before returning. +// +// Set *pChanged to 1 if the wal-index header value in pWal->hdr is +// changed by this operation. If pWal->hdr is unchanged, set *pChanged +// to 0. +// +// If the wal-index header is successfully read, return SQLITE_OK. +// Otherwise an SQLite error code. +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 // Return code + var badHdr int32 // True if a header read failed + // var page0 uintptr at bp, 8 + // Chunk of wal-index containing header + + // Ensure that page 0 of the wal-index (the page that contains the + // wal-index header) is mapped. Return early if an error occurs here. + + rc = walIndexPage(tls, pWal, 0, bp) + if rc != SQLITE_OK { + // READONLY changed to OK in walIndexPage + if rc == SQLITE_READONLY|int32(5)<<8 { + // The SQLITE_READONLY_CANTINIT return means that the shared-memory + // was openable but is not writable, and this thread is unable to + // confirm that another write-capable connection has the shared-memory + // open, and hence the content of the shared-memory is unreliable, + // since the shared-memory might be inconsistent with the WAL file + // and there is no writer on hand to fix it. + + (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable = U8(1) + (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_HEAPMEMORY_MODE) + *(*int32)(unsafe.Pointer(pChanged)) = 1 + } else { + return rc // Any other non-OK return is just an error + } + } else { + // page0 can be NULL if the SHM is zero bytes in size and pWal->writeLock + // is zero, which prevents the SHM from growing + + } + + // If the first page of the wal-index has been mapped, try to read the + // wal-index header immediately, without holding any lock. This usually + // works, but may fail if the wal-index header is corrupt or currently + // being modified by another thread or process. + badHdr = func() int32 { + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + return walIndexTryHdr(tls, pWal, pChanged) + } + return 1 + }() + + // If the first attempt failed, it might have been due to a race + // with a writer. So get a WRITE lock and try again. + if badHdr != 0 { + if int32((*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable) == 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadOnly)&WAL_SHM_RDONLY != 0 { + if SQLITE_OK == libc.AssignInt32(&rc, walLockShared(tls, pWal, WAL_WRITE_LOCK)) { + walUnlockShared(tls, pWal, WAL_WRITE_LOCK) + rc = SQLITE_READONLY | int32(1)<<8 + } + } else { + var bWriteLock int32 = int32((*Wal)(unsafe.Pointer(pWal)).FwriteLock) + if bWriteLock != 0 || SQLITE_OK == libc.AssignInt32(&rc, walLockExclusive(tls, pWal, WAL_WRITE_LOCK, 1)) { + (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(1) + if SQLITE_OK == libc.AssignInt32(&rc, walIndexPage(tls, pWal, 0, bp)) { + badHdr = walIndexTryHdr(tls, pWal, pChanged) + if badHdr != 0 { + // If the wal-index header is still malformed even while holding + // a WRITE lock, it can only mean that the header is corrupted and + // needs to be reconstructed. So run recovery to do exactly that. + rc = walIndexRecover(tls, pWal) + *(*int32)(unsafe.Pointer(pChanged)) = 1 + } + } + if bWriteLock == 0 { + (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) + walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) + } + } + } + } + + // If the header is read successfully, check the version number to make + // sure the wal-index was not constructed with some future format that + // this version of SQLite cannot understand. + if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { + rc = Xsqlite3CantopenError(tls, 63409) + } + if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { + if rc != SQLITE_OK { + walIndexClose(tls, pWal, 0) + (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable = U8(0) + + // walIndexRecover() might have returned SHORT_READ if a concurrent + // writer truncated the WAL out from under it. If that happens, it + // indicates that a writer has fixed the SHM file for us, so retry + if rc == SQLITE_IOERR|int32(2)<<8 { + rc = -1 + } + } + (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_NORMAL_MODE) + } + + return rc +} + +// Open a transaction in a connection where the shared-memory is read-only +// and where we cannot verify that there is a separate write-capable connection +// on hand to keep the shared-memory up-to-date with the WAL file. +// +// This can happen, for example, when the shared-memory is implemented by +// memory-mapping a *-shm file, where a prior writer has shut down and +// left the *-shm file on disk, and now the present connection is trying +// to use that database but lacks write permission on the *-shm file. +// Other scenarios are also possible, depending on the VFS implementation. +// +// Precondition: +// +// The *-wal file has been read and an appropriate wal-index has been +// constructed in pWal->apWiData[] using heap memory instead of shared +// memory. +// +// If this function returns SQLITE_OK, then the read transaction has +// been successfully opened. In this case output variable (*pChanged) +// is set to true before returning if the caller should discard the +// contents of the page cache before proceeding. Or, if it returns +// WAL_RETRY, then the heap memory wal-index has been discarded and +// the caller should retry opening the read transaction from the +// beginning (including attempting to map the *-shm file). +// +// If an error occurs, an SQLite error code is returned. +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // var szWal I64 at bp+8, 8 + // Size of wal file on disk in bytes + var iOffset I64 // Current offset when reading wal file + // var aBuf [32]U8 at bp+16, 32 + // Buffer to load WAL header into + var aFrame uintptr // Malloc'd buffer to load entire frame + var szFrame int32 // Number of bytes in buffer aFrame[] + var aData uintptr // Pointer to data part of aFrame buffer + // var pDummy uintptr at bp, 8 + // Dummy argument for xShmMap + var rc int32 // Return code + // var aSaveCksum [2]U32 at bp+48, 8 + + // var pgno U32 at bp+56, 4 + // Database page number for frame + // var nTruncate U32 at bp+60, 4 + + var i int32 + aFrame = uintptr(0) // Saved copy of pWal->hdr.aFrameCksum + + // Take WAL_READ_LOCK(0). This has the effect of preventing any + // writers from running a checkpoint, but does not stop them + // from running recovery. + rc = walLockShared(tls, pWal, 3+0) + if !(rc != SQLITE_OK) { + goto __1 + } + if !(rc == SQLITE_BUSY) { + goto __2 + } + rc = -1 +__2: + ; + goto begin_unreliable_shm_out +__1: + ; + (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(0) + + // Check to see if a separate writer has attached to the shared-memory area, + // thus making the shared-memory "reliable" again. Do this by invoking + // the xShmMap() routine of the VFS and looking to see if the return + // is SQLITE_READONLY instead of SQLITE_READONLY_CANTINIT. + // + // If the shared-memory is now "reliable" return WAL_RETRY, which will + // cause the heap-memory WAL-index to be discarded and the actual + // shared memory to be used in its place. + // + // This step is important because, even though this connection is holding + // the WAL_READ_LOCK(0) which prevents a checkpoint, a writer might + // have already checkpointed the WAL file and, while the current + // is active, wrap the WAL and start overwriting frames that this + // process wants to use. + // + // Once sqlite3OsShmMap() has been called for an sqlite3_file and has + // returned any SQLITE_READONLY value, it must return only SQLITE_READONLY + // or SQLITE_READONLY_CANTINIT or some error for all subsequent invocations, + // even if some external agent does a "chmod" to make the shared-memory + // writable by us, until sqlite3OsShmUnmap() has been called. + // This is a requirement on the VFS implementation. + rc = Xsqlite3OsShmMap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, 0, int32(uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))), 0, bp) + // SQLITE_OK not possible for read-only connection + if !(rc != SQLITE_READONLY|int32(5)<<8) { + goto __3 + } + rc = func() int32 { + if rc == SQLITE_READONLY { + return -1 + } + return rc + }() + goto begin_unreliable_shm_out +__3: + ; + + // We reach this point only if the real shared-memory is still unreliable. + // Assume the in-memory WAL-index substitute is correct and load it + // into pWal->hdr. + libc.Xmemcpy(tls, pWal+72, walIndexHdr(tls, pWal), uint64(unsafe.Sizeof(WalIndexHdr{}))) + + // Make sure some writer hasn't come in and changed the WAL file out + // from under us, then disconnected, while we were not looking. + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+8) + if !(rc != SQLITE_OK) { + goto __4 + } + goto begin_unreliable_shm_out +__4: + ; + if !(*(*I64)(unsafe.Pointer(bp + 8)) < int64(WAL_HDRSIZE)) { + goto __5 + } + // If the wal file is too small to contain a wal-header and the + // wal-index header has mxFrame==0, then it must be safe to proceed + // reading the database file only. However, the page cache cannot + // be trusted, as a read/write connection may have connected, written + // the db, run a checkpoint, truncated the wal file and disconnected + // since this client's last read transaction. + *(*int32)(unsafe.Pointer(pChanged)) = 1 + rc = func() int32 { + if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0) { + return SQLITE_OK + } + return -1 + }() + goto begin_unreliable_shm_out +__5: + ; + + // Check the salt keys at the start of the wal file still match. + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16, WAL_HDRSIZE, int64(0)) + if !(rc != SQLITE_OK) { + goto __6 + } + goto begin_unreliable_shm_out +__6: + ; + if !(libc.Xmemcmp(tls, pWal+72+32, bp+16+16, uint64(8)) != 0) { + goto __7 + } + // Some writer has wrapped the WAL file while we were not looking. + // Return WAL_RETRY which will cause the in-memory WAL-index to be + // rebuilt. + rc = -1 + goto begin_unreliable_shm_out +__7: + ; + + // Allocate a buffer to read frames into + + szFrame = int32((*Wal)(unsafe.Pointer(pWal)).FszPage + U32(WAL_FRAME_HDRSIZE)) + aFrame = Xsqlite3_malloc64(tls, uint64(szFrame)) + if !(aFrame == uintptr(0)) { + goto __8 + } + rc = SQLITE_NOMEM + goto begin_unreliable_shm_out +__8: + ; + aData = aFrame + 24 + + // Check to see if a complete transaction has been appended to the + // wal file since the heap-memory wal-index was created. If so, the + // heap-memory wal-index is discarded and WAL_RETRY returned to + // the caller. + *(*U32)(unsafe.Pointer(bp + 48)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) + *(*U32)(unsafe.Pointer(bp + 48 + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) + iOffset = int64(WAL_HDRSIZE) + I64((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame+U32(1)-U32(1))*I64((*Wal)(unsafe.Pointer(pWal)).FszPage+U32(WAL_FRAME_HDRSIZE)) +__9: + if !(iOffset+I64(szFrame) <= *(*I64)(unsafe.Pointer(bp + 8))) { + goto __11 + } // dbsize field from frame header + + // Read and decode the next log frame. + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aFrame, szFrame, iOffset) + if !(rc != SQLITE_OK) { + goto __12 + } + goto __11 +__12: + ; + if !!(walDecodeFrame(tls, pWal, bp+56, bp+60, aData, aFrame) != 0) { + goto __13 + } + goto __11 +__13: + ; + + // If nTruncate is non-zero, then a complete transaction has been + // appended to this wal file. Set rc to WAL_RETRY and break out of + // the loop. + if !(*(*U32)(unsafe.Pointer(bp + 60)) != 0) { + goto __14 + } + rc = -1 + goto __11 +__14: + ; + goto __10 +__10: + iOffset = iOffset + I64(szFrame) + goto __9 + goto __11 +__11: + ; + *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(bp + 48)) + *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 48 + 1*4)) + +begin_unreliable_shm_out: + Xsqlite3_free(tls, aFrame) + if !(rc != SQLITE_OK) { + goto __15 + } + i = 0 +__16: + if !(i < (*Wal)(unsafe.Pointer(pWal)).FnWiData) { + goto __18 + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8)) = uintptr(0) + goto __17 +__17: + i++ + goto __16 + goto __18 +__18: + ; + (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable = U8(0) + Xsqlite3WalEndReadTransaction(tls, pWal) + *(*int32)(unsafe.Pointer(pChanged)) = 1 +__15: + ; + return rc +} + +// Attempt to start a read transaction. This might fail due to a race or +// other transient condition. When that happens, it returns WAL_RETRY to +// indicate to the caller that it is safe to retry immediately. +// +// On success return SQLITE_OK. On a permanent failure (such an +// I/O error or an SQLITE_BUSY because another process is running +// recovery) return a positive error code. +// +// The useWal parameter is true to force the use of the WAL and disable +// the case where the WAL is bypassed because it has been completely +// checkpointed. If useWal==0 then this routine calls walIndexReadHdr() +// to make a copy of the wal-index header into pWal->hdr. If the +// wal-index header has changed, *pChanged is set to 1 (as an indication +// to the caller that the local page cache is obsolete and needs to be +// flushed.) When useWal==1, the wal-index header is assumed to already +// be loaded and the pChanged parameter is unused. +// +// The caller must set the cnt parameter to the number of prior calls to +// this routine during the current read attempt that returned WAL_RETRY. +// This routine will start taking more aggressive measures to clear the +// race conditions after multiple WAL_RETRY returns, and after an excessive +// number of errors will ultimately return SQLITE_PROTOCOL. The +// SQLITE_PROTOCOL return indicates that some other process has gone rogue +// and is not honoring the locking protocol. There is a vanishingly small +// chance that SQLITE_PROTOCOL could be returned because of a run of really +// bad luck when there is lots of contention for the wal-index, but that +// possibility is so small that it can be safely neglected, we believe. +// +// On success, this routine obtains a read lock on +// WAL_READ_LOCK(pWal->readLock). The pWal->readLock integer is +// in the range 0 <= pWal->readLock < WAL_NREADER. If pWal->readLock==(-1) +// that means the Wal does not hold any read lock. The reader must not +// access any database page that is modified by a WAL frame up to and +// including frame number aReadMark[pWal->readLock]. The reader will +// use WAL frames up to and including pWal->hdr.mxFrame if pWal->readLock>0 +// Or if pWal->readLock==0, then the reader will ignore the WAL +// completely and get all content directly from the database file. +// If the useWal parameter is 1 then the WAL will never be ignored and +// this routine will always set pWal->readLock>0 on success. +// When the read transaction is completed, the caller must release the +// lock on WAL_READ_LOCK(pWal->readLock) and set pWal->readLock to -1. +// +// This routine uses the nBackfill and aReadMark[] fields of the header +// to select a particular WAL_READ_LOCK() that strives to let the +// checkpoint process do as much work as possible. This routine might +// update values of the aReadMark[] array in the header, but if it does +// so it takes care to hold an exclusive lock on the corresponding +// WAL_READ_LOCK() while changing values. +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ + var pInfo uintptr // Checkpoint information in wal-index + var mxReadMark U32 // Largest aReadMark[] value + var mxI int32 // Index of largest aReadMark[] value + var i int32 // Loop counter + var rc int32 = SQLITE_OK // Return code + var mxFrame U32 // Wal frame to lock to + + // Not currently locked + + // useWal may only be set for read/write connections + + // Take steps to avoid spinning forever if there is a protocol error. + // + // Circumstances that cause a RETRY should only last for the briefest + // instances of time. No I/O or other system calls are done while the + // locks are held, so the locks should not be held for very long. But + // if we are unlucky, another process that is holding a lock might get + // paged out or take a page-fault that is time-consuming to resolve, + // during the few nanoseconds that it is holding the lock. In that case, + // it might take longer than normal for the lock to free. + // + // After 5 RETRYs, we begin calling sqlite3OsSleep(). The first few + // calls to sqlite3OsSleep() have a delay of 1 microsecond. Really this + // is more of a scheduler yield than an actual delay. But on the 10th + // an subsequent retries, the delays start becoming longer and longer, + // so that on the 100th (and last) RETRY we delay for 323 milliseconds. + // The total delay time before giving up is less than 10 seconds. + if cnt > 5 { + var nDelay int32 = 1 // Pause time in microseconds + if cnt > 100 { + + return SQLITE_PROTOCOL + } + if cnt >= 10 { + nDelay = (cnt - 9) * (cnt - 9) * 39 + } + Xsqlite3OsSleep(tls, (*Wal)(unsafe.Pointer(pWal)).FpVfs, nDelay) + } + + if !(useWal != 0) { + + if int32((*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable) == 0 { + rc = walIndexReadHdr(tls, pWal, pChanged) + } + if rc == SQLITE_BUSY { + // If there is not a recovery running in another thread or process + // then convert BUSY errors to WAL_RETRY. If recovery is known to + // be running, convert BUSY to BUSY_RECOVERY. There is a race here + // which might cause WAL_RETRY to be returned even if BUSY_RECOVERY + // would be technically correct. But the race is benign since with + // WAL_RETRY this routine will be called again and will probably be + // right on the second iteration. + if *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) == uintptr(0) { + // This branch is taken when the xShmMap() method returns SQLITE_BUSY. + // We assume this is a transient condition, so return WAL_RETRY. The + // xShmMap() implementation used by the default unix and win32 VFS + // modules may return SQLITE_BUSY due to a race condition in the + // code that determines whether or not the shared-memory region + // must be zeroed before the requested page is returned. + rc = -1 + } else if SQLITE_OK == libc.AssignInt32(&rc, walLockShared(tls, pWal, WAL_RECOVER_LOCK)) { + walUnlockShared(tls, pWal, WAL_RECOVER_LOCK) + rc = -1 + } else if rc == SQLITE_BUSY { + rc = SQLITE_BUSY | int32(1)<<8 + } + } + if rc != SQLITE_OK { + return rc + } else if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { + return walBeginShmUnreliable(tls, pWal, pChanged) + } + } + + libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal))) + if !(useWal != 0) && U32(libc.AtomicLoadNUint32(pInfo, 0)) == (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame && + ((*Wal)(unsafe.Pointer(pWal)).FpSnapshot == uintptr(0) || (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0)) { + // The WAL has been completely backfilled (or it is empty). + // and can be safely ignored. + rc = walLockShared(tls, pWal, 3+0) + walShmBarrier(tls, pWal) + if rc == SQLITE_OK { + if libc.Xmemcmp(tls, walIndexHdr(tls, pWal), pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + // It is not safe to allow the reader to continue here if frames + // may have been appended to the log before READ_LOCK(0) was obtained. + // When holding READ_LOCK(0), the reader ignores the entire log file, + // which implies that the database file contains a trustworthy + // snapshot. Since holding READ_LOCK(0) prevents a checkpoint from + // happening, this is usually correct. + // + // However, if frames have been appended to the log (or if the log + // is wrapped and written for that matter) before the READ_LOCK(0) + // is obtained, that is not necessarily true. A checkpointer may + // have started to backfill the appended frames but crashed before + // it finished. Leaving a corrupt image in the database file. + walUnlockShared(tls, pWal, 3+0) + return -1 + } + (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(0) + return SQLITE_OK + } else if rc != SQLITE_BUSY { + return rc + } + } + + // If we get this far, it means that the reader will want to use + // the WAL to get at content from recent commits. The job now is + // to select one of the aReadMark[] entries that is closest to + // but not exceeding pWal->hdr.mxFrame and lock that entry. + mxReadMark = U32(0) + mxI = 0 + mxFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + if (*Wal)(unsafe.Pointer(pWal)).FpSnapshot != 0 && (*WalIndexHdr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpSnapshot)).FmxFrame < mxFrame { + mxFrame = (*WalIndexHdr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpSnapshot)).FmxFrame + } + for i = 1; i < SQLITE_SHM_NLOCK-3; i++ { + var thisMark U32 = U32(libc.AtomicLoadNUint32(pInfo+4+uintptr(i)*4, 0)) + if mxReadMark <= thisMark && thisMark <= mxFrame { + + mxReadMark = thisMark + mxI = i + } + } + if int32((*Wal)(unsafe.Pointer(pWal)).FreadOnly)&WAL_SHM_RDONLY == 0 && + (mxReadMark < mxFrame || mxI == 0) { + for i = 1; i < SQLITE_SHM_NLOCK-3; i++ { + rc = walLockExclusive(tls, pWal, 3+i, 1) + if rc == SQLITE_OK { + libc.AtomicStoreNUint32(pInfo+4+uintptr(i)*4, uint32(mxFrame), 0) + mxReadMark = mxFrame + mxI = i + walUnlockExclusive(tls, pWal, 3+i, 1) + break + } else if rc != SQLITE_BUSY { + return rc + } + } + } + if mxI == 0 { + + if rc == SQLITE_BUSY { + return -1 + } + return SQLITE_READONLY | int32(5)<<8 + } + + rc = walLockShared(tls, pWal, 3+mxI) + if rc != 0 { + if rc == SQLITE_BUSY { + return -1 + } + return rc + } + // Now that the read-lock has been obtained, check that neither the + // value in the aReadMark[] array or the contents of the wal-index + // header have changed. + // + // It is necessary to check that the wal-index header did not change + // between the time it was read and when the shared-lock was obtained + // on WAL_READ_LOCK(mxI) was obtained to account for the possibility + // that the log file may have been wrapped by a writer, or that frames + // that occur later in the log than pWal->hdr.mxFrame may have been + // copied into the database by a checkpointer. If either of these things + // happened, then reading the database with the current value of + // pWal->hdr.mxFrame risks reading a corrupted snapshot. So, retry + // instead. + // + // Before checking that the live wal-index header has not changed + // since it was read, set Wal.minFrame to the first frame in the wal + // file that has not yet been checkpointed. This client will not need + // to read any frames earlier than minFrame from the wal file - they + // can be safely read directly from the database file. + // + // Because a ShmBarrier() call is made between taking the copy of + // nBackfill and checking that the wal-header in shared-memory still + // matches the one cached in pWal->hdr, it is guaranteed that the + // checkpointer that set nBackfill was not working with a wal-index + // header newer than that cached in pWal->hdr. If it were, that could + // cause a problem. The checkpointer could omit to checkpoint + // a version of page X that lies before pWal->minFrame (call that version + // A) on the basis that there is a newer version (version B) of the same + // page later in the wal file. But if version B happens to like past + // frame pWal->hdr.mxFrame - then the client would incorrectly assume + // that it can read version A from the database file. However, since + // we can guarantee that the checkpointer that set nBackfill could not + // see any pages past pWal->hdr.mxFrame, this problem does not come up. + (*Wal)(unsafe.Pointer(pWal)).FminFrame = U32(libc.AtomicLoadNUint32(pInfo, 0) + 1) + walShmBarrier(tls, pWal) + if U32(libc.AtomicLoadNUint32(pInfo+4+uintptr(mxI)*4, 0)) != mxReadMark || + libc.Xmemcmp(tls, walIndexHdr(tls, pWal), pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + walUnlockShared(tls, pWal, 3+mxI) + return -1 + } else { + + (*Wal)(unsafe.Pointer(pWal)).FreadLock = I16(mxI) + } + return rc +} + +// Attempt to reduce the value of the WalCkptInfo.nBackfillAttempted +// variable so that older snapshots can be accessed. To do this, loop +// through all wal frames from nBackfillAttempted to (nBackfill+1), +// comparing their content to the corresponding page with the database +// file, if any. Set nBackfillAttempted to the frame number of the +// first frame for which the wal file content matches the db file. +// +// This is only really safe if the file-system is such that any page +// writes made by earlier checkpointers were atomic operations, which +// is not always true. It is also possible that nBackfillAttempted +// may be left set to a value larger than expected, if a wal frame +// contains content that duplicate of an earlier version of the same +// page. +// +// SQLITE_OK is returned if successful, or an SQLite error code if an +// error occurs. It is not an error if nBackfillAttempted cannot be +// decreased at all. +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var rc int32 + + rc = walLockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) + if rc == SQLITE_OK { + var pInfo uintptr = walCkptInfo(tls, pWal) + var szPage int32 = int32((*Wal)(unsafe.Pointer(pWal)).FszPage) + // var szDb I64 at bp, 8 + // Size of db file in bytes + + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp) + if rc == SQLITE_OK { + var pBuf1 uintptr = Xsqlite3_malloc(tls, szPage) + var pBuf2 uintptr = Xsqlite3_malloc(tls, szPage) + if pBuf1 == uintptr(0) || pBuf2 == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var i U32 = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted + for i = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted; i > U32(libc.AtomicLoadNUint32(pInfo /* &.nBackfill */, 0)); i-- { + // var sLoc WalHashLoc at bp+8, 24 + // Hash table location + var pgno U32 // Page number in db file + var iDbOff I64 // Offset of db file entry + var iWalOff I64 // Offset of wal file entry + + rc = walHashGet(tls, pWal, walFramePage(tls, i), bp+8) + if rc != SQLITE_OK { + break + } + + pgno = *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp+8 /* &sLoc */)).FaPgno + uintptr(i-(*WalHashLoc)(unsafe.Pointer(bp+8)).FiZero-U32(1))*4)) + iDbOff = I64(pgno-U32(1)) * I64(szPage) + + if iDbOff+I64(szPage) <= *(*I64)(unsafe.Pointer(bp)) { + iWalOff = int64(WAL_HDRSIZE) + I64(i-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, pBuf1, szPage, iWalOff) + + if rc == SQLITE_OK { + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, pBuf2, szPage, iDbOff) + } + + if rc != SQLITE_OK || 0 == libc.Xmemcmp(tls, pBuf1, pBuf2, uint64(szPage)) { + break + } + } + + (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = i - U32(1) + } + } + + Xsqlite3_free(tls, pBuf1) + Xsqlite3_free(tls, pBuf2) + } + walUnlockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) + } + + return rc +} + +// Begin a read transaction on the database. +// +// This routine used to be called sqlite3OpenSnapshot() and with good reason: +// it takes a snapshot of the state of the WAL and wal-index for the current +// instant in time. The current thread will continue to use this snapshot. +// Other threads might append new content to the WAL and wal-index but +// that extra content is ignored by the current thread. +// +// If the database contents have changes since the previous read +// transaction, then *pChanged is set to 1 before returning. The +// Pager layer will use this to know that its cache is stale and +// needs to be flushed. +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ + var rc int32 // Return code + var cnt int32 = 0 // Number of TryBeginRead attempts + var bChanged int32 = 0 + var pSnapshot uintptr = (*Wal)(unsafe.Pointer(pWal)).FpSnapshot + + if pSnapshot != 0 { + if libc.Xmemcmp(tls, pSnapshot, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + bChanged = 1 + } + + // It is possible that there is a checkpointer thread running + // concurrent with this code. If this is the case, it may be that the + // checkpointer has already determined that it will checkpoint + // snapshot X, where X is later in the wal file than pSnapshot, but + // has not yet set the pInfo->nBackfillAttempted variable to indicate + // its intent. To avoid the race condition this leads to, ensure that + // there is no checkpointer process by taking a shared CKPT lock + // before checking pInfo->nBackfillAttempted. + + rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) + + if rc != SQLITE_OK { + return rc + } + (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(1) + } + + for __ccgo := true; __ccgo; __ccgo = rc == -1 { + rc = walTryBeginRead(tls, pWal, pChanged, 0, libc.PreIncInt32(&cnt, 1)) + } + + if rc == SQLITE_OK { + if pSnapshot != 0 && libc.Xmemcmp(tls, pSnapshot, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + // At this point the client has a lock on an aReadMark[] slot holding + // a value equal to or smaller than pSnapshot->mxFrame, but pWal->hdr + // is populated with the wal-index header corresponding to the head + // of the wal file. Verify that pSnapshot is still valid before + // continuing. Reasons why pSnapshot might no longer be valid: + // + // (1) The WAL file has been reset since the snapshot was taken. + // In this case, the salt will have changed. + // + // (2) A checkpoint as been attempted that wrote frames past + // pSnapshot->mxFrame into the database file. Note that the + // checkpoint need not have completed for this to cause problems. + var pInfo uintptr = walCkptInfo(tls, pWal) + + // Check that the wal file has not been wrapped. Assuming that it has + // not, also check that no checkpointer has attempted to checkpoint any + // frames beyond pSnapshot->mxFrame. If either of these conditions are + // true, return SQLITE_ERROR_SNAPSHOT. Otherwise, overwrite pWal->hdr + // with *pSnapshot and set *pChanged as appropriate for opening the + // snapshot. + if !(libc.Xmemcmp(tls, pSnapshot+32, pWal+72+32, uint64(unsafe.Sizeof([2]U32{}))) != 0) && + (*WalIndexHdr)(unsafe.Pointer(pSnapshot)).FmxFrame >= (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted { + + libc.Xmemcpy(tls, pWal+72, pSnapshot, uint64(unsafe.Sizeof(WalIndexHdr{}))) + *(*int32)(unsafe.Pointer(pChanged)) = bChanged + } else { + rc = SQLITE_ERROR | int32(3)<<8 + } + + // A client using a non-current snapshot may not ignore any frames + // from the start of the wal file. This is because, for a system + // where (minFrame < iSnapshot < maxFrame), a checkpointer may + // have omitted to checkpoint a frame earlier than minFrame in + // the file because there exists a frame after iSnapshot that + // is the same database page. + (*Wal)(unsafe.Pointer(pWal)).FminFrame = U32(1) + + if rc != SQLITE_OK { + Xsqlite3WalEndReadTransaction(tls, pWal) + } + } + } + + // Release the shared CKPT lock obtained above. + if (*Wal)(unsafe.Pointer(pWal)).FckptLock != 0 { + + walUnlockShared(tls, pWal, WAL_CKPT_LOCK) + (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(0) + } + return rc +} + +// Finish with a read transaction. All this does is release the +// read-lock. +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ + Xsqlite3WalEndWriteTransaction(tls, pWal) + if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { + walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) + (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(-1) + } +} + +// Search the wal file for page pgno. If found, set *piRead to the frame that +// contains the page. Otherwise, if pgno is not in the wal file, set *piRead +// to zero. +// +// Return SQLITE_OK if successful, or an error code if an error occurs. If an +// error does occur, the final value of *piRead is undefined. +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var iRead U32 = U32(0) // If !=0, WAL frame to return data from + var iLast U32 = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame // Last page in WAL for this reader + var iHash int32 // Used to loop through N hash tables + var iMinHash int32 + + // This routine is only be called from within a read transaction. + + // If the "last page" field of the wal-index header snapshot is 0, then + // no data will be read from the wal under any circumstances. Return early + // in this case as an optimization. Likewise, if pWal->readLock==0, + // then the WAL is ignored by the reader so return early, as if the + // WAL were empty. + if iLast == U32(0) || int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) == 0 && int32((*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable) == 0 { + *(*U32)(unsafe.Pointer(piRead)) = U32(0) + return SQLITE_OK + } + + // Search the hash table or tables for an entry matching page number + // pgno. Each iteration of the following for() loop searches one + // hash table (each hash table indexes up to HASHTABLE_NPAGE frames). + // + // This code might run concurrently to the code in walIndexAppend() + // that adds entries to the wal-index (and possibly to this hash + // table). This means the value just read from the hash + // slot (aHash[iKey]) may have been added before or after the + // current read transaction was opened. Values added after the + // read transaction was opened may have been written incorrectly - + // i.e. these slots may contain garbage data. However, we assume + // that any slots written before the current read transaction was + // opened remain unmodified. + // + // For the reasons above, the if(...) condition featured in the inner + // loop of the following block is more stringent that would be required + // if we had exclusive access to the hash-table: + // + // (aPgno[iFrame]==pgno): + // This condition filters out normal hash-table collisions. + // + // (iFrame<=iLast): + // This condition filters out entries that were added to the hash + // table after the current read-transaction had started. + iMinHash = walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).FminFrame) + for iHash = walFramePage(tls, iLast); iHash >= iMinHash; iHash-- { + // var sLoc WalHashLoc at bp, 24 + // Hash table location + var iKey int32 // Hash slot index + var nCollide int32 // Number of hash collisions remaining + var rc int32 // Error code + var iH U32 + + rc = walHashGet(tls, pWal, iHash, bp) + if rc != SQLITE_OK { + return rc + } + nCollide = HASHTABLE_NPAGE * 2 + iKey = walHash(tls, pgno) + for libc.AssignUint32(&iH, U32(libc.AtomicLoadNUint16((*WalHashLoc)(unsafe.Pointer(bp)).FaHash+uintptr(iKey)*2, 0))) != U32(0) { + var iFrame U32 = iH + (*WalHashLoc)(unsafe.Pointer(bp)).FiZero + if iFrame <= iLast && iFrame >= (*Wal)(unsafe.Pointer(pWal)).FminFrame && *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(iH-U32(1))*4)) == pgno { + + iRead = iFrame + } + if libc.PostDecInt32(&nCollide, 1) == 0 { + return Xsqlite3CorruptError(tls, 64146) + } + iKey = walNextHash(tls, iKey) + } + if iRead != 0 { + break + } + } + + *(*U32)(unsafe.Pointer(piRead)) = iRead + return SQLITE_OK +} + +// Read the contents of frame iRead from the wal file into buffer pOut +// (which is nOut bytes in size). Return SQLITE_OK if successful, or an +// error code otherwise. +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ + var sz int32 + var iOffset I64 + sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) + sz = sz&0xfe00 + sz&0x0001<<16 + + iOffset = int64(WAL_HDRSIZE) + I64(iRead-U32(1))*I64(sz+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) + // testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL + return Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, pOut, func() int32 { + if nOut > sz { + return sz + } + return nOut + }(), iOffset) +} + +// Return the size of the database in pages (or zero, if unknown). +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ + if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { + return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage + } + return Pgno(0) +} + +// This function starts a write transaction on the WAL. +// +// A read transaction must have already been started by a prior call +// to sqlite3WalBeginReadTransaction(). +// +// If another thread or process has written into the database since +// the read transaction was started, then it is not possible for this +// thread to write as doing so would cause a fork. So this routine +// returns SQLITE_BUSY in that case and no write transaction is started. +// +// There can only be a single writer active at a time. +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ + var rc int32 + + // Cannot start a write transaction without first holding a read + // transaction. + + if (*Wal)(unsafe.Pointer(pWal)).FreadOnly != 0 { + return SQLITE_READONLY + } + + // Only one writer allowed at a time. Get the write lock. Return + // SQLITE_BUSY if unable. + rc = walLockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) + if rc != 0 { + return rc + } + (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(1) + + // If another connection has written to the database file since the + // time the read transaction on this connection was started, then + // the write is disallowed. + if libc.Xmemcmp(tls, pWal+72, walIndexHdr(tls, pWal), uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) + (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) + rc = SQLITE_BUSY | int32(2)<<8 + } + + return rc +} + +// End a write transaction. The commit has already been done. This +// routine merely releases the lock. +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ + if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { + walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) + (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) + (*Wal)(unsafe.Pointer(pWal)).FiReCksum = U32(0) + (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(0) + } + return SQLITE_OK +} + +// If any data has been written (but not committed) to the log file, this +// function moves the write-pointer back to the start of the transaction. +// +// Additionally, the callback function is invoked for each frame written +// to the WAL since the start of the transaction. If the callback returns +// other than SQLITE_OK, it is not invoked again and the error code is +// returned to the caller. +// +// Otherwise, if the callback function does not return an error, this +// function returns SQLITE_OK. +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ + var rc int32 = SQLITE_OK + if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { + var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + var iFrame Pgno + + // Restore the clients cache of the wal-index header to the state it + // was in before the client began writing to the database. + libc.Xmemcpy(tls, pWal+72, walIndexHdr(tls, pWal), uint64(unsafe.Sizeof(WalIndexHdr{}))) + + for iFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + U32(1); rc == SQLITE_OK && iFrame <= iMax; iFrame++ { + // This call cannot fail. Unless the page for which the page number + // is passed as the second argument is (a) in the cache and + // (b) has an outstanding reference, then xUndo is either a no-op + // (if (a) is false) or simply expels the page from the cache (if (b) + // is false). + // + // If the upper layer is doing a rollback, it is guaranteed that there + // are no outstanding references to any page other than page 1. And + // page 1 is never written to the log until the transaction is + // committed. As a result, the call to xUndo may not fail. + + rc = (*struct { + f func(*libc.TLS, uintptr, Pgno) int32 + })(unsafe.Pointer(&struct{ uintptr }{xUndo})).f(tls, pUndoCtx, walFramePgno(tls, pWal, iFrame)) + } + if iMax != (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame { + walCleanupHash(tls, pWal) + } + } + return rc +} + +// Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32 +// values. This function populates the array with values required to +// "rollback" the write position of the WAL handle back to the current +// point in the event of a savepoint rollback (via WalSavepointUndo()). +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ + + *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) + *(*U32)(unsafe.Pointer(aWalData + 2*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) + *(*U32)(unsafe.Pointer(aWalData + 3*4)) = (*Wal)(unsafe.Pointer(pWal)).FnCkpt +} + +// Move the write position of the WAL back to the point identified by +// the values in the aWalData[] array. aWalData must point to an array +// of WAL_SAVEPOINT_NDATA u32 values that has been previously populated +// by a call to WalSavepoint(). +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ + var rc int32 = SQLITE_OK + + if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { + // This savepoint was opened immediately after the write-transaction + // was started. Right after that, the writer decided to wrap around + // to the start of the log. Update the savepoint values to match. + *(*U32)(unsafe.Pointer(aWalData)) = U32(0) + *(*U32)(unsafe.Pointer(aWalData + 3*4)) = (*Wal)(unsafe.Pointer(pWal)).FnCkpt + } + + if *(*U32)(unsafe.Pointer(aWalData)) < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame { + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = *(*U32)(unsafe.Pointer(aWalData)) + *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(aWalData + 1*4)) + *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(aWalData + 2*4)) + walCleanupHash(tls, pWal) + } + + return rc +} + +// This function is called just before writing a set of frames to the log +// file (see sqlite3WalFrames()). It checks to see if, instead of appending +// to the current log file, it is possible to overwrite the start of the +// existing log file with the new frames (i.e. "reset" the log). If so, +// it sets pWal->hdr.mxFrame to 0. Otherwise, pWal->hdr.mxFrame is left +// unchanged. +// +// SQLITE_OK is returned if no error is encountered (regardless of whether +// or not pWal->hdr.mxFrame is modified). An SQLite error code is returned +// if an error occurs. +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var cnt int32 + + if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) == 0 { + var pInfo uintptr = walCkptInfo(tls, pWal) + + if (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill > U32(0) { + // var salt1 U32 at bp, 4 + + Xsqlite3_randomness(tls, 4, bp) + rc = walLockExclusive(tls, pWal, 3+1, SQLITE_SHM_NLOCK-3-1) + if rc == SQLITE_OK { + // If all readers are using WAL_READ_LOCK(0) (in other words if no + // readers are currently using the WAL), then the transactions + // frames will overwrite the start of the existing log. Update the + // wal-index header to reflect this. + // + // In theory it would be Ok to update the cache of the header only + // at this point. But updating the actual wal-index header is also + // safe and means there is no special case for sqlite3WalUndo() + // to handle if this transaction is rolled back. + walRestartHdr(tls, pWal, *(*U32)(unsafe.Pointer(bp /* salt1 */))) + walUnlockExclusive(tls, pWal, 3+1, SQLITE_SHM_NLOCK-3-1) + } else if rc != SQLITE_BUSY { + return rc + } + } + walUnlockShared(tls, pWal, 3+0) + (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(-1) + cnt = 0 + for __ccgo := true; __ccgo; __ccgo = rc == -1 { + // var notUsed int32 at bp+4, 4 + + rc = walTryBeginRead(tls, pWal, bp+4, 1, libc.PreIncInt32(&cnt, 1)) + } + // BUSY not possible when useWal==1 + + } + return rc +} + +// Information about the current state of the WAL file and where +// the next fsync should occur - passed from sqlite3WalFrames() into +// walWriteToLog(). +type WalWriter1 = struct { + FpWal uintptr + FpFd uintptr + FiSyncPoint Sqlite3_int64 + FsyncFlags int32 + FszPage int32 +} /* sqlite3.c:64429:9 */ + +// Information about the current state of the WAL file and where +// the next fsync should occur - passed from sqlite3WalFrames() into +// walWriteToLog(). +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ + +// Write iAmt bytes of content into the WAL file beginning at iOffset. +// Do a sync when crossing the p->iSyncPoint boundary. +// +// In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, +// first write the part before iSyncPoint, then sync, then write the +// rest. +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ + var rc int32 + if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { + var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) + rc = Xsqlite3OsWrite(tls, (*WalWriter)(unsafe.Pointer(p)).FpFd, pContent, iFirstAmt, iOffset) + if rc != 0 { + return rc + } + iOffset = iOffset + Sqlite3_int64(iFirstAmt) + iAmt = iAmt - iFirstAmt + pContent = uintptr(iFirstAmt) + pContent + + rc = Xsqlite3OsSync(tls, (*WalWriter)(unsafe.Pointer(p)).FpFd, (*WalWriter)(unsafe.Pointer(p)).FsyncFlags&0x03) + if iAmt == 0 || rc != 0 { + return rc + } + } + rc = Xsqlite3OsWrite(tls, (*WalWriter)(unsafe.Pointer(p)).FpFd, pContent, iAmt, iOffset) + return rc +} + +// Write out a single frame of the WAL +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 // Result code from subfunctions + var pData uintptr // Data actually written + // var aFrame [24]U8 at bp, 24 + // Buffer to assemble frame-header in + pData = (*PgHdr)(unsafe.Pointer(pPage)).FpData + walEncodeFrame(tls, (*WalWriter)(unsafe.Pointer(p)).FpWal, (*PgHdr)(unsafe.Pointer(pPage)).Fpgno, uint32(nTruncate), pData, bp) + rc = walWriteToLog(tls, p, bp, int32(unsafe.Sizeof([24]U8{})), iOffset) + if rc != 0 { + return rc + } + // Write the page data + rc = walWriteToLog(tls, p, pData, (*WalWriter)(unsafe.Pointer(p)).FszPage, int64(uint64(iOffset)+uint64(unsafe.Sizeof([24]U8{})))) + return rc +} + +// This function is called as part of committing a transaction within which +// one or more frames have been overwritten. It updates the checksums for +// all frames written to the wal file by the current transaction starting +// with the earliest to have been overwritten. +// +// SQLITE_OK is returned if successful, or an SQLite error code otherwise. +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var szPage int32 = int32((*Wal)(unsafe.Pointer(pWal)).FszPage) // Database page size + var rc int32 = SQLITE_OK // Return code + var aBuf uintptr // Buffer to load data from wal file into + // var aFrame [24]U8 at bp, 24 + // Buffer to assemble frame-headers in + var iRead U32 // Next frame to read from wal file + var iCksumOff I64 + + aBuf = Xsqlite3_malloc(tls, szPage+WAL_FRAME_HDRSIZE) + if aBuf == uintptr(0) { + return SQLITE_NOMEM + } + + // Find the checksum values to use as input for the recalculating the + // first checksum. If the first frame is frame 1 (implying that the current + // transaction restarted the wal file), these values must be read from the + // wal-file header. Otherwise, read them from the frame header of the + // previous frame. + + if (*Wal)(unsafe.Pointer(pWal)).FiReCksum == U32(1) { + iCksumOff = int64(24) + } else { + iCksumOff = int64(WAL_HDRSIZE) + I64((*Wal)(unsafe.Pointer(pWal)).FiReCksum-U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(16) + } + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aBuf, int32(uint64(unsafe.Sizeof(U32(0)))*uint64(2)), iCksumOff) + *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = Xsqlite3Get4byte(tls, aBuf) + *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = Xsqlite3Get4byte(tls, aBuf+4) + + iRead = (*Wal)(unsafe.Pointer(pWal)).FiReCksum + (*Wal)(unsafe.Pointer(pWal)).FiReCksum = U32(0) + for ; rc == SQLITE_OK && iRead <= iLast; iRead++ { + var iOff I64 = int64(WAL_HDRSIZE) + I64(iRead-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aBuf, szPage+WAL_FRAME_HDRSIZE, iOff) + if rc == SQLITE_OK { + var iPgno U32 + var nDbSize U32 + iPgno = Xsqlite3Get4byte(tls, aBuf) + nDbSize = Xsqlite3Get4byte(tls, aBuf+4) + + walEncodeFrame(tls, pWal, iPgno, nDbSize, aBuf+24, bp) + rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp, int32(unsafe.Sizeof([24]U8{})), iOff) + } + } + + Xsqlite3_free(tls, aBuf) + return rc +} + +// Write a set of frames to the log. The caller must hold the write-lock +// on the log file (obtained using sqlite3WalBeginWriteTransaction()). +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var rc int32 // Used to catch return codes + var iFrame U32 // Next frame address + var p uintptr // Iterator to run through pList with. + var pLast uintptr = uintptr(0) // Last frame in list + var nExtra int32 = 0 // Number of extra copies of last page + var szFrame int32 // The size of a single frame + var iOffset I64 // Next byte to write in WAL file + // var w WalWriter at bp+48, 32 + // The writer + var iFirst U32 = U32(0) // First frame that may be overwritten + var pLive uintptr // Pointer to shared header + + // If this frame set completes a transaction, then nTruncate>0. If + // nTruncate==0 then this frame set does not complete the transaction. + + pLive = walIndexHdr(tls, pWal) + if libc.Xmemcmp(tls, pWal+72, pLive, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { + iFirst = (*WalIndexHdr)(unsafe.Pointer(pLive)).FmxFrame + U32(1) + } + + // See if it is possible to write these frames into the start of the + // log file, instead of appending to it at pWal->hdr.mxFrame. + if SQLITE_OK != libc.AssignInt32(&rc, walRestartLog(tls, pWal)) { + return rc + } + + // If this is the first frame written into the log, write the WAL + // header to the start of the WAL file. See comments at the top of + // this source file for a description of the WAL header format. + iFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + if iFrame == U32(0) { + // var aWalHdr [32]U8 at bp, 32 + // Buffer to assemble wal-header in + // var aCksum [2]U32 at bp+32, 8 + // Checksum for wal-header + + Xsqlite3Put4byte(tls, bp, uint32(WAL_MAGIC|libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0))) + Xsqlite3Put4byte(tls, bp+4, uint32(WAL_MAX_VERSION)) + Xsqlite3Put4byte(tls, bp+8, uint32(szPage)) + Xsqlite3Put4byte(tls, bp+12, (*Wal)(unsafe.Pointer(pWal)).FnCkpt) + if (*Wal)(unsafe.Pointer(pWal)).FnCkpt == U32(0) { + Xsqlite3_randomness(tls, 8, pWal+72+32) + } + libc.Xmemcpy(tls, bp+16, pWal+72+32, uint64(8)) + walChecksumBytes(tls, 1, bp, WAL_HDRSIZE-2*4, uintptr(0), bp+32) + Xsqlite3Put4byte(tls, bp+24, *(*U32)(unsafe.Pointer(bp + 32))) + Xsqlite3Put4byte(tls, bp+28, *(*U32)(unsafe.Pointer(bp + 32 + 1*4))) + + (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(szPage) + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = U8(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)) + *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(bp + 32)) + *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 32 + 1*4)) + (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(1) + + rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp, int32(unsafe.Sizeof([32]U8{})), int64(0)) + + if rc != SQLITE_OK { + return rc + } + + // Sync the header (unless SQLITE_IOCAP_SEQUENTIAL is true or unless + // all syncing is turned off by PRAGMA synchronous=OFF). Otherwise + // an out-of-order write following a WAL restart could result in + // database corruption. See the ticket: + // + // https://sqlite.org/src/info/ff5be73dee + if (*Wal)(unsafe.Pointer(pWal)).FsyncHeader != 0 { + rc = Xsqlite3OsSync(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, sync_flags>>2&0x03) + if rc != 0 { + return rc + } + } + } + + // Setup information needed to write frames into the WAL + (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FpWal = pWal + (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FpFd = (*Wal)(unsafe.Pointer(pWal)).FpWalFd + (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FiSyncPoint = int64(0) + (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FsyncFlags = sync_flags + (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FszPage = szPage + iOffset = int64(WAL_HDRSIZE) + I64(iFrame+U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + szFrame = szPage + WAL_FRAME_HDRSIZE + + // Write all frames into the log file exactly once + for p = pList; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { + var nDbSize int32 // 0 normally. Positive == commit flag + + // Check if this page has already been written into the wal file by + // the current transaction. If so, overwrite the existing frame and + // set Wal.writeLock to WAL_WRITELOCK_RECKSUM - indicating that + // checksums must be recomputed when the transaction is committed. + if iFirst != 0 && ((*PgHdr)(unsafe.Pointer(p)).FpDirty != 0 || isCommit == 0) { + *(*U32)(unsafe.Pointer(bp + 40 /* iWrite */)) = U32(0) + Xsqlite3WalFindFrame(tls, pWal, (*PgHdr)(unsafe.Pointer(p)).Fpgno, bp+40) + + if *(*U32)(unsafe.Pointer(bp + 40)) >= iFirst { + var iOff I64 = int64(WAL_HDRSIZE) + I64(*(*U32)(unsafe.Pointer(bp + 40))-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) + var pData uintptr + if (*Wal)(unsafe.Pointer(pWal)).FiReCksum == U32(0) || *(*U32)(unsafe.Pointer(bp + 40)) < (*Wal)(unsafe.Pointer(pWal)).FiReCksum { + (*Wal)(unsafe.Pointer(pWal)).FiReCksum = *(*U32)(unsafe.Pointer(bp + 40 /* iWrite */)) + } + pData = (*PgHdr)(unsafe.Pointer(p)).FpData + rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, pData, szPage, iOff) + if rc != 0 { + return rc + } + *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_WAL_APPEND)) + continue + } + } + + iFrame++ + + if isCommit != 0 && (*PgHdr)(unsafe.Pointer(p)).FpDirty == uintptr(0) { + nDbSize = int32(nTruncate) + } else { + nDbSize = 0 + } + rc = walWriteOneFrame(tls, bp+48, p, nDbSize, iOffset) + if rc != 0 { + return rc + } + pLast = p + iOffset = iOffset + I64(szFrame) + *(*U16)(unsafe.Pointer(p + 52)) |= U16(PGHDR_WAL_APPEND) + } + + // Recalculate checksums within the wal file if required. + if isCommit != 0 && (*Wal)(unsafe.Pointer(pWal)).FiReCksum != 0 { + rc = walRewriteChecksums(tls, pWal, iFrame) + if rc != 0 { + return rc + } + } + + // If this is the end of a transaction, then we might need to pad + // the transaction and/or sync the WAL file. + // + // Padding and syncing only occur if this set of frames complete a + // transaction and if PRAGMA synchronous=FULL. If synchronous==NORMAL + // or synchronous==OFF, then no padding or syncing are needed. + // + // If SQLITE_IOCAP_POWERSAFE_OVERWRITE is defined, then padding is not + // needed and only the sync is done. If padding is needed, then the + // final frame is repeated (with its commit mark) until the next sector + // boundary is crossed. Only the part of the WAL prior to the last + // sector boundary is synced; the part of the last frame that extends + // past the sector boundary is written after the sync. + if isCommit != 0 && sync_flags&0x03 != 0 { + var bSync int32 = 1 + if (*Wal)(unsafe.Pointer(pWal)).FpadToSectorBoundary != 0 { + var sectorSize int32 = Xsqlite3SectorSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd) + (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FiSyncPoint = (iOffset + I64(sectorSize) - int64(1)) / I64(sectorSize) * I64(sectorSize) + bSync = libc.Bool32((*WalWriter)(unsafe.Pointer(bp+48)).FiSyncPoint == iOffset) + + for iOffset < (*WalWriter)(unsafe.Pointer(bp+48)).FiSyncPoint { + rc = walWriteOneFrame(tls, bp+48, pLast, int32(nTruncate), iOffset) + if rc != 0 { + return rc + } + iOffset = iOffset + I64(szFrame) + nExtra++ + + } + } + if bSync != 0 { + + rc = Xsqlite3OsSync(tls, (*WalWriter)(unsafe.Pointer(bp+48 /* &w */)).FpFd, sync_flags&0x03) + } + } + + // If this frame set completes the first transaction in the WAL and + // if PRAGMA journal_size_limit is set, then truncate the WAL to the + // journal size limit, if possible. + if isCommit != 0 && (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit != 0 && (*Wal)(unsafe.Pointer(pWal)).FmxWalSize >= int64(0) { + var sz I64 = (*Wal)(unsafe.Pointer(pWal)).FmxWalSize + if int64(WAL_HDRSIZE)+I64(iFrame+U32(nExtra)+U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) > (*Wal)(unsafe.Pointer(pWal)).FmxWalSize { + sz = int64(WAL_HDRSIZE) + I64(iFrame+U32(nExtra)+U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + } + walLimitSize(tls, pWal, sz) + (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(0) + } + + // Append data to the wal-index. It is not necessary to lock the + // wal-index to do this as the SQLITE_SHM_WRITE lock held on the wal-index + // guarantees that there are no other writers, and no data that may + // be in use by existing readers is being overwritten. + iFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + for p = pList; p != 0 && rc == SQLITE_OK; p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { + if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_WAL_APPEND == 0 { + continue + } + iFrame++ + rc = walIndexAppend(tls, pWal, iFrame, (*PgHdr)(unsafe.Pointer(p)).Fpgno) + } + + for rc == SQLITE_OK && nExtra > 0 { + iFrame++ + nExtra-- + rc = walIndexAppend(tls, pWal, iFrame, (*PgHdr)(unsafe.Pointer(pLast)).Fpgno) + } + + if rc == SQLITE_OK { + // Update the private copy of the header. + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage = U16(szPage&0xff00 | szPage>>16) + + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = iFrame + if isCommit != 0 { + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiChange++ + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage = nTruncate + } + // If this is a commit, update the wal-index header too. + if isCommit != 0 { + walIndexWriteHdr(tls, pWal) + (*Wal)(unsafe.Pointer(pWal)).FiCallback = iFrame + } + } + + return rc +} + +// This routine is called to implement sqlite3_wal_checkpoint() and +// related interfaces. +// +// Obtain a CHECKPOINT lock and then backfill as much information as +// we can from WAL into the database. +// +// If parameter xBusy is not NULL, it is a pointer to a busy-handler +// callback. In this case this function runs a blocking checkpoint. +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 // Return code + *(*int32)(unsafe.Pointer(bp /* isChanged */)) = 0 // True if a new wal-index header is loaded + var eMode2 int32 = eMode // Mode to pass to walCheckpoint() + var xBusy2 uintptr = xBusy // Busy handler for eMode2 + + // EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked + // in the SQLITE_CHECKPOINT_PASSIVE mode. + + if (*Wal)(unsafe.Pointer(pWal)).FreadOnly != 0 { + return SQLITE_READONLY + } + + // Enable blocking locks, if possible. If blocking locks are successfully + // enabled, set xBusy2=0 so that the busy-handler is never invoked. + + // IMPLEMENTATION-OF: R-62028-47212 All calls obtain an exclusive + // "checkpoint" lock on the database file. + // EVIDENCE-OF: R-10421-19736 If any other process is running a + // checkpoint operation at the same time, the lock cannot be obtained and + // SQLITE_BUSY is returned. + // EVIDENCE-OF: R-53820-33897 Even if there is a busy-handler configured, + // it will not be invoked in this case. + rc = walLockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) + + if rc == SQLITE_OK { + (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(1) + + // IMPLEMENTATION-OF: R-59782-36818 The SQLITE_CHECKPOINT_FULL, RESTART and + // TRUNCATE modes also obtain the exclusive "writer" lock on the database + // file. + // + // EVIDENCE-OF: R-60642-04082 If the writer lock cannot be obtained + // immediately, and a busy-handler is configured, it is invoked and the + // writer lock retried until either the busy-handler returns 0 or the + // lock is successfully obtained. + if eMode != SQLITE_CHECKPOINT_PASSIVE { + rc = walBusyLock(tls, pWal, xBusy2, pBusyArg, WAL_WRITE_LOCK, 1) + if rc == SQLITE_OK { + (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(1) + } else if rc == SQLITE_BUSY { + eMode2 = SQLITE_CHECKPOINT_PASSIVE + xBusy2 = uintptr(0) + rc = SQLITE_OK + } + } + } + + // Read the wal-index header. + if rc == SQLITE_OK { + + rc = walIndexReadHdr(tls, pWal, bp) + + if *(*int32)(unsafe.Pointer(bp)) != 0 && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpDbFd)).FpMethods)).FiVersion >= 3 { + Xsqlite3OsUnfetch(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, int64(0), uintptr(0)) + } + } + + // Copy data from the log to the database file. + if rc == SQLITE_OK { + + if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { + rc = Xsqlite3CorruptError(tls, 64865) + } else { + rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) + } + + // If no error occurred, set the output variables. + if rc == SQLITE_OK || rc == SQLITE_BUSY { + if pnLog != 0 { + *(*int32)(unsafe.Pointer(pnLog)) = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) + } + if pnCkpt != 0 { + *(*int32)(unsafe.Pointer(pnCkpt)) = int32((*WalCkptInfo)(unsafe.Pointer(walCkptInfo(tls, pWal))).FnBackfill) + } + } + } + + if *(*int32)(unsafe.Pointer(bp)) != 0 { + // If a new wal-index header was loaded before the checkpoint was + // performed, then the pager-cache associated with pWal is now + // out of date. So zero the cached wal-index header to ensure that + // next time the pager opens a snapshot on this database it knows that + // the cache needs to be reset. + libc.Xmemset(tls, pWal+72, 0, uint64(unsafe.Sizeof(WalIndexHdr{}))) + } + + // Release the locks. + Xsqlite3WalEndWriteTransaction(tls, pWal) + if (*Wal)(unsafe.Pointer(pWal)).FckptLock != 0 { + walUnlockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) + (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(0) + } + + return func() int32 { + if rc == SQLITE_OK && eMode != eMode2 { + return SQLITE_BUSY + } + return rc + }() +} + +// Return the value to pass to a sqlite3_wal_hook callback, the +// number of frames in the WAL at the point of the last commit since +// sqlite3WalCallback() was called. If no commits have occurred since +// the last call, then return 0. +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ + var ret U32 = U32(0) + if pWal != 0 { + ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback + (*Wal)(unsafe.Pointer(pWal)).FiCallback = U32(0) + } + return int32(ret) +} + +// This function is called to change the WAL subsystem into or out +// of locking_mode=EXCLUSIVE. +// +// If op is zero, then attempt to change from locking_mode=EXCLUSIVE +// into locking_mode=NORMAL. This means that we must acquire a lock +// on the pWal->readLock byte. If the WAL is already in locking_mode=NORMAL +// or if the acquisition of the lock fails, then return 0. If the +// transition out of exclusive-mode is successful, return 1. This +// operation must occur while the pager is still holding the exclusive +// lock on the main database file. +// +// If op is one, then change from locking_mode=NORMAL into +// locking_mode=EXCLUSIVE. This means that the pWal->readLock must +// be released. Return 1 if the transition is made and 0 if the +// WAL is already in exclusive-locking mode - meaning that this +// routine is a no-op. The pager must already hold the exclusive lock +// on the main database file before invoking this operation. +// +// If op is negative, then do a dry-run of the op==1 case but do +// not actually change anything. The pager uses this to see if it +// should acquire the database exclusive lock prior to invoking +// the op==1 case. +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ + var rc int32 + + // pWal->readLock is usually set, but might be -1 if there was a + // prior error while attempting to acquire are read-lock. This cannot + // happen if the connection is actually in exclusive mode (as no xShmLock + // locks are taken in this case). Nor should the pager attempt to + // upgrade to exclusive-mode following such an error. + + if op == 0 { + if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_NORMAL_MODE { + (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_NORMAL_MODE) + if walLockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) != SQLITE_OK { + (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_EXCLUSIVE_MODE) + } + rc = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_NORMAL_MODE) + } else { + // Already in locking_mode=NORMAL + rc = 0 + } + } else if op > 0 { + + walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) + (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_EXCLUSIVE_MODE) + rc = 1 + } else { + rc = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_NORMAL_MODE) + } + return rc +} + +// Return true if the argument is non-NULL and the WAL module is using +// heap-memory for the wal-index. Otherwise, if the argument is NULL or the +// WAL module is using shared-memory, return false. +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ + return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) +} + +// Create a snapshot object. The content of a snapshot is opaque to +// every other subsystem, so the WAL module can put whatever it needs +// in the object. +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ + var rc int32 = SQLITE_OK + var pRet uintptr + + if libc.Xmemcmp(tls, pWal+72+24, uintptr(unsafe.Pointer(&aZero)), uint64(16)) == 0 { + *(*uintptr)(unsafe.Pointer(ppSnapshot)) = uintptr(0) + return SQLITE_ERROR + } + pRet = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(WalIndexHdr{}))) + if pRet == uintptr(0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemcpy(tls, pRet, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) + *(*uintptr)(unsafe.Pointer(ppSnapshot)) = pRet + } + + return rc +} + +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ + +// Try to open on pSnapshot when the next read-transaction starts +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ + (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot +} + +// Return a +ve value if snapshot p1 is newer than p2. A -ve value if +// p1 is older than p2 and zero if p1 and p2 are the same snapshot. +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ + var pHdr1 uintptr = p1 + var pHdr2 uintptr = p2 + + // aSalt[0] is a copy of the value stored in the wal file header. It + // is incremented each time the wal file is restarted. + if *(*U32)(unsafe.Pointer(pHdr1 + 32)) < *(*U32)(unsafe.Pointer(pHdr2 + 32)) { + return -1 + } + if *(*U32)(unsafe.Pointer(pHdr1 + 32)) > *(*U32)(unsafe.Pointer(pHdr2 + 32)) { + return +1 + } + if (*WalIndexHdr)(unsafe.Pointer(pHdr1)).FmxFrame < (*WalIndexHdr)(unsafe.Pointer(pHdr2)).FmxFrame { + return -1 + } + if (*WalIndexHdr)(unsafe.Pointer(pHdr1)).FmxFrame > (*WalIndexHdr)(unsafe.Pointer(pHdr2)).FmxFrame { + return +1 + } + return 0 +} + +// The caller currently has a read transaction open on the database. +// This function takes a SHARED lock on the CHECKPOINTER slot and then +// checks if the snapshot passed as the second argument is still +// available. If so, SQLITE_OK is returned. +// +// If the snapshot is not available, SQLITE_ERROR is returned. Or, if +// the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error +// occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER +// lock is released before returning. +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ + var rc int32 + rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) + if rc == SQLITE_OK { + var pNew uintptr = pSnapshot + if libc.Xmemcmp(tls, pNew+32, pWal+72+32, uint64(unsafe.Sizeof([2]U32{}))) != 0 || + (*WalIndexHdr)(unsafe.Pointer(pNew)).FmxFrame < (*WalCkptInfo)(unsafe.Pointer(walCkptInfo(tls, pWal))).FnBackfillAttempted { + rc = SQLITE_ERROR | int32(3)<<8 + walUnlockShared(tls, pWal, WAL_CKPT_LOCK) + } + } + return rc +} + +// Release a lock obtained by an earlier successful call to +// sqlite3WalSnapshotCheck(). +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ + + walUnlockShared(tls, pWal, WAL_CKPT_LOCK) +} + +// Return the sqlite3_file object for the WAL file +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ + return (*Wal)(unsafe.Pointer(pWal)).FpWalFd +} + +//************* End of wal.c ************************************************ +//************* Begin file btmutex.c **************************************** +// 2007 August 27 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code used to implement mutexes on Btree objects. +// This code really belongs in btree.c. But btree.c is getting too +// big and we want to break it down some. This packaged seemed like +// a good breakout. +//************* Include btreeInt.h in the middle of btmutex.c *************** +//************* Begin file btreeInt.h *************************************** +// 2004 April 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file implements an external (disk-based) database using BTrees. +// For a detailed discussion of BTrees, refer to +// +// Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3: +// "Sorting And Searching", pages 473-480. Addison-Wesley +// Publishing Company, Reading, Massachusetts. +// +// The basic idea is that each page of the file contains N database +// entries and N+1 pointers to subpages. +// +// ---------------------------------------------------------------- +// | Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) | +// ---------------------------------------------------------------- +// +// All of the keys on the page that Ptr(0) points to have values less +// than Key(0). All of the keys on page Ptr(1) and its subpages have +// values greater than Key(0) and less than Key(1). All of the keys +// on Ptr(N) and its subpages have values greater than Key(N-1). And +// so forth. +// +// Finding a particular key requires reading O(log(M)) pages from the +// disk where M is the number of entries in the tree. +// +// In this implementation, a single file can hold one or more separate +// BTrees. Each BTree is identified by the index of its root page. The +// key and data for any entry are combined to form the "payload". A +// fixed amount of payload can be carried directly on the database +// page. If the payload is larger than the preset amount then surplus +// bytes are stored on overflow pages. The payload for an entry +// and the preceding pointer are combined to form a "Cell". Each +// page has a small header which contains the Ptr(N) pointer and other +// information such as the size of key and data. +// +// FORMAT DETAILS +// +// The file is divided into pages. The first page is called page 1, +// the second is page 2, and so forth. A page number of zero indicates +// "no such page". The page size can be any power of 2 between 512 and 65536. +// Each page can be either a btree page, a freelist page, an overflow +// page, or a pointer-map page. +// +// The first page is always a btree page. The first 100 bytes of the first +// page contain a special header (the "file header") that describes the file. +// The format of the file header is as follows: +// +// OFFSET SIZE DESCRIPTION +// 0 16 Header string: "SQLite format 3\000" +// 16 2 Page size in bytes. (1 means 65536) +// 18 1 File format write version +// 19 1 File format read version +// 20 1 Bytes of unused space at the end of each page +// 21 1 Max embedded payload fraction (must be 64) +// 22 1 Min embedded payload fraction (must be 32) +// 23 1 Min leaf payload fraction (must be 32) +// 24 4 File change counter +// 28 4 Reserved for future use +// 32 4 First freelist page +// 36 4 Number of freelist pages in the file +// 40 60 15 4-byte meta values passed to higher layers +// +// 40 4 Schema cookie +// 44 4 File format of schema layer +// 48 4 Size of page cache +// 52 4 Largest root-page (auto/incr_vacuum) +// 56 4 1=UTF-8 2=UTF16le 3=UTF16be +// 60 4 User version +// 64 4 Incremental vacuum mode +// 68 4 Application-ID +// 72 20 unused +// 92 4 The version-valid-for number +// 96 4 SQLITE_VERSION_NUMBER +// +// All of the integer values are big-endian (most significant byte first). +// +// The file change counter is incremented when the database is changed +// This counter allows other processes to know when the file has changed +// and thus when they need to flush their cache. +// +// The max embedded payload fraction is the amount of the total usable +// space in a page that can be consumed by a single cell for standard +// B-tree (non-LEAFDATA) tables. A value of 255 means 100%. The default +// is to limit the maximum cell size so that at least 4 cells will fit +// on one page. Thus the default max embedded payload fraction is 64. +// +// If the payload for a cell is larger than the max payload, then extra +// payload is spilled to overflow pages. Once an overflow page is allocated, +// as many bytes as possible are moved into the overflow pages without letting +// the cell size drop below the min embedded payload fraction. +// +// The min leaf payload fraction is like the min embedded payload fraction +// except that it applies to leaf nodes in a LEAFDATA tree. The maximum +// payload fraction for a LEAFDATA tree is always 100% (or 255) and it +// not specified in the header. +// +// Each btree pages is divided into three sections: The header, the +// cell pointer array, and the cell content area. Page 1 also has a 100-byte +// file header that occurs before the page header. +// +// |----------------| +// | file header | 100 bytes. Page 1 only. +// |----------------| +// | page header | 8 bytes for leaves. 12 bytes for interior nodes +// |----------------| +// | cell pointer | | 2 bytes per cell. Sorted order. +// | array | | Grows downward +// | | v +// |----------------| +// | unallocated | +// | space | +// |----------------| ^ Grows upwards +// | cell content | | Arbitrary order interspersed with freeblocks. +// | area | | and free space fragments. +// |----------------| +// +// The page headers looks like this: +// +// OFFSET SIZE DESCRIPTION +// 0 1 Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf +// 1 2 byte offset to the first freeblock +// 3 2 number of cells on this page +// 5 2 first byte of the cell content area +// 7 1 number of fragmented free bytes +// 8 4 Right child (the Ptr(N) value). Omitted on leaves. +// +// The flags define the format of this btree page. The leaf flag means that +// this page has no children. The zerodata flag means that this page carries +// only keys and no data. The intkey flag means that the key is an integer +// which is stored in the key size entry of the cell header rather than in +// the payload area. +// +// The cell pointer array begins on the first byte after the page header. +// The cell pointer array contains zero or more 2-byte numbers which are +// offsets from the beginning of the page to the cell content in the cell +// content area. The cell pointers occur in sorted order. The system strives +// to keep free space after the last cell pointer so that new cells can +// be easily added without having to defragment the page. +// +// Cell content is stored at the very end of the page and grows toward the +// beginning of the page. +// +// Unused space within the cell content area is collected into a linked list of +// freeblocks. Each freeblock is at least 4 bytes in size. The byte offset +// to the first freeblock is given in the header. Freeblocks occur in +// increasing order. Because a freeblock must be at least 4 bytes in size, +// any group of 3 or fewer unused bytes in the cell content area cannot +// exist on the freeblock chain. A group of 3 or fewer free bytes is called +// a fragment. The total number of bytes in all fragments is recorded. +// in the page header at offset 7. +// +// SIZE DESCRIPTION +// 2 Byte offset of the next freeblock +// 2 Bytes in this freeblock +// +// Cells are of variable length. Cells are stored in the cell content area at +// the end of the page. Pointers to the cells are in the cell pointer array +// that immediately follows the page header. Cells is not necessarily +// contiguous or in order, but cell pointers are contiguous and in order. +// +// Cell content makes use of variable length integers. A variable +// length integer is 1 to 9 bytes where the lower 7 bits of each +// byte are used. The integer consists of all bytes that have bit 8 set and +// the first byte with bit 8 clear. The most significant byte of the integer +// appears first. A variable-length integer may not be more than 9 bytes long. +// As a special case, all 8 bytes of the 9th byte are used as data. This +// allows a 64-bit integer to be encoded in 9 bytes. +// +// 0x00 becomes 0x00000000 +// 0x7f becomes 0x0000007f +// 0x81 0x00 becomes 0x00000080 +// 0x82 0x00 becomes 0x00000100 +// 0x80 0x7f becomes 0x0000007f +// 0x8a 0x91 0xd1 0xac 0x78 becomes 0x12345678 +// 0x81 0x81 0x81 0x81 0x01 becomes 0x10204081 +// +// Variable length integers are used for rowids and to hold the number of +// bytes of key and data in a btree cell. +// +// The content of a cell looks like this: +// +// SIZE DESCRIPTION +// 4 Page number of the left child. Omitted if leaf flag is set. +// var Number of bytes of data. Omitted if the zerodata flag is set. +// var Number of bytes of key. Or the key itself if intkey flag is set. +// * Payload +// 4 First page of the overflow chain. Omitted if no overflow +// +// Overflow pages form a linked list. Each page except the last is completely +// filled with data (pagesize - 4 bytes). The last page can have as little +// as 1 byte of data. +// +// SIZE DESCRIPTION +// 4 Page number of next overflow page +// * Data +// +// Freelist pages come in two subtypes: trunk pages and leaf pages. The +// file header points to the first in a linked list of trunk page. Each trunk +// page points to multiple leaf pages. The content of a leaf page is +// unspecified. A trunk page looks like this: +// +// SIZE DESCRIPTION +// 4 Page number of next trunk page +// 4 Number of leaf pointers on this page +// * zero or more pages numbers of leaves +// #include "sqliteInt.h" + +// The following value is the maximum cell size assuming a maximum page +// size give above. + +// The maximum number of cells on a single page of the database. This +// assumes a minimum cell size of 6 bytes (4 bytes for the cell itself +// plus 2 bytes for the index to the cell in the page header). Such +// small cells will be rare, but they are possible. + +// Forward declarations +type MemPage1 = struct { + FisInit U8 + FintKey U8 + FintKeyLeaf U8 + F__ccgo_pad1 [1]byte + Fpgno Pgno + Fleaf U8 + FhdrOffset U8 + FchildPtrSize U8 + Fmax1bytePayload U8 + FnOverflow U8 + F__ccgo_pad2 [1]byte + FmaxLocal U16 + FminLocal U16 + FcellOffset U16 + FnFree int32 + FnCell U16 + FmaskPage U16 + FaiOvfl [4]U16 + F__ccgo_pad3 [4]byte + FapOvfl [4]uintptr + FpBt uintptr + FaData uintptr + FaDataEnd uintptr + FaCellIdx uintptr + FaDataOfst uintptr + FpDbPage uintptr + FxCellSize uintptr + FxParseCell uintptr +} /* sqlite3.c:578:9 */ + +//************* End of wal.c ************************************************ +//************* Begin file btmutex.c **************************************** +// 2007 August 27 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code used to implement mutexes on Btree objects. +// This code really belongs in btree.c. But btree.c is getting too +// big and we want to break it down some. This packaged seemed like +// a good breakout. +//************* Include btreeInt.h in the middle of btmutex.c *************** +//************* Begin file btreeInt.h *************************************** +// 2004 April 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file implements an external (disk-based) database using BTrees. +// For a detailed discussion of BTrees, refer to +// +// Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3: +// "Sorting And Searching", pages 473-480. Addison-Wesley +// Publishing Company, Reading, Massachusetts. +// +// The basic idea is that each page of the file contains N database +// entries and N+1 pointers to subpages. +// +// ---------------------------------------------------------------- +// | Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) | +// ---------------------------------------------------------------- +// +// All of the keys on the page that Ptr(0) points to have values less +// than Key(0). All of the keys on page Ptr(1) and its subpages have +// values greater than Key(0) and less than Key(1). All of the keys +// on Ptr(N) and its subpages have values greater than Key(N-1). And +// so forth. +// +// Finding a particular key requires reading O(log(M)) pages from the +// disk where M is the number of entries in the tree. +// +// In this implementation, a single file can hold one or more separate +// BTrees. Each BTree is identified by the index of its root page. The +// key and data for any entry are combined to form the "payload". A +// fixed amount of payload can be carried directly on the database +// page. If the payload is larger than the preset amount then surplus +// bytes are stored on overflow pages. The payload for an entry +// and the preceding pointer are combined to form a "Cell". Each +// page has a small header which contains the Ptr(N) pointer and other +// information such as the size of key and data. +// +// FORMAT DETAILS +// +// The file is divided into pages. The first page is called page 1, +// the second is page 2, and so forth. A page number of zero indicates +// "no such page". The page size can be any power of 2 between 512 and 65536. +// Each page can be either a btree page, a freelist page, an overflow +// page, or a pointer-map page. +// +// The first page is always a btree page. The first 100 bytes of the first +// page contain a special header (the "file header") that describes the file. +// The format of the file header is as follows: +// +// OFFSET SIZE DESCRIPTION +// 0 16 Header string: "SQLite format 3\000" +// 16 2 Page size in bytes. (1 means 65536) +// 18 1 File format write version +// 19 1 File format read version +// 20 1 Bytes of unused space at the end of each page +// 21 1 Max embedded payload fraction (must be 64) +// 22 1 Min embedded payload fraction (must be 32) +// 23 1 Min leaf payload fraction (must be 32) +// 24 4 File change counter +// 28 4 Reserved for future use +// 32 4 First freelist page +// 36 4 Number of freelist pages in the file +// 40 60 15 4-byte meta values passed to higher layers +// +// 40 4 Schema cookie +// 44 4 File format of schema layer +// 48 4 Size of page cache +// 52 4 Largest root-page (auto/incr_vacuum) +// 56 4 1=UTF-8 2=UTF16le 3=UTF16be +// 60 4 User version +// 64 4 Incremental vacuum mode +// 68 4 Application-ID +// 72 20 unused +// 92 4 The version-valid-for number +// 96 4 SQLITE_VERSION_NUMBER +// +// All of the integer values are big-endian (most significant byte first). +// +// The file change counter is incremented when the database is changed +// This counter allows other processes to know when the file has changed +// and thus when they need to flush their cache. +// +// The max embedded payload fraction is the amount of the total usable +// space in a page that can be consumed by a single cell for standard +// B-tree (non-LEAFDATA) tables. A value of 255 means 100%. The default +// is to limit the maximum cell size so that at least 4 cells will fit +// on one page. Thus the default max embedded payload fraction is 64. +// +// If the payload for a cell is larger than the max payload, then extra +// payload is spilled to overflow pages. Once an overflow page is allocated, +// as many bytes as possible are moved into the overflow pages without letting +// the cell size drop below the min embedded payload fraction. +// +// The min leaf payload fraction is like the min embedded payload fraction +// except that it applies to leaf nodes in a LEAFDATA tree. The maximum +// payload fraction for a LEAFDATA tree is always 100% (or 255) and it +// not specified in the header. +// +// Each btree pages is divided into three sections: The header, the +// cell pointer array, and the cell content area. Page 1 also has a 100-byte +// file header that occurs before the page header. +// +// |----------------| +// | file header | 100 bytes. Page 1 only. +// |----------------| +// | page header | 8 bytes for leaves. 12 bytes for interior nodes +// |----------------| +// | cell pointer | | 2 bytes per cell. Sorted order. +// | array | | Grows downward +// | | v +// |----------------| +// | unallocated | +// | space | +// |----------------| ^ Grows upwards +// | cell content | | Arbitrary order interspersed with freeblocks. +// | area | | and free space fragments. +// |----------------| +// +// The page headers looks like this: +// +// OFFSET SIZE DESCRIPTION +// 0 1 Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf +// 1 2 byte offset to the first freeblock +// 3 2 number of cells on this page +// 5 2 first byte of the cell content area +// 7 1 number of fragmented free bytes +// 8 4 Right child (the Ptr(N) value). Omitted on leaves. +// +// The flags define the format of this btree page. The leaf flag means that +// this page has no children. The zerodata flag means that this page carries +// only keys and no data. The intkey flag means that the key is an integer +// which is stored in the key size entry of the cell header rather than in +// the payload area. +// +// The cell pointer array begins on the first byte after the page header. +// The cell pointer array contains zero or more 2-byte numbers which are +// offsets from the beginning of the page to the cell content in the cell +// content area. The cell pointers occur in sorted order. The system strives +// to keep free space after the last cell pointer so that new cells can +// be easily added without having to defragment the page. +// +// Cell content is stored at the very end of the page and grows toward the +// beginning of the page. +// +// Unused space within the cell content area is collected into a linked list of +// freeblocks. Each freeblock is at least 4 bytes in size. The byte offset +// to the first freeblock is given in the header. Freeblocks occur in +// increasing order. Because a freeblock must be at least 4 bytes in size, +// any group of 3 or fewer unused bytes in the cell content area cannot +// exist on the freeblock chain. A group of 3 or fewer free bytes is called +// a fragment. The total number of bytes in all fragments is recorded. +// in the page header at offset 7. +// +// SIZE DESCRIPTION +// 2 Byte offset of the next freeblock +// 2 Bytes in this freeblock +// +// Cells are of variable length. Cells are stored in the cell content area at +// the end of the page. Pointers to the cells are in the cell pointer array +// that immediately follows the page header. Cells is not necessarily +// contiguous or in order, but cell pointers are contiguous and in order. +// +// Cell content makes use of variable length integers. A variable +// length integer is 1 to 9 bytes where the lower 7 bits of each +// byte are used. The integer consists of all bytes that have bit 8 set and +// the first byte with bit 8 clear. The most significant byte of the integer +// appears first. A variable-length integer may not be more than 9 bytes long. +// As a special case, all 8 bytes of the 9th byte are used as data. This +// allows a 64-bit integer to be encoded in 9 bytes. +// +// 0x00 becomes 0x00000000 +// 0x7f becomes 0x0000007f +// 0x81 0x00 becomes 0x00000080 +// 0x82 0x00 becomes 0x00000100 +// 0x80 0x7f becomes 0x0000007f +// 0x8a 0x91 0xd1 0xac 0x78 becomes 0x12345678 +// 0x81 0x81 0x81 0x81 0x01 becomes 0x10204081 +// +// Variable length integers are used for rowids and to hold the number of +// bytes of key and data in a btree cell. +// +// The content of a cell looks like this: +// +// SIZE DESCRIPTION +// 4 Page number of the left child. Omitted if leaf flag is set. +// var Number of bytes of data. Omitted if the zerodata flag is set. +// var Number of bytes of key. Or the key itself if intkey flag is set. +// * Payload +// 4 First page of the overflow chain. Omitted if no overflow +// +// Overflow pages form a linked list. Each page except the last is completely +// filled with data (pagesize - 4 bytes). The last page can have as little +// as 1 byte of data. +// +// SIZE DESCRIPTION +// 4 Page number of next overflow page +// * Data +// +// Freelist pages come in two subtypes: trunk pages and leaf pages. The +// file header points to the first in a linked list of trunk page. Each trunk +// page points to multiple leaf pages. The content of a leaf page is +// unspecified. A trunk page looks like this: +// +// SIZE DESCRIPTION +// 4 Page number of next trunk page +// 4 Number of leaf pointers on this page +// * zero or more pages numbers of leaves +// #include "sqliteInt.h" + +// The following value is the maximum cell size assuming a maximum page +// size give above. + +// The maximum number of cells on a single page of the database. This +// assumes a minimum cell size of 6 bytes (4 bytes for the cell itself +// plus 2 bytes for the index to the cell in the page header). Such +// small cells will be rare, but they are possible. + +// Forward declarations +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ +type BtLock1 = struct { + FpBtree uintptr + FiTable Pgno + FeLock U8 + F__ccgo_pad1 [3]byte + FpNext uintptr +} /* sqlite3.c:578:9 */ + +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ +type CellInfo1 = struct { + FnKey I64 + FpPayload uintptr + FnPayload U32 + FnLocal U16 + FnSize U16 +} /* sqlite3.c:578:9 */ + +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ + +// Legal values for BtCursor.curFlags + +// Potential values for BtCursor.eState. +// +// CURSOR_INVALID: +// Cursor does not point to a valid entry. This can happen (for example) +// because the table is empty or because BtreeCursorFirst() has not been +// called. +// +// CURSOR_VALID: +// Cursor points to a valid entry. getPayload() etc. may be called. +// +// CURSOR_SKIPNEXT: +// Cursor is valid except that the Cursor.skipNext field is non-zero +// indicating that the next sqlite3BtreeNext() or sqlite3BtreePrevious() +// operation should be a no-op. +// +// CURSOR_REQUIRESEEK: +// The table that this cursor was opened on still exists, but has been +// modified since the cursor was last used. The cursor position is saved +// in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in +// this state, restoreCursorPosition() can be called to attempt to +// seek the cursor to the saved position. +// +// CURSOR_FAULT: +// An unrecoverable error (an I/O error or a malloc failure) has occurred +// on a different connection that shares the BtShared cache with this +// cursor. The error has left the cache in an inconsistent state. +// Do nothing else with this cursor. Any attempt to use the cursor +// should return the error code stored in BtCursor.skipNext + +// The database page the PENDING_BYTE occupies. This page is never used. + +// These macros define the location of the pointer-map entry for a +// database page. The first argument to each is the number of usable +// bytes on each page of the database (often 1024). The second is the +// page number to look up in the pointer map. +// +// PTRMAP_PAGENO returns the database page number of the pointer-map +// page that stores the required pointer. PTRMAP_PTROFFSET returns +// the offset of the requested map entry. +// +// If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page, +// then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be +// used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements +// this test. + +// The pointer map is a lookup table that identifies the parent page for +// each child page in the database file. The parent page is the page that +// contains a pointer to the child. Every page in the database contains +// 0 or 1 parent pages. (In this context 'database page' refers +// to any page that is not part of the pointer map itself.) Each pointer map +// entry consists of a single byte 'type' and a 4 byte parent page number. +// The PTRMAP_XXX identifiers below are the valid types. +// +// The purpose of the pointer map is to facility moving pages from one +// position in the file to another as part of autovacuum. When a page +// is moved, the pointer in its parent must be updated to point to the +// new location. The pointer map is used to locate the parent page quickly. +// +// PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not +// used in this case. +// +// PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number +// is not used in this case. +// +// PTRMAP_OVERFLOW1: The database page is the first page in a list of +// overflow pages. The page number identifies the page that +// contains the cell with a pointer to this overflow page. +// +// PTRMAP_OVERFLOW2: The database page is the second or later page in a list of +// overflow pages. The page-number identifies the previous +// page in the overflow page list. +// +// PTRMAP_BTREE: The database page is a non-root btree page. The page number +// identifies the parent page in the btree. + +// A bunch of assert() statements to check the transaction state variables +// of handle p (type Btree*) are internally consistent. + +// The ISAUTOVACUUM macro is used within balance_nonroot() to determine +// if the database supports auto-vacuum or not. Because it is used +// within an expression that is an argument to another macro +// (sqliteMallocRaw), it is not possible to use conditional compilation. +// So, this macro is defined instead. + +// This structure is passed around through all the sanity checking routines +// in order to keep track of some global state information. +// +// The aRef[] array is allocated so that there is 1 bit for each page in +// the database. As the integrity-check proceeds, for each page used in +// the database the corresponding bit is set. This allows integrity-check to +// detect pages that are used twice and orphaned pages (both of which +// indicate corruption). +type IntegrityCk1 = struct { + FpBt uintptr + FpPager uintptr + FaPgRef uintptr + FnPage Pgno + FmxErr int32 + FnErr int32 + FbOomFault int32 + FzPfx uintptr + Fv1 Pgno + Fv2 int32 + FerrMsg StrAccum + Fheap uintptr + Fdb uintptr +} /* sqlite3.c:65811:9 */ + +// Legal values for BtCursor.curFlags + +// Potential values for BtCursor.eState. +// +// CURSOR_INVALID: +// Cursor does not point to a valid entry. This can happen (for example) +// because the table is empty or because BtreeCursorFirst() has not been +// called. +// +// CURSOR_VALID: +// Cursor points to a valid entry. getPayload() etc. may be called. +// +// CURSOR_SKIPNEXT: +// Cursor is valid except that the Cursor.skipNext field is non-zero +// indicating that the next sqlite3BtreeNext() or sqlite3BtreePrevious() +// operation should be a no-op. +// +// CURSOR_REQUIRESEEK: +// The table that this cursor was opened on still exists, but has been +// modified since the cursor was last used. The cursor position is saved +// in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in +// this state, restoreCursorPosition() can be called to attempt to +// seek the cursor to the saved position. +// +// CURSOR_FAULT: +// An unrecoverable error (an I/O error or a malloc failure) has occurred +// on a different connection that shares the BtShared cache with this +// cursor. The error has left the cache in an inconsistent state. +// Do nothing else with this cursor. Any attempt to use the cursor +// should return the error code stored in BtCursor.skipNext + +// The database page the PENDING_BYTE occupies. This page is never used. + +// These macros define the location of the pointer-map entry for a +// database page. The first argument to each is the number of usable +// bytes on each page of the database (often 1024). The second is the +// page number to look up in the pointer map. +// +// PTRMAP_PAGENO returns the database page number of the pointer-map +// page that stores the required pointer. PTRMAP_PTROFFSET returns +// the offset of the requested map entry. +// +// If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page, +// then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be +// used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements +// this test. + +// The pointer map is a lookup table that identifies the parent page for +// each child page in the database file. The parent page is the page that +// contains a pointer to the child. Every page in the database contains +// 0 or 1 parent pages. (In this context 'database page' refers +// to any page that is not part of the pointer map itself.) Each pointer map +// entry consists of a single byte 'type' and a 4 byte parent page number. +// The PTRMAP_XXX identifiers below are the valid types. +// +// The purpose of the pointer map is to facility moving pages from one +// position in the file to another as part of autovacuum. When a page +// is moved, the pointer in its parent must be updated to point to the +// new location. The pointer map is used to locate the parent page quickly. +// +// PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not +// used in this case. +// +// PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number +// is not used in this case. +// +// PTRMAP_OVERFLOW1: The database page is the first page in a list of +// overflow pages. The page number identifies the page that +// contains the cell with a pointer to this overflow page. +// +// PTRMAP_OVERFLOW2: The database page is the second or later page in a list of +// overflow pages. The page-number identifies the previous +// page in the overflow page list. +// +// PTRMAP_BTREE: The database page is a non-root btree page. The page number +// identifies the parent page in the btree. + +// A bunch of assert() statements to check the transaction state variables +// of handle p (type Btree*) are internally consistent. + +// The ISAUTOVACUUM macro is used within balance_nonroot() to determine +// if the database supports auto-vacuum or not. Because it is used +// within an expression that is an argument to another macro +// (sqliteMallocRaw), it is not possible to use conditional compilation. +// So, this macro is defined instead. + +// This structure is passed around through all the sanity checking routines +// in order to keep track of some global state information. +// +// The aRef[] array is allocated so that there is 1 bit for each page in +// the database. As the integrity-check proceeds, for each page used in +// the database the corresponding bit is set. This allows integrity-check to +// detect pages that are used twice and orphaned pages (both of which +// indicate corruption). +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ + +// Routines to read or write a two- and four-byte big-endian integer values. + +// get2byteAligned(), unlike get2byte(), requires that its argument point to a +// two-byte aligned address. get2bytea() is only used for accessing the +// cell addresses in a btree header. + +//************* End of btreeInt.h ******************************************* +//************* Continuing where we left off in btmutex.c ******************* + +// Obtain the BtShared mutex associated with B-Tree handle p. Also, +// set BtShared.db to the database handle associated with p and the +// p->locked boolean to true. +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ + + Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) + (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb + (*Btree)(unsafe.Pointer(p)).Flocked = U8(1) +} + +// Release the BtShared mutex associated with B-Tree handle p and +// clear the p->locked boolean. +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) + (*Btree)(unsafe.Pointer(p)).Flocked = U8(0) +} + +// Enter a mutex on the given BTree object. +// +// If the object is not sharable, then no mutex is ever required +// and this routine is a no-op. The underlying mutex is non-recursive. +// But we keep a reference count in Btree.wantToLock so the behavior +// of this interface is recursive. +// +// To avoid deadlocks, multiple Btrees are locked in the same order +// by all database connections. The p->pNext is a list of other +// Btrees belonging to the same database connection as the p Btree +// which need to be locked after p. If we cannot get a lock on +// p, then first unlock all of the others on p->pNext, then wait +// for the lock to become available on p, then relock all of the +// subsequent Btrees that desire a lock. +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ + // Some basic sanity checking on the Btree. The list of Btrees + // connected by pNext and pPrev should be in sorted order by + // Btree.pBt value. All elements of the list should belong to + // the same connection. Only shared Btrees are on the list. + + // Check for locking consistency + + // We should already hold a lock on the database connection + + // Unless the database is sharable and unlocked, then BtShared.db + // should already be set correctly. + + if !(int32((*Btree)(unsafe.Pointer(p)).Fsharable) != 0) { + return + } + (*Btree)(unsafe.Pointer(p)).FwantToLock++ + if (*Btree)(unsafe.Pointer(p)).Flocked != 0 { + return + } + btreeLockCarefully(tls, p) +} + +// This is a helper function for sqlite3BtreeLock(). By moving +// complex, but seldom used logic, out of sqlite3BtreeLock() and +// into this routine, we avoid unnecessary stack pointer changes +// and thus help the sqlite3BtreeLock() routine to run much faster +// in the common case. +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ + var pLater uintptr + + // In most cases, we should be able to acquire the lock we + // want without having to go through the ascending lock + // procedure that follows. Just be sure not to block. + if Xsqlite3_mutex_try(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) == SQLITE_OK { + (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb + (*Btree)(unsafe.Pointer(p)).Flocked = U8(1) + return + } + + // To avoid deadlock, first release all locks with a larger + // BtShared address. Then acquire our lock. Then reacquire + // the other BtShared locks that we used to hold in ascending + // order. + for pLater = (*Btree)(unsafe.Pointer(p)).FpNext; pLater != 0; pLater = (*Btree)(unsafe.Pointer(pLater)).FpNext { + + if (*Btree)(unsafe.Pointer(pLater)).Flocked != 0 { + unlockBtreeMutex(tls, pLater) + } + } + lockBtreeMutex(tls, p) + for pLater = (*Btree)(unsafe.Pointer(p)).FpNext; pLater != 0; pLater = (*Btree)(unsafe.Pointer(pLater)).FpNext { + if (*Btree)(unsafe.Pointer(pLater)).FwantToLock != 0 { + lockBtreeMutex(tls, pLater) + } + } +} + +// Exit the recursive mutex on a Btree. +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ + + if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { + + (*Btree)(unsafe.Pointer(p)).FwantToLock-- + if (*Btree)(unsafe.Pointer(p)).FwantToLock == 0 { + unlockBtreeMutex(tls, p) + } + } +} + +// Enter the mutex on every Btree associated with a database +// connection. This is needed (for example) prior to parsing +// a statement since we will be comparing table and column names +// against all schemas and we do not want those schemas being +// reset out from under us. +// +// There is a corresponding leave-all procedures. +// +// Enter the mutexes in accending order by BtShared pointer address +// to avoid the possibility of deadlock when two threads with +// two or more btrees in common both try to lock all their btrees +// at the same instant. +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ + var i int32 + var skipOk int32 = 1 + var p uintptr + + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + p = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if p != 0 && (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { + Xsqlite3BtreeEnter(tls, p) + skipOk = 0 + } + } + (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) +} + +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ + if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { + btreeEnterAll(tls, db) + } +} + +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ + var i int32 + var p uintptr + + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + p = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if p != 0 { + Xsqlite3BtreeLeave(tls, p) + } + } +} + +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ + if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { + btreeLeaveAll(tls, db) + } +} + +// Enter a mutex on a Btree given a cursor owned by that Btree. +// +// These entry points are used by incremental I/O only. Enter() is required +// any time OMIT_SHARED_CACHE is not defined, regardless of whether or not +// the build is threadsafe. Leave() is only required by threadsafe builds. +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ + Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) +} + +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ + Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) +} + +//************* End of btmutex.c ******************************************** +//************* Begin file btree.c ****************************************** +// 2004 April 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file implements an external (disk-based) database using BTrees. +// See the header comment on "btreeInt.h" for additional information. +// Including a description of file format and an overview of operation. +// #include "btreeInt.h" + +// The header string that appears at the beginning of every +// SQLite database. +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3975)) /* sqlite3.c:66167:19 */ + +// Set this global variable to 1 to enable tracing using the TRACE +// macro. + +// Extract a 2-byte big-endian integer from an array of unsigned bytes. +// But if the value is zero, make it 65536. +// +// This routine is used to extract the "offset to cell content area" value +// from the header of a btree page. If the page size is 65536 and the page +// is empty, the offset should be 65536, but the 2-byte value stores zero. +// This routine makes the necessary adjustment to 65536. + +// Values passed as the 5th argument to allocateBtreePage() + +// Macro IfNotOmitAV(x) returns (x) if SQLITE_OMIT_AUTOVACUUM is not +// defined, or 0 if it is. For example: +// +// bIncrVacuum = IfNotOmitAV(pBtShared->incrVacuum); + +// A list of BtShared objects that are eligible for participation +// in shared cache. This variable has file scope during normal builds, +// but the test harness needs to access it so we make it global for +// test builds. +// +// Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ + +// Enable or disable the shared pager and schema features. +// +// This routine has no effect on existing database connections. +// The shared cache setting effects only future calls to +// sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ + Xsqlite3Config.FsharedCacheEnabled = enable + return SQLITE_OK +} + +// Implementation of the SQLITE_CORRUPT_PAGE() macro. Takes a single +// (MemPage*) as an argument. The (MemPage*) must not be NULL. +// +// If SQLITE_DEBUG is not defined, then this macro is equivalent to +// SQLITE_CORRUPT_BKPT. Or, if SQLITE_DEBUG is set, then the log message +// normally produced as a side-effect of SQLITE_CORRUPT_BKPT is augmented +// with the page number and filename associated with the (MemPage*). + +// Query to see if Btree handle p may obtain a lock of type eLock +// (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return +// SQLITE_OK if the lock may be obtained (by calling +// setSharedCacheTableLock()), or SQLITE_LOCKED if not. +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + var pIter uintptr + + // If requesting a write-lock, then the Btree must have an open write + // transaction on this file. And, obviously, for this to be so there + // must be an open write transaction on the file itself. + + // This routine is a no-op if the shared-cache is not enabled + if !(int32((*Btree)(unsafe.Pointer(p)).Fsharable) != 0) { + return SQLITE_OK + } + + // If some other connection is holding an exclusive lock, the + // requested lock may not be obtained. + if (*BtShared)(unsafe.Pointer(pBt)).FpWriter != p && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_EXCLUSIVE != 0 { + Xsqlite3ConnectionBlocked(tls, (*Btree)(unsafe.Pointer(p)).Fdb, (*Btree)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpWriter)).Fdb) + return SQLITE_LOCKED | int32(1)<<8 + } + + for pIter = (*BtShared)(unsafe.Pointer(pBt)).FpLock; pIter != 0; pIter = (*BtLock)(unsafe.Pointer(pIter)).FpNext { + // The condition (pIter->eLock!=eLock) in the following if(...) + // statement is a simplification of: + // + // (eLock==WRITE_LOCK || pIter->eLock==WRITE_LOCK) + // + // since we know that if eLock==WRITE_LOCK, then no other connection + // may hold a WRITE_LOCK on any table in this file (since there can + // only be a single writer). + + if (*BtLock)(unsafe.Pointer(pIter)).FpBtree != p && (*BtLock)(unsafe.Pointer(pIter)).FiTable == iTab && int32((*BtLock)(unsafe.Pointer(pIter)).FeLock) != int32(eLock) { + Xsqlite3ConnectionBlocked(tls, (*Btree)(unsafe.Pointer(p)).Fdb, (*Btree)(unsafe.Pointer((*BtLock)(unsafe.Pointer(pIter)).FpBtree)).Fdb) + if int32(eLock) == WRITE_LOCK { + + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PENDING) + } + return SQLITE_LOCKED | int32(1)<<8 + } + } + return SQLITE_OK +} + +// Add a lock on the table with root-page iTable to the shared-btree used +// by Btree handle p. Parameter eLock must be either READ_LOCK or +// WRITE_LOCK. +// +// This function assumes the following: +// +// (a) The specified Btree object p is connected to a sharable +// database (one with the BtShared.sharable flag set), and +// +// (b) No other Btree objects hold a lock that conflicts +// with the requested lock (i.e. querySharedCacheTableLock() has +// already been called and returned SQLITE_OK). +// +// SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM +// is returned if a malloc attempt fails. +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + var pLock uintptr = uintptr(0) + var pIter uintptr + + // A connection with the read-uncommitted flag set will never try to + // obtain a read-lock using this function. The only read-lock obtained + // by a connection in read-uncommitted mode is on the sqlite_schema + // table, and that lock is obtained in BtreeBeginTrans(). + + // This function should only be called on a sharable b-tree after it + // has been determined that no other b-tree holds a conflicting lock. + + // First search the list for an existing lock on this table. + for pIter = (*BtShared)(unsafe.Pointer(pBt)).FpLock; pIter != 0; pIter = (*BtLock)(unsafe.Pointer(pIter)).FpNext { + if (*BtLock)(unsafe.Pointer(pIter)).FiTable == iTable && (*BtLock)(unsafe.Pointer(pIter)).FpBtree == p { + pLock = pIter + break + } + } + + // If the above search did not find a BtLock struct associating Btree p + // with table iTable, allocate one and link it into the list. + if !(pLock != 0) { + pLock = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(BtLock{}))) + if !(pLock != 0) { + return SQLITE_NOMEM + } + (*BtLock)(unsafe.Pointer(pLock)).FiTable = iTable + (*BtLock)(unsafe.Pointer(pLock)).FpBtree = p + (*BtLock)(unsafe.Pointer(pLock)).FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpLock + (*BtShared)(unsafe.Pointer(pBt)).FpLock = pLock + } + + // Set the BtLock.eLock variable to the maximum of the current lock + // and the requested lock. This means if a write-lock was already held + // and a read-lock requested, we don't incorrectly downgrade the lock. + + if int32(eLock) > int32((*BtLock)(unsafe.Pointer(pLock)).FeLock) { + (*BtLock)(unsafe.Pointer(pLock)).FeLock = eLock + } + + return SQLITE_OK +} + +// Release all the table locks (locks obtained via calls to +// the setSharedCacheTableLock() procedure) held by Btree object p. +// +// This function assumes that Btree p has an open read or write +// transaction. If it does not, then the BTS_PENDING flag +// may be incorrectly cleared. +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + var ppIter uintptr = pBt + 120 + + for *(*uintptr)(unsafe.Pointer(ppIter)) != 0 { + var pLock uintptr = *(*uintptr)(unsafe.Pointer(ppIter)) + + if (*BtLock)(unsafe.Pointer(pLock)).FpBtree == p { + *(*uintptr)(unsafe.Pointer(ppIter)) = (*BtLock)(unsafe.Pointer(pLock)).FpNext + + if (*BtLock)(unsafe.Pointer(pLock)).FiTable != Pgno(1) { + Xsqlite3_free(tls, pLock) + } + } else { + ppIter = pLock + 16 + } + } + + if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { + (*BtShared)(unsafe.Pointer(pBt)).FpWriter = uintptr(0) + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_EXCLUSIVE | BTS_PENDING)) + } else if (*BtShared)(unsafe.Pointer(pBt)).FnTransaction == 2 { + // This function is called when Btree p is concluding its + // transaction. If there currently exists a writer, and p is not + // that writer, then the number of locks held by connections other + // than the writer must be about to drop to zero. In this case + // set the BTS_PENDING flag to 0. + // + // If there is not currently a writer, then BTS_PENDING must + // be zero already. So this next line is harmless in that case. + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_PENDING)) + } +} + +// This function changes all write-locks held by Btree p into read-locks. +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { + var pLock uintptr + (*BtShared)(unsafe.Pointer(pBt)).FpWriter = uintptr(0) + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_EXCLUSIVE | BTS_PENDING)) + for pLock = (*BtShared)(unsafe.Pointer(pBt)).FpLock; pLock != 0; pLock = (*BtLock)(unsafe.Pointer(pLock)).FpNext { + + (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(READ_LOCK) + } + } +} + +// Forward reference + +// This routine is used inside of assert() only **** +// +// Verify that the cursor holds the mutex on its BtShared + +// Invalidate the overflow cache of the cursor passed as the first argument. +// on the shared btree structure pBt. + +// Invalidate the overflow page-list cache for all cursors opened +// on the shared btree structure pBt. +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ + var p uintptr + + for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { + *(*U8)(unsafe.Pointer(p + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) + } +} + +// This function is called before modifying the contents of a table +// to invalidate any incrblob cursors that are open on the +// row or one of the rows being modified. +// +// If argument isClearTable is true, then the entire contents of the +// table is about to be deleted. In this case invalidate all incrblob +// cursors open on any row within the table with root-page pgnoRoot. +// +// Otherwise, if argument isClearTable is false, then the row with +// rowid iRow is being replaced or deleted. In this case invalidate +// only those incrblob cursors open on that specific row. +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ + var p uintptr + + (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) + for p = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBtree)).FpBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { + if int32((*BtCursor)(unsafe.Pointer(p)).FcurFlags)&BTCF_Incrblob != 0 { + (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(1) + if (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == pgnoRoot && (isClearTable != 0 || (*BtCursor)(unsafe.Pointer(p)).Finfo.FnKey == iRow) { + (*BtCursor)(unsafe.Pointer(p)).FeState = U8(CURSOR_INVALID) + } + } + } +} + +// Set bit pgno of the BtShared.pHasContent bitvec. This is called +// when a page that previously contained data becomes a free-list leaf +// page. +// +// The BtShared.pHasContent bitvec exists to work around an obscure +// bug caused by the interaction of two useful IO optimizations surrounding +// free-list leaf pages: +// +// 1) When all data is deleted from a page and the page becomes +// a free-list leaf page, the page is not written to the database +// (as free-list leaf pages contain no meaningful data). Sometimes +// such a page is not even journalled (as it will not be modified, +// why bother journalling it?). +// +// 2) When a free-list leaf page is reused, its content is not read +// from the database or written to the journal file (why should it +// be, if it is not at all meaningful?). +// +// By themselves, these optimizations work fine and provide a handy +// performance boost to bulk delete or insert operations. However, if +// a page is moved to the free-list and then reused within the same +// transaction, a problem comes up. If the page is not journalled when +// it is moved to the free-list and it is also not journalled when it +// is extracted from the free-list and reused, then the original data +// may be lost. In the event of a rollback, it may not be possible +// to restore the database to its original configuration. +// +// The solution is the BtShared.pHasContent bitvec. Whenever a page is +// moved to become a free-list leaf page, the corresponding bit is +// set in the bitvec. Whenever a leaf page is extracted from the free-list, +// optimization 2 above is omitted if the corresponding bit is already +// set in BtShared.pHasContent. The contents of the bitvec are cleared +// at the end of every transaction. +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ + var rc int32 = SQLITE_OK + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { + + (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = Xsqlite3BitvecCreate(tls, (*BtShared)(unsafe.Pointer(pBt)).FnPage) + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { + rc = SQLITE_NOMEM + } + } + if rc == SQLITE_OK && pgno <= Xsqlite3BitvecSize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) { + rc = Xsqlite3BitvecSet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent, pgno) + } + return rc +} + +// Query the BtShared.pHasContent vector. +// +// This function is called when a free-list leaf page is removed from the +// free-list for reuse. It returns false if it is safe to retrieve the +// page from the pager layer with the 'no-content' flag set. True otherwise. +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ + var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent + return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) +} + +// Clear (destroy) the BtShared.pHasContent bitvec. This should be +// invoked at the conclusion of each write-transaction. +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ + Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) + (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) +} + +// Release all of the apPage[] pages for a cursor. +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ + var i int32 + if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { + for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { + releasePageNotNull(tls, *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(i)*8))) + } + releasePageNotNull(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage) + (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(-1) + } +} + +// The cursor passed as the only argument must point to a valid entry +// when this function is called (i.e. have eState==CURSOR_VALID). This +// function saves the current cursor key in variables pCur->nKey and +// pCur->pKey. SQLITE_OK is returned if successful or an SQLite error +// code otherwise. +// +// If the cursor is open on an intkey table, then the integer key +// (the rowid) is stored in pCur->nKey and pCur->pKey is left set to +// NULL. If the cursor is open on a non-intkey table, then pCur->pKey is +// set to point to a malloced buffer pCur->nKey bytes in size containing +// the key. +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ + var rc int32 = SQLITE_OK + + if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { + // Only the rowid is required for a table btree + (*BtCursor)(unsafe.Pointer(pCur)).FnKey = Xsqlite3BtreeIntegerKey(tls, pCur) + } else { + // For an index btree, save the complete key content. It is possible + // that the current key is corrupt. In that case, it is possible that + // the sqlite3VdbeRecordUnpack() function may overread the buffer by + // up to the size of 1 varint plus 1 8-byte value when the cursor + // position is restored. Hence the 17 bytes of padding allocated + // below. + var pKey uintptr + (*BtCursor)(unsafe.Pointer(pCur)).FnKey = I64(Xsqlite3BtreePayloadSize(tls, pCur)) + pKey = Xsqlite3Malloc(tls, uint64((*BtCursor)(unsafe.Pointer(pCur)).FnKey+int64(9)+int64(8))) + if pKey != 0 { + rc = Xsqlite3BtreePayload(tls, pCur, uint32(0), uint32(int32((*BtCursor)(unsafe.Pointer(pCur)).FnKey)), pKey) + if rc == SQLITE_OK { + libc.Xmemset(tls, pKey+uintptr((*BtCursor)(unsafe.Pointer(pCur)).FnKey), 0, uint64(9+8)) + (*BtCursor)(unsafe.Pointer(pCur)).FpKey = pKey + } else { + Xsqlite3_free(tls, pKey) + } + } else { + rc = SQLITE_NOMEM + } + } + + return rc +} + +// Save the current cursor position in the variables BtCursor.nKey +// and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK. +// +// The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) +// prior to calling this routine. +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ + var rc int32 + + if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { + return SQLITE_CONSTRAINT | int32(11)<<8 + } + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_SKIPNEXT { + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) + } else { + (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = 0 + } + + rc = saveCursorKey(tls, pCur) + if rc == SQLITE_OK { + btreeReleaseAllCursorPages(tls, pCur) + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK) + } + + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl | BTCF_AtLast)) + return rc +} + +// Save the positions of all cursors (except pExcept) that are open on +// the table with root-page iRoot. "Saving the cursor position" means that +// the location in the btree is remembered in such a way that it can be +// moved back to the same spot after the btree has been modified. This +// routine is called just before cursor pExcept is used to modify the +// table, for example in BtreeDelete() or BtreeInsert(). +// +// If there are two or more cursors on the same btree, then all such +// cursors should have their BTCF_Multiple flag set. The btreeCursor() +// routine enforces that rule. This routine only needs to be called in +// the uncommon case when pExpect has the BTCF_Multiple flag set. +// +// If pExpect!=NULL and if no other cursors are found on the same root-page, +// then the BTCF_Multiple flag on pExpect is cleared, to avoid another +// pointless call to this routine. +// +// Implementation note: This routine merely checks to see if any cursors +// need to be saved. It calls out to saveCursorsOnList() in the (unusual) +// event that cursors are in need to being saved. +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ + var p uintptr + + for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { + if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { + break + } + } + if p != 0 { + return saveCursorsOnList(tls, p, iRoot, pExcept) + } + if pExcept != 0 { + *(*U8)(unsafe.Pointer(pExcept + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Multiple)) + } + return SQLITE_OK +} + +// This helper routine to saveAllCursors does the actual work of saving +// the cursors if and when a cursor is found that actually requires saving. +// The common case is that no cursors need to be saved, so this routine is +// broken out from its caller to avoid unnecessary stack pointer movement. +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ + for __ccgo := true; __ccgo; __ccgo = p != 0 { + if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { + if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { + var rc int32 = saveCursorPosition(tls, p) + if SQLITE_OK != rc { + return rc + } + } else { + + btreeReleaseAllCursorPages(tls, p) + } + } + p = (*BtCursor)(unsafe.Pointer(p)).FpNext + } + return SQLITE_OK +} + +// Clear the current cursor position. +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ + + Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) + (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) +} + +// In this version of BtreeMoveto, pKey is a packed index record +// such as is generated by the OP_MakeRecord opcode. Unpack the +// record and then call BtreeMovetoUnpacked() to do the work. +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ + var rc int32 // Status code + var pIdxKey uintptr // Unpacked index key + + if pKey != 0 { + var pKeyInfo uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo + + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) + if pIdxKey == uintptr(0) { + return SQLITE_NOMEM + } + Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) + if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { + rc = Xsqlite3CorruptError(tls, 66974) + } else { + rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) + } + Xsqlite3DbFree(tls, (*KeyInfo1)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo)).Fdb, pIdxKey) + } else { + pIdxKey = uintptr(0) + rc = Xsqlite3BtreeTableMoveto(tls, pCur, nKey, bias, pRes) + } + return rc +} + +// Restore the cursor to the position it was in (or as close to as possible) +// when saveCursorPosition() was called. Note that this call deletes the +// saved position info stored by saveCursorPosition(), so there can be +// at most one effective restoreCursorPosition() call after each +// saveCursorPosition(). +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 + *(*int32)(unsafe.Pointer(bp /* skipNext */)) = 0 + + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_FAULT { + return (*BtCursor)(unsafe.Pointer(pCur)).FskipNext + } + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + if Xsqlite3FaultSim(tls, 410) != 0 { + rc = SQLITE_IOERR + } else { + rc = btreeMoveto(tls, pCur, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtCursor)(unsafe.Pointer(pCur)).FnKey, 0, bp) + } + if rc == SQLITE_OK { + Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) + (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) + + if *(*int32)(unsafe.Pointer(bp)) != 0 { + (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = *(*int32)(unsafe.Pointer(bp /* skipNext */)) + } + if (*BtCursor)(unsafe.Pointer(pCur)).FskipNext != 0 && int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_SKIPNEXT) + } + } + return rc +} + +// Determine whether or not a cursor has moved from the position where +// it was last placed, or has been invalidated for any other reason. +// Cursors can move when the row they are pointing at is deleted out +// from under them, for example. Cursor might also move if a btree +// is rebalanced. +// +// Calling this routine with a NULL cursor pointer returns false. +// +// Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor +// back to where it ought to be if this routine returns true. +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ + + return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) +} + +// Return a pointer to a fake BtCursor object that will always answer +// false to the sqlite3BtreeCursorHasMoved() routine above. The fake +// cursor returned must not be used with any other Btree interface. +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ + + return uintptr(unsafe.Pointer(&fakeCursor)) +} + +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ + +// This routine restores a cursor back to its original position after it +// has been moved by some outside activity (such as a btree rebalance or +// a row having been deleted out from under the cursor). +// +// On success, the *pDifferentRow parameter is false if the cursor is left +// pointing at exactly the same row. *pDifferntRow is the row the cursor +// was pointing to has been deleted, forcing the cursor to point to some +// nearby row. +// +// This routine should only be called for a cursor that just returned +// TRUE from sqlite3BtreeCursorHasMoved(). +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ + var rc int32 + + rc = func() int32 { + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK { + return btreeRestoreCursorPosition(tls, pCur) + } + return SQLITE_OK + }() + if rc != 0 { + *(*int32)(unsafe.Pointer(pDifferentRow)) = 1 + return rc + } + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { + *(*int32)(unsafe.Pointer(pDifferentRow)) = 1 + } else { + *(*int32)(unsafe.Pointer(pDifferentRow)) = 0 + } + return SQLITE_OK +} + +// Provide flag hints to the cursor. +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ + + (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) +} + +// Given a page number of a regular database page, return the page +// number for the pointer-map page that contains the entry for the +// input page number. +// +// Return 0 (not a valid page) for pgno==1 since there is +// no pointer map associated with page 1. The integrity_check logic +// requires that ptrmapPageno(*,1)!=1. +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ + var nPagesPerMapPage int32 + var iPtrMap Pgno + var ret Pgno + + if pgno < Pgno(2) { + return Pgno(0) + } + nPagesPerMapPage = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(5) + U32(1)) + iPtrMap = (pgno - Pgno(2)) / Pgno(nPagesPerMapPage) + ret = iPtrMap*Pgno(nPagesPerMapPage) + Pgno(2) + if ret == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + ret++ + } + return ret +} + +// Write an entry into the pointer map. +// +// This routine updates the pointer map entry for page number 'key' +// so that it maps to type 'eType' and parent page number 'pgno'. +// +// If *pRC is initially non-zero (non-SQLITE_OK) then this routine is +// a no-op. If an error occurs, the appropriate error code is written +// into *pRC. +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pDbPage uintptr at bp, 8 + // The pointer map page + var pPtrmap uintptr // The pointer map data + var iPtrmap Pgno // The pointer map page number + var offset int32 // Offset in pointer map page + var rc int32 // Return code from subfunctions + + if !(*(*int32)(unsafe.Pointer(pRC)) != 0) { + goto __1 + } + return +__1: + ; + + // The super-journal page number must never be used as a pointer map page + + if !(key == Pgno(0)) { + goto __2 + } + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) + return +__2: + ; + iPtrmap = ptrmapPageno(tls, pBt, key) + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, iPtrmap, bp, 0) + if !(rc != SQLITE_OK) { + goto __3 + } + *(*int32)(unsafe.Pointer(pRC)) = rc + return +__3: + ; + if !(int32(*(*uint8)(unsafe.Pointer(Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp)))))) != 0) { + goto __4 + } + // The first byte of the extra data is the MemPage.isInit byte. + // If that byte is set, it means this page is also being used + // as a btree page. + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) + goto ptrmap_exit +__4: + ; + offset = int32(Pgno(5) * (key - iPtrmap - Pgno(1))) + if !(offset < 0) { + goto __5 + } + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) + goto ptrmap_exit +__5: + ; + + pPtrmap = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) + + if !(int32(eType) != int32(*(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset)))) || Xsqlite3Get4byte(tls, pPtrmap+uintptr(offset+1)) != parent) { + goto __6 + } + + *(*int32)(unsafe.Pointer(pRC)) = libc.AssignInt32(&rc, Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)))) + if !(rc == SQLITE_OK) { + goto __7 + } + *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) = eType + Xsqlite3Put4byte(tls, pPtrmap+uintptr(offset+1), parent) +__7: + ; +__6: + ; + +ptrmap_exit: + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) +} + +// Read an entry from the pointer map. +// +// This routine retrieves the pointer map entry for page 'key', writing +// the type and parent page number to *pEType and *pPgno respectively. +// An error code is returned if something goes wrong, otherwise SQLITE_OK. +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pDbPage uintptr at bp, 8 + // The pointer map page + var iPtrmap int32 // Pointer map page index + var pPtrmap uintptr // Pointer map page data + var offset int32 // Offset of entry in pointer map + var rc int32 + + iPtrmap = int32(ptrmapPageno(tls, pBt, key)) + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, uint32(iPtrmap), bp, 0) + if rc != 0 { + return rc + } + pPtrmap = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) + + offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) + if offset < 0 { + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) + return Xsqlite3CorruptError(tls, 67218) + } + + *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) + if pPgno != 0 { + *(*Pgno)(unsafe.Pointer(pPgno)) = Xsqlite3Get4byte(tls, pPtrmap+uintptr(offset+1)) + } + + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) + if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { + return Xsqlite3CorruptError(tls, 67226) + } + return SQLITE_OK +} + +// Given a btree page and a cell index (0 means the first cell on +// the page, 1 means the second cell, and so forth) return a pointer +// to the cell content. +// +// findCellPastPtr() does the same except it skips past the initial +// 4-byte child pointer found on interior pages, if there is one. +// +// This routine works only for pages that do not contain overflow cells. + +// This is common tail processing for btreeParseCellPtr() and +// btreeParseCellPtrIndex() for the case when the cell does not fit entirely +// on a single B-tree page. Make necessary adjustments to the CellInfo +// structure. +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ + // If the payload will not fit completely on the local page, we have + // to decide how much to store locally and how much to spill onto + // overflow pages. The strategy is to minimize the amount of unused + // space on overflow pages while keeping the amount of local storage + // in between minLocal and maxLocal. + // + // Warning: changing the way overflow payload is distributed in any + // way will result in an incompatible file format. + var minLocal int32 // Minimum amount of payload held locally + var maxLocal int32 // Maximum amount of payload held locally + var surplus int32 // Overflow payload available for local storage + + minLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) + maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) + surplus = int32(U32(minLocal) + ((*CellInfo)(unsafe.Pointer(pInfo)).FnPayload-U32(minLocal))%((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4))) + + if surplus <= maxLocal { + (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(surplus) + } else { + (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(minLocal) + } + (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(int32(U16((int64((*CellInfo)(unsafe.Pointer(pInfo)).FpPayload+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnLocal))-int64(pCell))/1)) + 4) +} + +// Given a record with nPayload bytes of payload stored within btree +// page pPage, return the number of bytes of payload stored locally. +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ + var maxLocal int32 // Maximum amount of payload held locally + maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) + if nPayload <= I64(maxLocal) { + return int32(nPayload) + } else { + var minLocal int32 // Minimum amount of payload held locally + var surplus int32 // Overflow payload available for local storage + minLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) + surplus = int32(I64(minLocal) + (nPayload-I64(minLocal))%I64((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4))) + if surplus <= maxLocal { + return surplus + } + return minLocal + } + return int32(0) +} + +// The following routines are implementations of the MemPage.xParseCell() +// method. +// +// Parse a cell content block and fill in the CellInfo structure. +// +// btreeParseCellPtr() => table btree leaf nodes +// btreeParseCellNoPayload() => table btree internal nodes +// btreeParseCellPtrIndex() => index btree nodes +// +// There is also a wrapper function btreeParseCell() that works for +// all MemPage types and that references the cell by index rather than +// by pointer. +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ + + _ = pPage + (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) + (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload = U32(0) + (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(0) + (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) + return +} + +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pIter uintptr // For scanning through pCell + var nPayload U32 // Number of bytes of cell payload + // var iKey U64 at bp, 8 + // Extracted Key value + + pIter = pCell + + // The next block of code is equivalent to: + // + // pIter += getVarint32(pIter, nPayload); + // + // The code is inlined to avoid a function call. + nPayload = U32(*(*U8)(unsafe.Pointer(pIter))) + if nPayload >= U32(0x80) { + var pEnd uintptr = pIter + 8 + nPayload = nPayload & U32(0x7f) + for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(pIter))) >= 0x80 && pIter < pEnd { + nPayload = nPayload<<7 | U32(int32(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1))))&0x7f) + } + } + pIter++ + + // The next block of code is equivalent to: + // + // pIter += getVarint(pIter, (u64*)&pInfo->nKey); + // + // The code is inlined and the loop is unrolled for performance. + // This routine is a high-runner. + *(*U64)(unsafe.Pointer(bp /* iKey */)) = U64(*(*U8)(unsafe.Pointer(pIter))) + if *(*U64)(unsafe.Pointer(bp)) >= uint64(0x80) { + var x U8 + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))&uint64(0x7f)<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) + if int32(x) >= 0x80 { + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) + if int32(x) >= 0x80 { + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) + if int32(x) >= 0x80 { + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) + if int32(x) >= 0x80 { + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) + if int32(x) >= 0x80 { + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) + if int32(x) >= 0x80 { + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) + if int32(x) >= 0x80 { + *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<8 | U64(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))) + } + } + } + } + } + } + } + } + pIter++ + + (*CellInfo)(unsafe.Pointer(pInfo)).FnKey = *(*I64)(unsafe.Pointer(bp)) + (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload = nPayload + (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = pIter + + if nPayload <= U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { + // This is the (easy) common case where the entire payload fits + // on the local page. No overflow is required. + (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(nPayload + U32(U16((int64(pIter)-int64(pCell))/1))) + if int32((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) < 4 { + (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4) + } + (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(nPayload) + } else { + btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) + } +} + +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ + var pIter uintptr // For scanning through pCell + var nPayload U32 // Number of bytes of cell payload + + pIter = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + nPayload = U32(*(*U8)(unsafe.Pointer(pIter))) + if nPayload >= U32(0x80) { + var pEnd uintptr = pIter + 8 + nPayload = nPayload & U32(0x7f) + for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(pIter))) >= 0x80 && pIter < pEnd { + nPayload = nPayload<<7 | U32(int32(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1))))&0x7f) + } + } + pIter++ + (*CellInfo)(unsafe.Pointer(pInfo)).FnKey = I64(nPayload) + (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload = nPayload + (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = pIter + + if nPayload <= U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { + // This is the (easy) common case where the entire payload fits + // on the local page. No overflow is required. + (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(nPayload + U32(U16((int64(pIter)-int64(pCell))/1))) + if int32((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) < 4 { + (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4) + } + (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(nPayload) + } else { + btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) + } +} + +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell) + 1))))), pInfo) +} + +// The following routines are implementations of the MemPage.xCellSize +// method. +// +// Compute the total number of bytes that a Cell needs in the cell +// data area of the btree-page. The return number includes the cell +// data header and the local payload, but not any overflow page or +// the space used by the cell pointer. +// +// cellSizePtrNoPayload() => table internal nodes +// cellSizePtr() => all index nodes & table leaf nodes +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ + var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell + var pEnd uintptr // End mark for a varint + var nSize U32 // Size value to return + + nSize = U32(*(*U8)(unsafe.Pointer(pIter))) + if nSize >= U32(0x80) { + pEnd = pIter + 8 + nSize = nSize & U32(0x7f) + for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(pIter))) >= 0x80 && pIter < pEnd { + nSize = nSize<<7 | U32(int32(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1))))&0x7f) + } + } + pIter++ + if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 { + // pIter now points at the 64-bit integer key value, a variable length + // integer. The following block moves pIter to point at the first byte + // past the end of the key value. + pEnd = pIter + 9 + for int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pIter, 1))))&0x80 != 0 && pIter < pEnd { + } + } + + if nSize <= U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { + nSize = nSize + U32((int64(pIter)-int64(pCell))/1) + if nSize < U32(4) { + nSize = U32(4) + } + } else { + var minLocal int32 = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) + nSize = U32(minLocal) + (nSize-U32(minLocal))%((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4)) + + if nSize > U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { + nSize = U32(minLocal) + } + nSize = nSize + U32(4+int32(U16((int64(pIter)-int64(pCell))/1))) + } + + return U16(nSize) +} + +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ + var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell + var pEnd uintptr // End mark for a varint + + _ = pPage + + pEnd = pIter + uintptr(9) + for int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pIter, 1))))&0x80 != 0 && pIter < pEnd { + } + + return U16((int64(pIter) - int64(pCell)) / 1) +} + +// The cell pCell is currently part of page pSrc but will ultimately be part +// of pPage. (pSrc and pPager are often the same.) If pCell contains a +// pointer to an overflow page, insert an entry into the pointer-map for +// the overflow page that will be valid after pCell has been moved to pPage. +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + // var info CellInfo at bp, 24 + + if *(*int32)(unsafe.Pointer(pRC)) != 0 { + return + } + + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) + if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { + var ovfl Pgno + if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { + + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) + return + } + ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) + ptrmapPut(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, pRC) + } +} + +// Defragment the page given. This routine reorganizes cells within the +// page so that there are no free-blocks on the free-block list. +// +// Parameter nMaxFrag is the maximum amount of fragmented space that may be +// present in the page after this routine returns. +// +// EVIDENCE-OF: R-44582-60138 SQLite may from time to time reorganize a +// b-tree page so that there are no freeblocks or fragment bytes, all +// unused bytes are contained in the unallocated space region, and all +// cells are packed tightly at the end of the page. +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ + var i int32 // Loop counter + var pc int32 // Address of the i-th cell + var hdr int32 // Offset to the page header + var size int32 // Size of a cell + var usableSize int32 // Number of usable bytes on a page + var cellOffset int32 // Offset to the cell pointer array + var cbrk int32 // Offset to the cell content area + var nCell int32 // Number of cells on the page + var data uintptr // The page data + var temp uintptr // Temp area for cell content + var src uintptr // Source of content + var iCellFirst int32 // First allowable cell index + var iCellLast int32 // Last possible cell index + var iCellStart int32 + var pEnd uintptr + var pAddr uintptr + var sz2 int32 + var sz int32 + var top int32 + var iFree2 int32 + var iFree int32 + var pAddr1 uintptr // First cell offset in input + + temp = uintptr(0) + src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + cellOffset = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) + nCell = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) + + iCellFirst = cellOffset + 2*nCell + usableSize = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) + + // This block handles pages with two or fewer free blocks and nMaxFrag + // or fewer fragmented bytes. In this case it is faster to move the + // two (or one) blocks of cells using memmove() and add the required + // offsets to each pointer in the cell-pointer array than it is to + // reconstruct the entire page. + if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7)))) <= nMaxFrag) { + goto __1 + } + iFree = int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+1))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+1) + 1))) + if !(iFree > usableSize-4) { + goto __2 + } + return Xsqlite3CorruptError(tls, 67631) +__2: + ; + if !(iFree != 0) { + goto __3 + } + iFree2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree) + 1))) + if !(iFree2 > usableSize-4) { + goto __4 + } + return Xsqlite3CorruptError(tls, 67634) +__4: + ; + if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { + goto __5 + } + pEnd = data + uintptr(cellOffset+nCell*2) + sz2 = 0 + sz = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+2) + 1))) + top = int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1))) + if !(top >= iFree) { + goto __6 + } + return Xsqlite3CorruptError(tls, 67642) +__6: + ; + if !(iFree2 != 0) { + goto __7 + } + if !(iFree+sz > iFree2) { + goto __9 + } + return Xsqlite3CorruptError(tls, 67645) +__9: + ; + sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) + if !(iFree2+sz2 > usableSize) { + goto __10 + } + return Xsqlite3CorruptError(tls, 67647) +__10: + ; + libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) + sz = sz + sz2 + goto __8 +__7: + if !(iFree+sz > usableSize) { + goto __11 + } + return Xsqlite3CorruptError(tls, 67651) +__11: + ; +__8: + ; + + cbrk = top + sz + + libc.Xmemmove(tls, data+uintptr(cbrk), data+uintptr(top), uint64(iFree-top)) + pAddr = data + uintptr(cellOffset) +__12: + if !(pAddr < pEnd) { + goto __14 + } + pc = int32(*(*U8)(unsafe.Pointer(pAddr)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr + 1))) + if !(pc < iFree) { + goto __15 + } + *(*U8)(unsafe.Pointer(pAddr)) = U8((pc + sz) >> 8) + *(*U8)(unsafe.Pointer(pAddr + 1)) = U8(pc + sz) + goto __16 +__15: + if !(pc < iFree2) { + goto __17 + } + *(*U8)(unsafe.Pointer(pAddr)) = U8((pc + sz2) >> 8) + *(*U8)(unsafe.Pointer(pAddr + 1)) = U8(pc + sz2) +__17: + ; +__16: + ; + goto __13 +__13: + pAddr += uintptr(2) + goto __12 + goto __14 +__14: + ; + goto defragment_out +__5: + ; +__3: + ; +__1: + ; + + cbrk = usableSize + iCellLast = usableSize - 4 + iCellStart = int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1))) + i = 0 +__18: + if !(i < nCell) { + goto __20 + } // The i-th cell pointer + pAddr1 = data + uintptr(cellOffset+i*2) + pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) + + // These conditions have already been verified in btreeInitPage() + // if PRAGMA cell_size_check=ON. + if !(pc < iCellStart || pc > iCellLast) { + goto __21 + } + return Xsqlite3CorruptError(tls, 67680) +__21: + ; + + size = int32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, src+uintptr(pc))) + cbrk = cbrk - size + if !(cbrk < iCellStart || pc+size > usableSize) { + goto __22 + } + return Xsqlite3CorruptError(tls, 67686) +__22: + ; + + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) + if !(temp == uintptr(0)) { + goto __23 + } + if !(cbrk == pc) { + goto __24 + } + goto __19 +__24: + ; + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) + src = temp +__23: + ; + libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) + goto __19 +__19: + i++ + goto __18 + goto __20 +__20: + ; + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))) = uint8(0) + +defragment_out: + ; + if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { + goto __25 + } + return Xsqlite3CorruptError(tls, 67705) +__25: + ; + + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+1))) = uint8(0) + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+2))) = uint8(0) + libc.Xmemset(tls, data+uintptr(iCellFirst), 0, uint64(cbrk-iCellFirst)) + + return SQLITE_OK +} + +// Search the free-list on page pPg for space to store a cell nByte bytes in +// size. If one can be found, return a pointer to the space and remove it +// from the free-list. +// +// If no suitable space can be found on the free-list, return NULL. +// +// This function may detect corruption within pPg. If corruption is +// detected then *pRc is set to SQLITE_CORRUPT and NULL is returned. +// +// Slots on the free list that are between 1 and 3 bytes larger than nByte +// will be ignored if adding the extra space to the fragmentation count +// causes the fragmentation count to exceed 60. +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ + var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header + var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data + var iAddr int32 = hdr + 1 // Address of ptr to pc + var pc int32 = int32(*(*U8)(unsafe.Pointer(aData + uintptr(iAddr))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(iAddr) + 1))) // Address of a free slot + var x int32 // Excess size of the slot + var maxPC int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize - U32(nByte)) // Max address for a usable slot + var size int32 // Size of the free slot + + for pc <= maxPC { + // EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each + // freeblock form a big-endian integer which is the size of the freeblock + // in bytes, including the 4-byte header. + size = int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc+2) + 1))) + if libc.AssignInt32(&x, size-nByte) >= 0 { + + if x < 4 { + // EVIDENCE-OF: R-11498-58022 In a well-formed b-tree page, the total + // number of bytes in fragments may not exceed 60. + if int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+7)))) > 57 { + return uintptr(0) + } + + // Remove the slot from the free-list. Update the number of + // fragmented bytes within the page. + libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) + } else if x+pc > maxPC { + // This slot extends off the end of the usable part of the page + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) + return uintptr(0) + } else { + // The slot remains on the free-list. Reduce its size to account + // for the portion used by the new allocation. + *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) + *(*U8)(unsafe.Pointer(aData + uintptr(pc+2) + 1)) = U8(x) + } + return aData + uintptr(pc+x) + } + iAddr = pc + pc = int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc) + 1))) + if pc <= iAddr+size { + if pc != 0 { + // The next slot in the chain is not past the end of the current slot + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) + } + return uintptr(0) + } + } + if pc > maxPC+nByte-4 { + // The free slot chain extends off the end of the page + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) + } + return uintptr(0) +} + +// Allocate nByte bytes of space from within the B-Tree page passed +// as the first argument. Write into *pIdx the index into pPage->aData[] +// of the first byte of allocated space. Return either SQLITE_OK or +// an error code (usually SQLITE_CORRUPT). +// +// The caller guarantees that there is sufficient space to make the +// allocation. This routine might need to defragment in order to bring +// all the space together, however. This routine will avoid using +// the first two bytes past the cell pointer area since presumably this +// allocation is being made in order to insert a new cell, so we will +// also end up needing a new cell pointer. +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) // Local cache of pPage->hdrOffset + var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData // Local cache of pPage->aData + var top int32 // First byte of cell content area + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK // Integer return code + var gap int32 // First byte of gap between cell pointers and cell content + + // Minimum cell size is 4 + + gap = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) + 2*int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) + + // EVIDENCE-OF: R-29356-02391 If the database uses a 65536-byte page size + // and the reserved space is zero (the usual value for reserved space) + // then the cell content offset of an empty page wants to be 65536. + // However, that integer is too large to be stored in a 2-byte unsigned + // integer, so a value of 0 is used in its place. + top = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1))) + // by btreeComputeFreeSpace() + if gap > top { + if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { + top = 65536 + } else { + return Xsqlite3CorruptError(tls, 67827) + } + } + + // If there is enough space between gap and top for one more cell pointer, + // and if the freelist is not empty, then search the + // freelist looking for a slot big enough to satisfy the request. + + if (*(*U8)(unsafe.Pointer(data + uintptr(hdr+2))) != 0 || *(*U8)(unsafe.Pointer(data + uintptr(hdr+1))) != 0) && gap+2 <= top { + var pSpace uintptr = pageFindSlot(tls, pPage, nByte, bp) + if pSpace != 0 { + var g2 int32 + + *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) + if g2 <= gap { + return Xsqlite3CorruptError(tls, 67845) + } else { + return SQLITE_OK + } + } else if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } + + // The request could not be fulfilled using a freelist slot. Check + // to see if defragmentation is necessary. + + if gap+2+nByte > top { + + *(*int32)(unsafe.Pointer(bp /* rc */)) = defragmentPage(tls, pPage, func() int32 { + if 4 < (*MemPage)(unsafe.Pointer(pPage)).FnFree-(2+nByte) { + return 4 + } + return (*MemPage)(unsafe.Pointer(pPage)).FnFree - (2 + nByte) + }()) + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + top = (int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1 + + } + + // Allocate memory from the gap in between the cell pointer array + // and the cell content area. The btreeComputeFreeSpace() call has already + // validated the freelist. Given that the freelist is valid, there + // is no way that the allocation can extend off the end of the page. + // The assert() below verifies the previous sentence. + top = top - nByte + *(*U8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(top >> 8) + *(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(top) + + *(*int32)(unsafe.Pointer(pIdx)) = top + return SQLITE_OK +} + +// Return a section of the pPage->aData to the freelist. +// The first byte of the new free block is pPage->aData[iStart] +// and the size of the block is iSize bytes. +// +// Adjacent freeblocks are coalesced. +// +// Even though the freeblock list was checked by btreeComputeFreeSpace(), +// that routine will not detect overlap between cells or freeblocks. Nor +// does it detect cells or freeblocks that encrouch into the reserved bytes +// at the end of the page. So do additional corruption checks inside this +// routine and return SQLITE_CORRUPT if any problems are found. +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ + var iPtr U16 // Address of ptr to next freeblock + var iFreeBlk U16 // Address of the next freeblock + var hdr U8 // Page header size. 0 or 100 + var nFrag U8 = U8(0) // Reduction in fragmentation + var iOrigSize U16 = iSize // Original value of iSize + var x U16 // Offset to cell content area + var iEnd U32 = U32(int32(iStart) + int32(iSize)) // First byte past the iStart buffer + var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData // Page content + + // Minimum cell size is 4 + + // The list of freeblocks must be in ascending order. Find the + // spot on the list where iStart should be inserted. + hdr = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset + iPtr = U16(int32(hdr) + 1) + if int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+1)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr)))) == 0 { + iFreeBlk = U16(0) // Shortcut for the case when the freelist is empty + } else { + for int32(libc.AssignUint16(&iFreeBlk, U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr))))<<8|int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)))))) < int32(iStart) { + if int32(iFreeBlk) < int32(iPtr)+4 { + if int32(iFreeBlk) == 0 { + break + } // TH3: corrupt082.100 + return Xsqlite3CorruptError(tls, 67923) + } + iPtr = iFreeBlk + } + if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 + return Xsqlite3CorruptError(tls, 67928) + } + + // At this point: + // iFreeBlk: First freeblock after iStart, or zero if none + // iPtr: The address of a pointer to iFreeBlk + // + // Check to see if iFreeBlk should be coalesced onto the end of iStart. + if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { + nFrag = U8(U32(iFreeBlk) - iEnd) + if iEnd > U32(iFreeBlk) { + return Xsqlite3CorruptError(tls, 67940) + } + iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) + if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { + return Xsqlite3CorruptError(tls, 67943) + } + iSize = U16(iEnd - U32(iStart)) + iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) + } + + // If iPtr is another freeblock (that is, if iPtr is not the freelist + // pointer in the page header) then check to see if iStart should be + // coalesced onto the end of iPtr. + if int32(iPtr) > int32(hdr)+1 { + var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) + if iPtrEnd+3 >= int32(iStart) { + if iPtrEnd > int32(iStart) { + return Xsqlite3CorruptError(tls, 67956) + } + nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) + iSize = U16(iEnd - U32(iPtr)) + iStart = iPtr + } + } + if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { + return Xsqlite3CorruptError(tls, 67962) + } + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) + } + x = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)))) + if int32(iStart) <= int32(x) { + // The new freeblock is at the beginning of the cell content area, + // so just extend the cell content area rather than create another + // freelist entry + if int32(iStart) < int32(x) { + return Xsqlite3CorruptError(tls, 67970) + } + if int32(iPtr) != int32(hdr)+1 { + return Xsqlite3CorruptError(tls, 67971) + } + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))) = U8(iEnd >> 8) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)) = U8(iEnd) + } else { + // Insert the new freeblock into the freelist + *(*uint8)(unsafe.Pointer(data + uintptr(iPtr))) = U8(int32(iStart) >> 8) + *(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)) = U8(iStart) + } + if int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FbtsFlags)&BTS_FAST_SECURE != 0 { + // Overwrite deleted information with zeros when the secure_delete + // option is enabled + libc.Xmemset(tls, data+uintptr(iStart), 0, uint64(iSize)) + } + *(*uint8)(unsafe.Pointer(data + uintptr(iStart))) = U8(int32(iFreeBlk) >> 8) + *(*uint8)(unsafe.Pointer(data + uintptr(iStart) + 1)) = U8(iFreeBlk) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(iStart)+2))) = U8(int32(iSize) >> 8) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(iStart)+2) + 1)) = U8(iSize) + *(*int32)(unsafe.Pointer(pPage + 20)) += int32(iOrigSize) + return SQLITE_OK +} + +// Decode the flags byte (the first byte of the header) for a page +// and initialize fields of the MemPage structure accordingly. +// +// Only the following combinations are supported. Anything different +// indicates a corrupt database files: +// +// PTF_ZERODATA +// PTF_ZERODATA | PTF_LEAF +// PTF_LEAFDATA | PTF_INTKEY +// PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ + var pBt uintptr // A copy of pPage->pBt + + (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) + flagByte = flagByte & libc.CplInt32(PTF_LEAF) + (*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize = U8(4 - 4*int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf)) + (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) U16 + }{cellSizePtr})) + pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt + if flagByte == PTF_LEAFDATA|PTF_INTKEY { + // EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an + // interior table b-tree page. + + // EVIDENCE-OF: R-26900-09176 A value of 13 (0x0d) means the page is a + // leaf table b-tree page. + + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(1) + if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { + (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(1) + (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{btreeParseCellPtr})) + } else { + (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) U16 + }{cellSizePtrNoPayload})) + (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{btreeParseCellPtrNoPayload})) + } + (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLeaf + (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLeaf + } else if flagByte == PTF_ZERODATA { + // EVIDENCE-OF: R-43316-37308 A value of 2 (0x02) means the page is an + // interior index b-tree page. + + // EVIDENCE-OF: R-59615-42828 A value of 10 (0x0a) means the page is a + // leaf index b-tree page. + + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{btreeParseCellPtrIndex})) + (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLocal + (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLocal + } else { + // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is + // an error. + return Xsqlite3CorruptError(tls, 68044) + } + (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload + return SQLITE_OK +} + +// Compute the amount of freespace on the page. In other words, fill +// in the pPage->nFree field. +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ + var pc int32 // Address of a freeblock within pPage->aData[] + var hdr U8 // Offset to beginning of page header + var data uintptr // Equal to pPage->aData + var usableSize int32 // Amount of usable space on each page + var nFree int32 // Number of unused bytes on the page + var top int32 // First byte of the cell content area + var iCellFirst int32 // First allowable cell or freeblock offset + var iCellLast int32 // Last possible cell or freeblock offset + + usableSize = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) + hdr = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset + data = (*MemPage)(unsafe.Pointer(pPage)).FaData + // EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates + // the start of the cell content area. A zero value for this integer is + // interpreted as 65536. + top = (int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)))-1)&0xffff + 1 + iCellFirst = int32(hdr) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + 2*int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) + iCellLast = usableSize - 4 + + // Compute the total free space on the page + // EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the + // start of the first freeblock on the page, or is zero if there are no + // freeblocks. + pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1))) + nFree = int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) + top // Init nFree to non-freeblock free space + if pc > 0 { + var next U32 + var size U32 + if pc < top { + // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will + // always be at least one cell before the first freeblock. + return Xsqlite3CorruptError(tls, 68095) + } + for 1 != 0 { + if pc > iCellLast { + // Freeblock off the end of the page + return Xsqlite3CorruptError(tls, 68100) + } + next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) + size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) + nFree = int32(U32(nFree) + size) + if next <= U32(pc)+size+U32(3) { + break + } + pc = int32(next) + } + if next > U32(0) { + // Freeblock not in ascending order + return Xsqlite3CorruptError(tls, 68110) + } + if U32(pc)+size > uint32(usableSize) { + // Last freeblock extends past page end + return Xsqlite3CorruptError(tls, 68114) + } + } + + // At this point, nFree contains the sum of the offset to the start + // of the cell-content area plus the number of free bytes within + // the cell-content area. If this is greater than the usable-size + // of the page, then the page must be corrupted. This check also + // serves to verify that the offset to the start of the cell-content + // area, according to the page header, lies within the page. + if nFree > usableSize || nFree < iCellFirst { + return Xsqlite3CorruptError(tls, 68126) + } + (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) + return SQLITE_OK +} + +// Do additional sanity check after btreeInitPage() if +// PRAGMA cell_size_check=ON +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ + var iCellFirst int32 // First allowable cell or freeblock offset + var iCellLast int32 // Last possible cell or freeblock offset + var i int32 // Index into the cell pointer array + var sz int32 // Size of a cell + var pc int32 // Address of a freeblock within pPage->aData[] + var data uintptr // Equal to pPage->aData + var usableSize int32 // Maximum usable space on the page + var cellOffset int32 // Start of cell content area + + iCellFirst = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) + 2*int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) + usableSize = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) + iCellLast = usableSize - 4 + data = (*MemPage)(unsafe.Pointer(pPage)).FaData + cellOffset = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + iCellLast-- + } + for i = 0; i < int32((*MemPage)(unsafe.Pointer(pPage)).FnCell); i++ { + pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) + + if pc < iCellFirst || pc > iCellLast { + return Xsqlite3CorruptError(tls, 68157) + } + sz = int32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) + + if pc+sz > usableSize { + return Xsqlite3CorruptError(tls, 68162) + } + } + return SQLITE_OK +} + +// Initialize the auxiliary information for a disk block. +// +// Return SQLITE_OK on success. If we see that the page does +// not contain a well-formed database page, then return +// SQLITE_CORRUPT. Note that a return of SQLITE_OK does not +// guarantee that the page is well-formed. It only shows that +// we failed to detect any corruption. +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ + var data uintptr // Equal to pPage->aData + var pBt uintptr // The main btree structure + + pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt + data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating + // the b-tree page type. + if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { + return Xsqlite3CorruptError(tls, 68194) + } + + (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) + (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) + (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the + // number of cells on the page. + (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) + if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { + // To many cells for a single page. The page must be corrupt + return Xsqlite3CorruptError(tls, 68208) + } + + // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only + // possible for a root page of a table that contains no rows) then the + // offset to the cell content area will equal the page size minus the + // bytes of reserved space. + + (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 // Indicate that this value is yet uncomputed + (*MemPage)(unsafe.Pointer(pPage)).FisInit = U8(1) + if (*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags&uint64(SQLITE_CellSizeCk) != 0 { + return btreeCellSizeCheck(tls, pPage) + } + return SQLITE_OK +} + +// Set up a raw page so that it looks like a database page holding +// no entries. +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ + var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData + var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt + var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset + var first U16 + + if int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_FAST_SECURE != 0 { + libc.Xmemset(tls, data+uintptr(hdr), 0, uint64((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(hdr))) + } + *(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = uint8(uint8(flags)) + first = U16(int32(hdr) + func() int32 { + if flags&PTF_LEAF == 0 { + return 12 + } + return 8 + }()) + libc.Xmemset(tls, data+uintptr(int32(hdr)+1), 0, uint64(4)) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) = uint8(0) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))) = U8((*BtShared)(unsafe.Pointer(pBt)).FusableSize >> 8) + *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)) = U8((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) + decodeFlags(tls, pPage, flags) + (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) + (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) + (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) + + (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) + (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(0) + (*MemPage)(unsafe.Pointer(pPage)).FisInit = U8(1) +} + +// Convert a DbPage obtained from the pager into a MemPage used by +// the btree layer. +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ + var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) + if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { + (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) + (*MemPage)(unsafe.Pointer(pPage)).FpDbPage = pDbPage + (*MemPage)(unsafe.Pointer(pPage)).FpBt = pBt + (*MemPage)(unsafe.Pointer(pPage)).Fpgno = pgno + (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset = func() uint8 { + if pgno == Pgno(1) { + return uint8(100) + } + return uint8(0) + }() + } + + return pPage +} + +// Get a page from the pager. Initialize the MemPage.pBt and +// MemPage.aData elements if needed. See also: btreeGetUnusedPage(). +// +// If the PAGER_GET_NOCONTENT flag is set, it means that we do not care +// about the content of the page at this time. So do not go to the disk +// to fetch the content. Just fill in the content with zeros for now. +// If in the future we call sqlite3PagerWrite() on this page, that +// means we have started to be concerned about content and the disk +// read should occur at that point. +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + // var pDbPage uintptr at bp, 8 + + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, flags) + if rc != 0 { + return rc + } + *(*uintptr)(unsafe.Pointer(ppPage)) = btreePageFromDbPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)), pgno, pBt) + return SQLITE_OK +} + +// Retrieve a page from the pager cache. If the requested page is not +// already in the pager cache return NULL. Initialize the MemPage.pBt and +// MemPage.aData elements if needed. +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ + var pDbPage uintptr + + pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) + if pDbPage != 0 { + return btreePageFromDbPage(tls, pDbPage, pgno, pBt) + } + return uintptr(0) +} + +// Return the size of the database file in pages. If there is any kind of +// error, return ((unsigned int)-1). +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ + return (*BtShared)(unsafe.Pointer(pBt)).FnPage +} + +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ + + return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) +} + +// Get a page from the pager and initialize it. +// +// If pCur!=0 then the page is being fetched as part of a moveToChild() +// call. Do additional sanity checking on the page in this case. +// And if the fetch fails, this routine must decrement pCur->iPage. +// +// The page is fetched as read-write unless pCur is not NULL and is +// a read-only cursor. +// +// If an error occurs, then *ppPage is undefined. It +// may remain unchanged, or it may be set to an invalid value. +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + // var pDbPage uintptr at bp, 8 + + if !(pgno > btreePagecount(tls, pBt)) { + goto __1 + } + rc = Xsqlite3CorruptError(tls, 68363) + goto getAndInitPage_error1 +__1: + ; + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, bReadOnly) + if !(rc != 0) { + goto __2 + } + goto getAndInitPage_error1 +__2: + ; + *(*uintptr)(unsafe.Pointer(ppPage)) = Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) + if !(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit) == 0) { + goto __3 + } + btreePageFromDbPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)), pgno, pBt) + rc = btreeInitPage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) + if !(rc != SQLITE_OK) { + goto __4 + } + goto getAndInitPage_error2 +__4: + ; +__3: + ; + + // If obtaining a child page for a cursor, we must verify that the page is + // compatible with the root page. + if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { + goto __5 + } + rc = Xsqlite3CorruptError(tls, 68384) + goto getAndInitPage_error2 +__5: + ; + return SQLITE_OK + +getAndInitPage_error2: + releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) +getAndInitPage_error1: + if !(pCur != 0) { + goto __6 + } + (*BtCursor)(unsafe.Pointer(pCur)).FiPage-- + (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) +__6: + ; + + return rc +} + +// Release a MemPage. This should be called once for each prior +// call to btreeGetPage. +// +// Page1 is a special case and must be released using releasePageOne(). +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ + + Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) +} + +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ + if pPage != 0 { + releasePageNotNull(tls, pPage) + } +} + +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ + + Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) +} + +// Get an unused page. +// +// This works just like btreeGetPage() with the addition: +// +// * If the page is already in use for some other purpose, immediately +// release it and return an SQLITE_CURRUPT error. +// * Make sure the isInit flag is clear +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ + var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) + if rc == SQLITE_OK { + if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { + releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) + return Xsqlite3CorruptError(tls, 68450) + } + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) + } else { + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) + } + return rc +} + +// During a rollback, when the pager reloads information into the cache +// so that the cache is restored to its original state at the start of +// the transaction, for each page restored this routine is called. +// +// This routine needs to reset the extra data section at the end of the +// page to agree with the restored data. +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ + var pPage uintptr + pPage = Xsqlite3PagerGetExtra(tls, pData) + + if (*MemPage)(unsafe.Pointer(pPage)).FisInit != 0 { + + (*MemPage)(unsafe.Pointer(pPage)).FisInit = U8(0) + if Xsqlite3PagerPageRefcount(tls, pData) > 1 { + // pPage might not be a btree page; it might be an overflow page + // or ptrmap page or a free page. In those cases, the following + // call to btreeInitPage() will likely return SQLITE_CORRUPT. + // But no harm is done by this. And it is very important that + // btreeInitPage() be called on every btree page so we make + // the call for every page that comes in for re-initing. + btreeInitPage(tls, pPage) + } + } +} + +// Invoke the busy handler for a btree. +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ + var pBt uintptr = pArg + + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) +} + +// Open a database file. +// +// zFilename is the name of the database file. If zFilename is NULL +// then an ephemeral database is created. The ephemeral database might +// be exclusively in memory, or it might use a disk-based memory cache. +// Either way, the ephemeral database will be automatically deleted +// when sqlite3BtreeClose() is called. +// +// If zFilename is ":memory:" then an in-memory database is created +// that is automatically destroyed when it is closed. +// +// The "flags" parameter is a bitmask that might contain bits like +// BTREE_OMIT_JOURNAL and/or BTREE_MEMORY. +// +// If the database is already opened in the same database connection +// and we are in shared cache mode, then the open will fail with an +// SQLITE_CONSTRAINT error. We cannot allow two or more BtShared +// objects in the same database connection since doing so will lead +// to problems with locking. +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ + bp := tls.Alloc(100) + defer tls.Free(100) + + var pBt uintptr // Shared part of btree structure + var p uintptr // Handle to return + var mutexOpen uintptr // Prevents a race condition. Ticket #3537 + var rc int32 // Result code from this function + var nReserve U8 // Byte of unused space on each page + // var zDbHeader [100]uint8 at bp, 100 + // Database header content + + // True if opening an ephemeral, temporary database + var isTempDb int32 + + // Set the variable isMemdb to true for an in-memory database, or + // false for a file-based database. + var isMemdb int32 + var pExisting uintptr + var iDb int32 + var nFilename int32 + var nFullPathname int32 + var zFullPathname uintptr + var mutexShared uintptr + var mutexShared1 uintptr + var i int32 + var pSib uintptr + var pFile uintptr + pBt = uintptr(0) + mutexOpen = uintptr(0) + rc = SQLITE_OK + isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*uint8)(unsafe.Pointer(zFilename))) == 0) + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+3991) == 0 || + isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || + vfsFlags&SQLITE_OPEN_MEMORY != 0) + + // flags fit in 8 bits + + // Only a BTREE_SINGLE database can be BTREE_UNORDERED + + // A BTREE_SINGLE database is always a temporary and/or ephemeral + + if !(isMemdb != 0) { + goto __1 + } + flags = flags | BTREE_MEMORY +__1: + ; + if !(vfsFlags&SQLITE_OPEN_MAIN_DB != 0 && (isMemdb != 0 || isTempDb != 0)) { + goto __2 + } + vfsFlags = vfsFlags&libc.CplInt32(SQLITE_OPEN_MAIN_DB) | SQLITE_OPEN_TEMP_DB +__2: + ; + p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Btree{}))) + if !!(p != 0) { + goto __3 + } + return SQLITE_NOMEM +__3: + ; + (*Btree)(unsafe.Pointer(p)).FinTrans = U8(TRANS_NONE) + (*Btree)(unsafe.Pointer(p)).Fdb = db + (*Btree)(unsafe.Pointer(p)).Flock.FpBtree = p + (*Btree)(unsafe.Pointer(p)).Flock.FiTable = Pgno(1) + + // If this Btree is a candidate for shared cache, try to find an + // existing BtShared object that we can share with + if !(isTempDb == 0 && (isMemdb == 0 || vfsFlags&SQLITE_OPEN_URI != 0)) { + goto __4 + } + if !(vfsFlags&SQLITE_OPEN_SHAREDCACHE != 0) { + goto __5 + } + nFilename = Xsqlite3Strlen30(tls, zFilename) + 1 + nFullPathname = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + 1 + zFullPathname = Xsqlite3Malloc(tls, func() uint64 { + if nFullPathname > nFilename { + return uint64(nFullPathname) + } + return uint64(nFilename) + }()) + + (*Btree)(unsafe.Pointer(p)).Fsharable = U8(1) + if !!(zFullPathname != 0) { + goto __6 + } + Xsqlite3_free(tls, p) + return SQLITE_NOMEM +__6: + ; + if !(isMemdb != 0) { + goto __7 + } + libc.Xmemcpy(tls, zFullPathname, zFilename, uint64(nFilename)) + goto __8 +__7: + rc = Xsqlite3OsFullPathname(tls, pVfs, zFilename, + nFullPathname, zFullPathname) + if !(rc != 0) { + goto __9 + } + if !(rc == SQLITE_OK|int32(2)<<8) { + goto __10 + } + rc = SQLITE_OK + goto __11 +__10: + Xsqlite3_free(tls, zFullPathname) + Xsqlite3_free(tls, p) + return rc +__11: + ; +__9: + ; +__8: + ; + mutexOpen = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_OPEN) + Xsqlite3_mutex_enter(tls, mutexOpen) + mutexShared = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + Xsqlite3_mutex_enter(tls, mutexShared) + pBt = sqlite3SharedCacheList +__12: + if !(pBt != 0) { + goto __14 + } + + if !(0 == libc.Xstrcmp(tls, zFullPathname, Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, 0)) && + Xsqlite3PagerVfs(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) == pVfs) { + goto __15 + } + iDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 +__16: + if !(iDb >= 0) { + goto __18 + } + pExisting = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt + if !(pExisting != 0 && (*Btree)(unsafe.Pointer(pExisting)).FpBt == pBt) { + goto __19 + } + Xsqlite3_mutex_leave(tls, mutexShared) + Xsqlite3_mutex_leave(tls, mutexOpen) + Xsqlite3_free(tls, zFullPathname) + Xsqlite3_free(tls, p) + return SQLITE_CONSTRAINT +__19: + ; + goto __17 +__17: + iDb-- + goto __16 + goto __18 +__18: + ; + (*Btree)(unsafe.Pointer(p)).FpBt = pBt + (*BtShared)(unsafe.Pointer(pBt)).FnRef++ + goto __14 +__15: + ; + goto __13 +__13: + pBt = (*BtShared)(unsafe.Pointer(pBt)).FpNext + goto __12 + goto __14 +__14: + ; + Xsqlite3_mutex_leave(tls, mutexShared) + Xsqlite3_free(tls, zFullPathname) +__5: + ; +__4: + ; + if !(pBt == uintptr(0)) { + goto __20 + } + // The following asserts make sure that structures used by the btree are + // the right size. This is to guard against size changes that result + // when compiling on a different architecture. + + pBt = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(BtShared{}))) + if !(pBt == uintptr(0)) { + goto __21 + } + rc = SQLITE_NOMEM + goto btree_open_out +__21: + ; + rc = Xsqlite3PagerOpen(tls, pVfs, pBt, zFilename, + int32(unsafe.Sizeof(MemPage{})), flags, vfsFlags, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{pageReinit}))) + if !(rc == SQLITE_OK) { + goto __22 + } + Xsqlite3PagerSetMmapLimit(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Sqlite3)(unsafe.Pointer(db)).FszMmap) + rc = Xsqlite3PagerReadFileheader(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, int32(unsafe.Sizeof([100]uint8{})), bp) +__22: + ; + if !(rc != SQLITE_OK) { + goto __23 + } + goto btree_open_out +__23: + ; + (*BtShared)(unsafe.Pointer(pBt)).FopenFlags = U8(flags) + (*BtShared)(unsafe.Pointer(pBt)).Fdb = db + Xsqlite3PagerSetBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{btreeInvokeBusyHandler})), pBt) + (*Btree)(unsafe.Pointer(p)).FpBt = pBt + + (*BtShared)(unsafe.Pointer(pBt)).FpCursor = uintptr(0) + (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = uintptr(0) + if !(Xsqlite3PagerIsreadonly(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) != 0) { + goto __24 + } + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_READ_ONLY) +__24: + ; + // EVIDENCE-OF: R-51873-39618 The page size for a database file is + // determined by the 2-byte integer located at an offset of 16 bytes from + // the beginning of the database file. + (*BtShared)(unsafe.Pointer(pBt)).FpageSize = U32(int32(*(*uint8)(unsafe.Pointer(bp + 16)))<<8 | int32(*(*uint8)(unsafe.Pointer(bp + 17)))<<16) + if !((*BtShared)(unsafe.Pointer(pBt)).FpageSize < U32(512) || (*BtShared)(unsafe.Pointer(pBt)).FpageSize > U32(SQLITE_MAX_PAGE_SIZE) || + ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(1))&(*BtShared)(unsafe.Pointer(pBt)).FpageSize != U32(0)) { + goto __25 + } + (*BtShared)(unsafe.Pointer(pBt)).FpageSize = U32(0) + // If the magic name ":memory:" will create an in-memory database, then + // leave the autoVacuum mode at 0 (do not auto-vacuum), even if + // SQLITE_DEFAULT_AUTOVACUUM is true. On the other hand, if + // SQLITE_OMIT_MEMORYDB has been defined, then ":memory:" is just a + // regular file-name. In this case the auto-vacuum applies as per normal. + if !(zFilename != 0 && !(isMemdb != 0)) { + goto __27 + } + (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { + if 0 != 0 { + return uint8(1) + } + return uint8(0) + }() + (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { + if SQLITE_DEFAULT_AUTOVACUUM == 2 { + return uint8(1) + } + return uint8(0) + }() +__27: + ; + nReserve = U8(0) + goto __26 +__25: + // EVIDENCE-OF: R-37497-42412 The size of the reserved region is + // determined by the one-byte unsigned integer found at an offset of 20 + // into the database file header. + nReserve = *(*uint8)(unsafe.Pointer(bp + 20)) + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) + (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { + if Xsqlite3Get4byte(tls, bp+52) != 0 { + return uint8(1) + } + return uint8(0) + }() + (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { + if Xsqlite3Get4byte(tls, bp+64) != 0 { + return uint8(1) + } + return uint8(0) + }() +__26: + ; + rc = Xsqlite3PagerSetPagesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pBt+52, int32(nReserve)) + if !(rc != 0) { + goto __28 + } + goto btree_open_out +__28: + ; + (*BtShared)(unsafe.Pointer(pBt)).FusableSize = (*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(nReserve) + // 8-byte alignment of pageSize + + // Add the new BtShared object to the linked list sharable BtShareds. + (*BtShared)(unsafe.Pointer(pBt)).FnRef = 1 + if !((*Btree)(unsafe.Pointer(p)).Fsharable != 0) { + goto __29 + } + mutexShared1 = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + if !(1 != 0 && Xsqlite3Config.FbCoreMutex != 0) { + goto __30 + } + (*BtShared)(unsafe.Pointer(pBt)).Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_FAST) + if !((*BtShared)(unsafe.Pointer(pBt)).Fmutex == uintptr(0)) { + goto __31 + } + rc = SQLITE_NOMEM + goto btree_open_out +__31: + ; +__30: + ; + Xsqlite3_mutex_enter(tls, mutexShared1) + (*BtShared)(unsafe.Pointer(pBt)).FpNext = sqlite3SharedCacheList + sqlite3SharedCacheList = pBt + Xsqlite3_mutex_leave(tls, mutexShared1) +__29: + ; +__20: + ; + + // If the new Btree uses a sharable pBtShared, then link the new + // Btree into the list of all sharable Btrees for the same connection. + // The list is kept in ascending order by pBt address. + if !((*Btree)(unsafe.Pointer(p)).Fsharable != 0) { + goto __32 + } + i = 0 +__33: + if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __35 + } + if !(libc.AssignUintptr(&pSib, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpBt) != uintptr(0) && (*Btree)(unsafe.Pointer(pSib)).Fsharable != 0) { + goto __36 + } +__37: + if !((*Btree)(unsafe.Pointer(pSib)).FpPrev != 0) { + goto __38 + } + pSib = (*Btree)(unsafe.Pointer(pSib)).FpPrev + goto __37 +__38: + ; + if !(Uptr((*Btree)(unsafe.Pointer(p)).FpBt) < Uptr((*Btree)(unsafe.Pointer(pSib)).FpBt)) { + goto __39 + } + (*Btree)(unsafe.Pointer(p)).FpNext = pSib + (*Btree)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Btree)(unsafe.Pointer(pSib)).FpPrev = p + goto __40 +__39: +__41: + if !((*Btree)(unsafe.Pointer(pSib)).FpNext != 0 && Uptr((*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(pSib)).FpNext)).FpBt) < Uptr((*Btree)(unsafe.Pointer(p)).FpBt)) { + goto __42 + } + pSib = (*Btree)(unsafe.Pointer(pSib)).FpNext + goto __41 +__42: + ; + (*Btree)(unsafe.Pointer(p)).FpNext = (*Btree)(unsafe.Pointer(pSib)).FpNext + (*Btree)(unsafe.Pointer(p)).FpPrev = pSib + if !((*Btree)(unsafe.Pointer(p)).FpNext != 0) { + goto __43 + } + (*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpNext)).FpPrev = p +__43: + ; + (*Btree)(unsafe.Pointer(pSib)).FpNext = p +__40: + ; + goto __35 +__36: + ; + goto __34 +__34: + i++ + goto __33 + goto __35 +__35: + ; +__32: + ; + *(*uintptr)(unsafe.Pointer(ppBtree)) = p + +btree_open_out: + if !(rc != SQLITE_OK) { + goto __44 + } + if !(pBt != 0 && (*BtShared)(unsafe.Pointer(pBt)).FpPager != 0) { + goto __46 + } + Xsqlite3PagerClose(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, uintptr(0)) +__46: + ; + Xsqlite3_free(tls, pBt) + Xsqlite3_free(tls, p) + *(*uintptr)(unsafe.Pointer(ppBtree)) = uintptr(0) + goto __45 +__44: + + // If the B-Tree was successfully opened, set the pager-cache size to the + // default value. Except, when opening on an existing shared pager-cache, + // do not change the pager-cache size. + if !(Xsqlite3BtreeSchema(tls, p, 0, uintptr(0)) == uintptr(0)) { + goto __47 + } + Xsqlite3BtreeSetCacheSize(tls, p, -2000) +__47: + ; + + pFile = Xsqlite3PagerFile(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + if !((*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods != 0) { + goto __48 + } + Xsqlite3OsFileControlHint(tls, pFile, SQLITE_FCNTL_PDB, pBt+8) +__48: + ; +__45: + ; + if !(mutexOpen != 0) { + goto __49 + } + + Xsqlite3_mutex_leave(tls, mutexOpen) +__49: + ; + + return rc +} + +// Decrement the BtShared.nRef counter. When it reaches zero, +// remove the BtShared structure from the sharing list. Return +// true if the BtShared.nRef counter reaches zero and return +// false if it is still positive. +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ + var pMainMtx uintptr + var pList uintptr + var removed int32 = 0 + + pMainMtx = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + Xsqlite3_mutex_enter(tls, pMainMtx) + (*BtShared)(unsafe.Pointer(pBt)).FnRef-- + if (*BtShared)(unsafe.Pointer(pBt)).FnRef <= 0 { + if sqlite3SharedCacheList == pBt { + sqlite3SharedCacheList = (*BtShared)(unsafe.Pointer(pBt)).FpNext + } else { + pList = sqlite3SharedCacheList + for pList != 0 && (*BtShared)(unsafe.Pointer(pList)).FpNext != pBt { + pList = (*BtShared)(unsafe.Pointer(pList)).FpNext + } + if pList != 0 { + (*BtShared)(unsafe.Pointer(pList)).FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpNext + } + } + if 1 != 0 { + Xsqlite3_mutex_free(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) + } + removed = 1 + } + Xsqlite3_mutex_leave(tls, pMainMtx) + return removed +} + +// Make sure pBt->pTmpSpace points to an allocation of +// MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child +// pointer. +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ + + // This routine is called only by btreeCursor() when allocating the + // first write cursor for the BtShared object + + (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) + if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace == uintptr(0) { + var pCur uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpCursor + (*BtShared)(unsafe.Pointer(pBt)).FpCursor = (*BtCursor)(unsafe.Pointer(pCur)).FpNext // Unlink the cursor + libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(BtCursor{}))) + return SQLITE_NOMEM + } + + // One of the uses of pBt->pTmpSpace is to format cells before + // inserting them into a leaf page (function fillInCell()). If + // a cell is less than 4 bytes in size, it is rounded up to 4 bytes + // by the various routines that manipulate binary cells. Which + // can mean that fillInCell() only initializes the first 2 or 3 + // bytes of pTmpSpace, but that the first 4 bytes are copied from + // it into a database page. This is not actually a problem, but it + // does cause a valgrind error when the 1 or 2 bytes of unitialized + // data is passed to system call write(). So to avoid this error, + // zero the first 4 bytes of temp space here. + // + // Also: Provide four bytes of initialized space before the + // beginning of pTmpSpace as an area available to prepend the + // left-child pointer to the beginning of a cell. + libc.Xmemset(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace, 0, uint64(8)) + *(*uintptr)(unsafe.Pointer(pBt + 136)) += uintptr(4) + return SQLITE_OK +} + +// Free the pBt->pTmpSpace allocation +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ + if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { + *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) + Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) + (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace = uintptr(0) + } +} + +// Close an open database and invalidate all cursors. +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + // Close all cursors opened via this handle. + + Xsqlite3BtreeEnter(tls, p) + + // Verify that no other cursors have this Btree open + + // Rollback any active transaction and free the handle structure. + // The call to sqlite3BtreeRollback() drops any table-locks held by + // this handle. + Xsqlite3BtreeRollback(tls, p, SQLITE_OK, 0) + Xsqlite3BtreeLeave(tls, p) + + // If there are still other outstanding references to the shared-btree + // structure, return now. The remainder of this procedure cleans + // up the shared-btree. + + if !(int32((*Btree)(unsafe.Pointer(p)).Fsharable) != 0) || removeFromSharingList(tls, pBt) != 0 { + // The pBt is no longer on the sharing list, so we can access + // it without having to hold the mutex. + // + // Clean out and delete the BtShared object. + + Xsqlite3PagerClose(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Btree)(unsafe.Pointer(p)).Fdb) + if (*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema != 0 && (*BtShared)(unsafe.Pointer(pBt)).FpSchema != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema})).f(tls, (*BtShared)(unsafe.Pointer(pBt)).FpSchema) + } + Xsqlite3DbFree(tls, uintptr(0), (*BtShared)(unsafe.Pointer(pBt)).FpSchema) + freeTempSpace(tls, pBt) + Xsqlite3_free(tls, pBt) + } + + if (*Btree)(unsafe.Pointer(p)).FpPrev != 0 { + (*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpPrev)).FpNext = (*Btree)(unsafe.Pointer(p)).FpNext + } + if (*Btree)(unsafe.Pointer(p)).FpNext != 0 { + (*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpNext)).FpPrev = (*Btree)(unsafe.Pointer(p)).FpPrev + } + + Xsqlite3_free(tls, p) + return SQLITE_OK +} + +// Change the "soft" limit on the number of pages in the cache. +// Unused and unmodified pages will be recycled when the number of +// pages in the cache exceeds this soft limit. But the size of the +// cache is allowed to grow larger than this limit if it contains +// dirty pages or pages still in active use. +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3BtreeEnter(tls, p) + Xsqlite3PagerSetCachesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, mxPage) + Xsqlite3BtreeLeave(tls, p) + return SQLITE_OK +} + +// Change the "spill" limit on the number of pages in the cache. +// If the number of pages exceeds this limit during a write transaction, +// the pager might attempt to "spill" pages to the journal early in +// order to free up memory. +// +// The value returned is the current spill size. If zero is passed +// as an argument, no changes are made to the spill size setting, so +// using mxPage of 0 is a way to query the current spill size. +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + var res int32 + + Xsqlite3BtreeEnter(tls, p) + res = Xsqlite3PagerSetSpillsize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, mxPage) + Xsqlite3BtreeLeave(tls, p) + return res +} + +// Change the limit on the amount of the database file that may be +// memory mapped. +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3BtreeEnter(tls, p) + Xsqlite3PagerSetMmapLimit(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, szMmap) + Xsqlite3BtreeLeave(tls, p) + return SQLITE_OK +} + +// Change the way data is synced to disk in order to increase or decrease +// how well the database resists damage due to OS crashes and power +// failures. Level 1 is the same as asynchronous (no syncs() occur and +// there is a high probability of damage) Level 2 is the default. There +// is a very low but non-zero probability of damage. Level 3 reduces the +// probability of damage to near zero but with a write performance reduction. +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3BtreeEnter(tls, p) + Xsqlite3PagerSetFlags(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgFlags) + Xsqlite3BtreeLeave(tls, p) + return SQLITE_OK +} + +// Change the default pages size and the number of reserved bytes per page. +// Or, if the page size has already been fixed, return SQLITE_READONLY +// without changing anything. +// +// The page size must be a power of 2 between 512 and 65536. If the page +// size supplied does not meet this constraint then the page size is not +// changed. +// +// Page sizes are constrained to be a power of two so that the region +// of the database file used for locking (beginning at PENDING_BYTE, +// the first byte past the 1GB boundary, 0x40000000) needs to occur +// at the beginning of a page. +// +// If parameter nReserve is less than zero, then the number of reserved +// bytes per page is left unchanged. +// +// If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size +// and autovacuum mode can no longer be changed. +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ + var rc int32 = SQLITE_OK + var x int32 + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3BtreeEnter(tls, p) + (*BtShared)(unsafe.Pointer(pBt)).FnReserveWanted = U8(nReserve) + x = int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize - (*BtShared)(unsafe.Pointer(pBt)).FusableSize) + if nReserve < x { + nReserve = x + } + if int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_PAGESIZE_FIXED != 0 { + Xsqlite3BtreeLeave(tls, p) + return SQLITE_READONLY + } + + if pageSize >= 512 && pageSize <= SQLITE_MAX_PAGE_SIZE && (pageSize-1)&pageSize == 0 { + + if nReserve > 32 && pageSize == 512 { + pageSize = 1024 + } + (*BtShared)(unsafe.Pointer(pBt)).FpageSize = U32(pageSize) + freeTempSpace(tls, pBt) + } + rc = Xsqlite3PagerSetPagesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pBt+52, nReserve) + (*BtShared)(unsafe.Pointer(pBt)).FusableSize = (*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(U16(nReserve)) + if iFix != 0 { + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) + } + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Return the currently defined page size +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ + return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) +} + +// This function is similar to sqlite3BtreeGetReserve(), except that it +// may only be called if it is guaranteed that the b-tree mutex is already +// held. +// +// This is useful in one special case in the backup API code where it is +// known that the shared b-tree mutex is held, but the mutex on the +// database handle that owns *p is not. In this case if sqlite3BtreeEnter() +// were to be called, it might collide with some other operation on the +// database handle that owns *p, causing undefined behavior. +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ + var n int32 + + n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) + return n +} + +// Return the number of bytes of space at the end of every page that +// are intentually left unused. This is the "reserved" space that is +// sometimes used by extensions. +// +// The value returned is the larger of the current reserve size and +// the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. +// The amount of reserve can only grow - never shrink. +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ + var n1 int32 + var n2 int32 + Xsqlite3BtreeEnter(tls, p) + n1 = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnReserveWanted) + n2 = Xsqlite3BtreeGetReserveNoMutex(tls, p) + Xsqlite3BtreeLeave(tls, p) + if n1 > n2 { + return n1 + } + return n2 +} + +// Set the maximum page count for a database if mxPage is positive. +// No changes are made if mxPage is 0 or negative. +// Regardless of the value of mxPage, return the maximum page count. +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ + var n Pgno + Xsqlite3BtreeEnter(tls, p) + n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) + Xsqlite3BtreeLeave(tls, p) + return n +} + +// Change the values for the BTS_SECURE_DELETE and BTS_OVERWRITE flags: +// +// newFlag==0 Both BTS_SECURE_DELETE and BTS_OVERWRITE are cleared +// newFlag==1 BTS_SECURE_DELETE set and BTS_OVERWRITE is cleared +// newFlag==2 BTS_SECURE_DELETE cleared and BTS_OVERWRITE is set +// newFlag==(-1) No changes +// +// This routine acts as a query if newFlag is less than zero +// +// With BTS_OVERWRITE set, deleted content is overwritten by zeros, but +// freelist leaf pages are not written back to the database. Thus in-page +// deleted content is cleared, but freelist deleted content is not. +// +// With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition +// that freelist leaf pages are written back into the database, increasing +// the amount of disk I/O. +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ + var b int32 + if p == uintptr(0) { + return 0 + } + Xsqlite3BtreeEnter(tls, p) + + if newFlag >= 0 { + *(*U16)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_FAST_SECURE)) + *(*U16)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt + 40)) |= U16(BTS_SECURE_DELETE * newFlag) + } + b = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags) & BTS_FAST_SECURE / BTS_SECURE_DELETE + Xsqlite3BtreeLeave(tls, p) + return b +} + +// Change the 'auto-vacuum' property of the database. If the 'autoVacuum' +// parameter is non-zero, then auto-vacuum mode is enabled. If zero, it +// is disabled. The default value for the auto-vacuum property is +// determined by the SQLITE_DEFAULT_AUTOVACUUM macro. +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + var rc int32 = SQLITE_OK + var av U8 = U8(autoVacuum) + + Xsqlite3BtreeEnter(tls, p) + if int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_PAGESIZE_FIXED != 0 && func() int32 { + if av != 0 { + return 1 + } + return 0 + }() != int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) { + rc = SQLITE_READONLY + } else { + (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { + if av != 0 { + return uint8(1) + } + return uint8(0) + }() + (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { + if int32(av) == 2 { + return uint8(1) + } + return uint8(0) + }() + } + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Return the value of the 'auto-vacuum' property. If auto-vacuum is +// enabled 1 is returned. Otherwise 0. +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ + var rc int32 + Xsqlite3BtreeEnter(tls, p) + rc = func() int32 { + if !(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FautoVacuum) != 0) { + return BTREE_AUTOVACUUM_NONE + } + return func() int32 { + if !(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FincrVacuum) != 0) { + return BTREE_AUTOVACUUM_FULL + } + return BTREE_AUTOVACUUM_INCR + }() + }() + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Get a reference to pPage1 of the database file. This will +// also acquire a readlock on that file. +// +// SQLITE_OK is returned on success. If the file is not a +// well-formed database file, then SQLITE_CORRUPT is returned. +// SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM +// is returned if we run out of memory. +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 // Result code from subfunctions + // var pPage1 uintptr at bp, 8 + // Page 1 of the database file + var nPage U32 // Number of pages in the database + // var nPageFile U32 at bp+8, 4 + + // var isOpen int32 at bp+12, 4 + + var pageSize U32 + var usableSize U32 + var page1 uintptr + *(*U32)(unsafe.Pointer(bp + 8 /* nPageFile */)) = U32(0) // Number of pages in the database file + + rc = Xsqlite3PagerSharedLock(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + if !(rc != SQLITE_OK) { + goto __1 + } + return rc +__1: + ; + rc = btreeGetPage(tls, pBt, uint32(1), bp, 0) + if !(rc != SQLITE_OK) { + goto __2 + } + return rc +__2: + ; + + // Do some checking to help insure the file we opened really is + // a valid database file. + nPage = Xsqlite3Get4byte(tls, uintptr(28)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) + Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+8) + if !(nPage == U32(0) || libc.Xmemcmp(tls, uintptr(24)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData, uintptr(92)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData, uint64(4)) != 0) { + goto __3 + } + nPage = *(*U32)(unsafe.Pointer(bp + 8 /* nPageFile */)) +__3: + ; + if !((*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags&uint64(SQLITE_ResetDatabase) != uint64(0)) { + goto __4 + } + nPage = U32(0) +__4: + ; + if !(nPage > U32(0)) { + goto __5 + } + page1 = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage1 */)))).FaData + rc = SQLITE_NOTADB + // EVIDENCE-OF: R-43737-39999 Every valid SQLite database file begins + // with the following 16 bytes (in hex): 53 51 4c 69 74 65 20 66 6f 72 6d + // 61 74 20 33 00. + if !(libc.Xmemcmp(tls, page1, uintptr(unsafe.Pointer(&zMagicHeader)), uint64(16)) != 0) { + goto __6 + } + goto page1_init_failed +__6: + ; + + if !(int32(*(*U8)(unsafe.Pointer(page1 + 18))) > 2) { + goto __7 + } + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_READ_ONLY) +__7: + ; + if !(int32(*(*U8)(unsafe.Pointer(page1 + 19))) > 2) { + goto __8 + } + goto page1_init_failed +__8: + ; + + // If the read version is set to 2, this database should be accessed + // in WAL mode. If the log is not already open, open it now. Then + // return SQLITE_OK and return without populating BtShared.pPage1. + // The caller detects this and calls this function again. This is + // required as the version of page 1 currently in the page1 buffer + // may not be the latest version - there may be a newer one in the log + // file. + if !(int32(*(*U8)(unsafe.Pointer(page1 + 19))) == 2 && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_NO_WAL == 0) { + goto __9 + } + *(*int32)(unsafe.Pointer(bp + 12 /* isOpen */)) = 0 + rc = Xsqlite3PagerOpenWal(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+12) + if !(rc != SQLITE_OK) { + goto __11 + } + goto page1_init_failed + goto __12 +__11: + ; + if !(*(*int32)(unsafe.Pointer(bp + 12)) == 0) { + goto __13 + } + releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) + return SQLITE_OK +__13: + ; +__12: + ; + rc = SQLITE_NOTADB + goto __10 +__9: + ; +__10: + ; + + // EVIDENCE-OF: R-15465-20813 The maximum and minimum embedded payload + // fractions and the leaf payload fraction values must be 64, 32, and 32. + // + // The original design allowed these amounts to vary, but as of + // version 3.6.0, we require them to be fixed. + if !(libc.Xmemcmp(tls, page1+21, ts+4000, uint64(3)) != 0) { + goto __14 + } + goto page1_init_failed +__14: + ; + // EVIDENCE-OF: R-51873-39618 The page size for a database file is + // determined by the 2-byte integer located at an offset of 16 bytes from + // the beginning of the database file. + pageSize = U32(int32(*(*U8)(unsafe.Pointer(page1 + 16)))<<8 | int32(*(*U8)(unsafe.Pointer(page1 + 17)))<<16) + // EVIDENCE-OF: R-25008-21688 The size of a page is a power of two + // between 512 and 65536 inclusive. + if !((pageSize-U32(1))&pageSize != U32(0) || + pageSize > U32(SQLITE_MAX_PAGE_SIZE) || + pageSize <= U32(256)) { + goto __15 + } + goto page1_init_failed +__15: + ; + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) + + // EVIDENCE-OF: R-59310-51205 The "reserved space" size in the 1-byte + // integer at offset 20 is the number of bytes of space at the end of + // each page to reserve for extensions. + // + // EVIDENCE-OF: R-37497-42412 The size of the reserved region is + // determined by the one-byte unsigned integer found at an offset of 20 + // into the database file header. + usableSize = pageSize - U32(*(*U8)(unsafe.Pointer(page1 + 20))) + if !(pageSize != (*BtShared)(unsafe.Pointer(pBt)).FpageSize) { + goto __16 + } + // After reading the first page of the database assuming a page size + // of BtShared.pageSize, we have discovered that the page-size is + // actually pageSize. Unlock the database, leave pBt->pPage1 at + // zero and return SQLITE_OK. The caller will call this function + // again with the correct page-size. + releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) + (*BtShared)(unsafe.Pointer(pBt)).FusableSize = usableSize + (*BtShared)(unsafe.Pointer(pBt)).FpageSize = pageSize + freeTempSpace(tls, pBt) + rc = Xsqlite3PagerSetPagesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pBt+52, + int32(pageSize-usableSize)) + return rc +__16: + ; + if !(nPage > *(*U32)(unsafe.Pointer(bp + 8))) { + goto __17 + } + if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { + goto __18 + } + rc = Xsqlite3CorruptError(tls, 69385) + goto page1_init_failed + goto __19 +__18: + nPage = *(*U32)(unsafe.Pointer(bp + 8 /* nPageFile */)) +__19: + ; +__17: + ; + // EVIDENCE-OF: R-28312-64704 However, the usable size is not allowed to + // be less than 480. In other words, if the page size is 512, then the + // reserved space size cannot exceed 32. + if !(usableSize < U32(480)) { + goto __20 + } + goto page1_init_failed +__20: + ; + (*BtShared)(unsafe.Pointer(pBt)).FpageSize = pageSize + (*BtShared)(unsafe.Pointer(pBt)).FusableSize = usableSize + (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { + if Xsqlite3Get4byte(tls, page1+52) != 0 { + return uint8(1) + } + return uint8(0) + }() + (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { + if Xsqlite3Get4byte(tls, page1+64) != 0 { + return uint8(1) + } + return uint8(0) + }() +__5: + ; + + // maxLocal is the maximum amount of payload to store locally for + // a cell. Make sure it is small enough so that at least minFanout + // cells can will fit on one page. We assume a 10-byte page header. + // Besides the payload, the cell must store: + // 2-byte pointer to the cell + // 4-byte child pointer + // 9-byte nKey value + // 4-byte nData value + // 4-byte overflow page pointer + // So a cell consists of a 2-byte pointer, a header which is as much as + // 17 bytes long, 0 to N bytes of payload, and an optional 4 byte overflow + // page pointer. + (*BtShared)(unsafe.Pointer(pBt)).FmaxLocal = U16(((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(12))*U32(64)/U32(255) - U32(23)) + (*BtShared)(unsafe.Pointer(pBt)).FminLocal = U16(((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(12))*U32(32)/U32(255) - U32(23)) + (*BtShared)(unsafe.Pointer(pBt)).FmaxLeaf = U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(35)) + (*BtShared)(unsafe.Pointer(pBt)).FminLeaf = U16(((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(12))*U32(32)/U32(255) - U32(23)) + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FmaxLocal) > 127) { + goto __21 + } + (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload = U8(127) + goto __22 +__21: + (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload = U8((*BtShared)(unsafe.Pointer(pBt)).FmaxLocal) +__22: + ; + + (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = *(*uintptr)(unsafe.Pointer(bp /* pPage1 */)) + (*BtShared)(unsafe.Pointer(pBt)).FnPage = nPage + return SQLITE_OK + +page1_init_failed: + releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) + (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = uintptr(0) + return rc +} + +// If there are no outstanding cursors and we are not in the middle +// of a transaction but there is a read lock on the database, then +// this routine unrefs the first page of the database file which +// has the effect of releasing the read lock. +// +// If there is a transaction in progress, this routine is a no-op. +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ + + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { + var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 + + (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = uintptr(0) + releasePageOne(tls, pPage1) + } +} + +// If pBt points to an empty file then convert that empty file +// into a new empty database by initializing the first page of +// the database. +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ + var pP1 uintptr + var data uintptr + var rc int32 + + if (*BtShared)(unsafe.Pointer(pBt)).FnPage > U32(0) { + return SQLITE_OK + } + pP1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 + + data = (*MemPage)(unsafe.Pointer(pP1)).FaData + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pP1)).FpDbPage) + if rc != 0 { + return rc + } + libc.Xmemcpy(tls, data, uintptr(unsafe.Pointer(&zMagicHeader)), uint64(unsafe.Sizeof(zMagicHeader))) + + *(*uint8)(unsafe.Pointer(data + 16)) = U8((*BtShared)(unsafe.Pointer(pBt)).FpageSize >> 8 & U32(0xff)) + *(*uint8)(unsafe.Pointer(data + 17)) = U8((*BtShared)(unsafe.Pointer(pBt)).FpageSize >> 16 & U32(0xff)) + *(*uint8)(unsafe.Pointer(data + 18)) = uint8(1) + *(*uint8)(unsafe.Pointer(data + 19)) = uint8(1) + + *(*uint8)(unsafe.Pointer(data + 20)) = U8((*BtShared)(unsafe.Pointer(pBt)).FpageSize - (*BtShared)(unsafe.Pointer(pBt)).FusableSize) + *(*uint8)(unsafe.Pointer(data + 21)) = uint8(64) + *(*uint8)(unsafe.Pointer(data + 22)) = uint8(32) + *(*uint8)(unsafe.Pointer(data + 23)) = uint8(32) + libc.Xmemset(tls, data+24, 0, uint64(100-24)) + zeroPage(tls, pP1, PTF_INTKEY|PTF_LEAF|PTF_LEAFDATA) + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) + + Xsqlite3Put4byte(tls, data+52, uint32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum)) + Xsqlite3Put4byte(tls, data+64, uint32((*BtShared)(unsafe.Pointer(pBt)).FincrVacuum)) + (*BtShared)(unsafe.Pointer(pBt)).FnPage = U32(1) + *(*uint8)(unsafe.Pointer(data + 31)) = uint8(1) + return SQLITE_OK +} + +// Initialize the first page of the database file (creating a database +// consisting of a single page and no schema objects). Return SQLITE_OK +// if successful, or an SQLite error code otherwise. +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ + var rc int32 + Xsqlite3BtreeEnter(tls, p) + (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) + rc = newDatabase(tls, (*Btree)(unsafe.Pointer(p)).FpBt) + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Attempt to start a new transaction. A write-transaction +// is started if the second argument is nonzero, otherwise a read- +// transaction. If the second argument is 2 or more and exclusive +// transaction is started, meaning that no other process is allowed +// to access the database. A preexisting transaction may not be +// upgraded to exclusive by calling this routine a second time - the +// exclusivity flag only works for a new transaction. +// +// A write-transaction must be started before attempting any +// changes to the database. None of the following routines +// will work unless a transaction is started first: +// +// sqlite3BtreeCreateTable() +// sqlite3BtreeCreateIndex() +// sqlite3BtreeClearTable() +// sqlite3BtreeDropTable() +// sqlite3BtreeInsert() +// sqlite3BtreeDelete() +// sqlite3BtreeUpdateMeta() +// +// If an initial attempt to acquire the lock fails because of lock contention +// and the database was previously unlocked, then invoke the busy handler +// if there is one. But if there was previously a read-lock, do not +// invoke the busy handler - just return SQLITE_BUSY. SQLITE_BUSY is +// returned when there is already a read-lock in order to avoid a deadlock. +// +// Suppose there are two processes A and B. A has a read lock and B has +// a reserved lock. B tries to promote to exclusive but is blocked because +// of A's read lock. A tries to promote to reserved but is blocked by B. +// One or the other of the two processes must give way or there can be +// no progress. By returning SQLITE_BUSY and not invoking the busy callback +// when A already has a read lock, we encourage A to give up and let B +// proceed. +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ + var pBt uintptr + var pPager uintptr + var rc int32 + var pIter uintptr + var pBlock uintptr + var pPage1 uintptr + pBt = (*Btree)(unsafe.Pointer(p)).FpBt + pPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager + rc = SQLITE_OK + + Xsqlite3BtreeEnter(tls, p) + + // If the btree is already in a write-transaction, or it + // is already in a read-transaction and a read-transaction + // is requested, this is a no-op. + if !(int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE || int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_READ && !(wrflag != 0)) { + goto __1 + } + goto trans_begun +__1: + ; + + if !((*Sqlite3)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).Fdb)).Fflags&uint64(SQLITE_ResetDatabase) != 0 && + int32(Xsqlite3PagerIsreadonly(tls, pPager)) == 0) { + goto __2 + } + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_READ_ONLY)) +__2: + ; + + // Write transactions are not possible on a read-only database + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_READ_ONLY != 0 && wrflag != 0) { + goto __3 + } + rc = SQLITE_READONLY + goto trans_begun +__3: + ; + + pBlock = uintptr(0) + // If another database handle has already opened a write transaction + // on this shared-btree structure and a second write transaction is + // requested, return SQLITE_LOCKED. + if !(wrflag != 0 && int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_WRITE || + int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_PENDING != 0) { + goto __4 + } + pBlock = (*Btree)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpWriter)).Fdb + goto __5 +__4: + if !(wrflag > 1) { + goto __6 + } + pIter = (*BtShared)(unsafe.Pointer(pBt)).FpLock +__7: + if !(pIter != 0) { + goto __9 + } + if !((*BtLock)(unsafe.Pointer(pIter)).FpBtree != p) { + goto __10 + } + pBlock = (*Btree)(unsafe.Pointer((*BtLock)(unsafe.Pointer(pIter)).FpBtree)).Fdb + goto __9 +__10: + ; + goto __8 +__8: + pIter = (*BtLock)(unsafe.Pointer(pIter)).FpNext + goto __7 + goto __9 +__9: + ; +__6: + ; +__5: + ; + if !(pBlock != 0) { + goto __11 + } + Xsqlite3ConnectionBlocked(tls, (*Btree)(unsafe.Pointer(p)).Fdb, pBlock) + rc = SQLITE_LOCKED | int32(1)<<8 + goto trans_begun +__11: + ; + + // Any read-only or read-write transaction implies a read-lock on + // page 1. So if some other shared-cache client already has a write-lock + // on page 1, the transaction cannot be opened. + rc = querySharedCacheTableLock(tls, p, uint32(SCHEMA_ROOT), uint8(READ_LOCK)) + if !(SQLITE_OK != rc) { + goto __12 + } + goto trans_begun +__12: + ; + + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_INITIALLY_EMPTY)) + if !((*BtShared)(unsafe.Pointer(pBt)).FnPage == U32(0)) { + goto __13 + } + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_INITIALLY_EMPTY) +__13: + ; +__14: + ; + + // Call lockBtree() until either pBt->pPage1 is populated or + // lockBtree() returns something other than SQLITE_OK. lockBtree() + // may return SQLITE_OK but leave pBt->pPage1 set to 0 if after + // reading page 1 it discovers that the page-size of the database + // file is not pBt->pageSize. In this case lockBtree() will update + // pBt->pageSize to the page-size of the file on disk. +__17: + if !((*BtShared)(unsafe.Pointer(pBt)).FpPage1 == uintptr(0) && SQLITE_OK == libc.AssignInt32(&rc, lockBtree(tls, pBt))) { + goto __18 + } + goto __17 +__18: + ; + + if !(rc == SQLITE_OK && wrflag != 0) { + goto __19 + } + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_READ_ONLY != 0) { + goto __20 + } + rc = SQLITE_READONLY + goto __21 +__20: + rc = Xsqlite3PagerBegin(tls, pPager, libc.Bool32(wrflag > 1), Xsqlite3TempInMemory(tls, (*Btree)(unsafe.Pointer(p)).Fdb)) + if !(rc == SQLITE_OK) { + goto __22 + } + rc = newDatabase(tls, pBt) + goto __23 +__22: + if !(rc == SQLITE_BUSY|int32(2)<<8 && int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE) { + goto __24 + } + // if there was no transaction opened when this function was + // called and SQLITE_BUSY_SNAPSHOT is returned, change the error + // code to SQLITE_BUSY. + rc = SQLITE_BUSY +__24: + ; +__23: + ; +__21: + ; +__19: + ; + + if !(rc != SQLITE_OK) { + goto __25 + } + + unlockBtreeIfUnused(tls, pBt) +__25: + ; + goto __15 +__15: + if rc&0xFF == SQLITE_BUSY && int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && btreeInvokeBusyHandler(tls, pBt) != 0 { + goto __14 + } + goto __16 +__16: + ; + + if !(rc == SQLITE_OK) { + goto __26 + } + if !(int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE) { + goto __27 + } + (*BtShared)(unsafe.Pointer(pBt)).FnTransaction++ + if !((*Btree)(unsafe.Pointer(p)).Fsharable != 0) { + goto __28 + } + + (*Btree)(unsafe.Pointer(p)).Flock.FeLock = U8(READ_LOCK) + (*Btree)(unsafe.Pointer(p)).Flock.FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpLock + (*BtShared)(unsafe.Pointer(pBt)).FpLock = p + 48 +__28: + ; +__27: + ; + (*Btree)(unsafe.Pointer(p)).FinTrans = func() uint8 { + if wrflag != 0 { + return uint8(TRANS_WRITE) + } + return uint8(TRANS_READ) + }() + if !(int32((*Btree)(unsafe.Pointer(p)).FinTrans) > int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction)) { + goto __29 + } + (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = (*Btree)(unsafe.Pointer(p)).FinTrans +__29: + ; + if !(wrflag != 0) { + goto __30 + } + pPage1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 + + (*BtShared)(unsafe.Pointer(pBt)).FpWriter = p + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_EXCLUSIVE)) + if !(wrflag > 1) { + goto __31 + } + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_EXCLUSIVE) +__31: + ; + + // If the db-size header field is incorrect (as it may be if an old + // client has been writing the database file), update it now. Doing + // this sooner rather than later means the database size can safely + // re-read the database size from page 1 if a savepoint or transaction + // rollback occurs within the transaction. + if !((*BtShared)(unsafe.Pointer(pBt)).FnPage != Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+28)) { + goto __32 + } + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage1)).FpDbPage) + if !(rc == SQLITE_OK) { + goto __33 + } + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+28, (*BtShared)(unsafe.Pointer(pBt)).FnPage) +__33: + ; +__32: + ; +__30: + ; +__26: + ; + +trans_begun: + if !(rc == SQLITE_OK) { + goto __34 + } + if !(pSchemaVersion != 0) { + goto __35 + } + *(*int32)(unsafe.Pointer(pSchemaVersion)) = int32(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+40)) +__35: + ; + if !(wrflag != 0) { + goto __36 + } + // This call makes sure that the pager has the correct number of + // open savepoints. If the second parameter is greater than 0 and + // the sub-journal is not already open, then it will be opened here. + rc = Xsqlite3PagerOpenSavepoint(tls, pPager, (*Sqlite3)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).Fdb)).FnSavepoint) +__36: + ; +__34: + ; + + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Set the pointer-map entries for all children of page pPage. Also, if +// pPage contains cells that point to overflow pages, set the pointer +// map entries for the overflow pages as well. +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i int32 // Counter variable + var nCell int32 // Number of cells in page pPage + // var rc int32 at bp, 4 + // Return code + var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt + var pgno Pgno = (*MemPage)(unsafe.Pointer(pPage)).Fpgno + + if (*MemPage)(unsafe.Pointer(pPage)).FisInit != 0 { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + } else { + *(*int32)(unsafe.Pointer(bp /* rc */)) = btreeInitPage(tls, pPage) + } + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + nCell = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) + + for i = 0; i < nCell; i++ { + var pCell uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*i))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*i) + 1))))) + + ptrmapPutOvflPtr(tls, pPage, pPage, pCell, bp) + + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + var childPgno Pgno = Xsqlite3Get4byte(tls, pCell) + ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp) + } + } + + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + var childPgno Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) + ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp) + } + + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Somewhere on pPage is a pointer to page iFrom. Modify this pointer so +// that it points to iTo. Parameter eType describes the type of pointer to +// be modified, as follows: +// +// PTRMAP_BTREE: pPage is a btree-page. The pointer points at a child +// page of pPage. +// +// PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow +// page pointed to by one of the cells on pPage. +// +// PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next +// overflow page in the list. +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + if int32(eType) == PTRMAP_OVERFLOW2 { + // The pointer is always the first 4 bytes of the page in this case. + if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { + return Xsqlite3CorruptError(tls, 69806) + } + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) + } else { + var i int32 + var nCell int32 + var rc int32 + + if (*MemPage)(unsafe.Pointer(pPage)).FisInit != 0 { + rc = SQLITE_OK + } else { + rc = btreeInitPage(tls, pPage) + } + if rc != 0 { + return rc + } + nCell = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) + + for i = 0; i < nCell; i++ { + var pCell uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*i))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*i) + 1))))) + if int32(eType) == PTRMAP_OVERFLOW1 { + // var info CellInfo at bp, 24 + + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) + if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { + if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 69825) + } + if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { + Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) + break + } + } + } else { + if Xsqlite3Get4byte(tls, pCell) == iFrom { + Xsqlite3Put4byte(tls, pCell, iTo) + break + } + } + } + + if i == nCell { + if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { + return Xsqlite3CorruptError(tls, 69843) + } + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) + } + } + return SQLITE_OK +} + +// Move the open database page pDbPage to location iFreePage in the +// database. The pDbPage reference remains valid. +// +// The isCommit flag indicates that there is no need to remember that +// the journal needs to be sync()ed before database page pDbPage->pgno +// can be written to. The caller has already promised not to write to that +// page. +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var pPtrPage uintptr at bp+8, 8 + // The page that contains a pointer to pDbPage + var iDbPage Pgno = (*MemPage)(unsafe.Pointer(pDbPage)).Fpgno + var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager + // var rc int32 at bp, 4 + + if iDbPage < Pgno(3) { + return Xsqlite3CorruptError(tls, 69878) + } + + // Move page iDbPage from its current location to page number iFreePage + + *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + (*MemPage)(unsafe.Pointer(pDbPage)).Fpgno = iFreePage + + // If pDbPage was a btree-page, then it may have child pages and/or cells + // that point to overflow pages. The pointer map entries for all these + // pages need to be changed. + // + // If pDbPage is an overflow page, then the first 4 bytes may store a + // pointer to a subsequent overflow page. If this is the case, then + // the pointer map needs to be updated for the subsequent overflow page. + if int32(eType) == PTRMAP_BTREE || int32(eType) == PTRMAP_ROOTPAGE { + *(*int32)(unsafe.Pointer(bp /* rc */)) = setChildPtrmaps(tls, pDbPage) + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } else { + var nextOvfl Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pDbPage)).FaData) + if nextOvfl != Pgno(0) { + ptrmapPut(tls, pBt, nextOvfl, uint8(PTRMAP_OVERFLOW2), iFreePage, bp) + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } + } + + // Fix the database pointer on page iPtrPage that pointed at iDbPage so + // that it points at iFreePage. Also fix the pointer map entry for + // iPtrPage. + if int32(eType) != PTRMAP_ROOTPAGE { + *(*int32)(unsafe.Pointer(bp /* rc */)) = btreeGetPage(tls, pBt, iPtrPage, bp+8, 0) + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */)))).FpDbPage) + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */))) + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + *(*int32)(unsafe.Pointer(bp /* rc */)) = modifyPagePointer(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */)), iDbPage, iFreePage, eType) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */))) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + ptrmapPut(tls, pBt, iFreePage, eType, iPtrPage, bp) + } + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Perform a single step of an incremental-vacuum. If successful, return +// SQLITE_OK. If there is no work to do (and therefore no point in +// calling this function again), return SQLITE_DONE. Or, if an error +// occurs, return some other error code. +// +// More specifically, this function attempts to re-organize the database so +// that the last page of the file currently in use is no longer in use. +// +// Parameter nFin is the number of pages that this database would contain +// were this function called until it returns SQLITE_DONE. +// +// If the bCommit parameter is non-zero, this function assumes that the +// caller will keep calling incrVacuumStep() until it returns SQLITE_DONE +// or an error. bCommit is passed true for an auto-vacuum-on-commit +// operation, or false for an incremental vacuum. +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ + bp := tls.Alloc(44) + defer tls.Free(44) + + var nFreeList Pgno // Number of pages still on the free-list + var rc int32 + + if !(ptrmapPageno(tls, pBt, iLastPg) == iLastPg) && iLastPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + // var eType U8 at bp, 1 + + // var iPtrPage Pgno at bp+4, 4 + + nFreeList = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) + if nFreeList == Pgno(0) { + return SQLITE_DONE + } + + rc = ptrmapGet(tls, pBt, iLastPg, bp, bp+4) + if rc != SQLITE_OK { + return rc + } + if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { + return Xsqlite3CorruptError(tls, 69976) + } + + if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { + if bCommit == 0 { + // Remove the page from the files free-list. This is not required + // if bCommit is non-zero. In that case, the free-list will be + // truncated to zero after this function returns, so it doesn't + // matter if it still contains some garbage entries. + // var iFreePg Pgno at bp+16, 4 + + // var pFreePg uintptr at bp+8, 8 + + rc = allocateBtreePage(tls, pBt, bp+8, bp+16, iLastPg, uint8(BTALLOC_EXACT)) + if rc != SQLITE_OK { + return rc + } + + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pFreePg */))) + } + } else { + // var iFreePg Pgno at bp+40, 4 + // Index of free page to move pLastPg to + // var pLastPg uintptr at bp+24, 8 + + var eMode U8 = U8(BTALLOC_ANY) // Mode parameter for allocateBtreePage() + var iNear Pgno = Pgno(0) // nearby parameter for allocateBtreePage() + + rc = btreeGetPage(tls, pBt, iLastPg, bp+24, 0) + if rc != SQLITE_OK { + return rc + } + + // If bCommit is zero, this loop runs exactly once and page pLastPg + // is swapped with the first free page pulled off the free list. + // + // On the other hand, if bCommit is greater than zero, then keep + // looping until a free-page located within the first nFin pages + // of the file is found. + if bCommit == 0 { + eMode = U8(BTALLOC_LE) + iNear = nFin + } + for __ccgo := true; __ccgo; __ccgo = bCommit != 0 && *(*Pgno)(unsafe.Pointer(bp + 40)) > nFin { + // var pFreePg uintptr at bp+32, 8 + + rc = allocateBtreePage(tls, pBt, bp+32, bp+40, iNear, eMode) + if rc != SQLITE_OK { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pLastPg */))) + return rc + } + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pFreePg */))) + } + + rc = relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 24 /* pLastPg */)), *(*U8)(unsafe.Pointer(bp /* eType */)), *(*Pgno)(unsafe.Pointer(bp + 4 /* iPtrPage */)), *(*Pgno)(unsafe.Pointer(bp + 40 /* iFreePg */)), bCommit) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pLastPg */))) + if rc != SQLITE_OK { + return rc + } + } + } + + if bCommit == 0 { + for __ccgo1 := true; __ccgo1; __ccgo1 = iLastPg == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) || ptrmapPageno(tls, pBt, iLastPg) == iLastPg { + iLastPg-- + } + (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate = U8(1) + (*BtShared)(unsafe.Pointer(pBt)).FnPage = iLastPg + } + return SQLITE_OK +} + +// The database opened by the first argument is an auto-vacuum database +// nOrig pages in size containing nFree free pages. Return the expected +// size of the database in pages following an auto-vacuum operation. +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ + var nEntry int32 // Number of entries on one ptrmap page + var nPtrmap Pgno // Number of PtrMap pages to be freed + var nFin Pgno // Return value + + nEntry = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize / U32(5)) + nPtrmap = (nFree - nOrig + ptrmapPageno(tls, pBt, nOrig) + Pgno(nEntry)) / Pgno(nEntry) + nFin = nOrig - nFree - nPtrmap + if nOrig > U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) && nFin < U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + nFin-- + } + for ptrmapPageno(tls, pBt, nFin) == nFin || nFin == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + nFin-- + } + + return nFin +} + +// A write-transaction must be opened before calling this function. +// It performs a single unit of work towards an incremental vacuum. +// +// If the incremental vacuum is finished after this function has run, +// SQLITE_DONE is returned. If it is not finished, but no error occurred, +// SQLITE_OK is returned. Otherwise an SQLite error code. +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ + var rc int32 + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3BtreeEnter(tls, p) + + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0) { + rc = SQLITE_DONE + } else { + var nOrig Pgno = btreePagecount(tls, pBt) + var nFree Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) + var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) + + if nOrig < nFin || nFree >= nOrig { + rc = Xsqlite3CorruptError(tls, 70091) + } else if nFree > Pgno(0) { + rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) + if rc == SQLITE_OK { + invalidateAllOverflowCache(tls, pBt) + rc = incrVacuumStep(tls, pBt, nFin, nOrig, 0) + } + if rc == SQLITE_OK { + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+28, (*BtShared)(unsafe.Pointer(pBt)).FnPage) + } + } else { + rc = SQLITE_DONE + } + } + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// This routine is called prior to sqlite3PagerCommit when a transaction +// is committed for an auto-vacuum database. +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ + var rc int32 = SQLITE_OK + var pPager uintptr + var pBt uintptr + var db uintptr + + pBt = (*Btree)(unsafe.Pointer(p)).FpBt + pPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager + + invalidateAllOverflowCache(tls, pBt) + + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FincrVacuum) != 0) { + var nFin Pgno // Number of pages in database after autovacuuming + var nFree Pgno // Number of pages on the freelist initially + var nVac Pgno // Number of pages to vacuum + var iFree Pgno // The next page to be freed + var nOrig Pgno // Database size before freeing + + nOrig = btreePagecount(tls, pBt) + if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + // It is not possible to create a database for which the final page + // is either a pointer-map page or the pending-byte page. If one + // is encountered, this indicates corruption. + return Xsqlite3CorruptError(tls, 70142) + } + + nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) + db = (*Btree)(unsafe.Pointer(p)).Fdb + if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacPages != 0 { + var iDb int32 + for iDb = 0; iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb; iDb++ { + if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt == p { + break + } + } + nVac = (*struct { + f func(*libc.TLS, uintptr, uintptr, U32, U32, U32) uint32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacPages})).f(tls, + (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg, + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, + nOrig, + nFree, + (*BtShared)(unsafe.Pointer(pBt)).FpageSize) + if nVac > nFree { + nVac = nFree + } + if nVac == Pgno(0) { + return SQLITE_OK + } + } else { + nVac = nFree + } + nFin = finalDbSize(tls, pBt, nOrig, nVac) + if nFin > nOrig { + return Xsqlite3CorruptError(tls, 70169) + } + if nFin < nOrig { + rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) + } + for iFree = nOrig; iFree > nFin && rc == SQLITE_OK; iFree-- { + rc = incrVacuumStep(tls, pBt, nFin, iFree, libc.Bool32(nVac == nFree)) + } + if (rc == SQLITE_DONE || rc == SQLITE_OK) && nFree > Pgno(0) { + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) + if nVac == nFree { + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32, uint32(0)) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36, uint32(0)) + } + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+28, nFin) + (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate = U8(1) + (*BtShared)(unsafe.Pointer(pBt)).FnPage = nFin + } + if rc != SQLITE_OK { + Xsqlite3PagerRollback(tls, pPager) + } + } + + return rc +} + +// This routine does the first phase of a two-phase commit. This routine +// causes a rollback journal to be created (if it does not already exist) +// and populated with enough information so that if a power loss occurs +// the database can be restored to its original state by playing back +// the journal. Then the contents of the journal are flushed out to +// the disk. After the journal is safely on oxide, the changes to the +// database are written into the database file and flushed to oxide. +// At the end of this call, the rollback journal still exists on the +// disk and we are still holding all locks, so the transaction has not +// committed. See sqlite3BtreeCommitPhaseTwo() for the second phase of the +// commit process. +// +// This call is a no-op if no write-transaction is currently active on pBt. +// +// Otherwise, sync the database file for the btree pBt. zSuperJrnl points to +// the name of a super-journal file that should be written into the +// individual journal file, or is NULL, indicating no super-journal file +// (single database transaction). +// +// When this is called, the super-journal should already have been +// created, populated with this journal pointer and synced to disk. +// +// Once this is routine has returned, the only thing required to commit +// the write-transaction for this database file is to delete the journal. +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ + var rc int32 = SQLITE_OK + if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + Xsqlite3BtreeEnter(tls, p) + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + rc = autoVacuumCommit(tls, p) + if rc != SQLITE_OK { + Xsqlite3BtreeLeave(tls, p) + return rc + } + } + if (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate != 0 { + Xsqlite3PagerTruncateImage(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*BtShared)(unsafe.Pointer(pBt)).FnPage) + } + rc = Xsqlite3PagerCommitPhaseOne(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, zSuperJrnl, 0) + Xsqlite3BtreeLeave(tls, p) + } + return rc +} + +// This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() +// at the conclusion of a transaction. +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb + + (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate = U8(0) + if int32((*Btree)(unsafe.Pointer(p)).FinTrans) > TRANS_NONE && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1 { + // If there are other active statements that belong to this database + // handle, downgrade to a read-only transaction. The other statements + // may still be reading from the database. + downgradeAllSharedCacheTableLocks(tls, p) + (*Btree)(unsafe.Pointer(p)).FinTrans = U8(TRANS_READ) + } else { + // If the handle had any kind of transaction open, decrement the + // transaction count of the shared btree. If the transaction count + // reaches 0, set the shared state to TRANS_NONE. The unlockBtreeIfUnused() + // call below will unlock the pager. + if int32((*Btree)(unsafe.Pointer(p)).FinTrans) != TRANS_NONE { + clearAllSharedCacheTableLocks(tls, p) + (*BtShared)(unsafe.Pointer(pBt)).FnTransaction-- + if 0 == (*BtShared)(unsafe.Pointer(pBt)).FnTransaction { + (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = U8(TRANS_NONE) + } + } + + // Set the current transaction state to TRANS_NONE and unlock the + // pager if this call closed the only read or write transaction. + (*Btree)(unsafe.Pointer(p)).FinTrans = U8(TRANS_NONE) + unlockBtreeIfUnused(tls, pBt) + } + +} + +// Commit the transaction currently in progress. +// +// This routine implements the second phase of a 2-phase commit. The +// sqlite3BtreeCommitPhaseOne() routine does the first phase and should +// be invoked prior to calling this routine. The sqlite3BtreeCommitPhaseOne() +// routine did all the work of writing information out to disk and flushing the +// contents so that they are written onto the disk platter. All this +// routine has to do is delete or truncate or zero the header in the +// the rollback journal (which causes the transaction to commit) and +// drop locks. +// +// Normally, if an error occurs while the pager layer is attempting to +// finalize the underlying journal file, this function returns an error and +// the upper layer will attempt a rollback. However, if the second argument +// is non-zero then this b-tree transaction is part of a multi-file +// transaction. In this case, the transaction has already been committed +// (by deleting a super-journal file) and the caller will ignore this +// functions return code. So, even if an error occurs in the pager layer, +// reset the b-tree objects internal state to indicate that the write +// transaction has been closed. This is quite safe, as the pager will have +// transitioned to the error state. +// +// This will release the write lock on the database file. If there +// are no active cursors, it also releases the read lock. +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ + + if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { + return SQLITE_OK + } + Xsqlite3BtreeEnter(tls, p) + + // If the handle has a write-transaction open, commit the shared-btrees + // transaction and set the shared state to TRANS_READ. + if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { + var rc int32 + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + rc = Xsqlite3PagerCommitPhaseTwo(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + if rc != SQLITE_OK && bCleanup == 0 { + Xsqlite3BtreeLeave(tls, p) + return rc + } + (*Btree)(unsafe.Pointer(p)).FiBDataVersion-- // Compensate for pPager->iDataVersion++; + (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = U8(TRANS_READ) + btreeClearHasContent(tls, pBt) + } + + btreeEndTransaction(tls, p) + Xsqlite3BtreeLeave(tls, p) + return SQLITE_OK +} + +// Do both phases of a commit. +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ + var rc int32 + Xsqlite3BtreeEnter(tls, p) + rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) + if rc == SQLITE_OK { + rc = Xsqlite3BtreeCommitPhaseTwo(tls, p, 0) + } + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// This routine sets the state to CURSOR_FAULT and the error +// code to errCode for every cursor on any BtShared that pBtree +// references. Or if the writeOnly flag is set to 1, then only +// trip write cursors and leave read cursors unchanged. +// +// Every cursor is a candidate to be tripped, including cursors +// that belong to other database connections that happen to be +// sharing the cache with pBtree. +// +// This routine gets called when a rollback occurs. If the writeOnly +// flag is true, then only write-cursors need be tripped - read-only +// cursors save their current positions so that they may continue +// following the rollback. Or, if writeOnly is false, all cursors are +// tripped. In general, writeOnly is false if the transaction being +// rolled back modified the database schema. In this case b-tree root +// pages may be moved or deleted from the database altogether, making +// it unsafe for read cursors to continue. +// +// If the writeOnly flag is true and an error is encountered while +// saving the current position of a read-only cursor, all cursors, +// including all read-cursors are tripped. +// +// SQLITE_OK is returned if successful, or if an error occurs while +// saving a cursor position, an SQLite error code. +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ + var p uintptr + var rc int32 = SQLITE_OK + + if pBtree != 0 { + Xsqlite3BtreeEnter(tls, pBtree) + for p = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBtree)).FpBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { + if writeOnly != 0 && int32((*BtCursor)(unsafe.Pointer(p)).FcurFlags)&BTCF_WriteFlag == 0 { + if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { + rc = saveCursorPosition(tls, p) + if rc != SQLITE_OK { + Xsqlite3BtreeTripAllCursors(tls, pBtree, rc, 0) + break + } + } + } else { + Xsqlite3BtreeClearCursor(tls, p) + (*BtCursor)(unsafe.Pointer(p)).FeState = U8(CURSOR_FAULT) + (*BtCursor)(unsafe.Pointer(p)).FskipNext = errCode + } + btreeReleaseAllCursorPages(tls, p) + } + Xsqlite3BtreeLeave(tls, pBtree) + } + return rc +} + +// Set the pBt->nPage field correctly, according to the current +// state of the database. Assume pBt->pPage1 is valid. +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* nPage */)) = int32(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+28)) + + if *(*int32)(unsafe.Pointer(bp)) == 0 { + Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp) + } + + (*BtShared)(unsafe.Pointer(pBt)).FnPage = U32(*(*int32)(unsafe.Pointer(bp /* nPage */))) +} + +// Rollback the transaction in progress. +// +// If tripCode is not SQLITE_OK then cursors will be invalidated (tripped). +// Only write cursors are tripped if writeOnly is true but all cursors are +// tripped if writeOnly is false. Any attempt to use +// a tripped cursor will result in an error. +// +// This will release the write lock on the database file. If there +// are no active cursors, it also releases the read lock. +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + // var pPage1 uintptr at bp, 8 + + Xsqlite3BtreeEnter(tls, p) + if tripCode == SQLITE_OK { + rc = libc.AssignInt32(&tripCode, saveAllCursors(tls, pBt, uint32(0), uintptr(0))) + if rc != 0 { + writeOnly = 0 + } + } else { + rc = SQLITE_OK + } + if tripCode != 0 { + var rc2 int32 = Xsqlite3BtreeTripAllCursors(tls, p, tripCode, writeOnly) + + if rc2 != SQLITE_OK { + rc = rc2 + } + } + + if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { + var rc2 int32 + + rc2 = Xsqlite3PagerRollback(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + if rc2 != SQLITE_OK { + rc = rc2 + } + + // The rollback may have destroyed the pPage1->aData value. So + // call btreeGetPage() on page 1 again to make + // sure pPage1->aData is set correctly. + if btreeGetPage(tls, pBt, uint32(1), bp, 0) == SQLITE_OK { + btreeSetNPage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) + releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) + } + + (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = U8(TRANS_READ) + btreeClearHasContent(tls, pBt) + } + + btreeEndTransaction(tls, p) + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Start a statement subtransaction. The subtransaction can be rolled +// back independently of the main transaction. You must start a transaction +// before starting a subtransaction. The subtransaction is ended automatically +// if the main transaction commits or rolls back. +// +// Statement subtransactions are used around individual SQL statements +// that are contained within a BEGIN...COMMIT block. If a constraint +// error occurs within the statement, the effect of that one statement +// can be rolled back without having to rollback the entire transaction. +// +// A statement sub-transaction is implemented as an anonymous savepoint. The +// value passed as the second parameter is the total number of savepoints, +// including the new anonymous savepoint, open on the B-Tree. i.e. if there +// are no active savepoints and no other statement-transactions open, +// iStatement is 1. This anonymous savepoint can be released or rolled back +// using the sqlite3BtreeSavepoint() function. +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ + var rc int32 + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + Xsqlite3BtreeEnter(tls, p) + + // At the pager level, a statement transaction is a savepoint with + // an index greater than all savepoints created explicitly using + // SQL statements. It is illegal to open, release or rollback any + // such savepoints while the statement transaction savepoint is active. + rc = Xsqlite3PagerOpenSavepoint(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, iStatement) + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// The second argument to this function, op, is always SAVEPOINT_ROLLBACK +// or SAVEPOINT_RELEASE. This function either releases or rolls back the +// savepoint identified by parameter iSavepoint, depending on the value +// of op. +// +// Normally, iSavepoint is greater than or equal to zero. However, if op is +// SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the +// contents of the entire transaction are rolled back. This is different +// from a normal transaction rollback, as no locks are released and the +// transaction remains open. +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ + var rc int32 = SQLITE_OK + if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3BtreeEnter(tls, p) + if op == SAVEPOINT_ROLLBACK { + rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) + } + if rc == SQLITE_OK { + rc = Xsqlite3PagerSavepoint(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, op, iSavepoint) + } + if rc == SQLITE_OK { + if iSavepoint < 0 && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_INITIALLY_EMPTY != 0 { + (*BtShared)(unsafe.Pointer(pBt)).FnPage = U32(0) + } + rc = newDatabase(tls, pBt) + btreeSetNPage(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FpPage1) + + // pBt->nPage might be zero if the database was corrupt when + // the transaction was started. Otherwise, it must be at least 1. + + } + Xsqlite3BtreeLeave(tls, p) + } + return rc +} + +// Create a new cursor for the BTree whose root is on the page +// iTable. If a read-only cursor is requested, it is assumed that +// the caller already has at least a read-only transaction open +// on the database already. If a write-cursor is requested, then +// the caller is assumed to have an open write transaction. +// +// If the BTREE_WRCSR bit of wrFlag is clear, then the cursor can only +// be used for reading. If the BTREE_WRCSR bit is set, then the cursor +// can be used for reading or for writing if other conditions for writing +// are also met. These are the conditions that must be met in order +// for writing to be allowed: +// +// 1: The cursor must have been opened with wrFlag containing BTREE_WRCSR +// +// 2: Other database connections that share the same pager cache +// but which are not in the READ_UNCOMMITTED state may not have +// cursors open with wrFlag==0 on the same table. Otherwise +// the changes made by this write cursor would be visible to +// the read cursors in the other database connection. +// +// 3: The database must be writable (not on read-only media) +// +// 4: There must be an active transaction. +// +// The BTREE_FORDELETE bit of wrFlag may optionally be set if BTREE_WRCSR +// is set. If FORDELETE is set, that is a hint to the implementation that +// this cursor will only be used to seek to and delete entries of an index +// as part of a larger DELETE statement. The FORDELETE hint is not used by +// this implementation. But in a hypothetical alternative storage engine +// in which index entries are automatically deleted when corresponding table +// rows are deleted, the FORDELETE flag is a hint that all SEEK and DELETE +// operations on this cursor can be no-ops and all READ operations can +// return a null row (2-bytes: 0x01 0x00). +// +// No checking is done to make sure that page iTable really is the +// root page of a b-tree. If it is not, then the cursor acquired +// will not work correctly. +// +// It is assumed that the sqlite3BtreeCursorZero() has been called +// on pCur to initialize the memory space prior to invoking this routine. +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle + var pX uintptr // Looping over other all cursors + + // The following assert statements verify that if this is a sharable + // b-tree database, the connection is holding the required table locks, + // and that no other connection has any open cursor that conflicts with + // this lock. The iTable<1 term disables the check for corrupt schemas. + + // Assert that the caller has opened the required transaction. + + if iTable <= Pgno(1) { + if iTable < Pgno(1) { + return Xsqlite3CorruptError(tls, 70633) + } else if btreePagecount(tls, pBt) == Pgno(0) { + + iTable = Pgno(0) + } + } + + // Now that no other errors can occur, finish filling in the BtCursor + // variables and link the cursor into the BtShared list. + (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot = iTable + (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(-1) + (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo = pKeyInfo + (*BtCursor)(unsafe.Pointer(pCur)).FpBtree = p + (*BtCursor)(unsafe.Pointer(pCur)).FpBt = pBt + (*BtCursor)(unsafe.Pointer(pCur)).FcurFlags = U8(0) + // If there are two or more cursors on the same btree, then all such + // cursors *must* have the BTCF_Multiple flag set. + for pX = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; pX != 0; pX = (*BtCursor)(unsafe.Pointer(pX)).FpNext { + if (*BtCursor)(unsafe.Pointer(pX)).FpgnoRoot == iTable { + *(*U8)(unsafe.Pointer(pX + 1)) |= U8(BTCF_Multiple) + (*BtCursor)(unsafe.Pointer(pCur)).FcurFlags = U8(BTCF_Multiple) + } + } + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + (*BtCursor)(unsafe.Pointer(pCur)).FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpCursor + (*BtShared)(unsafe.Pointer(pBt)).FpCursor = pCur + if wrFlag != 0 { + *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_WriteFlag) + (*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags = U8(0) + if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace == uintptr(0) { + return allocateTempSpace(tls, pBt) + } + } else { + (*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags = U8(PAGER_GET_READONLY) + } + return SQLITE_OK +} + +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ + var rc int32 + Xsqlite3BtreeEnter(tls, p) + rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) + Xsqlite3BtreeLeave(tls, p) + return rc +} + +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ + if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { + return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) + } else { + return btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) + } + return int32(0) +} + +// Return the size of a BtCursor object in bytes. +// +// This interfaces is needed so that users of cursors can preallocate +// sufficient storage to hold a cursor. The BtCursor object is opaque +// to users so they cannot do the sizeof() themselves - they must call +// this routine. +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ + return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) +} + +// Initialize memory that will be converted into a BtCursor object. +// +// The simple approach here would be to memset() the entire object +// to zero. But it turns out that the apPage[] and aiIdx[] arrays +// do not need to be zeroed and they are large, so we can save a lot +// of run-time by skipping the initialization of those elements. +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ + libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) +} + +// Close a cursor. The read lock on the database file is released +// when the last cursor is closed. +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ + var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree + if pBtree != 0 { + var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt + Xsqlite3BtreeEnter(tls, pBtree) + + if (*BtShared)(unsafe.Pointer(pBt)).FpCursor == pCur { + (*BtShared)(unsafe.Pointer(pBt)).FpCursor = (*BtCursor)(unsafe.Pointer(pCur)).FpNext + } else { + var pPrev uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpCursor + for __ccgo := true; __ccgo; __ccgo = pPrev != 0 { + if (*BtCursor)(unsafe.Pointer(pPrev)).FpNext == pCur { + (*BtCursor)(unsafe.Pointer(pPrev)).FpNext = (*BtCursor)(unsafe.Pointer(pCur)).FpNext + break + } + pPrev = (*BtCursor)(unsafe.Pointer(pPrev)).FpNext + } + } + btreeReleaseAllCursorPages(tls, pCur) + unlockBtreeIfUnused(tls, pBt) + Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow) + Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) + if int32((*BtShared)(unsafe.Pointer(pBt)).FopenFlags)&BTREE_SINGLE != 0 && (*BtShared)(unsafe.Pointer(pBt)).FpCursor == uintptr(0) { + // Since the BtShared is not sharable, there is no need to + // worry about the missing sqlite3BtreeLeave() call here. + + Xsqlite3BtreeClose(tls, pBtree) + } else { + Xsqlite3BtreeLeave(tls, pBtree) + } + (*BtCursor)(unsafe.Pointer(pCur)).FpBtree = uintptr(0) + } + return SQLITE_OK +} + +// Make sure the BtCursor* given in the argument has a valid +// BtCursor.info structure. If it is not already valid, call +// btreeParseCell() to fill it in. +// +// BtCursor.info is a cache of the information in the current cell. +// Using this cache reduces the number of calls to btreeParseCell(). +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ + if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { + *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) + btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) + } else { + + } +} + +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ + + return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) +} + +// Return the value of the integer key or "rowid" for a table btree. +// This routine is only valid for a cursor that is pointing into a +// ordinary table btree. If the cursor points to an index btree or +// is invalid, the result of this routine is undefined. +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ + + getCellInfo(tls, pCur) + return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey +} + +// Pin or unpin a cursor. +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ + + *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) +} + +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ + + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) +} + +// Return the offset into the database file for the start of the +// payload to which the cursor is pointing. +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ + + getCellInfo(tls, pCur) + return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) +} + +// Return the number of bytes of payload for the entry that pCur is +// currently pointing to. For table btrees, this will be the amount +// of data. For index btrees, this will be the size of the key. +// +// The caller must guarantee that the cursor is pointing to a non-NULL +// valid entry. In other words, the calling procedure must guarantee +// that the cursor has Cursor.eState==CURSOR_VALID. +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ + + getCellInfo(tls, pCur) + return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload +} + +// Return an upper bound on the size of any record for the table +// that the cursor is pointing into. +// +// This is an optimization. Everything will still work if this +// routine always returns 2147483647 (which is the largest record +// that SQLite can handle) or more. But returning a smaller value might +// prevent large memory allocations when trying to interpret a +// corrupt datrabase. +// +// The current implementation merely returns the size of the underlying +// database file. +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ + + return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) +} + +// Given the page number of an overflow page in the database (parameter +// ovfl), this function finds the page number of the next page in the +// linked list of overflow pages. If possible, it uses the auto-vacuum +// pointer-map data instead of reading the content of page ovfl to do so. +// +// If an error occurs an SQLite error code is returned. Otherwise: +// +// The page number of the next overflow page in the linked list is +// written to *pPgnoNext. If page ovfl is the last page in its linked +// list, *pPgnoNext is set to zero. +// +// If ppPage is not NULL, and a reference to the MemPage object corresponding +// to page number pOvfl was obtained, then *ppPage is set to point to that +// reference. It is the responsibility of the caller to call releasePage() +// on *ppPage to free the reference. In no reference was obtained (because +// the pointer-map was used to obtain the value for *pPgnoNext), then +// *ppPage is set to zero. +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var next Pgno = Pgno(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */)) = uintptr(0) + var rc int32 = SQLITE_OK + + // Try to find the next page in the overflow list using the + // autovacuum pointer-map pages. Guess that the next page in + // the overflow list is page number (ovfl+1). If that guess turns + // out to be wrong, fall back to loading the data of page + // number ovfl to determine the next page number. + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + // var pgno Pgno at bp+4, 4 + + var iGuess Pgno = ovfl + Pgno(1) + // var eType U8 at bp, 1 + + for ptrmapPageno(tls, pBt, iGuess) == iGuess || iGuess == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + iGuess++ + } + + if iGuess <= btreePagecount(tls, pBt) { + rc = ptrmapGet(tls, pBt, iGuess, bp, bp+4) + if rc == SQLITE_OK && int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_OVERFLOW2 && *(*Pgno)(unsafe.Pointer(bp + 4)) == ovfl { + next = iGuess + rc = SQLITE_DONE + } + } + } + + if rc == SQLITE_OK { + rc = btreeGetPage(tls, pBt, ovfl, bp+8, func() int32 { + if ppPage == uintptr(0) { + return PAGER_GET_READONLY + } + return 0 + }()) + + if rc == SQLITE_OK { + next = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */)))).FaData) + } + } + + *(*Pgno)(unsafe.Pointer(pPgnoNext)) = next + if ppPage != 0 { + *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */)) + } else { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */))) + } + return func() int32 { + if rc == SQLITE_DONE { + return SQLITE_OK + } + return rc + }() +} + +// Copy data from a buffer to a page, or from a page to a buffer. +// +// pPayload is a pointer to data stored on database page pDbPage. +// If argument eOp is false, then nByte bytes of data are copied +// from pPayload to the buffer pointed at by pBuf. If eOp is true, +// then sqlite3PagerWrite() is called on pDbPage and nByte bytes +// of data are copied from the buffer pBuf to pPayload. +// +// SQLITE_OK is returned on success, otherwise an error code. +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ + if eOp != 0 { + // Copy data from buffer to page (a write operation) + var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) + if rc != SQLITE_OK { + return rc + } + libc.Xmemcpy(tls, pPayload, pBuf, uint64(nByte)) + } else { + // Copy data from page to buffer (a read operation) + libc.Xmemcpy(tls, pBuf, pPayload, uint64(nByte)) + } + return SQLITE_OK +} + +// This function is used to read or overwrite payload information +// for the entry that the pCur cursor is pointing to. The eOp +// argument is interpreted as follows: +// +// 0: The operation is a read. Populate the overflow cache. +// 1: The operation is a write. Populate the overflow cache. +// +// A total of "amt" bytes are read or written beginning at "offset". +// Data is read to or from the buffer pBuf. +// +// The content being read or written might appear on the main page +// or be scattered out on multiple overflow pages. +// +// If the current cursor entry uses one or more overflow pages +// this function may allocate space for and lazily populate +// the overflow page-list cache array (BtCursor.aOverflow). +// Subsequent calls use this cache to make seeking to the supplied offset +// more efficient. +// +// Once an overflow page-list cache has been allocated, it must be +// invalidated if some other cursor writes to the same table, or if +// the cursor is moved to a different row. Additionally, in auto-vacuum +// mode, the following events may invalidate an overflow page-list cache. +// +// * An incremental vacuum, +// * A commit in auto_vacuum="full" mode, +// * Creating a table (may require moving an overflow page). +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var aPayload uintptr + var rc int32 = SQLITE_OK + var iIdx int32 = 0 + var pPage uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Btree page of current entry + var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to + + if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { + return Xsqlite3CorruptError(tls, 71040) + } + + getCellInfo(tls, pCur) + aPayload = (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload + + if Uptr((int64(aPayload)-int64((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > Uptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) { + // Trying to read or write past the end of the data is an error. The + // conditional above is really: + // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] + // but is recast into its current form to avoid integer overflow problems + return Xsqlite3CorruptError(tls, 71055) + } + + // Check if data must be read/written to/from the btree page itself. + if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { + var a int32 = int32(amt) + if U32(a)+offset > U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { + a = int32(U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) - offset) + } + rc = copyPayload(tls, aPayload+uintptr(offset), pBuf, a, eOp, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) + offset = U32(0) + pBuf += uintptr(a) + amt = amt - U32(a) + } else { + offset = offset - U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) + } + + if rc == SQLITE_OK && amt > U32(0) { + var ovflSize U32 = (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) // Bytes content per ovfl page + // var nextPage Pgno at bp, 4 + + *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = Xsqlite3Get4byte(tls, aPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) + + // If the BtCursor.aOverflow[] has not been allocated, allocate it now. + // + // The aOverflow[] array is sized at one entry for each overflow page + // in the overflow chain. The page number of the first overflow page is + // stored in aOverflow[0], etc. A value of 0 in the aOverflow[] array + // means "not yet known" (the cache is lazily populated). + if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_ValidOvfl == 0 { + var nOvfl int32 = int32(((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload - U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) + ovflSize - U32(1)) / ovflSize) + if (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow == uintptr(0) || + nOvfl*int32(unsafe.Sizeof(Pgno(0))) > Xsqlite3MallocSize(tls, (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow) { + var aNew uintptr = Xsqlite3Realloc(tls, + (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow, uint64(uint64(nOvfl*2)*uint64(unsafe.Sizeof(Pgno(0))))) + if aNew == uintptr(0) { + return SQLITE_NOMEM + } else { + (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow = aNew + } + } + libc.Xmemset(tls, (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow, 0, uint64(nOvfl)*uint64(unsafe.Sizeof(Pgno(0)))) + *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidOvfl) + } else { + // If the overflow page-list cache has been allocated and the + // entry for the first required overflow page is valid, skip + // directly to it. + if *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(offset/ovflSize)*4)) != 0 { + iIdx = int32(offset / ovflSize) + *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) + offset = offset % ovflSize + } + } + + for *(*Pgno)(unsafe.Pointer(bp)) != 0 { + // If required, populate the overflow page-list cache. + if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { + return Xsqlite3CorruptError(tls, 71117) + } + + *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) + + if offset >= ovflSize { + // The only reason to read this page is to obtain the page + // number for the next page in the overflow chain. The page + // data is not required. So first try to lookup the overflow + // page-list cache, if any, then fall back to the getOverflowPage() + // function. + + if *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx+1)*4)) != 0 { + *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx+1)*4)) + } else { + rc = getOverflowPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), uintptr(0), bp) + } + offset = offset - ovflSize + } else { + // Need to read this page properly. It contains some of the + // range of data that is being read (eOp==0) or written (eOp!=0). + var a int32 = int32(amt) + if U32(a)+offset > ovflSize { + a = int32(ovflSize - offset) + } + + { + // var pDbPage uintptr at bp+8, 8 + + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), bp+8, + func() int32 { + if eOp == 0 { + return PAGER_GET_READONLY + } + return 0 + }()) + if rc == SQLITE_OK { + aPayload = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pDbPage */))) + *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = Xsqlite3Get4byte(tls, aPayload) + rc = copyPayload(tls, aPayload+uintptr(offset+U32(4)), pBuf, a, eOp, *(*uintptr)(unsafe.Pointer(bp + 8 /* pDbPage */))) + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pDbPage */))) + offset = U32(0) + } + + } + amt = amt - U32(a) + if amt == U32(0) { + return rc + } + pBuf += uintptr(a) + } + if rc != 0 { + break + } + iIdx++ + } + } + + if rc == SQLITE_OK && amt > U32(0) { + // Overflow chain ends prematurely + return Xsqlite3CorruptError(tls, 71202) + } + return rc +} + +// Read part of the payload for the row at which that cursor pCur is currently +// pointing. "amt" bytes will be transferred into pBuf[]. The transfer +// begins at "offset". +// +// pCur can be pointing to either a table or an index b-tree. +// If pointing to a table btree, then the content section is read. If +// pCur is pointing to an index b-tree then the key section is read. +// +// For sqlite3BtreePayload(), the caller must ensure that pCur is pointing +// to a valid row in the table. For sqlite3BtreePayloadChecked(), the +// cursor might be invalid or might need to be restored before being read. +// +// Return SQLITE_OK on success or an error code if anything goes +// wrong. An error is returned if "offset+amt" is larger than +// the available payload. +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ + + return accessPayload(tls, pCur, offset, amt, pBuf, 0) +} + +// This variant of sqlite3BtreePayload() works even if the cursor has not +// in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() +// interface. +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ + var rc int32 + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { + return SQLITE_ABORT + } + + rc = btreeRestoreCursorPosition(tls, pCur) + if rc != 0 { + return rc + } + return accessPayload(tls, pCur, offset, amt, pBuf, 0) +} + +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { + + return accessPayload(tls, pCur, offset, amt, pBuf, 0) + } else { + return accessPayloadChecked(tls, pCur, offset, amt, pBuf) + } + return int32(0) +} + +// Return a pointer to payload information from the entry that the +// pCur cursor is pointing to. The pointer is to the beginning of +// the key if index btrees (pPage->intKey==0) and is the data for +// table btrees (pPage->intKey==1). The number of bytes of available +// key/data is written into *pAmt. If *pAmt==0, then the value +// returned will not be a valid pointer. +// +// This routine is an optimization. It is common for the entire key +// and data to fit on the local page and for there to be no overflow +// pages. When that is so, this routine can be used to access the +// key and data without making a copy. If the key and/or data spills +// onto overflow pages, then accessPayload() must be used to reassemble +// the key/data and copy it into a preallocated buffer. +// +// The pointer returned by this routine looks directly into the cached +// page of the database. The data might change or move the next time +// any btree routine is called. +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ + var amt int32 + + amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) + if amt > int32((int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaDataEnd)-int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload))/1) { + // There is too little space on the page for the expected amount + // of local content. Database must be corrupt. + + amt = func() int32 { + if 0 > int32((int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaDataEnd)-int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload))/1) { + return 0 + } + return int32((int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaDataEnd) - int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)) / 1) + }() + } + *(*U32)(unsafe.Pointer(pAmt)) = U32(amt) + return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload +} + +// For the entry that cursor pCur is point to, return as +// many bytes of the key or data as are available on the local +// b-tree page. Write the number of available bytes into *pAmt. +// +// The pointer returned is ephemeral. The key/data may move +// or be destroyed on the next call to any Btree routine, +// including calls from other threads against the same cache. +// Hence, a mutex on the BtShared should be held prior to calling +// this routine. +// +// These routines is used to get quick access to key and data +// in the common case where no overflow pages are used. +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ + return fetchPayload(tls, pCur, pAmt) +} + +// Move the cursor down to a new child page. The newPgno argument is the +// page number of the child page to move to. +// +// This function returns SQLITE_CORRUPT if the page-header flags field of +// the new child page does not match the flags field of the parent (i.e. +// if an intkey page appears to be the parent of a non-intkey page, or +// vice-versa). +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ + var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt + + if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { + return Xsqlite3CorruptError(tls, 71341) + } + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) + *(*U16)(unsafe.Pointer(pCur + 88 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*2)) = (*BtCursor)(unsafe.Pointer(pCur)).Fix + *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) + (*BtCursor)(unsafe.Pointer(pCur)).FiPage++ + return getAndInitPage(tls, pBt, newPgno, pCur+136, pCur, int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) +} + +// Move the cursor up to the parent page. +// +// pCur->idx is set to the cell index that contains the pointer +// to the page we are coming from. If we are coming from the +// right-most child page then pCur->idx is set to one more than +// the largest cell index. +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ + var pLeaf uintptr + + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) + (*BtCursor)(unsafe.Pointer(pCur)).Fix = *(*U16)(unsafe.Pointer(pCur + 88 + uintptr(int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage)-1)*2)) + pLeaf = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(libc.PreDecInt8(&(*BtCursor)(unsafe.Pointer(pCur)).FiPage, 1))*8)) + releasePageNotNull(tls, pLeaf) +} + +// Move the cursor to point to the root page of its b-tree structure. +// +// If the table has a virtual root page, then the cursor is moved to point +// to the virtual root page instead of the actual root page. A table has a +// virtual root page when the actual root page contains no cells and a +// single child page. This can only happen with the table rooted at page 1. +// +// If the b-tree structure is empty, the cursor state is set to +// CURSOR_INVALID and this routine returns SQLITE_EMPTY. Otherwise, +// the cursor is set to point to the first cell located on the root +// (or virtual root) page and the cursor state is set to CURSOR_VALID. +// +// If this function returns successfully, it may be assumed that the +// page-header flags indicate that the [virtual] root-page is the expected +// kind of b-tree page (i.e. if when opening the cursor the caller did not +// specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D, +// indicating a table b-tree, or if the caller did specify a KeyInfo +// structure the flags byte is set to 0x02 or 0x0A, indicating an index +// b-tree). +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ + var pRoot uintptr + var rc int32 + var subpage Pgno + rc = SQLITE_OK + + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0) { + goto __1 + } + if !((*BtCursor)(unsafe.Pointer(pCur)).FiPage != 0) { + goto __3 + } + releasePageNotNull(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage) +__4: + if !(libc.PreDecInt8(&(*BtCursor)(unsafe.Pointer(pCur)).FiPage, 1) != 0) { + goto __5 + } + releasePageNotNull(tls, *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8))) + goto __4 +__5: + ; + pRoot = libc.AssignPtrUintptr(pCur+136, *(*uintptr)(unsafe.Pointer(pCur + 144))) + goto skip_init +__3: + ; + goto __2 +__1: + if !((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot == Pgno(0)) { + goto __6 + } + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + return SQLITE_EMPTY + goto __7 +__6: + ; + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK) { + goto __8 + } + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_FAULT) { + goto __9 + } + + return (*BtCursor)(unsafe.Pointer(pCur)).FskipNext +__9: + ; + Xsqlite3BtreeClearCursor(tls, pCur) +__8: + ; + rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) + if !(rc != SQLITE_OK) { + goto __10 + } + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + return rc +__10: + ; + (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(0) + (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey = (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FintKey +__7: + ; +__2: + ; + pRoot = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + + // If pCur->pKeyInfo is not NULL, then the caller that opened this cursor + // expected to open it on an index b-tree. Otherwise, if pKeyInfo is + // NULL, the caller expects a table b-tree. If this is not the case, + // return an SQLITE_CORRUPT error. + // + // Earlier versions of SQLite assumed that this test could not fail + // if the root page was already loaded when this function was called (i.e. + // if pCur->iPage>=0). But this is not so if the database is corrupted + // in such a way that page pRoot is linked into a second b-tree table + // (or the freelist). + + if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { + goto __11 + } + return Xsqlite3CorruptError(tls, 71479) +__11: + ; + +skip_init: + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidNKey | BTCF_ValidOvfl)) + + if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FnCell) > 0) { + goto __12 + } + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) + goto __13 +__12: + if !!(int32((*MemPage)(unsafe.Pointer(pRoot)).Fleaf) != 0) { + goto __14 + } + if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { + goto __16 + } + return Xsqlite3CorruptError(tls, 71491) +__16: + ; + subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) + rc = moveToChild(tls, pCur, subpage) + goto __15 +__14: + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + rc = SQLITE_EMPTY +__15: + ; +__13: + ; + return rc +} + +// Move the cursor down to the left-most leaf entry beneath the +// entry to which it is currently pointing. +// +// The left-most leaf is the one with the smallest key - the first +// in ascending order. +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ + var pgno Pgno + var rc int32 = SQLITE_OK + var pPage uintptr + + for rc == SQLITE_OK && !(int32((*MemPage)(unsafe.Pointer(libc.AssignUintptr(&pPage, (*BtCursor)(unsafe.Pointer(pCur)).FpPage))).Fleaf) != 0) { + + pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*int32((*BtCursor)(unsafe.Pointer(pCur)).Fix)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*int32((*BtCursor)(unsafe.Pointer(pCur)).Fix)) + 1)))))) + rc = moveToChild(tls, pCur, pgno) + } + return rc +} + +// Move the cursor down to the right-most leaf entry beneath the +// page to which it is currently pointing. Notice the difference +// between moveToLeftmost() and moveToRightmost(). moveToLeftmost() +// finds the left-most entry beneath the *entry* whereas moveToRightmost() +// finds the right-most entry beneath the *page*. +// +// The right-most entry is the one with the largest key - the last +// key in ascending order. +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ + var pgno Pgno + var rc int32 = SQLITE_OK + var pPage uintptr = uintptr(0) + + for !(int32((*MemPage)(unsafe.Pointer(libc.AssignUintptr(&pPage, (*BtCursor)(unsafe.Pointer(pCur)).FpPage))).Fleaf) != 0) { + pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) + (*BtCursor)(unsafe.Pointer(pCur)).Fix = (*MemPage)(unsafe.Pointer(pPage)).FnCell + rc = moveToChild(tls, pCur, pgno) + if rc != 0 { + return rc + } + } + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1) + + return SQLITE_OK +} + +// Move the cursor to the first entry in the table. Return SQLITE_OK +// on success. Set *pRes to 0 if the cursor actually points to something +// or set *pRes to 1 if the table is empty. +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ + var rc int32 + + rc = moveToRoot(tls, pCur) + if rc == SQLITE_OK { + + *(*int32)(unsafe.Pointer(pRes)) = 0 + rc = moveToLeftmost(tls, pCur) + } else if rc == SQLITE_EMPTY { + + *(*int32)(unsafe.Pointer(pRes)) = 1 + rc = SQLITE_OK + } + return rc +} + +// Move the cursor to the last entry in the table. Return SQLITE_OK +// on success. Set *pRes to 0 if the cursor actually points to something +// or set *pRes to 1 if the table is empty. +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ + var rc int32 + + // If the cursor already points to the last entry, this is a no-op. + if CURSOR_VALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) && int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_AtLast != 0 { + *(*int32)(unsafe.Pointer(pRes)) = 0 + return SQLITE_OK + } + + rc = moveToRoot(tls, pCur) + if rc == SQLITE_OK { + + *(*int32)(unsafe.Pointer(pRes)) = 0 + rc = moveToRightmost(tls, pCur) + if rc == SQLITE_OK { + *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_AtLast) + } else { + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast)) + } + } else if rc == SQLITE_EMPTY { + + *(*int32)(unsafe.Pointer(pRes)) = 1 + rc = SQLITE_OK + } + return rc +} + +// Move the cursor so that it points to an entry in a table (a.k.a INTKEY) +// table near the key intKey. Return a success code. +// +// If an exact match is not found, then the cursor is always +// left pointing at a leaf page which would hold the entry if it +// were present. The cursor might point to an entry that comes +// before or after the key. +// +// An integer is written into *pRes which is the result of +// comparing the key with the entry to which the cursor is +// pointing. The meaning of the integer written into +// *pRes is as follows: +// +// *pRes<0 The cursor is left pointing at an entry that +// is smaller than intKey or if the table is empty +// and the cursor is therefore left point to nothing. +// +// *pRes==0 The cursor is left pointing at an entry that +// exactly matches intKey. +// +// *pRes>0 The cursor is left pointing at an entry that +// is larger than intKey. +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + // var nCellKey I64 at bp, 8 + + var lwr int32 + var upr int32 + var idx int32 + var c int32 + var chldPg Pgno + var pPage uintptr + var pCell uintptr + + // If the cursor is already positioned at the point we are trying + // to move to, then just return without doing any work + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID && int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_ValidNKey != 0) { + goto __1 + } + if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey == intKey) { + goto __2 + } + *(*int32)(unsafe.Pointer(pRes)) = 0 + return SQLITE_OK +__2: + ; + if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey < intKey) { + goto __3 + } + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_AtLast != 0) { + goto __4 + } + *(*int32)(unsafe.Pointer(pRes)) = -1 + return SQLITE_OK +__4: + ; + // If the requested key is one more than the previous key, then + // try to get there using sqlite3BtreeNext() rather than a full + // binary search. This is an optimization only. The correct answer + // is still obtained without this case, only a little more slowely + if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey+int64(1) == intKey) { + goto __5 + } + *(*int32)(unsafe.Pointer(pRes)) = 0 + rc = Xsqlite3BtreeNext(tls, pCur, 0) + if !(rc == SQLITE_OK) { + goto __6 + } + getCellInfo(tls, pCur) + if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey == intKey) { + goto __8 + } + return SQLITE_OK +__8: + ; + goto __7 +__6: + if !(rc != SQLITE_DONE) { + goto __9 + } + return rc +__9: + ; +__7: + ; +__5: + ; +__3: + ; +__1: + ; + + rc = moveToRoot(tls, pCur) + if !(rc != 0) { + goto __10 + } + if !(rc == SQLITE_EMPTY) { + goto __11 + } + + *(*int32)(unsafe.Pointer(pRes)) = -1 + return SQLITE_OK +__11: + ; + return rc +__10: + ; + +__12: + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Pointer to current cell in pPage + + // pPage->nCell must be greater than zero. If this is the root-page + // the cursor would have been INVALID above and this for(;;) loop + // not run. If this is not the root-page, then the moveToChild() routine + // would have already detected db corruption. Similarly, pPage must + // be the right kind (index or table) of b-tree page. Otherwise + // a moveToChild() or moveToRoot() call would have detected corruption. + + lwr = 0 + upr = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1 + + idx = upr >> (1 - biasRight) // idx = biasRight ? upr : (lwr+upr)/2; +__15: + pCell = (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) + 1))))) + if !((*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf != 0) { + goto __18 + } +__19: + if !(0x80 <= int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pCell, 1))))) { + goto __20 + } + if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { + goto __21 + } + return Xsqlite3CorruptError(tls, 71733) +__21: + ; + goto __19 +__20: + ; +__18: + ; + Xsqlite3GetVarint(tls, pCell, bp) + if !(*(*I64)(unsafe.Pointer(bp)) < intKey) { + goto __22 + } + lwr = idx + 1 + if !(lwr > upr) { + goto __24 + } + c = -1 + goto __17 +__24: + ; + goto __23 +__22: + if !(*(*I64)(unsafe.Pointer(bp)) > intKey) { + goto __25 + } + upr = idx - 1 + if !(lwr > upr) { + goto __27 + } + c = +1 + goto __17 +__27: + ; + goto __26 +__25: + ; + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) + if !!(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + goto __28 + } + lwr = idx + goto moveto_table_next_layer + goto __29 +__28: + *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey = *(*I64)(unsafe.Pointer(bp /* nCellKey */)) + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + *(*int32)(unsafe.Pointer(pRes)) = 0 + return SQLITE_OK +__29: + ; +__26: + ; +__23: + ; + + idx = (lwr + upr) >> 1 // idx = (lwr+upr)/2; + goto __16 +__16: + goto __15 + goto __17 +__17: + ; + + if !((*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0) { + goto __30 + } + + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) + *(*int32)(unsafe.Pointer(pRes)) = c + rc = SQLITE_OK + goto moveto_table_finish +__30: + ; +moveto_table_next_layer: + if !(lwr >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { + goto __31 + } + chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) + goto __32 +__31: + chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*lwr))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*lwr) + 1)))))) +__32: + ; + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(lwr) + rc = moveToChild(tls, pCur, chldPg) + if !(rc != 0) { + goto __33 + } + goto __14 +__33: + ; + goto __13 +__13: + goto __12 + goto __14 +__14: + ; +moveto_table_finish: + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + + return rc +} + +// Move the cursor so that it points to an entry in an index table +// near the key pIdxKey. Return a success code. +// +// If an exact match is not found, then the cursor is always +// left pointing at a leaf page which would hold the entry if it +// were present. The cursor might point to an entry that comes +// before or after the key. +// +// An integer is written into *pRes which is the result of +// comparing the key with the entry to which the cursor is +// pointing. The meaning of the integer written into +// *pRes is as follows: +// +// *pRes<0 The cursor is left pointing at an entry that +// is smaller than pIdxKey or if the table is empty +// and the cursor is therefore left point to nothing. +// +// *pRes==0 The cursor is left pointing at an entry that +// exactly matches pIdxKey. +// +// *pRes>0 The cursor is left pointing at an entry that +// is larger than pIdxKey. +// +// The pIdxKey->eqSeen field is set to 1 if there +// exists an entry in the table that exactly matches pIdxKey. +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ + var rc int32 + var xRecordCompare RecordCompare + // The record flows over onto one or more overflow pages. In + // this case the whole cell needs to be parsed, a buffer allocated + // and accessPayload() used to retrieve the record into the + // buffer before VdbeRecordCompare() can be called. + // + // If the record is corrupt, the xRecordCompare routine may read + // up to two varints past the end of the buffer. An extra 18 + // bytes of padding is allocated at the end of the buffer in + // case this happens. + var pCellKey uintptr + var pCellBody uintptr + var nOverrun int32 + var nCell int32 + var lwr int32 + var upr int32 + var idx int32 + var c int32 + var chldPg Pgno + var pPage uintptr + var pCell uintptr + + xRecordCompare = Xsqlite3VdbeFindCompare(tls, pIdxKey) + (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode = U8(0) + + rc = moveToRoot(tls, pCur) + if !(rc != 0) { + goto __1 + } + if !(rc == SQLITE_EMPTY) { + goto __2 + } + + *(*int32)(unsafe.Pointer(pRes)) = -1 + return SQLITE_OK +__2: + ; + return rc +__1: + ; + +__3: + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Pointer to current cell in pPage + + // pPage->nCell must be greater than zero. If this is the root-page + // the cursor would have been INVALID above and this for(;;) loop + // not run. If this is not the root-page, then the moveToChild() routine + // would have already detected db corruption. Similarly, pPage must + // be the right kind (index or table) of b-tree page. Otherwise + // a moveToChild() or moveToRoot() call would have detected corruption. + + lwr = 0 + upr = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1 + idx = upr >> 1 // idx = (lwr+upr)/2; +__6: // Size of the pCell cell in bytes + pCell = (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) + 1))))) + + // The maximum supported page-size is 65536 bytes. This means that + // the maximum number of record bytes stored on an index B-Tree + // page is less than 16384 bytes and may be stored as a 2-byte + // varint. This information is used to attempt to avoid parsing + // the entire cell by checking for the cases where the record is + // stored entirely within the b-tree page by inspecting the first + // 2 bytes of the cell. + nCell = int32(*(*U8)(unsafe.Pointer(pCell))) + if !(nCell <= int32((*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload)) { + goto __9 + } + // This branch runs if the record-size field of the cell is a + // single byte varint and the record fits entirely on the main + // b-tree page. + + c = (*struct { + f func(*libc.TLS, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xRecordCompare})).f(tls, nCell, pCell+1, pIdxKey) + goto __10 +__9: + if !(!(int32(*(*U8)(unsafe.Pointer(pCell + 1)))&0x80 != 0) && + libc.AssignInt32(&nCell, nCell&0x7f<<7+int32(*(*U8)(unsafe.Pointer(pCell + 1)))) <= int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { + goto __11 + } + // The record-size field is a 2 byte varint and the record + // fits entirely on the main b-tree page. + + c = (*struct { + f func(*libc.TLS, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xRecordCompare})).f(tls, nCell, pCell+2, pIdxKey) + goto __12 +__11: + pCellBody = pCell - uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + nOverrun = 18 // Size of the overrun padding + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCellBody, pCur+48 /* &.info */) + nCell = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey) + // True if key size is 2^32 or more + // Invalid key size: 0x80 0x80 0x00 + // Invalid key size: 0x80 0x80 0x01 + // Minimum legal index key size + if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { + goto __13 + } + rc = Xsqlite3CorruptError(tls, 71914) + goto moveto_index_finish +__13: + ; + pCellKey = Xsqlite3Malloc(tls, uint64(nCell+nOverrun)) + if !(pCellKey == uintptr(0)) { + goto __14 + } + rc = SQLITE_NOMEM + goto moveto_index_finish +__14: + ; + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) + rc = accessPayload(tls, pCur, uint32(0), uint32(nCell), pCellKey, 0) + libc.Xmemset(tls, pCellKey+uintptr(nCell), 0, uint64(nOverrun)) // Fix uninit warnings + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) + if !(rc != 0) { + goto __15 + } + Xsqlite3_free(tls, pCellKey) + goto moveto_index_finish +__15: + ; + c = Xsqlite3VdbeRecordCompare(tls, nCell, pCellKey, pIdxKey) + Xsqlite3_free(tls, pCellKey) +__12: + ; +__10: + ; + + if !(c < 0) { + goto __16 + } + lwr = idx + 1 + goto __17 +__16: + if !(c > 0) { + goto __18 + } + upr = idx - 1 + goto __19 +__18: + ; + *(*int32)(unsafe.Pointer(pRes)) = 0 + rc = SQLITE_OK + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) + if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { + goto __20 + } + rc = Xsqlite3CorruptError(tls, 71946) +__20: + ; + goto moveto_index_finish +__19: + ; +__17: + ; + if !(lwr > upr) { + goto __21 + } + goto __8 +__21: + ; + + idx = (lwr + upr) >> 1 // idx = (lwr+upr)/2 + goto __7 +__7: + goto __6 + goto __8 +__8: + ; + + if !((*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0) { + goto __22 + } + + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) + *(*int32)(unsafe.Pointer(pRes)) = c + rc = SQLITE_OK + goto moveto_index_finish +__22: + ; + if !(lwr >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { + goto __23 + } + chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) + goto __24 +__23: + chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*lwr))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*lwr) + 1)))))) +__24: + ; + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(lwr) + rc = moveToChild(tls, pCur, chldPg) + if !(rc != 0) { + goto __25 + } + goto __5 +__25: + ; + goto __4 +__4: + goto __3 + goto __5 +__5: + ; +moveto_index_finish: + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + + return rc +} + +// Return TRUE if the cursor is not pointing at an entry of the table. +// +// TRUE will be returned after a call to sqlite3BtreeNext() moves +// past the last entry in the table or sqlite3BtreePrev() moves past +// the first entry. TRUE is also returned if the table is empty. +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ + // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries + // have been deleted? This API will need to change to return an error code + // as well as the boolean result value. + return libc.Bool32(CURSOR_VALID != int32((*BtCursor)(unsafe.Pointer(pCur)).FeState)) +} + +// Return an estimate for the number of rows in the table that pCur is +// pointing to. Return a negative number if no estimate is currently +// available. +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ + var n I64 + var i U8 + + // Currently this interface is only called by the OP_IfSmaller + // opcode, and it that case the cursor will always be valid and + // will always point to a leaf node. + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { + return int64(-1) + } + if int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fleaf) == 0 { + return int64(-1) + } + + n = I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) + for i = U8(0); int32(i) < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { + n = n * I64((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(i)*8)))).FnCell) + } + return n +} + +// Advance the cursor to the next entry in the database. +// Return value: +// +// SQLITE_OK success +// SQLITE_DONE cursor is already pointing at the last element +// otherwise some kind of error occurred +// +// The main entry point is sqlite3BtreeNext(). That routine is optimized +// for the common case of merely incrementing the cell counter BtCursor.aiIdx +// to the next cell on the current page. The (slower) btreeNext() helper +// routine is called when it is necessary to move to a different page or +// to restore the cursor. +// +// If bit 0x01 of the F argument in sqlite3BtreeNext(C,F) is 1, then the +// cursor corresponds to an SQL index and this routine could have been +// skipped if the SQL index had been a unique index. The F argument +// is a hint to the implement. SQLite btree implementation does not use +// this hint, but COMDB2 does. +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ + var rc int32 + var idx int32 + var pPage uintptr + + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { + + rc = func() int32 { + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK { + return btreeRestoreCursorPosition(tls, pCur) + } + return SQLITE_OK + }() + if rc != SQLITE_OK { + return rc + } + if CURSOR_INVALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) { + return SQLITE_DONE + } + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_SKIPNEXT { + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) + if (*BtCursor)(unsafe.Pointer(pCur)).FskipNext > 0 { + return SQLITE_OK + } + } + } + + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + idx = int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) + if !(int32((*MemPage)(unsafe.Pointer(pPage)).FisInit) != 0) || Xsqlite3FaultSim(tls, 412) != 0 { + // The only known way for this to happen is for there to be a + // recursive SQL function that does a DELETE operation as part of a + // SELECT which deletes content out from under an active cursor + // in a corrupt database file where the table being DELETE-ed from + // has pages in common with the table being queried. See TH3 + // module cov1/btree78.test testcase 220 (2018-06-08) for an + // example. + return Xsqlite3CorruptError(tls, 72069) + } + + if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8))) + if rc != 0 { + return rc + } + return moveToLeftmost(tls, pCur) + } + for __ccgo := true; __ccgo; __ccgo = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { + if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) == 0 { + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + return SQLITE_DONE + } + moveToParent(tls, pCur) + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + } + if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 { + return Xsqlite3BtreeNext(tls, pCur, 0) + } else { + return SQLITE_OK + } + } + if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { + return SQLITE_OK + } else { + return moveToLeftmost(tls, pCur) + } + return int32(0) +} + +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ + var pPage uintptr + _ = flags // Used in COMDB2 but not native SQLite + + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { + return btreeNext(tls, pCur) + } + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + if int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { + (*BtCursor)(unsafe.Pointer(pCur)).Fix-- + return btreeNext(tls, pCur) + } + if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { + return SQLITE_OK + } else { + return moveToLeftmost(tls, pCur) + } + return int32(0) +} + +// Step the cursor to the back to the previous entry in the database. +// Return values: +// +// SQLITE_OK success +// SQLITE_DONE the cursor is already on the first element of the table +// otherwise some kind of error occurred +// +// The main entry point is sqlite3BtreePrevious(). That routine is optimized +// for the common case of merely decrementing the cell counter BtCursor.aiIdx +// to the previous cell on the current page. The (slower) btreePrevious() +// helper routine is called when it is necessary to move to a different page +// or to restore the cursor. +// +// If bit 0x01 of the F argument to sqlite3BtreePrevious(C,F) is 1, then +// the cursor corresponds to an SQL index and this routine could have been +// skipped if the SQL index had been a unique index. The F argument is a +// hint to the implement. The native SQLite btree implementation does not +// use this hint, but COMDB2 does. +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ + var rc int32 + var pPage uintptr + + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { + rc = func() int32 { + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK { + return btreeRestoreCursorPosition(tls, pCur) + } + return SQLITE_OK + }() + if rc != SQLITE_OK { + return rc + } + if CURSOR_INVALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) { + return SQLITE_DONE + } + if CURSOR_SKIPNEXT == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) { + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) + if (*BtCursor)(unsafe.Pointer(pCur)).FskipNext < 0 { + return SQLITE_OK + } + } + } + + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + var idx int32 = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) + rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) + 1))))))) + if rc != 0 { + return rc + } + rc = moveToRightmost(tls, pCur) + } else { + for int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) == 0 { + if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) == 0 { + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + return SQLITE_DONE + } + moveToParent(tls, pCur) + } + + (*BtCursor)(unsafe.Pointer(pCur)).Fix-- + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 && !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + rc = Xsqlite3BtreePrevious(tls, pCur, 0) + } else { + rc = SQLITE_OK + } + } + return rc +} + +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ + + _ = flags // Used in COMDB2 but not native SQLite + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID || + int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) == 0 || + int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fleaf) == 0 { + return btreePrevious(tls, pCur) + } + (*BtCursor)(unsafe.Pointer(pCur)).Fix-- + return SQLITE_OK +} + +// Allocate a new page from the database file. +// +// The new page is marked as dirty. (In other words, sqlite3PagerWrite() +// has already been called on the new page.) The new page has also +// been referenced and the calling routine is responsible for calling +// sqlite3PagerUnref() on the new page when it is done. +// +// SQLITE_OK is returned on success. Any other return value indicates +// an error. *ppPage is set to NULL in the event of an error. +// +// If the "nearby" parameter is not 0, then an effort is made to +// locate a page close to the page number "nearby". This can be used in an +// attempt to keep related pages close to each other in the database file, +// which in turn can make database access faster. +// +// If the eMode parameter is BTALLOC_EXACT and the nearby page exists +// anywhere on the free-list, then it is guaranteed to be returned. If +// eMode is BTALLOC_LT then the page returned will be less than or equal +// to nearby if any such page exists. If eMode is BTALLOC_ANY then there +// are no restrictions on which page is returned. +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pPage1 uintptr + var rc int32 + var n U32 // Number of pages on the freelist + var k U32 // Number of leaves on the trunk of the freelist + // var pTrunk uintptr at bp+8, 8 + + var pPrevTrunk uintptr + var mxPage Pgno + // var eType U8 at bp, 1 + + // The trunk page is required by the caller but it contains + // pointers to free-list leaves. The first leaf becomes a trunk + // page in this case. + // var pNewTrunk uintptr at bp+16, 8 + + var iNewTrunk Pgno + var d2 int32 + var dist int32 + var i U32 + var noContent int32 + // Extract a leaf from the trunk + var closest U32 + var iPage Pgno + var aData uintptr + // There are pages on the freelist. Reuse one of those pages. + var iTrunk Pgno + var searchList U8 // If the free-list must be searched for 'nearby' + var nSearch U32 + // If *pPgno refers to a pointer-map page, allocate two new pages + // at the end of the file instead of one. The first allocated page + // becomes a new pointer-map page, the second is used by the caller. + // var pPg uintptr at bp+24, 8 + + // There are no pages on the freelist, so append a new page to the + // database image. + // + // Normally, new pages allocated by this block can be requested from the + // pager layer with the 'no-content' flag set. This prevents the pager + // from trying to read the pages content from disk. However, if the + // current transaction has already run one or more incremental-vacuum + // steps, then the page we are about to allocate may contain content + // that is required in the event of a rollback. In this case, do + // not set the no-content flag. This causes the pager to load and journal + // the current page content before overwriting it. + // + // Note that the pager will not actually attempt to load or journal + // content for any page that really does lie past the end of the database + // file on disk. So the effects of disabling the no-content optimization + // here are confined to those pages that lie between the end of the + // database image and the end of the database file. + var bNoContent int32 + *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) + pPrevTrunk = uintptr(0) // Total size of the database file + + pPage1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 + mxPage = btreePagecount(tls, pBt) + // EVIDENCE-OF: R-05119-02637 The 4-byte big-endian integer at offset 36 + // stores stores the total number of pages on the freelist. + n = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36) + + if !(n >= mxPage) { + goto __1 + } + return Xsqlite3CorruptError(tls, 72249) +__1: + ; + if !(n > U32(0)) { + goto __2 + } + searchList = U8(0) // If the free-list must be searched for 'nearby' + nSearch = U32(0) // Count of the number of search attempts + + // If eMode==BTALLOC_EXACT and a query of the pointer-map + // shows that the page 'nearby' is somewhere on the free-list, then + // the entire-list will be searched for that page. + if !(int32(eMode) == BTALLOC_EXACT) { + goto __4 + } + if !(nearby <= mxPage) { + goto __6 + } + + rc = ptrmapGet(tls, pBt, nearby, bp, uintptr(0)) + if !(rc != 0) { + goto __7 + } + return rc +__7: + ; + if !(int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE) { + goto __8 + } + searchList = U8(1) +__8: + ; +__6: + ; + goto __5 +__4: + if !(int32(eMode) == BTALLOC_LE) { + goto __9 + } + searchList = U8(1) +__9: + ; +__5: + ; + + // Decrement the free-list count by 1. Set iTrunk to the index of the + // first free-list trunk page. iPrevTrunk is initially 1. + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage1)).FpDbPage) + if !(rc != 0) { + goto __10 + } + return rc +__10: + ; + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36, n-U32(1)) + + // The code within this loop is run only once if the 'searchList' variable + // is not true. Otherwise, it runs once for each trunk-page on the + // free-list until the page 'nearby' is located (eMode==BTALLOC_EXACT) + // or until a page less than 'nearby' is located (eMode==BTALLOC_LT) +__11: + pPrevTrunk = *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) + if !(pPrevTrunk != 0) { + goto __14 + } + // EVIDENCE-OF: R-01506-11053 The first integer on a freelist trunk page + // is the page number of the next freelist trunk page in the list or + // zero if this is the last freelist trunk page. + iTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FaData) + goto __15 +__14: + // EVIDENCE-OF: R-59841-13798 The 4-byte big-endian integer at offset 32 + // stores the page number of the first page of the freelist, or zero if + // the freelist is empty. + iTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32) +__15: + ; + + if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { + goto __16 + } + rc = Xsqlite3CorruptError(tls, 72305) + goto __17 +__16: + rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) +__17: + ; + if !(rc != 0) { + goto __18 + } + *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) + goto end_allocate_page +__18: + ; + + // EVIDENCE-OF: R-13523-04394 The second integer on a freelist trunk page + // is the number of leaf page pointers to follow. + k = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData+4) + if !(k == U32(0) && !(searchList != 0)) { + goto __19 + } + // The trunk has no leaves and the list is not being searched. + // So extract the trunk page itself and use it as the newly + // allocated page + + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FpDbPage) + if !(rc != 0) { + goto __21 + } + goto end_allocate_page +__21: + ; + *(*Pgno)(unsafe.Pointer(pPgno)) = iTrunk + libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) + *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) + + goto __20 +__19: + if !(k > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { + goto __22 + } + // Value of k is out of range. Database corruption + rc = Xsqlite3CorruptError(tls, 72334) + goto end_allocate_page + goto __23 +__22: + if !(searchList != 0 && + (nearby == iTrunk || iTrunk < nearby && int32(eMode) == BTALLOC_LE)) { + goto __24 + } + // The list is being searched and this trunk page is the page + // to allocate, regardless of whether it has leaves. + *(*Pgno)(unsafe.Pointer(pPgno)) = iTrunk + *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) + searchList = U8(0) + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FpDbPage) + if !(rc != 0) { + goto __26 + } + goto end_allocate_page +__26: + ; + if !(k == U32(0)) { + goto __27 + } + if !!(pPrevTrunk != 0) { + goto __29 + } + libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) + goto __30 +__29: + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FpDbPage) + if !(rc != SQLITE_OK) { + goto __31 + } + goto end_allocate_page +__31: + ; + libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FaData, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) +__30: + ; + goto __28 +__27: + iNewTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData+8) + if !(iNewTrunk > mxPage) { + goto __32 + } + rc = Xsqlite3CorruptError(tls, 72368) + goto end_allocate_page +__32: + ; + + rc = btreeGetUnusedPage(tls, pBt, iNewTrunk, bp+16, 0) + if !(rc != SQLITE_OK) { + goto __33 + } + goto end_allocate_page +__33: + ; + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pNewTrunk */)))).FpDbPage) + if !(rc != SQLITE_OK) { + goto __34 + } + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pNewTrunk */))) + goto end_allocate_page +__34: + ; + libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+4, k-U32(1)) + libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+8, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData+12, uint64((k-U32(1))*U32(4))) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pNewTrunk */))) + if !!(pPrevTrunk != 0) { + goto __35 + } + + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, iNewTrunk) + goto __36 +__35: + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FpDbPage) + if !(rc != 0) { + goto __37 + } + goto end_allocate_page +__37: + ; + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FaData, iNewTrunk) +__36: + ; +__28: + ; + *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) + + goto __25 +__24: + if !(k > U32(0)) { + goto __38 + } + aData = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FaData + if !(nearby > Pgno(0)) { + goto __39 + } + closest = U32(0) + if !(int32(eMode) == BTALLOC_LE) { + goto __41 + } + i = U32(0) +__43: + if !(i < k) { + goto __45 + } + iPage = Xsqlite3Get4byte(tls, aData+uintptr(U32(8)+i*U32(4))) + if !(iPage <= nearby) { + goto __46 + } + closest = i + goto __45 +__46: + ; + goto __44 +__44: + i++ + goto __43 + goto __45 +__45: + ; + goto __42 +__41: + dist = Xsqlite3AbsInt32(tls, int32(Xsqlite3Get4byte(tls, aData+8)-nearby)) + i = U32(1) +__47: + if !(i < k) { + goto __49 + } + d2 = Xsqlite3AbsInt32(tls, int32(Xsqlite3Get4byte(tls, aData+uintptr(U32(8)+i*U32(4)))-nearby)) + if !(d2 < dist) { + goto __50 + } + closest = i + dist = d2 +__50: + ; + goto __48 +__48: + i++ + goto __47 + goto __49 +__49: + ; +__42: + ; + goto __40 +__39: + closest = U32(0) +__40: + ; + + iPage = Xsqlite3Get4byte(tls, aData+uintptr(U32(8)+closest*U32(4))) + + if !(iPage > mxPage || iPage < Pgno(2)) { + goto __51 + } + rc = Xsqlite3CorruptError(tls, 72433) + goto end_allocate_page +__51: + ; + + if !(!(searchList != 0) || + (iPage == nearby || iPage < nearby && int32(eMode) == BTALLOC_LE)) { + goto __52 + } + *(*Pgno)(unsafe.Pointer(pPgno)) = iPage + + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FpDbPage) + if !(rc != 0) { + goto __53 + } + goto end_allocate_page +__53: + ; + if !(closest < k-U32(1)) { + goto __54 + } + libc.Xmemcpy(tls, aData+uintptr(U32(8)+closest*U32(4)), aData+uintptr(U32(4)+k*U32(4)), uint64(4)) +__54: + ; + Xsqlite3Put4byte(tls, aData+4, k-U32(1)) + if !(btreeGetHasContent(tls, pBt, *(*Pgno)(unsafe.Pointer(pPgno))) != 0) { + noContent = PAGER_GET_NOCONTENT + } else { + noContent = 0 + } + rc = btreeGetUnusedPage(tls, pBt, *(*Pgno)(unsafe.Pointer(pPgno)), ppPage, noContent) + if !(rc == SQLITE_OK) { + goto __55 + } + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) + if !(rc != SQLITE_OK) { + goto __56 + } + releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) +__56: + ; +__55: + ; + searchList = U8(0) +__52: + ; +__38: + ; +__25: + ; +__23: + ; +__20: + ; + releasePage(tls, pPrevTrunk) + pPrevTrunk = uintptr(0) + goto __12 +__12: + if searchList != 0 { + goto __11 + } + goto __13 +__13: + ; + goto __3 +__2: + // There are no pages on the freelist, so append a new page to the + // database image. + // + // Normally, new pages allocated by this block can be requested from the + // pager layer with the 'no-content' flag set. This prevents the pager + // from trying to read the pages content from disk. However, if the + // current transaction has already run one or more incremental-vacuum + // steps, then the page we are about to allocate may contain content + // that is required in the event of a rollback. In this case, do + // not set the no-content flag. This causes the pager to load and journal + // the current page content before overwriting it. + // + // Note that the pager will not actually attempt to load or journal + // content for any page that really does lie past the end of the database + // file on disk. So the effects of disabling the no-content optimization + // here are confined to those pages that lie between the end of the + // database image and the end of the database file. + if 0 == int32((*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate) { + bNoContent = PAGER_GET_NOCONTENT + } else { + bNoContent = 0 + } + + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) + if !(rc != 0) { + goto __57 + } + return rc +__57: + ; + (*BtShared)(unsafe.Pointer(pBt)).FnPage++ + if !((*BtShared)(unsafe.Pointer(pBt)).FnPage == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1)) { + goto __58 + } + (*BtShared)(unsafe.Pointer(pBt)).FnPage++ +__58: + ; + + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && ptrmapPageno(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FnPage) == (*BtShared)(unsafe.Pointer(pBt)).FnPage) { + goto __59 + } + // If *pPgno refers to a pointer-map page, allocate two new pages + // at the end of the file instead of one. The first allocated page + // becomes a new pointer-map page, the second is used by the caller. + *(*uintptr)(unsafe.Pointer(bp + 24 /* pPg */)) = uintptr(0) + + rc = btreeGetUnusedPage(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FnPage, bp+24, bNoContent) + if !(rc == SQLITE_OK) { + goto __60 + } + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pPg */)))).FpDbPage) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPg */))) +__60: + ; + if !(rc != 0) { + goto __61 + } + return rc +__61: + ; + (*BtShared)(unsafe.Pointer(pBt)).FnPage++ + if !((*BtShared)(unsafe.Pointer(pBt)).FnPage == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1)) { + goto __62 + } + (*BtShared)(unsafe.Pointer(pBt)).FnPage++ +__62: + ; +__59: + ; + Xsqlite3Put4byte(tls, uintptr(28)+(*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData, (*BtShared)(unsafe.Pointer(pBt)).FnPage) + *(*Pgno)(unsafe.Pointer(pPgno)) = (*BtShared)(unsafe.Pointer(pBt)).FnPage + + rc = btreeGetUnusedPage(tls, pBt, *(*Pgno)(unsafe.Pointer(pPgno)), ppPage, bNoContent) + if !(rc != 0) { + goto __63 + } + return rc +__63: + ; + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) + if !(rc != SQLITE_OK) { + goto __64 + } + releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) + *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) +__64: + ; + +__3: + ; + +end_allocate_page: + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */))) + releasePage(tls, pPrevTrunk) + + return rc +} + +// This function is used to add page iPage to the database file free-list. +// It is assumed that the page is not already a part of the free-list. +// +// The value passed as the second argument to this function is optional. +// If the caller happens to have a pointer to the MemPage object +// corresponding to page iPage handy, it may pass it as the second value. +// Otherwise, it may pass NULL. +// +// If a pointer to a MemPage object is passed as the second argument, +// its reference count is not altered by this function. +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + // var pTrunk uintptr at bp+16, 8 + // Free-list trunk page + var iTrunk Pgno // Page number of free-list trunk page + var pPage1 uintptr // Local reference to page 1 + // var pPage uintptr at bp, 8 + // Page being freed. May be NULL. + // var rc int32 at bp+8, 4 + // Return Code + var nFree U32 + var nLeaf U32 + *(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */)) = uintptr(0) + iTrunk = Pgno(0) + pPage1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 // Initial number of pages on free-list + + if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { + goto __1 + } + return Xsqlite3CorruptError(tls, 72560) +__1: + ; + if !(pMemPage != 0) { + goto __2 + } + *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = pMemPage + Xsqlite3PagerRef(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) + goto __3 +__2: + *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = btreePageLookup(tls, pBt, iPage) +__3: + ; + + // Increment the free page count on pPage1 + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage1)).FpDbPage) + if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) { + goto __4 + } + goto freepage_out +__4: + ; + nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36, nFree+U32(1)) + + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_SECURE_DELETE != 0) { + goto __5 + } + // If the secure_delete option is enabled, then + // always fully overwrite deleted information with zeros. + if !(!(*(*uintptr)(unsafe.Pointer(bp)) != 0) && libc.AssignPtrInt32(bp+8, btreeGetPage(tls, pBt, iPage, bp, 0)) != 0 || + libc.AssignPtrInt32(bp+8, Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage)) != 0) { + goto __6 + } + goto freepage_out +__6: + ; + libc.Xmemset(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData, 0, uint64((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpBt)).FpageSize)) +__5: + ; + + // If the database supports auto-vacuum, write an entry in the pointer-map + // to indicate that the page is free. + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { + goto __7 + } + ptrmapPut(tls, pBt, iPage, uint8(PTRMAP_FREEPAGE), uint32(0), bp+8) + if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) { + goto __8 + } + goto freepage_out +__8: + ; +__7: + ; + + // Now manipulate the actual database free-list structure. There are two + // possibilities. If the free-list is currently empty, or if the first + // trunk page in the free-list is full, then this page will become a + // new free-list trunk page. Otherwise, it will become a leaf of the + // first trunk page in the current free-list. This block tests if it + // is possible to add the page as a new free-list leaf. + if !(nFree != U32(0)) { + goto __9 + } // Initial number of leaf cells on trunk page + + iTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32) + if !(iTrunk > btreePagecount(tls, pBt)) { + goto __10 + } + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) + goto freepage_out +__10: + ; + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, iTrunk, bp+16, 0) + if !(*(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK) { + goto __11 + } + goto freepage_out +__11: + ; + + nLeaf = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+4) + + if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { + goto __12 + } + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) + goto freepage_out +__12: + ; + if !(nLeaf < (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(8)) { + goto __13 + } + // In this case there is room on the trunk page to insert the page + // being freed as a new leaf. + // + // Note that the trunk page is not really full until it contains + // usableSize/4 - 2 entries, not usableSize/4 - 8 entries as we have + // coded. But due to a coding error in versions of SQLite prior to + // 3.6.0, databases with freelist trunk pages holding more than + // usableSize/4 - 8 entries will be reported as corrupt. In order + // to maintain backwards compatibility with older versions of SQLite, + // we will continue to restrict the number of entries to usableSize/4 - 8 + // for now. At some point in the future (once everyone has upgraded + // to 3.6.0 or later) we should consider fixing the conditional above + // to read "usableSize/4-2" instead of "usableSize/4-8". + // + // EVIDENCE-OF: R-19920-11576 However, newer versions of SQLite still + // avoid using the last six entries in the freelist trunk page array in + // order that database files created by newer versions of SQLite can be + // read by older versions of SQLite. + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */)))).FpDbPage) + if !(*(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK) { + goto __14 + } + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+4, nLeaf+U32(1)) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+uintptr(U32(8)+nLeaf*U32(4)), iPage) + if !(*(*uintptr)(unsafe.Pointer(bp)) != 0 && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_SECURE_DELETE == 0) { + goto __15 + } + Xsqlite3PagerDontWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) +__15: + ; + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeSetHasContent(tls, pBt, iPage) +__14: + ; + + goto freepage_out +__13: + ; +__9: + ; + + // If control flows to this point, then it was not possible to add the + // the page being freed as a leaf page of the first trunk in the free-list. + // Possibly because the free-list is empty, or possibly because the + // first trunk in the free-list is full. Either way, the page being freed + // will become the new first trunk page in the free-list. + if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) && SQLITE_OK != libc.AssignPtrInt32(bp+8, btreeGetPage(tls, pBt, iPage, bp, 0))) { + goto __16 + } + goto freepage_out +__16: + ; + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) + if !(*(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK) { + goto __17 + } + goto freepage_out +__17: + ; + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData, iTrunk) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+4, uint32(0)) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, iPage) + +freepage_out: + if !(*(*uintptr)(unsafe.Pointer(bp)) != 0) { + goto __18 + } + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FisInit = U8(0) +__18: + ; + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + 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:72681:13: */ + if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) + } +} + +// Free the overflow pages associated with the given Cell. +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var pBt uintptr + var ovflPgno Pgno + var rc int32 + var nOvfl int32 + var ovflPageSize U32 + + if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { + // Cell extends past end of page + return Xsqlite3CorruptError(tls, 72707) + } + ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) + pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt + + ovflPageSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) + nOvfl = int32(((*CellInfo)(unsafe.Pointer(pInfo)).FnPayload - U32((*CellInfo)(unsafe.Pointer(pInfo)).FnLocal) + ovflPageSize - U32(1)) / ovflPageSize) + + for libc.PostDecInt32(&nOvfl, 1) != 0 { + *(*Pgno)(unsafe.Pointer(bp + 8 /* iNext */)) = Pgno(0) + *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)) = uintptr(0) + if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { + // 0 is not a legal page number and page 1 cannot be an + // overflow page. Therefore if ovflPgno<2 or past the end of the + // file the database must be corrupt. + return Xsqlite3CorruptError(tls, 72724) + } + if nOvfl != 0 { + rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) + if rc != 0 { + return rc + } + } + + if (*(*uintptr)(unsafe.Pointer(bp)) != 0 || libc.AssignPtrUintptr(bp, btreePageLookup(tls, pBt, ovflPgno)) != uintptr(0)) && + Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 { + // There is no reason any cursor should have an outstanding reference + // to an overflow page belonging to a cell that is being deleted/updated. + // So if there exists more than one reference to this page, then it + // must not really be an overflow page and the database must be corrupt. + // It is helpful to detect this before calling freePage2(), as + // freePage2() may zero the page contents if secure-delete mode is + // enabled. If this 'overflow' page happens to be a page that the + // caller is iterating through or using in some other way, this + // can be problematic. + rc = Xsqlite3CorruptError(tls, 72744) + } else { + rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) + } + + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + Xsqlite3PagerUnref(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pOvfl */)))).FpDbPage) + } + if rc != 0 { + return rc + } + ovflPgno = *(*Pgno)(unsafe.Pointer(bp + 8 /* iNext */)) + } + return SQLITE_OK +} + +// Call xParseCell to compute the size of a cell. If the cell contains +// overflow, then invoke cellClearOverflow to clear out that overflow. +// STore the result code (SQLITE_OK or some error code) in rc. +// +// Implemented as macro to force inlining for performance. + +// Create the byte sequence used to represent a cell on page pPage +// and write that byte sequence into pCell[]. Overflow pages are +// allocated and filled in as necessary. The calling procedure +// is responsible for making sure sufficient space has been allocated +// for pCell[]. +// +// Note that pCell does not necessary need to point to the pPage->aData +// area. pCell might point to some temporary storage. The cell will +// be constructed in this temporary area then copied into pPage->aData +// later. +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var nPayload int32 + var pSrc uintptr + var nSrc int32 + var n int32 + // var rc int32 at bp+12, 4 + + var mn int32 + var spaceLeft int32 + var pToRelease uintptr + var pPrior uintptr + var pPayload uintptr + var pBt uintptr + // var pgnoOvfl Pgno at bp+8, 4 + + var nHeader int32 + + // pPage is not necessarily writeable since pCell might be auxiliary + // buffer space that is separate from the pPage buffer area + + // Fill in the header. + nHeader = int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 { + nPayload = (*BtreePayload)(unsafe.Pointer(pX)).FnData + (*BtreePayload)(unsafe.Pointer(pX)).FnZero + pSrc = (*BtreePayload)(unsafe.Pointer(pX)).FpData + nSrc = (*BtreePayload)(unsafe.Pointer(pX)).FnData + // fillInCell() only called for leaves + nHeader = nHeader + int32(func() uint8 { + if U32(nPayload) < U32(0x80) { + return uint8(func() int32 { *(*uint8)(unsafe.Pointer(pCell + uintptr(nHeader))) = uint8(nPayload); return 1 }()) + } + return uint8(Xsqlite3PutVarint(tls, pCell+uintptr(nHeader), uint64(nPayload))) + }()) + nHeader = nHeader + Xsqlite3PutVarint(tls, pCell+uintptr(nHeader), *(*U64)(unsafe.Pointer(pX + 8))) + } else { + + nSrc = libc.AssignInt32(&nPayload, int32((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) + pSrc = (*BtreePayload)(unsafe.Pointer(pX)).FpKey + nHeader = nHeader + int32(func() uint8 { + if U32(nPayload) < U32(0x80) { + return uint8(func() int32 { *(*uint8)(unsafe.Pointer(pCell + uintptr(nHeader))) = uint8(nPayload); return 1 }()) + } + return uint8(Xsqlite3PutVarint(tls, pCell+uintptr(nHeader), uint64(nPayload))) + }()) + } + + // Fill in the payload + pPayload = pCell + uintptr(nHeader) + if nPayload <= int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { + // This is the common case where everything fits on the btree page + // and no overflow pages are required. + n = nHeader + nPayload + + if n < 4 { + n = 4 + } + *(*int32)(unsafe.Pointer(pnSize)) = n + + libc.Xmemcpy(tls, pPayload, pSrc, uint64(nSrc)) + libc.Xmemset(tls, pPayload+uintptr(nSrc), 0, uint64(nPayload-nSrc)) + return SQLITE_OK + } + + // If we reach this point, it means that some of the content will need + // to spill onto overflow pages. + mn = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) + n = int32(U32(mn) + U32(nPayload-mn)%((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4))) + + if n > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { + n = mn + } + spaceLeft = n + *(*int32)(unsafe.Pointer(pnSize)) = n + nHeader + 4 + pPrior = pCell + uintptr(nHeader+n) + pToRelease = uintptr(0) + *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)) = Pgno(0) + pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt + + // At this point variables should be set as follows: + // + // nPayload Total payload size in bytes + // pPayload Begin writing payload here + // spaceLeft Space available at pPayload. If nPayload>spaceLeft, + // that means content must spill into overflow pages. + // *pnSize Size of the local cell (not counting overflow pages) + // pPrior Where to write the pgno of the first overflow page + // + // Use a call to btreeParseCellPtr() to verify that the values above + // were computed correctly. + + // Write the payload into the local Cell and any extra into overflow pages + for 1 != 0 { + n = nPayload + if n > spaceLeft { + n = spaceLeft + } + + // If pToRelease is not zero than pPayload points into the data area + // of pToRelease. Make sure pToRelease is still writeable. + + // If pPayload is part of the data area of pPage, then make sure pPage + // is still writeable + + if nSrc >= n { + libc.Xmemcpy(tls, pPayload, pSrc, uint64(n)) + } else if nSrc > 0 { + n = nSrc + libc.Xmemcpy(tls, pPayload, pSrc, uint64(n)) + } else { + libc.Xmemset(tls, pPayload, 0, uint64(n)) + } + nPayload = nPayload - n + if nPayload <= 0 { + break + } + pPayload += uintptr(n) + pSrc += uintptr(n) + nSrc = nSrc - n + spaceLeft = spaceLeft - n + if spaceLeft == 0 { + *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)) = uintptr(0) + var pgnoPtrmap Pgno = *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)) // Overflow page pointer-map entry page + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + for __ccgo := true; __ccgo; __ccgo = ptrmapPageno(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8))) == *(*Pgno)(unsafe.Pointer(bp + 8)) || *(*Pgno)(unsafe.Pointer(bp + 8)) == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */))++ + } + } + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+8, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)), uint8(0)) + // If the database supports auto-vacuum, and the second or subsequent + // overflow page is being allocated, add an entry to the pointer-map + // for that page now. + // + // If this is the first overflow page, then write a partial entry + // to the pointer-map. If we write nothing to this pointer-map slot, + // then the optimistic overflow chain processing in clearCell() + // may misinterpret the uninitialized values and delete the + // wrong pages from the database. + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { + var eType U8 = func() uint8 { + if pgnoPtrmap != 0 { + return uint8(PTRMAP_OVERFLOW2) + } + return uint8(PTRMAP_OVERFLOW1) + }() + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)), eType, pgnoPtrmap, bp+12) + if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */))) + } + } + if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { + releasePage(tls, pToRelease) + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + + // If pToRelease is not zero than pPrior points into the data area + // of pToRelease. Make sure pToRelease is still writeable. + + // If pPrior is part of the data area of pPage, then make sure pPage + // is still writeable + + Xsqlite3Put4byte(tls, pPrior, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */))) + releasePage(tls, pToRelease) + pToRelease = *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)) + pPrior = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pOvfl */)))).FaData + Xsqlite3Put4byte(tls, pPrior, uint32(0)) + pPayload = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData + 4 + spaceLeft = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4)) + } + } + releasePage(tls, pToRelease) + return SQLITE_OK +} + +// Remove the i-th cell from pPage. This routine effects pPage only. +// The cell content is not freed or deallocated. It is assumed that +// the cell content has been copied someplace else. This routine just +// removes the reference to the cell from pPage. +// +// "sz" must be the number of bytes in the cell. +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ + var pc U32 // Offset to cell content of cell being deleted + var data uintptr // pPage->aData + var ptr uintptr // Used to move bytes around within data[] + var rc int32 // The return code + var hdr int32 // Beginning of the header. 0 most pages. 100 page 1 + + if *(*int32)(unsafe.Pointer(pRC)) != 0 { + return + } + + data = (*MemPage)(unsafe.Pointer(pPage)).FaData + ptr = (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) + + pc = U32(int32(*(*U8)(unsafe.Pointer(ptr)))<<8 | int32(*(*U8)(unsafe.Pointer(ptr + 1)))) + hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + + if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) + return + } + rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) + if rc != 0 { + *(*int32)(unsafe.Pointer(pRC)) = rc + return + } + (*MemPage)(unsafe.Pointer(pPage)).FnCell-- + if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { + libc.Xmemset(tls, data+uintptr(hdr+1), 0, uint64(4)) + *(*U8)(unsafe.Pointer(data + uintptr(hdr+7))) = U8(0) + *(*U8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize >> 8) + *(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize - U32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) - + U32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) - U32(8)) + } else { + libc.Xmemmove(tls, ptr, ptr+uintptr(2), uint64(2*(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)-idx))) + *(*U8)(unsafe.Pointer(data + uintptr(hdr+3))) = U8(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) >> 8) + *(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1)) = U8((*MemPage)(unsafe.Pointer(pPage)).FnCell) + *(*int32)(unsafe.Pointer(pPage + 20)) += 2 + } +} + +// Insert a new cell on pPage at cell index "i". pCell points to the +// content of the cell. +// +// If the cell content will fit on the page, then put it there. If it +// will not fit, then make a copy of the cell content into pTemp if +// pTemp is not null. Regardless of pTemp, allocate a new entry +// in pPage->apOvfl[] and make it point to the cell content (either +// in pTemp or the original pCell) and also record its index. +// Allocating a new entry in pPage->aCell[] implies that +// pPage->nOverflow is incremented. +// +// *pRC must be SQLITE_OK when this routine is called. +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* idx */)) = 0 // Where to write new cell content in data[] + var j int32 // Loop counter + var data uintptr // The content of the whole page + var pIns uintptr // The point in pPage->aCellIdx[] where no cell inserted + + if (*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0 || sz+2 > (*MemPage)(unsafe.Pointer(pPage)).FnFree { + if pTemp != 0 { + libc.Xmemcpy(tls, pTemp, pCell, uint64(sz)) + pCell = pTemp + } + if iChild != 0 { + Xsqlite3Put4byte(tls, pCell, iChild) + } + j = int32(libc.PostIncUint8(&(*MemPage)(unsafe.Pointer(pPage)).FnOverflow, 1)) + // Comparison against ArraySize-1 since we hold back one extra slot + // as a contingency. In other words, never need more than 3 overflow + // slots but 4 are allocated, just to be safe. + + *(*uintptr)(unsafe.Pointer(pPage + 40 + uintptr(j)*8)) = pCell + *(*U16)(unsafe.Pointer(pPage + 28 + uintptr(j)*2)) = U16(i) + + // When multiple overflows occur, they are always sequential and in + // sorted order. This invariants arise because multiple overflows can + // only occur when inserting divider cells into the parent page during + // balancing, and the dividers are adjacent and sorted. + // Overflows in sorted order + // Overflows are sequential + } else { + var rc int32 = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) + if rc != SQLITE_OK { + *(*int32)(unsafe.Pointer(pRC)) = rc + return + } + + data = (*MemPage)(unsafe.Pointer(pPage)).FaData + + rc = allocateSpace(tls, pPage, sz, bp) + if rc != 0 { + *(*int32)(unsafe.Pointer(pRC)) = rc + return + } + // The allocateSpace() routine guarantees the following properties + // if it returns successfully + + *(*int32)(unsafe.Pointer(pPage + 20)) -= int32(U16(2 + sz)) + if iChild != 0 { + // In a corrupt database where an entry in the cell index section of + // a btree page has a value of 3 or less, the pCell value might point + // as many as 4 bytes in front of the start of the aData buffer for + // the source page. Make sure this does not cause problems by not + // reading the first 4 bytes + libc.Xmemcpy(tls, data+uintptr(*(*int32)(unsafe.Pointer(bp))+4), pCell+uintptr(4), uint64(sz-4)) + Xsqlite3Put4byte(tls, data+uintptr(*(*int32)(unsafe.Pointer(bp))), iChild) + } else { + libc.Xmemcpy(tls, data+uintptr(*(*int32)(unsafe.Pointer(bp))), pCell, uint64(sz)) + } + pIns = (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(i*2) + libc.Xmemmove(tls, pIns+uintptr(2), pIns, uint64(2*(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)-i))) + *(*U8)(unsafe.Pointer(pIns)) = U8(*(*int32)(unsafe.Pointer(bp)) >> 8) + *(*U8)(unsafe.Pointer(pIns + 1)) = U8(*(*int32)(unsafe.Pointer(bp))) + (*MemPage)(unsafe.Pointer(pPage)).FnCell++ + // increment the cell count + if int32(libc.PreIncUint8(&*(*U8)(unsafe.Pointer(data + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+4))), 1)) == 0 { + *(*U8)(unsafe.Pointer(data + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+3)))++ + } + + if (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FautoVacuum != 0 { + // The cell may contain a pointer to an overflow page. If so, write + // the entry for the overflow page into the pointer map. + ptrmapPutOvflPtr(tls, pPage, pPage, pCell, pRC) + } + } +} + +// The following parameters determine how many adjacent pages get involved +// in a balancing operation. NN is the number of neighbors on either side +// of the page that participate in the balancing operation. NB is the +// total number of pages that participate, including the target page and +// NN neighbors on either side. +// +// The minimum value of NN is 1 (of course). Increasing NN above 1 +// (to 2 or 3) gives a modest improvement in SELECT and DELETE performance +// in exchange for a larger degradation in INSERT and UPDATE performance. +// The value of NN appears to give the best results overall. +// +// (Later:) The description above makes it seem as if these values are +// tunable - as if you could change them and recompile and it would all work. +// But that is unlikely. NB has been 3 since the inception of SQLite and +// we have never tested any other value. + +// A CellArray object contains a cache of pointers and sizes for a +// consecutive sequence of cells that might be held on multiple pages. +// +// The cells in this array are the divider cell or cells from the pParent +// page plus up to three child pages. There are a total of nCell cells. +// +// pRef is a pointer to one of the pages that contributes cells. This is +// used to access information such as MemPage.intKey and MemPage.pBt->pageSize +// which should be common to all pages that contribute cells to this array. +// +// apCell[] and szCell[] hold, respectively, pointers to the start of each +// cell and the size of each cell. Some of the apCell[] pointers might refer +// to overflow cells. In other words, some apCel[] pointers might not point +// to content area of the pages. +// +// A szCell[] of zero means the size of that cell has not yet been computed. +// +// The cells come from as many as four different pages: +// +// ----------- +// | Parent | +// ----------- +// / | ** / | ** --------- --------- --------- +// |Child-1| |Child-2| |Child-3| +// --------- --------- --------- +// +// The order of cells is in the array is for an index btree is: +// +// 1. All cells from Child-1 in order +// 2. The first divider cell from Parent +// 3. All cells from Child-2 in order +// 4. The second divider cell from Parent +// 5. All cells from Child-3 in order +// +// For a table-btree (with rowids) the items 2 and 4 are empty because +// content exists only in leaves and there are no divider cells. +// +// For an index btree, the apEnd[] array holds pointer to the end of page +// for Child-1, the Parent, Child-2, the Parent (again), and Child-3, +// respectively. The ixNx[] array holds the number of cells contained in +// each of these 5 stages, and all stages to the left. Hence: +// +// ixNx[0] = Number of cells in Child-1. +// ixNx[1] = Number of cells in Child-1 plus 1 for first divider. +// ixNx[2] = Number of cells in Child-1 and Child-2 + 1 for 1st divider. +// ixNx[3] = Number of cells in Child-1 and Child-2 + both divider cells +// ixNx[4] = Total number of cells. +// +// For a table-btree, the concept is similar, except only apEnd[0]..apEnd[2] +// are used and they point to the leaf pages only, and the ixNx value are: +// +// ixNx[0] = Number of cells in Child-1. +// ixNx[1] = Number of cells in Child-1 and Child-2. +// ixNx[2] = Total number of cells. +// +// Sometimes when deleting, a child page can have zero cells. In those +// cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] +// entries, shift down. The end result is that each ixNx[] entry should +// be larger than the previous +type CellArray1 = struct { + FnCell int32 + F__ccgo_pad1 [4]byte + FpRef uintptr + FapCell uintptr + FszCell uintptr + FapEnd [6]uintptr + FixNx [6]int32 +} /* sqlite3.c:73214:9 */ + +// The following parameters determine how many adjacent pages get involved +// in a balancing operation. NN is the number of neighbors on either side +// of the page that participate in the balancing operation. NB is the +// total number of pages that participate, including the target page and +// NN neighbors on either side. +// +// The minimum value of NN is 1 (of course). Increasing NN above 1 +// (to 2 or 3) gives a modest improvement in SELECT and DELETE performance +// in exchange for a larger degradation in INSERT and UPDATE performance. +// The value of NN appears to give the best results overall. +// +// (Later:) The description above makes it seem as if these values are +// tunable - as if you could change them and recompile and it would all work. +// But that is unlikely. NB has been 3 since the inception of SQLite and +// we have never tested any other value. + +// A CellArray object contains a cache of pointers and sizes for a +// consecutive sequence of cells that might be held on multiple pages. +// +// The cells in this array are the divider cell or cells from the pParent +// page plus up to three child pages. There are a total of nCell cells. +// +// pRef is a pointer to one of the pages that contributes cells. This is +// used to access information such as MemPage.intKey and MemPage.pBt->pageSize +// which should be common to all pages that contribute cells to this array. +// +// apCell[] and szCell[] hold, respectively, pointers to the start of each +// cell and the size of each cell. Some of the apCell[] pointers might refer +// to overflow cells. In other words, some apCel[] pointers might not point +// to content area of the pages. +// +// A szCell[] of zero means the size of that cell has not yet been computed. +// +// The cells come from as many as four different pages: +// +// ----------- +// | Parent | +// ----------- +// / | ** / | ** --------- --------- --------- +// |Child-1| |Child-2| |Child-3| +// --------- --------- --------- +// +// The order of cells is in the array is for an index btree is: +// +// 1. All cells from Child-1 in order +// 2. The first divider cell from Parent +// 3. All cells from Child-2 in order +// 4. The second divider cell from Parent +// 5. All cells from Child-3 in order +// +// For a table-btree (with rowids) the items 2 and 4 are empty because +// content exists only in leaves and there are no divider cells. +// +// For an index btree, the apEnd[] array holds pointer to the end of page +// for Child-1, the Parent, Child-2, the Parent (again), and Child-3, +// respectively. The ixNx[] array holds the number of cells contained in +// each of these 5 stages, and all stages to the left. Hence: +// +// ixNx[0] = Number of cells in Child-1. +// ixNx[1] = Number of cells in Child-1 plus 1 for first divider. +// ixNx[2] = Number of cells in Child-1 and Child-2 + 1 for 1st divider. +// ixNx[3] = Number of cells in Child-1 and Child-2 + both divider cells +// ixNx[4] = Total number of cells. +// +// For a table-btree, the concept is similar, except only apEnd[0]..apEnd[2] +// are used and they point to the leaf pages only, and the ixNx value are: +// +// ixNx[0] = Number of cells in Child-1. +// ixNx[1] = Number of cells in Child-1 and Child-2. +// ixNx[2] = Total number of cells. +// +// Sometimes when deleting, a child page can have zero cells. In those +// cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] +// entries, shift down. The end result is that each ixNx[] entry should +// be larger than the previous +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ + +// Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been +// computed. +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ + + for N > 0 { + + if int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2))) == 0 { + *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2)) = (*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FpRef)).FxCellSize})).f(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(idx)*8))) + } else { + + } + idx++ + N-- + } +} + +// Return the size of the Nth element of the cell array +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ + + *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FpRef)).FxCellSize})).f(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:73252:12: */ + + if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { + return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) + } + return computeCellSize(tls, p, N) +} + +// Array apCell[] contains pointers to nCell b-tree page cells. The +// szCell[] array contains the size in bytes of each cell. This function +// replaces the current contents of page pPg with the contents of the cell +// array. +// +// Some of the cells in apCell[] may currently be stored in pPg. This +// function works around problems caused by this by making a copy of any +// such cells before overwriting the page data. +// +// The MemPage.nFree field is invalidated by this function. It is the +// responsibility of the caller to set it correctly. +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ + var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg + var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg + var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) + var pEnd uintptr = aData + uintptr(usableSize) + var i int32 = iFirst // Which cell to copy from pCArray + var j U32 // Start of cell content area + var iEnd int32 = i + nCell // Loop terminator + var pCellptr uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + var pTmp uintptr = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FpPager) + var pData uintptr + var k int32 // Current slot in pCArray->apEnd[] + var pSrcEnd uintptr // Current pCArray->apEnd[k] value + + j = U32(int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)))) + if j > U32(usableSize) { + j = U32(0) + } + libc.Xmemcpy(tls, pTmp+uintptr(j), aData+uintptr(j), uint64(U32(usableSize)-j)) + + for k = 0; *(*int32)(unsafe.Pointer(pCArray + 80 /* &.ixNx */ + uintptr(k)*4)) <= i && k < NB*2; k++ { + } + pSrcEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) + + pData = pEnd + for 1 != 0 { + var pCell uintptr = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)) + var sz U16 = *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2)) + + if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { + if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { + return Xsqlite3CorruptError(tls, 73304) + } + pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) + } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && + Uptr(pCell) < Uptr(pSrcEnd) { + return Xsqlite3CorruptError(tls, 73309) + } + + pData -= uintptr(sz) + *(*U8)(unsafe.Pointer(pCellptr)) = U8((int64(pData) - int64(aData)) / 1 >> 8) + *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) + pCellptr += uintptr(2) + if pData < pCellptr { + return Xsqlite3CorruptError(tls, 73315) + } + libc.Xmemmove(tls, pData, pCell, uint64(sz)) + + i++ + if i >= iEnd { + break + } + if *(*int32)(unsafe.Pointer(pCArray + 80 + uintptr(k)*4)) <= i { + k++ + pSrcEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) + } + } + + // The pPg->nFree field is now set incorrectly. The caller will fix it. + (*MemPage)(unsafe.Pointer(pPg)).FnCell = U16(nCell) + (*MemPage)(unsafe.Pointer(pPg)).FnOverflow = U8(0) + + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+1))) = U8(int32(0) >> 8) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+1) + 1)) = U8(0) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3))) = U8(int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) >> 8) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3) + 1)) = U8((*MemPage)(unsafe.Pointer(pPg)).FnCell) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))) = U8((int64(pData) - int64(aData)) / 1 >> 8) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)) = U8((int64(pData) - int64(aData)) / 1) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) = U8(0x00) + return SQLITE_OK +} + +// The pCArray objects contains pointers to b-tree cells and the cell sizes. +// This function attempts to add the cells stored in the array to page pPg. +// If it cannot (because the page needs to be defragmented before the cells +// will fit), non-zero is returned. Otherwise, if the cells are added +// successfully, zero is returned. +// +// Argument pCellptr points to the first entry in the cell-pointer array +// (part of page pPg) to populate. After cell apCell[0] is written to the +// page body, a 16-bit offset is written to pCellptr. And so on, for each +// cell in the array. It is the responsibility of the caller to ensure +// that it is safe to overwrite this part of the cell-pointer array. +// +// When this function is called, *ppData points to the start of the +// content area on page pPg. If the size of the content area is extended, +// *ppData is updated to point to the new start of the content area +// before returning. +// +// Finally, argument pBegin points to the byte immediately following the +// end of the space required by this page for the cell-pointer area (for +// all cells - not just those inserted by the current call). If the content +// area must be extended to before this point in order to accomodate all +// cells in apCell[], then the cells do not fit and non-zero is returned. +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i int32 = iFirst // Loop counter - cell index to insert + var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Complete page + var pData uintptr = *(*uintptr)(unsafe.Pointer(ppData)) // Content area. A subset of aData[] + var iEnd int32 = iFirst + nCell // End of loop. One past last cell to ins + var k int32 // Current slot in pCArray->apEnd[] + var pEnd uintptr // Maximum extent of cell data + // Never called on page 1 + if iEnd <= iFirst { + return 0 + } + for k = 0; *(*int32)(unsafe.Pointer(pCArray + 80 /* &.ixNx */ + uintptr(k)*4)) <= i && k < NB*2; k++ { + } + pEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) + for 1 != 0 { + var sz int32 + // var rc int32 at bp, 4 + + var pSlot uintptr + + sz = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2))) + if int32(*(*U8)(unsafe.Pointer(aData + 1))) == 0 && int32(*(*U8)(unsafe.Pointer(aData + 2))) == 0 || libc.AssignUintptr(&pSlot, pageFindSlot(tls, pPg, sz, bp)) == uintptr(0) { + if (int64(pData)-int64(pBegin))/1 < int64(sz) { + return 1 + } + pData -= uintptr(sz) + pSlot = pData + } + // pSlot and pCArray->apCell[i] will never overlap on a well-formed + // database. But they might for a corrupt database. Hence use memmove() + // since memcpy() sends SIGABORT with overlapping buffers on OpenBSD + + if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && + Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { + + Xsqlite3CorruptError(tls, 73400) + return 1 + } + libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) + *(*U8)(unsafe.Pointer(pCellptr)) = U8((int64(pSlot) - int64(aData)) / 1 >> 8) + *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pSlot) - int64(aData)) / 1) + pCellptr += uintptr(2) + i++ + if i >= iEnd { + break + } + if *(*int32)(unsafe.Pointer(pCArray + 80 + uintptr(k)*4)) <= i { + k++ + pEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) + } + } + *(*uintptr)(unsafe.Pointer(ppData)) = pData + return 0 +} + +// The pCArray object contains pointers to b-tree cells and their sizes. +// +// This function adds the space associated with each cell in the array +// that is currently stored within the body of pPg to the pPg free-list. +// The cell-pointers and other fields of the page are not updated. +// +// This function returns the total number of cells added to the free-list. +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ + var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData + var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) + var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) + var nRet int32 = 0 + var i int32 + var iEnd int32 = iFirst + nCell + var pFree uintptr = uintptr(0) + var szFree int32 = 0 + + for i = iFirst; i < iEnd; i++ { + var pCell uintptr = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)) + if Uptr(pCell) >= Uptr(pStart) && Uptr(pCell) < Uptr(pEnd) { + var sz int32 + // No need to use cachedCellSize() here. The sizes of all cells that + // are to be freed have already been computing while deciding which + // cells need freeing + sz = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2))) + if pFree != pCell+uintptr(sz) { + if pFree != 0 { + + freeSpace(tls, pPg, U16((int64(pFree)-int64(aData))/1), uint16(szFree)) + } + pFree = pCell + szFree = sz + if pFree+uintptr(sz) > pEnd { + return 0 + } + } else { + pFree = pCell + szFree = szFree + sz + } + nRet++ + } + } + if pFree != 0 { + + freeSpace(tls, pPg, U16((int64(pFree)-int64(aData))/1), uint16(szFree)) + } + return nRet +} + +// pCArray contains pointers to and sizes of all cells in the page being +// balanced. The current page, pPg, has pPg->nCell cells starting with +// pCArray->apCell[iOld]. After balancing, this page should hold nNew cells +// starting at apCell[iNew]. +// +// This routine makes the necessary adjustments to pPg so that it contains +// the correct cells after being balanced. +// +// The pPg->nFree field is invalid when this function returns. It is the +// responsibility of the caller to set it correctly. +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var aData uintptr + var hdr int32 + var pBegin uintptr + var nCell int32 // Cells stored on pPg + // var pData uintptr at bp, 8 + + var pCellptr uintptr + var i int32 + var iOldEnd int32 + var iNewEnd int32 + var nShift int32 + var nTail int32 + var nAdd int32 + var iCell int32 + aData = (*MemPage)(unsafe.Pointer(pPg)).FaData + hdr = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) + pBegin = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + uintptr(nNew*2) + nCell = int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) + iOldEnd = iOld + int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) + int32((*MemPage)(unsafe.Pointer(pPg)).FnOverflow) + iNewEnd = iNew + nNew + + // Remove cells from the start and end of the page + + if !(iOld < iNew) { + goto __1 + } + nShift = pageFreeArray(tls, pPg, iOld, iNew-iOld, pCArray) + if !(nShift > nCell) { + goto __2 + } + return Xsqlite3CorruptError(tls, 73511) +__2: + ; + libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) + nCell = nCell - nShift +__1: + ; + if !(iNewEnd < iOldEnd) { + goto __3 + } + nTail = pageFreeArray(tls, pPg, iNewEnd, iOldEnd-iNewEnd, pCArray) + + nCell = nCell - nTail +__3: + ; + + *(*uintptr)(unsafe.Pointer(bp /* pData */)) = aData + uintptr((int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)))-1)&0xffff+1) + if !(*(*uintptr)(unsafe.Pointer(bp)) < pBegin) { + goto __4 + } + goto editpage_fail +__4: + ; + if !(*(*uintptr)(unsafe.Pointer(bp)) > (*MemPage)(unsafe.Pointer(pPg)).FaDataEnd) { + goto __5 + } + goto editpage_fail +__5: + ; + + // Add cells to the start of the page + if !(iNew < iOld) { + goto __6 + } + nAdd = func() int32 { + if nNew < iOld-iNew { + return nNew + } + return iOld - iNew + }() + + pCellptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + libc.Xmemmove(tls, pCellptr+uintptr(nAdd*2), pCellptr, uint64(nCell*2)) + if !(pageInsertArray(tls, + pPg, pBegin, bp, pCellptr, + iNew, nAdd, pCArray) != 0) { + goto __7 + } + goto editpage_fail +__7: + ; + nCell = nCell + nAdd +__6: + ; + + // Add any overflow cells + i = 0 +__8: + if !(i < int32((*MemPage)(unsafe.Pointer(pPg)).FnOverflow)) { + goto __10 + } + iCell = iOld + int32(*(*U16)(unsafe.Pointer(pPg + 28 + uintptr(i)*2))) - iNew + if !(iCell >= 0 && iCell < nNew) { + goto __11 + } + pCellptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + uintptr(iCell*2) + if !(nCell > iCell) { + goto __12 + } + libc.Xmemmove(tls, pCellptr+2, pCellptr, uint64((nCell-iCell)*2)) +__12: + ; + nCell++ + cachedCellSize(tls, pCArray, iCell+iNew) + if !(pageInsertArray(tls, + pPg, pBegin, bp, pCellptr, + iCell+iNew, 1, pCArray) != 0) { + goto __13 + } + goto editpage_fail +__13: + ; +__11: + ; + goto __9 +__9: + i++ + goto __8 + goto __10 +__10: + ; + + // Append cells to the end of the page + + pCellptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + uintptr(nCell*2) + if !(pageInsertArray(tls, + pPg, pBegin, bp, pCellptr, + iNew+nCell, nNew-nCell, pCArray) != 0) { + goto __14 + } + goto editpage_fail +__14: + ; + + (*MemPage)(unsafe.Pointer(pPg)).FnCell = U16(nNew) + (*MemPage)(unsafe.Pointer(pPg)).FnOverflow = U8(0) + + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3))) = U8(int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) >> 8) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3) + 1)) = U8((*MemPage)(unsafe.Pointer(pPg)).FnCell) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))) = U8((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64(aData)) / 1 >> 8) + *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)) = U8((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64(aData)) / 1) + + return SQLITE_OK +editpage_fail: + // Unable to edit this page. Rebuild it from scratch instead. + populateCellCache(tls, pCArray, iNew, nNew) + return rebuildPage(tls, pCArray, iNew, nNew, pPg) +} + +// This version of balance() handles the common special case where +// a new entry is being inserted on the extreme right-end of the +// tree, in other words, when the new entry will become the largest +// entry in the tree. +// +// Instead of trying to balance the 3 right-most leaf pages, just add +// a new page to the right-hand side and put the one new entry in +// that page. This leaves the right side of the tree somewhat +// unbalanced. But odds are that we will be inserting new entries +// at the end soon afterwards so the nearly empty page will quickly +// fill up. On average. +// +// pPage is the leaf page which is the right-most page in the tree. +// pParent is its parent. pPage must have a single overflow entry +// which is also the right-most entry on the page. +// +// The pSpace buffer is used to store a temporary copy of the divider +// cell that will be inserted into pParent. Such a cell consists of a 4 +// byte page number followed by a variable length integer. In other +// words, at most 13 bytes. Hence the pSpace buffer must be at +// least 13 bytes in size. +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ + bp := tls.Alloc(140) + defer tls.Free(140) + + var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt // B-Tree Database + // var pNew uintptr at bp, 8 + // Newly allocated page + // var rc int32 at bp+136, 4 + // Return Code + // var pgnoNew Pgno at bp+8, 4 + // Page number of pNew + + if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { + return Xsqlite3CorruptError(tls, 73624) + } // dbfuzz001.test + + // Allocate a new page. This page will become the right-sibling of + // pPage. Make the parent page writable, so that the new divider cell + // may be inserted. If both these operations are successful, proceed. + *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) + + if *(*int32)(unsafe.Pointer(bp + 136)) == SQLITE_OK { + + var pOut uintptr = pSpace + 4 + *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)) = *(*uintptr)(unsafe.Pointer(pPage + 40)) + *(*U16)(unsafe.Pointer(bp + 24 /* szCell */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */))) + var pStop uintptr + // var b CellArray at bp+32, 104 + + zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) + (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FnCell = 1 + (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FpRef = pPage + (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FapCell = bp + 16 /* &pCell */ + (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FszCell = bp + 24 /* &szCell */ + *(*uintptr)(unsafe.Pointer(bp + 32 + 32)) = (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd + *(*int32)(unsafe.Pointer(bp + 32 + 80)) = 2 + *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = rebuildPage(tls, bp+32, 0, 1, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + if *(*int32)(unsafe.Pointer(bp + 136)) != 0 { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) + } + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).FnFree = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) - U32(2) - U32(*(*U16)(unsafe.Pointer(bp + 24)))) + + // If this is an auto-vacuum database, update the pointer map + // with entries for the new page, and any pointer from the + // cell on the page to an overflow page. If either of these + // operations fails, the return code is set, but the contents + // of the parent page are still manipulated by thh code below. + // That is Ok, at this point the parent page is guaranteed to + // be marked as dirty. Returning an error code will cause a + // rollback, undoing any changes made to the parent page. + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoNew */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+136) + if int32(*(*U16)(unsafe.Pointer(bp + 24))) > int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FminLocal) { + ptrmapPutOvflPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)), bp+136) + } + } + + // Create a divider cell to insert into pParent. The divider cell + // consists of a 4-byte page number (the page number of pPage) and + // a variable length key value (which must be the same value as the + // largest key on pPage). + // + // To find the largest key value on pPage, first find the right-most + // cell on pPage. The first two fields of this cell are the + // record-length (a variable length integer at most 32-bits in size) + // and the key value (a variable length integer, may have any value). + // The first of the while(...) loops below skips over the record-length + // field. The second while(...) loop copies the key value from the + // cell on pPage into the pSpace buffer. + *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)) = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)-1)) + 1))))) + pStop = *(*uintptr)(unsafe.Pointer(bp + 16)) + 9 + for int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 16)), 1))))&0x80 != 0 && *(*uintptr)(unsafe.Pointer(bp + 16)) < pStop { + } + pStop = *(*uintptr)(unsafe.Pointer(bp + 16)) + 9 + for int32(libc.AssignPtrUint8(libc.PostIncUintptr(&pOut, 1), *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 16)), 1)))))&0x80 != 0 && *(*uintptr)(unsafe.Pointer(bp + 16)) < pStop { + } + + // Insert the new divider cell into pParent. + if *(*int32)(unsafe.Pointer(bp + 136)) == SQLITE_OK { + insertCell(tls, pParent, int32((*MemPage)(unsafe.Pointer(pParent)).FnCell), pSpace, int32((int64(pOut)-int64(pSpace))/1), + uintptr(0), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+136) + } + + // Set the right-child pointer of pParent to point to the new page. + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pParent)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset)+8), *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoNew */))) + + // Release the reference to the new page. + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + } + + return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) +} + +// This function is used to copy the contents of the b-tree node stored +// on page pFrom to page pTo. If page pFrom was not a leaf page, then +// the pointer-map entries for each child page are updated so that the +// parent page stored in the pointer map is page pTo. If pFrom contained +// any cells with overflow page pointers, then the corresponding pointer +// map entries are also updated so that the parent page is page pTo. +// +// If pFrom is currently carrying any overflow cells (entries in the +// MemPage.apOvfl[] array), they are not copied to pTo. +// +// Before returning, page pTo is reinitialized using btreeInitPage(). +// +// The performance of this function is not critical. It is only used by +// the balance_shallower() and balance_deeper() procedures, neither of +// which are called often under normal circumstances. +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ + if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { + var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt + var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData + var aTo uintptr = (*MemPage)(unsafe.Pointer(pTo)).FaData + var iFromHdr int32 = int32((*MemPage)(unsafe.Pointer(pFrom)).FhdrOffset) + var iToHdr int32 = func() int32 { + if (*MemPage)(unsafe.Pointer(pTo)).Fpgno == Pgno(1) { + return 100 + } + return 0 + }() + var rc int32 + var iData int32 + + // Copy the b-tree node content from page pFrom to page pTo. + iData = int32(*(*U8)(unsafe.Pointer(aFrom + uintptr(iFromHdr+5))))<<8 | int32(*(*U8)(unsafe.Pointer(aFrom + uintptr(iFromHdr+5) + 1))) + libc.Xmemcpy(tls, aTo+uintptr(iData), aFrom+uintptr(iData), uint64((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(iData))) + libc.Xmemcpy(tls, aTo+uintptr(iToHdr), aFrom+uintptr(iFromHdr), uint64(int32((*MemPage)(unsafe.Pointer(pFrom)).FcellOffset)+2*int32((*MemPage)(unsafe.Pointer(pFrom)).FnCell))) + + // Reinitialize page pTo so that the contents of the MemPage structure + // match the new data. The initialization of pTo can actually fail under + // fairly obscure circumstances, even though it is a copy of initialized + // page pFrom. + (*MemPage)(unsafe.Pointer(pTo)).FisInit = U8(0) + rc = btreeInitPage(tls, pTo) + if rc == SQLITE_OK { + rc = btreeComputeFreeSpace(tls, pTo) + } + if rc != SQLITE_OK { + *(*int32)(unsafe.Pointer(pRC)) = rc + return + } + + // If this is an auto-vacuum database, update the pointer-map entries + // for any b-tree or overflow pages that pTo now contains the pointers to. + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + *(*int32)(unsafe.Pointer(pRC)) = setChildPtrmaps(tls, pTo) + } + } +} + +// This routine redistributes cells on the iParentIdx'th child of pParent +// (hereafter "the page") and up to 2 siblings so that all pages have about the +// same amount of free space. Usually a single sibling on either side of the +// page are used in the balancing, though both siblings might come from one +// side if the page is the first or last child of its parent. If the page +// has fewer than 2 siblings (something which can only happen if the page +// is a root page or a child of a root page) then all available siblings +// participate in the balancing. +// +// The number of siblings of the page might be increased or decreased by +// one or two in an effort to keep pages nearly full but not over full. +// +// Note that when this routine is called, some of the cells on the page +// might not actually be stored in MemPage.aData[]. This can happen +// if the page is overfull. This routine ensures that all cells allocated +// to the page and its siblings fit into MemPage.aData[] before returning. +// +// In the course of balancing the page and its siblings, cells may be +// inserted into or removed from the parent page (pParent). Doing so +// may cause the parent page to become overfull or underfull. If this +// happens, it is the responsibility of the caller to invoke the correct +// balancing routine to fix this problem (see the balance() routine). +// +// If this routine fails for any reason, it might leave the database +// in a corrupted state. So if this routine fails, the database should +// be rolled back. +// +// The third argument to this function, aOvflSpace, is a pointer to a +// buffer big enough to hold one page. If while inserting cells into the parent +// page (pParent) the parent page becomes overfull, this buffer is +// used to store the parent's overflow cells. Because this function inserts +// a maximum of four divider cells into the parent page, and the maximum +// size of a cell stored within an internal node is always less than 1/4 +// of the page-size, the aOvflSpace[] buffer is guaranteed to be large +// enough for all overflow cells. +// +// If aOvflSpace is set to a null pointer, this function returns +// SQLITE_NOMEM. +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ + bp := tls.Alloc(344) + defer tls.Free(344) + + var pBt uintptr // The whole database + var nMaxCells int32 // Allocated size of apCell, szCell, aFrom. + var nNew int32 // Number of pages in apNew[] + var nOld int32 // Number of pages in apOld[] + var i int32 + var j int32 + var k int32 // Loop counters + var nxDiv int32 // Next divider slot in pParent->aCell[] + // var rc int32 at bp+172, 4 + // The return code + var leafCorrection U16 // 4 if pPage is a leaf. 0 if not + var leafData int32 // True if pPage is a leaf of a LEAFDATA tree + var usableSpace int32 // Bytes in pPage beyond the header + var pageFlags int32 // Value of pPage->aData[0] + var iSpace1 int32 // First unused byte of aSpace1[] + var iOvflSpace int32 // First unused byte of aOvflSpace[] + var szScratch int32 // Size of scratch memory requested + // var apOld [3]uintptr at bp+112, 24 + // pPage and up to two siblings + // var apNew [5]uintptr at bp+216, 40 + // pPage and up to NB siblings after balancing + var pRight uintptr // Location in parent of right-sibling pointer + // var apDiv [2]uintptr at bp+136, 16 + // Divider cells in pParent + // var cntNew [5]int32 at bp+196, 20 + // Index in b.paCell[] of cell after i-th page + // var cntOld [5]int32 at bp+176, 20 + // Old index in b.apCell[] + // var szNew [5]int32 at bp+152, 20 + // Combined size of cells placed on i-th page + var aSpace1 uintptr // Space for copies of dividers cells + // var pgno Pgno at bp+264, 4 + // Temp var to store a page number in + // var abDone [5]U8 at bp, 5 + // True after i'th new page is populated + // var aPgno [5]Pgno at bp+288, 20 + // Page numbers of new pages before shuffling + // var aPgOrder [5]Pgno at bp+268, 20 + // Copy of aPgno[] used for sorting pages + // var aPgFlags [5]U16 at bp+308, 10 + // flags field of new pages before shuffling + // var b CellArray at bp+8, 104 + + var iOff int32 + var sz U16 + var pTemp uintptr + var pOld uintptr + var limit int32 + var aData uintptr + var maskPage U16 + var piCell uintptr + var piEnd uintptr + var p uintptr + var sz1 int32 + var szRight int32 // Size of sibling on the right + var szLeft int32 // Size of sibling on the left + var r int32 // Index of right-most cell in left sibling + var d int32 + // var pNew uintptr at bp+256, 8 + + var iBest int32 + var pOld1 uintptr + var pCell uintptr + var pOld2 uintptr + var pNew1 uintptr + var cntOldNext int32 + var iNew int32 + var iOld int32 + // If the tree is a leaf-data tree, and the siblings are leaves, + // then there is no divider cell in b.apCell[]. Instead, the divider + // cell consists of the integer key for the right-most cell of + // the sibling-page assembled above only. + // var info CellInfo at bp+320, 24 + + var pCell1 uintptr + var pTemp1 uintptr + var sz2 int32 + var pSrcEnd uintptr + var pNew2 uintptr + var iNew1 int32 + var iOld1 int32 + var nNewCell int32 + var iPg int32 + var key U32 + nMaxCells = 0 + nNew = 0 + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = SQLITE_OK + iSpace1 = 0 + iOvflSpace = 0 // Parsed information on cells being balanced + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([5]U8{}))) + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(CellArray{}))) + pBt = (*MemPage)(unsafe.Pointer(pParent)).FpBt + + // At this point pParent may have at most one overflow cell. And if + // this overflow cell is present, it must be the cell with + // index iParentIdx. This scenario comes about when this function + // is called (indirectly) from sqlite3BtreeDelete(). + + if !!(aOvflSpace != 0) { + goto __1 + } + return SQLITE_NOMEM +__1: + ; + + // Find the sibling pages to balance. Also locate the cells in pParent + // that divide the siblings. An attempt is made to find NN siblings on + // either side of pPage. More siblings are taken from one side, however, + // if there are fewer than NN siblings on the other side. If pParent + // has NB or fewer children then all children of pParent are taken. + // + // This loop also drops the divider cells from the parent page. This + // way, the remainder of the function does not have to deal with any + // overflow cells in the parent page, since if any existed they will + // have already been removed. + i = int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow) + int32((*MemPage)(unsafe.Pointer(pParent)).FnCell) + if !(i < 2) { + goto __2 + } + nxDiv = 0 + goto __3 +__2: + ; + if !(iParentIdx == 0) { + goto __4 + } + nxDiv = 0 + goto __5 +__4: + if !(iParentIdx == i) { + goto __6 + } + nxDiv = i - 2 + bBulk + goto __7 +__6: + nxDiv = iParentIdx - 1 +__7: + ; +__5: + ; + i = 2 - bBulk +__3: + ; + nOld = i + 1 + if !(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow) == int32((*MemPage)(unsafe.Pointer(pParent)).FnCell)) { + goto __8 + } + pRight = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset)+8) + goto __9 +__8: + pRight = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow))))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow))) + 1))))) +__9: + ; + *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = Xsqlite3Get4byte(tls, pRight) +__10: + if !(1 != 0) { + goto __11 + } + if !(*(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { + goto __12 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = getAndInitPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)), bp+112+uintptr(i)*8, uintptr(0), 0) +__12: + ; + if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { + goto __13 + } + libc.Xmemset(tls, bp+112, 0, uint64(i+1)*uint64(unsafe.Sizeof(uintptr(0)))) + goto balance_cleanup +__13: + ; + if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)))).FnFree < 0) { + goto __14 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8))) + if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { + goto __15 + } + libc.Xmemset(tls, bp+112, 0, uint64(i)*uint64(unsafe.Sizeof(uintptr(0)))) + goto balance_cleanup +__15: + ; +__14: + ; + nMaxCells = nMaxCells + (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)))).FnCell) + int32(uint64(unsafe.Sizeof([4]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))) + if !(libc.PostDecInt32(&i, 1) == 0) { + goto __16 + } + goto __11 +__16: + ; + + if !((*MemPage)(unsafe.Pointer(pParent)).FnOverflow != 0 && i+nxDiv == int32(*(*U16)(unsafe.Pointer(pParent + 28)))) { + goto __17 + } + *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(pParent + 40)) + *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8))) + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = int32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 136 /* &apDiv[0] */ + uintptr(i)*8)))) + (*MemPage)(unsafe.Pointer(pParent)).FnOverflow = U8(0) + goto __18 +__17: + *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)) = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow))))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow))) + 1))))) + *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8))) + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = int32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 136 /* &apDiv[0] */ + uintptr(i)*8)))) + + // Drop the cell from the parent page. apDiv[i] still points to + // the cell within the parent, even though it has been dropped. + // This is safe because dropping a cell only overwrites the first + // four bytes of it, and this function does not need the first + // four bytes of the divider cell. So the pointer is safe to use + // later on. + // + // But not if we are in secure-delete mode. In secure-delete mode, + // the dropCell() routine will overwrite the entire cell with zeroes. + // In this case, temporarily copy the cell into the aOvflSpace[] + // buffer. It will be copied out again as soon as the aSpace[] buffer + // is allocated. + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_FAST_SECURE != 0) { + goto __19 + } + + // If the following if() condition is not true, the db is corrupted. + // The call to dropCell() below will detect this. + iOff = int32(*(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8))) - int32((*MemPage)(unsafe.Pointer(pParent)).FaData) + if !(iOff+*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) <= int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize)) { + goto __20 + } + libc.Xmemcpy(tls, aOvflSpace+uintptr(iOff), *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)))) + *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)) = aOvflSpace + uintptr((int64(*(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)))-int64((*MemPage)(unsafe.Pointer(pParent)).FaData))/1) +__20: + ; +__19: + ; + dropCell(tls, pParent, i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow), *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)), bp+172) +__18: + ; + goto __10 +__11: + ; + + // Make nMaxCells a multiple of 4 in order to preserve 8-byte + // alignment + nMaxCells = (nMaxCells + 3) & libc.CplInt32(3) + + // Allocate space for memory structures + szScratch = int32(uint64(nMaxCells)*uint64(unsafe.Sizeof(uintptr(0))) + + uint64(nMaxCells)*uint64(unsafe.Sizeof(U16(0))) + + uint64((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) // aSpace1 + + (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FapCell = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(szScratch)) + if !((*CellArray)(unsafe.Pointer(bp+8)).FapCell == uintptr(0)) { + goto __21 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = SQLITE_NOMEM + goto balance_cleanup +__21: + ; + (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FszCell = (*CellArray)(unsafe.Pointer(bp+8)).FapCell + uintptr(nMaxCells)*8 + aSpace1 = (*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(nMaxCells)*2 + + // Load pointers to all cells on sibling pages and the divider cells + // into the local b.apCell[] array. Make copies of the divider cells + // into space obtained from aSpace1[]. The divider cells have already + // been removed from pParent. + // + // If the siblings are on leaf pages, then the child pointers of the + // divider cells are stripped from the cells before they are copied + // into aSpace1[]. In this way, all cells in b.apCell[] are without + // child pointers. If siblings are not leaves, then all cell in + // b.apCell[] include child pointers. Either way, all cells in b.apCell[] + // are alike. + // + // leafCorrection: 4 if pPage is a leaf. 0 if pPage is not a leaf. + // leafData: 1 if pPage holds key+data and pParent holds only keys. + (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FpRef = *(*uintptr)(unsafe.Pointer(bp + 112)) + leafCorrection = U16(int32((*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FpRef)).Fleaf) * 4) + leafData = int32((*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FpRef)).FintKeyLeaf) + i = 0 +__22: + if !(i < nOld) { + goto __24 + } + pOld = *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)) + limit = int32((*MemPage)(unsafe.Pointer(pOld)).FnCell) + aData = (*MemPage)(unsafe.Pointer(pOld)).FaData + maskPage = (*MemPage)(unsafe.Pointer(pOld)).FmaskPage + piCell = aData + uintptr((*MemPage)(unsafe.Pointer(pOld)).FcellOffset) + + // Verify that all sibling pages are of the same "type" (table-leaf, + // table-interior, index-leaf, or index-interior). + if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { + goto __25 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) + goto balance_cleanup +__25: + ; + + // Load b.apCell[] with pointers to all cells in pOld. If pOld + // contains overflow cells, include them in the b.apCell[] array + // in the correct spot. + // + // Note that when there are multiple overflow cells, it is always the + // case that they are sequential and adjacent. This invariant arises + // because multiple overflows can only occurs when inserting divider + // cells into a parent on a prior balance, and divider cells are always + // adjacent and are inserted in order. There is an assert() tagged + // with "NOTE 1" in the overflow cell insertion loop to prove this + // invariant. + // + // This must be done in advance. Once the balance starts, the cell + // offset section of the btree page will be overwritten and we will no + // long be able to find the cells if a pointer to each cell is not saved + // first. + libc.Xmemset(tls, (*CellArray)(unsafe.Pointer(bp+8)).FszCell+uintptr((*CellArray)(unsafe.Pointer(bp+8)).FnCell)*2, 0, uint64(unsafe.Sizeof(U16(0)))*uint64(limit+int32((*MemPage)(unsafe.Pointer(pOld)).FnOverflow))) + if !(int32((*MemPage)(unsafe.Pointer(pOld)).FnOverflow) > 0) { + goto __26 + } + if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { + goto __27 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) + goto balance_cleanup +__27: + ; + limit = int32(*(*U16)(unsafe.Pointer(pOld + 28))) + j = 0 +__28: + if !(j < limit) { + goto __30 + } + *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = aData + uintptr(int32(maskPage)&(int32(*(*U8)(unsafe.Pointer(piCell)))<<8|int32(*(*U8)(unsafe.Pointer(piCell + 1))))) + piCell += uintptr(2) + (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ + goto __29 +__29: + j++ + goto __28 + goto __30 +__30: + ; + k = 0 +__31: + if !(k < int32((*MemPage)(unsafe.Pointer(pOld)).FnOverflow)) { + goto __33 + } + // NOTE 1 + *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = *(*uintptr)(unsafe.Pointer(pOld + 40 + uintptr(k)*8)) + (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ + goto __32 +__32: + k++ + goto __31 + goto __33 +__33: + ; +__26: + ; + piEnd = aData + uintptr((*MemPage)(unsafe.Pointer(pOld)).FcellOffset) + uintptr(2*int32((*MemPage)(unsafe.Pointer(pOld)).FnCell)) +__34: + if !(piCell < piEnd) { + goto __35 + } + + *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = aData + uintptr(int32(maskPage)&(int32(*(*U8)(unsafe.Pointer(piCell)))<<8|int32(*(*U8)(unsafe.Pointer(piCell + 1))))) + piCell += uintptr(2) + (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ + goto __34 +__35: + ; + + *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell + if !(i < nOld-1 && !(leafData != 0)) { + goto __36 + } + sz = U16(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4))) + + *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2)) = sz + pTemp = aSpace1 + uintptr(iSpace1) + iSpace1 = iSpace1 + int32(sz) + + libc.Xmemcpy(tls, pTemp, *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)), uint64(sz)) + *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = pTemp + uintptr(leafCorrection) + + *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2)) = U16(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8)).FnCell)*2))) - int32(leafCorrection)) + if !!(int32((*MemPage)(unsafe.Pointer(pOld)).Fleaf) != 0) { + goto __37 + } + + // The right pointer of the child page pOld becomes the left + // pointer of the divider cell + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)), (*MemPage)(unsafe.Pointer(pOld)).FaData+8, uint64(4)) + goto __38 +__37: + ; +__39: + if !(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8)).FnCell)*2))) < 4) { + goto __40 + } + // Do not allow any cells smaller than 4 bytes. If a smaller cell + // does exist, pad it with 0x00 bytes. + + *(*U8)(unsafe.Pointer(aSpace1 + uintptr(libc.PostIncInt32(&iSpace1, 1)))) = U8(0x00) + *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2))++ + goto __39 +__40: + ; +__38: + ; + (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ +__36: + ; + goto __23 +__23: + i++ + goto __22 + goto __24 +__24: + ; + + // Figure out the number of pages needed to hold all b.nCell cells. + // Store this number in "k". Also compute szNew[] which is the total + // size of all cells on the i-th page and cntNew[] which is the index + // in b.apCell[] of the cell that divides page i from page i+1. + // cntNew[k] should equal b.nCell. + // + // Values computed by this block: + // + // k: The total number of sibling pages + // szNew[i]: Spaced used on the i-th sibling page. + // cntNew[i]: Index in b.apCell[] and b.szCell[] for the first cell to + // the right of the i-th sibling page. + // usableSpace: Number of bytes of space available on each sibling. + // + usableSpace = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(12) + U32(leafCorrection)) + i = libc.AssignInt32(&k, 0) +__41: + if !(i < nOld) { + goto __43 + } + p = *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)) + *(*uintptr)(unsafe.Pointer(bp + 8 + 32 + uintptr(k)*8)) = (*MemPage)(unsafe.Pointer(p)).FaDataEnd + *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) + if !(k != 0 && *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) == *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k-1)*4))) { + goto __44 + } + k-- // Omit b.ixNx[] entry for child pages with no cells +__44: + ; + if !!(leafData != 0) { + goto __45 + } + k++ + *(*uintptr)(unsafe.Pointer(bp + 8 + 32 + uintptr(k)*8)) = (*MemPage)(unsafe.Pointer(pParent)).FaDataEnd + *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) + 1 +__45: + ; + + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = usableSpace - (*MemPage)(unsafe.Pointer(p)).FnFree + j = 0 +__46: + if !(j < int32((*MemPage)(unsafe.Pointer(p)).FnOverflow)) { + goto __48 + } + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) += 2 + int32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(p)).FxCellSize})).f(tls, p, *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(j)*8)))) + goto __47 +__47: + j++ + goto __46 + goto __48 +__48: + ; + *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) + goto __42 +__42: + i++ + k++ + goto __41 + goto __43 +__43: + ; + k = nOld + i = 0 +__49: + if !(i < k) { + goto __51 + } +__52: + if !(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) > usableSpace) { + goto __53 + } + if !(i+1 >= k) { + goto __54 + } + k = i + 2 + if !(k > NB+2) { + goto __55 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) + goto balance_cleanup +__55: + ; + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(k-1)*4)) = 0 + *(*int32)(unsafe.Pointer(bp + 196 + uintptr(k-1)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell +__54: + ; + sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4))-1)) + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) -= sz1 + if !!(leafData != 0) { + goto __56 + } + if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { + goto __57 + } + sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)))) + goto __58 +__57: + sz1 = 0 +__58: + ; +__56: + ; + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i+1)*4)) += sz1 + *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4))-- + goto __52 +__53: + ; +__59: + if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { + goto __60 + } + sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)))) + if !(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4))+sz1 > usableSpace) { + goto __61 + } + goto __60 +__61: + ; + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) += sz1 + *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4))++ + if !!(leafData != 0) { + goto __62 + } + if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { + goto __63 + } + sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)))) + goto __64 +__63: + sz1 = 0 +__64: + ; +__62: + ; + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i+1)*4)) -= sz1 + goto __59 +__60: + ; + if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) >= (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { + goto __65 + } + k = i + 1 + goto __66 +__65: + if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) <= func() int32 { + if i > 0 { + return *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) + } + return 0 + }()) { + goto __67 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) + goto balance_cleanup +__67: + ; +__66: + ; + goto __50 +__50: + i++ + goto __49 + goto __51 +__51: + ; + + // The packing computed by the previous block is biased toward the siblings + // on the left side (siblings with smaller keys). The left siblings are + // always nearly full, while the right-most sibling might be nearly empty. + // The next block of code attempts to adjust the packing of siblings to + // get a better balance. + // + // This adjustment is more than an optimization. The packing above might + // be so out of balance as to be illegal. For example, the right-most + // sibling might be completely empty. This adjustment is not optional. + i = k - 1 +__68: + if !(i > 0) { + goto __70 + } + szRight = *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) // Size of sibling on the right + szLeft = *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i-1)*4)) // Index of first cell to the left of right sibling + + r = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) - 1 + d = r + 1 - leafData + cachedCellSize(tls, bp+8, d) +__71: + ; + + cachedCellSize(tls, bp+8, r) + if !(szRight != 0 && + (bBulk != 0 || szRight+int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2)))+2 > szLeft-(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2)))+func() int32 { + if i == k-1 { + return 0 + } + return 2 + }()))) { + goto __74 + } + goto __73 +__74: + ; + szRight = szRight + (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2))) + 2) + szLeft = szLeft - (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2))) + 2) + *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) = r + r-- + d-- + goto __72 +__72: + if r >= 0 { + goto __71 + } + goto __73 +__73: + ; + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = szRight + *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i-1)*4)) = szLeft + if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) <= func() int32 { + if i > 1 { + return *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-2)*4)) + } + return 0 + }()) { + goto __75 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) + goto balance_cleanup +__75: + ; + goto __69 +__69: + i-- + goto __68 + goto __70 +__70: + ; + + // Sanity check: For a non-corrupt database file one of the follwing + // must be true: + // (1) We found one or more cells (cntNew[0])>0), or + // (2) pPage is a virtual root page. A virtual root page is when + // the real root page is page 1 and we are the only child of + // that page. + + // Allocate k new pages. Reuse old pages where possible. + pageFlags = int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData))) + i = 0 +__76: + if !(i < k) { + goto __78 + } + if !(i < nOld) { + goto __79 + } + *(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)) = libc.AssignPtrUintptr(bp+216+uintptr(i)*8, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)))).FpDbPage) + nNew++ + if !(Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 256)))).FpDbPage) != 1+libc.Bool32(i == iParentIdx-nxDiv) && + *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { + goto __81 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) +__81: + ; + if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { + goto __82 + } + goto balance_cleanup +__82: + ; + goto __80 +__79: + ; + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = allocateBtreePage(tls, pBt, bp+256, bp+264, func() uint32 { + if bBulk != 0 { + return uint32(1) + } + return *(*Pgno)(unsafe.Pointer(bp + 264)) + }(), uint8(0)) + if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { + goto __83 + } + goto balance_cleanup +__83: + ; + zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)), pageFlags) + *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)) + nNew++ + *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell + + // Set the pointer-map entry for the new sibling page. + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { + goto __84 + } + ptrmapPut(tls, pBt, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)))).Fpgno, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+172) + if !(*(*int32)(unsafe.Pointer(bp + 172)) != SQLITE_OK) { + goto __85 + } + goto balance_cleanup +__85: + ; +__84: + ; +__80: + ; + goto __77 +__77: + i++ + goto __76 + goto __78 +__78: + ; + + // Reassign page numbers so that the new pages are in ascending order. + // This helps to keep entries in the disk file in order so that a scan + // of the table is closer to a linear scan through the file. That in turn + // helps the operating system to deliver pages from the disk more rapidly. + // + // An O(n^2) insertion sort algorithm is used, but since n is never more + // than (NB+2) (a small constant), that should not be a problem. + // + // When NB==3, this one optimization makes the database about 25% faster + // for large insertions and deletions. + i = 0 +__86: + if !(i < nNew) { + goto __88 + } + *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(i)*4)) = libc.AssignPtrUint32(bp+288+uintptr(i)*4, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).Fpgno) + *(*U16)(unsafe.Pointer(bp + 308 + uintptr(i)*2)) = (*DbPage)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).FpDbPage)).Fflags + j = 0 +__89: + if !(j < i) { + goto __91 + } + if !(*(*Pgno)(unsafe.Pointer(bp + 288 + uintptr(j)*4)) == *(*Pgno)(unsafe.Pointer(bp + 288 + uintptr(i)*4))) { + goto __92 + } + // This branch is taken if the set of sibling pages somehow contains + // duplicate entries. This can happen if the database is corrupt. + // It would be simpler to detect this as part of the loop below, but + // we do the detection here in order to avoid populating the pager + // cache with two separate objects associated with the same + // page number. + + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) + goto balance_cleanup +__92: + ; + goto __90 +__90: + j++ + goto __89 + goto __91 +__91: + ; + goto __87 +__87: + i++ + goto __86 + goto __88 +__88: + ; + i = 0 +__93: + if !(i < nNew) { + goto __95 + } + iBest = 0 // aPgno[] index of page number to use + j = 1 +__96: + if !(j < nNew) { + goto __98 + } + if !(*(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(j)*4)) < *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(iBest)*4))) { + goto __99 + } + iBest = j +__99: + ; + goto __97 +__97: + j++ + goto __96 + goto __98 +__98: + ; + *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(iBest)*4)) + *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(iBest)*4)) = 0xffffffff + if !(iBest != i) { + goto __100 + } + if !(iBest > i) { + goto __101 + } + Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iBest)*8)))).FpDbPage, (*BtShared)(unsafe.Pointer(pBt)).FnPage+U32(iBest)+U32(1), uint16(0)) +__101: + ; + Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).FpDbPage, *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)), *(*U16)(unsafe.Pointer(bp + 308 + uintptr(iBest)*2))) + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).Fpgno = *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) +__100: + ; + goto __94 +__94: + i++ + goto __93 + goto __95 +__95: + ; + + Xsqlite3Put4byte(tls, pRight, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(nNew-1)*8)))).Fpgno) + + // If the sibling pages are not leaves, ensure that the right-child pointer + // of the right-most new sibling page is set to the value that was + // originally in the same field of the right-most old sibling page. + if !(pageFlags&PTF_LEAF == 0 && nOld != nNew) { + goto __102 + } + pOld1 = *(*uintptr)(unsafe.Pointer(func() uintptr { + if nNew > nOld { + return bp + 216 /* &apNew[0] */ + } + return bp + 112 /* &apOld[0] */ + }() + uintptr(nOld-1)*8)) + libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(nNew-1)*8)))).FaData+8, (*MemPage)(unsafe.Pointer(pOld1)).FaData+8, uint64(4)) +__102: + ; + + // Make any required updates to pointer map entries associated with + // cells stored on sibling pages following the balance operation. Pointer + // map entries associated with divider cells are set by the insertCell() + // routine. The associated pointer map entries are: + // + // a) if the cell contains a reference to an overflow chain, the + // entry associated with the first page in the overflow chain, and + // + // b) if the sibling pages are not leaves, the child page associated + // with the cell. + // + // If the sibling pages are not leaves, then the pointer map entry + // associated with the right-child of each sibling may also need to be + // updated. This happens below, after the sibling pages have been + // populated, not here. + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { + goto __103 + } + pNew1 = libc.AssignUintptr(&pOld2, *(*uintptr)(unsafe.Pointer(bp + 216))) + cntOldNext = int32((*MemPage)(unsafe.Pointer(pNew1)).FnCell) + int32((*MemPage)(unsafe.Pointer(pNew1)).FnOverflow) + iNew = 0 + iOld = 0 + + i = 0 +__104: + if !(i < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { + goto __106 + } + pCell = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr(i)*8)) +__107: + if !(i == cntOldNext) { + goto __108 + } + iOld++ + + if iOld < nNew { + pOld2 = *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iOld)*8)) + } else { + pOld2 = *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(iOld)*8)) + } + cntOldNext = cntOldNext + (int32((*MemPage)(unsafe.Pointer(pOld2)).FnCell) + int32((*MemPage)(unsafe.Pointer(pOld2)).FnOverflow) + libc.BoolInt32(!(leafData != 0))) + goto __107 +__108: + ; + if !(i == *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iNew)*4))) { + goto __109 + } + pNew1 = *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(libc.PreIncInt32(&iNew, 1))*8)) + if !!(leafData != 0) { + goto __110 + } + goto __105 +__110: + ; +__109: + ; + + // Cell pCell is destined for new sibling page pNew. Originally, it + // was either part of sibling page iOld (possibly an overflow cell), + // or else the divider cell to the left of sibling page iOld. So, + // if sibling page iOld had the same page number as pNew, and if + // pCell really was a part of sibling page iOld (not a divider or + // overflow cell), we can skip updating the pointer map entries. + if !(iOld >= nNew || + (*MemPage)(unsafe.Pointer(pNew1)).Fpgno != *(*Pgno)(unsafe.Pointer(bp + 288 + uintptr(iOld)*4)) || + !(Uptr(pCell) >= Uptr((*MemPage)(unsafe.Pointer(pOld2)).FaData) && Uptr(pCell) < Uptr((*MemPage)(unsafe.Pointer(pOld2)).FaDataEnd))) { + goto __111 + } + if !!(leafCorrection != 0) { + goto __112 + } + ptrmapPut(tls, pBt, Xsqlite3Get4byte(tls, pCell), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pNew1)).Fpgno, bp+172) +__112: + ; + if !(int32(cachedCellSize(tls, bp+8, i)) > int32((*MemPage)(unsafe.Pointer(pNew1)).FminLocal)) { + goto __113 + } + ptrmapPutOvflPtr(tls, pNew1, pOld2, pCell, bp+172) +__113: + ; + if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { + goto __114 + } + goto balance_cleanup +__114: + ; +__111: + ; + goto __105 +__105: + i++ + goto __104 + goto __106 +__106: + ; +__103: + ; + + // Insert new divider cells into pParent. + i = 0 +__115: + if !(i < nNew-1) { + goto __117 + } + pNew2 = *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)) + j = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) + + pCell1 = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr(j)*8)) + sz2 = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(j)*2))) + int32(leafCorrection) + pTemp1 = aOvflSpace + uintptr(iOvflSpace) + if !!(int32((*MemPage)(unsafe.Pointer(pNew2)).Fleaf) != 0) { + goto __118 + } + libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pNew2)).FaData+8, pCell1, uint64(4)) + goto __119 +__118: + if !(leafData != 0) { + goto __120 + } + j-- + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pNew2)).FxParseCell})).f(tls, pNew2, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr(j)*8)), bp+320 /* &info */) + pCell1 = pTemp1 + sz2 = 4 + Xsqlite3PutVarint(tls, pCell1+4, uint64((*CellInfo)(unsafe.Pointer(bp+320)).FnKey)) + pTemp1 = uintptr(0) + goto __121 +__120: + pCell1 -= uintptr(4) + // Obscure case for non-leaf-data trees: If the cell at pCell was + // previously stored on a leaf node, and its reported size was 4 + // bytes, then it may actually be smaller than this + // (see btreeParseCellPtr(), 4 bytes is the minimum size of + // any cell). But it is important to pass the correct size to + // insertCell(), so reparse the cell now. + // + // This can only happen for b-trees used to evaluate "IN (SELECT ...)" + // and WITHOUT ROWID tables with exactly one column which is the + // primary key. + if !(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(j)*2))) == 4) { + goto __122 + } + + sz2 = int32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, pCell1)) +__122: + ; +__121: + ; +__119: + ; + iOvflSpace = iOvflSpace + sz2 + + k = 0 +__123: + if !(*(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) <= i && k < NB*2) { + goto __125 + } + goto __124 +__124: + k++ + goto __123 + goto __125 +__125: + ; + pSrcEnd = *(*uintptr)(unsafe.Pointer(bp + 8 + 32 + uintptr(k)*8)) + if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { + goto __126 + } + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) + goto balance_cleanup +__126: + ; + insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno, bp+172) + if !(*(*int32)(unsafe.Pointer(bp + 172)) != SQLITE_OK) { + goto __127 + } + goto balance_cleanup +__127: + ; + + goto __116 +__116: + i++ + goto __115 + goto __117 +__117: + ; + + // Now update the actual sibling pages. The order in which they are updated + // is important, as this code needs to avoid disrupting any page from which + // cells may still to be read. In practice, this means: + // + // (1) If cells are moving left (from apNew[iPg] to apNew[iPg-1]) + // then it is not safe to update page apNew[iPg] until after + // the left-hand sibling apNew[iPg-1] has been updated. + // + // (2) If cells are moving right (from apNew[iPg] to apNew[iPg+1]) + // then it is not safe to update page apNew[iPg] until after + // the right-hand sibling apNew[iPg+1] has been updated. + // + // If neither of the above apply, the page is safe to update. + // + // The iPg value in the following loop starts at nNew-1 goes down + // to 0, then back up to nNew-1 again, thus making two passes over + // the pages. On the initial downward pass, only condition (1) above + // needs to be tested because (2) will always be true from the previous + // step. On the upward pass, both conditions are always true, so the + // upwards pass simply processes pages that were missed on the downward + // pass. + i = 1 - nNew +__128: + if !(i < nNew) { + goto __130 + } + if i < 0 { + iPg = -i + } else { + iPg = i + } + + if !(*(*U8)(unsafe.Pointer(bp + uintptr(iPg))) != 0) { + goto __131 + } + goto __129 +__131: + ; // Skip pages already processed + if !(i >= 0 || + *(*int32)(unsafe.Pointer(bp + 176 + uintptr(iPg-1)*4)) >= *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iPg-1)*4))) { + goto __132 + } + + // Verify condition (1): If cells are moving left, update iPg + // only after iPg-1 has already been updated. + + // Verify condition (2): If cells are moving right, update iPg + // only after iPg+1 has already been updated. + + if !(iPg == 0) { + goto __133 + } + iNew1 = libc.AssignInt32(&iOld1, 0) + nNewCell = *(*int32)(unsafe.Pointer(bp + 196)) + goto __134 +__133: + if iPg < nOld { + iOld1 = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(iPg-1)*4)) + libc.BoolInt32(!(leafData != 0)) + } else { + iOld1 = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell + } + iNew1 = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iPg-1)*4)) + libc.BoolInt32(!(leafData != 0)) + nNewCell = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iPg)*4)) - iNew1 +__134: + ; + + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = editPage(tls, *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iPg)*8)), iOld1, iNew1, nNewCell, bp+8) + if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { + goto __135 + } + goto balance_cleanup +__135: + ; + *(*U8)(unsafe.Pointer(bp + uintptr(iPg)))++ + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iPg)*8)))).FnFree = usableSpace - *(*int32)(unsafe.Pointer(bp + 152 + uintptr(iPg)*4)) + +__132: + ; + goto __129 +__129: + i++ + goto __128 + goto __130 +__130: + ; + + // All pages have been processed exactly once + + if !(isRoot != 0 && int32((*MemPage)(unsafe.Pointer(pParent)).FnCell) == 0 && int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset) <= (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216)))).FnFree) { + goto __136 + } + // The root page of the b-tree now contains no cells. The only sibling + // page is the right-child of the parent. Copy the contents of the + // child page into the parent, decreasing the overall height of the + // b-tree structure by one. This is described as the "balance-shallower" + // sub-algorithm in some documentation. + // + // If this is an auto-vacuum database, the call to copyNodeContent() + // sets all pointer-map entries corresponding to database image pages + // for which the pointer is stored within the content being copied. + // + // It is critical that the child page be defragmented before being + // copied into the parent, because if the parent is page 1 then it will + // by smaller than the child due to the database header, and so all the + // free space needs to be up front. + + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = defragmentPage(tls, *(*uintptr)(unsafe.Pointer(bp + 216)), -1) + + copyNodeContent(tls, *(*uintptr)(unsafe.Pointer(bp + 216)), pParent, bp+172) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 216)), bp+172) + goto __137 +__136: + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && !(leafCorrection != 0)) { + goto __138 + } + // Fix the pointer map entries associated with the right-child of each + // sibling page. All other pointer map entries have already been taken + // care of. + i = 0 +__139: + if !(i < nNew) { + goto __141 + } + key = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).FaData+8) + ptrmapPut(tls, pBt, key, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).Fpgno, bp+172) + goto __140 +__140: + i++ + goto __139 + goto __141 +__141: + ; +__138: + ; +__137: + ; + + // Free any old pages that were not reused as new pages. + i = nNew +__142: + if !(i < nOld) { + goto __144 + } + freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)), bp+172) + goto __143 +__143: + i++ + goto __142 + goto __144 +__144: + ; + + // Cleanup before returning. +balance_cleanup: + Xsqlite3DbFree(tls, uintptr(0), (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell) + i = 0 +__145: + if !(i < nOld) { + goto __147 + } + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8))) + goto __146 +__146: + i++ + goto __145 + goto __147 +__147: + ; + i = 0 +__148: + if !(i < nNew) { + goto __150 + } + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8))) + goto __149 +__149: + i++ + goto __148 + goto __150 +__150: + ; + + return *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) +} + +// This function is called when the root page of a b-tree structure is +// overfull (has one or more overflow pages). +// +// A new child page is allocated and the contents of the current root +// page, including overflow cells, are copied into the child. The root +// page is then overwritten to make it an empty page with the right-child +// pointer pointing to the new page. +// +// Before returning, all pointer-map entries corresponding to pages +// that the new child-page now contains pointers to are updated. The +// entry corresponding to the new right-child pointer of the root +// page is also updated. +// +// If successful, *ppChild is set to contain a reference to the child +// page and SQLITE_OK is returned. In this case the caller is required +// to call releasePage() on *ppChild exactly once. If an error occurs, +// an error code is returned and *ppChild is set to 0. +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var rc int32 at bp+12, 4 + // Return value from subprocedures + *(*uintptr)(unsafe.Pointer(bp /* pChild */)) = uintptr(0) // Pointer to a new child page + *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoChild */)) = Pgno(0) // Page number of the new child page + var pBt uintptr = (*MemPage)(unsafe.Pointer(pRoot)).FpBt // The BTree + + // Make pRoot, the root page of the b-tree, writable. Allocate a new + // page that will become the new right-child of pPage. Copy the contents + // of the node stored on pRoot into the new child page. + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pRoot)).FpDbPage) + if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+8, (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, uint8(0)) + copyNodeContent(tls, pRoot, *(*uintptr)(unsafe.Pointer(bp /* pChild */)), bp+12) + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoChild */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, bp+12) + } + } + if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { + *(*uintptr)(unsafe.Pointer(ppChild)) = uintptr(0) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pChild */))) + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + + // Copy the overflow cells from pRoot to pChild + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp))+28, pRoot+28, + uint64((*MemPage)(unsafe.Pointer(pRoot)).FnOverflow)*uint64(unsafe.Sizeof(U16(0)))) + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp))+40, pRoot+40, + uint64((*MemPage)(unsafe.Pointer(pRoot)).FnOverflow)*uint64(unsafe.Sizeof(uintptr(0)))) + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pChild */)))).FnOverflow = (*MemPage)(unsafe.Pointer(pRoot)).FnOverflow + + // Zero the contents of pRoot. Then install pChild as the right-child. + zeroPage(tls, pRoot, int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData)))&libc.CplInt32(PTF_LEAF)) + Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8), *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoChild */))) + + *(*uintptr)(unsafe.Pointer(ppChild)) = *(*uintptr)(unsafe.Pointer(bp /* pChild */)) + return SQLITE_OK +} + +// Return SQLITE_CORRUPT if any cursor other than pCur is currently valid +// on the same B-tree as pCur. +// +// This can occur if a database is corrupt with two or more SQL tables +// pointing to the same b-tree. If an insert occurs on one SQL table +// and causes a BEFORE TRIGGER to do a secondary insert on the other SQL +// table linked to the same b-tree. If the secondary insert causes a +// rebalance, that can change content out from under the cursor on the +// first SQL table, violating invariants on the first insert. +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ + var pOther uintptr + for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { + if pOther != pCur && + int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && + (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { + return Xsqlite3CorruptError(tls, 74713) + } + } + return SQLITE_OK +} + +// The page that pCur currently points to has just been modified in +// some way. This function figures out if this modification means the +// tree needs to be balanced, and if so calls the appropriate balancing +// routine. Balancing routines are: +// +// balance_quick() +// balance_deeper() +// balance_nonroot() +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ + bp := tls.Alloc(13) + defer tls.Free(13) + + var rc int32 = SQLITE_OK + var nMin int32 = int32((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize * U32(2) / U32(3)) + // var aBalanceQuickSpace [13]U8 at bp, 13 + + var pFree uintptr = uintptr(0) + + for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK { + var iPage int32 + var pPage uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + + if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { + break + } + if int32((*MemPage)(unsafe.Pointer(pPage)).FnOverflow) == 0 && (*MemPage)(unsafe.Pointer(pPage)).FnFree <= nMin { + break + } else if libc.AssignInt32(&iPage, int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage)) == 0 { + if (*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0 && libc.AssignInt32(&rc, anotherValidCursor(tls, pCur)) == SQLITE_OK { + // The root page of the b-tree is overfull. In this case call the + // balance_deeper() function to create a new child for the root-page + // and copy the current contents of the root-page to it. The + // next iteration of the do-loop will balance the child page. + + rc = balance_deeper(tls, pPage, pCur+144+1*8) + if rc == SQLITE_OK { + (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(1) + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) + *(*U16)(unsafe.Pointer(pCur + 88)) = U16(0) + *(*uintptr)(unsafe.Pointer(pCur + 144)) = pPage + (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + 1*8)) + + } + } else { + break + } + } else { + var pParent uintptr = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(iPage-1)*8)) + var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 88 + uintptr(iPage-1)*2))) + + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pParent)).FpDbPage) + if rc == SQLITE_OK && (*MemPage)(unsafe.Pointer(pParent)).FnFree < 0 { + rc = btreeComputeFreeSpace(tls, pParent) + } + if rc == SQLITE_OK { + if (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf != 0 && + int32((*MemPage)(unsafe.Pointer(pPage)).FnOverflow) == 1 && + int32(*(*U16)(unsafe.Pointer(pPage + 28))) == int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) && + (*MemPage)(unsafe.Pointer(pParent)).Fpgno != Pgno(1) && + int32((*MemPage)(unsafe.Pointer(pParent)).FnCell) == iIdx { + // Call balance_quick() to create a new sibling of pPage on which + // to store the overflow cell. balance_quick() inserts a new cell + // into pParent, which may cause pParent overflow. If this + // happens, the next iteration of the do-loop will balance pParent + // use either balance_nonroot() or balance_deeper(). Until this + // happens, the overflow cell is stored in the aBalanceQuickSpace[] + // buffer. + // + // The purpose of the following assert() is to check that only a + // single call to balance_quick() is made for each call to this + // function. If this were not verified, a subtle bug involving reuse + // of the aBalanceQuickSpace[] might sneak in. + + rc = balance_quick(tls, pParent, pPage, bp) + } else { + // In this case, call balance_nonroot() to redistribute cells + // between pPage and up to 2 of its sibling pages. This involves + // modifying the contents of pParent, which may cause pParent to + // become overfull or underfull. The next iteration of the do-loop + // will balance the parent page to correct this. + // + // If the parent page becomes overfull, the overflow cell or cells + // are stored in the pSpace buffer allocated immediately below. + // A subsequent iteration of the do-loop will deal with this by + // calling balance_nonroot() (balance_deeper() may be called first, + // but it doesn't deal with overflow cells - just moves them to a + // different page). Once this subsequent call to balance_nonroot() + // has completed, it is safe to release the pSpace buffer used by + // the previous call, as the overflow cell data will have been + // copied either into the body of a database page or into the new + // pSpace buffer passed to the latter call to balance_nonroot(). + var pSpace uintptr = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)) + rc = balance_nonroot(tls, pParent, iIdx, pSpace, libc.Bool32(iPage == 1), + int32((*BtCursor)(unsafe.Pointer(pCur)).Fhints)&BTREE_BULKLOAD) + if pFree != 0 { + // If pFree is not NULL, it points to the pSpace buffer used + // by a previous call to balance_nonroot(). Its contents are + // now stored either on real database pages or within the + // new pSpace buffer, so it may be safely freed here. + Xsqlite3PageFree(tls, pFree) + } + + // The pSpace buffer will be freed after the next call to + // balance_nonroot(), or just before this function returns, whichever + // comes first. + pFree = pSpace + } + } + + (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) + + // The next iteration of the do-loop balances the parent page. + releasePage(tls, pPage) + (*BtCursor)(unsafe.Pointer(pCur)).FiPage-- + + (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) + } + } + + if pFree != 0 { + Xsqlite3PageFree(tls, pFree) + } + return rc +} + +// Overwrite content from pX into pDest. Only do the write if the +// content is different from what is already there. +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ + var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset + if nData <= 0 { + // Overwritting with zeros + var i int32 + for i = 0; i < iAmt && int32(*(*U8)(unsafe.Pointer(pDest + uintptr(i)))) == 0; i++ { + } + if i < iAmt { + var rc int32 = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) + if rc != 0 { + return rc + } + libc.Xmemset(tls, pDest+uintptr(i), 0, uint64(iAmt-i)) + } + } else { + if nData < iAmt { + // Mixed read data and zeros at the end. Make a recursive call + // to write the zeros then fall through to write the real data + var rc int32 = btreeOverwriteContent(tls, pPage, pDest+uintptr(nData), pX, iOffset+nData, + iAmt-nData) + if rc != 0 { + return rc + } + iAmt = nData + } + if libc.Xmemcmp(tls, pDest, (*BtreePayload)(unsafe.Pointer(pX)).FpData+uintptr(iOffset), uint64(iAmt)) != 0 { + var rc int32 = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) + if rc != 0 { + return rc + } + // In a corrupt database, it is possible for the source and destination + // buffers to overlap. This is harmless since the database is already + // corrupt but it does cause valgrind and ASAN warnings. So use + // memmove(). + libc.Xmemmove(tls, pDest, (*BtreePayload)(unsafe.Pointer(pX)).FpData+uintptr(iOffset), uint64(iAmt)) + } + } + return SQLITE_OK +} + +// Overwrite the cell that cursor pCur is pointing to with fresh content +// contained in pX. +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var iOffset int32 // Next byte of pX->pData to write + var nTotal int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData + (*BtreePayload)(unsafe.Pointer(pX)).FnZero // Total bytes of to write + var rc int32 // Return code + *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Page being written + var pBt uintptr // Btree + var ovflPgno Pgno // Next overflow page to write + var ovflPageSize U32 // Size to write on overflow page + + if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { + return Xsqlite3CorruptError(tls, 74910) + } + // Overwrite the local portion first + rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, + 0, int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) + if rc != 0 { + return rc + } + if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) == nTotal { + return SQLITE_OK + } + + // Now overwrite the overflow pages + iOffset = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) + + ovflPgno = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr(iOffset)) + pBt = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpBt + ovflPageSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) + for __ccgo := true; __ccgo; __ccgo = iOffset < nTotal { + rc = btreeGetPage(tls, pBt, ovflPgno, bp, 0) + if rc != 0 { + return rc + } + if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { + rc = Xsqlite3CorruptError(tls, 74929) + } else { + if U32(iOffset)+ovflPageSize < U32(nTotal) { + ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) + } else { + ovflPageSize = U32(nTotal - iOffset) + } + rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr(4), pX, + iOffset, int32(ovflPageSize)) + } + Xsqlite3PagerUnref(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) + if rc != 0 { + return rc + } + iOffset = int32(U32(iOffset) + ovflPageSize) + } + return SQLITE_OK +} + +// Insert a new record into the BTree. The content of the new record +// is described by the pX object. The pCur cursor is used only to +// define what table the record should be inserted into, and is left +// pointing at a random location. +// +// For a table btree (used for rowid tables), only the pX.nKey value of +// the key is used. The pX.pKey value must be NULL. The pX.nKey is the +// rowid or INTEGER PRIMARY KEY of the row. The pX.nData,pData,nZero fields +// hold the content of the row. +// +// For an index btree (used for indexes and WITHOUT ROWID tables), the +// key is an arbitrary byte sequence stored in pX.pKey,nKey. The +// pX.pData,nData,nZero fields must be zero. +// +// If the seekResult parameter is non-zero, then a successful call to +// MovetoUnpacked() to seek cursor pCur to (pKey,nKey) has already +// been performed. In other words, if seekResult!=0 then the cursor +// is currently pointing to a cell that will be adjacent to the cell +// to be inserted. If seekResult<0 then pCur points to a cell that is +// smaller then (pKey,nKey). If seekResult>0 then pCur points to a cell +// that is larger than (pKey,nKey). +// +// If seekResult==0, that means pCur is pointing at some unknown location. +// In that case, this routine must seek the cursor to the correct insertion +// point for (pKey,nKey) before doing the insertion. For index btrees, +// if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked +// key values and pX->aMem can be used instead of pX->pKey to avoid having +// to decode the key. +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + // var rc int32 at bp+104, 4 + + // var loc int32 at bp, 4 + // -1: before desired location +1: after + // var szNew int32 at bp+108, 4 + + var idx int32 + var pPage uintptr + var p uintptr + var pBt uintptr + var oldCell uintptr + var newCell uintptr + // var r UnpackedRecord at bp+8, 24 + + // var x2 BtreePayload at bp+32, 48 + + var ovfl Pgno + // var info CellInfo at bp+80, 24 + + // var info1 CellInfo at bp+112, 24 + *(*int32)(unsafe.Pointer(bp /* loc */)) = seekResult + *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = 0 + p = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree + pBt = (*Btree)(unsafe.Pointer(p)).FpBt + newCell = uintptr(0) + + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_FAULT) { + goto __1 + } + + return (*BtCursor)(unsafe.Pointer(pCur)).FskipNext +__1: + ; + + // Assert that the caller has been consistent. If this cursor was opened + // expecting an index b-tree, then the caller should be inserting blob + // keys with no associated data. If the cursor was opened expecting an + // intkey table, the caller should be inserting integer keys with a + // blob of associated data. + + // Save the positions of any other cursors open on this table. + // + // In some cases, the call to btreeMoveto() below is a no-op. For + // example, when inserting data into a table with auto-generated integer + // keys, the VDBE layer invokes sqlite3BtreeLast() to figure out the + // integer key to use. It then calls this function to actually insert the + // data into the intkey B-Tree. In this case btreeMoveto() recognizes + // that the cursor is already where it needs to be and returns without + // doing any work. To avoid thwarting these optimizations, it is important + // not to clear the cursor here. + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Multiple != 0) { + goto __2 + } + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = saveAllCursors(tls, pBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __3 + } + return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) +__3: + ; + if !(*(*int32)(unsafe.Pointer(bp)) != 0 && int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) < 0) { + goto __4 + } + // This can only happen if the schema is corrupt such that there is more + // than one table or index with the same root page as used by the cursor. + // Which can only happen if the SQLITE_NoSchemaError flag was set when + // the schema was loaded. This cannot be asserted though, as a user might + // set the flag, load the schema, and then unset the flag. + return Xsqlite3CorruptError(tls, 75034) +__4: + ; +__2: + ; + + if !((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) { + goto __5 + } + + // If this is an insert into a table b-tree, invalidate any incrblob + // cursors open on the row being replaced + if !((*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0) { + goto __7 + } + invalidateIncrblobCursors(tls, p, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, 0) +__7: + ; + + // If BTREE_SAVEPOSITION is set, the cursor must already be pointing + // to a row with the same key as the new entry being inserted. + + // On the other hand, BTREE_SAVEPOSITION==0 does not imply + // that the cursor is not pointing to a row to be overwritten. + // So do a complete check. + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_ValidNKey != 0 && (*BtreePayload)(unsafe.Pointer(pX)).FnKey == (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey) { + goto __8 + } + // The cursor is pointing to the entry that is to be + // overwritten + + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) != 0 && + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload == U32((*BtreePayload)(unsafe.Pointer(pX)).FnData)+U32((*BtreePayload)(unsafe.Pointer(pX)).FnZero)) { + goto __10 + } + // New entry is the same size as the old. Do an overwrite + return btreeOverwriteCell(tls, pCur, pX) +__10: + ; + + goto __9 +__8: + if !(*(*int32)(unsafe.Pointer(bp)) == 0) { + goto __11 + } + // The cursor is *not* pointing to the cell to be overwritten, nor + // to an adjacent cell. Move the cursor so that it is pointing either + // to the cell to be overwritten or an adjacent cell. + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3BtreeTableMoveto(tls, pCur, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, + libc.Bool32(flags&BTREE_APPEND != 0), bp) + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __12 + } + return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) +__12: + ; +__11: + ; +__9: + ; + goto __6 +__5: + // This is an index or a WITHOUT ROWID table + + // If BTREE_SAVEPOSITION is set, the cursor must already be pointing + // to a row with the same key as the new entry being inserted. + ; + + // If the cursor is not already pointing either to the cell to be + // overwritten, or if a new cell is being inserted, if the cursor is + // not pointing to an immediately adjacent cell, then move the cursor + // so that it does. + if !(*(*int32)(unsafe.Pointer(bp)) == 0 && flags&BTREE_SAVEPOSITION == 0) { + goto __13 + } + if !((*BtreePayload)(unsafe.Pointer(pX)).FnMem != 0) { + goto __14 + } + (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FpKeyInfo = (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FaMem = (*BtreePayload)(unsafe.Pointer(pX)).FaMem + (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FnField = (*BtreePayload)(unsafe.Pointer(pX)).FnMem + (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).Fdefault_rc = int8(0) + (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FeqSeen = U8(0) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3BtreeIndexMoveto(tls, pCur, bp+8, bp) + goto __15 +__14: + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeMoveto(tls, pCur, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, + libc.Bool32(flags&BTREE_APPEND != 0), bp) +__15: + ; + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __16 + } + return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) +__16: + ; +__13: + ; + + // If the cursor is currently pointing to an entry to be overwritten + // and the new content is the same as as the old, then use the + // overwrite optimization. + if !(*(*int32)(unsafe.Pointer(bp)) == 0) { + goto __17 + } + getCellInfo(tls, pCur) + if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey == (*BtreePayload)(unsafe.Pointer(pX)).FnKey) { + goto __18 + } + (*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FpData = (*BtreePayload)(unsafe.Pointer(pX)).FpKey + (*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FnData = int32((*BtreePayload)(unsafe.Pointer(pX)).FnKey) + (*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FnZero = 0 + return btreeOverwriteCell(tls, pCur, bp+32) +__18: + ; +__17: + ; +__6: + ; + + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + + if !((*MemPage)(unsafe.Pointer(pPage)).FnFree < 0) { + goto __19 + } + if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { + goto __20 + } + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) + goto __21 +__20: + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) +__21: + ; + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __22 + } + return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) +__22: + ; +__19: + ; + + newCell = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace + + if !(flags&BTREE_PREFORMAT != 0) { + goto __23 + } + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize + if !(*(*int32)(unsafe.Pointer(bp + 108)) < 4) { + goto __25 + } + *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = 4 +__25: + ; + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 108)) > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { + goto __26 + } + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, newCell, bp+80 /* &info */) + if !((*CellInfo)(unsafe.Pointer(bp+80)).FnPayload != U32((*CellInfo)(unsafe.Pointer(bp+80)).FnLocal)) { + goto __27 + } + ovfl = Xsqlite3Get4byte(tls, newCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))-4)) + ptrmapPut(tls, pBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+104) +__27: + ; +__26: + ; + goto __24 +__23: + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = fillInCell(tls, pPage, newCell, pX, bp+108) +__24: + ; + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __28 + } + goto end_insert +__28: + ; + + idx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) + if !(*(*int32)(unsafe.Pointer(bp)) == 0) { + goto __29 + } + + if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { + goto __31 + } + return Xsqlite3CorruptError(tls, 75170) +__31: + ; + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __32 + } + goto end_insert +__32: + ; + oldCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) + 1))))) + if !!(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + goto __33 + } + libc.Xmemcpy(tls, newCell, oldCell, uint64(4)) +__33: + ; + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, oldCell, bp+112 /* &info1 */) + if !(U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnPayload) { + goto __34 + } + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = clearCellOverflow(tls, pPage, oldCell, bp+112 /* &info1 */) + goto __35 +__34: + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_OK +__35: + ; + + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) + if !(int32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) == *(*int32)(unsafe.Pointer(bp + 108)) && U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal) == (*CellInfo)(unsafe.Pointer(bp+112)).FnPayload && + (!(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0) || *(*int32)(unsafe.Pointer(bp + 108)) < int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal))) { + goto __36 + } + // Overwrite the old cell with the new if they are the same size. + // We could also try to do this if the old cell is smaller, then add + // the leftover space to the free list. But experiments show that + // doing that is no faster then skipping this optimization and just + // calling dropCell() and insertCell(). + // + // This optimization cannot be used on an autovacuum database if the + // new entry uses overflow pages, as the insertCell() call below is + // necessary to add the PTRMAP_OVERFLOW1 pointer-map entry. + // clearCell never fails when nLocal==nPayload + if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { + goto __37 + } + return Xsqlite3CorruptError(tls, 75197) +__37: + ; + if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { + goto __38 + } + return Xsqlite3CorruptError(tls, 75200) +__38: + ; + libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) + return SQLITE_OK +__36: + ; + dropCell(tls, pPage, idx, int32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnSize), bp+104) + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __39 + } + goto end_insert +__39: + ; + goto __30 +__29: + if !(*(*int32)(unsafe.Pointer(bp)) < 0 && int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > 0) { + goto __40 + } + + idx = int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey)) + goto __41 +__40: + ; +__41: + ; +__30: + ; + insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)), uintptr(0), uint32(0), bp+104) + + // If no error has occurred and pPage has an overflow cell, call balance() + // to redistribute the cells within the tree. Since balance() may move + // the cursor, zero the BtCursor.info.nSize and BTCF_ValidNKey + // variables. + // + // Previous versions of SQLite called moveToRoot() to move the cursor + // back to the root page as balance() used to invalidate the contents + // of BtCursor.apPage[] and BtCursor.aiIdx[]. Instead of doing that, + // set the cursor state to "invalid". This makes common insert operations + // slightly faster. + // + // There is a subtle but important optimization here too. When inserting + // multiple records into an intkey b-tree using a single cursor (as can + // happen while processing an "INSERT INTO ... SELECT" statement), it + // is advantageous to leave the cursor pointing to the last entry in + // the b-tree if possible. If the cursor is left pointing to the last + // entry in the table, and the next row inserted has an integer key + // larger than the largest existing key, it is possible to insert the + // row without seeking the cursor. This can be a big performance boost. + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) + if !((*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0) { + goto __42 + } + + *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey)) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = balance(tls, pCur) + + // Must make sure nOverflow is reset to zero even if the balance() + // fails. Internal data structure corruption will result otherwise. + // Also, set the cursor state to invalid. This stops saveCursorPosition() + // from trying to save the current position of the cursor. + (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnOverflow = U8(0) + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) + if !(flags&BTREE_SAVEPOSITION != 0 && *(*int32)(unsafe.Pointer(bp + 104)) == SQLITE_OK) { + goto __43 + } + btreeReleaseAllCursorPages(tls, pCur) + if !((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo != 0) { + goto __44 + } + + (*BtCursor)(unsafe.Pointer(pCur)).FpKey = Xsqlite3Malloc(tls, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) + if !((*BtCursor)(unsafe.Pointer(pCur)).FpKey == uintptr(0)) { + goto __45 + } + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_NOMEM + goto __46 +__45: + libc.Xmemcpy(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) +__46: + ; +__44: + ; + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK) + (*BtCursor)(unsafe.Pointer(pCur)).FnKey = (*BtreePayload)(unsafe.Pointer(pX)).FnKey +__43: + ; +__42: + ; + +end_insert: + return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) +} + +// This function is used as part of copying the current row from cursor +// pSrc into cursor pDest. If the cursors are open on intkey tables, then +// parameter iKey is used as the rowid value when the record is copied +// into pDest. Otherwise, the record is copied verbatim. +// +// This function does not actually write the new value to cursor pDest. +// Instead, it creates and populates any required overflow pages and +// writes the data for the new cell into the BtShared.pTmpSpace buffer +// for the destination database. The size of the cell, in bytes, is left +// in BtShared.nPreformatSize. The caller completes the insertion by +// calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. +// +// SQLITE_OK is returned if successful, or an SQLite error code otherwise. +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = SQLITE_OK + var pBt uintptr = (*BtCursor)(unsafe.Pointer(pDest)).FpBt + var aOut uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace // Pointer to next output buffer + var aIn uintptr // Pointer to next input buffer + var nIn U32 // Size of input buffer aIn[] + var nRem U32 // Bytes of data still to copy + + getCellInfo(tls, pSrc) + aOut += uintptr(func() uint8 { + if (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload < U32(0x80) { + return uint8(func() int32 { + *(*U8)(unsafe.Pointer(aOut)) = uint8((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload) + return 1 + }()) + } + return uint8(Xsqlite3PutVarint(tls, aOut, uint64((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload))) + }()) + if (*BtCursor)(unsafe.Pointer(pDest)).FpKeyInfo == uintptr(0) { + aOut += uintptr(Xsqlite3PutVarint(tls, aOut, uint64(iKey))) + } + nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) + aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload + if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { + return Xsqlite3CorruptError(tls, 75300) + } + nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload + if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { + libc.Xmemcpy(tls, aOut, aIn, uint64(nIn)) + (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(int64(nIn) + (int64(aOut)-int64((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace))/1) + } else { + var pSrcPager uintptr = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpBt)).FpPager + var pPgnoOut uintptr = uintptr(0) + var ovflIn Pgno = Pgno(0) + *(*uintptr)(unsafe.Pointer(bp /* pPageIn */)) = uintptr(0) + var pPageOut uintptr = uintptr(0) + var nOut U32 // Size of output buffer aOut[] + + nOut = U32(btreePayloadToLocal(tls, (*BtCursor)(unsafe.Pointer(pDest)).FpPage, int64((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload))) + (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(int64(nOut) + (int64(aOut)-int64((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace))/1) + if nOut < (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload { + pPgnoOut = aOut + uintptr(nOut) + *(*int32)(unsafe.Pointer(pBt + 144)) += 4 + } + + if nRem > nIn { + if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { + return Xsqlite3CorruptError(tls, 75323) + } + ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) + } + + for __ccgo := true; __ccgo; __ccgo = nRem > U32(0) && *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK { + nRem = nRem - nOut + for __ccgo1 := true; __ccgo1; __ccgo1 = *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK && nOut > U32(0) { + + if nIn > U32(0) { + var nCopy int32 = func() int32 { + if nOut < nIn { + return int32(nOut) + } + return int32(nIn) + }() + libc.Xmemcpy(tls, aOut, aIn, uint64(nCopy)) + nOut = nOut - U32(nCopy) + nIn = nIn - U32(nCopy) + aOut += uintptr(nCopy) + aIn += uintptr(nCopy) + } + if nOut > U32(0) { + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) + *(*uintptr)(unsafe.Pointer(bp /* pPageIn */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = Xsqlite3PagerGet(tls, pSrcPager, ovflIn, bp, PAGER_GET_READONLY) + if *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK { + aIn = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) + ovflIn = Xsqlite3Get4byte(tls, aIn) + aIn += uintptr(4) + nIn = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpBt)).FusableSize - U32(4) + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK && nRem > U32(0) && pPgnoOut != 0 { + // var pgnoNew Pgno at bp+16, 4 + + *(*uintptr)(unsafe.Pointer(bp + 8 /* pNew */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = allocateBtreePage(tls, pBt, bp+8, bp+16, uint32(0), uint8(0)) + Xsqlite3Put4byte(tls, pPgnoOut, *(*Pgno)(unsafe.Pointer(bp + 16 /* pgnoNew */))) + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && pPageOut != 0 { + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 16 /* pgnoNew */)), uint8(PTRMAP_OVERFLOW2), (*MemPage)(unsafe.Pointer(pPageOut)).Fpgno, bp+20) + } + releasePage(tls, pPageOut) + pPageOut = *(*uintptr)(unsafe.Pointer(bp + 8 /* pNew */)) + if pPageOut != 0 { + pPgnoOut = (*MemPage)(unsafe.Pointer(pPageOut)).FaData + Xsqlite3Put4byte(tls, pPgnoOut, uint32(0)) + aOut = pPgnoOut + 4 + nOut = func() uint32 { + if (*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(4) < nRem { + return (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) + } + return nRem + }() + } + } + } + + releasePage(tls, pPageOut) + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) + } + + return *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) +} + +// Delete the entry that the cursor is pointing to. +// +// If the BTREE_SAVEPOSITION bit of the flags parameter is zero, then +// the cursor is left pointing at an arbitrary location after the delete. +// But if that bit is set, then the cursor is left in a state such that +// the next call to BtreeNext() or BtreePrev() moves it to the same row +// as it would have been on if the call to BtreeDelete() had been omitted. +// +// The BTREE_AUXDELETE bit of flags indicates that is one of several deletes +// associated with a single table entry and its indexes. Only one of those +// deletes is considered the "primary" delete. The primary delete occurs +// on a cursor that is not a BTREE_FORDELETE cursor. All but one delete +// operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. +// The BTREE_AUXDELETE bit is a hint that is not used by this implementation, +// but which might be used by alternative storage engines. +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + var p uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + // var rc int32 at bp+24, 4 + // Return code + var pPage uintptr // Page to delete cell from + var pCell uintptr // Pointer to cell to delete + var iCellIdx int32 // Index of cell to delete + var iCellDepth int32 // Depth of node containing pCell + // var info CellInfo at bp, 24 + // Size of the cell being deleted + var bPreserve U8 // Keep cursor valid. 2 for CURSOR_SKIPNEXT + + if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_REQUIRESEEK { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeRestoreCursorPosition(tls, pCur) + + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 || int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + } + + iCellDepth = int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) + iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { + return Xsqlite3CorruptError(tls, 75425) + } + pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) + if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { + return Xsqlite3CorruptError(tls, 75429) + } + + // If the BTREE_SAVEPOSITION bit is on, then the cursor position must + // be preserved following this delete operation. If the current delete + // will cause a b-tree rebalance, then this is done by saving the cursor + // key and leaving the cursor in CURSOR_REQUIRESEEK state before + // returning. + // + // If the current delete will not cause a rebalance, then the cursor + // will be left in CURSOR_SKIPNEXT state pointing to the entry immediately + // before or after the deleted entry. + // + // The bPreserve value records which path is required: + // + // bPreserve==0 Not necessary to save the cursor position + // bPreserve==1 Use CURSOR_REQUIRESEEK to save the cursor position + // bPreserve==2 Cursor won't move. Set CURSOR_SKIPNEXT. + bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) + if bPreserve != 0 { + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) || + (*MemPage)(unsafe.Pointer(pPage)).FnFree+int32(cellSizePtr(tls, pPage, pCell))+2 > int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize*U32(2)/U32(3)) || + int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 1 { + // A b-tree rebalance will be required after deleting this entry. + // Save the cursor key. + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = saveCursorKey(tls, pCur) + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + } else { + bPreserve = U8(2) + } + } + + // If the page containing the entry to delete is not a leaf page, move + // the cursor to the largest entry in the tree that is smaller than + // the entry being deleted. This cell will replace the cell being deleted + // from the internal node. The 'previous' entry is used for this instead + // of the 'next' entry, as the previous entry is always a part of the + // sub-tree headed by the child page of the cell being deleted. This makes + // balancing the tree following the delete operation easier. + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3BtreePrevious(tls, pCur, 0) + + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + } + + // Save the positions of any other cursors open on this table before + // making any modifications. + if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Multiple != 0 { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = saveAllCursors(tls, pBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + } + + // If this is a delete operation to remove a row from a table b-tree, + // invalidate any incrblob cursors open on the row being deleted. + if (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0) && (*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0 { + invalidateIncrblobCursors(tls, p, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey, 0) + } + + // Make the page containing the entry to be deleted writable. Then free any + // overflow pages associated with the entry and finally remove the cell + // itself from within the page. + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) + if U32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp /* &info */)).FnPayload { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = clearCellOverflow(tls, pPage, pCell, bp /* &info */) + } else { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK + } + + dropCell(tls, pPage, iCellIdx, int32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize), bp+24) + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + + // If the cell deleted was not located on a leaf page, then the cursor + // is currently pointing to the largest entry in the sub-tree headed + // by the child-page of the cell that was just deleted from an internal + // node. The cell from the leaf node needs to be moved to the internal + // node to replace the deleted cell. + if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { + var pLeaf uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + var nCell int32 + var n Pgno + var pTmp uintptr + + if (*MemPage)(unsafe.Pointer(pLeaf)).FnFree < 0 { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeComputeFreeSpace(tls, pLeaf) + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + } + if iCellDepth < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage)-1 { + n = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(iCellDepth+1)*8)))).Fpgno + } else { + n = (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno + } + pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) + if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { + return Xsqlite3CorruptError(tls, 75519) + } + nCell = int32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pLeaf)).FxCellSize})).f(tls, pLeaf, pCell)) + + pTmp = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace + + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pLeaf)).FpDbPage) + if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { + insertCell(tls, pPage, iCellIdx, pCell-uintptr(4), nCell+4, pTmp, n, bp+24) + } + dropCell(tls, pLeaf, int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1, nCell, bp+24) + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + } + } + + // Balance the tree. If the entry deleted was located on a leaf page, + // then the cursor still points to that page. In this case the first + // call to balance() repairs the tree, and the if(...) condition is + // never true. + // + // Otherwise, if the entry deleted was on an internal node page, then + // pCur is pointing to the leaf page from which a cell was removed to + // replace the cell deleted from the internal node. This is slightly + // tricky as the leaf node may be underfull, and the internal node may + // be either under or overfull. In this case run the balancing algorithm + // on the leaf node first. If the balance proceeds far enough up the + // tree that we can be sure that any problem in the internal node has + // been corrected, so be it. Otherwise, after balancing the leaf node, + // walk the cursor up the tree to the internal node and balance it as + // well. + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = balance(tls, pCur) + if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK && int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) > iCellDepth { + releasePageNotNull(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage) + (*BtCursor)(unsafe.Pointer(pCur)).FiPage-- + for int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) > iCellDepth { + releasePage(tls, *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(libc.PostDecInt8(&(*BtCursor)(unsafe.Pointer(pCur)).FiPage, 1))*8))) + } + (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = balance(tls, pCur) + } + + if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { + if int32(bPreserve) > 1 { + + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_SKIPNEXT) + if iCellIdx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { + (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = -1 + (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1) + } else { + (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = 1 + } + } else { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = moveToRoot(tls, pCur) + if bPreserve != 0 { + btreeReleaseAllCursorPages(tls, pCur) + (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK) + } + if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_EMPTY { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK + } + } + } + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) +} + +// Create a new BTree table. Write into *piTable the page +// number for the root page of the new table. +// +// The type of type is determined by the flags parameter. Only the +// following values of flags are currently in use. Other values for +// flags might not work: +// +// BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys +// BTREE_ZERODATA Used for SQL indices +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ + bp := tls.Alloc(44) + defer tls.Free(44) + + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + // var pRoot uintptr at bp+24, 8 + + // var pgnoRoot Pgno at bp, 4 + + // var rc int32 at bp+40, 4 + + var ptfFlags int32 // Page-type flage for the root page of new table + + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + // var pgnoMove Pgno at bp+16, 4 + // Move a page here to make room for the root-page + // var pPageMove uintptr at bp+8, 8 + // The page to move to. + + // Creating a new table may probably require moving an existing database + // to make room for the new tables root page. In case this page turns + // out to be an overflow page, delete all overflow page-map caches + // held by open cursors. + invalidateAllOverflowCache(tls, pBt) + + // Read the value of meta[3] from the database to determine where the + // root page of the new table should go. meta[3] is the largest root-page + // created so far, so the new root-page is (meta[3]+1). + Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) + if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { + return Xsqlite3CorruptError(tls, 75627) + } + *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ + + // The new root-page may not be allocated on a pointer-map page, or the + // PENDING_BYTE page. + for *(*Pgno)(unsafe.Pointer(bp)) == ptrmapPageno(tls, pBt, *(*Pgno)(unsafe.Pointer(bp))) || *(*Pgno)(unsafe.Pointer(bp)) == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { + *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ + } + + // Allocate a page. The page that currently resides at pgnoRoot will + // be moved to the allocated page (unless the allocated page happens + // to reside at pgnoRoot). + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = allocateBtreePage(tls, pBt, bp+8, bp+16, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(BTALLOC_EXACT)) + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + if *(*Pgno)(unsafe.Pointer(bp + 16)) != *(*Pgno)(unsafe.Pointer(bp)) { + // pgnoRoot is the page that will be used for the root-page of + // the new table (assuming an error did not occur). But we were + // allocated pgnoMove. If required (i.e. if it was not allocated + // by extending the file), the current page at position pgnoMove + // is already journaled. + *(*U8)(unsafe.Pointer(bp + 32 /* eType */)) = U8(0) + *(*Pgno)(unsafe.Pointer(bp + 36 /* iPtrPage */)) = Pgno(0) + + // Save the positions of any open cursors. This is required in + // case they are holding a reference to an xFetch reference + // corresponding to page pgnoRoot. + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPageMove */))) + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + // Move the page currently at pgnoRoot to pgnoMove. + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+24, 0) + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) + if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) + } + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)), *(*U8)(unsafe.Pointer(bp + 32 /* eType */)), *(*Pgno)(unsafe.Pointer(bp + 36 /* iPtrPage */)), *(*Pgno)(unsafe.Pointer(bp + 16 /* pgnoMove */)), 0) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) + + // Obtain the page at pgnoRoot + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+24, 0) + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)))).FpDbPage) + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + } else { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pPageMove */)) + } + + // Update the pointer-map and meta-data with the new root-page number. + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(PTRMAP_ROOTPAGE), uint32(0), bp+40) + if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + // When the new root page was allocated, page 1 was made writable in + // order either to increase the database filesize, or to decrement the + // freelist count. Hence, the sqlite3BtreeUpdateMeta() call cannot fail. + + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3BtreeUpdateMeta(tls, p, 4, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))) + if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + } else { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = allocateBtreePage(tls, pBt, bp+24, bp, uint32(1), uint8(0)) + if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + } + + if createTabFlags&BTREE_INTKEY != 0 { + ptfFlags = PTF_INTKEY | PTF_LEAFDATA | PTF_LEAF + } else { + ptfFlags = PTF_ZERODATA | PTF_LEAF + } + zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)), ptfFlags) + Xsqlite3PagerUnref(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)))).FpDbPage) + + *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) + return SQLITE_OK +} + +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ + var rc int32 + Xsqlite3BtreeEnter(tls, p) + rc = btreeCreateTable(tls, p, piTable, flags) + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Erase the given database page and all its children. Return +// the page to the freelist. +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + // var pPage uintptr at bp, 8 + + // var rc int32 at bp+32, 4 + + var pCell uintptr + var i int32 + var hdr int32 + // var info CellInfo at bp+8, 24 + + if !(pgno > btreePagecount(tls, pBt)) { + goto __1 + } + return Xsqlite3CorruptError(tls, 75765) +__1: + ; + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) + if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { + goto __2 + } + return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) +__2: + ; + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FopenFlags)&BTREE_SINGLE == 0 && + Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { + goto __3 + } + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) + goto cleardatabasepage_out +__3: + ; + hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FhdrOffset) + i = 0 +__4: + if !(i < int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnCell)) { + goto __6 + } + pCell = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaCellIdx + uintptr(2*i))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaCellIdx + uintptr(2*i) + 1))))) + if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fleaf) != 0) { + goto __7 + } + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearDatabasePage(tls, pBt, Xsqlite3Get4byte(tls, pCell), 1, pnChange) + if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { + goto __8 + } + goto cleardatabasepage_out +__8: + ; +__7: + ; + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FxParseCell})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), pCell, bp+8 /* &info */) + if !(U32((*CellInfo)(unsafe.Pointer(bp+8 /* &info */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+8 /* &info */)).FnPayload) { + goto __9 + } + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearCellOverflow(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), pCell, bp+8 /* &info */) + goto __10 +__9: + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK +__10: + ; + + if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { + goto __11 + } + goto cleardatabasepage_out +__11: + ; + goto __5 +__5: + i++ + goto __4 + goto __6 +__6: + ; + if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fleaf) != 0) { + goto __12 + } + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearDatabasePage(tls, pBt, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr(hdr+8)), 1, pnChange) + if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { + goto __13 + } + goto cleardatabasepage_out +__13: + ; + if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FintKey != 0) { + goto __14 + } + pnChange = uintptr(0) +__14: + ; +__12: + ; + if !(pnChange != 0) { + goto __15 + } + + *(*I64)(unsafe.Pointer(pnChange)) += I64((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnCell) +__15: + ; + if !(freePageFlag != 0) { + goto __16 + } + freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+32) + goto __17 +__16: + if !(libc.AssignPtrInt32(bp+32, Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage)) == 0) { + goto __18 + } + zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData + uintptr(hdr))))|PTF_LEAF) +__18: + ; +__17: + ; + +cleardatabasepage_out: + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) +} + +// Delete all information from a single table in the database. iTable is +// the page number of the root of the table. After this routine returns, +// the root page is empty, but still exists. +// +// This routine will fail with SQLITE_LOCKED if there are any open +// read cursors on the table. Open write cursors are moved to the +// root of the table. +// +// If pnChange is not NULL, then the integer value pointed to by pnChange +// is incremented by the number of entries in the table. +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ + var rc int32 + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + Xsqlite3BtreeEnter(tls, p) + + rc = saveAllCursors(tls, pBt, Pgno(iTable), uintptr(0)) + + if SQLITE_OK == rc { + // Invalidate all incrblob cursors open on table iTable (assuming iTable + // is the root of a table b-tree - if it is not, the following call is + // a no-op). + if (*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0 { + invalidateIncrblobCursors(tls, p, Pgno(iTable), int64(0), 1) + } + rc = clearDatabasePage(tls, pBt, Pgno(iTable), 0, pnChange) + } + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Delete all information from the single table that pCur is open on. +// +// This routine only work for pCur on an ephemeral table. +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ + return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) +} + +// Erase all information in a table and add the root of the table to +// the freelist. Except, the root of the principle table (the one on +// page 1) is never added to the freelist. +// +// This routine will fail with SQLITE_LOCKED if there are any open +// cursors on the table. +// +// If AUTOVACUUM is enabled and the page at iTable is not the last +// root page in the database file, then the last root page +// in the database file is moved into the slot formerly occupied by +// iTable and that last slot formerly occupied by the last root page +// is added to the freelist instead of iTable. In this say, all +// root pages are kept at the beginning of the database file, which +// is necessary for AUTOVACUUM to work right. *piMoved is set to the +// page number that used to be the last root page in the file before +// the move. If no page gets moved, *piMoved is set to 0. +// The last root page is recorded in meta[3] and the value of +// meta[3] is updated by this procedure. +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + // var rc int32 at bp+12, 4 + + *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = uintptr(0) + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + if iTable > btreePagecount(tls, pBt) { + return Xsqlite3CorruptError(tls, 75876) + } + + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) + if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = btreeGetPage(tls, pBt, iTable, bp, 0) + if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + + *(*int32)(unsafe.Pointer(piMoved)) = 0 + + if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { + // var maxRootPgno Pgno at bp+8, 4 + + Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp+8) + + if iTable == *(*Pgno)(unsafe.Pointer(bp + 8)) { + // If the table being dropped is the table with the largest root-page + // number in the database, put the root page on the free list. + freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+12) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + } else { + // The table being dropped does not have the largest root-page + // number in the database. So move the page that does into the + // gap left by the deleted root-page. + // var pMove uintptr at bp+16, 8 + + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */)), bp+16, 0) + if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */)), uint8(PTRMAP_ROOTPAGE), uint32(0), iTable, 0) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */))) + if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */)), bp+16, 0) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */)), bp+12) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */))) + if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) + } + *(*int32)(unsafe.Pointer(piMoved)) = int32(*(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))) + } + + // Set the new 'max-root-page' value in the database header. This + // is the old value less one, less one more if that happens to + // be a root-page number, less one again if that is the + // PENDING_BYTE_PAGE. + *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))-- + for *(*Pgno)(unsafe.Pointer(bp + 8)) == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) || + ptrmapPageno(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8))) == *(*Pgno)(unsafe.Pointer(bp + 8)) { + *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))-- + } + + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeUpdateMeta(tls, p, 4, *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))) + } else { + freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+12) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) + } + return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) +} + +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ + var rc int32 + Xsqlite3BtreeEnter(tls, p) + rc = btreeDropTable(tls, p, uint32(iTable), piMoved) + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// This function may only be called if the b-tree connection already +// has a read or write transaction open on the database. +// +// Read the meta-information out of a database file. Meta[0] +// is the number of free pages currently in the database. Meta[1] +// through meta[15] are available for use by higher layers. Meta[0] +// is read-only, the others are read/write. +// +// The schema layer numbers meta values differently. At the schema +// layer (and the SetCookie and ReadCookie opcodes) the number of +// free pages is not visible. So Cookie[0] is the same as Meta[1]. +// +// This routine treats Meta[BTREE_DATA_VERSION] as a special case. Instead +// of reading the value out of the header, it instead loads the "DataVersion" +// from the pager. The BTREE_DATA_VERSION value is not actually stored in the +// database file. It is a number computed by the pager. But its access +// pattern is the same as header meta values, and so it is convenient to +// read it from this routine. +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + + Xsqlite3BtreeEnter(tls, p) + + if idx == BTREE_DATA_VERSION { + *(*U32)(unsafe.Pointer(pMeta)) = Xsqlite3PagerDataVersion(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + (*Btree)(unsafe.Pointer(p)).FiBDataVersion + } else { + *(*U32)(unsafe.Pointer(pMeta)) = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+uintptr(36+idx*4)) + } + + // If auto-vacuum is disabled in this build and this is an auto-vacuum + // database, mark the database as read-only. + + Xsqlite3BtreeLeave(tls, p) +} + +// Write meta-information back into the database. Meta[0] is +// read-only and may not be written. +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + var pP1 uintptr + var rc int32 + + Xsqlite3BtreeEnter(tls, p) + + pP1 = (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) + if rc == SQLITE_OK { + Xsqlite3Put4byte(tls, pP1+uintptr(36+idx*4), iMeta) + if idx == BTREE_INCR_VACUUM { + + (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = U8(iMeta) + } + } + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// The first argument, pCur, is a cursor opened on some b-tree. Count the +// number of entries in the b-tree and write the result to *pnEntry. +// +// SQLITE_OK is returned if the operation is successfully executed. +// Otherwise, if an error is encountered (i.e. an IO error or database +// corruption) an SQLite error code is returned. +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ + var nEntry I64 = int64(0) // Value to return in *pnEntry + var rc int32 // Return code + + rc = moveToRoot(tls, pCur) + if rc == SQLITE_EMPTY { + *(*I64)(unsafe.Pointer(pnEntry)) = int64(0) + return SQLITE_OK + } + + // Unless an error occurs, the following loop runs one iteration for each + // page in the B-Tree structure (not including overflow pages). + for rc == SQLITE_OK && !(libc.AtomicLoadNInt32(db+432, 0) != 0) { + var iIdx int32 // Index of child node in parent + var pPage uintptr // Current page of the b-tree + + // If this is a leaf page or the tree is not an int-key tree, then + // this page contains countable entries. Increment the entry counter + // accordingly. + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 || !(int32((*MemPage)(unsafe.Pointer(pPage)).FintKey) != 0) { + nEntry = nEntry + I64((*MemPage)(unsafe.Pointer(pPage)).FnCell) + } + + // pPage is a leaf node. This loop navigates the cursor so that it + // points to the first interior cell that it points to the parent of + // the next page in the tree that has not yet been visited. The + // pCur->aiIdx[pCur->iPage] value is set to the index of the parent cell + // of the page, or to the number of cells in the page if the next page + // to visit is the right-child of its parent. + // + // If all pages in the tree have been visited, return SQLITE_OK to the + // caller. + if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { + for __ccgo := true; __ccgo; __ccgo = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) { + if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) == 0 { + // All pages of the b-tree have been visited. Return successfully. + *(*I64)(unsafe.Pointer(pnEntry)) = nEntry + return moveToRoot(tls, pCur) + } + moveToParent(tls, pCur) + } + + (*BtCursor)(unsafe.Pointer(pCur)).Fix++ + pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + } + + // Descend to the child node of the cell that the cursor currently + // points at. This is the right-child if (iIdx==pPage->nCell). + iIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) + if iIdx == int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { + rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8))) + } else { + rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iIdx) + 1))))))) + } + } + + // An error has occurred. Return an error code. + return rc +} + +// Return the pager associated with a BTree. This routine is used for +// testing and debugging only. +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ + return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager +} + +// Append a message to the error message string. +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var ap Va_list + _ = ap + if !((*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0) { + return + } + (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr-- + (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ + ap = va + if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { + Xsqlite3_str_append(tls, pCheck+56, ts+4004, 1) + } + if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { + Xsqlite3_str_appendf(tls, pCheck+56, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) + } + Xsqlite3_str_vappendf(tls, pCheck+56, zFormat, ap) + _ = ap + if int32((*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FaccError) == SQLITE_NOMEM { + (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 + } +} + +// Return non-zero if the bit in the IntegrityCk.aPgRef[] array that +// corresponds to page iPg is already set. +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ + + return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) +} + +// Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ + + *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) +} + +// Add 1 to the reference count for page iPage. If this is the second +// reference to the page, add an error message to pCheck->zErrMsg. +// Return 1 if there are 2 or more references to the page and 0 if +// if this is the first reference to the page. +// +// Also check that the page number is in bounds. +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { + checkAppendMsg(tls, pCheck, ts+4006, libc.VaList(bp, iPage)) + return 1 + } + if getPageReferenced(tls, pCheck, iPage) != 0 { + checkAppendMsg(tls, pCheck, ts+4029, libc.VaList(bp+8, iPage)) + return 1 + } + if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { + return 1 + } + setPageReferenced(tls, pCheck, iPage) + return 0 +} + +// Check that the entry in the pointer-map for page iChild maps to +// page iParent, pointer type ptrType. If not, append an error message +// to pCheck. +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var rc int32 + // var ePtrmapType U8 at bp+48, 1 + + // var iPtrmapParent Pgno at bp+52, 4 + + rc = ptrmapGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt, iChild, bp+48, bp+52) + if rc != SQLITE_OK { + if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { + (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 + } + checkAppendMsg(tls, pCheck, ts+4054, libc.VaList(bp, iChild)) + return + } + + if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { + checkAppendMsg(tls, pCheck, + ts+4083, + libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48 /* ePtrmapType */))), *(*Pgno)(unsafe.Pointer(bp + 52 /* iPtrmapParent */)))) + } +} + +// Check the integrity of the freelist or of an overflow page list. +// Verify that the number of pages on the list is N. +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + var expected U32 = N + var nErrAtStart int32 = (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr + for iPage != Pgno(0) && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0 { + // var pOvflPage uintptr at bp+40, 8 + + var pOvflData uintptr + if checkRef(tls, pCheck, iPage) != 0 { + break + } + N-- + if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { + checkAppendMsg(tls, pCheck, ts+4137, libc.VaList(bp, iPage)) + break + } + pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */))) + if isFreeList != 0 { + var n U32 = Xsqlite3Get4byte(tls, pOvflData+4) + if (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FautoVacuum != 0 { + checkPtrmap(tls, pCheck, iPage, uint8(PTRMAP_FREEPAGE), uint32(0)) + } + if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { + checkAppendMsg(tls, pCheck, + ts+4159, libc.VaList(bp+8, iPage)) + N-- + } else { + for i = 0; i < int32(n); i++ { + var iFreePage Pgno = Xsqlite3Get4byte(tls, pOvflData+uintptr(8+i*4)) + if (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FautoVacuum != 0 { + checkPtrmap(tls, pCheck, iFreePage, uint8(PTRMAP_FREEPAGE), uint32(0)) + } + checkRef(tls, pCheck, iFreePage) + } + N = N - n + } + } else { + // If this database supports auto-vacuum and iPage is not the last + // page in this overflow list, check that the pointer-map entry for + // the following page matches iPage. + if (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FautoVacuum != 0 && N > U32(0) { + i = int32(Xsqlite3Get4byte(tls, pOvflData)) + checkPtrmap(tls, pCheck, uint32(i), uint8(PTRMAP_OVERFLOW2), iPage) + } + } + iPage = Xsqlite3Get4byte(tls, pOvflData) + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */))) + } + if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { + checkAppendMsg(tls, pCheck, + ts+4198, + libc.VaList(bp+16, func() uintptr { + if isFreeList != 0 { + return ts + 4224 /* "size" */ + } + return ts + 4229 /* "overflow list le..." */ + }(), + expected-N, expected)) + } +} + +// An implementation of a min-heap. +// +// aHeap[0] is the number of elements on the heap. aHeap[1] is the +// root element. The daughter nodes of aHeap[N] are aHeap[N*2] +// and aHeap[N*2+1]. +// +// The heap property is this: Every node is less than or equal to both +// of its daughter nodes. A consequence of the heap property is that the +// root node aHeap[1] is always the minimum value currently in the heap. +// +// The btreeHeapInsert() routine inserts an unsigned 32-bit number onto +// the heap, preserving the heap property. The btreeHeapPull() routine +// removes the root element from the heap (the minimum value in the heap) +// and then moves other nodes around as necessary to preserve the heap +// property. +// +// This heap is used for cell overlap and coverage testing. Each u32 +// entry represents the span of a cell or freeblock on a btree page. +// The upper 16 bits are the index of the first byte of a range and the +// lower 16 bits are the index of the last byte of that range. +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ + var j U32 + var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) + *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x + for libc.AssignUint32(&j, i/U32(2)) > U32(0) && *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) > *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) { + x = *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) + *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) = *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x + i = j + } +} + +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ + var j U32 + var i U32 + var x U32 + if libc.AssignUint32(&x, *(*U32)(unsafe.Pointer(aHeap))) == U32(0) { + return 0 + } + *(*U32)(unsafe.Pointer(pOut)) = *(*U32)(unsafe.Pointer(aHeap + 1*4)) + *(*U32)(unsafe.Pointer(aHeap + 1*4)) = *(*U32)(unsafe.Pointer(aHeap + uintptr(x)*4)) + *(*U32)(unsafe.Pointer(aHeap + uintptr(x)*4)) = 0xffffffff + *(*U32)(unsafe.Pointer(aHeap))-- + i = U32(1) + for libc.AssignUint32(&j, i*U32(2)) <= *(*U32)(unsafe.Pointer(aHeap)) { + if *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) > *(*U32)(unsafe.Pointer(aHeap + uintptr(j+U32(1))*4)) { + j++ + } + if *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) < *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) { + break + } + x = *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) + *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) + *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) = x + i = j + } + return 1 +} + +// Do various sanity checks on a single page of a tree. Return +// the tree depth. Root pages return 0. Parents of root pages +// return 1, and so forth. +// +// These checks are done: +// +// 1. Make sure that cells and freeblocks do not overlap +// but combine to completely cover the page. +// 2. Make sure integer cell keys are in order. +// 3. Check the integrity of overflow pages. +// 4. Recursively call checkTreePage on all children. +// 5. Verify that the depth of all children is the same. +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ + bp := tls.Alloc(140) + defer tls.Free(140) + *(*I64)(unsafe.Pointer(bp + 104)) = maxKey + + // var pPage uintptr at bp+96, 8 + // The page being analyzed + var i int32 // Loop counter + var rc int32 // Result code from subroutine call + var depth int32 + var d2 int32 // Depth of a subtree + var pgno int32 // Page number + var nFrag int32 // Number of fragmented bytes on the page + var hdr int32 // Offset to the page header + var cellStart int32 // Offset to the start of the cell pointer array + var nCell int32 // Number of cells + var doCoverageCheck int32 // True if cell coverage checking should be done + var keyCanBeEqual int32 // True if IPK can be equal to maxKey + // False if IPK must be strictly less than maxKey + var data uintptr // Page content + var pCell uintptr // Cell content + var pCellIdx uintptr // Next element of the cell pointer array + var pBt uintptr // The BtShared object that owns pPage + var pc U32 // Address of a cell + var usableSize U32 // Usable size of the page + var contentOffset U32 // Offset to the start of the cell content area + var heap uintptr // Min-heap used for checking cell coverage + // var x U32 at bp+136, 4 + + var prev U32 // Next and previous entry on the min-heap + var saved_zPfx uintptr + var saved_v1 int32 + var saved_v2 int32 + var savedIsInit U8 + var nPage U32 // Number of pages on the overflow chain + var pgnoOvfl Pgno + // var info CellInfo at bp+112, 24 + + var size U32 + var size1 int32 + var j int32 + *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)) = uintptr(0) + depth = -1 + doCoverageCheck = 1 + keyCanBeEqual = 1 + heap = uintptr(0) + prev = U32(0) + saved_zPfx = (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx + saved_v1 = int32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1) + saved_v2 = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 + savedIsInit = U8(0) + + // Check that the page exists + pBt = (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt + usableSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize + if !(iPage == Pgno(0)) { + goto __1 + } + return 0 +__1: + ; + if !(checkRef(tls, pCheck, iPage) != 0) { + goto __2 + } + return 0 +__2: + ; + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4250 /* "Page %u: " */ + (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage + if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { + goto __3 + } + checkAppendMsg(tls, pCheck, + ts+4260, libc.VaList(bp, rc)) + goto end_of_check +__3: + ; + + // Clear MemPage.isInit to make sure the corruption detection code in + // btreeInitPage() is executed. + savedIsInit = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit = U8(0) + if !(libc.AssignInt32(&rc, btreeInitPage(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))) != 0) { + goto __4 + } + // The only possible error from InitPage + checkAppendMsg(tls, pCheck, + ts+4298, libc.VaList(bp+8, rc)) + goto end_of_check +__4: + ; + if !(libc.AssignInt32(&rc, btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))) != 0) { + goto __5 + } + + checkAppendMsg(tls, pCheck, ts+4336, libc.VaList(bp+16, rc)) + goto end_of_check +__5: + ; + data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FaData + hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FhdrOffset) + + // Set up for cell analysis + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4358 /* "On tree page %u ..." */ + contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) + // Enforced by btreeInitPage() + + // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the + // number of cells on the page. + nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) + + // EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page + // immediately follows the b-tree page header. + cellStart = hdr + 12 - 4*int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) + + pCellIdx = data + uintptr(cellStart+2*(nCell-1)) + + if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { + goto __6 + } + // Analyze the right-child page of internal pages + pgno = int32(Xsqlite3Get4byte(tls, data+uintptr(hdr+8))) + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { + goto __8 + } + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4384 /* "On page %u at ri..." */ + checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) +__8: + ; + depth = checkTreePage(tls, pCheck, uint32(pgno), bp+104, *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */))) + keyCanBeEqual = 0 + goto __7 +__6: + // For leaf pages, the coverage check will occur in the same loop + // as the other cell checks, so initialize the heap. + heap = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fheap + *(*U32)(unsafe.Pointer(heap)) = U32(0) +__7: + ; + + // EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte + // integer offsets to the cell contents. + i = nCell - 1 +__9: + if !(i >= 0 && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0) { + goto __11 + } + + // Check cell size + (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 = i + + pc = U32(int32(*(*U8)(unsafe.Pointer(pCellIdx)))<<8 | int32(*(*U8)(unsafe.Pointer(pCellIdx + 1)))) + pCellIdx -= uintptr(2) + if !(pc < contentOffset || pc > usableSize-U32(4)) { + goto __12 + } + checkAppendMsg(tls, pCheck, ts+4412, + libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) + doCoverageCheck = 0 + goto __10 +__12: + ; + pCell = data + uintptr(pc) + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FxParseCell})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), pCell, bp+112 /* &info */) + if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { + goto __13 + } + checkAppendMsg(tls, pCheck, ts+4442, 0) + doCoverageCheck = 0 + goto __10 +__13: + ; + + // Check for integer primary key out of range + if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FintKey != 0) { + goto __14 + } + if !(func() int32 { + if keyCanBeEqual != 0 { + return libc.Bool32((*CellInfo)(unsafe.Pointer(bp+112)).FnKey > *(*I64)(unsafe.Pointer(bp + 104))) + } + return libc.Bool32((*CellInfo)(unsafe.Pointer(bp+112)).FnKey >= *(*I64)(unsafe.Pointer(bp + 104))) + }() != 0) { + goto __15 + } + checkAppendMsg(tls, pCheck, ts+4466, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnKey)) +__15: + ; + *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)) = (*CellInfo)(unsafe.Pointer(bp + 112 /* &info */)).FnKey + keyCanBeEqual = 0 // Only the first key on the page may ==maxKey +__14: + ; + + // Check the content overflow list + if !((*CellInfo)(unsafe.Pointer(bp+112)).FnPayload > U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal)) { + goto __16 + } // First page of the overflow chain + + nPage = ((*CellInfo)(unsafe.Pointer(bp+112)).FnPayload - U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal) + usableSize - U32(5)) / (usableSize - U32(4)) + pgnoOvfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize)-4)) + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { + goto __17 + } + checkPtrmap(tls, pCheck, pgnoOvfl, uint8(PTRMAP_OVERFLOW1), iPage) +__17: + ; + checkList(tls, pCheck, 0, pgnoOvfl, nPage) +__16: + ; + + if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { + goto __18 + } + // Check sanity of left child page for internal pages + pgno = int32(Xsqlite3Get4byte(tls, pCell)) + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { + goto __20 + } + checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) +__20: + ; + d2 = checkTreePage(tls, pCheck, uint32(pgno), bp+104, *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */))) + keyCanBeEqual = 0 + if !(d2 != depth) { + goto __21 + } + checkAppendMsg(tls, pCheck, ts+4490, 0) + depth = d2 +__21: + ; + goto __19 +__18: + // Populate the coverage-checking heap for leaf pages + btreeHeapInsert(tls, heap, pc<<16|(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize)-U32(1))) +__19: + ; + goto __10 +__10: + i-- + goto __9 + goto __11 +__11: + ; + *(*I64)(unsafe.Pointer(piMinKey)) = *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)) + + // Check for complete coverage of the page + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = uintptr(0) + if !(doCoverageCheck != 0 && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr > 0) { + goto __22 + } + // For leaf pages, the min-heap has already been initialized and the + // cells have already been inserted. But for internal pages, that has + // not yet been done, so do it now + if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { + goto __23 + } + heap = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fheap + *(*U32)(unsafe.Pointer(heap)) = U32(0) + i = nCell - 1 +__24: + if !(i >= 0) { + goto __26 + } + pc = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(cellStart+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellStart+i*2) + 1)))) + size = U32((*struct { + f func(*libc.TLS, uintptr, uintptr) U16 + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FxCellSize})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), data+uintptr(pc))) + btreeHeapInsert(tls, heap, pc<<16|(pc+size-U32(1))) + goto __25 +__25: + i-- + goto __24 + goto __26 +__26: + ; +__23: + ; + // Add the freeblocks to the min-heap + // + // EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header + // is the offset of the first freeblock, or zero if there are no + // freeblocks on the page. + i = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+1))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+1) + 1))) +__27: + if !(i > 0) { + goto __28 + } + // Enforced by btreeComputeFreeSpace() + size1 = int32(*(*U8)(unsafe.Pointer(data + uintptr(i+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(i+2) + 1))) + // due to btreeComputeFreeSpace() + btreeHeapInsert(tls, heap, U32(i)<<16|U32(i+size1-1)) + // EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a + // big-endian integer which is the offset in the b-tree page of the next + // freeblock in the chain, or zero if the freeblock is the last on the + // chain. + j = int32(*(*U8)(unsafe.Pointer(data + uintptr(i))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(i) + 1))) + // EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of + // increasing offset. + // Enforced by btreeComputeFreeSpace() + // Enforced by btreeComputeFreeSpace() + i = j + goto __27 +__28: + ; + // Analyze the min-heap looking for overlap between cells and/or + // freeblocks, and counting the number of untracked bytes in nFrag. + // + // Each min-heap entry is of the form: (start_address<<16)|end_address. + // There is an implied first entry the covers the page header, the cell + // pointer index, and the gap between the cell pointer index and the start + // of cell content. + // + // The loop below pulls entries from the min-heap in order and compares + // the start_address against the previous end_address. If there is an + // overlap, that means bytes are used multiple times. If there is a gap, + // that gap is added to the fragmentation count. + nFrag = 0 + prev = contentOffset - U32(1) // Implied first min-heap entry +__29: + if !(btreeHeapPull(tls, heap, bp+136) != 0) { + goto __30 + } + if !(prev&U32(0xffff) >= *(*U32)(unsafe.Pointer(bp + 136))>>16) { + goto __31 + } + checkAppendMsg(tls, pCheck, + ts+4515, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + goto __30 + goto __32 +__31: + nFrag = int32(U32(nFrag) + (*(*U32)(unsafe.Pointer(bp + 136))>>16 - prev&U32(0xffff) - U32(1))) + prev = *(*U32)(unsafe.Pointer(bp + 136 /* x */)) +__32: + ; + goto __29 +__30: + ; + nFrag = int32(U32(nFrag) + (usableSize - prev&U32(0xffff) - U32(1))) + // EVIDENCE-OF: R-43263-13491 The total number of bytes in all fragments + // is stored in the fifth field of the b-tree page header. + // EVIDENCE-OF: R-07161-27322 The one-byte integer at offset 7 gives the + // number of fragmented free bytes within the cell content area. + if !(*(*U32)(unsafe.Pointer(heap)) == U32(0) && nFrag != int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7))))) { + goto __33 + } + checkAppendMsg(tls, pCheck, + ts+4552, + libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) +__33: + ; +__22: + ; + +end_of_check: + if !!(doCoverageCheck != 0) { + goto __34 + } + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit = savedIsInit +__34: + ; + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */))) + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = saved_zPfx + (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = Pgno(saved_v1) + (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 = saved_v2 + return depth + 1 +} + +// This routine does a complete check of the given BTree file. aRoot[] is +// an array of pages numbers were each page number is the root page of +// a table. nRoot is the number of entries in aRoot. +// +// A read-only or read-write transaction must be opened before calling +// this function. +// +// Write the number of error seen in *pnErr. Except for some memory +// allocation errors, an error message held in memory obtained from +// malloc is returned if *pnErr is non-zero. If *pnErr==0 then NULL is +// returned. If a memory allocation error occurs, NULL is returned. +// +// If the first entry in aRoot[] is 0, that indicates that the list of +// root pages is incomplete. This is a "partial integrity-check". This +// happens when performing an integrity check on a single table. The +// zero is skipped, of course. But in addition, the freelist checks +// and the checks to make sure every page is referenced are also skipped, +// since obviously it is not possible to know which pages are covered by +// the unverified btrees. Except, if aRoot[1] is 1, then the freelist +// checks are still performed. +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ + bp := tls.Alloc(248) + defer tls.Free(248) + + var i Pgno + // var sCheck IntegrityCk at bp+32, 104 + + var pBt uintptr + var savedDbFlags U64 + // var zErr [100]uint8 at bp+136, 100 + + var bPartial int32 // True if not checking all btrees + var bCkFreelist int32 + var mx Pgno + var mxInHdr Pgno + // var notUsed I64 at bp+240, 8 + pBt = (*Btree)(unsafe.Pointer(p)).FpBt + savedDbFlags = (*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags + bPartial = 0 + bCkFreelist = 1 // True to scan the freelist + + // aRoot[0]==0 means this is a partial check + if !(*(*Pgno)(unsafe.Pointer(aRoot)) == Pgno(0)) { + goto __1 + } + + bPartial = 1 + if !(*(*Pgno)(unsafe.Pointer(aRoot + 1*4)) != Pgno(1)) { + goto __2 + } + bCkFreelist = 0 +__2: + ; +__1: + ; + + Xsqlite3BtreeEnter(tls, p) + + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fdb = db + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FpBt = pBt + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FpPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnPage = btreePagecount(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FpBt) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FmxErr = mxErr + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnErr = 0 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 0 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv1 = Pgno(0) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv2 = 0 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = uintptr(0) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = uintptr(0) + Xsqlite3StrAccumInit(tls, bp+32+56, uintptr(0), bp+136, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FerrMsg.FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) + if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage == Pgno(0)) { + goto __3 + } + goto integrity_ck_cleanup +__3: + ; + + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = Xsqlite3MallocZero(tls, uint64((*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage/Pgno(8)+Pgno(1))) + if !!(int32((*IntegrityCk)(unsafe.Pointer(bp+32)).FaPgRef) != 0) { + goto __4 + } + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 1 + goto integrity_ck_cleanup +__4: + ; + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) + if !((*IntegrityCk)(unsafe.Pointer(bp+32)).Fheap == uintptr(0)) { + goto __5 + } + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 1 + goto integrity_ck_cleanup +__5: + ; + + i = U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize + U32(1) + if !(i <= (*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage) { + goto __6 + } + setPageReferenced(tls, bp+32, i) +__6: + ; + + // Check the integrity of the freelist + if !(bCkFreelist != 0) { + goto __7 + } + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = ts + 4604 /* "Main freelist: " */ + checkList(tls, bp+32, 1, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32), + Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0) +__7: + ; + + // Check all the tables. + if !!(bPartial != 0) { + goto __8 + } + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { + goto __9 + } + mx = Pgno(0) + i = Pgno(0) +__11: + if !(int32(i) < nRoot) { + goto __13 + } + if !(mx < *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4))) { + goto __14 + } + mx = *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) +__14: + ; + goto __12 +__12: + i++ + goto __11 + goto __13 +__13: + ; + mxInHdr = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+52) + if !(mx != mxInHdr) { + goto __15 + } + checkAppendMsg(tls, bp+32, + ts+4620, + libc.VaList(bp, mx, mxInHdr)) +__15: + ; + goto __10 +__9: + if !(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+64) != U32(0)) { + goto __16 + } + checkAppendMsg(tls, bp+32, + ts+4665, 0) +__16: + ; +__10: + ; +__8: + ; + + *(*U64)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb + 48)) &= libc.CplUint64(uint64(SQLITE_CellSizeCk)) + i = Pgno(0) +__17: + if !(int32(i) < nRoot && (*IntegrityCk)(unsafe.Pointer(bp+32)).FmxErr != 0) { + goto __19 + } + if !(*(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) == Pgno(0)) { + goto __20 + } + goto __18 +__20: + ; + if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) > Pgno(1) && !(bPartial != 0)) { + goto __21 + } + checkPtrmap(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), uint8(PTRMAP_ROOTPAGE), uint32(0)) +__21: + ; + checkTreePage(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+240, int64(0xffffffff)|I64(int64(0x7fffffff))<<32) + goto __18 +__18: + i++ + goto __17 + goto __19 +__19: + ; + (*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags = savedDbFlags + + // Make sure every page in the file is referenced + if !!(bPartial != 0) { + goto __22 + } + i = Pgno(1) +__23: + if !(i <= (*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage && (*IntegrityCk)(unsafe.Pointer(bp+32)).FmxErr != 0) { + goto __25 + } + // If the database supports auto-vacuum, make sure no tables contain + // references to pointer-map pages. + if !(getPageReferenced(tls, bp+32, i) == 0 && (ptrmapPageno(tls, pBt, i) != i || !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0))) { + goto __26 + } + checkAppendMsg(tls, bp+32, ts+4720, libc.VaList(bp+16, i)) +__26: + ; + if !(getPageReferenced(tls, bp+32, i) != 0 && (ptrmapPageno(tls, pBt, i) == i && (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0)) { + goto __27 + } + checkAppendMsg(tls, bp+32, ts+4742, libc.VaList(bp+24, i)) +__27: + ; + goto __24 +__24: + i++ + goto __23 + goto __25 +__25: + ; +__22: + ; + + // Clean up and report errors. +integrity_ck_cleanup: + Xsqlite3PageFree(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).Fheap) + Xsqlite3_free(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FaPgRef) + if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FbOomFault != 0) { + goto __28 + } + Xsqlite3_str_reset(tls, bp+32+56) + (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnErr++ +__28: + ; + *(*int32)(unsafe.Pointer(pnErr)) = (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnErr + if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FnErr == 0) { + goto __29 + } + Xsqlite3_str_reset(tls, bp+32+56) +__29: + ; + // Make sure this analysis did not leave any unref() pages. + + Xsqlite3BtreeLeave(tls, p) + return Xsqlite3StrAccumFinish(tls, bp+32+56) +} + +// Return the full pathname of the underlying database file. Return +// an empty string if the database is in-memory or a TEMP database. +// +// The pager filename is invariant as long as the pager is +// open so it is safe to access without the BtShared mutex. +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ + + return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) +} + +// Return the pathname of the journal file for this database. The return +// value of this routine is the same regardless of whether the journal file +// has been created or not. +// +// The pager journal filename is invariant as long as the pager is +// open so it is safe to access without the BtShared mutex. +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ + + return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) +} + +// Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE +// to describe the current transaction state of Btree p. +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ + + if p != 0 { + return int32((*Btree)(unsafe.Pointer(p)).FinTrans) + } + return 0 +} + +// Run a checkpoint on the Btree passed as the first argument. +// +// Return SQLITE_LOCKED if this or any other connection has an open +// transaction on the shared-cache the argument Btree is connected to. +// +// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ + var rc int32 = SQLITE_OK + if p != 0 { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + Xsqlite3BtreeEnter(tls, p) + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) != TRANS_NONE { + rc = SQLITE_LOCKED + } else { + rc = Xsqlite3PagerCheckpoint(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Btree)(unsafe.Pointer(p)).Fdb, eMode, pnLog, pnCkpt) + } + Xsqlite3BtreeLeave(tls, p) + } + return rc +} + +// Return true if there is currently a backup running on Btree p. +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ + + return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) +} + +// This function returns a pointer to a blob of memory associated with +// a single shared-btree. The memory is used by client code for its own +// purposes (for example, to store a high-level schema associated with +// the shared-btree). The btree layer manages reference counting issues. +// +// The first time this is called on a shared-btree, nBytes bytes of memory +// are allocated, zeroed, and returned to the caller. For each subsequent +// call the nBytes parameter is ignored and a pointer to the same blob +// of memory returned. +// +// If the nBytes parameter is 0 and the blob of memory has not yet been +// allocated, a null pointer is returned. If the blob has already been +// allocated, it is returned as normal. +// +// Just before the shared-btree is closed, the function passed as the +// xFree argument when the memory allocation was made is invoked on the +// blob of allocated memory. The xFree function should not call sqlite3_free() +// on the memory, the btree layer does that. +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + Xsqlite3BtreeEnter(tls, p) + if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { + (*BtShared)(unsafe.Pointer(pBt)).FpSchema = Xsqlite3DbMallocZero(tls, uintptr(0), uint64(nBytes)) + (*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema = xFree + } + Xsqlite3BtreeLeave(tls, p) + return (*BtShared)(unsafe.Pointer(pBt)).FpSchema +} + +// Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared +// btree as the argument handle holds an exclusive lock on the +// sqlite_schema table. Otherwise SQLITE_OK. +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ + var rc int32 + + Xsqlite3BtreeEnter(tls, p) + rc = querySharedCacheTableLock(tls, p, uint32(SCHEMA_ROOT), uint8(READ_LOCK)) + + Xsqlite3BtreeLeave(tls, p) + return rc +} + +// Obtain a lock on the table whose root page is iTab. The +// lock is a write lock if isWritelock is true or a read lock +// if it is false. +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ + var rc int32 = SQLITE_OK + + if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { + var lockType U8 = U8(READ_LOCK + int32(isWriteLock)) + + Xsqlite3BtreeEnter(tls, p) + rc = querySharedCacheTableLock(tls, p, uint32(iTab), lockType) + if rc == SQLITE_OK { + rc = setSharedCacheTableLock(tls, p, uint32(iTab), lockType) + } + Xsqlite3BtreeLeave(tls, p) + } + return rc +} + +// Argument pCsr must be a cursor opened for writing on an +// INTKEY table currently pointing at a valid table entry. +// This function modifies the data stored as part of that entry. +// +// Only the data content may only be modified, it is not possible to +// change the length of the data stored. If this function is called with +// parameters that attempt to write past the end of the existing data, +// no modifications are made and SQLITE_CORRUPT is returned. +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ + var rc int32 + + rc = func() int32 { + if int32((*BtCursor)(unsafe.Pointer(pCsr)).FeState) >= CURSOR_REQUIRESEEK { + return btreeRestoreCursorPosition(tls, pCsr) + } + return SQLITE_OK + }() + if rc != SQLITE_OK { + return rc + } + + if int32((*BtCursor)(unsafe.Pointer(pCsr)).FeState) != CURSOR_VALID { + return SQLITE_ABORT + } + + // Save the positions of all other cursors open on this table. This is + // required in case any of them are holding references to an xFetch + // version of the b-tree page modified by the accessPayload call below. + // + // Note that pCsr must be open on a INTKEY table and saveCursorPosition() + // and hence saveAllCursors() cannot fail on a BTREE_INTKEY table, hence + // saveAllCursors can only return SQLITE_OK. + saveAllCursors(tls, (*BtCursor)(unsafe.Pointer(pCsr)).FpBt, (*BtCursor)(unsafe.Pointer(pCsr)).FpgnoRoot, pCsr) + + // Check some assumptions: + // (a) the cursor is open for writing, + // (b) there is a read/write transaction open, + // (c) the connection holds a write-lock on the table (if required), + // (d) there are no conflicting read-locks, and + // (e) the cursor points at a valid row of an intKey table. + if int32((*BtCursor)(unsafe.Pointer(pCsr)).FcurFlags)&BTCF_WriteFlag == 0 { + return SQLITE_READONLY + } + + return accessPayload(tls, pCsr, offset, amt, z, 1) +} + +// Mark this cursor as an incremental blob cursor. +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ + *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) + (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) +} + +// Set both the "read version" (single byte at byte offset 18) and +// "write version" (single byte at byte offset 19) fields in the database +// header to iVersion. +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ + var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt + var rc int32 // Return code + + // If setting the version fields to 1, do not automatically open the + // WAL connection, even if the version fields are currently set to 2. + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_NO_WAL)) + if iVersion == 1 { + *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_NO_WAL) + } + + rc = Xsqlite3BtreeBeginTrans(tls, pBtree, 0, uintptr(0)) + if rc == SQLITE_OK { + var aData uintptr = (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData + if int32(*(*U8)(unsafe.Pointer(aData + 18))) != int32(U8(iVersion)) || int32(*(*U8)(unsafe.Pointer(aData + 19))) != int32(U8(iVersion)) { + rc = Xsqlite3BtreeBeginTrans(tls, pBtree, 2, uintptr(0)) + if rc == SQLITE_OK { + rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) + if rc == SQLITE_OK { + *(*U8)(unsafe.Pointer(aData + 18)) = U8(iVersion) + *(*U8)(unsafe.Pointer(aData + 19)) = U8(iVersion) + } + } + } + } + + *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_NO_WAL)) + return rc +} + +// Return true if the cursor has a hint specified. This routine is +// only used from within assert() statements +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ + return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) +} + +// Return true if the given Btree is read-only. +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ + return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) +} + +// Return the size of the header added to each page by this module. +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ + return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) +} + +// Return true if the Btree passed as the only argument is sharable. +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ + return int32((*Btree)(unsafe.Pointer(p)).Fsharable) +} + +// Return the number of connections to the BtShared object accessed by +// the Btree handle passed as the only argument. For private caches +// this is always 1. For shared caches it may be 1 or greater. +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ + + return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef +} + +// THREAD SAFETY NOTES: +// +// Once it has been created using backup_init(), a single sqlite3_backup +// structure may be accessed via two groups of thread-safe entry points: +// +// * Via the sqlite3_backup_XXX() API function backup_step() and +// backup_finish(). Both these functions obtain the source database +// handle mutex and the mutex associated with the source BtShared +// structure, in that order. +// +// * Via the BackupUpdate() and BackupRestart() functions, which are +// invoked by the pager layer to report various state changes in +// the page cache associated with the source database. The mutex +// associated with the source database BtShared structure will always +// be held when either of these functions are invoked. +// +// The other sqlite3_backup_XXX() API functions, backup_remaining() and +// backup_pagecount() are not thread-safe functions. If they are called +// while some other thread is calling backup_step() or backup_finish(), +// the values returned may be invalid. There is no way for a call to +// BackupUpdate() or BackupRestart() to interfere with backup_remaining() +// or backup_pagecount(). +// +// Depending on the SQLite configuration, the database handles and/or +// the Btree objects may have their own mutexes that require locking. +// Non-sharable Btrees (in-memory databases for example), do not have +// associated mutexes. + +// Return a pointer corresponding to database zDb (i.e. "main", "temp") +// in connection handle pDb. If such a database cannot be found, return +// a NULL pointer and write an error message to pErrorDb. +// +// If the "temp" database is requested, it may need to be opened by this +// function. If an error occurs while doing so, return 0 and write an +// error message to pErrorDb. +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ + bp := tls.Alloc(424) + defer tls.Free(424) + + var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) + + if i == 1 { + // var sParse Parse at bp+16, 408 + + var rc int32 = 0 + Xsqlite3ParseObjectInit(tls, bp+16, pDb) + if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc, ts+3605, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)) + rc = SQLITE_ERROR + } + Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg) + Xsqlite3ParseObjectReset(tls, bp+16) + if rc != 0 { + return uintptr(0) + } + } + + if i < 0 { + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4776, libc.VaList(bp+8, zDb)) + return uintptr(0) + } + + return (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(pDb)).FaDb + uintptr(i)*32)).FpBt +} + +// Attempt to set the page size of the destination to match the page size +// of the source. +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ + var rc int32 + rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) + return rc +} + +// Check that there is no open read-transaction on the b-tree passed as the +// second argument. If there is not, return SQLITE_OK. Otherwise, if there +// is an open read-transaction, return SQLITE_ERROR and leave an error +// message in database handle db. +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ + if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4796, 0) + return SQLITE_ERROR + } + return SQLITE_OK +} + +// Create an sqlite3_backup process to copy the contents of zSrcDb from +// connection handle pSrcDb to zDestDb in pDestDb. If successful, return +// a pointer to the new sqlite3_backup object. +// +// If an error occurs, NULL is returned and an error code and error message +// stored in database handle pDestDb. +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ + var p uintptr // Value to return + + // Lock the source database handle. The destination database + // handle is not locked in this routine, but it is locked in + // sqlite3_backup_step(). The user is required to ensure that no + // other thread accesses the destination handle for the duration + // of the backup operation. Any attempt to use the destination + // database connection while a backup is in progress may cause + // a malfunction or a deadlock. + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pSrcDb)).Fmutex) + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDestDb)).Fmutex) + + if pSrcDb == pDestDb { + Xsqlite3ErrorWithMsg(tls, + pDestDb, SQLITE_ERROR, ts+4827, 0) + p = uintptr(0) + } else { + // Allocate space for a new sqlite3_backup object... + // EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a + // call to sqlite3_backup_init() and is destroyed by a call to + // sqlite3_backup_finish(). + p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) + if !(p != 0) { + Xsqlite3Error(tls, pDestDb, SQLITE_NOMEM) + } + } + + // If the allocation succeeded, populate the new object. + if p != 0 { + (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc = findBtree(tls, pDestDb, pSrcDb, zSrcDb) + (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest = findBtree(tls, pDestDb, pDestDb, zDestDb) + (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb = pDestDb + (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb = pSrcDb + (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext = Pgno(1) + (*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached = 0 + + if uintptr(0) == (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc || uintptr(0) == (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest || + checkReadTransaction(tls, pDestDb, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) != SQLITE_OK { + // One (or both) of the named databases did not exist or an OOM + // error was hit. Or there is a transaction open on the destination + // database. The error has already been written into the pDestDb + // handle. All that is left to do here is free the sqlite3_backup + // structure. + Xsqlite3_free(tls, p) + p = uintptr(0) + } + } + if p != 0 { + (*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FnBackup++ + } + + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDestDb)).Fmutex) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pSrcDb)).Fmutex) + return p +} + +// Argument rc is an SQLite error code. Return true if this error is +// considered fatal if encountered during a backup operation. All errors +// are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ + return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) +} + +// Parameter zSrcData points to a buffer containing the data for +// page iSrcPg from the source database. Copy this data into the +// destination database. +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pDestPager uintptr = Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) + var nSrcPgsz int32 = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) + var nDestPgsz int32 = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) + var nCopy int32 = func() int32 { + if nSrcPgsz < nDestPgsz { + return nSrcPgsz + } + return nDestPgsz + }() + var iEnd I64 = I64(iSrcPg) * I64(nSrcPgsz) + var rc int32 = SQLITE_OK + var iOff I64 + + // Catch the case where the destination is an in-memory database and the + // page sizes of the source and destination differ. + if nSrcPgsz != nDestPgsz && Xsqlite3PagerIsMemdb(tls, pDestPager) != 0 { + rc = SQLITE_READONLY + } + + // This loop runs once for each destination page spanned by the source + // page. For each iteration, variable iOff is set to the byte offset + // of the destination page. + for iOff = iEnd - I64(nSrcPgsz); rc == SQLITE_OK && iOff < iEnd; iOff = iOff + I64(nDestPgsz) { + *(*uintptr)(unsafe.Pointer(bp /* pDestPg */)) = uintptr(0) + var iDest Pgno = Pgno(iOff/I64(nDestPgsz)) + Pgno(1) + if iDest == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)).FpBt)).FpageSize+U32(1) { + continue + } + if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3PagerGet(tls, pDestPager, iDest, bp, 0)) && + SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp)))) { + var zIn uintptr = zSrcData + uintptr(iOff%I64(nSrcPgsz)) + var zDestData uintptr = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pDestPg */))) + var zOut uintptr = zDestData + uintptr(iOff%I64(nDestPgsz)) + + // Copy the data from the source page into the destination page. + // Then clear the Btree layer MemPage.isInit flag. Both this module + // and the pager code use this trick (clearing the first byte + // of the page 'extra' space to invalidate the Btree layers + // cached parse of the page). MemPage.isInit is marked + // "MUST BE FIRST" for this purpose. + libc.Xmemcpy(tls, zOut, zIn, uint64(nCopy)) + *(*U8)(unsafe.Pointer(Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp))))) = U8(0) + if iOff == int64(0) && bUpdate == 0 { + Xsqlite3Put4byte(tls, zOut+28, Xsqlite3BtreeLastPage(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) + } + } + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDestPg */))) + } + + return rc +} + +// If pFile is currently larger than iSize bytes, then truncate it to +// exactly iSize bytes. If pFile is not larger than iSize bytes, then +// this function is a no-op. +// +// Return SQLITE_OK if everything is successful, or an SQLite error +// code if an error occurs. +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var iCurrent I64 at bp, 8 + + var rc int32 = Xsqlite3OsFileSize(tls, pFile, bp) + if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) > iSize { + rc = Xsqlite3OsTruncate(tls, pFile, iSize) + } + return rc +} + +// Register this backup object with the associated source pager for +// callbacks when pages are changed or the cache invalidated. +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ + var pp uintptr + + pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) + (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext = *(*uintptr)(unsafe.Pointer(pp)) + *(*uintptr)(unsafe.Pointer(pp)) = p + (*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached = 1 +} + +// Copy nPage pages from the source b-tree to the destination. +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var rc int32 + var destMode int32 // Destination journal mode + var pgszSrc int32 = 0 // Source page size + var pgszDest int32 = 0 // Destination page size + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb)).Fmutex) + Xsqlite3BtreeEnter(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) + } + + rc = (*Sqlite3_backup)(unsafe.Pointer(p)).Frc + if !(isFatalError(tls, rc) != 0) { + var pSrcPager uintptr = Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) // Source pager + var pDestPager uintptr = Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) // Dest pager + var ii int32 // Iterator variable + var nSrcPage int32 = -1 // Size of source db in pages + var bCloseTrans int32 = 0 // True if src db requires unlocking + + // If the source pager is currently in a write-transaction, return + // SQLITE_BUSY immediately. + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 && int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FpBt)).FinTransaction) == TRANS_WRITE { + rc = SQLITE_BUSY + } else { + rc = SQLITE_OK + } + + // If there is no open read-transaction on the source database, open + // one now. If a transaction is opened here, then it will be closed + // before this function exits. + if rc == SQLITE_OK && SQLITE_TXN_NONE == Xsqlite3BtreeTxnState(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) { + rc = Xsqlite3BtreeBeginTrans(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc, 0, uintptr(0)) + bCloseTrans = 1 + } + + // If the destination database has not yet been locked (i.e. if this + // is the first call to backup_step() for the current backup operation), + // try to set its page size to the same as the source database. This + // is especially important on ZipVFS systems, as in that case it is + // not possible to create a database file that uses one page size by + // writing to it with another. + if (*Sqlite3_backup)(unsafe.Pointer(p)).FbDestLocked == 0 && rc == SQLITE_OK && setDestPgsz(tls, p) == SQLITE_NOMEM { + rc = SQLITE_NOMEM + } + + // Lock the destination database, if it is not locked already. + if SQLITE_OK == rc && (*Sqlite3_backup)(unsafe.Pointer(p)).FbDestLocked == 0 && + SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3BtreeBeginTrans(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 2, + p+16)) { + (*Sqlite3_backup)(unsafe.Pointer(p)).FbDestLocked = 1 + } + + // Do not allow backup if the destination database is in WAL mode + // and the page sizes are different between source and destination + pgszSrc = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) + pgszDest = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) + destMode = Xsqlite3PagerGetJournalMode(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)) + if SQLITE_OK == rc && destMode == PAGER_JOURNALMODE_WAL && pgszSrc != pgszDest { + rc = SQLITE_READONLY + } + + // Now that there is a read-lock on the source database, query the + // source pager for the number of pages in the database. + nSrcPage = int32(Xsqlite3BtreeLastPage(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) + + for ii = 0; (nPage < 0 || ii < nPage) && (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext <= Pgno(nSrcPage) && !(rc != 0); ii++ { + var iSrcPg Pgno = (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext // Source page number + if iSrcPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FpBt)).FpageSize+U32(1) { + // var pSrcPg uintptr at bp, 8 + // Source page object + rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp, PAGER_GET_READONLY) + if rc == SQLITE_OK { + rc = backupOnePage(tls, p, iSrcPg, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pSrcPg */))), 0) + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pSrcPg */))) + } + } + (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext++ + } + if rc == SQLITE_OK { + (*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount = Pgno(nSrcPage) + (*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining = Pgno(nSrcPage+1) - (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext + if (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext > Pgno(nSrcPage) { + rc = SQLITE_DONE + } else if !((*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached != 0) { + attachBackupObject(tls, p) + } + } + + // Update the schema version field in the destination database. This + // is to make sure that the schema-version really does change in + // the case where the source and destination databases have the + // same schema version. + if rc == SQLITE_DONE { + if nSrcPage == 0 { + rc = Xsqlite3BtreeNewDb(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) + nSrcPage = 1 + } + if rc == SQLITE_OK || rc == SQLITE_DONE { + rc = Xsqlite3BtreeUpdateMeta(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 1, (*Sqlite3_backup)(unsafe.Pointer(p)).FiDestSchema+U32(1)) + } + if rc == SQLITE_OK { + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { + Xsqlite3ResetAllSchemasOfConnection(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb) + } + if destMode == PAGER_JOURNALMODE_WAL { + rc = Xsqlite3BtreeSetVersion(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 2) + } + } + if rc == SQLITE_OK { + var nDestTruncate int32 + // Set nDestTruncate to the final number of pages in the destination + // database. The complication here is that the destination page + // size may be different to the source page size. + // + // If the source page size is smaller than the destination page size, + // round up. In this case the call to sqlite3OsTruncate() below will + // fix the size of the file. However it is important to call + // sqlite3PagerTruncateImage() here so that any pages in the + // destination file that lie beyond the nDestTruncate page mark are + // journalled by PagerCommitPhaseOne() before they are destroyed + // by the file truncation. + + if pgszSrc < pgszDest { + var ratio int32 = pgszDest / pgszSrc + nDestTruncate = (nSrcPage + ratio - 1) / ratio + if nDestTruncate == int32(U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)).FpBt)).FpageSize+U32(1)) { + nDestTruncate-- + } + } else { + nDestTruncate = nSrcPage * (pgszSrc / pgszDest) + } + + if pgszSrc < pgszDest { + // If the source page-size is smaller than the destination page-size, + // two extra things may need to happen: + // + // * The destination may need to be truncated, and + // + // * Data stored on the pages immediately following the + // pending-byte page in the source database may need to be + // copied into the destination database. + var iSize I64 = I64(pgszSrc) * I64(nSrcPage) + var pFile uintptr = Xsqlite3PagerFile(tls, pDestPager) + var iPg Pgno + // var nDstPage int32 at bp+8, 4 + + var iOff I64 + var iEnd I64 + + // This block ensures that all data required to recreate the original + // database has been stored in the journal for pDestPager and the + // journal synced to disk. So at this point we may safely modify + // the database file in any way, knowing that if a power failure + // occurs, the original database will be reconstructed from the + // journal file. + Xsqlite3PagerPagecount(tls, pDestPager, bp+8) + for iPg = Pgno(nDestTruncate); rc == SQLITE_OK && iPg <= Pgno(*(*int32)(unsafe.Pointer(bp + 8 /* nDstPage */))); iPg++ { + if iPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)).FpBt)).FpageSize+U32(1) { + // var pPg uintptr at bp+16, 8 + + rc = Xsqlite3PagerGet(tls, pDestPager, iPg, bp+16, 0) + if rc == SQLITE_OK { + rc = Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */))) + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */))) + } + } + } + if rc == SQLITE_OK { + rc = Xsqlite3PagerCommitPhaseOne(tls, pDestPager, uintptr(0), 1) + } + + // Write the extra pages and truncate the database file as required + iEnd = func() int64 { + if I64(Xsqlite3PendingByte+pgszDest) < iSize { + return int64(Xsqlite3PendingByte + pgszDest) + } + return iSize + }() + for iOff = I64(Xsqlite3PendingByte + pgszSrc); rc == SQLITE_OK && iOff < iEnd; iOff = iOff + I64(pgszSrc) { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pSrcPg */)) = uintptr(0) + var iSrcPg Pgno = Pgno(iOff/I64(pgszSrc) + int64(1)) + rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp+24, 0) + if rc == SQLITE_OK { + var zData uintptr = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pSrcPg */))) + rc = Xsqlite3OsWrite(tls, pFile, zData, pgszSrc, iOff) + } + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pSrcPg */))) + } + if rc == SQLITE_OK { + rc = backupTruncateFile(tls, pFile, iSize) + } + + // Sync the database file to disk. + if rc == SQLITE_OK { + rc = Xsqlite3PagerSync(tls, pDestPager, uintptr(0)) + } + } else { + Xsqlite3PagerTruncateImage(tls, pDestPager, uint32(nDestTruncate)) + rc = Xsqlite3PagerCommitPhaseOne(tls, pDestPager, uintptr(0), 0) + } + + // Finish committing the transaction to the destination database. + if SQLITE_OK == rc && + SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3BtreeCommitPhaseTwo(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 0)) { + rc = SQLITE_DONE + } + } + } + + // If bCloseTrans is true, then this function opened a read transaction + // on the source database. Close the read transaction here. There is + // no need to check the return values of the btree methods here, as + // "committing" a read-only transaction cannot fail. + if bCloseTrans != 0 { + + Xsqlite3BtreeCommitPhaseOne(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc, uintptr(0)) + Xsqlite3BtreeCommitPhaseTwo(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc, 0) + + } + + if rc == SQLITE_IOERR|int32(12)<<8 { + rc = SQLITE_NOMEM + } + (*Sqlite3_backup)(unsafe.Pointer(p)).Frc = rc + } + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) + } + Xsqlite3BtreeLeave(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb)).Fmutex) + return rc +} + +// Release all resources associated with an sqlite3_backup* handle. +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ + var pp uintptr // Ptr to head of pagers backup list + var pSrcDb uintptr // Source database connection + var rc int32 // Value to return + + // Enter the mutexes + if p == uintptr(0) { + return SQLITE_OK + } + pSrcDb = (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pSrcDb)).Fmutex) + Xsqlite3BtreeEnter(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) + } + + // Detach this backup from the source pager. + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { + (*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FnBackup-- + } + if (*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached != 0 { + pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) + + for *(*uintptr)(unsafe.Pointer(pp)) != p { + pp = *(*uintptr)(unsafe.Pointer(pp)) + 64 + + } + *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext + } + + // If a transaction is still open on the Btree, roll it back. + Xsqlite3BtreeRollback(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, SQLITE_OK, 0) + + // Set the error code of the destination database handle. + if (*Sqlite3_backup)(unsafe.Pointer(p)).Frc == SQLITE_DONE { + rc = SQLITE_OK + } else { + rc = (*Sqlite3_backup)(unsafe.Pointer(p)).Frc + } + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { + Xsqlite3Error(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb, rc) + + // Exit the mutexes and free the backup context structure. + Xsqlite3LeaveMutexAndCloseZombie(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb) + } + Xsqlite3BtreeLeave(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) + if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { + // EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a + // call to sqlite3_backup_init() and is destroyed by a call to + // sqlite3_backup_finish(). + Xsqlite3_free(tls, p) + } + Xsqlite3LeaveMutexAndCloseZombie(tls, pSrcDb) + return rc +} + +// Return the number of pages still to be backed up as of the most recent +// call to sqlite3_backup_step(). +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ + return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) +} + +// Return the total number of pages in the source database as of the most +// recent call to sqlite3_backup_step(). +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ + return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) +} + +// This function is called after the contents of page iPage of the +// source database have been modified. If page iPage has already been +// copied into the destination database, then the data written to the +// destination is now invalidated. The destination copy of iPage needs +// to be updated with the new data before the backup operation is +// complete. +// +// It is assumed that the mutex associated with the BtShared object +// corresponding to the source database is held when this function is +// called. +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ + + for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { + + if !(isFatalError(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).Frc) != 0) && iPage < (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext { + // The backup process p has already copied page iPage. But now it + // has been modified by a transaction on the source pager. Copy + // the new data into the backup. + var rc int32 + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) + rc = backupOnePage(tls, p, iPage, aData, 1) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) + + if rc != SQLITE_OK { + (*Sqlite3_backup)(unsafe.Pointer(p)).Frc = rc + } + } + } +} + +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ + if pBackup != 0 { + backupUpdate(tls, pBackup, iPage, aData) + } +} + +// Restart the backup process. This is called when the pager layer +// detects that the database has been modified by an external database +// connection. In this case there is no way of knowing which of the +// pages that have been copied into the destination database are still +// valid and which are not, so the entire process needs to be restarted. +// +// It is assumed that the mutex associated with the BtShared object +// corresponding to the source database is held when this function is +// called. +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ + var p uintptr // Iterator variable + for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { + + (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext = Pgno(1) + } +} + +// Copy the complete content of pBtFrom into pBtTo. A transaction +// must be active for both files. +// +// The size of file pTo may be reduced by this operation. If anything +// goes wrong, the transaction on pTo is rolled back. If successful, the +// transaction is committed before returning. +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var rc int32 + var pFd uintptr // File descriptor for database pTo + // var b Sqlite3_backup at bp+8, 72 + + // var nByte I64 at bp, 8 + + Xsqlite3BtreeEnter(tls, pTo) + Xsqlite3BtreeEnter(tls, pFrom) + + pFd = Xsqlite3PagerFile(tls, Xsqlite3BtreePager(tls, pTo)) + if !((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods != 0) { + goto __1 + } + *(*I64)(unsafe.Pointer(bp /* nByte */)) = I64(Xsqlite3BtreeGetPageSize(tls, pFrom)) * I64(Xsqlite3BtreeLastPage(tls, pFrom)) + rc = Xsqlite3OsFileControl(tls, pFd, SQLITE_FCNTL_OVERWRITE, bp) + if !(rc == SQLITE_NOTFOUND) { + goto __2 + } + rc = SQLITE_OK +__2: + ; + if !(rc != 0) { + goto __3 + } + goto copy_finished +__3: + ; +__1: + ; + + // Set up an sqlite3_backup object. sqlite3_backup.pDestDb must be set + // to 0. This is used by the implementations of sqlite3_backup_step() + // and sqlite3_backup_finish() to detect that they are being called + // from this function, not directly by the user. + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Sqlite3_backup{}))) + (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpSrcDb = (*Btree)(unsafe.Pointer(pFrom)).Fdb + (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpSrc = pFrom + (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpDest = pTo + (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FiNext = Pgno(1) + + // 0x7FFFFFFF is the hard limit for the number of pages in a database + // file. By passing this as the number of pages to copy to + // sqlite3_backup_step(), we can guarantee that the copy finishes + // within a single call (unless an error occurs). The assert() statement + // checks this assumption - (p->rc) should be set to either SQLITE_DONE + // or an error code. + Xsqlite3_backup_step(tls, bp+8, 0x7FFFFFFF) + + rc = Xsqlite3_backup_finish(tls, bp+8) + if !(rc == SQLITE_OK) { + goto __4 + } + *(*U16)(unsafe.Pointer((*Btree)(unsafe.Pointer(pTo)).FpBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_PAGESIZE_FIXED)) + goto __5 +__4: + Xsqlite3PagerClearCache(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(bp+8 /* &b */)).FpDest)) +__5: + ; + +copy_finished: + Xsqlite3BtreeLeave(tls, pFrom) + Xsqlite3BtreeLeave(tls, pTo) + return rc +} + +//************* End of backup.c ********************************************* +//************* Begin file vdbemem.c **************************************** +// 2004 May 26 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code use to manipulate "Mem" structure. A "Mem" +// stores a single value in the VDBE. Mem is an opaque structure visible +// only within the VDBE. Interface routines refer to a Mem using the +// name sqlite_value +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// True if X is a power of two. 0 is considered a power of two here. +// In other words, return true if X has at most one bit set. + +// Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal +// into a buffer. +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var acc StrAccum at bp+16, 32 + + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Int != 0 { + // Work-around for GCC bug + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270 + // var x I64 at bp+8, 8 + + libc.Xmemcpy(tls, bp+8, p, uint64(int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Int*2)) + Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8 /* x */)), zBuf) + } else { + Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) + Xsqlite3_str_appendf(tls, bp+16, ts+4867, + libc.VaList(bp, func() float64 { + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { + return float64(*(*I64)(unsafe.Pointer(p))) + } + return *(*float64)(unsafe.Pointer(p)) + }())) + + *(*uint8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+16 /* &acc */)).FnChar))) = uint8(0) // Fast version of sqlite3StrAccumFinish(&acc) + } +} + +// If pMem is an object with a valid string representation, this routine +// ensures the internal encoding for the string representation is +// 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE. +// +// If pMem is not a string object, or the encoding of the string +// representation is already stored using the requested encoding, then this +// routine is a no-op. +// +// SQLITE_OK is returned if the conversion is successful (or not required). +// SQLITE_NOMEM may be returned if a malloc() fails during conversion +// between formats. +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ + var rc int32 + + if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { + return SQLITE_OK + } + + // MemTranslate() may return SQLITE_OK or SQLITE_NOMEM. If NOMEM is returned, + // then the encoding of the value may not have changed. + rc = Xsqlite3VdbeMemTranslate(tls, pMem, U8(desiredEnc)) + + return rc +} + +// Make sure pMem->z points to a writable allocation of at least n bytes. +// +// If the bPreserve argument is true, then copy of the content of +// pMem->z into the new allocation. pMem must be either a string or +// blob if bPreserve is true. If bPreserve is false, any prior content +// in pMem->z is discarded. +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ + + // If the bPreserve flag is set to true, then the memory cell must already + // contain a valid string or blob value. + + if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 && bPreserve != 0 && (*Mem)(unsafe.Pointer(pMem)).Fz == (*Mem)(unsafe.Pointer(pMem)).FzMalloc { + if (*Mem)(unsafe.Pointer(pMem)).Fdb != 0 { + (*Mem)(unsafe.Pointer(pMem)).Fz = libc.AssignPtrUintptr(pMem+24, Xsqlite3DbReallocOrFree(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64(n))) + } else { + (*Mem)(unsafe.Pointer(pMem)).FzMalloc = Xsqlite3Realloc(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64(n)) + if (*Mem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) { + Xsqlite3_free(tls, (*Mem)(unsafe.Pointer(pMem)).Fz) + } + (*Mem)(unsafe.Pointer(pMem)).Fz = (*Mem)(unsafe.Pointer(pMem)).FzMalloc + } + bPreserve = 0 + } else { + if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 { + Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) + } + (*Mem)(unsafe.Pointer(pMem)).FzMalloc = Xsqlite3DbMallocRaw(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, uint64(n)) + } + if (*Mem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) { + Xsqlite3VdbeMemSetNull(tls, pMem) + (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 + return SQLITE_NOMEM + } else { + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = Xsqlite3DbMallocSize(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) + } + + if bPreserve != 0 && (*Mem)(unsafe.Pointer(pMem)).Fz != 0 { + + libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pMem)).FzMalloc, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64((*Mem)(unsafe.Pointer(pMem)).Fn)) + } + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Dyn != 0 { + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Mem)(unsafe.Pointer(pMem)).FxDel})).f(tls, (*Mem)(unsafe.Pointer(pMem)).Fz) + } + + (*Mem)(unsafe.Pointer(pMem)).Fz = (*Mem)(unsafe.Pointer(pMem)).FzMalloc + *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Ephem | MEM_Static)) + return SQLITE_OK +} + +// Change the pMem->zMalloc allocation to be at least szNew bytes. +// If pMem->zMalloc already meets or exceeds the requested size, this +// routine is a no-op. +// +// Any prior string or blob content in the pMem object may be discarded. +// The pMem->xDel destructor is called, if it exists. Though MEM_Str +// and MEM_Blob values may be discarded, MEM_Int, MEM_Real, MEM_IntReal, +// and MEM_Null values are preserved. +// +// Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) +// if unable to complete the resizing. +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ + + if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { + return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) + } + + (*Mem)(unsafe.Pointer(pMem)).Fz = (*Mem)(unsafe.Pointer(pMem)).FzMalloc + *(*U16)(unsafe.Pointer(pMem + 8)) &= U16(MEM_Null | MEM_Int | MEM_Real | MEM_IntReal) + return SQLITE_OK +} + +// It is already known that pMem contains an unterminated string. +// Add the zero terminator. +// +// Three bytes of zero are added. In this way, there is guaranteed +// to be a double-zero byte at an even byte boundary in order to +// terminate a UTF16 string, even if the initial size of the buffer +// is an odd number of bytes. +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ + if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { + return SQLITE_NOMEM + } + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = uint8(0) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn+1))) = uint8(0) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn+2))) = uint8(0) + *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(MEM_Term) + return SQLITE_OK +} + +// Change pMem so that its MEM_Str or MEM_Blob value is stored in +// MEM.zMalloc, where it can be safely written. +// +// Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ + + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { + if func() int32 { + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pMem) + } + return 0 + }() != 0 { + return SQLITE_NOMEM + } + if (*Mem)(unsafe.Pointer(pMem)).FszMalloc == 0 || (*Mem)(unsafe.Pointer(pMem)).Fz != (*Mem)(unsafe.Pointer(pMem)).FzMalloc { + var rc int32 = vdbeMemAddTerminator(tls, pMem) + if rc != 0 { + return rc + } + } + } + *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) + + return SQLITE_OK +} + +// If the given Mem* has a zero-filled tail, turn it into an ordinary +// blob stored in dynamically allocated space. +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ + var nByte int32 + + // Set nByte to the number of bytes required to store the expanded blob. + nByte = (*Mem)(unsafe.Pointer(pMem)).Fn + *(*int32)(unsafe.Pointer(pMem)) + if nByte <= 0 { + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Blob == 0 { + return SQLITE_OK + } + nByte = 1 + } + if Xsqlite3VdbeMemGrow(tls, pMem, nByte, 1) != 0 { + return SQLITE_NOMEM + } + + libc.Xmemset(tls, (*Mem)(unsafe.Pointer(pMem)).Fz+uintptr((*Mem)(unsafe.Pointer(pMem)).Fn), 0, uint64(*(*int32)(unsafe.Pointer(pMem)))) + *(*int32)(unsafe.Pointer(pMem + 12)) += *(*int32)(unsafe.Pointer(pMem)) + *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Zero | MEM_Term)) + return SQLITE_OK +} + +// Make sure the given Mem is \u0000 terminated. +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ + + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { + return SQLITE_OK // Nothing to do + } else { + return vdbeMemAddTerminator(tls, pMem) + } + return int32(0) +} + +// Add MEM_Str to the set of representations for the given Mem. This +// routine is only called if pMem is a number of some kind, not a NULL +// or a BLOB. +// +// Existing representations MEM_Int, MEM_Real, or MEM_IntReal are invalidated +// if bForce is true but are retained if bForce is false. +// +// A MEM_Null value will never be passed to this function. This function is +// used for converting values to text for returning to the user (i.e. via +// sqlite3_value_text()), or for ensuring that values to be used as btree +// keys are strings. In the former case a NULL pointer is returned the +// user and the latter is an internal programming error. +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ + var nByte int32 = 32 + + if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { + (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(0) + return SQLITE_NOMEM + } + + vdbeMemRenderNum(tls, nByte, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem) + + (*Mem)(unsafe.Pointer(pMem)).Fn = int32(libc.Xstrlen(tls, (*Mem)(unsafe.Pointer(pMem)).Fz) & uint64(0x3fffffff)) + (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) + *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(MEM_Str | MEM_Term) + if bForce != 0 { + *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal)) + } + Xsqlite3VdbeChangeEncoding(tls, pMem, int32(enc)) + return SQLITE_OK +} + +// Memory cell pMem contains the context of an aggregate function. +// This routine calls the finalize method for that function. The +// result of the aggregate is stored back into pMem. +// +// Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK +// otherwise. +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + // var ctx Sqlite3_context at bp, 56 + + // var t Mem at bp+56, 56 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) + libc.Xmemset(tls, bp+56, 0, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(bp + 56 /* &t */)).Fflags = U16(MEM_Null) + (*Mem)(unsafe.Pointer(bp + 56 /* &t */)).Fdb = (*Mem)(unsafe.Pointer(pMem)).Fdb + (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = bp + 56 /* &t */ + (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpMem = pMem + (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpFunc = pFunc + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxFinalize})).f(tls, bp /* &ctx */) // IMP: R-24505-23230 + + if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 { + Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) + } + libc.Xmemcpy(tls, pMem, bp+56, uint64(unsafe.Sizeof(Mem{}))) + return (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FisError +} + +// Memory cell pAccum contains the context of an aggregate function. +// This routine calls the xValue method for that function and stores +// the results in memory cell pMem. +// +// SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK +// otherwise. +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + // var ctx Sqlite3_context at bp, 56 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) + Xsqlite3VdbeMemSetNull(tls, pOut) + (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = pOut + (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpMem = pAccum + (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpFunc = pFunc + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxValue})).f(tls, bp /* &ctx */) + return (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FisError +} + +// If the memory cell contains a value that must be freed by +// invoking the external callback in Mem.xDel, then this routine +// will free that value. It also sets Mem.flags to MEM_Null. +// +// This is a helper routine for sqlite3VdbeMemSetNull() and +// for sqlite3VdbeMemRelease(). Use those other routines as the +// entry point for releasing Mem resources. +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ + + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { + Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) + + } + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Dyn != 0 { + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Mem)(unsafe.Pointer(p)).FxDel})).f(tls, (*Mem)(unsafe.Pointer(p)).Fz) + } + (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) +} + +// Release memory held by the Mem p, both external memory cleared +// by p->xDel and memory in p->zMalloc. +// +// This is a helper routine invoked by sqlite3VdbeMemRelease() in +// the unusual case where there really is memory in p that needs +// to be freed. +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { + vdbeMemClearExternAndSetNull(tls, p) + } + if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { + Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(p)).Fdb, (*Mem)(unsafe.Pointer(p)).FzMalloc) + (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 + } + (*Mem)(unsafe.Pointer(p)).Fz = uintptr(0) +} + +// Release any memory resources held by the Mem. Both the memory that is +// free by Mem.xDel and the Mem.zMalloc allocation are freed. +// +// Use this routine prior to clean up prior to abandoning a Mem, or to +// reset a Mem back to its minimum memory utilization. +// +// Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space +// prior to inserting new content into the Mem. +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ + + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { + vdbeMemClear(tls, p) + } +} + +// Convert a 64-bit IEEE double into a 64-bit signed integer. +// If the double is out of range of a 64-bit signed integer then +// return the closest available 64-bit signed integer. +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ + + if r <= float64(minInt) { + return minInt + } else if r >= float64(maxInt) { + return maxInt + } else { + return I64(r) + } + return I64(0) +} + +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ + +// Return some kind of integer value which is the best we can do +// at representing the value that *pMem describes as an integer. +// If pMem is an integer, then the value is exact. If pMem is +// a floating-point then the value returned is the integer part. +// If pMem is a string or blob, then we make an attempt to convert +// it into an integer and return that. If pMem represents an +// an SQL-NULL value, return 0. +// +// If pMem represents a string value, its encoding might be changed. +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*I64)(unsafe.Pointer(bp /* value */)) = int64(0) + Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*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:78439:20: */ + var flags int32 + + flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) + if flags&(MEM_Int|MEM_IntReal) != 0 { + + return *(*I64)(unsafe.Pointer(pMem)) + } else if flags&MEM_Real != 0 { + return doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) + } else if flags&(MEM_Str|MEM_Blob) != 0 && (*Mem)(unsafe.Pointer(pMem)).Fz != uintptr(0) { + return memIntValue(tls, pMem) + } else { + return int64(0) + } + return I64(0) +} + +// Return the best representation of pMem that we can get into a +// double. If pMem is already a double or an integer, return its +// value. If it is a string or blob, try to convert it to a double. +// If it is a NULL, return 0.0. +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... + *(*float64)(unsafe.Pointer(bp /* val */)) = float64(0) + Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*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:78469:23: */ + + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { + return *(*float64)(unsafe.Pointer(pMem)) + } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { + + return float64(*(*I64)(unsafe.Pointer(pMem))) + } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { + return memRealValue(tls, pMem) + } else { + // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... + return float64(0) + } + return float64(0) +} + +// Return 1 if pMem represents true, and return 0 if pMem represents false. +// Return the value ifNull if pMem is NULL. +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ + + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { + return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) + } + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { + return ifNull + } + return libc.Bool32(Xsqlite3VdbeRealValue(tls, pMem) != 0.0) +} + +// The MEM structure is already a MEM_Real. Try to also make it a +// MEM_Int if we can. +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ + var ix I64 + + ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) + + // Only mark the value as an integer if + // + // (1) the round-trip conversion real->int->real is a no-op, and + // (2) The integer is neither the largest nor the smallest + // possible integer (ticket #3922) + // + // The second and third terms in the following conditional enforces + // the second condition under the assumption that addition overflow causes + // values to wrap around. + if *(*float64)(unsafe.Pointer(pMem)) == float64(ix) && ix > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) && ix < int64(0xffffffff)|I64(int64(0x7fffffff))<<32 { + *(*I64)(unsafe.Pointer(pMem)) = ix + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + } +} + +// Convert pMem to type integer. Invalidate any prior representations. +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ + + *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + return SQLITE_OK +} + +// Convert pMem so that it is of type MEM_Real. +// Invalidate any prior representations. +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ + + *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) + return SQLITE_OK +} + +// Compare a floating point value to an integer. Return true if the two +// values are the same within the precision of the floating point value. +// +// This function assumes that i was obtained by assignment from r1. +// +// For some versions of GCC on 32-bit machines, if you do the more obvious +// comparison of "r1==(double)i" you sometimes get an answer of false even +// though the r1 and (double)i values are bit-for-bit the same. +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + *(*float64)(unsafe.Pointer(bp)) = r1 + + *(*float64)(unsafe.Pointer(bp + 8 /* r2 */)) = float64(i) + return libc.Bool32(*(*float64)(unsafe.Pointer(bp)) == 0.0 || + libc.Xmemcmp(tls, bp, bp+8, uint64(unsafe.Sizeof(float64(0)))) == 0 && + i >= -2251799813685248 && i < 2251799813685248) +} + +// Convert pMem so that it has type MEM_Real or MEM_Int. +// Invalidate any prior representations. +// +// Every effort is made to force the conversion, even if the input +// is a string that does not look completely like a number. Convert +// as much of the string as we can and ignore the rest. +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) == 0 { + var rc int32 + // var ix Sqlite3_int64 at bp, 8 + + rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) + if (rc == 0 || rc == 1) && Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) <= 1 || + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(pMem))))) != 0 { + *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp /* ix */)) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + } else { + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) + } + } + + *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Str | MEM_Blob | MEM_Zero)) + return SQLITE_OK +} + +// Cast the datatype of the value in pMem according to the affinity +// "aff". Casting is different from applying affinity in that a cast +// is forced. In other words, the value is converted into the desired +// affinity even if that results in loss of data. This routine is +// used (for example) to implement the SQL "cast()" operator. +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { + return SQLITE_OK + } + switch int32(aff) { + case SQLITE_AFF_BLOB: + { // Really a cast to BLOB + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Blob == 0 { + Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) + + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0 { + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Blob) + } + } else { + *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_TypeMask & libc.CplInt32(MEM_Blob))) + } + break + + } + case SQLITE_AFF_NUMERIC: + { + Xsqlite3VdbeMemNumerify(tls, pMem) + break + + } + case SQLITE_AFF_INTEGER: + { + Xsqlite3VdbeMemIntegerify(tls, pMem) + break + + } + case SQLITE_AFF_REAL: + { + Xsqlite3VdbeMemRealify(tls, pMem) + break + + } + default: + { + + *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Blob >> 3) + Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) + + *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) + + } + } + return SQLITE_OK +} + +// Initialize bulk memory to be a consistent Mem object. +// +// The minimum amount of initialization feasible is performed. +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ + + (*Mem)(unsafe.Pointer(pMem)).Fflags = flags + (*Mem)(unsafe.Pointer(pMem)).Fdb = db + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 +} + +// Delete any previous value and set the value stored in *pMem to NULL. +// +// This routine calls the Mem.xDel destructor to dispose of values that +// require the destructor. But it preserves the Mem.zMalloc memory allocation. +// To free all resources, use sqlite3VdbeMemRelease(), which both calls this +// routine to invoke the destructor and deallocates Mem.zMalloc. +// +// Use this routine to reset the Mem prior to insert a new value. +// +// Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { + vdbeMemClearExternAndSetNull(tls, pMem) + } else { + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) + } +} + +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ + Xsqlite3VdbeMemSetNull(tls, p) +} + +// Delete any previous value and set the value to be a BLOB of length +// n containing all zeros. +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ + Xsqlite3VdbeMemRelease(tls, pMem) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) + (*Mem)(unsafe.Pointer(pMem)).Fn = 0 + if n < 0 { + n = 0 + } + *(*int32)(unsafe.Pointer(pMem)) = n + (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) + (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) +} + +// The pMem is known to contain content that needs to be destroyed prior +// to a value change. So invoke the destructor, then set the value to +// a 64-bit integer. +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ + Xsqlite3VdbeMemSetNull(tls, pMem) + *(*I64)(unsafe.Pointer(pMem)) = val + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) +} + +// Delete any previous value and set the value stored in *pMem to val, +// manifest type INTEGER. +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { + vdbeReleaseAndSetInt64(tls, pMem, val) + } else { + *(*I64)(unsafe.Pointer(pMem)) = val + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + } +} + +// A no-op destructor +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ + _ = p +} + +// Set the value stored in *pMem should already be a NULL. +// Also store a pointer to go with it. +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + + vdbeMemClear(tls, pMem) + *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { + if zPType != 0 { + return zPType + } + return ts + 1525 /* "" */ + }() + (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) + (*Mem)(unsafe.Pointer(pMem)).FeSubtype = U8('p') + (*Mem)(unsafe.Pointer(pMem)).FxDel = func() uintptr { + if xDestructor != 0 { + return xDestructor + } + return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3NoopDestructor})) + }() +} + +// Delete any previous value and set the value stored in *pMem to val, +// manifest type REAL. +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ + Xsqlite3VdbeMemSetNull(tls, pMem) + if !(Xsqlite3IsNaN(tls, val) != 0) { + *(*float64)(unsafe.Pointer(pMem)) = val + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Real) + } +} + +// Delete any previous value and set the value of pMem to be an +// empty boolean index. +// +// Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation +// error occurs. +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ + var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb + var p uintptr + + Xsqlite3VdbeMemRelease(tls, pMem) + p = Xsqlite3RowSetInit(tls, db) + if p == uintptr(0) { + return SQLITE_NOMEM + } + (*Mem)(unsafe.Pointer(pMem)).Fz = p + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Dyn) + (*Mem)(unsafe.Pointer(pMem)).FxDel = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3RowSetDelete})) + return SQLITE_OK +} + +// Return true if the Mem object contains a TEXT or BLOB that is +// too large - whose size exceeds SQLITE_MAX_LENGTH. +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ + + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { + var n int32 = (*Mem)(unsafe.Pointer(p)).Fn + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { + n = n + *(*int32)(unsafe.Pointer(p)) + } + return libc.Bool32(n > *(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(p)).Fdb + 136))) + } + return 0 +} + +// Make an shallow copy of pFrom into pTo. Prior contents of +// pTo are freed. The pFrom->z field is not duplicated. If +// pFrom->z is used, then pTo->z points to the same thing as pFrom->z +// and flags gets srcType (either MEM_Ephem or MEM_Static). +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ + vdbeMemClearExternAndSetNull(tls, pTo) + + Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) +} + +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ + + if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { + vdbeClrCopy(tls, pTo, pFrom, srcType) + return + } + libc.Xmemcpy(tls, pTo, pFrom, uint64(uintptr(0)+24)) + if int32((*Mem)(unsafe.Pointer(pFrom)).Fflags)&MEM_Static == 0 { + *(*U16)(unsafe.Pointer(pTo + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Static | MEM_Ephem)) + + *(*U16)(unsafe.Pointer(pTo + 8)) |= U16(srcType) + } +} + +// Make a full copy of pFrom into pTo. Prior contents of pTo are +// freed before the copy is made. +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ + var rc int32 = SQLITE_OK + + if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { + vdbeMemClearExternAndSetNull(tls, pTo) + } + libc.Xmemcpy(tls, pTo, pFrom, uint64(uintptr(0)+24)) + *(*U16)(unsafe.Pointer(pTo + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn)) + if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Str|MEM_Blob) != 0 { + if 0 == int32((*Mem)(unsafe.Pointer(pFrom)).Fflags)&MEM_Static { + *(*U16)(unsafe.Pointer(pTo + 8)) |= U16(MEM_Ephem) + rc = Xsqlite3VdbeMemMakeWriteable(tls, pTo) + } + } + + return rc +} + +// Transfer the contents of pFrom to pTo. Any existing value in pTo is +// freed. If pFrom contains ephemeral data, a copy is made. +// +// pFrom contains an SQL NULL when this routine returns. +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ + + Xsqlite3VdbeMemRelease(tls, pTo) + libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(pFrom)).Fflags = U16(MEM_Null) + (*Mem)(unsafe.Pointer(pFrom)).FszMalloc = 0 +} + +// Change the value of a Mem to be a string or a BLOB. +// +// The memory management strategy depends on the value of the xDel +// parameter. If the value passed is SQLITE_TRANSIENT, then the +// string is copied into a (possibly existing) buffer managed by the +// Mem structure. Otherwise, any existing buffer is freed and the +// pointer copied. +// +// If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH +// size limit) then no memory allocation occurs. If the string can be +// stored without allocating memory, then it is. If a memory allocation +// is required to store the string, then value of pMem is unchanged. In +// either case, SQLITE_TOOBIG is returned. +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ + var nByte I64 = n // New value for pMem->n + var iLimit int32 // Maximum allowed string or blob size + var flags U16 = U16(0) // New value for pMem->flags + + // If z is a NULL pointer, set pMem to contain an SQL NULL. + if !(z != 0) { + Xsqlite3VdbeMemSetNull(tls, pMem) + return SQLITE_OK + } + + if (*Mem)(unsafe.Pointer(pMem)).Fdb != 0 { + iLimit = *(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fdb + 136)) + } else { + iLimit = SQLITE_MAX_LENGTH + } + flags = func() uint16 { + if int32(enc) == 0 { + return uint16(MEM_Blob) + } + return uint16(MEM_Str) + }() + if nByte < int64(0) { + + if int32(enc) == SQLITE_UTF8 { + nByte = I64(libc.Xstrlen(tls, z)) + } else { + for nByte = int64(0); nByte <= I64(iLimit) && int32(*(*uint8)(unsafe.Pointer(z + uintptr(nByte))))|int32(*(*uint8)(unsafe.Pointer(z + uintptr(nByte+int64(1))))) != 0; nByte = nByte + int64(2) { + } + } + flags = U16(int32(flags) | MEM_Term) + } + + // The following block sets the new values of Mem.z and Mem.xDel. It + // also sets a flag in local variable "flags" to indicate the memory + // management (one of MEM_Dyn or MEM_Static). + if xDel == libc.UintptrFromInt32(-1) { + var nAlloc I64 = nByte + if int32(flags)&MEM_Term != 0 { + nAlloc = nAlloc + func() int64 { + if int32(enc) == SQLITE_UTF8 { + return int64(1) + } + return int64(2) + }() + } + if nByte > I64(iLimit) { + return Xsqlite3ErrorToParser(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, SQLITE_TOOBIG) + } + + if Xsqlite3VdbeMemClearAndResize(tls, pMem, func() int32 { + if nAlloc > int64(32) { + return int32(nAlloc) + } + return 32 + }()) != 0 { + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, z, uint64(nAlloc)) + } else { + Xsqlite3VdbeMemRelease(tls, pMem) + (*Mem)(unsafe.Pointer(pMem)).Fz = z + if xDel == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault})) { + (*Mem)(unsafe.Pointer(pMem)).FzMalloc = (*Mem)(unsafe.Pointer(pMem)).Fz + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = Xsqlite3DbMallocSize(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) + } else { + (*Mem)(unsafe.Pointer(pMem)).FxDel = xDel + flags = U16(int32(flags) | func() int32 { + if xDel == uintptr(0) { + return MEM_Static + } + return MEM_Dyn + }()) + } + } + + (*Mem)(unsafe.Pointer(pMem)).Fn = int32(nByte & int64(0x7fffffff)) + (*Mem)(unsafe.Pointer(pMem)).Fflags = flags + if enc != 0 { + (*Mem)(unsafe.Pointer(pMem)).Fenc = enc + } else if (*Mem)(unsafe.Pointer(pMem)).Fdb == uintptr(0) { + (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) + } else { + + (*Mem)(unsafe.Pointer(pMem)).Fenc = (*Sqlite3)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fdb)).Fenc + } + + if int32(enc) > SQLITE_UTF8 && Xsqlite3VdbeMemHandleBom(tls, pMem) != 0 { + return SQLITE_NOMEM + } + + if nByte > I64(iLimit) { + return Xsqlite3ErrorToParser(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, SQLITE_TOOBIG) + } + + return SQLITE_OK +} + +// Move data out of a btree key or data field and into a Mem structure. +// The data is payload from the entry that pCur is currently pointing +// to. offset and amt determine what portion of the data or key to retrieve. +// The result is written into the pMem element. +// +// The pMem object must have been initialized. This routine will use +// pMem->zMalloc to hold the content from the btree, if possible. New +// pMem->zMalloc space will be allocated if necessary. The calling routine +// is responsible for making sure that the pMem object is eventually +// destroyed. +// +// If this routine fails for any reason (malloc returns NULL or unable +// to read from the disk) then the pMem is left in an inconsistent state. +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ + var rc int32 + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) + if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { + return Xsqlite3CorruptError(tls, 79056) + } + if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { + rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) + if rc == SQLITE_OK { + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(amt))) = uint8(0) // Overrun area used when reading malformed records + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob) + (*Mem)(unsafe.Pointer(pMem)).Fn = int32(amt) + } else { + Xsqlite3VdbeMemRelease(tls, pMem) + } + } + return rc +} + +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*U32)(unsafe.Pointer(bp /* available */)) = U32(0) // Number of bytes available on the local btree page + var rc int32 = SQLITE_OK // Return code + + // Note: the calls to BtreeKeyFetch() and DataFetch() below assert() + // that both the BtShared and database handle mutexes are held. + + (*Mem)(unsafe.Pointer(pMem)).Fz = Xsqlite3BtreePayloadFetch(tls, pCur, bp) + + if amt <= *(*U32)(unsafe.Pointer(bp)) { + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Ephem) + (*Mem)(unsafe.Pointer(pMem)).Fn = int32(amt) + } else { + rc = Xsqlite3VdbeMemFromBtree(tls, pCur, uint32(0), amt, pMem) + } + + return rc +} + +// The pVal argument is known to be a value other than NULL. +// Convert it into a string with encoding enc and return a pointer +// to a zero-terminated version of that string. +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ + + if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { + if func() int32 { + if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pVal) + } + return 0 + }() != 0 { + return uintptr(0) + } + *(*U16)(unsafe.Pointer(pVal + 8)) |= U16(MEM_Str) + if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != int32(enc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) { + Xsqlite3VdbeChangeEncoding(tls, pVal, int32(enc)&libc.CplInt32(SQLITE_UTF16_ALIGNED)) + } + if int32(enc)&SQLITE_UTF16_ALIGNED != 0 && 1 == 1&int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fz) { + + if Xsqlite3VdbeMemMakeWriteable(tls, pVal) != SQLITE_OK { + return uintptr(0) + } + } + Xsqlite3VdbeMemNulTerminate(tls, pVal) // IMP: R-31275-44060 + } else { + Xsqlite3VdbeMemStringify(tls, pVal, enc, uint8(0)) + + } + + if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) { + + return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fz + } else { + return uintptr(0) + } + return uintptr(0) +} + +// This function is only available internally, it is not part of the +// external API. It works in a similar way to sqlite3_value_text(), +// except the data returned is in the encoding specified by the second +// parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or +// SQLITE_UTF8. +// +// (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. +// If that is the case, then the result must be aligned on an even byte +// boundary. +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ + if !(pVal != 0) { + return uintptr(0) + } + + if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Str|MEM_Term) == MEM_Str|MEM_Term && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { + + return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fz + } + if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_Null != 0 { + return uintptr(0) + } + return valueToText(tls, pVal, enc) +} + +// Create a new sqlite3_value object. +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ + var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) + if p != 0 { + (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) + (*Mem)(unsafe.Pointer(p)).Fdb = db + } + return p +} + +// Context object passed by sqlite3Stat4ProbeSetValue() through to +// valueNew(). See comments above valueNew() for details. +type ValueNewStat4Ctx = struct { + FpParse uintptr + FpIdx uintptr + FppRec uintptr + FiVal int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:79176:1 */ + +// Allocate and return a pointer to a new sqlite3_value object. If +// the second argument to this function is NULL, the object is allocated +// by calling sqlite3ValueNew(). +// +// Otherwise, if the second argument is non-zero, then this function is +// being called indirectly by sqlite3Stat4ProbeSetValue(). If it has not +// already been allocated, allocate the UnpackedRecord structure that +// that function will return to its caller here. Then return a pointer to +// an sqlite3_value within the UnpackedRecord.a[] array. +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ + if p != 0 { + var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) + + if pRec == uintptr(0) { + var pIdx uintptr = (*ValueNewStat4Ctx)(unsafe.Pointer(p)).FpIdx // Index being probed + var nByte int32 // Bytes of space to allocate + var i int32 // Counter variable + var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) // Number of index columns including rowid + + nByte = int32(uint64(unsafe.Sizeof(Mem{}))*uint64(nCol) + (uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) + pRec = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) + if pRec != 0 { + (*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo = Xsqlite3KeyInfoOfIndex(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(p)).FpParse, pIdx) + if (*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo != 0 { + + (*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem = pRec + uintptr((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) + for i = 0; i < nCol; i++ { + (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem + uintptr(i)*56)).Fflags = U16(MEM_Null) + (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem + uintptr(i)*56)).Fdb = db + } + } else { + Xsqlite3DbFreeNN(tls, db, pRec) + pRec = uintptr(0) + } + } + if pRec == uintptr(0) { + return uintptr(0) + } + *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) = pRec + } + + (*UnpackedRecord)(unsafe.Pointer(pRec)).FnField = U16((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FiVal + 1) + return (*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem + uintptr((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FiVal)*56 + } + return Xsqlite3ValueNew(tls, db) +} + +// The expression object indicated by the second argument is guaranteed +// to be a scalar SQL function. If +// +// * all function arguments are SQL literals, +// * one of the SQLITE_FUNC_CONSTANT or _SLOCHNG function flags is set, and +// * the SQLITE_FUNC_NEEDCOLL function flag is not set, +// +// then this routine attempts to invoke the SQL function. Assuming no +// error occurs, output parameter (*ppVal) is set to point to a value +// object containing the result before returning SQLITE_OK. +// +// Affinity aff is applied to the result of the function before returning. +// If the result is a text value, the sqlite3_value object uses encoding +// enc. +// +// If the conditions above are not met, this function returns SQLITE_OK +// and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to +// NULL and an SQLite error code returned. +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // var ctx Sqlite3_context at bp+8, 56 + // Context object for function invocation + var apVal uintptr // Function arguments + var nVal int32 // Size of apVal[] array + var pFunc uintptr // Function definition + var pVal uintptr // New value + var rc int32 // Return code + var pList uintptr // Function arguments + var i int32 + apVal = uintptr(0) + nVal = 0 + pFunc = uintptr(0) + pVal = uintptr(0) + rc = SQLITE_OK + pList = uintptr(0) // Iterator variable + + pList = *(*uintptr)(unsafe.Pointer(p + 32)) + if !(pList != 0) { + goto __1 + } + nVal = (*ExprList)(unsafe.Pointer(pList)).FnExpr +__1: + ; + + pFunc = Xsqlite3FindFunction(tls, db, *(*uintptr)(unsafe.Pointer(p + 8)), nVal, enc, uint8(0)) + + if !((*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) == U32(0) || + (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __2 + } + return SQLITE_OK +__2: + ; + + if !(pList != 0) { + goto __3 + } + apVal = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nVal))) + if !(apVal == uintptr(0)) { + goto __4 + } + rc = SQLITE_NOMEM + goto value_from_function_out +__4: + ; + i = 0 +__5: + if !(i < nVal) { + goto __7 + } + rc = Xsqlite3ValueFromExpr(tls, db, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr, enc, aff, apVal+uintptr(i)*8) + if !(*(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) == uintptr(0) || rc != SQLITE_OK) { + goto __8 + } + goto value_from_function_out +__8: + ; + goto __6 +__6: + i++ + goto __5 + goto __7 +__7: + ; +__3: + ; + + pVal = valueNew(tls, db, pCtx) + if !(pVal == uintptr(0)) { + goto __9 + } + rc = SQLITE_NOMEM + goto value_from_function_out +__9: + ; + + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) + (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpOut = pVal + (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpFunc = pFunc + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxSFunc})).f(tls, bp+8 /* &ctx */, nVal, apVal) + if !((*Sqlite3_context)(unsafe.Pointer(bp+8)).FisError != 0) { + goto __10 + } + rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FisError + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3605, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + goto __11 +__10: + Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) + + rc = Xsqlite3VdbeChangeEncoding(tls, pVal, int32(enc)) + if !(rc == SQLITE_OK && Xsqlite3VdbeMemTooBig(tls, pVal) != 0) { + goto __12 + } + rc = SQLITE_TOOBIG + (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).FnErr++ +__12: + ; +__11: + ; + (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).Frc = rc + +value_from_function_out: + if !(rc != SQLITE_OK) { + goto __13 + } + pVal = uintptr(0) +__13: + ; + if !(apVal != 0) { + goto __14 + } + i = 0 +__15: + if !(i < nVal) { + goto __17 + } + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) + goto __16 +__16: + i++ + goto __15 + goto __17 +__17: + ; + Xsqlite3DbFreeNN(tls, db, apVal) +__14: + ; + + *(*uintptr)(unsafe.Pointer(ppVal)) = pVal + return rc +} + +// Extract a value from the supplied expression in the manner described +// above sqlite3ValueFromExpr(). Allocate the sqlite3_value object +// using valueNew(). +// +// If pCtx is NULL and an error occurs after the sqlite3_value object +// has been allocated, it is freed before returning. Or, if pCtx is not +// NULL, it is assumed that the caller will free any allocated object +// in all cases. +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var op int32 + var zVal uintptr + // var pVal uintptr at bp+16, 8 + + var negInt int32 + var zNeg uintptr + var rc int32 + var aff U8 + var nVal int32 + zVal = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = uintptr(0) + negInt = 1 + zNeg = ts + 1525 /* "" */ + rc = SQLITE_OK + +__1: + if !(libc.AssignInt32(&op, int32((*Expr)(unsafe.Pointer(pExpr)).Fop)) == TK_UPLUS || op == TK_SPAN) { + goto __2 + } + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + goto __1 +__2: + ; + if !(op == TK_REGISTER) { + goto __3 + } + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) +__3: + ; + + // Compressed expressions only appear when parsing the DEFAULT clause + // on a table column definition, and hence only when pCtx==0. This + // check ensures that an EP_TokenOnly expression is never passed down + // into valueFromFunction(). + + if !(op == TK_CAST) { + goto __4 + } + + aff = U8(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0))) + rc = valueFromExpr(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, enc, aff, ppVal, pCtx) + + if !(*(*uintptr)(unsafe.Pointer(ppVal)) != 0) { + goto __5 + } + Xsqlite3VdbeMemCast(tls, *(*uintptr)(unsafe.Pointer(ppVal)), aff, uint8(SQLITE_UTF8)) + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(ppVal)), affinity, uint8(SQLITE_UTF8)) +__5: + ; + return rc +__4: + ; + + // Handle negative integers in a single step. This is needed in the + // case when the value is -9223372036854775808. + if !(op == TK_UMINUS && + (int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_INTEGER || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FLOAT)) { + goto __6 + } + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + negInt = -1 + zNeg = ts + 4874 /* "-" */ +__6: + ; + + if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { + goto __7 + } + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0)) { + goto __9 + } + goto no_mem +__9: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != U32(0)) { + goto __10 + } + Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) + goto __11 +__10: + zVal = Xsqlite3MPrintf(tls, db, ts+4876, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + if !(zVal == uintptr(0)) { + goto __12 + } + goto no_mem +__12: + ; + Xsqlite3ValueSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), -1, zVal, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) +__11: + ; + if !((op == TK_INTEGER || op == TK_FLOAT) && int32(affinity) == SQLITE_AFF_BLOB) { + goto __13 + } + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), uint8(SQLITE_AFF_NUMERIC), uint8(SQLITE_UTF8)) + goto __14 +__13: + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), affinity, uint8(SQLITE_UTF8)) +__14: + ; + + if !(int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags)&(MEM_Int|MEM_IntReal|MEM_Real) != 0) { + goto __15 + } + + *(*U16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Str)) +__15: + ; + if !(int32(enc) != SQLITE_UTF8) { + goto __16 + } + rc = Xsqlite3VdbeChangeEncoding(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), int32(enc)) +__16: + ; + goto __8 +__7: + if !(op == TK_UMINUS) { + goto __17 + } + // This branch happens for multiple negative signs. Ex: -(-5) + if !(SQLITE_OK == valueFromExpr(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, enc, affinity, bp+16, pCtx) && + *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0)) { + goto __19 + } + Xsqlite3VdbeMemNumerify(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) + if !(int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags)&MEM_Real != 0) { + goto __20 + } + *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = -*(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) + goto __21 +__20: + if !(*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { + goto __22 + } + *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = -float64(int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32)) + (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags = U16(int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) + goto __23 +__22: + *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = -*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) +__23: + ; +__21: + ; + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), affinity, enc) +__19: + ; + goto __18 +__17: + if !(op == TK_NULL) { + goto __24 + } + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0)) { + goto __26 + } + goto no_mem +__26: + ; + Xsqlite3VdbeMemSetNull(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) + goto __25 +__24: + if !(op == TK_BLOB) { + goto __27 + } + + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !!(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __29 + } + goto no_mem +__29: + ; + zVal = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 + nVal = Xsqlite3Strlen30(tls, zVal) - 1 + + Xsqlite3VdbeMemSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), Xsqlite3HexToBlob(tls, db, zVal, nVal), int64(nVal/2), + uint8(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) + goto __28 +__27: + if !(op == TK_FUNCTION && pCtx != uintptr(0)) { + goto __30 + } + rc = valueFromFunction(tls, db, pExpr, enc, affinity, bp+16, pCtx) + goto __31 +__30: + if !(op == TK_TRUEFALSE) { + goto __32 + } + + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __33 + } + (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)))).Fflags = U16(MEM_Int) + *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = I64(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0)) +__33: + ; +__32: + ; +__31: + ; +__28: + ; +__25: + ; +__18: + ; +__8: + ; + + *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) + return rc + +no_mem: + if !(pCtx == uintptr(0) || (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).FnErr == 0) { + goto __34 + } + Xsqlite3OomFault(tls, db) +__34: + ; + Xsqlite3DbFree(tls, db, zVal) + + if !(pCtx == uintptr(0)) { + goto __35 + } + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) +__35: + ; + return SQLITE_NOMEM +} + +// Create a new sqlite3_value object, containing the value of pExpr. +// +// This only works for very simple expressions that consist of one constant +// token (i.e. "5", "5.1", "'a string'"). If the expression can +// be converted directly into a value, then the value is allocated and +// a pointer written to *ppVal. The caller is responsible for deallocating +// the value by passing it to sqlite3ValueFree() later on. If the expression +// cannot be converted to a value, then *ppVal is set to NULL. +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ + if pExpr != 0 { + return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) + } + return 0 +} + +// Attempt to extract a value from pExpr and use it to construct *ppVal. +// +// If pAlloc is not NULL, then an UnpackedRecord object is created for +// pAlloc if one does not exist and the new value is added to the +// UnpackedRecord object. +// +// A value is extracted in the following cases: +// +// * (pExpr==0). In this case the value is assumed to be an SQL NULL, +// +// * The expression is a bound variable, and this is a reprepare, or +// +// * The expression is a literal value. +// +// On success, *ppVal is made to point to the extracted value. The caller +// is responsible for ensuring that the value is eventually freed. +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + // Skip over any TK_COLLATE nodes + pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) + + if !(pExpr != 0) { + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = valueNew(tls, db, pAlloc) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + Xsqlite3VdbeMemSetNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + } + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VARIABLE && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableQPSG) == uint64(0) { + var v uintptr + var iBindVar int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + Xsqlite3VdbeSetVarmask(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iBindVar) + if libc.AssignUintptr(&v, (*Parse)(unsafe.Pointer(pParse)).FpReprepare) != uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = valueNew(tls, db, pAlloc) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + rc = Xsqlite3VdbeMemCopy(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)), (*Vdbe)(unsafe.Pointer(v)).FaVar+uintptr(iBindVar-1)*56) + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)), affinity, (*Sqlite3)(unsafe.Pointer(db)).Fenc) + (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pVal */)))).Fdb = (*Parse)(unsafe.Pointer(pParse)).Fdb + } + } + } else { + rc = valueFromExpr(tls, db, pExpr, (*Sqlite3)(unsafe.Pointer(db)).Fenc, affinity, bp, pAlloc) + } + + *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp /* pVal */)) + return rc +} + +// This function is used to allocate and populate UnpackedRecord +// structures intended to be compared against sample index keys stored +// in the sqlite_stat4 table. +// +// A single call to this function populates zero or more fields of the +// record starting with field iVal (fields are numbered from left to +// right starting with 0). A single field is populated if: +// +// * (pExpr==0). In this case the value is assumed to be an SQL NULL, +// +// * The expression is a bound variable, and this is a reprepare, or +// +// * The sqlite3ValueFromExpr() function is able to extract a value +// from the expression (i.e. the expression is a literal value). +// +// Or, if pExpr is a TK_VECTOR, one field is populated for each of the +// vector components that match either of the two latter criteria listed +// above. +// +// Before any value is appended to the record, the affinity of the +// corresponding column within index pIdx is applied to it. Before +// this function returns, output parameter *pnExtract is set to the +// number of values appended to the record. +// +// When this function is called, *ppRec must either point to an object +// allocated by an earlier call to this function, or must be NULL. If it +// is NULL and a value can be successfully extracted, a new UnpackedRecord +// is allocated (and *ppRec set to point to it) before returning. +// +// Unless an error is encountered, SQLITE_OK is returned. It is not an +// error if a value cannot be extracted from pExpr. If an error does +// occur, an SQLite error code is returned. +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var rc int32 = SQLITE_OK + var nExtract int32 = 0 + + if pExpr == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_SELECT { + var i int32 + // var alloc ValueNewStat4Ctx at bp, 32 + + (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FpParse = pParse + (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FpIdx = pIdx + (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FppRec = ppRec + + for i = 0; i < nElem; i++ { + *(*uintptr)(unsafe.Pointer(bp + 32 /* pVal */)) = uintptr(0) + var pElem uintptr = func() uintptr { + if pExpr != 0 { + return Xsqlite3VectorFieldSubexpr(tls, pExpr, i) + } + return uintptr(0) + }() + var aff U8 = U8(Xsqlite3IndexColumnAffinity(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIdx, iVal+i)) + (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FiVal = iVal + i + rc = stat4ValueFromExpr(tls, pParse, pElem, aff, bp, bp+32) + if !(*(*uintptr)(unsafe.Pointer(bp + 32)) != 0) { + break + } + nExtract++ + } + } + + *(*int32)(unsafe.Pointer(pnExtract)) = nExtract + return rc +} + +// Attempt to extract a value from expression pExpr using the methods +// as described for sqlite3Stat4ProbeSetValue() above. +// +// If successful, set *ppVal to point to a new value object and return +// SQLITE_OK. If no value can be extracted, but no other error occurs +// (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error +// does occur, return an SQLite error code. The final value of *ppVal +// is undefined in this case. +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ + return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) +} + +// Extract the iCol-th column from the nRec-byte record in pRec. Write +// the column value into *ppVal. If *ppVal is initially NULL then a new +// sqlite3_value object is allocated. +// +// If *ppVal is initially NULL then the caller is responsible for +// ensuring that the value written into *ppVal is eventually freed. +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*U32)(unsafe.Pointer(bp + 4 /* t */)) = U32(0) // a column type code + // var nHdr int32 at bp, 4 + // Size of the header in the record + var iHdr int32 // Next unread header byte + var iField int32 // Next unread data byte + var szField int32 = 0 // Size of the current data field + var i int32 // Column index + var a uintptr = pRec // Typecast byte array + var pMem uintptr = *(*uintptr)(unsafe.Pointer(ppVal)) // Write result into this Mem object + + iHdr = int32(func() uint8 { + if int32(*(*U8)(unsafe.Pointer(a))) < int32(U8(0x80)) { + return uint8(func() int32 { *(*int32)(unsafe.Pointer(bp)) = int32(U32(*(*U8)(unsafe.Pointer(a)))); return 1 }()) + } + return Xsqlite3GetVarint32(tls, a, bp) + }()) + if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { + return Xsqlite3CorruptError(tls, 79691) + } + iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) + for i = 0; i <= iCol; i++ { + iHdr = iHdr + int32(func() uint8 { + if int32(*(*U8)(unsafe.Pointer(a + uintptr(iHdr)))) < int32(U8(0x80)) { + return uint8(func() int32 { + *(*U32)(unsafe.Pointer(bp + 4)) = U32(*(*U8)(unsafe.Pointer(a + uintptr(iHdr)))) + return 1 + }()) + } + return Xsqlite3GetVarint32(tls, a+uintptr(iHdr), bp+4) + }()) + + if iHdr > *(*int32)(unsafe.Pointer(bp)) { + return Xsqlite3CorruptError(tls, 79697) + } + szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) + iField = iField + szField + } + + if iField > nRec { + return Xsqlite3CorruptError(tls, 79703) + } + if pMem == uintptr(0) { + pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) + if pMem == uintptr(0) { + return SQLITE_NOMEM + } + } + Xsqlite3VdbeSerialGet(tls, a+uintptr(iField-szField), *(*U32)(unsafe.Pointer(bp + 4 /* t */)), pMem) + (*Mem)(unsafe.Pointer(pMem)).Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc + return SQLITE_OK +} + +// Unless it is NULL, the argument must be an UnpackedRecord object returned +// by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes +// the object. +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ + if pRec != 0 { + var i int32 + var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) + var aMem uintptr = (*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem + var db uintptr = (*Mem)(unsafe.Pointer(aMem)).Fdb + for i = 0; i < nCol; i++ { + Xsqlite3VdbeMemRelease(tls, aMem+uintptr(i)*56) + } + Xsqlite3KeyInfoUnref(tls, (*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo) + Xsqlite3DbFreeNN(tls, db, pRec) + } +} + +// Change the string value of an sqlite3_value object +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ + if v != 0 { + Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) + } +} + +// Free an sqlite3_value object +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ + if !(v != 0) { + return + } + Xsqlite3VdbeMemRelease(tls, v) + Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(v)).Fdb, v) +} + +// The sqlite3ValueBytes() routine returns the number of bytes in the +// sqlite3_value object assuming that it uses the encoding "enc". +// The valueBytes() routine is a helper function. +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ + if valueToText(tls, pVal, enc) != uintptr(0) { + return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn + } + return 0 +} + +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ + var p uintptr = pVal + + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { + return (*Mem)(unsafe.Pointer(p)).Fn + } + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Blob != 0 { + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { + return (*Mem)(unsafe.Pointer(p)).Fn + *(*int32)(unsafe.Pointer(p)) + } else { + return (*Mem)(unsafe.Pointer(p)).Fn + } + } + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Null != 0 { + return 0 + } + return valueBytes(tls, pVal, enc) +} + +// Create a new virtual database engine. +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var p uintptr + p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) + if p == uintptr(0) { + return uintptr(0) + } + libc.Xmemset(tls, p+144, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+144)) + (*Vdbe)(unsafe.Pointer(p)).Fdb = db + if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + } + (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p + (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_INIT) + (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse + (*Parse)(unsafe.Pointer(pParse)).FpVdbe = p + + Xsqlite3VdbeAddOp2(tls, p, OP_Init, 0, 1) + return p +} + +// Return the Parse object that owns a Vdbe object. +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ + return (*Vdbe)(unsafe.Pointer(p)).FpParse +} + +// Change the error string stored in Vdbe.zErrMsg +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ + var ap Va_list + _ = ap + Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) + ap = va + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) + _ = ap +} + +// Remember the SQL string for a prepared statement. +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ + if p == uintptr(0) { + return + } + (*Vdbe)(unsafe.Pointer(p)).FprepFlags = prepFlags + if int32(prepFlags)&SQLITE_PREPARE_SAVESQL == 0 { + (*Vdbe)(unsafe.Pointer(p)).Fexpmask = U32(0) + } + + (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) +} + +// Swap all content between two VDBE structures. +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ + var tmp Vdbe + var pTmp uintptr + var zTmp uintptr + + tmp = *(*Vdbe)(unsafe.Pointer(pA)) + *(*Vdbe)(unsafe.Pointer(pA)) = *(*Vdbe)(unsafe.Pointer(pB)) + *(*Vdbe)(unsafe.Pointer(pB)) = tmp + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpNext + (*Vdbe)(unsafe.Pointer(pA)).FpNext = (*Vdbe)(unsafe.Pointer(pB)).FpNext + (*Vdbe)(unsafe.Pointer(pB)).FpNext = pTmp + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpPrev + (*Vdbe)(unsafe.Pointer(pA)).FpPrev = (*Vdbe)(unsafe.Pointer(pB)).FpPrev + (*Vdbe)(unsafe.Pointer(pB)).FpPrev = pTmp + zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql + (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql + (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp + (*Vdbe)(unsafe.Pointer(pB)).Fexpmask = (*Vdbe)(unsafe.Pointer(pA)).Fexpmask + (*Vdbe)(unsafe.Pointer(pB)).FprepFlags = (*Vdbe)(unsafe.Pointer(pA)).FprepFlags + libc.Xmemcpy(tls, pB+220, pA+220, uint64(unsafe.Sizeof([9]U32{}))) + *(*U32)(unsafe.Pointer(pB + 220 + 5*4))++ +} + +// Resize the Vdbe.aOp array so that it is at least nOp elements larger +// than its current size. nOp is guaranteed to be less than or equal +// to 1024/sizeof(Op). +// +// If an out-of-memory error occurs while resizing the array, return +// SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain +// unchanged (this is so that any opcodes already allocated can be +// correctly deallocated along with the rest of the Vdbe). +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ + var pNew uintptr + var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse + + // The SQLITE_TEST_REALLOC_STRESS compile-time option is designed to force + // more frequent reallocs and hence provide more opportunities for + // simulated OOM faults. SQLITE_TEST_REALLOC_STRESS is generally used + // during testing only. With SQLITE_TEST_REALLOC_STRESS grow the op array + // by the minimum* amount required until the size reaches 512. Normal + // operation (without SQLITE_TEST_REALLOC_STRESS) is to double the current + // size of the op array or add 1KB of space, whichever is smaller. + var nNew Sqlite3_int64 = func() int64 { + if (*Vdbe)(unsafe.Pointer(v)).FnOpAlloc != 0 { + return int64(2) * Sqlite3_int64((*Vdbe)(unsafe.Pointer(v)).FnOpAlloc) + } + return int64(uint64(1024) / uint64(unsafe.Sizeof(Op{}))) + }() + _ = nOp + + // Ensure that the size of a VDBE does not grow too large + if nNew > Sqlite3_int64(*(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).Fdb + 136 + 5*4))) { + Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(p)).Fdb) + return SQLITE_NOMEM + } + + pNew = Xsqlite3DbRealloc(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(v)).FaOp, uint64(nNew)*uint64(unsafe.Sizeof(Op{}))) + if pNew != 0 { + (*Parse)(unsafe.Pointer(p)).FszOpAlloc = Xsqlite3DbMallocSize(tls, (*Parse)(unsafe.Pointer(p)).Fdb, pNew) + (*Vdbe)(unsafe.Pointer(v)).FnOpAlloc = int32(uint64((*Parse)(unsafe.Pointer(p)).FszOpAlloc) / uint64(unsafe.Sizeof(Op{}))) + (*Vdbe)(unsafe.Pointer(v)).FaOp = pNew + } + return func() int32 { + if pNew != 0 { + return SQLITE_OK + } + return SQLITE_NOMEM + }() +} + +// Add a new instruction to the list of instructions current in the +// VDBE. Return the address of the new instruction. +// +// Parameters: +// +// p Pointer to the VDBE +// +// op The opcode for this instruction +// +// p1, p2, p3 Operands +// +// Use the sqlite3VdbeResolveLabel() function to fix an address and +// the sqlite3VdbeChangeP4() function to change the value of the P4 +// operand. +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ + + if growOpArray(tls, p, 1) != 0 { + return 1 + } + + 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:80015:20: */ + var i int32 + var pOp uintptr + + i = (*Vdbe)(unsafe.Pointer(p)).FnOp + + if (*Vdbe)(unsafe.Pointer(p)).FnOpAlloc <= i { + return growOp3(tls, p, op, p1, p2, p3) + } + + (*Vdbe)(unsafe.Pointer(p)).FnOp++ + pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i)*24 + + (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(op) + (*VdbeOp)(unsafe.Pointer(pOp)).Fp5 = U16(0) + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = p1 + (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = p2 + (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 = p3 + *(*uintptr)(unsafe.Pointer(pOp + 16)) = uintptr(0) + (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(P4_NOTUSED) + return i +} + +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ + return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) +} + +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80060:20: */ + return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) +} + +// Generate code for an unconditional jump to instruction iDest +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ + return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) +} + +// Generate code to cause the string zStr to be loaded into +// register iDest +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ + return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) +} + +// Generate code that initializes multiple registers to string or integer +// constants. The registers begin with iDest and increase consecutively. +// One register is initialized for each characgter in zTypes[]. For each +// "s" character in zTypes[], the register is a string if the argument is +// not NULL, or OP_Null if the value is a null pointer. For each "i" character +// in zTypes[], the register is initialized to an integer. +// +// If the input string does not end with "X" then an OP_ResultRow instruction +// is generated for the values inserted. +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ + var ap Va_list + _ = ap + var i int32 + var c uint8 + var z uintptr + ap = va + i = 0 +__1: + if !(int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(zTypes + uintptr(i))))) != 0) { + goto __3 + } + if !(int32(c) == 's') { + goto __4 + } + z = libc.VaUintptr(&ap) + Xsqlite3VdbeAddOp4(tls, p, func() int32 { + if z == uintptr(0) { + return OP_Null + } + return OP_String8 + }(), 0, iDest+i, 0, z, 0) + goto __5 +__4: + if !(int32(c) == 'i') { + goto __6 + } + Xsqlite3VdbeAddOp2(tls, p, OP_Integer, int32(libc.VaInt32(&ap)), iDest+i) + goto __7 +__6: + goto skip_op_resultrow +__7: + ; +__5: + ; + goto __2 +__2: + i++ + goto __1 + goto __3 +__3: + ; + Xsqlite3VdbeAddOp2(tls, p, OP_ResultRow, iDest, i) +skip_op_resultrow: + _ = ap +} + +// Add an opcode that includes the p4 value as a pointer. +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ + var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) + Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) + return addr +} + +// Add an OP_Function or OP_PureFunc opcode. +// +// The eCallCtx argument is information (typically taken from Expr.op2) +// that describes the calling context of the function. 0 means a general +// function call. NC_IsCheck means called by a check constraint, +// NC_IdxExpr means called as part of an index expression. NC_PartIdx +// means in the WHERE clause of a partial index. NC_GenCol means called +// while computing a generated column value. 0 is the usual case. +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var nByte int32 + var addr int32 + var pCtx uintptr + + nByte = int32(uint64(unsafe.Sizeof(Sqlite3_context{})) + uint64(nArg-1)*uint64(unsafe.Sizeof(uintptr(0)))) + pCtx = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nByte)) + if pCtx == uintptr(0) { + + freeEphemeralFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pFunc) + return 0 + } + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = uintptr(0) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc = pFunc + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe = uintptr(0) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 0 + (*Sqlite3_context)(unsafe.Pointer(pCtx)).Fargc = U8(nArg) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp = Xsqlite3VdbeCurrentAddr(tls, v) + addr = Xsqlite3VdbeAddOp4(tls, v, func() int32 { + if eCallCtx != 0 { + return OP_PureFunc + } + return OP_Function + }(), + p1, p2, p3, pCtx, -16) + Xsqlite3VdbeChangeP5(tls, v, uint16(eCallCtx&NC_SelfRef)) + return addr +} + +// Add an opcode that includes the p4 value with a P4_INT64 or +// P4_REAL type. +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ + var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) + if p4copy != 0 { + libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) + } + return Xsqlite3VdbeAddOp4(tls, p, op, p1, p2, p3, p4copy, p4type) +} + +// Return the address of the current EXPLAIN QUERY PLAN baseline. +// 0 means "none". +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ + var pOp uintptr + if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { + return 0 + } + pOp = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, (*Parse)(unsafe.Pointer(pParse)).FaddrExplain) + return (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 +} + +// Set a debugger breakpoint on the following routine in order to +// monitor the EXPLAIN QUERY PLAN code generation. + +// Add a new OP_Explain opcode. +// +// If the bPush flag is true, then make this opcode the parent for +// subsequent Explains until sqlite3VdbeExplainPop() is called. +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ + // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. + // But omit them (for performance) during production builds + if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { + var zMsg uintptr + var v uintptr + var ap Va_list + _ = ap + var iThis int32 + ap = va + zMsg = Xsqlite3VMPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zFmt, ap) + _ = ap + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + iThis = (*Vdbe)(unsafe.Pointer(v)).FnOp + Xsqlite3VdbeAddOp4(tls, v, OP_Explain, iThis, (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, + zMsg, -7) + + if bPush != 0 { + (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = iThis + } + } +} + +// Pop the EXPLAIN QUERY PLAN stack one level. +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ + + (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) +} + +// Add an OP_ParseSchema opcode. This routine is broken out from +// sqlite3VdbeAddOp4() since it needs to also needs to mark all btrees +// as having been used. +// +// The zWhere string must have been obtained from sqlite3_malloc(). +// This routine will take ownership of the allocated memory. +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ + var j int32 + Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) + Xsqlite3VdbeChangeP5(tls, p, p5) + for j = 0; j < (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnDb; j++ { + Xsqlite3VdbeUsesBtree(tls, p, j) + } + Xsqlite3MayAbort(tls, (*Vdbe)(unsafe.Pointer(p)).FpParse) +} + +// Add an opcode that includes the p4 value as an integer. +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ + var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) + if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { + var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 + (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(-3) + *(*int32)(unsafe.Pointer(pOp + 16)) = p4 + } + return addr +} + +// Insert the end of a co-routine +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ + Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) + + // Clear the temporary register cache, thereby ensuring that each + // co-routine has its own independent set of registers, because co-routines + // might expect their registers to be preserved across an OP_Yield, and + // that could cause problems if two or more co-routines are using the same + // temporary register. + (*Parse)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FpParse)).FnTempReg = U8(0) + (*Parse)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FpParse)).FnRangeReg = 0 +} + +// Create a new symbolic label for an instruction that has yet to be +// coded. The symbolic label is really just a negative number. The +// label can be used as the P2 value of an operation. Later, when +// the label is resolved to a specific address, the VDBE will scan +// through its operation list and change all values of P2 which match +// the label into the resolved address. +// +// The VDBE knows that a P2 value is a label because labels are +// always negative and P2 values are suppose to be non-negative. +// Hence, a negative P2 value is a label that has yet to be resolved. +// (Later:) This is only true for opcodes that have the OPFLG_JUMP +// property. +// +// Variable usage notes: +// +// Parse.aLabel[x] Stores the address that the x-th label resolves +// into. For testing (SQLITE_DEBUG), unresolved +// labels stores -1, but that is not required. +// Parse.nLabelAlloc Number of slots allocated to Parse.aLabel[] +// Parse.nLabel The *negative* of the number of labels that have +// been issued. The negative is stored because +// that gives a performance improvement over storing +// the equivalent positive value. +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ + return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) +} + +// Resolve label "x" to be the address of the next instruction to +// be inserted. The parameter "x" must have been obtained from +// a prior call to sqlite3VdbeMakeLabel(). +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ + var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel + (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, + uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) + if (*Parse)(unsafe.Pointer(p)).FaLabel == uintptr(0) { + (*Parse)(unsafe.Pointer(p)).FnLabelAlloc = 0 + } else { + (*Parse)(unsafe.Pointer(p)).FnLabelAlloc = nNewSize + *(*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:80349:21: */ + var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse + var j int32 = ^x + + if (*Parse)(unsafe.Pointer(p)).FnLabelAlloc+(*Parse)(unsafe.Pointer(p)).FnLabel < 0 { + resizeResolveLabel(tls, p, v, j) + } else { + // Labels may only be resolved once + *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp + } +} + +// Mark the VDBE as one that can only be run one time. +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) +} + +// Mark the VDBE as one that can only be run multiple times. +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) +} + +// This routine is called after all opcodes have been inserted. It loops +// through all the opcodes and fixes up some details. +// +// (1) For each jump instruction with a negative P2 value (a label) +// resolve the P2 value to an actual address. +// +// (2) Compute the maximum number of arguments used by any SQL function +// and store that value in *pMaxFuncArgs. +// +// (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately +// indicate what the prepared statement actually does. +// +// (4) Initialize the p4.xAdvance pointer on opcodes that use it. +// +// (5) Reclaim the memory allocated for storing labels. +// +// This routine will only function correctly if the mkopcodeh.tcl generator +// script numbers the opcodes correctly. Changes to this routine must be +// coordinated with changes to mkopcodeh.tcl. +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ + var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var pOp uintptr + var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse + var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 7, 0x80) + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 8, 0x100) + pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 + for 1 != 0 { + + // Only JUMP opcodes and the short list of special opcodes in the switch + // below need to be considered. The mkopcodeh.tcl generator script groups + // all these opcodes together near the front of the opcode list. Skip + // any opcode that does not need processing by virtual of the fact that + // it is larger than SQLITE_MX_JUMP_OPCODE, as a performance optimization. + if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { + // NOTE: Be sure to update mkopcodeh.tcl when adding or removing + // cases from this switch! + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + { + if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 7, 0x80) + } + + } + fallthrough + case OP_AutoCommit: + fallthrough + case OP_Savepoint: + { + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 8, 0x100) + break + + } + fallthrough + case OP_Checkpoint: + fallthrough + case OP_Vacuum: + fallthrough + case OP_JournalMode: + { + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 7, 0x80) + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 8, 0x100) + break + + } + fallthrough + case OP_Next: + fallthrough + case OP_SorterNext: + { + *(*uintptr)(unsafe.Pointer(pOp + 16)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32) int32 + }{Xsqlite3BtreeNext})) + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-5) + // The code generator never codes any of these opcodes as a jump + // to a label. They are always coded as a jump backwards to a + // known address + + break + + } + fallthrough + case OP_Prev: + { + *(*uintptr)(unsafe.Pointer(pOp + 16)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32) int32 + }{Xsqlite3BtreePrevious})) + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-5) + // The code generator never codes any of these opcodes as a jump + // to a label. They are always coded as a jump backwards to a + // known address + + break + + } + fallthrough + case OP_VUpdate: + { + if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 + } + break + + } + fallthrough + case OP_VFilter: + { + var n int32 + + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if n > nMaxArgs { + nMaxArgs = n + } + + } + fallthrough + default: + { + if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { + // The mkopcodeh.tcl script has so arranged things that the only + // non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to + // have non-negative values for P2. + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) + } + break + + } + } + // The mkopcodeh.tcl script has so arranged things that the only + // non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to + // have non-negative values for P2. + + } + if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { + break + } + pOp -= 24 + } + Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 + *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs + +} + +// Return the address of the next instruction to be inserted. +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ + + return (*Vdbe)(unsafe.Pointer(p)).FnOp +} + +// Verify that at least N opcode slots are available in p without +// having to malloc for more space (except when compiled using +// SQLITE_TEST_REALLOC_STRESS). This interface is used during testing +// to verify that certain calls to sqlite3VdbeAddOpList() can never +// fail due to a OOM fault and hence that the return value from +// sqlite3VdbeAddOpList() will always be non-NULL. + +// Verify that the VM passed as the only argument does not contain +// an OP_ResultRow opcode. Fail an assert() if it does. This is used +// by code in pragma.c to ensure that the implementation of certain +// pragmas comports with the flags specified in the mkpragmatab.tcl +// script. + +// Generate code (a single OP_Abortable opcode) that will +// verify that the VDBE program can safely call Abort in the current +// context. + +// This function returns a pointer to the array of opcodes associated with +// the Vdbe passed as the first argument. It is the callers responsibility +// to arrange for the returned array to be eventually freed using the +// vdbeFreeOpArray() function. +// +// Before returning, *pnOp is set to the number of entries in the returned +// array. Also, *pnMaxArg is set to the larger of its current value and +// the number of entries in the Vdbe.apArg[] array required to execute the +// returned program. +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ + var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + + // Check that sqlite3VdbeUsesBtree() was not called on this VM + + resolveP2Values(tls, p, pnMaxArg) + *(*int32)(unsafe.Pointer(pnOp)) = (*Vdbe)(unsafe.Pointer(p)).FnOp + (*Vdbe)(unsafe.Pointer(p)).FaOp = uintptr(0) + return aOp +} + +// Add a whole list of operations to the operation stack. Return a +// pointer to the first operation inserted. +// +// Non-zero P2 arguments to jump instructions are automatically adjusted +// so that the jump target is relative to the first operation inserted. +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ + var i int32 + var pOut uintptr + var pFirst uintptr + + if (*Vdbe)(unsafe.Pointer(p)).FnOp+nOp > (*Vdbe)(unsafe.Pointer(p)).FnOpAlloc && growOpArray(tls, p, nOp) != 0 { + return uintptr(0) + } + pFirst = libc.AssignUintptr(&pOut, (*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp)*24) + i = 0 +__1: + if !(i < nOp) { + goto __3 + } + { + (*VdbeOp)(unsafe.Pointer(pOut)).Fopcode = (*VdbeOpList)(unsafe.Pointer(aOp)).Fopcode + (*VdbeOp)(unsafe.Pointer(pOut)).Fp1 = int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp1) + (*VdbeOp)(unsafe.Pointer(pOut)).Fp2 = int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp2) + + if int32(Xsqlite3OpcodeProperty[(*VdbeOpList)(unsafe.Pointer(aOp)).Fopcode])&OPFLG_JUMP != 0 && int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp2) > 0 { + *(*int32)(unsafe.Pointer(pOut + 8)) += (*Vdbe)(unsafe.Pointer(p)).FnOp + } + (*VdbeOp)(unsafe.Pointer(pOut)).Fp3 = int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp3) + (*VdbeOp)(unsafe.Pointer(pOut)).Fp4type = int8(P4_NOTUSED) + *(*uintptr)(unsafe.Pointer(pOut + 16)) = uintptr(0) + (*VdbeOp)(unsafe.Pointer(pOut)).Fp5 = U16(0) + _ = iLineno + + } + goto __2 +__2: + i++ + aOp += 4 + pOut += 24 + goto __1 + goto __3 +__3: + ; + *(*int32)(unsafe.Pointer(p + 152)) += nOp + return pFirst +} + +// Change the value of the opcode, or P1, P2, P3, or P5 operands +// for a specific instruction. +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ + (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode +} + +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ + (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val +} + +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ + (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val +} + +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ + (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val +} + +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ + + if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 + } +} + +// Change the P2 operand of instruction addr so that it points to +// the address of the next instruction to be coded. +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ + Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) +} + +// Change the P2 operand of the jump instruction at addr so that +// the jump lands on the next opcode. Or if the jump instruction was +// the previous opcode (and is thus a no-op) then simply back up +// the next instruction counter by one slot so that the jump is +// overwritten by the next inserted opcode. +// +// This routine is an optimization of sqlite3VdbeJumpHere() that +// strives to omit useless byte-code like this: +// +// 7 Once 0 8 0 +// 8 ... +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ + if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { + + (*Vdbe)(unsafe.Pointer(p)).FnOp-- + } else { + Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) + } +} + +// If the input FuncDef structure is ephemeral, then free it. If +// the FuncDef is not ephermal, then do nothing. +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ + if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { + Xsqlite3DbFreeNN(tls, db, pDef) + } +} + +// Delete a P4 value if necessary. +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ + if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { + Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + } + Xsqlite3DbFreeNN(tls, db, p) +} + +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80904:13: */ + + switch p4type { + case -16: + { + freeP4FuncCtx(tls, db, p4) + break + + } + case -13: + fallthrough + case -14: + fallthrough + case -7: + fallthrough + case -17: + fallthrough + case -15: + { + Xsqlite3DbFree(tls, db, p4) + break + + } + case -9: + { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + Xsqlite3KeyInfoUnref(tls, p4) + } + break + + } + case -8: + { + freeEphemeralFunction(tls, db, p4) + break + + } + case -11: + { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + Xsqlite3ValueFree(tls, p4) + } else { + freeP4Mem(tls, db, p4) + } + break + + } + case -12: + { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + Xsqlite3VtabUnlock(tls, p4) + } + break + + } + } +} + +// Free the space allocated for aOp and any p4 values allocated for the +// opcodes contained within. If aOp is not NULL it is assumed to contain +// nOp entries. +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ + if aOp != 0 { + var pOp uintptr + for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { + if int32((*Op)(unsafe.Pointer(pOp)).Fp4type) <= -7 { + freeP4(tls, db, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) + } + } + Xsqlite3DbFreeNN(tls, db, aOp) + } +} + +// Link the SubProgram object passed as the second argument into the linked +// list at Vdbe.pSubProgram. This list is used to delete all sub-program +// objects when the VM is no longer required. +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ + (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram + (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p +} + +// Return true if the given Vdbe has any SubPrograms. +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ + return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) +} + +// Change the opcode at addr into OP_Noop +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ + var pOp uintptr + if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { + return 0 + } + + pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 + freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) + (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(P4_NOTUSED) + *(*uintptr)(unsafe.Pointer(pOp + 16)) = uintptr(0) + (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Noop) + return 1 +} + +// If the last opcode is "op" and it is not a jump destination, +// then remove it. Return true if and only if an opcode was removed. +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ + if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { + return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) + } else { + return 0 + } + return int32(0) +} + +// Change the value of the P4 operand for a specific instruction. +// This routine is useful when a large program is loaded from a +// static array using sqlite3VdbeAddOpList but we want to make a +// few minor changes to the program. +// +// If n>=0 then the P4 operand is dynamic, meaning that a copy of +// the string is made into memory obtained from sqlite3_malloc(). +// A value of n==0 means copy bytes of zP4 up to and including the +// first null byte. If n>0 then copy n+1 bytes of zP4. +// +// Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points +// to a string or structure that is guaranteed to exist for the lifetime of +// the Vdbe. In these cases we can just copy the pointer. +// +// If addr<0 then change P4 on the most recently inserted instruction. +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ + if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { + freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) + *(*uintptr)(unsafe.Pointer(pOp + 16)) = uintptr(0) + } + if n < 0 { + Xsqlite3VdbeChangeP4(tls, p, int32((int64(pOp)-int64((*Vdbe)(unsafe.Pointer(p)).FaOp))/24), zP4, n) + } else { + if n == 0 { + n = Xsqlite3Strlen30(tls, zP4) + } + *(*uintptr)(unsafe.Pointer(pOp + 16)) = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zP4, uint64(n)) + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) + } +} + +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = zP4 + + var pOp uintptr + var db uintptr + + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if n != -12 { + freeP4(tls, db, n, *(*uintptr)(unsafe.Pointer(bp))) + } + return + } + + if addr < 0 { + addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 + } + pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 + if n >= 0 || (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { + vdbeChangeP4Full(tls, p, pOp, *(*uintptr)(unsafe.Pointer(bp /* zP4 */)), n) + return + } + if n == -3 { + // Note: this cast is safe, because the origin data point was an int + // that was cast to a (const char *). + *(*int32)(unsafe.Pointer(pOp + 16)) = int32(*(*uintptr)(unsafe.Pointer(bp))) + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-3) + } else if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) { + + *(*uintptr)(unsafe.Pointer(pOp + 16)) = *(*uintptr)(unsafe.Pointer(bp /* zP4 */)) + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(n) + if n == -12 { + Xsqlite3VtabLock(tls, *(*uintptr)(unsafe.Pointer(bp /* zP4 */))) + } + } +} + +// Change the P4 operand of the most recently coded instruction +// to the value defined by the arguments. This is a high-speed +// version of sqlite3VdbeChangeP4(). +// +// The P4 operand must not have been previously defined. And the new +// P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of +// those cases. +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ + var pOp uintptr + + if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { + freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, n, pP4) + } else { + + pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 + + (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(n) + *(*uintptr)(unsafe.Pointer(pOp + 16)) = pP4 + } +} + +// Set the P4 on the most recently added opcode to the KeyInfo for the +// index given. +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var pKeyInfo uintptr + + pKeyInfo = Xsqlite3KeyInfoOfIndex(tls, pParse, pIdx) + if pKeyInfo != 0 { + Xsqlite3VdbeAppendP4(tls, v, pKeyInfo, -9) + } +} + +// Return the opcode for a given address. If the address is -1, then +// return the most recently inserted opcode. +// +// If a memory allocation error has occurred prior to the calling of this +// routine, then a pointer to a dummy VdbeOp will be returned. That opcode +// is readable but not writable, though it is cast to a writable value. +// The return of a dummy opcode allows the call to continue functioning +// after an OOM fault without having to check to see if the return from +// this routine is a valid pointer. But because the dummy.opcode is 0, +// dummy will never be written to. This is verified by code inspection and +// by running with Valgrind. +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer + + if addr < 0 { + addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 + } + + if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { + return uintptr(unsafe.Pointer(&dummy)) + } else { + return (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 + } + return uintptr(0) +} + +var dummy VdbeOp /* sqlite3.c:81213:17: */ + +// Compute a string that describes the P4 parameter for an opcode. +// Use zTemp for any required temporary buffer space. +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ + bp := tls.Alloc(176) + defer tls.Free(176) + + var zP4 uintptr = uintptr(0) + // var x StrAccum at bp+144, 32 + + Xsqlite3StrAccumInit(tls, bp+144, uintptr(0), uintptr(0), 0, SQLITE_MAX_LENGTH) + switch int32((*Op)(unsafe.Pointer(pOp)).Fp4type) { + case -9: + { + var j int32 + var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + Xsqlite3_str_appendf(tls, bp+144, ts+4881, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + for j = 0; j < int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField); j++ { + var pColl uintptr = *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(j)*8)) + var zColl uintptr + if pColl != 0 { + zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName + } else { + zColl = ts + 1525 /* "" */ + } + if libc.Xstrcmp(tls, zColl, ts+1070) == 0 { + zColl = ts + 4886 /* "B" */ + } + Xsqlite3_str_appendf(tls, bp+144, ts+4888, + libc.VaList(bp+8, func() uintptr { + if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { + return ts + 4874 /* "-" */ + } + return ts + 1525 /* "" */ + }(), + func() uintptr { + if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { + return ts + 4896 /* "N." */ + } + return ts + 1525 /* "" */ + }(), + zColl)) + } + Xsqlite3_str_append(tls, bp+144, ts+4899, 1) + break + + } + case -2: + { + var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + Xsqlite3_str_appendf(tls, bp+144, ts+4901, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) + break + + } + case -8: + { + var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) + Xsqlite3_str_appendf(tls, bp+144, ts+4910, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + break + + } + case -16: + { + var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc + Xsqlite3_str_appendf(tls, bp+144, ts+4910, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + break + + } + case -14: + { + Xsqlite3_str_appendf(tls, bp+144, ts+1305, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + break + + } + case -3: + { + Xsqlite3_str_appendf(tls, bp+144, ts+4917, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + break + + } + case -13: + { + Xsqlite3_str_appendf(tls, bp+144, ts+1299, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + break + + } + case -11: + { + var pMem uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0 { + zP4 = (*Mem)(unsafe.Pointer(pMem)).Fz + } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { + Xsqlite3_str_appendf(tls, bp+144, ts+1305, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { + Xsqlite3_str_appendf(tls, bp+144, ts+1299, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { + zP4 = ts + 1526 /* "NULL" */ + } else { + + zP4 = ts + 4920 /* "(blob)" */ + } + break + + } + case -12: + { + var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab + Xsqlite3_str_appendf(tls, bp+144, ts+4927, libc.VaList(bp+120, pVtab)) + break + + } + case -15: + { + var i U32 + var ai uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) + var n U32 = *(*U32)(unsafe.Pointer(ai)) // The first element of an INTARRAY is always the + // count of the number of elements to follow + for i = U32(1); i <= n; i++ { + Xsqlite3_str_appendf(tls, bp+144, ts+4935, libc.VaList(bp+128, func() int32 { + if i == U32(1) { + return '[' + } + return ',' + }(), *(*U32)(unsafe.Pointer(ai + uintptr(i)*4)))) + } + Xsqlite3_str_append(tls, bp+144, ts+4940, 1) + break + + } + case -4: + { + zP4 = ts + 4942 /* "program" */ + break + + } + case -17: + fallthrough + case -5: + { + break + + } + case -6: + { + zP4 = (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FzName + break + + } + default: + { + zP4 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + } + } + if zP4 != 0 { + Xsqlite3_str_appendall(tls, bp+144, zP4) + } + if int32((*StrAccum)(unsafe.Pointer(bp+144)).FaccError)&SQLITE_NOMEM != 0 { + Xsqlite3OomFault(tls, db) + } + return Xsqlite3StrAccumFinish(tls, bp+144) +} + +var encnames = [4]uintptr{ts + 4950, ts + 4952, ts + 4954, ts + 4959} /* sqlite3.c:81444:25 */ + +// Declare to the Vdbe that the BTree object at db->aDb[i] is used. +// +// The prepared statements need to know in advance the complete set of +// attached databases that will be use. A mask of these databases +// is maintained in p->btreeMask. The p->lockMask value is the subset of +// p->btreeMask of databases that will require a lock. +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ + + *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i + if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { + *(*YDbMask)(unsafe.Pointer(p + 216)) |= YDbMask(YDbMask(1)) << i + } +} + +// If SQLite is compiled to support shared-cache mode and to be threadsafe, +// this routine obtains the mutex associated with each BtShared structure +// that may be accessed by the VM passed as an argument. In doing so it also +// sets the BtShared.db member of each of the BtShared structures, ensuring +// that the correct busy-handler callback is invoked if required. +// +// If SQLite is not threadsafe but does support shared-cache mode, then +// sqlite3BtreeEnter() is invoked to set the BtShared.db variables +// of all of BtShared structures accessible via the database handle +// associated with the VM. +// +// If SQLite is not threadsafe and does not support shared-cache mode, this +// function is a no-op. +// +// The p->btreeMask field is a bitmask of all btrees that the prepared +// statement p will ever use. Let N be the number of bits in p->btreeMask +// corresponding to btrees that use shared cache. Then the runtime of +// this routine is N*N. But as N is rarely more than 1, this should not +// be a problem. +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ + var i int32 + var db uintptr + var aDb uintptr + var nDb int32 + if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { + return + } // The common case + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + aDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb + for i = 0; i < nDb; i++ { + if i != 1 && (*Vdbe)(unsafe.Pointer(p)).FlockMask&(YDbMask(YDbMask(1))< 0 { + (*Mem)(unsafe.Pointer(p)).Fdb = db + (*Mem)(unsafe.Pointer(p)).Fflags = flags + (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 + p += 56 + } +} + +// Release an array of N Mem elements +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ + if p != 0 && N != 0 { + var pEnd uintptr = p + uintptr(N)*56 + var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { + for __ccgo := true; __ccgo; __ccgo = libc.PreIncUintptr(&p, 56) < pEnd { + if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { + Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + } + } + return + } + for __ccgo1 := true; __ccgo1; __ccgo1 = libc.PreIncUintptr(&p, 56) < pEnd { + + // This block is really an inlined version of sqlite3VdbeMemRelease() + // that takes advantage of the fact that the memory cell value is + // being set to NULL after releasing any dynamic resources. + // + // The justification for duplicating code is that according to + // callgrind, this causes a certain test case to hit the CPU 4.7 + // percent less (x86 linux, gcc version 4.1.2, -O6) than if + // sqlite3MemRelease() were called from here. With -O2, this jumps + // to 6.6 percent. The test case is inserting 1000 rows into a table + // with no indexes using a single prepared INSERT statement, bind() + // and reset(). Inserts are grouped into a transaction. + + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { + + Xsqlite3VdbeMemRelease(tls, p) + } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { + Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 + } + + (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) + } + } +} + +// This is a destructor on a Mem object (which is really an sqlite3_value) +// that deletes the Frame object that is attached to it as a blob. +// +// This routine does not delete the Frame right away. It merely adds the +// frame to a list of frames to be deleted when the Vdbe halts. +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ + var pFrame uintptr = pArg + + (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame + (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame = pFrame +} + +// Locate the next opcode to be displayed in EXPLAIN or EXPLAIN +// QUERY PLAN output. +// +// Return SQLITE_ROW on success. Return SQLITE_DONE if there are no +// more opcodes to be displayed. +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ + var nRow int32 // Stop when row count reaches this + var nSub int32 = 0 // Number of sub-vdbes seen so far + var apSub uintptr = uintptr(0) // Array of sub-vdbes + var i int32 // Next instruction address + var rc int32 = SQLITE_OK // Result code + var aOp uintptr = uintptr(0) // Opcode array + var iPc int32 // Rowid. Copy of value in *piPc + + // When the number of output rows reaches nRow, that means the + // listing has finished and sqlite3_step() should return SQLITE_DONE. + // nRow is the sum of the number of rows in the main program, plus + // the sum of the number of rows in all trigger subprograms encountered + // so far. The nRow value will increase as new trigger subprograms are + // encountered, but p->pc will eventually catch up to nRow. + nRow = (*Vdbe)(unsafe.Pointer(p)).FnOp + if pSub != uintptr(0) { + if int32((*Mem)(unsafe.Pointer(pSub)).Fflags)&MEM_Blob != 0 { + // pSub is initiallly NULL. It is initialized to a BLOB by + // the P4_SUBPROGRAM processing logic below + nSub = int32(uint64((*Mem)(unsafe.Pointer(pSub)).Fn) / uint64(unsafe.Sizeof(uintptr(0)))) + apSub = (*Mem)(unsafe.Pointer(pSub)).Fz + } + for i = 0; i < nSub; i++ { + nRow = nRow + (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(i)*8)))).FnOp + } + } + iPc = *(*int32)(unsafe.Pointer(piPc)) + for 1 != 0 { // Loop exits via break + i = libc.PostIncInt32(&iPc, 1) + if i >= nRow { + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK + rc = SQLITE_DONE + break + } + if i < (*Vdbe)(unsafe.Pointer(p)).FnOp { + // The rowid is small enough that we are still in the + // main program. + aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + } else { + // We are currently listing subprograms. Figure out which one and + // pick up the appropriate opcode. + var j int32 + i = i - (*Vdbe)(unsafe.Pointer(p)).FnOp + + for j = 0; i >= (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)))).FnOp; j++ { + i = i - (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)))).FnOp + + } + aOp = (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)))).FaOp + } + + // When an OP_Program opcode is encounter (the only opcode that has + // a P4_SUBPROGRAM argument), expand the size of the array of subprograms + // kept in p->aMem[9].z to hold the new program - assuming this subprogram + // has not already been seen. + if pSub != uintptr(0) && int32((*Op)(unsafe.Pointer(aOp+uintptr(i)*24)).Fp4type) == -4 { + var nByte int32 = int32(uint64(nSub+1) * uint64(unsafe.Sizeof(uintptr(0)))) + var j int32 + for j = 0; j < nSub; j++ { + if *(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)) == *(*uintptr)(unsafe.Pointer(aOp + uintptr(i)*24 + 16)) { + break + } + } + if j == nSub { + (*Vdbe)(unsafe.Pointer(p)).Frc = Xsqlite3VdbeMemGrow(tls, pSub, nByte, libc.Bool32(nSub != 0)) + if (*Vdbe)(unsafe.Pointer(p)).Frc != SQLITE_OK { + rc = SQLITE_ERROR + break + } + apSub = (*Mem)(unsafe.Pointer(pSub)).Fz + *(*uintptr)(unsafe.Pointer(apSub + uintptr(libc.PostIncInt32(&nSub, 1))*8)) = *(*uintptr)(unsafe.Pointer(aOp + uintptr(i)*24 + 16)) + (*Mem)(unsafe.Pointer(pSub)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pSub)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Blob) + (*Mem)(unsafe.Pointer(pSub)).Fn = int32(uint64(nSub) * uint64(unsafe.Sizeof(uintptr(0)))) + nRow = nRow + (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aOp + uintptr(i)*24 + 16)))).FnOp + } + } + if eMode == 0 { + break + } + { + + if int32((*Op)(unsafe.Pointer(aOp+uintptr(i)*24)).Fopcode) == OP_Explain { + break + } + if int32((*Op)(unsafe.Pointer(aOp+uintptr(i)*24)).Fopcode) == OP_Init && iPc > 1 { + break + } + + } + } + *(*int32)(unsafe.Pointer(piPc)) = iPc + *(*int32)(unsafe.Pointer(piAddr)) = i + *(*uintptr)(unsafe.Pointer(paOp)) = aOp + return rc +} + +// Delete a VdbeFrame object and its contents. VdbeFrame objects are +// allocated by the OP_Program opcode in sqlite3VdbeExec(). +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ + var i int32 + var aMem uintptr = p + 120 + var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 + + for i = 0; i < (*VdbeFrame)(unsafe.Pointer(p)).FnChildCsr; i++ { + Xsqlite3VdbeFreeCursor(tls, (*VdbeFrame)(unsafe.Pointer(p)).Fv, *(*uintptr)(unsafe.Pointer(apCsr + uintptr(i)*8))) + } + releaseMemArray(tls, aMem, (*VdbeFrame)(unsafe.Pointer(p)).FnChildMem) + Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(p)).Fv)).Fdb, p+72, -1, 0) + Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(p)).Fv)).Fdb, p) +} + +// Give a listing of the program in the virtual machine. +// +// The interface is the same as sqlite3VdbeExec(). But instead of +// running the code, it invokes the callback once for each instruction. +// This feature is used to implement "EXPLAIN". +// +// When p->explain==1, each instruction is listed. When +// p->explain==2, only OP_Explain instructions are listed and these +// are shown in a different format. p->explain==2 is used to implement +// EXPLAIN QUERY PLAN. +// 2018-04-24: In p->explain==2 mode, the OP_Init opcodes of triggers +// are also shown, so that the boundaries between the main program and +// each trigger are clear. +// +// When p->explain==1, first the main program is listed, then each of +// the trigger subprograms are listed one by one. +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pSub uintptr = uintptr(0) // Memory cell hold array of subprogs + var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb // The database connection + // var i int32 at bp, 4 + // Loop counter + var rc int32 = SQLITE_OK // Return code + var pMem uintptr = (*Vdbe)(unsafe.Pointer(p)).FaMem + 1*56 // First Mem of result set + var bListSubprogs int32 = libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2) == 1 || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TriggerEQP) != uint64(0)) + // var aOp uintptr at bp+8, 8 + // Array of opcodes + var pOp uintptr // Current opcode + + // Even though this opcode does not use dynamic strings for + // the result, result columns may become dynamic if the user calls + // sqlite3_column_text16(), causing a translation to UTF-16 encoding. + releaseMemArray(tls, pMem, 8) + (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) + + if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_NOMEM { + // This happens if a malloc() inside a call to sqlite3_column_text() or + // sqlite3_column_text16() failed. + Xsqlite3OomFault(tls, db) + return SQLITE_ERROR + } + + if bListSubprogs != 0 { + // The first 8 memory cells are used for the result set. So we will + // commandeer the 9th cell to use as storage for an array of pointers + // to trigger subprograms. The VDBE is guaranteed to have at least 9 + // cells. + + pSub = (*Vdbe)(unsafe.Pointer(p)).FaMem + 9*56 + } else { + pSub = uintptr(0) + } + + // Figure out which opcode is next to display + rc = Xsqlite3VdbeNextOpcode(tls, p, pSub, libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2) == 2), p+52, bp, bp+8) + + if rc == SQLITE_OK { + pOp = *(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(*(*int32)(unsafe.Pointer(bp)))*24 + if libc.AtomicLoadNInt32(db+432, 0) != 0 { + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_INTERRUPT + rc = SQLITE_ERROR + Xsqlite3VdbeError(tls, p, Xsqlite3ErrStr(tls, (*Vdbe)(unsafe.Pointer(p)).Frc), 0) + } else { + var zP4 uintptr = Xsqlite3VdbeDisplayP4(tls, db, pOp) + if int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2) == 2 { + Xsqlite3VdbeMemSetInt64(tls, pMem, int64((*Op)(unsafe.Pointer(pOp)).Fp1)) + Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(1)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp2)) + Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(2)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp3)) + Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(3)*56, zP4, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + (*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(4) + } else { + Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(0)*56, int64(*(*int32)(unsafe.Pointer(bp /* i */)))) + Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(1)*56, Xsqlite3OpcodeName(tls, int32((*Op)(unsafe.Pointer(pOp)).Fopcode)), + int64(-1), uint8(SQLITE_UTF8), uintptr(0)) + Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(2)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp1)) + Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(3)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp2)) + Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(4)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp3)) + // pMem+5 for p4 is done last + Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(6)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp5)) + Xsqlite3VdbeMemSetNull(tls, pMem+uintptr(7)*56) + Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(5)*56, zP4, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + (*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(8) + } + (*Vdbe)(unsafe.Pointer(p)).FpResultSet = pMem + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + rc = SQLITE_ERROR + } else { + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK + rc = SQLITE_ROW + } + } + } + return rc +} + +// An instance of this object describes bulk memory available for use +// by subcomponents of a prepared statement. Space is allocated out +// of a ReusableSpace object by the allocSpace() routine below. +type ReusableSpace = struct { + FpSpace uintptr + FnFree Sqlite3_int64 + FnNeeded Sqlite3_int64 +} /* sqlite3.c:82028:1 */ + +// Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf +// from the ReusableSpace object. Return a pointer to the allocated +// memory on success. If insufficient memory is available in the +// ReusableSpace object, increase the ReusableSpace.nNeeded +// value by the amount needed and return NULL. +// +// If pBuf is not initially NULL, that means that the memory has already +// been allocated by a prior call to this routine, so just return a copy +// of pBuf and leave ReusableSpace unchanged. +// +// This allocator is employed to repurpose unused slots at the end of the +// opcode array of prepared state for other memory needs of the prepared +// statement. +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ + + if pBuf == uintptr(0) { + nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) + if nByte <= (*ReusableSpace)(unsafe.Pointer(p)).FnFree { + *(*Sqlite3_int64)(unsafe.Pointer(p + 8)) -= nByte + pBuf = (*ReusableSpace)(unsafe.Pointer(p)).FpSpace + uintptr((*ReusableSpace)(unsafe.Pointer(p)).FnFree) + } else { + *(*Sqlite3_int64)(unsafe.Pointer(p + 16)) += nByte + } + } + + return pBuf +} + +// Rewind the VDBE back to the beginning in preparation for +// running it. +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ + + // There should be at least one opcode. + + // Set the magic to VDBE_MAGIC_RUN sooner rather than later. + (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_RUN) + + (*Vdbe)(unsafe.Pointer(p)).Fpc = -1 + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK + (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + (*Vdbe)(unsafe.Pointer(p)).FcacheCtr = U32(1) + (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = U8(255) + (*Vdbe)(unsafe.Pointer(p)).FiStatement = 0 + (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint = int64(0) +} + +// Prepare a virtual machine for execution for the first time after +// creating the virtual machine. This involves things such +// as allocating registers and initializing the program counter. +// After the VDBE has be prepped, it can be executed by one or more +// calls to sqlite3VdbeExec(). +// +// This function may be called exactly once on each virtual machine. +// After this routine is called the VM has been "packaged" and is ready +// to run. After this routine is called, further calls to +// sqlite3VdbeAddOp() functions are prohibited. This routine disconnects +// the Vdbe from the Parse object that helped generate it so that the +// the Vdbe becomes an independent entity and the Parse object can be +// destroyed. +// +// Use the sqlite3VdbeRewind() procedure to restore a virtual machine back +// to its initial state after it has been run. +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var db uintptr // The database connection + var nVar int32 // Number of parameters + var nMem int32 // Number of VM memory registers + var nCursor int32 // Number of cursors required + // var nArg int32 at bp, 4 + // Number of arguments in subprograms + var n int32 // Loop counter + // var x ReusableSpace at bp+8, 24 + // Reusable bulk memory + + (*Vdbe)(unsafe.Pointer(p)).FpVList = (*Parse)(unsafe.Pointer(pParse)).FpVList + (*Parse)(unsafe.Pointer(pParse)).FpVList = uintptr(0) + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + + nVar = int32((*Parse)(unsafe.Pointer(pParse)).FnVar) + nMem = (*Parse)(unsafe.Pointer(pParse)).FnMem + nCursor = (*Parse)(unsafe.Pointer(pParse)).FnTab + *(*int32)(unsafe.Pointer(bp /* nArg */)) = (*Parse)(unsafe.Pointer(pParse)).FnMaxArg + + // Each cursor uses a memory cell. The first cursor (cursor 0) can + // use aMem[0] which is not otherwise used by the VDBE program. Allocate + // space at the end of aMem[] for cursors 1 and greater. + // See also: allocateCursor(). + nMem = nMem + nCursor + if nCursor == 0 && nMem > 0 { + nMem++ + } // Space for aMem[0] even if not used + + // Figure out how much reusable memory is available at the end of the + // opcode array. This extra memory will be reallocated for other elements + // of the prepared statement. + n = int32((uint64(unsafe.Sizeof(Op{}))*uint64((*Vdbe)(unsafe.Pointer(p)).FnOp) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) // Bytes of opcode memory used + (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FpSpace = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(n) // Unused opcode memory + + (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnFree = Sqlite3_int64(((*Parse)(unsafe.Pointer(pParse)).FszOpAlloc - n) & libc.CplInt32(7)) // Bytes of unused memory + + resolveP2Values(tls, p, bp) + libc.SetBitFieldPtr16Uint32(p+208, Bft(U8(libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite != 0 && (*Parse)(unsafe.Pointer(pParse)).FmayAbort != 0))), 6, 0x40) + if (*Parse)(unsafe.Pointer(pParse)).Fexplain != 0 { + var iFirst int32 + var mx int32 + var i int32 + if nMem < 10 { + nMem = 10 + } + libc.SetBitFieldPtr16Uint32(p+208, Bft((*Parse)(unsafe.Pointer(pParse)).Fexplain), 2, 0xc) + if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { + Xsqlite3VdbeSetNumCols(tls, p, 4) + iFirst = 8 + mx = 12 + } else { + Xsqlite3VdbeSetNumCols(tls, p, 8) + iFirst = 0 + mx = 8 + } + for i = iFirst; i < mx; i++ { + Xsqlite3VdbeSetColName(tls, p, i-iFirst, COLNAME_NAME, + azColName[i], uintptr(0)) + } + } + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) + + // Memory for registers, parameters, cursor, etc, is allocated in one or two + // passes. On the first pass, we try to reuse unused memory at the + // end of the opcode array. If we are unable to satisfy all memory + // requirements by reusing the opcode array tail, then the second + // pass will fill in the remainder using a fresh memory allocation. + // + // This two-pass approach that reuses as much memory as possible from + // the leftover memory at the end of the opcode array. This can significantly + // reduce the amount of memory held by a prepared statement. + (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnNeeded = int64(0) + (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+8, uintptr(0), int64(uint64(nMem)*uint64(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+8, uintptr(0), int64(uint64(nVar)*uint64(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+8, uintptr(0), int64(uint64(*(*int32)(unsafe.Pointer(bp)))*uint64(unsafe.Sizeof(uintptr(0))))) + (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+8, uintptr(0), int64(uint64(nCursor)*uint64(unsafe.Sizeof(uintptr(0))))) + if (*ReusableSpace)(unsafe.Pointer(bp+8)).FnNeeded != 0 { + (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FpSpace = libc.AssignPtrUintptr(p+264, Xsqlite3DbMallocRawNN(tls, db, uint64((*ReusableSpace)(unsafe.Pointer(bp+8 /* &x */)).FnNeeded))) + (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnFree = (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnNeeded + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FaMem, int64(uint64(nMem)*uint64(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FaVar, int64(uint64(nVar)*uint64(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FapArg, int64(uint64(*(*int32)(unsafe.Pointer(bp)))*uint64(unsafe.Sizeof(uintptr(0))))) + (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FapCsr, int64(uint64(nCursor)*uint64(unsafe.Sizeof(uintptr(0))))) + } + } + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*Vdbe)(unsafe.Pointer(p)).FnVar = int16(0) + (*Vdbe)(unsafe.Pointer(p)).FnCursor = 0 + (*Vdbe)(unsafe.Pointer(p)).FnMem = 0 + } else { + (*Vdbe)(unsafe.Pointer(p)).FnCursor = nCursor + (*Vdbe)(unsafe.Pointer(p)).FnVar = YnVar(nVar) + initMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, nVar, db, uint16(MEM_Null)) + (*Vdbe)(unsafe.Pointer(p)).FnMem = nMem + initMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaMem, nMem, db, uint16(MEM_Undefined)) + libc.Xmemset(tls, (*Vdbe)(unsafe.Pointer(p)).FapCsr, 0, uint64(nCursor)*uint64(unsafe.Sizeof(uintptr(0)))) + } + Xsqlite3VdbeRewind(tls, p) +} + +var azColName = [12]uintptr{ + ts + 4964, ts + 4969, ts + 4976, ts + 4979, ts + 4982, ts + 4985, ts + 4988, ts + 4991, + ts + 4999, ts + 5002, ts + 5009, ts + 5017, +} /* sqlite3.c:82172:23 */ + +// Close a VDBE cursor and release all the resources that cursor +// happens to hold. +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ + if pCx == uintptr(0) { + return + } + switch int32((*VdbeCursor)(unsafe.Pointer(pCx)).FeCurType) { + case CURTYPE_SORTER: + { + Xsqlite3VdbeSorterClose(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, pCx) + break + + } + case CURTYPE_BTREE: + { + + Xsqlite3BtreeCloseCursor(tls, *(*uintptr)(unsafe.Pointer(pCx + 48))) + break + + } + case CURTYPE_VTAB: + { + var pVCur uintptr = *(*uintptr)(unsafe.Pointer(pCx + 48)) + var pModule uintptr = (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur)).FpVtab)).FpModule + + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur)).FpVtab)).FnRef-- + (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxClose})).f(tls, pVCur) + break + + } + } +} + +// Close all cursors in the current frame. +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ + if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { + var i int32 + for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { + var pC uintptr = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(i)*8)) + if pC != 0 { + Xsqlite3VdbeFreeCursor(tls, p, pC) + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(i)*8)) = uintptr(0) + } + } + } +} + +// Copy the values stored in the VdbeFrame structure to its Vdbe. This +// is used, for example, when a trigger sub-program is halted to restore +// control to the main program. +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ + var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv + closeCursorsInFrame(tls, v) + (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp + (*Vdbe)(unsafe.Pointer(v)).FnOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnOp + (*Vdbe)(unsafe.Pointer(v)).FaMem = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaMem + (*Vdbe)(unsafe.Pointer(v)).FnMem = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnMem + (*Vdbe)(unsafe.Pointer(v)).FapCsr = (*VdbeFrame)(unsafe.Pointer(pFrame)).FapCsr + (*Vdbe)(unsafe.Pointer(v)).FnCursor = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnCursor + (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).Fdb)).FlastRowid = (*VdbeFrame)(unsafe.Pointer(pFrame)).FlastRowid + (*Vdbe)(unsafe.Pointer(v)).FnChange = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnChange + (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).Fdb)).FnChange = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnDbChange + Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer(v)).Fdb, v+304, -1, 0) + (*Vdbe)(unsafe.Pointer(v)).FpAuxData = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpAuxData + (*VdbeFrame)(unsafe.Pointer(pFrame)).FpAuxData = uintptr(0) + return (*VdbeFrame)(unsafe.Pointer(pFrame)).Fpc +} + +// Close all cursors. +// +// Also release any dynamic memory held by the VM in the Vdbe.aMem memory +// cell array. This is necessary as the memory cell array may contain +// pointers to VdbeFrame objects, which may in turn contain pointers to +// open cursors. +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ + if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { + var pFrame uintptr + for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { + } + Xsqlite3VdbeFrameRestore(tls, pFrame) + (*Vdbe)(unsafe.Pointer(p)).FpFrame = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FnFrame = 0 + } + + closeCursorsInFrame(tls, p) + if (*Vdbe)(unsafe.Pointer(p)).FaMem != 0 { + releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaMem, (*Vdbe)(unsafe.Pointer(p)).FnMem) + } + for (*Vdbe)(unsafe.Pointer(p)).FpDelFrame != 0 { + var pDel uintptr = (*Vdbe)(unsafe.Pointer(p)).FpDelFrame + (*Vdbe)(unsafe.Pointer(p)).FpDelFrame = (*VdbeFrame)(unsafe.Pointer(pDel)).FpParent + Xsqlite3VdbeFrameDelete(tls, pDel) + } + + // Delete any auxdata allocations made by the VM + if (*Vdbe)(unsafe.Pointer(p)).FpAuxData != 0 { + Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, p+304, -1, 0) + } + +} + +// Set the number of result columns that will be returned by this SQL +// statement. This is now set at compile time, rather than during +// execution of the vdbe program so that sqlite3_column_count() can +// be called on an SQL statement before sqlite3_step(). +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ + var n int32 + var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb + + if (*Vdbe)(unsafe.Pointer(p)).FnResColumn != 0 { + releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + } + n = nResColumn * COLNAME_N + (*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(nResColumn) + (*Vdbe)(unsafe.Pointer(p)).FaColName = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Mem{}))*uint64(n))) + if (*Vdbe)(unsafe.Pointer(p)).FaColName == uintptr(0) { + return + } + initMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, n, db, uint16(MEM_Null)) +} + +// Set the name of the idx'th column to be returned by the SQL statement. +// zName must be a pointer to a nul terminated string. +// +// This call must be made after a call to sqlite3VdbeSetNumCols(). +// +// The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC +// or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed +// to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ + var rc int32 + var pColName uintptr + + if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { + + return SQLITE_NOMEM + } + + pColName = (*Vdbe)(unsafe.Pointer(p)).FaColName + uintptr(idx+var1*int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn))*56 + rc = Xsqlite3VdbeMemSetStr(tls, pColName, zName, int64(-1), uint8(SQLITE_UTF8), xDel) + + return rc +} + +// A read or write transaction may or may not be active on database handle +// db. If a transaction is active, commit it. If there is a +// write-transaction spanning more than one database file, this routine +// takes care of the super-journal trickery. +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + var i int32 + var nTrans int32 = 0 // Number of databases with an active write-transaction + // that are candidates for a two-phase commit using a + // super-journal + var rc int32 = SQLITE_OK + var needXcommit int32 = 0 + + // Before doing anything else, call the xSync() callback for any + // virtual module tables written in this transaction. This has to + // be done before determining whether a super-journal file is + // required, as an xSync() callback may add an attached database + // to the transaction. + rc = Xsqlite3VtabSync(tls, db, p) + + // This loop determines (a) if the commit hook should be invoked and + // (b) how many database files have open write transactions, not + // including the temp database. (b) is important because if more than + // one database file has an open write transaction, a super-journal + // file is required for an atomic commit. + for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if Xsqlite3BtreeTxnState(tls, pBt) == SQLITE_TXN_WRITE { + var pPager uintptr // Pager associated with pBt + needXcommit = 1 + Xsqlite3BtreeEnter(tls, pBt) + pPager = Xsqlite3BtreePager(tls, pBt) + if int32((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).Fsafety_level) != PAGER_SYNCHRONOUS_OFF && + aMJNeeded[Xsqlite3PagerGetJournalMode(tls, pPager)] != 0 && + Xsqlite3PagerIsMemdb(tls, pPager) == 0 { + + nTrans++ + } + rc = Xsqlite3PagerExclusiveLock(tls, pPager) + Xsqlite3BtreeLeave(tls, pBt) + } + } + if rc != SQLITE_OK { + return rc + } + + // If there are any write-transactions at all, invoke the commit hook + if needXcommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FxCommitCallback != 0 { + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCommitCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCommitArg) + if rc != 0 { + return SQLITE_CONSTRAINT | int32(2)<<8 + } + } + + // The simple case - no more than one database file (not counting the + // TEMP database) has a transaction active. There is no need for the + // super-journal. + // + // If the return value of sqlite3BtreeGetFilename() is a zero length + // string, it means the main database is :memory: or a temp file. In + // that case we do not support atomic multi-file commits, so use the + // simple case then too. + if 0 == Xsqlite3Strlen30(tls, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt)) || + nTrans <= 1 { + for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + rc = Xsqlite3BtreeCommitPhaseOne(tls, pBt, uintptr(0)) + } + } + + // Do the commit only if all databases successfully complete phase 1. + // If one of the BtreeCommitPhaseOne() calls fails, this indicates an + // IO error while deleting or truncating a journal file. It is unlikely, + // but could happen. In this case abandon processing and return the error. + for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + rc = Xsqlite3BtreeCommitPhaseTwo(tls, pBt, 0) + } + } + if rc == SQLITE_OK { + Xsqlite3VtabCommit(tls, db) + } + } else { + var pVfs uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpVfs + var zSuper uintptr = uintptr(0) // File-name for the super-journal + var zMainFile uintptr = Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */)) = uintptr(0) + var offset I64 = int64(0) + // var res int32 at bp+60, 4 + + var retryCount int32 = 0 + var nMainFile int32 + + // Select a super-journal file name + nMainFile = Xsqlite3Strlen30(tls, zMainFile) + zSuper = Xsqlite3MPrintf(tls, db, ts+5024, libc.VaList(bp, 0, zMainFile, 0)) + if zSuper == uintptr(0) { + return SQLITE_NOMEM + } + zSuper += uintptr(4) + for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { + // var iRandom U32 at bp+56, 4 + + if retryCount != 0 { + if retryCount > 100 { + Xsqlite3_log(tls, SQLITE_FULL, ts+5036, libc.VaList(bp+24, zSuper)) + Xsqlite3OsDelete(tls, pVfs, zSuper, 0) + break + } else if retryCount == 1 { + Xsqlite3_log(tls, SQLITE_FULL, ts+5050, libc.VaList(bp+32, zSuper)) + } + } + retryCount++ + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5065, + libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) + // The antipenultimate character of the super-journal name must + // be "9" to avoid name collisions when using 8+3 filenames. + + rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) + } + if rc == SQLITE_OK { + // Open the super-journal. + rc = Xsqlite3OsOpenMalloc(tls, pVfs, zSuper, bp+64, + SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_SUPER_JOURNAL, uintptr(0)) + } + if rc != SQLITE_OK { + Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) + return rc + } + + // Write the name of each database file in the transaction into the new + // super-journal file. If an error occurs at this point close + // and delete the super-journal file. All the individual journal files + // still have 'null' as the super-journal pointer, so they will roll + // back independently if a failure occurs. + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if Xsqlite3BtreeTxnState(tls, pBt) == SQLITE_TXN_WRITE { + var zFile uintptr = Xsqlite3BtreeGetJournalname(tls, pBt) + if zFile == uintptr(0) { + continue // Ignore TEMP and :memory: databases + } + + rc = Xsqlite3OsWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */)), zFile, Xsqlite3Strlen30(tls, zFile)+1, offset) + offset = offset + I64(Xsqlite3Strlen30(tls, zFile)+1) + if rc != SQLITE_OK { + Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) + Xsqlite3OsDelete(tls, pVfs, zSuper, 0) + Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) + return rc + } + } + } + + // Sync the super-journal file. If the IOCAP_SEQUENTIAL device + // flag is set this is not required. + if 0 == Xsqlite3OsDeviceCharacteristics(tls, *(*uintptr)(unsafe.Pointer(bp + 64)))&SQLITE_IOCAP_SEQUENTIAL && + SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsSync(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), SQLITE_SYNC_NORMAL)) { + Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) + Xsqlite3OsDelete(tls, pVfs, zSuper, 0) + Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) + return rc + } + + // Sync all the db files involved in the transaction. The same call + // sets the super-journal pointer in each individual journal. If + // an error occurs here, do not delete the super-journal file. + // + // If the error occurs during the first call to + // sqlite3BtreeCommitPhaseOne(), then there is a chance that the + // super-journal file will be orphaned. But we cannot delete it, + // in case the super-journal file name was written into the journal + // file before the failure occurred. + for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + rc = Xsqlite3BtreeCommitPhaseOne(tls, pBt, zSuper) + } + } + Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) + + if rc != SQLITE_OK { + Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) + return rc + } + + // Delete the super-journal file. This commits the transaction. After + // doing this the directory is synced again before any individual + // transaction files are deleted. + rc = Xsqlite3OsDelete(tls, pVfs, zSuper, 1) + Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) + zSuper = uintptr(0) + if rc != 0 { + return rc + } + + // All files and directories have already been synced, so the following + // calls to sqlite3BtreeCommitPhaseTwo() are only closing files and + // deleting or truncating journals. If something goes wrong while + // this is happening we don't really care. The integrity of the + // transaction is already guaranteed, but some stray 'cold' journals + // may be lying around. Returning an error code won't help matters. + + Xsqlite3BeginBenignMalloc(tls) + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + Xsqlite3BtreeCommitPhaseTwo(tls, pBt, 1) + } + } + Xsqlite3EndBenignMalloc(tls) + + Xsqlite3VtabCommit(tls, db) + } + + return rc +} + +var aMJNeeded = [6]U8{ + /* DELETE */ U8(1), + /* PERSIST */ U8(1), + /* OFF */ U8(0), + /* TRUNCATE */ U8(1), + /* MEMORY */ U8(0), + /* WAL */ U8(0), +} /* sqlite3.c:82444:23 */ + +// This routine checks that the sqlite3.nVdbeActive count variable +// matches the number of vdbe's in the list sqlite3.pVdbe that are +// currently active. An assertion fails if the two counts do not match. +// This is an internal self-check only - it is not an essential processing +// step. +// +// This is a no-op if NDEBUG is defined. + +// If the Vdbe passed as the first argument opened a statement-transaction, +// close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or +// SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement +// transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the +// statement transaction is committed. +// +// If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. +// Otherwise SQLITE_OK. +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ + var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb + var rc int32 = SQLITE_OK + var i int32 + var iSavepoint int32 = (*Vdbe)(unsafe.Pointer(p)).FiStatement - 1 + + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var rc2 int32 = SQLITE_OK + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + if eOp == SAVEPOINT_ROLLBACK { + rc2 = Xsqlite3BtreeSavepoint(tls, pBt, SAVEPOINT_ROLLBACK, iSavepoint) + } + if rc2 == SQLITE_OK { + rc2 = Xsqlite3BtreeSavepoint(tls, pBt, SAVEPOINT_RELEASE, iSavepoint) + } + if rc == SQLITE_OK { + rc = rc2 + } + } + } + (*Sqlite3)(unsafe.Pointer(db)).FnStatement-- + (*Vdbe)(unsafe.Pointer(p)).FiStatement = 0 + + if rc == SQLITE_OK { + if eOp == SAVEPOINT_ROLLBACK { + rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_ROLLBACK, iSavepoint) + } + if rc == SQLITE_OK { + rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_RELEASE, iSavepoint) + } + } + + // If the statement transaction is being rolled back, also restore the + // database handles deferred constraint counter to the value it had when + // the statement transaction was opened. + if eOp == SAVEPOINT_ROLLBACK { + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons + } + return rc +} + +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ + if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { + return vdbeCloseStatement(tls, p, eOp) + } + return SQLITE_OK +} + +// This function is called when a transaction opened by the database +// handle associated with the VM passed as an argument is about to be +// committed. If there are outstanding deferred foreign key constraint +// violations, return SQLITE_ERROR. Otherwise, SQLITE_OK. +// +// If there are outstanding FK violations and this function returns +// SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY +// and write an error message to it. Then return SQLITE_ERROR. +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ + var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb + if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || + !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_CONSTRAINT | int32(3)<<8 + (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) + Xsqlite3VdbeError(tls, p, ts+5078, 0) + return SQLITE_ERROR + } + return SQLITE_OK +} + +// This routine is called the when a VDBE tries to halt. If the VDBE +// has made changes and is in autocommit mode, then commit those +// changes. If a rollback is needed, then do the rollback. +// +// This routine is the only way to move the sqlite3eOpenState of a VM from +// SQLITE_STATE_RUN to SQLITE_STATE_HALT. It is harmless to +// call this on a VM that is in the SQLITE_STATE_HALT state. +// +// Return an error code. If the commit could not complete because of +// lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it +// means the close did not happen and needs to be repeated. +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ + var rc int32 // Used to store transient return codes + var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb + + // This function contains the logic that determines if a statement or + // transaction will be committed or rolled back as a result of the + // execution of this virtual machine. + // + // If any of the following errors occur: + // + // SQLITE_NOMEM + // SQLITE_IOERR + // SQLITE_FULL + // SQLITE_INTERRUPT + // + // Then the internal cache might have been left in an inconsistent + // state. We need to rollback the statement transaction, if there is + // one, or the complete transaction if there is no statement transaction. + + if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) { + return SQLITE_OK + } + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } + closeAllCursors(tls, p) + + // No commit or rollback needed if the program never started or if the + // SQL statement does not read or write a database file. + if (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x100>>8)) != 0 { + var mrc int32 // Primary error code from p->rc + var eStatementOp int32 = 0 + var isSpecialError int32 // Set to true if a 'special' error + + // Lock all btrees used by the statement + Xsqlite3VdbeEnter(tls, p) + + // Check for one of the special errors + if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 { + mrc = (*Vdbe)(unsafe.Pointer(p)).Frc & 0xff + isSpecialError = libc.Bool32(mrc == SQLITE_NOMEM || + mrc == SQLITE_IOERR || + mrc == SQLITE_INTERRUPT || + mrc == SQLITE_FULL) + } else { + mrc = libc.AssignInt32(&isSpecialError, 0) + } + if isSpecialError != 0 { + // If the query was read-only and the error code is SQLITE_INTERRUPT, + // no rollback is necessary. Otherwise, at least a savepoint + // transaction must be rolled back to restore the database to a + // consistent state. + // + // Even if the statement is read-only, it is important to perform + // a statement or transaction rollback operation. If the error + // occurred while writing to the journal, sub-journal or database + // file as part of an effort to free up cache space (see function + // pagerStress() in pager.c), the rollback is required to restore + // the pager to a consistent state. + if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) != 0) || mrc != SQLITE_INTERRUPT { + if (mrc == SQLITE_NOMEM || mrc == SQLITE_FULL) && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 { + eStatementOp = SAVEPOINT_ROLLBACK + } else { + // We are forced to roll back the active transaction. Before doing + // so, abort any other statements this handle currently has active. + Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) + Xsqlite3CloseSavepoints(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + } + } + } + + // Check for immediate foreign key violations. + if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Fail && !(isSpecialError != 0) { + Xsqlite3VdbeCheckFk(tls, p, 0) + } + + // If the auto-commit flag is set and this is the only active writer + // VM, then we do either a commit or rollback of the current transaction. + // + // Note: This block also runs if one of the special errors handled + // above has occurred. + if !((*Sqlite3)(unsafe.Pointer(db)).FnVTrans > 0 && (*Sqlite3)(unsafe.Pointer(db)).FaVTrans == uintptr(0)) && + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 && + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite == libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) == 0) { + if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Fail && !(isSpecialError != 0) { + rc = Xsqlite3VdbeCheckFk(tls, p, 1) + if rc != SQLITE_OK { + if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7)) != 0 { + Xsqlite3VdbeLeave(tls, p) + return SQLITE_ERROR + } + rc = SQLITE_CONSTRAINT | int32(3)<<8 + } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00002))<<32) != 0 { + rc = SQLITE_CORRUPT + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(U64(uint64(0x00002)) << 32) + } else { + // The auto-commit flag is true, the vdbe program was successful + // or hit an 'OR FAIL' constraint and there are no deferred foreign + // key constraints to hold up the transaction. This means a commit + // is required. + rc = vdbeCommit(tls, db, p) + } + if rc == SQLITE_BUSY && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7)) != 0 { + Xsqlite3VdbeLeave(tls, p) + return SQLITE_BUSY + } else if rc != SQLITE_OK { + (*Vdbe)(unsafe.Pointer(p)).Frc = rc + Xsqlite3RollbackAll(tls, db, SQLITE_OK) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + } else { + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = int64(0) + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = int64(0) + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_DeferFKs)) + Xsqlite3CommitInternalChanges(tls, db) + } + } else { + Xsqlite3RollbackAll(tls, db, SQLITE_OK) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + } + (*Sqlite3)(unsafe.Pointer(db)).FnStatement = 0 + } else if eStatementOp == 0 { + if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Fail { + eStatementOp = SAVEPOINT_RELEASE + } else if int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Abort { + eStatementOp = SAVEPOINT_ROLLBACK + } else { + Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) + Xsqlite3CloseSavepoints(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + } + } + + // If eStatementOp is non-zero, then a statement transaction needs to + // be committed or rolled back. Call sqlite3VdbeCloseStatement() to + // do so. If this operation returns an error, and the current statement + // error code is SQLITE_OK or SQLITE_CONSTRAINT, then promote the + // current statement error code. + if eStatementOp != 0 { + rc = Xsqlite3VdbeCloseStatement(tls, p, eStatementOp) + if rc != 0 { + if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || (*Vdbe)(unsafe.Pointer(p)).Frc&0xff == SQLITE_CONSTRAINT { + (*Vdbe)(unsafe.Pointer(p)).Frc = rc + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = uintptr(0) + } + Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) + Xsqlite3CloseSavepoints(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + } + } + + // If this was an INSERT, UPDATE or DELETE and no statement transaction + // has been rolled back, update the database connection change-counter. + if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x10>>4)) != 0 { + if eStatementOp != SAVEPOINT_ROLLBACK { + Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) + } else { + Xsqlite3VdbeSetChanges(tls, db, int64(0)) + } + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + } + + // Release the locks + Xsqlite3VdbeLeave(tls, p) + } + + // We have successfully halted and closed the VM. Record this fact. + if (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive-- + if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) != 0) { + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite-- + } + if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x100>>8)) != 0 { + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead-- + } + + } + (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_HALT) + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } + + // If the auto-commit flag is set to true, then any locks that were held + // by connection db have now been released. Call sqlite3ConnectionUnlocked() + // to invoke any required unlock-notify callbacks. + if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { + Xsqlite3ConnectionUnlocked(tls, db) + } + + return func() int32 { + if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_BUSY { + return SQLITE_BUSY + } + return SQLITE_OK + }() +} + +// Each VDBE holds the result of the most recent sqlite3_step() call +// in p->rc. This routine sets that result back to SQLITE_OK. +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK +} + +// Copy the error code and error message belonging to the VDBE passed +// as the first argument to its database handle (so that they will be +// returned by calls to sqlite3_errcode() and sqlite3_errmsg()). +// +// This function does not clear the VDBE error code or message, just +// copies them to the database handle. +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ + var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb + var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc + if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { + (*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc++ + Xsqlite3BeginBenignMalloc(tls) + if (*Sqlite3)(unsafe.Pointer(db)).FpErr == uintptr(0) { + (*Sqlite3)(unsafe.Pointer(db)).FpErr = Xsqlite3ValueNew(tls, db) + } + Xsqlite3ValueSetStr(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr, -1, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) + Xsqlite3EndBenignMalloc(tls) + (*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc-- + } else if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { + Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + } + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = rc + (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 + return rc +} + +// Clean up a VDBE after execution but do not delete the VDBE just yet. +// Write any error messages into *pzErrMsg. Return the result code. +// +// After this routine is run, the VDBE should be ready to be executed +// again. +// +// To look at it another way, this routine resets the state of the +// virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to +// VDBE_MAGIC_INIT. +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var db uintptr + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + + // If the VM did not run to completion or if it encountered an + // error, then it might not have been halted properly. So halt + // it now. + Xsqlite3VdbeHalt(tls, p) + + // If the VDBE has been run even partially, then transfer the error code + // and error message from the VDBE into the main database structure. But + // if the VDBE has just been set to run but has not actually executed any + // instructions yet, leave the main database error information unchanged. + if (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { + + if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 || (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { + Xsqlite3VdbeTransferError(tls, p) + } else { + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = (*Vdbe)(unsafe.Pointer(p)).Frc + } + if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x20>>5)) != 0 { + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) + } + } else if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0 { + // The expired flag was set on the VDBE before the first call + // to sqlite3_step(). For consistency (since sqlite3_step() was + // called), set the database error in this case as well. + Xsqlite3ErrorWithMsg(tls, db, (*Vdbe)(unsafe.Pointer(p)).Frc, func() uintptr { + if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { + return ts + 3605 /* "%s" */ + } + return uintptr(0) + }(), libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + } + + // Reset register contents and reclaim error message memory. + if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = uintptr(0) + } + (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) + + // Save profiling information from this VDBE run. + (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_RESET) + return (*Vdbe)(unsafe.Pointer(p)).Frc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask +} + +// Clean up and delete a VDBE after execution. Return an integer which is +// the result code. Write any error message text into *pzErrMsg. +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ + var rc int32 = SQLITE_OK + if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { + rc = Xsqlite3VdbeReset(tls, p) + + } + Xsqlite3VdbeDelete(tls, p) + return rc +} + +// If parameter iOp is less than zero, then invoke the destructor for +// all auxiliary data pointers currently cached by the VM passed as +// the first argument. +// +// Or, if iOp is greater than or equal to zero, then the destructor is +// only invoked for those auxiliary data pointers created by the user +// function invoked by the OP_Function opcode at instruction iOp of +// VM pVdbe, and only then if: +// +// * the associated function parameter is the 32nd or later (counting +// from left to right), or +// +// * the corresponding bit in argument mask is clear (where the first +// function parameter corresponds to bit 0 etc.). +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ + for *(*uintptr)(unsafe.Pointer(pp)) != 0 { + var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) + if iOp < 0 || + (*AuxData)(unsafe.Pointer(pAux)).FiAuxOp == iOp && + (*AuxData)(unsafe.Pointer(pAux)).FiAuxArg >= 0 && + ((*AuxData)(unsafe.Pointer(pAux)).FiAuxArg > 31 || !(uint32(mask)&(uint32(uint32(1))<<(*AuxData)(unsafe.Pointer(pAux)).FiAuxArg) != 0)) { + + if (*AuxData)(unsafe.Pointer(pAux)).FxDeleteAux != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*AuxData)(unsafe.Pointer(pAux)).FxDeleteAux})).f(tls, (*AuxData)(unsafe.Pointer(pAux)).FpAux) + } + *(*uintptr)(unsafe.Pointer(pp)) = (*AuxData)(unsafe.Pointer(pAux)).FpNextAux + Xsqlite3DbFree(tls, db, pAux) + } else { + pp = pAux + 24 + } + } +} + +// Free all memory associated with the Vdbe passed as the second argument, +// except for object itself, which is preserved. +// +// The difference between this function and sqlite3VdbeDelete() is that +// VdbeDelete() also unlinks the Vdbe from the list of VMs associated with +// the database connection and frees the object itself. +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ + var pSub uintptr + var pNext uintptr + + releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) + for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { + pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext + vdbeFreeOpArray(tls, db, (*SubProgram)(unsafe.Pointer(pSub)).FaOp, (*SubProgram)(unsafe.Pointer(pSub)).FnOp) + Xsqlite3DbFree(tls, db, pSub) + } + if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_INIT) { + releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + } + vdbeFreeOpArray(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaOp, (*Vdbe)(unsafe.Pointer(p)).FnOp) + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) +} + +// Delete an entire VDBE. +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ + var db uintptr + + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + + Xsqlite3VdbeClearObject(tls, db, p) + if (*Vdbe)(unsafe.Pointer(p)).FpPrev != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpPrev)).FpNext = (*Vdbe)(unsafe.Pointer(p)).FpNext + } else { + + (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = (*Vdbe)(unsafe.Pointer(p)).FpNext + } + if (*Vdbe)(unsafe.Pointer(p)).FpNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpNext)).FpPrev = (*Vdbe)(unsafe.Pointer(p)).FpPrev + } + (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_DEAD) + (*Vdbe)(unsafe.Pointer(p)).Fdb = uintptr(0) + Xsqlite3DbFreeNN(tls, db, p) +} + +// The cursor "p" has a pending seek operation that has not yet been +// carried out. Seek the cursor now. If an error occurs, return +// the appropriate error code. +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var res int32 at bp, 4 + + var rc int32 + + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(p + 48)), (*VdbeCursor)(unsafe.Pointer(p)).FmovetoTarget, 0, bp) + if rc != 0 { + return rc + } + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return Xsqlite3CorruptError(tls, 83297) + } + (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) + return SQLITE_OK +} + +// Something has moved cursor "p" out of place. Maybe the row it was +// pointed to was deleted out from under it. Or maybe the btree was +// rebalanced. Whatever the cause, try to restore "p" to the place it +// is supposed to be pointing. If the row was deleted out from under the +// cursor, set the cursor to point to a NULL row. +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var isDifferentRow int32 at bp, 4 + + var rc int32 + + rc = Xsqlite3BtreeCursorRestore(tls, *(*uintptr)(unsafe.Pointer(p + 48)), bp) + (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) + if *(*int32)(unsafe.Pointer(bp)) != 0 { + (*VdbeCursor)(unsafe.Pointer(p)).FnullRow = U8(1) + } + return rc +} + +// Check to ensure that the cursor is valid. Restore the cursor +// if need be. Return any I/O error from the restore operation. +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ + + if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { + return handleMovedCursor(tls, p) + } + return SQLITE_OK +} + +// Make sure the cursor p is ready to read or write the row to which it +// was last positioned. Return an error code if an OOM fault or I/O error +// prevents us from positioning the cursor to its correct position. +// +// If a MoveTo operation is pending on the given cursor, then do that +// MoveTo now. If no move is pending, check to see if the row has been +// deleted out from under the cursor and if it has, mark the row as +// a NULL row. +// +// If the cursor is already pointing to the correct row and that row has +// not been deleted out from under the cursor, then this routine is a no-op. +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) + + if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { + var iMap U32 + + if *(*uintptr)(unsafe.Pointer(p + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 16)) + uintptr(U32(1)+*(*U32)(unsafe.Pointer(piCol)))*4))) > U32(0) && !(int32((*VdbeCursor)(unsafe.Pointer(p)).FnullRow) != 0) { + *(*uintptr)(unsafe.Pointer(pp)) = (*VdbeCursor)(unsafe.Pointer(p)).FpAltCursor + *(*U32)(unsafe.Pointer(piCol)) = iMap - U32(1) + return SQLITE_OK + } + return Xsqlite3VdbeFinishMoveto(tls, p) + } + if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { + return handleMovedCursor(tls, p) + } + return SQLITE_OK +} + +// The following functions: +// +// sqlite3VdbeSerialType() +// sqlite3VdbeSerialTypeLen() +// sqlite3VdbeSerialLen() +// sqlite3VdbeSerialPut() +// sqlite3VdbeSerialGet() +// +// encapsulate the code that serializes values for storage in SQLite +// data and index records. Each serialized value consists of a +// 'serial-type' and a blob of data. The serial type is an 8-byte unsigned +// integer, stored as a varint. +// +// In an SQLite index record, the serial type is stored directly before +// the blob of data that it corresponds to. In a table record, all serial +// types are stored at the start of the record, and the blobs of data at +// the end. Hence these functions allow the caller to handle the +// serial-type and data blob separately. +// +// The following table describes the various storage classes for data: +// +// serial type bytes of data type +// -------------- --------------- --------------- +// 0 0 NULL +// 1 1 signed integer +// 2 2 signed integer +// 3 3 signed integer +// 4 4 signed integer +// 5 6 signed integer +// 6 8 signed integer +// 7 8 IEEE float +// 8 0 Integer constant 0 +// 9 0 Integer constant 1 +// 10,11 reserved for expansion +// N>=12 and even (N-12)/2 BLOB +// N>=13 and odd (N-13)/2 text +// +// The 8 and 9 types were added in 3.3.0, file format 4. Prior versions +// of SQLite will not understand those serial types. + +// The sizes for serial types less than 128 +var sqlite3SmallTypeSizes = [128]U8{ + // 0 1 2 3 4 5 6 7 8 9 + /* 0 */ U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(8), U8(0), U8(0), + /* 10 */ U8(0), U8(0), U8(0), U8(0), U8(1), U8(1), U8(2), U8(2), U8(3), U8(3), + /* 20 */ U8(4), U8(4), U8(5), U8(5), U8(6), U8(6), U8(7), U8(7), U8(8), U8(8), + /* 30 */ U8(9), U8(9), U8(10), U8(10), U8(11), U8(11), U8(12), U8(12), U8(13), U8(13), + /* 40 */ U8(14), U8(14), U8(15), U8(15), U8(16), U8(16), U8(17), U8(17), U8(18), U8(18), + /* 50 */ U8(19), U8(19), U8(20), U8(20), U8(21), U8(21), U8(22), U8(22), U8(23), U8(23), + /* 60 */ U8(24), U8(24), U8(25), U8(25), U8(26), U8(26), U8(27), U8(27), U8(28), U8(28), + /* 70 */ U8(29), U8(29), U8(30), U8(30), U8(31), U8(31), U8(32), U8(32), U8(33), U8(33), + /* 80 */ U8(34), U8(34), U8(35), U8(35), U8(36), U8(36), U8(37), U8(37), U8(38), U8(38), + /* 90 */ U8(39), U8(39), U8(40), U8(40), U8(41), U8(41), U8(42), U8(42), U8(43), U8(43), + /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), + /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), + /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), +} /* sqlite3.c:83486:17 */ + +// Return the length of the data corresponding to the supplied serial-type. +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ + if serial_type >= U32(128) { + return (serial_type - U32(12)) / U32(2) + } else { + + return U32(sqlite3SmallTypeSizes[serial_type]) + } + return U32(0) +} + +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ + + return sqlite3SmallTypeSizes[serial_type] +} + +// If we are on an architecture with mixed-endian floating +// points (ex: ARM7) then swap the lower 4 bytes with the +// upper 4 bytes. Return the result. +// +// For most architectures, this is a no-op. +// +// (later): It is reported to me that the mixed-endian problem +// on ARM7 is an issue with GCC, not with the ARM7 chip. It seems +// that early versions of GCC stored the two words of a 64-bit +// float in the wrong order. And that error has been propagated +// ever since. The blame is not necessarily with GCC, though. +// GCC might have just copying the problem from a prior compiler. +// I am also told that newer versions of GCC that follow a different +// ABI get the byte order right. +// +// Developers using SQLite on an ARM7 should compile and run their +// application using -DSQLITE_DEBUG=1 at least once. With DEBUG +// enabled, some asserts below will ensure that the byte order of +// floating point values is correct. +// +// (2007-08-30) Frank van Vugt has studied this problem closely +// and has send his findings to the SQLite developers. Frank +// writes that some Linux kernels offer floating point hardware +// emulation that uses only 32-bit mantissas instead of a full +// 48-bits as required by the IEEE standard. (This is the +// CONFIG_FPE_FASTFPE option.) On such systems, floating point +// byte swapping becomes very complicated. To avoid problems, +// the necessary byte swapping is carried out using a 64-bit integer +// rather than a 64-bit float. Frank assures us that the code here +// works for him. We, the developers, have no way to independently +// verify this, but Frank seems to know what he is talking about +// so we trust him. + +// Write the serialized data blob for the value stored in pMem into +// buf. It is assumed that the caller has allocated sufficient space. +// Return the number of bytes written. +// +// nBuf is the amount of space left in buf[]. The caller is responsible +// for allocating enough space to buf[] to hold the entire field, exclusive +// of the pMem->u.nZero bytes for a MEM_Zero value. +// +// Return the number of bytes actually written into buf[]. The number +// of bytes in the zero-filled tail is included in the return value only +// if those bytes were zeroed in buf[]. +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var len U32 + + // Integer and Real + if serial_type <= U32(7) && serial_type > U32(0) { + // var v U64 at bp, 8 + + var i U32 + if serial_type == U32(7) { + + libc.Xmemcpy(tls, bp, pMem, uint64(unsafe.Sizeof(U64(0)))) + + } else { + *(*U64)(unsafe.Pointer(bp /* v */)) = U64(*(*I64)(unsafe.Pointer(pMem))) + } + len = libc.AssignUint32(&i, U32(sqlite3SmallTypeSizes[serial_type])) + + for __ccgo := true; __ccgo; __ccgo = i != 0 { + *(*U8)(unsafe.Pointer(buf + uintptr(libc.PreDecUint32(&i, 1)))) = U8(*(*U64)(unsafe.Pointer(bp)) & uint64(0xFF)) + *(*U64)(unsafe.Pointer(bp /* v */)) >>= 8 + } + return len + } + + // String or blob + if serial_type >= U32(12) { + + len = U32((*Mem)(unsafe.Pointer(pMem)).Fn) + if len > U32(0) { + libc.Xmemcpy(tls, buf, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64(len)) + } + return len + } + + // NULL or constants 0 or 1 + return U32(0) +} + +// Input "x" is a sequence of unsigned characters that represent a +// big-endian integer. Return the equivalent native integer + +// Deserialize the data blob pointed to by buf as serial type serial_type +// and store the result in pMem. +// +// This function is implemented as two separate routines for performance. +// The few cases that require local variables are broken out into a separate +// routine so that in most cases the overhead of moving the stack pointer +// is avoided. +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*U64)(unsafe.Pointer(bp /* x */)) = U64(U32(*(*uint8)(unsafe.Pointer(buf)))<<24 | U32(int32(*(*uint8)(unsafe.Pointer(buf + 1)))<<16) | U32(int32(*(*uint8)(unsafe.Pointer(buf + 2)))<<8) | U32(*(*uint8)(unsafe.Pointer(buf + 3)))) + var y U32 = U32(*(*uint8)(unsafe.Pointer(buf + uintptr(4))))<<24 | U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(4) + 1)))<<16) | U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(4) + 2)))<<8) | U32(*(*uint8)(unsafe.Pointer(buf + uintptr(4) + 3))) + *(*U64)(unsafe.Pointer(bp /* x */)) = *(*U64)(unsafe.Pointer(bp))<<32 + U64(y) + if serial_type == U32(6) { + // EVIDENCE-OF: R-29851-52272 Value is a big-endian 64-bit + // twos-complement integer. + *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp)) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + + } else { + // EVIDENCE-OF: R-57343-49114 Value is a big-endian IEEE 754-2008 64-bit + // floating point number. + + libc.Xmemcpy(tls, pMem, bp, uint64(unsafe.Sizeof(U64(0)))) + (*Mem)(unsafe.Pointer(pMem)).Fflags = func() uint16 { + if *(*U64)(unsafe.Pointer(bp))&(U64(uint64(0x7ff))<<52) == U64(uint64(0x7ff))<<52 && *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<52-uint64(1)) != uint64(0) { + return uint16(MEM_Null) + } + return uint16(MEM_Real) + }() + } +} + +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ + switch serial_type { + case U32(10): + { // Internal use only: NULL with virtual table + // UPDATE no-change flag set + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Zero) + (*Mem)(unsafe.Pointer(pMem)).Fn = 0 + *(*int32)(unsafe.Pointer(pMem)) = 0 + return + + } + case U32(11): + fallthrough // Reserved for future use + case U32(0): + { // Null + // EVIDENCE-OF: R-24078-09375 Value is a NULL. + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) + return + + } + case U32(1): + { + // EVIDENCE-OF: R-44885-25196 Value is an 8-bit twos-complement + // integer. + *(*I64)(unsafe.Pointer(pMem)) = I64(I8(*(*uint8)(unsafe.Pointer(buf)))) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + + return + + } + case U32(2): + { // 2-byte signed integer + // EVIDENCE-OF: R-49794-35026 Value is a big-endian 16-bit + // twos-complement integer. + *(*I64)(unsafe.Pointer(pMem)) = I64(256*int32(I8(*(*uint8)(unsafe.Pointer(buf)))) | int32(*(*uint8)(unsafe.Pointer(buf + 1)))) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + + return + + } + case U32(3): + { // 3-byte signed integer + // EVIDENCE-OF: R-37839-54301 Value is a big-endian 24-bit + // twos-complement integer. + *(*I64)(unsafe.Pointer(pMem)) = I64(65536*int32(I8(*(*uint8)(unsafe.Pointer(buf)))) | int32(*(*uint8)(unsafe.Pointer(buf + 1)))<<8 | int32(*(*uint8)(unsafe.Pointer(buf + 2)))) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + + return + + } + case U32(4): + { // 4-byte signed integer + // EVIDENCE-OF: R-01849-26079 Value is a big-endian 32-bit + // twos-complement integer. + *(*I64)(unsafe.Pointer(pMem)) = I64(16777216*int32(I8(*(*uint8)(unsafe.Pointer(buf)))) | int32(*(*uint8)(unsafe.Pointer(buf + 1)))<<16 | int32(*(*uint8)(unsafe.Pointer(buf + 2)))<<8 | int32(*(*uint8)(unsafe.Pointer(buf + 3)))) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + + return + + } + case U32(5): + { // 6-byte signed integer + // EVIDENCE-OF: R-50385-09674 Value is a big-endian 48-bit + // twos-complement integer. + *(*I64)(unsafe.Pointer(pMem)) = I64(U32(*(*uint8)(unsafe.Pointer(buf + uintptr(2))))<<24|U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(2) + 1)))<<16)|U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(2) + 2)))<<8)|U32(*(*uint8)(unsafe.Pointer(buf + uintptr(2) + 3)))) + I64(int64(1))<<32*I64(256*int32(I8(*(*uint8)(unsafe.Pointer(buf))))|int32(*(*uint8)(unsafe.Pointer(buf + 1)))) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + + return + + } + case U32(6): + fallthrough // 8-byte signed integer + case U32(7): + { // IEEE floating point + // These use local variables, so do them in a separate routine + // to avoid having to move the frame pointer in the common case + serialGet(tls, buf, serial_type, pMem) + return + + } + case U32(8): + fallthrough // Integer 0 + case U32(9): + { // Integer 1 + // EVIDENCE-OF: R-12976-22893 Value is the integer 0. + // EVIDENCE-OF: R-18143-12121 Value is the integer 1. + *(*I64)(unsafe.Pointer(pMem)) = I64(serial_type - U32(8)) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) + return + + } + default: + { + (*Mem)(unsafe.Pointer(pMem)).Fz = buf + (*Mem)(unsafe.Pointer(pMem)).Fn = int32((serial_type - U32(12)) / U32(2)) + (*Mem)(unsafe.Pointer(pMem)).Fflags = aFlag[serial_type&U32(1)] + return + + } + } + return +} + +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758: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. +// +// The space is either allocated using sqlite3DbMallocRaw() or from within +// the unaligned buffer passed via the second and third arguments (presumably +// stack space). If the former, then *ppFree is set to a pointer that should +// be eventually freed by the caller using sqlite3DbFree(). Or, if the +// allocation comes from the pSpace/szSpace buffer, *ppFree is set to NULL +// before returning. +// +// If an OOM error occurs, NULL is returned. +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ + var p uintptr // Unpacked record to return + var nByte int32 // Number of bytes required for *p + nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) + p = Xsqlite3DbMallocRaw(tls, (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb, uint64(nByte)) + if !(p != 0) { + return uintptr(0) + } + (*UnpackedRecord)(unsafe.Pointer(p)).FaMem = p + 24 + + (*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo = pKeyInfo + (*UnpackedRecord)(unsafe.Pointer(p)).FnField = U16(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField) + 1) + return p +} + +// Given the nKey-byte encoding of a record in pKey[], populate the +// UnpackedRecord structure indicated by the fourth argument with the +// contents of the decoded record. +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var aKey uintptr = pKey + var d U32 + var idx U32 // Offset in aKey[] to read from + var u U16 // Unsigned loop counter + // var szHdr U32 at bp, 4 + + var pMem uintptr = (*UnpackedRecord)(unsafe.Pointer(p)).FaMem + + (*UnpackedRecord)(unsafe.Pointer(p)).Fdefault_rc = int8(0) + + idx = U32(func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(aKey))) < int32(U8(0x80)) { + return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp)) = U32(*(*uint8)(unsafe.Pointer(aKey))); return 1 }()) + } + return Xsqlite3GetVarint32(tls, aKey, bp) + }()) + d = *(*U32)(unsafe.Pointer(bp /* szHdr */)) + u = U16(0) + for idx < *(*U32)(unsafe.Pointer(bp)) && d <= U32(nKey) { + // var serial_type U32 at bp+4, 4 + + idx = idx + U32(func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(aKey + uintptr(idx)))) < int32(U8(0x80)) { + return uint8(func() int32 { + *(*U32)(unsafe.Pointer(bp + 4)) = U32(*(*uint8)(unsafe.Pointer(aKey + uintptr(idx)))) + return 1 + }()) + } + return Xsqlite3GetVarint32(tls, aKey+uintptr(idx), bp+4) + }()) + (*Mem)(unsafe.Pointer(pMem)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc + (*Mem)(unsafe.Pointer(pMem)).Fdb = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb + // pMem->flags = 0; // sqlite3VdbeSerialGet() will set this for us + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 + (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) + Xsqlite3VdbeSerialGet(tls, aKey+uintptr(d), *(*U32)(unsafe.Pointer(bp + 4 /* serial_type */)), pMem) + d = d + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4))) + pMem += 56 + if int32(libc.PreIncUint16(&u, 1)) >= int32((*UnpackedRecord)(unsafe.Pointer(p)).FnField) { + break + } + } + if d > U32(nKey) && u != 0 { + + // In a corrupt record entry, the last pMem might have been set up using + // uninitialized memory. Overwrite its value with NULL, to prevent + // warnings from MSAN. + Xsqlite3VdbeMemSetNull(tls, pMem-uintptr(1)*56) + } + + (*UnpackedRecord)(unsafe.Pointer(p)).FnField = u +} + +// Both *pMem1 and *pMem2 contain string values. Compare the two values +// using the collation sequence pColl. As usual, return a negative , zero +// or positive value if *pMem1 is less than, equal to or greater than +// *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + if int32((*Mem)(unsafe.Pointer(pMem1)).Fenc) == int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc) { + // The strings are already in the correct encoding. Call the + // comparison function directly + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl)).FxCmp})).f(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(pMem1)).Fn, (*Mem)(unsafe.Pointer(pMem1)).Fz, (*Mem)(unsafe.Pointer(pMem2)).Fn, (*Mem)(unsafe.Pointer(pMem2)).Fz) + } else { + var rc int32 + var v1 uintptr + var v2 uintptr + // var c1 Mem at bp, 56 + + // var c2 Mem at bp+56, 56 + + Xsqlite3VdbeMemInit(tls, bp, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) + Xsqlite3VdbeMemInit(tls, bp+56, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) + Xsqlite3VdbeMemShallowCopy(tls, bp, pMem1, MEM_Ephem) + Xsqlite3VdbeMemShallowCopy(tls, bp+56, pMem2, MEM_Ephem) + v1 = Xsqlite3ValueText(tls, bp, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) + v2 = Xsqlite3ValueText(tls, bp+56, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) + if v1 == uintptr(0) || v2 == uintptr(0) { + if prcErr != 0 { + *(*U8)(unsafe.Pointer(prcErr)) = U8(SQLITE_NOMEM) + } + rc = 0 + } else { + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl)).FxCmp})).f(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(bp /* &c1 */)).Fn, v1, (*Mem)(unsafe.Pointer(bp+56 /* &c2 */)).Fn, v2) + } + Xsqlite3VdbeMemRelease(tls, bp) + Xsqlite3VdbeMemRelease(tls, bp+56) + return rc + } + return int32(0) +} + +// The input pBlob is guaranteed to be a Blob that is not marked +// with MEM_Zero. Return true if it could be a zero-blob. +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ + var i int32 + for i = 0; i < n; i++ { + if *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 { + return 0 + } + } + return 1 +} + +// Compare two blobs. Return negative, zero, or positive if the first +// is less than, equal to, or greater than the second, respectively. +// If one blob is a prefix of the other, then the shorter is the lessor. +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ + var c int32 + var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn + var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn + + // It is possible to have a Blob value that has some non-zero content + // followed by zero content. But that only comes up for Blobs formed + // by the OP_MakeRecord opcode, and such Blobs never get passed into + // sqlite3MemCompare(). + + if (int32((*Mem)(unsafe.Pointer(pB1)).Fflags)|int32((*Mem)(unsafe.Pointer(pB2)).Fflags))&MEM_Zero != 0 { + if int32((*Mem)(unsafe.Pointer(pB1)).Fflags)&int32((*Mem)(unsafe.Pointer(pB2)).Fflags)&MEM_Zero != 0 { + return *(*int32)(unsafe.Pointer(pB1)) - *(*int32)(unsafe.Pointer(pB2)) + } else if int32((*Mem)(unsafe.Pointer(pB1)).Fflags)&MEM_Zero != 0 { + if !(isAllZero(tls, (*Mem)(unsafe.Pointer(pB2)).Fz, (*Mem)(unsafe.Pointer(pB2)).Fn) != 0) { + return -1 + } + return *(*int32)(unsafe.Pointer(pB1)) - n2 + } else { + if !(isAllZero(tls, (*Mem)(unsafe.Pointer(pB1)).Fz, (*Mem)(unsafe.Pointer(pB1)).Fn) != 0) { + return +1 + } + return n1 - *(*int32)(unsafe.Pointer(pB2)) + } + } + c = libc.Xmemcmp(tls, (*Mem)(unsafe.Pointer(pB1)).Fz, (*Mem)(unsafe.Pointer(pB2)).Fz, func() uint64 { + if n1 > n2 { + return uint64(n2) + } + return uint64(n1) + }()) + if c != 0 { + return c + } + return n1 - n2 +} + +// Do a comparison between a 64-bit signed integer and a 64-bit floating-point +// number. Return negative, zero, or positive if the first (i64) is less than, +// equal to, or greater than the second (double). +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ + if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { + var x float64 = float64(i) + + if x < r { + return -1 + } + if x > r { + return +1 + } /*NO_TEST*/ // work around bugs in gcov + return 0 /*NO_TEST*/ // work around bugs in gcov + } else { + var y I64 + var s float64 + if r < -9223372036854775808.0 { + return +1 + } + if r >= 9223372036854775808.0 { + return -1 + } + y = I64(r) + if i < y { + return -1 + } + if i > y { + return +1 + } + s = float64(i) + if s < r { + return -1 + } + if s > r { + return +1 + } + return 0 + } + return int32(0) +} + +// Compare the values contained by the two memory cells, returning +// negative, zero or positive if pMem1 is less than, equal to, or greater +// than pMem2. Sorting order is NULL's first, followed by numbers (integers +// and reals) sorted numerically, followed by text ordered by the collating +// sequence pColl and finally blob's ordered by memcmp(). +// +// Two NULL values are considered equal by this function. +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ + var f1 int32 + var f2 int32 + var combined_flags int32 + + f1 = int32((*Mem)(unsafe.Pointer(pMem1)).Fflags) + f2 = int32((*Mem)(unsafe.Pointer(pMem2)).Fflags) + combined_flags = f1 | f2 + + // If one value is NULL, it is less than the other. If both values + // are NULL, return 0. + if combined_flags&MEM_Null != 0 { + return f2&MEM_Null - f1&MEM_Null + } + + // At least one of the two values is a number + if combined_flags&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { + + if f1&f2&(MEM_Int|MEM_IntReal) != 0 { + + if *(*I64)(unsafe.Pointer(pMem1)) < *(*I64)(unsafe.Pointer(pMem2)) { + return -1 + } + if *(*I64)(unsafe.Pointer(pMem1)) > *(*I64)(unsafe.Pointer(pMem2)) { + return +1 + } + return 0 + } + if f1&f2&MEM_Real != 0 { + if *(*float64)(unsafe.Pointer(pMem1)) < *(*float64)(unsafe.Pointer(pMem2)) { + return -1 + } + if *(*float64)(unsafe.Pointer(pMem1)) > *(*float64)(unsafe.Pointer(pMem2)) { + return +1 + } + return 0 + } + if f1&(MEM_Int|MEM_IntReal) != 0 { + + if f2&MEM_Real != 0 { + return Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(pMem1)), *(*float64)(unsafe.Pointer(pMem2))) + } else if f2&(MEM_Int|MEM_IntReal) != 0 { + if *(*I64)(unsafe.Pointer(pMem1)) < *(*I64)(unsafe.Pointer(pMem2)) { + return -1 + } + if *(*I64)(unsafe.Pointer(pMem1)) > *(*I64)(unsafe.Pointer(pMem2)) { + return +1 + } + return 0 + } else { + return -1 + } + } + if f1&MEM_Real != 0 { + if f2&(MEM_Int|MEM_IntReal) != 0 { + + return -Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(pMem2)), *(*float64)(unsafe.Pointer(pMem1))) + } else { + return -1 + } + } + return +1 + } + + // If one value is a string and the other is a blob, the string is less. + // If both are strings, compare using the collating functions. + if combined_flags&MEM_Str != 0 { + if f1&MEM_Str == 0 { + return 1 + } + if f2&MEM_Str == 0 { + return -1 + } + + // The collation sequence must be defined at this point, even if + // the user deletes the collation sequence after the vdbe program is + // compiled (this was not always the case). + + if pColl != 0 { + return vdbeCompareMemString(tls, pMem1, pMem2, pColl, uintptr(0)) + } + // If a NULL pointer was passed as the collate function, fall through + // to the blob case and use memcmp(). + } + + // Both values must be blobs. Compare using memcmp(). + return Xsqlite3BlobCompare(tls, pMem1, pMem2) +} + +// The first argument passed to this function is a serial-type that +// corresponds to an integer - all values between 1 and 9 inclusive +// except 7. The second points to a buffer containing an integer value +// serialized according to serial_type. This function deserializes +// and returns the value. +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var y U32 at bp, 4 + + switch serial_type { + case U32(0): + fallthrough + case U32(1): + + return I64(I8(*(*U8)(unsafe.Pointer(aKey)))) + case U32(2): + + return I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))) + case U32(3): + + return I64(65536*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<8 | int32(*(*U8)(unsafe.Pointer(aKey + 2)))) + case U32(4): + { + + *(*U32)(unsafe.Pointer(bp /* y */)) = U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3))) + return I64(*(*int32)(unsafe.Pointer(bp))) + + } + case U32(5): + { + + return I64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 3)))) + I64(int64(1))<<32*I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey))))|int32(*(*U8)(unsafe.Pointer(aKey + 1)))) + + } + case U32(6): + { + *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = U64(U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3)))) + + *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = *(*U64)(unsafe.Pointer(bp + 8))<<32 | U64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 3)))) + return *(*I64)(unsafe.Pointer(bp + 8)) + + } + } + + return I64(serial_type - U32(8)) +} + +// This function compares the two table rows or index records +// specified by {nKey1, pKey1} and pPKey2. It returns a negative, zero +// or positive integer if key1 is less than, equal to or +// greater than key2. The {nKey1, pKey1} key must be a blob +// created by the OP_MakeRecord opcode of the VDBE. The pPKey2 +// key must be a parsed key such as obtained from +// sqlite3VdbeParseRecord. +// +// If argument bSkip is non-zero, it is assumed that the caller has already +// determined that the first fields of the keys are equal. +// +// Key1 and Key2 do not have to contain the same number of fields. If all +// fields that appear in both keys are equal, then pPKey2->default_rc is +// returned. +// +// If database corruption is discovered, set pPKey2->errCode to +// SQLITE_CORRUPT and return 0. If an OOM error is encountered, +// pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the +// malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ + bp := tls.Alloc(68) + defer tls.Free(68) + + var d1 U32 // Offset into aKey[] of next data element + var i int32 // Index of next field to compare + // var szHdr1 U32 at bp+4, 4 + // Size of record header in bytes + var idx1 U32 // Offset of first type in header + var rc int32 = 0 // Return value + var pRhs uintptr = (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem // Next field of pPKey2 to compare + var pKeyInfo uintptr + var aKey1 uintptr = pKey1 + // var mem1 Mem at bp+8, 56 + + // If bSkip is true, then the caller has already determined that the first + // two elements in the keys are equal. Fix the various stack variables so + // that this routine begins comparing at the second field. + if bSkip != 0 { + // var s1 U32 at bp, 4 + + idx1 = U32(1 + int32(func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(aKey1 + 1))) < int32(U8(0x80)) { + return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + 1))); return 1 }()) + } + return Xsqlite3GetVarint32(tls, aKey1+1, bp) + }())) + *(*U32)(unsafe.Pointer(bp + 4 /* szHdr1 */)) = U32(*(*uint8)(unsafe.Pointer(aKey1))) + d1 = *(*U32)(unsafe.Pointer(bp + 4)) + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp))) + i = 1 + pRhs += 56 + } else { + idx1 = U32(func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(aKey1))) < int32(U8(0x80)) { + return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp + 4)) = U32(*(*uint8)(unsafe.Pointer(aKey1))); return 1 }()) + } + return Xsqlite3GetVarint32(tls, aKey1, bp+4) + }()) + d1 = *(*U32)(unsafe.Pointer(bp + 4 /* szHdr1 */)) + i = 0 + } + if d1 > uint32(nKey1) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) + return 0 // Corruption + } + + for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + // var serial_type U32 at bp+64, 4 + + // RHS is an integer + if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { + + *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) + + if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { + rc = +1 + } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { + rc = -1 + } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { + Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)), bp+8) + rc = -Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(pRhs)), *(*float64)(unsafe.Pointer(bp + 8))) + } else { + var lhs I64 = vdbeRecordDecodeInt(tls, *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)), aKey1+uintptr(d1)) + var rhs I64 = *(*I64)(unsafe.Pointer(pRhs)) + if lhs < rhs { + rc = -1 + } else if lhs > rhs { + rc = +1 + } + } + } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { + *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) + if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { + // Serial types 12 or greater are strings and blobs (greater than + // numbers). Types 10 and 11 are currently "reserved for future + // use", so it doesn't really matter what the results of comparing + // them to numberic values are. + rc = +1 + } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { + rc = -1 + } else { + Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)), bp+8) + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { + if *(*float64)(unsafe.Pointer(bp + 8)) < *(*float64)(unsafe.Pointer(pRhs)) { + rc = -1 + } else if *(*float64)(unsafe.Pointer(bp + 8)) > *(*float64)(unsafe.Pointer(pRhs)) { + rc = +1 + } + } else { + rc = Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(pRhs))) + } + } + } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Str != 0 { + *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) + if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(0x80) { + Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+64) + } + + if *(*U32)(unsafe.Pointer(bp + 64)) < U32(12) { + rc = -1 + } else if !(*(*U32)(unsafe.Pointer(bp + 64))&U32(0x01) != 0) { + rc = +1 + } else { + (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fn = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) + + if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || + int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) + return 0 // Corruption + } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { + (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc + (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fdb = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb + (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fflags = U16(MEM_Str) + (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fz = aKey1 + uintptr(d1) + rc = vdbeCompareMemString(tls, + bp+8, pRhs, *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)), pPKey2+19) + } else { + var nCmp int32 = func() int32 { + if (*Mem)(unsafe.Pointer(bp+8)).Fn < (*Mem)(unsafe.Pointer(pRhs)).Fn { + return (*Mem)(unsafe.Pointer(bp + 8)).Fn + } + return (*Mem)(unsafe.Pointer(pRhs)).Fn + }() + rc = libc.Xmemcmp(tls, aKey1+uintptr(d1), (*Mem)(unsafe.Pointer(pRhs)).Fz, uint64(nCmp)) + if rc == 0 { + rc = (*Mem)(unsafe.Pointer(bp+8)).Fn - (*Mem)(unsafe.Pointer(pRhs)).Fn + } + } + } + } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Blob != 0 { + + *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) + if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(0x80) { + Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+64) + } + + if *(*U32)(unsafe.Pointer(bp + 64)) < U32(12) || *(*U32)(unsafe.Pointer(bp + 64))&U32(0x01) != 0 { + rc = -1 + } else { + var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) + + if d1+U32(nStr) > uint32(nKey1) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) + return 0 // Corruption + } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { + if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { + rc = 1 + } else { + rc = nStr - *(*int32)(unsafe.Pointer(pRhs)) + } + } else { + var nCmp int32 = func() int32 { + if nStr < (*Mem)(unsafe.Pointer(pRhs)).Fn { + return nStr + } + return (*Mem)(unsafe.Pointer(pRhs)).Fn + }() + rc = libc.Xmemcmp(tls, aKey1+uintptr(d1), (*Mem)(unsafe.Pointer(pRhs)).Fz, uint64(nCmp)) + if rc == 0 { + rc = nStr - (*Mem)(unsafe.Pointer(pRhs)).Fn + } + } + } + } else { + *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + } + + if rc != 0 { + var sortFlags int32 = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo)).FaSortFlags + uintptr(i)))) + if sortFlags != 0 { + if sortFlags&KEYINFO_ORDER_BIGNULL == 0 || + sortFlags&KEYINFO_ORDER_DESC != + libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) == U32(0) || int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Null != 0) { + rc = -rc + } + } + + // See comment below + return rc + } + + i++ + if i == int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FnField) { + break + } + pRhs += 56 + d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + } + + // No memory allocation is ever used on mem1. Prove this using + // the following assert(). If the assert() fails, it indicates a + // memory leak and a need to call sqlite3VdbeMemRelease(&mem1). + + // rc==0 here means that one or both of the keys ran out of fields and + // all the fields up to that point were equal. Return the default_rc + // value. + + (*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:84465:20: */ + return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) +} + +// This function is an optimized version of sqlite3VdbeRecordCompare() +// that (a) the first field of pPKey2 is an integer, and (b) the +// size-of-header varint at the start of (pKey1/nKey1) fits in a single +// byte (i.e. is less than 128). +// +// To avoid concerns about buffer overreads, this routine is only used +// on schemas where the maximum valid header size is 63 bytes or less. +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var aKey uintptr = pKey1 + uintptr(int32(*(*U8)(unsafe.Pointer(pKey1)))&0x3F) + var serial_type int32 = int32(*(*U8)(unsafe.Pointer(pKey1 + 1))) + var res int32 + // var y U32 at bp, 4 + + // var x U64 at bp+8, 8 + + var v I64 + var lhs I64 + + switch serial_type { + case 1: + { // 1-byte signed integer + lhs = I64(I8(*(*U8)(unsafe.Pointer(aKey)))) + + break + + } + case 2: + { // 2-byte signed integer + lhs = I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))) + + break + + } + case 3: + { // 3-byte signed integer + lhs = I64(65536*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<8 | int32(*(*U8)(unsafe.Pointer(aKey + 2)))) + + break + + } + case 4: + { // 4-byte signed integer + *(*U32)(unsafe.Pointer(bp /* y */)) = U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3))) + lhs = I64(*(*int32)(unsafe.Pointer(bp))) + + break + + } + case 5: + { // 6-byte signed integer + lhs = I64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 3)))) + I64(int64(1))<<32*I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey))))|int32(*(*U8)(unsafe.Pointer(aKey + 1)))) + + break + + } + case 6: + { // 8-byte signed integer + *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = U64(U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3)))) + *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = *(*U64)(unsafe.Pointer(bp + 8))<<32 | U64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 3)))) + lhs = *(*I64)(unsafe.Pointer(bp + 8)) + + break + + } + case 8: + lhs = int64(0) + break + case 9: + lhs = int64(1) + break + + // This case could be removed without changing the results of running + // this code. Including it causes gcc to generate a faster switch + // statement (since the range of switch targets now starts at zero and + // is contiguous) but does not cause any duplicate code to be generated + // (as gcc is clever enough to combine the two like cases). Other + // compilers might be similar. + case 0: + fallthrough + case 7: + return Xsqlite3VdbeRecordCompare(tls, nKey1, pKey1, pPKey2) + + default: + return Xsqlite3VdbeRecordCompare(tls, nKey1, pKey1, pPKey2) + } + + v = *(*I64)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)) + if v > lhs { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) + } else if v < lhs { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) + } else if int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FnField) > 1 { + // The first fields of the two keys are equal. Compare the trailing + // fields. + res = Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 1) + } else { + // The first fields of the two keys are equal and there are no trailing + // fields. Return pPKey2->default_rc in this case. + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) + } + + return res +} + +// This function is an optimized version of sqlite3VdbeRecordCompare() +// that (a) the first field of pPKey2 is a string, that (b) the first field +// uses the collation sequence BINARY and (c) that the size-of-header varint +// at the start of (pKey1/nKey1) fits in a single byte. +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var aKey1 uintptr = pKey1 + // var serial_type int32 at bp, 4 + + var res int32 + + *(*int32)(unsafe.Pointer(bp /* serial_type */)) = int32(*(*U8)(unsafe.Pointer(aKey1 + 1))) + if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { + Xsqlite3GetVarint32(tls, aKey1+1, bp) + } + if *(*int32)(unsafe.Pointer(bp)) < 12 { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) // (pKey1/nKey1) is a number or a null + } else if !(*(*int32)(unsafe.Pointer(bp))&0x01 != 0) { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) // (pKey1/nKey1) is a blob + } else { + var nCmp int32 + var nStr int32 + var szHdr int32 = int32(*(*U8)(unsafe.Pointer(aKey1))) + + nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 + if szHdr+nStr > nKey1 { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) + return 0 // Corruption + } + nCmp = func() int32 { + if (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fn < nStr { + return (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fn + } + return nStr + }() + res = libc.Xmemcmp(tls, aKey1+uintptr(szHdr), (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fz, uint64(nCmp)) + + if res > 0 { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) + } else if res < 0 { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) + } else { + res = nStr - (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fn + if res == 0 { + if int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FnField) > 1 { + res = Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 1) + } else { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) + } + } else if res > 0 { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) + } else { + res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) + } + } + } + + return res +} + +// Return a pointer to an sqlite3VdbeRecordCompare() compatible function +// suitable for comparing serialized records to the unpacked record passed +// as the only argument. +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ + // varintRecordCompareInt() and varintRecordCompareString() both assume + // that the size-of-header varint that occurs at the start of each record + // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() + // also assumes that it is safe to overread a buffer by at least the + // maximum possible legal header size plus 8 bytes. Because there is + // guaranteed to be at least 74 (but not 136) bytes of padding following each + // buffer passed to varintRecordCompareInt() this makes it convenient to + // limit the size of the header to 64 bytes in cases where the first field + // is an integer. + // + // The easiest way to enforce this limit is to consider only records with + // 13 fields or less. If the first field is an integer, the maximum legal + // header size is (12*5 + 1 + 1) bytes. + if int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo)).FnAllField) <= 13 { + var flags int32 = int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FaMem)).Fflags) + if *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo)).FaSortFlags)) != 0 { + if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo)).FaSortFlags)))&KEYINFO_ORDER_BIGNULL != 0 { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, uintptr, uintptr) int32 + }{Xsqlite3VdbeRecordCompare})) + } + (*UnpackedRecord)(unsafe.Pointer(p)).Fr1 = int8(1) + (*UnpackedRecord)(unsafe.Pointer(p)).Fr2 = int8(-1) + } else { + (*UnpackedRecord)(unsafe.Pointer(p)).Fr1 = int8(-1) + (*UnpackedRecord)(unsafe.Pointer(p)).Fr2 = int8(1) + } + if flags&MEM_Int != 0 { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, uintptr, uintptr) int32 + }{vdbeRecordCompareInt})) + } + + if flags&(MEM_Real|MEM_IntReal|MEM_Null|MEM_Blob) == 0 && + *(*uintptr)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo + 32)) == uintptr(0) { + + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, uintptr, uintptr) int32 + }{vdbeRecordCompareString})) + } + } + + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, uintptr, uintptr) int32 + }{Xsqlite3VdbeRecordCompare})) +} + +// pCur points at an index entry created using the OP_MakeRecord opcode. +// Read the rowid (the last field in the record) and store it in *rowid. +// Return SQLITE_OK if everything works, or an error code otherwise. +// +// pCur might be pointing to text obtained from a corrupt database file. +// So the content cannot be trusted. Do appropriate checks on the content. +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ + bp := tls.Alloc(120) + defer tls.Free(120) + + var nCellKey I64 + var rc int32 + // var szHdr U32 at bp+56, 4 + // Size of the header + // var typeRowid U32 at bp+60, 4 + // Serial type of the rowid + var lenRowid U32 // Size of the rowid + // var m Mem at bp, 56 + + // var v Mem at bp+64, 56 + nCellKey = int64(0) + + // Get the size of the index entry. Only indices entries of less + // than 2GiB are support - anything large must be database corruption. + // Any corruption is detected in sqlite3BtreeParseCellPtr(), though, so + // this code can safely assume that nCellKey is 32-bits + + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur)) + + // Read in the complete content of the index entry + Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) + if !(rc != 0) { + goto __1 + } + return rc +__1: + ; + + // The index entry must begin with a header size + *(*U32)(unsafe.Pointer(bp + 56 /* szHdr */)) = U32(*(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(bp)).Fz))) + if !(*(*U32)(unsafe.Pointer(bp + 56)) >= U32(0x80)) { + goto __2 + } + Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz, bp+56) +__2: + ; + + if !(*(*U32)(unsafe.Pointer(bp + 56)) < U32(3) || *(*U32)(unsafe.Pointer(bp + 56)) > uint32((*Mem)(unsafe.Pointer(bp)).Fn)) { + goto __3 + } + goto idx_rowid_corruption +__3: + ; + + // The last field of the index should be an integer - the ROWID. + // Verify that the last entry really is an integer. + *(*U32)(unsafe.Pointer(bp + 60 /* typeRowid */)) = U32(*(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(bp)).Fz + uintptr(*(*U32)(unsafe.Pointer(bp + 56))-U32(1))))) + if !(*(*U32)(unsafe.Pointer(bp + 60)) >= U32(0x80)) { + goto __4 + } + Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(*(*U32)(unsafe.Pointer(bp + 56))-U32(1)), bp+60) +__4: + ; + + if !(*(*U32)(unsafe.Pointer(bp + 60)) < U32(1) || *(*U32)(unsafe.Pointer(bp + 60)) > U32(9) || *(*U32)(unsafe.Pointer(bp + 60)) == U32(7)) { + goto __5 + } + goto idx_rowid_corruption +__5: + ; + lenRowid = U32(sqlite3SmallTypeSizes[*(*U32)(unsafe.Pointer(bp + 60 /* typeRowid */))]) + + if !(U32((*Mem)(unsafe.Pointer(bp)).Fn) < *(*U32)(unsafe.Pointer(bp + 56))+lenRowid) { + goto __6 + } + goto idx_rowid_corruption +__6: + ; + + // Fetch the integer off the end of the index record + Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(U32((*Mem)(unsafe.Pointer(bp)).Fn)-lenRowid), *(*U32)(unsafe.Pointer(bp + 60 /* typeRowid */)), bp+64) + *(*I64)(unsafe.Pointer(rowid)) = *(*I64)(unsafe.Pointer(bp + 64)) + Xsqlite3VdbeMemRelease(tls, bp) + return SQLITE_OK + + // Jump here if database corruption is detected after m has been + // allocated. Free the m object and return SQLITE_CORRUPT. +idx_rowid_corruption: + ; + Xsqlite3VdbeMemRelease(tls, bp) + return Xsqlite3CorruptError(tls, 84756) +} + +// Compare the key of the index entry that cursor pC is pointing to against +// the key string in pUnpacked. Write into *pRes a number +// that is negative, zero, or positive if pC is less than, equal to, +// or greater than pUnpacked. Return SQLITE_OK on success. +// +// pUnpacked is either created without a rowid or is truncated so that it +// omits the rowid at the end. The rowid at the end of the index entry +// is ignored as well. Hence, this routine only compares the prefixes +// of the keys prior to the final rowid, not the entire key. +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var nCellKey I64 = int64(0) + var rc int32 + var pCur uintptr + // var m Mem at bp, 56 + + pCur = *(*uintptr)(unsafe.Pointer(pC + 48)) + + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur)) + // nCellKey will always be between 0 and 0xffffffff because of the way + // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented + if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { + *(*int32)(unsafe.Pointer(res)) = 0 + return Xsqlite3CorruptError(tls, 84789) + } + Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) + if rc != 0 { + return rc + } + *(*int32)(unsafe.Pointer(res)) = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp /* &m */)).Fz, pUnpacked, 0) + Xsqlite3VdbeMemRelease(tls, bp) + return SQLITE_OK +} + +// This routine sets the value to be returned by subsequent calls to +// sqlite3_changes() on the database handle 'db'. +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ + + (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange + *(*I64)(unsafe.Pointer(db + 128)) += nChange +} + +// Set a flag in the vdbe to update the change counter when it is finalised +// or reset. +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ + libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) +} + +// Mark every prepared statement associated with a database connection +// as expired. +// +// An expired statement means that recompilation of the statement is +// recommend. Statements expire when things happen that make their +// programs obsolete. Removing user-defined functions or collating +// sequences, or changing an authorization function are the types of +// things that make prepared statements obsolete. +// +// If iCode is 1, then expiration is advisory. The statement should +// be reprepared before being restarted, but if it is already running +// it is allowed to run to completion. +// +// Internally, this function just sets the Vdbe.expired flag on all +// prepared statements. The flag is set to 1 for an immediate expiration +// and set to 2 for an advisory expiration. +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ + var p uintptr + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) + } +} + +// Return the database associated with the Vdbe. +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ + return (*Vdbe)(unsafe.Pointer(v)).Fdb +} + +// Return the SQLITE_PREPARE flags for a Vdbe. +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ + return (*Vdbe)(unsafe.Pointer(v)).FprepFlags +} + +// Return a pointer to an sqlite3_value structure containing the value bound +// parameter iVar of VM v. Except, if the value is an SQL NULL, return +// 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_* +// constants) to the value before returning it. +// +// The returned value must be freed by the caller using sqlite3ValueFree(). +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ + + if v != 0 { + var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 + + if 0 == int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null { + var pRet uintptr = Xsqlite3ValueNew(tls, (*Vdbe)(unsafe.Pointer(v)).Fdb) + if pRet != 0 { + Xsqlite3VdbeMemCopy(tls, pRet, pMem) + Xsqlite3ValueApplyAffinity(tls, pRet, aff, uint8(SQLITE_UTF8)) + } + return pRet + } + } + return uintptr(0) +} + +// Configure SQL variable iVar so that binding a new value to it signals +// to sqlite3_reoptimize() that re-preparing the statement may result +// in a better query plan. +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ + + if iVar >= 32 { + *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 + } else { + *(*U32)(unsafe.Pointer(v + 292)) |= U32(U32(1)) << (iVar - 1) + } +} + +// Cause a function to throw an error if it was call from OP_PureFunc +// rather than OP_Function. +// +// OP_PureFunc means that the function must be deterministic, and should +// throw an error if it is given inputs that would make it non-deterministic. +// This routine is invoked by date/time functions that use non-deterministic +// features such as 'now'. +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pOp uintptr + if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { + return 1 + } + pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp)*24 + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_PureFunc { + var zContext uintptr + var zMsg uintptr + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { + zContext = ts + 5108 /* "a CHECK constrai..." */ + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { + zContext = ts + 5127 /* "a generated colu..." */ + } else { + zContext = ts + 5146 /* "an index" */ + } + zMsg = Xsqlite3_mprintf(tls, ts+5155, + libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext)) + Xsqlite3_result_error(tls, pCtx, zMsg, -1) + Xsqlite3_free(tls, zMsg) + return 0 + } + return 1 +} + +// Transfer error message text from an sqlite3_vtab.zErrMsg (text stored +// in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored +// in memory obtained from sqlite3DbMalloc). +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ + if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { + var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) + Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = uintptr(0) + } +} + +// If the second argument is not NULL, release any allocations associated +// with the memory cells in the p->aMem[] array. Also free the UnpackedRecord +// structure itself, using sqlite3DbFree(). +// +// This function is used to free UnpackedRecord structures allocated by +// the vdbeUnpackRecord() function found in vdbeapi.c. +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ + if p != 0 { + var i int32 + for i = 0; i < nField; i++ { + var pMem uintptr = (*UnpackedRecord)(unsafe.Pointer(p)).FaMem + uintptr(i)*56 + if (*Mem)(unsafe.Pointer(pMem)).FzMalloc != 0 { + Xsqlite3VdbeMemRelease(tls, pMem) + } + } + Xsqlite3DbFreeNN(tls, db, p) + } +} + +// Invoke the pre-update hook. If this is an UPDATE or DELETE pre-update call, +// then cursor passed as the second argument should point to the row about +// to be update or deleted. If the application calls sqlite3_preupdate_old(), +// the required value will be read from the row the cursor points to. +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb + var iKey2 I64 + // var preupdate PreUpdate at bp, 136 + + var zTbl uintptr = (*Table)(unsafe.Pointer(pTab)).FzName + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(PreUpdate{}))) + if libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) == 0 { + iKey1 = libc.AssignInt64(&iKey2, int64(0)) + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + } else { + if op == SQLITE_UPDATE { + iKey2 = *(*I64)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FaMem + uintptr(iReg)*56)) + } else { + iKey2 = iKey1 + } + } + + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fv = v + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpCsr = pCsr + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fop = op + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiNewReg = iReg + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.Fdb = db + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.FnKeyField = U16((*Table)(unsafe.Pointer(pTab)).FnCol) + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.FaSortFlags = uintptr(unsafe.Pointer(&fakeSortOrder)) + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiKey1 = iKey1 + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiKey2 = iKey2 + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpTab = pTab + (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiBlobWrite = iBlobWrite + + (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate = bp /* &preupdate */ + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2) + (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate = uintptr(0) + Xsqlite3DbFree(tls, db, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FaRecord) + vdbeFreeUnpacked(tls, db, int32((*PreUpdate)(unsafe.Pointer(bp)).Fkeyinfo.FnKeyField)+1, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpUnpacked) + vdbeFreeUnpacked(tls, db, int32((*PreUpdate)(unsafe.Pointer(bp)).Fkeyinfo.FnKeyField)+1, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpNewUnpacked) + if (*PreUpdate)(unsafe.Pointer(bp)).FaNew != 0 { + var i int32 + for i = 0; i < int32((*VdbeCursor)(unsafe.Pointer(pCsr)).FnField); i++ { + Xsqlite3VdbeMemRelease(tls, (*PreUpdate)(unsafe.Pointer(bp)).FaNew+uintptr(i)*56) + } + Xsqlite3DbFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FaNew) + } +} + +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ + +//************* End of vdbeaux.c ******************************************** +//************* Begin file vdbeapi.c **************************************** +// 2004 May 26 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code use to implement APIs that are part of the +// VDBE. +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// Return TRUE (non-zero) of the statement supplied as an argument needs +// to be recompiled. A statement needs to be recompiled whenever the +// execution environment changes in a way that would alter the program +// that sqlite3_prepare() generates. For example, if new functions or +// collating sequences are registered or if an authorizer function is +// added or changed. +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ + var p uintptr = pStmt + return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) +} + +// Check on a Vdbe to make sure it has not been finalized. Log +// an error and return true if it has been finalized (or is otherwise +// invalid). Return false if it is ok. +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ + if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5191, 0) + return 1 + } else { + return 0 + } + return int32(0) +} + +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ + if p == uintptr(0) { + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5236, 0) + return 1 + } else { + return vdbeSafety(tls, p) + } + return int32(0) +} + +// Invoke the profile callback. This routine is only called if we already +// know that the profile callback is defined and needs to be invoked. +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var iNow Sqlite3_int64 at bp, 8 + + // var iElapse Sqlite3_int64 at bp+8, 8 + + Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, bp) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */)) = (*(*Sqlite3_int64)(unsafe.Pointer(bp)) - (*Vdbe)(unsafe.Pointer(p)).FstartTime) * int64(1000000) + if (*Sqlite3)(unsafe.Pointer(db)).FxProfile != 0 { + (*struct { + f func(*libc.TLS, uintptr, uintptr, U64) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProfile})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProfileArg, (*Vdbe)(unsafe.Pointer(p)).FzSql, uint64(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */)))) + } + if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_PROFILE != 0 { + (*struct { + f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_PROFILE), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, bp+8 /* &iElapse */) + } + (*Vdbe)(unsafe.Pointer(p)).FstartTime = int64(0) +} + +// The checkProfileCallback(DB,P) macro checks to see if a profile callback +// is needed, and it invokes the callback if it is needed. + +// The following routine destroys a virtual machine that is created by +// the sqlite3_compile() routine. The integer returned is an SQLITE_ +// success/failure code that describes the result of executing the virtual +// machine. +// +// This routine sets the error code and string returned by +// sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ + var rc int32 + if pStmt == uintptr(0) { + // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL + // pointer is a harmless no-op. + rc = SQLITE_OK + } else { + var v uintptr = pStmt + var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb + if vdbeSafety(tls, v) != 0 { + return Xsqlite3MisuseError(tls, 85151) + } + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { + invokeProfileCallback(tls, db, v) + } + + rc = Xsqlite3VdbeFinalize(tls, v) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3LeaveMutexAndCloseZombie(tls, db) + } + return rc +} + +// Terminate the current execution of an SQL statement and reset it +// back to its starting state so that it can be reused. A success code from +// the prior execution is returned. +// +// This routine sets the error code and string returned by +// sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ + var rc int32 + if pStmt == uintptr(0) { + rc = SQLITE_OK + } else { + var v uintptr = pStmt + var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { + invokeProfileCallback(tls, db, v) + } + + rc = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeRewind(tls, v) + + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + } + return rc +} + +// Set all the parameters in the compiled SQL statement to NULL. +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ + var i int32 + var rc int32 = SQLITE_OK + var p uintptr = pStmt + var mutex uintptr = (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pStmt)).Fdb)).Fmutex + Xsqlite3_mutex_enter(tls, mutex) + for i = 0; i < int32((*Vdbe)(unsafe.Pointer(p)).FnVar); i++ { + Xsqlite3VdbeMemRelease(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i)*56) + (*Mem)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i)*56)).Fflags = U16(MEM_Null) + } + + if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != 0 { + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) + } + Xsqlite3_mutex_leave(tls, mutex) + return rc +} + +// *************************** sqlite3_value_ ******************************* +// +// The following routines extract information from a Mem or sqlite3_value +// structure. +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ + var p uintptr = pVal + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { + if func() int32 { + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, p) + } + return 0 + }() != SQLITE_OK { + + return uintptr(0) + } + *(*U16)(unsafe.Pointer(p + 8)) |= U16(MEM_Blob) + if (*Mem)(unsafe.Pointer(p)).Fn != 0 { + return (*Mem)(unsafe.Pointer(p)).Fz + } + return uintptr(0) + } else { + return Xsqlite3_value_text(tls, pVal) + } + return uintptr(0) +} + +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ + return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) +} + +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ + return Xsqlite3ValueBytes(tls, pVal, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) +} + +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ + return Xsqlite3VdbeRealValue(tls, pVal) +} + +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ + return int32(Xsqlite3VdbeIntValue(tls, pVal)) +} + +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ + return Xsqlite3VdbeIntValue(tls, pVal) +} + +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ + var pMem uintptr = pVal + return func() uint32 { + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { + return uint32((*Mem)(unsafe.Pointer(pMem)).FeSubtype) + } + return uint32(0) + }() +} + +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ + var p uintptr = pVal + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && + zPType != uintptr(0) && + int32((*Mem)(unsafe.Pointer(p)).FeSubtype) == 'p' && + libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(p)), zPType) == 0 { + return (*Mem)(unsafe.Pointer(p)).Fz + } else { + return uintptr(0) + } + return uintptr(0) +} + +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ + return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) +} + +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ + return Xsqlite3ValueText(tls, pVal, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) +} + +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ + return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) +} + +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ + return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) +} + +// EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five +// fundamental datatypes: 64-bit signed integer 64-bit IEEE floating +// point number string BLOB NULL +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ + return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) +} + +var aType = [64]U8{ + U8(SQLITE_BLOB), // 0x00 (not possible) + U8(SQLITE_NULL), // 0x01 NULL + U8(SQLITE_TEXT), // 0x02 TEXT + U8(SQLITE_NULL), // 0x03 (not possible) + U8(SQLITE_INTEGER), // 0x04 INTEGER + U8(SQLITE_NULL), // 0x05 (not possible) + U8(SQLITE_INTEGER), // 0x06 INTEGER + TEXT + U8(SQLITE_NULL), // 0x07 (not possible) + U8(SQLITE_FLOAT), // 0x08 FLOAT + U8(SQLITE_NULL), // 0x09 (not possible) + U8(SQLITE_FLOAT), // 0x0a FLOAT + TEXT + U8(SQLITE_NULL), // 0x0b (not possible) + U8(SQLITE_INTEGER), // 0x0c (not possible) + U8(SQLITE_NULL), // 0x0d (not possible) + U8(SQLITE_INTEGER), // 0x0e (not possible) + U8(SQLITE_NULL), // 0x0f (not possible) + U8(SQLITE_BLOB), // 0x10 BLOB + U8(SQLITE_NULL), // 0x11 (not possible) + U8(SQLITE_TEXT), // 0x12 (not possible) + U8(SQLITE_NULL), // 0x13 (not possible) + U8(SQLITE_INTEGER), // 0x14 INTEGER + BLOB + U8(SQLITE_NULL), // 0x15 (not possible) + U8(SQLITE_INTEGER), // 0x16 (not possible) + U8(SQLITE_NULL), // 0x17 (not possible) + U8(SQLITE_FLOAT), // 0x18 FLOAT + BLOB + U8(SQLITE_NULL), // 0x19 (not possible) + U8(SQLITE_FLOAT), // 0x1a (not possible) + U8(SQLITE_NULL), // 0x1b (not possible) + U8(SQLITE_INTEGER), // 0x1c (not possible) + U8(SQLITE_NULL), // 0x1d (not possible) + U8(SQLITE_INTEGER), // 0x1e (not possible) + U8(SQLITE_NULL), // 0x1f (not possible) + U8(SQLITE_FLOAT), // 0x20 INTREAL + U8(SQLITE_NULL), // 0x21 (not possible) + U8(SQLITE_TEXT), // 0x22 INTREAL + TEXT + U8(SQLITE_NULL), // 0x23 (not possible) + U8(SQLITE_FLOAT), // 0x24 (not possible) + U8(SQLITE_NULL), // 0x25 (not possible) + U8(SQLITE_FLOAT), // 0x26 (not possible) + U8(SQLITE_NULL), // 0x27 (not possible) + U8(SQLITE_FLOAT), // 0x28 (not possible) + U8(SQLITE_NULL), // 0x29 (not possible) + U8(SQLITE_FLOAT), // 0x2a (not possible) + U8(SQLITE_NULL), // 0x2b (not possible) + U8(SQLITE_FLOAT), // 0x2c (not possible) + U8(SQLITE_NULL), // 0x2d (not possible) + U8(SQLITE_FLOAT), // 0x2e (not possible) + U8(SQLITE_NULL), // 0x2f (not possible) + U8(SQLITE_BLOB), // 0x30 (not possible) + U8(SQLITE_NULL), // 0x31 (not possible) + U8(SQLITE_TEXT), // 0x32 (not possible) + U8(SQLITE_NULL), // 0x33 (not possible) + U8(SQLITE_FLOAT), // 0x34 (not possible) + U8(SQLITE_NULL), // 0x35 (not possible) + U8(SQLITE_FLOAT), // 0x36 (not possible) + U8(SQLITE_NULL), // 0x37 (not possible) + U8(SQLITE_FLOAT), // 0x38 (not possible) + U8(SQLITE_NULL), // 0x39 (not possible) + U8(SQLITE_FLOAT), // 0x3a (not possible) + U8(SQLITE_NULL), // 0x3b (not possible) + U8(SQLITE_FLOAT), // 0x3c (not possible) + U8(SQLITE_NULL), // 0x3d (not possible) + U8(SQLITE_FLOAT), // 0x3e (not possible) + U8(SQLITE_NULL), // 0x3f (not possible) +} /* sqlite3.c:85279:19 */ + +// Return true if a parameter to xUpdate represents an unchanged column +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ + return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) +} + +// Return true if a parameter value originated from an sqlite3_bind() +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ + return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) +} + +// Make a copy of an sqlite3_value object +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ + var pNew uintptr + if pOrig == uintptr(0) { + return uintptr(0) + } + pNew = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_value{}))) + if pNew == uintptr(0) { + return uintptr(0) + } + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Sqlite3_value{}))) + libc.Xmemcpy(tls, pNew, pOrig, uint64(uintptr(0)+24)) + *(*U16)(unsafe.Pointer(pNew + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn)) + (*Sqlite3_value)(unsafe.Pointer(pNew)).Fdb = uintptr(0) + if int32((*Sqlite3_value)(unsafe.Pointer(pNew)).Fflags)&(MEM_Str|MEM_Blob) != 0 { + *(*U16)(unsafe.Pointer(pNew + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static | MEM_Dyn)) + *(*U16)(unsafe.Pointer(pNew + 8)) |= U16(MEM_Ephem) + if Xsqlite3VdbeMemMakeWriteable(tls, pNew) != SQLITE_OK { + Xsqlite3ValueFree(tls, pNew) + pNew = uintptr(0) + } + } + return pNew +} + +// Destroy an sqlite3_value object previously obtained from +// sqlite3_value_dup(). +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ + Xsqlite3ValueFree(tls, pOld) +} + +// *************************** sqlite3_result_ ******************************* +// +// The following routines are used by user-defined functions to specify +// the function result. +// +// The setStrOrError() function calls sqlite3VdbeMemSetStr() to store the +// result as a string or blob. Appropriate errors are set if the string/blob +// is too big or if an OOM occurs. +// +// The invokeValueDestructor(P,X) routine invokes destructor function X() +// on value P is not going to be used and need to be destroyed. +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ + var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) + if rc != 0 { + if rc == SQLITE_TOOBIG { + Xsqlite3_result_error_toobig(tls, pCtx) + } else { + // The only errors possible from sqlite3VdbeMemSetStr are + // SQLITE_TOOBIG and SQLITE_NOMEM + + Xsqlite3_result_error_nomem(tls, pCtx) + } + } +} + +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ + + if xDel == uintptr(0) { + // noop + } else if xDel == libc.UintptrFromInt32(-1) { + // noop + } else { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDel})).f(tls, p) + } + Xsqlite3_result_error_toobig(tls, pCtx) + return SQLITE_TOOBIG +} + +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85459:17: */ + + if n > uint64(0x7fffffff) { + invokeValueDestructor(tls, z, xDel, pCtx) + } else { + setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) + } +} + +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85477:17: */ + + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) +} + +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ + + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }(), libc.UintptrFromInt32(-1)) +} + +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ + + Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) +} + +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ + + Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) +} + +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85501:17: */ + var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + + Xsqlite3VdbeMemRelease(tls, pOut) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) +} + +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ + var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + + (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) + *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) +} + +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ + + setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) +} + +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ + + if int32(enc) == SQLITE_UTF16 { + enc = func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }() + } + if n > uint64(0x7fffffff) { + invokeValueDestructor(tls, z, xDel, pCtx) + } else { + 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:85545:17: */ + + setResultStrOrError(tls, pCtx, z, n, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }(), xDel) +} + +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ + + setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) +} + +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ + + setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) +} + +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ + + Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) +} + +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ + + Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) +} + +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ + var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + + if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { + return SQLITE_TOOBIG + } + Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) + return SQLITE_OK +} + +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { + if errCode != 0 { + return errCode + } + return -1 + }() + if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Null != 0 { + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, Xsqlite3ErrStr(tls, errCode), int64(-1), + uint8(SQLITE_UTF8), uintptr(0)) + } +} + +// Force an SQLITE_TOOBIG error. +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ + + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5276, int64(-1), + uint8(SQLITE_UTF8), uintptr(0)) +} + +// An SQLITE_NOMEM error. +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ + + Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM + Xsqlite3OomFault(tls, (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fdb) +} + +// Force the INT64 value currently stored as the result to be +// a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL +// test-control. +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ + + if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { + *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) + *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) |= U16(MEM_IntReal) + } +} + +// This function is called after a transaction has been committed. It +// invokes callbacks registered with sqlite3_wal_hook() as required. +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ + var rc int32 = SQLITE_OK + var i int32 + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + var nEntry int32 + Xsqlite3BtreeEnter(tls, pBt) + nEntry = Xsqlite3PagerWalCallback(tls, Xsqlite3BtreePager(tls, pBt)) + Xsqlite3BtreeLeave(tls, pBt) + if nEntry > 0 && (*Sqlite3)(unsafe.Pointer(db)).FxWalCallback != 0 && rc == SQLITE_OK { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxWalCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpWalArg, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName, nEntry) + } + } + } + return rc +} + +// Execute the statement pStmt, either until a row of data is ready, the +// statement is completely executed or an error occurs. +// +// This routine implements the bulk of the logic behind the sqlite_step() +// API. The only thing omitted is the automatic recompile if a +// schema change has occurred. That detail is handled by the +// outer sqlite3_step() wrapper procedure. +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ + var db uintptr + var rc int32 + + if !((*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN)) { + goto __1 + } + // We used to require that sqlite3_reset() be called before retrying + // sqlite3_step() after any error or after SQLITE_DONE. But beginning + // with version 3.7.0, we changed this so that sqlite3_reset() would + // be called automatically instead of throwing the SQLITE_MISUSE error. + // This "automatic-reset" change is not technically an incompatibility, + // since any application that receives an SQLITE_MISUSE is broken by + // definition. + // + // Nevertheless, some published applications that were originally written + // for version 3.6.23 or earlier do in fact depend on SQLITE_MISUSE + // returns, and those were broken by the automatic-reset change. As a + // a work-around, the SQLITE_OMIT_AUTORESET compile-time restores the + // legacy behavior of returning SQLITE_MISUSE for cases where the + // previous sqlite3_step() returned something other than a SQLITE_LOCKED + // or SQLITE_BUSY error. + Xsqlite3_reset(tls, p) +__1: + ; + + // Check that malloc() has not failed. If it has, return early. + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __2 + } + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + return SQLITE_NOMEM +__2: + ; + + if !((*Vdbe)(unsafe.Pointer(p)).Fpc < 0 && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) { + goto __3 + } + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_SCHEMA + rc = SQLITE_ERROR + if !(int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL != 0) { + goto __4 + } + // If this statement was prepared using saved SQL and an + // error has occurred, then return the error code in p->rc to the + // caller. Set the error code in the database handle to the same value. + rc = Xsqlite3VdbeTransferError(tls, p) +__4: + ; + goto end_of_step +__3: + ; + if !((*Vdbe)(unsafe.Pointer(p)).Fpc < 0) { + goto __5 + } + // If there are no other statements currently running, then + // reset the interrupt flag. This prevents a call to sqlite3_interrupt + // from interrupting a statement that has not yet started. + if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive == 0) { + goto __6 + } + libc.AtomicStoreNInt32(db+432, int32(0), 0) +__6: + ; + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&(SQLITE_TRACE_PROFILE|SQLITE_TRACE_XPROFILE) != 0 && + !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) && (*Vdbe)(unsafe.Pointer(p)).FzSql != 0) { + goto __7 + } + Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, p+192) + goto __8 +__7: + ; +__8: + ; + + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive++ + if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) == 0) { + goto __9 + } + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite++ +__9: + ; + if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x100>>8)) != 0) { + goto __10 + } + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead++ +__10: + ; + (*Vdbe)(unsafe.Pointer(p)).Fpc = 0 +__5: + ; + if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2)) != 0) { + goto __11 + } + rc = Xsqlite3VdbeList(tls, p) + goto __12 +__11: + + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec++ + rc = Xsqlite3VdbeExec(tls, p) + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec-- +__12: + ; + + if !(rc != SQLITE_ROW) { + goto __13 + } + // If the statement completed successfully, invoke the profile callback + if !((*Vdbe)(unsafe.Pointer(p)).FstartTime > int64(0)) { + goto __14 + } + invokeProfileCallback(tls, db, p) +__14: + ; + + if !(rc == SQLITE_DONE && (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { + goto __15 + } + + (*Vdbe)(unsafe.Pointer(p)).Frc = doWalCallbacks(tls, db) + if !((*Vdbe)(unsafe.Pointer(p)).Frc != SQLITE_OK) { + goto __17 + } + rc = SQLITE_ERROR +__17: + ; + goto __16 +__15: + if !(rc != SQLITE_DONE && int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL != 0) { + goto __18 + } + // If this statement was prepared using saved SQL and an + // error has occurred, then return the error code in p->rc to the + // caller. Set the error code in the database handle to the same value. + rc = Xsqlite3VdbeTransferError(tls, p) +__18: + ; +__16: + ; +__13: + ; + + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = rc + if !(SQLITE_NOMEM == Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).Frc)) { + goto __19 + } + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + if !(int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL != 0) { + goto __20 + } + rc = (*Vdbe)(unsafe.Pointer(p)).Frc +__20: + ; +__19: + ; +end_of_step: + // There are only a limited number of result codes allowed from the + // statements prepared using the legacy sqlite3_prepare() interface + ; + return rc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask +} + +// This is the top-level implementation of sqlite3_step(). Call +// sqlite3Step() to do most of the work. If a schema error occurs, +// call sqlite3Reprepare() and try again. +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ + var rc int32 = SQLITE_OK // Result from sqlite3Step() + var v uintptr = pStmt // the prepared statement + var cnt int32 = 0 // Counter to prevent infinite loop of reprepares + var db uintptr // The database connection + + if vdbeSafetyNotNull(tls, v) != 0 { + return Xsqlite3MisuseError(tls, 85811) + } + db = (*Vdbe)(unsafe.Pointer(v)).Fdb + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Vdbe)(unsafe.Pointer(v)).FdoingRerun = U8(0) + for libc.AssignInt32(&rc, sqlite3Step(tls, v)) == SQLITE_SCHEMA && + libc.PostIncInt32(&cnt, 1) < SQLITE_MAX_SCHEMA_RETRY { + var savedPc int32 = (*Vdbe)(unsafe.Pointer(v)).Fpc + rc = Xsqlite3Reprepare(tls, v) + if rc != SQLITE_OK { + // This case occurs after failing to recompile an sql statement. + // The error message from the SQL compiler has already been loaded + // into the database handle. This block copies the error message + // from the database handle into the statement and sets the statement + // program counter to 0 to ensure that when the statement is + // finalized or reset the parser error message is available via + // sqlite3_errmsg() and sqlite3_errcode(). + var zErr uintptr = Xsqlite3_value_text(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(v)).FzErrMsg) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + (*Vdbe)(unsafe.Pointer(v)).FzErrMsg = Xsqlite3DbStrDup(tls, db, zErr) + (*Vdbe)(unsafe.Pointer(v)).Frc = libc.AssignInt32(&rc, Xsqlite3ApiExit(tls, db, rc)) + } else { + (*Vdbe)(unsafe.Pointer(v)).FzErrMsg = uintptr(0) + (*Vdbe)(unsafe.Pointer(v)).Frc = libc.AssignInt32(&rc, SQLITE_NOMEM) + } + break + } + Xsqlite3_reset(tls, pStmt) + if savedPc >= 0 { + (*Vdbe)(unsafe.Pointer(v)).FdoingRerun = U8(1) + } + + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Extract the user data from a sqlite3_context structure and return a +// pointer to it. +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ + + return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData +} + +// Extract the user data from a sqlite3_context structure and return a +// pointer to it. +// +// IMPLEMENTATION-OF: R-46798-50301 The sqlite3_context_db_handle() interface +// returns a copy of the pointer to the database connection (the 1st +// parameter) of the sqlite3_create_function() and +// sqlite3_create_function16() routines that originally registered the +// application defined function. +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ + + return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb +} + +// If this routine is invoked from within an xColumn method of a virtual +// table, then it returns true if and only if the the call is during an +// UPDATE operation and the value of the column will not be modified +// by the UPDATE. +// +// If this routine is called from any context other than within the +// xColumn method of a virtual table, then the return value is meaningless +// and arbitrary. +// +// Virtual table implements might use this routine to optimize their +// performance by substituting a NULL result, or some other light-weight +// value, as a signal to the xUpdate routine that the column is unchanged. +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ + + return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) +} + +// Implementation of sqlite3_vtab_in_first() (if bNext==0) and +// sqlite3_vtab_in_next() (if bNext!=0). +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ + bp := tls.Alloc(68) + defer tls.Free(68) + + var rc int32 + var pRhs uintptr + + *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) + if pVal == uintptr(0) { + return SQLITE_MISUSE + } + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5299) + if pRhs == uintptr(0) { + return SQLITE_MISUSE + } + if bNext != 0 { + rc = Xsqlite3BtreeNext(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr, 0) + } else { + *(*int32)(unsafe.Pointer(bp /* dummy */)) = 0 + rc = Xsqlite3BtreeFirst(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr, bp) + + if Xsqlite3BtreeEof(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr) != 0 { + rc = SQLITE_DONE + } + } + if rc == SQLITE_OK { + var sz U32 // Size of current row in bytes + // var sMem Mem at bp+8, 56 + // Raw content of current row + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Mem{}))) + sz = Xsqlite3BtreePayloadSize(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr, uint32(int32(sz)), bp+8) + if rc == SQLITE_OK { + var zBuf uintptr = (*Mem)(unsafe.Pointer(bp + 8 /* &sMem */)).Fz + // var iSerial U32 at bp+64, 4 + + var pOut uintptr = (*ValueList)(unsafe.Pointer(pRhs)).FpOut + var iOff int32 = 1 + int32(func() uint8 { + if int32(*(*U8)(unsafe.Pointer(zBuf + 1))) < int32(U8(0x80)) { + return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*U8)(unsafe.Pointer(zBuf + 1))); return 1 }()) + } + return Xsqlite3GetVarint32(tls, zBuf+1, bp+64) + }()) + Xsqlite3VdbeSerialGet(tls, zBuf+uintptr(iOff), *(*U32)(unsafe.Pointer(bp + 64 /* iSerial */)), pOut) + (*Sqlite3_value)(unsafe.Pointer(pOut)).Fenc = (*Sqlite3)(unsafe.Pointer((*Sqlite3_value)(unsafe.Pointer(pOut)).Fdb)).Fenc + if int32((*Sqlite3_value)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0 { + rc = SQLITE_NOMEM + } else { + *(*uintptr)(unsafe.Pointer(ppOut)) = pOut + } + } + Xsqlite3VdbeMemRelease(tls, bp+8) + } + return rc +} + +// Set the iterator value pVal to point to the first value in the set. +// Set (*ppOut) to point to this value before returning. +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ + return valueFromValueList(tls, pVal, ppOut, 0) +} + +// Set the iterator value pVal to point to the next value in the set. +// Set (*ppOut) to point to this value before returning. +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ + return valueFromValueList(tls, pVal, ppOut, 1) +} + +// Return the current time for a statement. If the current time +// is requested more than once within the same run of a single prepared +// statement, the exact same time is returned for each invocation regardless +// of the amount of time that elapses between invocations. In other words, +// the time returned is always the time of the first call. +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + *(*Sqlite3_int64)(unsafe.Pointer(bp /* iTime */)) = int64(0) + var piTime uintptr + if (*Sqlite3_context)(unsafe.Pointer(p)).FpVdbe != uintptr(0) { + piTime = (*Sqlite3_context)(unsafe.Pointer(p)).FpVdbe + 80 + } else { + piTime = bp /* &iTime */ + } + if *(*Sqlite3_int64)(unsafe.Pointer(piTime)) == int64(0) { + rc = Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb)).FpVfs, piTime) + if rc != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(piTime)) = int64(0) + } + } + return *(*Sqlite3_int64)(unsafe.Pointer(piTime)) +} + +// Create a new aggregate context for p and return a pointer to +// its pMem->z element. +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ + var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem + + if nByte <= 0 { + Xsqlite3VdbeMemSetNull(tls, pMem) + (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) + } else { + Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Agg) + *(*uintptr)(unsafe.Pointer(pMem)) = (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc + if (*Mem)(unsafe.Pointer(pMem)).Fz != 0 { + libc.Xmemset(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, 0, uint64(nByte)) + } + } + return (*Mem)(unsafe.Pointer(pMem)).Fz +} + +// Allocate or return the aggregate context for a user function. A new +// context is allocated on the first call. Subsequent calls return the +// same context that was returned on prior calls. +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ + + if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { + return createAggContext(tls, p, nByte) + } else { + return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fz + } + return uintptr(0) +} + +// Return the auxiliary data pointer, if any, for the iArg'th argument to +// the user-function defined by pCtx. +// +// The left-most argument is 0. +// +// Undocumented behavior: If iArg is negative then access a cache of +// auxiliary data pointers that is available to all functions within a +// single prepared statement. The iArg values must match. +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ + var pAuxData uintptr + + if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { + return uintptr(0) + } + for pAuxData = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe)).FpAuxData; pAuxData != 0; pAuxData = (*AuxData)(unsafe.Pointer(pAuxData)).FpNextAux { + if (*AuxData)(unsafe.Pointer(pAuxData)).FiAuxArg == iArg && ((*AuxData)(unsafe.Pointer(pAuxData)).FiAuxOp == (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp || iArg < 0) { + return (*AuxData)(unsafe.Pointer(pAuxData)).FpAux + } + } + return uintptr(0) +} + +// Set the auxiliary data pointer and delete function, for the iArg'th +// argument to the user-function defined by pCtx. Any previous value is +// deleted by calling the delete function specified when it was set. +// +// The left-most argument is 0. +// +// Undocumented behavior: If iArg is negative then make the data available +// to all functions within the current prepared statement using iArg as an +// access code. +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ + var pAuxData uintptr + var pVdbe uintptr + pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe + + if !(pVdbe == uintptr(0)) { + goto __1 + } + goto failed +__1: + ; + + pAuxData = (*Vdbe)(unsafe.Pointer(pVdbe)).FpAuxData +__2: + if !(pAuxData != 0) { + goto __4 + } + if !((*AuxData)(unsafe.Pointer(pAuxData)).FiAuxArg == iArg && ((*AuxData)(unsafe.Pointer(pAuxData)).FiAuxOp == (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp || iArg < 0)) { + goto __5 + } + goto __4 +__5: + ; + goto __3 +__3: + pAuxData = (*AuxData)(unsafe.Pointer(pAuxData)).FpNextAux + goto __2 + goto __4 +__4: + ; + if !(pAuxData == uintptr(0)) { + goto __6 + } + pAuxData = Xsqlite3DbMallocZero(tls, (*Vdbe)(unsafe.Pointer(pVdbe)).Fdb, uint64(unsafe.Sizeof(AuxData{}))) + if !!(pAuxData != 0) { + goto __8 + } + goto failed +__8: + ; + (*AuxData)(unsafe.Pointer(pAuxData)).FiAuxOp = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp + (*AuxData)(unsafe.Pointer(pAuxData)).FiAuxArg = iArg + (*AuxData)(unsafe.Pointer(pAuxData)).FpNextAux = (*Vdbe)(unsafe.Pointer(pVdbe)).FpAuxData + (*Vdbe)(unsafe.Pointer(pVdbe)).FpAuxData = pAuxData + if !((*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError == 0) { + goto __9 + } + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = -1 +__9: + ; + goto __7 +__6: + if !((*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux != 0) { + goto __10 + } + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux})).f(tls, (*AuxData)(unsafe.Pointer(pAuxData)).FpAux) +__10: + ; +__7: + ; + + (*AuxData)(unsafe.Pointer(pAuxData)).FpAux = pAux + (*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux = xDelete + return + +failed: + if !(xDelete != 0) { + goto __11 + } + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDelete})).f(tls, pAux) +__11: +} + +// Return the number of times the Step function of an aggregate has been +// called. +// +// This function is deprecated. Do not use it for new code. It is +// provide only to avoid breaking legacy code. New aggregate function +// implementations should keep their own counts within their aggregate +// context. +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ + + return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn +} + +// Return the number of columns in the result set for the statement pStmt. +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ + var pVm uintptr = pStmt + if pVm != 0 { + return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) + } + return 0 +} + +// Return the number of values available from the current row of the +// currently executing statement pStmt. +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ + var pVm uintptr = pStmt + if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { + return 0 + } + return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) +} + +// Return a pointer to static memory containing an SQL NULL value. +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ + return uintptr(unsafe.Pointer(&nullMem)) +} + +var nullMem = Mem{ + /* .flags = */ Fflags: U16(MEM_Null), +} /* sqlite3.c:86144:20 */ + +// Check to see if column iCol of the given statement is valid. If +// it is, return a pointer to the Mem for the value of that column. +// If iCol is not valid, return a pointer to a Mem which has a value +// of NULL. +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ + var pVm uintptr + var pOut uintptr + + pVm = pStmt + if pVm == uintptr(0) { + return columnNullValue(tls) + } + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pVm)).Fdb)).Fmutex) + if (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet != uintptr(0) && i < int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) && i >= 0 { + pOut = (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet + uintptr(i)*56 + } else { + Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(pVm)).Fdb, SQLITE_RANGE) + pOut = columnNullValue(tls) + } + return pOut +} + +// This function is called after invoking an sqlite3_value_XXX function on a +// column value (i.e. a value returned by evaluating an SQL expression in the +// select list of a SELECT statement) that may cause a malloc() failure. If +// malloc() has failed, the threads mallocFailed flag is cleared and the result +// code of statement pStmt set to SQLITE_NOMEM. +// +// Specifically, this is called from within: +// +// sqlite3_column_int() +// sqlite3_column_int64() +// sqlite3_column_text() +// sqlite3_column_text16() +// sqlite3_column_real() +// sqlite3_column_bytes() +// sqlite3_column_bytes16() +// sqiite3_column_blob() +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ + // If malloc() failed during an encoding conversion within an + // sqlite3_column_XXX API, then set the return code of the statement to + // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR + // and _finalize() will return NOMEM. + var p uintptr = pStmt + if p != 0 { + + (*Vdbe)(unsafe.Pointer(p)).Frc = Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).Frc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } +} + +// *************************** sqlite3_column_ ******************************* +// +// The following routines are used to access elements of the current row +// in the result set. +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ + var val uintptr + val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) + // Even though there is no encoding conversion, value_blob() might + // need to call malloc() to expand the result of a zeroblob() + // expression. + columnMallocFailure(tls, pStmt) + return val +} + +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86244: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:86249: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:86254: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:86259: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:86264: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:86269:26: */ + var pOut uintptr = columnMem(tls, pStmt, i) + if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { + *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) + *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Ephem) + } + columnMallocFailure(tls, pStmt) + return pOut +} + +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86285:16: */ + var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) + columnMallocFailure(tls, pStmt) + return iType +} + +// Convert the N-th element of pStmt->pColName[] into a string using +// xFunc() then return that string. If N is out of range, return 0. +// +// There are up to 5 names for each column. useType determines which +// name is returned. Here are the names: +// +// 0 The column name as it should be displayed for output +// 1 The datatype name for the column +// 2 The name of the database that the column derives from +// 3 The name of the table that the column derives from +// 4 The name of the table column that the result column derives from +// +// If the result is not a simple column reference (if it is an expression +// or a constant) then useTypes 2, 3, and 4 return NULL. +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ + var ret uintptr + var p uintptr + var n int32 + var db uintptr + ret = uintptr(0) + p = pStmt + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + + n = Xsqlite3_column_count(tls, pStmt) + if N < n && N >= 0 { + N = N + useType*n + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + if useUtf16 != 0 { + ret = Xsqlite3_value_text16(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName+uintptr(N)*56) + } else { + ret = Xsqlite3_value_text(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName+uintptr(N)*56) + } + // A malloc may have failed inside of the _text() call. If this + // is the case, clear the mallocFailed flag and return NULL. + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3OomClear(tls, db) + ret = uintptr(0) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + } + return ret +} + +// Return the name of the Nth column of the result set returned by SQL +// statement pStmt. +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ + return columnName(tls, pStmt, N, 0, COLNAME_NAME) +} + +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ + return columnName(tls, pStmt, N, 1, COLNAME_NAME) +} + +// Constraint: If you have ENABLE_COLUMN_METADATA then you must +// not define OMIT_DECLTYPE. + +// Return the column declaration type (if applicable) of the 'i'th column +// of the result set of SQL statement pStmt. +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ + return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) +} + +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ + return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) +} + +// Return the name of the database from which a result column derives. +// NULL is returned if the result column is an expression or constant or +// anything else which is not an unambiguous reference to a database column. +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ + return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) +} + +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ + return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) +} + +// Return the name of the table from which a result column derives. +// NULL is returned if the result column is an expression or constant or +// anything else which is not an unambiguous reference to a database column. +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ + return columnName(tls, pStmt, N, 0, COLNAME_TABLE) +} + +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ + return columnName(tls, pStmt, N, 1, COLNAME_TABLE) +} + +// Return the name of the table column from which a result column derives. +// NULL is returned if the result column is an expression or constant or +// anything else which is not an unambiguous reference to a database column. +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ + return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) +} + +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ + return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) +} + +// ****************************** sqlite3_bind_ *************************** +// +// +// Routines used to attach values to wildcards in a compiled SQL statement. +// Unbind the value bound to variable i in virtual machine p. This is the +// the same as binding a NULL value to the column. If the "i" parameter is +// out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK. +// +// A successful evaluation of this routine acquires the mutex on p. +// the mutex is released if any kind of error occurs. +// +// The error code stored in database p->db is overwritten with the return +// value in any case. +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pVar uintptr + if vdbeSafetyNotNull(tls, p) != 0 { + return Xsqlite3MisuseError(tls, 86452) + } + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { + Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_MISUSE) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + Xsqlite3_log(tls, SQLITE_MISUSE, + ts+5309, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 86460) + } + if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + return SQLITE_RANGE + } + i-- + pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i)*56 + Xsqlite3VdbeMemRelease(tls, pVar) + (*Mem)(unsafe.Pointer(pVar)).Fflags = U16(MEM_Null) + (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FerrCode = SQLITE_OK + + // If the bit corresponding to this variable in Vdbe.expmask is set, then + // binding a new value to this variable invalidates the current query plan. + // + // IMPLEMENTATION-OF: R-57496-20354 If the specific value bound to a host + // parameter in the WHERE clause might influence the choice of query plan + // for a statement, then the statement will be automatically recompiled, + // as if there had been a schema change, on the first sqlite3_step() call + // following any change to the bindings of that parameter. + + if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { + if i >= 31 { + return 0x80000000 + } + return U32(U32(1)) << i + }() != U32(0) { + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) + } + return SQLITE_OK +} + +// Bind a text or BLOB value. +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ + var p uintptr = pStmt + var pVar uintptr + var rc int32 + + rc = vdbeUnbind(tls, p, i) + if rc == SQLITE_OK { + if zData != uintptr(0) { + pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 + rc = Xsqlite3VdbeMemSetStr(tls, pVar, zData, nData, encoding, xDel) + if rc == SQLITE_OK && int32(encoding) != 0 { + rc = Xsqlite3VdbeChangeEncoding(tls, pVar, int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fenc)) + } + if rc != 0 { + Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, rc) + rc = Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, rc) + } + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } else if xDel != uintptr(0) && xDel != libc.UintptrFromInt32(-1) { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDel})).f(tls, zData) + } + return rc +} + +// Bind a blob value to an SQL statement variable. +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ + return bindText(tls, pStmt, i, zData, int64(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:86540:16: */ + + return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) +} + +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ + var rc int32 + var p uintptr = pStmt + rc = vdbeUnbind(tls, p, i) + if rc == SQLITE_OK { + Xsqlite3VdbeMemSetDouble(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, rValue) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } + return rc +} + +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86563:16: */ + var rc int32 + var p uintptr = pStmt + rc = vdbeUnbind(tls, p, i) + if rc == SQLITE_OK { + Xsqlite3VdbeMemSetInt64(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, iValue) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } + return rc +} + +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ + var rc int32 + var p uintptr = pStmt + rc = vdbeUnbind(tls, p, i) + if rc == SQLITE_OK { + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } + return rc +} + +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ + var rc int32 + var p uintptr = pStmt + rc = vdbeUnbind(tls, p, i) + if rc == SQLITE_OK { + Xsqlite3VdbeMemSetPointer(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, pPtr, zPTtype, xDestructor) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } else if xDestructor != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestructor})).f(tls, pPtr) + } + return rc +} + +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ + return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) +} + +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ + + if int32(enc) == SQLITE_UTF16 { + enc = func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }() + } + return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) +} + +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ + return bindText(tls, pStmt, i, zData, int64(nData), xDel, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) +} + +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ + var rc int32 + switch Xsqlite3_value_type(tls, pValue) { + case SQLITE_INTEGER: + { + rc = Xsqlite3_bind_int64(tls, pStmt, i, *(*I64)(unsafe.Pointer(pValue))) + break + + } + case SQLITE_FLOAT: + { + + rc = Xsqlite3_bind_double(tls, pStmt, i, + func() float64 { + if int32((*Sqlite3_value)(unsafe.Pointer(pValue)).Fflags)&MEM_Real != 0 { + return *(*float64)(unsafe.Pointer(pValue)) + } + return float64(*(*I64)(unsafe.Pointer(pValue))) + }()) + break + + } + case SQLITE_BLOB: + { + if int32((*Sqlite3_value)(unsafe.Pointer(pValue)).Fflags)&MEM_Zero != 0 { + rc = Xsqlite3_bind_zeroblob(tls, pStmt, i, *(*int32)(unsafe.Pointer(pValue))) + } else { + rc = Xsqlite3_bind_blob(tls, pStmt, i, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fz, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fn, libc.UintptrFromInt32(-1)) + } + break + + } + case SQLITE_TEXT: + { + rc = bindText(tls, pStmt, i, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fz, int64((*Sqlite3_value)(unsafe.Pointer(pValue)).Fn), libc.UintptrFromInt32(-1), + (*Sqlite3_value)(unsafe.Pointer(pValue)).Fenc) + break + + } + default: + { + rc = Xsqlite3_bind_null(tls, pStmt, i) + break + + } + } + return rc +} + +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ + var rc int32 + var p uintptr = pStmt + rc = vdbeUnbind(tls, p, i) + if rc == SQLITE_OK { + Xsqlite3VdbeMemSetZeroBlob(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, n) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } + return rc +} + +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ + var rc int32 + var p uintptr = pStmt + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + if n > U64(*(*int32)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb + 136))) { + rc = SQLITE_TOOBIG + } else { + + rc = Xsqlite3_bind_zeroblob(tls, pStmt, i, int32(n)) + } + rc = Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + return rc +} + +// Return the number of wildcards that can be potentially bound to. +// This routine is added to support DBD::SQLite. +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ + var p uintptr = pStmt + if p != 0 { + return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) + } + return 0 +} + +// Return the name of a wildcard parameter. Return NULL if the index +// is out of range or if the wildcard is unnamed. +// +// The result is always UTF-8. +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ + var p uintptr = pStmt + if p == uintptr(0) { + return uintptr(0) + } + return Xsqlite3VListNumToName(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, i) +} + +// Given a wildcard parameter name, return the index of the variable +// with that name. If there is no variable with the given name, +// return 0. +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ + if p == uintptr(0) || zName == uintptr(0) { + return 0 + } + 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:86725:16: */ + return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) +} + +// Transfer all bindings from the first statement over to the second. +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ + var pFrom uintptr = pFromStmt + var pTo uintptr = pToStmt + var i int32 + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pTo)).Fdb)).Fmutex) + for i = 0; i < int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar); i++ { + Xsqlite3VdbeMemMove(tls, (*Vdbe)(unsafe.Pointer(pTo)).FaVar+uintptr(i)*56, (*Vdbe)(unsafe.Pointer(pFrom)).FaVar+uintptr(i)*56) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pTo)).Fdb)).Fmutex) + return SQLITE_OK +} + +// Deprecated external interface. Internal/core SQLite code +// should call sqlite3TransferBindings. +// +// It is misuse to call this routine with statements from different +// database connections. But as this is a deprecated interface, we +// will not bother to check for that condition. +// +// If the two statements contain a different number of bindings, then +// an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise +// SQLITE_OK is returned. +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ + var pFrom uintptr = pFromStmt + var pTo uintptr = pToStmt + if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { + return SQLITE_ERROR + } + + if (*Vdbe)(unsafe.Pointer(pTo)).Fexpmask != 0 { + libc.SetBitFieldPtr16Uint32(pTo+208, Bft(1), 0, 0x3) + } + + if (*Vdbe)(unsafe.Pointer(pFrom)).Fexpmask != 0 { + libc.SetBitFieldPtr16Uint32(pFrom+208, Bft(1), 0, 0x3) + } + return Xsqlite3TransferBindings(tls, pFromStmt, pToStmt) +} + +// Return the sqlite3* database handle to which the prepared statement given +// in the argument belongs. This is the same database handle that was +// the first argument to the sqlite3_prepare() that was used to create +// the statement in the first place. +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ + if pStmt != 0 { + return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb + } + return uintptr(0) +} + +// Return true if the prepared statement is guaranteed to not modify the +// database. +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ + if pStmt != 0 { + return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) + } + return 1 +} + +// Return 1 if the statement is an EXPLAIN and return 2 if the +// statement is an EXPLAIN QUERY PLAN +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ + if pStmt != 0 { + return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) + } + return 0 +} + +// Return true if the prepared statement is in need of being reset. +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ + var v uintptr = pStmt + return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) +} + +// Return a pointer to the next prepared statement after pStmt associated +// with database connection pDb. If pStmt is NULL, return the first +// prepared statement for the database connection. Return NULL if there +// are no more. +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ + var pNext uintptr + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) + if pStmt == uintptr(0) { + pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe + } else { + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) + return pNext +} + +// Return the value of a status counter for a prepared statement +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pVdbe uintptr = pStmt + // var v U32 at bp, 4 + + if op == SQLITE_STMTSTATUS_MEMUSED { + var db uintptr = (*Vdbe)(unsafe.Pointer(pVdbe)).Fdb + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + *(*U32)(unsafe.Pointer(bp /* v */)) = U32(0) + (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp /* &v */ + Xsqlite3VdbeClearObject(tls, db, pVdbe) + Xsqlite3DbFree(tls, db, pVdbe) + (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + } else { + *(*U32)(unsafe.Pointer(bp /* v */)) = *(*U32)(unsafe.Pointer(pVdbe + 220 + uintptr(op)*4)) + if resetFlag != 0 { + *(*U32)(unsafe.Pointer(pVdbe + 220 + uintptr(op)*4)) = U32(0) + } + } + return int32(*(*U32)(unsafe.Pointer(bp /* v */))) +} + +// Return the SQL associated with a prepared statement +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ + var p uintptr = pStmt + if p != 0 { + return (*Vdbe)(unsafe.Pointer(p)).FzSql + } + return uintptr(0) +} + +// Return the SQL associated with a prepared statement with +// bound parameters expanded. Space to hold the returned string is +// obtained from sqlite3_malloc(). The caller is responsible for +// freeing the returned string by passing it to sqlite3_free(). +// +// The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of +// expanded bound parameters. +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ + var z uintptr = uintptr(0) + var zSql uintptr = Xsqlite3_sql(tls, pStmt) + if zSql != 0 { + var p uintptr = pStmt + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + z = Xsqlite3VdbeExpandSql(tls, p, zSql) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) + } + return z +} + +// Allocate and populate an UnpackedRecord structure based on the serialized +// record in nKey/pKey. Return a pointer to the new UnpackedRecord structure +// if successful, or a NULL pointer if an OOM error is encountered. +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ + var pRet uintptr // Return value + + pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) + if pRet != 0 { + libc.Xmemset(tls, (*UnpackedRecord)(unsafe.Pointer(pRet)).FaMem, 0, uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) + Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, nKey, pKey, pRet) + } + return pRet +} + +// This function is called from within a pre-update callback to retrieve +// a field of the row currently being updated or deleted. +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ + var p uintptr + var pMem uintptr + var rc int32 + var nRec U32 + var aRec uintptr + p = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate + rc = SQLITE_OK + + // Test that this call is being made from within an SQLITE_DELETE or + // SQLITE_UPDATE pre-update callback, and that iIdx is within range. + if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { + goto __1 + } + rc = Xsqlite3MisuseError(tls, 86947) + goto preupdate_old_out +__1: + ; + if !((*PreUpdate)(unsafe.Pointer(p)).FpPk != 0) { + goto __2 + } + iIdx = int32(Xsqlite3TableColumnToIndex(tls, (*PreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx))) +__2: + ; + if !(iIdx >= int32((*VdbeCursor)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField) || iIdx < 0) { + goto __3 + } + rc = SQLITE_RANGE + goto preupdate_old_out +__3: + ; + + // If the old.* record has not yet been loaded into memory, do so now. + if !((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked == uintptr(0)) { + goto __4 + } + + nRec = Xsqlite3BtreePayloadSize(tls, *(*uintptr)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr + 48))) + aRec = Xsqlite3DbMallocRaw(tls, db, uint64(nRec)) + if !!(aRec != 0) { + goto __5 + } + goto preupdate_old_out +__5: + ; + rc = Xsqlite3BtreePayload(tls, *(*uintptr)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr + 48)), uint32(0), nRec, aRec) + if !(rc == SQLITE_OK) { + goto __6 + } + (*PreUpdate)(unsafe.Pointer(p)).FpUnpacked = vdbeUnpackRecord(tls, p+32, int32(nRec), aRec) + if !!(int32((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked) != 0) { + goto __7 + } + rc = SQLITE_NOMEM +__7: + ; +__6: + ; + if !(rc != SQLITE_OK) { + goto __8 + } + Xsqlite3DbFree(tls, db, aRec) + goto preupdate_old_out +__8: + ; + (*PreUpdate)(unsafe.Pointer(p)).FaRecord = aRec +__4: + ; + + pMem = libc.AssignPtrUintptr(ppValue, (*UnpackedRecord)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked)).FaMem+uintptr(iIdx)*56) + if !(iIdx == int32((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey)) { + goto __9 + } + Xsqlite3VdbeMemSetInt64(tls, pMem, (*PreUpdate)(unsafe.Pointer(p)).FiKey1) + goto __10 +__9: + if !(iIdx >= int32((*UnpackedRecord)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked)).FnField)) { + goto __11 + } + *(*uintptr)(unsafe.Pointer(ppValue)) = columnNullValue(tls) + goto __12 +__11: + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FaCol+uintptr(iIdx)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __13 + } + if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { + goto __14 + } + + Xsqlite3VdbeMemRealify(tls, pMem) +__14: + ; +__13: + ; +__12: + ; +__10: + ; + +preupdate_old_out: + Xsqlite3Error(tls, db, rc) + return Xsqlite3ApiExit(tls, db, rc) +} + +// This function is called from within a pre-update callback to retrieve +// the number of columns in the row being updated, deleted or inserted. +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ + var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate + return func() int32 { + if p != 0 { + return int32((*PreUpdate)(unsafe.Pointer(p)).Fkeyinfo.FnKeyField) + } + return 0 + }() +} + +// This function is designed to be called from within a pre-update callback +// only. It returns zero if the change that caused the callback was made +// immediately by a user SQL statement. Or, if the change was made by a +// trigger program, it returns the number of trigger programs currently +// on the stack (1 for a top-level trigger, 2 for a trigger fired by a +// top-level trigger etc.). +// +// For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL +// or SET DEFAULT action is considered a trigger. +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ + var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate + return func() int32 { + if p != 0 { + return (*Vdbe)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).Fv)).FnFrame + } + return 0 + }() +} + +// This function is designed to be called from within a pre-update callback +// only. +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ + var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate + return func() int32 { + if p != 0 { + return (*PreUpdate)(unsafe.Pointer(p)).FiBlobWrite + } + return -1 + }() +} + +// This function is called from within a pre-update callback to retrieve +// a field of the row currently being updated or inserted. +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ + var p uintptr + var rc int32 + var pMem uintptr + var pData uintptr + // For an INSERT, memory cell p->iNewReg contains the serialized record + // that is being inserted. Deserialize it. + var pUnpack uintptr + p = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate + rc = SQLITE_OK + + if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { + goto __1 + } + rc = Xsqlite3MisuseError(tls, 87049) + goto preupdate_new_out +__1: + ; + if !((*PreUpdate)(unsafe.Pointer(p)).FpPk != 0 && (*PreUpdate)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE) { + goto __2 + } + iIdx = int32(Xsqlite3TableColumnToIndex(tls, (*PreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx))) +__2: + ; + if !(iIdx >= int32((*VdbeCursor)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField) || iIdx < 0) { + goto __3 + } + rc = SQLITE_RANGE + goto preupdate_new_out +__3: + ; + + if !((*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { + goto __4 + } + // For an INSERT, memory cell p->iNewReg contains the serialized record + // that is being inserted. Deserialize it. + pUnpack = (*PreUpdate)(unsafe.Pointer(p)).FpNewUnpacked + if !!(pUnpack != 0) { + goto __6 + } + pData = (*Vdbe)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).Fv)).FaMem + uintptr((*PreUpdate)(unsafe.Pointer(p)).FiNewReg)*56 + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pData) + } + return 0 + }() + if !(rc != SQLITE_OK) { + goto __7 + } + goto preupdate_new_out +__7: + ; + pUnpack = vdbeUnpackRecord(tls, p+32, (*Mem)(unsafe.Pointer(pData)).Fn, (*Mem)(unsafe.Pointer(pData)).Fz) + if !!(pUnpack != 0) { + goto __8 + } + rc = SQLITE_NOMEM + goto preupdate_new_out +__8: + ; + (*PreUpdate)(unsafe.Pointer(p)).FpNewUnpacked = pUnpack +__6: + ; + pMem = (*UnpackedRecord)(unsafe.Pointer(pUnpack)).FaMem + uintptr(iIdx)*56 + if !(iIdx == int32((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey)) { + goto __9 + } + Xsqlite3VdbeMemSetInt64(tls, pMem, (*PreUpdate)(unsafe.Pointer(p)).FiKey2) + goto __10 +__9: + if !(iIdx >= int32((*UnpackedRecord)(unsafe.Pointer(pUnpack)).FnField)) { + goto __11 + } + pMem = columnNullValue(tls) +__11: + ; +__10: + ; + goto __5 +__4: + // For an UPDATE, memory cell (p->iNewReg+1+iIdx) contains the required + // value. Make a copy of the cell contents and return a pointer to it. + // It is not safe to return a pointer to the memory cell itself as the + // caller may modify the value text encoding. + ; + if !!(int32((*PreUpdate)(unsafe.Pointer(p)).FaNew) != 0) { + goto __12 + } + (*PreUpdate)(unsafe.Pointer(p)).FaNew = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(Mem{}))*uint64((*VdbeCursor)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField))) + if !!(int32((*PreUpdate)(unsafe.Pointer(p)).FaNew) != 0) { + goto __13 + } + rc = SQLITE_NOMEM + goto preupdate_new_out +__13: + ; +__12: + ; + + pMem = (*PreUpdate)(unsafe.Pointer(p)).FaNew + uintptr(iIdx)*56 + if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) == 0) { + goto __14 + } + if !(iIdx == int32((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey)) { + goto __15 + } + Xsqlite3VdbeMemSetInt64(tls, pMem, (*PreUpdate)(unsafe.Pointer(p)).FiKey2) + goto __16 +__15: + rc = Xsqlite3VdbeMemCopy(tls, pMem, (*Vdbe)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).Fv)).FaMem+uintptr((*PreUpdate)(unsafe.Pointer(p)).FiNewReg+1+iIdx)*56) + if !(rc != SQLITE_OK) { + goto __17 + } + goto preupdate_new_out +__17: + ; +__16: + ; +__14: + ; +__5: + ; + *(*uintptr)(unsafe.Pointer(ppValue)) = pMem + +preupdate_new_out: + Xsqlite3Error(tls, db, rc) + return Xsqlite3ApiExit(tls, db, rc) +} + +//************* End of vdbeapi.c ******************************************** +//************* Begin file vdbetrace.c ************************************** +// 2009 November 25 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code used to insert the values of host parameters +// (aka "wildcards") into the SQL text output by sqlite3_trace(). +// +// The Vdbe parse-tree explainer is also found here. +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// zSql is a zero-terminated string of UTF-8 SQL text. Return the number of +// bytes in this text up to but excluding the first character in +// a host parameter. If the text contains no host parameters, return +// the total number of bytes in the text. +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var tokenType int32 at bp, 4 + + var nTotal int32 = 0 + var n int32 + + *(*int32)(unsafe.Pointer(pnToken)) = 0 + for *(*uint8)(unsafe.Pointer(zSql)) != 0 { + n = Xsqlite3GetToken(tls, zSql, bp) + + if *(*int32)(unsafe.Pointer(bp)) == TK_VARIABLE { + *(*int32)(unsafe.Pointer(pnToken)) = n + break + } + nTotal = nTotal + n + zSql += uintptr(n) + } + return nTotal +} + +// This function returns a pointer to a nul-terminated string in memory +// obtained from sqlite3DbMalloc(). If sqlite3.nVdbeExec is 1, then the +// string contains a copy of zRawSql but with host parameters expanded to +// their current bindings. Or, if sqlite3.nVdbeExec is greater than 1, +// then the returned string holds a copy of zRawSql with "-- " prepended +// to each line of text. +// +// If the SQLITE_TRACE_SIZE_LIMIT macro is defined to an integer, then +// then long strings and blobs are truncated to that many bytes. This +// can be used to prevent unreasonably large trace strings when dealing +// with large (multi-megabyte) strings and blobs. +// +// The calling function is responsible for making sure the memory returned +// is eventually freed. +// +// ALGORITHM: Scan the input string looking for host parameters in any of +// these forms: ?, ?N, $A, @A, :A. Take care to avoid text within +// string literals, quoted identifier names, and comments. For text forms, +// the host parameter index is found by scanning the prepared +// statement for the corresponding OP_Variable opcode. Once the host +// parameter index is known, locate the value in p->aVar[]. Then render +// the value as a literal in place of the host parameter name. +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + var db uintptr // The database connection + *(*int32)(unsafe.Pointer(bp + 84 /* idx */)) = 0 // Index of a host parameter + var nextIndex int32 = 1 // Index of next ? host parameter + var n int32 // Length of a token prefix + // var nToken int32 at bp+80, 4 + // Length of the parameter token + var i int32 // Loop counter + var pVar uintptr // Value of a host parameter + // var out StrAccum at bp+48, 32 + // Accumulate the output here + // var utf8 Mem at bp+88, 56 + // Used to convert UTF16 into UTF8 for display + + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) + if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1 { + for *(*uint8)(unsafe.Pointer(zRawSql)) != 0 { + var zStart uintptr = zRawSql + for int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*uint8)(unsafe.Pointer(zRawSql)) != 0 { + } + Xsqlite3_str_append(tls, bp+48, ts+5349, 3) + + Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) + } + } else if int32((*Vdbe)(unsafe.Pointer(p)).FnVar) == 0 { + Xsqlite3_str_append(tls, bp+48, zRawSql, Xsqlite3Strlen30(tls, zRawSql)) + } else { + for *(*uint8)(unsafe.Pointer(zRawSql)) != 0 { + n = findNextHostParameter(tls, zRawSql, bp+80) + + Xsqlite3_str_append(tls, bp+48, zRawSql, n) + zRawSql += uintptr(n) + + if *(*int32)(unsafe.Pointer(bp + 80)) == 0 { + break + } + if int32(*(*uint8)(unsafe.Pointer(zRawSql))) == '?' { + if *(*int32)(unsafe.Pointer(bp + 80)) > 1 { + + Xsqlite3GetInt32(tls, zRawSql+1, bp+84) + } else { + *(*int32)(unsafe.Pointer(bp + 84 /* idx */)) = nextIndex + } + } else { + + *(*int32)(unsafe.Pointer(bp + 84 /* idx */)) = Xsqlite3VdbeParameterIndex(tls, p, zRawSql, *(*int32)(unsafe.Pointer(bp + 80 /* nToken */))) + + } + zRawSql += uintptr(*(*int32)(unsafe.Pointer(bp + 80 /* nToken */))) + nextIndex = func() int32 { + if *(*int32)(unsafe.Pointer(bp + 84))+1 > nextIndex { + return *(*int32)(unsafe.Pointer(bp + 84)) + 1 + } + return nextIndex + }() + + pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 84))-1)*56 + if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { + Xsqlite3_str_append(tls, bp+48, ts+1526, 4) + } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { + Xsqlite3_str_appendf(tls, bp+48, ts+1305, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Real != 0 { + Xsqlite3_str_appendf(tls, bp+48, ts+4867, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { + var nOut int32 // Number of bytes of the string text to include in output + var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc + if int32(enc) != SQLITE_UTF8 { + libc.Xmemset(tls, bp+88, 0, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(bp + 88 /* &utf8 */)).Fdb = db + Xsqlite3VdbeMemSetStr(tls, bp+88, (*Mem)(unsafe.Pointer(pVar)).Fz, int64((*Mem)(unsafe.Pointer(pVar)).Fn), enc, uintptr(0)) + if SQLITE_NOMEM == Xsqlite3VdbeChangeEncoding(tls, bp+88, SQLITE_UTF8) { + (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FaccError = U8(SQLITE_NOMEM) + (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FnAlloc = U32(0) + } + pVar = bp + 88 /* &utf8 */ + } + nOut = (*Mem)(unsafe.Pointer(pVar)).Fn + Xsqlite3_str_appendf(tls, bp+48, ts+5353, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + if int32(enc) != SQLITE_UTF8 { + Xsqlite3VdbeMemRelease(tls, bp+88) + } + } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { + Xsqlite3_str_appendf(tls, bp+48, ts+5360, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + } else { + var nOut int32 // Number of bytes of the blob to include in output + + Xsqlite3_str_append(tls, bp+48, ts+5373, 2) + nOut = (*Mem)(unsafe.Pointer(pVar)).Fn + for i = 0; i < nOut; i++ { + Xsqlite3_str_appendf(tls, bp+48, ts+5376, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + } + Xsqlite3_str_append(tls, bp+48, ts+5381, 1) + } + } + } + if (*StrAccum)(unsafe.Pointer(bp+48)).FaccError != 0 { + Xsqlite3_str_reset(tls, bp+48) + } + return Xsqlite3StrAccumFinish(tls, bp+48) +} + +//************* End of vdbetrace.c ****************************************** +//************* Begin file vdbe.c ******************************************* +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// The code in this file implements the function that runs the +// bytecode of a prepared statement. +// +// Various scripts scan this source file in order to generate HTML +// documentation, headers files, or other derived files. The formatting +// of the code in this file is, therefore, important. See other comments +// in this file for details. If in doubt, do not deviate from existing +// commenting and indentation practices when changing or adding code. +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// Invoke this macro on memory cells just prior to changing the +// value of the cell. This macro verifies that shallow copies are +// not misused. A shallow copy of a string or blob just copies a +// pointer to the string or blob, not the content. If the original +// is changed while the copy is still in use, the string or blob might +// be changed out from under the copy. This macro verifies that nothing +// like that ever happens. + +// The following global variable is incremented every time a cursor +// moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes. The test +// procedures use this information to make sure that indices are +// working correctly. This variable has no function other than to +// help verify the correct operation of the library. + +// When this global variable is positive, it gets decremented once before +// each instruction in the VDBE. When it reaches zero, the u1.isInterrupted +// field of the sqlite3 structure is set in order to simulate an interrupt. +// +// This facility is used for testing purposes only. It does not function +// in an ordinary build. + +// The next global variable is incremented each type the OP_Sort opcode +// is executed. The test procedures use this information to make sure that +// sorting is occurring or not occurring at appropriate times. This variable +// has no function other than to help verify the correct operation of the +// library. + +// The next global variable records the size of the largest MEM_Blob +// or MEM_Str that has been used by a VDBE opcode. The test procedures +// use this information to make sure that the zero-blob functionality +// is working correctly. This variable has no function other than to +// help verify the correct operation of the library. + +// This macro evaluates to true if either the update hook or the preupdate +// hook are enabled for database connect DB. + +// The next global variable is incremented each time the OP_Found opcode +// is executed. This is used to test whether or not the foreign key +// operation implemented using OP_FkIsZero is working. This variable +// has no function other than to help verify the correct operation of the +// library. + +// Test a register to see if it exceeds the current maximum blob size. +// If it does, record the new maximum blob size. + +// Invoke the VDBE coverage callback, if that callback is defined. This +// feature is used for test suite validation only and does not appear an +// production builds. +// +// M is the type of branch. I is the direction taken for this instance of +// the branch. +// +// M: 2 - two-way branch (I=0: fall-thru 1: jump ) +// 3 - two-way + NULL (I=0: fall-thru 1: jump 2: NULL ) +// 4 - OP_Jump (I=0: jump p1 1: jump p2 2: jump p3) +// +// In other words, if M is 2, then I is either 0 (for fall-through) or +// 1 (for when the branch is taken). If M is 3, the I is 0 for an +// ordinary fall-through, I is 1 if the branch was taken, and I is 2 +// if the result of comparison is NULL. For M=3, I=2 the jump may or +// may not be taken, depending on the SQLITE_JUMPIFNULL flags in p5. +// When M is 4, that means that an OP_Jump is being run. I is 0, 1, or 2 +// depending on if the operands are less than, equal, or greater than. +// +// iSrcLine is the source code line (from the __LINE__ macro) that +// generated the VDBE instruction combined with flag bits. The source +// code line number is in the lower 24 bits of iSrcLine and the upper +// 8 bytes are flags. The lower three bits of the flags indicate +// values for I that should never occur. For example, if the branch is +// always taken, the flags should be 0x05 since the fall-through and +// alternate branch are never taken. If a branch is never taken then +// flags should be 0x06 since only the fall-through approach is allowed. +// +// Bit 0x08 of the flags indicates an OP_Jump opcode that is only +// interested in equal or not-equal. In other words, I==0 and I==2 +// should be treated as equivalent +// +// Since only a line number is retained, not the filename, this macro +// only works for amalgamation builds. But that is ok, since these macros +// should be no-ops except for special builds used to measure test coverage. + +// An ephemeral string value (signified by the MEM_Ephem flag) contains +// a pointer to a dynamically allocated string where some other entity +// is responsible for deallocating that string. Because the register +// does not control the string, it might be deleted without the register +// knowing it. +// +// This routine converts an ephemeral string into a dynamically allocated +// string that the register itself controls. In other words, it +// converts an MEM_Ephem string into a string with P.z==P.zMalloc. + +// Return true if the cursor was opened using the OP_OpenSorter opcode. + +// Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL +// if we run out of memory. +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ + // Find the memory cell that will be used to store the blob of memory + // required for this VdbeCursor structure. It is convenient to use a + // vdbe memory cell to manage the memory allocation required for a + // VdbeCursor structure for the following reasons: + // + // * Sometimes cursor numbers are used for a couple of different + // purposes in a vdbe program. The different uses might require + // different sized allocations. Memory cells provide growable + // allocations. + // + // * When using ENABLE_MEMORY_MANAGEMENT, memory cell buffers can + // be freed lazily via the sqlite3_release_memory() API. This + // minimizes the number of malloc calls made by the system. + // + // The memory cell for cursor 0 is aMem[0]. The rest are allocated from + // the top of the register space. Cursor 1 is at Mem[p->nMem-1]. + // Cursor 2 is at Mem[p->nMem-2]. And so forth. + var pMem uintptr + if iCur > 0 { + pMem = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Vdbe)(unsafe.Pointer(p)).FnMem-iCur)*56 + } else { + pMem = (*Vdbe)(unsafe.Pointer(p)).FaMem + } + var nByte int32 + var pCx uintptr = uintptr(0) + nByte = int32((uint64(unsafe.Sizeof(VdbeCursor{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(2)*uint64(unsafe.Sizeof(U32(0)))*uint64(nField) + func() uint64 { + if int32(eCurType) == CURTYPE_BTREE { + return uint64(Xsqlite3BtreeCursorSize(tls)) + } + return uint64(0) + }()) + + if *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) != 0 { //OPTIMIZATION-IF-FALSE + Xsqlite3VdbeFreeCursor(tls, p, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8))) + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = uintptr(0) + } + + // There used to be a call to sqlite3VdbeMemClearAndResize() to make sure + // the pMem used to hold space for the cursor has enough storage available + // in pMem->zMalloc. But for the special case of the aMem[] entries used + // to hold cursors, it is faster to in-line the logic. + + if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < nByte { + if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 { + Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) + } + (*Mem)(unsafe.Pointer(pMem)).Fz = libc.AssignPtrUintptr(pMem+24, Xsqlite3DbMallocRaw(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, uint64(nByte))) + if (*Mem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) { + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 + return uintptr(0) + } + (*Mem)(unsafe.Pointer(pMem)).FszMalloc = nByte + } + + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = libc.AssignUintptr(&pCx, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) + libc.Xmemset(tls, pCx, 0, uint64(uintptr(0)+40)) + (*VdbeCursor)(unsafe.Pointer(pCx)).FeCurType = eCurType + (*VdbeCursor)(unsafe.Pointer(pCx)).FnField = I16(nField) + (*VdbeCursor)(unsafe.Pointer(pCx)).FaOffset = pCx + 112 + uintptr(nField)*4 + if int32(eCurType) == CURTYPE_BTREE { + *(*uintptr)(unsafe.Pointer(pCx + 48)) = (*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((uint64(unsafe.Sizeof(VdbeCursor{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))+uint64(2)*uint64(unsafe.Sizeof(U32(0)))*uint64(nField)) + Xsqlite3BtreeCursorZero(tls, *(*uintptr)(unsafe.Pointer(pCx + 48))) + } + return pCx +} + +// The string in pRec is known to look like an integer and to have a +// floating point value of rValue. Return true and set *piValue to the +// integer value if the string is in range to be an integer. Otherwise, +// return false. +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ + var iValue I64 = I64(rValue) + if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { + *(*I64)(unsafe.Pointer(piValue)) = iValue + return 1 + } + return libc.Bool32(0 == Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pRec)).Fz, piValue, (*Mem)(unsafe.Pointer(pRec)).Fn, (*Mem)(unsafe.Pointer(pRec)).Fenc)) +} + +// Try to convert a value into a numeric representation if we can +// do so without loss of information. In other words, if the string +// looks like a number, convert it into a number. If it does not +// look like a number, leave it alone. +// +// If the bTryForInt flag is true, then extra effort is made to give +// an integer representation. Strings that look like floating point +// values but which have no fractional component (example: '48.00') +// will have a MEM_Int representation when bTryForInt is true. +// +// If bTryForInt is false, then if the input string contains a decimal +// point or exponential notation, the result is only MEM_Real, even +// if there is an exact integer representation of the quantity. +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var rValue float64 at bp, 8 + + var enc U8 = (*Mem)(unsafe.Pointer(pRec)).Fenc + var rc int32 + + rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pRec)).Fz, bp, (*Mem)(unsafe.Pointer(pRec)).Fn, enc) + if rc <= 0 { + return + } + if rc == 1 && alsoAnInt(tls, pRec, *(*float64)(unsafe.Pointer(bp)), pRec) != 0 { + *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Int) + } else { + *(*float64)(unsafe.Pointer(pRec)) = *(*float64)(unsafe.Pointer(bp /* rValue */)) + *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) + if bTryForInt != 0 { + Xsqlite3VdbeIntegerAffinity(tls, pRec) + } + } + // TEXT->NUMERIC is many->one. Hence, it is important to invalidate the + // string representation after computing a numeric equivalent, because the + // string representation might not be the canonical representation for the + // numeric value. Ticket [343634942dd54ab57b7024] 2018-01-31. + *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Str)) +} + +// Processing is determine by the affinity parameter: +// +// SQLITE_AFF_INTEGER: +// SQLITE_AFF_REAL: +// SQLITE_AFF_NUMERIC: +// Try to convert pRec to an integer representation or a +// floating-point representation if an integer representation +// is not possible. Note that the integer representation is +// always preferred, even if the affinity is REAL, because +// an integer representation is more space efficient on disk. +// +// SQLITE_AFF_TEXT: +// Convert pRec to a text representation. +// +// SQLITE_AFF_BLOB: +// SQLITE_AFF_NONE: +// No-op. pRec is unchanged. +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:87759:13: */ + if int32(affinity) >= SQLITE_AFF_NUMERIC { + + if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE + if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real == 0 { + if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0 { + applyNumericAffinity(tls, pRec, 1) + } + } else { + Xsqlite3VdbeIntegerAffinity(tls, pRec) + } + } + } else if int32(affinity) == SQLITE_AFF_TEXT { + // Only attempt the conversion to TEXT if there is an integer or real + // representation (blob and NULL do not get converted) but no string + // representation. It would be harmless to repeat the conversion if + // there is already a string rep, but it is pointless to waste those + // CPU cycles. + if 0 == int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str { //OPTIMIZATION-IF-FALSE + if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Real|MEM_Int|MEM_IntReal) != 0 { + + Xsqlite3VdbeMemStringify(tls, pRec, enc, uint8(1)) + } + } + *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Real | MEM_Int | MEM_IntReal)) + } +} + +// Try to convert the type of a function argument or a result column +// into a numeric representation. Use either INTEGER or REAL whichever +// is appropriate. But only do the conversion if it is possible without +// loss of information and return the revised type of the argument. +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ + var eType int32 = Xsqlite3_value_type(tls, pVal) + if eType == SQLITE_TEXT { + var pMem uintptr = pVal + applyNumericAffinity(tls, pMem, 0) + eType = Xsqlite3_value_type(tls, pVal) + } + return eType +} + +// Exported version of applyAffinity(). This one works on sqlite3_value*, +// not the internal Mem* type. +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ + applyAffinity(tls, pVal, uint8(affinity), enc) +} + +// pMem currently only holds a string type (or maybe a BLOB that we can +// interpret as a string if we want to). Compute its corresponding +// numeric type, if has one. Set the pMem->u.r and pMem->u.i fields +// accordingly. +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + // var ix Sqlite3_int64 at bp, 8 + + if func() int32 { + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pMem) + } + return 0 + }() != 0 { + *(*I64)(unsafe.Pointer(pMem)) = int64(0) + return U16(MEM_Int) + } + rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) + if rc <= 0 { + if rc == 0 && Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) <= 1 { + *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp /* ix */)) + return U16(MEM_Int) + } else { + return U16(MEM_Real) + } + } else if rc == 1 && Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) == 0 { + *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp /* ix */)) + return U16(MEM_Int) + } + return U16(MEM_Real) +} + +// Return the numeric type for pMem, either MEM_Int or MEM_Real or both or +// none. +// +// Unlike applyNumericAffinity(), this routine does not modify pMem->flags. +// But it does set pMem->u.r and pMem->u.i appropriately. +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { + + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) + } + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { + + return computeNumericType(tls, pMem) + } + return U16(0) +} + +// Return the register of pOp->p2 after first preparing it to be +// overwritten with an integer value. +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ + Xsqlite3VdbeMemSetNull(tls, pOut) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) + return pOut +} + +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ + var pOut uintptr + + pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 + + if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { //OPTIMIZATION-IF-FALSE + return out2PrereleaseWithClear(tls, pOut) + } else { + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) + return pOut + } + return uintptr(0) +} + +// Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning +// with pOp->p3. Return the hash. +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ + var i int32 + var mx int32 + var h U64 = uint64(0) + + i = (*Op)(unsafe.Pointer(pOp)).Fp3 + mx = i + *(*int32)(unsafe.Pointer(pOp + 16)) + for ; i < mx; i++ { + var p uintptr = aMem + uintptr(i)*56 + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { + h = h + U64(*(*I64)(unsafe.Pointer(p))) + } else if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Real != 0 { + h = h + U64(Xsqlite3VdbeIntValue(tls, p)) + } else if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { + h = h + U64((*Mem)(unsafe.Pointer(p)).Fn) + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { + h = h + U64(*(*int32)(unsafe.Pointer(p))) + } + } + } + return h +} + +// Return the symbolic name for the data type of a pMem +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ + return azTypes[Xsqlite3_value_type(tls, pMem)-1] +} + +var azTypes = [5]uintptr{ + ts + 1086, + ts + 1098, + ts + 1103, + ts + 1081, + ts + 1526, +} /* sqlite3.c:88078:21 */ + +// Execute as much of a VDBE program as we can. +// This is the core of sqlite3_step(). +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ + bp := tls.Alloc(976) + defer tls.Free(976) + + var aOp uintptr // Copy of p->aOp + var pOp uintptr // Current operation + var rc int32 // Value to return + var db uintptr // The database + var resetSchemaOnFault U8 // Reset schema after an error if positive + var encoding U8 // The database encoding + var iCompare int32 // Result of last comparison + var nVmStep U64 // Number of virtual machine steps + var nProgressLimit U64 // Invoke xProgress() when nVmStep reaches this + var aMem uintptr // Copy of p->aMem + var pIn1 uintptr // 1st input operand + var pIn2 uintptr // 2nd input operand + var pIn3 uintptr // 3rd input operand + var pOut uintptr + var iPrior U32 // in1 + var pCaller uintptr // in1, jump + var pcDest int32 + var pFrame uintptr + var pcx int32 // out2 + var cnt int32 + var nullFlag U16 // out2 + var pVar uintptr + var n int32 // Number of registers left to copy + var p1 int32 // Register to copy from + var p2 int32 + var n1 int32 + var pMem uintptr + var i int32 // same as TK_CONCAT, in1, in2, out3 + var nByte I64 // Total size of the output string or blob + var flags1 U16 // Initial flags for P1 + var flags2 U16 // same as TK_REM, in1, in2, out3 + var flags U16 // Combined MEM_* flags from both inputs + var type1 U16 // Numeric type of left operand + var type2 U16 // Numeric type of right operand + var iA I64 // Integer value of left operand + // var iB I64 at bp+208, 8 + // Integer value of right operand + var rA float64 // Real value of left operand + var rB float64 // same as TK_RSHIFT, in1, in2, out3 + // var iA1 I64 at bp+224, 8 + + // var uA U64 at bp+216, 8 + + var iB1 I64 + var op U8 // same as TK_GE, jump, in1, in3 + var res int32 + var res2 int32 // Result of the comparison of pIn1 against pIn3 + var affinity uint8 // Affinity to use for comparison + var flags11 U16 // Copy of initial value of pIn1->flags + var flags3 U16 + var n2 int32 + var i1 int32 + var p11 int32 + var p21 int32 + var pKeyInfo uintptr + var idx U32 + var pColl uintptr // Collating sequence to use on this term + var bRev int32 // True for DESCENDING sort order + var aPermute uintptr // same as TK_OR, in1, in2, out3 + var v1 int32 // Left operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL + var v2 int32 // jump + var iAddr U32 // jump, in1 + var c int32 // jump, in1 + var c1 int32 // jump, in1 + var doTheJump int32 // out3 + var pC uintptr + // var p22 U32 at bp+240, 4 + // column number to retrieve + // var pC1 uintptr at bp+232, 8 + // The VDBE cursor + var pCrsr uintptr // The BTree cursor + var aOffset uintptr // aOffset[i] is offset to start of data for i-th column + var len int32 // The length of the serialized data for the column + var i2 int32 // Loop counter + var pDest uintptr // Where to write the extracted value + // var sMem Mem at bp+248, 56 + // For storing the record being decoded + var zData uintptr // Part of the record being decoded + var zHdr uintptr // Next unparsed byte of the header + var zEndHdr uintptr // Pointer to first byte after the header + var offset64 U64 // 64-bit offset + // var t U32 at bp+304, 4 + // A type code from the record header + var pReg uintptr + var pTab uintptr + var aCol uintptr + var i3 int32 + var zAffinity uintptr + // Figure out whether to use 1, 2, 4, 6 or 8 bytes. + var i4 I64 + var uu U64 + var pRec uintptr // The new record + var nData U64 // Number of bytes of data space + var nHdr int32 // Number of bytes of header space + var nByte1 I64 // Data space required for this record + var nZero I64 // Number of zero bytes at the end of the record + var nVarint int32 // Number of bytes in a varint + var serial_type U32 // Type field + var pData0 uintptr // First field to be combined into the record + var pLast uintptr // Last field of the record + var nField int32 // Number of fields in the record + var zAffinity1 uintptr // The affinity string for the record + var file_format int32 // File format to use for encoding + var len1 U32 // Length of a field + var zHdr1 uintptr // Where to write next byte of the header + var zPayload uintptr // out2 + // var nEntry I64 at bp+312, 8 + + var pCrsr1 uintptr + var isSchemaChange int32 + + // Determine whether or not this is a transaction savepoint. If so, + // and this is a RELEASE command, then the current transaction + // is committed. + var isTransaction int32 + var p12 int32 // Value of P1 operand + var zName uintptr // Name of savepoint + var nName int32 + var pNew uintptr + var pSavepoint uintptr + var pTmp uintptr + var iSavepoint int32 + var ii int32 + var desiredAutoCommit int32 + var iRollback int32 + var pBt uintptr + // var iMeta int32 at bp+320, 4 + // out2 + // var iMeta1 int32 at bp+324, 4 + + var iDb int32 + var iCookie int32 + var pDb uintptr + var nField1 int32 + var pKeyInfo1 uintptr + var p23 U32 + var iDb1 int32 + var wrFlag int32 + var pX uintptr + var pCur uintptr + var pDb1 uintptr + var pOrig uintptr // The original cursor to be duplicated + var pCx uintptr + var pCx1 uintptr + var pKeyInfo2 uintptr + var pCx2 uintptr + var pC2 uintptr + var pCx3 uintptr + var c2 int32 + var flags31 U16 + var newType U16 // jump, in3, group + // var res1 int32 at bp+328, 4 + // Comparison result + var oc int32 // Opcode + var pC3 uintptr // The cursor to seek + // var r UnpackedRecord at bp+336, 24 + // The key to seek for + var nField2 int32 // Number of columns or fields in the key + var iKey I64 // The rowid we are to seek to + var eqOnly int32 + var pC4 uintptr + // var res3 int32 at bp+384, 4 + + var nStep int32 + // var r1 UnpackedRecord at bp+360, 24 + + var pC5 uintptr // jump, in3 + var pC6 uintptr // jump, in3 + var alreadyExists int32 + var takeJump int32 + var ii1 int32 + var pC7 uintptr + // var res4 int32 at bp+416, 4 + + var pFree uintptr + var pIdxKey uintptr + // var r2 UnpackedRecord at bp+392, 24 + + // If pIn3->u.i does not contain an integer, compute iKey as the + // integer value of pIn3. Jump to P2 if pIn3 cannot be converted + // into an integer without loss of information. Take care to avoid + // changing the datatype of pIn3, however, as it is used by other + // parts of the prepared statement. + // var x Mem at bp+424, 56 + // jump, in3 + var pC8 uintptr + var pCrsr2 uintptr + // var res5 int32 at bp+480, 4 + + var iKey1 U64 // out2 + // var v I64 at bp+488, 8 + // The new rowid + var pC9 uintptr // Cursor of table to get the new rowid + // var res6 int32 at bp+484, 4 + // Result of an sqlite3BtreeLast() + var cnt1 int32 // Counter to limit the number of searches + var pMem1 uintptr // Register holding largest rowid for AUTOINCREMENT + var pFrame1 uintptr + var pData uintptr // MEM cell holding data for the record to be inserted + var pKey uintptr // MEM cell holding key for the record + var pC10 uintptr // Cursor to table into which insert is written + var seekResult int32 // Result of prior seek or 0 if no USESEEKRESULT flag + var zDb uintptr // database name - used by the update hook + var pTab1 uintptr // Table structure - used by update and pre-update hooks + // var x1 BtreePayload at bp+496, 48 + + var pDest1 uintptr // Cursor to write to + var pSrc uintptr // Cursor to read from + var iKey2 I64 + var pC11 uintptr + var zDb1 uintptr + var pTab2 uintptr + var opflags int32 + var pC12 uintptr + // var res7 int32 at bp+544, 4 + + var nKeyCol int32 + var pC13 uintptr + var pC14 uintptr + var pCrsr3 uintptr + var n3 U32 // out2 + var pC15 uintptr + // var v3 I64 at bp+552, 8 + + var pVtab uintptr + var pModule uintptr + var pC16 uintptr // jump + var pC17 uintptr + var pCrsr4 uintptr + // var res8 int32 at bp+560, 4 + // jump + var pC18 uintptr + var pCrsr5 uintptr + // var res9 int32 at bp+564, 4 + + var sz I64 // jump + var pC19 uintptr + var pCrsr6 uintptr + // var res10 int32 at bp+568, 4 + // jump + var pC20 uintptr // in2 + var pC21 uintptr + // var x2 BtreePayload at bp+576, 48 + // in2 + var pC22 uintptr + var pC23 uintptr + var pCrsr7 uintptr + // var res11 int32 at bp+648, 4 + + // var r3 UnpackedRecord at bp+624, 24 + // out2 + var pC24 uintptr // The P1 index cursor + var pTabCur uintptr // The P2 table cursor (OP_DeferredSeek only) + // var rowid I64 at bp+656, 8 + + var pC25 uintptr + var nCellKey I64 + var pCur1 uintptr + // var m Mem at bp+664, 56 + // jump + var pC26 uintptr + var res12 int32 + // var r4 UnpackedRecord at bp+720, 24 + // out2 + // var iMoved int32 at bp+744, 4 + + var iDb2 int32 + // var nChange I64 at bp+752, 8 + + var pC27 uintptr // out2 + // var pgno Pgno at bp+760, 4 + + var pDb2 uintptr + var iDb3 int32 + var zSchema uintptr + var zSql uintptr + // var initData InitData at bp+768, 40 + + var nRoot int32 // Number of tables to check. (Number of root pages.) + var aRoot uintptr // Array of rootpage numbers for tables to be checked + // var nErr int32 at bp+808, 4 + // Number of errors reported + var z uintptr // Text of the error report + var pnErr uintptr // jump, in1, out3 + // var val I64 at bp+816, 8 + // jump, in1, in3 + var iSet int32 + var exists int32 // jump + var nMem int32 // Number of memory registers for sub-program + var nByte2 int32 // Bytes of runtime space required for sub-program + var pRt uintptr // Register to allocate runtime space + var pMem2 uintptr // Used to iterate through memory cells + var pEnd uintptr // Last memory cell in new array + var pFrame2 uintptr // New vdbe frame to execute in + var pProgram uintptr // Sub-program to execute + var t1 uintptr // out2 + var pFrame3 uintptr + var pIn uintptr // in2 + var pFrame4 uintptr // in1, out2, in3 + // var x3 I64 at bp+824, 8 + + var n4 int32 + var pCtx uintptr + var i5 int32 + var pCtx1 uintptr + var pMem3 uintptr + var pMem4 uintptr + var i6 int32 // Loop counter + // var aRes [3]int32 at bp+832, 12 + // Results + var pMem5 uintptr // out2 + var pBt1 uintptr // Btree to change journal mode of + var pPager uintptr // Pager associated with pBt + var eNew int32 // New journal mode + var eOld int32 // The old journal mode + var zFilename uintptr // jump + var pBt2 uintptr + var pC28 uintptr + var pC29 uintptr + var z1 uintptr + var p13 int32 + var isWriteLock U8 + var pVTab uintptr + // var sMem1 Mem at bp+848, 56 + // For storing the record being decoded + var zTab uintptr + var pCur2 uintptr + // var pVCur uintptr at bp+904, 8 + + var pVtab1 uintptr + var pModule1 uintptr // out2 + var pC30 uintptr // The cursor containing the RHS values + var pRhs uintptr // jump + var nArg int32 + var iQuery int32 + var pModule2 uintptr + var pQuery uintptr + var pArgc uintptr + var pVCur1 uintptr + var pVtab2 uintptr + var pCur3 uintptr + var res13 int32 + var i7 int32 + var apArg uintptr + var pVtab3 uintptr + var pModule3 uintptr + var pDest2 uintptr + // var sContext Sqlite3_context at bp+912, 56 + + var pCur4 uintptr // jump + var pVtab4 uintptr + var pModule4 uintptr + var res14 int32 + var pCur5 uintptr + var pVtab5 uintptr + var pName uintptr + var isLegacy int32 + var vtabOnConflict U8 + var pVtab6 uintptr + var pModule5 uintptr + var nArg1 int32 + var i8 int32 + // var rowid1 Sqlite_int64 at bp+968, 8 + + var apArg1 uintptr + var pX1 uintptr // out2 + var newMax uint32 + var pBt3 uintptr // group + var i9 int32 + var pCtx2 uintptr + var h U64 // jump + var h1 U64 + var z2 uintptr + var z3 uintptr // jump + var i10 int32 + var zTrace uintptr + aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + pOp = aOp + rc = SQLITE_OK + db = (*Vdbe)(unsafe.Pointer(p)).Fdb + resetSchemaOnFault = U8(0) + encoding = (*Sqlite3)(unsafe.Pointer(db)).Fenc + iCompare = 0 + nVmStep = uint64(0) + aMem = (*Vdbe)(unsafe.Pointer(p)).FaMem + pIn1 = uintptr(0) + pIn2 = uintptr(0) + pIn3 = uintptr(0) + pOut = uintptr(0) // Output operand + //** INSERT STACK UNION HERE ** + + // sqlite3_step() verifies this + Xsqlite3VdbeEnter(tls, p) + if !((*Sqlite3)(unsafe.Pointer(db)).FxProgress != 0) { + goto __1 + } + iPrior = *(*U32)(unsafe.Pointer(p + 220 + 4*4)) + + nProgressLimit = U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps - iPrior%(*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) + goto __2 +__1: + nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 +__2: + ; + if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_NOMEM) { + goto __3 + } + // This happens if a malloc() inside a call to sqlite3_column_text() or + // sqlite3_column_text16() failed. + goto no_mem +__3: + ; + + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK + + (*Vdbe)(unsafe.Pointer(p)).FiCurrentTime = int64(0) + + (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 + if !(libc.AtomicLoadNInt32(db+432, 0) != 0) { + goto __4 + } + goto abort_due_to_interrupt +__4: + ; + + pOp = aOp + uintptr((*Vdbe)(unsafe.Pointer(p)).Fpc)*24 +__5: + if !(1 != 0) { + goto __7 + } + // Errors are detected by individual opcodes, with an immediate + // jumps to abort_due_to_error. + + nVmStep++ + + // Only allow tracing if SQLITE_DEBUG is defined. + + // Check to see if we need to simulate an interrupt. This only happens + // if we have a special test build. + + // Sanity checking on other operands + + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + + // **************************************************************************** + // + // What follows is a massive switch statement where each case implements a + // separate instruction in the virtual machine. If we follow the usual + // indentation conventions, each case should be indented by 6 spaces. But + // that is a lot of wasted space on the left margin. So the code within + // the switch statement will break with convention and be flush-left. Another + // big comment (similar to this one) will mark the point in the code where + // we transition back to normal indentation. + // + // The formatting of each case is important. The makefile for SQLite + // generates two C files "opcodes.h" and "opcodes.c" by scanning this + // file looking for lines that begin with "case OP_". The opcodes.h files + // will be filled with #defines that give unique integer values to each + // opcode and the opcodes.c file is filled with an array of strings where + // each string is the symbolic name for the corresponding opcode. If the + // case statement is followed by a comment of the form "/# same as ... #/" + // that comment is used to determine the particular value of the opcode. + // + // Other keywords in the comment that follows each case are used to + // construct the OPFLG_INITIALIZER value that initializes opcodeProperty[]. + // Keywords include: in1, in2, in3, out2, out3. See + // the mkopcodeh.awk script for additional information. + // + // Documentation about VDBE opcodes is generated by scanning this file + // for lines of that contain "Opcode:". That line and all subsequent + // comment lines are used in the generation of the opcode.html documentation + // file. + // + // SUMMARY: + // + // Formatting is important to scripts that scan this file. + // Do not deviate from the formatting style currently in use. + // + // + + // Opcode: Goto * P2 * * * + // + // An unconditional jump to address P2. + // The next instruction executed will be + // the one at index P2 from the beginning of + // the program. + // + // The P1 parameter is not actually used by this opcode. However, it + // is sometimes set to 1 instead of 0 as a hint to the command-line shell + // that this Goto is the bottom of a loop and that the lines from P2 down + // to the current line should be indented for EXPLAIN output. + case OP_Goto: + goto __9 + + // Opcode: Gosub P1 P2 * * * + // + // Write the current address onto register P1 + // and then jump to address P2. + case OP_Gosub: + goto __10 + + // Opcode: Return P1 * * * * + // + // Jump to the next instruction after the address in register P1. After + // the jump, register P1 becomes undefined. + case OP_Return: + goto __11 + + // Opcode: InitCoroutine P1 P2 P3 * * + // + // Set up register P1 so that it will Yield to the coroutine + // located at address P3. + // + // If P2!=0 then the coroutine implementation immediately follows + // this opcode. So jump over the coroutine implementation to + // address P2. + // + // See also: EndCoroutine + case OP_InitCoroutine: + goto __12 + + // Opcode: EndCoroutine P1 * * * * + // + // The instruction at the address in register P1 is a Yield. + // Jump to the P2 parameter of that Yield. + // After the jump, register P1 becomes undefined. + // + // See also: InitCoroutine + case OP_EndCoroutine: + goto __13 + + // Opcode: Yield P1 P2 * * * + // + // Swap the program counter with the value in register P1. This + // has the effect of yielding to a coroutine. + // + // If the coroutine that is launched by this instruction ends with + // Yield or Return then continue to the next instruction. But if + // the coroutine launched by this instruction ends with + // EndCoroutine, then jump to P2 rather than continuing with the + // next instruction. + // + // See also: InitCoroutine + case OP_Yield: + goto __14 + + // Opcode: HaltIfNull P1 P2 P3 P4 P5 + // Synopsis: if r[P3]=null halt + // + // Check the value in register P3. If it is NULL then Halt using + // parameter P1, P2, and P4 as if this were a Halt instruction. If the + // value in register P3 is not NULL, then this routine is a no-op. + // The P5 parameter should be 1. + case OP_HaltIfNull: + goto __15 + + // Opcode: Halt P1 P2 * P4 P5 + // + // Exit immediately. All open cursors, etc are closed + // automatically. + // + // P1 is the result code returned by sqlite3_exec(), sqlite3_reset(), + // or sqlite3_finalize(). For a normal halt, this should be SQLITE_OK (0). + // For errors, it can be some other value. If P1!=0 then P2 will determine + // whether or not to rollback the current transaction. Do not rollback + // if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort, + // then back out all changes that have occurred during this execution of the + // VDBE, but do not rollback the transaction. + // + // If P4 is not null then it is an error message string. + // + // P5 is a value between 0 and 4, inclusive, that modifies the P4 string. + // + // 0: (no change) + // 1: NOT NULL contraint failed: P4 + // 2: UNIQUE constraint failed: P4 + // 3: CHECK constraint failed: P4 + // 4: FOREIGN KEY constraint failed: P4 + // + // If P5 is not zero and P4 is NULL, then everything after the ":" is + // omitted. + // + // There is an implied "Halt 0 0 0" instruction inserted at the very end of + // every program. So a jump past the last instruction of the program + // is the same as executing Halt. + case OP_Halt: + goto __16 + + // Opcode: Integer P1 P2 * * * + // Synopsis: r[P2]=P1 + // + // The 32-bit integer value P1 is written into register P2. + case OP_Integer: + goto __17 + + // Opcode: Int64 * P2 * P4 * + // Synopsis: r[P2]=P4 + // + // P4 is a pointer to a 64-bit integer value. + // Write that value into register P2. + case OP_Int64: + goto __18 + + // Opcode: Real * P2 * P4 * + // Synopsis: r[P2]=P4 + // + // P4 is a pointer to a 64-bit floating point value. + // Write that value into register P2. + case OP_Real: + goto __19 + + // Opcode: String8 * P2 * P4 * + // Synopsis: r[P2]='P4' + // + // P4 points to a nul terminated UTF-8 string. This opcode is transformed + // into a String opcode before it is executed for the first time. During + // this transformation, the length of string P4 is computed and stored + // as the P1 parameter. + case OP_String8: + goto __20 + + // Opcode: String P1 P2 P3 P4 P5 + // Synopsis: r[P2]='P4' (len=P1) + // + // The string value P4 of length P1 (bytes) is stored in register P2. + // + // If P3 is not zero and the content of register P3 is equal to P5, then + // the datatype of the register P2 is converted to BLOB. The content is + // the same sequence of bytes, it is merely interpreted as a BLOB instead + // of a string, as if it had been CAST. In other words: + // + // if( P3!=0 and reg[P3]==P5 ) reg[P2] := CAST(reg[P2] as BLOB) + case OP_String: + goto __21 + + // Opcode: Null P1 P2 P3 * * + // Synopsis: r[P2..P3]=NULL + // + // Write a NULL into registers P2. If P3 greater than P2, then also write + // NULL into register P3 and every register in between P2 and P3. If P3 + // is less than P2 (typically P3 is zero) then only register P2 is + // set to NULL. + // + // If the P1 value is non-zero, then also set the MEM_Cleared flag so that + // NULL values will not compare equal even if SQLITE_NULLEQ is set on + // OP_Ne or OP_Eq. + case OP_Null: + goto __22 + + // Opcode: SoftNull P1 * * * * + // Synopsis: r[P1]=NULL + // + // Set register P1 to have the value NULL as seen by the OP_MakeRecord + // instruction, but do not free any string or blob memory associated with + // the register, so that if the value was a string or blob that was + // previously copied using OP_SCopy, the copies will continue to be valid. + case OP_SoftNull: + goto __23 + + // Opcode: Blob P1 P2 * P4 * + // Synopsis: r[P2]=P4 (len=P1) + // + // P4 points to a blob of data P1 bytes long. Store this + // blob in register P2. If P4 is a NULL pointer, then construct + // a zero-filled blob that is P1 bytes long in P2. + case OP_Blob: + goto __24 + + // Opcode: Variable P1 P2 * P4 * + // Synopsis: r[P2]=parameter(P1,P4) + // + // Transfer the values of bound parameter P1 into register P2 + // + // If the parameter is named, then its name appears in P4. + // The P4 value is used by sqlite3_bind_parameter_name(). + case OP_Variable: + goto __25 + + // Opcode: Move P1 P2 P3 * * + // Synopsis: r[P2@P3]=r[P1@P3] + // + // Move the P3 values in register P1..P1+P3-1 over into + // registers P2..P2+P3-1. Registers P1..P1+P3-1 are + // left holding a NULL. It is an error for register ranges + // P1..P1+P3-1 and P2..P2+P3-1 to overlap. It is an error + // for P3 to be less than 1. + case OP_Move: + goto __26 + + // Opcode: Copy P1 P2 P3 * * + // Synopsis: r[P2@P3+1]=r[P1@P3+1] + // + // Make a copy of registers P1..P1+P3 into registers P2..P2+P3. + // + // This instruction makes a deep copy of the value. A duplicate + // is made of any string or blob constant. See also OP_SCopy. + case OP_Copy: + goto __27 + + // Opcode: SCopy P1 P2 * * * + // Synopsis: r[P2]=r[P1] + // + // Make a shallow copy of register P1 into register P2. + // + // This instruction makes a shallow copy of the value. If the value + // is a string or blob, then the copy is only a pointer to the + // original and hence if the original changes so will the copy. + // Worse, if the original is deallocated, the copy becomes invalid. + // Thus the program must guarantee that the original will not change + // during the lifetime of the copy. Use OP_Copy to make a complete + // copy. + case OP_SCopy: + goto __28 + + // Opcode: IntCopy P1 P2 * * * + // Synopsis: r[P2]=r[P1] + // + // Transfer the integer value held in register P1 into register P2. + // + // This is an optimized version of SCopy that works only for integer + // values. + case OP_IntCopy: + goto __29 + + // Opcode: FkCheck * * * * * + // + // Halt with an SQLITE_CONSTRAINT error if there are any unresolved + // foreign key constraint violations. If there are no foreign key + // constraint violations, this is a no-op. + // + // FK constraint violations are also checked when the prepared statement + // exits. This opcode is used to raise foreign key constraint errors prior + // to returning results such as a row change count or the result of a + // RETURNING clause. + case OP_FkCheck: + goto __30 + + // Opcode: ResultRow P1 P2 * * * + // Synopsis: output=r[P1@P2] + // + // The registers P1 through P1+P2-1 contain a single row of + // results. This opcode causes the sqlite3_step() call to terminate + // with an SQLITE_ROW return code and it sets up the sqlite3_stmt + // structure to provide access to the r(P1)..r(P1+P2-1) values as + // the result row. + case OP_ResultRow: + goto __31 + + // Opcode: Concat P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]+r[P1] + // + // Add the text in register P1 onto the end of the text in + // register P2 and store the result in register P3. + // If either the P1 or P2 text are NULL then store NULL in P3. + // + // P3 = P2 || P1 + // + // It is illegal for P1 and P3 to be the same register. Sometimes, + // if P3 is the same register as P2, the implementation is able + // to avoid a memcpy(). + case OP_Concat: + goto __32 + + // Opcode: Add P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]+r[P2] + // + // Add the value in register P1 to the value in register P2 + // and store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: Multiply P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]*r[P2] + // + // + // Multiply the value in register P1 by the value in register P2 + // and store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: Subtract P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]-r[P1] + // + // Subtract the value in register P1 from the value in register P2 + // and store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: Divide P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]/r[P1] + // + // Divide the value in register P1 by the value in register P2 + // and store the result in register P3 (P3=P2/P1). If the value in + // register P1 is zero, then the result is NULL. If either input is + // NULL, the result is NULL. + // Opcode: Remainder P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]%r[P1] + // + // Compute the remainder after integer register P2 is divided by + // register P1 and store the result in register P3. + // If the value in register P1 is zero the result is NULL. + // If either operand is NULL, the result is NULL. + case OP_Add: + goto __33 // same as TK_PLUS, in1, in2, out3 + case OP_Subtract: + goto __34 // same as TK_MINUS, in1, in2, out3 + case OP_Multiply: + goto __35 // same as TK_STAR, in1, in2, out3 + case OP_Divide: + goto __36 // same as TK_SLASH, in1, in2, out3 + case OP_Remainder: + goto __37 + + // Opcode: CollSeq P1 * * P4 + // + // P4 is a pointer to a CollSeq object. If the next call to a user function + // or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will + // be returned. This is used by the built-in min(), max() and nullif() + // functions. + // + // If P1 is not zero, then it is a register that a subsequent min() or + // max() aggregate will set to 1 if the current row is not the minimum or + // maximum. The P1 register is initialized to 0 by this instruction. + // + // The interface used by the implementation of the aforementioned functions + // to retrieve the collation sequence set by this opcode is not available + // publicly. Only built-in functions have access to this feature. + case OP_CollSeq: + goto __38 + + // Opcode: BitAnd P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]&r[P2] + // + // Take the bit-wise AND of the values in register P1 and P2 and + // store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: BitOr P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]|r[P2] + // + // Take the bit-wise OR of the values in register P1 and P2 and + // store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: ShiftLeft P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]<>r[P1] + // + // Shift the integer value in register P2 to the right by the + // number of bits specified by the integer in register P1. + // Store the result in register P3. + // If either input is NULL, the result is NULL. + case OP_BitAnd: + goto __39 // same as TK_BITAND, in1, in2, out3 + case OP_BitOr: + goto __40 // same as TK_BITOR, in1, in2, out3 + case OP_ShiftLeft: + goto __41 // same as TK_LSHIFT, in1, in2, out3 + case OP_ShiftRight: + goto __42 + + // Opcode: AddImm P1 P2 * * * + // Synopsis: r[P1]=r[P1]+P2 + // + // Add the constant P2 to the value in register P1. + // The result is always an integer. + // + // To force any register to be an integer, just add 0. + case OP_AddImm: + goto __43 + + // Opcode: MustBeInt P1 P2 * * * + // + // Force the value in register P1 to be an integer. If the value + // in P1 is not an integer and cannot be converted into an integer + // without data loss, then jump immediately to P2, or if P2==0 + // raise an SQLITE_MISMATCH exception. + case OP_MustBeInt: + goto __44 + + // Opcode: RealAffinity P1 * * * * + // + // If register P1 holds an integer convert it to a real value. + // + // This opcode is used when extracting information from a column that + // has REAL affinity. Such column values may still be stored as + // integers, for space efficiency, but after extraction we want them + // to have only a real value. + case OP_RealAffinity: + goto __45 + + // Opcode: Cast P1 P2 * * * + // Synopsis: affinity(r[P1]) + // + // Force the value in register P1 to be the type defined by P2. + // + //
      + //
    • P2=='A' → BLOB + //
    • P2=='B' → TEXT + //
    • P2=='C' → NUMERIC + //
    • P2=='D' → INTEGER + //
    • P2=='E' → REAL + //
    + // + // A NULL value is not changed by this routine. It remains NULL. + case OP_Cast: + goto __46 + + // Opcode: Eq P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]==r[P1] + // + // Compare the values in register P1 and P3. If reg(P3)==reg(P1) then + // jump to address P2. + // + // The SQLITE_AFF_MASK portion of P5 must be an affinity character - + // SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made + // to coerce both inputs according to this affinity before the + // comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric + // affinity is used. Note that the affinity conversions are stored + // back into the input registers P1 and P3. So this opcode can cause + // persistent changes to registers P1 and P3. + // + // Once any conversions have taken place, and neither value is NULL, + // the values are compared. If both values are blobs then memcmp() is + // used to determine the results of the comparison. If both values + // are text, then the appropriate collating function specified in + // P4 is used to do the comparison. If P4 is not specified then + // memcmp() is used to compare text string. If both values are + // numeric, then a numeric comparison is used. If the two values + // are of different types, then numbers are considered less than + // strings and strings are considered less than blobs. + // + // If SQLITE_NULLEQ is set in P5 then the result of comparison is always either + // true or false and is never NULL. If both operands are NULL then the result + // of comparison is true. If either operand is NULL then the result is false. + // If neither operand is NULL the result is the same as it would be if + // the SQLITE_NULLEQ flag were omitted from P5. + // + // This opcode saves the result of comparison for use by the new + // OP_Jump opcode. + // Opcode: Ne P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]!=r[P1] + // + // This works just like the Eq opcode except that the jump is taken if + // the operands in registers P1 and P3 are not equal. See the Eq opcode for + // additional information. + // Opcode: Lt P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]r[P1] + // + // This works just like the Lt opcode except that the jump is taken if + // the content of register P3 is greater than the content of + // register P1. See the Lt opcode for additional information. + // Opcode: Ge P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]>=r[P1] + // + // This works just like the Lt opcode except that the jump is taken if + // the content of register P3 is greater than or equal to the content of + // register P1. See the Lt opcode for additional information. + case OP_Eq: + goto __47 // same as TK_EQ, jump, in1, in3 + case OP_Ne: + goto __48 // same as TK_NE, jump, in1, in3 + case OP_Lt: + goto __49 // same as TK_LT, jump, in1, in3 + case OP_Le: + goto __50 // same as TK_LE, jump, in1, in3 + case OP_Gt: + goto __51 // same as TK_GT, jump, in1, in3 + case OP_Ge: + goto __52 + + // Opcode: ElseEq * P2 * * * + // + // This opcode must follow an OP_Lt or OP_Gt comparison operator. There + // can be zero or more OP_ReleaseReg opcodes intervening, but no other + // opcodes are allowed to occur between this instruction and the previous + // OP_Lt or OP_Gt. + // + // If result of an OP_Eq comparison on the same two operands as the + // prior OP_Lt or OP_Gt would have been true, then jump to P2. + // If the result of an OP_Eq comparison on the two previous + // operands would have been false or NULL, then fall through. + case OP_ElseEq: + goto __53 + + // Opcode: Permutation * * * P4 * + // + // Set the permutation used by the OP_Compare operator in the next + // instruction. The permutation is stored in the P4 operand. + // + // The permutation is only valid until the next OP_Compare that has + // the OPFLAG_PERMUTE bit set in P5. Typically the OP_Permutation should + // occur immediately prior to the OP_Compare. + // + // The first integer in the P4 integer array is the length of the array + // and does not become part of the permutation. + case OP_Permutation: + goto __54 + + // Opcode: Compare P1 P2 P3 P4 P5 + // Synopsis: r[P1@P3] <-> r[P2@P3] + // + // Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this + // vector "A") and in reg(P2)..reg(P2+P3-1) ("B"). Save the result of + // the comparison for use by the next OP_Jump instruct. + // + // If P5 has the OPFLAG_PERMUTE bit set, then the order of comparison is + // determined by the most recent OP_Permutation operator. If the + // OPFLAG_PERMUTE bit is clear, then register are compared in sequential + // order. + // + // P4 is a KeyInfo structure that defines collating sequences and sort + // orders for the comparison. The permutation applies to registers + // only. The KeyInfo elements are used sequentially. + // + // The comparison is a sort comparison, so NULLs compare equal, + // NULLs are less than numbers, numbers are less than strings, + // and strings are less than blobs. + case OP_Compare: + goto __55 + + // Opcode: Jump P1 P2 P3 * * + // + // Jump to the instruction at address P1, P2, or P3 depending on whether + // in the most recent OP_Compare instruction the P1 vector was less than + // equal to, or greater than the P2 vector, respectively. + case OP_Jump: + goto __56 + + // Opcode: And P1 P2 P3 * * + // Synopsis: r[P3]=(r[P1] && r[P2]) + // + // Take the logical AND of the values in registers P1 and P2 and + // write the result into register P3. + // + // If either P1 or P2 is 0 (false) then the result is 0 even if + // the other input is NULL. A NULL and true or two NULLs give + // a NULL output. + // Opcode: Or P1 P2 P3 * * + // Synopsis: r[P3]=(r[P1] || r[P2]) + // + // Take the logical OR of the values in register P1 and P2 and + // store the answer in register P3. + // + // If either P1 or P2 is nonzero (true) then the result is 1 (true) + // even if the other input is NULL. A NULL and false or two NULLs + // give a NULL output. + case OP_And: + goto __57 // same as TK_AND, in1, in2, out3 + case OP_Or: + goto __58 + + // Opcode: IsTrue P1 P2 P3 P4 * + // Synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 + // + // This opcode implements the IS TRUE, IS FALSE, IS NOT TRUE, and + // IS NOT FALSE operators. + // + // Interpret the value in register P1 as a boolean value. Store that + // boolean (a 0 or 1) in register P2. Or if the value in register P1 is + // NULL, then the P3 is stored in register P2. Invert the answer if P4 + // is 1. + // + // The logic is summarized like this: + // + //
      + //
    • If P3==0 and P4==0 then r[P2] := r[P1] IS TRUE + //
    • If P3==1 and P4==1 then r[P2] := r[P1] IS FALSE + //
    • If P3==0 and P4==1 then r[P2] := r[P1] IS NOT TRUE + //
    • If P3==1 and P4==0 then r[P2] := r[P1] IS NOT FALSE + //
    + case OP_IsTrue: + goto __59 + + // Opcode: Not P1 P2 * * * + // Synopsis: r[P2]= !r[P1] + // + // Interpret the value in register P1 as a boolean value. Store the + // boolean complement in register P2. If the value in register P1 is + // NULL, then a NULL is stored in P2. + case OP_Not: + goto __60 + + // Opcode: BitNot P1 P2 * * * + // Synopsis: r[P2]= ~r[P1] + // + // Interpret the content of register P1 as an integer. Store the + // ones-complement of the P1 value into register P2. If P1 holds + // a NULL then store a NULL in P2. + case OP_BitNot: + goto __61 + + // Opcode: Once P1 P2 * * * + // + // Fall through to the next instruction the first time this opcode is + // encountered on each invocation of the byte-code program. Jump to P2 + // on the second and all subsequent encounters during the same invocation. + // + // Top-level programs determine first invocation by comparing the P1 + // operand against the P1 operand on the OP_Init opcode at the beginning + // of the program. If the P1 values differ, then fall through and make + // the P1 of this opcode equal to the P1 of OP_Init. If P1 values are + // the same then take the jump. + // + // For subprograms, there is a bitmask in the VdbeFrame that determines + // whether or not the jump should be taken. The bitmask is necessary + // because the self-altering code trick does not work for recursive + // triggers. + case OP_Once: + goto __62 + + // Opcode: If P1 P2 P3 * * + // + // Jump to P2 if the value in register P1 is true. The value + // is considered true if it is numeric and non-zero. If the value + // in P1 is NULL then take the jump if and only if P3 is non-zero. + case OP_If: + goto __63 + + // Opcode: IfNot P1 P2 P3 * * + // + // Jump to P2 if the value in register P1 is False. The value + // is considered false if it has a numeric value of zero. If the value + // in P1 is NULL then take the jump if and only if P3 is non-zero. + case OP_IfNot: + goto __64 + + // Opcode: IsNull P1 P2 * * * + // Synopsis: if r[P1]==NULL goto P2 + // + // Jump to P2 if the value in register P1 is NULL. + case OP_IsNull: + goto __65 + + // Opcode: IsNullOrType P1 P2 P3 * * + // Synopsis: if typeof(r[P1]) IN (P3,5) goto P2 + // + // Jump to P2 if the value in register P1 is NULL or has a datatype P3. + // P3 is an integer which should be one of SQLITE_INTEGER, SQLITE_FLOAT, + // SQLITE_BLOB, SQLITE_NULL, or SQLITE_TEXT. + case OP_IsNullOrType: + goto __66 + + // Opcode: ZeroOrNull P1 P2 P3 * * + // Synopsis: r[P2] = 0 OR NULL + // + // If all both registers P1 and P3 are NOT NULL, then store a zero in + // register P2. If either registers P1 or P3 are NULL then put + // a NULL in register P2. + case OP_ZeroOrNull: + goto __67 + + // Opcode: NotNull P1 P2 * * * + // Synopsis: if r[P1]!=NULL goto P2 + // + // Jump to P2 if the value in register P1 is not NULL. + case OP_NotNull: + goto __68 + + // Opcode: IfNullRow P1 P2 P3 * * + // Synopsis: if P1.nullRow then r[P3]=NULL, goto P2 + // + // Check the cursor P1 to see if it is currently pointing at a NULL row. + // If it is, then set register P3 to NULL and jump immediately to P2. + // If P1 is not on a NULL row, then fall through without making any + // changes. + case OP_IfNullRow: + goto __69 + + // Opcode: Offset P1 P2 P3 * * + // Synopsis: r[P3] = sqlite_offset(P1) + // + // Store in register r[P3] the byte offset into the database file that is the + // start of the payload for the record at which that cursor P1 is currently + // pointing. + // + // P2 is the column number for the argument to the sqlite_offset() function. + // This opcode does not use P2 itself, but the P2 value is used by the + // code generator. The P1, P2, and P3 operands to this opcode are the + // same as for OP_Column. + // + // This opcode is only available if SQLite is compiled with the + // -DSQLITE_ENABLE_OFFSET_SQL_FUNC option. + case OP_Offset: + goto __70 + + // Opcode: Column P1 P2 P3 P4 P5 + // Synopsis: r[P3]=PX + // + // Interpret the data that cursor P1 points to as a structure built using + // the MakeRecord instruction. (See the MakeRecord opcode for additional + // information about the format of the data.) Extract the P2-th column + // from this record. If there are less that (P2+1) + // values in the record, extract a NULL. + // + // The value extracted is stored in register P3. + // + // If the record contains fewer than P2 fields, then extract a NULL. Or, + // if the P4 argument is a P4_MEM use the value of the P4 argument as + // the result. + // + // If the OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG bits are set on P5 then + // the result is guaranteed to only be used as the argument of a length() + // or typeof() function, respectively. The loading of large blobs can be + // skipped for length() and all content loading can be skipped for typeof(). + case OP_Column: + goto __71 + + // Opcode: TypeCheck P1 P2 P3 P4 * + // Synopsis: typecheck(r[P1@P2]) + // + // Apply affinities to the range of P2 registers beginning with P1. + // Take the affinities from the Table object in P4. If any value + // cannot be coerced into the correct type, then raise an error. + // + // This opcode is similar to OP_Affinity except that this opcode + // forces the register type to the Table column type. This is used + // to implement "strict affinity". + // + // GENERATED ALWAYS AS ... STATIC columns are only checked if P3 + // is zero. When P3 is non-zero, no type checking occurs for + // static generated columns. Virtual columns are computed at query time + // and so they are never checked. + // + // Preconditions: + // + //
      + //
    • P2 should be the number of non-virtual columns in the + // table of P4. + //
    • Table P4 should be a STRICT table. + //
    + // + // If any precondition is false, an assertion fault occurs. + case OP_TypeCheck: + goto __72 + + // Opcode: Affinity P1 P2 * P4 * + // Synopsis: affinity(r[P1@P2]) + // + // Apply affinities to a range of P2 registers starting with P1. + // + // P4 is a string that is P2 characters long. The N-th character of the + // string indicates the column affinity that should be used for the N-th + // memory cell in the range. + case OP_Affinity: + goto __73 + + // Opcode: MakeRecord P1 P2 P3 P4 * + // Synopsis: r[P3]=mkrec(r[P1@P2]) + // + // Convert P2 registers beginning with P1 into the [record format] + // use as a data record in a database table or as a key + // in an index. The OP_Column opcode can decode the record later. + // + // P4 may be a string that is P2 characters long. The N-th character of the + // string indicates the column affinity that should be used for the N-th + // field of the index key. + // + // The mapping from character to affinity is given by the SQLITE_AFF_ + // macros defined in sqliteInt.h. + // + // If P4 is NULL then all index fields have the affinity BLOB. + // + // The meaning of P5 depends on whether or not the SQLITE_ENABLE_NULL_TRIM + // compile-time option is enabled: + // + // * If SQLITE_ENABLE_NULL_TRIM is enabled, then the P5 is the index + // of the right-most table that can be null-trimmed. + // + // * If SQLITE_ENABLE_NULL_TRIM is omitted, then P5 has the value + // OPFLAG_NOCHNG_MAGIC if the OP_MakeRecord opcode is allowed to + // accept no-change records with serial_type 10. This value is + // only used inside an assert() and does not affect the end result. + case OP_MakeRecord: + goto __74 + + // Opcode: Count P1 P2 P3 * * + // Synopsis: r[P2]=count() + // + // Store the number of entries (an integer value) in the table or index + // opened by cursor P1 in register P2. + // + // If P3==0, then an exact count is obtained, which involves visiting + // every btree page of the table. But if P3 is non-zero, an estimate + // is returned based on the current cursor position. + case OP_Count: + goto __75 + + // Opcode: Savepoint P1 * * P4 * + // + // Open, release or rollback the savepoint named by parameter P4, depending + // on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN). + // To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE). + // To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK). + case OP_Savepoint: + goto __76 + + // Opcode: AutoCommit P1 P2 * * * + // + // Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll + // back any currently active btree transactions. If there are any active + // VMs (apart from this one), then a ROLLBACK fails. A COMMIT fails if + // there are active writing VMs or active VMs that use shared cache. + // + // This instruction causes the VM to halt. + case OP_AutoCommit: + goto __77 + + // Opcode: Transaction P1 P2 P3 P4 P5 + // + // Begin a transaction on database P1 if a transaction is not already + // active. + // If P2 is non-zero, then a write-transaction is started, or if a + // read-transaction is already active, it is upgraded to a write-transaction. + // If P2 is zero, then a read-transaction is started. If P2 is 2 or more + // then an exclusive transaction is started. + // + // P1 is the index of the database file on which the transaction is + // started. Index 0 is the main database file and index 1 is the + // file used for temporary tables. Indices of 2 or more are used for + // attached databases. + // + // If a write-transaction is started and the Vdbe.usesStmtJournal flag is + // true (this flag is set if the Vdbe may modify more than one row and may + // throw an ABORT exception), a statement transaction may also be opened. + // More specifically, a statement transaction is opened iff the database + // connection is currently not in autocommit mode, or if there are other + // active statements. A statement transaction allows the changes made by this + // VDBE to be rolled back after an error without having to roll back the + // entire transaction. If no error is encountered, the statement transaction + // will automatically commit when the VDBE halts. + // + // If P5!=0 then this opcode also checks the schema cookie against P3 + // and the schema generation counter against P4. + // The cookie changes its value whenever the database schema changes. + // This operation is used to detect when that the cookie has changed + // and that the current process needs to reread the schema. If the schema + // cookie in P3 differs from the schema cookie in the database header or + // if the schema generation counter in P4 differs from the current + // generation counter, then an SQLITE_SCHEMA error is raised and execution + // halts. The sqlite3_step() wrapper function might then reprepare the + // statement and rerun it from the beginning. + case OP_Transaction: + goto __78 + + // Opcode: ReadCookie P1 P2 P3 * * + // + // Read cookie number P3 from database P1 and write it into register P2. + // P3==1 is the schema version. P3==2 is the database format. + // P3==3 is the recommended pager cache size, and so forth. P1==0 is + // the main database file and P1==1 is the database file used to store + // temporary tables. + // + // There must be a read-lock on the database (either a transaction + // must be started or there must be an open cursor) before + // executing this instruction. + case OP_ReadCookie: + goto __79 + + // Opcode: SetCookie P1 P2 P3 * P5 + // + // Write the integer value P3 into cookie number P2 of database P1. + // P2==1 is the schema version. P2==2 is the database format. + // P2==3 is the recommended pager cache + // size, and so forth. P1==0 is the main database file and P1==1 is the + // database file used to store temporary tables. + // + // A transaction must be started before executing this opcode. + // + // If P2 is the SCHEMA_VERSION cookie (cookie number 1) then the internal + // schema version is set to P3-P5. The "PRAGMA schema_version=N" statement + // has P5 set to 1, so that the internal schema version will be different + // from the database schema version, resulting in a schema reset. + case OP_SetCookie: + goto __80 + + // Opcode: OpenRead P1 P2 P3 P4 P5 + // Synopsis: root=P2 iDb=P3 + // + // Open a read-only cursor for the database table whose root page is + // P2 in a database file. The database file is determined by P3. + // P3==0 means the main database, P3==1 means the database used for + // temporary tables, and P3>1 means used the corresponding attached + // database. Give the new cursor an identifier of P1. The P1 + // values need not be contiguous but all P1 values should be small integers. + // It is an error for P1 to be negative. + // + // Allowed P5 bits: + //
      + //
    • 0x02 OPFLAG_SEEKEQ: This cursor will only be used for + // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT + // of OP_SeekLE/OP_IdxLT) + //
    + // + // The P4 value may be either an integer (P4_INT32) or a pointer to + // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo + // object, then table being opened must be an [index b-tree] where the + // KeyInfo object defines the content and collating + // sequence of that index b-tree. Otherwise, if P4 is an integer + // value, then the table being opened must be a [table b-tree] with a + // number of columns no less than the value of P4. + // + // See also: OpenWrite, ReopenIdx + // Opcode: ReopenIdx P1 P2 P3 P4 P5 + // Synopsis: root=P2 iDb=P3 + // + // The ReopenIdx opcode works like OP_OpenRead except that it first + // checks to see if the cursor on P1 is already open on the same + // b-tree and if it is this opcode becomes a no-op. In other words, + // if the cursor is already open, do not reopen it. + // + // The ReopenIdx opcode may only be used with P5==0 or P5==OPFLAG_SEEKEQ + // and with P4 being a P4_KEYINFO object. Furthermore, the P3 value must + // be the same as every other ReopenIdx or OpenRead for the same cursor + // number. + // + // Allowed P5 bits: + //
      + //
    • 0x02 OPFLAG_SEEKEQ: This cursor will only be used for + // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT + // of OP_SeekLE/OP_IdxLT) + //
    + // + // See also: OP_OpenRead, OP_OpenWrite + // Opcode: OpenWrite P1 P2 P3 P4 P5 + // Synopsis: root=P2 iDb=P3 + // + // Open a read/write cursor named P1 on the table or index whose root + // page is P2 (or whose root page is held in register P2 if the + // OPFLAG_P2ISREG bit is set in P5 - see below). + // + // The P4 value may be either an integer (P4_INT32) or a pointer to + // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo + // object, then table being opened must be an [index b-tree] where the + // KeyInfo object defines the content and collating + // sequence of that index b-tree. Otherwise, if P4 is an integer + // value, then the table being opened must be a [table b-tree] with a + // number of columns no less than the value of P4. + // + // Allowed P5 bits: + //
      + //
    • 0x02 OPFLAG_SEEKEQ: This cursor will only be used for + // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT + // of OP_SeekLE/OP_IdxLT) + //
    • 0x08 OPFLAG_FORDELETE: This cursor is used only to seek + // and subsequently delete entries in an index btree. This is a + // hint to the storage engine that the storage engine is allowed to + // ignore. The hint is not used by the official SQLite b*tree storage + // engine, but is used by COMDB2. + //
    • 0x10 OPFLAG_P2ISREG: Use the content of register P2 + // as the root page, not the value of P2 itself. + //
    + // + // This instruction works like OpenRead except that it opens the cursor + // in read/write mode. + // + // See also: OP_OpenRead, OP_ReopenIdx + case OP_ReopenIdx: + goto __81 + // If the cursor is not currently open or is open on a different + // index, then fall through into OP_OpenRead to force a reopen + case OP_OpenRead: + goto __82 + case OP_OpenWrite: + goto __83 + + // Opcode: OpenDup P1 P2 * * * + // + // Open a new cursor P1 that points to the same ephemeral table as + // cursor P2. The P2 cursor must have been opened by a prior OP_OpenEphemeral + // opcode. Only ephemeral cursors may be duplicated. + // + // Duplicate ephemeral cursors are used for self-joins of materialized views. + case OP_OpenDup: + goto __84 + + // Opcode: OpenEphemeral P1 P2 P3 P4 P5 + // Synopsis: nColumn=P2 + // + // Open a new cursor P1 to a transient table. + // The cursor is always opened read/write even if + // the main database is read-only. The ephemeral + // table is deleted automatically when the cursor is closed. + // + // If the cursor P1 is already opened on an ephemeral table, the table + // is cleared (all content is erased). + // + // P2 is the number of columns in the ephemeral table. + // The cursor points to a BTree table if P4==0 and to a BTree index + // if P4 is not 0. If P4 is not NULL, it points to a KeyInfo structure + // that defines the format of keys in the index. + // + // The P5 parameter can be a mask of the BTREE_* flags defined + // in btree.h. These flags control aspects of the operation of + // the btree. The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are + // added automatically. + // + // If P3 is positive, then reg[P3] is modified slightly so that it + // can be used as zero-length data for OP_Insert. This is an optimization + // that avoids an extra OP_Blob opcode to initialize that register. + // Opcode: OpenAutoindex P1 P2 * P4 * + // Synopsis: nColumn=P2 + // + // This opcode works the same as OP_OpenEphemeral. It has a + // different name to distinguish its use. Tables created using + // by this opcode will be used for automatically created transient + // indices in joins. + case OP_OpenAutoindex: + goto __85 + case OP_OpenEphemeral: + goto __86 + + // Opcode: SorterOpen P1 P2 P3 P4 * + // + // This opcode works like OP_OpenEphemeral except that it opens + // a transient index that is specifically designed to sort large + // tables using an external merge-sort algorithm. + // + // If argument P3 is non-zero, then it indicates that the sorter may + // assume that a stable sort considering the first P3 fields of each + // key is sufficient to produce the required results. + case OP_SorterOpen: + goto __87 + + // Opcode: SequenceTest P1 P2 * * * + // Synopsis: if( cursor[P1].ctr++ ) pc = P2 + // + // P1 is a sorter cursor. If the sequence counter is currently zero, jump + // to P2. Regardless of whether or not the jump is taken, increment the + // the sequence value. + case OP_SequenceTest: + goto __88 + + // Opcode: OpenPseudo P1 P2 P3 * * + // Synopsis: P3 columns in r[P2] + // + // Open a new cursor that points to a fake table that contains a single + // row of data. The content of that one row is the content of memory + // register P2. In other words, cursor P1 becomes an alias for the + // MEM_Blob content contained in register P2. + // + // A pseudo-table created by this opcode is used to hold a single + // row output from the sorter so that the row can be decomposed into + // individual columns using the OP_Column opcode. The OP_Column opcode + // is the only cursor opcode that works with a pseudo-table. + // + // P3 is the number of fields in the records that will be stored by + // the pseudo-table. + case OP_OpenPseudo: + goto __89 + + // Opcode: Close P1 * * * * + // + // Close a cursor previously opened as P1. If P1 is not + // currently open, this instruction is a no-op. + case OP_Close: + goto __90 + + // Opcode: SeekGE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as the key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the smallest entry that + // is greater than or equal to the key value. If there are no records + // greater than or equal to the key and P2 is not zero, then jump to P2. + // + // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this + // opcode will either land on a record that exactly matches the key, or + // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, + // this opcode must be followed by an IdxLE opcode with the same arguments. + // The IdxGT opcode will be skipped if this opcode succeeds, but the + // IdxGT opcode will be used on subsequent loop iterations. The + // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this + // is an equality search. + // + // This opcode leaves the cursor configured to move in forward order, + // from the beginning toward the end. In other words, the cursor is + // configured to use Next, not Prev. + // + // See also: Found, NotFound, SeekLt, SeekGt, SeekLe + // Opcode: SeekGT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as a key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the smallest entry that + // is greater than the key value. If there are no records greater than + // the key and P2 is not zero, then jump to P2. + // + // This opcode leaves the cursor configured to move in forward order, + // from the beginning toward the end. In other words, the cursor is + // configured to use Next, not Prev. + // + // See also: Found, NotFound, SeekLt, SeekGe, SeekLe + // Opcode: SeekLT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as a key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the largest entry that + // is less than the key value. If there are no records less than + // the key and P2 is not zero, then jump to P2. + // + // This opcode leaves the cursor configured to move in reverse order, + // from the end toward the beginning. In other words, the cursor is + // configured to use Prev, not Next. + // + // See also: Found, NotFound, SeekGt, SeekGe, SeekLe + // Opcode: SeekLE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as a key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the largest entry that + // is less than or equal to the key value. If there are no records + // less than or equal to the key and P2 is not zero, then jump to P2. + // + // This opcode leaves the cursor configured to move in reverse order, + // from the end toward the beginning. In other words, the cursor is + // configured to use Prev, not Next. + // + // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this + // opcode will either land on a record that exactly matches the key, or + // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, + // this opcode must be followed by an IdxLE opcode with the same arguments. + // The IdxGE opcode will be skipped if this opcode succeeds, but the + // IdxGE opcode will be used on subsequent loop iterations. The + // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this + // is an equality search. + // + // See also: Found, NotFound, SeekGt, SeekGe, SeekLt + case OP_SeekLT: + goto __91 // jump, in3, group + case OP_SeekLE: + goto __92 // jump, in3, group + case OP_SeekGE: + goto __93 // jump, in3, group + case OP_SeekGT: + goto __94 + + // Opcode: SeekScan P1 P2 * * * + // Synopsis: Scan-ahead up to P1 rows + // + // This opcode is a prefix opcode to OP_SeekGE. In other words, this + // opcode must be immediately followed by OP_SeekGE. This constraint is + // checked by assert() statements. + // + // This opcode uses the P1 through P4 operands of the subsequent + // OP_SeekGE. In the text that follows, the operands of the subsequent + // OP_SeekGE opcode are denoted as SeekOP.P1 through SeekOP.P4. Only + // the P1 and P2 operands of this opcode are also used, and are called + // This.P1 and This.P2. + // + // This opcode helps to optimize IN operators on a multi-column index + // where the IN operator is on the later terms of the index by avoiding + // unnecessary seeks on the btree, substituting steps to the next row + // of the b-tree instead. A correct answer is obtained if this opcode + // is omitted or is a no-op. + // + // The SeekGE.P3 and SeekGE.P4 operands identify an unpacked key which + // is the desired entry that we want the cursor SeekGE.P1 to be pointing + // to. Call this SeekGE.P4/P5 row the "target". + // + // If the SeekGE.P1 cursor is not currently pointing to a valid row, + // then this opcode is a no-op and control passes through into the OP_SeekGE. + // + // If the SeekGE.P1 cursor is pointing to a valid row, then that row + // might be the target row, or it might be near and slightly before the + // target row. This opcode attempts to position the cursor on the target + // row by, perhaps by invoking sqlite3BtreeStep() on the cursor + // between 0 and This.P1 times. + // + // There are three possible outcomes from this opcode:
      + // + //
    1. If after This.P1 steps, the cursor is still pointing to a place that + // is earlier in the btree than the target row, then fall through + // into the subsquence OP_SeekGE opcode. + // + //
    2. If the cursor is successfully moved to the target row by 0 or more + // sqlite3BtreeNext() calls, then jump to This.P2, which will land just + // past the OP_IdxGT or OP_IdxGE opcode that follows the OP_SeekGE. + // + //
    3. If the cursor ends up past the target row (indicating the the target + // row does not exist in the btree) then jump to SeekOP.P2. + //
    + case OP_SeekScan: + goto __95 + + // Opcode: SeekHit P1 P2 P3 * * + // Synopsis: set P2<=seekHit<=P3 + // + // Increase or decrease the seekHit value for cursor P1, if necessary, + // so that it is no less than P2 and no greater than P3. + // + // The seekHit integer represents the maximum of terms in an index for which + // there is known to be at least one match. If the seekHit value is smaller + // than the total number of equality terms in an index lookup, then the + // OP_IfNoHope opcode might run to see if the IN loop can be abandoned + // early, thus saving work. This is part of the IN-early-out optimization. + // + // P1 must be a valid b-tree cursor. + case OP_SeekHit: + goto __96 + + // Opcode: IfNotOpen P1 P2 * * * + // Synopsis: if( !csr[P1] ) goto P2 + // + // If cursor P1 is not open, jump to instruction P2. Otherwise, fall through. + case OP_IfNotOpen: + goto __97 + + // Opcode: Found P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If P4==0 then register P3 holds a blob constructed by MakeRecord. If + // P4>0 then register P3 is the first of P4 registers that form an unpacked + // record. + // + // Cursor P1 is on an index btree. If the record identified by P3 and P4 + // is a prefix of any entry in P1 then a jump is made to P2 and + // P1 is left pointing at the matching entry. + // + // This operation leaves the cursor in a state where it can be + // advanced in the forward direction. The Next instruction will work, + // but not the Prev instruction. + // + // See also: NotFound, NoConflict, NotExists. SeekGe + // Opcode: NotFound P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If P4==0 then register P3 holds a blob constructed by MakeRecord. If + // P4>0 then register P3 is the first of P4 registers that form an unpacked + // record. + // + // Cursor P1 is on an index btree. If the record identified by P3 and P4 + // is not the prefix of any entry in P1 then a jump is made to P2. If P1 + // does contain an entry whose prefix matches the P3/P4 record then control + // falls through to the next instruction and P1 is left pointing at the + // matching entry. + // + // This operation leaves the cursor in a state where it cannot be + // advanced in either direction. In other words, the Next and Prev + // opcodes do not work after this operation. + // + // See also: Found, NotExists, NoConflict, IfNoHope + // Opcode: IfNoHope P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // Register P3 is the first of P4 registers that form an unpacked + // record. Cursor P1 is an index btree. P2 is a jump destination. + // In other words, the operands to this opcode are the same as the + // operands to OP_NotFound and OP_IdxGT. + // + // This opcode is an optimization attempt only. If this opcode always + // falls through, the correct answer is still obtained, but extra works + // is performed. + // + // A value of N in the seekHit flag of cursor P1 means that there exists + // a key P3:N that will match some record in the index. We want to know + // if it is possible for a record P3:P4 to match some record in the + // index. If it is not possible, we can skips some work. So if seekHit + // is less than P4, attempt to find out if a match is possible by running + // OP_NotFound. + // + // This opcode is used in IN clause processing for a multi-column key. + // If an IN clause is attached to an element of the key other than the + // left-most element, and if there are no matches on the most recent + // seek over the whole key, then it might be that one of the key element + // to the left is prohibiting a match, and hence there is "no hope" of + // any match regardless of how many IN clause elements are checked. + // In such a case, we abandon the IN clause search early, using this + // opcode. The opcode name comes from the fact that the + // jump is taken if there is "no hope" of achieving a match. + // + // See also: NotFound, SeekHit + // Opcode: NoConflict P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If P4==0 then register P3 holds a blob constructed by MakeRecord. If + // P4>0 then register P3 is the first of P4 registers that form an unpacked + // record. + // + // Cursor P1 is on an index btree. If the record identified by P3 and P4 + // contains any NULL value, jump immediately to P2. If all terms of the + // record are not-NULL then a check is done to determine if any row in the + // P1 index btree has a matching key prefix. If there are no matches, jump + // immediately to P2. If there is a match, fall through and leave the P1 + // cursor pointing to the matching row. + // + // This opcode is similar to OP_NotFound with the exceptions that the + // branch is always taken if any part of the search key input is NULL. + // + // This operation leaves the cursor in a state where it cannot be + // advanced in either direction. In other words, the Next and Prev + // opcodes do not work after this operation. + // + // See also: NotFound, Found, NotExists + case OP_IfNoHope: + goto __98 + case OP_NoConflict: + goto __99 // jump, in3 + case OP_NotFound: + goto __100 // jump, in3 + case OP_Found: + goto __101 + + // Opcode: SeekRowid P1 P2 P3 * * + // Synopsis: intkey=r[P3] + // + // P1 is the index of a cursor open on an SQL table btree (with integer + // keys). If register P3 does not contain an integer or if P1 does not + // contain a record with rowid P3 then jump immediately to P2. + // Or, if P2 is 0, raise an SQLITE_CORRUPT error. If P1 does contain + // a record with rowid P3 then + // leave the cursor pointing at that record and fall through to the next + // instruction. + // + // The OP_NotExists opcode performs the same operation, but with OP_NotExists + // the P3 register must be guaranteed to contain an integer value. With this + // opcode, register P3 might not contain an integer. + // + // The OP_NotFound opcode performs the same operation on index btrees + // (with arbitrary multi-value keys). + // + // This opcode leaves the cursor in a state where it cannot be advanced + // in either direction. In other words, the Next and Prev opcodes will + // not work following this opcode. + // + // See also: Found, NotFound, NoConflict, SeekRowid + // Opcode: NotExists P1 P2 P3 * * + // Synopsis: intkey=r[P3] + // + // P1 is the index of a cursor open on an SQL table btree (with integer + // keys). P3 is an integer rowid. If P1 does not contain a record with + // rowid P3 then jump immediately to P2. Or, if P2 is 0, raise an + // SQLITE_CORRUPT error. If P1 does contain a record with rowid P3 then + // leave the cursor pointing at that record and fall through to the next + // instruction. + // + // The OP_SeekRowid opcode performs the same operation but also allows the + // P3 register to contain a non-integer value, in which case the jump is + // always taken. This opcode requires that P3 always contain an integer. + // + // The OP_NotFound opcode performs the same operation on index btrees + // (with arbitrary multi-value keys). + // + // This opcode leaves the cursor in a state where it cannot be advanced + // in either direction. In other words, the Next and Prev opcodes will + // not work following this opcode. + // + // See also: Found, NotFound, NoConflict, SeekRowid + case OP_SeekRowid: + goto __102 + case OP_NotExists: + goto __103 + + // Opcode: Sequence P1 P2 * * * + // Synopsis: r[P2]=cursor[P1].ctr++ + // + // Find the next available sequence number for cursor P1. + // Write the sequence number into register P2. + // The sequence number on the cursor is incremented after this + // instruction. + case OP_Sequence: + goto __104 + + // Opcode: NewRowid P1 P2 P3 * * + // Synopsis: r[P2]=rowid + // + // Get a new integer record number (a.k.a "rowid") used as the key to a table. + // The record number is not previously used as a key in the database + // table that cursor P1 points to. The new record number is written + // written to register P2. + // + // If P3>0 then P3 is a register in the root frame of this VDBE that holds + // the largest previously generated record number. No new record numbers are + // allowed to be less than this value. When this value reaches its maximum, + // an SQLITE_FULL error is generated. The P3 register is updated with the ' + // generated record number. This P3 mechanism is used to help implement the + // AUTOINCREMENT feature. + case OP_NewRowid: + goto __105 + + // Opcode: Insert P1 P2 P3 P4 P5 + // Synopsis: intkey=r[P3] data=r[P2] + // + // Write an entry into the table of cursor P1. A new entry is + // created if it doesn't already exist or the data for an existing + // entry is overwritten. The data is the value MEM_Blob stored in register + // number P2. The key is stored in register P3. The key must + // be a MEM_Int. + // + // If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is + // incremented (otherwise not). If the OPFLAG_LASTROWID flag of P5 is set, + // then rowid is stored for subsequent return by the + // sqlite3_last_insert_rowid() function (otherwise it is unmodified). + // + // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might + // run faster by avoiding an unnecessary seek on cursor P1. However, + // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior + // seeks on the cursor or if the most recent seek used a key equal to P3. + // + // If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an + // UPDATE operation. Otherwise (if the flag is clear) then this opcode + // is part of an INSERT operation. The difference is only important to + // the update hook. + // + // Parameter P4 may point to a Table structure, or may be NULL. If it is + // not NULL, then the update-hook (sqlite3.xUpdateCallback) is invoked + // following a successful insert. + // + // (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically + // allocated, then ownership of P2 is transferred to the pseudo-cursor + // and register P2 becomes ephemeral. If the cursor is changed, the + // value of register P2 will then change. Make sure this does not + // cause any problems.) + // + // This instruction only works on tables. The equivalent instruction + // for indices is OP_IdxInsert. + case OP_Insert: + goto __106 + + // Opcode: RowCell P1 P2 P3 * * + // + // P1 and P2 are both open cursors. Both must be opened on the same type + // of table - intkey or index. This opcode is used as part of copying + // the current row from P2 into P1. If the cursors are opened on intkey + // tables, register P3 contains the rowid to use with the new record in + // P1. If they are opened on index tables, P3 is not used. + // + // This opcode must be followed by either an Insert or InsertIdx opcode + // with the OPFLAG_PREFORMAT flag set to complete the insert operation. + case OP_RowCell: + goto __107 + + // Opcode: Delete P1 P2 P3 P4 P5 + // + // Delete the record at which the P1 cursor is currently pointing. + // + // If the OPFLAG_SAVEPOSITION bit of the P5 parameter is set, then + // the cursor will be left pointing at either the next or the previous + // record in the table. If it is left pointing at the next record, then + // the next Next instruction will be a no-op. As a result, in this case + // it is ok to delete a record from within a Next loop. If + // OPFLAG_SAVEPOSITION bit of P5 is clear, then the cursor will be + // left in an undefined state. + // + // If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this + // delete one of several associated with deleting a table row and all its + // associated index entries. Exactly one of those deletes is the "primary" + // delete. The others are all on OPFLAG_FORDELETE cursors or else are + // marked with the AUXDELETE flag. + // + // If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row + // change count is incremented (otherwise not). + // + // P1 must not be pseudo-table. It has to be a real table with + // multiple rows. + // + // If P4 is not NULL then it points to a Table object. In this case either + // the update or pre-update hook, or both, may be invoked. The P1 cursor must + // have been positioned using OP_NotFound prior to invoking this opcode in + // this case. Specifically, if one is configured, the pre-update hook is + // invoked if P4 is not NULL. The update-hook is invoked if one is configured, + // P4 is not NULL, and the OPFLAG_NCHANGE flag is set in P2. + // + // If the OPFLAG_ISUPDATE flag is set in P2, then P3 contains the address + // of the memory cell that contains the value that the rowid of the row will + // be set to by the update. + case OP_Delete: + goto __108 + // Opcode: ResetCount * * * * * + // + // The value of the change counter is copied to the database handle + // change counter (returned by subsequent calls to sqlite3_changes()). + // Then the VMs internal change counter resets to 0. + // This is used by trigger programs. + case OP_ResetCount: + goto __109 + + // Opcode: SorterCompare P1 P2 P3 P4 + // Synopsis: if key(P1)!=trim(r[P3],P4) goto P2 + // + // P1 is a sorter cursor. This instruction compares a prefix of the + // record blob in register P3 against a prefix of the entry that + // the sorter cursor currently points to. Only the first P4 fields + // of r[P3] and the sorter record are compared. + // + // If either P3 or the sorter contains a NULL in one of their significant + // fields (not counting the P4 fields at the end which are ignored) then + // the comparison is assumed to be equal. + // + // Fall through to next instruction if the two records compare equal to + // each other. Jump to P2 if they are different. + case OP_SorterCompare: + goto __110 + + // Opcode: SorterData P1 P2 P3 * * + // Synopsis: r[P2]=data + // + // Write into register P2 the current sorter data for sorter cursor P1. + // Then clear the column header cache on cursor P3. + // + // This opcode is normally use to move a record out of the sorter and into + // a register that is the source for a pseudo-table cursor created using + // OpenPseudo. That pseudo-table cursor is the one that is identified by + // parameter P3. Clearing the P3 column cache as part of this opcode saves + // us from having to issue a separate NullRow instruction to clear that cache. + case OP_SorterData: + goto __111 + + // Opcode: RowData P1 P2 P3 * * + // Synopsis: r[P2]=data + // + // Write into register P2 the complete row content for the row at + // which cursor P1 is currently pointing. + // There is no interpretation of the data. + // It is just copied onto the P2 register exactly as + // it is found in the database file. + // + // If cursor P1 is an index, then the content is the key of the row. + // If cursor P2 is a table, then the content extracted is the data. + // + // If the P1 cursor must be pointing to a valid row (not a NULL row) + // of a real table, not a pseudo-table. + // + // If P3!=0 then this opcode is allowed to make an ephemeral pointer + // into the database page. That means that the content of the output + // register will be invalidated as soon as the cursor moves - including + // moves caused by other cursors that "save" the current cursors + // position in order that they can write to the same table. If P3==0 + // then a copy of the data is made into memory. P3!=0 is faster, but + // P3==0 is safer. + // + // If P3!=0 then the content of the P2 register is unsuitable for use + // in OP_Result and any OP_Result will invalidate the P2 register content. + // The P2 register content is invalidated by opcodes like OP_Function or + // by any use of another cursor pointing to the same table. + case OP_RowData: + goto __112 + + // Opcode: Rowid P1 P2 * * * + // Synopsis: r[P2]=rowid + // + // Store in register P2 an integer which is the key of the table entry that + // P1 is currently point to. + // + // P1 can be either an ordinary table or a virtual table. There used to + // be a separate OP_VRowid opcode for use with virtual tables, but this + // one opcode now works for both table types. + case OP_Rowid: + goto __113 + + // Opcode: NullRow P1 * * * * + // + // Move the cursor P1 to a null row. Any OP_Column operations + // that occur while the cursor is on the null row will always + // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. + case OP_NullRow: + goto __114 + + // Opcode: SeekEnd P1 * * * * + // + // Position cursor P1 at the end of the btree for the purpose of + // appending a new entry onto the btree. + // + // It is assumed that the cursor is used only for appending and so + // if the cursor is valid, then the cursor must already be pointing + // at the end of the btree and so no changes are made to + // the cursor. + // Opcode: Last P1 P2 * * * + // + // The next use of the Rowid or Column or Prev instruction for P1 + // will refer to the last entry in the database table or index. + // If the table or index is empty and P2>0, then jump immediately to P2. + // If P2 is 0 or if the table or index is not empty, fall through + // to the following instruction. + // + // This opcode leaves the cursor configured to move in reverse order, + // from the end toward the beginning. In other words, the cursor is + // configured to use Prev, not Next. + case OP_SeekEnd: + goto __115 + case OP_Last: + goto __116 + + // Opcode: IfSmaller P1 P2 P3 * * + // + // Estimate the number of rows in the table P1. Jump to P2 if that + // estimate is less than approximately 2**(0.1*P3). + case OP_IfSmaller: + goto __117 + + // Opcode: SorterSort P1 P2 * * * + // + // After all records have been inserted into the Sorter object + // identified by P1, invoke this opcode to actually do the sorting. + // Jump to P2 if there are no records to be sorted. + // + // This opcode is an alias for OP_Sort and OP_Rewind that is used + // for Sorter objects. + // Opcode: Sort P1 P2 * * * + // + // This opcode does exactly the same thing as OP_Rewind except that + // it increments an undocumented global variable used for testing. + // + // Sorting is accomplished by writing records into a sorting index, + // then rewinding that index and playing it back from beginning to + // end. We use the OP_Sort opcode instead of OP_Rewind to do the + // rewinding so that the global variable will be incremented and + // regression tests can determine whether or not the optimizer is + // correctly optimizing out sorts. + case OP_SorterSort: + goto __118 // jump + case OP_Sort: + goto __119 + // Opcode: Rewind P1 P2 * * * + // + // The next use of the Rowid or Column or Next instruction for P1 + // will refer to the first entry in the database table or index. + // If the table or index is empty, jump immediately to P2. + // If the table or index is not empty, fall through to the following + // instruction. + // + // This opcode leaves the cursor configured to move in forward order, + // from the beginning toward the end. In other words, the cursor is + // configured to use Next, not Prev. + case OP_Rewind: + goto __120 + + // Opcode: Next P1 P2 P3 P4 P5 + // + // Advance cursor P1 so that it points to the next key/data pair in its + // table or index. If there are no more key/value pairs then fall through + // to the following instruction. But if the cursor advance was successful, + // jump immediately to P2. + // + // The Next opcode is only valid following an SeekGT, SeekGE, or + // OP_Rewind opcode used to position the cursor. Next is not allowed + // to follow SeekLT, SeekLE, or OP_Last. + // + // The P1 cursor must be for a real table, not a pseudo-table. P1 must have + // been opened prior to this opcode or the program will segfault. + // + // The P3 value is a hint to the btree implementation. If P3==1, that + // means P1 is an SQL index and that this instruction could have been + // omitted if that index had been unique. P3 is usually 0. P3 is + // always either 0 or 1. + // + // P4 is always of type P4_ADVANCE. The function pointer points to + // sqlite3BtreeNext(). + // + // If P5 is positive and the jump is taken, then event counter + // number P5-1 in the prepared statement is incremented. + // + // See also: Prev + // Opcode: Prev P1 P2 P3 P4 P5 + // + // Back up cursor P1 so that it points to the previous key/data pair in its + // table or index. If there is no previous key/value pairs then fall through + // to the following instruction. But if the cursor backup was successful, + // jump immediately to P2. + // + // + // The Prev opcode is only valid following an SeekLT, SeekLE, or + // OP_Last opcode used to position the cursor. Prev is not allowed + // to follow SeekGT, SeekGE, or OP_Rewind. + // + // The P1 cursor must be for a real table, not a pseudo-table. If P1 is + // not open then the behavior is undefined. + // + // The P3 value is a hint to the btree implementation. If P3==1, that + // means P1 is an SQL index and that this instruction could have been + // omitted if that index had been unique. P3 is usually 0. P3 is + // always either 0 or 1. + // + // P4 is always of type P4_ADVANCE. The function pointer points to + // sqlite3BtreePrevious(). + // + // If P5 is positive and the jump is taken, then event counter + // number P5-1 in the prepared statement is incremented. + // Opcode: SorterNext P1 P2 * * P5 + // + // This opcode works just like OP_Next except that P1 must be a + // sorter object for which the OP_SorterSort opcode has been + // invoked. This opcode advances the cursor to the next sorted + // record, or jumps to P2 if there are no more sorted records. + case OP_SorterNext: + goto __121 + case OP_Prev: + goto __122 // jump + case OP_Next: + goto __123 + + // Opcode: IdxInsert P1 P2 P3 P4 P5 + // Synopsis: key=r[P2] + // + // Register P2 holds an SQL index key made using the + // MakeRecord instructions. This opcode writes that key + // into the index P1. Data for the entry is nil. + // + // If P4 is not zero, then it is the number of values in the unpacked + // key of reg(P2). In that case, P3 is the index of the first register + // for the unpacked key. The availability of the unpacked key can sometimes + // be an optimization. + // + // If P5 has the OPFLAG_APPEND bit set, that is a hint to the b-tree layer + // that this insert is likely to be an append. + // + // If P5 has the OPFLAG_NCHANGE bit set, then the change counter is + // incremented by this instruction. If the OPFLAG_NCHANGE bit is clear, + // then the change counter is unchanged. + // + // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might + // run faster by avoiding an unnecessary seek on cursor P1. However, + // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior + // seeks on the cursor or if the most recent seek used a key equivalent + // to P2. + // + // This instruction only works for indices. The equivalent instruction + // for tables is OP_Insert. + case OP_IdxInsert: + goto __124 + + // Opcode: SorterInsert P1 P2 * * * + // Synopsis: key=r[P2] + // + // Register P2 holds an SQL index key made using the + // MakeRecord instructions. This opcode writes that key + // into the sorter P1. Data for the entry is nil. + case OP_SorterInsert: + goto __125 + + // Opcode: IdxDelete P1 P2 P3 * P5 + // Synopsis: key=r[P2@P3] + // + // The content of P3 registers starting at register P2 form + // an unpacked index key. This opcode removes that entry from the + // index opened by cursor P1. + // + // If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error + // if no matching index entry is found. This happens when running + // an UPDATE or DELETE statement and the index entry to be updated + // or deleted is not found. For some uses of IdxDelete + // (example: the EXCEPT operator) it does not matter that no matching + // entry is found. For those cases, P5 is zero. Also, do not raise + // this (self-correcting and non-critical) error if in writable_schema mode. + case OP_IdxDelete: + goto __126 + + // Opcode: DeferredSeek P1 * P3 P4 * + // Synopsis: Move P3 to P1.rowid if needed + // + // P1 is an open index cursor and P3 is a cursor on the corresponding + // table. This opcode does a deferred seek of the P3 table cursor + // to the row that corresponds to the current row of P1. + // + // This is a deferred seek. Nothing actually happens until + // the cursor is used to read a record. That way, if no reads + // occur, no unnecessary I/O happens. + // + // P4 may be an array of integers (type P4_INTARRAY) containing + // one entry for each column in the P3 table. If array entry a(i) + // is non-zero, then reading column a(i)-1 from cursor P3 is + // equivalent to performing the deferred seek and then reading column i + // from P1. This information is stored in P3 and used to redirect + // reads against P3 over to P1, thus possibly avoiding the need to + // seek and read cursor P3. + // Opcode: IdxRowid P1 P2 * * * + // Synopsis: r[P2]=rowid + // + // Write into register P2 an integer which is the last entry in the record at + // the end of the index key pointed to by cursor P1. This integer should be + // the rowid of the table entry to which this index entry points. + // + // See also: Rowid, MakeRecord. + case OP_DeferredSeek: + goto __127 + case OP_IdxRowid: + goto __128 + + // Opcode: FinishSeek P1 * * * * + // + // If cursor P1 was previously moved via OP_DeferredSeek, complete that + // seek operation now, without further delay. If the cursor seek has + // already occurred, this instruction is a no-op. + case OP_FinishSeek: + goto __129 + + // Opcode: IdxGE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY. Compare this key value against the index + // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID + // fields at the end. + // + // If the P1 index entry is greater than or equal to the key value + // then jump to P2. Otherwise fall through to the next instruction. + // Opcode: IdxGT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY. Compare this key value against the index + // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID + // fields at the end. + // + // If the P1 index entry is greater than the key value + // then jump to P2. Otherwise fall through to the next instruction. + // Opcode: IdxLT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY or ROWID. Compare this key value against + // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or + // ROWID on the P1 index. + // + // If the P1 index entry is less than the key value then jump to P2. + // Otherwise fall through to the next instruction. + // Opcode: IdxLE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY or ROWID. Compare this key value against + // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or + // ROWID on the P1 index. + // + // If the P1 index entry is less than or equal to the key value then jump + // to P2. Otherwise fall through to the next instruction. + case OP_IdxLE: + goto __130 // jump + case OP_IdxGT: + goto __131 // jump + case OP_IdxLT: + goto __132 // jump + case OP_IdxGE: + goto __133 + + // Opcode: Destroy P1 P2 P3 * * + // + // Delete an entire database table or index whose root page in the database + // file is given by P1. + // + // The table being destroyed is in the main database file if P3==0. If + // P3==1 then the table to be clear is in the auxiliary database file + // that is used to store tables create using CREATE TEMPORARY TABLE. + // + // If AUTOVACUUM is enabled then it is possible that another root page + // might be moved into the newly deleted root page in order to keep all + // root pages contiguous at the beginning of the database. The former + // value of the root page that moved - its value before the move occurred - + // is stored in register P2. If no page movement was required (because the + // table being dropped was already the last one in the database) then a + // zero is stored in register P2. If AUTOVACUUM is disabled then a zero + // is stored in register P2. + // + // This opcode throws an error if there are any active reader VMs when + // it is invoked. This is done to avoid the difficulty associated with + // updating existing cursors when a root page is moved in an AUTOVACUUM + // database. This error is thrown even if the database is not an AUTOVACUUM + // db in order to avoid introducing an incompatibility between autovacuum + // and non-autovacuum modes. + // + // See also: Clear + case OP_Destroy: + goto __134 + + // Opcode: Clear P1 P2 P3 + // + // Delete all contents of the database table or index whose root page + // in the database file is given by P1. But, unlike Destroy, do not + // remove the table or index from the database file. + // + // The table being clear is in the main database file if P2==0. If + // P2==1 then the table to be clear is in the auxiliary database file + // that is used to store tables create using CREATE TEMPORARY TABLE. + // + // If the P3 value is non-zero, then the row change count is incremented + // by the number of rows in the table being cleared. If P3 is greater + // than zero, then the value stored in register P3 is also incremented + // by the number of rows in the table being cleared. + // + // See also: Destroy + case OP_Clear: + goto __135 + + // Opcode: ResetSorter P1 * * * * + // + // Delete all contents from the ephemeral table or sorter + // that is open on cursor P1. + // + // This opcode only works for cursors used for sorting and + // opened with OP_OpenEphemeral or OP_SorterOpen. + case OP_ResetSorter: + goto __136 + + // Opcode: CreateBtree P1 P2 P3 * * + // Synopsis: r[P2]=root iDb=P1 flags=P3 + // + // Allocate a new b-tree in the main database file if P1==0 or in the + // TEMP database file if P1==1 or in an attached database if + // P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table + // it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table. + // The root page number of the new b-tree is stored in register P2. + case OP_CreateBtree: + goto __137 + + // Opcode: SqlExec * * * P4 * + // + // Run the SQL statement or statements specified in the P4 string. + case OP_SqlExec: + goto __138 + + // Opcode: ParseSchema P1 * * P4 * + // + // Read and parse all entries from the schema table of database P1 + // that match the WHERE clause P4. If P4 is a NULL pointer, then the + // entire schema for P1 is reparsed. + // + // This opcode invokes the parser to create a new virtual machine, + // then runs the new virtual machine. It is thus a re-entrant opcode. + case OP_ParseSchema: + goto __139 + + // Opcode: LoadAnalysis P1 * * * * + // + // Read the sqlite_stat1 table for database P1 and load the content + // of that table into the internal index hash table. This will cause + // the analysis to be used when preparing all subsequent queries. + case OP_LoadAnalysis: + goto __140 + + // Opcode: DropTable P1 * * P4 * + // + // Remove the internal (in-memory) data structures that describe + // the table named P4 in database P1. This is called after a table + // is dropped from disk (using the Destroy opcode) in order to keep + // the internal representation of the + // schema consistent with what is on disk. + case OP_DropTable: + goto __141 + + // Opcode: DropIndex P1 * * P4 * + // + // Remove the internal (in-memory) data structures that describe + // the index named P4 in database P1. This is called after an index + // is dropped from disk (using the Destroy opcode) + // in order to keep the internal representation of the + // schema consistent with what is on disk. + case OP_DropIndex: + goto __142 + + // Opcode: DropTrigger P1 * * P4 * + // + // Remove the internal (in-memory) data structures that describe + // the trigger named P4 in database P1. This is called after a trigger + // is dropped from disk (using the Destroy opcode) in order to keep + // the internal representation of the + // schema consistent with what is on disk. + case OP_DropTrigger: + goto __143 + + // Opcode: IntegrityCk P1 P2 P3 P4 P5 + // + // Do an analysis of the currently open database. Store in + // register P1 the text of an error message describing any problems. + // If no problems are found, store a NULL in register P1. + // + // The register P3 contains one less than the maximum number of allowed errors. + // At most reg(P3) errors will be reported. + // In other words, the analysis stops as soon as reg(P1) errors are + // seen. Reg(P1) is updated with the number of errors remaining. + // + // The root page numbers of all tables in the database are integers + // stored in P4_INTARRAY argument. + // + // If P5 is not zero, the check is done on the auxiliary database + // file, not the main database file. + // + // This opcode is used to implement the integrity_check pragma. + case OP_IntegrityCk: + goto __144 + + // Opcode: RowSetAdd P1 P2 * * * + // Synopsis: rowset(P1)=r[P2] + // + // Insert the integer value held by register P2 into a RowSet object + // held in register P1. + // + // An assertion fails if P2 is not an integer. + case OP_RowSetAdd: + goto __145 + + // Opcode: RowSetRead P1 P2 P3 * * + // Synopsis: r[P3]=rowset(P1) + // + // Extract the smallest value from the RowSet object in P1 + // and put that value into register P3. + // Or, if RowSet object P1 is initially empty, leave P3 + // unchanged and jump to instruction P2. + case OP_RowSetRead: + goto __146 + + // Opcode: RowSetTest P1 P2 P3 P4 + // Synopsis: if r[P3] in rowset(P1) goto P2 + // + // Register P3 is assumed to hold a 64-bit integer value. If register P1 + // contains a RowSet object and that RowSet object contains + // the value held in P3, jump to register P2. Otherwise, insert the + // integer in P3 into the RowSet and continue on to the + // next opcode. + // + // The RowSet object is optimized for the case where sets of integers + // are inserted in distinct phases, which each set contains no duplicates. + // Each set is identified by a unique P4 value. The first set + // must have P4==0, the final set must have P4==-1, and for all other sets + // must have P4>0. + // + // This allows optimizations: (a) when P4==0 there is no need to test + // the RowSet object for P3, as it is guaranteed not to contain it, + // (b) when P4==-1 there is no need to insert the value, as it will + // never be tested for, and (c) when a value that is part of set X is + // inserted, there is no need to search to see if the same value was + // previously inserted as part of set X (only if it was previously + // inserted as part of some other set). + case OP_RowSetTest: + goto __147 + + // Opcode: Program P1 P2 P3 P4 P5 + // + // Execute the trigger program passed as P4 (type P4_SUBPROGRAM). + // + // P1 contains the address of the memory cell that contains the first memory + // cell in an array of values used as arguments to the sub-program. P2 + // contains the address to jump to if the sub-program throws an IGNORE + // exception using the RAISE() function. Register P3 contains the address + // of a memory cell in this (the parent) VM that is used to allocate the + // memory required by the sub-vdbe at runtime. + // + // P4 is a pointer to the VM containing the trigger program. + // + // If P5 is non-zero, then recursive program invocation is enabled. + case OP_Program: + goto __148 + + // Opcode: Param P1 P2 * * * + // + // This opcode is only ever present in sub-programs called via the + // OP_Program instruction. Copy a value currently stored in a memory + // cell of the calling (parent) frame to cell P2 in the current frames + // address space. This is used by trigger programs to access the new.* + // and old.* values. + // + // The address of the cell in the parent frame is determined by adding + // the value of the P1 argument to the value of the P1 argument to the + // calling OP_Program instruction. + case OP_Param: + goto __149 + + // Opcode: FkCounter P1 P2 * * * + // Synopsis: fkctr[P1]+=P2 + // + // Increment a "constraint counter" by P2 (P2 may be negative or positive). + // If P1 is non-zero, the database constraint counter is incremented + // (deferred foreign key constraints). Otherwise, if P1 is zero, the + // statement counter is incremented (immediate foreign key constraints). + case OP_FkCounter: + goto __150 + + // Opcode: FkIfZero P1 P2 * * * + // Synopsis: if fkctr[P1]==0 goto P2 + // + // This opcode tests if a foreign key constraint-counter is currently zero. + // If so, jump to instruction P2. Otherwise, fall through to the next + // instruction. + // + // If P1 is non-zero, then the jump is taken if the database constraint-counter + // is zero (the one that counts deferred constraint violations). If P1 is + // zero, the jump is taken if the statement constraint-counter is zero + // (immediate foreign key constraint violations). + case OP_FkIfZero: + goto __151 + + // Opcode: MemMax P1 P2 * * * + // Synopsis: r[P1]=max(r[P1],r[P2]) + // + // P1 is a register in the root frame of this VM (the root frame is + // different from the current frame if this instruction is being executed + // within a sub-program). Set the value of register P1 to the maximum of + // its current value and the value in register P2. + // + // This instruction throws an error if the memory cell is not initially + // an integer. + case OP_MemMax: + goto __152 + + // Opcode: IfPos P1 P2 P3 * * + // Synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 + // + // Register P1 must contain an integer. + // If the value of register P1 is 1 or greater, subtract P3 from the + // value in P1 and jump to P2. + // + // If the initial value of register P1 is less than 1, then the + // value is unchanged and control passes through to the next instruction. + case OP_IfPos: + goto __153 + + // Opcode: OffsetLimit P1 P2 P3 * * + // Synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) + // + // This opcode performs a commonly used computation associated with + // LIMIT and OFFSET process. r[P1] holds the limit counter. r[P3] + // holds the offset counter. The opcode computes the combined value + // of the LIMIT and OFFSET and stores that value in r[P2]. The r[P2] + // value computed is the total number of rows that will need to be + // visited in order to complete the query. + // + // If r[P3] is zero or negative, that means there is no OFFSET + // and r[P2] is set to be the value of the LIMIT, r[P1]. + // + // if r[P1] is zero or negative, that means there is no LIMIT + // and r[P2] is set to -1. + // + // Otherwise, r[P2] is set to the sum of r[P1] and r[P3]. + case OP_OffsetLimit: + goto __154 + + // Opcode: IfNotZero P1 P2 * * * + // Synopsis: if r[P1]!=0 then r[P1]--, goto P2 + // + // Register P1 must contain an integer. If the content of register P1 is + // initially greater than zero, then decrement the value in register P1. + // If it is non-zero (negative or positive) and then also jump to P2. + // If register P1 is initially zero, leave it unchanged and fall through. + case OP_IfNotZero: + goto __155 + + // Opcode: DecrJumpZero P1 P2 * * * + // Synopsis: if (--r[P1])==0 goto P2 + // + // Register P1 must hold an integer. Decrement the value in P1 + // and jump to P2 if the new value is exactly zero. + case OP_DecrJumpZero: + goto __156 + + // Opcode: AggStep * P2 P3 P4 P5 + // Synopsis: accum=r[P3] step(r[P2@P5]) + // + // Execute the xStep function for an aggregate. + // The function has P5 arguments. P4 is a pointer to the + // FuncDef structure that specifies the function. Register P3 is the + // accumulator. + // + // The P5 arguments are taken from register P2 and its + // successors. + // Opcode: AggInverse * P2 P3 P4 P5 + // Synopsis: accum=r[P3] inverse(r[P2@P5]) + // + // Execute the xInverse function for an aggregate. + // The function has P5 arguments. P4 is a pointer to the + // FuncDef structure that specifies the function. Register P3 is the + // accumulator. + // + // The P5 arguments are taken from register P2 and its + // successors. + // Opcode: AggStep1 P1 P2 P3 P4 P5 + // Synopsis: accum=r[P3] step(r[P2@P5]) + // + // Execute the xStep (if P1==0) or xInverse (if P1!=0) function for an + // aggregate. The function has P5 arguments. P4 is a pointer to the + // FuncDef structure that specifies the function. Register P3 is the + // accumulator. + // + // The P5 arguments are taken from register P2 and its + // successors. + // + // This opcode is initially coded as OP_AggStep0. On first evaluation, + // the FuncDef stored in P4 is converted into an sqlite3_context and + // the opcode is changed. In this way, the initialization of the + // sqlite3_context only happens once, instead of on each call to the + // step function. + case OP_AggInverse: + goto __157 + case OP_AggStep: + goto __158 + case OP_AggStep1: + goto __159 + + // Opcode: AggFinal P1 P2 * P4 * + // Synopsis: accum=r[P1] N=P2 + // + // P1 is the memory location that is the accumulator for an aggregate + // or window function. Execute the finalizer function + // for an aggregate and store the result in P1. + // + // P2 is the number of arguments that the step function takes and + // P4 is a pointer to the FuncDef for this function. The P2 + // argument is not used by this opcode. It is only there to disambiguate + // functions that can take varying numbers of arguments. The + // P4 argument is only needed for the case where + // the step function was not previously called. + // Opcode: AggValue * P2 P3 P4 * + // Synopsis: r[P3]=value N=P2 + // + // Invoke the xValue() function and store the result in register P3. + // + // P2 is the number of arguments that the step function takes and + // P4 is a pointer to the FuncDef for this function. The P2 + // argument is not used by this opcode. It is only there to disambiguate + // functions that can take varying numbers of arguments. The + // P4 argument is only needed for the case where + // the step function was not previously called. + case OP_AggValue: + goto __160 + case OP_AggFinal: + goto __161 + + // Opcode: Checkpoint P1 P2 P3 * * + // + // Checkpoint database P1. This is a no-op if P1 is not currently in + // WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL, + // RESTART, or TRUNCATE. Write 1 or 0 into mem[P3] if the checkpoint returns + // SQLITE_BUSY or not, respectively. Write the number of pages in the + // WAL after the checkpoint into mem[P3+1] and the number of pages + // in the WAL that have been checkpointed after the checkpoint + // completes into mem[P3+2]. However on an error, mem[P3+1] and + // mem[P3+2] are initialized to -1. + case OP_Checkpoint: + goto __162 + + // Opcode: JournalMode P1 P2 P3 * * + // + // Change the journal mode of database P1 to P3. P3 must be one of the + // PAGER_JOURNALMODE_XXX values. If changing between the various rollback + // modes (delete, truncate, persist, off and memory), this is a simple + // operation. No IO is required. + // + // If changing into or out of WAL mode the procedure is more complicated. + // + // Write a string containing the final journal-mode to register P2. + case OP_JournalMode: + goto __163 + + // Opcode: Vacuum P1 P2 * * * + // + // Vacuum the entire database P1. P1 is 0 for "main", and 2 or more + // for an attached database. The "temp" database may not be vacuumed. + // + // If P2 is not zero, then it is a register holding a string which is + // the file into which the result of vacuum should be written. When + // P2 is zero, the vacuum overwrites the original database. + case OP_Vacuum: + goto __164 + + // Opcode: IncrVacuum P1 P2 * * * + // + // Perform a single step of the incremental vacuum procedure on + // the P1 database. If the vacuum has finished, jump to instruction + // P2. Otherwise, fall through to the next instruction. + case OP_IncrVacuum: + goto __165 + + // Opcode: Expire P1 P2 * * * + // + // Cause precompiled statements to expire. When an expired statement + // is executed using sqlite3_step() it will either automatically + // reprepare itself (if it was originally created using sqlite3_prepare_v2()) + // or it will fail with SQLITE_SCHEMA. + // + // If P1 is 0, then all SQL statements become expired. If P1 is non-zero, + // then only the currently executing statement is expired. + // + // If P2 is 0, then SQL statements are expired immediately. If P2 is 1, + // then running SQL statements are allowed to continue to run to completion. + // The P2==1 case occurs when a CREATE INDEX or similar schema change happens + // that might help the statement run faster but which does not affect the + // correctness of operation. + case OP_Expire: + goto __166 + + // Opcode: CursorLock P1 * * * * + // + // Lock the btree to which cursor P1 is pointing so that the btree cannot be + // written by an other cursor. + case OP_CursorLock: + goto __167 + + // Opcode: CursorUnlock P1 * * * * + // + // Unlock the btree to which cursor P1 is pointing so that it can be + // written by other cursors. + case OP_CursorUnlock: + goto __168 + + // Opcode: TableLock P1 P2 P3 P4 * + // Synopsis: iDb=P1 root=P2 write=P3 + // + // Obtain a lock on a particular table. This instruction is only used when + // the shared-cache feature is enabled. + // + // P1 is the index of the database in sqlite3.aDb[] of the database + // on which the lock is acquired. A readlock is obtained if P3==0 or + // a write lock if P3==1. + // + // P2 contains the root-page of the table to lock. + // + // P4 contains a pointer to the name of the table being locked. This is only + // used to generate an error message if the lock cannot be obtained. + case OP_TableLock: + goto __169 + + // Opcode: VBegin * * * P4 * + // + // P4 may be a pointer to an sqlite3_vtab structure. If so, call the + // xBegin method for that table. + // + // Also, whether or not P4 is set, check that this is not being called from + // within a callback to a virtual table xSync() method. If it is, the error + // code will be set to SQLITE_LOCKED. + case OP_VBegin: + goto __170 + + // Opcode: VCreate P1 P2 * * * + // + // P2 is a register that holds the name of a virtual table in database + // P1. Call the xCreate method for that table. + case OP_VCreate: + goto __171 + + // Opcode: VDestroy P1 * * P4 * + // + // P4 is the name of a virtual table in database P1. Call the xDestroy method + // of that table. + case OP_VDestroy: + goto __172 + + // Opcode: VOpen P1 * * P4 * + // + // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. + // P1 is a cursor number. This opcode opens a cursor to the virtual + // table and stores that cursor in P1. + case OP_VOpen: + goto __173 + + // Opcode: VInitIn P1 P2 P3 * * + // Synopsis: r[P2]=ValueList(P1,P3) + // + // Set register P2 to be a pointer to a ValueList object for cursor P1 + // with cache register P3 and output register P3+1. This ValueList object + // can be used as the first argument to sqlite3_vtab_in_first() and + // sqlite3_vtab_in_next() to extract all of the values stored in the P1 + // cursor. Register P3 is used to hold the values returned by + // sqlite3_vtab_in_first() and sqlite3_vtab_in_next(). + case OP_VInitIn: + goto __174 + + // Opcode: VFilter P1 P2 P3 P4 * + // Synopsis: iplan=r[P3] zplan='P4' + // + // P1 is a cursor opened using VOpen. P2 is an address to jump to if + // the filtered result set is empty. + // + // P4 is either NULL or a string that was generated by the xBestIndex + // method of the module. The interpretation of the P4 string is left + // to the module implementation. + // + // This opcode invokes the xFilter method on the virtual table specified + // by P1. The integer query plan parameter to xFilter is stored in register + // P3. Register P3+1 stores the argc parameter to be passed to the + // xFilter method. Registers P3+2..P3+1+argc are the argc + // additional parameters which are passed to + // xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter. + // + // A jump is made to P2 if the result set after filtering would be empty. + case OP_VFilter: + goto __175 + + // Opcode: VColumn P1 P2 P3 * P5 + // Synopsis: r[P3]=vcolumn(P2) + // + // Store in register P3 the value of the P2-th column of + // the current row of the virtual-table of cursor P1. + // + // If the VColumn opcode is being used to fetch the value of + // an unchanging column during an UPDATE operation, then the P5 + // value is OPFLAG_NOCHNG. This will cause the sqlite3_vtab_nochange() + // function to return true inside the xColumn method of the virtual + // table implementation. The P5 column might also contain other + // bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are + // unused by OP_VColumn. + case OP_VColumn: + goto __176 + + // Opcode: VNext P1 P2 * * * + // + // Advance virtual table P1 to the next row in its result set and + // jump to instruction P2. Or, if the virtual table has reached + // the end of its result set, then fall through to the next instruction. + case OP_VNext: + goto __177 + + // Opcode: VRename P1 * * P4 * + // + // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. + // This opcode invokes the corresponding xRename method. The value + // in register P1 is passed as the zName argument to the xRename method. + case OP_VRename: + goto __178 + + // Opcode: VUpdate P1 P2 P3 P4 P5 + // Synopsis: data=r[P3@P2] + // + // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. + // This opcode invokes the corresponding xUpdate method. P2 values + // are contiguous memory cells starting at P3 to pass to the xUpdate + // invocation. The value in register (P3+P2-1) corresponds to the + // p2th element of the argv array passed to xUpdate. + // + // The xUpdate method will do a DELETE or an INSERT or both. + // The argv[0] element (which corresponds to memory cell P3) + // is the rowid of a row to delete. If argv[0] is NULL then no + // deletion occurs. The argv[1] element is the rowid of the new + // row. This can be NULL to have the virtual table select the new + // rowid for itself. The subsequent elements in the array are + // the values of columns in the new row. + // + // If P2==1 then no insert is performed. argv[0] is the rowid of + // a row to delete. + // + // P1 is a boolean flag. If it is set to true and the xUpdate call + // is successful, then the value returned by sqlite3_last_insert_rowid() + // is set to the value of the rowid for the row just inserted. + // + // P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to + // apply in the case of a constraint failure on an insert or update. + case OP_VUpdate: + goto __179 + + // Opcode: Pagecount P1 P2 * * * + // + // Write the current number of pages in database P1 to memory cell P2. + case OP_Pagecount: + goto __180 + + // Opcode: MaxPgcnt P1 P2 P3 * * + // + // Try to set the maximum page count for database P1 to the value in P3. + // Do not let the maximum page count fall below the current page count and + // do not change the maximum page count value if P3==0. + // + // Store the maximum page count after the change in register P2. + case OP_MaxPgcnt: + goto __181 + + // Opcode: Function P1 P2 P3 P4 * + // Synopsis: r[P3]=func(r[P2@NP]) + // + // Invoke a user function (P4 is a pointer to an sqlite3_context object that + // contains a pointer to the function to be run) with arguments taken + // from register P2 and successors. The number of arguments is in + // the sqlite3_context object that P4 points to. + // The result of the function is stored + // in register P3. Register P3 must not be one of the function inputs. + // + // P1 is a 32-bit bitmask indicating whether or not each argument to the + // function was determined to be constant at compile time. If the first + // argument was constant then bit 0 of P1 is set. This is used to determine + // whether meta data associated with a user function argument using the + // sqlite3_set_auxdata() API may be safely retained until the next + // invocation of this opcode. + // + // See also: AggStep, AggFinal, PureFunc + // Opcode: PureFunc P1 P2 P3 P4 * + // Synopsis: r[P3]=func(r[P2@NP]) + // + // Invoke a user function (P4 is a pointer to an sqlite3_context object that + // contains a pointer to the function to be run) with arguments taken + // from register P2 and successors. The number of arguments is in + // the sqlite3_context object that P4 points to. + // The result of the function is stored + // in register P3. Register P3 must not be one of the function inputs. + // + // P1 is a 32-bit bitmask indicating whether or not each argument to the + // function was determined to be constant at compile time. If the first + // argument was constant then bit 0 of P1 is set. This is used to determine + // whether meta data associated with a user function argument using the + // sqlite3_set_auxdata() API may be safely retained until the next + // invocation of this opcode. + // + // This opcode works exactly like OP_Function. The only difference is in + // its name. This opcode is used in places where the function must be + // purely non-deterministic. Some built-in date/time functions can be + // either determinitic of non-deterministic, depending on their arguments. + // When those function are used in a non-deterministic way, they will check + // to see if they were called using OP_PureFunc instead of OP_Function, and + // if they were, they throw an error. + // + // See also: AggStep, AggFinal, Function + case OP_PureFunc: + goto __182 // group + case OP_Function: + goto __183 + + // Opcode: FilterAdd P1 * P3 P4 * + // Synopsis: filter(P1) += key(P3@P4) + // + // Compute a hash on the P4 registers starting with r[P3] and + // add that hash to the bloom filter contained in r[P1]. + case OP_FilterAdd: + goto __184 + + // Opcode: Filter P1 P2 P3 P4 * + // Synopsis: if key(P3@P4) not in filter(P1) goto P2 + // + // Compute a hash on the key contained in the P4 registers starting + // with r[P3]. Check to see if that hash is found in the + // bloom filter hosted by register P1. If it is not present then + // maybe jump to P2. Otherwise fall through. + // + // False negatives are harmless. It is always safe to fall through, + // even if the value is in the bloom filter. A false negative causes + // more CPU cycles to be used, but it should still yield the correct + // answer. However, an incorrect answer may well arise from a + // false positive - if the jump is taken when it should fall through. + case OP_Filter: + goto __185 + + // Opcode: Trace P1 P2 * P4 * + // + // Write P4 on the statement trace output if statement tracing is + // enabled. + // + // Operand P1 must be 0x7fffffff and P2 must positive. + // Opcode: Init P1 P2 P3 P4 * + // Synopsis: Start at P2 + // + // Programs contain a single instance of this opcode as the very first + // opcode. + // + // If tracing is enabled (by the sqlite3_trace()) interface, then + // the UTF-8 string contained in P4 is emitted on the trace callback. + // Or if P4 is blank, use the string returned by sqlite3_sql(). + // + // If P2 is not zero, jump to instruction P2. + // + // Increment the value of P1 so that OP_Once opcodes will jump the + // first time they are evaluated for this run. + // + // If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT + // error is encountered. + case OP_Trace: + goto __186 + case OP_Init: + goto __187 + + // Opcode: Noop * * * * * + // + // Do nothing. This instruction is often useful as a jump + // destination. + // The magic Explain opcode are only inserted when explain==2 (which + // is to say when the EXPLAIN QUERY PLAN syntax is used.) + // This opcode records information from the optimizer. It is the + // the same as a no-op. This opcodesnever appears in a real VM program. + default: + goto __188 + } + goto __8 + + // **************************************************************************** + // + // What follows is a massive switch statement where each case implements a + // separate instruction in the virtual machine. If we follow the usual + // indentation conventions, each case should be indented by 6 spaces. But + // that is a lot of wasted space on the left margin. So the code within + // the switch statement will break with convention and be flush-left. Another + // big comment (similar to this one) will mark the point in the code where + // we transition back to normal indentation. + // + // The formatting of each case is important. The makefile for SQLite + // generates two C files "opcodes.h" and "opcodes.c" by scanning this + // file looking for lines that begin with "case OP_". The opcodes.h files + // will be filled with #defines that give unique integer values to each + // opcode and the opcodes.c file is filled with an array of strings where + // each string is the symbolic name for the corresponding opcode. If the + // case statement is followed by a comment of the form "/# same as ... #/" + // that comment is used to determine the particular value of the opcode. + // + // Other keywords in the comment that follows each case are used to + // construct the OPFLG_INITIALIZER value that initializes opcodeProperty[]. + // Keywords include: in1, in2, in3, out2, out3. See + // the mkopcodeh.awk script for additional information. + // + // Documentation about VDBE opcodes is generated by scanning this file + // for lines of that contain "Opcode:". That line and all subsequent + // comment lines are used in the generation of the opcode.html documentation + // file. + // + // SUMMARY: + // + // Formatting is important to scripts that scan this file. + // Do not deviate from the formatting style currently in use. + // + // + + // Opcode: Goto * P2 * * * + // + // An unconditional jump to address P2. + // The next instruction executed will be + // the one at index P2 from the beginning of + // the program. + // + // The P1 parameter is not actually used by this opcode. However, it + // is sometimes set to 1 instead of 0 as a hint to the command-line shell + // that this Goto is the bottom of a loop and that the lines from P2 down + // to the current line should be indented for EXPLAIN output. +__9: // jump + +jump_to_p2_and_check_for_interrupt: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 + + // Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev, + // OP_VNext, or OP_SorterNext) all jump here upon + // completion. Check to see if sqlite3_interrupt() has been called + // or if the progress callback needs to be invoked. + // + // This code uses unstructured "goto" statements and does not look clean. + // But that is not due to sloppy coding habits. The code is written this + // way for performance, to avoid having to run the interrupt and progress + // checks on every opcode. This helps sqlite3_step() to run about 1.5% + // faster according to "valgrind --tool=cachegrind" +check_for_interrupt: + if !(libc.AtomicLoadNInt32(db+432, 0) != 0) { + goto __189 + } + goto abort_due_to_interrupt +__189: + ; + // Call the progress callback if it is configured and the required number + // of VDBE ops have been executed (either since this invocation of + // sqlite3VdbeExec() or since last time the progress callback was called). + // If the progress callback returns non-zero, exit the virtual machine with + // a return code SQLITE_ABORT. +__190: + if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { + goto __191 + } + + nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) + if !((*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { + goto __192 + } + nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 + rc = SQLITE_INTERRUPT + goto abort_due_to_error +__192: + ; + goto __190 +__191: + ; + + goto __8 + + // Opcode: Gosub P1 P2 * * * + // + // Write the current address onto register P1 + // and then jump to address P2. +__10: // jump + ; + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Int) + *(*I64)(unsafe.Pointer(pIn1)) = I64(int32((int64(pOp) - int64(aOp)) / 24)) + + // Most jump operations do a goto to this spot in order to update + // the pOp pointer. +jump_to_p2: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 + goto __8 + + // Opcode: Return P1 * * * * + // + // Jump to the next instruction after the address in register P1. After + // the jump, register P1 becomes undefined. +__11: // in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + pOp = aOp + uintptr(*(*I64)(unsafe.Pointer(pIn1)))*24 + (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Undefined) + goto __8 + + // Opcode: InitCoroutine P1 P2 P3 * * + // + // Set up register P1 so that it will Yield to the coroutine + // located at address P3. + // + // If P2!=0 then the coroutine implementation immediately follows + // this opcode. So jump over the coroutine implementation to + // address P2. + // + // See also: EndCoroutine +__12: // jump + ; + + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + *(*I64)(unsafe.Pointer(pOut)) = I64((*Op)(unsafe.Pointer(pOp)).Fp3 - 1) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __193 + } + goto jump_to_p2 +__193: + ; + goto __8 + + // Opcode: EndCoroutine P1 * * * * + // + // The instruction at the address in register P1 is a Yield. + // Jump to the P2 parameter of that Yield. + // After the jump, register P1 becomes undefined. + // + // See also: InitCoroutine +__13: + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + pCaller = aOp + uintptr(*(*I64)(unsafe.Pointer(pIn1)))*24 + + pOp = aOp + uintptr((*VdbeOp)(unsafe.Pointer(pCaller)).Fp2-1)*24 + (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Undefined) + goto __8 + + // Opcode: Yield P1 P2 * * * + // + // Swap the program counter with the value in register P1. This + // has the effect of yielding to a coroutine. + // + // If the coroutine that is launched by this instruction ends with + // Yield or Return then continue to the next instruction. But if + // the coroutine launched by this instruction ends with + // EndCoroutine, then jump to P2 rather than continuing with the + // next instruction. + // + // See also: InitCoroutine +__14: + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Int) + pcDest = int32(*(*I64)(unsafe.Pointer(pIn1))) + *(*I64)(unsafe.Pointer(pIn1)) = I64(int32((int64(pOp) - int64(aOp)) / 24)) + + pOp = aOp + uintptr(pcDest)*24 + goto __8 + + // Opcode: HaltIfNull P1 P2 P3 P4 P5 + // Synopsis: if r[P3]=null halt + // + // Check the value in register P3. If it is NULL then Halt using + // parameter P1, P2, and P4 as if this were a Halt instruction. If the + // value in register P3 is not NULL, then this routine is a no-op. + // The P5 parameter should be 1. +__15: // in3 + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Null == 0) { + goto __194 + } + goto __8 +__194: + ; + + // Opcode: Halt P1 P2 * P4 P5 + // + // Exit immediately. All open cursors, etc are closed + // automatically. + // + // P1 is the result code returned by sqlite3_exec(), sqlite3_reset(), + // or sqlite3_finalize(). For a normal halt, this should be SQLITE_OK (0). + // For errors, it can be some other value. If P1!=0 then P2 will determine + // whether or not to rollback the current transaction. Do not rollback + // if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort, + // then back out all changes that have occurred during this execution of the + // VDBE, but do not rollback the transaction. + // + // If P4 is not null then it is an error message string. + // + // P5 is a value between 0 and 4, inclusive, that modifies the P4 string. + // + // 0: (no change) + // 1: NOT NULL contraint failed: P4 + // 2: UNIQUE constraint failed: P4 + // 3: CHECK constraint failed: P4 + // 4: FOREIGN KEY constraint failed: P4 + // + // If P5 is not zero and P4 is NULL, then everything after the ":" is + // omitted. + // + // There is an implied "Halt 0 0 0" instruction inserted at the very end of + // every program. So a jump past the last instruction of the program + // is the same as executing Halt. +__16: + + pcx = int32((int64(pOp) - int64(aOp)) / 24) + if !((*Op)(unsafe.Pointer(pOp)).Fp1 == SQLITE_OK && (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { + goto __195 + } + // Halt the sub-program. Return control to the parent frame. + pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame + (*Vdbe)(unsafe.Pointer(p)).FpFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent + (*Vdbe)(unsafe.Pointer(p)).FnFrame-- + Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) + pcx = Xsqlite3VdbeFrameRestore(tls, pFrame) + if !((*Op)(unsafe.Pointer(pOp)).Fp2 == OE_Ignore) { + goto __196 + } + // Instruction pcx is the OP_Program that invoked the sub-program + // currently being halted. If the p2 instruction of this OP_Halt + // instruction is set to OE_Ignore, then the sub-program is throwing + // an IGNORE exception. In this case jump to the address specified + // as the p2 of the calling OP_Program. + pcx = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(pcx)*24)).Fp2 - 1 +__196: + ; + aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + aMem = (*Vdbe)(unsafe.Pointer(p)).FaMem + pOp = aOp + uintptr(pcx)*24 + goto __8 +__195: + ; + (*Vdbe)(unsafe.Pointer(p)).Frc = (*Op)(unsafe.Pointer(pOp)).Fp1 + (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8((*Op)(unsafe.Pointer(pOp)).Fp2) + (*Vdbe)(unsafe.Pointer(p)).Fpc = pcx + + if !((*Vdbe)(unsafe.Pointer(p)).Frc != 0) { + goto __197 + } + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { + goto __198 + } + + Xsqlite3VdbeError(tls, p, ts+5383, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { + goto __200 + } + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5404, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) +__200: + ; + goto __199 +__198: + Xsqlite3VdbeError(tls, p, ts+3605, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) +__199: + ; + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5411, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) +__197: + ; + rc = Xsqlite3VdbeHalt(tls, p) + + if !(rc == SQLITE_BUSY) { + goto __201 + } + (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_BUSY + goto __202 +__201: + ; + + if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 { + rc = SQLITE_ERROR + } else { + rc = SQLITE_DONE + } +__202: + ; + goto vdbe_return + + // Opcode: Integer P1 P2 * * * + // Synopsis: r[P2]=P1 + // + // The 32-bit integer value P1 is written into register P2. +__17: // out2 + pOut = out2Prerelease(tls, p, pOp) + *(*I64)(unsafe.Pointer(pOut)) = I64((*Op)(unsafe.Pointer(pOp)).Fp1) + goto __8 + + // Opcode: Int64 * P2 * P4 * + // Synopsis: r[P2]=P4 + // + // P4 is a pointer to a 64-bit integer value. + // Write that value into register P2. +__18: // out2 + pOut = out2Prerelease(tls, p, pOp) + + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))) + goto __8 + + // Opcode: Real * P2 * P4 * + // Synopsis: r[P2]=P4 + // + // P4 is a pointer to a 64-bit floating point value. + // Write that value into register P2. +__19: // same as TK_FLOAT, out2 + pOut = out2Prerelease(tls, p, pOp) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Real) + + *(*float64)(unsafe.Pointer(pOut)) = *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))) + goto __8 + + // Opcode: String8 * P2 * P4 * + // Synopsis: r[P2]='P4' + // + // P4 points to a nul terminated UTF-8 string. This opcode is transformed + // into a String opcode before it is executed for the first time. During + // this transformation, the length of string P4 is computed and stored + // as the P1 parameter. +__20: // same as TK_STRING, out2 + ; + pOut = out2Prerelease(tls, p, pOp) + (*Op)(unsafe.Pointer(pOp)).Fp1 = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(pOp + 16))) + + if !(int32(encoding) != SQLITE_UTF8) { + goto __203 + } + rc = Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16)), int64(-1), uint8(SQLITE_UTF8), uintptr(0)) + + if !(rc != 0) { + goto __204 + } + goto too_big +__204: + ; + if !(SQLITE_OK != Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding))) { + goto __205 + } + goto no_mem +__205: + ; + + (*Mem)(unsafe.Pointer(pOut)).FszMalloc = 0 + *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Static) + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -7) { + goto __206 + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16))) +__206: + ; + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) + *(*uintptr)(unsafe.Pointer(pOp + 16)) = (*Mem)(unsafe.Pointer(pOut)).Fz + (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Mem)(unsafe.Pointer(pOut)).Fn +__203: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 > *(*int32)(unsafe.Pointer(db + 136))) { + goto __207 + } + goto too_big +__207: + ; + (*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_String) + + // Opcode: String P1 P2 P3 P4 P5 + // Synopsis: r[P2]='P4' (len=P1) + // + // The string value P4 of length P1 (bytes) is stored in register P2. + // + // If P3 is not zero and the content of register P3 is equal to P5, then + // the datatype of the register P2 is converted to BLOB. The content is + // the same sequence of bytes, it is merely interpreted as a BLOB instead + // of a string, as if it had been CAST. In other words: + // + // if( P3!=0 and reg[P3]==P5 ) reg[P2] := CAST(reg[P2] as BLOB) +__21: // out2 + ; + pOut = out2Prerelease(tls, p, pOp) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Str | MEM_Static | MEM_Term) + (*Mem)(unsafe.Pointer(pOut)).Fz = *(*uintptr)(unsafe.Pointer(pOp + 16)) + (*Mem)(unsafe.Pointer(pOut)).Fn = (*Op)(unsafe.Pointer(pOp)).Fp1 + (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding + + goto __8 + + // Opcode: Null P1 P2 P3 * * + // Synopsis: r[P2..P3]=NULL + // + // Write a NULL into registers P2. If P3 greater than P2, then also write + // NULL into register P3 and every register in between P2 and P3. If P3 + // is less than P2 (typically P3 is zero) then only register P2 is + // set to NULL. + // + // If the P1 value is non-zero, then also set the MEM_Cleared flag so that + // NULL values will not compare equal even if SQLITE_NULLEQ is set on + // OP_Ne or OP_Eq. +__22: + pOut = out2Prerelease(tls, p, pOp) + cnt = (*Op)(unsafe.Pointer(pOp)).Fp3 - (*Op)(unsafe.Pointer(pOp)).Fp2 + + (*Mem)(unsafe.Pointer(pOut)).Fflags = libc.AssignUint16(&nullFlag, func() uint16 { + if (*Op)(unsafe.Pointer(pOp)).Fp1 != 0 { + return uint16(MEM_Null | MEM_Cleared) + } + return uint16(MEM_Null) + }()) + (*Mem)(unsafe.Pointer(pOut)).Fn = 0 +__208: + if !(cnt > 0) { + goto __209 + } + pOut += 56 + + Xsqlite3VdbeMemSetNull(tls, pOut) + (*Mem)(unsafe.Pointer(pOut)).Fflags = nullFlag + (*Mem)(unsafe.Pointer(pOut)).Fn = 0 + cnt-- + goto __208 +__209: + ; + goto __8 + + // Opcode: SoftNull P1 * * * * + // Synopsis: r[P1]=NULL + // + // Set register P1 to have the value NULL as seen by the OP_MakeRecord + // instruction, but do not free any string or blob memory associated with + // the register, so that if the value was a string or blob that was + // previously copied using OP_SCopy, the copies will continue to be valid. +__23: + ; + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_Undefined|MEM_AffMask) | MEM_Null) + goto __8 + + // Opcode: Blob P1 P2 * P4 * + // Synopsis: r[P2]=P4 (len=P1) + // + // P4 points to a blob of data P1 bytes long. Store this + // blob in register P2. If P4 is a NULL pointer, then construct + // a zero-filled blob that is P1 bytes long in P2. +__24: // out2 + ; + pOut = out2Prerelease(tls, p, pOp) + if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { + goto __210 + } + Xsqlite3VdbeMemSetZeroBlob(tls, pOut, (*Op)(unsafe.Pointer(pOp)).Fp1) + if !(Xsqlite3VdbeMemExpandBlob(tls, pOut) != 0) { + goto __212 + } + goto no_mem +__212: + ; + goto __211 +__210: + Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16)), int64((*Op)(unsafe.Pointer(pOp)).Fp1), uint8(0), uintptr(0)) +__211: + ; + (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding + + goto __8 + + // Opcode: Variable P1 P2 * P4 * + // Synopsis: r[P2]=parameter(P1,P4) + // + // Transfer the values of bound parameter P1 into register P2 + // + // If the parameter is named, then its name appears in P4. + // The P4 value is used by sqlite3_bind_parameter_name(). +__25: // Value being transferred + + ; + + pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*56 + if !(Xsqlite3VdbeMemTooBig(tls, pVar) != 0) { + goto __213 + } + goto too_big +__213: + ; + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { + goto __214 + } + Xsqlite3VdbeMemSetNull(tls, pOut) +__214: + ; + libc.Xmemcpy(tls, pOut, pVar, uint64(uintptr(0)+24)) + *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Ephem)) + *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Static | MEM_FromBind) + + goto __8 + + // Opcode: Move P1 P2 P3 * * + // Synopsis: r[P2@P3]=r[P1@P3] + // + // Move the P3 values in register P1..P1+P3-1 over into + // registers P2..P2+P3-1. Registers P1..P1+P3-1 are + // left holding a NULL. It is an error for register ranges + // P1..P1+P3-1 and P2..P2+P3-1 to overlap. It is an error + // for P3 to be less than 1. +__26: // Register to copy to + + n = (*Op)(unsafe.Pointer(pOp)).Fp3 + p1 = (*Op)(unsafe.Pointer(pOp)).Fp1 + p2 = (*Op)(unsafe.Pointer(pOp)).Fp2 + + pIn1 = aMem + uintptr(p1)*56 + pOut = aMem + uintptr(p2)*56 +__215: + ; + + Xsqlite3VdbeMemMove(tls, pOut, pIn1) + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __218 + } + goto no_mem +__218: + ; + + pIn1 += 56 + pOut += 56 + goto __216 +__216: + if libc.PreDecInt32(&n, 1) != 0 { + goto __215 + } + goto __217 +__217: + ; + goto __8 + + // Opcode: Copy P1 P2 P3 * * + // Synopsis: r[P2@P3+1]=r[P1@P3+1] + // + // Make a copy of registers P1..P1+P3 into registers P2..P2+P3. + // + // This instruction makes a deep copy of the value. A duplicate + // is made of any string or blob constant. See also OP_SCopy. +__27: + + n1 = (*Op)(unsafe.Pointer(pOp)).Fp3 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + +__219: + if !(1 != 0) { + goto __220 + } + + Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem) + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __221 + } + goto no_mem +__221: + ; + + if !(libc.PostDecInt32(&n1, 1) == 0) { + goto __222 + } + goto __220 +__222: + ; + pOut += 56 + pIn1 += 56 + goto __219 +__220: + ; + goto __8 + + // Opcode: SCopy P1 P2 * * * + // Synopsis: r[P2]=r[P1] + // + // Make a shallow copy of register P1 into register P2. + // + // This instruction makes a shallow copy of the value. If the value + // is a string or blob, then the copy is only a pointer to the + // original and hence if the original changes so will the copy. + // Worse, if the original is deallocated, the copy becomes invalid. + // Thus the program must guarantee that the original will not change + // during the lifetime of the copy. Use OP_Copy to make a complete + // copy. +__28: // out2 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + + Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem) + goto __8 + + // Opcode: IntCopy P1 P2 * * * + // Synopsis: r[P2]=r[P1] + // + // Transfer the integer value held in register P1 into register P2. + // + // This is an optimized version of SCopy that works only for integer + // values. +__29: // out2 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + Xsqlite3VdbeMemSetInt64(tls, pOut, *(*I64)(unsafe.Pointer(pIn1))) + goto __8 + + // Opcode: FkCheck * * * * * + // + // Halt with an SQLITE_CONSTRAINT error if there are any unresolved + // foreign key constraint violations. If there are no foreign key + // constraint violations, this is a no-op. + // + // FK constraint violations are also checked when the prepared statement + // exits. This opcode is used to raise foreign key constraint errors prior + // to returning results such as a row change count or the result of a + // RETURNING clause. +__30: + if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 0)) != SQLITE_OK) { + goto __223 + } + goto abort_due_to_error +__223: + ; + goto __8 + + // Opcode: ResultRow P1 P2 * * * + // Synopsis: output=r[P1@P2] + // + // The registers P1 through P1+P2-1 contain a single row of + // results. This opcode causes the sqlite3_step() call to terminate + // with an SQLITE_ROW return code and it sets up the sqlite3_stmt + // structure to provide access to the r(P1)..r(P1+P2-1) values as + // the result row. +__31: + ; + + // Invalidate all ephemeral cursor row caches + (*Vdbe)(unsafe.Pointer(p)).FcacheCtr = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + U32(2) | U32(1) + + // Make sure the results of the current row are \000 terminated + // and have an assigned type. The results are de-ephemeralized as + // a side effect. + pMem = libc.AssignPtrUintptr(p+168, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56) + i = 0 +__224: + if !(i < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __226 + } + + if !(int32((*Mem)(unsafe.Pointer(pMem+uintptr(i)*56)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pMem+uintptr(i)*56) != 0) { + goto __227 + } + goto no_mem +__227: + ; + + Xsqlite3VdbeMemNulTerminate(tls, pMem+uintptr(i)*56) + + goto __225 +__225: + i++ + goto __224 + goto __226 +__226: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __228 + } + goto no_mem +__228: + ; + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_ROW != 0) { + goto __229 + } + (*struct { + f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_ROW), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, uintptr(0)) +__229: + ; + + // Return SQLITE_ROW + (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp)-int64(aOp))/24) + 1 + rc = SQLITE_ROW + goto vdbe_return + + // Opcode: Concat P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]+r[P1] + // + // Add the text in register P1 onto the end of the text in + // register P2 and store the result in register P3. + // If either the P1 or P2 text are NULL then store NULL in P3. + // + // P3 = P2 || P1 + // + // It is illegal for P1 and P3 to be the same register. Sometimes, + // if P3 is the same register as P2, the implementation is able + // to avoid a memcpy(). +__32: // Initial flags for P2 + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + flags1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags + + if !((int32(flags1)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { + goto __230 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __8 +__230: + ; + if !(int32(flags1)&(MEM_Str|MEM_Blob) == 0) { + goto __231 + } + if !(Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(0)) != 0) { + goto __233 + } + goto no_mem +__233: + ; + flags1 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)) + goto __232 +__231: + if !(int32(flags1)&MEM_Zero != 0) { + goto __234 + } + if !(Xsqlite3VdbeMemExpandBlob(tls, pIn1) != 0) { + goto __235 + } + goto no_mem +__235: + ; + flags1 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)) +__234: + ; +__232: + ; + flags2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags + if !(int32(flags2)&(MEM_Str|MEM_Blob) == 0) { + goto __236 + } + if !(Xsqlite3VdbeMemStringify(tls, pIn2, encoding, uint8(0)) != 0) { + goto __238 + } + goto no_mem +__238: + ; + flags2 = U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)) + goto __237 +__236: + if !(int32(flags2)&MEM_Zero != 0) { + goto __239 + } + if !(Xsqlite3VdbeMemExpandBlob(tls, pIn2) != 0) { + goto __240 + } + goto no_mem +__240: + ; + flags2 = U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)) +__239: + ; +__237: + ; + nByte = I64((*Mem)(unsafe.Pointer(pIn1)).Fn + (*Mem)(unsafe.Pointer(pIn2)).Fn) + if !(nByte > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __241 + } + goto too_big +__241: + ; + if !(Xsqlite3VdbeMemGrow(tls, pOut, int32(nByte)+3, libc.Bool32(pOut == pIn2)) != 0) { + goto __242 + } + goto no_mem +__242: + ; + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Str) + if !(pOut != pIn2) { + goto __243 + } + libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz, (*Mem)(unsafe.Pointer(pIn2)).Fz, uint64((*Mem)(unsafe.Pointer(pIn2)).Fn)) + + (*Mem)(unsafe.Pointer(pIn2)).Fflags = flags2 +__243: + ; + libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz+uintptr((*Mem)(unsafe.Pointer(pIn2)).Fn), (*Mem)(unsafe.Pointer(pIn1)).Fz, uint64((*Mem)(unsafe.Pointer(pIn1)).Fn)) + + (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags1 + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte))) = uint8(0) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte+int64(1)))) = uint8(0) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte+int64(2)))) = uint8(0) + *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Term) + (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte) + (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding + + goto __8 + + // Opcode: Add P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]+r[P2] + // + // Add the value in register P1 to the value in register P2 + // and store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: Multiply P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]*r[P2] + // + // + // Multiply the value in register P1 by the value in register P2 + // and store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: Subtract P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]-r[P1] + // + // Subtract the value in register P1 from the value in register P2 + // and store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: Divide P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]/r[P1] + // + // Divide the value in register P1 by the value in register P2 + // and store the result in register P3 (P3=P2/P1). If the value in + // register P1 is zero, then the result is NULL. If either input is + // NULL, the result is NULL. + // Opcode: Remainder P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]%r[P1] + // + // Compute the remainder after integer register P2 is divided by + // register P1 and store the result in register P3. + // If the value in register P1 is zero the result is NULL. + // If either operand is NULL, the result is NULL. +__33: // same as TK_PLUS, in1, in2, out3 +__34: // same as TK_MINUS, in1, in2, out3 +__35: // same as TK_STAR, in1, in2, out3 +__36: // same as TK_SLASH, in1, in2, out3 +__37: // Real value of right operand + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + type1 = numericType(tls, pIn1) + pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + type2 = numericType(tls, pIn2) + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + flags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __244 + } + iA = *(*I64)(unsafe.Pointer(pIn1)) + *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) = *(*I64)(unsafe.Pointer(pIn2)) + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Add: + goto __247 + case OP_Subtract: + goto __248 + case OP_Multiply: + goto __249 + case OP_Divide: + goto __250 + default: + goto __251 + } + goto __246 +__247: + if !(Xsqlite3AddInt64(tls, bp+208, iA) != 0) { + goto __252 + } + goto fp_math +__252: + ; + goto __246 +__248: + if !(Xsqlite3SubInt64(tls, bp+208, iA) != 0) { + goto __253 + } + goto fp_math +__253: + ; + goto __246 +__249: + if !(Xsqlite3MulInt64(tls, bp+208, iA) != 0) { + goto __254 + } + goto fp_math +__254: + ; + goto __246 +__250: + if !(iA == int64(0)) { + goto __255 + } + goto arithmetic_result_is_null +__255: + ; + if !(iA == int64(-1) && *(*I64)(unsafe.Pointer(bp + 208)) == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { + goto __256 + } + goto fp_math +__256: + ; + *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) /= iA + goto __246 + +__251: + if !(iA == int64(0)) { + goto __257 + } + goto arithmetic_result_is_null +__257: + ; + if !(iA == int64(-1)) { + goto __258 + } + iA = int64(1) +__258: + ; + *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) %= iA + goto __246 + +__246: + ; + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + goto __245 +__244: + if !(int32(flags)&MEM_Null != 0) { + goto __259 + } + goto arithmetic_result_is_null + goto __260 +__259: +fp_math: + rA = Xsqlite3VdbeRealValue(tls, pIn1) + rB = Xsqlite3VdbeRealValue(tls, pIn2) + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Add: + goto __262 + case OP_Subtract: + goto __263 + case OP_Multiply: + goto __264 + case OP_Divide: + goto __265 + default: + goto __266 + } + goto __261 +__262: + rB = rB + rA + goto __261 +__263: + rB = rB - rA + goto __261 +__264: + rB = rB * rA + goto __261 +__265: + // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... + if !(rA == float64(0)) { + goto __267 + } + goto arithmetic_result_is_null +__267: + ; + rB = rB / rA + goto __261 + +__266: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { + goto __268 + } + goto arithmetic_result_is_null +__268: + ; + if !(iA == int64(-1)) { + goto __269 + } + iA = int64(1) +__269: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __261 + +__261: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __270 + } + goto arithmetic_result_is_null +__270: + ; + *(*float64)(unsafe.Pointer(pOut)) = rB + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) +__260: + ; +__245: + ; + goto __8 + +arithmetic_result_is_null: + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __8 + + // Opcode: CollSeq P1 * * P4 + // + // P4 is a pointer to a CollSeq object. If the next call to a user function + // or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will + // be returned. This is used by the built-in min(), max() and nullif() + // functions. + // + // If P1 is not zero, then it is a register that a subsequent min() or + // max() aggregate will set to 1 if the current row is not the minimum or + // maximum. The P1 register is initialized to 0 by this instruction. + // + // The interface used by the implementation of the aforementioned functions + // to retrieve the collation sequence set by this opcode is not available + // publicly. Only built-in functions have access to this feature. +__38: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __271 + } + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) +__271: + ; + goto __8 + + // Opcode: BitAnd P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]&r[P2] + // + // Take the bit-wise AND of the values in register P1 and P2 and + // store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: BitOr P1 P2 P3 * * + // Synopsis: r[P3]=r[P1]|r[P2] + // + // Take the bit-wise OR of the values in register P1 and P2 and + // store the result in register P3. + // If either input is NULL, the result is NULL. + // Opcode: ShiftLeft P1 P2 P3 * * + // Synopsis: r[P3]=r[P2]<>r[P1] + // + // Shift the integer value in register P2 to the right by the + // number of bits specified by the integer in register P1. + // Store the result in register P3. + // If either input is NULL, the result is NULL. +__39: // same as TK_BITAND, in1, in2, out3 +__40: // same as TK_BITOR, in1, in2, out3 +__41: // same as TK_LSHIFT, in1, in2, out3 +__42: + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { + goto __272 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __8 +__272: + ; + *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) = Xsqlite3VdbeIntValue(tls, pIn2) + iB1 = Xsqlite3VdbeIntValue(tls, pIn1) + op = (*Op)(unsafe.Pointer(pOp)).Fopcode + if !(int32(op) == OP_BitAnd) { + goto __273 + } + *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) &= iB1 + goto __274 +__273: + if !(int32(op) == OP_BitOr) { + goto __275 + } + *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) |= iB1 + goto __276 +__275: + if !(iB1 != int64(0)) { + goto __277 + } + + // If shifting by a negative amount, shift in the other direction + if !(iB1 < int64(0)) { + goto __278 + } + + op = U8(2*OP_ShiftLeft + 1 - int32(op)) + if iB1 > int64(-64) { + iB1 = -iB1 + } else { + iB1 = int64(64) + } +__278: + ; + + if !(iB1 >= int64(64)) { + goto __279 + } + if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { + *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) = int64(0) + } else { + *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) = int64(-1) + } + goto __280 +__279: + libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) + if !(int32(op) == OP_ShiftLeft) { + goto __281 + } + *(*U64)(unsafe.Pointer(bp + 216 /* uA */)) <<= iB1 + goto __282 +__281: + *(*U64)(unsafe.Pointer(bp + 216 /* uA */)) >>= iB1 + // Sign-extend on a right shift of a negative number + if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { + goto __283 + } + *(*U64)(unsafe.Pointer(bp + 216 /* uA */)) |= U64(U64(uint64(0xffffffff))<<32|uint64(0xffffffff)) << (int64(64) - iB1) +__283: + ; +__282: + ; + libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) +__280: + ; +__277: + ; +__276: + ; +__274: + ; + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + goto __8 + + // Opcode: AddImm P1 P2 * * * + // Synopsis: r[P1]=r[P1]+P2 + // + // Add the constant P2 to the value in register P1. + // The result is always an integer. + // + // To force any register to be an integer, just add 0. +__43: // in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + Xsqlite3VdbeMemIntegerify(tls, pIn1) + *(*I64)(unsafe.Pointer(pIn1)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __8 + + // Opcode: MustBeInt P1 P2 * * * + // + // Force the value in register P1 to be an integer. If the value + // in P1 is not an integer and cannot be converted into an integer + // without data loss, then jump immediately to P2, or if P2==0 + // raise an SQLITE_MISMATCH exception. +__44: // jump, in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __284 + } + applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __285 + } + + if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { + goto __286 + } + rc = SQLITE_MISMATCH + goto abort_due_to_error + goto __287 +__286: + goto jump_to_p2 +__287: + ; +__285: + ; +__284: + ; + + (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + goto __8 + + // Opcode: RealAffinity P1 * * * * + // + // If register P1 holds an integer convert it to a real value. + // + // This opcode is used when extracting information from a column that + // has REAL affinity. Such column values may still be stored as + // integers, for space efficiency, but after extraction we want them + // to have only a real value. +__45: // in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { + goto __288 + } + + Xsqlite3VdbeMemRealify(tls, pIn1) + +__288: + ; + goto __8 + + // Opcode: Cast P1 P2 * * * + // Synopsis: affinity(r[P1]) + // + // Force the value in register P1 to be the type defined by P2. + // + //
      + //
    • P2=='A' → BLOB + //
    • P2=='B' → TEXT + //
    • P2=='C' → NUMERIC + //
    • P2=='D' → INTEGER + //
    • P2=='E' → REAL + //
    + // + // A NULL value is not changed by this routine. It remains NULL. +__46: // in1 + ; + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn1) + } + return 0 + }() + if !(rc != 0) { + goto __289 + } + goto abort_due_to_error +__289: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __290 + } + goto abort_due_to_error +__290: + ; + + goto __8 + + // Opcode: Eq P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]==r[P1] + // + // Compare the values in register P1 and P3. If reg(P3)==reg(P1) then + // jump to address P2. + // + // The SQLITE_AFF_MASK portion of P5 must be an affinity character - + // SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made + // to coerce both inputs according to this affinity before the + // comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric + // affinity is used. Note that the affinity conversions are stored + // back into the input registers P1 and P3. So this opcode can cause + // persistent changes to registers P1 and P3. + // + // Once any conversions have taken place, and neither value is NULL, + // the values are compared. If both values are blobs then memcmp() is + // used to determine the results of the comparison. If both values + // are text, then the appropriate collating function specified in + // P4 is used to do the comparison. If P4 is not specified then + // memcmp() is used to compare text string. If both values are + // numeric, then a numeric comparison is used. If the two values + // are of different types, then numbers are considered less than + // strings and strings are considered less than blobs. + // + // If SQLITE_NULLEQ is set in P5 then the result of comparison is always either + // true or false and is never NULL. If both operands are NULL then the result + // of comparison is true. If either operand is NULL then the result is false. + // If neither operand is NULL the result is the same as it would be if + // the SQLITE_NULLEQ flag were omitted from P5. + // + // This opcode saves the result of comparison for use by the new + // OP_Jump opcode. + // Opcode: Ne P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]!=r[P1] + // + // This works just like the Eq opcode except that the jump is taken if + // the operands in registers P1 and P3 are not equal. See the Eq opcode for + // additional information. + // Opcode: Lt P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]r[P1] + // + // This works just like the Lt opcode except that the jump is taken if + // the content of register P3 is greater than the content of + // register P1. See the Lt opcode for additional information. + // Opcode: Ge P1 P2 P3 P4 P5 + // Synopsis: IF r[P3]>=r[P1] + // + // This works just like the Lt opcode except that the jump is taken if + // the content of register P3 is greater than or equal to the content of + // register P1. See the Lt opcode for additional information. +__47: // same as TK_EQ, jump, in1, in3 +__48: // same as TK_NE, jump, in1, in3 +__49: // same as TK_LT, jump, in1, in3 +__50: // same as TK_LE, jump, in1, in3 +__51: // same as TK_GT, jump, in1, in3 +__52: // Copy of initial value of pIn3->flags + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags + flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags + if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { + goto __291 + } + + // Common case of comparison of two integers + if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { + goto __292 + } + iCompare = +1 + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + goto __294 + } + + goto jump_to_p2 +__294: + ; + goto __293 +__292: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __295 + } + iCompare = -1 + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + goto __297 + } + + goto jump_to_p2 +__297: + ; + goto __296 +__295: + iCompare = 0 + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + goto __298 + } + + goto jump_to_p2 +__298: + ; +__296: + ; +__293: + ; + + goto __8 +__291: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + goto __299 + } + // One or both operands are NULL + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { + goto __301 + } + // If SQLITE_NULLEQ is set (which will only happen if the operator is + // OP_Eq or OP_Ne) then take the jump or not depending on whether + // or not both operands are null. + + if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && + int32(flags3)&MEM_Cleared == 0) { + goto __303 + } + res = 0 // Operands are equal + goto __304 +__303: + res = func() int32 { + if int32(flags3)&MEM_Null != 0 { + return -1 + } + return +1 + }() // Operands are not equal +__304: + ; + goto __302 +__301: + // SQLITE_NULLEQ is clear and at least one operand is NULL, + // then the result is always NULL. + // The jump is taken if the SQLITE_JUMPIFNULL bit is set. + iCompare = 1 // Operands are not equal + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { + goto __305 + } + goto jump_to_p2 +__305: + ; + goto __8 +__302: + ; + goto __300 +__299: + // Neither operand is NULL and we couldn't do the special high-speed + // integer comparison case. So do a general-case comparison. + affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) + if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { + goto __306 + } + if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { + goto __308 + } + if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { + goto __309 + } + applyNumericAffinity(tls, pIn1, 0) + + flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags +__309: + ; + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { + goto __310 + } + applyNumericAffinity(tls, pIn3, 0) +__310: + ; +__308: + ; + goto __307 +__306: + if !(int32(affinity) == SQLITE_AFF_TEXT) { + goto __311 + } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + goto __312 + } + + Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(1)) + + flags11 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags11)&MEM_TypeMask) + if !(pIn1 == pIn3) { + goto __313 + } + flags3 = U16(int32(flags11) | MEM_Str) +__313: + ; +__312: + ; + if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + goto __314 + } + + Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) + + flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) +__314: + ; +__311: + ; +__307: + ; + + res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) +__300: + ; + + // At this point, res is negative, zero, or positive if reg[P1] is + // less than, equal to, or greater than reg[P3], respectively. Compute + // the answer to this operator in res2, depending on what the comparison + // operator actually is. The next block of code depends on the fact + // that the 6 comparison operators are consecutive integers in this + // order: NE, EQ, GT, LE, LT, GE + + if !(res < 0) { + goto __315 + } + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __316 +__315: + if !(res == 0) { + goto __317 + } + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __318 +__317: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__318: + ; +__316: + ; + iCompare = res + + // Undo any changes made by applyAffinity() to the input registers. + + (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags3 + + (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 + + if !(res2 != 0) { + goto __319 + } + goto jump_to_p2 +__319: + ; + goto __8 + + // Opcode: ElseEq * P2 * * * + // + // This opcode must follow an OP_Lt or OP_Gt comparison operator. There + // can be zero or more OP_ReleaseReg opcodes intervening, but no other + // opcodes are allowed to occur between this instruction and the previous + // OP_Lt or OP_Gt. + // + // If result of an OP_Eq comparison on the same two operands as the + // prior OP_Lt or OP_Gt would have been true, then jump to P2. + // If the result of an OP_Eq comparison on the two previous + // operands would have been false or NULL, then fall through. +__53: // same as TK_ESCAPE, jump + + ; + if !(iCompare == 0) { + goto __320 + } + goto jump_to_p2 +__320: + ; + goto __8 + + // Opcode: Permutation * * * P4 * + // + // Set the permutation used by the OP_Compare operator in the next + // instruction. The permutation is stored in the P4 operand. + // + // The permutation is only valid until the next OP_Compare that has + // the OPFLAG_PERMUTE bit set in P5. Typically the OP_Permutation should + // occur immediately prior to the OP_Compare. + // + // The first integer in the P4 integer array is the length of the array + // and does not become part of the permutation. +__54: + ; + + goto __8 + + // Opcode: Compare P1 P2 P3 P4 P5 + // Synopsis: r[P1@P3] <-> r[P2@P3] + // + // Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this + // vector "A") and in reg(P2)..reg(P2+P3-1) ("B"). Save the result of + // the comparison for use by the next OP_Jump instruct. + // + // If P5 has the OPFLAG_PERMUTE bit set, then the order of comparison is + // determined by the most recent OP_Permutation operator. If the + // OPFLAG_PERMUTE bit is clear, then register are compared in sequential + // order. + // + // P4 is a KeyInfo structure that defines collating sequences and sort + // orders for the comparison. The permutation applies to registers + // only. The KeyInfo elements are used sequentially. + // + // The comparison is a sort comparison, so NULLs compare equal, + // NULLs are less than numbers, numbers are less than strings, + // and strings are less than blobs. +__55: // The permutation + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { + goto __321 + } + aPermute = uintptr(0) + goto __322 +__321: + ; + + aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 + +__322: + ; + n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 + pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 + p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 + i1 = 0 +__323: + if !(i1 < n2) { + goto __325 + } + if aPermute != 0 { + idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i1)*4)) + } else { + idx = U32(i1) + } + + pColl = *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i1)*8)) + bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i1)))) & KEYINFO_ORDER_DESC + iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) + if !(iCompare != 0) { + goto __326 + } + if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i1))))&KEYINFO_ORDER_BIGNULL != 0 && + (int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p11)+idx)*56)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*56)).Fflags)&MEM_Null != 0)) { + goto __327 + } + iCompare = -iCompare +__327: + ; + if !(bRev != 0) { + goto __328 + } + iCompare = -iCompare +__328: + ; + goto __325 +__326: + ; + goto __324 +__324: + i1++ + goto __323 + goto __325 +__325: + ; + goto __8 + + // Opcode: Jump P1 P2 P3 * * + // + // Jump to the instruction at address P1, P2, or P3 depending on whether + // in the most recent OP_Compare instruction the P1 vector was less than + // equal to, or greater than the P2 vector, respectively. +__56: // jump + if !(iCompare < 0) { + goto __329 + } + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 + goto __330 +__329: + if !(iCompare == 0) { + goto __331 + } + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 + goto __332 +__331: + ; + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__332: + ; +__330: + ; + goto __8 + + // Opcode: And P1 P2 P3 * * + // Synopsis: r[P3]=(r[P1] && r[P2]) + // + // Take the logical AND of the values in registers P1 and P2 and + // write the result into register P3. + // + // If either P1 or P2 is 0 (false) then the result is 0 even if + // the other input is NULL. A NULL and true or two NULLs give + // a NULL output. + // Opcode: Or P1 P2 P3 * * + // Synopsis: r[P3]=(r[P1] || r[P2]) + // + // Take the logical OR of the values in register P1 and P2 and + // store the answer in register P3. + // + // If either P1 or P2 is nonzero (true) then the result is 1 (true) + // even if the other input is NULL. A NULL and false or two NULLs + // give a NULL output. +__57: // same as TK_AND, in1, in2, out3 +__58: // Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL + + v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, 2) + v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, 2) + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { + goto __333 + } + v1 = int32(and_logic[v1*3+v2]) + goto __334 +__333: + v1 = int32(or_logic[v1*3+v2]) +__334: + ; + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + if !(v1 == 2) { + goto __335 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) + goto __336 +__335: + *(*I64)(unsafe.Pointer(pOut)) = I64(v1) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) +__336: + ; + goto __8 + + // Opcode: IsTrue P1 P2 P3 P4 * + // Synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 + // + // This opcode implements the IS TRUE, IS FALSE, IS NOT TRUE, and + // IS NOT FALSE operators. + // + // Interpret the value in register P1 as a boolean value. Store that + // boolean (a 0 or 1) in register P2. Or if the value in register P1 is + // NULL, then the P3 is stored in register P2. Invert the answer if P4 + // is 1. + // + // The logic is summarized like this: + // + //
      + //
    • If P3==0 and P4==0 then r[P2] := r[P1] IS TRUE + //
    • If P3==1 and P4==1 then r[P2] := r[P1] IS FALSE + //
    • If P3==0 and P4==1 then r[P2] := r[P1] IS NOT TRUE + //
    • If P3==1 and P4==0 then r[P2] := r[P1] IS NOT FALSE + //
    +__59: // in1, out2 + ; + + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, + int64(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3)^*(*int32)(unsafe.Pointer(pOp + 16)))) + goto __8 + + // Opcode: Not P1 P2 * * * + // Synopsis: r[P2]= !r[P1] + // + // Interpret the value in register P1 as a boolean value. Store the + // boolean complement in register P2. If the value in register P1 is + // NULL, then a NULL is stored in P2. +__60: // same as TK_NOT, in1, out2 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { + goto __337 + } + Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) + goto __338 +__337: + Xsqlite3VdbeMemSetNull(tls, pOut) +__338: + ; + goto __8 + + // Opcode: BitNot P1 P2 * * * + // Synopsis: r[P2]= ~r[P1] + // + // Interpret the content of register P1 as an integer. Store the + // ones-complement of the P1 value into register P2. If P1 holds + // a NULL then store a NULL in P2. +__61: // same as TK_BITNOT, in1, out2 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + Xsqlite3VdbeMemSetNull(tls, pOut) + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { + goto __339 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) + *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) +__339: + ; + goto __8 + + // Opcode: Once P1 P2 * * * + // + // Fall through to the next instruction the first time this opcode is + // encountered on each invocation of the byte-code program. Jump to P2 + // on the second and all subsequent encounters during the same invocation. + // + // Top-level programs determine first invocation by comparing the P1 + // operand against the P1 operand on the OP_Init opcode at the beginning + // of the program. If the P1 values differ, then fall through and make + // the P1 of this opcode equal to the P1 of OP_Init. If P1 values are + // the same then take the jump. + // + // For subprograms, there is a bitmask in the VdbeFrame that determines + // whether or not the jump should be taken. The bitmask is necessary + // because the self-altering code trick does not work for recursive + // triggers. +__62: // Address of this instruction + ; + if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { + goto __340 + } + iAddr = U32(int32((int64(pOp) - int64((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 24)) + if !(int32(*(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))))&(int32(1)<<(iAddr&U32(7))) != 0) { + goto __342 + } + + goto jump_to_p2 +__342: + ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __341 +__340: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __343 + } + + goto jump_to_p2 +__343: + ; +__341: + ; + + (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 + goto __8 + + // Opcode: If P1 P2 P3 * * + // + // Jump to P2 if the value in register P1 is true. The value + // is considered true if it is numeric and non-zero. If the value + // in P1 is NULL then take the jump if and only if P3 is non-zero. +__63: + c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) + + if !(c != 0) { + goto __344 + } + goto jump_to_p2 +__344: + ; + goto __8 + + // Opcode: IfNot P1 P2 P3 * * + // + // Jump to P2 if the value in register P1 is False. The value + // is considered false if it has a numeric value of zero. If the value + // in P1 is NULL then take the jump if and only if P3 is non-zero. +__64: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) + + if !(c1 != 0) { + goto __345 + } + goto jump_to_p2 +__345: + ; + goto __8 + + // Opcode: IsNull P1 P2 * * * + // Synopsis: if r[P1]==NULL goto P2 + // + // Jump to P2 if the value in register P1 is NULL. +__65: // same as TK_ISNULL, jump, in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + goto __346 + } + goto jump_to_p2 +__346: + ; + goto __8 + + // Opcode: IsNullOrType P1 P2 P3 * * + // Synopsis: if typeof(r[P1]) IN (P3,5) goto P2 + // + // Jump to P2 if the value in register P1 is NULL or has a datatype P3. + // P3 is an integer which should be one of SQLITE_INTEGER, SQLITE_FLOAT, + // SQLITE_BLOB, SQLITE_NULL, or SQLITE_TEXT. +__66: + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) + + if !(doTheJump != 0) { + goto __347 + } + goto jump_to_p2 +__347: + ; + goto __8 + + // Opcode: ZeroOrNull P1 P2 P3 * * + // Synopsis: r[P2] = 0 OR NULL + // + // If all both registers P1 and P3 are NOT NULL, then store a zero in + // register P2. If either registers P1 or P3 are NULL then put + // a NULL in register P2. +__67: // in1, in2, out2, in3 + if !(int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)).Fflags)&MEM_Null != 0 || + int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fflags)&MEM_Null != 0) { + goto __348 + } + Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) + goto __349 +__348: + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) +__349: + ; + goto __8 + + // Opcode: NotNull P1 P2 * * * + // Synopsis: if r[P1]!=NULL goto P2 + // + // Jump to P2 if the value in register P1 is not NULL. +__68: // same as TK_NOTNULL, jump, in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { + goto __350 + } + goto jump_to_p2 +__350: + ; + goto __8 + + // Opcode: IfNullRow P1 P2 P3 * * + // Synopsis: if P1.nullRow then r[P3]=NULL, goto P2 + // + // Check the cursor P1 to see if it is currently pointing at a NULL row. + // If it is, then set register P3 to NULL and jump immediately to P2. + // If P1 is not on a NULL row, then fall through without making any + // changes. +__69: // jump + ; + + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { + goto __351 + } + Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) + goto jump_to_p2 +__351: + ; + goto __8 + + // Opcode: Offset P1 P2 P3 * * + // Synopsis: r[P3] = sqlite_offset(P1) + // + // Store in register r[P3] the byte offset into the database file that is the + // start of the payload for the record at which that cursor P1 is currently + // pointing. + // + // P2 is the column number for the argument to the sqlite_offset() function. + // This opcode does not use P2 itself, but the P2 value is used by the + // code generator. The P1, P2, and P3 operands to this opcode are the + // same as for OP_Column. + // + // This opcode is only available if SQLite is compiled with the + // -DSQLITE_ENABLE_OFFSET_SQL_FUNC option. +__70: // The VDBE cursor + ; + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + if !(pC == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE) { + goto __352 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __353 +__352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; +__353: + ; + goto __8 + + // Opcode: Column P1 P2 P3 P4 P5 + // Synopsis: r[P3]=PX + // + // Interpret the data that cursor P1 points to as a structure built using + // the MakeRecord instruction. (See the MakeRecord opcode for additional + // information about the format of the data.) Extract the P2-th column + // from this record. If there are less that (P2+1) + // values in the record, extract a NULL. + // + // The value extracted is stored in register P3. + // + // If the record contains fewer than P2 fields, then extract a NULL. Or, + // if the P4 argument is a P4_MEM use the value of the P4 argument as + // the result. + // + // If the OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG bits are set on P5 then + // the result is guaranteed to only be used as the argument of a length() + // or typeof() function, respectively. The loading of large blobs can be + // skipped for length() and all content loading can be skipped for typeof(). +__71: // PseudoTable input register + + ; + *(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)) = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + *(*U32)(unsafe.Pointer(bp + 240 /* p22 */)) = U32((*Op)(unsafe.Pointer(pOp)).Fp2) + + // If the cursor cache is stale (meaning it is not currently point at + // the correct row) then bring it up-to-date by doing the necessary + // B-Tree seek. + rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) + if !(rc != 0) { + goto __358 + } + goto abort_due_to_error +__358: + ; + + pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset + + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __359 + } //OPTIMIZATION-IF-FALSE + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { + goto __360 + } + if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { + goto __362 + } + // For the special case of as pseudo-cursor, the seekResult field + // identifies the register that holds the record + + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FseekResult)*56 + + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __363 +__362: + Xsqlite3VdbeMemSetNull(tls, pDest) + goto op_column_out +__363: + ; + goto __361 +__360: + pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) + + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, *(*uintptr)(unsafe.Pointer(bp + 232))+108) + + // Maximum page size is 64KiB + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __364 + } + goto too_big +__364: + ; +__361: + ; + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { + if int32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow))) < int32(U8(0x80)) { + return uint8(func() int32 { + *(*U32)(unsafe.Pointer(aOffset)) = U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow))) + return 1 + }()) + } + return Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow, aOffset) + }()) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __365 + } //OPTIMIZATION-IF-FALSE + // pC->aRow does not have to hold the entire row, but it does at least + // need to cover the header of the record. If pC->aRow does not contain + // the complete header, then set it to zero, forcing the header to be + // dynamically allocated. + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FszRow = U32(0) + + // Make sure a corrupt database has not given us an oversize header. + // Do this now to avoid an oversize memory allocation. + // + // Type entries can be between 1 and 5 bytes each. But 4 and 5 byte + // types use so much data space that there can only be 4096 and 32 of + // them, respectively. So the maximum header length results from a + // 3-byte type for each of the maximum of 32768 columns plus three + // extra bytes for the header length itself. 32768*3 + 3 = 98307. + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { + goto __367 + } + goto op_column_corrupt +__367: + ; + goto __366 +__365: + // This is an optimization. By skipping over the first few tests + // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a + // measurable performance gain. + // + // This branch is taken even if aOffset[0]==0. Such a record is never + // generated by SQLite, and could be considered corruption, but we + // accept it for historical reasons. When aOffset[0]==0, the code this + // branch jumps to reads past the end of the record, but never more + // than a few bytes. Even if the record occurs at the end of the page + // content area, the "page header" comes after the page content and so + // this overread is harmless. Similar overreads can occur for a corrupt + // database file. + zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow + // Conditional skipped + + goto op_column_read_header +__366: + ; +__359: + ; + + // Make sure at least the first p2+1 entries of the header have been + // parsed and valid information is in aOffset[] and pC->aType[]. + if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { + goto __368 + } + // If there is more header available for parsing in the record, try + // to extract additional fields up through the p2+1-th field + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __370 + } + // Make sure zData points to enough of the record to cover the header. + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { + goto __372 + } + libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) + if !(rc != SQLITE_OK) { + goto __374 + } + goto abort_due_to_error +__374: + ; + zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz + goto __373 +__372: + zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow +__373: + ; + + // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. +op_column_read_header: + i2 = int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed) + offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i2)*4))) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) + zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) + +__375: + if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __378 + } + zHdr++ + offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) + goto __379 +__378: + zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) + *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) + offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) +__379: + ; + *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) + goto __376 +__376: + if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { + goto __375 + } + goto __377 +__377: + ; + + // The record is corrupt if any of the following are true: + // (1) the bytes of the header extend past the declared header size + // (2) the entire header was used but not all data was used + // (3) the end of the data extends beyond the end of the record. + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { + goto __380 + } + if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { + goto __381 + } + i2 = 0 + zHdr = zEndHdr + goto __382 +__381: + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { + goto __383 + } + Xsqlite3VdbeMemRelease(tls, bp+248) +__383: + ; + goto op_column_corrupt +__382: + ; +__380: + ; + + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { + goto __384 + } + Xsqlite3VdbeMemRelease(tls, bp+248) +__384: + ; + goto __371 +__370: + *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) +__371: + ; + + // If after trying to extract new entries from the header, nHdrParsed is + // still not up to p2, that means that the record has fewer than p2 + // columns. So the result will be either the default value or a NULL. + if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { + goto __385 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { + goto __386 + } + Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) + goto __387 +__386: + Xsqlite3VdbeMemSetNull(tls, pDest) +__387: + ; + goto op_column_out +__385: + ; + goto __369 +__368: + *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) +__369: + ; + + // Extract the content for the p2+1-th column. Control can only + // reach this point if aOffset[p2], aOffset[p2+1], and pC->aType[p2] are + // all valid. + + if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { + goto __388 + } + Xsqlite3VdbeMemSetNull(tls, pDest) +__388: + ; + + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { + goto __389 + } + // This is the common case where the desired content fits on the original + // page - where the content is not on an overflow page + zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) + if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { + goto __391 + } + Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) + goto __392 +__391: + (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) + (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding + if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { + goto __393 + } + (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) + if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { + goto __395 + } + goto no_mem +__395: + ; + goto __394 +__393: + (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc +__394: + ; + libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = uint8(0) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = uint8(0) + (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] +__392: + ; + goto __390 +__389: + (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding + // This branch happens only when content is on overflow pages + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && + (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || + libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { + goto __396 + } + // Content is irrelevant for + // 1. the typeof() function, + // 2. the length(X) function if X is a blob, and + // 3. if the content length is zero. + // So we might as well use bogus content rather than reading + // content from disk. + // + // Although sqlite3VdbeSerialGet() may read at most 8 bytes from the + // buffer passed to it, debugging function VdbeMemPrettyPrint() may + // read more. Use the global constant sqlite3CtypeMap[] as the array, + // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) + // and it begins with a bunch of zeros. + Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) + goto __397 +__396: + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) + if !(rc != SQLITE_OK) { + goto __398 + } + goto abort_due_to_error +__398: + ; + Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) + *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) +__397: + ; +__390: + ; + +op_column_out: + ; + + goto __8 + +op_column_corrupt: + if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { + goto __399 + } + pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 + goto __8 + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) + goto abort_due_to_error +__400: + ; + + // Opcode: TypeCheck P1 P2 P3 P4 * + // Synopsis: typecheck(r[P1@P2]) + // + // Apply affinities to the range of P2 registers beginning with P1. + // Take the affinities from the Table object in P4. If any value + // cannot be coerced into the correct type, then raise an error. + // + // This opcode is similar to OP_Affinity except that this opcode + // forces the register type to the Table column type. This is used + // to implement "strict affinity". + // + // GENERATED ALWAYS AS ... STATIC columns are only checked if P3 + // is zero. When P3 is non-zero, no type checking occurs for + // static generated columns. Virtual columns are computed at query time + // and so they are never checked. + // + // Preconditions: + // + //
      + //
    • P2 should be the number of non-virtual columns in the + // table of P4. + //
    • Table P4 should be a STRICT table. + //
    + // + // If any precondition is false, an assertion fault occurs. +__72: + ; + pTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + aCol = (*Table)(unsafe.Pointer(pTab)).FaCol + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + i3 = 0 +__401: + if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __403 + } + if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { + goto __404 + } + if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __405 + } + goto __402 +__405: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { + goto __406 + } + pIn1 += 56 + goto __402 +__406: + ; +__404: + ; + + applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { + goto __407 + } + switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { + case COLTYPE_BLOB: + goto __409 + case COLTYPE_INTEGER: + goto __410 + case COLTYPE_INT: + goto __411 + case COLTYPE_TEXT: + goto __412 + case COLTYPE_REAL: + goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 + } + goto vdbe_type_error +__415: + ; + goto __408 + +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: + ; + + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { + goto __418 + } + // When applying REAL affinity, if the result is still an MEM_Int + // that will fit in 6 bytes, then change the type to MEM_IntReal + // so that we keep the high-resolution integer value but know that + // the type really wants to be REAL. + + if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { + goto __420 + } + *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) + *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) + goto __421 +__420: + *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) + *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) + *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) +__421: + ; + goto __419 +__418: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { + goto __422 + } + goto vdbe_type_error +__422: + ; +__419: + ; + goto __408 + +__414: + // COLTYPE_ANY. Accept anything. + goto __408 + +__408: + ; +__407: + ; + + pIn1 += 56 + goto __402 +__402: + i3++ + goto __401 + goto __403 +__403: + ; + + goto __8 + +vdbe_type_error: + Xsqlite3VdbeError(tls, p, ts+5435, + libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], + (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FzCnName)) + rc = SQLITE_CONSTRAINT | int32(12)<<8 + goto abort_due_to_error + + // Opcode: Affinity P1 P2 * P4 * + // Synopsis: affinity(r[P1@P2]) + // + // Apply affinities to a range of P2 registers starting with P1. + // + // P4 is a string that is P2 characters long. The N-th character of the + // string indicates the column affinity that should be used for the N-th + // memory cell in the range. +__73: // The affinity to be applied + + zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__423: + if !(1 != 0) { + goto __424 + } + + applyAffinity(tls, pIn1, *(*uint8)(unsafe.Pointer(zAffinity)), encoding) + if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { + goto __425 + } + // When applying REAL affinity, if the result is still an MEM_Int + // that will fit in 6 bytes, then change the type to MEM_IntReal + // so that we keep the high-resolution integer value but know that + // the type really wants to be REAL. + + if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { + goto __426 + } + *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) + *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) + goto __427 +__426: + *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) + *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) + *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) +__427: + ; +__425: + ; + + zAffinity++ + if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { + goto __428 + } + goto __424 +__428: + ; + pIn1 += 56 + goto __423 +__424: + ; + goto __8 + + // Opcode: MakeRecord P1 P2 P3 P4 * + // Synopsis: r[P3]=mkrec(r[P1@P2]) + // + // Convert P2 registers beginning with P1 into the [record format] + // use as a data record in a database table or as a key + // in an index. The OP_Column opcode can decode the record later. + // + // P4 may be a string that is P2 characters long. The N-th character of the + // string indicates the column affinity that should be used for the N-th + // field of the index key. + // + // The mapping from character to affinity is given by the SQLITE_AFF_ + // macros defined in sqliteInt.h. + // + // If P4 is NULL then all index fields have the affinity BLOB. + // + // The meaning of P5 depends on whether or not the SQLITE_ENABLE_NULL_TRIM + // compile-time option is enabled: + // + // * If SQLITE_ENABLE_NULL_TRIM is enabled, then the P5 is the index + // of the right-most table that can be null-trimmed. + // + // * If SQLITE_ENABLE_NULL_TRIM is omitted, then P5 has the value + // OPFLAG_NOCHNG_MAGIC if the OP_MakeRecord opcode is allowed to + // accept no-change records with serial_type 10. This value is + // only used inside an assert() and does not affect the end result. +__74: // Where to write next byte of the payload + + // Assuming the record contains N fields, the record format looks + // like this: + // + // ------------------------------------------------------------------------ + // | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 | + // ------------------------------------------------------------------------ + // + // Data(0) is taken from register P1. Data(1) comes from register P1+1 + // and so forth. + // + // Each type field is a varint representing the serial type of the + // corresponding data element (see sqlite3VdbeSerialType()). The + // hdr-size field is also a varint which is the offset from the beginning + // of the record to data0. + nData = uint64(0) // Number of bytes of data space + nHdr = 0 // Number of bytes of header space + nZero = int64(0) // Number of zero bytes at the end of the record + nField = (*Op)(unsafe.Pointer(pOp)).Fp1 + zAffinity1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + pData0 = aMem + uintptr(nField)*56 + nField = (*Op)(unsafe.Pointer(pOp)).Fp2 + pLast = pData0 + uintptr(nField-1)*56 + file_format = int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) + + // Identify the output register + + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + // Apply the requested affinity to all inputs + + if !(zAffinity1 != 0) { + goto __429 + } + pRec = pData0 +__430: + applyAffinity(tls, pRec, *(*uint8)(unsafe.Pointer(zAffinity1)), encoding) + if !(int32(*(*uint8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { + goto __433 + } + *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) + *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) +__433: + ; + + zAffinity1++ + pRec += 56 + + goto __431 +__431: + if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { + goto __430 + } + goto __432 +__432: + ; +__429: + ; + + // Loop through the elements that will make up the record to figure + // out how much space is required for the new record. After this loop, + // the Mem.uTemp field of each term should hold the serial-type that will + // be used for that term in the generated record: + // + // Mem.uTemp value type + // --------------- --------------- + // 0 NULL + // 1 1-byte signed integer + // 2 2-byte signed integer + // 3 3-byte signed integer + // 4 4-byte signed integer + // 5 6-byte signed integer + // 6 8-byte signed integer + // 7 IEEE float + // 8 Integer constant 0 + // 9 Integer constant 1 + // 10,11 reserved for expansion + // N>=12 and even BLOB + // N>=13 and odd text + // + // The following additional values are computed: + // nHdr Number of bytes needed for the record header + // nData Number of bytes of data space needed for the record + // nZero Zero bytes at the end of the record + pRec = pLast +__434: + ; + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { + goto __437 + } + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { + goto __439 + } + // Values with MEM_Null and MEM_Zero are created by xColumn virtual + // table methods that never invoke sqlite3_result_xxxxx() while + // computing an unchanging column value in an UPDATE statement. + // Give such values a special internal-use-only serial-type of 10 + // so that they can be passed through to xUpdate and have + // a true sqlite3_value_nochange(). + + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) + goto __440 +__439: + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) +__440: + ; + nHdr++ + goto __438 +__437: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { + goto __441 + } + // Figure out whether to use 1, 2, 4, 6 or 8 bytes. + i4 = *(*I64)(unsafe.Pointer(pRec)) + + if !(i4 < int64(0)) { + goto __443 + } + uu = U64(^i4) + goto __444 +__443: + uu = U64(i4) +__444: + ; + nHdr++ + + if !(uu <= uint64(127)) { + goto __445 + } + if !(i4&int64(1) == i4 && file_format >= 4) { + goto __447 + } + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) + goto __448 +__447: + nData++ + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) +__448: + ; + goto __446 +__445: + if !(uu <= uint64(32767)) { + goto __449 + } + nData = nData + uint64(2) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) + goto __450 +__449: + if !(uu <= uint64(8388607)) { + goto __451 + } + nData = nData + uint64(3) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) + goto __452 +__451: + if !(uu <= uint64(2147483647)) { + goto __453 + } + nData = nData + uint64(4) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) + goto __454 +__453: + if !(uu <= uint64(140737488355327)) { + goto __455 + } + nData = nData + uint64(6) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) + goto __456 +__455: + nData = nData + uint64(8) + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { + goto __457 + } + // If the value is IntReal and is going to take up 8 bytes to store + // as an integer, then we might as well make it an 8-byte floating + // point value + *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) + *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) + *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __458 +__457: + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; +__454: + ; +__452: + ; +__450: + ; +__446: + ; + goto __442 +__441: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { + goto __459 + } + nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __460 +__459: + ; + + len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) + serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { + goto __461 + } + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { + goto __462 + } + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __464 + } + goto no_mem +__464: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __463 +__462: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) +__463: + ; +__461: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__460: + ; +__442: + ; +__438: + ; + if !(pRec == pData0) { + goto __465 + } + goto __436 +__465: + ; + pRec -= 56 + goto __435 +__435: + if 1 != 0 { + goto __434 + } + goto __436 +__436: + ; + + // EVIDENCE-OF: R-22564-11647 The header begins with a single varint + // which determines the total number of bytes in the header. The varint + // value is the size of the header in bytes including the size varint + // itself. + + if !(nHdr <= 126) { + goto __466 + } + // The common case + nHdr = nHdr + 1 + goto __467 +__466: + // Rare case of a really large header + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __468 + } + nHdr++ +__468: + ; +__467: + ; + nByte1 = I64(U64(nHdr) + nData) + + // Make sure the output register has a buffer large enough to store + // the new record. The output register (pOp->p3) is not allowed to + // be one of the input registers (because the following call to + // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __469 + } + // The output register is already large enough to hold the record. + // No error checks or buffer enlargement is required + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __470 +__469: + // Need to make sure that the output is not too big and then enlarge + // the output register to hold the full result + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __471 + } + goto too_big +__471: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __472 + } + goto no_mem +__472: + ; +__470: + ; + (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) + if !(nZero != 0) { + goto __473 + } + *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) + *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) +__473: + ; + + zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz + zPayload = zHdr1 + uintptr(nHdr) + + // Write the record + zHdr1 += uintptr(func() uint8 { + if U32(nHdr) < U32(0x80) { + return uint8(func() int32 { *(*U8)(unsafe.Pointer(zHdr1)) = uint8(nHdr); return 1 }()) + } + return uint8(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) + }()) + + pRec = pData0 +__474: + serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp + // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more + // additional varints, one per column. + zHdr1 += uintptr(func() uint8 { + if serial_type < U32(0x80) { + return uint8(func() int32 { *(*U8)(unsafe.Pointer(zHdr1)) = uint8(serial_type); return 1 }()) + } + return uint8(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + }()) // serial type + // EVIDENCE-OF: R-64536-51728 The values for each column in the record + // immediately follow the header. + zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content + goto __475 +__475: + if libc.PreIncUintptr(&pRec, 56) <= pLast { + goto __474 + } + goto __476 +__476: + ; + + goto __8 + + // Opcode: Count P1 P2 P3 * * + // Synopsis: r[P2]=count() + // + // Store the number of entries (an integer value) in the table or index + // opened by cursor P1 in register P2. + // + // If P3==0, then an exact count is obtained, which involves visiting + // every btree page of the table. But if P3 is non-zero, an estimate + // is returned based on the current cursor position. +__75: + ; + pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) + + if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { + goto __477 + } + *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) + goto __478 +__477: + *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. + rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) + if !(rc != 0) { + goto __479 + } + goto abort_due_to_error +__479: + ; +__478: + ; + pOut = out2Prerelease(tls, p, pOp) + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) + goto check_for_interrupt + + // Opcode: Savepoint P1 * * P4 * + // + // Open, release or rollback the savepoint named by parameter P4, depending + // on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN). + // To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE). + // To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK). +__76: + + p12 = (*Op)(unsafe.Pointer(pOp)).Fp1 + zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + // Assert that the p1 parameter is valid. Also that if there is no open + // transaction, then there cannot be any savepoints. + + if !(p12 == SAVEPOINT_BEGIN) { + goto __480 + } + if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { + goto __482 + } + // A new savepoint cannot be created if there are active write + // statements (i.e. open read/write incremental blob handles). + Xsqlite3VdbeError(tls, p, ts+5476, 0) + rc = SQLITE_BUSY + goto __483 +__482: + nName = Xsqlite3Strlen30(tls, zName) + + // This call is Ok even if this savepoint is actually a transaction + // savepoint (and therefore should not prompt xSavepoint()) callbacks. + // If this is a transaction savepoint being opened, it is guaranteed + // that the db->aVTrans[] array is empty. + + rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, + (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) + if !(rc != SQLITE_OK) { + goto __484 + } + goto abort_due_to_error +__484: + ; + + // Create a new savepoint structure. + pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) + if !(pNew != 0) { + goto __485 + } + (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 + libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) + + // If there is no open transaction, then mark this as a special + // "transaction savepoint". + if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { + goto __486 + } + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) + goto __487 +__486: + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ +__487: + ; + + // Link the new savepoint into the database handle's list. + (*Savepoint)(unsafe.Pointer(pNew)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew + (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons + (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons +__485: + ; +__483: + ; + goto __481 +__480: + ; + iSavepoint = 0 + + // Find the named savepoint. If there is no such savepoint, then an + // an error is returned to the user. + pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint +__488: + if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { + goto __490 + } + iSavepoint++ + goto __489 +__489: + pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + goto __488 + goto __490 +__490: + ; + if !!(pSavepoint != 0) { + goto __491 + } + Xsqlite3VdbeError(tls, p, ts+5527, libc.VaList(bp+88, zName)) + rc = SQLITE_ERROR + goto __492 +__491: + if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { + goto __493 + } + // It is not possible to release (commit) a savepoint if there are + // active write statements. + Xsqlite3VdbeError(tls, p, + ts+5549, 0) + rc = SQLITE_BUSY + goto __494 +__493: + + // Determine whether or not this is a transaction savepoint. If so, + // and this is a RELEASE command, then the current transaction + // is committed. + isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) + if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { + goto __495 + } + if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { + goto __497 + } + goto vdbe_return +__497: + ; + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) + if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { + goto __498 + } + (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) + goto vdbe_return +__498: + ; + rc = (*Vdbe)(unsafe.Pointer(p)).Frc + if !(rc != 0) { + goto __499 + } + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; + goto __496 +__495: + iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 + if !(p12 == SAVEPOINT_ROLLBACK) { + goto __501 + } + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) + ii = 0 +__503: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __505 + } + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) + if !(rc != SQLITE_OK) { + goto __506 + } + goto abort_due_to_error +__506: + ; + goto __504 +__504: + ii++ + goto __503 + goto __505 +__505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: + ; + if !(isSchemaChange != 0) { + goto __511 + } + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) +__511: + ; +__496: + ; + if !(rc != 0) { + goto __512 + } + goto abort_due_to_error +__512: + ; + + // Regardless of whether this is a RELEASE or ROLLBACK, destroy all + // savepoints nested inside of the savepoint being operated on. +__513: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + goto __514 + } + pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext + Xsqlite3DbFree(tls, db, pTmp) + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- + goto __513 +__514: + ; + + // If it is a RELEASE, then destroy the savepoint being operated on + // too. If it is a ROLLBACK TO, then set the number of deferred + // constraint violations present in the database to the value stored + // when the savepoint was created. + if !(p12 == SAVEPOINT_RELEASE) { + goto __515 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __517 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__517: + ; + goto __516 +__515: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__516: + ; + + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __518 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __519 + } + goto abort_due_to_error +__519: + ; +__518: + ; +__494: + ; +__492: + ; +__481: + ; + if !(rc != 0) { + goto __520 + } + goto abort_due_to_error +__520: + ; + + goto __8 + + // Opcode: AutoCommit P1 P2 * * * + // + // Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll + // back any currently active btree transactions. If there are any active + // VMs (apart from this one), then a ROLLBACK fails. A COMMIT fails if + // there are active writing VMs or active VMs that use shared cache. + // + // This instruction causes the VM to halt. +__77: + + desiredAutoCommit = (*Op)(unsafe.Pointer(pOp)).Fp1 + iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 + + // At least this one VM is active + + if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { + goto __521 + } + if !(iRollback != 0) { + goto __523 + } + + Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) + goto __524 +__523: + if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { + goto __525 + } + // If this instruction implements a COMMIT and other VMs are writing + // return an error indicating that the other VMs must complete first. + Xsqlite3VdbeError(tls, p, + ts+5603, 0) + rc = SQLITE_BUSY + goto abort_due_to_error + goto __526 +__525: + if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { + goto __527 + } + goto vdbe_return + goto __528 +__527: + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; +__524: + ; + if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { + goto __529 + } + (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) + (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) + goto vdbe_return +__529: + ; + Xsqlite3CloseSavepoints(tls, db) + if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __530 + } + rc = SQLITE_DONE + goto __531 +__530: + rc = SQLITE_ERROR +__531: + ; + goto vdbe_return + goto __522 +__521: + Xsqlite3VdbeError(tls, p, + func() uintptr { + if !(desiredAutoCommit != 0) { + return ts + 5658 /* "cannot start a t..." */ + } + return func() uintptr { + if iRollback != 0 { + return ts + 5706 /* "cannot rollback ..." */ + } + return ts + 5749 /* "cannot commit - ..." */ + }() + }(), 0) + + rc = SQLITE_ERROR + goto abort_due_to_error +__522: + ; + /*NOTREACHED*/ + + // Opcode: Transaction P1 P2 P3 P4 P5 + // + // Begin a transaction on database P1 if a transaction is not already + // active. + // If P2 is non-zero, then a write-transaction is started, or if a + // read-transaction is already active, it is upgraded to a write-transaction. + // If P2 is zero, then a read-transaction is started. If P2 is 2 or more + // then an exclusive transaction is started. + // + // P1 is the index of the database file on which the transaction is + // started. Index 0 is the main database file and index 1 is the + // file used for temporary tables. Indices of 2 or more are used for + // attached databases. + // + // If a write-transaction is started and the Vdbe.usesStmtJournal flag is + // true (this flag is set if the Vdbe may modify more than one row and may + // throw an ABORT exception), a statement transaction may also be opened. + // More specifically, a statement transaction is opened iff the database + // connection is currently not in autocommit mode, or if there are other + // active statements. A statement transaction allows the changes made by this + // VDBE to be rolled back after an error without having to roll back the + // entire transaction. If no error is encountered, the statement transaction + // will automatically commit when the VDBE halts. + // + // If P5!=0 then this opcode also checks the schema cookie against P3 + // and the schema generation counter against P4. + // The cookie changes its value whenever the database schema changes. + // This operation is used to detect when that the cookie has changed + // and that the current process needs to reread the schema. If the schema + // cookie in P3 differs from the schema cookie in the database header or + // if the schema generation counter in P4 differs from the current + // generation counter, then an SQLITE_SCHEMA error is raised and execution + // halts. The sqlite3_step() wrapper function might then reprepare the + // statement and rerun it from the beginning. +__78: + *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 + + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { + goto __532 + } + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { + goto __533 + } + // Writes prohibited by the "PRAGMA query_only=TRUE" statement + rc = SQLITE_READONLY + goto __534 +__533: + // Writes prohibited due to a prior SQLITE_CORRUPT in the current + // transaction + rc = SQLITE_CORRUPT +__534: + ; + goto abort_due_to_error +__532: + ; + pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt + + if !(pBt != 0) { + goto __535 + } + rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) + + if !(rc != SQLITE_OK) { + goto __536 + } + if !(rc&0xff == SQLITE_BUSY) { + goto __537 + } + (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) + (*Vdbe)(unsafe.Pointer(p)).Frc = rc + goto vdbe_return +__537: + ; + goto abort_due_to_error +__536: + ; + + if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && + (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && + (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { + goto __538 + } + + if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { + goto __539 + } + + (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ + (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement +__539: + ; + + rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) + if !(rc == SQLITE_OK) { + goto __540 + } + rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) +__540: + ; + + // Store the current value of the database handles deferred constraint + // counter. If the statement transaction needs to be rolled back, + // the value of this counter needs to be restored too. + (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons + (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons +__538: + ; +__535: + ; + + if !(rc == SQLITE_OK && + (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && + (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { + goto __541 + } + // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema + // version is checked to ensure that the schema has not changed since the + // SQL statement was prepared. + Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5790) + // If the schema-cookie from the database file matches the cookie + // stored with the in-memory representation of the schema, do + // not reload the schema from the database file. + // + // If virtual-tables are in use, this is not just an optimization. + // Often, v-tables store their data in other SQLite tables, which + // are queried from within xNext() and other v-table methods using + // prepared queries. If such a query is out-of-date, we do not want to + // discard the database schema, as the user code implementing the + // v-table would have to be ready for the sqlite3_vtab structure itself + // to be invalidated whenever sqlite3_step() is called from within + // a v-table method. + if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { + goto __542 + } + Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) +__542: + ; + libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) + rc = SQLITE_SCHEMA +__541: + ; + if !(rc != 0) { + goto __543 + } + goto abort_due_to_error +__543: + ; + goto __8 + + // Opcode: ReadCookie P1 P2 P3 * * + // + // Read cookie number P3 from database P1 and write it into register P2. + // P3==1 is the schema version. P3==2 is the database format. + // P3==3 is the recommended pager cache size, and so forth. P1==0 is + // the main database file and P1==1 is the database file used to store + // temporary tables. + // + // There must be a read-lock on the database (either a transaction + // must be started or there must be an open cursor) before + // executing this instruction. +__79: + ; + iDb = (*Op)(unsafe.Pointer(pOp)).Fp1 + iCookie = (*Op)(unsafe.Pointer(pOp)).Fp3 + + Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt, iCookie, bp+324) + pOut = out2Prerelease(tls, p, pOp) + *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 324 /* iMeta1 */))) + goto __8 + + // Opcode: SetCookie P1 P2 P3 * P5 + // + // Write the integer value P3 into cookie number P2 of database P1. + // P2==1 is the schema version. P2==2 is the database format. + // P2==3 is the recommended pager cache + // size, and so forth. P1==0 is the main database file and P1==1 is the + // database file used to store temporary tables. + // + // A transaction must be started before executing this opcode. + // + // If P2 is the SCHEMA_VERSION cookie (cookie number 1) then the internal + // schema version is set to P3-P5. The "PRAGMA schema_version=N" statement + // has P5 set to 1, so that the internal schema version will be different + // from the database schema version, resulting in a schema reset. +__80: + ; + + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 + + // See note about index shifting on OP_ReadCookie + rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) + if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { + goto __544 + } + // When the schema cookie changes, record the new cookie internally + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) + Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) + goto __545 +__544: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { + goto __546 + } + // Record changes in the file format + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) +__546: + ; +__545: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { + goto __547 + } + // Invalidate all prepared statements whenever the TEMP database + // schema is changed. Ticket #1644 + Xsqlite3ExpirePreparedStatements(tls, db, 0) + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) +__547: + ; + if !(rc != 0) { + goto __548 + } + goto abort_due_to_error +__548: + ; + goto __8 + + // Opcode: OpenRead P1 P2 P3 P4 P5 + // Synopsis: root=P2 iDb=P3 + // + // Open a read-only cursor for the database table whose root page is + // P2 in a database file. The database file is determined by P3. + // P3==0 means the main database, P3==1 means the database used for + // temporary tables, and P3>1 means used the corresponding attached + // database. Give the new cursor an identifier of P1. The P1 + // values need not be contiguous but all P1 values should be small integers. + // It is an error for P1 to be negative. + // + // Allowed P5 bits: + //
      + //
    • 0x02 OPFLAG_SEEKEQ: This cursor will only be used for + // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT + // of OP_SeekLE/OP_IdxLT) + //
    + // + // The P4 value may be either an integer (P4_INT32) or a pointer to + // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo + // object, then table being opened must be an [index b-tree] where the + // KeyInfo object defines the content and collating + // sequence of that index b-tree. Otherwise, if P4 is an integer + // value, then the table being opened must be a [table b-tree] with a + // number of columns no less than the value of P4. + // + // See also: OpenWrite, ReopenIdx + // Opcode: ReopenIdx P1 P2 P3 P4 P5 + // Synopsis: root=P2 iDb=P3 + // + // The ReopenIdx opcode works like OP_OpenRead except that it first + // checks to see if the cursor on P1 is already open on the same + // b-tree and if it is this opcode becomes a no-op. In other words, + // if the cursor is already open, do not reopen it. + // + // The ReopenIdx opcode may only be used with P5==0 or P5==OPFLAG_SEEKEQ + // and with P4 being a P4_KEYINFO object. Furthermore, the P3 value must + // be the same as every other ReopenIdx or OpenRead for the same cursor + // number. + // + // Allowed P5 bits: + //
      + //
    • 0x02 OPFLAG_SEEKEQ: This cursor will only be used for + // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT + // of OP_SeekLE/OP_IdxLT) + //
    + // + // See also: OP_OpenRead, OP_OpenWrite + // Opcode: OpenWrite P1 P2 P3 P4 P5 + // Synopsis: root=P2 iDb=P3 + // + // Open a read/write cursor named P1 on the table or index whose root + // page is P2 (or whose root page is held in register P2 if the + // OPFLAG_P2ISREG bit is set in P5 - see below). + // + // The P4 value may be either an integer (P4_INT32) or a pointer to + // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo + // object, then table being opened must be an [index b-tree] where the + // KeyInfo object defines the content and collating + // sequence of that index b-tree. Otherwise, if P4 is an integer + // value, then the table being opened must be a [table b-tree] with a + // number of columns no less than the value of P4. + // + // Allowed P5 bits: + //
      + //
    • 0x02 OPFLAG_SEEKEQ: This cursor will only be used for + // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT + // of OP_SeekLE/OP_IdxLT) + //
    • 0x08 OPFLAG_FORDELETE: This cursor is used only to seek + // and subsequently delete entries in an index btree. This is a + // hint to the storage engine that the storage engine is allowed to + // ignore. The hint is not used by the official SQLite b*tree storage + // engine, but is used by COMDB2. + //
    • 0x10 OPFLAG_P2ISREG: Use the content of register P2 + // as the root page, not the value of P2 itself. + //
    + // + // This instruction works like OpenRead except that it opens the cursor + // in read/write mode. + // + // See also: OP_OpenRead, OP_ReopenIdx +__81: + ; + + pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { + goto __549 + } + // Guaranteed by the code generator + + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) + goto open_cursor_set_hints +__549: + ; + // If the cursor is not currently open or is open on a different + // index, then fall through into OP_OpenRead to force a reopen +__82: +__83: + ; + + if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { + goto __550 + } + rc = SQLITE_ABORT | int32(2)<<8 + goto abort_due_to_error +__550: + ; + + nField1 = 0 + pKeyInfo1 = uintptr(0) + p23 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) + iDb1 = (*Op)(unsafe.Pointer(pOp)).Fp3 + + pDb1 = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb1)*32 + pX = (*Db)(unsafe.Pointer(pDb1)).FpBt + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { + goto __551 + } + + wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE + + if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { + goto __553 + } + (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format +__553: + ; + goto __552 +__551: + wrFlag = 0 +__552: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { + goto __554 + } + + pIn2 = aMem + uintptr(p23)*56 + + Xsqlite3VdbeMemIntegerify(tls, pIn2) + p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) + // The p2 value always comes from a prior OP_CreateBtree opcode and + // that opcode will always set the p2 value to 2 or more or else fail. + // If there were a failure, the prepared statement would have halted + // before reaching this instruction. + +__554: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { + goto __555 + } + pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) + goto __556 +__555: + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { + goto __557 + } + nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) +__557: + ; +__556: + ; + + // Table with INTEGER PRIMARY KEY and nothing else + pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) + if !(pCur == uintptr(0)) { + goto __558 + } + goto no_mem +__558: + ; + (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) + (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) + libc.SetBitFieldPtr8Uint32(pCur+8, Bool(1), 2, 0x4) + (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot = p23 + rc = Xsqlite3BtreeCursor(tls, pX, p23, wrFlag, pKeyInfo1, *(*uintptr)(unsafe.Pointer(pCur + 48))) + (*VdbeCursor)(unsafe.Pointer(pCur)).FpKeyInfo = pKeyInfo1 + // Set the VdbeCursor.isTable variable. Previous versions of + // SQLite used to check if the root-page flags were sane at this point + // and report database corruption if they were not, but this check has + // since moved into the btree layer. + (*VdbeCursor)(unsafe.Pointer(pCur)).FisTable = U8(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) != -9)) + +open_cursor_set_hints: + ; + + Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), + uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + goto __8 + + // Opcode: OpenDup P1 P2 * * * + // + // Open a new cursor P1 that points to the same ephemeral table as + // cursor P2. The P2 cursor must have been opened by a prior OP_OpenEphemeral + // opcode. Only ephemeral cursors may be duplicated. + // + // Duplicate ephemeral cursors are used for self-joins of materialized views. +__84: // The new cursor + + pOrig = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*8)) + + // Only ephemeral cursors can be duplicated + + pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) + if !(pCx == uintptr(0)) { + goto __560 + } + goto no_mem +__560: + ; + (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) + libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) + (*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pOrig)).FpKeyInfo + (*VdbeCursor)(unsafe.Pointer(pCx)).FisTable = (*VdbeCursor)(unsafe.Pointer(pOrig)).FisTable + (*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot = (*VdbeCursor)(unsafe.Pointer(pOrig)).FpgnoRoot + libc.SetBitFieldPtr8Uint32(pCx+8, Bool(int32(*(*uint8)(unsafe.Pointer(pOrig + 8))&0x4>>2)), 2, 0x4) + *(*uintptr)(unsafe.Pointer(pCx + 16)) = *(*uintptr)(unsafe.Pointer(pOrig + 16)) + libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 3, 0x8) + libc.SetBitFieldPtr8Uint32(pOrig+8, Bool(1), 3, 0x8) + rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx + 16)), (*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot, BTREE_WRCSR, + (*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo, *(*uintptr)(unsafe.Pointer(pCx + 48))) + // The sqlite3BtreeCursor() routine can only fail for the first cursor + // opened for a database. Since there is already an open cursor when this + // opcode is run, the sqlite3BtreeCursor() cannot fail + + goto __8 + + // Opcode: OpenEphemeral P1 P2 P3 P4 P5 + // Synopsis: nColumn=P2 + // + // Open a new cursor P1 to a transient table. + // The cursor is always opened read/write even if + // the main database is read-only. The ephemeral + // table is deleted automatically when the cursor is closed. + // + // If the cursor P1 is already opened on an ephemeral table, the table + // is cleared (all content is erased). + // + // P2 is the number of columns in the ephemeral table. + // The cursor points to a BTree table if P4==0 and to a BTree index + // if P4 is not 0. If P4 is not NULL, it points to a KeyInfo structure + // that defines the format of keys in the index. + // + // The P5 parameter can be a mask of the BTREE_* flags defined + // in btree.h. These flags control aspects of the operation of + // the btree. The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are + // added automatically. + // + // If P3 is positive, then reg[P3] is modified slightly so that it + // can be used as zero-length data for OP_Insert. This is an optimization + // that avoids an extra OP_Blob opcode to initialize that register. + // Opcode: OpenAutoindex P1 P2 * P4 * + // Synopsis: nColumn=P2 + // + // This opcode works the same as OP_OpenEphemeral. It has a + // different name to distinguish its use. Tables created using + // by this opcode will be used for automatically created transient + // indices in joins. +__85: +__86: + ; + + if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { + goto __561 + } + // Make register reg[P3] into a value that can be used as the data + // form sqlite3BtreeInsert() where the length of the data is zero. + // Only used when number of columns is zero + + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1525 /* "" */ +__561: + ; + pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { + goto __562 + } + // If the ephermeral table is already open and has no duplicates from + // OP_OpenDup, then erase all existing content so that the table is + // empty again, rather than creating a new table. + + (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) + (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) + rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) + goto __563 +__562: + pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) + if !(pCx1 == uintptr(0)) { + goto __564 + } + goto no_mem +__564: + ; + libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) + rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, + BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), + vfsFlags) + if !(rc == SQLITE_OK) { + goto __565 + } + rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) + if !(rc == SQLITE_OK) { + goto __566 + } + // If a transient index is required, create it by calling + // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before + // opening it. If a transient table is required, just use the + // automatically created table with root-page 1 (an BLOB_INTKEY table). + if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { + goto __567 + } + + rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, + BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) + if !(rc == SQLITE_OK) { + goto __569 + } + + rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, + pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) +__569: + ; + (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) + goto __568 +__567: + (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) + rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, + uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) + (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) +__568: + ; +__566: + ; + libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) + if !(rc != 0) { + goto __570 + } + Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) +__570: + ; +__565: + ; +__563: + ; + if !(rc != 0) { + goto __571 + } + goto abort_due_to_error +__571: + ; + (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) + goto __8 + + // Opcode: SorterOpen P1 P2 P3 P4 * + // + // This opcode works like OP_OpenEphemeral except that it opens + // a transient index that is specifically designed to sort large + // tables using an external merge-sort algorithm. + // + // If argument P3 is non-zero, then it indicates that the sorter may + // assume that a stable sort considering the first P3 fields of each + // key is sufficient to produce the required results. +__87: + ; + + pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) + if !(pCx2 == uintptr(0)) { + goto __572 + } + goto no_mem +__572: + ; + (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) + if !(rc != 0) { + goto __573 + } + goto abort_due_to_error +__573: + ; + goto __8 + + // Opcode: SequenceTest P1 P2 * * * + // Synopsis: if( cursor[P1].ctr++ ) pc = P2 + // + // P1 is a sorter cursor. If the sequence counter is currently zero, jump + // to P2. Regardless of whether or not the jump is taken, increment the + // the sequence value. +__88: + ; + pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { + goto __574 + } + goto jump_to_p2 +__574: + ; + goto __8 + + // Opcode: OpenPseudo P1 P2 P3 * * + // Synopsis: P3 columns in r[P2] + // + // Open a new cursor that points to a fake table that contains a single + // row of data. The content of that one row is the content of memory + // register P2. In other words, cursor P1 becomes an alias for the + // MEM_Blob content contained in register P2. + // + // A pseudo-table created by this opcode is used to hold a single + // row output from the sorter so that the row can be decomposed into + // individual columns using the OP_Column opcode. The OP_Column opcode + // is the only cursor opcode that works with a pseudo-table. + // + // P3 is the number of fields in the records that will be stored by + // the pseudo-table. +__89: + ; + + pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) + if !(pCx3 == uintptr(0)) { + goto __575 + } + goto no_mem +__575: + ; + (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 + (*VdbeCursor)(unsafe.Pointer(pCx3)).FisTable = U8(1) + // Give this pseudo-cursor a fake BtCursor pointer so that pCx + // can be safely passed to sqlite3VdbeCursorMoveto(). This avoids a test + // for pCx->eCurType==CURTYPE_BTREE inside of sqlite3VdbeCursorMoveto() + // which is a performance optimization + *(*uintptr)(unsafe.Pointer(pCx3 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) + + goto __8 + + // Opcode: Close P1 * * * * + // + // Close a cursor previously opened as P1. If P1 is not + // currently open, this instruction is a no-op. +__90: + ; + Xsqlite3VdbeFreeCursor(tls, p, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) = uintptr(0) + goto __8 + + // Opcode: SeekGE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as the key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the smallest entry that + // is greater than or equal to the key value. If there are no records + // greater than or equal to the key and P2 is not zero, then jump to P2. + // + // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this + // opcode will either land on a record that exactly matches the key, or + // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, + // this opcode must be followed by an IdxLE opcode with the same arguments. + // The IdxGT opcode will be skipped if this opcode succeeds, but the + // IdxGT opcode will be used on subsequent loop iterations. The + // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this + // is an equality search. + // + // This opcode leaves the cursor configured to move in forward order, + // from the beginning toward the end. In other words, the cursor is + // configured to use Next, not Prev. + // + // See also: Found, NotFound, SeekLt, SeekGt, SeekLe + // Opcode: SeekGT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as a key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the smallest entry that + // is greater than the key value. If there are no records greater than + // the key and P2 is not zero, then jump to P2. + // + // This opcode leaves the cursor configured to move in forward order, + // from the beginning toward the end. In other words, the cursor is + // configured to use Next, not Prev. + // + // See also: Found, NotFound, SeekLt, SeekGe, SeekLe + // Opcode: SeekLT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as a key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the largest entry that + // is less than the key value. If there are no records less than + // the key and P2 is not zero, then jump to P2. + // + // This opcode leaves the cursor configured to move in reverse order, + // from the end toward the beginning. In other words, the cursor is + // configured to use Prev, not Next. + // + // See also: Found, NotFound, SeekGt, SeekGe, SeekLe + // Opcode: SeekLE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), + // use the value in register P3 as a key. If cursor P1 refers + // to an SQL index, then P3 is the first in an array of P4 registers + // that are used as an unpacked index key. + // + // Reposition cursor P1 so that it points to the largest entry that + // is less than or equal to the key value. If there are no records + // less than or equal to the key and P2 is not zero, then jump to P2. + // + // This opcode leaves the cursor configured to move in reverse order, + // from the end toward the beginning. In other words, the cursor is + // configured to use Prev, not Next. + // + // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this + // opcode will either land on a record that exactly matches the key, or + // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, + // this opcode must be followed by an IdxLE opcode with the same arguments. + // The IdxGE opcode will be skipped if this opcode succeeds, but the + // IdxGE opcode will be used on subsequent loop iterations. The + // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this + // is an equality search. + // + // See also: Found, NotFound, SeekGt, SeekGe, SeekLt +__91: // jump, in3, group +__92: // jump, in3, group +__93: // jump, in3, group +__94: // Only interested in == results + + ; + + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + oc = int32((*Op)(unsafe.Pointer(pOp)).Fopcode) + eqOnly = 0 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow = U8(0) + + (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { + goto __576 + } + // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors + + // The input value in P3 might be of any type: integer, real, string, + // blob, or NULL. But it needs to be an integer before we can do + // the seek, so convert it. + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags + if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { + goto __578 + } + applyNumericAffinity(tls, pIn3, 0) +__578: + ; + iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value + newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity + (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 // But convert the type back to its original + + // If the P3 value could not be converted into an integer without + // loss of information, then special processing is required... + if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { + goto __579 + } + if !(int32(newType)&MEM_Real == 0) { + goto __580 + } + if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { + goto __581 + } + + goto jump_to_p2 + goto __582 +__581: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) + if !(rc != SQLITE_OK) { + goto __583 + } + goto abort_due_to_error +__583: + ; + goto seek_not_found +__582: + ; +__580: + ; + c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) + + // If the approximation iKey is larger than the actual real search + // term, substitute >= for > and < for <=. e.g. if the search term + // is 4.9 and the integer approximation 5: + // + // (x > 4.9) -> (x >= 5) + // (x <= 4.9) -> (x < 5) + if !(c2 > 0) { + goto __584 + } + + if !(oc&0x0001 == OP_SeekGT&0x0001) { + goto __586 + } + oc-- +__586: + ; + goto __585 +__584: + if !(c2 < 0) { + goto __587 + } + + if !(oc&0x0001 == OP_SeekLT&0x0001) { + goto __588 + } + oc++ +__588: + ; +__587: + ; +__585: + ; +__579: + ; + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) + (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete + if !(rc != SQLITE_OK) { + goto __589 + } + goto abort_due_to_error +__589: + ; + goto __577 +__576: + // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the + // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be + // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, + // with the same key. + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __590 + } + eqOnly = 1 + +__590: + ; + + nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) + + (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FnField = U16(nField2) + + // The next line of code computes as follows, only faster: + // if( oc==OP_SeekGT || oc==OP_SeekLE ){ + // r.default_rc = -1; + // }else{ + // r.default_rc = +1; + // } + (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).Fdefault_rc = func() int8 { + if 1&(oc-OP_SeekLT) != 0 { + return int8(-1) + } + return +int8(1) + }() + + (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) + if !(rc != SQLITE_OK) { + goto __591 + } + goto abort_due_to_error +__591: + ; + if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { + goto __592 + } + + goto seek_not_found +__592: + ; +__577: + ; + if !(oc >= OP_SeekGE) { + goto __593 + } + if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { + goto __595 + } + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __597 + } + if !(rc == SQLITE_DONE) { + goto __598 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 + goto __599 +__598: + goto abort_due_to_error +__599: + ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 +__593: + ; + if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { + goto __600 + } + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __602 + } + if !(rc == SQLITE_DONE) { + goto __603 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 + goto __604 +__603: + goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 +__600: + // res might be negative because the table is empty. Check to + // see if this is the case. + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) +__601: + ; +__594: + ; +seek_not_found: + ; + + if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { + goto __605 + } + goto jump_to_p2 + goto __606 +__605: + if !(eqOnly != 0) { + goto __607 + } + + pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows +__607: + ; +__606: + ; + goto __8 + + // Opcode: SeekScan P1 P2 * * * + // Synopsis: Scan-ahead up to P1 rows + // + // This opcode is a prefix opcode to OP_SeekGE. In other words, this + // opcode must be immediately followed by OP_SeekGE. This constraint is + // checked by assert() statements. + // + // This opcode uses the P1 through P4 operands of the subsequent + // OP_SeekGE. In the text that follows, the operands of the subsequent + // OP_SeekGE opcode are denoted as SeekOP.P1 through SeekOP.P4. Only + // the P1 and P2 operands of this opcode are also used, and are called + // This.P1 and This.P2. + // + // This opcode helps to optimize IN operators on a multi-column index + // where the IN operator is on the later terms of the index by avoiding + // unnecessary seeks on the btree, substituting steps to the next row + // of the b-tree instead. A correct answer is obtained if this opcode + // is omitted or is a no-op. + // + // The SeekGE.P3 and SeekGE.P4 operands identify an unpacked key which + // is the desired entry that we want the cursor SeekGE.P1 to be pointing + // to. Call this SeekGE.P4/P5 row the "target". + // + // If the SeekGE.P1 cursor is not currently pointing to a valid row, + // then this opcode is a no-op and control passes through into the OP_SeekGE. + // + // If the SeekGE.P1 cursor is pointing to a valid row, then that row + // might be the target row, or it might be near and slightly before the + // target row. This opcode attempts to position the cursor on the target + // row by, perhaps by invoking sqlite3BtreeStep() on the cursor + // between 0 and This.P1 times. + // + // There are three possible outcomes from this opcode:
      + // + //
    1. If after This.P1 steps, the cursor is still pointing to a place that + // is earlier in the btree than the target row, then fall through + // into the subsquence OP_SeekGE opcode. + // + //
    2. If the cursor is successfully moved to the target row by 0 or more + // sqlite3BtreeNext() calls, then jump to This.P2, which will land just + // past the OP_IdxGT or OP_IdxGE opcode that follows the OP_SeekGE. + // + //
    3. If the cursor ends up past the target row (indicating the the target + // row does not exist in the btree) then jump to SeekOP.P2. + //
    +__95: + ; + + // pOp->p2 points to the first instruction past the OP_IdxGT that + // follows the OP_SeekGE. + + pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { + goto __608 + } + goto __8 +__608: + ; + nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 + + (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) + (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) + (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 + *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. +__609: + if !(1 != 0) { + goto __610 + } + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) + if !(rc != 0) { + goto __611 + } + goto abort_due_to_error +__611: + ; + if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { + goto __612 + } +seekscan_search_fail: + ; + pOp += 24 + goto jump_to_p2 +__612: + ; + if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { + goto __613 + } + + goto jump_to_p2 + goto __610 +__613: + ; + if !(nStep <= 0) { + goto __614 + } + + goto __610 +__614: + ; + nStep-- + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + if !(rc != 0) { + goto __615 + } + if !(rc == SQLITE_DONE) { + goto __616 + } + rc = SQLITE_OK + goto seekscan_search_fail + goto __617 +__616: + goto abort_due_to_error +__617: + ; +__615: + ; + goto __609 +__610: + ; + + goto __8 + + // Opcode: SeekHit P1 P2 P3 * * + // Synopsis: set P2<=seekHit<=P3 + // + // Increase or decrease the seekHit value for cursor P1, if necessary, + // so that it is no less than P2 and no greater than P3. + // + // The seekHit integer represents the maximum of terms in an index for which + // there is known to be at least one match. If the seekHit value is smaller + // than the total number of equality terms in an index lookup, then the + // OP_IfNoHope opcode might run to see if the IN loop can be abandoned + // early, thus saving work. This is part of the IN-early-out optimization. + // + // P1 must be a valid b-tree cursor. +__96: + ; + pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __618 + } + (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __619 +__618: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __620 + } + (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__620: + ; +__619: + ; + goto __8 + + // Opcode: IfNotOpen P1 P2 * * * + // Synopsis: if( !csr[P1] ) goto P2 + // + // If cursor P1 is not open, jump to instruction P2. Otherwise, fall through. +__97: // jump + ; + + if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { + goto __621 + } + goto jump_to_p2_and_check_for_interrupt +__621: + ; + goto __8 + + // Opcode: Found P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If P4==0 then register P3 holds a blob constructed by MakeRecord. If + // P4>0 then register P3 is the first of P4 registers that form an unpacked + // record. + // + // Cursor P1 is on an index btree. If the record identified by P3 and P4 + // is a prefix of any entry in P1 then a jump is made to P2 and + // P1 is left pointing at the matching entry. + // + // This operation leaves the cursor in a state where it can be + // advanced in the forward direction. The Next instruction will work, + // but not the Prev instruction. + // + // See also: NotFound, NoConflict, NotExists. SeekGe + // Opcode: NotFound P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If P4==0 then register P3 holds a blob constructed by MakeRecord. If + // P4>0 then register P3 is the first of P4 registers that form an unpacked + // record. + // + // Cursor P1 is on an index btree. If the record identified by P3 and P4 + // is not the prefix of any entry in P1 then a jump is made to P2. If P1 + // does contain an entry whose prefix matches the P3/P4 record then control + // falls through to the next instruction and P1 is left pointing at the + // matching entry. + // + // This operation leaves the cursor in a state where it cannot be + // advanced in either direction. In other words, the Next and Prev + // opcodes do not work after this operation. + // + // See also: Found, NotExists, NoConflict, IfNoHope + // Opcode: IfNoHope P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // Register P3 is the first of P4 registers that form an unpacked + // record. Cursor P1 is an index btree. P2 is a jump destination. + // In other words, the operands to this opcode are the same as the + // operands to OP_NotFound and OP_IdxGT. + // + // This opcode is an optimization attempt only. If this opcode always + // falls through, the correct answer is still obtained, but extra works + // is performed. + // + // A value of N in the seekHit flag of cursor P1 means that there exists + // a key P3:N that will match some record in the index. We want to know + // if it is possible for a record P3:P4 to match some record in the + // index. If it is not possible, we can skips some work. So if seekHit + // is less than P4, attempt to find out if a match is possible by running + // OP_NotFound. + // + // This opcode is used in IN clause processing for a multi-column key. + // If an IN clause is attached to an element of the key other than the + // left-most element, and if there are no matches on the most recent + // seek over the whole key, then it might be that one of the key element + // to the left is prohibiting a match, and hence there is "no hope" of + // any match regardless of how many IN clause elements are checked. + // In such a case, we abandon the IN clause search early, using this + // opcode. The opcode name comes from the fact that the + // jump is taken if there is "no hope" of achieving a match. + // + // See also: NotFound, SeekHit + // Opcode: NoConflict P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // If P4==0 then register P3 holds a blob constructed by MakeRecord. If + // P4>0 then register P3 is the first of P4 registers that form an unpacked + // record. + // + // Cursor P1 is on an index btree. If the record identified by P3 and P4 + // contains any NULL value, jump immediately to P2. If all terms of the + // record are not-NULL then a check is done to determine if any row in the + // P1 index btree has a matching key prefix. If there are no matches, jump + // immediately to P2. If there is a match, fall through and leave the P1 + // cursor pointing to the matching row. + // + // This opcode is similar to OP_NotFound with the exceptions that the + // branch is always taken if any part of the search key input is NULL. + // + // This operation leaves the cursor in a state where it cannot be + // advanced in either direction. In other words, the Next and Prev + // opcodes do not work after this operation. + // + // See also: NotFound, Found, NotExists +__98: + ; + pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __622 + } + goto __8 +__622: + ; + +__99: // jump, in3 +__100: // jump, in3 +__101: + ; + + pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { + goto __623 + } + (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 + pIdxKey = bp + 392 /* &r2 */ + pFree = uintptr(0) + goto __624 +__623: + ; + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn3) + } + return 0 + }() + + if !(rc != 0) { + goto __625 + } + goto no_mem +__625: + ; + pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) + if !(pIdxKey == uintptr(0)) { + goto __626 + } + goto no_mem +__626: + ; + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) +__624: + ; + (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) + takeJump = 0 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { + goto __627 + } + // For the OP_NoConflict opcode, take the jump if any of the + // input fields are NULL, since any key with a NULL will not + // conflict + ii1 = 0 +__628: + if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { + goto __630 + } + if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { + goto __631 + } + takeJump = 1 + goto __630 +__631: + ; + goto __629 +__629: + ii1++ + goto __628 + goto __630 +__630: + ; +__627: + ; + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) + if !(pFree != 0) { + goto __632 + } + Xsqlite3DbFreeNN(tls, db, pFree) +__632: + ; + if !(rc != SQLITE_OK) { + goto __633 + } + goto abort_due_to_error +__633: + ; + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) + alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) + (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { + goto __634 + } + + if !(alreadyExists != 0) { + goto __636 + } + goto jump_to_p2 +__636: + ; + goto __635 +__634: + ; + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: + ; + goto __8 + + // Opcode: SeekRowid P1 P2 P3 * * + // Synopsis: intkey=r[P3] + // + // P1 is the index of a cursor open on an SQL table btree (with integer + // keys). If register P3 does not contain an integer or if P1 does not + // contain a record with rowid P3 then jump immediately to P2. + // Or, if P2 is 0, raise an SQLITE_CORRUPT error. If P1 does contain + // a record with rowid P3 then + // leave the cursor pointing at that record and fall through to the next + // instruction. + // + // The OP_NotExists opcode performs the same operation, but with OP_NotExists + // the P3 register must be guaranteed to contain an integer value. With this + // opcode, register P3 might not contain an integer. + // + // The OP_NotFound opcode performs the same operation on index btrees + // (with arbitrary multi-value keys). + // + // This opcode leaves the cursor in a state where it cannot be advanced + // in either direction. In other words, the Next and Prev opcodes will + // not work following this opcode. + // + // See also: Found, NotFound, NoConflict, SeekRowid + // Opcode: NotExists P1 P2 P3 * * + // Synopsis: intkey=r[P3] + // + // P1 is the index of a cursor open on an SQL table btree (with integer + // keys). P3 is an integer rowid. If P1 does not contain a record with + // rowid P3 then jump immediately to P2. Or, if P2 is 0, raise an + // SQLITE_CORRUPT error. If P1 does contain a record with rowid P3 then + // leave the cursor pointing at that record and fall through to the next + // instruction. + // + // The OP_SeekRowid opcode performs the same operation but also allows the + // P3 register to contain a non-integer value, in which case the jump is + // always taken. This opcode requires that P3 always contain an integer. + // + // The OP_NotFound opcode performs the same operation on index btrees + // (with arbitrary multi-value keys). + // + // This opcode leaves the cursor in a state where it cannot be advanced + // in either direction. In other words, the Next and Prev opcodes will + // not work following this opcode. + // + // See also: Found, NotFound, NoConflict, SeekRowid +__102: + + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { + goto __639 + } + // If pIn3->u.i does not contain an integer, compute iKey as the + // integer value of pIn3. Jump to P2 if pIn3 cannot be converted + // into an integer without loss of information. Take care to avoid + // changing the datatype of pIn3, however, as it is used by other + // parts of the prepared statement. + *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) + applyAffinity(tls, bp+424, uint8(SQLITE_AFF_NUMERIC), encoding) + if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { + goto __640 + } + goto jump_to_p2 +__640: + ; + iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) + goto notExistsWithKey +__639: + ; +__103: // jump, in3 + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) +notExistsWithKey: + pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + + *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) = 0 + rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+480) + + (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) // Used by OP_Delete + (*VdbeCursor)(unsafe.Pointer(pC8)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC8)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC8)).FdeferredMoveto = U8(0) + + (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) + if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { + goto __641 + } + + if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { + goto __642 + } + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: + goto jump_to_p2 +__643: + ; +__641: + ; + if !(rc != 0) { + goto __644 + } + goto abort_due_to_error +__644: + ; + goto __8 + + // Opcode: Sequence P1 P2 * * * + // Synopsis: r[P2]=cursor[P1].ctr++ + // + // Find the next available sequence number for cursor P1. + // Write the sequence number into register P2. + // The sequence number on the cursor is incremented after this + // instruction. +__104: // out2 + ; + + pOut = out2Prerelease(tls, p, pOp) + *(*I64)(unsafe.Pointer(pOut)) = libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FseqCount, 1) + goto __8 + + // Opcode: NewRowid P1 P2 P3 * * + // Synopsis: r[P2]=rowid + // + // Get a new integer record number (a.k.a "rowid") used as the key to a table. + // The record number is not previously used as a key in the database + // table that cursor P1 points to. The new record number is written + // written to register P2. + // + // If P3>0 then P3 is a register in the root frame of this VDBE that holds + // the largest previously generated record number. No new record numbers are + // allowed to be less than this value. When this value reaches its maximum, + // an SQLITE_FULL error is generated. The P3 register is updated with the ' + // generated record number. This P3 mechanism is used to help implement the + // AUTOINCREMENT feature. +__105: // Root frame of VDBE + + *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(0) + *(*int32)(unsafe.Pointer(bp + 484 /* res6 */)) = 0 + pOut = out2Prerelease(tls, p, pOp) + + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + // The next rowid or record number (different terms for the same + // thing) is obtained in a two-step algorithm. + // + // First we attempt to find the largest existing rowid and add one + // to that. But if the largest existing rowid is already the maximum + // positive integer, we have to fall through to the second + // probabilistic algorithm + // + // The second algorithm is to select a rowid at random and see if + // it already exists in the table. If it does not exist, we have + // succeeded. If the random rowid does exist, we select a new one + // and try again, up to 100 times. + + // Some compilers complain about constants of the form 0x7fffffffffffffff. + // Others complain about 0x7ffffffffffffffffLL. The following macro seems + // to provide the constant while making all compilers happy. + + if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { + goto __645 + } + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) + if !(rc != SQLITE_OK) { + goto __646 + } + goto abort_due_to_error +__646: + ; + if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { + goto __647 + } + *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 + goto __648 +__647: + ; + *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { + goto __649 + } + libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) + goto __650 +__649: + *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 +__650: + ; +__648: + ; +__645: + ; + + if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { + goto __651 + } + // Assert that P3 is a valid memory cell. + + if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { + goto __652 + } + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: + pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent + goto __654 + goto __656 +__656: + ; + // Assert that P3 is a valid memory cell. + + pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + goto __653 +__652: + // Assert that P3 is a valid memory cell. + ; + pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + +__653: + ; + + Xsqlite3VdbeMemIntegerify(tls, pMem1) + // mem(P3) holds an integer + if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { + goto __657 + } + rc = SQLITE_FULL // IMP: R-17817-00630 + goto abort_due_to_error +__657: + ; + if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { + goto __658 + } + *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) +__658: + ; + *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) +__651: + ; + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { + goto __659 + } + // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the + // largest possible integer (9223372036854775807) then the database + // engine starts picking positive candidate ROWIDs at random until + // it finds one that is not previously used. + // We cannot be in random rowid mode if this is + // an AUTOINCREMENT table. + cnt1 = 0 +__660: + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) + *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 + *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero + goto __661 +__661: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), + 0, bp+484)) == SQLITE_OK && + *(*int32)(unsafe.Pointer(bp + 484)) == 0 && + libc.PreIncInt32(&cnt1, 1) < 100 { + goto __660 + } + goto __662 +__662: + ; + if !(rc != 0) { + goto __663 + } + goto abort_due_to_error +__663: + ; + if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { + goto __664 + } + rc = SQLITE_FULL // IMP: R-38219-53002 + goto abort_due_to_error +__664: + ; + // EV: R-40812-03570 +__659: + ; + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) + goto __8 + + // Opcode: Insert P1 P2 P3 P4 P5 + // Synopsis: intkey=r[P3] data=r[P2] + // + // Write an entry into the table of cursor P1. A new entry is + // created if it doesn't already exist or the data for an existing + // entry is overwritten. The data is the value MEM_Blob stored in register + // number P2. The key is stored in register P3. The key must + // be a MEM_Int. + // + // If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is + // incremented (otherwise not). If the OPFLAG_LASTROWID flag of P5 is set, + // then rowid is stored for subsequent return by the + // sqlite3_last_insert_rowid() function (otherwise it is unmodified). + // + // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might + // run faster by avoiding an unnecessary seek on cursor P1. However, + // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior + // seeks on the cursor or if the most recent seek used a key equal to P3. + // + // If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an + // UPDATE operation. Otherwise (if the flag is clear) then this opcode + // is part of an INSERT operation. The difference is only important to + // the update hook. + // + // Parameter P4 may point to a Table structure, or may be NULL. If it is + // not NULL, then the update-hook (sqlite3.xUpdateCallback) is invoked + // following a successful insert. + // + // (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically + // allocated, then ownership of P2 is transferred to the pseudo-cursor + // and register P2 becomes ephemeral. If the cursor is changed, the + // value of register P2 will then change. Make sure this does not + // cause any problems.) + // + // This instruction only works on tables. The equivalent instruction + // for indices is OP_IdxInsert. +__106: // Payload to be inserted + + pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pKey = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { + goto __665 + } + + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + goto __666 +__665: + pTab1 = uintptr(0) + zDb = uintptr(0) +__666: + ; + + // Invoke the pre-update hook, if any + if !(pTab1 != 0) { + goto __667 + } + if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { + goto __668 + } + Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__668: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { + goto __669 + } + // Prevent post-update hook from running in cases when it should not + pTab1 = uintptr(0) +__669: + ; +__667: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { + goto __670 + } + goto __8 +__670: + ; + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { + goto __671 + } + (*Vdbe)(unsafe.Pointer(p)).FnChange++ +__671: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { + goto __672 + } + (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey +__672: + ; + + (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz + (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnData = (*Mem)(unsafe.Pointer(pData)).Fn + seekResult = func() int32 { + if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { + return (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult + } + return 0 + }() + if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { + goto __673 + } + (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) + goto __674 +__673: + (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 +__674: + ; + (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, + int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), + seekResult) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + + // Invoke the update-hook if required. + if !(rc != 0) { + goto __675 + } + goto abort_due_to_error +__675: + ; + if !(pTab1 != 0) { + goto __676 + } + + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, + func() int32 { + if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0 { + return SQLITE_UPDATE + } + return SQLITE_INSERT + }(), + zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) +__676: + ; + goto __8 + + // Opcode: RowCell P1 P2 P3 * * + // + // P1 and P2 are both open cursors. Both must be opened on the same type + // of table - intkey or index. This opcode is used as part of copying + // the current row from P2 into P1. If the cursors are opened on intkey + // tables, register P3 contains the rowid to use with the new record in + // P1. If they are opened on index tables, P3 is not used. + // + // This opcode must be followed by either an Insert or InsertIdx opcode + // with the OPFLAG_PREFORMAT flag set to complete the insert operation. +__107: // Rowid value to insert with + ; + + pDest1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pSrc = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*8)) + if (*Op)(unsafe.Pointer(pOp)).Fp3 != 0 { + iKey2 = *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) + } else { + iKey2 = int64(0) + } + rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) + if !(rc != SQLITE_OK) { + goto __677 + } + goto abort_due_to_error +__677: + ; + goto __8 + + // Opcode: Delete P1 P2 P3 P4 P5 + // + // Delete the record at which the P1 cursor is currently pointing. + // + // If the OPFLAG_SAVEPOSITION bit of the P5 parameter is set, then + // the cursor will be left pointing at either the next or the previous + // record in the table. If it is left pointing at the next record, then + // the next Next instruction will be a no-op. As a result, in this case + // it is ok to delete a record from within a Next loop. If + // OPFLAG_SAVEPOSITION bit of P5 is clear, then the cursor will be + // left in an undefined state. + // + // If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this + // delete one of several associated with deleting a table row and all its + // associated index entries. Exactly one of those deletes is the "primary" + // delete. The others are all on OPFLAG_FORDELETE cursors or else are + // marked with the AUXDELETE flag. + // + // If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row + // change count is incremented (otherwise not). + // + // P1 must not be pseudo-table. It has to be a real table with + // multiple rows. + // + // If P4 is not NULL then it points to a Table object. In this case either + // the update or pre-update hook, or both, may be invoked. The P1 cursor must + // have been positioned using OP_NotFound prior to invoking this opcode in + // this case. Specifically, if one is configured, the pre-update hook is + // invoked if P4 is not NULL. The update-hook is invoked if one is configured, + // P4 is not NULL, and the OPFLAG_NCHANGE flag is set in P2. + // + // If the OPFLAG_ISUPDATE flag is set in P2, then P3 contains the address + // of the memory cell that contains the value that the rowid of the row will + // be set to by the update. +__108: + + opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 + + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + // If the update-hook or pre-update-hook will be invoked, set zDb to + // the name of the db to pass as to it. Also set local pTab to a copy + // of p4.pTab. Finally, if p5 is true, indicating that this cursor was + // last moved with OP_Next or OP_Prev, not Seek or NotFound, set + // VdbeCursor.movetoTarget to the current rowid. + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { + goto __678 + } + + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { + goto __680 + } + (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) +__680: + ; + goto __679 +__678: + zDb1 = uintptr(0) + pTab2 = uintptr(0) +__679: + ; + + // Invoke the pre-update-hook if required. + + if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { + goto __681 + } + + Xsqlite3VdbePreUpdateHook(tls, p, pC11, + func() int32 { + if opflags&OPFLAG_ISUPDATE != 0 { + return SQLITE_UPDATE + } + return SQLITE_DELETE + }(), + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + (*Op)(unsafe.Pointer(pOp)).Fp3, -1) +__681: + ; + if !(opflags&OPFLAG_ISNOOP != 0) { + goto __682 + } + goto __8 +__682: + ; + + // Only flags that can be set are SAVEPOISTION and AUXDELETE + + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 + if !(rc != 0) { + goto __683 + } + goto abort_due_to_error +__683: + ; + + // Invoke the update-hook if required. + if !(opflags&OPFLAG_NCHANGE != 0) { + goto __684 + } + (*Vdbe)(unsafe.Pointer(p)).FnChange++ + if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __685 + } + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, + (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) + +__685: + ; +__684: + ; + + goto __8 + + // Opcode: ResetCount * * * * * + // + // The value of the change counter is copied to the database handle + // change counter (returned by subsequent calls to sqlite3_changes()). + // Then the VMs internal change counter resets to 0. + // This is used by trigger programs. +__109: + Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + goto __8 + + // Opcode: SorterCompare P1 P2 P3 P4 + // Synopsis: if key(P1)!=trim(r[P3],P4) goto P2 + // + // P1 is a sorter cursor. This instruction compares a prefix of the + // record blob in register P3 against a prefix of the entry that + // the sorter cursor currently points to. Only the first P4 fields + // of r[P3] and the sorter record are compared. + // + // If either P3 or the sorter contains a NULL in one of their significant + // fields (not counting the P4 fields at the end which are ignored) then + // the comparison is assumed to be equal. + // + // Fall through to next instruction if the two records compare equal to + // each other. Jump to P2 if they are different. +__110: + + pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) + *(*int32)(unsafe.Pointer(bp + 544 /* res7 */)) = 0 + rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) + + if !(rc != 0) { + goto __686 + } + goto abort_due_to_error +__686: + ; + if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { + goto __687 + } + goto jump_to_p2 +__687: + ; + goto __8 + + // Opcode: SorterData P1 P2 P3 * * + // Synopsis: r[P2]=data + // + // Write into register P2 the current sorter data for sorter cursor P1. + // Then clear the column header cache on cursor P3. + // + // This opcode is normally use to move a record out of the sorter and into + // a register that is the source for a pseudo-table cursor created using + // OpenPseudo. That pseudo-table cursor is the one that is identified by + // parameter P3. Clearing the P3 column cache as part of this opcode saves + // us from having to issue a separate NullRow instruction to clear that cache. +__111: + + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + + if !(rc != 0) { + goto __688 + } + goto abort_due_to_error +__688: + ; + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) + goto __8 + + // Opcode: RowData P1 P2 P3 * * + // Synopsis: r[P2]=data + // + // Write into register P2 the complete row content for the row at + // which cursor P1 is currently pointing. + // There is no interpretation of the data. + // It is just copied onto the P2 register exactly as + // it is found in the database file. + // + // If cursor P1 is an index, then the content is the key of the row. + // If cursor P2 is a table, then the content extracted is the data. + // + // If the P1 cursor must be pointing to a valid row (not a NULL row) + // of a real table, not a pseudo-table. + // + // If P3!=0 then this opcode is allowed to make an ephemeral pointer + // into the database page. That means that the content of the output + // register will be invalidated as soon as the cursor moves - including + // moves caused by other cursors that "save" the current cursors + // position in order that they can write to the same table. If P3==0 + // then a copy of the data is made into memory. P3!=0 is faster, but + // P3==0 is safer. + // + // If P3!=0 then the content of the P2 register is unsuitable for use + // in OP_Result and any OP_Result will invalidate the P2 register content. + // The P2 register content is invalidated by opcodes like OP_Function or + // by any use of another cursor pointing to the same table. +__112: + + pOut = out2Prerelease(tls, p, pOp) + + pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + + // The OP_RowData opcodes always follow OP_NotExists or + // OP_SeekRowid or OP_Rewind/Op_Next with no intervening instructions + // that might invalidate the cursor. + // If this where not the case, on of the following assert()s + // would fail. Should this ever change (because of changes in the code + // generator) then the fix would be to insert a call to + // sqlite3VdbeCursorMoveto(). + + n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) + if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __689 + } + goto too_big +__689: + ; + + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) + if !(rc != 0) { + goto __690 + } + goto abort_due_to_error +__690: + ; + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { + goto __691 + } + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __692 + } + goto no_mem +__692: + ; +__691: + ; + + goto __8 + + // Opcode: Rowid P1 P2 * * * + // Synopsis: r[P2]=rowid + // + // Store in register P2 an integer which is the key of the table entry that + // P1 is currently point to. + // + // P1 can be either an ordinary table or a virtual table. There used to + // be a separate OP_VRowid opcode for use with virtual tables, but this + // one opcode now works for both table types. +__113: + + pOut = out2Prerelease(tls, p, pOp) + + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { + goto __693 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 + goto __694 +__693: + if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { + goto __695 + } + *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget + goto __696 +__695: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { + goto __697 + } + + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule + + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __699 + } + goto abort_due_to_error +__699: + ; + goto __698 +__697: + ; + + rc = Xsqlite3VdbeCursorRestore(tls, pC15) + if !(rc != 0) { + goto __700 + } + goto abort_due_to_error +__700: + ; + if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { + goto __701 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__701: + ; + *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; +__694: + ; + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) + goto __8 + + // Opcode: NullRow P1 * * * * + // + // Move the cursor P1 to a null row. Any OP_Column operations + // that occur while the cursor is on the null row will always + // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. +__114: + ; + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { + goto __702 + } + + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) +__702: + ; + goto __8 + + // Opcode: SeekEnd P1 * * * * + // + // Position cursor P1 at the end of the btree for the purpose of + // appending a new entry onto the btree. + // + // It is assumed that the cursor is used only for appending and so + // if the cursor is valid, then the cursor must already be pointing + // at the end of the btree and so no changes are made to + // the cursor. + // Opcode: Last P1 P2 * * * + // + // The next use of the Rowid or Column or Prev instruction for P1 + // will refer to the last entry in the database table or index. + // If the table or index is empty and P2>0, then jump immediately to P2. + // If P2 is 0 or if the table or index is not empty, fall through + // to the following instruction. + // + // This opcode leaves the cursor configured to move in reverse order, + // from the end toward the beginning. In other words, the cursor is + // configured to use Prev, not Next. +__115: +__116: + ; + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { + goto __703 + } + + (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { + goto __704 + } + goto __8 +__704: + ; +__703: + ; + rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) + (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) + (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { + goto __705 + } + goto abort_due_to_error +__705: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { + goto __706 + } + + if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { + goto __707 + } + goto jump_to_p2 +__707: + ; +__706: + ; + goto __8 + + // Opcode: IfSmaller P1 P2 P3 * * + // + // Estimate the number of rows in the table P1. Jump to P2 if that + // estimate is less than approximately 2**(0.1*P3). +__117: + ; + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) + if !(rc != 0) { + goto __708 + } + goto abort_due_to_error +__708: + ; + if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { + goto __709 + } + sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) + if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __710 + } + *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 +__710: + ; +__709: + ; + + if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { + goto __711 + } + goto jump_to_p2 +__711: + ; + goto __8 + + // Opcode: SorterSort P1 P2 * * * + // + // After all records have been inserted into the Sorter object + // identified by P1, invoke this opcode to actually do the sorting. + // Jump to P2 if there are no records to be sorted. + // + // This opcode is an alias for OP_Sort and OP_Rewind that is used + // for Sorter objects. + // Opcode: Sort P1 P2 * * * + // + // This opcode does exactly the same thing as OP_Rewind except that + // it increments an undocumented global variable used for testing. + // + // Sorting is accomplished by writing records into a sorting index, + // then rewinding that index and playing it back from beginning to + // end. We use the OP_Sort opcode instead of OP_Rewind to do the + // rewinding so that the global variable will be incremented and + // regression tests can determine whether or not the optimizer is + // correctly optimizing out sorts. +__118: // jump +__119: // jump + *(*U32)(unsafe.Pointer(p + 220 + 2*4))++ + + // Opcode: Rewind P1 P2 * * * + // + // The next use of the Rowid or Column or Next instruction for P1 + // will refer to the first entry in the database table or index. + // If the table or index is empty, jump immediately to P2. + // If the table or index is not empty, fall through to the following + // instruction. + // + // This opcode leaves the cursor configured to move in forward order, + // from the beginning toward the end. In other words, the cursor is + // configured to use Next, not Prev. +__120: + ; + + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { + goto __712 + } + rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) + goto __713 +__712: + ; + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) +__713: + ; + if !(rc != 0) { + goto __714 + } + goto abort_due_to_error +__714: + ; + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) + + if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { + goto __715 + } + goto jump_to_p2 +__715: + ; + goto __8 + + // Opcode: Next P1 P2 P3 P4 P5 + // + // Advance cursor P1 so that it points to the next key/data pair in its + // table or index. If there are no more key/value pairs then fall through + // to the following instruction. But if the cursor advance was successful, + // jump immediately to P2. + // + // The Next opcode is only valid following an SeekGT, SeekGE, or + // OP_Rewind opcode used to position the cursor. Next is not allowed + // to follow SeekLT, SeekLE, or OP_Last. + // + // The P1 cursor must be for a real table, not a pseudo-table. P1 must have + // been opened prior to this opcode or the program will segfault. + // + // The P3 value is a hint to the btree implementation. If P3==1, that + // means P1 is an SQL index and that this instruction could have been + // omitted if that index had been unique. P3 is usually 0. P3 is + // always either 0 or 1. + // + // P4 is always of type P4_ADVANCE. The function pointer points to + // sqlite3BtreeNext(). + // + // If P5 is positive and the jump is taken, then event counter + // number P5-1 in the prepared statement is incremented. + // + // See also: Prev + // Opcode: Prev P1 P2 P3 P4 P5 + // + // Back up cursor P1 so that it points to the previous key/data pair in its + // table or index. If there is no previous key/value pairs then fall through + // to the following instruction. But if the cursor backup was successful, + // jump immediately to P2. + // + // + // The Prev opcode is only valid following an SeekLT, SeekLE, or + // OP_Last opcode used to position the cursor. Prev is not allowed + // to follow SeekGT, SeekGE, or OP_Rewind. + // + // The P1 cursor must be for a real table, not a pseudo-table. If P1 is + // not open then the behavior is undefined. + // + // The P3 value is a hint to the btree implementation. If P3==1, that + // means P1 is an SQL index and that this instruction could have been + // omitted if that index had been unique. P3 is usually 0. P3 is + // always either 0 or 1. + // + // P4 is always of type P4_ADVANCE. The function pointer points to + // sqlite3BtreePrevious(). + // + // If P5 is positive and the jump is taken, then event counter + // number P5-1 in the prepared statement is incremented. + // Opcode: SorterNext P1 P2 * * P5 + // + // This opcode works just like OP_Next except that P1 must be a + // sorter object for which the OP_SorterSort opcode has been + // invoked. This opcode advances the cursor to the next sorted + // record, or jumps to P2 if there are no more sorted records. +__121: + + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + goto next_tail +__122: // jump +__123: // jump + ; + + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + // The Next opcode is only used after SeekGT, SeekGE, Rewind, and Found. + // The Prev opcode is only used after SeekLT, SeekLE, and Last. + + rc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))})).f(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48 /* &.uc */)), (*Op)(unsafe.Pointer(pOp)).Fp3) +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __716 + } + (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ + goto jump_to_p2_and_check_for_interrupt +__716: + ; + if !(rc != SQLITE_DONE) { + goto __717 + } + goto abort_due_to_error +__717: + ; + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + goto check_for_interrupt + + // Opcode: IdxInsert P1 P2 P3 P4 P5 + // Synopsis: key=r[P2] + // + // Register P2 holds an SQL index key made using the + // MakeRecord instructions. This opcode writes that key + // into the index P1. Data for the entry is nil. + // + // If P4 is not zero, then it is the number of values in the unpacked + // key of reg(P2). In that case, P3 is the index of the first register + // for the unpacked key. The availability of the unpacked key can sometimes + // be an optimization. + // + // If P5 has the OPFLAG_APPEND bit set, that is a hint to the b-tree layer + // that this insert is likely to be an append. + // + // If P5 has the OPFLAG_NCHANGE bit set, then the change counter is + // incremented by this instruction. If the OPFLAG_NCHANGE bit is clear, + // then the change counter is unchanged. + // + // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might + // run faster by avoiding an unnecessary seek on cursor P1. However, + // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior + // seeks on the cursor or if the most recent seek used a key equivalent + // to P2. + // + // This instruction only works for indices. The equivalent instruction + // for tables is OP_Insert. +__124: + ; + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { + goto __718 + } + (*Vdbe)(unsafe.Pointer(p)).FnChange++ +__718: + ; + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __719 + } + goto abort_due_to_error +__719: + ; + (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) + (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz + (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+576, + int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), + func() int32 { + if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { + return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { + goto __720 + } + goto abort_due_to_error +__720: + ; + goto __8 + + // Opcode: SorterInsert P1 P2 * * * + // Synopsis: key=r[P2] + // + // Register P2 holds an SQL index key made using the + // MakeRecord instructions. This opcode writes that key + // into the sorter P1. Data for the entry is nil. +__125: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __721 + } + goto abort_due_to_error +__721: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + if !(rc != 0) { + goto __722 + } + goto abort_due_to_error +__722: + ; + goto __8 + + // Opcode: IdxDelete P1 P2 P3 * P5 + // Synopsis: key=r[P2@P3] + // + // The content of P3 registers starting at register P2 form + // an unpacked index key. This opcode removes that entry from the + // index opened by cursor P1. + // + // If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error + // if no matching index entry is found. This happens when running + // an UPDATE or DELETE statement and the index entry to be updated + // or deleted is not found. For some uses of IdxDelete + // (example: the EXCEPT operator) it does not matter that no matching + // entry is found. For those cases, P5 is zero. Also, do not raise + // this (self-correcting and non-critical) error if in writable_schema mode. +__126: + ; + + pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + + (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) + (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).Fdefault_rc = int8(0) + (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) + if !(rc != 0) { + goto __723 + } + goto abort_due_to_error +__723: + ; + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5818) + goto abort_due_to_error +__727: + ; +__725: + ; + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + goto __8 + + // Opcode: DeferredSeek P1 * P3 P4 * + // Synopsis: Move P3 to P1.rowid if needed + // + // P1 is an open index cursor and P3 is a cursor on the corresponding + // table. This opcode does a deferred seek of the P3 table cursor + // to the row that corresponds to the current row of P1. + // + // This is a deferred seek. Nothing actually happens until + // the cursor is used to read a record. That way, if no reads + // occur, no unnecessary I/O happens. + // + // P4 may be an array of integers (type P4_INTARRAY) containing + // one entry for each column in the P3 table. If array entry a(i) + // is non-zero, then reading column a(i)-1 from cursor P3 is + // equivalent to performing the deferred seek and then reading column i + // from P1. This information is stored in P3 and used to redirect + // reads against P3 over to P1, thus possibly avoiding the need to + // seek and read cursor P3. + // Opcode: IdxRowid P1 P2 * * * + // Synopsis: r[P2]=rowid + // + // Write into register P2 an integer which is the last entry in the record at + // the end of the index key pointed to by cursor P1. This integer should be + // the rowid of the table entry to which this index entry points. + // + // See also: Rowid, MakeRecord. +__127: +__128: // Rowid that P1 current points to + + ; + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + // The IdxRowid and Seek opcodes are combined because of the commonality + // of sqlite3VdbeCursorRestore() and sqlite3VdbeIdxRowid(). + rc = Xsqlite3VdbeCursorRestore(tls, pC24) + + // sqlite3VbeCursorRestore() can only fail if the record has been deleted + // out from under the cursor. That will never happens for an IdxRowid + // or Seek opcode + if !(rc != SQLITE_OK) { + goto __728 + } + goto abort_due_to_error +__728: + ; + + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + goto __729 + } + *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) + if !(rc != SQLITE_OK) { + goto __731 + } + goto abort_due_to_error +__731: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __732 + } + + pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) + + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FmovetoTarget = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FdeferredMoveto = U8(1) + + *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 + goto __733 +__732: + pOut = out2Prerelease(tls, p, pOp) + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 +__729: + ; + Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) +__730: + ; + goto __8 + + // Opcode: FinishSeek P1 * * * * + // + // If cursor P1 was previously moved via OP_DeferredSeek, complete that + // seek operation now, without further delay. If the cursor seek has + // already occurred, this instruction is a no-op. +__129: // The P1 index cursor + + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { + goto __734 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + if !(rc != 0) { + goto __735 + } + goto abort_due_to_error +__735: + ; +__734: + ; + goto __8 + + // Opcode: IdxGE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY. Compare this key value against the index + // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID + // fields at the end. + // + // If the P1 index entry is greater than or equal to the key value + // then jump to P2. Otherwise fall through to the next instruction. + // Opcode: IdxGT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY. Compare this key value against the index + // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID + // fields at the end. + // + // If the P1 index entry is greater than the key value + // then jump to P2. Otherwise fall through to the next instruction. + // Opcode: IdxLT P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY or ROWID. Compare this key value against + // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or + // ROWID on the P1 index. + // + // If the P1 index entry is less than the key value then jump to P2. + // Otherwise fall through to the next instruction. + // Opcode: IdxLE P1 P2 P3 P4 * + // Synopsis: key=r[P3@P4] + // + // The P4 register values beginning with P3 form an unpacked index + // key that omits the PRIMARY KEY or ROWID. Compare this key value against + // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or + // ROWID on the P1 index. + // + // If the P1 index entry is less than or equal to the key value then jump + // to P2. Otherwise fall through to the next instruction. +__130: // jump +__131: // jump +__132: // jump +__133: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { + goto __736 + } + + (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) + goto __737 +__736: + ; + (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) +__737: + ; + (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + /* Inlined version of sqlite3VdbeIdxKeyCompare() */ + + nCellKey = int64(0) + + pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + // nCellKey will always be between 0 and 0xffffffff because of the way + // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented + if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { + goto __738 + } + rc = Xsqlite3CorruptError(tls, 93717) + goto abort_due_to_error +__738: + ; + Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: + ; + res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) + Xsqlite3VdbeMemRelease(tls, bp+664) + + // End of inlined sqlite3VdbeIdxKeyCompare() + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { + goto __740 + } + + res12 = -res12 + goto __741 +__740: + ; + res12++ +__741: + ; + + if !(res12 > 0) { + goto __742 + } + goto jump_to_p2 +__742: + ; + goto __8 + + // Opcode: Destroy P1 P2 P3 * * + // + // Delete an entire database table or index whose root page in the database + // file is given by P1. + // + // The table being destroyed is in the main database file if P3==0. If + // P3==1 then the table to be clear is in the auxiliary database file + // that is used to store tables create using CREATE TEMPORARY TABLE. + // + // If AUTOVACUUM is enabled then it is possible that another root page + // might be moved into the newly deleted root page in order to keep all + // root pages contiguous at the beginning of the database. The former + // value of the root page that moved - its value before the move occurred - + // is stored in register P2. If no page movement was required (because the + // table being dropped was already the last one in the database) then a + // zero is stored in register P2. If AUTOVACUUM is disabled then a zero + // is stored in register P2. + // + // This opcode throws an error if there are any active reader VMs when + // it is invoked. This is done to avoid the difficulty associated with + // updating existing cursors when a root page is moved in an AUTOVACUUM + // database. This error is thrown even if the database is not an AUTOVACUUM + // db in order to avoid introducing an incompatibility between autovacuum + // and non-autovacuum modes. + // + // See also: Clear +__134: + ; + + pOut = out2Prerelease(tls, p, pOp) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { + goto __743 + } + rc = SQLITE_LOCKED + (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) + goto abort_due_to_error + goto __744 +__743: + iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 + + *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. + rc = Xsqlite3BtreeDropTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb2)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp1, bp+744) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) + *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) + if !(rc != 0) { + goto __745 + } + goto abort_due_to_error +__745: + ; + if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { + goto __746 + } + Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) + // All OP_Destroy operations occur on the same btree + + resetSchemaOnFault = U8(iDb2 + 1) +__746: + ; +__744: + ; + goto __8 + + // Opcode: Clear P1 P2 P3 + // + // Delete all contents of the database table or index whose root page + // in the database file is given by P1. But, unlike Destroy, do not + // remove the table or index from the database file. + // + // The table being clear is in the main database file if P2==0. If + // P2==1 then the table to be clear is in the auxiliary database file + // that is used to store tables create using CREATE TEMPORARY TABLE. + // + // If the P3 value is non-zero, then the row change count is incremented + // by the number of rows in the table being cleared. If P3 is greater + // than zero, then the value stored in register P3 is also incremented + // by the number of rows in the table being cleared. + // + // See also: Destroy +__135: + ; + *(*I64)(unsafe.Pointer(bp + 752 /* nChange */)) = int64(0) + + rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) + if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { + goto __747 + } + *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) + if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { + goto __748 + } + + *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) +__748: + ; +__747: + ; + if !(rc != 0) { + goto __749 + } + goto abort_due_to_error +__749: + ; + goto __8 + + // Opcode: ResetSorter P1 * * * * + // + // Delete all contents from the ephemeral table or sorter + // that is open on cursor P1. + // + // This opcode only works for cursors used for sorting and + // opened with OP_OpenEphemeral or OP_SorterOpen. +__136: + ; + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { + goto __750 + } + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + goto __751 +__750: + ; + + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + if !(rc != 0) { + goto __752 + } + goto abort_due_to_error +__752: + ; +__751: + ; + goto __8 + + // Opcode: CreateBtree P1 P2 P3 * * + // Synopsis: r[P2]=root iDb=P1 flags=P3 + // + // Allocate a new b-tree in the main database file if P1==0 or in the + // TEMP database file if P1==1 or in an attached database if + // P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table + // it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table. + // The root page number of the new b-tree is stored in register P2. +__137: + ; + pOut = out2Prerelease(tls, p, pOp) + *(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */)) = Pgno(0) + + pDb2 = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 + + rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) + if !(rc != 0) { + goto __753 + } + goto abort_due_to_error +__753: + ; + *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) + goto __8 + + // Opcode: SqlExec * * * P4 * + // + // Run the SQL statement or statements specified in the P4 string. +__138: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec++ + rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- + if !(rc != 0) { + goto __754 + } + goto abort_due_to_error +__754: + ; + goto __8 + + // Opcode: ParseSchema P1 * * P4 * + // + // Read and parse all entries from the schema table of database P1 + // that match the WHERE clause P4. If P4 is a NULL pointer, then the + // entire schema for P1 is reparsed. + // + // This opcode invokes the parser to create a new virtual machine, + // then runs the new virtual machine. It is thus a re-entrant opcode. +__139: + + // Any prepared statement that invokes this opcode will hold mutexes + // on every btree. This is a prerequisite for invoking + // sqlite3InitCallback(). + + iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 + + if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { + goto __755 + } + Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) + *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) + rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) + goto __756 +__755: + + zSchema = ts + 5835 /* "sqlite_master" */ + (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db + (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FiDb = iDb3 + (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FpzErrMsg = p + 176 + (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FmInitFlags = U32(0) + (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) + zSql = Xsqlite3MPrintf(tls, db, + ts+5849, + libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + if !(zSql == uintptr(0)) { + goto __757 + } + rc = SQLITE_NOMEM + goto __758 +__757: + ; + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) + (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK + (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FnInitRow = U32(0) + + rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) + if !(rc == SQLITE_OK) { + goto __759 + } + rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc +__759: + ; + if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { + goto __760 + } + // The OP_ParseSchema opcode with a non-NULL P4 argument should parse + // at least one SQL statement. Any less than that indicates that + // the sqlite_schema table is corrupt. + rc = Xsqlite3CorruptError(tls, 93969) +__760: + ; + Xsqlite3DbFreeNN(tls, db, zSql) + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) +__758: + ; +__756: + ; + if !(rc != 0) { + goto __761 + } + Xsqlite3ResetAllSchemasOfConnection(tls, db) + if !(rc == SQLITE_NOMEM) { + goto __762 + } + goto no_mem +__762: + ; + goto abort_due_to_error +__761: + ; + goto __8 + + // Opcode: LoadAnalysis P1 * * * * + // + // Read the sqlite_stat1 table for database P1 and load the content + // of that table into the internal index hash table. This will cause + // the analysis to be used when preparing all subsequent queries. +__140: + ; + rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) + if !(rc != 0) { + goto __763 + } + goto abort_due_to_error +__763: + ; + goto __8 + + // Opcode: DropTable P1 * * P4 * + // + // Remove the internal (in-memory) data structures that describe + // the table named P4 in database P1. This is called after a table + // is dropped from disk (using the Destroy opcode) in order to keep + // the internal representation of the + // schema consistent with what is on disk. +__141: + ; + Xsqlite3UnlinkAndDeleteTable(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) + goto __8 + + // Opcode: DropIndex P1 * * P4 * + // + // Remove the internal (in-memory) data structures that describe + // the index named P4 in database P1. This is called after an index + // is dropped from disk (using the Destroy opcode) + // in order to keep the internal representation of the + // schema consistent with what is on disk. +__142: + ; + Xsqlite3UnlinkAndDeleteIndex(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) + goto __8 + + // Opcode: DropTrigger P1 * * P4 * + // + // Remove the internal (in-memory) data structures that describe + // the trigger named P4 in database P1. This is called after a trigger + // is dropped from disk (using the Destroy opcode) in order to keep + // the internal representation of the + // schema consistent with what is on disk. +__143: + ; + Xsqlite3UnlinkAndDeleteTrigger(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) + goto __8 + + // Opcode: IntegrityCk P1 P2 P3 P4 P5 + // + // Do an analysis of the currently open database. Store in + // register P1 the text of an error message describing any problems. + // If no problems are found, store a NULL in register P1. + // + // The register P3 contains one less than the maximum number of allowed errors. + // At most reg(P3) errors will be reported. + // In other words, the analysis stops as soon as reg(P1) errors are + // seen. Reg(P1) is updated with the number of errors remaining. + // + // The root page numbers of all tables in the database are integers + // stored in P4_INTARRAY argument. + // + // If P5 is not zero, the check is done on the auxiliary database + // file, not the main database file. + // + // This opcode is used to implement the integrity_check pragma. +__144: // Register keeping track of errors remaining + + ; + nRoot = (*Op)(unsafe.Pointer(pOp)).Fp2 + aRoot = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + pnErr = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + z = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*32)).FpBt, aRoot+1*4, nRoot, + int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) + Xsqlite3VdbeMemSetNull(tls, pIn1) + if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { + goto __764 + } + + goto __765 +__764: + if !(z == uintptr(0)) { + goto __766 + } + goto no_mem + goto __767 +__766: + *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) + Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) +__767: + ; +__765: + ; + + Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) + goto check_for_interrupt + + // Opcode: RowSetAdd P1 P2 * * * + // Synopsis: rowset(P1)=r[P2] + // + // Insert the integer value held by register P2 into a RowSet object + // held in register P1. + // + // An assertion fails if P2 is not an integer. +__145: // in1, in2 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __768 + } + if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { + goto __769 + } + goto no_mem +__769: + ; +__768: + ; + + Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) + goto __8 + + // Opcode: RowSetRead P1 P2 P3 * * + // Synopsis: r[P3]=rowset(P1) + // + // Extract the smallest value from the RowSet object in P1 + // and put that value into register P3. + // Or, if RowSet object P1 is initially empty, leave P3 + // unchanged and jump to instruction P2. +__146: + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || + Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { + goto __770 + } + // The boolean index is empty + Xsqlite3VdbeMemSetNull(tls, pIn1) + + goto jump_to_p2_and_check_for_interrupt + goto __771 +__770: + // A value was pulled from the index + ; + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) +__771: + ; + goto check_for_interrupt + + // Opcode: RowSetTest P1 P2 P3 P4 + // Synopsis: if r[P3] in rowset(P1) goto P2 + // + // Register P3 is assumed to hold a 64-bit integer value. If register P1 + // contains a RowSet object and that RowSet object contains + // the value held in P3, jump to register P2. Otherwise, insert the + // integer in P3 into the RowSet and continue on to the + // next opcode. + // + // The RowSet object is optimized for the case where sets of integers + // are inserted in distinct phases, which each set contains no duplicates. + // Each set is identified by a unique P4 value. The first set + // must have P4==0, the final set must have P4==-1, and for all other sets + // must have P4>0. + // + // This allows optimizations: (a) when P4==0 there is no need to test + // the RowSet object for P3, as it is guaranteed not to contain it, + // (b) when P4==-1 there is no need to insert the value, as it will + // never be tested for, and (c) when a value that is part of set X is + // inserted, there is no need to search to see if the same value was + // previously inserted as part of set X (only if it was previously + // inserted as part of some other set). +__147: + + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + iSet = *(*int32)(unsafe.Pointer(pOp + 16)) + + // If there is anything other than a rowset object in memory cell P1, + // delete it now and initialize P1 with an empty rowset + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __772 + } + if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { + goto __773 + } + goto no_mem +__773: + ; +__772: + ; + + if !(iSet != 0) { + goto __774 + } + exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) + + if !(exists != 0) { + goto __775 + } + goto jump_to_p2 +__775: + ; +__774: + ; + if !(iSet >= 0) { + goto __776 + } + Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) +__776: + ; + goto __8 + + // Opcode: Program P1 P2 P3 P4 P5 + // + // Execute the trigger program passed as P4 (type P4_SUBPROGRAM). + // + // P1 contains the address of the memory cell that contains the first memory + // cell in an array of values used as arguments to the sub-program. P2 + // contains the address to jump to if the sub-program throws an IGNORE + // exception using the RAISE() function. Register P3 contains the address + // of a memory cell in this (the parent) VM that is used to allocate the + // memory required by the sub-vdbe at runtime. + // + // P4 is a pointer to the VM containing the trigger program. + // + // If P5 is non-zero, then recursive program invocation is enabled. +__148: // Token identifying trigger + + pProgram = *(*uintptr)(unsafe.Pointer(pOp + 16)) + pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + // If the p5 flag is clear, then recursive invocation of triggers is + // disabled for backwards compatibility (p5 is set if this sub-program + // is really a trigger, not a foreign key action, and the flag set + // and cleared by the "PRAGMA recursive_triggers" command is clear). + // + // It is recursive invocation of triggers, at the SQL level, that is + // disabled. In some cases a single trigger may generate more than one + // SubProgram (if the trigger may be executed with more than one different + // ON CONFLICT algorithm). SubProgram structures associated with a + // single trigger all have the same value for the SubProgram.token + // variable. + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { + goto __777 + } + t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken + pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__778: + if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { + goto __780 + } + goto __779 +__779: + pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent + goto __778 + goto __780 +__780: + ; + if !(pFrame2 != 0) { + goto __781 + } + goto __8 +__781: + ; +__777: + ; + + if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { + goto __782 + } + rc = SQLITE_ERROR + Xsqlite3VdbeError(tls, p, ts+5892, 0) + goto abort_due_to_error +__782: + ; + + // Register pRt is used to store the memory required to save the state + // of the current program, and the memory required at runtime to execute + // the trigger program. If this trigger has been fired before, then pRt + // is already allocated. Otherwise, it must be initialized. + if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { + goto __783 + } + // SubProgram.nMem is set to the number of memory cells used by the + // program stored in SubProgram.aOp. As well as these, one memory + // cell is required for each cursor used by the program. Set local + // variable nMem (and later, VdbeFrame.nChildMem) to this value. + nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr + + if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { + goto __785 + } + nMem++ +__785: + ; + nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + + uint64((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr)*uint64(unsafe.Sizeof(uintptr(0))) + + uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) + pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) + if !!(pFrame2 != 0) { + goto __786 + } + goto no_mem +__786: + ; + Xsqlite3VdbeMemRelease(tls, pRt) + (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) + (*Mem)(unsafe.Pointer(pRt)).Fz = pFrame2 + (*Mem)(unsafe.Pointer(pRt)).Fn = nByte2 + (*Mem)(unsafe.Pointer(pRt)).FxDel = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3VdbeFrameMemDel})) + + (*VdbeFrame)(unsafe.Pointer(pFrame2)).Fv = p + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem = nMem + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildCsr = (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr + (*VdbeFrame)(unsafe.Pointer(pFrame2)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaMem = (*Vdbe)(unsafe.Pointer(p)).FaMem + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnMem = (*Vdbe)(unsafe.Pointer(p)).FnMem + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FapCsr = (*Vdbe)(unsafe.Pointer(p)).FapCsr + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnCursor = (*Vdbe)(unsafe.Pointer(p)).FnCursor + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnOp = (*Vdbe)(unsafe.Pointer(p)).FnOp + (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken + + pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 + pMem2 = pFrame2 + 120 +__787: + if !(pMem2 != pEnd) { + goto __789 + } + (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) + (*Mem)(unsafe.Pointer(pMem2)).Fdb = db + goto __788 +__788: + pMem2 += 56 + goto __787 + goto __789 +__789: + ; + goto __784 +__783: + pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz + +__784: + ; + + (*Vdbe)(unsafe.Pointer(p)).FnFrame++ + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FlastRowid = (*Sqlite3)(unsafe.Pointer(db)).FlastRowid + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChange = (*Vdbe)(unsafe.Pointer(p)).FnChange + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnDbChange = (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnChange + + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpAuxData = (*Vdbe)(unsafe.Pointer(p)).FpAuxData + (*Vdbe)(unsafe.Pointer(p)).FpAuxData = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) + (*Vdbe)(unsafe.Pointer(p)).FpFrame = pFrame2 + (*Vdbe)(unsafe.Pointer(p)).FaMem = libc.AssignUintptr(&aMem, pFrame2+120) + (*Vdbe)(unsafe.Pointer(p)).FnMem = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem + (*Vdbe)(unsafe.Pointer(p)).FnCursor = int32(U16((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildCsr)) + (*Vdbe)(unsafe.Pointer(p)).FapCsr = aMem + uintptr((*Vdbe)(unsafe.Pointer(p)).FnMem)*56 + (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaOnce = (*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr)*8 + libc.Xmemset(tls, (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaOnce, 0, uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) + (*Vdbe)(unsafe.Pointer(p)).FaOp = libc.AssignUintptr(&aOp, (*SubProgram)(unsafe.Pointer(pProgram)).FaOp) + (*Vdbe)(unsafe.Pointer(p)).FnOp = (*SubProgram)(unsafe.Pointer(pProgram)).FnOp + pOp = aOp + libc.UintptrFromInt32(-1)*24 + goto check_for_interrupt + + // Opcode: Param P1 P2 * * * + // + // This opcode is only ever present in sub-programs called via the + // OP_Program instruction. Copy a value currently stored in a memory + // cell of the calling (parent) frame to cell P2 in the current frames + // address space. This is used by trigger programs to access the new.* + // and old.* values. + // + // The address of the cell in the parent frame is determined by adding + // the value of the P1 argument to the value of the P1 argument to the + // calling OP_Program instruction. +__149: + pOut = out2Prerelease(tls, p, pOp) + pFrame3 = (*Vdbe)(unsafe.Pointer(p)).FpFrame + pIn = (*VdbeFrame)(unsafe.Pointer(pFrame3)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1+(*Op)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame3)).FaOp+uintptr((*VdbeFrame)(unsafe.Pointer(pFrame3)).Fpc)*24)).Fp1)*56 + Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn, MEM_Ephem) + goto __8 + + // Opcode: FkCounter P1 P2 * * * + // Synopsis: fkctr[P1]+=P2 + // + // Increment a "constraint counter" by P2 (P2 may be negative or positive). + // If P1 is non-zero, the database constraint counter is incremented + // (deferred foreign key constraints). Otherwise, if P1 is zero, the + // statement counter is incremented (immediate foreign key constraints). +__150: + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { + goto __790 + } + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __791 +__790: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __792 + } + *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __793 +__792: + *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) +__793: + ; +__791: + ; + goto __8 + + // Opcode: FkIfZero P1 P2 * * * + // Synopsis: if fkctr[P1]==0 goto P2 + // + // This opcode tests if a foreign key constraint-counter is currently zero. + // If so, jump to instruction P2. Otherwise, fall through to the next + // instruction. + // + // If P1 is non-zero, then the jump is taken if the database constraint-counter + // is zero (the one that counts deferred constraint violations). If P1 is + // zero, the jump is taken if the statement constraint-counter is zero + // (immediate foreign key constraint violations). +__151: // jump + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __794 + } + + if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { + goto __796 + } + goto jump_to_p2 +__796: + ; + goto __795 +__794: + ; + if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { + goto __797 + } + goto jump_to_p2 +__797: + ; +__795: + ; + goto __8 + + // Opcode: MemMax P1 P2 * * * + // Synopsis: r[P1]=max(r[P1],r[P2]) + // + // P1 is a register in the root frame of this VM (the root frame is + // different from the current frame if this instruction is being executed + // within a sub-program). Set the value of register P1 to the maximum of + // its current value and the value in register P2. + // + // This instruction throws an error if the memory cell is not initially + // an integer. +__152: + if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { + goto __798 + } + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: + pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent + goto __800 + goto __802 +__802: + ; + pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + goto __799 +__798: + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__799: + ; + + Xsqlite3VdbeMemIntegerify(tls, pIn1) + pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + Xsqlite3VdbeMemIntegerify(tls, pIn2) + if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { + goto __803 + } + *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) +__803: + ; + goto __8 + + // Opcode: IfPos P1 P2 P3 * * + // Synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 + // + // Register P1 must contain an integer. + // If the value of register P1 is 1 or greater, subtract P3 from the + // value in P1 and jump to P2. + // + // If the initial value of register P1 is less than 1, then the + // value is unchanged and control passes through to the next instruction. +__153: // jump, in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { + goto __804 + } + *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) + goto jump_to_p2 +__804: + ; + goto __8 + + // Opcode: OffsetLimit P1 P2 P3 * * + // Synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) + // + // This opcode performs a commonly used computation associated with + // LIMIT and OFFSET process. r[P1] holds the limit counter. r[P3] + // holds the offset counter. The opcode computes the combined value + // of the LIMIT and OFFSET and stores that value in r[P2]. The r[P2] + // value computed is the total number of rows that will need to be + // visited in order to complete the query. + // + // If r[P3] is zero or negative, that means there is no OFFSET + // and r[P2] is set to be the value of the LIMIT, r[P1]. + // + // if r[P1] is zero or negative, that means there is no LIMIT + // and r[P2] is set to -1. + // + // Otherwise, r[P2] is set to the sum of r[P1] and r[P3]. +__154: + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + pOut = out2Prerelease(tls, p, pOp) + + *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) = *(*I64)(unsafe.Pointer(pIn1)) + if !(*(*I64)(unsafe.Pointer(bp + 824)) <= int64(0) || Xsqlite3AddInt64(tls, bp+824, func() int64 { + if *(*I64)(unsafe.Pointer(pIn3)) > int64(0) { + return *(*I64)(unsafe.Pointer(pIn3)) + } + return int64(0) + }()) != 0) { + goto __805 + } + // If the LIMIT is less than or equal to zero, loop forever. This + // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then + // also loop forever. This is undocumented. In fact, one could argue + // that the loop should terminate. But assuming 1 billion iterations + // per second (far exceeding the capabilities of any current hardware) + // it would take nearly 300 years to actually reach the limit. So + // looping forever is a reasonable approximation. + *(*I64)(unsafe.Pointer(pOut)) = int64(-1) + goto __806 +__805: + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) +__806: + ; + goto __8 + + // Opcode: IfNotZero P1 P2 * * * + // Synopsis: if r[P1]!=0 then r[P1]--, goto P2 + // + // Register P1 must contain an integer. If the content of register P1 is + // initially greater than zero, then decrement the value in register P1. + // If it is non-zero (negative or positive) and then also jump to P2. + // If register P1 is initially zero, leave it unchanged and fall through. +__155: // jump, in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { + goto __807 + } + if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { + goto __808 + } + *(*I64)(unsafe.Pointer(pIn1))-- +__808: + ; + goto jump_to_p2 +__807: + ; + goto __8 + + // Opcode: DecrJumpZero P1 P2 * * * + // Synopsis: if (--r[P1])==0 goto P2 + // + // Register P1 must hold an integer. Decrement the value in P1 + // and jump to P2 if the new value is exactly zero. +__156: // jump, in1 + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { + goto __809 + } + *(*I64)(unsafe.Pointer(pIn1))-- +__809: + ; + + if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { + goto __810 + } + goto jump_to_p2 +__810: + ; + goto __8 + + // Opcode: AggStep * P2 P3 P4 P5 + // Synopsis: accum=r[P3] step(r[P2@P5]) + // + // Execute the xStep function for an aggregate. + // The function has P5 arguments. P4 is a pointer to the + // FuncDef structure that specifies the function. Register P3 is the + // accumulator. + // + // The P5 arguments are taken from register P2 and its + // successors. + // Opcode: AggInverse * P2 P3 P4 P5 + // Synopsis: accum=r[P3] inverse(r[P2@P5]) + // + // Execute the xInverse function for an aggregate. + // The function has P5 arguments. P4 is a pointer to the + // FuncDef structure that specifies the function. Register P3 is the + // accumulator. + // + // The P5 arguments are taken from register P2 and its + // successors. + // Opcode: AggStep1 P1 P2 P3 P4 P5 + // Synopsis: accum=r[P3] step(r[P2@P5]) + // + // Execute the xStep (if P1==0) or xInverse (if P1!=0) function for an + // aggregate. The function has P5 arguments. P4 is a pointer to the + // FuncDef structure that specifies the function. Register P3 is the + // accumulator. + // + // The P5 arguments are taken from register P2 and its + // successors. + // + // This opcode is initially coded as OP_AggStep0. On first evaluation, + // the FuncDef stored in P4 is converted into an sqlite3_context and + // the opcode is changed. In this way, the initialization of the + // sqlite3_context only happens once, instead of on each call to the + // step function. +__157: +__158: + ; + n4 = int32((*Op)(unsafe.Pointer(pOp)).Fp5) + + pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) + if !(pCtx == uintptr(0)) { + goto __811 + } + goto no_mem +__811: + ; + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 + Xsqlite3VdbeMemInit(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, db, uint16(MEM_Null)) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc = *(*uintptr)(unsafe.Pointer(pOp + 16)) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp = int32((int64(pOp) - int64(aOp)) / 24) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe = p + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FskipFlag = U8(0) + (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 0 + (*Sqlite3_context)(unsafe.Pointer(pCtx)).Fargc = U8(n4) + (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-16) + *(*uintptr)(unsafe.Pointer(pOp + 16)) = pCtx + + // OP_AggInverse must have P1==1 and OP_AggStep must have P1==0 + + (*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_AggStep1) + +__159: + ; + pCtx1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + // If this function is inside of a trigger, the register array in aMem[] + // might change from one evaluation to the next. The next block of code + // checks to see if the register array has changed, and if so it + // reinitializes the relavant parts of the sqlite3_context object + if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { + goto __812 + } + (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 + i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 +__813: + if !(i5 >= 0) { + goto __815 + } + *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 + goto __814 +__814: + i5-- + goto __813 + goto __815 +__815: + ; +__812: + ; + + (*Mem)(unsafe.Pointer(pMem3)).Fn++ + + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __816 + } + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) + goto __817 +__816: + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) +__817: + ; // IMP: R-24505-23230 + + if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { + goto __818 + } + if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { + goto __819 + } + Xsqlite3VdbeError(tls, p, ts+3605, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError +__819: + ; + if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { + goto __820 + } + + i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(i5 != 0) { + goto __821 + } + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) +__821: + ; + (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) +__820: + ; + Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) + (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) + (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 + if !(rc != 0) { + goto __822 + } + goto abort_due_to_error +__822: + ; +__818: + ; + + goto __8 + + // Opcode: AggFinal P1 P2 * P4 * + // Synopsis: accum=r[P1] N=P2 + // + // P1 is the memory location that is the accumulator for an aggregate + // or window function. Execute the finalizer function + // for an aggregate and store the result in P1. + // + // P2 is the number of arguments that the step function takes and + // P4 is a pointer to the FuncDef for this function. The P2 + // argument is not used by this opcode. It is only there to disambiguate + // functions that can take varying numbers of arguments. The + // P4 argument is only needed for the case where + // the step function was not previously called. + // Opcode: AggValue * P2 P3 P4 * + // Synopsis: r[P3]=value N=P2 + // + // Invoke the xValue() function and store the result in register P3. + // + // P2 is the number of arguments that the step function takes and + // P4 is a pointer to the FuncDef for this function. The P2 + // argument is not used by this opcode. It is only there to disambiguate + // functions that can take varying numbers of arguments. The + // P4 argument is only needed for the case where + // the step function was not previously called. +__160: +__161: + ; + + pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { + goto __823 + } + + rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) + pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + goto __824 +__823: + + rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) +__824: + ; + + if !(rc != 0) { + goto __825 + } + Xsqlite3VdbeError(tls, p, ts+3605, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) + goto abort_due_to_error +__825: + ; + Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) + + if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { + goto __826 + } + goto too_big +__826: + ; + goto __8 + + // Opcode: Checkpoint P1 P2 P3 * * + // + // Checkpoint database P1. This is a no-op if P1 is not currently in + // WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL, + // RESTART, or TRUNCATE. Write 1 or 0 into mem[P3] if the checkpoint returns + // SQLITE_BUSY or not, respectively. Write the number of pages in the + // WAL after the checkpoint into mem[P3+1] and the number of pages + // in the WAL that have been checkpointed after the checkpoint + // completes into mem[P3+2]. However on an error, mem[P3+1] and + // mem[P3+2] are initialized to -1. +__162: // Write results here + + ; + *(*int32)(unsafe.Pointer(bp + 832)) = 0 + *(*int32)(unsafe.Pointer(bp + 832 + 1*4)) = libc.AssignPtrInt32(bp+832+2*4, -1) + + rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) + if !(rc != 0) { + goto __827 + } + if !(rc != SQLITE_BUSY) { + goto __828 + } + goto abort_due_to_error +__828: + ; + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 832)) = 1 +__827: + ; + i6 = 0 + pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 +__829: + if !(i6 < 3) { + goto __831 + } + Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) + goto __830 +__830: + i6++ + pMem5 += 56 + goto __829 + goto __831 +__831: + ; + goto __8 + + // Opcode: JournalMode P1 P2 P3 * * + // + // Change the journal mode of database P1 to P3. P3 must be one of the + // PAGER_JOURNALMODE_XXX values. If changing between the various rollback + // modes (delete, truncate, persist, off and memory), this is a simple + // operation. No IO is required. + // + // If changing into or out of WAL mode the procedure is more complicated. + // + // Write a string containing the final journal-mode to register P2. +__163: // Name of database file for pPager + + pOut = out2Prerelease(tls, p, pOp) + eNew = (*Op)(unsafe.Pointer(pOp)).Fp3 + + pBt1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt + pPager = Xsqlite3BtreePager(tls, pBt1) + eOld = Xsqlite3PagerGetJournalMode(tls, pPager) + if !(eNew == -1) { + goto __832 + } + eNew = eOld +__832: + ; + + if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { + goto __833 + } + eNew = eOld +__833: + ; + + zFilename = Xsqlite3PagerFilename(tls, pPager, 1) + + // Do not allow a transition to journal_mode=WAL for a database + // in temporary storage or if the VFS does not support shared memory + if !(eNew == PAGER_JOURNALMODE_WAL && + (Xsqlite3Strlen30(tls, zFilename) == 0 || + !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { + goto __834 + } + eNew = eOld +__834: + ; + + if !(eNew != eOld && + (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { + goto __835 + } + if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { + goto __836 + } + rc = SQLITE_ERROR + Xsqlite3VdbeError(tls, p, + ts+5929, + libc.VaList(bp+136, func() uintptr { + if eNew == PAGER_JOURNALMODE_WAL { + return ts + 5981 /* "into" */ + } + return ts + 5986 /* "out of" */ + }())) + goto abort_due_to_error + goto __837 +__836: + + if !(eOld == PAGER_JOURNALMODE_WAL) { + goto __838 + } + // If leaving WAL mode, close the log file. If successful, the call + // to PagerCloseWal() checkpoints and deletes the write-ahead-log + // file. An EXCLUSIVE lock may still be held on the database file + // after a successful return. + rc = Xsqlite3PagerCloseWal(tls, pPager, db) + if !(rc == SQLITE_OK) { + goto __840 + } + Xsqlite3PagerSetJournalMode(tls, pPager, eNew) +__840: + ; + goto __839 +__838: + if !(eOld == PAGER_JOURNALMODE_MEMORY) { + goto __841 + } + // Cannot transition directly from MEMORY to WAL. Use mode OFF + // as an intermediate + Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) +__841: + ; +__839: + ; + + // Open a transaction on the database file. Regardless of the journal + // mode, this transaction always uses a rollback journal. + + if !(rc == SQLITE_OK) { + goto __842 + } + rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { + if eNew == PAGER_JOURNALMODE_WAL { + return 2 + } + return 1 + }()) +__842: + ; +__837: + ; +__835: + ; + + if !(rc != 0) { + goto __843 + } + eNew = eOld +__843: + ; + eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) + + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Str | MEM_Static | MEM_Term) + (*Mem)(unsafe.Pointer(pOut)).Fz = Xsqlite3JournalModename(tls, eNew) + (*Mem)(unsafe.Pointer(pOut)).Fn = Xsqlite3Strlen30(tls, (*Mem)(unsafe.Pointer(pOut)).Fz) + (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) + Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) + if !(rc != 0) { + goto __844 + } + goto abort_due_to_error +__844: + ; + goto __8 + + // Opcode: Vacuum P1 P2 * * * + // + // Vacuum the entire database P1. P1 is 0 for "main", and 2 or more + // for an attached database. The "temp" database may not be vacuumed. + // + // If P2 is not zero, then it is a register holding a string which is + // the file into which the result of vacuum should be written. When + // P2 is zero, the vacuum overwrites the original database. +__164: + ; + rc = Xsqlite3RunVacuum(tls, p+176, db, (*Op)(unsafe.Pointer(pOp)).Fp1, + func() uintptr { + if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { + return aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 + } + return uintptr(0) + }()) + if !(rc != 0) { + goto __845 + } + goto abort_due_to_error +__845: + ; + goto __8 + + // Opcode: IncrVacuum P1 P2 * * * + // + // Perform a single step of the incremental vacuum procedure on + // the P1 database. If the vacuum has finished, jump to instruction + // P2. Otherwise, fall through to the next instruction. +__165: + ; + + pBt2 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt + rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) + + if !(rc != 0) { + goto __846 + } + if !(rc != SQLITE_DONE) { + goto __847 + } + goto abort_due_to_error +__847: + ; + rc = SQLITE_OK + goto jump_to_p2 +__846: + ; + goto __8 + + // Opcode: Expire P1 P2 * * * + // + // Cause precompiled statements to expire. When an expired statement + // is executed using sqlite3_step() it will either automatically + // reprepare itself (if it was originally created using sqlite3_prepare_v2()) + // or it will fail with SQLITE_SCHEMA. + // + // If P1 is 0, then all SQL statements become expired. If P1 is non-zero, + // then only the currently executing statement is expired. + // + // If P2 is 0, then SQL statements are expired immediately. If P2 is 1, + // then running SQL statements are allowed to continue to run to completion. + // The P2==1 case occurs when a CREATE INDEX or similar schema change happens + // that might help the statement run faster but which does not affect the + // correctness of operation. +__166: + ; + if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __848 + } + Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) + goto __849 +__848: + libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) +__849: + ; + goto __8 + + // Opcode: CursorLock P1 * * * * + // + // Lock the btree to which cursor P1 is pointing so that the btree cannot be + // written by an other cursor. +__167: + ; + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + goto __8 + + // Opcode: CursorUnlock P1 * * * * + // + // Unlock the btree to which cursor P1 is pointing so that it can be + // written by other cursors. +__168: + ; + pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __8 + + // Opcode: TableLock P1 P2 P3 P4 * + // Synopsis: iDb=P1 root=P2 write=P3 + // + // Obtain a lock on a particular table. This instruction is only used when + // the shared-cache feature is enabled. + // + // P1 is the index of the database in sqlite3.aDb[] of the database + // on which the lock is acquired. A readlock is obtained if P3==0 or + // a write lock if P3==1. + // + // P2 contains the root-page of the table to lock. + // + // P4 contains a pointer to the name of the table being locked. This is only + // used to generate an error message if the lock cannot be obtained. +__169: + isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) + if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { + goto __850 + } + p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 + + rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) + if !(rc != 0) { + goto __851 + } + if !(rc&0xFF == SQLITE_LOCKED) { + goto __852 + } + z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + Xsqlite3VdbeError(tls, p, ts+5993, libc.VaList(bp+144, z1)) +__852: + ; + goto abort_due_to_error +__851: + ; +__850: + ; + goto __8 + + // Opcode: VBegin * * * P4 * + // + // P4 may be a pointer to an sqlite3_vtab structure. If so, call the + // xBegin method for that table. + // + // Also, whether or not P4 is set, check that this is not being called from + // within a callback to a virtual table xSync() method. If it is, the error + // code will be set to SQLITE_LOCKED. +__170: + pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) + rc = Xsqlite3VtabBegin(tls, db, pVTab) + if !(pVTab != 0) { + goto __853 + } + Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) +__853: + ; + if !(rc != 0) { + goto __854 + } + goto abort_due_to_error +__854: + ; + goto __8 + + // Opcode: VCreate P1 P2 * * * + // + // P2 is a register that holds the name of a virtual table in database + // P1. Call the xCreate method for that table. +__171: // Name of the virtual table + + libc.Xmemset(tls, bp+848, 0, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(bp + 848 /* &sMem1 */)).Fdb = db + // Because P2 is always a static string, it is impossible for the + // sqlite3VdbeMemCopy() to fail + + rc = Xsqlite3VdbeMemCopy(tls, bp+848, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) + + zTab = Xsqlite3_value_text(tls, bp+848) + + if !(zTab != 0) { + goto __855 + } + rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) +__855: + ; + Xsqlite3VdbeMemRelease(tls, bp+848) + if !(rc != 0) { + goto __856 + } + goto abort_due_to_error +__856: + ; + goto __8 + + // Opcode: VDestroy P1 * * P4 * + // + // P4 is the name of a virtual table in database P1. Call the xDestroy method + // of that table. +__172: + (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy++ + rc = Xsqlite3VtabCallDestroy(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) + (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- + + if !(rc != 0) { + goto __857 + } + goto abort_due_to_error +__857: + ; + goto __8 + + // Opcode: VOpen P1 * * P4 * + // + // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. + // P1 is a cursor number. This opcode opens a cursor to the virtual + // table and stores that cursor in P1. +__173: + ; + pCur2 = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) + pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab + if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { + goto __858 + } + rc = SQLITE_LOCKED + goto abort_due_to_error +__858: + ; + pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) + Xsqlite3VtabImportErrmsg(tls, p, pVtab1) + if !(rc != 0) { + goto __859 + } + goto abort_due_to_error +__859: + ; + + // Initialize sqlite3_vtab_cursor base class + (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)))).FpVtab = pVtab1 + + // Initialize vdbe cursor object + pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur2 != 0) { + goto __860 + } + *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ + goto __861 +__860: + ; + (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) + goto no_mem +__861: + ; + goto __8 + + // Opcode: VInitIn P1 P2 P3 * * + // Synopsis: r[P2]=ValueList(P1,P3) + // + // Set register P2 to be a pointer to a ValueList object for cursor P1 + // with cache register P3 and output register P3+1. This ValueList object + // can be used as the first argument to sqlite3_vtab_in_first() and + // sqlite3_vtab_in_next() to extract all of the values stored in the P1 + // cursor. Register P3 is used to hold the values returned by + // sqlite3_vtab_in_first() and sqlite3_vtab_in_next(). +__174: // New ValueList object to put in reg[P2] + + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) + if !(pRhs == uintptr(0)) { + goto __862 + } + goto no_mem +__862: + ; + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + pOut = out2Prerelease(tls, p, pOp) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5299, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + goto __8 + + // Opcode: VFilter P1 P2 P3 P4 * + // Synopsis: iplan=r[P3] zplan='P4' + // + // P1 is a cursor opened using VOpen. P2 is an address to jump to if + // the filtered result set is empty. + // + // P4 is either NULL or a string that was generated by the xBestIndex + // method of the module. The interpretation of the P4 string is left + // to the module implementation. + // + // This opcode invokes the xFilter method on the virtual table specified + // by P1. The integer query plan parameter to xFilter is stored in register + // P3. Register P3+1 stores the argc parameter to be passed to the + // xFilter method. Registers P3+2..P3+1+argc are the argc + // additional parameters which are passed to + // xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter. + // + // A jump is made to P2 if the result set after filtering would be empty. +__175: + + pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + pArgc = pQuery + 1*56 + pCur3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab + pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule + + // Grab the index number and argc parameters + + nArg = int32(*(*I64)(unsafe.Pointer(pArgc))) + iQuery = int32(*(*I64)(unsafe.Pointer(pQuery))) + + // Invoke the xFilter method + apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg + i7 = 0 +__863: + if !(i7 < nArg) { + goto __865 + } + *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 + goto __864 +__864: + i7++ + goto __863 + goto __865 +__865: + ; + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) + Xsqlite3VtabImportErrmsg(tls, p, pVtab2) + if !(rc != 0) { + goto __866 + } + goto abort_due_to_error +__866: + ; + res13 = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxEof})).f(tls, pVCur1) + (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) + + if !(res13 != 0) { + goto __867 + } + goto jump_to_p2 +__867: + ; + goto __8 + + // Opcode: VColumn P1 P2 P3 * P5 + // Synopsis: r[P3]=vcolumn(P2) + // + // Store in register P3 the value of the P2-th column of + // the current row of the virtual-table of cursor P1. + // + // If the VColumn opcode is being used to fetch the value of + // an unchanging column during an UPDATE operation, then the P5 + // value is OPFLAG_NOCHNG. This will cause the sqlite3_vtab_nochange() + // function to return true inside the xColumn method of the virtual + // table implementation. The P5 column might also contain other + // bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are + // unused by OP_VColumn. +__176: + + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + + if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { + goto __868 + } + Xsqlite3VdbeMemSetNull(tls, pDest2) + goto __8 +__868: + ; + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule + + libc.Xmemset(tls, bp+912, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) + (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { + goto __869 + } + Xsqlite3VdbeMemSetNull(tls, pDest2) + (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) + *(*int32)(unsafe.Pointer(pDest2)) = 0 + goto __870 +__869: + (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) +__870: + ; + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) + Xsqlite3VtabImportErrmsg(tls, p, pVtab3) + if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { + goto __871 + } + Xsqlite3VdbeError(tls, p, ts+3605, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError +__871: + ; + Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) + + if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { + goto __872 + } + goto too_big +__872: + ; + if !(rc != 0) { + goto __873 + } + goto abort_due_to_error +__873: + ; + goto __8 + + // Opcode: VNext P1 P2 * * * + // + // Advance virtual table P1 to the next row in its result set and + // jump to instruction P2. Or, if the virtual table has reached + // the end of its result set, then fall through to the next instruction. +__177: + + pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __874 + } + goto __8 +__874: + ; + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule + + // Invoke the xNext() method of the module. There is no way for the + // underlying implementation to return an error if one occurs during + // xNext(). Instead, if an error occurs, true is returned (indicating that + // data is available) and the error code returned when xColumn or + // some other method is next invoked on the save virtual table cursor. + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) + Xsqlite3VtabImportErrmsg(tls, p, pVtab4) + if !(rc != 0) { + goto __875 + } + goto abort_due_to_error +__875: + ; + res14 = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) + + if !!(res14 != 0) { + goto __876 + } + // If there is data, jump to P2 + goto jump_to_p2_and_check_for_interrupt +__876: + ; + goto check_for_interrupt + + // Opcode: VRename P1 * * P4 * + // + // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. + // This opcode invokes the corresponding xRename method. The value + // in register P1 is passed as the zName argument to the xRename method. +__178: + + isLegacy = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) + *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LegacyAlter) + pVtab5 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab + pName = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) + if !(rc != 0) { + goto __877 + } + goto abort_due_to_error +__877: + ; + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) + if !(isLegacy == 0) { + goto __878 + } + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) +__878: + ; + Xsqlite3VtabImportErrmsg(tls, p, pVtab5) + libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) + if !(rc != 0) { + goto __879 + } + goto abort_due_to_error +__879: + ; + goto __8 + + // Opcode: VUpdate P1 P2 P3 P4 P5 + // Synopsis: data=r[P3@P2] + // + // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. + // This opcode invokes the corresponding xUpdate method. P2 values + // are contiguous memory cells starting at P3 to pass to the xUpdate + // invocation. The value in register (P3+P2-1) corresponds to the + // p2th element of the argv array passed to xUpdate. + // + // The xUpdate method will do a DELETE or an INSERT or both. + // The argv[0] element (which corresponds to memory cell P3) + // is the rowid of a row to delete. If argv[0] is NULL then no + // deletion occurs. The argv[1] element is the rowid of the new + // row. This can be NULL to have the virtual table select the new + // rowid for itself. The subsequent elements in the array are + // the values of columns in the new row. + // + // If P2==1 then no insert is performed. argv[0] is the rowid of + // a row to delete. + // + // P1 is a boolean flag. If it is set to true and the xUpdate call + // is successful, then the value returned by sqlite3_last_insert_rowid() + // is set to the value of the rowid for the row just inserted. + // + // P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to + // apply in the case of a constraint failure on an insert or update. +__179: + *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __880 + } + goto no_mem +__880: + ; + + pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab + if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { + goto __881 + } + rc = SQLITE_LOCKED + goto abort_due_to_error +__881: + ; + pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule + nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 + + if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { + goto __882 + } + vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict + apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg + pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + i8 = 0 +__883: + if !(i8 < nArg1) { + goto __885 + } + + *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 + pX1 += 56 + goto __884 +__884: + i8++ + goto __883 + goto __885 +__885: + ; + (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate})).f(tls, pVtab6, nArg1, apArg1, bp+968 /* &rowid1 */) + (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict + Xsqlite3VtabImportErrmsg(tls, p, pVtab6) + if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __886 + } + + (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) +__886: + ; + if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { + goto __887 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { + goto __889 + } + rc = SQLITE_OK + goto __890 +__889: + (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { + if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { + return uint8(OE_Abort) + } + return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) + }() +__890: + ; + goto __888 +__887: + (*Vdbe)(unsafe.Pointer(p)).FnChange++ +__888: + ; + if !(rc != 0) { + goto __891 + } + goto abort_due_to_error +__891: + ; +__882: + ; + goto __8 + + // Opcode: Pagecount P1 P2 * * * + // + // Write the current number of pages in database P1 to memory cell P2. +__180: // out2 + pOut = out2Prerelease(tls, p, pOp) + *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt)) + goto __8 + + // Opcode: MaxPgcnt P1 P2 P3 * * + // + // Try to set the maximum page count for database P1 to the value in P3. + // Do not let the maximum page count fall below the current page count and + // do not change the maximum page count value if P3==0. + // + // Store the maximum page count after the change in register P2. +__181: + + pOut = out2Prerelease(tls, p, pOp) + pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt + newMax = uint32(0) + if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { + goto __892 + } + newMax = Xsqlite3BtreeLastPage(tls, pBt3) + if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { + goto __893 + } + newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) +__893: + ; +__892: + ; + *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) + goto __8 + + // Opcode: Function P1 P2 P3 P4 * + // Synopsis: r[P3]=func(r[P2@NP]) + // + // Invoke a user function (P4 is a pointer to an sqlite3_context object that + // contains a pointer to the function to be run) with arguments taken + // from register P2 and successors. The number of arguments is in + // the sqlite3_context object that P4 points to. + // The result of the function is stored + // in register P3. Register P3 must not be one of the function inputs. + // + // P1 is a 32-bit bitmask indicating whether or not each argument to the + // function was determined to be constant at compile time. If the first + // argument was constant then bit 0 of P1 is set. This is used to determine + // whether meta data associated with a user function argument using the + // sqlite3_set_auxdata() API may be safely retained until the next + // invocation of this opcode. + // + // See also: AggStep, AggFinal, PureFunc + // Opcode: PureFunc P1 P2 P3 P4 * + // Synopsis: r[P3]=func(r[P2@NP]) + // + // Invoke a user function (P4 is a pointer to an sqlite3_context object that + // contains a pointer to the function to be run) with arguments taken + // from register P2 and successors. The number of arguments is in + // the sqlite3_context object that P4 points to. + // The result of the function is stored + // in register P3. Register P3 must not be one of the function inputs. + // + // P1 is a 32-bit bitmask indicating whether or not each argument to the + // function was determined to be constant at compile time. If the first + // argument was constant then bit 0 of P1 is set. This is used to determine + // whether meta data associated with a user function argument using the + // sqlite3_set_auxdata() API may be safely retained until the next + // invocation of this opcode. + // + // This opcode works exactly like OP_Function. The only difference is in + // its name. This opcode is used in places where the function must be + // purely non-deterministic. Some built-in date/time functions can be + // either determinitic of non-deterministic, depending on their arguments. + // When those function are used in a non-deterministic way, they will check + // to see if they were called using OP_PureFunc instead of OP_Function, and + // if they were, they throw an error. + // + // See also: AggStep, AggFinal, Function +__182: // group +__183: + ; + pCtx2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + // If this function is inside of a trigger, the register array in aMem[] + // might change from one evaluation to the next. The next block of code + // checks to see if the register array has changed, and if so it + // reinitializes the relavant parts of the sqlite3_context object + pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 + if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { + goto __894 + } + (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p + (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut + i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 +__895: + if !(i9 >= 0) { + goto __897 + } + *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 + goto __896 +__896: + i9-- + goto __895 + goto __897 +__897: + ; +__894: + ; + + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) + + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpFunc)).FxSFunc})).f(tls, pCtx2, int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc), pCtx2+48 /* &.argv */) // IMP: R-24505-23230 + + // If the function returned an error, throw an exception + if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { + goto __898 + } + if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { + goto __899 + } + Xsqlite3VdbeError(tls, p, ts+3605, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError +__899: + ; + Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) + (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 + if !(rc != 0) { + goto __900 + } + goto abort_due_to_error +__900: + ; +__898: + ; + + // Copy the result of the function into register P3 + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { + goto __901 + } + Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) + if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { + goto __902 + } + goto too_big +__902: + ; +__901: + ; + + goto __8 + + // Opcode: FilterAdd P1 * P3 P4 * + // Synopsis: filter(P1) += key(P3@P4) + // + // Compute a hash on the P4 registers starting with r[P3] and + // add that hash to the bloom filter contained in r[P1]. +__184: + ; + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + h = filterHash(tls, aMem, pOp) + h = h % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) + *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h/uint64(8)))) |= uint8(int32(1) << (h & uint64(7))) + goto __8 + + // Opcode: Filter P1 P2 P3 P4 * + // Synopsis: if key(P3@P4) not in filter(P1) goto P2 + // + // Compute a hash on the key contained in the P4 registers starting + // with r[P3]. Check to see if that hash is found in the + // bloom filter hosted by register P1. If it is not present then + // maybe jump to P2. Otherwise fall through. + // + // False negatives are harmless. It is always safe to fall through, + // even if the value is in the bloom filter. A false negative causes + // more CPU cycles to be used, but it should still yield the correct + // answer. However, an incorrect answer may well arise from a + // false positive - if the jump is taken when it should fall through. +__185: + ; + pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + + h1 = filterHash(tls, aMem, pOp) + h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) + if !(int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { + goto __903 + } + + *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ + goto jump_to_p2 + goto __904 +__903: + *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ + +__904: + ; + goto __8 + + // Opcode: Trace P1 P2 * P4 * + // + // Write P4 on the statement trace output if statement tracing is + // enabled. + // + // Operand P1 must be 0x7fffffff and P2 must positive. + // Opcode: Init P1 P2 P3 P4 * + // Synopsis: Start at P2 + // + // Programs contain a single instance of this opcode as the very first + // opcode. + // + // If tracing is enabled (by the sqlite3_trace()) interface, then + // the UTF-8 string contained in P4 is emitted on the trace callback. + // Or if P4 is blank, use the string returned by sqlite3_sql(). + // + // If P2 is not zero, jump to instruction P2. + // + // Increment the value of P1 so that OP_Once opcodes will jump the + // first time they are evaluated for this run. + // + // If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT + // error is encountered. +__186: +__187: + + // If the P4 argument is not NULL, then it must be an SQL comment string. + // The "--" string is broken up to prevent false-positives with srcck1.c. + // + // This assert() provides evidence for: + // EVIDENCE-OF: R-50676-09860 The callback can compute the same text that + // would have been returned by the legacy sqlite3_trace() interface by + // using the X argument when X begins with "--" and invoking + // sqlite3_expanded_sql(P) otherwise. + ; + + // OP_Init is always instruction 0 + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&(SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY) != 0 && + !(int32((*Vdbe)(unsafe.Pointer(p)).FdoingRerun) != 0) && + libc.AssignUintptr(&zTrace, func() uintptr { + if *(*uintptr)(unsafe.Pointer(pOp + 16)) != 0 { + return *(*uintptr)(unsafe.Pointer(pOp + 16)) + } + return (*Vdbe)(unsafe.Pointer(p)).FzSql + }()) != uintptr(0)) { + goto __905 + } + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { + goto __906 + } + z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) + Xsqlite3_free(tls, z2) + goto __907 +__906: + if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { + goto __908 + } + z3 = Xsqlite3MPrintf(tls, db, ts+6022, libc.VaList(bp+168, zTrace)) + (*struct { + f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) + Xsqlite3DbFree(tls, db, z3) + goto __909 +__908: + (*struct { + f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; +__905: + ; + + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __910 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __911 + } + goto __8 +__911: + ; + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: + i10++ + goto __912 + goto __914 +__914: + ; + (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 +__910: + ; + (*Op)(unsafe.Pointer(pOp)).Fp1++ + *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ + goto jump_to_p2 + + // Opcode: Noop * * * * * + // + // Do nothing. This instruction is often useful as a jump + // destination. + // The magic Explain opcode are only inserted when explain==2 (which + // is to say when the EXPLAIN QUERY PLAN syntax is used.) + // This opcode records information from the optimizer. It is the + // the same as a no-op. This opcodesnever appears in a real VM program. +__188: // This is really OP_Noop, OP_Explain + ; + + goto __8 + + // **************************************************************************** + // + // The cases of the switch statement above this line should all be indented + // by 6 spaces. But the left-most 6 spaces have been removed to improve the + // readability. From this point on down, the normal indentation rules are + // restored. + // +__8: + ; + + // The following code adds nothing to the actual functionality + // of the program. It is only here for testing and debugging. + // On the other hand, it does burn CPU cycles every time through + // the evaluator loop. So we can leave it out when NDEBUG is defined. + goto __6 +__6: + pOp += 24 + goto __5 + goto __7 +__7: + ; // The end of the for(;;) loop the loops through opcodes + + // If we reach this point, it means that execution is finished with + // an error of some kind. +abort_due_to_error: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __916 + } + rc = SQLITE_NOMEM + goto __917 +__916: + if !(rc == SQLITE_IOERR|int32(33)<<8) { + goto __918 + } + rc = Xsqlite3CorruptError(tls, 95906) +__918: + ; +__917: + ; + + if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { + goto __919 + } + Xsqlite3VdbeError(tls, p, ts+3605, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__919: + ; + (*Vdbe)(unsafe.Pointer(p)).Frc = rc + Xsqlite3SystemError(tls, db, rc) + + Xsqlite3_log(tls, rc, ts+6028, + libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3VdbeHalt(tls, p) + if !(rc == SQLITE_IOERR|int32(12)<<8) { + goto __920 + } + Xsqlite3OomFault(tls, db) +__920: + ; + if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { + goto __921 + } + *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 +__921: + ; + rc = SQLITE_ERROR + if !(int32(resetSchemaOnFault) > 0) { + goto __922 + } + Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) +__922: + ; + + // This is the only way out of this procedure. We have to + // release the mutexes on btrees that were acquired at the + // top. +vdbe_return: +__923: + if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { + goto __924 + } + nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) + if !((*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { + goto __925 + } + nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 + rc = SQLITE_INTERRUPT + goto abort_due_to_error +__925: + ; + goto __923 +__924: + ; + *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) + Xsqlite3VdbeLeave(tls, p) + + return rc + + // Jump to here if a string or blob larger than SQLITE_MAX_LENGTH + // is encountered. +too_big: + Xsqlite3VdbeError(tls, p, ts+5276, 0) + rc = SQLITE_TOOBIG + goto abort_due_to_error + + // Jump to here if a malloc() fails. +no_mem: + Xsqlite3OomFault(tls, db) + Xsqlite3VdbeError(tls, p, ts+1461, 0) + rc = SQLITE_NOMEM + goto abort_due_to_error + + // Jump to here if the sqlite3_interrupt() API sets the interrupt + // flag. +abort_due_to_interrupt: + ; + rc = SQLITE_INTERRUPT + goto abort_due_to_error + return int32(0) +} + +var azType = [4]uintptr{ts + 6060, ts + 6069, ts + 6076, + ts + 6082} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ + +//************* End of vdbe.c *********************************************** +//************* Begin file vdbeblob.c *************************************** +// 2007 May 1 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code used to implement incremental BLOB I/O. + +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// Valid sqlite3_blob* handles point to Incrblob structures. +type Incrblob1 = struct { + FnByte int32 + FiOffset int32 + FiCol U16 + F__ccgo_pad1 [6]byte + FpCsr uintptr + FpStmt uintptr + Fdb uintptr + FzDb uintptr + FpTab uintptr +} /* sqlite3.c:96011:9 */ + +//************* End of vdbe.c *********************************************** +//************* Begin file vdbeblob.c *************************************** +// 2007 May 1 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code used to implement incremental BLOB I/O. + +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// Valid sqlite3_blob* handles point to Incrblob structures. +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ + +// This function is used by both blob_open() and blob_reopen(). It seeks +// the b-tree cursor associated with blob handle p to point to row iRow. +// If successful, SQLITE_OK is returned and subsequent calls to +// sqlite3_blob_read() or sqlite3_blob_write() access the specified row. +// +// If an error occurs, or if the specified row does not exist or does not +// contain a value of type TEXT or BLOB in the column nominated when the +// blob handle was opened, then an error code is returned and *pzErr may +// be set to point to a buffer containing an error message. It is the +// responsibility of the caller to free the error message buffer using +// sqlite3DbFree(). +// +// If an error does occur, then the b-tree cursor is closed. All subsequent +// calls to sqlite3_blob_read(), blob_write() or blob_reopen() will +// immediately return SQLITE_ABORT. +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 // Error code + var zErr uintptr = uintptr(0) // Error message + var v uintptr = (*Incrblob)(unsafe.Pointer(p)).FpStmt + + // Set the value of register r[1] in the SQL statement to integer iRow. + // This is done directly as a performance optimization + (*Mem)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FaMem + 1*56)).Fflags = U16(MEM_Int) + *(*I64)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FaMem + 1*56)) = iRow + + // If the statement has been run before (and is paused at the OP_ResultRow) + // then back it up to the point where it does the OP_NotExists. This could + // have been down with an extra OP_Goto, but simply setting the program + // counter is faster. + if (*Vdbe)(unsafe.Pointer(v)).Fpc > 4 { + (*Vdbe)(unsafe.Pointer(v)).Fpc = 4 + + rc = Xsqlite3VdbeExec(tls, v) + } else { + rc = Xsqlite3_step(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) + } + if rc == SQLITE_ROW { + var pC uintptr = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FapCsr)) + var type1 U32 + + if int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed) > int32((*Incrblob)(unsafe.Pointer(p)).FiCol) { + type1 = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Incrblob)(unsafe.Pointer(p)).FiCol)*4)) + } else { + type1 = uint32(0) + } + + if type1 < U32(12) { + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6094, + libc.VaList(bp, func() uintptr { + if type1 == U32(0) { + return ts + 6123 /* "null" */ + } + return func() uintptr { + if type1 == U32(7) { + return ts + 6128 /* "real" */ + } + return ts + 6133 /* "integer" */ + }() + }())) + rc = SQLITE_ERROR + Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) + (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) + } else { + (*Incrblob)(unsafe.Pointer(p)).FiOffset = int32(*(*U32)(unsafe.Pointer(pC + 112 + uintptr(int32((*Incrblob)(unsafe.Pointer(p)).FiCol)+int32((*VdbeCursor)(unsafe.Pointer(pC)).FnField))*4))) + (*Incrblob)(unsafe.Pointer(p)).FnByte = int32(Xsqlite3VdbeSerialTypeLen(tls, type1)) + (*Incrblob)(unsafe.Pointer(p)).FpCsr = *(*uintptr)(unsafe.Pointer(pC + 48)) + Xsqlite3BtreeIncrblobCursor(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) + } + } + + if rc == SQLITE_ROW { + rc = SQLITE_OK + } else if (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { + rc = Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) + (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) + if rc == SQLITE_OK { + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6141, libc.VaList(bp+8, iRow)) + rc = SQLITE_ERROR + } else { + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3605, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + } + } + + *(*uintptr)(unsafe.Pointer(pzErr)) = zErr + return rc +} + +// Open a blob handle. +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ + bp := tls.Alloc(464) + defer tls.Free(464) + + var nAttempt int32 + var iCol int32 // Index of zColumn in row-record + var rc int32 + // var zErr uintptr at bp+456, 8 + + var pTab uintptr + var pBlob uintptr + // var sParse Parse at bp+48, 408 + + var j int32 + // Check that the column is not part of an FK child key definition. It + // is not necessary to check if it is part of a parent key, as parent + // key columns must be indexed. The check below will pick up this + // case. + var pFKey uintptr + var j1 int32 + var zFault uintptr + var pIdx uintptr + var v uintptr + var iDb int32 + var aOp uintptr + nAttempt = 0 + rc = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = uintptr(0) + pBlob = uintptr(0) + + *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) + wrFlag = libc.BoolInt32(!!(wrFlag != 0)) // wrFlag = (wrFlag ? 1 : 0); + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + pBlob = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Incrblob{}))) +__1: + if !(1 != 0) { + goto __2 + } + Xsqlite3ParseObjectInit(tls, bp+48, db) + if !!(pBlob != 0) { + goto __3 + } + goto blob_open_out +__3: + ; + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = uintptr(0) + + Xsqlite3BtreeEnterAll(tls, db) + pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) + if !(pTab != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __4 + } + pTab = uintptr(0) + Xsqlite3ErrorMsg(tls, bp+48, ts+6161, libc.VaList(bp, zTable)) +__4: + ; + if !(pTab != 0 && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { + goto __5 + } + pTab = uintptr(0) + Xsqlite3ErrorMsg(tls, bp+48, ts+6191, libc.VaList(bp+8, zTable)) +__5: + ; + if !(pTab != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __6 + } + pTab = uintptr(0) + Xsqlite3ErrorMsg(tls, bp+48, ts+6227, libc.VaList(bp+16, zTable)) +__6: + ; + if !!(pTab != 0) { + goto __7 + } + if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { + goto __8 + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FzErrMsg + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FzErrMsg = uintptr(0) +__8: + ; + rc = SQLITE_ERROR + Xsqlite3BtreeLeaveAll(tls, db) + goto blob_open_out +__7: + ; + (*Incrblob)(unsafe.Pointer(pBlob)).FpTab = pTab + (*Incrblob)(unsafe.Pointer(pBlob)).FzDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema))*32)).FzDbSName + + // Now search pTab for the exact column. + iCol = 0 +__9: + if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __11 + } + if !(Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName, zColumn) == 0) { + goto __12 + } + goto __11 +__12: + ; + goto __10 +__10: + iCol++ + goto __9 + goto __11 +__11: + ; + if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __13 + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6248, libc.VaList(bp+24, zColumn)) + rc = SQLITE_ERROR + Xsqlite3BtreeLeaveAll(tls, db) + goto blob_open_out +__13: + ; + + // If the value is being opened for writing, check that the + // column is not indexed, and that it is not part of a foreign key. + if !(wrFlag != 0) { + goto __14 + } + zFault = uintptr(0) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __15 + } + + pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)) +__16: + if !(pFKey != 0) { + goto __18 + } + j = 0 +__19: + if !(j < (*FKey)(unsafe.Pointer(pFKey)).FnCol) { + goto __21 + } + if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { + goto __22 + } + zFault = ts + 6269 /* "foreign key" */ +__22: + ; + goto __20 +__20: + j++ + goto __19 + goto __21 +__21: + ; + goto __17 +__17: + pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom + goto __16 + goto __18 +__18: + ; +__15: + ; + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__23: + if !(pIdx != 0) { + goto __25 + } + j1 = 0 +__26: + if !(j1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) { + goto __28 + } + // FIXME: Be smarter about indexes that use expressions + if !(int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == iCol || int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == -2) { + goto __29 + } + zFault = ts + 6281 /* "indexed" */ +__29: + ; + goto __27 +__27: + j1++ + goto __26 + goto __28 +__28: + ; + goto __24 +__24: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __23 + goto __25 +__25: + ; + if !(zFault != 0) { + goto __30 + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6289, libc.VaList(bp+32, zFault)) + rc = SQLITE_ERROR + Xsqlite3BtreeLeaveAll(tls, db) + goto blob_open_out +__30: + ; +__14: + ; + + (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt = Xsqlite3VdbeCreate(tls, bp+48) + + if !((*Incrblob)(unsafe.Pointer(pBlob)).FpStmt != 0) { + goto __31 + } + v = (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + Xsqlite3VdbeAddOp4Int(tls, v, OP_Transaction, iDb, wrFlag, + (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpSchema)).Fschema_cookie, + (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpSchema)).FiGeneration) + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + + aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(openBlob))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&openBlob)), iLn) + + // Make sure a mutex is held on the table to be accessed + Xsqlite3VdbeUsesBtree(tls, v, iDb) + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { + goto __32 + } + + // Configure the OP_TableLock instruction + (*VdbeOp)(unsafe.Pointer(aOp)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp)).Fp2 = int32((*Table)(unsafe.Pointer(pTab)).Ftnum) + (*VdbeOp)(unsafe.Pointer(aOp)).Fp3 = wrFlag + Xsqlite3VdbeChangeP4(tls, v, 2, (*Table)(unsafe.Pointer(pTab)).FzName, P4_TRANSIENT) +__32: + ; + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { + goto __33 + } + + // Remove either the OP_OpenWrite or OpenRead. Set the P2 + // parameter of the other to pTab->tnum. + if !(wrFlag != 0) { + goto __34 + } + (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fopcode = U8(OP_OpenWrite) +__34: + ; + (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp2 = int32((*Table)(unsafe.Pointer(pTab)).Ftnum) + (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp3 = iDb + + // Configure the number of columns. Configure the cursor to + // think that the table has one more column than it really + // does. An OP_Column to retrieve this imaginary column will + // always return an SQL NULL. This is useful because it means + // we can invoke OP_Column to fill in the vdbe cursors type + // and offset cache without causing any IO. + (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp4type = int8(-3) + *(*int32)(unsafe.Pointer(aOp + 1*24 + 16)) = int32((*Table)(unsafe.Pointer(pTab)).FnCol) + 1 + (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp2 = int32((*Table)(unsafe.Pointer(pTab)).FnCol) + + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnVar = int16(0) + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnMem = 1 + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnTab = 1 + Xsqlite3VdbeMakeReady(tls, v, bp+48) +__33: + ; +__31: + ; + + (*Incrblob)(unsafe.Pointer(pBlob)).FiCol = U16(iCol) + (*Incrblob)(unsafe.Pointer(pBlob)).Fdb = db + Xsqlite3BtreeLeaveAll(tls, db) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __35 + } + goto blob_open_out +__35: + ; + rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { + goto __36 + } + goto __2 +__36: + ; + Xsqlite3ParseObjectReset(tls, bp+48) + goto __1 +__2: + ; + +blob_open_out: + if !(rc == SQLITE_OK && int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { + goto __37 + } + *(*uintptr)(unsafe.Pointer(ppBlob)) = pBlob + goto __38 +__37: + if !(pBlob != 0 && (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt != 0) { + goto __39 + } + Xsqlite3VdbeFinalize(tls, (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt) +__39: + ; + Xsqlite3DbFree(tls, db, pBlob) +__38: + ; + Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { + return ts + 3605 /* "%s" */ + } + return uintptr(0) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + Xsqlite3ParseObjectReset(tls, bp+48) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +var iLn int32 = 0 /* sqlite3.c:96252:24 */ +var openBlob = [6]VdbeOpList{ + {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock + {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor + // blobSeekToRow() will initialize r[1] to the desired rowid + {Fopcode: U8(OP_NotExists), Fp2: int8(5), Fp3: int8(1)}, // 2: Seek the cursor to rowid=r[1] + {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 + {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 + {Fopcode: U8(OP_Halt)}, // 5 +} /* sqlite3.c:96253:31 */ + +// Close a blob handle that was previously created using +// sqlite3_blob_open(). +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ + var p uintptr = pBlob + var rc int32 + var db uintptr + + if p != 0 { + var pStmt uintptr = (*Incrblob)(unsafe.Pointer(p)).FpStmt + db = (*Incrblob)(unsafe.Pointer(p)).Fdb + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + Xsqlite3DbFree(tls, db, p) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + rc = Xsqlite3_finalize(tls, pStmt) + } else { + rc = SQLITE_OK + } + return rc +} + +// Perform a read or write operation on a blob +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ + var rc int32 + var p uintptr = pBlob + var v uintptr + var db uintptr + + if p == uintptr(0) { + return Xsqlite3MisuseError(tls, 96377) + } + db = (*Incrblob)(unsafe.Pointer(p)).Fdb + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + v = (*Incrblob)(unsafe.Pointer(p)).FpStmt + + if n < 0 || iOffset < 0 || Sqlite3_int64(iOffset)+Sqlite3_int64(n) > Sqlite3_int64((*Incrblob)(unsafe.Pointer(p)).FnByte) { + // Request is out of range. Return a transient error. + rc = SQLITE_ERROR + } else if v == uintptr(0) { + // If there is no statement handle, then the blob-handle has + // already been invalidated. Return SQLITE_ABORT in this case. + rc = SQLITE_ABORT + } else { + // Call either BtreeData() or BtreePutData(). If SQLITE_ABORT is + // returned, clean-up the statement handle. + + Xsqlite3BtreeEnterCursor(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) + + if xCall == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 + }{Xsqlite3BtreePutData})) && (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { + // If a pre-update hook is registered and this is a write cursor, + // invoke it here. + // + // TODO: The preupdate-hook is passed SQLITE_DELETE, even though this + // operation should really be an SQLITE_UPDATE. This is probably + // incorrect, but is convenient because at this point the new.* values + // are not easily obtainable. And for the sessions module, an + // SQLITE_UPDATE where the PK columns do not change is handled in the + // same way as an SQLITE_DELETE (the SQLITE_DELETE code is actually + // slightly more efficient). Since you cannot write to a PK column + // using the incremental-blob API, this works. For the sessions module + // anyhow. + var iKey Sqlite3_int64 + iKey = Xsqlite3BtreeIntegerKey(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) + + Xsqlite3VdbePreUpdateHook(tls, + v, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FapCsr)), SQLITE_DELETE, (*Incrblob)(unsafe.Pointer(p)).FzDb, (*Incrblob)(unsafe.Pointer(p)).FpTab, iKey, -1, int32((*Incrblob)(unsafe.Pointer(p)).FiCol)) + } + + rc = (*struct { + f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xCall})).f(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr, uint32(iOffset+(*Incrblob)(unsafe.Pointer(p)).FiOffset), uint32(n), z) + Xsqlite3BtreeLeaveCursor(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) + if rc == SQLITE_ABORT { + Xsqlite3VdbeFinalize(tls, v) + (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) + } else { + (*Vdbe)(unsafe.Pointer(v)).Frc = rc + } + } + Xsqlite3Error(tls, db, rc) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Read data from a blob handle. +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ + return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 + }{Xsqlite3BtreePayloadChecked}))) +} + +// Write data to a blob handle. +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ + return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 + }{Xsqlite3BtreePutData}))) +} + +// Query a blob handle for the size of the data. +// +// The Incrblob.nByte field is fixed for the lifetime of the Incrblob +// so no mutex is required for access. +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ + var p uintptr = pBlob + if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { + return (*Incrblob)(unsafe.Pointer(p)).FnByte + } + return 0 +} + +// Move an existing blob handle to point to a different row of the same +// database table. +// +// If an error occurs, or if the specified row does not exist or does not +// contain a blob or text value, then an error code is returned and the +// database handle error code and message set. If this happens, then all +// subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) +// immediately return SQLITE_ABORT. +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 + var p uintptr = pBlob + var db uintptr + + if p == uintptr(0) { + return Xsqlite3MisuseError(tls, 96477) + } + db = (*Incrblob)(unsafe.Pointer(p)).Fdb + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + if (*Incrblob)(unsafe.Pointer(p)).FpStmt == uintptr(0) { + // If there is no statement handle, then the blob-handle has + // already been invalidated. Return SQLITE_ABORT in this case. + rc = SQLITE_ABORT + } else { + // var zErr uintptr at bp+8, 8 + + (*Vdbe)(unsafe.Pointer((*Incrblob)(unsafe.Pointer(p)).FpStmt)).Frc = SQLITE_OK + rc = blobSeekToRow(tls, p, iRow, bp+8) + if rc != SQLITE_OK { + Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + return ts + 3605 /* "%s" */ + } + return uintptr(0) + }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))) + } + + } + + rc = Xsqlite3ApiExit(tls, db, rc) + + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +//************* End of vdbeblob.c ******************************************* +//************* Begin file vdbesort.c *************************************** +// 2011-07-09 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code for the VdbeSorter object, used in concert with +// a VdbeCursor to sort large numbers of keys for CREATE INDEX statements +// or by SELECT statements with ORDER BY clauses that cannot be satisfied +// using indexes and without LIMIT clauses. +// +// The VdbeSorter object implements a multi-threaded external merge sort +// algorithm that is efficient even if the number of elements being sorted +// exceeds the available memory. +// +// Here is the (internal, non-API) interface between this module and the +// rest of the SQLite system: +// +// sqlite3VdbeSorterInit() Create a new VdbeSorter object. +// +// sqlite3VdbeSorterWrite() Add a single new row to the VdbeSorter +// object. The row is a binary blob in the +// OP_MakeRecord format that contains both +// the ORDER BY key columns and result columns +// in the case of a SELECT w/ ORDER BY, or +// the complete record for an index entry +// in the case of a CREATE INDEX. +// +// sqlite3VdbeSorterRewind() Sort all content previously added. +// Position the read cursor on the +// first sorted element. +// +// sqlite3VdbeSorterNext() Advance the read cursor to the next sorted +// element. +// +// sqlite3VdbeSorterRowkey() Return the complete binary blob for the +// row currently under the read cursor. +// +// sqlite3VdbeSorterCompare() Compare the binary blob for the row +// currently under the read cursor against +// another binary blob X and report if +// X is strictly less than the read cursor. +// Used to enforce uniqueness in a +// CREATE UNIQUE INDEX statement. +// +// sqlite3VdbeSorterClose() Close the VdbeSorter object and reclaim +// all resources. +// +// sqlite3VdbeSorterReset() Refurbish the VdbeSorter for reuse. This +// is like Close() followed by Init() only +// much faster. +// +// The interfaces above must be called in a particular order. Write() can +// only occur in between Init()/Reset() and Rewind(). Next(), Rowkey(), and +// Compare() can only occur in between Rewind() and Close()/Reset(). i.e. +// +// Init() +// for each record: Write() +// Rewind() +// Rowkey()/Compare() +// Next() +// Close() +// +// Algorithm: +// +// Records passed to the sorter via calls to Write() are initially held +// unsorted in main memory. Assuming the amount of memory used never exceeds +// a threshold, when Rewind() is called the set of records is sorted using +// an in-memory merge sort. In this case, no temporary files are required +// and subsequent calls to Rowkey(), Next() and Compare() read records +// directly from main memory. +// +// If the amount of space used to store records in main memory exceeds the +// threshold, then the set of records currently in memory are sorted and +// written to a temporary file in "Packed Memory Array" (PMA) format. +// A PMA created at this point is known as a "level-0 PMA". Higher levels +// of PMAs may be created by merging existing PMAs together - for example +// merging two or more level-0 PMAs together creates a level-1 PMA. +// +// The threshold for the amount of main memory to use before flushing +// records to a PMA is roughly the same as the limit configured for the +// page-cache of the main database. Specifically, the threshold is set to +// the value returned by "PRAGMA main.page_size" multipled by +// that returned by "PRAGMA main.cache_size", in bytes. +// +// If the sorter is running in single-threaded mode, then all PMAs generated +// are appended to a single temporary file. Or, if the sorter is running in +// multi-threaded mode then up to (N+1) temporary files may be opened, where +// N is the configured number of worker threads. In this case, instead of +// sorting the records and writing the PMA to a temporary file itself, the +// calling thread usually launches a worker thread to do so. Except, if +// there are already N worker threads running, the main thread does the work +// itself. +// +// The sorter is running in multi-threaded mode if (a) the library was built +// with pre-processor symbol SQLITE_MAX_WORKER_THREADS set to a value greater +// than zero, and (b) worker threads have been enabled at runtime by calling +// "PRAGMA threads=N" with some value of N greater than 0. +// +// When Rewind() is called, any data remaining in memory is flushed to a +// final PMA. So at this point the data is stored in some number of sorted +// PMAs within temporary files on disk. +// +// If there are fewer than SORTER_MAX_MERGE_COUNT PMAs in total and the +// sorter is running in single-threaded mode, then these PMAs are merged +// incrementally as keys are retreived from the sorter by the VDBE. The +// MergeEngine object, described in further detail below, performs this +// merge. +// +// Or, if running in multi-threaded mode, then a background thread is +// launched to merge the existing PMAs. Once the background thread has +// merged T bytes of data into a single sorted PMA, the main thread +// begins reading keys from that PMA while the background thread proceeds +// with merging the next T bytes of data. And so on. +// +// Parameter T is set to half the value of the memory threshold used +// by Write() above to determine when to create a new PMA. +// +// If there are more than SORTER_MAX_MERGE_COUNT PMAs in total when +// Rewind() is called, then a hierarchy of incremental-merges is used. +// First, T bytes of data from the first SORTER_MAX_MERGE_COUNT PMAs on +// disk are merged together. Then T bytes of data from the second set, and +// so on, such that no operation ever merges more than SORTER_MAX_MERGE_COUNT +// PMAs at a time. This done is to improve locality. +// +// If running in multi-threaded mode and there are more than +// SORTER_MAX_MERGE_COUNT PMAs on disk when Rewind() is called, then more +// than one background thread may be created. Specifically, there may be +// one background thread for each temporary file on disk, and one background +// thread to merge the output of each of the others to a single PMA for +// the main thread to read from. +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// If SQLITE_DEBUG_SORTER_THREADS is defined, this module outputs various +// messages to stderr that may be helpful in understanding the performance +// characteristics of the sorter in multi-threaded mode. + +// Hard-coded maximum amount of data to accumulate in memory before flushing +// to a level 0 PMA. The purpose of this limit is to prevent various integer +// overflows. 512MiB. + +// Private objects used by the sorter +type MergeEngine1 = struct { + FnTree int32 + F__ccgo_pad1 [4]byte + FpTask uintptr + FaTree uintptr + FaReadr uintptr +} /* sqlite3.c:22082:9 */ + +//************* End of vdbeblob.c ******************************************* +//************* Begin file vdbesort.c *************************************** +// 2011-07-09 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code for the VdbeSorter object, used in concert with +// a VdbeCursor to sort large numbers of keys for CREATE INDEX statements +// or by SELECT statements with ORDER BY clauses that cannot be satisfied +// using indexes and without LIMIT clauses. +// +// The VdbeSorter object implements a multi-threaded external merge sort +// algorithm that is efficient even if the number of elements being sorted +// exceeds the available memory. +// +// Here is the (internal, non-API) interface between this module and the +// rest of the SQLite system: +// +// sqlite3VdbeSorterInit() Create a new VdbeSorter object. +// +// sqlite3VdbeSorterWrite() Add a single new row to the VdbeSorter +// object. The row is a binary blob in the +// OP_MakeRecord format that contains both +// the ORDER BY key columns and result columns +// in the case of a SELECT w/ ORDER BY, or +// the complete record for an index entry +// in the case of a CREATE INDEX. +// +// sqlite3VdbeSorterRewind() Sort all content previously added. +// Position the read cursor on the +// first sorted element. +// +// sqlite3VdbeSorterNext() Advance the read cursor to the next sorted +// element. +// +// sqlite3VdbeSorterRowkey() Return the complete binary blob for the +// row currently under the read cursor. +// +// sqlite3VdbeSorterCompare() Compare the binary blob for the row +// currently under the read cursor against +// another binary blob X and report if +// X is strictly less than the read cursor. +// Used to enforce uniqueness in a +// CREATE UNIQUE INDEX statement. +// +// sqlite3VdbeSorterClose() Close the VdbeSorter object and reclaim +// all resources. +// +// sqlite3VdbeSorterReset() Refurbish the VdbeSorter for reuse. This +// is like Close() followed by Init() only +// much faster. +// +// The interfaces above must be called in a particular order. Write() can +// only occur in between Init()/Reset() and Rewind(). Next(), Rowkey(), and +// Compare() can only occur in between Rewind() and Close()/Reset(). i.e. +// +// Init() +// for each record: Write() +// Rewind() +// Rowkey()/Compare() +// Next() +// Close() +// +// Algorithm: +// +// Records passed to the sorter via calls to Write() are initially held +// unsorted in main memory. Assuming the amount of memory used never exceeds +// a threshold, when Rewind() is called the set of records is sorted using +// an in-memory merge sort. In this case, no temporary files are required +// and subsequent calls to Rowkey(), Next() and Compare() read records +// directly from main memory. +// +// If the amount of space used to store records in main memory exceeds the +// threshold, then the set of records currently in memory are sorted and +// written to a temporary file in "Packed Memory Array" (PMA) format. +// A PMA created at this point is known as a "level-0 PMA". Higher levels +// of PMAs may be created by merging existing PMAs together - for example +// merging two or more level-0 PMAs together creates a level-1 PMA. +// +// The threshold for the amount of main memory to use before flushing +// records to a PMA is roughly the same as the limit configured for the +// page-cache of the main database. Specifically, the threshold is set to +// the value returned by "PRAGMA main.page_size" multipled by +// that returned by "PRAGMA main.cache_size", in bytes. +// +// If the sorter is running in single-threaded mode, then all PMAs generated +// are appended to a single temporary file. Or, if the sorter is running in +// multi-threaded mode then up to (N+1) temporary files may be opened, where +// N is the configured number of worker threads. In this case, instead of +// sorting the records and writing the PMA to a temporary file itself, the +// calling thread usually launches a worker thread to do so. Except, if +// there are already N worker threads running, the main thread does the work +// itself. +// +// The sorter is running in multi-threaded mode if (a) the library was built +// with pre-processor symbol SQLITE_MAX_WORKER_THREADS set to a value greater +// than zero, and (b) worker threads have been enabled at runtime by calling +// "PRAGMA threads=N" with some value of N greater than 0. +// +// When Rewind() is called, any data remaining in memory is flushed to a +// final PMA. So at this point the data is stored in some number of sorted +// PMAs within temporary files on disk. +// +// If there are fewer than SORTER_MAX_MERGE_COUNT PMAs in total and the +// sorter is running in single-threaded mode, then these PMAs are merged +// incrementally as keys are retreived from the sorter by the VDBE. The +// MergeEngine object, described in further detail below, performs this +// merge. +// +// Or, if running in multi-threaded mode, then a background thread is +// launched to merge the existing PMAs. Once the background thread has +// merged T bytes of data into a single sorted PMA, the main thread +// begins reading keys from that PMA while the background thread proceeds +// with merging the next T bytes of data. And so on. +// +// Parameter T is set to half the value of the memory threshold used +// by Write() above to determine when to create a new PMA. +// +// If there are more than SORTER_MAX_MERGE_COUNT PMAs in total when +// Rewind() is called, then a hierarchy of incremental-merges is used. +// First, T bytes of data from the first SORTER_MAX_MERGE_COUNT PMAs on +// disk are merged together. Then T bytes of data from the second set, and +// so on, such that no operation ever merges more than SORTER_MAX_MERGE_COUNT +// PMAs at a time. This done is to improve locality. +// +// If running in multi-threaded mode and there are more than +// SORTER_MAX_MERGE_COUNT PMAs on disk when Rewind() is called, then more +// than one background thread may be created. Specifically, there may be +// one background thread for each temporary file on disk, and one background +// thread to merge the output of each of the others to a single PMA for +// the main thread to read from. +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// If SQLITE_DEBUG_SORTER_THREADS is defined, this module outputs various +// messages to stderr that may be helpful in understanding the performance +// characteristics of the sorter in multi-threaded mode. + +// Hard-coded maximum amount of data to accumulate in memory before flushing +// to a level 0 PMA. The purpose of this limit is to prevent various integer +// overflows. 512MiB. + +// Private objects used by the sorter +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together +type PmaReader1 = struct { + FiReadOff I64 + FiEof I64 + FnAlloc int32 + FnKey int32 + FpFd uintptr + FaAlloc uintptr + FaKey uintptr + FaBuffer uintptr + FnBuffer int32 + F__ccgo_pad1 [4]byte + FaMap uintptr + FpIncr uintptr +} /* sqlite3.c:22082:9 */ + +// Merge PMAs together +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA +type PmaWriter1 = struct { + FeFWErr int32 + F__ccgo_pad1 [4]byte + FaBuffer uintptr + FnBuffer int32 + FiBufStart int32 + FiBufEnd int32 + F__ccgo_pad2 [4]byte + FiWriteOff I64 + FpFd uintptr +} /* sqlite3.c:96668:9 */ + +// Incrementally read one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA +type SorterRecord1 = struct { + FnVal int32 + F__ccgo_pad1 [4]byte + Fu struct{ FpNext uintptr } +} /* sqlite3.c:22082:9 */ + +// Incrementally write one PMA +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted +type SortSubtask1 = struct { + FpThread uintptr + FbDone int32 + F__ccgo_pad1 [4]byte + FpSorter uintptr + FpUnpacked uintptr + Flist SorterList + FnPMA int32 + F__ccgo_pad2 [4]byte + FxCompare SorterCompare + Ffile SorterFile + Ffile2 SorterFile +} /* sqlite3.c:22082:9 */ + +// A record being sorted +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process +type SorterFile1 = struct { + FpFd uintptr + FiEof I64 +} /* sqlite3.c:22082:9 */ + +// A sub-task in the sort process +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper +type SorterList1 = struct { + FpList uintptr + FaMemory uintptr + FszPMA int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:22082:9 */ + +// Temporary file object wrapper +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records +type IncrMerger1 = struct { + FpTask uintptr + FpMerger uintptr + FiStartOff I64 + FmxSz int32 + FbEof int32 + FbUseThread int32 + F__ccgo_pad1 [4]byte + FaFile [2]SorterFile +} /* sqlite3.c:22082:9 */ + +// In-memory list of records +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ + +// This object represents a single thread of control in a sort operation. +// Exactly VdbeSorter.nTask instances of this object are allocated +// as part of each VdbeSorter object. Instances are never allocated any +// other way. VdbeSorter.nTask is set to the number of worker threads allowed +// (see SQLITE_CONFIG_WORKER_THREADS) plus one (the main thread). Thus for +// single-threaded operation, there is exactly one instance of this object +// and for multi-threaded operation there are two or more instances. +// +// Essentially, this structure contains all those fields of the VdbeSorter +// structure for which each thread requires a separate instance. For example, +// each thread requries its own UnpackedRecord object to unpack records in +// as part of comparison operations. +// +// Before a background thread is launched, variable bDone is set to 0. Then, +// right before it exits, the thread itself sets bDone to 1. This is used for +// two purposes: +// +// 1. When flushing the contents of memory to a level-0 PMA on disk, to +// attempt to select a SortSubtask for which there is not already an +// active background thread (since doing so causes the main thread +// to block until it finishes). +// +// 2. If SQLITE_DEBUG_SORTER_THREADS is defined, to determine if a call +// to sqlite3ThreadJoin() is likely to block. Cases that are likely to +// block provoke debugging output. +// +// In both cases, the effects of the main thread seeing (bDone==0) even +// after the thread has finished are not dire. So we don't worry about +// memory barriers and such here. +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ + +// Free all memory belonging to the PmaReader object passed as the +// argument. All structure fields are set to zero before returning. +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ + Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) + Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) + if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { + Xsqlite3OsUnfetch(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpFd, int64(0), (*PmaReader)(unsafe.Pointer(pReadr)).FaMap) + } + vdbeIncrFree(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr) + libc.Xmemset(tls, pReadr, 0, uint64(unsafe.Sizeof(PmaReader{}))) +} + +// Read the next nByte bytes of data from the PMA p. +// If successful, set *ppOut to point to a buffer containing the data +// and return SQLITE_OK. Otherwise, if an error occurs, return an SQLite +// error code. +// +// The buffer returned in *ppOut is only valid until the +// next call to this function. +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var iBuf int32 // Offset within buffer to read from + var nAvail int32 // Bytes of data available in buffer + + if (*PmaReader)(unsafe.Pointer(p)).FaMap != 0 { + *(*uintptr)(unsafe.Pointer(ppOut)) = (*PmaReader)(unsafe.Pointer(p)).FaMap + uintptr((*PmaReader)(unsafe.Pointer(p)).FiReadOff) + *(*I64)(unsafe.Pointer(p)) += I64(nByte) + return SQLITE_OK + } + + // If there is no more data to be read from the buffer, read the next + // p->nBuffer bytes of data from the file into it. Or, if there are less + // than p->nBuffer bytes remaining in the PMA, read all remaining data. + iBuf = int32((*PmaReader)(unsafe.Pointer(p)).FiReadOff % I64((*PmaReader)(unsafe.Pointer(p)).FnBuffer)) + if iBuf == 0 { + var nRead int32 // Bytes to read from disk + var rc int32 // sqlite3OsRead() return code + + // Determine how many bytes of data to read. + if (*PmaReader)(unsafe.Pointer(p)).FiEof-(*PmaReader)(unsafe.Pointer(p)).FiReadOff > I64((*PmaReader)(unsafe.Pointer(p)).FnBuffer) { + nRead = (*PmaReader)(unsafe.Pointer(p)).FnBuffer + } else { + nRead = int32((*PmaReader)(unsafe.Pointer(p)).FiEof - (*PmaReader)(unsafe.Pointer(p)).FiReadOff) + } + + // Readr data from the file. Return early if an error occurs. + rc = Xsqlite3OsRead(tls, (*PmaReader)(unsafe.Pointer(p)).FpFd, (*PmaReader)(unsafe.Pointer(p)).FaBuffer, nRead, (*PmaReader)(unsafe.Pointer(p)).FiReadOff) + + if rc != SQLITE_OK { + return rc + } + } + nAvail = (*PmaReader)(unsafe.Pointer(p)).FnBuffer - iBuf + + if nByte <= nAvail { + // The requested data is available in the in-memory buffer. In this + // case there is no need to make a copy of the data, just return a + // pointer into the buffer to the caller. + *(*uintptr)(unsafe.Pointer(ppOut)) = (*PmaReader)(unsafe.Pointer(p)).FaBuffer + uintptr(iBuf) + *(*I64)(unsafe.Pointer(p)) += I64(nByte) + } else { + // The requested data is not all available in the in-memory buffer. + // In this case, allocate space at p->aAlloc[] to copy the requested + // range into. Then return a copy of pointer p->aAlloc to the caller. + var nRem int32 // Bytes remaining to copy + + // Extend the p->aAlloc[] allocation if required. + if (*PmaReader)(unsafe.Pointer(p)).FnAlloc < nByte { + var aNew uintptr + var nNew Sqlite3_int64 = func() int64 { + if int64(128) > int64(2)*Sqlite3_int64((*PmaReader)(unsafe.Pointer(p)).FnAlloc) { + return int64(128) + } + return int64(2) * Sqlite3_int64((*PmaReader)(unsafe.Pointer(p)).FnAlloc) + }() + for Sqlite3_int64(nByte) > nNew { + nNew = nNew * int64(2) + } + aNew = Xsqlite3Realloc(tls, (*PmaReader)(unsafe.Pointer(p)).FaAlloc, uint64(nNew)) + if !(aNew != 0) { + return SQLITE_NOMEM + } + (*PmaReader)(unsafe.Pointer(p)).FnAlloc = int32(nNew) + (*PmaReader)(unsafe.Pointer(p)).FaAlloc = aNew + } + + // Copy as much data as is available in the buffer into the start of + // p->aAlloc[]. + libc.Xmemcpy(tls, (*PmaReader)(unsafe.Pointer(p)).FaAlloc, (*PmaReader)(unsafe.Pointer(p)).FaBuffer+uintptr(iBuf), uint64(nAvail)) + *(*I64)(unsafe.Pointer(p)) += I64(nAvail) + nRem = nByte - nAvail + + // The following loop copies up to p->nBuffer bytes per iteration into + // the p->aAlloc[] buffer. + for nRem > 0 { + var rc int32 // vdbePmaReadBlob() return code + var nCopy int32 // Number of bytes to copy + // var aNext uintptr at bp, 8 + // Pointer to buffer to copy data from + + nCopy = nRem + if nRem > (*PmaReader)(unsafe.Pointer(p)).FnBuffer { + nCopy = (*PmaReader)(unsafe.Pointer(p)).FnBuffer + } + rc = vdbePmaReadBlob(tls, p, nCopy, bp) + if rc != SQLITE_OK { + return rc + } + + libc.Xmemcpy(tls, (*PmaReader)(unsafe.Pointer(p)).FaAlloc+uintptr(nByte-nRem), *(*uintptr)(unsafe.Pointer(bp /* aNext */)), uint64(nCopy)) + nRem = nRem - nCopy + } + + *(*uintptr)(unsafe.Pointer(ppOut)) = (*PmaReader)(unsafe.Pointer(p)).FaAlloc + } + + return SQLITE_OK +} + +// Read a varint from the stream of data accessed by p. Set *pnOut to +// the value read. +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var iBuf int32 + + if (*PmaReader)(unsafe.Pointer(p)).FaMap != 0 { + *(*I64)(unsafe.Pointer(p)) += I64(Xsqlite3GetVarint(tls, (*PmaReader)(unsafe.Pointer(p)).FaMap+uintptr((*PmaReader)(unsafe.Pointer(p)).FiReadOff), pnOut)) + } else { + iBuf = int32((*PmaReader)(unsafe.Pointer(p)).FiReadOff % I64((*PmaReader)(unsafe.Pointer(p)).FnBuffer)) + if iBuf != 0 && (*PmaReader)(unsafe.Pointer(p)).FnBuffer-iBuf >= 9 { + *(*I64)(unsafe.Pointer(p)) += I64(Xsqlite3GetVarint(tls, (*PmaReader)(unsafe.Pointer(p)).FaBuffer+uintptr(iBuf), pnOut)) + } else { + // var aVarint [16]U8 at bp+8, 16 + + // var a uintptr at bp, 8 + + var i int32 = 0 + var rc int32 + for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))&0x80 != 0 { + rc = vdbePmaReadBlob(tls, p, 1, bp) + if rc != 0 { + return rc + } + *(*U8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&i, 1)&0xf))) = *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* a */)))) + } + Xsqlite3GetVarint(tls, bp+8, pnOut) + } + } + + return SQLITE_OK +} + +// Attempt to memory map file pFile. If successful, set *pp to point to the +// new mapping and return SQLITE_OK. If the mapping is not attempted +// (because the file is too large or the VFS layer is configured not to use +// mmap), return SQLITE_OK and set *pp to NULL. +// +// Or, if an error occurs, return an SQLite error code. The final value of +// *pp is undefined in this case. +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ + var rc int32 = SQLITE_OK + if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { + var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd + if (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods)).FiVersion >= 3 { + rc = Xsqlite3OsFetch(tls, pFd, int64(0), int32((*SorterFile)(unsafe.Pointer(pFile)).FiEof), pp) + + } + } + return rc +} + +// Attach PmaReader pReadr to file pFile (if it is not already attached to +// that file) and seek it to offset iOff within the file. Return SQLITE_OK +// if successful, or an SQLite error code if an error occurs. +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ + var rc int32 = SQLITE_OK + + if Xsqlite3FaultSim(tls, 201) != 0 { + return SQLITE_IOERR | int32(1)<<8 + } + if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { + Xsqlite3OsUnfetch(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpFd, int64(0), (*PmaReader)(unsafe.Pointer(pReadr)).FaMap) + (*PmaReader)(unsafe.Pointer(pReadr)).FaMap = uintptr(0) + } + (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff = iOff + (*PmaReader)(unsafe.Pointer(pReadr)).FiEof = (*SorterFile)(unsafe.Pointer(pFile)).FiEof + (*PmaReader)(unsafe.Pointer(pReadr)).FpFd = (*SorterFile)(unsafe.Pointer(pFile)).FpFd + + rc = vdbeSorterMapFile(tls, pTask, pFile, pReadr+64) + if rc == SQLITE_OK && (*PmaReader)(unsafe.Pointer(pReadr)).FaMap == uintptr(0) { + var pgsz int32 = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz + var iBuf int32 = int32((*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff % I64(pgsz)) + if (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer == uintptr(0) { + (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer = Xsqlite3Malloc(tls, uint64(pgsz)) + if (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer == uintptr(0) { + rc = SQLITE_NOMEM + } + (*PmaReader)(unsafe.Pointer(pReadr)).FnBuffer = pgsz + } + if rc == SQLITE_OK && iBuf != 0 { + var nRead int32 = pgsz - iBuf + if (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff+I64(nRead) > (*PmaReader)(unsafe.Pointer(pReadr)).FiEof { + nRead = int32((*PmaReader)(unsafe.Pointer(pReadr)).FiEof - (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff) + } + rc = Xsqlite3OsRead(tls, + (*PmaReader)(unsafe.Pointer(pReadr)).FpFd, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer+uintptr(iBuf), nRead, (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff) + + } + } + + return rc +} + +// Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if +// no error occurs, or an SQLite error code if one does. +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK // Return Code + *(*U64)(unsafe.Pointer(bp /* nRec */)) = uint64(0) // Size of record in bytes + + if (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff >= (*PmaReader)(unsafe.Pointer(pReadr)).FiEof { + var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr + var bEof int32 = 1 + if pIncr != 0 { + rc = vdbeIncrSwap(tls, pIncr) + if rc == SQLITE_OK && (*IncrMerger)(unsafe.Pointer(pIncr)).FbEof == 0 { + rc = vdbePmaReaderSeek(tls, + (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, pReadr, pIncr+40, (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff) + bEof = 0 + } + } + + if bEof != 0 { + // This is an EOF condition + vdbePmaReaderClear(tls, pReadr) + + return rc + } + } + + if rc == SQLITE_OK { + rc = vdbePmaReadVarint(tls, pReadr, bp) + } + if rc == SQLITE_OK { + (*PmaReader)(unsafe.Pointer(pReadr)).FnKey = int32(*(*U64)(unsafe.Pointer(bp /* nRec */))) + rc = vdbePmaReadBlob(tls, pReadr, int32(*(*U64)(unsafe.Pointer(bp /* nRec */))), pReadr+40) + + } + + return rc +} + +// Initialize PmaReader pReadr to scan through the PMA stored in file pFile +// starting at offset iStart and ending at offset iEof-1. This function +// leaves the PmaReader pointing to the first key in the PMA (or EOF if the +// PMA is empty). +// +// If the pnByte parameter is NULL, then it is assumed that the file +// contains a single PMA, and that that PMA omits the initial length varint. +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + + rc = vdbePmaReaderSeek(tls, pTask, pReadr, pFile, iStart) + if rc == SQLITE_OK { + *(*U64)(unsafe.Pointer(bp /* nByte */)) = uint64(0) // Size of PMA in bytes + rc = vdbePmaReadVarint(tls, pReadr, bp) + (*PmaReader)(unsafe.Pointer(pReadr)).FiEof = I64(U64((*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff) + *(*U64)(unsafe.Pointer(bp))) + *(*I64)(unsafe.Pointer(pnByte)) += I64(*(*U64)(unsafe.Pointer(bp))) + } + + if rc == SQLITE_OK { + rc = vdbePmaReaderNext(tls, pReadr) + } + return rc +} + +// A version of vdbeSorterCompare() that assumes that it has already been +// determined that the first field of key1 is equal to the first field of +// key2. +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ + var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked + if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { + Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) + *(*int32)(unsafe.Pointer(pbKey2Cached)) = 1 + } + return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, r2, 1) +} + +// Compare key1 (buffer pKey1, size nKey1 bytes) with key2 (buffer pKey2, +// size nKey2 bytes). Use (pTask->pKeyInfo) for the collation sequences +// used by the comparison. Return the result of the comparison. +// +// If IN/OUT parameter *pbKey2Cached is true when this function is called, +// it is assumed that (pTask->pUnpacked) contains the unpacked version +// of key2. If it is false, (pTask->pUnpacked) is populated with the unpacked +// version of key2 and *pbKey2Cached set to true before returning. +// +// If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set +// to SQLITE_NOMEM. +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ + var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked + if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { + Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) + *(*int32)(unsafe.Pointer(pbKey2Cached)) = 1 + } + return Xsqlite3VdbeRecordCompare(tls, nKey1, pKey1, r2) +} + +// A specially optimized version of vdbeSorterCompare() that assumes that +// the first field of each key is a TEXT value and that the collation +// sequence to compare them with is BINARY. +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p1 uintptr = pKey1 + var p2 uintptr = pKey2 + var v1 uintptr = p1 + uintptr(*(*U8)(unsafe.Pointer(p1))) // Pointer to value 1 + var v2 uintptr = p2 + uintptr(*(*U8)(unsafe.Pointer(p2))) // Pointer to value 2 + + // var n1 int32 at bp, 4 + + // var n2 int32 at bp+4, 4 + + var res int32 + + *(*int32)(unsafe.Pointer(bp /* n1 */)) = int32(U32(*(*U8)(unsafe.Pointer(p1 + 1)))) + if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { + Xsqlite3GetVarint32(tls, p1+1, bp) + } + *(*int32)(unsafe.Pointer(bp + 4 /* n2 */)) = int32(U32(*(*U8)(unsafe.Pointer(p2 + 1)))) + if *(*int32)(unsafe.Pointer(bp + 4)) >= 0x80 { + Xsqlite3GetVarint32(tls, p2+1, bp+4) + } + res = libc.Xmemcmp(tls, v1, v2, uint64((func() int32 { + if *(*int32)(unsafe.Pointer(bp)) < *(*int32)(unsafe.Pointer(bp + 4)) { + return *(*int32)(unsafe.Pointer(bp)) + } + return *(*int32)(unsafe.Pointer(bp + 4)) + }()-13)/2)) + if res == 0 { + res = *(*int32)(unsafe.Pointer(bp)) - *(*int32)(unsafe.Pointer(bp + 4)) + } + + if res == 0 { + if int32((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FnKeyField) > 1 { + res = vdbeSorterCompareTail(tls, + pTask, pbKey2Cached, pKey1, nKey1, pKey2, nKey2) + } + } else { + + if *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FaSortFlags)) != 0 { + res = res * -1 + } + } + + return res +} + +// A specially optimized version of vdbeSorterCompare() that assumes that +// the first field of each key is an INTEGER value. +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ + var p1 uintptr = pKey1 + var p2 uintptr = pKey2 + var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type + var s2 int32 = int32(*(*U8)(unsafe.Pointer(p2 + 1))) // Right hand serial type + var v1 uintptr = p1 + uintptr(*(*U8)(unsafe.Pointer(p1))) // Pointer to value 1 + var v2 uintptr = p2 + uintptr(*(*U8)(unsafe.Pointer(p2))) // Pointer to value 2 + var res int32 // Return value + + if s1 == s2 { + var n U8 = aLen[s1] + var i int32 + res = 0 + for i = 0; i < int32(n); i++ { + if libc.AssignInt32(&res, int32(*(*U8)(unsafe.Pointer(v1 + uintptr(i))))-int32(*(*U8)(unsafe.Pointer(v2 + uintptr(i))))) != 0 { + if (int32(*(*U8)(unsafe.Pointer(v1)))^int32(*(*U8)(unsafe.Pointer(v2))))&0x80 != 0 { + if int32(*(*U8)(unsafe.Pointer(v1)))&0x80 != 0 { + res = -1 + } else { + res = +1 + } + } + break + } + } + } else if s1 > 7 && s2 > 7 { + res = s1 - s2 + } else { + if s2 > 7 { + res = +1 + } else if s1 > 7 { + res = -1 + } else { + res = s1 - s2 + } + + if res > 0 { + if int32(*(*U8)(unsafe.Pointer(v1)))&0x80 != 0 { + res = -1 + } + } else { + if int32(*(*U8)(unsafe.Pointer(v2)))&0x80 != 0 { + res = +1 + } + } + } + + if res == 0 { + if int32((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FnKeyField) > 1 { + res = vdbeSorterCompareTail(tls, + pTask, pbKey2Cached, pKey1, nKey1, pKey2, nKey2) + } + } else if *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FaSortFlags)) != 0 { + + res = res * -1 + } + + return res +} + +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ + +// Initialize the temporary index cursor just opened as a sorter cursor. +// +// Usually, the sorter module uses the value of (pCsr->pKeyInfo->nKeyField) +// to determine the number of fields that should be compared from the +// records being sorted. However, if the value passed as argument nField +// is non-zero and the sorter is able to guarantee a stable sort, nField +// is used instead. This is used when sorting records for a CREATE INDEX +// statement. In this case, keys are always delivered to the sorter in +// order of the primary key, which happens to be make up the final part +// of the records being sorted. So if the sort is stable, there is never +// any reason to compare PK fields and they can be ignored for a small +// performance boost. +// +// The sorter can guarantee a stable sort when running in single-threaded +// mode, but not in multi-threaded mode. +// +// SQLITE_OK is returned if successful, or an SQLite error code otherwise. +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ + var pgsz int32 // Page size of main database + var i int32 // Used to iterate through aTask[] + var pSorter uintptr // The new sorter + var pKeyInfo uintptr // Copy of pCsr->pKeyInfo with db==0 + var szKeyInfo int32 // Size of pCsr->pKeyInfo in bytes + var sz int32 // Size of pSorter in bytes + var rc int32 = SQLITE_OK + var nWorker int32 + + // Initialize the upper limit on the number of worker threads + if Xsqlite3TempInMemory(tls, db) != 0 || int32(Xsqlite3Config.FbCoreMutex) == 0 { + nWorker = 0 + } else { + nWorker = *(*int32)(unsafe.Pointer(db + 136 + 11*4)) + } + + // Do not allow the total number of threads (main thread + all workers) + // to exceed the maximum merge count + + szKeyInfo = int32(uint64(unsafe.Sizeof(KeyInfo{})) + uint64(int32((*KeyInfo)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo)).FnKeyField)-1)*uint64(unsafe.Sizeof(uintptr(0)))) + sz = int32(uint64(unsafe.Sizeof(VdbeSorter{})) + uint64(nWorker)*uint64(unsafe.Sizeof(SortSubtask{}))) + + pSorter = Xsqlite3DbMallocZero(tls, db, uint64(sz+szKeyInfo)) + *(*uintptr)(unsafe.Pointer(pCsr + 48)) = pSorter + if pSorter == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt + (*VdbeSorter)(unsafe.Pointer(pSorter)).FpKeyInfo = libc.AssignUintptr(&pKeyInfo, pSorter+uintptr(sz)) + libc.Xmemcpy(tls, pKeyInfo, (*VdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo, uint64(szKeyInfo)) + (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb = uintptr(0) + if nField != 0 && nWorker == 0 { + (*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField = U16(nField) + } + Xsqlite3BtreeEnter(tls, pBt) + (*VdbeSorter)(unsafe.Pointer(pSorter)).Fpgsz = libc.AssignInt32(&pgsz, Xsqlite3BtreeGetPageSize(tls, pBt)) + Xsqlite3BtreeLeave(tls, pBt) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask = U8(nWorker + 1) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FiPrev = U8(nWorker - 1) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads = U8(libc.Bool32(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask) > 1)) + (*VdbeSorter)(unsafe.Pointer(pSorter)).Fdb = db + for i = 0; i < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); i++ { + var pTask uintptr = pSorter + 96 + uintptr(i)*104 + (*SortSubtask)(unsafe.Pointer(pTask)).FpSorter = pSorter + } + + if !(Xsqlite3TempInMemory(tls, db) != 0) { + var mxCache I64 // Cache size in bytes + var szPma U32 = Xsqlite3Config.FszPma + (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize = int32(szPma * U32(pgsz)) + + mxCache = I64((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fcache_size) + if mxCache < int64(0) { + // A negative cache-size value C indicates that the cache is abs(C) + // KiB in size. + mxCache = mxCache * int64(-1024) + } else { + mxCache = mxCache * I64(pgsz) + } + mxCache = func() int64 { + if mxCache < int64(int32(1)<<29) { + return mxCache + } + return int64(int32(1) << 29) + }() + (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize = func() int32 { + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize > int32(mxCache) { + return (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize + } + return int32(mxCache) + }() + + // Avoid large memory allocations if the application has requested + // SQLITE_CONFIG_SMALL_MALLOC. + if int32(Xsqlite3Config.FbSmallMalloc) == 0 { + + (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory = pgsz + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = Xsqlite3Malloc(tls, uint64(pgsz)) + if !(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory) != 0) { + rc = SQLITE_NOMEM + } + } + } + + if int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) < 13 && + (*(*uintptr)(unsafe.Pointer(pKeyInfo + 32)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(pKeyInfo + 32)) == (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl) && + int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags)))&KEYINFO_ORDER_BIGNULL == 0 { + (*VdbeSorter)(unsafe.Pointer(pSorter)).FtypeMask = U8(SORTER_TYPE_INTEGER | SORTER_TYPE_TEXT) + } + } + + return rc +} + +// Free the list of sorted records starting at pRecord. +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ + var p uintptr + var pNext uintptr + for p = pRecord; p != 0; p = pNext { + pNext = *(*uintptr)(unsafe.Pointer(p + 8)) + Xsqlite3DbFree(tls, db, p) + } +} + +// Free all resources owned by the object indicated by argument pTask. All +// fields of *pTask are zeroed before returning. +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ + Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) + // pTask->list.aMemory can only be non-zero if it was handed memory + // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 + if (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FaMemory != 0 { + Xsqlite3_free(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FaMemory) + } else { + + vdbeSorterRecordFree(tls, uintptr(0), (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FpList) + } + if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd != 0 { + Xsqlite3OsCloseFree(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd) + } + if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd != 0 { + Xsqlite3OsCloseFree(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd) + } + libc.Xmemset(tls, pTask, 0, uint64(unsafe.Sizeof(SortSubtask{}))) +} + +// Join thread pTask->thread. +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + if (*SortSubtask)(unsafe.Pointer(pTask)).FpThread != 0 { + *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(int64(SQLITE_ERROR)) + + Xsqlite3ThreadJoin(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FpThread, bp) + + rc = int32(*(*uintptr)(unsafe.Pointer(bp))) + + (*SortSubtask)(unsafe.Pointer(pTask)).FbDone = 0 + (*SortSubtask)(unsafe.Pointer(pTask)).FpThread = uintptr(0) + } + return rc +} + +// Launch a background thread to run xTask(pIn). +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ + + return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) +} + +// Join all outstanding threads launched by SorterWrite() to create +// level-0 PMAs. +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ + var rc int32 = rcin + var i int32 + + // This function is always called by the main user thread. + // + // If this function is being called after SorterRewind() has been called, + // it is possible that thread pSorter->aTask[pSorter->nTask-1].pThread + // is currently attempt to join one of the other threads. To avoid a race + // condition where this thread also attempts to join the same object, join + // thread pSorter->aTask[pSorter->nTask-1].pThread first. + for i = int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask) - 1; i >= 0; i-- { + var pTask uintptr = pSorter + 96 + uintptr(i)*104 + var rc2 int32 = vdbeSorterJoinThread(tls, pTask) + if rc == SQLITE_OK { + rc = rc2 + } + } + return rc +} + +// Allocate a new MergeEngine object capable of handling up to +// nReader PmaReader inputs. +// +// nReader is automatically rounded up to the next power of two. +// nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ + var N int32 = 2 // Smallest power of two >= nReader + var nByte int32 // Total bytes of space to allocate + var pNew uintptr // Pointer to allocated object to return + + for N < nReader { + N = N + N + } + nByte = int32(uint64(unsafe.Sizeof(MergeEngine{})) + uint64(N)*(uint64(unsafe.Sizeof(int32(0)))+uint64(unsafe.Sizeof(PmaReader{})))) + + if Xsqlite3FaultSim(tls, 100) != 0 { + pNew = uintptr(0) + } else { + pNew = Xsqlite3MallocZero(tls, uint64(nByte)) + } + if pNew != 0 { + (*MergeEngine)(unsafe.Pointer(pNew)).FnTree = N + (*MergeEngine)(unsafe.Pointer(pNew)).FpTask = uintptr(0) + (*MergeEngine)(unsafe.Pointer(pNew)).FaReadr = pNew + 1*32 + (*MergeEngine)(unsafe.Pointer(pNew)).FaTree = (*MergeEngine)(unsafe.Pointer(pNew)).FaReadr + uintptr(N)*80 + } + return pNew +} + +// Free the MergeEngine object passed as the only argument. +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ + var i int32 + if pMerger != 0 { + for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { + vdbePmaReaderClear(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(i)*80) + } + } + Xsqlite3_free(tls, pMerger) +} + +// Free all resources associated with the IncrMerger object indicated by +// the first argument. +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ + if pIncr != 0 { + if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { + vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) + if (*SorterFile)(unsafe.Pointer(pIncr+40)).FpFd != 0 { + Xsqlite3OsCloseFree(tls, (*SorterFile)(unsafe.Pointer(pIncr+40)).FpFd) + } + if (*SorterFile)(unsafe.Pointer(pIncr+40+1*16)).FpFd != 0 { + Xsqlite3OsCloseFree(tls, (*SorterFile)(unsafe.Pointer(pIncr+40+1*16)).FpFd) + } + } + vdbeMergeEngineFree(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger) + Xsqlite3_free(tls, pIncr) + } +} + +// Reset a sorting cursor back to its original empty state. +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ + var i int32 + vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) + + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader != 0 { + vdbePmaReaderClear(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader) + Xsqlite3DbFree(tls, db, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader = uintptr(0) + } + vdbeMergeEngineFree(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger = uintptr(0) + for i = 0; i < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); i++ { + var pTask uintptr = pSorter + 96 + uintptr(i)*104 + vdbeSortSubtaskCleanup(tls, db, pTask) + (*SortSubtask)(unsafe.Pointer(pTask)).FpSorter = pSorter + } + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory == uintptr(0) { + vdbeSorterRecordFree(tls, uintptr(0), (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList) + } + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = uintptr(0) + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA = 0 + (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA = U8(0) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory = 0 + (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxKeysize = 0 + Xsqlite3DbFree(tls, db, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpUnpacked) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FpUnpacked = uintptr(0) +} + +// Free any cursor components allocated by sqlite3VdbeSorterXXX routines. +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ + var pSorter uintptr + + pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) + if pSorter != 0 { + Xsqlite3VdbeSorterReset(tls, db, pSorter) + Xsqlite3_free(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory) + Xsqlite3DbFree(tls, db, pSorter) + *(*uintptr)(unsafe.Pointer(pCsr + 48)) = uintptr(0) + } +} + +// The first argument is a file-handle open on a temporary file. The file +// is guaranteed to be nByte bytes or smaller in size. This function +// attempts to extend the file to nByte bytes in size and to ensure that +// the VFS has memory mapped it. +// +// Whether or not the file does end up memory mapped of course depends on +// the specific VFS implementation. +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + *(*I64)(unsafe.Pointer(bp + 8)) = nByte + + if *(*I64)(unsafe.Pointer(bp + 8)) <= I64((*Sqlite3)(unsafe.Pointer(db)).FnMaxSorterMmap) && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods)).FiVersion >= 3 { + *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp /* chunksize */)) = 4 * 1024 + Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_CHUNK_SIZE, bp) + Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_SIZE_HINT, bp+8) + Xsqlite3OsFetch(tls, pFd, int64(0), int32(*(*I64)(unsafe.Pointer(bp + 8 /* nByte */))), bp+16) + if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { + Xsqlite3OsUnfetch(tls, pFd, int64(0), *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))) + } + } +} + +// Allocate space for a file-handle and open a temporary file. If successful, +// set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. +// Otherwise, set *ppFd to 0 and return an SQLite error code. +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var rc int32 at bp, 4 + + if Xsqlite3FaultSim(tls, 202) != 0 { + return SQLITE_IOERR | int32(13)<<8 + } + *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3OsOpenMalloc(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), ppFd, + SQLITE_OPEN_TEMP_JOURNAL|SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_DELETEONCLOSE, bp) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + *(*I64)(unsafe.Pointer(bp + 8 /* max */)) = int64(SQLITE_MAX_MMAP_SIZE) + Xsqlite3OsFileControlHint(tls, *(*uintptr)(unsafe.Pointer(ppFd)), SQLITE_FCNTL_MMAP_SIZE, bp+8) + if nExtend > int64(0) { + vdbeSorterExtendFile(tls, db, *(*uintptr)(unsafe.Pointer(ppFd)), nExtend) + } + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// If it has not already been allocated, allocate the UnpackedRecord +// structure at pTask->pUnpacked. Return SQLITE_OK if successful (or +// if no allocation was required), or SQLITE_NOMEM otherwise. +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ + if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { + (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) + if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { + return SQLITE_NOMEM + } + (*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FnField = (*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FnKeyField + (*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FerrCode = U8(0) + } + return SQLITE_OK +} + +// Merge the two sorted lists p1 and p2 into a single list. +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + *(*uintptr)(unsafe.Pointer(bp /* pFinal */)) = uintptr(0) + var pp uintptr = bp /* &pFinal */ + *(*int32)(unsafe.Pointer(bp + 8 /* bCached */)) = 0 + + for { + var res int32 + res = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, + pTask, bp+8, p1+uintptr(1)*16, (*SorterRecord)(unsafe.Pointer(p1)).FnVal, p2+uintptr(1)*16, (*SorterRecord)(unsafe.Pointer(p2)).FnVal) + + if res <= 0 { + *(*uintptr)(unsafe.Pointer(pp)) = p1 + pp = p1 + 8 + p1 = *(*uintptr)(unsafe.Pointer(p1 + 8)) + if p1 == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pp)) = p2 + break + } + } else { + *(*uintptr)(unsafe.Pointer(pp)) = p2 + pp = p2 + 8 + p2 = *(*uintptr)(unsafe.Pointer(p2 + 8)) + *(*int32)(unsafe.Pointer(bp + 8 /* bCached */)) = 0 + if p2 == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pp)) = p1 + break + } + } + } + return *(*uintptr)(unsafe.Pointer(bp /* pFinal */)) +} + +// Return the SorterCompare function to compare values collected by the +// sorter object passed as the only argument. +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ + if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 + }{vdbeSorterCompareInt})) + } else if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_TEXT { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 + }{vdbeSorterCompareText})) + } + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 + }{vdbeSorterCompare})) +} + +// Sort the linked list of records headed at pTask->pList. Return +// SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if +// an error occurs. +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + var i int32 + var p uintptr + var rc int32 + // var aSlot [64]uintptr at bp, 512 + + rc = vdbeSortAllocUnpacked(tls, pTask) + if rc != SQLITE_OK { + return rc + } + + p = (*SorterList)(unsafe.Pointer(pList)).FpList + (*SortSubtask)(unsafe.Pointer(pTask)).FxCompare = vdbeSorterGetCompare(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FpSorter) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([64]uintptr{}))) + + for p != 0 { + var pNext uintptr + if (*SorterList)(unsafe.Pointer(pList)).FaMemory != 0 { + if p == (*SorterList)(unsafe.Pointer(pList)).FaMemory { + pNext = uintptr(0) + } else { + + pNext = (*SorterList)(unsafe.Pointer(pList)).FaMemory + uintptr(*(*int32)(unsafe.Pointer(p + 8))) + } + } else { + pNext = *(*uintptr)(unsafe.Pointer(p + 8)) + } + + *(*uintptr)(unsafe.Pointer(p + 8)) = uintptr(0) + for i = 0; *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*8)) != 0; i++ { + p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = p + p = pNext + } + + p = uintptr(0) + for i = 0; i < int32(uint64(unsafe.Sizeof([64]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))); i++ { + if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { + continue + } + if p != 0 { + p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) + } else { + p = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) + } + } + (*SorterList)(unsafe.Pointer(pList)).FpList = p + + return int32((*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FerrCode) +} + +// Initialize a PMA-writer object. +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) + (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) + if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { + (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = SQLITE_NOMEM + } else { + (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd = libc.AssignPtrInt32(p+20, int32(iStart%I64(nBuf))) + (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff = iStart - I64((*PmaWriter)(unsafe.Pointer(p)).FiBufStart) + (*PmaWriter)(unsafe.Pointer(p)).FnBuffer = nBuf + (*PmaWriter)(unsafe.Pointer(p)).FpFd = pFd + } +} + +// Write nData bytes of data to the PMA. Return SQLITE_OK +// if successful, or an SQLite error code if an error occurs. +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ + var nRem int32 = nData + for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { + var nCopy int32 = nRem + if nCopy > (*PmaWriter)(unsafe.Pointer(p)).FnBuffer-(*PmaWriter)(unsafe.Pointer(p)).FiBufEnd { + nCopy = (*PmaWriter)(unsafe.Pointer(p)).FnBuffer - (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd + } + + libc.Xmemcpy(tls, (*PmaWriter)(unsafe.Pointer(p)).FaBuffer+uintptr((*PmaWriter)(unsafe.Pointer(p)).FiBufEnd), pData+uintptr(nData-nRem), uint64(nCopy)) + *(*int32)(unsafe.Pointer(p + 24)) += nCopy + if (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd == (*PmaWriter)(unsafe.Pointer(p)).FnBuffer { + (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, + (*PmaWriter)(unsafe.Pointer(p)).FaBuffer+uintptr((*PmaWriter)(unsafe.Pointer(p)).FiBufStart), (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd-(*PmaWriter)(unsafe.Pointer(p)).FiBufStart, + (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff+I64((*PmaWriter)(unsafe.Pointer(p)).FiBufStart)) + (*PmaWriter)(unsafe.Pointer(p)).FiBufStart = libc.AssignPtrInt32(p+24, 0) + *(*I64)(unsafe.Pointer(p + 32)) += I64((*PmaWriter)(unsafe.Pointer(p)).FnBuffer) + } + + nRem = nRem - nCopy + } +} + +// Flush any buffered data to disk and clean up the PMA-writer object. +// The results of using the PMA-writer after this call are undefined. +// Return SQLITE_OK if flushing the buffered data succeeds or is not +// required. Otherwise, return an SQLite error code. +// +// Before returning, set *piEof to the offset immediately following the +// last byte written to the file. +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ + var rc int32 + if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { + (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, + (*PmaWriter)(unsafe.Pointer(p)).FaBuffer+uintptr((*PmaWriter)(unsafe.Pointer(p)).FiBufStart), (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd-(*PmaWriter)(unsafe.Pointer(p)).FiBufStart, + (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff+I64((*PmaWriter)(unsafe.Pointer(p)).FiBufStart)) + } + *(*I64)(unsafe.Pointer(piEof)) = (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff + I64((*PmaWriter)(unsafe.Pointer(p)).FiBufEnd) + Xsqlite3_free(tls, (*PmaWriter)(unsafe.Pointer(p)).FaBuffer) + rc = (*PmaWriter)(unsafe.Pointer(p)).FeFWErr + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) + return rc +} + +// Write value iVal encoded as a varint to the PMA. Return +// SQLITE_OK if successful, or an SQLite error code if an error occurs. +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ + bp := tls.Alloc(10) + defer tls.Free(10) + + var nByte int32 + // var aByte [10]U8 at bp, 10 + + nByte = Xsqlite3PutVarint(tls, bp, iVal) + vdbePmaWriteBlob(tls, p, bp, nByte) +} + +// Write the current contents of in-memory linked-list pList to a level-0 +// PMA in the temp file belonging to sub-task pTask. Return SQLITE_OK if +// successful, or an SQLite error code otherwise. +// +// The format of a PMA is: +// +// * A varint. This varint contains the total number of bytes of content +// in the PMA (not including the varint itself). +// +// * One or more records packed end-to-end in order of ascending keys. +// Each record consists of a varint followed by a blob of data (the +// key). The varint is the number of bytes in the blob of data. +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var db uintptr = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb + var rc int32 = SQLITE_OK // Return code + // var writer PmaWriter at bp, 48 + // Object used to write to the file + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(PmaWriter{}))) + + // If the first temporary PMA file has not been opened, open it now. + if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd == uintptr(0) { + rc = vdbeSorterOpenTempFile(tls, db, int64(0), pTask+72) + + } + + // Try to get the file to memory map + if rc == SQLITE_OK { + vdbeSorterExtendFile(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FiEof+I64((*SorterList)(unsafe.Pointer(pList)).FszPMA)+int64(9)) + } + + // Sort the list + if rc == SQLITE_OK { + rc = vdbeSorterSort(tls, pTask, pList) + } + + if rc == SQLITE_OK { + var p uintptr + var pNext uintptr = uintptr(0) + + vdbePmaWriterInit(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd, bp, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, + (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FiEof) + (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA++ + vdbePmaWriteVarint(tls, bp, uint64((*SorterList)(unsafe.Pointer(pList)).FszPMA)) + for p = (*SorterList)(unsafe.Pointer(pList)).FpList; p != 0; p = pNext { + pNext = *(*uintptr)(unsafe.Pointer(p + 8)) + vdbePmaWriteVarint(tls, bp, uint64((*SorterRecord)(unsafe.Pointer(p)).FnVal)) + vdbePmaWriteBlob(tls, bp, p+uintptr(1)*16, (*SorterRecord)(unsafe.Pointer(p)).FnVal) + if (*SorterList)(unsafe.Pointer(pList)).FaMemory == uintptr(0) { + Xsqlite3_free(tls, p) + } + } + (*SorterList)(unsafe.Pointer(pList)).FpList = p + rc = vdbePmaWriterFinish(tls, bp, pTask+72+8) + } + + return rc +} + +// Advance the MergeEngine to its next entry. +// Set *pbEof to true there is no next entry because +// the MergeEngine has reached the end of all its inputs. +// +// Return SQLITE_OK if successful or an error code if an error occurs. +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 + var iPrev int32 = *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + 1*4)) // Index of PmaReader to advance + var pTask uintptr = (*MergeEngine)(unsafe.Pointer(pMerger)).FpTask + + // Advance the current PmaReader + rc = vdbePmaReaderNext(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(iPrev)*80) + + // Update contents of aTree[] + if rc == SQLITE_OK { + var i int32 // Index of aTree[] to recalculate + var pReadr1 uintptr // First PmaReader to compare + var pReadr2 uintptr // Second PmaReader to compare + *(*int32)(unsafe.Pointer(bp /* bCached */)) = 0 + + // Find the first two PmaReaders to compare. The one that was just + // advanced (iPrev) and the one next to it in the array. + pReadr1 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(iPrev&0xFFFE)*80 + pReadr2 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(iPrev|0x0001)*80 + + for i = ((*MergeEngine)(unsafe.Pointer(pMerger)).FnTree + iPrev) / 2; i > 0; i = i / 2 { + // Compare pReadr1 and pReadr2. Store the result in variable iRes. + var iRes int32 + if (*PmaReader)(unsafe.Pointer(pReadr1)).FpFd == uintptr(0) { + iRes = +1 + } else if (*PmaReader)(unsafe.Pointer(pReadr2)).FpFd == uintptr(0) { + iRes = -1 + } else { + iRes = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, pTask, bp, /* &bCached */ + (*PmaReader)(unsafe.Pointer(pReadr1)).FaKey, (*PmaReader)(unsafe.Pointer(pReadr1)).FnKey, (*PmaReader)(unsafe.Pointer(pReadr2)).FaKey, (*PmaReader)(unsafe.Pointer(pReadr2)).FnKey) + } + + // If pReadr1 contained the smaller value, set aTree[i] to its index. + // Then set pReadr2 to the next PmaReader to compare to pReadr1. In this + // case there is no cache of pReadr2 in pTask->pUnpacked, so set + // pKey2 to point to the record belonging to pReadr2. + // + // Alternatively, if pReadr2 contains the smaller of the two values, + // set aTree[i] to its index and update pReadr1. If vdbeSorterCompare() + // was actually called above, then pTask->pUnpacked now contains + // a value equivalent to pReadr2. So set pKey2 to NULL to prevent + // vdbeSorterCompare() from decoding pReadr2 again. + // + // If the two values were equal, then the value from the oldest + // PMA should be considered smaller. The VdbeSorter.aReadr[] array + // is sorted from oldest to newest, so pReadr1 contains older values + // than pReadr2 iff (pReadr1nTask-1) tasks. Except, if + // the background thread from a sub-tasks previous turn is still running, + // skip it. If the first (pSorter->nTask-1) sub-tasks are all still busy, + // fall back to using the final sub-task. The first (pSorter->nTask-1) + // sub-tasks are prefered as they use background threads - the final + // sub-task uses the main thread. + for i = 0; i < nWorker; i++ { + var iTest int32 = (int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FiPrev) + i + 1) % nWorker + pTask = pSorter + 96 + uintptr(iTest)*104 + if (*SortSubtask)(unsafe.Pointer(pTask)).FbDone != 0 { + rc = vdbeSorterJoinThread(tls, pTask) + } + if rc != SQLITE_OK || (*SortSubtask)(unsafe.Pointer(pTask)).FpThread == uintptr(0) { + break + } + } + + if rc == SQLITE_OK { + if i == nWorker { + // Use the foreground thread for this operation + rc = vdbeSorterListToPMA(tls, pSorter+96+uintptr(nWorker)*104, pSorter+56) + } else { + // Launch a background thread for this operation + var aMem uintptr + var pCtx uintptr + + aMem = (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FaMemory + pCtx = pTask + (*VdbeSorter)(unsafe.Pointer(pSorter)).FiPrev = U8(int64((pTask - (pSorter + 96)) / 104)) + (*SortSubtask)(unsafe.Pointer(pTask)).Flist = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = uintptr(0) + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA = 0 + if aMem != 0 { + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = aMem + (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory = Xsqlite3MallocSize(tls, aMem) + } else if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory != 0 { + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = Xsqlite3Malloc(tls, uint64((*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory)) + if !(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory) != 0) { + return SQLITE_NOMEM + } + } + + rc = vdbeSorterCreateThread(tls, pTask, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{vdbeSorterFlushThread})), pCtx) + } + } + + return rc +} + +// Add a record to the sorter. +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pSorter uintptr + var rc int32 = SQLITE_OK // Return Code + var pNew uintptr // New list element + var bFlush int32 // True to flush contents of memory to PMA + var nReq int32 // Bytes of memory required + var nPMA int32 // Bytes of PMA space required + // var t int32 at bp, 4 + // serial type of first record field + + pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) + *(*int32)(unsafe.Pointer(bp /* t */)) = int32(U32(*(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVal)).Fz + 1)))) + if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { + Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(pVal)).Fz+1, bp) + } + if *(*int32)(unsafe.Pointer(bp)) > 0 && *(*int32)(unsafe.Pointer(bp)) < 10 && *(*int32)(unsafe.Pointer(bp)) != 7 { + *(*U8)(unsafe.Pointer(pSorter + 92)) &= U8(SORTER_TYPE_INTEGER) + } else if *(*int32)(unsafe.Pointer(bp)) > 10 && *(*int32)(unsafe.Pointer(bp))&0x01 != 0 { + *(*U8)(unsafe.Pointer(pSorter + 92)) &= U8(SORTER_TYPE_TEXT) + } else { + (*VdbeSorter)(unsafe.Pointer(pSorter)).FtypeMask = U8(0) + } + + // Figure out whether or not the current contents of memory should be + // flushed to a PMA before continuing. If so, do so. + // + // If using the single large allocation mode (pSorter->aMemory!=0), then + // flush the contents of memory to a new PMA if (a) at least one value is + // already in memory and (b) the new value will not fit in memory. + // + // Or, if using separate allocations for each record, flush the contents + // of memory to a PMA if either of the following are true: + // + // * The total memory allocated for the in-memory list is greater + // than (page-size * cache-size), or + // + // * The total memory allocated for the in-memory list is greater + // than (page-size * 10) and sqlite3HeapNearlyFull() returns true. + nReq = int32(uint64((*Mem)(unsafe.Pointer(pVal)).Fn) + uint64(unsafe.Sizeof(SorterRecord{}))) + nPMA = (*Mem)(unsafe.Pointer(pVal)).Fn + Xsqlite3VarintLen(tls, uint64((*Mem)(unsafe.Pointer(pVal)).Fn)) + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize != 0 { + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory != 0 { + bFlush = libc.Bool32((*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory != 0 && (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory+nReq > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize) + } else { + bFlush = libc.Bool32((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize || + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize && Xsqlite3HeapNearlyFull(tls) != 0) + } + if bFlush != 0 { + rc = vdbeSorterFlushPMA(tls, pSorter) + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA = 0 + (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory = 0 + + } + } + + *(*int32)(unsafe.Pointer(pSorter + 56 + 16)) += nPMA + if nPMA > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxKeysize { + (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxKeysize = nPMA + } + + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory != 0 { + var nMin int32 = (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory + nReq + + if nMin > (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory { + var aNew uintptr + var nNew Sqlite3_int64 = int64(2) * Sqlite3_int64((*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory) + var iListOff int32 = -1 + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { + iListOff = int32((int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList) - int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory)) / 1) + } + for nNew < Sqlite3_int64(nMin) { + nNew = nNew * int64(2) + } + if nNew > Sqlite3_int64((*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize) { + nNew = Sqlite3_int64((*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize) + } + if nNew < Sqlite3_int64(nMin) { + nNew = Sqlite3_int64(nMin) + } + aNew = Xsqlite3Realloc(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory, uint64(nNew)) + if !(aNew != 0) { + return SQLITE_NOMEM + } + if iListOff >= 0 { + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = aNew + uintptr(iListOff) + } + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = aNew + (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory = int32(nNew) + } + + pNew = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory + uintptr((*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory) + *(*int32)(unsafe.Pointer(pSorter + 80)) += (nReq + 7) & libc.CplInt32(7) + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { + *(*int32)(unsafe.Pointer(pNew + 8)) = int32((int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList) - int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory)) / 1) + } + } else { + pNew = Xsqlite3Malloc(tls, uint64(nReq)) + if pNew == uintptr(0) { + return SQLITE_NOMEM + } + *(*uintptr)(unsafe.Pointer(pNew + 8)) = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList + } + + libc.Xmemcpy(tls, pNew+uintptr(1)*16, (*Mem)(unsafe.Pointer(pVal)).Fz, uint64((*Mem)(unsafe.Pointer(pVal)).Fn)) + (*SorterRecord)(unsafe.Pointer(pNew)).FnVal = (*Mem)(unsafe.Pointer(pVal)).Fn + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = pNew + + return rc +} + +// Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format +// of the data stored in aFile[1] is the same as that used by regular PMAs, +// except that the number-of-bytes varint is omitted from the start. +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + var rc int32 = SQLITE_OK + var rc2 int32 + var iStart I64 = (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff + var pOut uintptr = pIncr + 40 + 1*16 + var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + var pMerger uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger + // var writer PmaWriter at bp, 48 + + vdbePmaWriterInit(tls, (*SorterFile)(unsafe.Pointer(pOut)).FpFd, bp, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, iStart) + for rc == SQLITE_OK { + // var dummy int32 at bp+48, 4 + + var pReader uintptr = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(*(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + 1*4)))*80 + var nKey int32 = (*PmaReader)(unsafe.Pointer(pReader)).FnKey + var iEof I64 = (*PmaWriter)(unsafe.Pointer(bp)).FiWriteOff + I64((*PmaWriter)(unsafe.Pointer(bp)).FiBufEnd) + + // Check if the output file is full or if the input has been exhausted. + // In either case exit the loop. + if (*PmaReader)(unsafe.Pointer(pReader)).FpFd == uintptr(0) { + break + } + if iEof+I64(nKey)+I64(Xsqlite3VarintLen(tls, uint64(nKey))) > iStart+I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) { + break + } + + // Write the next key to the output. + vdbePmaWriteVarint(tls, bp, uint64(nKey)) + vdbePmaWriteBlob(tls, bp, (*PmaReader)(unsafe.Pointer(pReader)).FaKey, nKey) + + rc = vdbeMergeEngineStep(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger, bp+48) + } + + rc2 = vdbePmaWriterFinish(tls, bp, pOut+8) + if rc == SQLITE_OK { + rc = rc2 + } + + return rc +} + +// The main routine for background threads that populate aFile[1] of +// multi-threaded IncrMerger objects. +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ + var pIncr uintptr = pCtx + var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) + (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 + return pRet +} + +// Launch a background thread to populate aFile[1] of pIncr. +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ + var p uintptr = pIncr + + return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{vdbeIncrPopulateThread})), p) +} + +// This function is called when the PmaReader corresponding to pIncr has +// finished reading the contents of aFile[0]. Its purpose is to "refill" +// aFile[0] such that the PmaReader should start rereading it from the +// beginning. +// +// For single-threaded objects, this is accomplished by literally reading +// keys from pIncr->pMerger and repopulating aFile[0]. +// +// For multi-threaded objects, all that is required is to wait until the +// background thread is finished (if it is not already) and then swap +// aFile[0] and aFile[1] in place. If the contents of pMerger have not +// been exhausted, this function also launches a new background thread +// to populate the new aFile[1]. +// +// SQLITE_OK is returned on success, or an SQLite error code otherwise. +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ + var rc int32 = SQLITE_OK + + if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { + rc = vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) + + if rc == SQLITE_OK { + var f0 = *(*SorterFile)(unsafe.Pointer(pIncr + 40)) + *(*SorterFile)(unsafe.Pointer(pIncr + 40)) = *(*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)) + *(*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)) = f0 + } + + if rc == SQLITE_OK { + if (*SorterFile)(unsafe.Pointer(pIncr+40)).FiEof == (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff { + (*IncrMerger)(unsafe.Pointer(pIncr)).FbEof = 1 + } else { + rc = vdbeIncrBgPopulate(tls, pIncr) + } + } + } else { + rc = vdbeIncrPopulate(tls, pIncr) + *(*SorterFile)(unsafe.Pointer(pIncr + 40)) = *(*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)) + if (*SorterFile)(unsafe.Pointer(pIncr+40)).FiEof == (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff { + (*IncrMerger)(unsafe.Pointer(pIncr)).FbEof = 1 + } + } + + return rc +} + +// Allocate and return a new IncrMerger object to read data from pMerger. +// +// If an OOM condition is encountered, return NULL. In this case free the +// pMerger argument before returning. +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ + var rc int32 = SQLITE_OK + var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { + if Xsqlite3FaultSim(tls, 100) != 0 { + return uintptr(0) + } + return Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(IncrMerger{}))) + }()) + if pIncr != 0 { + (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger = pMerger + (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask = pTask + (*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz = func() int32 { + if (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxKeysize+9 > (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxPmaSize/2 { + return (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxKeysize + 9 + } + return (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxPmaSize / 2 + }() + *(*I64)(unsafe.Pointer(pTask + 88 + 8)) += I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) + } else { + vdbeMergeEngineFree(tls, pMerger) + rc = SQLITE_NOMEM + } + + return rc +} + +// Set the "use-threads" flag on object pIncr. +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ + (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 + *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) +} + +// Recompute pMerger->aTree[iOut] by comparing the next keys on the +// two PmaReaders that feed that entry. Neither of the PmaReaders +// are advanced. This routine merely does the comparison. +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i1 int32 + var i2 int32 + var iRes int32 + var p1 uintptr + var p2 uintptr + + if iOut >= (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree/2 { + i1 = (iOut - (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree/2) * 2 + i2 = i1 + 1 + } else { + i1 = *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(iOut*2)*4)) + i2 = *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(iOut*2+1)*4)) + } + + p1 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(i1)*80 + p2 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(i2)*80 + + if (*PmaReader)(unsafe.Pointer(p1)).FpFd == uintptr(0) { + iRes = i2 + } else if (*PmaReader)(unsafe.Pointer(p2)).FpFd == uintptr(0) { + iRes = i1 + } else { + var pTask uintptr = (*MergeEngine)(unsafe.Pointer(pMerger)).FpTask + *(*int32)(unsafe.Pointer(bp /* bCached */)) = 0 + var res int32 + // from vdbeSortSubtaskMain() + res = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, + pTask, bp, (*PmaReader)(unsafe.Pointer(p1)).FaKey, (*PmaReader)(unsafe.Pointer(p1)).FnKey, (*PmaReader)(unsafe.Pointer(p2)).FaKey, (*PmaReader)(unsafe.Pointer(p2)).FnKey) + if res <= 0 { + iRes = i1 + } else { + iRes = i2 + } + } + + *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(iOut)*4)) = iRes +} + +// Initialize the MergeEngine object passed as the second argument. Once this +// function returns, the first key of merged data may be read from the +// MergeEngine object in the usual fashion. +// +// If argument eMode is INCRINIT_ROOT, then it is assumed that any IncrMerge +// objects attached to the PmaReader objects that the merger reads from have +// already been populated, but that they have not yet populated aFile[0] and +// set the PmaReader objects up to read from it. In this case all that is +// required is to call vdbePmaReaderNext() on each PmaReader to point it at +// its first key. +// +// Otherwise, if eMode is any value other than INCRINIT_ROOT, then use +// vdbePmaReaderIncrMergeInit() to initialize each PmaReader that feeds data +// to pMerger. +// +// SQLITE_OK is returned if successful, or an SQLite error code otherwise. +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ + var rc int32 = SQLITE_OK // Return code + var i int32 // For looping over PmaReader objects + var nTree int32 // Number of subtrees to merge + + // Failure to allocate the merge would have been detected prior to + // invoking this routine + + // eMode is always INCRINIT_NORMAL in single-threaded mode + + // Verify that the MergeEngine is assigned to a single thread + + (*MergeEngine)(unsafe.Pointer(pMerger)).FpTask = pTask + + nTree = (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree + for i = 0; i < nTree; i++ { + if SQLITE_MAX_WORKER_THREADS > 0 && eMode == INCRINIT_ROOT { + // PmaReaders should be normally initialized in order, as if they are + // reading from the same temp file this makes for more linear file IO. + // However, in the INCRINIT_ROOT case, if PmaReader aReadr[nTask-1] is + // in use it will block the vdbePmaReaderNext() call while it uses + // the main thread to fill its buffer. So calling PmaReaderNext() + // on this PmaReader before any of the multi-threaded PmaReaders takes + // better advantage of multi-processor hardware. + rc = vdbePmaReaderNext(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(nTree-i-1)*80) + } else { + rc = vdbePmaReaderIncrInit(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(i)*80, INCRINIT_NORMAL) + } + if rc != SQLITE_OK { + return rc + } + } + + for i = (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree - 1; i > 0; i-- { + vdbeMergeEngineCompare(tls, pMerger, i) + } + return int32((*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FerrCode) +} + +// The PmaReader passed as the first argument is guaranteed to be an +// incremental-reader (pReadr->pIncr!=0). This function serves to open +// and/or initialize the temp file related fields of the IncrMerge +// object at (pReadr->pIncr). +// +// If argument eMode is set to INCRINIT_NORMAL, then all PmaReaders +// in the sub-tree headed by pReadr are also initialized. Data is then +// loaded into the buffers belonging to pReadr and it is set to point to +// the first key in its range. +// +// If argument eMode is set to INCRINIT_TASK, then pReadr is guaranteed +// to be a multi-threaded PmaReader and this function is being called in a +// background thread. In this case all PmaReaders in the sub-tree are +// initialized as for INCRINIT_NORMAL and the aFile[1] buffer belonging to +// pReadr is populated. However, pReadr itself is not set up to point +// to its first key. A call to vdbePmaReaderNext() is still required to do +// that. +// +// The reason this function does not call vdbePmaReaderNext() immediately +// in the INCRINIT_TASK case is that vdbePmaReaderNext() assumes that it has +// to block on thread (pTask->thread) before accessing aFile[1]. But, since +// this entire function is being run by thread (pTask->thread), that will +// lead to the current background thread attempting to join itself. +// +// Finally, if argument eMode is set to INCRINIT_ROOT, it may be assumed +// that pReadr->pIncr is a multi-threaded IncrMerge objects, and that all +// child-trees have already been initialized using IncrInit(INCRINIT_TASK). +// In this case vdbePmaReaderNext() is called on all child PmaReaders and +// the current PmaReader set to point to the first key in its range. +// +// SQLITE_OK is returned if successful, or an SQLite error code otherwise. +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ + var rc int32 = SQLITE_OK + var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr + var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + var db uintptr = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb + + // eMode is always INCRINIT_NORMAL in single-threaded mode + + rc = vdbeMergeEngineInit(tls, pTask, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger, eMode) + + // Set up the required files for pIncr. A multi-theaded IncrMerge object + // requires two temp files to itself, whereas a single-threaded object + // only requires a region of pTask->file2. + if rc == SQLITE_OK { + var mxSz int32 = (*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz + if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { + rc = vdbeSorterOpenTempFile(tls, db, int64(mxSz), pIncr+40) + if rc == SQLITE_OK { + rc = vdbeSorterOpenTempFile(tls, db, int64(mxSz), pIncr+40+1*16) + } + } else { + if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd == uintptr(0) { + + rc = vdbeSorterOpenTempFile(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FiEof, pTask+88) + (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FiEof = int64(0) + } + if rc == SQLITE_OK { + (*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)).FpFd = (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd + (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff = (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FiEof + *(*I64)(unsafe.Pointer(pTask + 88 + 8)) += I64(mxSz) + } + } + } + + if rc == SQLITE_OK && (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { + // Use the current thread to populate aFile[1], even though this + // PmaReader is multi-threaded. If this is an INCRINIT_TASK object, + // then this function is already running in background thread + // pIncr->pTask->thread. + // + // If this is the INCRINIT_ROOT object, then it is running in the + // main VDBE thread. But that is Ok, as that thread cannot return + // control to the VDBE or proceed with anything useful until the + // first results are ready from this merger object anyway. + + rc = vdbeIncrPopulate(tls, pIncr) + } + + if rc == SQLITE_OK && (SQLITE_MAX_WORKER_THREADS == 0 || eMode != INCRINIT_TASK) { + rc = vdbePmaReaderNext(tls, pReadr) + } + + return rc +} + +// The main routine for vdbePmaReaderIncrMergeInit() operations run in +// background threads. +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ + var pReader uintptr = pCtx + var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) + (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 + return pRet +} + +// If the PmaReader passed as the first argument is not an incremental-reader +// (if pReadr->pIncr==0), then this function is a no-op. Otherwise, it invokes +// the vdbePmaReaderIncrMergeInit() function with the parameters passed to +// this routine to initialize the incremental merge. +// +// If the IncrMerger object is multi-threaded (IncrMerger.bUseThread==1), +// then a background thread is launched to call vdbePmaReaderIncrMergeInit(). +// Or, if the IncrMerger is single threaded, the same function is called +// using the current thread. +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ + var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger + var rc int32 = SQLITE_OK // Return code + if pIncr != 0 { + + if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { + var pCtx uintptr = pReadr + rc = vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{vdbePmaReaderBgIncrInit})), pCtx) + } else { + rc = vdbePmaReaderIncrMergeInit(tls, pReadr, eMode) + } + } + return rc +} + +// Allocate a new MergeEngine object to merge the contents of nPMA level-0 +// PMAs from pTask->file. If no error occurs, set *ppOut to point to +// the new object and return SQLITE_OK. Or, if an error does occur, set *ppOut +// to NULL and return an SQLite error code. +// +// When this function is called, *piOffset is set to the offset of the +// first PMA to read from pTask->file. Assuming no error occurs, it is +// set to the offset immediately following the last byte of the last +// PMA before returning. If an error does occur, then the final value of +// *piOffset is undefined. +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pNew uintptr // Merge engine to return + var iOff I64 = *(*I64)(unsafe.Pointer(piOffset)) + var i int32 + var rc int32 = SQLITE_OK + + *(*uintptr)(unsafe.Pointer(ppOut)) = libc.AssignUintptr(&pNew, vdbeMergeEngineNew(tls, nPMA)) + if pNew == uintptr(0) { + rc = SQLITE_NOMEM + } + + for i = 0; i < nPMA && rc == SQLITE_OK; i++ { + *(*I64)(unsafe.Pointer(bp /* nDummy */)) = int64(0) + var pReadr uintptr = (*MergeEngine)(unsafe.Pointer(pNew)).FaReadr + uintptr(i)*80 + rc = vdbePmaReaderInit(tls, pTask, pTask+72, iOff, pReadr, bp) + iOff = (*PmaReader)(unsafe.Pointer(pReadr)).FiEof + } + + if rc != SQLITE_OK { + vdbeMergeEngineFree(tls, pNew) + *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) + } + *(*I64)(unsafe.Pointer(piOffset)) = iOff + return rc +} + +// Return the depth of a tree comprising nPMA PMAs, assuming a fanout of +// SORTER_MAX_MERGE_COUNT. The returned value does not include leaf nodes. +// +// i.e. +// +// nPMA<=16 -> TreeDepth() == 0 +// nPMA<=256 -> TreeDepth() == 1 +// nPMA<=65536 -> TreeDepth() == 2 +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ + var nDepth int32 = 0 + var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) + for nDiv < I64(nPMA) { + nDiv = nDiv * int64(SORTER_MAX_MERGE_COUNT) + nDepth++ + } + return nDepth +} + +// pRoot is the root of an incremental merge-tree with depth nDepth (according +// to vdbeSorterTreeDepth()). pLeaf is the iSeq'th leaf to be added to the +// tree, counting from zero. This function adds pLeaf to the tree. +// +// If successful, SQLITE_OK is returned. If an error occurs, an SQLite error +// code is returned and pLeaf is freed. +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var nDiv int32 = 1 + var i int32 + var p uintptr = pRoot + // var pIncr uintptr at bp, 8 + + rc = vdbeIncrMergerNew(tls, pTask, pLeaf, bp) + + for i = 1; i < nDepth; i++ { + nDiv = nDiv * SORTER_MAX_MERGE_COUNT + } + + for i = 1; i < nDepth && rc == SQLITE_OK; i++ { + var iIter int32 = iSeq / nDiv % SORTER_MAX_MERGE_COUNT + var pReadr uintptr = (*MergeEngine)(unsafe.Pointer(p)).FaReadr + uintptr(iIter)*80 + + if (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr == uintptr(0) { + var pNew uintptr = vdbeMergeEngineNew(tls, SORTER_MAX_MERGE_COUNT) + if pNew == uintptr(0) { + rc = SQLITE_NOMEM + } else { + rc = vdbeIncrMergerNew(tls, pTask, pNew, pReadr+72) + } + } + if rc == SQLITE_OK { + p = (*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReadr)).FpIncr)).FpMerger + nDiv = nDiv / SORTER_MAX_MERGE_COUNT + } + } + + if rc == SQLITE_OK { + (*PmaReader)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(p)).FaReadr + uintptr(iSeq%SORTER_MAX_MERGE_COUNT)*80)).FpIncr = *(*uintptr)(unsafe.Pointer(bp /* pIncr */)) + } else { + vdbeIncrFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pIncr */))) + } + return rc +} + +// This function is called as part of a SorterRewind() operation on a sorter +// that has already written two or more level-0 PMAs to one or more temp +// files. It builds a tree of MergeEngine/IncrMerger/PmaReader objects that +// can be used to incrementally merge all PMAs on disk. +// +// If successful, SQLITE_OK is returned and *ppOut set to point to the +// MergeEngine object at the root of the tree before returning. Or, if an +// error occurs, an SQLite error code is returned and the final value +// of *ppOut is undefined. +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pMain uintptr = uintptr(0) + var rc int32 = SQLITE_OK + var iTask int32 + + // If the sorter uses more than one task, then create the top-level + // MergeEngine here. This MergeEngine will read data from exactly + // one PmaReader per sub-task. + + if int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask) > 1 { + pMain = vdbeMergeEngineNew(tls, int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask)) + if pMain == uintptr(0) { + rc = SQLITE_NOMEM + } + } + + for iTask = 0; rc == SQLITE_OK && iTask < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); iTask++ { + var pTask uintptr = pSorter + 96 + uintptr(iTask)*104 + + if SQLITE_MAX_WORKER_THREADS == 0 || (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA != 0 { + *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)) = uintptr(0) // Root node of tree for this task + var nDepth int32 = vdbeSorterTreeDepth(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA) + *(*I64)(unsafe.Pointer(bp /* iReadOff */)) = int64(0) + + if (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA <= SORTER_MAX_MERGE_COUNT { + rc = vdbeMergeEngineLevel0(tls, pTask, (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA, bp, bp+8) + } else { + var i int32 + var iSeq int32 = 0 + *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)) = vdbeMergeEngineNew(tls, SORTER_MAX_MERGE_COUNT) + if *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) { + rc = SQLITE_NOMEM + } + for i = 0; i < (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA && rc == SQLITE_OK; i = i + SORTER_MAX_MERGE_COUNT { + *(*uintptr)(unsafe.Pointer(bp + 16 /* pMerger */)) = uintptr(0) // New level-0 PMA merger + var nReader int32 // Number of level-0 PMAs to merge + + nReader = func() int32 { + if (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA-i < SORTER_MAX_MERGE_COUNT { + return (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA - i + } + return SORTER_MAX_MERGE_COUNT + }() + rc = vdbeMergeEngineLevel0(tls, pTask, nReader, bp, bp+16) + if rc == SQLITE_OK { + rc = vdbeSorterAddToTree(tls, pTask, nDepth, libc.PostIncInt32(&iSeq, 1), *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pMerger */))) + } + } + } + + if rc == SQLITE_OK { + if pMain != uintptr(0) { + rc = vdbeIncrMergerNew(tls, pTask, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)), (*MergeEngine)(unsafe.Pointer(pMain)).FaReadr+uintptr(iTask)*80+72) + } else { + + pMain = *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)) + } + } else { + vdbeMergeEngineFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */))) + } + } + } + + if rc != SQLITE_OK { + vdbeMergeEngineFree(tls, pMain) + pMain = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(ppOut)) = pMain + return rc +} + +// This function is called as part of an sqlite3VdbeSorterRewind() operation +// on a sorter that has written two or more PMAs to temporary files. It sets +// up either VdbeSorter.pMerger (for single threaded sorters) or pReader +// (for multi-threaded sorters) so that it can be used to iterate through +// all records stored in the sorter. +// +// SQLITE_OK is returned if successful, or an SQLite error code otherwise. +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 // Return code + var pTask0 uintptr = pSorter + 96 + *(*uintptr)(unsafe.Pointer(bp /* pMain */)) = uintptr(0) + var db uintptr = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask0)).FpSorter)).Fdb + var i int32 + var xCompare SorterCompare = vdbeSorterGetCompare(tls, pSorter) + for i = 0; i < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); i++ { + (*SortSubtask)(unsafe.Pointer(pSorter + 96 + uintptr(i)*104)).FxCompare = xCompare + } + + rc = vdbeSorterMergeTreeBuild(tls, pSorter, bp) + if rc == SQLITE_OK { + + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads != 0 { + var iTask int32 + var pReadr uintptr = uintptr(0) + var pLast uintptr = pSorter + 96 + uintptr(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask)-1)*104 + rc = vdbeSortAllocUnpacked(tls, pLast) + if rc == SQLITE_OK { + pReadr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(PmaReader{}))) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader = pReadr + if pReadr == uintptr(0) { + rc = SQLITE_NOMEM + } + } + if rc == SQLITE_OK { + rc = vdbeIncrMergerNew(tls, pLast, *(*uintptr)(unsafe.Pointer(bp /* pMain */)), pReadr+72) + if rc == SQLITE_OK { + vdbeIncrMergerSetThreads(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr) + for iTask = 0; iTask < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask)-1; iTask++ { + var pIncr uintptr + if libc.AssignUintptr(&pIncr, (*PmaReader)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaReadr+uintptr(iTask)*80)).FpIncr) != 0 { + vdbeIncrMergerSetThreads(tls, pIncr) + + } + } + for iTask = 0; rc == SQLITE_OK && iTask < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); iTask++ { + // Check that: + // + // a) The incremental merge object is configured to use the + // right task, and + // b) If it is using task (nTask-1), it is configured to run + // in single-threaded mode. This is important, as the + // root merge (INCRINIT_ROOT) will be using the same task + // object. + var p uintptr = (*MergeEngine)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaReadr + uintptr(iTask)*80 + + rc = vdbePmaReaderIncrInit(tls, p, INCRINIT_TASK) + } + } + *(*uintptr)(unsafe.Pointer(bp /* pMain */)) = uintptr(0) + } + if rc == SQLITE_OK { + rc = vdbePmaReaderIncrMergeInit(tls, pReadr, INCRINIT_ROOT) + } + } else { + rc = vdbeMergeEngineInit(tls, pTask0, *(*uintptr)(unsafe.Pointer(bp /* pMain */)), INCRINIT_NORMAL) + (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger = *(*uintptr)(unsafe.Pointer(bp /* pMain */)) + *(*uintptr)(unsafe.Pointer(bp /* pMain */)) = uintptr(0) + } + } + + if rc != SQLITE_OK { + vdbeMergeEngineFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pMain */))) + } + return rc +} + +// Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, +// this function is called to prepare for iterating through the records +// in sorted order. +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ + var pSorter uintptr + var rc int32 = SQLITE_OK // Return code + + pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) + + // If no data has been written to disk, then do not do so now. Instead, + // sort the VdbeSorter.pRecord list. The vdbe layer will read data directly + // from the in-memory list. + if int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA) == 0 { + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { + *(*int32)(unsafe.Pointer(pbEof)) = 0 + rc = vdbeSorterSort(tls, pSorter+96, pSorter+56) + } else { + *(*int32)(unsafe.Pointer(pbEof)) = 1 + } + return rc + } + + // Write the current in-memory list to a PMA. When the VdbeSorterWrite() + // function flushes the contents of memory to disk, it immediately always + // creates a new list consisting of a single key immediately afterwards. + // So the list is never empty at this point. + + rc = vdbeSorterFlushPMA(tls, pSorter) + + // Join all threads + rc = vdbeSorterJoinAll(tls, pSorter, rc) + + // Assuming no errors have occurred, set up a merger structure to + // incrementally read and merge all remaining PMAs. + + if rc == SQLITE_OK { + rc = vdbeSorterSetupMerge(tls, pSorter) + *(*int32)(unsafe.Pointer(pbEof)) = 0 + } + + return rc +} + +// Advance to the next element in the sorter. Return value: +// +// SQLITE_OK success +// SQLITE_DONE end of data +// otherwise some kind of error. +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pSorter uintptr + var rc int32 // Return code + + pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) + + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { + + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads != 0 { + rc = vdbePmaReaderNext(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader) + if rc == SQLITE_OK && (*PmaReader)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader)).FpFd == uintptr(0) { + rc = SQLITE_DONE + } + } else { + *(*int32)(unsafe.Pointer(bp /* res */)) = 0 + + rc = vdbeMergeEngineStep(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger, bp) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { + rc = SQLITE_DONE + } + } + } else { + var pFree uintptr = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList + (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = *(*uintptr)(unsafe.Pointer(pFree + 8)) + *(*uintptr)(unsafe.Pointer(pFree + 8)) = uintptr(0) + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory == uintptr(0) { + vdbeSorterRecordFree(tls, db, pFree) + } + if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { + rc = SQLITE_OK + } else { + rc = SQLITE_DONE + } + } + return rc +} + +// Return a pointer to a buffer owned by the sorter that contains the +// current key. +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ + var pKey uintptr + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { + var pReader uintptr + if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads != 0 { + pReader = (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader + } else { + pReader = (*MergeEngine)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger)).FaReadr + uintptr(*(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger)).FaTree + 1*4)))*80 + } + *(*int32)(unsafe.Pointer(pnKey)) = (*PmaReader)(unsafe.Pointer(pReader)).FnKey + pKey = (*PmaReader)(unsafe.Pointer(pReader)).FaKey + } else { + *(*int32)(unsafe.Pointer(pnKey)) = (*SorterRecord)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList)).FnVal + pKey = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList + uintptr(1)*16 + } + return pKey +} + +// Copy the current sorter key into the memory cell pOut. +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pSorter uintptr + var pKey uintptr + // var nKey int32 at bp, 4 + // Sorter key to copy into pOut + + pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) + pKey = vdbeSorterRowkey(tls, pSorter, bp) + if Xsqlite3VdbeMemClearAndResize(tls, pOut, *(*int32)(unsafe.Pointer(bp))) != 0 { + return SQLITE_NOMEM + } + (*Mem)(unsafe.Pointer(pOut)).Fn = *(*int32)(unsafe.Pointer(bp /* nKey */)) + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Blob) + libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz, pKey, uint64(*(*int32)(unsafe.Pointer(bp /* nKey */)))) + + return SQLITE_OK +} + +// Compare the key in memory cell pVal with the key that the sorter cursor +// passed as the first argument currently points to. For the purposes of +// the comparison, ignore the rowid field at the end of each record. +// +// If the sorter cursor key contains any NULL values, consider it to be +// less than pVal. Even if pVal also contains NULL values. +// +// If an error occurs, return an SQLite error code (i.e. SQLITE_NOMEM). +// Otherwise, set *pRes to a negative, zero or positive value if the +// key in pVal is smaller than, equal to or larger than the current sorter +// key. +// +// This routine forms the core of the OP_SorterCompare opcode, which in +// turn is used to verify uniqueness when constructing a UNIQUE INDEX. +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pSorter uintptr + var r2 uintptr + var pKeyInfo uintptr + var i int32 + var pKey uintptr + // var nKey int32 at bp, 4 + // Sorter key to compare pVal with + + pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) + r2 = (*VdbeSorter)(unsafe.Pointer(pSorter)).FpUnpacked + pKeyInfo = (*VdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo + if r2 == uintptr(0) { + r2 = libc.AssignPtrUintptr(pSorter+48, Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo)) + if r2 == uintptr(0) { + return SQLITE_NOMEM + } + (*UnpackedRecord)(unsafe.Pointer(r2)).FnField = U16(nKeyCol) + } + + pKey = vdbeSorterRowkey(tls, pSorter, bp) + Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, *(*int32)(unsafe.Pointer(bp /* nKey */)), pKey, r2) + for i = 0; i < nKeyCol; i++ { + if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(r2)).FaMem+uintptr(i)*56)).Fflags)&MEM_Null != 0 { + *(*int32)(unsafe.Pointer(pRes)) = -1 + return SQLITE_OK + } + } + + *(*int32)(unsafe.Pointer(pRes)) = Xsqlite3VdbeRecordCompare(tls, (*Mem)(unsafe.Pointer(pVal)).Fn, (*Mem)(unsafe.Pointer(pVal)).Fz, r2) + return SQLITE_OK +} + +//************* End of vdbesort.c ******************************************* +//************* Begin file vdbevtab.c *************************************** +// 2020-03-23 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file implements virtual-tables for examining the bytecode content +// of a prepared statement. +// #include "sqliteInt.h" + +//************* End of vdbevtab.c ******************************************* +//************* Begin file memjournal.c ************************************* +// 2008 October 7 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code use to implement an in-memory rollback journal. +// The in-memory rollback journal is used to journal transactions for +// ":memory:" databases and when the journal_mode=MEMORY pragma is used. +// +// Update: The in-memory journal is also used to temporarily cache +// smaller journals that are not critical for power-loss recovery. +// For example, statement journals that are not too big will be held +// entirely in memory, thus reducing the number of file I/O calls, and +// more importantly, reducing temporary file creation events. If these +// journals become too large for memory, they are spilled to disk. But +// in the common case, they are usually small and no file I/O needs to +// occur. +// #include "sqliteInt.h" + +// Forward references to internal structures +type MemJournal1 = struct { + FpMethod uintptr + FnChunkSize int32 + FnSpill int32 + FpFirst uintptr + Fendpoint FilePoint + Freadpoint FilePoint + Fflags int32 + F__ccgo_pad1 [4]byte + FpVfs uintptr + FzJournal uintptr +} /* sqlite3.c:99731:9 */ + +//************* End of vdbesort.c ******************************************* +//************* Begin file vdbevtab.c *************************************** +// 2020-03-23 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file implements virtual-tables for examining the bytecode content +// of a prepared statement. +// #include "sqliteInt.h" + +//************* End of vdbevtab.c ******************************************* +//************* Begin file memjournal.c ************************************* +// 2008 October 7 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code use to implement an in-memory rollback journal. +// The in-memory rollback journal is used to journal transactions for +// ":memory:" databases and when the journal_mode=MEMORY pragma is used. +// +// Update: The in-memory journal is also used to temporarily cache +// smaller journals that are not critical for power-loss recovery. +// For example, statement journals that are not too big will be held +// entirely in memory, thus reducing the number of file I/O calls, and +// more importantly, reducing temporary file creation events. If these +// journals become too large for memory, they are spilled to disk. But +// in the common case, they are usually small and no file I/O needs to +// occur. +// #include "sqliteInt.h" + +// Forward references to internal structures +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ +type FilePoint1 = struct { + FiOffset Sqlite3_int64 + FpChunk uintptr +} /* sqlite3.c:99731:9 */ + +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ +type FileChunk1 = struct { + FpNext uintptr + FzChunk [8]U8 +} /* sqlite3.c:99731:9 */ + +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ + +// Read data from the in-memory journal file. This is the implementation +// of the sqlite3_vfs.xRead method. +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ + var p uintptr = pJfd + var zOut uintptr = zBuf + var nRead int32 = iAmt + var iChunkOffset int32 + var pChunk uintptr + + if Sqlite_int64(iAmt)+iOfst > (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { + return SQLITE_IOERR | int32(2)<<8 + } + + if (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset != iOfst || iOfst == int64(0) { + var iOff Sqlite3_int64 = int64(0) + for pChunk = (*MemJournal)(unsafe.Pointer(p)).FpFirst; pChunk != 0 && iOff+Sqlite3_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) <= iOfst; pChunk = (*FileChunk)(unsafe.Pointer(pChunk)).FpNext { + iOff = iOff + Sqlite3_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) + } + } else { + pChunk = (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk + + } + + iChunkOffset = int32(iOfst % Sqlite_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize)) + for __ccgo := true; __ccgo; __ccgo = nRead >= 0 && libc.AssignUintptr(&pChunk, (*FileChunk)(unsafe.Pointer(pChunk)).FpNext) != uintptr(0) && nRead > 0 { + var iSpace int32 = (*MemJournal)(unsafe.Pointer(p)).FnChunkSize - iChunkOffset + var nCopy int32 = func() int32 { + if nRead < (*MemJournal)(unsafe.Pointer(p)).FnChunkSize-iChunkOffset { + return nRead + } + return (*MemJournal)(unsafe.Pointer(p)).FnChunkSize - iChunkOffset + }() + libc.Xmemcpy(tls, zOut, pChunk+8+uintptr(iChunkOffset), uint64(nCopy)) + zOut += uintptr(nCopy) + nRead = nRead - iSpace + iChunkOffset = 0 + } + (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset = func() int64 { + if pChunk != 0 { + return iOfst + Sqlite_int64(iAmt) + } + return int64(0) + }() + (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk = pChunk + + return SQLITE_OK +} + +// Free the list of FileChunk structures headed at MemJournal.pFirst. +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ + var pIter uintptr + var pNext uintptr + for pIter = pFirst; pIter != 0; pIter = pNext { + pNext = (*FileChunk)(unsafe.Pointer(pIter)).FpNext + Xsqlite3_free(tls, pIter) + } +} + +// Flush the contents of memory to a real file on disk. +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ + var rc int32 + var pReal uintptr = p + var copy = *(*MemJournal)(unsafe.Pointer(p)) + + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemJournal{}))) + rc = Xsqlite3OsOpen(tls, copy.FpVfs, copy.FzJournal, pReal, copy.Fflags, uintptr(0)) + if rc == SQLITE_OK { + var nChunk int32 = copy.FnChunkSize + var iOff I64 = int64(0) + var pIter uintptr + for pIter = copy.FpFirst; pIter != 0; pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext { + if iOff+I64(nChunk) > copy.Fendpoint.FiOffset { + nChunk = int32(copy.Fendpoint.FiOffset - iOff) + } + rc = Xsqlite3OsWrite(tls, pReal, pIter+8 /* &.zChunk */, nChunk, iOff) + if rc != 0 { + break + } + iOff = iOff + I64(nChunk) + } + if rc == SQLITE_OK { + // No error has occurred. Free the in-memory buffers. + memjrnlFreeChunks(tls, copy.FpFirst) + } + } + if rc != SQLITE_OK { + // If an error occurred while creating or writing to the file, restore + // the original before returning. This way, SQLite uses the in-memory + // journal data to roll back changes made to the internal page-cache + // before this function was called. + Xsqlite3OsClose(tls, pReal) + *(*MemJournal)(unsafe.Pointer(p)) = copy + } + return rc +} + +// Write data to the file. +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ + var p uintptr = pJfd + var nWrite int32 = iAmt + var zWrite uintptr = zBuf + + // If the file should be created now, create it and write the new data + // into the file on disk. + if (*MemJournal)(unsafe.Pointer(p)).FnSpill > 0 && Sqlite_int64(iAmt)+iOfst > Sqlite_int64((*MemJournal)(unsafe.Pointer(p)).FnSpill) { + var rc int32 = memjrnlCreateFile(tls, p) + if rc == SQLITE_OK { + rc = Xsqlite3OsWrite(tls, pJfd, zBuf, iAmt, iOfst) + } + return rc + } else { + // An in-memory journal file should only ever be appended to. Random + // access writes are not required. The only exception to this is when + // the in-memory journal is being used by a connection using the + // atomic-write optimization. In this case the first 28 bytes of the + // journal file may be written as part of committing the transaction. + + if iOfst > int64(0) && iOfst != (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { + memjrnlTruncate(tls, pJfd, iOfst) + } + if iOfst == int64(0) && (*MemJournal)(unsafe.Pointer(p)).FpFirst != 0 { + + libc.Xmemcpy(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst+8 /* &.zChunk */, zBuf, uint64(iAmt)) + } else { + for nWrite > 0 { + var pChunk uintptr = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FpChunk + var iChunkOffset int32 = int32((*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset % Sqlite3_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize)) + var iSpace int32 = func() int32 { + if nWrite < (*MemJournal)(unsafe.Pointer(p)).FnChunkSize-iChunkOffset { + return nWrite + } + return (*MemJournal)(unsafe.Pointer(p)).FnChunkSize - iChunkOffset + }() + + if iChunkOffset == 0 { + // New chunk is required to extend the file. + var pNew uintptr = Xsqlite3_malloc(tls, int32(uint64(unsafe.Sizeof(FileChunk{}))+uint64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize-8))) + if !(pNew != 0) { + return SQLITE_IOERR | int32(12)<<8 + } + (*FileChunk)(unsafe.Pointer(pNew)).FpNext = uintptr(0) + if pChunk != 0 { + + (*FileChunk)(unsafe.Pointer(pChunk)).FpNext = pNew + } else { + + (*MemJournal)(unsafe.Pointer(p)).FpFirst = pNew + } + pChunk = libc.AssignPtrUintptr(p+24+8, pNew) + } + + libc.Xmemcpy(tls, pChunk+8+uintptr(iChunkOffset), zWrite, uint64(iSpace)) + zWrite += uintptr(iSpace) + nWrite = nWrite - iSpace + *(*Sqlite3_int64)(unsafe.Pointer(p + 24)) += Sqlite3_int64(iSpace) + } + } + } + + return SQLITE_OK +} + +// Truncate the in-memory file. +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ + var p uintptr = pJfd + + if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { + var pIter uintptr = uintptr(0) + if size == int64(0) { + memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) + (*MemJournal)(unsafe.Pointer(p)).FpFirst = uintptr(0) + } else { + var iOff I64 = I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) + for pIter = (*MemJournal)(unsafe.Pointer(p)).FpFirst; pIter != 0 && iOff < size; pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext { + iOff = iOff + I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) + } + if pIter != 0 { + memjrnlFreeChunks(tls, (*FileChunk)(unsafe.Pointer(pIter)).FpNext) + (*FileChunk)(unsafe.Pointer(pIter)).FpNext = uintptr(0) + } + } + + (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FpChunk = pIter + (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset = size + (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk = uintptr(0) + (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset = int64(0) + } + return SQLITE_OK +} + +// Close the file. +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ + var p uintptr = pJfd + memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) + return SQLITE_OK +} + +// Sync the file. +// +// If the real file has been created, call its xSync method. Otherwise, +// syncing an in-memory journal is a no-op. +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ + _ = pJfd + _ = flags + return SQLITE_OK +} + +// Query the size of the file in bytes. +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ + var p uintptr = pJfd + *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset + return SQLITE_OK +} + +// Table of methods for MemJournal sqlite3_file object. +var sMemJournalMethods = sqlite3_io_methods{ + FiVersion: 1, // iVersion + FxClose: 0, // xClose + FxRead: 0, // xRead + FxWrite: 0, // xWrite + FxTruncate: 0, // xTruncate + FxSync: 0, // xSync + FxFileSize: 0, // xUnfetch +} /* sqlite3.c:100021:40 */ + +// Open a journal file. +// +// The behaviour of the journal file depends on the value of parameter +// nSpill. If nSpill is 0, then the journal file is always create and +// accessed using the underlying VFS. If nSpill is less than zero, then +// all content is always stored in main-memory. Finally, if nSpill is a +// positive value, then the journal file is initially created in-memory +// but may be flushed to disk later on. In this case the journal file is +// flushed to disk either when it grows larger than nSpill bytes in size, +// or when sqlite3JournalCreate() is called. +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ + var p uintptr = pJfd + + // Zero the file-handle object. If nSpill was passed zero, initialize + // it using the sqlite3OsOpen() function of the underlying VFS. In this + // case none of the code in this module is executed as a result of calls + // made on the journal file-handle. + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemJournal{}))) + if nSpill == 0 { + return Xsqlite3OsOpen(tls, pVfs, zName, pJfd, flags, uintptr(0)) + } + + if nSpill > 0 { + (*MemJournal)(unsafe.Pointer(p)).FnChunkSize = nSpill + } else { + (*MemJournal)(unsafe.Pointer(p)).FnChunkSize = int32(uint64(8+MEMJOURNAL_DFLT_FILECHUNKSIZE) - uint64(unsafe.Sizeof(FileChunk{}))) + + } + + (*Sqlite3_file)(unsafe.Pointer(pJfd)).FpMethods = uintptr(unsafe.Pointer(&sMemJournalMethods)) + (*MemJournal)(unsafe.Pointer(p)).FnSpill = nSpill + (*MemJournal)(unsafe.Pointer(p)).Fflags = flags + (*MemJournal)(unsafe.Pointer(p)).FzJournal = zName + (*MemJournal)(unsafe.Pointer(p)).FpVfs = pVfs + return SQLITE_OK +} + +// Open an in-memory journal file. +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ + Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) +} + +// The file-handle passed as the only argument is open on a journal file. +// Return true if this "journal file" is currently stored in heap memory, +// or false otherwise. +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ + return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) +} + +// Return the number of bytes required to store a JournalFile that uses vfs +// pVfs to create the underlying on-disk files. +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ + return func() int32 { + if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { + return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile + } + return int32(unsafe.Sizeof(MemJournal{})) + }() +} + +//************* End of memjournal.c ***************************************** +//************* Begin file walker.c ***************************************** +// 2008 August 16 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains routines used for walking the parser tree for +// an SQL statement. +// #include "sqliteInt.h" +// #include +// #include + +// Walk all expressions linked into the list of Window objects passed +// as the second argument. +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ + var pWin uintptr + for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + var rc int32 + rc = Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) + if rc != 0 { + return WRC_Abort + } + rc = Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpPartition) + if rc != 0 { + return WRC_Abort + } + rc = Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpFilter) + if rc != 0 { + return WRC_Abort + } + rc = Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpStart) + if rc != 0 { + return WRC_Abort + } + rc = Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpEnd) + if rc != 0 { + return WRC_Abort + } + if bOneOnly != 0 { + break + } + } + return WRC_Continue +} + +// Walk an expression tree. Invoke the callback once for each node +// of the expression, while descending. (In other words, the callback +// is invoked before visiting children.) +// +// The return value from the callback should be one of the WRC_* +// constants to specify how to proceed with the walk. +// +// WRC_Continue Continue descending down the tree. +// +// WRC_Prune Do not descend into child nodes, but allow +// the walk to continue with sibling nodes. +// +// WRC_Abort Do no more callbacks. Unwind the stack and +// return from the top-level walk call. +// +// The return value from this routine is WRC_Abort to abandon the tree walk +// and WRC_Continue to continue. +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ + var rc int32 + + for 1 != 0 { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxExprCallback})).f(tls, pWalker, pExpr) + if rc != 0 { + return rc & WRC_Abort + } + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { + + if (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && walkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != 0 { + return WRC_Abort + } + if (*Expr)(unsafe.Pointer(pExpr)).FpRight != 0 { + + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpRight + continue + } else if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + + if Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) != 0 { + return WRC_Abort + } + } else { + if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != 0 { + if Xsqlite3WalkExprList(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) != 0 { + return WRC_Abort + } + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + if walkWindowList(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 64)), 1) != 0 { + return WRC_Abort + } + } + } + } + break + } + return WRC_Continue +} + +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ + if pExpr != 0 { + return walkExpr(tls, pWalker, pExpr) + } + return WRC_Continue +} + +// Call sqlite3WalkExpr() for every expression in list p or until +// an abort request is seen. +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ + var i int32 + var pItem uintptr + if p != 0 { + i = (*ExprList)(unsafe.Pointer(p)).FnExpr + pItem = p + 8 /* &.a */ + __1: + if !(i > 0) { + goto __3 + } + { + if Xsqlite3WalkExpr(tls, pWalker, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) != 0 { + return WRC_Abort + } + + } + goto __2 + __2: + i-- + pItem += 32 + goto __1 + goto __3 + __3: + } + return WRC_Continue +} + +// This is a no-op callback for Walker->xSelectCallback2. If this +// callback is set, then the Select->pWinDefn list is traversed. +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ + _ = pWalker + _ = p + // No-op +} + +// Walk all expressions associated with SELECT statement p. Do +// not invoke the SELECT callback on p, but do (of course) invoke +// any expr callbacks and SELECT callbacks that come from subqueries. +// Return WRC_Abort or WRC_Continue. +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ + if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { + return WRC_Abort + } + if Xsqlite3WalkExpr(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpWhere) != 0 { + return WRC_Abort + } + if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpGroupBy) != 0 { + return WRC_Abort + } + if Xsqlite3WalkExpr(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { + return WRC_Abort + } + if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpOrderBy) != 0 { + return WRC_Abort + } + if Xsqlite3WalkExpr(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpLimit) != 0 { + return WRC_Abort + } + if (*Select)(unsafe.Pointer(p)).FpWinDefn != 0 { + var pParse uintptr + if (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3WalkWinDefnDummyCallback})) || + libc.AssignUintptr(&pParse, (*Walker)(unsafe.Pointer(pWalker)).FpParse) != uintptr(0) && int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME || + (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3SelectPopWith})) { + // The following may return WRC_Abort if there are unresolvable + // symbols (e.g. a table that does not exist) in a window definition. + var rc int32 = walkWindowList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpWinDefn, 0) + return rc + } + } + return WRC_Continue +} + +// Walk the parse trees associated with all subqueries in the +// FROM clause of SELECT statement p. Do not invoke the select +// callback on p, but do invoke it on each FROM clause subquery +// and on any subqueries further down in the tree. Return +// WRC_Abort or WRC_Continue; +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ + var pSrc uintptr + var i int32 + var pItem uintptr + + pSrc = (*Select)(unsafe.Pointer(p)).FpSrc + if pSrc != 0 { + i = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc + pItem = pSrc + 8 /* &.a */ + __1: + if !(i > 0) { + goto __3 + } + { + if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 && Xsqlite3WalkSelect(tls, pWalker, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect) != 0 { + return WRC_Abort + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 && + Xsqlite3WalkExprList(tls, pWalker, *(*uintptr)(unsafe.Pointer(pItem + 96))) != 0 { + return WRC_Abort + } + + } + goto __2 + __2: + i-- + pItem += 112 + goto __1 + goto __3 + __3: + } + return WRC_Continue +} + +// Call sqlite3WalkExpr() for every expression in Select statement p. +// Invoke sqlite3WalkSelect() for subqueries in the FROM clause and +// on the compound select chain, p->pPrior. +// +// If it is not NULL, the xSelectCallback() callback is invoked before +// the walk of the expressions and FROM clause. The xSelectCallback2() +// method is invoked following the walk of the expressions and FROM clause, +// but only if both xSelectCallback and xSelectCallback2 are both non-NULL +// and if the expressions and FROM clause both return WRC_Continue; +// +// Return WRC_Continue under normal conditions. Return WRC_Abort if +// there is an abort request. +// +// If the Walker does not have an xSelectCallback() then this routine +// is a no-op returning WRC_Continue. +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ + var rc int32 + if p == uintptr(0) { + return WRC_Continue + } + if (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback == uintptr(0) { + return WRC_Continue + } + for __ccgo := true; __ccgo; __ccgo = p != uintptr(0) { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback})).f(tls, pWalker, p) + if rc != 0 { + return rc & WRC_Abort + } + if Xsqlite3WalkSelectExpr(tls, pWalker, p) != 0 || + Xsqlite3WalkSelectFrom(tls, pWalker, p) != 0 { + return WRC_Abort + } + if (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 != 0 { + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2})).f(tls, pWalker, p) + } + p = (*Select)(unsafe.Pointer(p)).FpPrior + } + return WRC_Continue +} + +// Increase the walkerDepth when entering a subquery, and +// descrease when leaving the subquery. +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ + _ = pSelect + (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ + return WRC_Continue +} + +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ + _ = pSelect + (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- +} + +// No-op routine for the parse-tree walker. +// +// When this routine is the Walker.xExprCallback then expression trees +// are walked without any actions being taken at each node. Presumably, +// when this routine is used for Walker.xExprCallback then +// Walker.xSelectCallback is set to do something useful for every +// subquery in the parser tree. +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ + _ = NotUsed + _ = NotUsed2 + return WRC_Continue +} + +// No-op routine for the parse-tree walker for SELECT statements. +// subquery in the parser tree. +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ + _ = NotUsed + _ = NotUsed2 + return WRC_Continue +} + +//************* End of walker.c ********************************************* +//************* Begin file resolve.c **************************************** +// 2008 August 18 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains routines used for walking the parser tree and +// resolve all identifiers by associating them with a particular +// table and column. +// #include "sqliteInt.h" + +// Magic table number to mean the EXCLUDED table in an UPSERT statement. + +// Walk the expression tree pExpr and increase the aggregate function +// depth (the Expr.op2 field) by N on every TK_AGG_FUNCTION node. +// This needs to occur when copying a TK_AGG_FUNCTION node from an +// outer query into an inner subquery. +// +// incrAggFunctionDepth(pExpr,n) is the main routine. incrAggDepth(..) +// is a helper function - a callback for the tree walker. +// +// See also the sqlite3WindowExtraAggFuncDepth() routine in window.c +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { + *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) + } + return WRC_Continue +} + +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + if N > 0 { + // var w Walker at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{incrAggDepth})) + *(*int32)(unsafe.Pointer(bp + 40)) = N + Xsqlite3WalkExpr(tls, bp, pExpr) + } +} + +// Turn the pExpr expression into an alias for the iCol-th column of the +// result set in pEList. +// +// If the reference is followed by a COLLATE operator, then make sure +// the COLLATE operator is preserved. For example: +// +// SELECT a+b, c+d FROM t1 ORDER BY 1 COLLATE nocase; +// +// Should be transformed into: +// +// SELECT a+b, c+d FROM t1 ORDER BY (a+b) COLLATE nocase; +// +// The nSubquery parameter specifies how many levels of subquery the +// alias is removed from the original expression. The usual value is +// zero but it might be more if the alias is contained within a subquery +// of the original expression. The Expr.op2 field of TK_AGG_FUNCTION +// structures must be increased by the nSubquery amount. +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ + var pOrig uintptr // The iCol-th column of the result set + var pDup uintptr // Copy of pOrig + var db uintptr // The database connection + + pOrig = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(iCol)*32)).FpExpr + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + pDup = Xsqlite3ExprDup(tls, db, pOrig, 0) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3ExprDelete(tls, db, pDup) + pDup = uintptr(0) + } else { + incrAggFunctionDepth(tls, pDup, nSubquery) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLLATE { + + pDup = Xsqlite3ExprAddCollateString(tls, pParse, pDup, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + } + + // Before calling sqlite3ExprDelete(), set the EP_Static flag. This + // prevents ExprDelete() from deleting the Expr structure itself, + // allowing it to be repopulated by the memcpy() on the following line. + // The pExpr->u.zToken might point into memory that will be freed by the + // sqlite3DbFree(db, pDup) on the last line of this block, so be sure to + // make a copy of the token before doing the sqlite3DbFree(). + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Static) + Xsqlite3ExprDelete(tls, db, pExpr) + libc.Xmemcpy(tls, pExpr, pDup, uint64(unsafe.Sizeof(Expr{}))) + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(pExpr + 8)) != uintptr(0) { + + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = Xsqlite3DbStrDup(tls, db, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_MemToken) + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + if *(*uintptr)(unsafe.Pointer(pExpr + 64)) != uintptr(0) { + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr + } + } + Xsqlite3DbFree(tls, db, pDup) + } +} + +// Return TRUE if the name zCol occurs anywhere in the USING clause. +// +// Return FALSE if the USING clause is NULL or if it does not contain +// zCol. +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ + if pUsing != 0 { + var k int32 + for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { + if Xsqlite3StrICmp(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pUsing)).Fa+uintptr(k)*16)).FzName, zCol) == 0 { + return 1 + } + } + } + return 0 +} + +// Subqueries stores the original database, table and column names for their +// result sets in ExprList.a[].zSpan, in the form "DATABASE.TABLE.COLUMN". +// Check to see if the zSpan given to this routine matches the zDb, zTab, +// and zCol. If any of zDb, zTab, and zCol are NULL then those fields will +// match anything. +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ + var n int32 + var zSpan uintptr + if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { + return 0 + } + zSpan = (*ExprList_item)(unsafe.Pointer(pItem)).FzEName + for n = 0; *(*uint8)(unsafe.Pointer(zSpan + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'; n++ { + } + if zDb != 0 && (Xsqlite3_strnicmp(tls, zSpan, zDb, n) != 0 || int32(*(*uint8)(unsafe.Pointer(zDb + uintptr(n)))) != 0) { + return 0 + } + zSpan += uintptr(n + 1) + for n = 0; *(*uint8)(unsafe.Pointer(zSpan + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'; n++ { + } + if zTab != 0 && (Xsqlite3_strnicmp(tls, zSpan, zTab, n) != 0 || int32(*(*uint8)(unsafe.Pointer(zTab + uintptr(n)))) != 0) { + return 0 + } + zSpan += uintptr(n + 1) + if zCol != 0 && Xsqlite3StrICmp(tls, zSpan, zCol) != 0 { + return 0 + } + return 1 +} + +// Return TRUE if the double-quoted string mis-feature should be supported. +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ + if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { + return 1 + } // Always support for legacy schemas + if (*NameContext)(unsafe.Pointer(pTopNC)).FncFlags&NC_IsDDL != 0 { + // Currently parsing a DDL statement + if Xsqlite3WritableSchema(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DqsDML) != uint64(0) { + return 1 + } + return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DqsDDL) != uint64(0)) + } else { + // Currently parsing a DML statement + return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DqsDML) != uint64(0)) + } + return int32(0) +} + +// The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. +// return the appropriate colUsed mask. +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ + var n int32 + var pExTab uintptr + + n = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + + pExTab = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + + if (*Table)(unsafe.Pointer(pExTab)).FtabFlags&U32(TF_HasGenerated) != U32(0) && + int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pExTab)).FaCol+uintptr(n)*24)).FcolFlags)&COLFLAG_GENERATED != 0 { + + if int32((*Table)(unsafe.Pointer(pExTab)).FnCol) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { + return libc.Uint64(libc.Uint64FromInt32(-1)) + } + return Bitmask(uint64(1))<= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { + n = int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) - 1 + } + return Bitmask(uint64(1)) << n + } + return Bitmask(0) +} + +// Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up +// that name in the set of source tables in pSrcList and make the pExpr +// expression node refer back to that source column. The following changes +// are made to pExpr: +// +// pExpr->iDb Set the index in db->aDb[] of the database X +// (even if X is implied). +// pExpr->iTable Set to the cursor number for the table obtained +// from pSrcList. +// pExpr->y.pTab Points to the Table structure of X.Y (even if +// X and/or Y are implied.) +// pExpr->iColumn Set to the column number within the table. +// pExpr->op Set to TK_COLUMN. +// pExpr->pLeft Any expression this points to is deleted +// pExpr->pRight Any expression this points to is deleted. +// +// The zDb variable is the name of the database (the "X"). This value may be +// NULL meaning that name is of the form Y.Z or Z. Any available database +// can be used. The zTable variable is the name of the table (the "Y"). This +// value can be NULL if zDb is also NULL. If zTable is NULL it +// means that the form of the name is Z and that columns from any table +// can be used. +// +// If the name cannot be resolved unambiguously, leave an error message +// in pParse and return WRC_Abort. Return WRC_Prune on success. +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + var i int32 + var j int32 // Loop counters + var cnt int32 // Number of matching column names + var cntTab int32 // Number of matching table names + var nSubquery int32 // How many levels of subquery + var db uintptr // The database connection + var pItem uintptr // Use for looping over pSrcList items + var pMatch uintptr // The matching pSrcList item + var pTopNC uintptr // First namecontext in the list + var pSchema uintptr // Schema of the expression + var eNewExprOp int32 // New value for pExpr->op on success + var pTab uintptr // Table hold the row + var pCol uintptr + var hit int32 + var zTabName uintptr + var hCol U8 + var op int32 + var pUpsert uintptr + var iCol int32 + var hCol1 U8 + var pOrig uintptr + var zAs uintptr + var pEList uintptr + var pSrcList uintptr + var zErr uintptr + cnt = 0 + cntTab = 0 + nSubquery = 0 + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + pMatch = uintptr(0) + pTopNC = pNC + pSchema = uintptr(0) + eNewExprOp = TK_COLUMN + pTab = uintptr(0) // A column of pTab + + // the name context cannot be NULL. + // The Z in X.Y.Z cannot be NULL + + // Initialize the node to no-match + (*Expr)(unsafe.Pointer(pExpr)).FiTable = -1 + + // Translate the schema name in zDb into a pointer to the corresponding + // schema. If not found, pSchema will remain NULL and nothing will match + // resulting in an appropriate error message toward the end of this routine + if !(zDb != 0) { + goto __1 + } + + if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_PartIdx|NC_IsCheck) != 0) { + goto __2 + } + // Silently ignore database qualifiers inside CHECK constraints and + // partial indices. Do not raise errors because that might break + // legacy and because it does not hurt anything to just ignore the + // database name. + zDb = uintptr(0) + goto __3 +__2: + i = 0 +__4: + if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __6 + } + + if !(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName, zDb) == 0) { + goto __7 + } + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpSchema + goto __6 +__7: + ; + goto __5 +__5: + i++ + goto __4 + goto __6 +__6: + ; + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6323, zDb) == 0) { + goto __8 + } + // This branch is taken when the main database has been renamed + // using SQLITE_DBCONFIG_MAINDBNAME. + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName +__8: + ; +__3: + ; +__1: + ; + + // Start at the inner-most context and move outward until a match is found + +__9: + pSrcList = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList + + if !(pSrcList != 0) { + goto __12 + } + i = 0 + pItem = pSrcList + 8 /* &.a */ +__13: + if !(i < (*SrcList)(unsafe.Pointer(pSrcList)).FnSrc) { + goto __15 + } + pTab = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + + if !((*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 && (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselFlags&U32(SF_NestedFrom) != U32(0)) { + goto __16 + } + hit = 0 + pEList = (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FpEList + j = 0 +__17: + if !(j < (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { + goto __19 + } + if !(Xsqlite3MatchEName(tls, pEList+8+uintptr(j)*32, zCol, zTab, zDb) != 0) { + goto __20 + } + cnt++ + cntTab = 2 + pMatch = pItem + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar(j) + hit = 1 +__20: + ; + goto __18 +__18: + j++ + goto __17 + goto __19 +__19: + ; + if !(hit != 0 || zTab == uintptr(0)) { + goto __21 + } + goto __14 +__21: + ; +__16: + ; + if !(zDb != 0) { + goto __22 + } + if !((*Table)(unsafe.Pointer(pTab)).FpSchema != pSchema) { + goto __23 + } + goto __14 +__23: + ; + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6328) != 0) { + goto __24 + } + goto __14 +__24: + ; +__22: + ; + if !(zTab != 0) { + goto __25 + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { + zTabName = (*SrcItem)(unsafe.Pointer(pItem)).FzAlias + } else { + zTabName = (*Table)(unsafe.Pointer(pTab)).FzName + } + + if !(Xsqlite3StrICmp(tls, zTabName, zTab) != 0) { + goto __26 + } + goto __14 +__26: + ; + + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) { + goto __27 + } + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr+64) +__27: + ; +__25: + ; + hCol = Xsqlite3StrIHash(tls, zCol) + j = 0 + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol +__28: + if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __30 + } + if !(int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(hCol) && + Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0) { + goto __31 + } + // If there has been exactly one prior match and this match + // is for the right-hand table of a NATURAL JOIN or is in a + // USING clause, then skip this match. + if !(cnt == 1) { + goto __32 + } + if !(int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_NATURAL != 0) { + goto __33 + } + goto __29 +__33: + ; + if !(nameInUsingClause(tls, (*SrcItem)(unsafe.Pointer(pItem)).FpUsing, zCol) != 0) { + goto __34 + } + goto __29 +__34: + ; +__32: + ; + cnt++ + pMatch = pItem + // Substitute the rowid (column -1) for the INTEGER PRIMARY KEY + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = func() int16 { + if j == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + return int16(-1) + } + return I16(j) + }() + goto __30 +__31: + ; + goto __29 +__29: + j++ + pCol += 24 + goto __28 + goto __30 +__30: + ; + if !(0 == cnt && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { + goto __35 + } + cntTab++ + pMatch = pItem +__35: + ; + goto __14 +__14: + i++ + pItem += 112 + goto __13 + goto __15 +__15: + ; + if !(pMatch != 0) { + goto __36 + } + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SrcItem)(unsafe.Pointer(pMatch)).FiCursor + + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = (*SrcItem)(unsafe.Pointer(pMatch)).FpTab + // RIGHT JOIN not (yet) supported + + if !(int32((*SrcItem)(unsafe.Pointer(pMatch)).Ffg.Fjointype)&JT_LEFT != 0) { + goto __37 + } + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_CanBeNull) +__37: + ; + pSchema = (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpSchema +__36: + ; +__12: + ; // if( pSrcList ) + + // If we have not already resolved the name, then maybe + // it is a new.* or old.* trigger argument reference. Or + // maybe it is an excluded.* from an upsert. Or maybe it is + // a reference in the RETURNING clause to a table being modified. + if !(cnt == 0 && zDb == uintptr(0)) { + goto __38 + } + pTab = uintptr(0) + if !((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != uintptr(0)) { + goto __39 + } + op = int32((*Parse)(unsafe.Pointer(pParse)).FeTriggerOp) + + if !((*Parse)(unsafe.Pointer(pParse)).FbReturning != 0) { + goto __40 + } + if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UBaseReg != 0 && + (zTab == uintptr(0) || Xsqlite3StrICmp(tls, zTab, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab)).FzName) == 0)) { + goto __42 + } + (*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.Bool32(op != TK_DELETE) + pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab +__42: + ; + goto __41 +__40: + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6330, zTab) == 0) { + goto __43 + } + (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 + pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab + goto __44 +__43: + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6334, zTab) == 0) { + goto __45 + } + (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 + pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab +__45: + ; +__44: + ; +__41: + ; +__39: + ; + if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UUpsert != 0 && zTab != uintptr(0)) { + goto __46 + } + pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6338, zTab) == 0) { + goto __47 + } + pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab + (*Expr)(unsafe.Pointer(pExpr)).FiTable = EXCLUDED_TABLE_NUMBER +__47: + ; +__46: + ; + + if !(pTab != 0) { + goto __48 + } + hCol1 = Xsqlite3StrIHash(tls, zCol) + pSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema + cntTab++ + iCol = 0 + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol +__49: + if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __51 + } + if !(int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(hCol1) && + Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0) { + goto __52 + } + if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { + goto __53 + } + iCol = -1 +__53: + ; + goto __51 +__52: + ; + goto __50 +__50: + iCol++ + pCol += 24 + goto __49 + goto __51 +__51: + ; + if !(iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) && Xsqlite3IsRowid(tls, zCol) != 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { + goto __54 + } + // IMP: R-51414-32910 + iCol = -1 +__54: + ; + if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __55 + } + cnt++ + pMatch = uintptr(0) + if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == EXCLUDED_TABLE_NUMBER) { + goto __56 + } + + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __58 + } + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar(iCol) + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab + eNewExprOp = TK_COLUMN + goto __59 +__58: + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*Upsert)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNC + 16)))).FregData + int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) + eNewExprOp = TK_REGISTER +__59: + ; + goto __57 +__56: + ; + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab + if !((*Parse)(unsafe.Pointer(pParse)).FbReturning != 0) { + goto __60 + } + eNewExprOp = TK_REGISTER + (*Expr)(unsafe.Pointer(pExpr)).Fop2 = U8(TK_COLUMN) + (*Expr)(unsafe.Pointer(pExpr)).FiTable = *(*int32)(unsafe.Pointer(pNC + 16)) + (int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)*(*Expr)(unsafe.Pointer(pExpr)).FiTable + int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) + 1 + goto __61 +__60: + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = I16(iCol) + eNewExprOp = TK_TRIGGER + if !(iCol < 0) { + goto __62 + } + (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER) + goto __63 +__62: + if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == 0) { + goto __64 + } + + *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + if iCol >= 32 { + return 0xffffffff + } + return U32(U32(1)) << iCol + }() + goto __65 +__64: + ; + + *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + if iCol >= 32 { + return 0xffffffff + } + return U32(U32(1)) << iCol + }() +__65: + ; +__63: + ; +__61: + ; +__57: + ; +__55: + ; +__48: + ; +__38: + ; + + // Perhaps the name is a reference to the ROWID + if !(cnt == 0 && + cntTab == 1 && + pMatch != 0 && + (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) == 0 && + Xsqlite3IsRowid(tls, zCol) != 0 && + (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pMatch)).FpTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { + goto __66 + } + cnt = 1 + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = int16(-1) + (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER) +__66: + ; + + // If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z + // might refer to an result-set alias. This happens, for example, when + // we are resolving names in the WHERE clause of the following command: + // + // SELECT a+b AS x FROM table WHERE x<10; + // + // In cases like this, replace pExpr with a copy of the expression that + // forms the result set entry ("a+b" in the example) and return immediately. + // Note that the expression in the result set should have already been + // resolved by the time the WHERE clause is resolved. + // + // The ability to use an output result-set column in the WHERE, GROUP BY, + // or HAVING clauses, or as part of a larger expression in the ORDER BY + // clause is not standard SQL. This is a (goofy) SQLite extension, that + // is supported for backwards compatibility only. Hence, we issue a warning + // on sqlite3_log() whenever the capability is used. + if !(cnt == 0 && + (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UEList != 0 && + zTab == uintptr(0)) { + goto __67 + } + pEList = *(*uintptr)(unsafe.Pointer(pNC + 16)) + + j = 0 +__68: + if !(j < (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { + goto __70 + } + zAs = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*32)).FzEName + if !(int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(j)*32 + 20))&0x3>>0) == ENAME_NAME && + Xsqlite3_stricmp(tls, zAs, zCol) == 0) { + goto __71 + } + + pOrig = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*32)).FpExpr + if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { + goto __72 + } + Xsqlite3ErrorMsg(tls, pParse, ts+6347, libc.VaList(bp, zAs)) + return WRC_Abort +__72: + ; + if !((*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Win) != U32(0) && + ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { + goto __73 + } + Xsqlite3ErrorMsg(tls, pParse, ts+6378, libc.VaList(bp+8, zAs)) + return WRC_Abort +__73: + ; + if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { + goto __74 + } + Xsqlite3ErrorMsg(tls, pParse, ts+6415, 0) + return WRC_Abort +__74: + ; + resolveAlias(tls, pParse, pEList, j, pExpr, nSubquery) + cnt = 1 + pMatch = uintptr(0) + + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __75 + } + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) +__75: + ; + goto lookupname_end +__71: + ; + goto __69 +__69: + j++ + goto __68 + goto __70 +__70: + ; +__67: + ; + + // Advance to the next name context. The loop will exit when either + // we have a match (cnt>0) or when we run out of name contexts. + if !(cnt != 0) { + goto __76 + } + goto __11 +__76: + ; + pNC = (*NameContext)(unsafe.Pointer(pNC)).FpNext + nSubquery++ + goto __10 +__10: + if pNC != 0 { + goto __9 + } + goto __11 +__11: + ; + + // If X and Y are NULL (in other words if only the column name Z is + // supplied) and the value of Z is enclosed in double-quotes, then + // Z is a string literal if it doesn't match any column names. In that + // case, we need to return right away and not make any changes to + // pExpr. + // + // Because no reference was made to outer contexts, the pNC->nRef + // fields are not changed in any context. + if !(cnt == 0 && zTab == uintptr(0)) { + goto __77 + } + + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != U32(0) && + areDoubleQuotedStringsEnabled(tls, db, pTopNC) != 0) { + goto __78 + } + // If a double-quoted identifier does not match any known column name, + // then treat it as a string. + // + // This hack was added in the early days of SQLite in a misguided attempt + // to be compatible with MySQL 3.x, which used double-quotes for strings. + // I now sorely regret putting in this hack. The effect of this hack is + // that misspelled identifier names are silently converted into strings + // rather than causing an error, to the frustration of countless + // programmers. To all those frustrated programmers, my apologies. + // + // Someday, I hope to get rid of this hack. Unfortunately there is + // a huge amount of legacy SQL that uses it. So for now, we just + // issue a warning. + Xsqlite3_log(tls, SQLITE_WARNING, + ts+6433, libc.VaList(bp+16, zCol)) + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) + libc.Xmemset(tls, pExpr+64, 0, uint64(unsafe.Sizeof(struct{ FpTab uintptr }{}))) + return WRC_Prune +__78: + ; + if !(Xsqlite3ExprIdToTrueFalse(tls, pExpr) != 0) { + goto __79 + } + return WRC_Prune +__79: + ; +__77: + ; + + // cnt==0 means there was not match. cnt>1 means there were two or + // more matches. Either way, we have an error. + if !(cnt != 1) { + goto __80 + } + if cnt == 0 { + zErr = ts + 6468 /* "no such column" */ + } else { + zErr = ts + 6483 /* "ambiguous column..." */ + } + if !(zDb != 0) { + goto __81 + } + Xsqlite3ErrorMsg(tls, pParse, ts+6505, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + goto __82 +__81: + if !(zTab != 0) { + goto __83 + } + Xsqlite3ErrorMsg(tls, pParse, ts+6518, libc.VaList(bp+56, zErr, zTab, zCol)) + goto __84 +__83: + Xsqlite3ErrorMsg(tls, pParse, ts+6528, libc.VaList(bp+80, zErr, zCol)) +__84: + ; +__82: + ; + Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + (*NameContext)(unsafe.Pointer(pTopNC)).FnNcErr++ +__80: + ; + + // If a column from a table in pSrcList is referenced, then record + // this fact in the pSrcList.a[].colUsed bitmask. Column 0 causes + // bit 0 to be set. Column 1 sets bit 1. And so forth. Bit 63 is + // set if the 63rd or any subsequent column is used. + // + // The colUsed mask is an optimization used to help determine if an + // index is a covering index. The correct answer is still obtained + // if the mask contains extra set bits. However, it is important to + // avoid setting bits beyond the maximum column number of the table. + // (See ticket [b92e5e8ec2cdbaa1]). + // + // If a generated column is referenced, set bits for every column + // of the table. + if !(int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 && pMatch != uintptr(0)) { + goto __85 + } + *(*Bitmask)(unsafe.Pointer(pMatch + 88)) |= Xsqlite3ExprColUsed(tls, pExpr) +__85: + ; + + // Clean up and return + if !!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { + goto __86 + } + Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + (*Expr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0) + Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + (*Expr)(unsafe.Pointer(pExpr)).FpRight = uintptr(0) +__86: + ; + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(eNewExprOp) + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Leaf) +lookupname_end: + if !(cnt == 1) { + goto __87 + } + + if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FxAuth != 0 && + (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER)) { + goto __89 + } + Xsqlite3AuthRead(tls, pParse, pExpr, pSchema, (*NameContext)(unsafe.Pointer(pNC)).FpSrcList) +__89: + ; + // Increment the nRef value on all name contexts from TopNC up to + // the point where the name matched. +__90: + ; + (*NameContext)(unsafe.Pointer(pTopNC)).FnRef++ + if !(pTopNC == pNC) { + goto __93 + } + goto __92 +__93: + ; + pTopNC = (*NameContext)(unsafe.Pointer(pTopNC)).FpNext + goto __91 +__91: + goto __90 + goto __92 +__92: + ; + return WRC_Prune + goto __88 +__87: + return WRC_Abort +__88: + ; + return int32(0) +} + +// Allocate and return a pointer to an expression to load the column iCol +// from datasource iSrc in SrcList pSrc. +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ + var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) + if p != 0 { + var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 + var pTab uintptr + + pTab = libc.AssignPtrUintptr(p+64, (*SrcItem)(unsafe.Pointer(pItem)).FpTab) + (*Expr)(unsafe.Pointer(p)).FiTable = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor + if int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FiPKey) == iCol { + (*Expr)(unsafe.Pointer(p)).FiColumn = int16(-1) + } else { + (*Expr)(unsafe.Pointer(p)).FiColumn = YnVar(iCol) + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != U32(0) && + int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_GENERATED != 0 { + + (*SrcItem)(unsafe.Pointer(pItem)).FcolUsed = func() uint64 { + if int32((*Table)(unsafe.Pointer(pTab)).FnCol) >= 64 { + return libc.Uint64(libc.Uint64FromInt32(-1)) + } + return Bitmask(uint64(1))<= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { + return int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) - 1 + } + return iCol + }() + } + } + } + return p +} + +// Report an error that an expression is not valid for some set of +// pNC->ncFlags values determined by validMask. +// +// static void notValid( +// Parse *pParse, // Leave error message here +// NameContext *pNC, // The name context +// const char *zMsg, // Type of error +// int validMask, // Set of contexts for which prohibited +// Expr *pExpr // Invalidate this expression on error +// ){...} +// +// As an optimization, since the conditional is almost always false +// (because errors are rare), the conditional is moved outside of the +// function call using a macro. +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var zIn uintptr = ts + 6535 /* "partial index WH..." */ + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { + zIn = ts + 6563 /* "index expression..." */ + } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { + zIn = ts + 6581 /* "CHECK constraint..." */ + } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { + zIn = ts + 6599 /* "generated column..." */ + } + Xsqlite3ErrorMsg(tls, pParse, ts+6617, libc.VaList(bp, zMsg, zIn)) + if pExpr != 0 { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) + } + Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) +} + +// Expression p should encode a floating point value between 1.0 and 0.0. +// Return 1024 times this value. Or return -1 if p is not a floating point +// value between 1.0 and 0.0. +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*float64)(unsafe.Pointer(bp /* r */)) = -1.0 + if int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_FLOAT { + return -1 + } + + Xsqlite3AtoF(tls, *(*uintptr)(unsafe.Pointer(p + 8)), bp, Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(p + 8))), uint8(SQLITE_UTF8)) + + if *(*float64)(unsafe.Pointer(bp)) > 1.0 { + return -1 + } + return libc.Int32FromFloat64(*(*float64)(unsafe.Pointer(bp)) * 134217728.0) +} + +// This routine is callback for sqlite3WalkExpr(). +// +// Resolve symbolic names into TK_COLUMN operators for the current +// node in the expression tree. Return 0 to continue the search down +// the tree or 2 to abort the tree walk. +// +// This routine also does error checking and name resolution for +// function names. The operator for aggregate functions is changed +// to TK_AGG_FUNCTION. +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + var pNC uintptr + var pParse uintptr + + pNC = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + + pParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse + + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + + // The special operator TK_ROW means use the rowid for the first + // column in the FROM clause. This is used by the LIMIT and ORDER BY + // clause processing on UPDATE and DELETE statements, and by + // UPDATE ... FROM statement processing. + case TK_ROW: + { + var pSrcList uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList + var pItem uintptr + + pItem = pSrcList + 8 /* &.a */ + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_COLUMN) + + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor + (*Expr)(unsafe.Pointer(pExpr)).FiColumn-- + (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER) + break + + } + + // An optimization: Attempt to convert + // + // "expr IS NOT NULL" --> "TRUE" + // "expr IS NULL" --> "FALSE" + // + // if we can prove that "expr" is never NULL. Call this the + // "NOT NULL strength reduction optimization". + // + // If this optimization occurs, also restore the NameContext ref-counts + // to the state they where in before the "column" LHS expression was + // resolved. This prevents "column" from being counted as having been + // referenced, which might prevent a SELECT from being erroneously + // marked as correlated. + case TK_NOTNULL: + fallthrough + case TK_ISNULL: + { + // var anRef [8]int32 at bp+64, 32 + + var p uintptr + var i int32 + i = 0 + p = pNC + __1: + if !(p != 0 && i < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0))))) { + goto __3 + } + { + *(*int32)(unsafe.Pointer(bp + 64 + uintptr(i)*4)) = (*NameContext)(unsafe.Pointer(p)).FnRef + + } + goto __2 + __2: + p = (*NameContext)(unsafe.Pointer(p)).FpNext + i++ + goto __1 + goto __3 + __3: + ; + Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + if 0 == Xsqlite3ExprCanBeNull(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL { + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6637 /* "true" */ + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) + } else { + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6642 /* "false" */ + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) + } + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) + i = 0 + p = pNC + __4: + if !(p != 0 && i < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0))))) { + goto __6 + } + { + (*NameContext)(unsafe.Pointer(p)).FnRef = *(*int32)(unsafe.Pointer(bp + 64 + uintptr(i)*4)) + + } + goto __5 + __5: + p = (*NameContext)(unsafe.Pointer(p)).FpNext + i++ + goto __4 + goto __6 + __6: + ; + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + (*Expr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0) + } + return WRC_Prune + + } + + // A column name: ID + // Or table name and column name: ID.ID + // Or a database, table and column: ID.ID.ID + // + // The TK_ID and TK_OUT cases are combined so that there will only + // be one call to lookupName(). Then the compiler will in-line + // lookupName() for a size reduction and performance increase. + case TK_ID: + fallthrough + case TK_DOT: + { + var zColumn uintptr + var zTable uintptr + var zDb uintptr + var pRight uintptr + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_ID { + zDb = uintptr(0) + zTable = uintptr(0) + + zColumn = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + } else { + var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { + notValidImpl(tls, pParse, pNC, ts+6648, uintptr(0), pExpr) + } + + pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight + if int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_ID { + zDb = uintptr(0) + } else { + + zDb = *(*uintptr)(unsafe.Pointer(pLeft + 8)) + pLeft = (*Expr)(unsafe.Pointer(pRight)).FpLeft + pRight = (*Expr)(unsafe.Pointer(pRight)).FpRight + } + + zTable = *(*uintptr)(unsafe.Pointer(pLeft + 8)) + zColumn = *(*uintptr)(unsafe.Pointer(pRight + 8)) + + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameTokenRemap(tls, pParse, pExpr, pRight) + Xsqlite3RenameTokenRemap(tls, pParse, pExpr+64, pLeft) + } + } + return lookupName(tls, pParse, zDb, zTable, zColumn, pNC, pExpr) + + } + + // Resolve function names + case TK_FUNCTION: + { + var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) // The argument list + var n int32 + if pList != 0 { + n = (*ExprList)(unsafe.Pointer(pList)).FnExpr + } else { + n = 0 + } // Number of arguments + var no_such_func int32 = 0 // True if no such function exists + var wrong_num_args int32 = 0 // True if wrong number of arguments + var is_agg int32 = 0 // True if is an aggregate function + var zId uintptr // The function name. + var pDef uintptr // Information about the function + var enc U8 = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc // The database encoding + var savedAllowFlags int32 = (*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_AllowAgg | NC_AllowWin) + var pWin uintptr = func() uintptr { + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) && int32((*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FeFrmType) != TK_FILTER { + return *(*uintptr)(unsafe.Pointer(pExpr + 64)) + } + return uintptr(0) + }() + + zId = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + pDef = Xsqlite3FindFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zId, n, enc, uint8(0)) + if pDef == uintptr(0) { + pDef = Xsqlite3FindFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zId, -2, enc, uint8(0)) + if pDef == uintptr(0) { + no_such_func = 1 + } else { + wrong_num_args = 1 + } + } else { + is_agg = libc.Bool32((*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) + if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_UNLIKELY) != 0 { + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Unlikely) + if n == 2 { + (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*32)).FpExpr) + if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { + Xsqlite3ErrorMsg(tls, pParse, + + ts+6665, libc.VaList(bp, pExpr)) + (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ + } + } else { + // EVIDENCE-OF: R-61304-29449 The unlikely(X) function is + // equivalent to likelihood(X, 0.0625). + // EVIDENCE-OF: R-01283-11636 The unlikely(X) function is + // short-hand for likelihood(X,0.0625). + // EVIDENCE-OF: R-36850-34127 The likely(X) function is short-hand + // for likelihood(X,0.9375). + // EVIDENCE-OF: R-53436-40973 The likely(X) function is equivalent + // to likelihood(X,0.9375). + // TUNING: unlikely() probability is 0.0625. likely() is 0.9375 + (*Expr)(unsafe.Pointer(pExpr)).FiTable = func() int32 { + if int32(*(*uint8)(unsafe.Pointer((*FuncDef)(unsafe.Pointer(pDef)).FzName))) == 'u' { + return 8388608 + } + return 125829120 + }() + } + } + { + var auth int32 = Xsqlite3AuthCheck(tls, pParse, SQLITE_FUNCTION, uintptr(0), (*FuncDef)(unsafe.Pointer(pDef)).FzName, uintptr(0)) + if auth != SQLITE_OK { + if auth == SQLITE_DENY { + Xsqlite3ErrorMsg(tls, pParse, ts+6729, + libc.VaList(bp+8, pExpr)) + (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ + } + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) + return WRC_Prune + } + + } + if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) != 0 { + // For the purposes of the EP_ConstFunc flag, date and time + // functions and other functions that change slowly are considered + // constant because they are constant for the duration of one query. + // This allows them to be factored out of inner loops. + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_ConstFunc) + } + if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { + // Clearly non-deterministic functions like random(), but also + // date/time functions that use 'now', and other functions like + // sqlite_version() that might change over time cannot be used + // in an index or generated column. Curiously, they can be used + // in a CHECK constraint. SQLServer, MySQL, and PostgreSQL all + // all this. + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { + notValidImpl(tls, pParse, pNC, ts+6765, uintptr(0), pExpr) + } + + } else { + // Must fit in 8 bits + (*Expr)(unsafe.Pointer(pExpr)).Fop2 = U8((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_SelfRef) + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_FromDDL != 0 { + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_FromDDL) + } + } + if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INTERNAL) != U32(0) && + int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmDbFlags&U32(DBFLAG_InternalFunc) == U32(0) { + // Internal-use-only functions are disallowed unless the + // SQL is being compiled using sqlite3NestedParse() or + // the SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control has be + // used to activate internal functions for testing purposes + no_such_func = 1 + pDef = uintptr(0) + } else if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) != U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + Xsqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef) + } + } + + if 0 == libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + + if pDef != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0) && pWin != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+6793, libc.VaList(bp+16, pExpr)) + (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ + } else if is_agg != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 || + is_agg != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 && !(pWin != 0) || + is_agg != 0 && pWin != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 { + var zType uintptr + if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 || pWin != 0 { + zType = ts + 6836 /* "window" */ + } else { + zType = ts + 6843 /* "aggregate" */ + } + Xsqlite3ErrorMsg(tls, pParse, ts+6853, libc.VaList(bp+24, zType, pExpr)) + (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ + is_agg = 0 + } else if no_such_func != 0 && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+6881, libc.VaList(bp+40, pExpr)) + (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ + } else if wrong_num_args != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+6903, + libc.VaList(bp+48, pExpr)) + (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ + } else if is_agg == 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + Xsqlite3ErrorMsg(tls, pParse, + ts+6947, + libc.VaList(bp+56, pExpr)) + (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ + } + if is_agg != 0 { + // Window functions may not be arguments of aggregate functions. + // Or arguments of other window functions. But aggregate functions + // may be arguments for window functions. + *(*int32)(unsafe.Pointer(pNC + 40)) &= ^(NC_AllowWin | func() int32 { + if !(pWin != 0) { + return NC_AllowAgg + } + return 0 + }()) + } + } else if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + is_agg = 1 + } + Xsqlite3WalkExprList(tls, pWalker, pList) + if is_agg != 0 { + if pWin != 0 { + var pSel uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpWinSelect + + if libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) == 0 { + Xsqlite3WindowUpdate(tls, pParse, func() uintptr { + if pSel != 0 { + return (*Select)(unsafe.Pointer(pSel)).FpWinDefn + } + return uintptr(0) + }(), pWin, pDef) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + break + } + } + Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpPartition) + Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) + Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpFilter) + Xsqlite3WindowLink(tls, pSel, pWin) + *(*int32)(unsafe.Pointer(pNC + 40)) |= NC_HasWin + } else { + var pNC2 uintptr // For looping up thru outer contexts + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_FUNCTION) + (*Expr)(unsafe.Pointer(pExpr)).Fop2 = U8(0) + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) + } + pNC2 = pNC + for pNC2 != 0 && + Xsqlite3ReferencesSrcList(tls, pParse, pExpr, (*NameContext)(unsafe.Pointer(pNC2)).FpSrcList) == 0 { + (*Expr)(unsafe.Pointer(pExpr)).Fop2++ + pNC2 = (*NameContext)(unsafe.Pointer(pNC2)).FpNext + } + + if pNC2 != 0 && pDef != 0 { + + *(*int32)(unsafe.Pointer(pNC2 + 40)) |= int32(U32(NC_HasAgg) | + ((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags^U32(SQLITE_FUNC_ANYORDER))& + U32(SQLITE_FUNC_MINMAX|SQLITE_FUNC_ANYORDER)) + } + } + *(*int32)(unsafe.Pointer(pNC + 40)) |= savedAllowFlags + } + // FIX ME: Compute pExpr->affinity based on the expected return + // type of the function + return WRC_Prune + + } + case TK_SELECT: + fallthrough + case TK_EXISTS: + fallthrough + case TK_IN: + { + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef + + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { + notValidImpl(tls, pParse, pNC, ts+6995, pExpr, pExpr) + } else { + Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) + } + + if nRef != (*NameContext)(unsafe.Pointer(pNC)).FnRef { + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_VarSelect) + *(*int32)(unsafe.Pointer(pNC + 40)) |= NC_VarSelect + } + } + break + + } + case TK_VARIABLE: + { + + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { + notValidImpl(tls, pParse, pNC, ts+7006, pExpr, pExpr) + } + + break + + } + case TK_IS: + fallthrough + case TK_ISNOT: + { + var pRight uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + + // Handle special cases of "x IS TRUE", "x IS FALSE", "x IS NOT TRUE", + // and "x IS NOT FALSE". + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_ID || int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_TRUEFALSE) { + var rc int32 = resolveExprStep(tls, pWalker, pRight) + if rc == WRC_Abort { + return WRC_Abort + } + if int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_TRUEFALSE { + (*Expr)(unsafe.Pointer(pExpr)).Fop2 = (*Expr)(unsafe.Pointer(pExpr)).Fop + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUTH) + return WRC_Continue + } + } + + } + fallthrough + case TK_BETWEEN: + fallthrough + case TK_EQ: + fallthrough + case TK_NE: + fallthrough + case TK_LT: + fallthrough + case TK_LE: + fallthrough + case TK_GT: + fallthrough + case TK_GE: + { + var nLeft int32 + var nRight int32 + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + break + } + + nLeft = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_BETWEEN { + + nRight = Xsqlite3ExprVectorSize(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8)).FpExpr) + if nRight == nLeft { + nRight = Xsqlite3ExprVectorSize(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8+1*32)).FpExpr) + } + } else { + + nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + } + if nLeft != nRight { + + Xsqlite3ErrorMsg(tls, pParse, ts+6415, 0) + Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + } + break + + } + } + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return WRC_Abort + } + return WRC_Continue +} + +// pEList is a list of expressions which are really the result set of the +// a SELECT statement. pE is a term in an ORDER BY or GROUP BY clause. +// This routine checks to see if pE is a simple identifier which corresponds +// to the AS-name of one of the terms of the expression list. If it is, +// this routine return an integer between 1 and N where N is the number of +// elements in pEList, corresponding to the matching entry. If there is +// no match, or if pE is not a simple identifier, then this routine +// return 0. +// +// pEList has been resolved. pE has not. +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ + var i int32 // Loop counter + + _ = pParse + + if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_ID { + var zCol uintptr + + zCol = *(*uintptr)(unsafe.Pointer(pE + 8)) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + if int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME && + Xsqlite3_stricmp(tls, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName, zCol) == 0 { + return i + 1 + } + } + } + return 0 +} + +// pE is a pointer to an expression which is a single term in the +// ORDER BY of a compound SELECT. The expression has not been +// name resolved. +// +// At the point this routine is called, we already know that the +// ORDER BY term is not an integer index into the result set. That +// case is handled by the calling routine. +// +// Attempt to match pE against result set columns in the left-most +// SELECT statement. Return the index i of the matching column, +// as an indication to the caller that it should sort by the i-th column. +// The left-most column is 1. In other words, the value returned is the +// same integer value that would be used in the SQL statement to indicate +// the column. +// +// If there is no match, return 0. Return -1 if an error occurs. +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var i int32 // Loop counter + var pEList uintptr // The columns of the result set + // var nc NameContext at bp, 56 + // Name context for resolving pE + var db uintptr // Database connection + var rc int32 // Return code from subprocedures + var savedSuppErr U8 // Saved value of db->suppressErr + + pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList + + // Resolve all names in the ORDER BY term expression + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp /* &nc */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp /* &nc */)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc + *(*uintptr)(unsafe.Pointer(bp + 16)) = pEList + (*NameContext)(unsafe.Pointer(bp /* &nc */)).FncFlags = NC_AllowAgg | NC_UEList | NC_NoSelect + (*NameContext)(unsafe.Pointer(bp /* &nc */)).FnNcErr = 0 + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + savedSuppErr = (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr + (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = U8(1) + rc = Xsqlite3ResolveExprNames(tls, bp, pE) + (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = savedSuppErr + if rc != 0 { + return 0 + } + + // Try to match the ORDER BY expression against an expression + // in the result set. Return an 1-based index of the matching + // result-set entry. + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + if Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr, pE, -1) < 2 { + return i + 1 + } + } + + // If no match, return 0. + return 0 +} + +// Generate an ORDER BY or GROUP BY term out-of-range error. +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + Xsqlite3ErrorMsg(tls, pParse, + + ts+7017, libc.VaList(bp, i, zType, mx)) + Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) +} + +// Analyze the ORDER BY clause in a compound SELECT statement. Modify +// each term of the ORDER BY clause is a constant integer between 1 +// and N where N is the number of columns in the compound SELECT. +// +// ORDER BY terms that are already an integer between 1 and N are +// unmodified. ORDER BY terms that are integers outside the range of +// 1 through N generate an error. ORDER BY terms that are expressions +// are matched against result set expressions of compound SELECT +// beginning with the left-most SELECT and working toward the right. +// At the first match, the ORDER BY expression is transformed into +// the integer column number. +// +// Return the number of errors seen. +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var i int32 + var pOrderBy uintptr + var pEList uintptr + var db uintptr + var moreToDo int32 = 1 + + pOrderBy = (*Select)(unsafe.Pointer(pSelect)).FpOrderBy + if pOrderBy == uintptr(0) { + return 0 + } + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { + Xsqlite3ErrorMsg(tls, pParse, ts+7073, 0) + return 1 + } + for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { + libc.SetBitFieldPtr8Uint32(pOrderBy+8+uintptr(i)*32+20, uint32(0), 2, 0x4) + } + (*Select)(unsafe.Pointer(pSelect)).FpNext = uintptr(0) + for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { + (*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpPrior)).FpNext = pSelect + pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior + } + for pSelect != 0 && moreToDo != 0 { + var pItem uintptr + moreToDo = 0 + pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList + + i = 0 + pItem = pOrderBy + 8 /* &.a */ + __1: + if !(i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) { + goto __3 + } + { + *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = -1 + var pE uintptr + var pDup uintptr + if uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x4>>2)) != 0 { + goto __2 + } + pE = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) + if pE == uintptr(0) { + goto __2 + } + if Xsqlite3ExprIsInteger(tls, pE, bp+8) != 0 { + if *(*int32)(unsafe.Pointer(bp + 8)) <= 0 || *(*int32)(unsafe.Pointer(bp + 8)) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr { + resolveOutOfRangeError(tls, pParse, ts+7107, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + return 1 + } + } else { + *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = resolveAsName(tls, pParse, pEList, pE) + if *(*int32)(unsafe.Pointer(bp + 8)) == 0 { + // Now test if expression pE matches one of the values returned + // by pSelect. In the usual case this is done by duplicating the + // expression, resolving any symbols in it, and then comparing + // it against each expression returned by the SELECT statement. + // Once the comparisons are finished, the duplicate expression + // is deleted. + // + // If this is running as part of an ALTER TABLE operation and + // the symbols resolve successfully, also resolve the symbols in the + // actual expression. This allows the code in alter.c to modify + // column references within the ORDER BY expression as required. + pDup = Xsqlite3ExprDup(tls, db, pE, 0) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + + *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = resolveOrderByTermToExprList(tls, pParse, pSelect, pDup) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && *(*int32)(unsafe.Pointer(bp + 8)) > 0 { + resolveOrderByTermToExprList(tls, pParse, pSelect, pE) + } + } + Xsqlite3ExprDelete(tls, db, pDup) + } + } + if *(*int32)(unsafe.Pointer(bp + 8)) > 0 { + // Convert the ORDER BY term into an integer column number iCol, + // taking care to preserve the COLLATE clause if it exists. + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, uintptr(0)) + if pNew == uintptr(0) { + return 1 + } + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_IntValue) + *(*int32)(unsafe.Pointer(pNew + 8)) = *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) + if (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr == pE { + (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pNew + } else { + var pParent uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr + + for int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pParent)).FpLeft)).Fop) == TK_COLLATE { + pParent = (*Expr)(unsafe.Pointer(pParent)).FpLeft + } + + (*Expr)(unsafe.Pointer(pParent)).FpLeft = pNew + } + Xsqlite3ExprDelete(tls, db, pE) + *(*U16)(unsafe.Pointer(pItem + 24)) = U16(*(*int32)(unsafe.Pointer(bp + 8 /* iCol */))) + } + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(1), 2, 0x4) + } else { + moreToDo = 1 + } + + } + goto __2 + __2: + i++ + pItem += 32 + goto __1 + goto __3 + __3: + ; + pSelect = (*Select)(unsafe.Pointer(pSelect)).FpNext + } + for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { + if int32(*(*uint8)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 20))&0x4>>2) == 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+7113, libc.VaList(bp, i+1)) + return 1 + } + } + return 0 +} + +// Check every term in the ORDER BY or GROUP BY clause pOrderBy of +// the SELECT statement pSelect. If any term is reference to a +// result set expression (as determined by the ExprList.a.u.x.iOrderByCol +// field) then convert that term into a copy of the corresponding result set +// column. +// +// If any errors are detected, add an error message to pParse and +// return non-zero. Return zero if no errors are seen. +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var i int32 + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pEList uintptr + var pItem uintptr + + if pOrderBy == uintptr(0) || (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + return 0 + } + if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { + Xsqlite3ErrorMsg(tls, pParse, ts+7174, libc.VaList(bp, zType)) + return 1 + } + pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList + // sqlite3SelectNew() guarantees this + i = 0 + pItem = pOrderBy + 8 /* &.a */ +__1: + if !(i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) { + goto __3 + } + { + if *(*U16)(unsafe.Pointer(pItem + 24)) != 0 { + if int32(*(*U16)(unsafe.Pointer(pItem + 24))) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr { + resolveOutOfRangeError(tls, pParse, zType, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, uintptr(0)) + return 1 + } + resolveAlias(tls, pParse, pEList, int32(*(*U16)(unsafe.Pointer(pItem + 24)))-1, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr, 0) + } + + } + goto __2 +__2: + i++ + pItem += 32 + goto __1 + goto __3 +__3: + ; + return 0 +} + +// Walker callback for windowRemoveExprFromSelect(). +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ + _ = pWalker + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + Xsqlite3WindowUnlinkFromSelect(tls, pWin) + } + return WRC_Continue +} + +// Remove any Window objects owned by the expression pExpr from the +// Select.pWin list of Select object pSelect. +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + if (*Select)(unsafe.Pointer(pSelect)).FpWin != 0 { + // var sWalker Walker at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{resolveRemoveWindowsCb})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = pSelect + Xsqlite3WalkExpr(tls, bp, pExpr) + } +} + +// pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect. +// The Name context of the SELECT statement is pNC. zType is either +// "ORDER" or "GROUP" depending on which type of clause pOrderBy is. +// +// This routine resolves each term of the clause into an expression. +// If the order-by term is an integer I between 1 and N (where N is the +// number of columns in the result set of the SELECT) then the expression +// in the resolution is a copy of the I-th result-set expression. If +// the order-by term is an identifier that corresponds to the AS-name of +// a result-set expression, then the term resolves to a copy of the +// result-set expression. Otherwise, the expression is resolved in +// the usual way - using sqlite3ResolveExprNames(). +// +// This routine returns the number of errors. If errors occur, then +// an appropriate error message might be left in pParse. (OOM errors +// excepted.) +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i int32 + var j int32 // Loop counters + // var iCol int32 at bp, 4 + // Column number + var pItem uintptr // A term of the ORDER BY clause + var pParse uintptr // Parsing context + var nResult int32 // Number of terms in the result set + + nResult = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList)).FnExpr + pParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse + i = 0 + pItem = pOrderBy + 8 /* &.a */ +__1: + if !(i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) { + goto __3 + } + { + var pE uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr + var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pE) + if pE2 == uintptr(0) { + goto __2 + } + if int32(*(*uint8)(unsafe.Pointer(zType))) != 'G' { + *(*int32)(unsafe.Pointer(bp /* iCol */)) = resolveAsName(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, pE2) + if *(*int32)(unsafe.Pointer(bp)) > 0 { + // If an AS-name match is found, mark this ORDER BY column as being + // a copy of the iCol-th result-set column. The subsequent call to + // sqlite3ResolveOrderGroupBy() will convert the expression to a + // copy of the iCol-th result-set expression. + *(*U16)(unsafe.Pointer(pItem + 24)) = U16(*(*int32)(unsafe.Pointer(bp /* iCol */))) + goto __2 + } + } + if Xsqlite3ExprIsInteger(tls, pE2, bp) != 0 { + // The ORDER BY term is an integer constant. Again, set the column + // number so that sqlite3ResolveOrderGroupBy() will convert the + // order-by term to a copy of the result-set expression + if *(*int32)(unsafe.Pointer(bp)) < 1 || *(*int32)(unsafe.Pointer(bp)) > 0xffff { + resolveOutOfRangeError(tls, pParse, zType, i+1, nResult, pE2) + return 1 + } + *(*U16)(unsafe.Pointer(pItem + 24)) = U16(*(*int32)(unsafe.Pointer(bp /* iCol */))) + goto __2 + } + + // Otherwise, treat the ORDER BY term as an ordinary expression + *(*U16)(unsafe.Pointer(pItem + 24)) = U16(0) + if Xsqlite3ResolveExprNames(tls, pNC, pE) != 0 { + return 1 + } + for j = 0; j < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList)).FnExpr; j++ { + if Xsqlite3ExprCompare(tls, uintptr(0), pE, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList+8+uintptr(j)*32)).FpExpr, -1) == 0 { + // Since this expresion is being changed into a reference + // to an identical expression in the result set, remove all Window + // objects belonging to the expression from the Select.pWin list. + windowRemoveExprFromSelect(tls, pSelect, pE) + *(*U16)(unsafe.Pointer(pItem + 24)) = U16(j + 1) + } + } + + } + goto __2 +__2: + i++ + pItem += 32 + goto __1 + goto __3 +__3: + ; + return Xsqlite3ResolveOrderGroupBy(tls, pParse, pSelect, pOrderBy, zType) +} + +// Resolve names in the SELECT statement p and all of its descendants. +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var pOuterNC uintptr // Context that contains this SELECT + // var sNC NameContext at bp, 56 + // Name context of this SELECT + var isCompound int32 // True if p is a compound select + var nCompound int32 // Number of compound terms processed so far + var pParse uintptr // Parsing context + var i int32 // Loop counter + var pGroupBy uintptr // The GROUP BY clause + var pLeftmost uintptr // Left-most of SELECT of a compound + var db uintptr // Database connection + + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Resolved) != 0 { + return WRC_Prune + } + pOuterNC = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + pParse = (*Walker)(unsafe.Pointer(pWalker)).FpParse + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + // Normally sqlite3SelectExpand() will be called first and will have + // already expanded this SELECT. However, if this is a subquery within + // an expression, sqlite3ResolveExprNames() will be called without a + // prior call to sqlite3SelectExpand(). When that happens, let + // sqlite3SelectPrep() do all of the processing for this SELECT. + // sqlite3SelectPrep() will invoke both sqlite3SelectExpand() and + // this routine in the correct order. + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Expanded) == U32(0) { + Xsqlite3SelectPrep(tls, pParse, p, pOuterNC) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return WRC_Abort + } + return WRC_Prune + } + + isCompound = libc.Bool32((*Select)(unsafe.Pointer(p)).FpPrior != uintptr(0)) + nCompound = 0 + pLeftmost = p + for p != 0 { + + // SF_Resolved not set if errors suppressed + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_Resolved) + + // Resolve the expressions in the LIMIT and OFFSET clauses. These + // are not allowed to refer to any names, so pass an empty NameContext. + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpWinSelect = p + if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpLimit) != 0 { + return WRC_Abort + } + + // If the SF_Converted flags is set, then this Select object was + // was created by the convertCompoundSelectToSubquery() function. + // In this case the ORDER BY clause (p->pOrderBy) should be resolved + // as if it were part of the sub-query, not the parent. This block + // moves the pOrderBy down to the sub-query. It will be moved back + // after the names have been resolved. + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Converted) != 0 { + var pSub uintptr = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpSelect + + (*Select)(unsafe.Pointer(pSub)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy + (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) + } + + // Recursively resolve names in all subqueries in the FROM clause + for i = 0; i < (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc; i++ { + var pItem uintptr = (*Select)(unsafe.Pointer(p)).FpSrc + 8 + uintptr(i)*112 + if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 && (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselFlags&U32(SF_Resolved) == U32(0) { + var nRef int32 + if pOuterNC != 0 { + nRef = (*NameContext)(unsafe.Pointer(pOuterNC)).FnRef + } else { + nRef = 0 + } + var zSavedContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext + + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = (*SrcItem)(unsafe.Pointer(pItem)).FzName + } + Xsqlite3ResolveSelectNames(tls, pParse, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect, pOuterNC) + (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedContext + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return WRC_Abort + } + + // If the number of references to the outer context changed when + // expressions in the sub-select were resolved, the sub-select + // is correlated. It is not required to check the refcount on any + // but the innermost outer context object, as lookupName() increments + // the refcount on all contexts between the current one and the + // context containing the column when it resolves a name. + if pOuterNC != 0 { + + libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(libc.Bool32((*NameContext)(unsafe.Pointer(pOuterNC)).FnRef > nRef)), 3, 0x8) + } + } + } + + // Set up the local name-context to pass to sqlite3ResolveExprNames() to + // resolve the result-set expression list. + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = NC_AllowAgg | NC_AllowWin + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(p)).FpSrc + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = pOuterNC + + // Resolve names in the result set. + if Xsqlite3ResolveExprListNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { + return WRC_Abort + } + *(*int32)(unsafe.Pointer(bp + 40)) &= libc.CplInt32(NC_AllowWin) + + // If there are no aggregate functions in the result-set, and no GROUP BY + // expression, do not allow aggregates in any of the other expressions. + + pGroupBy = (*Select)(unsafe.Pointer(p)).FpGroupBy + if pGroupBy != 0 || (*NameContext)(unsafe.Pointer(bp)).FncFlags&NC_HasAgg != 0 { + + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_Aggregate | (*NameContext)(unsafe.Pointer(bp)).FncFlags&(NC_MinMaxAgg|NC_OrderAgg)) + } else { + *(*int32)(unsafe.Pointer(bp + 40)) &= libc.CplInt32(NC_AllowAgg) + } + + // Add the output column list to the name-context before parsing the + // other expressions in the SELECT statement. This is so that + // expressions in the WHERE clause (etc.) can refer to expressions by + // aliases in the result set. + // + // Minor point: If this is the case, then the expression will be + // re-evaluated for each reference to it. + + *(*uintptr)(unsafe.Pointer(bp + 16)) = (*Select)(unsafe.Pointer(p)).FpEList + *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList + if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { + if !(pGroupBy != 0) { + Xsqlite3ErrorMsg(tls, pParse, ts+7205, 0) + return WRC_Abort + } + if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { + return WRC_Abort + } + } + if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpWhere) != 0 { + return WRC_Abort + } + + // Resolve names in table-valued-function arguments + for i = 0; i < (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc; i++ { + var pItem uintptr = (*Select)(unsafe.Pointer(p)).FpSrc + 8 + uintptr(i)*112 + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 && + Xsqlite3ResolveExprListNames(tls, bp, *(*uintptr)(unsafe.Pointer(pItem + 96))) != 0 { + return WRC_Abort + } + } + + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + var pWin uintptr + for pWin = (*Select)(unsafe.Pointer(p)).FpWinDefn; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + if Xsqlite3ResolveExprListNames(tls, bp, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) != 0 || + Xsqlite3ResolveExprListNames(tls, bp, (*Window)(unsafe.Pointer(pWin)).FpPartition) != 0 { + return WRC_Abort + } + } + } + + // The ORDER BY and GROUP BY clauses may not refer to terms in + // outer queries + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 40)) |= NC_AllowAgg | NC_AllowWin + + // If this is a converted compound query, move the ORDER BY clause from + // the sub-query back to the parent query. At this point each term + // within the ORDER BY clause has been transformed to an integer value. + // These integers will be replaced by copies of the corresponding result + // set expressions by the call to resolveOrderGroupBy() below. + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Converted) != 0 { + var pSub uintptr = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpSelect + (*Select)(unsafe.Pointer(p)).FpOrderBy = (*Select)(unsafe.Pointer(pSub)).FpOrderBy + (*Select)(unsafe.Pointer(pSub)).FpOrderBy = uintptr(0) + } + + // Process the ORDER BY clause for singleton SELECT statements. + // The ORDER BY clause for compounds SELECT statements is handled + // below, after all of the result-sets for all of the elements of + // the compound have been resolved. + // + // If there is an ORDER BY clause on a term of a compound-select other + // than the right-most term, then that is a syntax error. But the error + // is not detected until much later, and so we need to go ahead and + // resolve those symbols on the incorrect ORDER BY for consistency. + if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && + isCompound <= nCompound && + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7107) != 0 { + return WRC_Abort + } + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return WRC_Abort + } + *(*int32)(unsafe.Pointer(bp + 40)) &= libc.CplInt32(NC_AllowWin) + + // Resolve the GROUP BY clause. At the same time, make sure + // the GROUP BY clause does not contain aggregate functions. + if pGroupBy != 0 { + var pItem uintptr + + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7249) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return WRC_Abort + } + i = 0 + pItem = pGroupBy + 8 /* &.a */ + __1: + if !(i < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { + goto __3 + } + { + if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { + Xsqlite3ErrorMsg(tls, pParse, + ts+7255, 0) + return WRC_Abort + } + + } + goto __2 + __2: + i++ + pItem += 32 + goto __1 + goto __3 + __3: + } + + // If this is part of a compound SELECT, check that it has the right + // number of expressions in the select list. + if (*Select)(unsafe.Pointer(p)).FpNext != 0 && (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpNext)).FpEList)).FnExpr { + Xsqlite3SelectWrongNumTermsError(tls, pParse, (*Select)(unsafe.Pointer(p)).FpNext) + return WRC_Abort + } + + // Advance to the next term of the compound + p = (*Select)(unsafe.Pointer(p)).FpPrior + nCompound++ + } + + // Resolve the ORDER BY on a compound SELECT after all terms of + // the compound have been resolved. + if isCompound != 0 && resolveCompoundOrderBy(tls, pParse, pLeftmost) != 0 { + return WRC_Abort + } + + return WRC_Prune +} + +// This routine walks an expression tree and resolves references to +// table columns and result-set columns. At the same time, do error +// checking on function usage and set a flag if any aggregate functions +// are seen. +// +// To resolve table columns references we look for nodes (or subtrees) of the +// form X.Y.Z or Y.Z or just Z where +// +// X: The name of a database. Ex: "main" or "temp" or +// the symbolic name assigned to an ATTACH-ed database. +// +// Y: The name of a table in a FROM clause. Or in a trigger +// one of the special names "old" or "new". +// +// Z: The name of a column in table Y. +// +// The node at the root of the subtree is modified as follows: +// +// Expr.op Changed to TK_COLUMN +// Expr.pTab Points to the Table object for X.Y +// Expr.iColumn The column index in X.Y. -1 for the rowid. +// Expr.iTable The VDBE cursor number for X.Y +// +// +// To resolve result-set references, look for expression nodes of the +// form Z (with no X and Y prefix) where the Z matches the right-hand +// size of an AS clause in the result-set of a SELECT. The Z expression +// is replaced by a copy of the left-hand side of the result-set expression. +// Table-name and function resolution occurs on the substituted expression +// tree. For example, in: +// +// SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x; +// +// The "x" term of the order by is replaced by "a+b" to render: +// +// SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b; +// +// Function calls are checked to make sure that the function is +// defined and that the correct number of arguments are specified. +// If the function is an aggregate function, then the NC_HasAgg flag is +// set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION. +// If an expression contains aggregate functions then the EP_Agg +// property on the expression is set. +// +// An error message is left in pParse if anything is amiss. The number +// if errors is returned. +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var savedHasAgg int32 + // var w Walker at bp, 48 + + if pExpr == uintptr(0) { + return SQLITE_OK + } + savedHasAgg = (*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) + *(*int32)(unsafe.Pointer(pNC + 40)) &= libc.CplInt32(NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{resolveExprStep})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = func() uintptr { + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_NoSelect != 0 { + return uintptr(0) + } + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{resolveSelectStep})) + }() + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { + return SQLITE_ERROR + } + Xsqlite3WalkExpr(tls, bp, pExpr) + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) + *(*int32)(unsafe.Pointer(pNC + 40)) |= savedHasAgg + return libc.Bool32((*NameContext)(unsafe.Pointer(pNC)).FnNcErr > 0 || (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnErr > 0) +} + +// Resolve all names for all expression in an expression list. This is +// just like sqlite3ResolveExprNames() except that it works for an expression +// list rather than a single expression. +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + var savedHasAgg int32 = 0 + // var w Walker at bp, 48 + + if pList == uintptr(0) { + return WRC_Continue + } + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{resolveExprStep})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{resolveSelectStep})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC + savedHasAgg = (*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) + *(*int32)(unsafe.Pointer(pNC + 40)) &= libc.CplInt32(NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr + if pExpr == uintptr(0) { + continue + } + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { + return WRC_Abort + } + Xsqlite3WalkExpr(tls, bp, pExpr) + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg) != 0 { + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) + savedHasAgg = savedHasAgg | (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg) + *(*int32)(unsafe.Pointer(pNC + 40)) &= libc.CplInt32(NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) + } + if (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnErr > 0 { + return WRC_Abort + } + } + *(*int32)(unsafe.Pointer(pNC + 40)) |= savedHasAgg + return WRC_Continue +} + +// Resolve all names in all expressions of a SELECT and in all +// decendents of the SELECT, including compounds off of p->pPrior, +// subqueries in expressions, and subqueries used as FROM clause +// terms. +// +// See sqlite3ResolveExprNames() for a description of the kinds of +// transformations that occur. +// +// All SELECT statements should have been expanded using +// sqlite3SelectExpand() prior to invoking this routine. +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{resolveExprStep})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{resolveSelectStep})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse + *(*uintptr)(unsafe.Pointer(bp + 40)) = pOuterNC + Xsqlite3WalkSelect(tls, bp, p) +} + +// Resolve names in expressions that can only reference a single table +// or which cannot reference any tables at all. Examples: +// +// "type" flag +// ------------ +// (1) CHECK constraints NC_IsCheck +// (2) WHERE clauses on partial indices NC_PartIdx +// (3) Expressions in indexes on expressions NC_IdxExpr +// (4) Expression arguments to VACUUM INTO. 0 +// (5) GENERATED ALWAYS as expressions NC_GenCol +// +// In all cases except (4), the Expr.iTable value for Expr.op==TK_COLUMN +// nodes of the expression is set to -1 and the Expr.iColumn value is +// set to the column number. In case (4), TK_COLUMN nodes cause an error. +// +// Any errors cause an error message to be set in pParse. +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ + bp := tls.Alloc(176) + defer tls.Free(176) + + // var sSrc SrcList at bp+56, 120 + // Fake SrcList for pParse->pNewTable + // var sNC NameContext at bp, 56 + // Name context for pParse->pNewTable + var rc int32 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+56, 0, uint64(unsafe.Sizeof(SrcList{}))) + if pTab != 0 { + (*SrcList)(unsafe.Pointer(bp + 56 /* &sSrc */)).FnSrc = 1 + (*SrcItem)(unsafe.Pointer(bp + 56 + 8)).FzName = (*Table)(unsafe.Pointer(pTab)).FzName + (*SrcItem)(unsafe.Pointer(bp + 56 + 8)).FpTab = pTab + (*SrcItem)(unsafe.Pointer(bp + 56 + 8)).FiCursor = -1 + if (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+1*32)).FpSchema { + // Cause EP_FromDDL to be set on TK_FUNCTION nodes of non-TEMP + // schema elements + type1 = type1 | NC_FromDDL + } + } + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = bp + 56 /* &sSrc */ + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = type1 | NC_IsDDL + if libc.AssignInt32(&rc, Xsqlite3ResolveExprNames(tls, bp, pExpr)) != SQLITE_OK { + return rc + } + if pList != 0 { + rc = Xsqlite3ResolveExprListNames(tls, bp, pList) + } + return rc +} + +// Return the affinity character for a single column of a table. +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:102486:21: */ + if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { + return uint8(SQLITE_AFF_INTEGER) + } + return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).Faffinity +} + +// Return the 'affinity' of the expression pExpr if any. +// +// If pExpr is a column, a reference to a column via an 'AS' alias, +// or a sub-select with a column as the return value, then the +// affinity of that column is returned. Otherwise, 0x00 is returned, +// indicating no affinity for the expression. +// +// i.e. the WHERE clause expressions in the following statements all +// have an affinity: +// +// CREATE TABLE t1(a); +// SELECT * FROM t1 WHERE a; +// SELECT a AS b FROM t1 WHERE b; +// SELECT * FROM t1 WHERE (select a from t1); +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102507:21: */ + var op int32 + for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { + + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + + } + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + if op == TK_REGISTER { + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) + } + if op == TK_COLUMN || op == TK_AGG_COLUMN { + + if *(*uintptr)(unsafe.Pointer(pExpr + 64)) != 0 { + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) + } + } + if op == TK_SELECT { + + return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList+8)).FpExpr) + } + if op == TK_CAST { + + return Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)) + } + if op == TK_SELECT_COLUMN { + + return Xsqlite3ExprAffinity(tls, + (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft + 32)))).FpEList+8+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr) + } + if op == TK_VECTOR { + + return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8)).FpExpr) + } + return (*Expr)(unsafe.Pointer(pExpr)).FaffExpr +} + +// Set the collating sequence for expression pExpr to be the collating +// sequence named by pToken. Return a pointer to a new Expr node that +// implements the COLLATE operator. +// +// If a memory allocation error occurs, that fact is recorded in pParse->db +// and the pExpr parameter is returned unchanged. +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ + if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { + var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) + if pNew != 0 { + (*Expr)(unsafe.Pointer(pNew)).FpLeft = pExpr + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_Collate | EP_Skip) + pExpr = pNew + } + } + return pExpr +} + +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var s Token at bp, 16 + + Xsqlite3TokenInit(tls, bp, zC) + return Xsqlite3ExprAddCollateToken(tls, pParse, pExpr, bp, 0) +} + +// Skip over any TK_COLLATE operators. +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ + for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { + + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + } + return pExpr +} + +// Skip over any TK_COLLATE operators and/or any unlikely() +// or likelihood() or likely() functions at the root of an +// expression. +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ + for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { + + pExpr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8)).FpExpr + } else { + + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + } + } + return pExpr +} + +// Return the collation sequence for the expression pExpr. If +// there is no defined collating sequence, return NULL. +// +// See also: sqlite3ExprNNCollSeq() +// +// The sqlite3ExprNNCollSeq() works the same exact that it returns the +// default collation if pExpr has no defined collation. +// +// The collating sequence might be determined by a COLLATE operator +// or by the presence of a column with a defined collating sequence. +// COLLATE operators take first precedence. Left operands take +// precedence over right operands. +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pColl uintptr = uintptr(0) + var p uintptr = pExpr + for p != 0 { + var op int32 = int32((*Expr)(unsafe.Pointer(p)).Fop) + if op == TK_REGISTER { + op = int32((*Expr)(unsafe.Pointer(p)).Fop2) + } + if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { + + if *(*uintptr)(unsafe.Pointer(p + 64)) != uintptr(0) { + // op==TK_REGISTER && p->y.pTab!=0 happens when pExpr was originally + // a TK_COLUMN but was previously evaluated and cached in a register + var j int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) + if j >= 0 { + var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol+uintptr(j)*24) + pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) + } + break + } + } + if op == TK_CAST || op == TK_UPLUS { + p = (*Expr)(unsafe.Pointer(p)).FpLeft + continue + } + if op == TK_VECTOR { + + p = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32)) + 8)).FpExpr + continue + } + if op == TK_COLLATE { + + pColl = Xsqlite3GetCollSeq(tls, pParse, (*Sqlite3)(unsafe.Pointer(db)).Fenc, uintptr(0), *(*uintptr)(unsafe.Pointer(p + 8))) + break + } + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Collate) != 0 { + if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 && (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fflags&U32(EP_Collate) != U32(0) { + p = (*Expr)(unsafe.Pointer(p)).FpLeft + } else { + var pNext uintptr = (*Expr)(unsafe.Pointer(p)).FpRight + // The Expr.x union is never used at the same time as Expr.pRight + + if *(*uintptr)(unsafe.Pointer(p + 32)) != uintptr(0) && !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32 /* &.x */)))).FnExpr; i++ { + if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr)).Fflags&U32(EP_Collate) != U32(0) { + pNext = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32)) + 8 + uintptr(i)*32)).FpExpr + break + } + } + } + p = pNext + } + } else { + break + } + } + if Xsqlite3CheckCollSeq(tls, pParse, pColl) != 0 { + pColl = uintptr(0) + } + return pColl +} + +// Return the collation sequence for the expression pExpr. If +// there is no defined collating sequence, return a pointer to the +// defautl collation sequence. +// +// See also: sqlite3ExprCollSeq() +// +// The sqlite3ExprCollSeq() routine works the same except that it +// returns NULL if there is no defined collation. +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ + var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) + if p == uintptr(0) { + p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl + } + + return p +} + +// Return TRUE if the two expressions have equivalent collating sequences. +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ + var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) + var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) + return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) +} + +// pExpr is an operand of a comparison operator. aff2 is the +// type affinity of the other operand. This routine returns the +// type affinity that should be used for the comparison operator. +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:102726:21: */ + var aff1 uint8 = Xsqlite3ExprAffinity(tls, pExpr) + if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { + // Both sides of the comparison are columns. If one has numeric + // affinity, use that. Otherwise use no affinity. + if int32(aff1) >= SQLITE_AFF_NUMERIC || int32(aff2) >= SQLITE_AFF_NUMERIC { + return uint8(SQLITE_AFF_NUMERIC) + } else { + return uint8(SQLITE_AFF_BLOB) + } + } else { + // One side is a column, the other is not. Use the columns affinity. + + return uint8(func() int32 { + if int32(aff1) <= SQLITE_AFF_NONE { + return int32(aff2) + } + return int32(aff1) + }() | SQLITE_AFF_NONE) + } + return uint8(0) +} + +// pExpr is a comparison operator. Return the type affinity that should +// be applied to both operands prior to doing the comparison. +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102748:13: */ + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + if (*Expr)(unsafe.Pointer(pExpr)).FpRight != 0 { + aff = Xsqlite3CompareAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight, aff) + } else if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + aff = Xsqlite3CompareAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList+8)).FpExpr, aff) + } else if int32(aff) == 0 { + aff = uint8(SQLITE_AFF_BLOB) + } + return aff +} + +// pExpr is a comparison expression, eg. '=', '<', IN(...) etc. +// idx_affinity is the affinity of an indexed column. Return true +// if the index with affinity idx_affinity may be used to implement +// the comparison in pExpr. +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:102771:20: */ + var aff uint8 = comparisonAffinity(tls, pExpr) + if int32(aff) < SQLITE_AFF_TEXT { + return 1 + } + if int32(aff) == SQLITE_AFF_TEXT { + return libc.Bool32(int32(idx_affinity) == SQLITE_AFF_TEXT) + } + return libc.Bool32(int32(idx_affinity) >= SQLITE_AFF_NUMERIC) +} + +// Return the P5 value that should be used for a binary comparison +// opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ + var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) + aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, uint8(aff)))) | int32(U8(jumpIfNull))) + return aff +} + +// Return a pointer to the collation sequence that should be used by +// a binary comparison operator comparing pLeft and pRight. +// +// If the left hand expression has a collating sequence type, then it is +// used. Otherwise the collation sequence for the right hand expression +// is used, or the default (BINARY) if neither expression has a collating +// type. +// +// Argument pRight (but not pLeft) may be a null pointer. In this case, +// it is not considered. +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ + var pColl uintptr + + if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { + pColl = Xsqlite3ExprCollSeq(tls, pParse, pLeft) + } else if pRight != 0 && (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_Collate) != U32(0) { + pColl = Xsqlite3ExprCollSeq(tls, pParse, pRight) + } else { + pColl = Xsqlite3ExprCollSeq(tls, pParse, pLeft) + if !(pColl != 0) { + pColl = Xsqlite3ExprCollSeq(tls, pParse, pRight) + } + } + return pColl +} + +// Expresssion p is a comparison operator. Return a collation sequence +// appropriate for the comparison operator. +// +// This is normally just a wrapper around sqlite3BinaryCompareCollSeq(). +// However, if the OP_Commuted flag is set, then the order of the operands +// is reversed in the sqlite3BinaryCompareCollSeq() call so that the +// correct collating sequence is found. +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { + return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) + } else { + return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, (*Expr)(unsafe.Pointer(p)).FpRight) + } + return uintptr(0) +} + +// Generate code for a comparison operator. +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ + var p5 int32 + var addr int32 + var p4 uintptr + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return 0 + } + if isCommuted != 0 { + p4 = Xsqlite3BinaryCompareCollSeq(tls, pParse, pRight, pLeft) + } else { + p4 = Xsqlite3BinaryCompareCollSeq(tls, pParse, pLeft, pRight) + } + p5 = int32(binaryCompareP5(tls, pLeft, pRight, jumpIfNull)) + addr = Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, opcode, in2, dest, in1, + p4, -2) + Xsqlite3VdbeChangeP5(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, uint16(U8(p5))) + return addr +} + +// Return true if expression pExpr is a vector, or false otherwise. +// +// A vector is defined as any expression that results in two or more +// columns of result. Every TK_VECTOR node is an vector because the +// parser will not generate a TK_VECTOR with fewer than two entries. +// But a TK_SELECT might be either a vector or a scalar. It is only +// considered a vector if it has two or more result columns. +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ + return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) +} + +// If the expression passed as the only argument is of type TK_VECTOR +// return the number of expressions in the vector. Or, if the expression +// is a sub-select, return the number of columns in the sub-select. For +// any other type of expression, return 1. +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ + var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop + if int32(op) == TK_REGISTER { + op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 + } + if int32(op) == TK_VECTOR { + + return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr + } else if int32(op) == TK_SELECT { + + return (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr + } else { + return 1 + } + return int32(0) +} + +// Return a pointer to a subexpression of pVector that is the i-th +// column of the vector (numbered starting with 0). The caller must +// ensure that i is within range. +// +// If pVector is really a scalar (and "scalar" here includes subqueries +// that return a single column!) then return pVector unmodified. +// +// pVector retains ownership of the returned subexpression. +// +// If the vector is a (SELECT ...) then the expression returned is +// just the expression for the i-th term of the result set, and may +// not be ready for evaluation because the table cursor has not yet +// been positioned. +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ + + if Xsqlite3ExprIsVector(tls, pVector) != 0 { + + if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT || int32((*Expr)(unsafe.Pointer(pVector)).Fop2) == TK_SELECT { + + return (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)))).FpEList + 8 + uintptr(i)*32)).FpExpr + } else { + + return (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)) + 8 + uintptr(i)*32)).FpExpr + } + } + return pVector +} + +// Compute and return a new Expr object which when passed to +// sqlite3ExprCode() will generate all necessary code to compute +// the iField-th column of the vector expression pVector. +// +// It is ok for pVector to be a scalar (as long as iField==0). +// In that case, this routine works like sqlite3ExprDup(). +// +// The caller owns the returned Expr object and is responsible for +// ensuring that the returned value eventually gets freed. +// +// The caller retains ownership of pVector. If pVector is a TK_SELECT, +// then the returned object will reference pVector and so pVector must remain +// valid for the life of the returned object. If pVector is a TK_VECTOR +// or a scalar expression, then it can be deleted as soon as this routine +// returns. +// +// A trick to cause a TK_SELECT pVector to be deleted together with +// the returned Expr object is to attach the pVector to the pRight field +// of the returned TK_SELECT_COLUMN Expr object. +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ + var pRet uintptr + if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { + + // The TK_SELECT_COLUMN Expr node: + // + // pLeft: pVector containing TK_SELECT. Not deleted. + // pRight: not used. But recursively deleted. + // iColumn: Index of a column in pVector + // iTable: 0 or the number of columns on the LHS of an assignment + // pLeft->iTable: First in an array of register holding result, or 0 + // if the result is not yet computed. + // + // sqlite3ExprDelete() specifically skips the recursive delete of + // pLeft on TK_SELECT_COLUMN nodes. But pRight is followed, so pVector + // can be attached to pRight to cause this node to take ownership of + // pVector. Typically there will be multiple TK_SELECT_COLUMN nodes + // with the same pLeft pointer to the pVector, but only one of them + // will own the pVector. + pRet = Xsqlite3PExpr(tls, pParse, TK_SELECT_COLUMN, uintptr(0), uintptr(0)) + if pRet != 0 { + (*Expr)(unsafe.Pointer(pRet)).FiTable = nField + (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iField) + (*Expr)(unsafe.Pointer(pRet)).FpLeft = pVector + } + } else { + if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_VECTOR { + var ppVector uintptr + + ppVector = *(*uintptr)(unsafe.Pointer(pVector + 32)) + 8 + uintptr(iField)*32 + pVector = *(*uintptr)(unsafe.Pointer(ppVector)) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + // This must be a vector UPDATE inside a trigger + *(*uintptr)(unsafe.Pointer(ppVector)) = uintptr(0) + return pVector + } + } + pRet = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pVector, 0) + } + return pRet +} + +// If expression pExpr is of type TK_SELECT, generate code to evaluate +// it. Return the register in which the result is stored (or, if the +// sub-select returns more than one column, the first in an array +// of registers in which the result is stored). +// +// If pExpr is not a TK_SELECT expression, return 0. +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ + var reg int32 = 0 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { + reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) + } + return reg +} + +// Argument pVector points to a vector expression - either a TK_VECTOR +// or TK_SELECT that returns more than one column. This function returns +// the register number of a register that contains the value of +// element iField of the vector. +// +// If pVector is a TK_SELECT expression, then code for it must have +// already been generated using the exprCodeSubselect() routine. In this +// case parameter regSelect should be the first in an array of registers +// containing the results of the sub-select. +// +// If pVector is of type TK_VECTOR, then code for the requested field +// is generated. In this case (*pRegFree) may be set to the number of +// a temporary register to be freed by the caller before returning. +// +// Before returning, output parameter (*ppExpr) is set to point to the +// Expr object corresponding to element iElem of the vector. +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ + var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop + + if int32(op) == TK_REGISTER { + *(*uintptr)(unsafe.Pointer(ppExpr)) = Xsqlite3VectorFieldSubexpr(tls, pVector, iField) + return (*Expr)(unsafe.Pointer(pVector)).FiTable + iField + } + if int32(op) == TK_SELECT { + + *(*uintptr)(unsafe.Pointer(ppExpr)) = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)))).FpEList + 8 + uintptr(iField)*32)).FpExpr + return regSelect + iField + } + if int32(op) == TK_VECTOR { + + *(*uintptr)(unsafe.Pointer(ppExpr)) = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)) + 8 + uintptr(iField)*32)).FpExpr + return Xsqlite3ExprCodeTemp(tls, pParse, *(*uintptr)(unsafe.Pointer(ppExpr)), pRegFree) + } + return 0 +} + +// Expression pExpr is a comparison between two vector values. Compute +// the result of the comparison (1, 0, or NULL) and write that +// result into register dest. +// +// The caller must satisfy the following preconditions: +// +// if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ +// if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ +// otherwise: op==pExpr->op and p5==0 +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + var pRight uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpRight + var nLeft int32 = Xsqlite3ExprVectorSize(tls, pLeft) + var i int32 + var regLeft int32 = 0 + var regRight int32 = 0 + var opx U8 = op + var addrCmp int32 = 0 + var addrDone int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + var isCommuted int32 = libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0)) + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { + Xsqlite3ErrorMsg(tls, pParse, ts+6415, 0) + return + } + + if int32(op) == TK_LE { + opx = U8(TK_LT) + } + if int32(op) == TK_GE { + opx = U8(TK_GT) + } + if int32(op) == TK_NE { + opx = U8(TK_EQ) + } + + regLeft = exprCodeSubselect(tls, pParse, pLeft) + regRight = exprCodeSubselect(tls, pParse, pRight) + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, dest) + for i = 0; 1 != 0; i++ { + *(*int32)(unsafe.Pointer(bp + 8 /* regFree1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 24 /* regFree2 */)) = 0 + *(*uintptr)(unsafe.Pointer(bp /* pL */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* pR */)) = uintptr(0) + var r1 int32 + var r2 int32 + + if addrCmp != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrCmp) + } + r1 = exprVectorRegister(tls, pParse, pLeft, i, regLeft, bp, bp+8) + r2 = exprVectorRegister(tls, pParse, pRight, i, regRight, bp+16, bp+24) + addrCmp = Xsqlite3VdbeCurrentAddr(tls, v) + codeCompare(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pL */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pR */)), int32(opx), r1, r2, addrDone, int32(p5), isCommuted) + + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 8 /* regFree1 */))) + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 24 /* regFree2 */))) + if (int32(opx) == TK_LT || int32(opx) == TK_GT) && i < nLeft-1 { + addrCmp = Xsqlite3VdbeAddOp0(tls, v, OP_ElseEq) + + } + if int32(p5) == SQLITE_NULLEQ { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, dest) + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_ZeroOrNull, r1, dest, r2) + } + if i == nLeft-1 { + break + } + if int32(opx) == TK_EQ { + Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, dest, addrDone) + } else { + + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) + if i == nLeft-2 { + opx = op + } + } + } + Xsqlite3VdbeJumpHere(tls, v, addrCmp) + Xsqlite3VdbeResolveLabel(tls, v, addrDone) + if int32(op) == TK_NE { + Xsqlite3VdbeAddOp2(tls, v, OP_Not, dest, dest) + } +} + +// Check that argument nHeight is less than or equal to the maximum +// expression depth allowed. If it is not, leave an error message in +// pParse. +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) + if nHeight > mxHeight { + Xsqlite3ErrorMsg(tls, pParse, + ts+7314, libc.VaList(bp, mxHeight)) + rc = SQLITE_ERROR + } + return rc +} + +// The following three functions, heightOfExpr(), heightOfExprList() +// and heightOfSelect(), are used to determine the maximum height +// of any expression tree referenced by the structure passed as the +// first argument. +// +// If this maximum height is greater than the current value pointed +// to by pnHeight, the second parameter, then set *pnHeight to that +// value. +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ + if p != 0 { + if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { + *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight + } + } +} + +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ + if p != 0 { + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { + heightOfExpr(tls, (*ExprList_item)(unsafe.Pointer(p+8+uintptr(i)*32)).FpExpr, pnHeight) + } + } +} + +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ + var p uintptr + for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { + heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) + heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpHaving, pnHeight) + heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpLimit, pnHeight) + heightOfExprList(tls, (*Select)(unsafe.Pointer(p)).FpEList, pnHeight) + heightOfExprList(tls, (*Select)(unsafe.Pointer(p)).FpGroupBy, pnHeight) + heightOfExprList(tls, (*Select)(unsafe.Pointer(p)).FpOrderBy, pnHeight) + } +} + +// Set the Expr.nHeight variable in the structure passed as an +// argument. An expression with no children, Expr.pList or +// Expr.pSelect member has a height of 1. Any other expression +// has a height equal to the maximum height of any other +// referenced Expr plus one. +// +// Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, +// if appropriate. +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 { + *(*int32)(unsafe.Pointer(bp /* nHeight */)) = (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).FnHeight + } else { + *(*int32)(unsafe.Pointer(bp /* nHeight */)) = 0 + } + if (*Expr)(unsafe.Pointer(p)).FpRight != 0 && (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpRight)).FnHeight > *(*int32)(unsafe.Pointer(bp)) { + *(*int32)(unsafe.Pointer(bp /* nHeight */)) = (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpRight)).FnHeight + } + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { + heightOfSelect(tls, *(*uintptr)(unsafe.Pointer(p + 32)), bp) + } else if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { + heightOfExprList(tls, *(*uintptr)(unsafe.Pointer(p + 32)), bp) + *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & Xsqlite3ExprListFlags(tls, *(*uintptr)(unsafe.Pointer(p + 32))) + } + (*Expr)(unsafe.Pointer(p)).FnHeight = *(*int32)(unsafe.Pointer(bp)) + 1 +} + +// Set the Expr.nHeight variable using the exprSetHeight() function. If +// the height is greater than the maximum allowed expression depth, +// leave an error in pParse. +// +// Also propagate all EP_Propagate flags from the Expr.x.pList into +// Expr.flags. +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + exprSetHeight(tls, p) + Xsqlite3ExprCheckHeight(tls, pParse, (*Expr)(unsafe.Pointer(p)).FnHeight) +} + +// Return the maximum height of any expression tree referenced +// by the select statement passed as an argument. +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* nHeight */)) = 0 + heightOfSelect(tls, p, bp) + return *(*int32)(unsafe.Pointer(bp /* nHeight */)) +} + +// This routine is the core allocator for Expr nodes. +// +// Construct a new expression node and return a pointer to it. Memory +// for this node and for the pToken argument is a single allocation +// obtained from sqlite3DbMalloc(). The calling function +// is responsible for making sure the node eventually gets freed. +// +// If dequote is true, then the token (if it exists) is dequoted. +// If dequote is false, no dequoting is performed. The deQuote +// parameter is ignored if pToken is NULL or if the token does not +// appear to be quoted. If the quotes were of the form "..." (double-quotes) +// then the EP_DblQuoted flag is set on the expression node. +// +// Special case: If op==TK_INTEGER and pToken points to a string that +// can be translated into a 32-bit integer, then the token is not +// stored in u.zToken. Instead, the integer values is written +// into u.iValue and the EP_IntValue flag is set. No extra storage +// is allocated to hold the integer text and the dequote flag is ignored. +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pNew uintptr + var nExtra int32 = 0 + *(*int32)(unsafe.Pointer(bp /* iValue */)) = 0 + + if pToken != 0 { + if op != TK_INTEGER || (*Token)(unsafe.Pointer(pToken)).Fz == uintptr(0) || + Xsqlite3GetInt32(tls, (*Token)(unsafe.Pointer(pToken)).Fz, bp) == 0 { + nExtra = int32((*Token)(unsafe.Pointer(pToken)).Fn + uint32(1)) + + } + } + pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Expr{}))+uint64(nExtra))) + if pNew != 0 { + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(pNew)).Fop = U8(op) + (*Expr)(unsafe.Pointer(pNew)).FiAgg = int16(-1) + if pToken != 0 { + if nExtra == 0 { + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_IntValue | EP_Leaf | func() int32 { + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return EP_IsTrue + } + return EP_IsFalse + }()) + *(*int32)(unsafe.Pointer(pNew + 8)) = *(*int32)(unsafe.Pointer(bp /* iValue */)) + } else { + *(*uintptr)(unsafe.Pointer(pNew + 8)) = pNew + 1*72 + + if (*Token)(unsafe.Pointer(pToken)).Fn != 0 { + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(pNew + 8)), (*Token)(unsafe.Pointer(pToken)).Fz, uint64((*Token)(unsafe.Pointer(pToken)).Fn)) + } + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8)) + uintptr((*Token)(unsafe.Pointer(pToken)).Fn))) = uint8(0) + if dequote != 0 && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8)))))])&0x80 != 0 { + Xsqlite3DequoteExpr(tls, pNew) + } + } + } + (*Expr)(unsafe.Pointer(pNew)).FnHeight = 1 + } + return pNew +} + +// Allocate a new expression node from a zero-terminated token that has +// already been dequoted. +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var x Token at bp, 16 + + (*Token)(unsafe.Pointer(bp /* &x */)).Fz = zToken + (*Token)(unsafe.Pointer(bp /* &x */)).Fn = uint32(Xsqlite3Strlen30(tls, zToken)) + return Xsqlite3ExprAlloc(tls, db, op, bp, 0) +} + +// Attach subtrees pLeft and pRight to the Expr node pRoot. +// +// If pRoot==NULL that means that a memory allocation error has occurred. +// In that case, delete the subtrees pLeft and pRight. +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ + if pRoot == uintptr(0) { + + Xsqlite3ExprDelete(tls, db, pLeft) + Xsqlite3ExprDelete(tls, db, pRight) + } else { + if pRight != 0 { + (*Expr)(unsafe.Pointer(pRoot)).FpRight = pRight + *(*U32)(unsafe.Pointer(pRoot + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & (*Expr)(unsafe.Pointer(pRight)).Fflags + } + if pLeft != 0 { + (*Expr)(unsafe.Pointer(pRoot)).FpLeft = pLeft + *(*U32)(unsafe.Pointer(pRoot + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & (*Expr)(unsafe.Pointer(pLeft)).Fflags + } + exprSetHeight(tls, pRoot) + } +} + +// Allocate an Expr node which joins as many as two subtrees. +// +// One or both of the subtrees can be NULL. Return a pointer to the new +// Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, +// free the subtrees and return NULL. +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ + var p uintptr + p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) + if p != 0 { + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(p)).Fop = U8(op & 0xff) + (*Expr)(unsafe.Pointer(p)).FiAgg = int16(-1) + Xsqlite3ExprAttachSubtrees(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p, pLeft, pRight) + Xsqlite3ExprCheckHeight(tls, pParse, (*Expr)(unsafe.Pointer(p)).FnHeight) + } else { + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pLeft) + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pRight) + } + return p +} + +// Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due +// do a memory allocation failure) then delete the pSelect object. +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ + if pExpr != 0 { + *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) + Xsqlite3ExprSetHeightAndFlags(tls, pParse, pExpr) + } else { + + Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSelect) + } +} + +// Expression list pEList is a list of vector values. This function +// converts the contents of pEList to a VALUES(...) Select statement +// returning 1 row for each element of the list. For example, the +// expression list: +// +// ( (1,2), (3,4) (5,6) ) +// +// is translated to the equivalent of: +// +// VALUES(1,2), (3,4), (5,6) +// +// Each of the vector values in pEList must contain exactly nElem terms. +// If a list element that is not a vector or does not contain nElem terms, +// an error message is left in pParse. +// +// This is used as part of processing IN(...) expressions with a list +// of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var ii int32 + var pRet uintptr = uintptr(0) + + for ii = 0; ii < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; ii++ { + var pSel uintptr + var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(ii)*32)).FpExpr + var nExprElem int32 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VECTOR { + + nExprElem = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr + } else { + nExprElem = 1 + } + if nExprElem != nElem { + Xsqlite3ErrorMsg(tls, pParse, ts+7362, + libc.VaList(bp, nExprElem, func() uintptr { + if nExprElem > 1 { + return ts + 7406 /* "s" */ + } + return ts + 1525 /* "" */ + }(), nElem)) + break + } + + pSel = Xsqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 32)), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(SF_Values), uintptr(0)) + *(*uintptr)(unsafe.Pointer(pExpr + 32)) = uintptr(0) + if pSel != 0 { + if pRet != 0 { + (*Select)(unsafe.Pointer(pSel)).Fop = U8(TK_ALL) + (*Select)(unsafe.Pointer(pSel)).FpPrior = pRet + } + pRet = pSel + } + } + + if pRet != 0 && (*Select)(unsafe.Pointer(pRet)).FpPrior != 0 { + *(*U32)(unsafe.Pointer(pRet + 4)) |= U32(SF_MultiValue) + } + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pEList) + return pRet +} + +// Join two expressions using an AND operator. If either expression is +// NULL, then just return the other expression. +// +// If one side or the other of the AND is known to be false, then instead +// of returning an AND expression, just return a constant expression with +// a value of false. +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if pLeft == uintptr(0) { + return pRight + } else if pRight == uintptr(0) { + return pLeft + } else if ((*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse) || (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) + Xsqlite3ExprDeferredDelete(tls, pParse, pRight) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7408) + } else { + return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) + } + return uintptr(0) +} + +// Construct a new expression node for a function with multiple +// arguments. +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pNew uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + pNew = Xsqlite3ExprAlloc(tls, db, TK_FUNCTION, pToken, 1) + if pNew == uintptr(0) { + Xsqlite3ExprListDelete(tls, db, pList) // Avoid memory leak when malloc fails + return uintptr(0) + } + *(*int32)(unsafe.Pointer(pNew + 52)) = int32((int64((*Token)(unsafe.Pointer(pToken)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FzTail)) / 1) + if pList != 0 && + (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 6*4)) && + !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { + Xsqlite3ErrorMsg(tls, pParse, ts+7410, libc.VaList(bp, pToken)) + } + *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) + + Xsqlite3ExprSetHeightAndFlags(tls, pParse, pNew) + if eDistinct == SF_Distinct { + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_Distinct) + } + return pNew +} + +// Check to see if a function is usable according to current access +// rules: +// +// SQLITE_FUNC_DIRECT - Only usable from top-level SQL +// +// SQLITE_FUNC_UNSAFE - Usable if TRUSTED_SCHEMA or from +// top-level SQL +// +// If the function is not usable, create an error. +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromDDL) != U32(0) { + if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT) != U32(0) || + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) == uint64(0) { + // Functions prohibited in triggers and views if: + // (1) tagged with SQLITE_DIRECTONLY + // (2) not tagged with SQLITE_INNOCUOUS (which means it + // is tagged with SQLITE_FUNC_UNSAFE) and + // SQLITE_DBCONFIG_TRUSTED_SCHEMA is off (meaning + // that the schema is possibly tainted). + Xsqlite3ErrorMsg(tls, pParse, ts+7444, libc.VaList(bp, pExpr)) + } + } +} + +// Assign a variable number to an expression that encodes a wildcard +// in the original SQL statement. +// +// Wildcards consisting of a single "?" are assigned the next sequential +// variable number. +// +// Wildcards of the form "?nnn" are assigned the number "nnn". We make +// sure "nnn" is not too big to avoid a denial of service attack when +// the SQL statement comes from an external source. +// +// Wildcards of the form ":aaa", "@aaa", or "$aaa" are assigned the same number +// as the previous instance of the same wildcard. Or if this is the first +// instance of the wildcard, the next sequential variable number is +// assigned. +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var z uintptr + var x YnVar + + if pExpr == uintptr(0) { + return + } + + z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + + if int32(*(*uint8)(unsafe.Pointer(z + 1))) == 0 { + // Wildcard of the form "?". Assign the next variable number + + x = libc.PreIncInt16(&(*Parse)(unsafe.Pointer(pParse)).FnVar, 1) + } else { + var doAdd int32 = 0 + if int32(*(*uint8)(unsafe.Pointer(z))) == '?' { + // Wildcard of the form "?nnn". Convert "nnn" to an integer and + // use it as the variable number + // var i I64 at bp+8, 8 + + var bOk int32 + if n == U32(2) { //OPTIMIZATION-IF-TRUE + *(*I64)(unsafe.Pointer(bp + 8 /* i */)) = I64(int32(*(*uint8)(unsafe.Pointer(z + 1))) - '0') // The common case of ?N for a single digit N + bOk = 1 + } else { + bOk = libc.Bool32(0 == Xsqlite3Atoi64(tls, z+1, bp+8, int32(n-U32(1)), uint8(SQLITE_UTF8))) + } + + if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 136 + 9*4))) { + Xsqlite3ErrorMsg(tls, pParse, ts+7464, + libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) + Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + return + } + x = YnVar(*(*I64)(unsafe.Pointer(bp + 8 /* i */))) + if int32(x) > int32((*Parse)(unsafe.Pointer(pParse)).FnVar) { + (*Parse)(unsafe.Pointer(pParse)).FnVar = YnVar(int32(x)) + doAdd = 1 + } else if Xsqlite3VListNumToName(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, int32(x)) == uintptr(0) { + doAdd = 1 + } + } else { + // Wildcards like ":aaa", "$aaa" or "@aaa". Reuse the same variable + // number as the prior appearance of the same name, or if the name + // has never appeared before, reuse the same variable number + x = YnVar(Xsqlite3VListNameToNum(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, z, int32(n))) + if int32(x) == 0 { + x = libc.PreIncInt16(&(*Parse)(unsafe.Pointer(pParse)).FnVar, 1) + doAdd = 1 + } + } + if doAdd != 0 { + (*Parse)(unsafe.Pointer(pParse)).FpVList = Xsqlite3VListAdd(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList, z, int32(n), int32(x)) + } + } + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x + if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { + Xsqlite3ErrorMsg(tls, pParse, ts+7507, 0) + Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + } +} + +// Recursively delete an expression tree. +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ + + if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { + // The Expr.x union is never used at the same time as Expr.pRight + + if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_SELECT_COLUMN { + sqlite3ExprDeleteNN(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft) + } + if (*Expr)(unsafe.Pointer(p)).FpRight != 0 { + + sqlite3ExprDeleteNN(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight) + } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { + + Xsqlite3SelectDelete(tls, db, *(*uintptr)(unsafe.Pointer(p + 32))) + } else { + Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(p + 32))) + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_WinFunc) != U32(0) { + Xsqlite3WindowDelete(tls, db, *(*uintptr)(unsafe.Pointer(p + 64))) + } + } + } + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_MemToken) != U32(0) { + + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 8))) + } + if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Static) != U32(0)) { + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ + if p != 0 { + sqlite3ExprDeleteNN(tls, db, p) + } +} + +// Arrange to cause pExpr to be deleted when the pParse is deleted. +// This is similar to sqlite3ExprDelete() except that the delete is +// deferred untilthe pParse is deleted. +// +// The pExpr might be deleted immediately on an OOM error. +// +// The deferred delete is (currently) implemented by adding the +// pExpr to the pParse->pConstExpr list with a register number of 0. +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ + (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) +} + +// Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the +// expression. +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ + if p != 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameExprUnmap(tls, pParse, p) + } + sqlite3ExprDeleteNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p) + } +} + +// Return the number of bytes allocated for the expression structure +// passed as the first argument. This is always one of EXPR_FULLSIZE, +// EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { + return int32(uintptr(0) + 16) + } + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Reduced) != U32(0) { + return int32(uintptr(0) + 44) + } + return int32(unsafe.Sizeof(Expr{})) +} + +// The dupedExpr*Size() routines each return the number of bytes required +// to store a copy of an expression or expression tree. They differ in +// how much of the tree is measured. +// +// dupedExprStructSize() Size of only the Expr structure +// dupedExprNodeSize() Size of Expr + space for token +// dupedExprSize() Expr + token + subtree components +// +// +// +// The dupedExprStructSize() function returns two values OR-ed together: +// (1) the space required for a copy of the Expr structure only and +// (2) the EP_xxx flags that indicate what the structure size should be. +// The return values is always one of: +// +// EXPR_FULLSIZE +// EXPR_REDUCEDSIZE | EP_Reduced +// EXPR_TOKENONLYSIZE | EP_TokenOnly +// +// The size of the structure can be found by masking the return value +// of this routine with 0xfff. The flags can be found by masking the +// return value with EP_Reduced|EP_TokenOnly. +// +// Note that with flags==EXPRDUP_REDUCE, this routines works on full-size +// (unreduced) Expr objects as they or originally constructed by the parser. +// During expression analysis, extra information is computed and moved into +// later parts of the Expr object and that extra information might get chopped +// off if the expression is reduced. Note also that it does not work to +// make an EXPRDUP_REDUCE copy of a reduced expression. It is only legal +// to reduce a pristine expression tree from the parser. The implementation +// of dupedExprStructSize() contain multiple assert() statements that attempt +// to enforce this constraint. +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ + var nSize int32 + // Only one flag value allowed + + if 0 == flags || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_SELECT_COLUMN || + (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_WinFunc) != U32(0) { + nSize = int32(unsafe.Sizeof(Expr{})) + } else { + + if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 || *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { + nSize = int32(uint64(uintptr(0)+44) | uint64(EP_Reduced)) + } else { + + nSize = int32(uint64(uintptr(0)+16) | uint64(EP_TokenOnly)) + } + } + return nSize +} + +// This function returns the space in bytes required to store the copy +// of the Expr structure and a copy of the Expr.u.zToken string (if that +// string is defined.) +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ + var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff + if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { + nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) + } + return (nByte + 7) & libc.CplInt32(7) +} + +// Return the number of bytes required to create a duplicate of the +// expression passed as the first argument. The second argument is a +// mask containing EXPRDUP_XXX flags. +// +// The value returned includes space to create a copy of the Expr struct +// itself and the buffer referred to by Expr.u.zToken, if any. +// +// If the EXPRDUP_REDUCE flag is set, then the return value includes +// space to duplicate all Expr nodes in the tree formed by Expr.pLeft +// and Expr.pRight variables (but not for any structures pointed to or +// descended from the Expr.x.pList or Expr.x.pSelect variables). +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ + var nByte int32 = 0 + if p != 0 { + nByte = dupedExprNodeSize(tls, p, flags) + if flags&EXPRDUP_REDUCE != 0 { + nByte = nByte + (dupedExprSize(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, flags) + dupedExprSize(tls, (*Expr)(unsafe.Pointer(p)).FpRight, flags)) + } + } + return nByte +} + +// This function is similar to sqlite3ExprDup(), except that if pzBuffer +// is not NULL then *pzBuffer is assumed to point to a buffer large enough +// to store the copy of expression p, the copies of p->u.zToken +// (if applicable), and the copies of the p->pLeft and p->pRight expressions, +// if any. Before returning, *pzBuffer is set to the first byte past the +// portion of the buffer copied into by this function. +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pNew uintptr // Value to return + // var zAlloc uintptr at bp, 8 + // Memory space from which to build Expr object + var staticFlag U32 // EP_Static if space not obtained from malloc + + // Figure out where to write the new Expr structure. + if pzBuffer != 0 { + *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) = *(*uintptr)(unsafe.Pointer(pzBuffer)) + staticFlag = U32(EP_Static) + + } else { + *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) = Xsqlite3DbMallocRawNN(tls, db, uint64(dupedExprSize(tls, p, dupFlags))) + staticFlag = U32(0) + } + pNew = *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) + + if pNew != 0 { + // Set nNewSize to the size allocated for the structure pointed to + // by pNew. This is either EXPR_FULLSIZE, EXPR_REDUCEDSIZE or + // EXPR_TOKENONLYSIZE. nToken is set to the number of bytes consumed + // by the copy of the p->u.zToken string (if any). + var nStructSize uint32 = uint32(dupedExprStructSize(tls, p, dupFlags)) + var nNewSize int32 = int32(nStructSize & uint32(0xfff)) + var nToken int32 + if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { + nToken = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(p + 8))) + 1 + } else { + nToken = 0 + } + if dupFlags != 0 { + + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)), p, uint64(nNewSize)) + } else { + var nSize U32 = U32(exprStructSize(tls, p)) + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)), p, uint64(nSize)) + if uint64(nSize) < uint64(unsafe.Sizeof(Expr{})) { + libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp))+uintptr(nSize), 0, uint64(unsafe.Sizeof(Expr{}))-uint64(nSize)) + } + } + + // Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) + *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag + + if dupFlags != 0 { + + } + + // Copy the p->u.zToken string, if any. + if nToken != 0 { + var zToken uintptr = libc.AssignPtrUintptr(pNew+8, *(*uintptr)(unsafe.Pointer(bp))+uintptr(nNewSize)) + libc.Xmemcpy(tls, zToken, *(*uintptr)(unsafe.Pointer(p + 8)), uint64(nToken)) + } + + if U32(0) == ((*Expr)(unsafe.Pointer(p)).Fflags|(*Expr)(unsafe.Pointer(pNew)).Fflags)&U32(EP_TokenOnly|EP_Leaf) { + // Fill in the pNew->x.pSelect or pNew->x.pList member. + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { + *(*uintptr)(unsafe.Pointer(pNew + 32)) = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(p + 32)), dupFlags) + } else { + *(*uintptr)(unsafe.Pointer(pNew + 32)) = Xsqlite3ExprListDup(tls, db, *(*uintptr)(unsafe.Pointer(p + 32)), dupFlags) + } + } + + // Fill in pNew->pLeft and pNew->pRight. + if (*Expr)(unsafe.Pointer(pNew)).Fflags&U32(EP_Reduced|EP_TokenOnly|EP_WinFunc) != U32(0) { + *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) += uintptr(dupedExprNodeSize(tls, p, dupFlags)) + if !((*Expr)(unsafe.Pointer(pNew)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { + (*Expr)(unsafe.Pointer(pNew)).FpLeft = func() uintptr { + if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 { + return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft, EXPRDUP_REDUCE, bp) + } + return uintptr(0) + }() + (*Expr)(unsafe.Pointer(pNew)).FpRight = func() uintptr { + if (*Expr)(unsafe.Pointer(p)).FpRight != 0 { + return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight, EXPRDUP_REDUCE, bp) + } + return uintptr(0) + }() + } + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_WinFunc) != U32(0) { + *(*uintptr)(unsafe.Pointer(pNew + 64)) = Xsqlite3WindowDup(tls, db, pNew, *(*uintptr)(unsafe.Pointer(p + 64))) + + } + if pzBuffer != 0 { + *(*uintptr)(unsafe.Pointer(pzBuffer)) = *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) + } + } else { + if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { + if int32((*Expr)(unsafe.Pointer(pNew)).Fop) == TK_SELECT_COLUMN { + (*Expr)(unsafe.Pointer(pNew)).FpLeft = (*Expr)(unsafe.Pointer(p)).FpLeft + + } else { + (*Expr)(unsafe.Pointer(pNew)).FpLeft = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft, 0) + } + (*Expr)(unsafe.Pointer(pNew)).FpRight = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight, 0) + } + } + } + return pNew +} + +// Create and return a deep copy of the object passed as the second +// argument. If an OOM condition is encountered, NULL is returned +// and the db->mallocFailed flag set. +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ + var pRet uintptr = uintptr(0) + if p != 0 { + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) + pRet = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) + if pRet != 0 { + var i int32 + (*With)(unsafe.Pointer(pRet)).FnCte = (*With)(unsafe.Pointer(p)).FnCte + for i = 0; i < (*With)(unsafe.Pointer(p)).FnCte; i++ { + (*Cte)(unsafe.Pointer(pRet + 16 + uintptr(i)*48)).FpSelect = Xsqlite3SelectDup(tls, db, (*Cte)(unsafe.Pointer(p+16+uintptr(i)*48)).FpSelect, 0) + (*Cte)(unsafe.Pointer(pRet + 16 + uintptr(i)*48)).FpCols = Xsqlite3ExprListDup(tls, db, (*Cte)(unsafe.Pointer(p+16+uintptr(i)*48)).FpCols, 0) + (*Cte)(unsafe.Pointer(pRet + 16 + uintptr(i)*48)).FzName = Xsqlite3DbStrDup(tls, db, (*Cte)(unsafe.Pointer(p+16+uintptr(i)*48)).FzName) + } + } + } + return pRet +} + +// The gatherSelectWindows() procedure and its helper routine +// gatherSelectWindowsCallback() are used to scan all the expressions +// an a newly duplicated SELECT statement and gather all of the Window +// objects found there, assembling them onto the linked list at Select->pWin. +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + + Xsqlite3WindowLink(tls, pSelect, pWin) + } + return WRC_Continue +} + +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ + if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { + return WRC_Continue + } + return WRC_Prune +} + +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{gatherSelectWindowsCallback})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{gatherSelectWindowsSelectCallback})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = p + Xsqlite3WalkSelect(tls, bp, p) +} + +// The following group of routines make deep copies of expressions, +// expression lists, ID lists, and select statements. The copies can +// be deleted (by being passed to their respective ...Delete() routines) +// without effecting the originals. +// +// The expression list, ID, and source lists return by sqlite3ExprListDup(), +// sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded +// by subsequent calls to sqlite*ListAppend() routines. +// +// Any tables that the SrcList might point to are not duplicated. +// +// The flags parameter contains a combination of the EXPRDUP_XXX flags. +// If the EXPRDUP_REDUCE flag is set, then the structure returned is a +// truncated version of the usual Expr structure that will be stored as +// part of the in-memory representation of the database schema. +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ + + if p != 0 { + return exprDup(tls, db, p, flags, uintptr(0)) + } + return uintptr(0) +} + +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ + var pNew uintptr + var pItem uintptr + var pOldItem uintptr + var i int32 + var pPriorSelectColOld uintptr = uintptr(0) + var pPriorSelectColNew uintptr = uintptr(0) + + if p == uintptr(0) { + return uintptr(0) + } + pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(Xsqlite3DbMallocSize(tls, db, p))) + if pNew == uintptr(0) { + return uintptr(0) + } + (*ExprList)(unsafe.Pointer(pNew)).FnExpr = (*ExprList)(unsafe.Pointer(p)).FnExpr + (*ExprList)(unsafe.Pointer(pNew)).FnAlloc = (*ExprList)(unsafe.Pointer(p)).FnAlloc + pItem = pNew + 8 /* &.a */ + pOldItem = p + 8 /* &.a */ + i = 0 +__1: + if !(i < (*ExprList)(unsafe.Pointer(p)).FnExpr) { + goto __3 + } + { + var pOldExpr uintptr = (*ExprList_item)(unsafe.Pointer(pOldItem)).FpExpr + var pNewExpr uintptr + (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = Xsqlite3ExprDup(tls, db, pOldExpr, flags) + if pOldExpr != 0 && + int32((*Expr)(unsafe.Pointer(pOldExpr)).Fop) == TK_SELECT_COLUMN && + libc.AssignUintptr(&pNewExpr, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) != uintptr(0) { + if (*Expr)(unsafe.Pointer(pNewExpr)).FpRight != 0 { + pPriorSelectColOld = (*Expr)(unsafe.Pointer(pOldExpr)).FpRight + pPriorSelectColNew = (*Expr)(unsafe.Pointer(pNewExpr)).FpRight + (*Expr)(unsafe.Pointer(pNewExpr)).FpLeft = (*Expr)(unsafe.Pointer(pNewExpr)).FpRight + } else { + if (*Expr)(unsafe.Pointer(pOldExpr)).FpLeft != pPriorSelectColOld { + pPriorSelectColOld = (*Expr)(unsafe.Pointer(pOldExpr)).FpLeft + pPriorSelectColNew = Xsqlite3ExprDup(tls, db, pPriorSelectColOld, flags) + (*Expr)(unsafe.Pointer(pNewExpr)).FpRight = pPriorSelectColNew + } + (*Expr)(unsafe.Pointer(pNewExpr)).FpLeft = pPriorSelectColNew + } + } + (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pOldItem)).FzEName) + (*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags = (*ExprList_item)(unsafe.Pointer(pOldItem)).FsortFlags + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20))&0x3>>0)), 0, 0x3) + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(0), 2, 0x4) + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20))&0x20>>5)), 5, 0x20) + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20))&0x10>>4)), 4, 0x10) + (*ExprList_item)(unsafe.Pointer(pItem)).Fu = (*ExprList_item)(unsafe.Pointer(pOldItem)).Fu + + } + goto __2 +__2: + i++ + pItem += 32 + pOldItem += 32 + goto __1 + goto __3 +__3: + ; + return pNew +} + +// If cursors, triggers, views and subqueries are all omitted from +// the build, then none of the following routines, except for +// sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes +// called with a NULL argument. +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ + var pNew uintptr + var i int32 + var nByte int32 + + if p == uintptr(0) { + return uintptr(0) + } + nByte = int32(uint64(unsafe.Sizeof(SrcList{})) + func() uint64 { + if (*SrcList)(unsafe.Pointer(p)).FnSrc > 0 { + return uint64(unsafe.Sizeof(SrcItem{})) * uint64((*SrcList)(unsafe.Pointer(p)).FnSrc-1) + } + return uint64(0) + }()) + pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(nByte)) + if pNew == uintptr(0) { + return uintptr(0) + } + (*SrcList)(unsafe.Pointer(pNew)).FnSrc = int32(libc.AssignPtrUint32(pNew+4, U32((*SrcList)(unsafe.Pointer(p)).FnSrc))) + for i = 0; i < (*SrcList)(unsafe.Pointer(p)).FnSrc; i++ { + var pNewItem uintptr = pNew + 8 + uintptr(i)*112 + var pOldItem uintptr = p + 8 + uintptr(i)*112 + var pTab uintptr + (*SrcItem)(unsafe.Pointer(pNewItem)).FpSchema = (*SrcItem)(unsafe.Pointer(pOldItem)).FpSchema + (*SrcItem)(unsafe.Pointer(pNewItem)).FzDatabase = Xsqlite3DbStrDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FzDatabase) + (*SrcItem)(unsafe.Pointer(pNewItem)).FzName = Xsqlite3DbStrDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FzName) + (*SrcItem)(unsafe.Pointer(pNewItem)).FzAlias = Xsqlite3DbStrDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FzAlias) + (*SrcItem)(unsafe.Pointer(pNewItem)).Ffg = (*SrcItem)(unsafe.Pointer(pOldItem)).Ffg + (*SrcItem)(unsafe.Pointer(pNewItem)).FiCursor = (*SrcItem)(unsafe.Pointer(pOldItem)).FiCursor + (*SrcItem)(unsafe.Pointer(pNewItem)).FaddrFillSub = (*SrcItem)(unsafe.Pointer(pOldItem)).FaddrFillSub + (*SrcItem)(unsafe.Pointer(pNewItem)).FregReturn = (*SrcItem)(unsafe.Pointer(pOldItem)).FregReturn + if uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 + 4))&0x2>>1)) != 0 { + *(*uintptr)(unsafe.Pointer(pNewItem + 96)) = Xsqlite3DbStrDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 96))) + } + (*SrcItem)(unsafe.Pointer(pNewItem)).Fu2 = (*SrcItem)(unsafe.Pointer(pOldItem)).Fu2 + if uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 + 4))&0x80>>7)) != 0 { + (*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNewItem + 104)))).FnUse++ + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 + 4))&0x4>>2)) != 0 { + *(*uintptr)(unsafe.Pointer(pNewItem + 96)) = Xsqlite3ExprListDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 96)), flags) + } + pTab = libc.AssignPtrUintptr(pNewItem+32, (*SrcItem)(unsafe.Pointer(pOldItem)).FpTab) + if pTab != 0 { + (*Table)(unsafe.Pointer(pTab)).FnTabRef++ + } + (*SrcItem)(unsafe.Pointer(pNewItem)).FpSelect = Xsqlite3SelectDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FpSelect, flags) + (*SrcItem)(unsafe.Pointer(pNewItem)).FpOn = Xsqlite3ExprDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FpOn, flags) + (*SrcItem)(unsafe.Pointer(pNewItem)).FpUsing = Xsqlite3IdListDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FpUsing) + (*SrcItem)(unsafe.Pointer(pNewItem)).FcolUsed = (*SrcItem)(unsafe.Pointer(pOldItem)).FcolUsed + } + return pNew +} + +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ + var pNew uintptr + var i int32 + + if p == uintptr(0) { + return uintptr(0) + } + pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(IdList{}))) + if pNew == uintptr(0) { + return uintptr(0) + } + (*IdList)(unsafe.Pointer(pNew)).FnId = (*IdList)(unsafe.Pointer(p)).FnId + (*IdList)(unsafe.Pointer(pNew)).Fa = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64((*IdList)(unsafe.Pointer(p)).FnId)*uint64(unsafe.Sizeof(IdList_item{})))) + if (*IdList)(unsafe.Pointer(pNew)).Fa == uintptr(0) { + Xsqlite3DbFreeNN(tls, db, pNew) + return uintptr(0) + } + // Note that because the size of the allocation for p->a[] is not + // necessarily a power of two, sqlite3IdListAppend() may not be called + // on the duplicate created by this function. + for i = 0; i < (*IdList)(unsafe.Pointer(p)).FnId; i++ { + var pNewItem uintptr = (*IdList)(unsafe.Pointer(pNew)).Fa + uintptr(i)*16 + var pOldItem uintptr = (*IdList)(unsafe.Pointer(p)).Fa + uintptr(i)*16 + (*IdList_item)(unsafe.Pointer(pNewItem)).FzName = Xsqlite3DbStrDup(tls, db, (*IdList_item)(unsafe.Pointer(pOldItem)).FzName) + (*IdList_item)(unsafe.Pointer(pNewItem)).Fidx = (*IdList_item)(unsafe.Pointer(pOldItem)).Fidx + } + return pNew +} + +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(0) + var pNext uintptr = uintptr(0) + var pp uintptr = bp /* &pRet */ + var p uintptr + + for p = pDup; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { + var pNew uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Select{}))) + if pNew == uintptr(0) { + break + } + (*Select)(unsafe.Pointer(pNew)).FpEList = Xsqlite3ExprListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpEList, flags) + (*Select)(unsafe.Pointer(pNew)).FpSrc = Xsqlite3SrcListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpSrc, flags) + (*Select)(unsafe.Pointer(pNew)).FpWhere = Xsqlite3ExprDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWhere, flags) + (*Select)(unsafe.Pointer(pNew)).FpGroupBy = Xsqlite3ExprListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpGroupBy, flags) + (*Select)(unsafe.Pointer(pNew)).FpHaving = Xsqlite3ExprDup(tls, db, (*Select)(unsafe.Pointer(p)).FpHaving, flags) + (*Select)(unsafe.Pointer(pNew)).FpOrderBy = Xsqlite3ExprListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpOrderBy, flags) + (*Select)(unsafe.Pointer(pNew)).Fop = (*Select)(unsafe.Pointer(p)).Fop + (*Select)(unsafe.Pointer(pNew)).FpNext = pNext + (*Select)(unsafe.Pointer(pNew)).FpPrior = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpLimit = Xsqlite3ExprDup(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit, flags) + (*Select)(unsafe.Pointer(pNew)).FiLimit = 0 + (*Select)(unsafe.Pointer(pNew)).FiOffset = 0 + (*Select)(unsafe.Pointer(pNew)).FselFlags = (*Select)(unsafe.Pointer(p)).FselFlags & libc.Uint32FromInt32(libc.CplInt32(SF_UsesEphemeral)) + *(*int32)(unsafe.Pointer(pNew + 20)) = -1 + *(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -1 + (*Select)(unsafe.Pointer(pNew)).FnSelectRow = (*Select)(unsafe.Pointer(p)).FnSelectRow + (*Select)(unsafe.Pointer(pNew)).FpWith = Xsqlite3WithDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWith) + (*Select)(unsafe.Pointer(pNew)).FpWin = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpWinDefn = Xsqlite3WindowListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWinDefn) + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { + gatherSelectWindows(tls, pNew) + } + (*Select)(unsafe.Pointer(pNew)).FselId = (*Select)(unsafe.Pointer(p)).FselId + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + // Any prior OOM might have left the Select object incomplete. + // Delete the whole thing rather than allow an incomplete Select + // to be used by the code generator. + (*Select)(unsafe.Pointer(pNew)).FpNext = uintptr(0) + Xsqlite3SelectDelete(tls, db, pNew) + break + } + *(*uintptr)(unsafe.Pointer(pp)) = pNew + pp = pNew + 80 + pNext = pNew + } + + return *(*uintptr)(unsafe.Pointer(bp /* pRet */)) +} + +// Add a new element to the end of an expression list. If pList is +// initially NULL, then create a new expression list. +// +// The pList argument must be either NULL or a pointer to an ExprList +// obtained from a prior call to sqlite3ExprListAppend(). This routine +// may not be used with an ExprList obtained from sqlite3ExprListDup(). +// Reason: This routine assumes that the number of slots in pList->a[] +// is a power of two. That is true for sqlite3ExprListAppend() returns +// but is not necessarily true from the return value of sqlite3ExprListDup(). +// +// If a memory allocation error occurs, the entire list is freed and +// NULL is returned. If non-NULL is returned, then it is guaranteed +// that the new entry was successfully appended. +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ + +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ + var pItem uintptr + var pList uintptr + + pList = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(ExprList{}))+uint64(unsafe.Sizeof(ExprList_item{}))*uint64(4)) + if pList == uintptr(0) { + Xsqlite3ExprDelete(tls, db, pExpr) + return uintptr(0) + } + (*ExprList)(unsafe.Pointer(pList)).FnAlloc = 4 + (*ExprList)(unsafe.Pointer(pList)).FnExpr = 1 + pItem = pList + 8 + *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem + (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr + return pList +} + +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ + var pItem uintptr + var pNew uintptr + *(*int32)(unsafe.Pointer(pList + 4)) *= 2 + pNew = Xsqlite3DbRealloc(tls, db, pList, + uint64(uint64(unsafe.Sizeof(ExprList{}))+uint64((*ExprList)(unsafe.Pointer(pList)).FnAlloc-1)*uint64(unsafe.Sizeof(ExprList_item{})))) + if pNew == uintptr(0) { + Xsqlite3ExprListDelete(tls, db, pList) + Xsqlite3ExprDelete(tls, db, pExpr) + return uintptr(0) + } else { + pList = pNew + } + pItem = pList + 8 + uintptr(libc.PostIncInt32(&(*ExprList)(unsafe.Pointer(pList)).FnExpr, 1))*32 + *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem + (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr + return pList +} + +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ + var pItem uintptr + if pList == uintptr(0) { + return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + } + if (*ExprList)(unsafe.Pointer(pList)).FnAlloc < (*ExprList)(unsafe.Pointer(pList)).FnExpr+1 { + return Xsqlite3ExprListAppendGrow(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList, pExpr) + } + pItem = pList + 8 + uintptr(libc.PostIncInt32(&(*ExprList)(unsafe.Pointer(pList)).FnExpr, 1))*32 + *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem + (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr + return pList +} + +// pColumns and pExpr form a vector assignment which is part of the SET +// clause of an UPDATE statement. Like this: +// +// (a,b,c) = (expr1,expr2,expr3) +// Or: (a,b,c) = (SELECT x,y,z FROM ....) +// +// For each term of the vector assignment, append new entries to the +// expression list pList. In the case of a subquery on the RHS, append +// TK_SELECT_COLUMN expressions. +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var db uintptr + var n int32 + var i int32 + var iFirst int32 + var pSubExpr uintptr + var pFirst uintptr + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + if pList != 0 { + iFirst = (*ExprList)(unsafe.Pointer(pList)).FnExpr + } else { + iFirst = 0 + } + // pColumns can only be NULL due to an OOM but an OOM will cause an + // exit prior to this routine being invoked + if !(pColumns == uintptr(0)) { + goto __1 + } + goto vector_append_error +__1: + ; + if !(pExpr == uintptr(0)) { + goto __2 + } + goto vector_append_error +__2: + ; + + // If the RHS is a vector, then we can immediately check to see that + // the size of the RHS and LHS match. But if the RHS is a SELECT, + // wildcards ("*") in the result set of the SELECT must be expanded before + // we can do the size check, so defer the size check until code generation. + if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_SELECT && (*IdList)(unsafe.Pointer(pColumns)).FnId != libc.AssignInt32(&n, Xsqlite3ExprVectorSize(tls, pExpr))) { + goto __3 + } + Xsqlite3ErrorMsg(tls, pParse, ts+7530, + libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) + goto vector_append_error +__3: + ; + + i = 0 +__4: + if !(i < (*IdList)(unsafe.Pointer(pColumns)).FnId) { + goto __6 + } + pSubExpr = Xsqlite3ExprForVectorField(tls, pParse, pExpr, i, (*IdList)(unsafe.Pointer(pColumns)).FnId) + + if !(pSubExpr == uintptr(0)) { + goto __7 + } + goto __5 +__7: + ; + pList = Xsqlite3ExprListAppend(tls, pParse, pList, pSubExpr) + if !(pList != 0) { + goto __8 + } + + (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr((*ExprList)(unsafe.Pointer(pList)).FnExpr-1)*32)).FzEName = (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumns)).Fa + uintptr(i)*16)).FzName + (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumns)).Fa + uintptr(i)*16)).FzName = uintptr(0) +__8: + ; + goto __5 +__5: + i++ + goto __4 + goto __6 +__6: + ; + + if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT && pList != uintptr(0)) { + goto __9 + } + pFirst = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(iFirst)*32)).FpExpr + + // Store the SELECT statement in pRight so it will be deleted when + // sqlite3ExprListDelete() is called + (*Expr)(unsafe.Pointer(pFirst)).FpRight = pExpr + pExpr = uintptr(0) + + // Remember the size of the LHS in iTable so that we can check that + // the RHS and LHS sizes match during code generation. + (*Expr)(unsafe.Pointer(pFirst)).FiTable = (*IdList)(unsafe.Pointer(pColumns)).FnId +__9: + ; + +vector_append_error: + Xsqlite3ExprUnmapAndDelete(tls, pParse, pExpr) + Xsqlite3IdListDelete(tls, db, pColumns) + return pList +} + +// Set the sort order for the last element on the given ExprList. +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ + var pItem uintptr + if p == uintptr(0) { + return + } + + pItem = p + 8 + uintptr((*ExprList)(unsafe.Pointer(p)).FnExpr-1)*32 + + if iSortOrder == -1 { + iSortOrder = SQLITE_SO_ASC + } + (*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags = U8(iSortOrder) + + if eNulls != -1 { + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(1), 5, 0x20) + if iSortOrder != eNulls { + *(*U8)(unsafe.Pointer(pItem + 16)) |= U8(KEYINFO_ORDER_BIGNULL) + } + } +} + +// Set the ExprList.a[].zEName element of the most recently added item +// on the expression list. +// +// pList might be NULL following an OOM error. But pName should never be +// NULL. If a memory allocation fails, the pParse->db->mallocFailed flag +// is set. +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ + + if pList != 0 { + var pItem uintptr + + pItem = pList + 8 + uintptr((*ExprList)(unsafe.Pointer(pList)).FnExpr-1)*32 + + (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrNDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) + if dequote != 0 { + // If dequote==0, then pName->z does not point to part of a DDL + // statement handled by the parser. And so no token need be added + // to the token-map. + Xsqlite3Dequote(tls, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameTokenMap(tls, pParse, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName, pName) + } + } + } +} + +// Set the ExprList.a[].zSpan element of the most recently added item +// on the expression list. +// +// pList might be NULL following an OOM error. But pSpan should never be +// NULL. If a memory allocation fails, the pParse->db->mallocFailed flag +// is set. +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if pList != 0 { + var pItem uintptr = pList + 8 + uintptr((*ExprList)(unsafe.Pointer(pList)).FnExpr-1)*32 + + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName == uintptr(0) { + (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(ENAME_SPAN), 0, 0x3) + } + } +} + +// If the expression list pEList contains more than iLimit elements, +// leave an error message in pParse. +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 2*4)) + + if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { + Xsqlite3ErrorMsg(tls, pParse, ts+7560, libc.VaList(bp, zObject)) + } +} + +// Delete an entire expression list. +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ + var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr + var pItem uintptr = pList + 8 /* &.a */ + + for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&i, 1) > 0 { + Xsqlite3ExprDelete(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) + Xsqlite3DbFree(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + pItem += 32 + } + Xsqlite3DbFreeNN(tls, db, pList) +} + +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ + if pList != 0 { + exprListDeleteNN(tls, db, pList) + } +} + +// Return the bitwise-OR of all Expr.flags fields in the given +// ExprList. +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ + var i int32 + var m U32 = U32(0) + + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr + + m = m | (*Expr)(unsafe.Pointer(pExpr)).Fflags + } + return m +} + +// This is a SELECT-node callback for the expression walker that +// always "fails". By "fail" in this case, we mean set +// pWalker->eCode to zero and abort. +// +// This callback is used by multiple expression walkers. +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ + _ = NotUsed + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + return WRC_Abort +} + +// Check the input string to see if it is "true" or "false" (in any case). +// +// If the string is.... Return +// "true" EP_IsTrue +// "false" EP_IsFalse +// anything else 0 +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ + if Xsqlite3StrICmp(tls, zIn, ts+6637) == 0 { + return U32(EP_IsTrue) + } + if Xsqlite3StrICmp(tls, zIn, ts+6642) == 0 { + return U32(EP_IsFalse) + } + return U32(0) +} + +// If the input expression is an ID with the name "true" or "false" +// then convert it into an TK_TRUEFALSE term. Return non-zero if +// the conversion happened, and zero if the expression is unaltered. +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ + var v U32 + + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && + libc.AssignUint32(&v, Xsqlite3IsTrueOrFalse(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) != U32(0) { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) + *(*U32)(unsafe.Pointer(pExpr + 4)) |= v + return 1 + } + return 0 +} + +// The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE +// and 0 if it is FALSE. +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ + pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) + + return libc.Bool32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) +} + +// If pExpr is an AND or OR expression, try to simplify it by eliminating +// terms that are always true or false. Return the simplified expression. +// Or return the original expression if no simplification is possible. +// +// Examples: +// +// (x<10) AND true => (x<10) +// (x<10) AND false => false +// (x<10) AND (y=22 OR false) => (x<10) AND (y=22) +// (x<10) AND (y=22 OR true) => (x<10) +// (y=22) OR true => true +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { + var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + var pLeft uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue) || (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse) { + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND { + pExpr = pRight + } else { + pExpr = pLeft + } + } else if (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue) || (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse) { + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND { + pExpr = pLeft + } else { + pExpr = pRight + } + } + } + return pExpr +} + +// These routines are Walker callbacks used to check expressions to +// see if they are "constant" for some definition of constant. The +// Walker.eCode value determines the type of "constant" we are looking +// for. +// +// These callback routines are used to implement the following: +// +// sqlite3ExprIsConstant() pWalker->eCode==1 +// sqlite3ExprIsConstantNotJoin() pWalker->eCode==2 +// sqlite3ExprIsTableConstant() pWalker->eCode==3 +// sqlite3ExprIsConstantOrFunction() pWalker->eCode==4 or 5 +// +// In all cases, the callbacks set Walker.eCode=0 and abort if the expression +// is found to not be a constant. +// +// The sqlite3ExprIsConstantOrFunction() is used for evaluating DEFAULT +// expressions in a CREATE TABLE statement. The Walker.eCode value is 5 +// when parsing an existing schema out of the sqlite_schema table and 4 +// when processing a new CREATE TABLE statement. A bound parameter raises +// an error for new statements, but is silently converted +// to NULL for existing schemas. This allows sqlite_schema tables that +// contain a bound parameter because they were generated by older versions +// of SQLite to be parsed by newer versions of SQLite without raising a +// malformed schema error. +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ + + // If pWalker->eCode is 2 then any term of the expression that comes from + // the ON or USING clauses of a left join disqualifies the expression + // from being considered constant. + if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 2 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + return WRC_Abort + } + + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + // Consider functions to be constant if all their arguments are constant + // and either pWalker->eCode==4 or 5 or the function has the + // SQLITE_FUNC_CONST flag. + case TK_FUNCTION: + if (int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) >= 4 || (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) && + !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { + if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 5 { + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_FromDDL) + } + return WRC_Continue + } else { + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + return WRC_Abort + } + fallthrough + case TK_ID: + // Convert "true" or "false" in a DEFAULT clause into the + // appropriate TK_TRUEFALSE operator + if Xsqlite3ExprIdToTrueFalse(tls, pExpr) != 0 { + return WRC_Prune + } + fallthrough + case TK_COLUMN: + fallthrough + case TK_AGG_FUNCTION: + fallthrough + case TK_AGG_COLUMN: + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0) && int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) != 2 { + return WRC_Continue + } + if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 3 && (*Expr)(unsafe.Pointer(pExpr)).FiTable == *(*int32)(unsafe.Pointer(pWalker + 40)) { + return WRC_Continue + } + fallthrough + case TK_IF_NULL_ROW: + fallthrough + case TK_REGISTER: + fallthrough + case TK_DOT: + + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + return WRC_Abort + case TK_VARIABLE: + if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 5 { + // Silently convert bound parameters that appear inside of CREATE + // statements into a NULL when parsing the CREATE statement text out + // of the sqlite_schema table + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) + } else if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 4 { + // A bound parameter in a CREATE statement that originates from + // sqlite3_prepare() causes an error + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + return WRC_Abort + } + fallthrough + default: + // sqlite3SelectWalkFail() disallows + // sqlite3SelectWalkFail() disallows + return WRC_Continue + } + return int32(0) +} + +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(initFlag) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{exprNodeIsConstant})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkFail})) + *(*int32)(unsafe.Pointer(bp + 40)) = iCur + Xsqlite3WalkExpr(tls, bp, p) + return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) +} + +// Walk an expression tree. Return non-zero if the expression is constant +// and 0 if it involves variables or function calls. +// +// For the purposes of this function, a double-quoted string (ex: "abc") +// is considered a variable but a single-quoted string (ex: 'abc') is +// a constant. +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ + return exprIsConst(tls, p, 1, 0) +} + +// Walk an expression tree. Return non-zero if +// +// (1) the expression is constant, and +// (2) the expression does originate in the ON or USING clause +// of a LEFT JOIN, and +// (3) the expression does not contain any EP_FixedCol TK_COLUMN +// operands created by the constant propagation optimization. +// +// When this routine returns true, it indicates that the expression +// can be added to the pParse->pConstExpr list and evaluated once when +// the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ + return exprIsConst(tls, p, 2, 0) +} + +// Walk an expression tree. Return non-zero if the expression is constant +// for any single row of the table with cursor iCur. In other words, the +// expression must not refer to any non-deterministic function nor any +// table other than iCur. +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ + return exprIsConst(tls, p, 3, iCur) +} + +// sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ + var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var i int32 + + // Check if pExpr is identical to any GROUP BY term. If so, consider + // it constant. + for i = 0; i < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr; i++ { + var p uintptr = (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(i)*32)).FpExpr + if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, p, -1) < 2 { + var pColl uintptr = Xsqlite3ExprNNCollSeq(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p) + if Xsqlite3IsBinary(tls, pColl) != 0 { + return WRC_Prune + } + } + } + + // Check if pExpr is a sub-select. If so, consider it variable. + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + return WRC_Abort + } + + return exprNodeIsConstant(tls, pWalker, pExpr) +} + +// Walk the expression tree passed as the first argument. Return non-zero +// if the expression consists entirely of constants or copies of terms +// in pGroupBy that sort with the BINARY collation sequence. +// +// This routine is used to determine if a term of the HAVING clause can +// be promoted into the WHERE clause. In order for such a promotion to work, +// the value of the HAVING clause term must be the same for all members of +// a "group". The requirement that the GROUP BY term must be BINARY +// assumes that no other collating sequence will have a finer-grained +// grouping than binary. In other words (A=B COLLATE binary) implies +// A=B in every other collating sequence. The requirement that the +// GROUP BY be BINARY is stricter than necessary. It would also work +// to promote HAVING clauses that use the same alternative collating +// sequence as the GROUP BY term, but that is much harder to check, +// alternative collating sequences are uncommon, and this is only an +// optimization, so we take the easy way out and simply require the +// GROUP BY to use the BINARY collating sequence. +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(1) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{exprNodeIsConstantOrGroupBy})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = pGroupBy + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse + Xsqlite3WalkExpr(tls, bp, p) + return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) +} + +// Walk an expression tree for the DEFAULT field of a column definition +// in a CREATE TABLE statement. Return non-zero if the expression is +// acceptable for use as a DEFAULT. That is to say, return non-zero if +// the expression is constant or a function call with constant arguments. +// Return and 0 if there are any variables. +// +// isInit is true when parsing from sqlite_schema. isInit is false when +// processing a new CREATE TABLE statement. When isInit is true, parameters +// (such as ? or $abc) in the expression are converted into NULL. When +// isInit is false, parameters raise an error. Parameters should not be +// allowed in a CREATE TABLE statement, but some legacy versions of SQLite +// allowed it, so we need to support it when reading sqlite_schema for +// backwards compatibility. +// +// If isInit is true, set EP_FromDDL on every TK_FUNCTION node. +// +// For the purposes of this function, a double-quoted string (ex: "abc") +// is considered a variable but a single-quoted string (ex: 'abc') is +// a constant. +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ + + return exprIsConst(tls, p, 4+int32(isInit), 0) +} + +// If the expression p codes a constant integer that is small enough +// to fit in a 32-bit integer, return 1 and put the value of the integer +// in *pValue. If the expression is not an integer or if it is too big +// to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 = 0 + if p == uintptr(0) { + return 0 + } // Used to only happen following on OOM + + // If an expression is an integer literal that fits in a signed 32-bit + // integer, then the EP_IntValue flag will have already been set + + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != 0 { + *(*int32)(unsafe.Pointer(pValue)) = *(*int32)(unsafe.Pointer(p + 8)) + return 1 + } + switch int32((*Expr)(unsafe.Pointer(p)).Fop) { + case TK_UPLUS: + { + rc = Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, pValue) + break + + } + case TK_UMINUS: + { + *(*int32)(unsafe.Pointer(bp /* v */)) = 0 + if Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, bp) != 0 { + + *(*int32)(unsafe.Pointer(pValue)) = -*(*int32)(unsafe.Pointer(bp /* v */)) + rc = 1 + } + break + + } + default: + break + } + return rc +} + +// Return FALSE if there is no chance that the expression can be NULL. +// +// If the expression might be NULL or if the expression is too complex +// to tell return TRUE. +// +// This routine is used as an optimization, to skip OP_IsNull opcodes +// when we know that a value cannot be NULL. Hence, a false positive +// (returning TRUE when in fact the expression can never be NULL) might +// be a small performance hit but is otherwise harmless. On the other +// hand, a false negative (returning FALSE when the result could be NULL) +// will likely result in an incorrect answer. So when in doubt, return +// TRUE. +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ + var op U8 + + for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { + p = (*Expr)(unsafe.Pointer(p)).FpLeft + + } + op = (*Expr)(unsafe.Pointer(p)).Fop + if int32(op) == TK_REGISTER { + op = (*Expr)(unsafe.Pointer(p)).Fop2 + } + switch int32(op) { + case TK_INTEGER: + fallthrough + case TK_STRING: + fallthrough + case TK_FLOAT: + fallthrough + case TK_BLOB: + return 0 + case TK_COLUMN: + + return libc.Bool32((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_CanBeNull) != U32(0) || *(*uintptr)(unsafe.Pointer(p + 64)) == uintptr(0) || int32((*Expr)(unsafe.Pointer(p)).FiColumn) >= 0 && + (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol != uintptr(0) && + int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol + uintptr((*Expr)(unsafe.Pointer(p)).FiColumn)*24 + 8))&0xf>>0) == 0) + default: + return 1 + } + return int32(0) +} + +// Return TRUE if the given expression is a constant which would be +// unchanged by OP_Affinity with the affinity given in the second +// argument. +// +// This routine is used to determine if the OP_Affinity operation +// can be omitted. When in doubt return FALSE. A false negative +// is harmless. A false positive, however, can result in the wrong +// answer. +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:104941:20: */ + var op U8 + var unaryMinus int32 = 0 + if int32(aff) == SQLITE_AFF_BLOB { + return 1 + } + for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { + unaryMinus = 1 + } + p = (*Expr)(unsafe.Pointer(p)).FpLeft + } + op = (*Expr)(unsafe.Pointer(p)).Fop + if int32(op) == TK_REGISTER { + op = (*Expr)(unsafe.Pointer(p)).Fop2 + } + switch int32(op) { + case TK_INTEGER: + { + return libc.Bool32(int32(aff) >= SQLITE_AFF_NUMERIC) + + } + case TK_FLOAT: + { + return libc.Bool32(int32(aff) >= SQLITE_AFF_NUMERIC) + + } + case TK_STRING: + { + return libc.Bool32(!(unaryMinus != 0) && int32(aff) == SQLITE_AFF_TEXT) + + } + case TK_BLOB: + { + return libc.BoolInt32(!(unaryMinus != 0)) + + } + case TK_COLUMN: + { + // p cannot be part of a CHECK constraint + return libc.Bool32(int32(aff) >= SQLITE_AFF_NUMERIC && int32((*Expr)(unsafe.Pointer(p)).FiColumn) < 0) + + } + default: + { + return 0 + + } + } + return int32(0) +} + +// Return TRUE if the given string is a row-id column name. +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ + if Xsqlite3StrICmp(tls, z, ts+7583) == 0 { + return 1 + } + if Xsqlite3StrICmp(tls, z, ts+7591) == 0 { + return 1 + } + if Xsqlite3StrICmp(tls, z, ts+7597) == 0 { + return 1 + } + return 0 +} + +// pX is the RHS of an IN operator. If pX is a SELECT statement +// that can be simplified to a direct table access, then return +// a pointer to the SELECT statement. If pX is not a SELECT statement, +// or if the SELECT statement needs to be manifested into a transient +// table, then return NULL. +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ + var p uintptr + var pSrc uintptr + var pEList uintptr + var pTab uintptr + var i int32 + if !((*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_xIsSelect) != U32(0)) { + return uintptr(0) + } // Not a subquery + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_VarSelect) != U32(0) { + return uintptr(0) + } // Correlated subq + p = *(*uintptr)(unsafe.Pointer(pX + 32)) + if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { + return uintptr(0) + } // Not a compound SELECT + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) != 0 { + + return uintptr(0) // No DISTINCT keyword and no aggregate functions + } + // Has no GROUP BY clause + if (*Select)(unsafe.Pointer(p)).FpLimit != 0 { + return uintptr(0) + } // Has no LIMIT clause + if (*Select)(unsafe.Pointer(p)).FpWhere != 0 { + return uintptr(0) + } // Has no WHERE clause + pSrc = (*Select)(unsafe.Pointer(p)).FpSrc + + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc != 1 { + return uintptr(0) + } // Single term in FROM clause + if (*SrcItem)(unsafe.Pointer(pSrc+8)).FpSelect != 0 { + return uintptr(0) + } // FROM is not a subquery or view + pTab = (*SrcItem)(unsafe.Pointer(pSrc + 8)).FpTab + + // FROM clause is not a view + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + return uintptr(0) + } // FROM clause not a virtual table + pEList = (*Select)(unsafe.Pointer(p)).FpEList + + // All SELECT results must be columns. + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + var pRes uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr + if int32((*Expr)(unsafe.Pointer(pRes)).Fop) != TK_COLUMN { + return uintptr(0) + } + // Not a correlated subquery + } + return p +} + +// Generate code that checks the left-most column of index table iCur to see if +// it contains any NULL entries. Cause the register at regHasNull to be set +// to a non-NULL value if iCur contains no NULLs. Cause register regHasNull +// to be set to NULL if iCur contains one or more NULL values. +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ + var addr1 int32 + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) + addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iCur, 0, regHasNull) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) + + Xsqlite3VdbeJumpHere(tls, v, addr1) +} + +// The argument is an IN operator with a list (not a subquery) on the +// right-hand side. Return TRUE if that list is constant. +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ + var pLHS uintptr + var res int32 + + pLHS = (*Expr)(unsafe.Pointer(pIn)).FpLeft + (*Expr)(unsafe.Pointer(pIn)).FpLeft = uintptr(0) + res = Xsqlite3ExprIsConstant(tls, pIn) + (*Expr)(unsafe.Pointer(pIn)).FpLeft = pLHS + return res +} + +// This function is used by the implementation of the IN (...) operator. +// The pX parameter is the expression on the RHS of the IN operator, which +// might be either a list of expressions or a subquery. +// +// The job of this routine is to find or create a b-tree object that can +// be used either to test for membership in the RHS set or to iterate through +// all members of the RHS set, skipping duplicates. +// +// A cursor is opened on the b-tree object that is the RHS of the IN operator +// and pX->iTable is set to the index of that cursor. +// +// The returned value of this function indicates the b-tree type, as follows: +// +// IN_INDEX_ROWID - The cursor was opened on a database table. +// IN_INDEX_INDEX_ASC - The cursor was opened on an ascending index. +// IN_INDEX_INDEX_DESC - The cursor was opened on a descending index. +// IN_INDEX_EPH - The cursor was opened on a specially created and +// populated epheremal table. +// IN_INDEX_NOOP - No cursor was allocated. The IN operator must be +// implemented as a sequence of comparisons. +// +// An existing b-tree might be used if the RHS expression pX is a simple +// subquery such as: +// +// SELECT , ... FROM +// +// If the RHS of the IN operator is a list or a more complex subquery, then +// an ephemeral table might need to be generated from the RHS and then +// pX->iTable made to point to the ephemeral table instead of an +// existing table. +// +// The inFlags parameter must contain, at a minimum, one of the bits +// IN_INDEX_MEMBERSHIP or IN_INDEX_LOOP but not both. If inFlags contains +// IN_INDEX_MEMBERSHIP, then the generated table will be used for a fast +// membership test. When the IN_INDEX_LOOP bit is set, the IN index will +// be used to loop over all values of the RHS of the IN operator. +// +// When IN_INDEX_LOOP is used (and the b-tree will be used to iterate +// through the set members) then the b-tree must not contain duplicates. +// An epheremal table will be created unless the selected columns are guaranteed +// to be unique - either because it is an INTEGER PRIMARY KEY or due to +// a UNIQUE constraint or index. +// +// When IN_INDEX_MEMBERSHIP is used (and the b-tree will be used +// for fast set membership tests) then an epheremal table must +// be used unless is a single INTEGER PRIMARY KEY column or an +// index can be found with the specified as its left-most. +// +// If the IN_INDEX_NOOP_OK and IN_INDEX_MEMBERSHIP are both set and +// if the RHS of the IN operator is a list (not a subquery) then this +// routine might decide that creating an ephemeral b-tree for membership +// testing is too expensive and return IN_INDEX_NOOP. In that case, the +// calling routine should implement the IN operator using a sequence +// of Eq or Ne comparison operations. +// +// When the b-tree is being used for membership tests, the calling function +// might need to know whether or not the RHS side of the IN operator +// contains a NULL. If prRhsHasNull is not a NULL pointer and +// if there is any chance that the (...) might contain a NULL value at +// runtime, then a register is allocated and the register number written +// to *prRhsHasNull. If there is no chance that the (...) contains a +// NULL value, then *prRhsHasNull is left unchanged. +// +// If a register is allocated and its location stored in *prRhsHasNull, then +// the value in that register will be NULL if the b-tree contains one or more +// NULL values, and it will be some non-NULL value if the b-tree contains no +// NULL values. +// +// If the aiMap parameter is not NULL, it must point to an array containing +// one element for each column returned by the SELECT statement on the RHS +// of the IN(...) operator. The i'th entry of the array is populated with the +// offset of the index column that matches the i'th column returned by the +// SELECT. For example, if the expression and selected index are: +// +// (?,?,?) IN (SELECT a, b, c FROM t1) +// CREATE INDEX i1 ON t1(b, c, a); +// +// then aiMap[] is populated with {2, 0, 1}. +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var p uintptr // SELECT to the right of IN operator + var eType int32 = 0 // Type of RHS table. IN_INDEX_* + var iTab int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Cursor of the RHS table + var mustBeUnique int32 // True if RHS must be unique + var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Virtual machine being coded + + mustBeUnique = libc.Bool32(inFlags&U32(IN_INDEX_LOOP) != U32(0)) + + // If the RHS of this IN(...) operator is a SELECT, and if it matters + // whether or not the SELECT result contains NULL values, check whether + // or not NULL is actually possible (it may not be, for example, due + // to NOT NULL constraints in the schema). If no NULL values are possible, + // set prRhsHasNull to 0 before continuing. + if prRhsHasNull != 0 && (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_xIsSelect) != U32(0) { + var i int32 + var pEList uintptr = (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pX + 32)))).FpEList + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) != 0 { + break + } + } + if i == (*ExprList)(unsafe.Pointer(pEList)).FnExpr { + prRhsHasNull = uintptr(0) + } + } + + // Check to see if an existing table or index can be used to + // satisfy the query. This is preferable to generating a new + // ephemeral table. + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && libc.AssignUintptr(&p, isCandidateForInOpt(tls, pX)) != uintptr(0) { + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection + var pTab uintptr // Table
    . + var iDb int32 // Database idx for pTab + var pEList uintptr = (*Select)(unsafe.Pointer(p)).FpEList + var nExpr int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr + + // Because of isCandidateForInOpt(p) + // Because of isCandidateForInOpt(p) + // Because of isCandidateForInOpt(p) + pTab = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpTab + + // Code an OP_Transaction and OP_TableLock for
    . + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + Xsqlite3CodeVerifySchema(tls, pParse, iDb) + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + + // sqlite3GetVdbe() has always been previously called + if nExpr == 1 && int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr)).FiColumn) < 0 { + // The "x IN (SELECT rowid FROM table)" case + var iAddr int32 = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + + Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) + eType = IN_INDEX_ROWID + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7601, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeJumpHere(tls, v, iAddr) + } else { + var pIdx uintptr // Iterator variable + var affinity_ok int32 = 1 + var i int32 + + // Check that the affinity that will be used to perform each + // comparison is the same as the affinity of each column in table + // on the RHS of the IN operator. If it not, it is not possible to + // use any index of the RHS table. + for i = 0; i < nExpr && affinity_ok != 0; i++ { + var pLhs uintptr = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pX)).FpLeft, i) + var iCol int32 = int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr)).FiColumn) + var idxaff uint8 = Xsqlite3TableColumnAffinity(tls, pTab, iCol) // RHS table + var cmpaff uint8 = Xsqlite3CompareAffinity(tls, pLhs, idxaff) + + switch int32(cmpaff) { + case SQLITE_AFF_BLOB: + break + fallthrough + case SQLITE_AFF_TEXT: + // sqlite3CompareAffinity() only returns TEXT if one side or the + // other has no affinity and the other side is TEXT. Hence, + // the only way for cmpaff to be TEXT is for idxaff to be TEXT + // and for the term on the LHS of the IN to have no affinity. + + break + fallthrough + default: + affinity_ok = libc.Bool32(int32(idxaff) >= SQLITE_AFF_NUMERIC) + } + } + + if affinity_ok != 0 { + // Search for an existing index that will work for this IN operator + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && eType == 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + var colUsed Bitmask // Columns of the index used + var mCol Bitmask // Mask for the current column + if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) < nExpr { + continue + } + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != uintptr(0) { + continue + } + // Maximum nColumn is BMS-2, not BMS-1, so that we can compute + // BITMASK(nExpr) without overflowing + + if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + continue + } + if mustBeUnique != 0 { + if int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) > nExpr || + int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) > nExpr && !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None) { + continue // This index is not unique over the IN RHS columns + } + } + + colUsed = uint64(0) // Columns of index used so far + for i = 0; i < nExpr; i++ { + var pLhs uintptr = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pX)).FpLeft, i) + var pRhs uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr + var pReq uintptr = Xsqlite3BinaryCompareCollSeq(tls, pParse, pLhs, pRhs) + var j int32 + + for j = 0; j < nExpr; j++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) != int32((*Expr)(unsafe.Pointer(pRhs)).FiColumn) { + continue + } + + if pReq != uintptr(0) && Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pReq)).FzName, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8))) != 0 { + continue + } + break + } + if j == nExpr { + break + } + mCol = Bitmask(uint64(1)) << j + if mCol&colUsed != 0 { + break + } // Each column used only once + colUsed = colUsed | mCol + if aiMap != 0 { + *(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)) = j + } + } + + if colUsed == Bitmask(uint64(1))<iTable, +// however the cursor number returned might not be the same, as it might +// have been duplicated using OP_OpenDup. +// +// If the LHS expression ("x" in the examples) is a column value, or +// the SELECT statement returns a column value, then the affinity of that +// column is used to build the index keys. If both 'x' and the +// SELECT... statement are columns, then numeric affinity is used +// if either column has NUMERIC or INTEGER affinity. If neither +// 'x' nor the SELECT... statement are columns, then numeric affinity +// is used. +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ + bp := tls.Alloc(65) + defer tls.Free(65) + + var addrOnce int32 = 0 // Address of the OP_Once instruction at top + var addr int32 // Address of OP_OpenEphemeral instruction + var pLeft uintptr // the LHS of the IN operator + var pKeyInfo uintptr = uintptr(0) // Key information + var nVal int32 // Size of vector pLeft + var v uintptr // The prepared statement under construction + + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + // The evaluation of the IN must be repeated every time it + // is encountered if any of the following is true: + // + // * The right-hand side is a correlated subquery + // * The right-hand side is an expression list containing variables + // * We are inside a trigger + // + // If all of the above are false, then we can compute the RHS just once + // and reuse it many names. + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_VarSelect) != U32(0)) && (*Parse)(unsafe.Pointer(pParse)).FiSelfTab == 0 { + // Reuse of the RHS is allowed + // If this routine has already been coded, but the previous code + // might not have been invoked yet, so invoke it now as a subroutine. + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { + addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7723, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) + } + + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)), + *(*int32)(unsafe.Pointer(pExpr + 64))) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, iTab, (*Expr)(unsafe.Pointer(pExpr)).FiTable) + Xsqlite3VdbeJumpHere(tls, v, addrOnce) + return + } + + // Begin coding the subroutine + + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Subrtn) + + *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + *(*int32)(unsafe.Pointer(pExpr + 64)) = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, *(*int32)(unsafe.Pointer(pExpr + 64 + 4))) + 1 + + addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + } + + // Check to see if this is a vector IN operator + pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + nVal = Xsqlite3ExprVectorSize(tls, pLeft) + + // Construct the ephemeral table that will contain the content of + // RHS of the IN operator. + (*Expr)(unsafe.Pointer(pExpr)).FiTable = iTab + addr = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Expr)(unsafe.Pointer(pExpr)).FiTable, nVal) + pKeyInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nVal, 1) + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + // Case 1: expr IN (SELECT ...) + // + // Generate code to write the results of the select into the temporary + // table allocated and opened above. + var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + var pEList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpEList + + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7746, libc.VaList(bp+8, func() uintptr { + if addrOnce != 0 { + return ts + 1525 /* "" */ + } + return ts + 7765 /* "CORRELATED " */ + }(), (*Select)(unsafe.Pointer(pSelect)).FselId)) + // If the LHS and RHS of the IN operator do not match, that + // error will have been caught long before we reach this point. + if (*ExprList)(unsafe.Pointer(pEList)).FnExpr == nVal { + var pCopy uintptr + // var dest SelectDest at bp+24, 40 + + var i int32 + var rc int32 + Xsqlite3SelectDestInit(tls, bp+24, SRT_Set, iTab) + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FzAffSdst = exprINAffinity(tls, pParse, pExpr) + (*Select)(unsafe.Pointer(pSelect)).FiLimit = 0 + + // Caused by OOM in sqlite3KeyInfoAlloc() + pCopy = Xsqlite3SelectDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSelect, 0) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + rc = 1 + } else { + rc = Xsqlite3Select(tls, pParse, pCopy, bp+24) + } + Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCopy) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FzAffSdst) + if rc != 0 { + Xsqlite3KeyInfoUnref(tls, pKeyInfo) + return + } + // OOM will cause exit after sqlite3Select() + + for i = 0; i < nVal; i++ { + var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pLeft, i) + *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) = Xsqlite3BinaryCompareCollSeq(tls, + pParse, p, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) + } + } + } else if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != uintptr(0) { + // Case 2: expr IN (exprlist) + // + // For each expression, build an index key from the evaluation and + // store it in the temporary table. If is a column, then use + // that columns affinity when building index keys. If is not + // a column, use numeric affinity. + // var affinity uint8 at bp+64, 1 + // Affinity of the LHS of the IN + var i int32 + var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + var pItem uintptr + var r1 int32 + var r2 int32 + *(*uint8)(unsafe.Pointer(bp + 64 /* affinity */)) = Xsqlite3ExprAffinity(tls, pLeft) + if int32(*(*uint8)(unsafe.Pointer(bp + 64))) <= SQLITE_AFF_NONE { + *(*uint8)(unsafe.Pointer(bp + 64 /* affinity */)) = uint8(SQLITE_AFF_BLOB) + } else if int32(*(*uint8)(unsafe.Pointer(bp + 64))) == SQLITE_AFF_REAL { + *(*uint8)(unsafe.Pointer(bp + 64 /* affinity */)) = uint8(SQLITE_AFF_NUMERIC) + } + if pKeyInfo != 0 { + + *(*uintptr)(unsafe.Pointer(pKeyInfo + 32)) = Xsqlite3ExprCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + } + + // Loop through each expression in . + r1 = Xsqlite3GetTempReg(tls, pParse) + r2 = Xsqlite3GetTempReg(tls, pParse) + i = (*ExprList)(unsafe.Pointer(pList)).FnExpr + pItem = pList + 8 /* &.a */ + __1: + if !(i > 0) { + goto __3 + } + { + var pE2 uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr + + // If the expression is not constant then we will need to + // disable the test that was generated above that makes sure + // this code only executes once. Because for a non-constant + // expression we need to rerun this code each time. + if addrOnce != 0 && !(Xsqlite3ExprIsConstant(tls, pE2) != 0) { + Xsqlite3VdbeChangeToNoop(tls, v, addrOnce) + *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Subrtn)) + addrOnce = 0 + } + + // Evaluate the expression and insert it into the temp table + Xsqlite3ExprCode(tls, pParse, pE2, r1) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, r1, 1, r2, bp+64, 1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r2, r1, 1) + + } + goto __2 + __2: + i-- + pItem += 32 + goto __1 + goto __3 + __3: + ; + Xsqlite3ReleaseTempReg(tls, pParse, r1) + Xsqlite3ReleaseTempReg(tls, pParse, r2) + } + if pKeyInfo != 0 { + Xsqlite3VdbeChangeP4(tls, v, addr, pKeyInfo, -9) + } + if addrOnce != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrOnce) + // Subroutine return + + Xsqlite3VdbeAddOp1(tls, v, OP_Return, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */))) + Xsqlite3VdbeChangeP1(tls, v, *(*int32)(unsafe.Pointer(pExpr + 64))-1, Xsqlite3VdbeCurrentAddr(tls, v)-1) + Xsqlite3ClearTempRegCache(tls, pParse) + } +} + +// Generate code for scalar subqueries used as a subquery expression +// or EXISTS operator: +// +// (SELECT a FROM b) -- subquery +// EXISTS (SELECT a FROM b) -- EXISTS subquery +// +// The pExpr parameter is the SELECT or EXISTS operator to be coded. +// +// Return the register that holds the result. For a multi-column SELECT, +// the result is stored in a contiguous array of registers and the +// return value is the register of the left-most result column. +// Return 0 if an error occurs. +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var addrOnce int32 = 0 // Address of OP_Once at top of subroutine + var rReg int32 = 0 // Register storing resulting + var pSel uintptr // SELECT statement to encode + // var dest SelectDest at bp+24, 40 + // How to deal with SELECT result + var nReg int32 // Registers to allocate + var pLimit uintptr // New limit expression + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return 0 + } + + pSel = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + + // If this routine has already been coded, then invoke it as a + // subroutine. + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7777, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)), + *(*int32)(unsafe.Pointer(pExpr + 64))) + return (*Expr)(unsafe.Pointer(pExpr)).FiTable + } + + // Begin coding the subroutine + + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Subrtn) + *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + *(*int32)(unsafe.Pointer(pExpr + 64)) = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, *(*int32)(unsafe.Pointer(pExpr + 64 + 4))) + 1 + + // The evaluation of the EXISTS/SELECT must be repeated every time it + // is encountered if any of the following is true: + // + // * The right-hand side is a correlated subquery + // * The right-hand side is an expression list containing variables + // * We are inside a trigger + // + // If all of the above are false, then we can run this code just once + // save the results, and reuse the same result on subsequent invocations. + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_VarSelect) != U32(0)) { + addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + } + + // For a SELECT, generate code to put the values for all columns of + // the first row into an array of registers and return the index of + // the first register. + // + // If this is an EXISTS, write an integer 0 (not exists) or 1 (exists) + // into a register and return that register number. + // + // In both cases, the query is augmented with "LIMIT 1". Any + // preexisting limit is discarded in place of the new LIMIT 1. + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7795, libc.VaList(bp+8, func() uintptr { + if addrOnce != 0 { + return ts + 1525 /* "" */ + } + return ts + 7765 /* "CORRELATED " */ + }(), (*Select)(unsafe.Pointer(pSel)).FselId)) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { + nReg = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr + } else { + nReg = 1 + } + Xsqlite3SelectDestInit(tls, bp+24, 0, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) + *(*int32)(unsafe.Pointer(pParse + 56)) += nReg + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FeDest = U8(SRT_Mem) + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FiSDParm + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FnSdst = nReg + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm, (*SelectDest)(unsafe.Pointer(bp+24)).FiSDParm+nReg-1) + + } else { + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FeDest = U8(SRT_Exists) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm) + + } + if (*Select)(unsafe.Pointer(pSel)).FpLimit != 0 { + // The subquery already has a limit. If the pre-existing limit is X + // then make the new limit X<>0 so that the new limit is either 1 or 0 + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7408) + if pLimit != 0 { + (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = uint8(SQLITE_AFF_NUMERIC) + pLimit = Xsqlite3PExpr(tls, pParse, TK_NE, + Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft, 0), pLimit) + } + Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft) + (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft = pLimit + } else { + // If there is no pre-existing limit add a limit of 1 + pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+7816) + (*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0)) + } + (*Select)(unsafe.Pointer(pSel)).FiLimit = 0 + if Xsqlite3Select(tls, pParse, pSel, bp+24) != 0 { + (*Expr)(unsafe.Pointer(pExpr)).Fop2 = (*Expr)(unsafe.Pointer(pExpr)).Fop + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_ERROR) + return 0 + } + (*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.AssignInt32(&rReg, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm) + + if addrOnce != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrOnce) + } + + // Subroutine return + + Xsqlite3VdbeAddOp1(tls, v, OP_Return, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */))) + Xsqlite3VdbeChangeP1(tls, v, *(*int32)(unsafe.Pointer(pExpr + 64))-1, Xsqlite3VdbeCurrentAddr(tls, v)-1) + Xsqlite3ClearTempRegCache(tls, pParse) + return rReg +} + +// Expr pIn is an IN(...) expression. This function checks that the +// sub-select on the RHS of the IN() operator has the same number of +// columns as the vector on the LHS. Or, if the RHS of the IN() is not +// a sub-query, that the LHS is a vector of size 1. +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ + var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) + if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { + if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { + Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr, nVector) + return 1 + } + } else if nVector != 1 { + Xsqlite3VectorErrorMsg(tls, pParse, (*Expr)(unsafe.Pointer(pIn)).FpLeft) + return 1 + } + return 0 +} + +// Generate code for an IN expression. +// +// x IN (SELECT ...) +// x IN (value, value, ...) +// +// The left-hand side (LHS) is a scalar or vector expression. The +// right-hand side (RHS) is an array of zero or more scalar values, or a +// subquery. If the RHS is a subquery, the number of result columns must +// match the number of columns in the vector on the LHS. If the RHS is +// a list of values, the LHS must be a scalar. +// +// The IN operator is true if the LHS value is contained within the RHS. +// The result is false if the LHS is definitely not in the RHS. The +// result is NULL if the presence of the LHS in the RHS cannot be +// determined due to NULLs. +// +// This routine generates code that jumps to destIfFalse if the LHS is not +// contained within the RHS. If due to NULLs we cannot determine if the LHS +// is contained in the RHS then jump to destIfNull. If the LHS is contained +// within the RHS then fall through. +// +// See the separate in-operator.md documentation file in the canonical +// SQLite source tree for additional information. +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var rRhsHasNull int32 at bp, 4 + // Register that is true if RHS contains NULL values + var eType int32 // Type of the RHS + var rLhs int32 // Register(s) holding the LHS values + var rLhsOrig int32 // LHS values prior to reordering by aiMap[] + var v uintptr // Statement under construction + var aiMap uintptr // Map from vector field to index column + var zAff uintptr // Affinity string for comparisons + var nVector int32 // Size of vectors for this IN operator + // var iDummy int32 at bp+8, 4 + // Dummy parameter to exprCodeVector() + var pLeft uintptr // The LHS of the IN operator + var i int32 // loop counter + var destStep2 int32 // Where to jump when NULLs seen in step 2 + var destStep6 int32 // Start of code for Step 6 + var addrTruthOp int32 // Address of opcode that determines the IN is true + var destNotNull int32 // Jump here if a comparison is not true in step 6 + var addrTop int32 // Top of the step-6 loop + // var iTab int32 at bp+4, 4 + // Index to use + var okConstFactor U8 + var op int32 + var op1 int32 + var pList uintptr + var pColl uintptr + var labelOk int32 + var r2 int32 + // var regToFree int32 at bp+12, 4 + + var regCkNull int32 + var ii int32 + var p uintptr + var p1 uintptr + var pColl1 uintptr + var r3 int32 + *(*int32)(unsafe.Pointer(bp /* rRhsHasNull */)) = 0 + aiMap = uintptr(0) + zAff = uintptr(0) + destStep6 = 0 + *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)) = 0 + okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + + pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + if !(Xsqlite3ExprCheckIN(tls, pParse, pExpr) != 0) { + goto __1 + } + return +__1: + ; + zAff = exprINAffinity(tls, pParse, pExpr) + nVector = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + aiMap = Xsqlite3DbMallocZero(tls, + (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(nVector)*(uint64(unsafe.Sizeof(int32(0)))+uint64(unsafe.Sizeof(uint8(0))))+uint64(1))) + if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { + goto __2 + } + goto sqlite3ExprCodeIN_oom_error +__2: + ; + + // Attempt to compute the RHS. After this step, if anything other than + // IN_INDEX_NOOP is returned, the table opened with cursor iTab + // contains the values that make up the RHS. If IN_INDEX_NOOP is returned, + // the RHS has not yet been coded. + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + // OOM detected prior to this routine + + eType = Xsqlite3FindInIndex(tls, pParse, pExpr, + uint32(IN_INDEX_MEMBERSHIP|IN_INDEX_NOOP_OK), + func() uintptr { + if destIfFalse == destIfNull { + return uintptr(0) + } + return bp /* &rRhsHasNull */ + }(), + aiMap, bp+4 /* &iTab */) + + // Code the LHS, the from " IN (...)". If the LHS is a + // vector, then it is stored in an array of nVector registers starting + // at r1. + // + // sqlite3FindInIndex() might have reordered the fields of the LHS vector + // so that the fields are in the same order as an existing index. The + // aiMap[] array contains a mapping from the original LHS field order to + // the field order that matches the RHS index. + // + // Avoid factoring the LHS of the IN(...) expression out of the loop, + // even if it is constant, as OP_Affinity may be used on the register + // by code generated below. + + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + rLhsOrig = exprCodeVector(tls, pParse, pLeft, bp+8) + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor + i = 0 +__3: + if !(i < nVector && *(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)) == i) { + goto __5 + } + goto __4 +__4: + i++ + goto __3 + goto __5 +__5: + ; // Are LHS fields reordered? + if !(i == nVector) { + goto __6 + } + // LHS fields are not reordered + rLhs = rLhsOrig + goto __7 +__6: + // Need to reorder the LHS fields according to aiMap + rLhs = Xsqlite3GetTempRange(tls, pParse, nVector) + i = 0 +__8: + if !(i < nVector) { + goto __10 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, rLhsOrig+i, rLhs+*(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)), 0) + goto __9 +__9: + i++ + goto __8 + goto __10 +__10: + ; +__7: + ; + + // If sqlite3FindInIndex() did not find or create an index that is + // suitable for evaluating the IN operator, then evaluate using a + // sequence of comparisons. + // + // This is step (1) in the in-operator.md optimized algorithm. + if !(eType == IN_INDEX_NOOP) { + goto __11 + } + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) + regCkNull = 0 + + pList = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + pColl = Xsqlite3ExprCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + if !(destIfNull != destIfFalse) { + goto __12 + } + regCkNull = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_BitAnd, rLhs, rLhs, regCkNull) +__12: + ; + ii = 0 +__13: + if !(ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr) { + goto __15 + } + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*32)).FpExpr, bp+12) + if !(regCkNull != 0 && Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*32)).FpExpr) != 0) { + goto __16 + } + Xsqlite3VdbeAddOp3(tls, v, OP_BitAnd, regCkNull, r2, regCkNull) +__16: + ; + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 12 /* regToFree */))) + if !(ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr-1 || destIfNull != destIfFalse) { + goto __17 + } + if rLhs != r2 { + op = OP_Eq + } else { + op = OP_NotNull + } + Xsqlite3VdbeAddOp4(tls, v, op, rLhs, labelOk, r2, + pColl, -2) + + Xsqlite3VdbeChangeP5(tls, v, uint16(*(*uint8)(unsafe.Pointer(zAff)))) + goto __18 +__17: + if rLhs != r2 { + op1 = OP_Ne + } else { + op1 = OP_IsNull + } + + Xsqlite3VdbeAddOp4(tls, v, op1, rLhs, destIfFalse, r2, + pColl, -2) + + Xsqlite3VdbeChangeP5(tls, v, uint16(int32(*(*uint8)(unsafe.Pointer(zAff)))|SQLITE_JUMPIFNULL)) +__18: + ; + goto __14 +__14: + ii++ + goto __13 + goto __15 +__15: + ; + if !(regCkNull != 0) { + goto __19 + } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regCkNull, destIfNull) + Xsqlite3VdbeGoto(tls, v, destIfFalse) +__19: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + Xsqlite3ReleaseTempReg(tls, pParse, regCkNull) + goto sqlite3ExprCodeIN_finished +__11: + ; + + // Step 2: Check to see if the LHS contains any NULL columns. If the + // LHS does contain NULLs then the result must be either FALSE or NULL. + // We will then skip the binary search of the RHS. + if !(destIfNull == destIfFalse) { + goto __20 + } + destStep2 = destIfFalse + goto __21 +__20: + destStep2 = libc.AssignInt32(&destStep6, Xsqlite3VdbeMakeLabel(tls, pParse)) +__21: + ; + i = 0 +__22: + if !(i < nVector) { + goto __24 + } + p = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, i) + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __25 + } + goto sqlite3ExprCodeIN_oom_error +__25: + ; + if !(Xsqlite3ExprCanBeNull(tls, p) != 0) { + goto __26 + } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, rLhs+i, destStep2) + +__26: + ; + goto __23 +__23: + i++ + goto __22 + goto __24 +__24: + ; + + // Step 3. The LHS is now known to be non-NULL. Do the binary search + // of the RHS using the LHS as a probe. If found, the result is + // true. + if !(eType == IN_INDEX_ROWID) { + goto __27 + } + // In this case, the RHS is the ROWID of table b-tree and so we also + // know that the RHS is non-NULL. Hence, we combine steps 3 and 4 + // into a single opcode. + Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse, rLhs) + + addrTruthOp = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) // Return True + goto __28 +__27: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, rLhs, nVector, 0, zAff, nVector) + if !(destIfFalse == destIfNull) { + goto __29 + } + // Combine Step 3 and Step 5 into a single opcode + Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse, + rLhs, nVector) + goto sqlite3ExprCodeIN_finished +__29: + ; + // Ordinary Step 3, for the case where FALSE and NULL are distinct + addrTruthOp = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), 0, + rLhs, nVector) +__28: + ; + + // Step 4. If the RHS is known to be non-NULL and we did not find + // an match on the search above, then the result must be FALSE. + if !(*(*int32)(unsafe.Pointer(bp)) != 0 && nVector == 1) { + goto __30 + } + Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, *(*int32)(unsafe.Pointer(bp /* rRhsHasNull */)), destIfFalse) + +__30: + ; + + // Step 5. If we do not care about the difference between NULL and + // FALSE, then just return false. + if !(destIfFalse == destIfNull) { + goto __31 + } + Xsqlite3VdbeGoto(tls, v, destIfFalse) +__31: + ; + + // Step 6: Loop through rows of the RHS. Compare each row to the LHS. + // If any comparison is NULL, then the result is NULL. If all + // comparisons are FALSE then the final result is FALSE. + // + // For a scalar LHS, it is sufficient to check just the first row + // of the RHS. + if !(destStep6 != 0) { + goto __32 + } + Xsqlite3VdbeResolveLabel(tls, v, destStep6) +__32: + ; + addrTop = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse) + + if !(nVector > 1) { + goto __33 + } + destNotNull = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __34 +__33: + // For nVector==1, combine steps 6 and 7 by immediately returning + // FALSE if the first comparison is not NULL + destNotNull = destIfFalse +__34: + ; + i = 0 +__35: + if !(i < nVector) { + goto __37 + } + r3 = Xsqlite3GetTempReg(tls, pParse) + p1 = Xsqlite3VectorFieldSubexpr(tls, pLeft, i) + pColl1 = Xsqlite3ExprCollSeq(tls, pParse, p1) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), i, r3) + Xsqlite3VdbeAddOp4(tls, v, OP_Ne, rLhs+i, destNotNull, r3, + pColl1, -2) + + Xsqlite3ReleaseTempReg(tls, pParse, r3) + goto __36 +__36: + i++ + goto __35 + goto __37 +__37: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, destIfNull) + if !(nVector > 1) { + goto __38 + } + Xsqlite3VdbeResolveLabel(tls, v, destNotNull) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), addrTop+1) + + // Step 7: If we reach this point, we know that the result must + // be false. + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, destIfFalse) +__38: + ; + + // Jumps here in order to return true. + Xsqlite3VdbeJumpHere(tls, v, addrTruthOp) + +sqlite3ExprCodeIN_finished: + if !(rLhs != rLhsOrig) { + goto __39 + } + Xsqlite3ReleaseTempReg(tls, pParse, rLhs) +__39: + ; + +sqlite3ExprCodeIN_oom_error: + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiMap) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zAff) +} + +// Generate an instruction that will put the floating point +// value described by z[0..n-1] into register iMem. +// +// The z[] string will probably not be zero-terminated. But the +// z[n] character is guaranteed to be something that does not look +// like the continuation of the number. +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if z != uintptr(0) { + // var value float64 at bp, 8 + + Xsqlite3AtoF(tls, z, bp, Xsqlite3Strlen30(tls, z), uint8(SQLITE_UTF8)) + // The new AtoF never returns NaN + if negateFlag != 0 { + *(*float64)(unsafe.Pointer(bp /* value */)) = -*(*float64)(unsafe.Pointer(bp /* value */)) + } + Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Real, 0, iMem, 0, bp, -13) + } +} + +// Generate an instruction that will put the integer describe by +// text z[0..n-1] into register iMem. +// +// Expr.u.zToken is always UTF8 and zero-terminated. +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != 0 { + var i int32 = *(*int32)(unsafe.Pointer(pExpr + 8)) + + if negFlag != 0 { + i = -i + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, i, iMem) + } else { + var c int32 + // var value I64 at bp+16, 8 + + var z uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + + c = Xsqlite3DecOrHexToI64(tls, z, bp+16) + if c == 3 && !(negFlag != 0) || c == 2 || negFlag != 0 && *(*I64)(unsafe.Pointer(bp + 16)) == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { + if Xsqlite3_strnicmp(tls, z, ts+7818, 2) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+7821, + libc.VaList(bp, func() uintptr { + if negFlag != 0 { + return ts + 4874 /* "-" */ + } + return ts + 1525 /* "" */ + }(), pExpr)) + } else { + codeReal(tls, v, z, negFlag, iMem) + } + } else { + if negFlag != 0 { + if c == 3 { + *(*I64)(unsafe.Pointer(bp + 16 /* value */)) = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) + } else { + *(*I64)(unsafe.Pointer(bp + 16 /* value */)) = -*(*I64)(unsafe.Pointer(bp + 16 /* value */)) + } + } + Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, iMem, 0, bp+16, -14) + } + } +} + +// Generate code that will load into register regOut a value that is +// appropriate for the iIdxCol-th column of index pIdx. +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ + var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) + if int32(iTabCol) == -2 { + + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = iTabCur + 1 + Xsqlite3ExprCodeCopy(tls, pParse, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(iIdxCol)*32)).FpExpr, regOut) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 + } else { + Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, (*Index)(unsafe.Pointer(pIdx)).FpTable, iTabCur, + int32(iTabCol), regOut) + } +} + +// Generate code that will compute the value of generated column pCol +// and store the result in register regOut +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ + var iAddr int32 + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + if (*Parse)(unsafe.Pointer(pParse)).FiSelfTab > 0 { + iAddr = Xsqlite3VdbeAddOp3(tls, v, OP_IfNullRow, (*Parse)(unsafe.Pointer(pParse)).FiSelfTab-1, 0, regOut) + } else { + iAddr = 0 + } + Xsqlite3ExprCodeCopy(tls, pParse, Xsqlite3ColumnExpr(tls, pTab, pCol), regOut) + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) >= SQLITE_AFF_TEXT { + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regOut, 1, 0, pCol+10, 1) + } + if iAddr != 0 { + Xsqlite3VdbeJumpHere(tls, v, iAddr) + } +} + +// Generate code to extract the value of the iCol-th column of a table. +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pCol uintptr + + if pTab == uintptr(0) { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iTabCur, iCol, regOut) + return + } + if iCol < 0 || iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iTabCur, regOut) + } else { + var op int32 + var x int32 + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + op = OP_VColumn + x = iCol + } else if int32((*Column)(unsafe.Pointer(libc.AssignUintptr(&pCol, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24))).FcolFlags)&COLFLAG_VIRTUAL != 0 { + var pParse uintptr = Xsqlite3VdbeParser(tls, v) + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_BUSY != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+7848, + libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + } else { + var savedSelfTab int32 = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_BUSY) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = iTabCur + 1 + Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab, pCol, regOut) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = savedSelfTab + *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY)) + } + return + } else if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + + x = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab), int16(iCol))) + op = OP_Column + } else { + x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) + + op = OP_Column + } + Xsqlite3VdbeAddOp3(tls, v, op, iTabCur, x, regOut) + Xsqlite3ColumnDefault(tls, v, pTab, iCol, regOut) + } +} + +// Generate code that will extract the iColumn-th column from +// table pTab and store the column value in register iReg. +// +// There must be an open cursor to pTab in iTable when this routine +// is called. If iColumn<0 then code is generated that extracts the rowid. +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ + + Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) + if p5 != 0 { + var pOp uintptr = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, -1) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + (*VdbeOp)(unsafe.Pointer(pOp)).Fp5 = U16(p5) + } + } + return iReg +} + +// Generate code to move content from registers iFrom...iFrom+nReg-1 +// over to iTo..iTo+nReg-1. +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ + Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) +} + +// Convert a scalar expression node to a TK_REGISTER referencing +// register iReg. The caller must ensure that iReg already contains +// the correct value for the expression. +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ + var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) + if p == uintptr(0) { + return + } + (*Expr)(unsafe.Pointer(p)).Fop2 = (*Expr)(unsafe.Pointer(p)).Fop + (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_REGISTER) + (*Expr)(unsafe.Pointer(p)).FiTable = iReg + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Skip)) +} + +// Evaluate an expression (either a vector or a scalar expression) and store +// the result in continguous temporary registers. Return the index of +// the first register used to store the result. +// +// If the returned result register is a temporary scalar, then also write +// that register number into *piFreeable. If the returned result register +// is not a temporary or if the expression is a vector set *piFreeable +// to 0. +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ + var iResult int32 + var nResult int32 = Xsqlite3ExprVectorSize(tls, p) + if nResult == 1 { + iResult = Xsqlite3ExprCodeTemp(tls, pParse, p, piFreeable) + } else { + *(*int32)(unsafe.Pointer(piFreeable)) = 0 + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_SELECT { + iResult = Xsqlite3CodeSubselect(tls, pParse, p) + } else { + var i int32 + iResult = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nResult + + for i = 0; i < nResult; i++ { + Xsqlite3ExprCodeFactorable(tls, pParse, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr, i+iResult) + } + } + } + return iResult +} + +// If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) +// so that a subsequent copy will not be merged into this one. +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ + if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable + } +} + +// Generate code to implement special SQL functions that are implemented +// in-line rather than by using the usual callbacks. +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + var nFarg int32 + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + nFarg = (*ExprList)(unsafe.Pointer(pFarg)).FnExpr + // All in-line functions have at least one argument + switch iFuncId { + case INLINEFUNC_coalesce: + { + // Attempt a direct implementation of the built-in COALESCE() and + // IFNULL() functions. This avoids unnecessary evaluation of + // arguments past the first non-NULL argument. + var endCoalesce int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + var i int32 + + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, target) + for i = 1; i < nFarg; i++ { + Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, target, endCoalesce) + + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8+uintptr(i)*32)).FpExpr, target) + } + setDoNotMergeFlagOnCopy(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, endCoalesce) + break + + } + case INLINEFUNC_iif: + { + // var caseExpr Expr at bp, 72 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(bp /* &caseExpr */)).Fop = U8(TK_CASE) + *(*uintptr)(unsafe.Pointer(bp + 32)) = pFarg + return Xsqlite3ExprCodeTarget(tls, pParse, bp, target) + + } + + default: + { + // The UNLIKELY() function is a no-op. The result is the value + // of the first argument. + + target = Xsqlite3ExprCodeTarget(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, target) + break + + } + + // ********************************************************************** + // + // Test-only SQL functions that are only usable if enabled + // via SQLITE_TESTCTRL_INTERNAL_FUNCTIONS + case INLINEFUNC_expr_compare: + { + // Compare two expressions using sqlite3ExprCompare() + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, + Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, (*ExprList_item)(unsafe.Pointer(pFarg+8+1*32)).FpExpr, -1), + target) + break + + } + + case INLINEFUNC_expr_implies_expr: + { + // Compare two expressions using sqlite3ExprImpliesExpr() + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, + Xsqlite3ExprImpliesExpr(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, (*ExprList_item)(unsafe.Pointer(pFarg+8+1*32)).FpExpr, -1), + target) + break + + } + + case INLINEFUNC_implies_nonnull_row: + { + // REsult of sqlite3ExprImpliesNonNullRow() + var pA1 uintptr + + pA1 = (*ExprList_item)(unsafe.Pointer(pFarg + 8 + 1*32)).FpExpr + if int32((*Expr)(unsafe.Pointer(pA1)).Fop) == TK_COLUMN { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, + Xsqlite3ExprImpliesNonNullRow(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, (*Expr)(unsafe.Pointer(pA1)).FiTable), + target) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + } + break + + } + + case INLINEFUNC_affinity: + { + // The AFFINITY() function evaluates to a string that describes + // the type affinity of the argument. This is used for testing of + // the SQLite type logic. + *(*[5]uintptr)(unsafe.Pointer(bp + 72 /* azAff */)) = [5]uintptr{ts + 7878, ts + 7883, ts + 7888, ts + 6133, ts + 6128} + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) + Xsqlite3VdbeLoadString(tls, v, target, + func() uintptr { + if int32(aff) <= SQLITE_AFF_NONE { + return ts + 7896 /* "none" */ + } + return *(*uintptr)(unsafe.Pointer(bp + 72 /* &azAff[0] */ + uintptr(int32(aff)-SQLITE_AFF_BLOB)*8)) + }()) + break + + } + } + return target +} + +// Generate code into the current Vdbe to evaluate the given +// expression. Attempt to store the results in register "target". +// Return the register where results are stored. +// +// With this routine, there is no guarantee that results will +// be stored in target. The result might be stored in some other +// register if it is convenient to do so. The calling function +// must check the return code and move the results to the desired +// register. +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ + bp := tls.Alloc(192) + defer tls.Free(192) + + var v uintptr // The VM under construction + var op int32 // The opcode being coded + var inReg int32 // Results stored in register inReg + // var regFree1 int32 at bp+40, 4 + // If non-zero free this temporary register + // var regFree2 int32 at bp+44, 4 + // If non-zero free this temporary register + var r1 int32 + var r2 int32 // Various register numbers + // var tempX Expr at bp+48, 72 + // Temporary expression node + var p5 int32 + var pTab uintptr + var pAggInfo uintptr + var pCol uintptr + // This COLUMN expression is really a constant due to WHERE clause + // constraints, and that constant is coded by the pExpr->pLeft + // expresssion. However, make sure the constant has the correct + // datatype by applying the Affinity of the table column to the + // constant. + var aff int32 + // Other columns in the same row for CHECK constraints or + // generated columns or for inserting into partial index. + // The row is unpacked into registers beginning at + // 0-(pParse->iSelfTab). The rowid (if any) is in a register + // immediately prior to the first column. + var pCol1 uintptr + var pTab1 uintptr + var iSrc int32 + var iCol int32 + var iTab int32 + var iReg int32 + var n int32 + var z uintptr + var zBlob uintptr + var z1 uintptr + var pLeft uintptr + var pLeft1 uintptr + var isTrue int32 // IS TRUE or IS NOT TRUE + var bNormal int32 + var addr int32 + var pInfo uintptr + var exprOp U8 + var pArg uintptr + var pFarg uintptr // List of function arguments + var nFarg int32 // Number of function arguments + var pDef uintptr // The function definition object + var zId uintptr // The function name + var constMask U32 // Mask of function arguments that are constant + var i int32 // Loop counter + var db uintptr // The database connection + var enc U8 // The text encoding used by this database + var pColl uintptr + var nCol int32 + var n1 int32 + var destIfFalse int32 + var destIfNull int32 + // If the opcode is TK_TRIGGER, then the expression is a reference + // to a column in the new.* or old.* pseudo-tables available to + // trigger programs. In this case Expr.iTable is set to 1 for the + // new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn + // is set to the column of the pseudo-table to read, or to -1 to + // read the rowid field. + // + // The expression is implemented using an OP_Param opcode. The p1 + // parameter is set to 0 for an old.rowid reference, or to (i+1) + // to reference another column of the old.* pseudo-table, where + // i is the index of the column. For a new.rowid reference, p1 is + // set to (n+1), where n is the number of columns in each pseudo-table. + // For a reference to any other column in the new.* pseudo-table, p1 + // is set to (n+2+i), where n and i are as defined previously. For + // example, if the table on which triggers are being fired is + // declared as: + // + // CREATE TABLE t1(a, b); + // + // Then p1 is interpreted as follows: + // + // p1==0 -> old.rowid p1==3 -> new.rowid + // p1==1 -> old.a p1==4 -> new.a + // p1==2 -> old.b p1==5 -> new.b + var pTab2 uintptr + var iCol1 int32 + var p1 int32 + var addrINR int32 + var okConstFactor U8 + var endLabel int32 // GOTO label for end of CASE stmt + var nextCase int32 // GOTO label for next WHEN clause + var nExpr int32 // 2x number of WHEN terms + var i1 int32 // Loop counter + var pEList uintptr // List of WHEN terms + var aListelem uintptr // Array of WHEN terms + // var opCompare Expr at bp+120, 72 + // The X==Ei expression + var pX uintptr // The X expression + var pTest uintptr // X==Ei (form A) or just Ei (form B) + var pDel uintptr + var db1 uintptr + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + inReg = target + *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 44 /* regFree2 */)) = 0 + p5 = 0 + +expr_code_doover: + if !(pExpr == uintptr(0)) { + goto __1 + } + op = TK_NULL + goto __2 +__1: + ; + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__2: + ; + switch op { + case TK_AGG_COLUMN: + goto __4 + case TK_COLUMN: + goto __5 + case TK_INTEGER: + goto __6 + case TK_TRUEFALSE: + goto __7 + case TK_FLOAT: + goto __8 + case TK_STRING: + goto __9 + default: + goto __10 + case TK_BLOB: + goto __11 + case TK_VARIABLE: + goto __12 + case TK_REGISTER: + goto __13 + case TK_CAST: + goto __14 + case TK_IS: + goto __15 + case TK_ISNOT: + goto __16 + // fall-through + case TK_LT: + goto __17 + case TK_LE: + goto __18 + case TK_GT: + goto __19 + case TK_GE: + goto __20 + case TK_NE: + goto __21 + case TK_EQ: + goto __22 + case TK_AND: + goto __23 + case TK_OR: + goto __24 + case TK_PLUS: + goto __25 + case TK_STAR: + goto __26 + case TK_MINUS: + goto __27 + case TK_REM: + goto __28 + case TK_BITAND: + goto __29 + case TK_BITOR: + goto __30 + case TK_SLASH: + goto __31 + case TK_LSHIFT: + goto __32 + case TK_RSHIFT: + goto __33 + case TK_CONCAT: + goto __34 + case TK_UMINUS: + goto __35 + case TK_BITNOT: + goto __36 + case TK_NOT: + goto __37 + case TK_TRUTH: + goto __38 + case TK_ISNULL: + goto __39 + case TK_NOTNULL: + goto __40 + case TK_AGG_FUNCTION: + goto __41 + case TK_FUNCTION: + goto __42 + case TK_EXISTS: + goto __43 + case TK_SELECT: + goto __44 + case TK_SELECT_COLUMN: + goto __45 + case TK_IN: + goto __46 + + // x BETWEEN y AND z + // + // This is equivalent to + // + // x>=y AND x<=z + // + // X is stored in pExpr->pLeft. + // Y is stored in pExpr->pList->a[0].pExpr. + // Z is stored in pExpr->pList->a[1].pExpr. + case TK_BETWEEN: + goto __47 + case TK_SPAN: + goto __48 + case TK_COLLATE: + goto __49 + case TK_UPLUS: + goto __50 + + case TK_TRIGGER: + goto __51 + + case TK_VECTOR: + goto __52 + + // TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions + // that derive from the right-hand table of a LEFT JOIN. The + // Expr.iTable value is the table number for the right-hand table. + // The expression is only evaluated if that table is not currently + // on a LEFT JOIN NULL row. + case TK_IF_NULL_ROW: + goto __53 + + // Form A: + // CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END + // + // Form B: + // CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END + // + // Form A is can be transformed into the equivalent form B as follows: + // CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ... + // WHEN x=eN THEN rN ELSE y END + // + // X (if it exists) is in pExpr->pLeft. + // Y is in the last element of pExpr->x.pList if pExpr->x.pList->nExpr is + // odd. The Y is also optional. If the number of elements in x.pList + // is even, then Y is omitted and the "otherwise" result is NULL. + // Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1]. + // + // The result of the expression is the Ri for the first matching Ei, + // or if there is no matching Ei, the ELSE term Y, or if there is + // no ELSE term, NULL. + case TK_CASE: + goto __54 + case TK_RAISE: + goto __55 + } + goto __3 +__4: + pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32 + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { + goto __56 + } + + return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem + goto __57 +__56: + if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { + goto __58 + } + pTab = (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn), target) + if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) < 0) { + goto __59 + } + + goto __60 +__59: + ; + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __61 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__61: + ; +__60: + ; + return target +__58: + ; +__57: + ; + +__5: + iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { + goto __62 + } + iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) + + if !(*(*uintptr)(unsafe.Pointer(pExpr + 64)) != 0) { + goto __63 + } + aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) + goto __64 +__63: + aff = int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) +__64: + ; + if !(aff > SQLITE_AFF_BLOB) { + goto __65 + } + + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, + uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) +__65: + ; + return iReg +__62: + ; + if !(iTab < 0) { + goto __66 + } + if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { + goto __67 + } + iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + + pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + + if !(iCol < 0) { + goto __69 + } + return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab +__69: + ; + pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*24 + + iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { + goto __70 + } + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { + goto __72 + } + Xsqlite3ErrorMsg(tls, pParse, ts+7848, + libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) + return 0 +__72: + ; + *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { + goto __73 + } + Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) +__73: + ; + *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) + return iSrc + goto __71 +__70: + if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { + goto __74 + } + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + return target + goto __75 +__74: + return iSrc +__75: + ; +__71: + ; + goto __68 +__67: + // Coding an expression that is part of an index where column names + // in the index refer to the table to which the index belongs + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__68: + ; +__66: + ; + + iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 64)), + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, + (*Expr)(unsafe.Pointer(pExpr)).Fop2) + if !(*(*uintptr)(unsafe.Pointer(pExpr + 64)) == uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == SQLITE_AFF_REAL) { + goto __76 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) +__76: + ; + return iReg + +__6: + codeInteger(tls, pParse, pExpr, 0, target) + return target + +__7: + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) + return target + +__8: + ; + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) + return target + +__9: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__10: + // Make NULL the default case so that if a bug causes an illegal + // Expr node to be passed into this function, it will be handled + // sanely and not crash. But keep the assert() to bring the problem + // to the attention of the developers. + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__11: + ; + + z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 + n = Xsqlite3Strlen30(tls, z) - 1 + + zBlob = Xsqlite3HexToBlob(tls, Xsqlite3VdbeDb(tls, v), z, n) + Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -7) + return target + +__12: + ; + + Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { + goto __77 + } + z1 = Xsqlite3VListNumToName(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) + + *(*VList)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FpVList)) = 0 // Indicate VList may no longer be enlarged + Xsqlite3VdbeAppendP4(tls, v, z1, -1) +__77: + ; + return target + +__13: + return (*Expr)(unsafe.Pointer(pExpr)).FiTable + +__14: + // Expressions of the form: CAST(pLeft AS token) + inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) + if !(inReg != target) { + goto __78 + } + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, inReg, target) + inReg = target +__78: + ; + + Xsqlite3VdbeAddOp2(tls, v, OP_Cast, target, + int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) + return inReg + +__15: +__16: + if op == TK_IS { + op = TK_EQ + } else { + op = TK_NE + } + p5 = SQLITE_NULLEQ + // fall-through +__17: +__18: +__19: +__20: +__21: +__22: + pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { + goto __79 + } + codeVectorCompare(tls, pParse, pExpr, target, uint8(op), uint8(p5)) + goto __80 +__79: + r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+40) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, inReg) + codeCompare(tls, pParse, pLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, + Xsqlite3VdbeCurrentAddr(tls, v)+2, p5, + libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) + + if !(p5 == SQLITE_NULLEQ) { + goto __81 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, inReg) + goto __82 +__81: + Xsqlite3VdbeAddOp3(tls, v, OP_ZeroOrNull, r1, inReg, r2) +__82: + ; + +__80: + ; + goto __3 + +__23: +__24: +__25: +__26: +__27: +__28: +__29: +__30: +__31: +__32: +__33: +__34: + ; + + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) + Xsqlite3VdbeAddOp3(tls, v, op, r2, r1, target) + + goto __3 + +__35: + pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + + if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { + goto __83 + } + codeInteger(tls, pParse, pLeft1, 1, target) + return target + goto __84 +__83: + if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_FLOAT) { + goto __85 + } + + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pLeft1 + 8)), 1, target) + return target + goto __86 +__85: + (*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fop = U8(TK_INTEGER) + (*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fflags = U32(EP_IntValue | EP_TokenOnly) + *(*int32)(unsafe.Pointer(bp + 48 + 8)) = 0 + + r1 = Xsqlite3ExprCodeTemp(tls, pParse, bp+48, bp+40) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+44) + Xsqlite3VdbeAddOp3(tls, v, OP_Subtract, r2, r1, target) + +__86: + ; +__84: + ; + goto __3 + +__36: +__37: + ; + + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) + + Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) + goto __3 + +__38: // IS TRUE or IS FALSE + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) + + isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + bNormal = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_IS) + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsTrue, r1, inReg, libc.BoolInt32(!(isTrue != 0)), isTrue^bNormal) + goto __3 + +__39: +__40: + ; + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) + + addr = Xsqlite3VdbeAddOp1(tls, v, op, r1) + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) + Xsqlite3VdbeJumpHere(tls, v, addr) + goto __3 + +__41: + pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pInfo == uintptr(0) || + int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || + int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) >= (*AggInfo)(unsafe.Pointer(pInfo)).FnFunc) { + goto __87 + } + + Xsqlite3ErrorMsg(tls, pParse, ts+7901, libc.VaList(bp+8, pExpr)) + goto __88 +__87: + return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem +__88: + ; + goto __3 + +__42: // The function name + constMask = U32(0) // Loop counter + db = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc // The text encoding used by this database + pColl = uintptr(0) // A collating sequence + + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { + goto __89 + } + return (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FregResult +__89: + ; + + if !((*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0) { + goto __90 + } + // SQL functions can be expensive. So try to avoid running them + // multiple times if we know they always give the same result + return Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -1) +__90: + ; + + pFarg = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + if pFarg != 0 { + nFarg = (*ExprList)(unsafe.Pointer(pFarg)).FnExpr + } else { + nFarg = 0 + } + + zId = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + pDef = Xsqlite3FindFunction(tls, db, zId, nFarg, enc, uint8(0)) + if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { + goto __91 + } + Xsqlite3ErrorMsg(tls, pParse, ts+7928, libc.VaList(bp+16, pExpr)) + goto __3 +__91: + ; + if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { + goto __92 + } + + return exprCodeInlineFunction(tls, pParse, pFarg, + int32((*FuncDef)(unsafe.Pointer(pDef)).FpUserData), target) + goto __93 +__92: + if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) != 0) { + goto __94 + } + Xsqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef) +__94: + ; +__93: + ; + + i = 0 +__95: + if !(i < nFarg) { + goto __97 + } + if !(i < 32 && Xsqlite3ExprIsConstant(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8+uintptr(i)*32)).FpExpr) != 0) { + goto __98 + } + + constMask = constMask | uint32(uint32(1))<= 2 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_InfixFunc) != U32(0)) { + goto __106 + } + pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer(pFarg+8+1*32)).FpExpr) + goto __107 +__106: + if !(nFarg > 0) { + goto __108 + } + pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) +__108: + ; +__107: + ; + if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __109 + } + if !!(pColl != 0) { + goto __110 + } + pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl +__110: + ; + Xsqlite3VdbeAddOp4(tls, v, OP_CollSeq, 0, 0, 0, pColl, -2) +__109: + ; + if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_OFFSET) != U32(0) && pFarg != uintptr(0)) { + goto __111 + } + pArg = (*ExprList_item)(unsafe.Pointer(pFarg + 8)).FpExpr + if !(int32((*Expr)(unsafe.Pointer(pArg)).Fop) == TK_COLUMN) { + goto __113 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Offset, (*Expr)(unsafe.Pointer(pArg)).FiTable, int32((*Expr)(unsafe.Pointer(pArg)).FiColumn), target) + goto __114 +__113: + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) +__114: + ; + goto __112 +__111: + + Xsqlite3VdbeAddFunctionCall(tls, pParse, int32(constMask), r1, target, nFarg, + pDef, int32((*Expr)(unsafe.Pointer(pExpr)).Fop2)) +__112: + ; + if !(nFarg != 0) { + goto __115 + } + if !(constMask == U32(0)) { + goto __116 + } + Xsqlite3ReleaseTempRange(tls, pParse, r1, nFarg) + goto __117 +__116: + ; +__117: + ; +__115: + ; + return target + +__43: +__44: + ; + + if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { + goto __118 + } + return 0 + goto __119 +__118: + if !(op == TK_SELECT && + (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) && + libc.AssignInt32(&nCol, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr) != 1) { + goto __120 + } + Xsqlite3SubselectError(tls, pParse, nCol, 1) + goto __121 +__120: + return Xsqlite3CodeSubselect(tls, pParse, pExpr) +__121: + ; +__119: + ; + goto __3 + +__45: + if !((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable == 0) { + goto __122 + } + (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable = Xsqlite3CodeSubselect(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) +__122: + ; + + n1 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { + goto __123 + } + Xsqlite3ErrorMsg(tls, pParse, ts+7530, + libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) +__123: + ; + return (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + +__46: + destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) + destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + sqlite3ExprCodeIN(tls, pParse, pExpr, destIfFalse, destIfNull) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) + Xsqlite3VdbeResolveLabel(tls, v, destIfFalse) + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, target, 0) + Xsqlite3VdbeResolveLabel(tls, v, destIfNull) + return target + + // x BETWEEN y AND z + // + // This is equivalent to + // + // x>=y AND x<=z + // + // X is stored in pExpr->pLeft. + // Y is stored in pExpr->pList->a[0].pExpr. + // Z is stored in pExpr->pList->a[1].pExpr. +__47: + exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) + return target + +__48: +__49: +__50: + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + goto expr_code_doover // 2018-04-28: Prevent deep recursion. OSSFuzz. + +__51: + ; + pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + p1 = (*Expr)(unsafe.Pointer(pExpr)).FiTable*(int32((*Table)(unsafe.Pointer(pTab2)).FnCol)+1) + 1 + + int32(Xsqlite3TableColumnToStorage(tls, pTab2, int16(iCol1))) + + Xsqlite3VdbeAddOp2(tls, v, OP_Param, p1, target) + + // If the column has REAL affinity, it may currently be stored as an + // integer. Use OP_RealAffinity to make sure it is really real. + // + // EVIDENCE-OF: R-60985-57662 SQLite will convert the value back to + // floating point when extracting it from the record. + if !(iCol1 >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab2)).FaCol+uintptr(iCol1)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __124 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__124: + ; + goto __3 + +__52: + Xsqlite3ErrorMsg(tls, pParse, ts+6415, 0) + goto __3 + + // TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions + // that derive from the right-hand table of a LEFT JOIN. The + // Expr.iTable value is the table number for the right-hand table. + // The expression is only evaluated if that table is not currently + // on a LEFT JOIN NULL row. +__53: + okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) + // Temporarily disable factoring of constant expressions, since + // even though expressions may appear to be constant, they are not + // really constant because they originate from the right-hand side + // of a LEFT JOIN. + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor + Xsqlite3VdbeJumpHere(tls, v, addrINR) + Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) + goto __3 + + // Form A: + // CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END + // + // Form B: + // CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END + // + // Form A is can be transformed into the equivalent form B as follows: + // CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ... + // WHEN x=eN THEN rN ELSE y END + // + // X (if it exists) is in pExpr->pLeft. + // Y is in the last element of pExpr->x.pList if pExpr->x.pList->nExpr is + // odd. The Y is also optional. If the number of elements in x.pList + // is even, then Y is omitted and the "otherwise" result is NULL. + // Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1]. + // + // The result of the expression is the Ri for the first matching Ei, + // or if there is no matching Ei, the ELSE term Y, or if there is + // no ELSE term, NULL. +__54: // The X expression + pTest = uintptr(0) // X==Ei (form A) or just Ei (form B) + pDel = uintptr(0) + db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb + + pEList = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + aListelem = pEList + 8 /* &.a */ + nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr + endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) + if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { + goto __125 + } + pDel = Xsqlite3ExprDup(tls, db1, pX, 0) + if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { + goto __126 + } + Xsqlite3ExprDelete(tls, db1, pDel) + goto __3 +__126: + ; + + exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) + + libc.Xmemset(tls, bp+120, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).Fop = U8(TK_EQ) + (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).FpLeft = pDel + pTest = bp + 120 /* &opCompare */ + // Ticket b351d95f9cd5ef17e9d9dbae18f5ca8611190001: + // The value in regFree1 might get SCopy-ed into the file result. + // So make sure that the regFree1 register is not reused for other + // purposes and possibly overwritten. + *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */)) = 0 +__125: + ; + i1 = 0 +__127: + if !(i1 < nExpr-1) { + goto __129 + } + if !(pX != 0) { + goto __130 + } + + (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr + goto __131 +__130: + pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr +__131: + ; + nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) + + Xsqlite3ExprIfFalse(tls, pParse, pTest, nextCase, SQLITE_JUMPIFNULL) + + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) + Xsqlite3VdbeGoto(tls, v, endLabel) + Xsqlite3VdbeResolveLabel(tls, v, nextCase) + goto __128 +__128: + i1 = i1 + 2 + goto __127 + goto __129 +__129: + ; + if !(nExpr&1 != 0) { + goto __132 + } + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) + goto __133 +__132: + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) +__133: + ; + Xsqlite3ExprDelete(tls, db1, pDel) + setDoNotMergeFlagOnCopy(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, endLabel) + goto __3 + +__55: + ; + if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { + goto __134 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+7952, 0) + return 0 +__134: + ; + if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { + goto __135 + } + Xsqlite3MayAbort(tls, pParse) +__135: + ; + + if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { + goto __136 + } + Xsqlite3VdbeAddOp4(tls, + v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) + + goto __137 +__136: + Xsqlite3HaltConstraint(tls, pParse, + func() int32 { + if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { + return SQLITE_CONSTRAINT | int32(7)<<8 + } + return SQLITE_ERROR + }(), + int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) +__137: + ; + + goto __3 + +__3: + ; + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */))) + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44 /* regFree2 */))) + return inReg +} + +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8002)) /* sqlite3.c:106508:29 */ + +// Generate code that will evaluate expression pExpr just one time +// per prepared statement execution. +// +// If the expression uses functions (that might throw an exception) then +// guard them with an OP_Once opcode to ensure that the code is only executed +// once. If no functions are involved, then factor the code out and put it at +// the end of the prepared statement in the initialization section. +// +// If regDest>=0 then the result is always stored in that register and the +// result is not reusable. If regDest<0 then this routine is free to +// store the value whereever it wants. The register where the expression +// is stored is returned. When regDest<0, two identical expressions might +// code to the same register, if they do not contain function calls and hence +// are factored out into the initialization section at the end of the +// prepared statement. +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ + var p uintptr + + p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + if regDest < 0 && p != 0 { + var pItem uintptr + var i int32 + pItem = p + 8 /* &.a */ + i = (*ExprList)(unsafe.Pointer(p)).FnExpr + __1: + if !(i > 0) { + goto __3 + } + { + if uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x8>>3)) != 0 && Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr, pExpr, -1) == 0 { + return *(*int32)(unsafe.Pointer(pItem + 24)) + } + + } + goto __2 + __2: + pItem += 32 + i-- + goto __1 + goto __3 + __3: + } + pExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + if pExpr != uintptr(0) && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_HasFunc) != U32(0) { + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var addr int32 + + addr = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + if !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { + if regDest < 0 { + regDest = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + Xsqlite3ExprCode(tls, pParse, pExpr, regDest) + } + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(1) + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + Xsqlite3VdbeJumpHere(tls, v, addr) + } else { + p = Xsqlite3ExprListAppend(tls, pParse, p, pExpr) + if p != 0 { + var pItem uintptr = p + 8 + uintptr((*ExprList)(unsafe.Pointer(p)).FnExpr-1)*32 + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(libc.Bool32(regDest < 0)), 3, 0x8) + if regDest < 0 { + regDest = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + *(*int32)(unsafe.Pointer(pItem + 24)) = regDest + } + (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = p + } + return regDest +} + +// Generate code to evaluate an expression and store the results +// into a register. Return the register number where the results +// are stored. +// +// If the register is a temporary register that can be deallocated, +// then write its number into *pReg. If the result register is not +// a temporary, then set *pReg to zero. +// +// If pExpr is a constant, then this routine might generate this +// code to fill the register in the initialization section of the +// VDBE program, in order to factor it out of the evaluation loop. +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ + var r2 int32 + pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) + if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && + pExpr != uintptr(0) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_REGISTER && + Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { + *(*int32)(unsafe.Pointer(pReg)) = 0 + r2 = Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -1) + } else { + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + r2 = Xsqlite3ExprCodeTarget(tls, pParse, pExpr, r1) + if r2 == r1 { + *(*int32)(unsafe.Pointer(pReg)) = r1 + } else { + Xsqlite3ReleaseTempReg(tls, pParse, r1) + *(*int32)(unsafe.Pointer(pReg)) = 0 + } + } + return r2 +} + +// Generate code that will evaluate expression pExpr and store the +// results in register target. The results are guaranteed to appear +// in register target. +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ + var inReg int32 + + if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { + return + } + inReg = Xsqlite3ExprCodeTarget(tls, pParse, pExpr, target) + if inReg != target { + var op U8 + if pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + op = U8(OP_Copy) + } else { + op = U8(OP_SCopy) + } + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, int32(op), inReg, target) + } +} + +// Make a transient copy of expression pExpr and then code it using +// sqlite3ExprCode(). This routine works just like sqlite3ExprCode() +// except that the input expression is guaranteed to be unchanged. +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + Xsqlite3ExprCode(tls, pParse, pExpr, target) + } + Xsqlite3ExprDelete(tls, db, pExpr) +} + +// Generate code that will evaluate expression pExpr and store the +// results in register target. The results are guaranteed to appear +// in register target. If the expression is constant, then this routine +// might choose to code the expression at initialization time. +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ + if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { + Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) + } else { + Xsqlite3ExprCodeCopy(tls, pParse, pExpr, target) + } +} + +// Generate code that pushes the value of every element of the given +// expression list into a sequence of registers beginning at target. +// +// Return the number of elements evaluated. The number returned will +// usually be pList->nExpr but might be reduced if SQLITE_ECEL_OMITREF +// is defined. +// +// The SQLITE_ECEL_DUP flag prevents the arguments from being +// filled using OP_SCopy. OP_Copy must be used instead. +// +// The SQLITE_ECEL_FACTOR argument allows constant arguments to be +// factored out into initialization code. +// +// The SQLITE_ECEL_REF flag means that expressions in the list with +// ExprList.a[].u.x.iOrderByCol>0 have already been evaluated and stored +// in registers at srcReg, and so the value can be copied from there. +// If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 +// are simply omitted rather than being copied from srcReg. +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ + var pItem uintptr + var i int32 + var j int32 + var n int32 + var copyOp U8 + if int32(flags)&SQLITE_ECEL_DUP != 0 { + copyOp = uint8(OP_Copy) + } else { + copyOp = uint8(OP_SCopy) + } + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + // Never gets this far otherwise + n = (*ExprList)(unsafe.Pointer(pList)).FnExpr + if !(int32((*Parse)(unsafe.Pointer(pParse)).FokConstFactor) != 0) { + flags = libc.Uint8FromInt32(int32(flags) & libc.CplInt32(SQLITE_ECEL_FACTOR)) + } + pItem = pList + 8 /* &.a */ + i = 0 +__1: + if !(i < n) { + goto __3 + } + { + var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr + if int32(flags)&SQLITE_ECEL_REF != 0 && libc.AssignInt32(&j, int32(*(*U16)(unsafe.Pointer(pItem + 24)))) > 0 { + if int32(flags)&SQLITE_ECEL_OMITREF != 0 { + i-- + n-- + } else { + Xsqlite3VdbeAddOp2(tls, v, int32(copyOp), j+srcReg-1, target+i) + } + } else if int32(flags)&SQLITE_ECEL_FACTOR != 0 && + Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { + Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target+i) + } else { + var inReg int32 = Xsqlite3ExprCodeTarget(tls, pParse, pExpr, target+i) + if inReg != target+i { + var pOp uintptr + if int32(copyOp) == OP_Copy && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetOp(tls, v, -1)))).Fopcode) == OP_Copy && + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1+(*VdbeOp)(unsafe.Pointer(pOp)).Fp3+1 == inReg && + (*VdbeOp)(unsafe.Pointer(pOp)).Fp2+(*VdbeOp)(unsafe.Pointer(pOp)).Fp3+1 == target+i && + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5) == 0 { + (*VdbeOp)(unsafe.Pointer(pOp)).Fp3++ + } else { + Xsqlite3VdbeAddOp2(tls, v, int32(copyOp), inReg, target+i) + } + } + } + + } + goto __2 +__2: + i++ + pItem += 32 + goto __1 + goto __3 +__3: + ; + return n +} + +// Generate code for a BETWEEN operator. +// +// x BETWEEN y AND z +// +// The above is equivalent to +// +// x>=y AND x<=z +// +// Code it as such, taking care to do the common subexpression +// elimination of x. +// +// The xJumpIf parameter determines details: +// +// NULL: Store the boolean result in reg[dest] +// sqlite3ExprIfTrue: Jump to dest if true +// sqlite3ExprIfFalse: Jump to dest if false +// +// The jumpIfNull parameter is ignored if xJumpIf is NULL. +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ + bp := tls.Alloc(220) + defer tls.Free(220) + + // var exprAnd Expr at bp+144, 72 + // The AND operator in x>=y AND x<=z + // var compLeft Expr at bp, 72 + // The x>=y term + // var compRight Expr at bp+72, 72 + // The x<=z term + *(*int32)(unsafe.Pointer(bp + 216 /* regFree1 */)) = 0 // Temporary use register + var pDel uintptr = uintptr(0) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp+72, 0, uint64(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp+144, 0, uint64(unsafe.Sizeof(Expr{}))) + + pDel = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, 0) + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { + (*Expr)(unsafe.Pointer(bp + 144 /* &exprAnd */)).Fop = U8(TK_AND) + (*Expr)(unsafe.Pointer(bp + 144 /* &exprAnd */)).FpLeft = bp /* &compLeft */ + (*Expr)(unsafe.Pointer(bp + 144 /* &exprAnd */)).FpRight = bp + 72 /* &compRight */ + (*Expr)(unsafe.Pointer(bp /* &compLeft */)).Fop = U8(TK_GE) + (*Expr)(unsafe.Pointer(bp /* &compLeft */)).FpLeft = pDel + (*Expr)(unsafe.Pointer(bp /* &compLeft */)).FpRight = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8)).FpExpr + (*Expr)(unsafe.Pointer(bp + 72 /* &compRight */)).Fop = U8(TK_LE) + (*Expr)(unsafe.Pointer(bp + 72 /* &compRight */)).FpLeft = pDel + (*Expr)(unsafe.Pointer(bp + 72 /* &compRight */)).FpRight = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8 + 1*32)).FpExpr + exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+216)) + if xJump != 0 { + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, int32) + })(unsafe.Pointer(&struct{ uintptr }{xJump})).f(tls, pParse, bp+144 /* &exprAnd */, dest, jumpIfNull) + } else { + // Mark the expression is being from the ON or USING clause of a join + // so that the sqlite3ExprCodeTarget() routine will not attempt to move + // it into the Parse.pConstExpr list. We should use a new bit for this, + // for clarity, but we are out of bits in the Expr.flags field so we + // have to reuse the EP_FromJoin bit. Bummer. + *(*U32)(unsafe.Pointer(pDel + 4)) |= U32(EP_FromJoin) + Xsqlite3ExprCodeTarget(tls, pParse, bp+144, dest) + } + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 216 /* regFree1 */))) + } + Xsqlite3ExprDelete(tls, db, pDel) + + // Ensure adequate test coverage + +} + +// Generate code for a boolean expression such that a jump is made +// to the label "dest" if the expression is true but execution +// continues straight thru if the expression is false. +// +// If the expression evaluates to NULL (neither true nor false), then +// take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL. +// +// This code depends on the fact that certain token values (ex: TK_EQ) +// are the same as opcode values (ex: OP_Eq) that implement the corresponding +// operation. Special comments in vdbe.c and the mkopcodeh.awk script in +// the make process cause these values to align. Assert()s in the code +// below verify that the numbers are aligned correctly. +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var v uintptr + var op int32 + // var regFree1 int32 at bp, 4 + + // var regFree2 int32 at bp+4, 4 + + var r1 int32 + var r2 int32 + var d2 int32 + var pAlt uintptr + var isNot int32 // IS NOT TRUE or IS NOT FALSE + var isTrue int32 + var destIfFalse int32 + var destIfNull int32 + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + op = 0 + *(*int32)(unsafe.Pointer(bp /* regFree1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */)) = 0 + + if !(v == uintptr(0)) { + goto __1 + } + return +__1: + ; // Existence of VDBE checked by caller + if !(pExpr == uintptr(0)) { + goto __2 + } + return +__2: + ; // No way this can happen + + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + switch op { + case TK_AND: + goto __4 + case TK_OR: + goto __5 + case TK_NOT: + goto __6 + case TK_TRUTH: + goto __7 + case TK_IS: + goto __8 + case TK_ISNOT: + goto __9 + case TK_LT: + goto __10 + case TK_LE: + goto __11 + case TK_GT: + goto __12 + case TK_GE: + goto __13 + case TK_NE: + goto __14 + case TK_EQ: + goto __15 + case TK_ISNULL: + goto __16 + case TK_NOTNULL: + goto __17 + case TK_BETWEEN: + goto __18 + case TK_IN: + goto __19 + default: + goto __20 + } + goto __3 +__4: +__5: + pAlt = Xsqlite3ExprSimplifiedAndOr(tls, pExpr) + if !(pAlt != pExpr) { + goto __21 + } + Xsqlite3ExprIfTrue(tls, pParse, pAlt, dest, jumpIfNull) + goto __22 +__21: + if !(op == TK_AND) { + goto __23 + } + d2 = Xsqlite3VdbeMakeLabel(tls, pParse) + + Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, d2, + jumpIfNull^SQLITE_JUMPIFNULL) + Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) + Xsqlite3VdbeResolveLabel(tls, v, d2) + goto __24 +__23: + ; + Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) + Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) +__24: + ; +__22: + ; + goto __3 + +__6: + ; + Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) + goto __3 + +__7: // IS TRUE or IS NOT TRUE + ; + isNot = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_ISNOT) + isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + + if !(isTrue^isNot != 0) { + goto __25 + } + Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, + func() int32 { + if isNot != 0 { + return SQLITE_JUMPIFNULL + } + return 0 + }()) + goto __26 +__25: + Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, + func() int32 { + if isNot != 0 { + return SQLITE_JUMPIFNULL + } + return 0 + }()) +__26: + ; + goto __3 + +__8: +__9: + ; + + if op == TK_IS { + op = TK_EQ + } else { + op = TK_NE + } + jumpIfNull = SQLITE_NULLEQ +__10: +__11: +__12: +__13: +__14: +__15: + if !(Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != 0) { + goto __27 + } + goto default_expr +__27: + ; + + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4) + codeCompare(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, + r1, r2, dest, jumpIfNull, libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) + + goto __3 + +__16: +__17: + ; + + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) + + goto __3 + +__18: + ; + exprCodeBetween(tls, pParse, pExpr, dest, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, int32) + }{Xsqlite3ExprIfTrue})), jumpIfNull) + goto __3 + +__19: + destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) + if jumpIfNull != 0 { + destIfNull = dest + } else { + destIfNull = destIfFalse + } + sqlite3ExprCodeIN(tls, pParse, pExpr, destIfFalse, destIfNull) + Xsqlite3VdbeGoto(tls, v, dest) + Xsqlite3VdbeResolveLabel(tls, v, destIfFalse) + goto __3 + +__20: +default_expr: + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue)) { + goto __28 + } + Xsqlite3VdbeGoto(tls, v, dest) + goto __29 +__28: + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) { + goto __30 + } + // No-op + goto __31 +__30: + r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp) + Xsqlite3VdbeAddOp3(tls, v, OP_If, r1, dest, libc.Bool32(jumpIfNull != 0)) + +__31: + ; +__29: + ; + goto __3 + +__3: + ; + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp /* regFree1 */))) + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */))) +} + +// Generate code for a boolean expression such that a jump is made +// to the label "dest" if the expression is false but execution +// continues straight thru if the expression is true. +// +// If the expression evaluates to NULL (neither true nor false) then +// jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull +// is 0. +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var v uintptr + var op int32 + // var regFree1 int32 at bp, 4 + + // var regFree2 int32 at bp+4, 4 + + var r1 int32 + var r2 int32 + var d2 int32 + var pAlt uintptr + var isNot int32 // IS NOT TRUE or IS NOT FALSE + var isTrue int32 + var destIfNull int32 + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + op = 0 + *(*int32)(unsafe.Pointer(bp /* regFree1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */)) = 0 + + if !(v == uintptr(0)) { + goto __1 + } + return +__1: + ; // Existence of VDBE checked by caller + if !(pExpr == uintptr(0)) { + goto __2 + } + return +__2: + ; + + // The value of pExpr->op and op are related as follows: + // + // pExpr->op op + // --------- ---------- + // TK_ISNULL OP_NotNull + // TK_NOTNULL OP_IsNull + // TK_NE OP_Eq + // TK_EQ OP_Ne + // TK_GT OP_Le + // TK_LE OP_Gt + // TK_GE OP_Lt + // TK_LT OP_Ge + // + // For other values of pExpr->op, op is undefined and unused. + // The value of TK_ and OP_ constants are arranged such that we + // can compute the mapping above using the following expression. + // Assert()s verify that the computation is correct. + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + TK_ISNULL&1 ^ 1 - TK_ISNULL&1 + + // Verify correct alignment of TK_ and OP_ constants + + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_AND: + goto __4 + case TK_OR: + goto __5 + case TK_NOT: + goto __6 + case TK_TRUTH: + goto __7 + case TK_IS: + goto __8 + case TK_ISNOT: + goto __9 + case TK_LT: + goto __10 + case TK_LE: + goto __11 + case TK_GT: + goto __12 + case TK_GE: + goto __13 + case TK_NE: + goto __14 + case TK_EQ: + goto __15 + case TK_ISNULL: + goto __16 + case TK_NOTNULL: + goto __17 + case TK_BETWEEN: + goto __18 + case TK_IN: + goto __19 + default: + goto __20 + } + goto __3 +__4: +__5: + pAlt = Xsqlite3ExprSimplifiedAndOr(tls, pExpr) + if !(pAlt != pExpr) { + goto __21 + } + Xsqlite3ExprIfFalse(tls, pParse, pAlt, dest, jumpIfNull) + goto __22 +__21: + if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND) { + goto __23 + } + + Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) + Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) + goto __24 +__23: + d2 = Xsqlite3VdbeMakeLabel(tls, pParse) + + Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, d2, + jumpIfNull^SQLITE_JUMPIFNULL) + Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) + Xsqlite3VdbeResolveLabel(tls, v, d2) +__24: + ; +__22: + ; + goto __3 + +__6: + ; + Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) + goto __3 + +__7: // IS TRUE or IS NOT TRUE + ; + isNot = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_ISNOT) + isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + + if !(isTrue^isNot != 0) { + goto __25 + } + // IS TRUE and IS NOT FALSE + Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, + func() int32 { + if isNot != 0 { + return 0 + } + return SQLITE_JUMPIFNULL + }()) + + goto __26 +__25: + // IS FALSE and IS NOT TRUE + Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, + func() int32 { + if isNot != 0 { + return 0 + } + return SQLITE_JUMPIFNULL + }()) +__26: + ; + goto __3 + +__8: +__9: + ; + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IS { + op = TK_NE + } else { + op = TK_EQ + } + jumpIfNull = SQLITE_NULLEQ +__10: +__11: +__12: +__13: +__14: +__15: + if !(Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != 0) { + goto __27 + } + goto default_expr +__27: + ; + + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4) + codeCompare(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, + r1, r2, dest, jumpIfNull, libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) + + goto __3 + +__16: +__17: + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) + + goto __3 + +__18: + ; + exprCodeBetween(tls, pParse, pExpr, dest, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, int32) + }{Xsqlite3ExprIfFalse})), jumpIfNull) + goto __3 + +__19: + if !(jumpIfNull != 0) { + goto __28 + } + sqlite3ExprCodeIN(tls, pParse, pExpr, dest, dest) + goto __29 +__28: + destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) + sqlite3ExprCodeIN(tls, pParse, pExpr, dest, destIfNull) + Xsqlite3VdbeResolveLabel(tls, v, destIfNull) +__29: + ; + goto __3 + +__20: +default_expr: + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) { + goto __30 + } + Xsqlite3VdbeGoto(tls, v, dest) + goto __31 +__30: + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue)) { + goto __32 + } + // no-op + goto __33 +__32: + r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp) + Xsqlite3VdbeAddOp3(tls, v, OP_IfNot, r1, dest, libc.Bool32(jumpIfNull != 0)) + +__33: + ; +__31: + ; + goto __3 + +__3: + ; + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp /* regFree1 */))) + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */))) +} + +// Like sqlite3ExprIfFalse() except that a copy is made of pExpr before +// code generation, and that copy is deleted after code generation. This +// ensures that the original pExpr is unchanged. +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { + Xsqlite3ExprIfFalse(tls, pParse, pCopy, dest, jumpIfNull) + } + Xsqlite3ExprDelete(tls, db, pCopy) +} + +// Expression pVar is guaranteed to be an SQL variable. pExpr may be any +// type of expression. +// +// If pExpr is a simple SQL value - an integer, real, string, blob +// or NULL value - then the VDBE currently being prepared is configured +// to re-prepare each time a new value is bound to variable pVar. +// +// Additionally, if pExpr is a simple SQL value and the value is the +// same as that currently bound to variable pVar, non-zero is returned. +// Otherwise, if the values are not the same or if pExpr is not a simple +// SQL value, zero is returned. +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var res int32 = 0 + var iVar int32 + var pL uintptr + *(*uintptr)(unsafe.Pointer(bp /* pR */)) = uintptr(0) + + Xsqlite3ValueFromExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + iVar = int32((*Expr)(unsafe.Pointer(pVar)).FiColumn) + Xsqlite3VdbeSetVarmask(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iVar) + pL = Xsqlite3VdbeGetBoundValue(tls, (*Parse)(unsafe.Pointer(pParse)).FpReprepare, iVar, uint8(SQLITE_AFF_BLOB)) + if pL != 0 { + if Xsqlite3_value_type(tls, pL) == SQLITE_TEXT { + Xsqlite3_value_text(tls, pL) // Make sure the encoding is UTF-8 + } + res = libc.Bool32(0 == Xsqlite3MemCompare(tls, pL, *(*uintptr)(unsafe.Pointer(bp)), uintptr(0))) + } + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pR */))) + Xsqlite3ValueFree(tls, pL) + } + + return res +} + +// Do a deep comparison of two expression trees. Return 0 if the two +// expressions are completely identical. Return 1 if they differ only +// by a COLLATE operator at the top level. Return 2 if there are differences +// other than the top-level COLLATE operator. +// +// If any subelement of pB has Expr.iTable==(-1) then it is allowed +// to compare equal to an equivalent element in pA with Expr.iTable==iTab. +// +// The pA side might be using TK_REGISTER. If that is the case and pB is +// not using TK_REGISTER but is otherwise equivalent, then still return 0. +// +// Sometimes this routine will return 2 even if the two expressions +// really are equivalent. If we cannot prove that the expressions are +// identical, we return 2 just to be safe. So if this routine +// returns 2, then you do not really know for certain if the two +// expressions are the same. But if you get a 0 or 1 return, then you +// can be sure the expressions are the same. In the places where +// this routine is used, it does not hurt to get an extra 2 - that +// just might result in some slightly slower code. But returning +// an incorrect 0 or 1 could lead to a malfunction. +// +// If pParse is not NULL then TK_VARIABLE terms in pA with bindings in +// pParse->pReprepare can be matched against literals in pB. The +// pParse->pVdbe->expmask bitmask is updated for each variable referenced. +// If pParse is NULL (the normal case) then any TK_VARIABLE term in +// Argument pParse should normally be NULL. If it is not NULL and pA or +// pB causes a return value of 2. +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ + var combinedFlags U32 + if pA == uintptr(0) || pB == uintptr(0) { + if pB == pA { + return 0 + } + return 2 + } + if pParse != 0 && int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_VARIABLE && exprCompareVariable(tls, pParse, pA, pB) != 0 { + return 0 + } + combinedFlags = (*Expr)(unsafe.Pointer(pA)).Fflags | (*Expr)(unsafe.Pointer(pB)).Fflags + if combinedFlags&U32(EP_IntValue) != 0 { + if (*Expr)(unsafe.Pointer(pA)).Fflags&(*Expr)(unsafe.Pointer(pB)).Fflags&U32(EP_IntValue) != U32(0) && *(*int32)(unsafe.Pointer(pA + 8)) == *(*int32)(unsafe.Pointer(pB + 8)) { + return 0 + } + return 2 + } + if int32((*Expr)(unsafe.Pointer(pA)).Fop) != int32((*Expr)(unsafe.Pointer(pB)).Fop) || int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_RAISE { + if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_COLLATE && Xsqlite3ExprCompare(tls, pParse, (*Expr)(unsafe.Pointer(pA)).FpLeft, pB, iTab) < 2 { + return 1 + } + if int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLLATE && Xsqlite3ExprCompare(tls, pParse, pA, (*Expr)(unsafe.Pointer(pB)).FpLeft, iTab) < 2 { + return 1 + } + return 2 + } + + if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { + if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_FUNCTION || int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_FUNCTION { + if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pA + 8)), *(*uintptr)(unsafe.Pointer(pB + 8))) != 0 { + return 2 + } + + if libc.Bool32((*Expr)(unsafe.Pointer(pA)).Fflags&U32(EP_WinFunc) != U32(0)) != libc.Bool32((*Expr)(unsafe.Pointer(pB)).Fflags&U32(EP_WinFunc) != U32(0)) { + return 2 + } + if (*Expr)(unsafe.Pointer(pA)).Fflags&U32(EP_WinFunc) != U32(0) { + if Xsqlite3WindowCompare(tls, pParse, *(*uintptr)(unsafe.Pointer(pA + 64)), *(*uintptr)(unsafe.Pointer(pB + 64)), 1) != 0 { + return 2 + } + } + } else if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_NULL { + return 0 + } else if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_COLLATE { + if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(pA + 8)), *(*uintptr)(unsafe.Pointer(pB + 8))) != 0 { + return 2 + } + } else if *(*uintptr)(unsafe.Pointer(pB + 8)) != uintptr(0) && + int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_COLUMN && + int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_AGG_COLUMN && + libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(pA + 8)), *(*uintptr)(unsafe.Pointer(pB + 8))) != 0 { + return 2 + } + } + if (*Expr)(unsafe.Pointer(pA)).Fflags&U32(EP_Distinct|EP_Commuted) != + (*Expr)(unsafe.Pointer(pB)).Fflags&U32(EP_Distinct|EP_Commuted) { + return 2 + } + if combinedFlags&U32(EP_TokenOnly) == U32(0) { + if combinedFlags&U32(EP_xIsSelect) != 0 { + return 2 + } + if combinedFlags&U32(EP_FixedCol) == U32(0) && + Xsqlite3ExprCompare(tls, pParse, (*Expr)(unsafe.Pointer(pA)).FpLeft, (*Expr)(unsafe.Pointer(pB)).FpLeft, iTab) != 0 { + return 2 + } + if Xsqlite3ExprCompare(tls, pParse, (*Expr)(unsafe.Pointer(pA)).FpRight, (*Expr)(unsafe.Pointer(pB)).FpRight, iTab) != 0 { + return 2 + } + if Xsqlite3ExprListCompare(tls, *(*uintptr)(unsafe.Pointer(pA + 32)), *(*uintptr)(unsafe.Pointer(pB + 32)), iTab) != 0 { + return 2 + } + if int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_STRING && + int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_TRUEFALSE && + combinedFlags&U32(EP_Reduced) == U32(0) { + if int32((*Expr)(unsafe.Pointer(pA)).FiColumn) != int32((*Expr)(unsafe.Pointer(pB)).FiColumn) { + return 2 + } + if int32((*Expr)(unsafe.Pointer(pA)).Fop2) != int32((*Expr)(unsafe.Pointer(pB)).Fop2) && int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_TRUTH { + return 2 + } + if int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_IN && (*Expr)(unsafe.Pointer(pA)).FiTable != (*Expr)(unsafe.Pointer(pB)).FiTable && (*Expr)(unsafe.Pointer(pA)).FiTable != iTab { + return 2 + } + } + } + return 0 +} + +// Compare two ExprList objects. Return 0 if they are identical, 1 +// if they are certainly different, or 2 if it is not possible to +// determine if they are identical or not. +// +// If any subelement of pB has Expr.iTable==(-1) then it is allowed +// to compare equal to an equivalent element in pA with Expr.iTable==iTab. +// +// This routine might return non-zero for equivalent ExprLists. The +// only consequence will be disabled optimizations. But this routine +// must never return 0 if the two ExprList objects are different, or +// a malfunction will result. +// +// Two NULL pointers are considered to be the same. But a NULL pointer +// always differs from a non-NULL pointer. +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ + var i int32 + if pA == uintptr(0) && pB == uintptr(0) { + return 0 + } + if pA == uintptr(0) || pB == uintptr(0) { + return 1 + } + if (*ExprList)(unsafe.Pointer(pA)).FnExpr != (*ExprList)(unsafe.Pointer(pB)).FnExpr { + return 1 + } + for i = 0; i < (*ExprList)(unsafe.Pointer(pA)).FnExpr; i++ { + var res int32 + var pExprA uintptr = (*ExprList_item)(unsafe.Pointer(pA + 8 + uintptr(i)*32)).FpExpr + var pExprB uintptr = (*ExprList_item)(unsafe.Pointer(pB + 8 + uintptr(i)*32)).FpExpr + if int32((*ExprList_item)(unsafe.Pointer(pA+8+uintptr(i)*32)).FsortFlags) != int32((*ExprList_item)(unsafe.Pointer(pB+8+uintptr(i)*32)).FsortFlags) { + return 1 + } + if libc.AssignInt32(&res, Xsqlite3ExprCompare(tls, uintptr(0), pExprA, pExprB, iTab)) != 0 { + return res + } + } + return 0 +} + +// Like sqlite3ExprCompare() except COLLATE operators at the top-level +// are ignored. +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ + return Xsqlite3ExprCompare(tls, uintptr(0), + Xsqlite3ExprSkipCollateAndLikely(tls, pA), + Xsqlite3ExprSkipCollateAndLikely(tls, pB), + iTab) +} + +// Return non-zero if Expr p can only be true if pNN is not NULL. +// +// Or if seenNot is true, return non-zero if Expr p can only be +// non-NULL if pNN is not NULL +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ + + if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { + return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) + } + switch int32((*Expr)(unsafe.Pointer(p)).Fop) { + case TK_IN: + { + if seenNot != 0 && (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { + return 0 + } + + return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) + + } + case TK_BETWEEN: + { + var pList uintptr + + pList = *(*uintptr)(unsafe.Pointer(p + 32)) + + if seenNot != 0 { + return 0 + } + if exprImpliesNotNull(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr, pNN, iTab, 1) != 0 || + exprImpliesNotNull(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+1*32)).FpExpr, pNN, iTab, 1) != 0 { + return 1 + } + return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) + + } + case TK_EQ: + fallthrough + case TK_NE: + fallthrough + case TK_LT: + fallthrough + case TK_LE: + fallthrough + case TK_GT: + fallthrough + case TK_GE: + fallthrough + case TK_PLUS: + fallthrough + case TK_MINUS: + fallthrough + case TK_BITOR: + fallthrough + case TK_LSHIFT: + fallthrough + case TK_RSHIFT: + fallthrough + case TK_CONCAT: + seenNot = 1 + fallthrough + case TK_STAR: + fallthrough + case TK_REM: + fallthrough + case TK_BITAND: + fallthrough + case TK_SLASH: + { + if exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, pNN, iTab, seenNot) != 0 { + return 1 + } + + } + fallthrough + case TK_SPAN: + fallthrough + case TK_COLLATE: + fallthrough + case TK_UPLUS: + fallthrough + case TK_UMINUS: + { + return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, seenNot) + + } + case TK_TRUTH: + { + if seenNot != 0 { + return 0 + } + if int32((*Expr)(unsafe.Pointer(p)).Fop2) != TK_IS { + return 0 + } + return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) + + } + case TK_BITNOT: + fallthrough + case TK_NOT: + { + return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) + + } + } + return 0 +} + +// Return true if we can prove the pE2 will always be true if pE1 is +// true. Return false if we cannot complete the proof or if pE2 might +// be false. Examples: +// +// pE1: x==5 pE2: x==5 Result: true +// pE1: x>0 pE2: x==5 Result: false +// pE1: x=21 pE2: x=21 OR y=43 Result: true +// pE1: x!=123 pE2: x IS NOT NULL Result: true +// pE1: x!=?1 pE2: x IS NOT NULL Result: true +// pE1: x IS NULL pE2: x IS NOT NULL Result: false +// pE1: x IS ?2 pE2: x IS NOT NULL Reuslt: false +// +// When comparing TK_COLUMN nodes between pE1 and pE2, if pE2 has +// Expr.iTable<0 then assume a table number given by iTab. +// +// If pParse is not NULL, then the values of bound variables in pE1 are +// compared against literal values in pE2 and pParse->pVdbe->expmask is +// modified to record which bound variables are referenced. If pParse +// is NULL, then false will be returned if pE1 contains any bound variables. +// +// When in doubt, return false. Returning true might give a performance +// improvement. Returning false might cause a performance reduction, but +// it will always give the correct answer and is hence always safe. +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ + if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { + return 1 + } + if int32((*Expr)(unsafe.Pointer(pE2)).Fop) == TK_OR && + (Xsqlite3ExprImpliesExpr(tls, pParse, pE1, (*Expr)(unsafe.Pointer(pE2)).FpLeft, iTab) != 0 || + Xsqlite3ExprImpliesExpr(tls, pParse, pE1, (*Expr)(unsafe.Pointer(pE2)).FpRight, iTab) != 0) { + return 1 + } + if int32((*Expr)(unsafe.Pointer(pE2)).Fop) == TK_NOTNULL && + exprImpliesNotNull(tls, pParse, pE1, (*Expr)(unsafe.Pointer(pE2)).FpLeft, iTab, 0) != 0 { + return 1 + } + return 0 +} + +// This is the Expr node callback for sqlite3ExprImpliesNonNullRow(). +// If the expression node requires that the table at pWalker->iCur +// have one or more non-NULL column, then set pWalker->eCode to 1 and abort. +// +// This routine controls an optimization. False positives (setting +// pWalker->eCode to 1 when it should not be) are deadly, but false-negatives +// (never setting pWalker->eCode) is a harmless missed optimization. +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { + return WRC_Prune + } + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_ISNOT: + fallthrough + case TK_ISNULL: + fallthrough + case TK_NOTNULL: + fallthrough + case TK_IS: + fallthrough + case TK_OR: + fallthrough + case TK_VECTOR: + fallthrough + case TK_CASE: + fallthrough + case TK_IN: + fallthrough + case TK_FUNCTION: + fallthrough + case TK_TRUTH: + + return WRC_Prune + case TK_COLUMN: + if *(*int32)(unsafe.Pointer(pWalker + 40)) == (*Expr)(unsafe.Pointer(pExpr)).FiTable { + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(1) + return WRC_Abort + } + return WRC_Prune + + case TK_AND: + if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 0 { + Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + if (*Walker)(unsafe.Pointer(pWalker)).FeCode != 0 { + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + } + } + return WRC_Prune + + case TK_BETWEEN: + if Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) == WRC_Abort { + + return WRC_Abort + } + return WRC_Prune + + // Virtual tables are allowed to use constraints like x=NULL. So + // a term of the form x=y does not prove that y is not null if x + // is the column of a virtual table + case TK_EQ: + fallthrough + case TK_NE: + fallthrough + case TK_LT: + fallthrough + case TK_LE: + fallthrough + case TK_GT: + fallthrough + case TK_GE: + { + var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + var pRight uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpRight + + // The y.pTab=0 assignment in wherecode.c always happens after the + // impliesNotNullRow() test + + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && + *(*uintptr)(unsafe.Pointer(pLeft + 64)) != uintptr(0) && + int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 64)))).FeTabType) == TABTYP_VTAB || + int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && + *(*uintptr)(unsafe.Pointer(pRight + 64)) != uintptr(0) && + int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB { + return WRC_Prune + } + + } + fallthrough + default: + return WRC_Continue + } + return int32(0) +} + +// Return true (non-zero) if expression p can only be true if at least +// one column of table iTab is non-null. In other words, return true +// if expression p will always be NULL or false if every column of iTab +// is NULL. +// +// False negatives are acceptable. In other words, it is ok to return +// zero even if expression p will never be true of every column of iTab +// is NULL. A false negative is merely a missed optimization opportunity. +// +// False positives are not allowed, however. A false positive may result +// in an incorrect answer. +// +// Terms of p that are marked with EP_FromJoin (and hence that come from +// the ON or USING clauses of LEFT JOINS) are excluded from the analysis. +// +// This routine is used to check if a LEFT JOIN can be converted into +// an ordinary JOIN. The p argument is the WHERE clause. If the WHERE +// clause requires that some column of the right table of the LEFT JOIN +// be non-NULL, then the LEFT JOIN can be safely converted into an +// ordinary join. +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + p = Xsqlite3ExprSkipCollateAndLikely(tls, p) + if p == uintptr(0) { + return 0 + } + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_NOTNULL { + p = (*Expr)(unsafe.Pointer(p)).FpLeft + } else { + for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_AND { + if Xsqlite3ExprImpliesNonNullRow(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, iTab) != 0 { + return 1 + } + p = (*Expr)(unsafe.Pointer(p)).FpRight + } + } + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{impliesNotNullRow})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) + (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) + *(*int32)(unsafe.Pointer(bp + 40)) = iTab + Xsqlite3WalkExpr(tls, bp, p) + return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) +} + +// Check to see if there are references to columns in table +// pWalker->u.pIdxCover->iCur can be satisfied using the index +// pWalker->u.pIdxCover->pIdx. +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && + int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(1) + return WRC_Abort + } + return WRC_Continue +} + +// Determine if an index pIdx on table with cursor iCur contains will +// the expression pExpr. Return true if the index does cover the +// expression and false if the pExpr expression references table columns +// that are not found in the index pIdx. +// +// An index covering an expression means that the expression can be +// evaluated using only the index and without having to lookup the +// corresponding table entry. +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // var w Walker at bp, 48 + + // var xcov IdxCover at bp+48, 16 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*IdxCover)(unsafe.Pointer(bp + 48 /* &xcov */)).FiCur = iCur + (*IdxCover)(unsafe.Pointer(bp + 48 /* &xcov */)).FpIdx = pIdx + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{exprIdxCover})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 /* &xcov */ + Xsqlite3WalkExpr(tls, bp, pExpr) + return libc.BoolInt32(!((*Walker)(unsafe.Pointer(bp)).FeCode != 0)) +} + +// Walker SELECT callbacks for sqlite3ReferencesSrcList(). +// +// When entering a new subquery on the pExpr argument, add all FROM clause +// entries for that subquery to the exclude list. +// +// When leaving the subquery, remove those entries from the exclude list. +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc + var i I64 + var j I64 + var piNew uintptr + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc == 0 { + return WRC_Continue + } + j = (*RefSrcList)(unsafe.Pointer(p)).FnExclude + *(*I64)(unsafe.Pointer(p + 16)) += I64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc) + piNew = Xsqlite3DbRealloc(tls, (*RefSrcList)(unsafe.Pointer(p)).Fdb, (*RefSrcList)(unsafe.Pointer(p)).FaiExclude, uint64((*RefSrcList)(unsafe.Pointer(p)).FnExclude)*uint64(unsafe.Sizeof(int32(0)))) + if piNew == uintptr(0) { + (*RefSrcList)(unsafe.Pointer(p)).FnExclude = int64(0) + return WRC_Abort + } else { + (*RefSrcList)(unsafe.Pointer(p)).FaiExclude = piNew + } + i = int64(0) +__1: + if !(i < I64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc)) { + goto __3 + } + { + *(*int32)(unsafe.Pointer((*RefSrcList)(unsafe.Pointer(p)).FaiExclude + uintptr(j)*4)) = (*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)).FiCursor + + } + goto __2 +__2: + i++ + j++ + goto __1 + goto __3 +__3: + ; + return WRC_Continue +} + +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc + if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { + + *(*I64)(unsafe.Pointer(p + 16)) -= I64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc) + } +} + +// This is the Walker EXPR callback for sqlite3ReferencesSrcList(). +// +// Set the 0x01 bit of pWalker->eCode if there is a reference to any +// of the tables shown in RefSrcList.pRef. +// +// Set the 0x02 bit of pWalker->eCode if there is a reference to a +// table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { + var i int32 + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pSrc uintptr = (*RefSrcList)(unsafe.Pointer(p)).FpRef + var nSrc int32 + if pSrc != 0 { + nSrc = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc + } else { + nSrc = 0 + } + for i = 0; i < nSrc; i++ { + if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FiCursor { + *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(1) + return WRC_Continue + } + } + for i = 0; I64(i) < (*RefSrcList)(unsafe.Pointer(p)).FnExclude && *(*int32)(unsafe.Pointer((*RefSrcList)(unsafe.Pointer(p)).FaiExclude + uintptr(i)*4)) != (*Expr)(unsafe.Pointer(pExpr)).FiTable; i++ { + } + if I64(i) >= (*RefSrcList)(unsafe.Pointer(p)).FnExclude { + *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(2) + } + } + return WRC_Continue +} + +// Check to see if pExpr references any tables in pSrcList. +// Possible return values: +// +// 1 pExpr does references a table in pSrcList. +// +// 0 pExpr references some table that is not defined in either +// pSrcList or in subqueries of pExpr itself. +// +// -1 pExpr only references no tables at all, or it only +// references tables defined in subqueries of pExpr itself. +// +// As currently used, pExpr is always an aggregate function call. That +// fact is exploited for efficiency. +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + // var w Walker at bp, 48 + + // var x RefSrcList at bp+48, 32 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+48, 0, uint64(unsafe.Sizeof(RefSrcList{}))) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{exprRefToSrcList})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{selectRefEnter})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{selectRefLeave})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 /* &x */ + (*RefSrcList)(unsafe.Pointer(bp + 48 /* &x */)).Fdb = (*Parse)(unsafe.Pointer(pParse)).Fdb + (*RefSrcList)(unsafe.Pointer(bp + 48 /* &x */)).FpRef = pSrcList + + Xsqlite3WalkExprList(tls, bp, *(*uintptr)(unsafe.Pointer(pExpr + 32))) + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) + } + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48 /* &x */)).FaiExclude) + if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { + return 1 + } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { + return 0 + } else { + return -1 + } + return int32(0) +} + +// This is a Walker expression node callback. +// +// For Expr nodes that contain pAggInfo pointers, make sure the AggInfo +// object that is referenced does not refer directly to the Expr. If +// it does, make a copy. This is done because the pExpr argument is +// subject to change. +// +// The copy is stored on pParse->pConstExpr with a register number of 0. +// This will cause the expression to be deleted automatically when the +// Parse object is destroyed, but the zero register number means that it +// will not generate any code in the preamble. +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && + (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { + var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + var iAgg int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) + var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { + + if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { + pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) + if pExpr != 0 { + (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(iAgg)*32)).FpCExpr = pExpr + Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) + } + } + } else { + + if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*32)).FpFExpr == pExpr { + pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) + if pExpr != 0 { + (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*32)).FpFExpr = pExpr + Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) + } + } + } + } + return WRC_Continue +} + +// Initialize a Walker object so that will persist AggInfo entries referenced +// by the tree that is walked. +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ + libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse + (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{agginfoPersistExprCb})) + (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) +} + +// Add a new element to the pAggInfo->aCol[] array. Return the index of +// the new element. Return a negative number if malloc fails. +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var i int32 at bp, 4 + + (*AggInfo)(unsafe.Pointer(pInfo)).FaCol = Xsqlite3ArrayAllocate(tls, + db, + (*AggInfo)(unsafe.Pointer(pInfo)).FaCol, + int32(unsafe.Sizeof(AggInfo_col{})), + pInfo+40, + bp) + return *(*int32)(unsafe.Pointer(bp /* i */)) +} + +// Add a new element to the pAggInfo->aFunc[] array. Return the index of +// the new element. Return a negative number if malloc fails. +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var i int32 at bp, 4 + + (*AggInfo)(unsafe.Pointer(pInfo)).FaFunc = Xsqlite3ArrayAllocate(tls, + db, + (*AggInfo)(unsafe.Pointer(pInfo)).FaFunc, + int32(unsafe.Sizeof(AggInfo_func{})), + pInfo+56, + bp) + return *(*int32)(unsafe.Pointer(bp /* i */)) +} + +// This is the xExprCallback for a tree walker. It is used to +// implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates +// for additional information. +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ + var i int32 + var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse + var pSrcList uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList + var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) + + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_AGG_COLUMN: + fallthrough + case TK_COLUMN: + { + + // Check to see if the column is in one of the tables in the FROM + // clause of the aggregate query + if pSrcList != uintptr(0) { + var pItem uintptr = pSrcList + 8 /* &.a */ + i = 0 + __1: + if !(i < (*SrcList)(unsafe.Pointer(pSrcList)).FnSrc) { + goto __3 + } + { + var pCol uintptr + + if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pItem)).FiCursor { + // If we reach this point, it means that pExpr refers to a table + // that is in the FROM clause of the aggregate query. + // + // Make an entry for the column in pAggInfo->aCol[] if there + // is not an entry there already. + var k int32 + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + k = 0 + __4: + if !(k < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { + goto __6 + } + { + if (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + goto __6 + } + + } + goto __5 + __5: + k++ + pCol += 32 + goto __4 + goto __6 + __6: + ; + if k >= (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn && + libc.AssignInt32(&k, addAggInfoColumn(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo)) >= 0 { + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(k)*32 + + (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable = (*Expr)(unsafe.Pointer(pExpr)).FiTable + (*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn = (*Expr)(unsafe.Pointer(pExpr)).FiColumn + (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = int16(-1) + (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr = pExpr + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 { + var j int32 + var n int32 + var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy + var pTerm uintptr = pGB + 8 /* &.a */ + n = (*ExprList)(unsafe.Pointer(pGB)).FnExpr + j = 0 + __7: + if !(j < n) { + goto __9 + } + { + var pE uintptr = (*ExprList_item)(unsafe.Pointer(pTerm)).FpExpr + if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pE)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && int32((*Expr)(unsafe.Pointer(pE)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(j) + goto __9 + } + + } + goto __8 + __8: + j++ + pTerm += 32 + goto __7 + goto __9 + __9: + } + if int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) < 0 { + (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(libc.PostIncInt32(&(*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn, 1)) + } + } + // There is now an entry for pExpr in pAggInfo->aCol[] (either + // because it was there before or because we just created it). + // Convert the pExpr to be a TK_AGG_COLUMN referring to that + // pAggInfo->aCol[] entry. + + (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) + goto __3 + } // endif pExpr->iTable==pItem->iCursor + + } + goto __2 + __2: + i++ + pItem += 112 + goto __1 + goto __3 + __3: // end loop over pSrcList + } + return WRC_Prune + + } + case TK_AGG_FUNCTION: + { + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_InAggFunc == 0 && + (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth == int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) { + // Check to see if pExpr is a duplicate of another aggregate + // function that is already in the pAggInfo structure + var pItem uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + i = 0 + __10: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { + goto __12 + } + { + if (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr == pExpr { + goto __12 + } + if Xsqlite3ExprCompare(tls, uintptr(0), (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr, pExpr, -1) == 0 { + goto __12 + } + + } + goto __11 + __11: + i++ + pItem += 32 + goto __10 + goto __12 + __12: + ; + if i >= (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc { + // pExpr is original. Make a new entry in pAggInfo->aFunc[] + var enc U8 = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc + i = addAggInfoFunc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo) + if i >= 0 { + + pItem = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32 + (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr = pExpr + (*AggInfo_func)(unsafe.Pointer(pItem)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + + (*AggInfo_func)(unsafe.Pointer(pItem)).FpFunc = Xsqlite3FindFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, + *(*uintptr)(unsafe.Pointer(pExpr + 8)), + func() int32 { + if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != 0 { + return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr + } + return 0 + }(), enc, uint8(0)) + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Distinct) != 0 { + (*AggInfo_func)(unsafe.Pointer(pItem)).FiDistinct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + } else { + (*AggInfo_func)(unsafe.Pointer(pItem)).FiDistinct = -1 + } + } + } + // Make pExpr point to the appropriate pAggInfo->aFunc[] entry + + (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(i) + (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo + return WRC_Prune + } else { + return WRC_Continue + } + + } + } + return WRC_Continue +} + +// Analyze the pExpr expression looking for aggregate functions and +// for variables that need to be added to AggInfo object that pNC->pAggInfo +// points to. Additional entries are made on the AggInfo object as +// necessary. +// +// This routine should only be called after the expression has been +// analyzed by sqlite3ResolveExprNames(). +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{analyzeAggregate})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3WalkerDepthIncrease})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3WalkerDepthDecrease})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FwalkerDepth = 0 + *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = uintptr(0) + + Xsqlite3WalkExpr(tls, bp, pExpr) +} + +// Call sqlite3ExprAnalyzeAggregates() for every expression in an +// expression list. Return the number of errors. +// +// If an error is found, the analysis is cut short. +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ + var pItem uintptr + var i int32 + if pList != 0 { + pItem = pList + 8 /* &.a */ + i = 0 + __1: + if !(i < (*ExprList)(unsafe.Pointer(pList)).FnExpr) { + goto __3 + } + { + Xsqlite3ExprAnalyzeAggregates(tls, pNC, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) + + } + goto __2 + __2: + i++ + pItem += 32 + goto __1 + goto __3 + __3: + } +} + +// Allocate a single new register for use to hold some intermediate result. +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ + if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { + return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + return *(*int32)(unsafe.Pointer(pParse + 216 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) +} + +// Deallocate a register, making available for reuse for some other +// purpose. +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ + if iReg != 0 { + + if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { + *(*int32)(unsafe.Pointer(pParse + 216 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + } + } +} + +// Allocate or deallocate a block of nReg consecutive registers. +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ + var i int32 + var n int32 + if nReg == 1 { + return Xsqlite3GetTempReg(tls, pParse) + } + i = (*Parse)(unsafe.Pointer(pParse)).FiRangeReg + n = (*Parse)(unsafe.Pointer(pParse)).FnRangeReg + if nReg <= n { + *(*int32)(unsafe.Pointer(pParse + 44)) += nReg + *(*int32)(unsafe.Pointer(pParse + 40)) -= nReg + } else { + i = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nReg + } + return i +} + +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ + if nReg == 1 { + Xsqlite3ReleaseTempReg(tls, pParse, iReg) + return + } + + if nReg > (*Parse)(unsafe.Pointer(pParse)).FnRangeReg { + (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = nReg + (*Parse)(unsafe.Pointer(pParse)).FiRangeReg = iReg + } +} + +// Mark all temporary registers as being unavailable for reuse. +// +// Always invoke this procedure after coding a subroutine or co-routine +// that might be invoked from other parts of the code, to ensure that +// the sub/co-routine does not use registers in common with the code that +// invokes the sub/co-routine. +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ + (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) + (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 +} + +// Validate that no temporary register falls within the range of +// iFirst..iLast, inclusive. This routine is only call from within assert() +// statements. + +//************* End of expr.c *********************************************** +//************* Begin file alter.c ****************************************** +// 2005 February 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains C code routines that used to generate VDBE code +// that implements the ALTER TABLE command. +// #include "sqliteInt.h" + +// The code in this file only exists if we are not omitting the +// ALTER TABLE logic from the build. + +// Parameter zName is the name of a table that is about to be altered +// (either with ALTER TABLE ... RENAME TO or ALTER TABLE ... ADD COLUMN). +// If the table is a system table, this function leaves an error message +// in pParse->zErr (system tables may not be altered) and returns non-zero. +// +// Or, if zName is not a system table, zero is returned. +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8010, 7) || + (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Eponymous) != U32(0) || + (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Shadow) != U32(0) && + Xsqlite3ReadOnlyShadowTables(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+8018, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + return 1 + } + return 0 +} + +// Generate code to verify that the schemas of database zDb and, if +// bTemp is not true, database "temp", can still be parsed. This is +// called at the end of the generation of an ALTER TABLE ... RENAME ... +// statement to ensure that the operation has not rendered any schema +// objects unusable. +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) + Xsqlite3NestedParse(tls, pParse, + + ts+8046, + libc.VaList(bp, zDb, + zDb, bTemp, zWhen, bNoDQS)) + + if bTemp == 0 { + Xsqlite3NestedParse(tls, pParse, + + ts+8221, + libc.VaList(bp+40, zDb, zWhen, bNoDQS)) + } +} + +// Generate VM code to replace any double-quoted strings (but not double-quoted +// identifiers) within the "sql" column of the sqlite_schema table in +// database zDb with their single-quoted equivalents. If argument bTemp is +// not true, similarly update all SQL statements in the sqlite_schema table +// of the temp db. +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + Xsqlite3NestedParse(tls, pParse, + + ts+8395, libc.VaList(bp, zDb, zDb)) + if bTemp == 0 { + Xsqlite3NestedParse(tls, pParse, + + ts+8542, 0) + } +} + +// Generate code to reload the schema for database iDb. And, if iDb!=1, for +// the temp database as well. +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + if v != 0 { + Xsqlite3ChangeCookie(tls, pParse, iDb) + Xsqlite3VdbeAddParseSchemaOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iDb, uintptr(0), p5) + if iDb != 1 { + Xsqlite3VdbeAddParseSchemaOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, 1, uintptr(0), p5) + } + } +} + +// Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" +// command. +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ + bp := tls.Alloc(184) + defer tls.Free(184) + + var iDb int32 // Database that contains the table + var zDb uintptr // Name of database iDb + var pTab uintptr // Table being renamed + var zName uintptr // NULL-terminated version of pName + var db uintptr // Database connection + var nTabName int32 // Number of UTF-8 characters in zTabName + var zTabName uintptr // Original name of the table + var v uintptr + var pVTab uintptr + var i int32 + zName = uintptr(0) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + pVTab = uintptr(0) // Non-zero if this is a v-tab with an xRename() + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __1 + } + goto exit_rename_table +__1: + ; + + pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) + if !!(pTab != 0) { + goto __2 + } + goto exit_rename_table +__2: + ; + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + + // Get a NULL terminated version of the new table name. + zName = Xsqlite3NameFromToken(tls, db, pName) + if !!(zName != 0) { + goto __3 + } + goto exit_rename_table +__3: + ; + + // Check that a table or index named 'zName' does not already exist + // in database iDb. If so, this is an error. + if !(Xsqlite3FindTable(tls, db, zName, zDb) != 0 || + Xsqlite3FindIndex(tls, db, zName, zDb) != 0 || + Xsqlite3IsShadowTableOf(tls, db, pTab, zName) != 0) { + goto __4 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+8693, libc.VaList(bp, zName)) + goto exit_rename_table +__4: + ; + + // Make sure it is not a system table being altered, or a reserved name + // that the table is being renamed to. + if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { + goto __5 + } + goto exit_rename_table +__5: + ; + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8752, zName)) { + goto __6 + } + goto exit_rename_table +__6: + ; + + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __7 + } + Xsqlite3ErrorMsg(tls, pParse, ts+8758, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto exit_rename_table +__7: + ; + + // Invoke the authorization callback. + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0)) != 0) { + goto __8 + } + goto exit_rename_table +__8: + ; + + if !(Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { + goto __9 + } + goto exit_rename_table +__9: + ; + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __10 + } + pVTab = Xsqlite3GetVTable(tls, db, pTab) + if !((*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer((*VTable)(unsafe.Pointer(pVTab)).FpVtab)).FpModule)).FxRename == uintptr(0)) { + goto __11 + } + pVTab = uintptr(0) +__11: + ; +__10: + ; + + // Begin a transaction for database iDb. Then modify the schema cookie + // (since the ALTER TABLE modifies the schema). Call sqlite3MayAbort(), + // as the scalar functions (e.g. sqlite_rename_table()) invoked by the + // nested SQL may raise an exception. + v = Xsqlite3GetVdbe(tls, pParse) + if !(v == uintptr(0)) { + goto __12 + } + goto exit_rename_table +__12: + ; + Xsqlite3MayAbort(tls, pParse) + + // figure out how many UTF-8 characters are in zName + zTabName = (*Table)(unsafe.Pointer(pTab)).FzName + nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) + + // Rewrite all CREATE TABLE, INDEX, TRIGGER or VIEW statements in + // the schema to use the new table name. + Xsqlite3NestedParse(tls, pParse, + + ts+8785, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + + // Update the tbl_name and name columns of the sqlite_schema table + // as required. + Xsqlite3NestedParse(tls, pParse, + + ts+8969, + libc.VaList(bp+64, zDb, + zName, zName, zName, + nTabName, zTabName)) + + // If the sqlite_sequence table exists in this database, then update + // it with the new table name. + if !(Xsqlite3FindTable(tls, db, ts+9274, zDb) != 0) { + goto __13 + } + Xsqlite3NestedParse(tls, pParse, + ts+9290, + libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) +__13: + ; + + // If the table being renamed is not itself part of the temp database, + // edit view and trigger definitions within the temp database + // as required. + if !(iDb != 1) { + goto __14 + } + Xsqlite3NestedParse(tls, pParse, + + ts+9348, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) +__14: + ; + + // If this is a virtual table, invoke the xRename() function if + // one is defined. The xRename() callback will modify the names + // of any resources used by the v-table implementation (including other + // SQLite tables) that are identified by the name of the virtual table. + if !(pVTab != 0) { + goto __15 + } + i = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeLoadString(tls, v, i, zName) + Xsqlite3VdbeAddOp4(tls, v, OP_VRename, i, 0, 0, pVTab, -12) +__15: + ; + + renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9613, 0) + +exit_rename_table: + Xsqlite3SrcListDelete(tls, db, pSrc) + Xsqlite3DbFree(tls, db, zName) +} + +// Write code that will raise an error if the table described by +// zDb and zTab is not empty. +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + Xsqlite3NestedParse(tls, pParse, + ts+9626, + libc.VaList(bp, zErr, zDb, zTab)) +} + +// This function is called after an "ALTER TABLE ... ADD" statement +// has been parsed. Argument pColDef contains the text of the new +// column definition. +// +// The Table structure pParse->pNewTable was extended to include +// the new column during parsing. +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var pNew uintptr // Copy of pParse->pNewTable + var pTab uintptr // Table being altered + var iDb int32 // Database number + var zDb uintptr // Database name + var zTab uintptr // Table name + var zCol uintptr // Null-terminated column definition + var pCol uintptr // The new column + var pDflt uintptr // Default value for the new column + var db uintptr // The database connection; + var v uintptr // The prepared statement under construction + var r1 int32 // Temporary registers + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + + pNew = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pNew)).FpSchema) + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + zTab = (*Table)(unsafe.Pointer(pNew)).FzName + 16 // Skip the "sqlite_altertab_" prefix on the name + pCol = (*Table)(unsafe.Pointer(pNew)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)*24 + pDflt = Xsqlite3ColumnExpr(tls, pNew, pCol) + pTab = Xsqlite3FindTable(tls, db, zTab, zDb) + + // Invoke the authorization callback. + if Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0)) != 0 { + return + } + + // Check that the new column is not specified as PRIMARY KEY or UNIQUE. + // If there is a NOT NULL constraint, then the default value for the + // column must not be NULL. + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+9664, 0) + return + } + if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+9696, 0) + return + } + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { + // If the default value for the new column was specified with a + // literal NULL, then set pDflt to 0. This simplifies checking + // for an SQL NULL default below. + + if pDflt != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pDflt)).FpLeft)).Fop) == TK_NULL { + pDflt = uintptr(0) + } + + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 64 + 8)) != 0 && pDflt != 0 { + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, + ts+9723) + } + if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, + ts+9782) + } + + // Ensure the default expression is something that sqlite3ValueFromExpr() + // can handle (i.e. not CURRENT_TIME etc.) + if pDflt != 0 { + *(*uintptr)(unsafe.Pointer(bp + 56 /* pVal */)) = uintptr(0) + var rc int32 + rc = Xsqlite3ValueFromExpr(tls, db, pDflt, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp+56) + + if rc != SQLITE_OK { + + return + } + if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, + ts+9835) + } + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pVal */))) + } + } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9881) + } + + // Modify the CREATE TABLE statement. + zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) + if zCol != 0 { + var zEnd uintptr = zCol + uintptr((*Token)(unsafe.Pointer(pColDef)).Fn-uint32(1)) + for zEnd > zCol && (int32(*(*uint8)(unsafe.Pointer(zEnd))) == ';' || int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zEnd)))])&0x01 != 0) { + *(*uint8)(unsafe.Pointer(libc.PostDecUintptr(&zEnd, 1))) = uint8(0) + } + // substr() operations on characters, but addColOffset is in bytes. So we + // have to use printf() to translate between these units: + + Xsqlite3NestedParse(tls, pParse, + + ts+9908, + libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), + zTab)) + Xsqlite3DbFree(tls, db, zCol) + } + + v = Xsqlite3GetVdbe(tls, pParse) + if v != 0 { + // Make sure the schema version is at least 3. But do not upgrade + // from less than 3 to 4, as that will corrupt any preexisting DESC + // index. + r1 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT) + Xsqlite3VdbeUsesBtree(tls, v, iDb) + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, r1, -2) + Xsqlite3VdbeAddOp2(tls, v, OP_IfPos, r1, Xsqlite3VdbeCurrentAddr(tls, v)+2) + + Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + + // Reload the table definition + renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterAdd)) + + // Verify that constraints are still satisfied + if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || + uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { + Xsqlite3NestedParse(tls, pParse, + + ts+10054, + libc.VaList(bp+40, zTab, zDb)) + } + } +} + +// This function is called by the parser after the table-name in +// an "ALTER TABLE ADD" statement is parsed. Argument +// pSrc is the full-name of the table being altered. +// +// This routine makes a (partial) copy of the Table structure +// for the table being altered and sets Parse.pNewTable to point +// to it. Routines called by the parser as the column definition +// is parsed (i.e. sqlite3AddColumn()) add the new Column data to +// the copy. The copy of the Table structure is deleted by tokenize.c +// after parsing is finished. +// +// Routine sqlite3AlterFinishAddColumn() will be called to complete +// coding the "ALTER TABLE ... ADD" statement. +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pNew uintptr + var pTab uintptr + var iDb int32 + var i int32 + var nAlloc int32 + var db uintptr + var pCol uintptr + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + // Look up the table being altered. + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __1 + } + goto exit_begin_add_column +__1: + ; + pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) + if !!(pTab != 0) { + goto __2 + } + goto exit_begin_add_column +__2: + ; + + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __3 + } + Xsqlite3ErrorMsg(tls, pParse, ts+10284, 0) + goto exit_begin_add_column +__3: + ; + + // Make sure this is not an attempt to ALTER a view. + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __4 + } + Xsqlite3ErrorMsg(tls, pParse, ts+10318, 0) + goto exit_begin_add_column +__4: + ; + if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { + goto __5 + } + goto exit_begin_add_column +__5: + ; + + Xsqlite3MayAbort(tls, pParse) + + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + // Put a copy of the Table struct in Parse.pNewTable for the + // sqlite3AddColumn() function and friends to modify. But modify + // the name by adding an "sqlite_altertab_" prefix. By adding this + // prefix, we insure that the name will not collide with an existing + // table because user table are not allowed to have the "sqlite_" + // prefix on their name. + pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) + if !!(pNew != 0) { + goto __6 + } + goto exit_begin_add_column +__6: + ; + (*Parse)(unsafe.Pointer(pParse)).FpNewTable = pNew + (*Table)(unsafe.Pointer(pNew)).FnTabRef = U32(1) + (*Table)(unsafe.Pointer(pNew)).FnCol = (*Table)(unsafe.Pointer(pTab)).FnCol + + nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 + + (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc))) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10348, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + if !(!(int32((*Table)(unsafe.Pointer(pNew)).FaCol) != 0) || !(int32((*Table)(unsafe.Pointer(pNew)).FzName) != 0)) { + goto __7 + } + + goto exit_begin_add_column +__7: + ; + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pNew)).FaCol, (*Table)(unsafe.Pointer(pTab)).FaCol, uint64(unsafe.Sizeof(Column{}))*uint64((*Table)(unsafe.Pointer(pNew)).FnCol)) + i = 0 +__8: + if !(i < int32((*Table)(unsafe.Pointer(pNew)).FnCol)) { + goto __10 + } + pCol = (*Table)(unsafe.Pointer(pNew)).FaCol + uintptr(i)*24 + (*Column)(unsafe.Pointer(pCol)).FzCnName = Xsqlite3DbStrDup(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName) + (*Column)(unsafe.Pointer(pCol)).FhName = Xsqlite3StrIHash(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName) + goto __9 +__9: + i++ + goto __8 + goto __10 +__10: + ; + + *(*uintptr)(unsafe.Pointer(pNew + 64 + 16 /* &.pDfltList */)) = Xsqlite3ExprListDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)), 0) + (*Table)(unsafe.Pointer(pNew)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + *(*int32)(unsafe.Pointer(pNew + 64)) = *(*int32)(unsafe.Pointer(pTab + 64)) + (*Table)(unsafe.Pointer(pNew)).FnTabRef = U32(1) + +exit_begin_add_column: + Xsqlite3SrcListDelete(tls, db, pSrc) + return +} + +// Parameter pTab is the subject of an ALTER TABLE ... RENAME COLUMN +// command. This function checks if the table is a view or virtual +// table (columns of views or virtual tables may not be renamed). If so, +// it loads an error message into pParse and returns non-zero. +// +// Or, if pTab is not a view or virtual table, zero is returned. +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var zType uintptr = uintptr(0) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { + zType = ts + 10367 /* "view" */ + } + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + zType = ts + 10372 /* "virtual table" */ + } + if zType != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+10386, + libc.VaList(bp, func() uintptr { + if bDrop != 0 { + return ts + 10404 /* "drop column from" */ + } + return ts + 10421 /* "rename columns o..." */ + }(), + zType, (*Table)(unsafe.Pointer(pTab)).FzName)) + return 1 + } + return 0 +} + +// Handles the following parser reduction: +// +// cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + var db uintptr // Database connection + var pTab uintptr // Table being updated + var iCol int32 // Index of column being renamed + var zOld uintptr // Old column name + var zNew uintptr // New column name + var zDb uintptr // Name of schema containing the table + var iSchema int32 // Index of the schema + var bQuote int32 + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + zOld = uintptr(0) + zNew = uintptr(0) // True to quote the new name + + // Locate the table to be altered + pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) + if !!(pTab != 0) { + goto __1 + } + goto exit_rename_column +__1: + ; + + // Cannot alter a system table + if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { + goto __2 + } + goto exit_rename_column +__2: + ; + if !(SQLITE_OK != isRealTable(tls, pParse, pTab, 0)) { + goto __3 + } + goto exit_rename_column +__3: + ; + + // Which schema holds the table to be altered + iSchema = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iSchema)*32)).FzDbSName + + // Invoke the authorization callback. + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0)) != 0) { + goto __4 + } + goto exit_rename_column +__4: + ; + + // Make sure the old name really is a column name in the table to be + // altered. Set iCol to be the index of the column being renamed + zOld = Xsqlite3NameFromToken(tls, db, pOld) + if !!(zOld != 0) { + goto __5 + } + goto exit_rename_column +__5: + ; + iCol = 0 +__6: + if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __8 + } + if !(0 == Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName, zOld)) { + goto __9 + } + goto __8 +__9: + ; + goto __7 +__7: + iCol++ + goto __6 + goto __8 +__8: + ; + if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __10 + } + Xsqlite3ErrorMsg(tls, pParse, ts+10439, libc.VaList(bp, pOld)) + goto exit_rename_column +__10: + ; + + // Ensure the schema contains no double-quoted strings + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1525, 0) + renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) + + // Do the rename operation using a recursive UPDATE statement that + // uses the sqlite_rename_column() SQL function to compute the new + // CREATE statement text for the sqlite_schema table. + Xsqlite3MayAbort(tls, pParse) + zNew = Xsqlite3NameFromToken(tls, db, pNew) + if !!(zNew != 0) { + goto __11 + } + goto exit_rename_column +__11: + ; + + bQuote = int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 + Xsqlite3NestedParse(tls, pParse, + + ts+10460, + libc.VaList(bp+8, zDb, + zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.Bool32(iSchema == 1), + (*Table)(unsafe.Pointer(pTab)).FzName)) + + Xsqlite3NestedParse(tls, pParse, + + ts+10642, + libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) + + // Drop and reload the database schema. + renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9613, 1) + +exit_rename_column: + Xsqlite3SrcListDelete(tls, db, pSrc) + Xsqlite3DbFree(tls, db, zOld) + Xsqlite3DbFree(tls, db, zNew) + return +} + +// The context of an ALTER TABLE RENAME COLUMN operation that gets passed +// down into the Walker. +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ + +// Remember that the parser tree element pPtr was created using +// the token pToken. +// +// In other words, construct a new RenameToken object and add it +// to the list of RenameToken objects currently being built up +// in pParse->pRename. +// +// The pPtr argument is returned so that this routine can be used +// with tail recursion in tokenExpr() routine, for a small performance +// improvement. +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ + var pNew uintptr + + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { + pNew = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(RenameToken{}))) + if pNew != 0 { + (*RenameToken)(unsafe.Pointer(pNew)).Fp = pPtr + (*RenameToken)(unsafe.Pointer(pNew)).Ft = *(*Token)(unsafe.Pointer(pToken)) + (*RenameToken)(unsafe.Pointer(pNew)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpRename + (*Parse)(unsafe.Pointer(pParse)).FpRename = pNew + } + } + + return pPtr +} + +// It is assumed that there is already a RenameToken object associated +// with parse tree element pFrom. This function remaps the associated token +// to parse tree element pTo. +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ + var p uintptr + + for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { + if (*RenameToken)(unsafe.Pointer(p)).Fp == pFrom { + (*RenameToken)(unsafe.Pointer(p)).Fp = pTo + break + } + } +} + +// Walker callback used by sqlite3RenameExprUnmap(). +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ + var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr+64) + } + return WRC_Continue +} + +// Iterate through the Select objects that are part of WITH clauses attached +// to select statement pSelect. +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var pWith uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWith + if pWith != 0 { + var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse + var i int32 + var pCopy uintptr = uintptr(0) + + if (*Select)(unsafe.Pointer((*Cte)(unsafe.Pointer(pWith+16)).FpSelect)).FselFlags&U32(SF_Expanded) == U32(0) { + // Push a copy of the With object onto the with-stack. We use a copy + // here as the original will be expanded and resolved (flags SF_Expanded + // and SF_Resolved) below. And the parser code that uses the with-stack + // fails if the Select objects on it have already been expanded and + // resolved. + pCopy = Xsqlite3WithDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWith) + pCopy = Xsqlite3WithPush(tls, pParse, pCopy, uint8(1)) + } + for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { + var p uintptr = (*Cte)(unsafe.Pointer(pWith + 16 + uintptr(i)*48)).FpSelect + // var sNC NameContext at bp, 56 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse + if pCopy != 0 { + Xsqlite3SelectPrep(tls, (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse, p, bp) + } + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*NameContext)(unsafe.Pointer(bp)).FpParse)).Fdb)).FmallocFailed != 0 { + return + } + Xsqlite3WalkSelect(tls, pWalker, p) + Xsqlite3RenameExprlistUnmap(tls, pParse, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FpCols) + } + if pCopy != 0 && (*Parse)(unsafe.Pointer(pParse)).FpWith == pCopy { + (*Parse)(unsafe.Pointer(pParse)).FpWith = (*With)(unsafe.Pointer(pCopy)).FpOuter + } + } +} + +// Unmap all tokens in the IdList object passed as the second argument. +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ + if pIdList != 0 { + var ii int32 + for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pIdList)).Fa+uintptr(ii)*16)).FzName) + } + } +} + +// Walker callback used by sqlite3RenameExprUnmap(). +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ + var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse + var i int32 + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return WRC_Abort + } + + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { + return WRC_Prune + } + if (*Select)(unsafe.Pointer(p)).FpEList != 0 { + var pList uintptr = (*Select)(unsafe.Pointer(p)).FpEList + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + if (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FzEName != 0 && int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FzEName) + } + } + } + if (*Select)(unsafe.Pointer(p)).FpSrc != 0 { // Every Select as a SrcList, even if it is empty + var pSrc uintptr = (*Select)(unsafe.Pointer(p)).FpSrc + for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; i++ { + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FzName) + Xsqlite3WalkExpr(tls, pWalker, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpOn) + unmapColumnIdlistNames(tls, pParse, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpUsing) + } + } + + renameWalkWith(tls, pWalker, p) + return WRC_Continue +} + +// Remove all nodes that are part of expression pExpr from the rename list. +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var eMode U8 = (*Parse)(unsafe.Pointer(pParse)).FeParseMode + // var sWalker Walker at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameUnmapExprCb})) + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameUnmapSelectCb})) + (*Parse)(unsafe.Pointer(pParse)).FeParseMode = U8(PARSE_MODE_UNMAP) + Xsqlite3WalkExpr(tls, bp, pExpr) + (*Parse)(unsafe.Pointer(pParse)).FeParseMode = eMode +} + +// Remove all nodes that are part of expression-list pEList from the +// rename list. +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + if pEList != 0 { + var i int32 + // var sWalker Walker at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameUnmapExprCb})) + Xsqlite3WalkExprList(tls, bp, pEList) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + if int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName) + } + } + } +} + +// Free the list of RenameToken objects given in the second argument +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ + var pNext uintptr + var p uintptr + for p = pToken; p != 0; p = pNext { + pNext = (*RenameToken)(unsafe.Pointer(p)).FpNext + Xsqlite3DbFree(tls, db, p) + } +} + +// Search the Parse object passed as the first argument for a RenameToken +// object associated with parse tree element pPtr. If found, return a pointer +// to it. Otherwise, return NULL. +// +// If the second argument passed to this function is not NULL and a matching +// RenameToken object is found, remove it from the Parse object and add it to +// the list maintained by the RenameCtx object. +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ + var pp uintptr + if pPtr == uintptr(0) { + return uintptr(0) + } + for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { + var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) + if pCtx != 0 { + *(*uintptr)(unsafe.Pointer(pp)) = (*RenameToken)(unsafe.Pointer(pToken)).FpNext + (*RenameToken)(unsafe.Pointer(pToken)).FpNext = (*RenameCtx1)(unsafe.Pointer(pCtx)).FpList + (*RenameCtx1)(unsafe.Pointer(pCtx)).FpList = pToken + (*RenameCtx1)(unsafe.Pointer(pCtx)).FnList++ + } + return pToken + } + } + return uintptr(0) +} + +// This is a Walker select callback. It does nothing. It is only required +// because without a dummy callback, sqlite3WalkExpr() and similar do not +// descend into sub-select statements. +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { + + return WRC_Prune + } + renameWalkWith(tls, pWalker, p) + return WRC_Continue +} + +// This is a Walker expression callback. +// +// For every TK_COLUMN node in the expression tree, search to see +// if the column being references is the column being renamed by an +// ALTER TABLE statement. If it is, then attach its associated +// RenameToken object to the list of RenameToken objects being +// constructed in RenameCtx object at pWalker->u.pRename. +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && + (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(pWalker)).FpParse)).FpTriggerTab == (*RenameCtx)(unsafe.Pointer(p)).FpTab { + renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, pExpr) + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && + (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && + (*RenameCtx)(unsafe.Pointer(p)).FpTab == *(*uintptr)(unsafe.Pointer(pExpr + 64)) { + renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, pExpr) + } + return WRC_Continue +} + +// The RenameCtx contains a list of tokens that reference a column that +// is being renamed by an ALTER TABLE statement. Return the "last" +// RenameToken in the RenameCtx and remove that RenameToken from the +// RenameContext. "Last" means the last RenameToken encountered when +// the input SQL is parsed from left to right. Repeated calls to this routine +// return all column name tokens in the order that they are encountered +// in the SQL statement. +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ + var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList + var pToken uintptr + var pp uintptr + + for pToken = (*RenameToken)(unsafe.Pointer(pBest)).FpNext; pToken != 0; pToken = (*RenameToken)(unsafe.Pointer(pToken)).FpNext { + if (*RenameToken)(unsafe.Pointer(pToken)).Ft.Fz > (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz { + pBest = pToken + } + } + for pp = pCtx; *(*uintptr)(unsafe.Pointer(pp)) != pBest; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + } + *(*uintptr)(unsafe.Pointer(pp)) = (*RenameToken)(unsafe.Pointer(pBest)).FpNext + + return pBest +} + +// An error occured while parsing or otherwise processing a database +// object (either pParse->pNewTable, pNewIndex or pNewTrigger) as part of an +// ALTER TABLE RENAME COLUMN program. The error message emitted by the +// sub-routine is currently stored in pParse->zErrMsg. This function +// adds context to the error message and then stores it in pCtx. +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var zT uintptr = Xsqlite3_value_text(tls, pType) + var zN uintptr = Xsqlite3_value_text(tls, pObject) + var zErr uintptr + + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10773, + libc.VaList(bp, zT, zN, func() uintptr { + if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { + return ts + 10796 /* " " */ + } + return ts + 1525 /* "" */ + }(), zWhen, + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) + Xsqlite3_result_error(tls, pCtx, zErr, -1) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zErr) +} + +// For each name in the the expression-list pEList (i.e. each +// pEList->a[i].zName) that matches the string in zOld, extract the +// corresponding rename-token from Parse object pParse and add it +// to the RenameCtx pCtx. +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ + if pEList != 0 { + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + var zName uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName + if int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME && + zName != uintptr(0) && + 0 == Xsqlite3_stricmp(tls, zName, zOld) { + renameTokenFind(tls, pParse, pCtx, zName) + } + } + } +} + +// For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) +// that matches the string in zOld, extract the corresponding rename-token +// from Parse object pParse and add it to the RenameCtx pCtx. +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ + if pIdList != 0 { + var i int32 + for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { + var zName uintptr = (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pIdList)).Fa + uintptr(i)*16)).FzName + if 0 == Xsqlite3_stricmp(tls, zName, zOld) { + renameTokenFind(tls, pParse, pCtx, zName) + } + } + } +} + +// Parse the SQL statement zSql using Parse object (*p). The Parse object +// is initialized by this function before it is used. +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ + var rc int32 + + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10798, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { + if bTemp != 0 { + return uint8(1) + } + return uint8(Xsqlite3FindDbName(tls, db, zDb)) + }() + (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) + (*Parse)(unsafe.Pointer(p)).Fdb = db + (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) + rc = Xsqlite3RunParser(tls, p, zSql) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + rc = SQLITE_NOMEM + } + if rc == SQLITE_OK && + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) + } + + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) + return rc +} + +// This function edits SQL statement zSql, replacing each token identified +// by the linked list pRename with the text of zNew. If argument bQuote is +// true, then zNew is always quoted first. If no error occurs, the result +// is loaded into context object pCtx as the result. +// +// Or, if an error occurs (i.e. an OOM condition), an error is left in +// pCtx and an SQLite error code returned. +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var nNew I64 = I64(Xsqlite3Strlen30(tls, zNew)) + var nSql I64 = I64(Xsqlite3Strlen30(tls, zSql)) + var db uintptr = Xsqlite3_context_db_handle(tls, pCtx) + var rc int32 = SQLITE_OK + var zQuot uintptr = uintptr(0) + var zOut uintptr + var nQuot I64 = int64(0) + var zBuf1 uintptr = uintptr(0) + var zBuf2 uintptr = uintptr(0) + + if zNew != 0 { + // Set zQuot to point to a buffer containing a quoted copy of the + // identifier zNew. If the corresponding identifier in the original + // ALTER TABLE statement was quoted (bQuote==1), then set zNew to + // point to zQuot so that all substitutions are made using the + // quoted version of the new column name. + zQuot = Xsqlite3MPrintf(tls, db, ts+10806, libc.VaList(bp, zNew)) + if zQuot == uintptr(0) { + return SQLITE_NOMEM + } else { + nQuot = I64(Xsqlite3Strlen30(tls, zQuot) - 1) + } + + zOut = Xsqlite3DbMallocZero(tls, db, uint64(nSql+I64((*RenameCtx)(unsafe.Pointer(pRename)).FnList)*nQuot+int64(1))) + } else { + zOut = Xsqlite3DbMallocZero(tls, db, uint64((nSql*int64(2)+int64(1))*int64(3))) + if zOut != 0 { + zBuf1 = zOut + uintptr(nSql*int64(2)+int64(1)) + zBuf2 = zOut + uintptr(nSql*int64(4)+int64(2)) + } + } + + // At this point pRename->pList contains a list of RenameToken objects + // corresponding to all tokens in the input SQL that must be replaced + // with the new column name, or with single-quoted versions of themselves. + // All that remains is to construct and return the edited SQL string. + if zOut != 0 { + var nOut int32 = int32(nSql) + libc.Xmemcpy(tls, zOut, zSql, uint64(nSql)) + for (*RenameCtx)(unsafe.Pointer(pRename)).FpList != 0 { + var iOff int32 // Offset of token to replace in zOut + var nReplace U32 + var zReplace uintptr + var pBest uintptr = renameColumnTokenNext(tls, pRename) + + if zNew != 0 { + if bQuote == 0 && Xsqlite3IsIdChar(tls, uint8(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz)))) != 0 { + nReplace = U32(nNew) + zReplace = zNew + } else { + nReplace = U32(nQuot) + zReplace = zQuot + if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '"' { + nReplace++ + } + } + } else { + // Dequote the double-quoted token. Then requote it again, this time + // using single quotes. If the character immediately following the + // original token within the input SQL was a single quote ('), then + // add another space after the new, single-quoted version of the + // token. This is so that (SELECT "string"'alias') maps to + // (SELECT 'string' 'alias'), and not (SELECT 'string''alias'). + libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) + *(*uint8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = uint8(0) + Xsqlite3Dequote(tls, zBuf1) + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10812, libc.VaList(bp+8, zBuf1, + func() uintptr { + if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { + return ts + 10796 /* " " */ + } + return ts + 1525 /* "" */ + }())) + zReplace = zBuf2 + nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) + } + + iOff = int32((int64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz) - int64(zSql)) / 1) + if (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn != nReplace { + libc.Xmemmove(tls, zOut+uintptr(U32(iOff)+nReplace), zOut+uintptr(uint32(iOff)+(*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn), + uint64(uint32(nOut)-(uint32(iOff)+(*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) + nOut = int32(U32(nOut) + (nReplace - (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) + *(*uint8)(unsafe.Pointer(zOut + uintptr(nOut))) = uint8(0) + } + libc.Xmemcpy(tls, zOut+uintptr(iOff), zReplace, uint64(nReplace)) + Xsqlite3DbFree(tls, db, pBest) + } + + Xsqlite3_result_text(tls, pCtx, zOut, -1, libc.UintptrFromInt32(-1)) + Xsqlite3DbFree(tls, db, zOut) + } else { + rc = SQLITE_NOMEM + } + + Xsqlite3_free(tls, zQuot) + return rc +} + +// Resolve all symbols in the trigger at pParse->pNewTrigger, assuming +// it was read from the schema of database zDb. Return SQLITE_OK if +// successful. Otherwise, return an SQLite error code and leave an error +// message in the Parse object. +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pNew uintptr = (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger + var pStep uintptr + // var sNC NameContext at bp, 56 + + var rc int32 = SQLITE_OK + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse + + (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = Xsqlite3FindTable(tls, db, (*Trigger)(unsafe.Pointer(pNew)).Ftable, + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(Xsqlite3SchemaToIndex(tls, db, (*Trigger)(unsafe.Pointer(pNew)).FpTabSchema))*32)).FzDbSName) + (*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pNew)).Fop + // ALWAYS() because if the table of the trigger does not exist, the + // error would have been hit before this point + if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { + rc = Xsqlite3ViewGetColumnNames(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) + } + + // Resolve symbols in WHEN clause + if rc == SQLITE_OK && (*Trigger)(unsafe.Pointer(pNew)).FpWhen != 0 { + rc = Xsqlite3ResolveExprNames(tls, bp, (*Trigger)(unsafe.Pointer(pNew)).FpWhen) + } + + for pStep = (*Trigger)(unsafe.Pointer(pNew)).Fstep_list; rc == SQLITE_OK && pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { + if (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect != 0 { + Xsqlite3SelectPrep(tls, pParse, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, bp) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + rc = (*Parse)(unsafe.Pointer(pParse)).Frc + } + } + if rc == SQLITE_OK && (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0 { + var pSrc uintptr = Xsqlite3TriggerStepSrc(tls, pParse, pStep) + if pSrc != 0 { + var i int32 + for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc && rc == SQLITE_OK; i++ { + var p uintptr = pSrc + 8 + uintptr(i)*112 + (*SrcItem)(unsafe.Pointer(p)).FiCursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if (*SrcItem)(unsafe.Pointer(p)).FpSelect != 0 { + Xsqlite3SelectPrep(tls, pParse, (*SrcItem)(unsafe.Pointer(p)).FpSelect, uintptr(0)) + Xsqlite3ExpandSubquery(tls, pParse, p) + + Xsqlite3SelectPrep(tls, pParse, (*SrcItem)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpFrom+8+uintptr(i-1)*112)).FpSelect, uintptr(0)) + } else { + (*SrcItem)(unsafe.Pointer(p)).FpTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), p) + if (*SrcItem)(unsafe.Pointer(p)).FpTab == uintptr(0) { + rc = SQLITE_ERROR + } else { + (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(p)).FpTab)).FnTabRef++ + rc = Xsqlite3ViewGetColumnNames(tls, pParse, (*SrcItem)(unsafe.Pointer(p)).FpTab) + } + } + } + if rc == SQLITE_OK && (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + rc = SQLITE_NOMEM + } + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = pSrc + if rc == SQLITE_OK && (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere != 0 { + rc = Xsqlite3ResolveExprNames(tls, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) + } + if rc == SQLITE_OK { + rc = Xsqlite3ResolveExprListNames(tls, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) + } + + if (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0 && rc == SQLITE_OK { + var pUpsert uintptr = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert + (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc = pSrc + *(*uintptr)(unsafe.Pointer(bp + 16)) = pUpsert + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = NC_UUpsert + rc = Xsqlite3ResolveExprListNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) + if rc == SQLITE_OK { + var pUpsertSet uintptr = (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSet + rc = Xsqlite3ResolveExprListNames(tls, bp, pUpsertSet) + } + if rc == SQLITE_OK { + rc = Xsqlite3ResolveExprNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertWhere) + } + if rc == SQLITE_OK { + rc = Xsqlite3ResolveExprNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) + } + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = 0 + } + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = uintptr(0) + Xsqlite3SrcListDelete(tls, db, pSrc) + } else { + rc = SQLITE_NOMEM + } + } + } + return rc +} + +// Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr +// objects that are part of the trigger passed as the second argument. +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ + var pStep uintptr + + // Find tokens to edit in WHEN clause + Xsqlite3WalkExpr(tls, pWalker, (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen) + + // Find tokens to edit in trigger steps + for pStep = (*Trigger)(unsafe.Pointer(pTrigger)).Fstep_list; pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { + Xsqlite3WalkSelect(tls, pWalker, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) + Xsqlite3WalkExpr(tls, pWalker, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) + Xsqlite3WalkExprList(tls, pWalker, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) + if (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0 { + var pUpsert uintptr = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert + Xsqlite3WalkExprList(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) + Xsqlite3WalkExprList(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSet) + Xsqlite3WalkExpr(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertWhere) + Xsqlite3WalkExpr(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) + } + if (*TriggerStep)(unsafe.Pointer(pStep)).FpFrom != 0 { + var i int32 + for i = 0; i < (*SrcList)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpFrom)).FnSrc; i++ { + Xsqlite3WalkSelect(tls, pWalker, (*SrcItem)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpFrom+8+uintptr(i)*112)).FpSelect) + } + } + } +} + +// Free the contents of Parse object (*pParse). Do not free the memory +// occupied by the Parse object itself. +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pIdx uintptr + if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) + } + Xsqlite3DeleteTable(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) + for libc.AssignUintptr(&pIdx, (*Parse)(unsafe.Pointer(pParse)).FpNewIndex) != uintptr(0) { + (*Parse)(unsafe.Pointer(pParse)).FpNewIndex = (*Index)(unsafe.Pointer(pIdx)).FpNext + Xsqlite3FreeIndex(tls, db, pIdx) + } + Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg) + renameTokenFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpRename) + Xsqlite3ParseObjectReset(tls, pParse) +} + +// SQL function: +// +// sqlite_rename_column(SQL,TYPE,OBJ,DB,TABLE,COL,NEWNAME,QUOTE,TEMP) +// +// 0. zSql: SQL statement to rewrite +// 1. type: Type of object ("table", "view" etc.) +// 2. object: Name of object +// 3. Database: Database name (e.g. "main") +// 4. Table: Table name +// 5. iCol: Index of column to rename +// 6. zNew: New column name +// 7. bQuote: Non-zero if the new column name should be quoted. +// 8. bTemp: True if zSql comes from temp schema +// +// Do a column rename operation on the CREATE statement given in zSql. +// The iCol-th column (left-most is 0) of table zTable is renamed from zCol +// into zNew. The name should be quoted if bQuote is true. +// +// This function is used internally by the ALTER TABLE RENAME COLUMN command. +// It is only accessible to SQL created using sqlite3NestedParse(). It is +// not reachable from ordinary SQL passed into sqlite3_prepare() unless the +// SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ + bp := tls.Alloc(488) + defer tls.Free(488) + + var db uintptr + // var sCtx RenameCtx at bp, 32 + + var zSql uintptr + var zDb uintptr + var zTable uintptr + var iCol int32 + var zNew uintptr + var bQuote int32 + var bTemp int32 + var zOld uintptr + var rc int32 + // var sParse Parse at bp+32, 408 + + // var sWalker Walker at bp+440, 48 + + var pIdx uintptr + var i int32 + var pTab uintptr + var xAuth Sqlite3_xauth + var pSelect uintptr + var pExpr uintptr + // A regular table + var bFKOnly int32 + var pFKey uintptr + var pUpsertSet uintptr + var pTarget uintptr + // A trigger + var pStep uintptr + db = Xsqlite3_context_db_handle(tls, context) + zSql = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + zDb = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) + zTable = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) + iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) + zNew = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8))) + bQuote = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 7*8))) + bTemp = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 8*8))) + xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth + + _ = NotUsed + if !(zSql == uintptr(0)) { + goto __1 + } + return +__1: + ; + if !(zTable == uintptr(0)) { + goto __2 + } + return +__2: + ; + if !(zNew == uintptr(0)) { + goto __3 + } + return +__3: + ; + if !(iCol < 0) { + goto __4 + } + return +__4: + ; + Xsqlite3BtreeEnterAll(tls, db) + pTab = Xsqlite3FindTable(tls, db, zTable, zDb) + if !(pTab == uintptr(0) || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __5 + } + Xsqlite3BtreeLeaveAll(tls, db) + return +__5: + ; + zOld = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FiCol = func() int32 { + if iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + return -1 + } + return iCol + }() + + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) + rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) + + // Find tokens that need to be replaced. + libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FpParse = bp + 32 /* &sParse */ + (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameColumnExprCb})) + (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameColumnSelectCb})) + *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp /* &sCtx */ + + (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = pTab + if !(rc != SQLITE_OK) { + goto __6 + } + goto renameColumnFunc_done +__6: + ; + if !((*Parse)(unsafe.Pointer(bp+32)).FpNewTable != 0) { + goto __7 + } + if !(int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FeTabType) == TABTYP_VIEW) { + goto __9 + } + pSelect = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable + 64)) + *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) + (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).Frc = SQLITE_OK + Xsqlite3SelectPrep(tls, bp+32, pSelect, uintptr(0)) + rc = func() int32 { + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return SQLITE_NOMEM + } + return (*Parse)(unsafe.Pointer(bp + 32)).Frc + }() + if !(rc == SQLITE_OK) { + goto __11 + } + Xsqlite3WalkSelect(tls, bp+440, pSelect) +__11: + ; + if !(rc != SQLITE_OK) { + goto __12 + } + goto renameColumnFunc_done +__12: + ; + goto __10 +__9: + if !(int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FeTabType) == TABTYP_NORM) { + goto __13 + } + // A regular table + bFKOnly = Xsqlite3_stricmp(tls, zTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FzName) + (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTable + if !(bFKOnly == 0) { + goto __14 + } + if !(iCol < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FnCol)) { + goto __15 + } + renameTokenFind(tls, + bp+32, bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FaCol+uintptr(iCol)*24)).FzCnName) +__15: + ; + if !((*RenameCtx)(unsafe.Pointer(bp)).FiCol < 0) { + goto __16 + } + renameTokenFind(tls, bp+32, bp, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable+52) +__16: + ; + Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FpCheck) + pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTable)).FpIndex +__17: + if !(pIdx != 0) { + goto __19 + } + Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + goto __18 +__18: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __17 + goto __19 +__19: + ; + pIdx = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewIndex +__20: + if !(pIdx != 0) { + goto __22 + } + Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + goto __21 +__21: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __20 + goto __22 +__22: + ; + i = 0 +__23: + if !(i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FnCol)) { + goto __25 + } + pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable, + (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) + Xsqlite3WalkExpr(tls, bp+440, pExpr) + goto __24 +__24: + i++ + goto __23 + goto __25 +__25: + ; +__14: + ; + + pFKey = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable + 64 + 8 /* &.pFKey */)) +__26: + if !(pFKey != 0) { + goto __28 + } + i = 0 +__29: + if !(i < (*FKey)(unsafe.Pointer(pFKey)).FnCol) { + goto __31 + } + if !(bFKOnly == 0 && (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(i)*16)).FiFrom == iCol) { + goto __32 + } + renameTokenFind(tls, bp+32, bp, pFKey+64+uintptr(i)*16) +__32: + ; + if !(0 == Xsqlite3_stricmp(tls, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zTable) && + 0 == Xsqlite3_stricmp(tls, (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(i)*16)).FzCol, zOld)) { + goto __33 + } + renameTokenFind(tls, bp+32, bp, (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(i)*16)).FzCol) +__33: + ; + goto __30 +__30: + i++ + goto __29 + goto __31 +__31: + ; + goto __27 +__27: + pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom + goto __26 + goto __28 +__28: + ; +__13: + ; +__10: + ; + goto __8 +__7: + if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { + goto __34 + } + Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) + goto __35 +__34: + rc = renameResolveTrigger(tls, bp+32) + if !(rc != SQLITE_OK) { + goto __36 + } + goto renameColumnFunc_done +__36: + ; + + pStep = (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTrigger)).Fstep_list +__37: + if !(pStep != 0) { + goto __39 + } + if !((*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0) { + goto __40 + } + pTarget = Xsqlite3LocateTable(tls, bp+32, uint32(0), (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zDb) + if !(pTarget == pTab) { + goto __41 + } + if !((*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0) { + goto __42 + } + pUpsertSet = (*Upsert)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert)).FpUpsertSet + renameColumnElistNames(tls, bp+32, bp, pUpsertSet, zOld) +__42: + ; + renameColumnIdlistNames(tls, bp+32, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpIdList, zOld) + renameColumnElistNames(tls, bp+32, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList, zOld) +__41: + ; +__40: + ; + goto __38 +__38: + pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext + goto __37 + goto __39 +__39: + ; + + // Find tokens to edit in UPDATE OF clause + if !((*Parse)(unsafe.Pointer(bp+32)).FpTriggerTab == pTab) { + goto __43 + } + renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTrigger)).FpColumns, zOld) +__43: + ; + + // Find tokens to edit in various expressions and selects + renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTrigger) +__35: + ; +__8: + ; + + rc = renameEditSql(tls, context, bp, zSql, zNew, bQuote) + +renameColumnFunc_done: + if !(rc != SQLITE_OK) { + goto __44 + } + if !(rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0) { + goto __45 + } + Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv))) + goto __46 +__45: + if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { + goto __47 + } + renameColumnParseError(tls, context, ts+1525, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + goto __48 +__47: + Xsqlite3_result_error_code(tls, context, rc) +__48: + ; +__46: + ; +__44: + ; + + renameParseCleanup(tls, bp+32) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpList) + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth + Xsqlite3BtreeLeaveAll(tls, db) +} + +// Walker expression callback used by "RENAME TABLE". +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && + (*RenameCtx)(unsafe.Pointer(p)).FpTab == *(*uintptr)(unsafe.Pointer(pExpr + 64)) { + renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, pExpr+64) + } + return WRC_Continue +} + +// Walker select callback used by "RENAME TABLE". +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ + var i int32 + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc + if (*Select)(unsafe.Pointer(pSelect)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { + + return WRC_Prune + } + if pSrc == uintptr(0) { + + return WRC_Abort + } + for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; i++ { + var pItem uintptr = pSrc + 8 + uintptr(i)*112 + if (*SrcItem)(unsafe.Pointer(pItem)).FpTab == (*RenameCtx)(unsafe.Pointer(p)).FpTab { + renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, (*SrcItem)(unsafe.Pointer(pItem)).FzName) + } + } + renameWalkWith(tls, pWalker, pSelect) + + return WRC_Continue +} + +// This C function implements an SQL user function that is used by SQL code +// generated by the ALTER TABLE ... RENAME command to modify the definition +// of any foreign key constraints that use the table being renamed as the +// parent table. It is passed three arguments: +// +// 0: The database containing the table being renamed. +// 1. type: Type of object ("table", "view" etc.) +// 2. object: Name of object +// 3: The complete text of the schema statement being modified, +// 4: The old name of the table being renamed, and +// 5: The new name of the table being renamed. +// 6: True if the schema statement comes from the temp db. +// +// It returns the new schema statement. For example: +// +// sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) +// -> 'CREATE TABLE t1(a REFERENCES t3)' +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ + bp := tls.Alloc(544) + defer tls.Free(544) + + var db uintptr = Xsqlite3_context_db_handle(tls, context) + var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + var zInput uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) + var zOld uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) + var zNew uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) + var bTemp int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8))) + _ = NotUsed + + if zInput != 0 && zOld != 0 && zNew != 0 { + // var sParse Parse at bp+80, 408 + + var rc int32 + var bQuote int32 = 1 + // var sCtx RenameCtx at bp, 32 + + // var sWalker Walker at bp+32, 48 + + var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) + + Xsqlite3BtreeEnterAll(tls, db) + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = Xsqlite3FindTable(tls, db, zOld, zDb) + libc.Xmemset(tls, bp+32, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 32 /* &sWalker */)).FpParse = bp + 80 /* &sParse */ + (*Walker)(unsafe.Pointer(bp + 32 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameTableExprCb})) + (*Walker)(unsafe.Pointer(bp + 32 /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameTableSelectCb})) + *(*uintptr)(unsafe.Pointer(bp + 32 + 40)) = bp /* &sCtx */ + + rc = renameParseSql(tls, bp+80, zDb, db, zInput, bTemp) + + if rc == SQLITE_OK { + var isLegacy int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) + if (*Parse)(unsafe.Pointer(bp+80)).FpNewTable != 0 { + var pTab uintptr = (*Parse)(unsafe.Pointer(bp + 80 /* &sParse */)).FpNewTable + + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { + if isLegacy == 0 { + var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) + // var sNC NameContext at bp+488, 56 + + libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 488 /* &sNC */)).FpParse = bp + 80 /* &sParse */ + + *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { + rc = (*Parse)(unsafe.Pointer(bp + 80 /* &sParse */)).Frc + } else { + Xsqlite3WalkSelect(tls, bp+32, *(*uintptr)(unsafe.Pointer(pTab + 64))) + } + } + } else { + // Modify any FK definitions to point to the new table. + if (isLegacy == 0 || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) && + !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + var pFKey uintptr + + for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { + if Xsqlite3_stricmp(tls, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zOld) == 0 { + renameTokenFind(tls, bp+80, bp, (*FKey)(unsafe.Pointer(pFKey)).FzTo) + } + } + } + + // If this is the table being altered, fix any table refs in CHECK + // expressions. Also update the name that appears right after the + // "CREATE [VIRTUAL] TABLE" bit. + if Xsqlite3_stricmp(tls, zOld, (*Table)(unsafe.Pointer(pTab)).FzName) == 0 { + (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = pTab + if isLegacy == 0 { + Xsqlite3WalkExprList(tls, bp+32, (*Table)(unsafe.Pointer(pTab)).FpCheck) + } + renameTokenFind(tls, bp+80, bp, (*Table)(unsafe.Pointer(pTab)).FzName) + } + } + } else if (*Parse)(unsafe.Pointer(bp+80)).FpNewIndex != 0 { + renameTokenFind(tls, bp+80, bp, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80 /* &sParse */)).FpNewIndex)).FzName) + if isLegacy == 0 { + Xsqlite3WalkExpr(tls, bp+32, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) + } + } else { + var pTrigger uintptr = (*Parse)(unsafe.Pointer(bp + 80 /* &sParse */)).FpNewTrigger + var pStep uintptr + if 0 == Xsqlite3_stricmp(tls, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80)).FpNewTrigger)).Ftable, zOld) && + (*Table)(unsafe.Pointer((*RenameCtx)(unsafe.Pointer(bp)).FpTab)).FpSchema == (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema { + renameTokenFind(tls, bp+80, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80 /* &sParse */)).FpNewTrigger)).Ftable) + } + + if isLegacy == 0 { + rc = renameResolveTrigger(tls, bp+80) + if rc == SQLITE_OK { + renameWalkTrigger(tls, bp+32, pTrigger) + for pStep = (*Trigger)(unsafe.Pointer(pTrigger)).Fstep_list; pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { + if (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0 && 0 == Xsqlite3_stricmp(tls, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zOld) { + renameTokenFind(tls, bp+80, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) + } + } + } + } + } + } + + if rc == SQLITE_OK { + rc = renameEditSql(tls, context, bp, zInput, zNew, bQuote) + } + if rc != SQLITE_OK { + if rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0 { + Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 3*8))) + } else if (*Parse)(unsafe.Pointer(bp+80)).FzErrMsg != 0 { + renameColumnParseError(tls, context, ts+1525, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + } else { + Xsqlite3_result_error_code(tls, context, rc) + } + } + + renameParseCleanup(tls, bp+80) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpList) + Xsqlite3BtreeLeaveAll(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth + } + + return +} + +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { + renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) + } + return WRC_Continue +} + +// SQL function: sqlite_rename_quotefix(DB,SQL) +// +// Rewrite the DDL statement "SQL" so that any string literals that use +// double-quotes use single quotes instead. +// +// Two arguments must be passed: +// +// 0: Database name ("main", "temp" etc.). +// 1: SQL statement to edit. +// +// The returned value is the modified SQL statement. For example, given +// the database schema: +// +// CREATE TABLE t1(a, b, c); +// +// SELECT sqlite_rename_quotefix('main', +// 'CREATE VIEW v1 AS SELECT "a", "string" FROM t1' +// ); +// +// returns the string: +// +// CREATE VIEW v1 AS SELECT "a", 'string' FROM t1 +// +// If there is a error in the input SQL, then raise an error, except +// if PRAGMA writable_schema=ON, then just return the input string +// unmodified following an error. +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ + bp := tls.Alloc(488) + defer tls.Free(488) + + var db uintptr = Xsqlite3_context_db_handle(tls, context) + var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + var zInput uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + + var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) + + Xsqlite3BtreeEnterAll(tls, db) + + _ = NotUsed + if zDb != 0 && zInput != 0 { + var rc int32 + // var sParse Parse at bp, 408 + + rc = renameParseSql(tls, bp, zDb, db, zInput, 0) + + if rc == SQLITE_OK { + // var sCtx RenameCtx at bp+408, 32 + + // var sWalker Walker at bp+440, 48 + + // Walker to find tokens that need to be replaced. + libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FpParse = bp /* &sParse */ + (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameQuotefixExprCb})) + (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renameColumnSelectCb})) + *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 /* &sCtx */ + + if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { + if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { + var pSelect uintptr = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)) + *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) + (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc = SQLITE_OK + Xsqlite3SelectPrep(tls, bp, pSelect, uintptr(0)) + rc = func() int32 { + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return SQLITE_NOMEM + } + return (*Parse)(unsafe.Pointer(bp)).Frc + }() + if rc == SQLITE_OK { + Xsqlite3WalkSelect(tls, bp+440, pSelect) + } + } else { + var i int32 + Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FpCheck) + for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FnCol); i++ { + Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable, + (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*24)) + } + } + } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { + Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FpPartIdxWhere) + } else { + rc = renameResolveTrigger(tls, bp) + if rc == SQLITE_OK { + renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger) + } + } + + if rc == SQLITE_OK { + rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + } + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408 /* &sCtx */)).FpList) + } + if rc != SQLITE_OK { + if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { + Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + } else { + Xsqlite3_result_error_code(tls, context, rc) + } + } + renameParseCleanup(tls, bp) + } + + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth + + Xsqlite3BtreeLeaveAll(tls, db) +} + +// Function: sqlite_rename_test(DB,SQL,TYPE,NAME,ISTEMP,WHEN,DQS) +// +// An SQL user function that checks that there are no parse or symbol +// resolution problems in a CREATE TRIGGER|TABLE|VIEW|INDEX statement. +// After an ALTER TABLE .. RENAME operation is performed and the schema +// reloaded, this function is called on each SQL statement in the schema +// to ensure that it is still usable. +// +// 0: Database name ("main", "temp" etc.). +// 1: SQL statement. +// 2: Object type ("view", "table", "trigger" or "index"). +// 3: Object name. +// 4: True if object is from temp schema. +// 5: "when" part of error message. +// 6: True to disable the DQS quirk when parsing SQL. +// +// The return value is computed as follows: +// +// A. If an error is seen and not in PRAGMA writable_schema=ON mode, +// then raise the error. +// B. Else if a trigger is created and the the table that the trigger is +// attached to is in database zDb, then return 1. +// C. Otherwise return NULL. +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ + bp := tls.Alloc(464) + defer tls.Free(464) + + var db uintptr = Xsqlite3_context_db_handle(tls, context) + var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + var zInput uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + var bTemp int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) + var isLegacy int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) + var zWhen uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) + var bNoDQS int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8))) + + var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) + + _ = NotUsed + + if zDb != 0 && zInput != 0 { + var rc int32 + // var sParse Parse at bp, 408 + + var flags int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags) + if bNoDQS != 0 { + *(*U64)(unsafe.Pointer(db + 48)) &= libc.Uint64FromInt32(libc.CplInt32(SQLITE_DqsDML | SQLITE_DqsDDL)) + } + rc = renameParseSql(tls, bp, zDb, db, zInput, bTemp) + *(*U64)(unsafe.Pointer(db + 48)) |= U64(flags & (SQLITE_DqsDML | SQLITE_DqsDDL)) + if rc == SQLITE_OK { + if isLegacy == 0 && (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 && int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { + // var sNC NameContext at bp+408, 56 + + libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 408 /* &sNC */)).FpParse = bp /* &sParse */ + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { + rc = (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc + } + } else if (*Parse)(unsafe.Pointer(bp)).FpNewTrigger != 0 { + if isLegacy == 0 { + rc = renameResolveTrigger(tls, bp) + } + if rc == SQLITE_OK { + var i1 int32 = Xsqlite3SchemaToIndex(tls, db, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger)).FpTabSchema) + var i2 int32 = Xsqlite3FindDbName(tls, db, zDb) + if i1 == i2 { + // Handle output case B + Xsqlite3_result_int(tls, context, 1) + } + } + } + } + + if rc != SQLITE_OK && zWhen != 0 && !(Xsqlite3WritableSchema(tls, db) != 0) { + // Output case A + renameColumnParseError(tls, context, zWhen, *(*uintptr)(unsafe.Pointer(argv + 2*8)), *(*uintptr)(unsafe.Pointer(argv + 3*8)), bp) + } + renameParseCleanup(tls, bp) + } + + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth +} + +// The implementation of internal UDF sqlite_drop_column(). +// +// Arguments: +// +// argv[0]: An integer - the index of the schema containing the table +// argv[1]: CREATE TABLE statement to modify. +// argv[2]: An integer - the index of the column to remove. +// +// The value returned is a string containing the CREATE TABLE statement +// with column argv[2] removed. +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ + bp := tls.Alloc(432) + defer tls.Free(432) + + var db uintptr + var iSchema int32 + var zSql uintptr + var iCol int32 + var zDb uintptr + var rc int32 + // var sParse Parse at bp+24, 408 + + var pCol uintptr + var pTab uintptr + var zEnd uintptr + var zNew uintptr + var xAuth Sqlite3_xauth + var pEnd uintptr + db = Xsqlite3_context_db_handle(tls, context) + iSchema = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) + zSql = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iSchema)*32)).FzDbSName + zNew = uintptr(0) + xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) + + _ = NotUsed + rc = renameParseSql(tls, bp+24, zDb, db, zSql, libc.Bool32(iSchema == 1)) + if !(rc != SQLITE_OK) { + goto __1 + } + goto drop_column_done +__1: + ; + pTab = (*Parse)(unsafe.Pointer(bp + 24 /* &sParse */)).FpNewTable + if !(pTab == uintptr(0) || int32((*Table)(unsafe.Pointer(pTab)).FnCol) == 1 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __2 + } + // This can happen if the sqlite_schema table is corrupt + rc = Xsqlite3CorruptError(tls, 110886) + goto drop_column_done +__2: + ; + + pCol = renameTokenFind(tls, bp+24, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName) + if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1) { + goto __3 + } + pEnd = renameTokenFind(tls, bp+24, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol+1)*24)).FzCnName) + zEnd = (*RenameToken)(unsafe.Pointer(pEnd)).Ft.Fz + goto __4 +__3: + ; + zEnd = zSql + uintptr(*(*int32)(unsafe.Pointer(pTab + 64))) +__5: + if !(int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != 0 && int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != ',') { + goto __6 + } + (*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz-- + goto __5 +__6: + ; +__4: + ; + + zNew = Xsqlite3MPrintf(tls, db, ts+10817, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_free(tls, zNew) + +drop_column_done: + renameParseCleanup(tls, bp+24) + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth + if !(rc != SQLITE_OK) { + goto __7 + } + Xsqlite3_result_error_code(tls, context, rc) +__7: +} + +// This function is called by the parser upon parsing an +// +// ALTER TABLE pSrc DROP COLUMN pName +// +// statement. Argument pSrc contains the possibly qualified name of the +// table being edited, and token pName the name of the column to drop. +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var db uintptr // Database handle + var pTab uintptr // Table to modify + var iDb int32 // Index of db containing pTab in aDb[] + var zDb uintptr // Database containing pTab ("main" etc.) + var zCol uintptr // Name of column to drop + var iCol int32 + var iPos int32 + var iColPos int32 + var regOut int32 + var i int32 + var addr int32 + var reg int32 + var regRec int32 + var pPk uintptr + var nField int32 // Number of non-virtual columns after drop + var iCur int32 + var v uintptr + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + zCol = uintptr(0) // Index of column zCol in pTab->aCol[] + + // Look up the table being altered. + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __1 + } + goto exit_drop_column +__1: + ; + pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) + if !!(pTab != 0) { + goto __2 + } + goto exit_drop_column +__2: + ; + + // Make sure this is not an attempt to ALTER a view, virtual table or + // system table. + if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { + goto __3 + } + goto exit_drop_column +__3: + ; + if !(SQLITE_OK != isRealTable(tls, pParse, pTab, 1)) { + goto __4 + } + goto exit_drop_column +__4: + ; + + // Find the index of the column being dropped. + zCol = Xsqlite3NameFromToken(tls, db, pName) + if !(zCol == uintptr(0)) { + goto __5 + } + + goto exit_drop_column +__5: + ; + iCol = Xsqlite3ColumnIndex(tls, pTab, zCol) + if !(iCol < 0) { + goto __6 + } + Xsqlite3ErrorMsg(tls, pParse, ts+10439, libc.VaList(bp, pName)) + goto exit_drop_column +__6: + ; + + // Do not allow the user to drop a PRIMARY KEY column or a column + // constrained by a UNIQUE constraint. + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { + goto __7 + } + Xsqlite3ErrorMsg(tls, pParse, ts+10824, + libc.VaList(bp+8, func() uintptr { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { + return ts + 10852 /* "PRIMARY KEY" */ + } + return ts + 6069 /* "UNIQUE" */ + }(), + zCol)) + goto exit_drop_column +__7: + ; + + // Do not allow the number of columns to go to zero + if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { + goto __8 + } + Xsqlite3ErrorMsg(tls, pParse, ts+10864, libc.VaList(bp+24, zCol)) + goto exit_drop_column +__8: + ; + + // Edit the sqlite_schema table + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + // Invoke the authorization callback. + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, zCol) != 0) { + goto __9 + } + goto exit_drop_column +__9: + ; + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1525, 0) + renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) + Xsqlite3NestedParse(tls, pParse, + + ts+10912, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + + // Drop and reload the database schema. + renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11033, 1) + + // Edit rows of table on disk + if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { + goto __10 + } + pPk = uintptr(0) + nField = 0 + v = Xsqlite3GetVdbe(tls, pParse) + iCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + Xsqlite3OpenTable(tls, pParse, iCur, iDb, pTab, OP_OpenWrite) + addr = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) + reg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __11 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iCur, reg) + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Table)(unsafe.Pointer(pTab)).FnCol) + goto __12 +__11: + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Index)(unsafe.Pointer(pPk)).FnColumn) + i = 0 +__13: + if !(i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { + goto __15 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iCur, i, reg+i+1) + goto __14 +__14: + i++ + goto __13 + goto __15 +__15: + ; + nField = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) +__12: + ; + regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + i = 0 +__16: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __18 + } + if !(i != iCol && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { + goto __19 + } + if !(pPk != 0) { + goto __20 + } + iPos = int32(Xsqlite3TableColumnToIndex(tls, pPk, int16(i))) + iColPos = int32(Xsqlite3TableColumnToIndex(tls, pPk, int16(iCol))) + if !(iPos < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { + goto __22 + } + goto __17 +__22: + ; + regOut = reg + 1 + iPos - libc.Bool32(iPos > iColPos) + goto __21 +__20: + regOut = reg + 1 + nField +__21: + ; + if !(i == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { + goto __23 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regOut) + goto __24 +__23: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, i, regOut) +__24: + ; + nField++ +__19: + ; + goto __17 +__17: + i++ + goto __16 + goto __18 +__18: + ; + if !(nField == 0) { + goto __25 + } + // dbsqlfuzz 5f09e7bcc78b4954d06bf9f2400d7715f48d1fef + (*Parse)(unsafe.Pointer(pParse)).FnMem++ + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, reg+1) + nField = 1 +__25: + ; + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, reg+1, nField, regRec) + if !(pPk != 0) { + goto __26 + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iCur, regRec, reg+1, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) + goto __27 +__26: + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iCur, regRec, reg) +__27: + ; + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SAVEPOSITION)) + + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iCur, addr+1) + Xsqlite3VdbeJumpHere(tls, v, addr) +__10: + ; + +exit_drop_column: + Xsqlite3DbFree(tls, db, zCol) + Xsqlite3SrcListDelete(tls, db, pSrc) +} + +// Register built-in functions used to help implement ALTER TABLE +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ + Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) +} + +var aAlterTableFuncs = [5]FuncDef{ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11051}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11072}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11092}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11111}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11130}} /* sqlite3.c:111066:18 */ + +//************* End of alter.c ********************************************** +//************* Begin file analyze.c **************************************** +// 2005-07-08 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code associated with the ANALYZE command. +// +// The ANALYZE command gather statistics about the content of tables +// and indices. These statistics are made available to the query planner +// to help it make better decisions about how to perform queries. +// +// The following system tables are or have been supported: +// +// CREATE TABLE sqlite_stat1(tbl, idx, stat); +// CREATE TABLE sqlite_stat2(tbl, idx, sampleno, sample); +// CREATE TABLE sqlite_stat3(tbl, idx, nEq, nLt, nDLt, sample); +// CREATE TABLE sqlite_stat4(tbl, idx, nEq, nLt, nDLt, sample); +// +// Additional tables might be added in future releases of SQLite. +// The sqlite_stat2 table is not created or used unless the SQLite version +// is between 3.6.18 and 3.7.8, inclusive, and unless SQLite is compiled +// with SQLITE_ENABLE_STAT2. The sqlite_stat2 table is deprecated. +// The sqlite_stat2 table is superseded by sqlite_stat3, which is only +// created and used by SQLite versions 3.7.9 through 3.29.0 when +// SQLITE_ENABLE_STAT3 defined. The functionality of sqlite_stat3 +// is a superset of sqlite_stat2 and is also now deprecated. The +// sqlite_stat4 is an enhanced version of sqlite_stat3 and is only +// available when compiled with SQLITE_ENABLE_STAT4 and in SQLite +// versions 3.8.1 and later. STAT4 is the only variant that is still +// supported. +// +// For most applications, sqlite_stat1 provides all the statistics required +// for the query planner to make good choices. +// +// Format of sqlite_stat1: +// +// There is normally one row per index, with the index identified by the +// name in the idx column. The tbl column is the name of the table to +// which the index belongs. In each such row, the stat column will be +// a string consisting of a list of integers. The first integer in this +// list is the number of rows in the index. (This is the same as the +// number of rows in the table, except for partial indices.) The second +// integer is the average number of rows in the index that have the same +// value in the first column of the index. The third integer is the average +// number of rows in the index that have the same value for the first two +// columns. The N-th integer (for N>1) is the average number of rows in +// the index which have the same value for the first N-1 columns. For +// a K-column index, there will be K+1 integers in the stat column. If +// the index is unique, then the last integer will be 1. +// +// The list of integers in the stat column can optionally be followed +// by the keyword "unordered". The "unordered" keyword, if it is present, +// must be separated from the last integer by a single space. If the +// "unordered" keyword is present, then the query planner assumes that +// the index is unordered and will not use the index for a range query. +// +// If the sqlite_stat1.idx column is NULL, then the sqlite_stat1.stat +// column contains a single integer which is the (estimated) number of +// rows in the table identified by sqlite_stat1.tbl. +// +// Format of sqlite_stat2: +// +// The sqlite_stat2 is only created and is only used if SQLite is compiled +// with SQLITE_ENABLE_STAT2 and if the SQLite version number is between +// 3.6.18 and 3.7.8. The "stat2" table contains additional information +// about the distribution of keys within an index. The index is identified by +// the "idx" column and the "tbl" column is the name of the table to which +// the index belongs. There are usually 10 rows in the sqlite_stat2 +// table for each index. +// +// The sqlite_stat2 entries for an index that have sampleno between 0 and 9 +// inclusive are samples of the left-most key value in the index taken at +// evenly spaced points along the index. Let the number of samples be S +// (10 in the standard build) and let C be the number of rows in the index. +// Then the sampled rows are given by: +// +// rownumber = (i*C*2 + C)/(S*2) +// +// For i between 0 and S-1. Conceptually, the index space is divided into +// S uniform buckets and the samples are the middle row from each bucket. +// +// The format for sqlite_stat2 is recorded here for legacy reference. This +// version of SQLite does not support sqlite_stat2. It neither reads nor +// writes the sqlite_stat2 table. This version of SQLite only supports +// sqlite_stat3. +// +// Format for sqlite_stat3: +// +// The sqlite_stat3 format is a subset of sqlite_stat4. Hence, the +// sqlite_stat4 format will be described first. Further information +// about sqlite_stat3 follows the sqlite_stat4 description. +// +// Format for sqlite_stat4: +// +// As with sqlite_stat2, the sqlite_stat4 table contains histogram data +// to aid the query planner in choosing good indices based on the values +// that indexed columns are compared against in the WHERE clauses of +// queries. +// +// The sqlite_stat4 table contains multiple entries for each index. +// The idx column names the index and the tbl column is the table of the +// index. If the idx and tbl columns are the same, then the sample is +// of the INTEGER PRIMARY KEY. The sample column is a blob which is the +// binary encoding of a key from the index. The nEq column is a +// list of integers. The first integer is the approximate number +// of entries in the index whose left-most column exactly matches +// the left-most column of the sample. The second integer in nEq +// is the approximate number of entries in the index where the +// first two columns match the first two columns of the sample. +// And so forth. nLt is another list of integers that show the approximate +// number of entries that are strictly less than the sample. The first +// integer in nLt contains the number of entries in the index where the +// left-most column is less than the left-most column of the sample. +// The K-th integer in the nLt entry is the number of index entries +// where the first K columns are less than the first K columns of the +// sample. The nDLt column is like nLt except that it contains the +// number of distinct entries in the index that are less than the +// sample. +// +// There can be an arbitrary number of sqlite_stat4 entries per index. +// The ANALYZE command will typically generate sqlite_stat4 tables +// that contain between 10 and 40 samples which are distributed across +// the key space, though not uniformly, and which include samples with +// large nEq values. +// +// Format for sqlite_stat3 redux: +// +// The sqlite_stat3 table is like sqlite_stat4 except that it only +// looks at the left-most column of the index. The sqlite_stat3.sample +// column contains the actual value of the left-most column instead +// of a blob encoding of the complete index key as is found in +// sqlite_stat4.sample. The nEq, nLt, and nDLt entries of sqlite_stat3 +// all contain just a single integer which is the same as the first +// integer in the equivalent columns in sqlite_stat4. +// #include "sqliteInt.h" + +// This routine generates code that opens the sqlite_statN tables. +// The sqlite_stat1 table is always relevant. sqlite_stat2 is now +// obsolete. sqlite_stat3 and sqlite_stat4 are only opened when +// appropriate compile-time options are provided. +// +// If the sqlite_statN tables do not previously exist, it is created. +// +// Argument zWhere may be a pointer to a buffer containing a table name, +// or it may be a NULL pointer. If it is not NULL, then all entries in +// the sqlite_statN tables associated with the named table are deleted. +// If zWhere==0, then code is generated to delete all stat table entries. +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + var i int32 + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pDb uintptr + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + // var aRoot [3]U32 at bp+76, 12 + + // var aCreateTbl [3]U8 at bp+72, 3 + + var nToOpen int32 + if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { + nToOpen = 2 + } else { + nToOpen = 1 + } + + if v == uintptr(0) { + return + } + + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + + // Create new statistic tables if they do not exist, or clear them + // if they do already exist. + for i = 0; i < int32(uint64(unsafe.Sizeof(aTable))/uint64(unsafe.Sizeof(struct { + FzName uintptr + FzCols uintptr + }{}))); i++ { + var zTab uintptr = aTable[i].FzName + var pStat uintptr + *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(0) + if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { + if i < nToOpen { + // The sqlite_statN table does not exist. Create it. Note that a + // side-effect of the CREATE TABLE statement is to leave the rootpage + // of the new table in register pParse->regRoot. This is important + // because the OpenWrite opcode below will be needing it. + Xsqlite3NestedParse(tls, pParse, + ts+11153, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) + *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) + } + } else { + // The table already exists. If zWhere is not NULL, delete all entries + // associated with the table zWhere. If zWhere is NULL, delete the + // entire contents of the table. + *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = (*Table)(unsafe.Pointer(pStat)).Ftnum + Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) + if zWhere != 0 { + Xsqlite3NestedParse(tls, pParse, + ts+11176, + libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) + } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { + Xsqlite3NestedParse(tls, pParse, ts+11206, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + } else { + // The sqlite_stat[134] table already exists. Delete all rows. + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) + } + } + } + + // Open the sqlite_stat[134] tables for writing. + for i = 0; i < nToOpen; i++ { + + Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, iStatCur+i, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb, 3) + Xsqlite3VdbeChangeP5(tls, v, uint16(*(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))))) + + } +} + +var aTable = [3]struct { + FzName uintptr + FzCols uintptr +}{ + {FzName: ts + 11224 /* "sqlite_stat1" */, FzCols: ts + 11237 /* "tbl,idx,stat" */}, + {FzName: ts + 11250 /* "sqlite_stat4" */, FzCols: ts + 11263 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11291 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ + +// Recommended number of samples for sqlite_stat4 + +// Three SQL functions - stat_init(), stat_push(), and stat_get() - +// share an instance of the following structure to hold their state +// information. +type StatAccum1 = struct { + Fdb uintptr + FnEst TRowcnt + FnRow TRowcnt + FnLimit int32 + FnCol int32 + FnKeyCol int32 + FnSkipAhead U8 + F__ccgo_pad1 [3]byte + Fcurrent StatSample + FnPSample TRowcnt + FmxSample int32 + FiPrn U32 + F__ccgo_pad2 [4]byte + FaBest uintptr + FiMin int32 + FnSample int32 + FnMaxEqZero int32 + FiGet int32 + Fa uintptr +} /* sqlite3.c:111342:9 */ + +// Recommended number of samples for sqlite_stat4 + +// Three SQL functions - stat_init(), stat_push(), and stat_get() - +// share an instance of the following structure to hold their state +// information. +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ +type StatSample1 = struct { + FanEq uintptr + FanDLt uintptr + FanLt uintptr + Fu struct{ FiRowid I64 } + FnRowid U32 + FisPSample U8 + F__ccgo_pad1 [3]byte + FiCol int32 + FiHash U32 +} /* sqlite3.c:111342:9 */ + +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ + +// Reclaim memory used by a StatSample +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ + + if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) + (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(0) + } +} + +// Initialize the BLOB value of a ROWID +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ + + if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) + } + *(*uintptr)(unsafe.Pointer(p + 24)) = Xsqlite3DbMallocRawNN(tls, db, uint64(n)) + if *(*uintptr)(unsafe.Pointer(p + 24)) != 0 { + (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(n) + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p + 24)), pData, uint64(n)) + } else { + (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(0) + } +} + +// Initialize the INTEGER value of a ROWID. +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ + + if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) + } + (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(0) + *(*I64)(unsafe.Pointer(p + 24)) = iRowid +} + +// Copy the contents of object (*pFrom) into (*pTo). +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ + (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample + (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol + (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash + libc.Xmemcpy(tls, (*StatSample)(unsafe.Pointer(pTo)).FanEq, (*StatSample)(unsafe.Pointer(pFrom)).FanEq, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64((*StatAccum)(unsafe.Pointer(p)).FnCol)) + libc.Xmemcpy(tls, (*StatSample)(unsafe.Pointer(pTo)).FanLt, (*StatSample)(unsafe.Pointer(pFrom)).FanLt, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64((*StatAccum)(unsafe.Pointer(p)).FnCol)) + libc.Xmemcpy(tls, (*StatSample)(unsafe.Pointer(pTo)).FanDLt, (*StatSample)(unsafe.Pointer(pFrom)).FanDLt, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64((*StatAccum)(unsafe.Pointer(p)).FnCol)) + if (*StatSample)(unsafe.Pointer(pFrom)).FnRowid != 0 { + sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, pTo, int32((*StatSample)(unsafe.Pointer(pFrom)).FnRowid), *(*uintptr)(unsafe.Pointer(pFrom + 24))) + } else { + sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, pTo, *(*I64)(unsafe.Pointer(pFrom + 24))) + } +} + +// Reclaim all memory of a StatAccum structure. +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ + var p uintptr = pOld + if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { + var i int32 + for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { + sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48) + } + for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FmxSample; i++ { + sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48) + } + sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32) + } + Xsqlite3DbFree(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p) +} + +// Implementation of the stat_init(N,K,C,L) SQL function. The four parameters +// are: +// N: The number of columns in the index including the rowid/pk (note 1) +// K: The number of columns in the index excluding the rowid/pk. +// C: Estimated number of rows in the index +// L: A limit on the number of rows to scan, or 0 for no-limit +// +// Note 1: In the special case of the covering index that implements a +// WITHOUT ROWID table, N is the number of PRIMARY KEY columns, not the +// total number of columns in the table. +// +// For indexes on ordinary rowid tables, N==K+1. But for indexes on +// WITHOUT ROWID tables, N=K+P where P is the number of columns in the +// PRIMARY KEY of the table. The covering index that implements the +// original WITHOUT ROWID table as N==K as a special case. +// +// This routine allocates the StatAccum object in heap memory. The return +// value is a pointer to the StatAccum object. The datatype of the +// return value is BLOB, but it is really just a pointer to the StatAccum +// object. +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ + var p uintptr + var nCol int32 // Number of columns in index being sampled + var nKeyCol int32 // Number of key columns + var nColUp int32 // nCol rounded up for alignment + var n int32 // Bytes of space to allocate + var db uintptr = Xsqlite3_context_db_handle(tls, context) // Database connection + // Maximum number of samples. 0 if STAT4 data is not collected + var mxSample int32 + if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { + mxSample = SQLITE_STAT4_SAMPLES + } else { + mxSample = 0 + } + + // Decode the three function arguments + _ = argc + nCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) + + if uint64(unsafe.Sizeof(TRowcnt(0))) < uint64(8) { + nColUp = (nCol + 1) & libc.CplInt32(1) + } else { + nColUp = nCol + } + nKeyCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + + // Allocate the space required for the StatAccum object + n = int32(uint64(unsafe.Sizeof(StatAccum{})) + + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nColUp) + + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nColUp)) // StatAccum.anDLt + if mxSample != 0 { + n = int32(uint64(n) + (uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nColUp) + + uint64(unsafe.Sizeof(StatSample{}))*uint64(nCol+mxSample) + + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(3)*uint64(nColUp)*uint64(nCol+mxSample))) + } + p = Xsqlite3DbMallocZero(tls, db, uint64(n)) + if p == uintptr(0) { + Xsqlite3_result_error_nomem(tls, context) + return + } + + (*StatAccum)(unsafe.Pointer(p)).Fdb = db + (*StatAccum)(unsafe.Pointer(p)).FnEst = TRowcnt(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + (*StatAccum)(unsafe.Pointer(p)).FnRow = TRowcnt(0) + (*StatAccum)(unsafe.Pointer(p)).FnLimit = int32(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) + (*StatAccum)(unsafe.Pointer(p)).FnCol = nCol + (*StatAccum)(unsafe.Pointer(p)).FnKeyCol = nKeyCol + (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead = U8(0) + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt = p + 1*128 + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(nColUp)*4 + + (*StatAccum)(unsafe.Pointer(p)).FmxSample = func() int32 { + if (*StatAccum)(unsafe.Pointer(p)).FnLimit == 0 { + return mxSample + } + return 0 + }() + if mxSample != 0 { + var pSpace uintptr // Allocated space not yet assigned + var i int32 // Used to iterate through p->aSample[] + + (*StatAccum)(unsafe.Pointer(p)).FiGet = -1 + (*StatAccum)(unsafe.Pointer(p)).FnPSample = (*StatAccum)(unsafe.Pointer(p)).FnEst/TRowcnt(mxSample/3+1) + TRowcnt(1) + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(nColUp)*4 + (*StatAccum)(unsafe.Pointer(p)).FiPrn = U32(0x689e962d)*U32(nCol) ^ 0xd0944565*U32(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + + // Set up the StatAccum.a[] and aBest[] arrays + (*StatAccum)(unsafe.Pointer(p)).Fa = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(nColUp)*4 + (*StatAccum)(unsafe.Pointer(p)).FaBest = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(mxSample)*48 + pSpace = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(mxSample+nCol)*48 + for i = 0; i < mxSample+nCol; i++ { + (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48)).FanEq = pSpace + pSpace += uintptr(uint64(unsafe.Sizeof(TRowcnt(0))) * uint64(nColUp)) + (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48)).FanLt = pSpace + pSpace += uintptr(uint64(unsafe.Sizeof(TRowcnt(0))) * uint64(nColUp)) + (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48)).FanDLt = pSpace + pSpace += uintptr(uint64(unsafe.Sizeof(TRowcnt(0))) * uint64(nColUp)) + } + + for i = 0; i < nCol; i++ { + (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).FaBest + uintptr(i)*48)).FiCol = i + } + } + + // Return a pointer to the allocated object to the caller. Note that + // only the pointer (the 2nd parameter) matters. The size of the object + // (given by the 3rd parameter) is never used and can be any positive + // value. + Xsqlite3_result_blob(tls, context, p, int32(unsafe.Sizeof(StatAccum{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{statAccumDestructor}))) +} + +var statInitFuncdef = FuncDef{ + FnArg: int8(4), // nArg + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11304} /* sqlite3.c:111564:22 */ + +// pNew and pOld are both candidate non-periodic samples selected for +// the same column (pNew->iCol==pOld->iCol). Ignoring this column and +// considering only any trailing columns and the sample hash value, this +// function returns true if sample pNew is to be preferred over pOld. +// In other words, if we assume that the cardinalities of the selected +// column for pNew and pOld are equal, is pNew to be preferred over pOld. +// +// This function assumes that for each argument sample, the contents of +// the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ + var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol + var i int32 + + for i = (*StatSample)(unsafe.Pointer(pNew)).FiCol + 1; i < nCol; i++ { + if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*4)) > *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*4)) { + return 1 + } + if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*4)) < *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*4)) { + return 0 + } + } + if (*StatSample)(unsafe.Pointer(pNew)).FiHash > (*StatSample)(unsafe.Pointer(pOld)).FiHash { + return 1 + } + return 0 +} + +// Return true if pNew is to be preferred over pOld. +// +// This function assumes that for each argument sample, the contents of +// the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ + var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) + var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) + + if nEqNew > nEqOld { + return 1 + } + if nEqNew == nEqOld { + if (*StatSample)(unsafe.Pointer(pNew)).FiCol < (*StatSample)(unsafe.Pointer(pOld)).FiCol { + return 1 + } + return libc.Bool32((*StatSample)(unsafe.Pointer(pNew)).FiCol == (*StatSample)(unsafe.Pointer(pOld)).FiCol && sampleIsBetterPost(tls, pAccum, pNew, pOld) != 0) + } + return 0 +} + +// Copy the contents of sample *pNew into the p->a[] array. If necessary, +// remove the least desirable sample from p->a[] to make room. +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ + var pSample uintptr + var i int32 + var pOld uintptr + var pUpgrade uintptr + var pMin uintptr + var anEq uintptr + var anLt uintptr + var anDLt uintptr + var iMin int32 + pSample = uintptr(0) + + // StatAccum.nMaxEqZero is set to the maximum number of leading 0 + // values in the anEq[] array of any sample in StatAccum.a[]. In + // other words, if nMaxEqZero is n, then it is guaranteed that there + // are no samples with StatSample.anEq[m]==0 for (m>=n). + if !(nEqZero > (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero) { + goto __1 + } + (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero = nEqZero +__1: + ; + if !(int32((*StatSample)(unsafe.Pointer(pNew)).FisPSample) == 0) { + goto __2 + } + pUpgrade = uintptr(0) + + // This sample is being added because the prefix that ends in column + // iCol occurs many times in the table. However, if we have already + // added a sample that shares this prefix, there is no need to add + // this one. Instead, upgrade the priority of the highest priority + // existing sample that shares this prefix. + i = (*StatAccum)(unsafe.Pointer(p)).FnSample - 1 +__3: + if !(i >= 0) { + goto __5 + } + pOld = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48 + if !(*(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) == TRowcnt(0)) { + goto __6 + } + if !((*StatSample)(unsafe.Pointer(pOld)).FisPSample != 0) { + goto __7 + } + return +__7: + ; + + if !(pUpgrade == uintptr(0) || sampleIsBetter(tls, p, pOld, pUpgrade) != 0) { + goto __8 + } + pUpgrade = pOld +__8: + ; +__6: + ; + goto __4 +__4: + i-- + goto __3 + goto __5 +__5: + ; + if !(pUpgrade != 0) { + goto __9 + } + (*StatSample)(unsafe.Pointer(pUpgrade)).FiCol = (*StatSample)(unsafe.Pointer(pNew)).FiCol + *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pUpgrade)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*4)) + goto find_new_min +__9: + ; +__2: + ; + + // If necessary, remove sample iMin to make room for the new sample. + if !((*StatAccum)(unsafe.Pointer(p)).FnSample >= (*StatAccum)(unsafe.Pointer(p)).FmxSample) { + goto __10 + } + pMin = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiMin)*48 + anEq = (*StatSample)(unsafe.Pointer(pMin)).FanEq + anLt = (*StatSample)(unsafe.Pointer(pMin)).FanLt + anDLt = (*StatSample)(unsafe.Pointer(pMin)).FanDLt + sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, pMin) + libc.Xmemmove(tls, pMin, pMin+1*48, uint64(unsafe.Sizeof(StatSample{}))*uint64((*StatAccum)(unsafe.Pointer(p)).FnSample-(*StatAccum)(unsafe.Pointer(p)).FiMin-1)) + pSample = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FnSample-1)*48 + (*StatSample)(unsafe.Pointer(pSample)).FnRowid = U32(0) + (*StatSample)(unsafe.Pointer(pSample)).FanEq = anEq + (*StatSample)(unsafe.Pointer(pSample)).FanDLt = anDLt + (*StatSample)(unsafe.Pointer(pSample)).FanLt = anLt + (*StatAccum)(unsafe.Pointer(p)).FnSample = (*StatAccum)(unsafe.Pointer(p)).FmxSample - 1 +__10: + ; + + // The "rows less-than" for the rowid column must be greater than that + // for the last sample in the p->a[] array. Otherwise, the samples would + // be out of order. + + // Insert the new sample + pSample = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FnSample)*48 + sampleCopy(tls, p, pSample, pNew) + (*StatAccum)(unsafe.Pointer(p)).FnSample++ + + // Zero the first nEqZero entries in the anEq[] array. + libc.Xmemset(tls, (*StatSample)(unsafe.Pointer(pSample)).FanEq, 0, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nEqZero)) + +find_new_min: + if !((*StatAccum)(unsafe.Pointer(p)).FnSample >= (*StatAccum)(unsafe.Pointer(p)).FmxSample) { + goto __11 + } + iMin = -1 + i = 0 +__12: + if !(i < (*StatAccum)(unsafe.Pointer(p)).FmxSample) { + goto __14 + } + if !((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FisPSample != 0) { + goto __15 + } + goto __13 +__15: + ; + if !(iMin < 0 || sampleIsBetter(tls, p, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(iMin)*48, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48) != 0) { + goto __16 + } + iMin = i +__16: + ; + goto __13 +__13: + i++ + goto __12 + goto __14 +__14: + ; + + (*StatAccum)(unsafe.Pointer(p)).FiMin = iMin +__11: +} + +// Field iChng of the index being scanned has changed. So at this point +// p->current contains a sample that reflects the previous row of the +// index. The value of anEq[iChng] and subsequent anEq[] elements are +// correct at this point. +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ + var i int32 + + // Check if any samples from the aBest[] array should be pushed + // into IndexSample.a[] at this point. + for i = (*StatAccum)(unsafe.Pointer(p)).FnCol - 2; i >= iChng; i-- { + var pBest uintptr = (*StatAccum)(unsafe.Pointer(p)).FaBest + uintptr(i)*48 + *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pBest)).FanEq + uintptr(i)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) + if (*StatAccum)(unsafe.Pointer(p)).FnSample < (*StatAccum)(unsafe.Pointer(p)).FmxSample || sampleIsBetter(tls, p, pBest, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr((*StatAccum)(unsafe.Pointer(p)).FiMin)*48) != 0 { + sampleInsert(tls, p, pBest, i) + } + } + + // Check that no sample contains an anEq[] entry with an index of + // p->nMaxEqZero or greater set to zero. + for i = (*StatAccum)(unsafe.Pointer(p)).FnSample - 1; i >= 0; i-- { + var j int32 + for j = (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero; j < (*StatAccum)(unsafe.Pointer(p)).FnCol; j++ { + } + } + + // Update the anEq[] fields of any samples already collected. + if iChng < (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero { + for i = (*StatAccum)(unsafe.Pointer(p)).FnSample - 1; i >= 0; i-- { + var j int32 + for j = iChng; j < (*StatAccum)(unsafe.Pointer(p)).FnCol; j++ { + if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*4)) == TRowcnt(0) { + *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(j)*4)) + } + } + } + (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero = iChng + } +} + +// Implementation of the stat_push SQL function: stat_push(P,C,R) +// Arguments: +// +// P Pointer to the StatAccum object created by stat_init() +// C Index of left-most column to differ from previous row +// R Rowid for the current row. Might be a key record for +// WITHOUT ROWID tables. +// +// The purpose of this routine is to collect statistical data and/or +// samples from the index being analyzed into the StatAccum object. +// The stat_get() SQL function will be used afterwards to +// retrieve the information gathered. +// +// This SQL function usually returns NULL, but might return an integer +// if it wants the byte-code to do special processing. +// +// The R parameter is only used for STAT4 +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ + var i int32 + + // The three function arguments + var p uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) + var iChng int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + + _ = argc + _ = context + + if (*StatAccum)(unsafe.Pointer(p)).FnRow == TRowcnt(0) { + // This is the first call to this function. Do initialization. + for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) = TRowcnt(1) + } + } else { + // Second and subsequent calls get processed here + if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { + samplePushPrevious(tls, p, iChng) + } + + // Update anDLt[], anLt[] and anEq[] to reflect the values that apply + // to the current row of the index. + for i = 0; i < iChng; i++ { + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4))++ + } + for i = iChng; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4))++ + if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(i)*4)) += *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) + } + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) = TRowcnt(1) + } + } + + (*StatAccum)(unsafe.Pointer(p)).FnRow++ + if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { + var nLt TRowcnt + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) == SQLITE_INTEGER { + sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + } else { + sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))), + Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + } + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiHash = libc.AssignPtrUint32(p+88, (*StatAccum)(unsafe.Pointer(p)).FiPrn*U32(1103515245)+U32(12345)) + + nLt = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr((*StatAccum)(unsafe.Pointer(p)).FnCol-1)*4)) + // Check if this is to be a periodic sample. If so, add it. + if nLt/(*StatAccum)(unsafe.Pointer(p)).FnPSample != (nLt+TRowcnt(1))/(*StatAccum)(unsafe.Pointer(p)).FnPSample { + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FisPSample = U8(1) + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiCol = 0 + sampleInsert(tls, p, p+32, (*StatAccum)(unsafe.Pointer(p)).FnCol-1) + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FisPSample = U8(0) + } + + // Update the aBest[] array. + for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol-1; i++ { + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiCol = i + if i >= iChng || sampleIsBetterPost(tls, p, p+32, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48) != 0 { + sampleCopy(tls, p, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48, p+32) + } + } + } else if (*StatAccum)(unsafe.Pointer(p)).FnLimit != 0 && (*StatAccum)(unsafe.Pointer(p)).FnRow > TRowcnt((*StatAccum)(unsafe.Pointer(p)).FnLimit)*TRowcnt(int32((*StatAccum)(unsafe.Pointer(p)).FnSkipAhead)+1) { + (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead++ + Xsqlite3_result_int(tls, context, libc.Bool32(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt)) > TRowcnt(0))) + } +} + +var statPushFuncdef = FuncDef{ + FnArg: int8(2 + IsStat4), + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11314} /* sqlite3.c:111854:22 */ + +// Implementation of the stat_get(P,J) SQL function. This routine is +// used to query statistical information that has been gathered into +// the StatAccum object by prior calls to stat_push(). The P parameter +// has type BLOB but it is really just a pointer to the StatAccum object. +// The content to returned is determined by the parameter J +// which is one of the STAT_GET_xxxx values defined above. +// +// The stat_get(P,J) function is not available to generic SQL. It is +// inserted as part of a manually constructed bytecode program. (See +// the callStatGet() routine below.) It is guaranteed that the P +// parameter will always be a pointer to a StatAccum object, never a +// NULL. +// +// If STAT4 is not enabled, then J is always +// STAT_GET_STAT1 and is hence omitted and this routine becomes +// a one-parameter function, stat_get(P), that always returns the +// stat1 table entry information. +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + var p uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) + // STAT4 has a parameter on this routine. + var eCall int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + + if eCall == STAT_GET_STAT1 { + // Return the value to store in the "stat" column of the sqlite_stat1 + // table for this index. + // + // The value is a string composed of a list of integers describing + // the index. The first integer in the list is the total number of + // entries in the index. There is one additional integer in the list + // for each indexed column. This additional integer is an estimate of + // the number of rows matched by a equality query on the index using + // a key with the corresponding number of fields. In other words, + // if the index is on columns (a,b) and the sqlite_stat1 value is + // "100 10 2", then SQLite estimates that: + // + // * the index contains 100 rows, + // * "WHERE a=?" matches 10 rows, and + // * "WHERE a=? AND b=?" matches 2 rows. + // + // If D is the count of distinct values and K is the total number of + // rows, then each estimate is computed as: + // + // I = (K+D-1)/D + // var sStat Sqlite3_str at bp+24, 32 + // Text of the constructed "stat" line + var i int32 // Loop counter + + Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) + Xsqlite3_str_appendf(tls, bp+24, ts+11324, + libc.VaList(bp, func() uint64 { + if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { + return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) + } + return U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + }())) + for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { + var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) + var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct + Xsqlite3_str_appendf(tls, bp+24, ts+11329, libc.VaList(bp+8, iVal)) + + } + Xsqlite3ResultStrAccum(tls, context, bp+24) + } else if eCall == STAT_GET_ROWID { + if (*StatAccum)(unsafe.Pointer(p)).FiGet < 0 { + samplePushPrevious(tls, p, 0) + (*StatAccum)(unsafe.Pointer(p)).FiGet = 0 + } + if (*StatAccum)(unsafe.Pointer(p)).FiGet < (*StatAccum)(unsafe.Pointer(p)).FnSample { + var pS uintptr = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48 + if (*StatSample)(unsafe.Pointer(pS)).FnRowid == U32(0) { + Xsqlite3_result_int64(tls, context, *(*I64)(unsafe.Pointer(pS + 24))) + } else { + Xsqlite3_result_blob(tls, context, *(*uintptr)(unsafe.Pointer(pS + 24)), int32((*StatSample)(unsafe.Pointer(pS)).FnRowid), + libc.UintptrFromInt32(-1)) + } + } + } else { + var aCnt uintptr = uintptr(0) + // var sStat Sqlite3_str at bp+56, 32 + + var i int32 + + switch eCall { + case STAT_GET_NEQ: + aCnt = (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48)).FanEq + break + fallthrough + case STAT_GET_NLT: + aCnt = (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48)).FanLt + break + fallthrough + default: + { + aCnt = (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48)).FanDLt + (*StatAccum)(unsafe.Pointer(p)).FiGet++ + break + + } + } + Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) + for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { + Xsqlite3_str_appendf(tls, bp+56, ts+11335, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + } + if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { + (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- + } + Xsqlite3ResultStrAccum(tls, context, bp+56) + } + _ = argc +} + +var statGetFuncdef = FuncDef{ + FnArg: int8(1 + IsStat4), + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11341} /* sqlite3.c:111988:22 */ + +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) + + Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, + uintptr(unsafe.Pointer(&statGetFuncdef)), 0) +} + +// Generate code to do an analysis of all indices associated with +// a single table. +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var pIdx uintptr // An index to being analyzed + var iIdxCur int32 // Cursor open on index being analyzed + var iTabCur int32 // Table cursor + var v uintptr // The virtual machine being built up + var i int32 // Loop counter + var jZeroRows int32 = -1 // Jump from here if number of rows is zero + var iDb int32 // Index of database containing pTab + var needTableCnt U8 = U8(1) // True to count the table + var regNewRowid int32 = libc.PostIncInt32(&iMem, 1) // Rowid for the inserted record + var regStat int32 = libc.PostIncInt32(&iMem, 1) // Register to hold StatAccum object + var regChng int32 = libc.PostIncInt32(&iMem, 1) // Index of changed index field + var regRowid int32 = libc.PostIncInt32(&iMem, 1) // Rowid argument passed to stat_push() + var regTemp int32 = libc.PostIncInt32(&iMem, 1) // Temporary use register + var regTemp2 int32 = libc.PostIncInt32(&iMem, 1) // Second temporary use register + var regTabname int32 = libc.PostIncInt32(&iMem, 1) // Register containing table name + var regIdxname int32 = libc.PostIncInt32(&iMem, 1) // Register containing index name + var regStat1 int32 = libc.PostIncInt32(&iMem, 1) // Value for the stat column of sqlite_stat1 + var regPrev int32 = iMem // MUST BE LAST (see below) + var pStat1 uintptr = uintptr(0) + + (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { + if (*Parse)(unsafe.Pointer(pParse)).FnMem > iMem { + return (*Parse)(unsafe.Pointer(pParse)).FnMem + } + return iMem + }() + v = Xsqlite3GetVdbe(tls, pParse) + if v == uintptr(0) || pTab == uintptr(0) { + return + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + // Do not gather statistics on views or virtual tables + return + } + if Xsqlite3_strlike(tls, ts+11350, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + // Do not gather statistics on system tables + return + } + + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + if Xsqlite3AuthCheck(tls, pParse, SQLITE_ANALYZE, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) != 0 { + return + } + + if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { + pStat1 = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))+uint64(13)) + if pStat1 == uintptr(0) { + return + } + (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11224, uint64(13)) + (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) + (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) + Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) + } + + // Establish a read-lock on the table at the shared-cache level. + // Open a read-only cursor on the table. Also allocate a cursor number + // to use for scanning indexes (iIdxCur). No index cursor is opened at + // this time though. + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + iTabCur = libc.PostIncInt32(&iTab, 1) + iIdxCur = libc.PostIncInt32(&iTab, 1) + (*Parse)(unsafe.Pointer(pParse)).FnTab = func() int32 { + if (*Parse)(unsafe.Pointer(pParse)).FnTab > iTab { + return (*Parse)(unsafe.Pointer(pParse)).FnTab + } + return iTab + }() + Xsqlite3OpenTable(tls, pParse, iTabCur, iDb, pTab, OP_OpenRead) + Xsqlite3VdbeLoadString(tls, v, regTabname, (*Table)(unsafe.Pointer(pTab)).FzName) + + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + var nCol int32 // Number of columns in pIdx. "N" + var addrRewind int32 // Address of "OP_Rewind iIdxCur" + var addrNextRow int32 // Address of "next_row:" + var zIdxName uintptr // Name of the index + var nColTest int32 // Number of columns to test for changes + + if pOnlyIdx != 0 && pOnlyIdx != pIdx { + continue + } + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { + needTableCnt = U8(0) + } + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + zIdxName = (*Table)(unsafe.Pointer(pTab)).FzName + nColTest = nCol - 1 + } else { + nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + zIdxName = (*Index)(unsafe.Pointer(pIdx)).FzName + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { + nColTest = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) - 1 + } else { + nColTest = nCol - 1 + } + } + + // Populate the register containing the index name. + Xsqlite3VdbeLoadString(tls, v, regIdxname, zIdxName) + + // Pseudo-code for loop that calls stat_push(): + // + // Rewind csr + // if eof(csr) goto end_of_scan; + // regChng = 0 + // goto chng_addr_0; + // + // next_row: + // regChng = 0 + // if( idx(0) != regPrev(0) ) goto chng_addr_0 + // regChng = 1 + // if( idx(1) != regPrev(1) ) goto chng_addr_1 + // ... + // regChng = N + // goto chng_addr_N + // + // chng_addr_0: + // regPrev(0) = idx(0) + // chng_addr_1: + // regPrev(1) = idx(1) + // ... + // + // endDistinctTest: + // regRowid = idx(rowid) + // stat_push(P, regChng, regRowid) + // Next csr + // if !eof(csr) goto next_row; + // + // end_of_scan: + + // Make sure there are enough memory cells allocated to accommodate + // the regPrev array and a trailing rowid (the rowid slot is required + // when building a record to insert into the sample column of + // the sqlite_stat4 table. + (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { + if (*Parse)(unsafe.Pointer(pParse)).FnMem > regPrev+nColTest { + return (*Parse)(unsafe.Pointer(pParse)).FnMem + } + return regPrev + nColTest + }() + + // Open a read-only cursor on the index being analyzed. + + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iIdxCur, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) + + // Invoke the stat_init() function. The arguments are: + // + // (1) the number of columns in the index including the rowid + // (or for a WITHOUT ROWID table, the number of PK columns), + // (2) the number of columns in the key without the rowid/pk + // (3) estimated number of rows in the index, + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, nCol, regStat+1) + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol), regRowid) + if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { + Xsqlite3VdbeAddOp2(tls, v, OP_Count, iIdxCur, regTemp) + addrRewind = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iIdxCur) + + } else { + addrRewind = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iIdxCur) + + Xsqlite3VdbeAddOp3(tls, v, OP_Count, iIdxCur, regTemp, 1) + } + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit, regTemp2) + Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat+1, regStat, 4, + uintptr(unsafe.Pointer(&statInitFuncdef)), 0) + + // Implementation of the following: + // + // Rewind csr + // if eof(csr) goto end_of_scan; + // regChng = 0 + // goto next_push_0; + // + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regChng) + addrNextRow = Xsqlite3VdbeCurrentAddr(tls, v) + + if nColTest > 0 { + var endDistinctTest int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + var aGotoChng uintptr // Array of jump instruction addresses + aGotoChng = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(int32(0)))*uint64(nColTest))) + if aGotoChng == uintptr(0) { + continue + } + + // next_row: + // regChng = 0 + // if( idx(0) != regPrev(0) ) goto chng_addr_0 + // regChng = 1 + // if( idx(1) != regPrev(1) ) goto chng_addr_1 + // ... + // regChng = N + // goto endDistinctTest + Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + addrNextRow = Xsqlite3VdbeCurrentAddr(tls, v) + if nColTest == 1 && int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) == 1 && int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None { + // For a single-column UNIQUE index, once we have found a non-NULL + // row, we know that all the rest will be distinct, so skip + // subsequent distinctness tests. + Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, regPrev, endDistinctTest) + + } + for i = 0; i < nColTest; i++ { + var pColl uintptr = Xsqlite3LocateCollSeq(tls, pParse, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, i, regChng) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, i, regTemp) + + *(*int32)(unsafe.Pointer(aGotoChng + uintptr(i)*4)) = Xsqlite3VdbeAddOp4(tls, v, OP_Ne, regTemp, 0, regPrev+i, pColl, -2) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ)) + + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, nColTest, regChng) + Xsqlite3VdbeGoto(tls, v, endDistinctTest) + + // chng_addr_0: + // regPrev(0) = idx(0) + // chng_addr_1: + // regPrev(1) = idx(1) + // ... + Xsqlite3VdbeJumpHere(tls, v, addrNextRow-1) + for i = 0; i < nColTest; i++ { + Xsqlite3VdbeJumpHere(tls, v, *(*int32)(unsafe.Pointer(aGotoChng + uintptr(i)*4))) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, i, regPrev+i) + + } + Xsqlite3VdbeResolveLabel(tls, v, endDistinctTest) + Xsqlite3DbFree(tls, db, aGotoChng) + } + + // chng_addr_N: + // regRowid = idx(rowid) // STAT4 only + // stat_push(P, regChng, regRowid) // 3rd parameter STAT4 only + // Next csr + // if !eof(csr) goto next_row; + if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { + + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + Xsqlite3VdbeAddOp2(tls, v, OP_IdxRowid, iIdxCur, regRowid) + } else { + var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) + var j int32 + var k int32 + var regKey int32 + regKey = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) + for j = 0; j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); j++ { + k = int32(Xsqlite3TableColumnToIndex(tls, pIdx, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) + + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, k, regKey+j) + + } + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regKey, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol), regRowid) + Xsqlite3ReleaseTempRange(tls, pParse, regKey, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) + } + } + + { + Xsqlite3VdbeAddFunctionCall(tls, pParse, 1, regStat, regTemp, 2+IsStat4, + uintptr(unsafe.Pointer(&statPushFuncdef)), 0) + if (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit != 0 { + var j1 int32 + var j2 int32 + var j3 int32 + j1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, regTemp) + j2 = Xsqlite3VdbeAddOp1(tls, v, OP_If, regTemp) + j3 = Xsqlite3VdbeAddOp4Int(tls, v, OP_SeekGT, iIdxCur, 0, regPrev, 1) + + Xsqlite3VdbeJumpHere(tls, v, j1) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iIdxCur, addrNextRow) + Xsqlite3VdbeJumpHere(tls, v, j2) + Xsqlite3VdbeJumpHere(tls, v, j3) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iIdxCur, addrNextRow) + } + + } + + // Add the entry to the stat1 table. + callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) + + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11360, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) + Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) + + // Add the entries to the stat4 table. + if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) && (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit == 0 { + var regEq int32 = regStat1 + var regLt int32 = regStat1 + 1 + var regDLt int32 = regStat1 + 2 + var regSample int32 = regStat1 + 3 + var regCol int32 = regStat1 + 4 + var regSampleRowid int32 = regCol + nCol + var addrNext int32 + var addrIsNull int32 + var seekOp U8 + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + seekOp = uint8(OP_NotExists) + } else { + seekOp = uint8(OP_NotFound) + } + + (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { + if (*Parse)(unsafe.Pointer(pParse)).FnMem > regCol+nCol { + return (*Parse)(unsafe.Pointer(pParse)).FnMem + } + return regCol + nCol + }() + + addrNext = Xsqlite3VdbeCurrentAddr(tls, v) + callStatGet(tls, pParse, regStat, STAT_GET_ROWID, regSampleRowid) + addrIsNull = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, regSampleRowid) + + callStatGet(tls, pParse, regStat, STAT_GET_NEQ, regEq) + callStatGet(tls, pParse, regStat, STAT_GET_NLT, regLt) + callStatGet(tls, pParse, regStat, STAT_GET_NDLT, regDLt) + Xsqlite3VdbeAddOp4Int(tls, v, int32(seekOp), iTabCur, addrNext, regSampleRowid, 0) + + for i = 0; i < nCol; i++ { + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pIdx, iTabCur, i, regCol+i) + } + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regCol, nCol, regSample) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regTabname, 6, regTemp) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur+1, regNewRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur+1, regTemp, regNewRowid) + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 1, addrNext) // P1==1 for end-of-loop + Xsqlite3VdbeJumpHere(tls, v, addrIsNull) + } + + // End of analysis + Xsqlite3VdbeJumpHere(tls, v, addrRewind) + } + + // Create a single sqlite_stat1 entry containing NULL as the index + // name and the row count as the content. + if pOnlyIdx == uintptr(0) && needTableCnt != 0 { + + Xsqlite3VdbeAddOp2(tls, v, OP_Count, iTabCur, regStat1) + jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) + + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11360, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) + Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) + Xsqlite3VdbeJumpHere(tls, v, jZeroRows) + } +} + +// Generate code that will cause the most recent index analysis to +// be loaded into internal hash tables where is can be used. +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + if v != 0 { + Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) + } +} + +// Generate code that will do an analysis of an entire database +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb + var k uintptr + var iStatCur int32 + var iMem int32 + var iTab int32 + + Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) + iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab + *(*int32)(unsafe.Pointer(pParse + 52)) += 3 + openStatTable(tls, pParse, iDb, iStatCur, uintptr(0), uintptr(0)) + iMem = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + iTab = (*Parse)(unsafe.Pointer(pParse)).FnTab + + for k = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(k)).Fdata + analyzeOneTable(tls, pParse, pTab, uintptr(0), iStatCur, iMem, iTab) + } + loadAnalysis(tls, pParse, iDb) +} + +// Generate code that will do an analysis of a single table in +// a database. If pOnlyIdx is not NULL then it is a single index +// in pTab that should be analyzed. +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ + var iDb int32 + var iStatCur int32 + + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) + Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) + iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab + *(*int32)(unsafe.Pointer(pParse + 52)) += 3 + if pOnlyIdx != 0 { + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11364) + } else { + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11368) + } + analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) + loadAnalysis(tls, pParse, iDb) +} + +// Generate code for the ANALYZE command. The parser calls this routine +// when it recognizes an ANALYZE command. +// +// ANALYZE -- 1 +// ANALYZE -- 2 +// ANALYZE ?.? -- 3 +// +// Form 1 causes all indices in all attached databases to be analyzed. +// Form 2 analyzes all indices the single database named. +// Form 3 analyzes all indices associated with the named table. +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var iDb int32 + var i int32 + var z uintptr + var zDb uintptr + var pTab uintptr + var pIdx uintptr + // var pTableName uintptr at bp, 8 + + var v uintptr + + // Read the database schema. If an error occurs, leave an error message + // and code in pParse and return NULL. + + if SQLITE_OK != Xsqlite3ReadSchema(tls, pParse) { + return + } + + if pName1 == uintptr(0) { + // Form 1: Analyze everything + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + if i == 1 { + continue + } // Do not analyze the TEMP database + analyzeDatabase(tls, pParse, i) + } + } else if (*Token)(unsafe.Pointer(pName2)).Fn == uint32(0) && libc.AssignInt32(&iDb, Xsqlite3FindDb(tls, db, pName1)) >= 0 { + // Analyze the schema named as the argument + analyzeDatabase(tls, pParse, iDb) + } else { + // Form 3: Analyze the table or index named as an argument + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) + if iDb >= 0 { + if (*Token)(unsafe.Pointer(pName2)).Fn != 0 { + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + } else { + zDb = uintptr(0) + } + z = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pTableName */))) + if z != 0 { + if libc.AssignUintptr(&pIdx, Xsqlite3FindIndex(tls, db, z, zDb)) != uintptr(0) { + analyzeTable(tls, pParse, (*Index)(unsafe.Pointer(pIdx)).FpTable, pIdx) + } else if libc.AssignUintptr(&pTab, Xsqlite3LocateTable(tls, pParse, uint32(0), z, zDb)) != uintptr(0) { + analyzeTable(tls, pParse, pTab, uintptr(0)) + } + Xsqlite3DbFree(tls, db, z) + } + } + } + if int32((*Sqlite3)(unsafe.Pointer(db)).FnSqlExec) == 0 && libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { + Xsqlite3VdbeAddOp0(tls, v, OP_Expire) + } +} + +// Used to pass information from the analyzer reader through to the +// callback routine. +type analysisInfo = struct { + Fdb uintptr + FzDatabase uintptr +} /* sqlite3.c:112523:9 */ + +// Used to pass information from the analyzer reader through to the +// callback routine. +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ + +// The first argument points to a nul-terminated string containing a +// list of space separated integers. Read the first nOut of these into +// the array aOut[]. +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ + var z uintptr = zIntArray + var c int32 + var i int32 + var v TRowcnt + + if z == uintptr(0) { + z = ts + 1525 /* "" */ + } + for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { + v = TRowcnt(0) + for libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z)))) >= '0' && c <= '9' { + v = v*TRowcnt(10) + TRowcnt(c) - TRowcnt('0') + z++ + } + if aOut != 0 { + *(*TRowcnt)(unsafe.Pointer(aOut + uintptr(i)*4)) = v + } + if aLog != 0 { + *(*LogEst)(unsafe.Pointer(aLog + uintptr(i)*2)) = Xsqlite3LogEst(tls, uint64(v)) + } + if int32(*(*uint8)(unsafe.Pointer(z))) == ' ' { + z++ + } + } + if pIndex != 0 { + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) + for *(*uint8)(unsafe.Pointer(z)) != 0 { + if Xsqlite3_strglob(tls, ts+11372, z) == 0 { + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) + } else if Xsqlite3_strglob(tls, ts+11383, z) == 0 { + var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) + if sz < 2 { + sz = 2 + } + (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) + } else if Xsqlite3_strglob(tls, ts+11393, z) == 0 { + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) + } + for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { + z++ + } + for int32(*(*uint8)(unsafe.Pointer(z))) == ' ' { + z++ + } + } + } +} + +// This callback is invoked once for each index when reading the +// sqlite_stat1 table. +// +// argv[0] = name of the table +// argv[1] = name of the index (might be NULL) +// argv[2] = results of analysis - on integer for each column +// +// Entries for which argv[1]==NULL simply record the number of rows in +// the table. +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ + bp := tls.Alloc(152) + defer tls.Free(152) + + var pInfo uintptr = pData + var pIndex uintptr + var pTable uintptr + var z uintptr + + _ = NotUsed + _ = argc + + if argv == uintptr(0) || *(*uintptr)(unsafe.Pointer(argv)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(argv + 2*8)) == uintptr(0) { + return 0 + } + pTable = Xsqlite3FindTable(tls, (*AnalysisInfo)(unsafe.Pointer(pInfo)).Fdb, *(*uintptr)(unsafe.Pointer(argv)), (*AnalysisInfo)(unsafe.Pointer(pInfo)).FzDatabase) + if pTable == uintptr(0) { + return 0 + } + if *(*uintptr)(unsafe.Pointer(argv + 1*8)) == uintptr(0) { + pIndex = uintptr(0) + } else if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8))) == 0 { + pIndex = Xsqlite3PrimaryKeyIndex(tls, pTable) + } else { + pIndex = Xsqlite3FindIndex(tls, (*AnalysisInfo)(unsafe.Pointer(pInfo)).Fdb, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*AnalysisInfo)(unsafe.Pointer(pInfo)).FzDatabase) + } + z = *(*uintptr)(unsafe.Pointer(argv + 2*8)) + + if pIndex != 0 { + var aiRowEst uintptr = uintptr(0) + var nCol int32 = int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol) + 1 + // Index.aiRowEst may already be set here if there are duplicate + // sqlite_stat1 entries for this index. In that case just clobber + // the old data with the new instead of allocating a new array. + if (*Index)(unsafe.Pointer(pIndex)).FaiRowEst == uintptr(0) { + (*Index)(unsafe.Pointer(pIndex)).FaiRowEst = Xsqlite3MallocZero(tls, uint64(uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nCol))) + if (*Index)(unsafe.Pointer(pIndex)).FaiRowEst == uintptr(0) { + Xsqlite3OomFault(tls, (*AnalysisInfo)(unsafe.Pointer(pInfo)).Fdb) + } + } + aiRowEst = (*Index)(unsafe.Pointer(pIndex)).FaiRowEst + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) + decodeIntArray(tls, z, nCol, aiRowEst, (*Index)(unsafe.Pointer(pIndex)).FaiRowLogEst, pIndex) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 7, 0x80) + if (*Index)(unsafe.Pointer(pIndex)).FpPartIdxWhere == uintptr(0) { + (*Table)(unsafe.Pointer(pTable)).FnRowLogEst = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiRowLogEst)) + *(*U32)(unsafe.Pointer(pTable + 48)) |= U32(TF_HasStat1) + } + } else { + // var fakeIdx Index at bp, 152 + + (*Index)(unsafe.Pointer(bp /* &fakeIdx */)).FszIdxRow = (*Table)(unsafe.Pointer(pTable)).FszTabRow + decodeIntArray(tls, z, 1, uintptr(0), pTable+58, bp) + (*Table)(unsafe.Pointer(pTable)).FszTabRow = (*Index)(unsafe.Pointer(bp /* &fakeIdx */)).FszIdxRow + *(*U32)(unsafe.Pointer(pTable + 48)) |= U32(TF_HasStat1) + } + + return 0 +} + +// If the Index.aSample variable is not NULL, delete the aSample[] array +// and its contents. +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ + if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { + var j int32 + for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { + var p uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(j)*40 + Xsqlite3DbFree(tls, db, (*IndexSample)(unsafe.Pointer(p)).Fp) + } + Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(pIdx)).FaSample) + } + if db != 0 && (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + (*Index)(unsafe.Pointer(pIdx)).FnSample = 0 + (*Index)(unsafe.Pointer(pIdx)).FaSample = uintptr(0) + } +} + +// Populate the pIdx->aAvgEq[] array based on the samples currently +// stored in pIdx->aSample[]. +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ + if pIdx != 0 { + var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample + var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 + var iCol int32 + var nCol int32 = 1 + if (*Index)(unsafe.Pointer(pIdx)).FnSampleCol > 1 { + // If this is stat4 data, then calculate aAvgEq[] values for all + // sample columns except the last. The last is always set to 1, as + // once the trailing PK fields are considered all index keys are + // unique. + nCol = (*Index)(unsafe.Pointer(pIdx)).FnSampleCol - 1 + *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(nCol)*4)) = TRowcnt(1) + } + for iCol = 0; iCol < nCol; iCol++ { + var nSample int32 = (*Index)(unsafe.Pointer(pIdx)).FnSample + var i int32 // Used to iterate through samples + var sumEq TRowcnt = TRowcnt(0) // Sum of the nEq values + var avgEq TRowcnt = TRowcnt(0) + var nRow TRowcnt // Number of rows in index + var nSum100 I64 = int64(0) // Number of terms contributing to sumEq + var nDist100 I64 // Number of distinct values in index + + if !(int32((*Index)(unsafe.Pointer(pIdx)).FaiRowEst) != 0) || iCol >= int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) || *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*4)) == TRowcnt(0) { + nRow = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanLt + uintptr(iCol)*4)) + nDist100 = int64(100) * I64(*(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanDLt + uintptr(iCol)*4))) + nSample-- + } else { + nRow = *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst)) + nDist100 = int64(100) * I64(*(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst))) / I64(*(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*4))) + } + (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 = nRow + + // Set nSum to the number of distinct (iCol+1) field prefixes that + // occur in the stat4 table for this index. Set sumEq to the sum of + // the nEq values for column iCol for the same set (adding the value + // only once where there exist duplicate prefixes). + for i = 0; i < nSample; i++ { + if i == (*Index)(unsafe.Pointer(pIdx)).FnSample-1 || + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanDLt + uintptr(iCol)*4)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i+1)*40)).FanDLt + uintptr(iCol)*4)) { + sumEq = sumEq + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanEq + uintptr(iCol)*4)) + nSum100 = nSum100 + int64(100) + } + } + + if nDist100 > nSum100 && sumEq < nRow { + avgEq = TRowcnt(int64(100) * I64(nRow-sumEq) / (nDist100 - nSum100)) + } + if avgEq == TRowcnt(0) { + avgEq = TRowcnt(1) + } + *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(iCol)*4)) = avgEq + } + } +} + +// Look up an index by name. Or, if the name of a WITHOUT ROWID table +// is supplied instead, find the PRIMARY KEY index for that table. +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ + var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) + if pIdx == uintptr(0) { + var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) + if pTab != 0 && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + pIdx = Xsqlite3PrimaryKeyIndex(tls, pTab) + } + } + return pIdx +} + +// Load the content from either the sqlite_stat4 +// into the relevant Index.aSample[] arrays. +// +// Arguments zSql1 and zSql2 must point to SQL statements that return +// data equivalent to the following: +// +// zSql1: SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx +// zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 +// +// where %Q is replaced with the database name before the SQL is executed. +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 // Result codes from subroutines + *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0) // An SQL statement being run + var zSql uintptr // Text of the SQL statement + var pPrevIdx uintptr = uintptr(0) // Previous index in the loop + var pSample uintptr // A slot in pIdx->aSample[] + + zSql = Xsqlite3MPrintf(tls, db, zSql1, libc.VaList(bp, zDb)) + if !(zSql != 0) { + return SQLITE_NOMEM + } + rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16, uintptr(0)) + Xsqlite3DbFree(tls, db, zSql) + if rc != 0 { + return rc + } + + for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) == SQLITE_ROW { + var nIdxCol int32 = 1 // Number of columns in stat4 records + + var zIndex uintptr // Index name + var pIdx uintptr // Pointer to the index object + var nSample int32 // Number of samples + var nByte int32 // Bytes of space required + var i int32 // Bytes of space required + var pSpace uintptr + + zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) + if zIndex == uintptr(0) { + continue + } + nSample = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + pIdx = findIndexOrPrimaryKey(tls, db, zIndex, zDb) + + if pIdx == uintptr(0) { + continue + } + + if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + nIdxCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + } else { + nIdxCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + } + (*Index)(unsafe.Pointer(pIdx)).FnSampleCol = nIdxCol + nByte = int32(uint64(unsafe.Sizeof(IndexSample{})) * uint64(nSample)) + nByte = int32(uint64(nByte) + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nIdxCol)*uint64(3)*uint64(nSample)) + nByte = int32(uint64(nByte) + uint64(nIdxCol)*uint64(unsafe.Sizeof(TRowcnt(0)))) // Space for Index.aAvgEq[] + + (*Index)(unsafe.Pointer(pIdx)).FaSample = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) + if (*Index)(unsafe.Pointer(pIdx)).FaSample == uintptr(0) { + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + return SQLITE_NOMEM + } + pSpace = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(nSample)*40 + (*Index)(unsafe.Pointer(pIdx)).FaAvgEq = pSpace + pSpace += 4 * uintptr(nIdxCol) + *(*U32)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable + 48)) |= U32(TF_HasStat4) + for i = 0; i < nSample; i++ { + (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanEq = pSpace + pSpace += 4 * uintptr(nIdxCol) + (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanLt = pSpace + pSpace += 4 * uintptr(nIdxCol) + (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanDLt = pSpace + pSpace += 4 * uintptr(nIdxCol) + } + + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + if rc != 0 { + return rc + } + + zSql = Xsqlite3MPrintf(tls, db, zSql2, libc.VaList(bp+8, zDb)) + if !(zSql != 0) { + return SQLITE_NOMEM + } + rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16, uintptr(0)) + Xsqlite3DbFree(tls, db, zSql) + if rc != 0 { + return rc + } + + for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) == SQLITE_ROW { + var zIndex uintptr // Index name + var pIdx uintptr // Pointer to the index object + var nCol int32 = 1 // Number of columns in index + + zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) + if zIndex == uintptr(0) { + continue + } + pIdx = findIndexOrPrimaryKey(tls, db, zIndex, zDb) + if pIdx == uintptr(0) { + continue + } + // This next condition is true if data has already been loaded from + // the sqlite_stat4 table. + nCol = (*Index)(unsafe.Pointer(pIdx)).FnSampleCol + if pIdx != pPrevIdx { + initAvgEq(tls, pPrevIdx) + pPrevIdx = pIdx + } + pSample = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample)*40 + decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanEq, uintptr(0), uintptr(0)) + decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 2), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanLt, uintptr(0), uintptr(0)) + decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 3), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanDLt, uintptr(0), uintptr(0)) + + // Take a copy of the sample. Add two 0x00 bytes the end of the buffer. + // This is in case the sample record is corrupted. In that case, the + // sqlite3VdbeRecordCompare() may read up to two varints past the + // end of the allocated buffer before it realizes it is dealing with + // a corrupt record. Adding the two 0x00 bytes prevents this from causing + // a buffer overread. + (*IndexSample)(unsafe.Pointer(pSample)).Fn = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 4) + (*IndexSample)(unsafe.Pointer(pSample)).Fp = Xsqlite3DbMallocZero(tls, db, uint64((*IndexSample)(unsafe.Pointer(pSample)).Fn+2)) + if (*IndexSample)(unsafe.Pointer(pSample)).Fp == uintptr(0) { + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + return SQLITE_NOMEM + } + if (*IndexSample)(unsafe.Pointer(pSample)).Fn != 0 { + libc.Xmemcpy(tls, (*IndexSample)(unsafe.Pointer(pSample)).Fp, Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 4), uint64((*IndexSample)(unsafe.Pointer(pSample)).Fn)) + } + (*Index)(unsafe.Pointer(pIdx)).FnSample++ + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + if rc == SQLITE_OK { + initAvgEq(tls, pPrevIdx) + } + return rc +} + +// Load content from the sqlite_stat4 table into +// the Index.aSample[] arrays of all indices. +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ + var rc int32 = SQLITE_OK // Result codes from subroutines + var pStat4 uintptr + + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11250, zDb)) != uintptr(0) && + int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { + rc = loadStatTbl(tls, db, + ts+11405, + ts+11459, + zDb) + } + return rc +} + +// Load the content of the sqlite_stat1 and sqlite_stat4 tables. The +// contents of sqlite_stat1 are used to populate the Index.aiRowEst[] +// arrays. The contents of sqlite_stat4 are used to populate the +// Index.aSample[] arrays. +// +// If the sqlite_stat1 table is not present in the database, SQLITE_ERROR +// is returned. In this case, even if SQLITE_ENABLE_STAT4 was defined +// during compilation and the sqlite_stat4 table is present, no data is +// read from it. +// +// If SQLITE_ENABLE_STAT4 was defined during compilation and the +// sqlite_stat4 table is not present in the database, SQLITE_ERROR is +// returned. However, in this case, data is read from the sqlite_stat1 +// table (if it is present) before returning. +// +// If an OOM error occurs, this function always sets db->mallocFailed. +// This means if the caller does not care about other errors, the return +// code may be ignored. +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + // var sInfo AnalysisInfo at bp+8, 16 + + var i uintptr + var zSql uintptr + var rc int32 = SQLITE_OK + var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + var pStat1 uintptr + + // Clear any prior statistics + + for i = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata + *(*U32)(unsafe.Pointer(pTab + 48)) &= libc.Uint32FromInt32(libc.CplInt32(TF_HasStat1)) + } + for i = (*Hash)(unsafe.Pointer(pSchema + 32)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata + libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(0), 7, 0x80) + Xsqlite3DeleteIndexSamples(tls, db, pIdx) + (*Index)(unsafe.Pointer(pIdx)).FaSample = uintptr(0) + } + + // Load new statistics out of the sqlite_stat1 table + (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db + (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11224, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { + zSql = Xsqlite3MPrintf(tls, db, + ts+11511, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + }{analysisLoader})), bp+8 /* &sInfo */, uintptr(0)) + Xsqlite3DbFree(tls, db, zSql) + } + } + + // Set appropriate defaults on all indexes not in the sqlite_stat1 table + + for i = (*Hash)(unsafe.Pointer(pSchema + 32)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata + if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x80>>7) != 0) { + Xsqlite3DefaultRowEst(tls, pIdx) + } + } + + // Load the statistics from the sqlite_stat4 table. + if rc == SQLITE_OK { + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) + rc = loadStat4(tls, db, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { + if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { + return uint16(0) + } + return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue + }() + } + for i = (*Hash)(unsafe.Pointer(pSchema + 32)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata + Xsqlite3_free(tls, (*Index)(unsafe.Pointer(pIdx)).FaiRowEst) + (*Index)(unsafe.Pointer(pIdx)).FaiRowEst = uintptr(0) + } + + if rc == SQLITE_NOMEM { + Xsqlite3OomFault(tls, db) + } + return rc +} + +//************* End of analyze.c ******************************************** +//************* Begin file attach.c ***************************************** +// 2003 April 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code used to implement the ATTACH and DETACH commands. +// #include "sqliteInt.h" + +// Resolve an expression that was part of an ATTACH or DETACH statement. This +// is slightly different from resolving a normal SQL expression, because simple +// identifiers are treated as strings, not possible column names or aliases. +// +// i.e. if the parser sees: +// +// ATTACH DATABASE abc AS def +// +// it treats the two expressions as literal strings 'abc' and 'def' instead of +// looking for columns of the same name. +// +// This only applies to the root node of pExpr, so the statement: +// +// ATTACH DATABASE abc||def AS 'db2' +// +// will fail because neither abc or def can be resolved. +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ + var rc int32 = SQLITE_OK + if pExpr != 0 { + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { + rc = Xsqlite3ResolveExprNames(tls, pName, pExpr) + } else { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) + } + } + return rc +} + +// Return true if zName points to a name that may be used to refer to +// database iDb attached to handle db. +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ + return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || + iDb == 0 && Xsqlite3StrICmp(tls, ts+6323, zName) == 0) +} + +// An SQL user-function registered to do the work of an ATTACH statement. The +// three arguments to the function come directly from an attach statement: +// +// ATTACH DATABASE x AS y KEY z +// +// SELECT sqlite_attach(x, y, z) +// +// If the optional "KEY z" syntax is omitted, an SQL NULL is passed as the +// third argument. +// +// If the db->init.reopenMemdb flags is set, then instead of attaching a +// new database, close the database on db->init.iDb and reopen it as an +// empty MemDB. +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + var rc int32 + var db uintptr + var zName uintptr + var zFile uintptr + // var zPath uintptr at bp+40, 8 + + // var zErr uintptr at bp+48, 8 + + // var flags uint32 at bp+24, 4 + + var aNew uintptr // New array of Db pointers + var pNew uintptr // Db object for the newly attached database + // var zErrDyn uintptr at bp+56, 8 + + // var pVfs uintptr at bp+32, 8 + + var pPager uintptr + var iDb int32 + rc = 0 + db = Xsqlite3_context_db_handle(tls, context) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = uintptr(0) + + _ = NotUsed + zFile = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + zName = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if !(zFile == uintptr(0)) { + goto __1 + } + zFile = ts + 1525 /* "" */ +__1: + ; + if !(zName == uintptr(0)) { + goto __2 + } + zName = ts + 1525 /* "" */ +__2: + ; + + if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { + goto __3 + } + // This is not a real ATTACH. Instead, this routine is being called + // from sqlite3_deserialize() to close database db->init.iDb and + // reopen it as a MemDB + *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+3777) + if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { + goto __5 + } + return +__5: + ; + pNew = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*32 + if !((*Db)(unsafe.Pointer(pNew)).FpBt != 0) { + goto __6 + } + Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) +__6: + ; + (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) + (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11552, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + goto __4 +__3: + // This is a real ATTACH + // + // Check for the following errors: + // + // * Too many attached databases, + // * Transaction currently open + // * Specified database name already being used. + if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { + goto __7 + } + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11555, + libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) + goto attach_error +__7: + ; + i = 0 +__8: + if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __10 + } + + if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { + goto __11 + } + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11592, libc.VaList(bp+8, zName)) + goto attach_error +__11: + ; + goto __9 +__9: + i++ + goto __8 + goto __10 +__10: + ; + + // Allocate the new entry in the db->aDb[] array and initialize the schema + // hash tables. + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + goto __12 + } + aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) + if !(aNew == uintptr(0)) { + goto __14 + } + return +__14: + ; + libc.Xmemcpy(tls, aNew, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(unsafe.Sizeof(Db{}))*uint64(2)) + goto __13 +__12: + aNew = Xsqlite3DbRealloc(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(uint64(unsafe.Sizeof(Db{}))*uint64((*Sqlite3)(unsafe.Pointer(db)).FnDb+1))) + if !(aNew == uintptr(0)) { + goto __15 + } + return +__15: + ; +__13: + ; + (*Sqlite3)(unsafe.Pointer(db)).FaDb = aNew + pNew = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Sqlite3)(unsafe.Pointer(db)).FnDb)*32 + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Db{}))) + + // Open the database file. If the btree is successfully opened, use + // it to obtain the database schema. At this point the schema may + // or may not be initialized. + *(*uint32)(unsafe.Pointer(bp + 24 /* flags */)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags + rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+24, bp+32, bp+40, bp+48) + if !(rc != SQLITE_OK) { + goto __16 + } + if !(rc == SQLITE_NOMEM) { + goto __17 + } + Xsqlite3OomFault(tls, db) +__17: + ; + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)), -1) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */))) + return +__16: + ; + + *(*uint32)(unsafe.Pointer(bp + 24 /* flags */)) |= uint32(SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */)), db, pNew+8, 0, int32(*(*uint32)(unsafe.Pointer(bp + 24 /* flags */)))) + (*Sqlite3)(unsafe.Pointer(db)).FnDb++ + (*Db)(unsafe.Pointer(pNew)).FzDbSName = Xsqlite3DbStrDup(tls, db, zName) +__4: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(0) + if !(rc == SQLITE_CONSTRAINT) { + goto __18 + } + rc = SQLITE_ERROR + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11622, 0) + goto __19 +__18: + if !(rc == SQLITE_OK) { + goto __20 + } + (*Db)(unsafe.Pointer(pNew)).FpSchema = Xsqlite3SchemaGet(tls, db, (*Db)(unsafe.Pointer(pNew)).FpBt) + if !!(int32((*Db)(unsafe.Pointer(pNew)).FpSchema) != 0) { + goto __21 + } + rc = SQLITE_NOMEM + goto __22 +__21: + if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Ffile_format != 0 && int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Fenc) != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { + goto __23 + } + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, + ts+11651, 0) + rc = SQLITE_ERROR +__23: + ; +__22: + ; + Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) + pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) + Xsqlite3PagerLockingMode(tls, pPager, int32((*Sqlite3)(unsafe.Pointer(db)).FdfltLockMode)) + Xsqlite3BtreeSecureDelete(tls, (*Db)(unsafe.Pointer(pNew)).FpBt, + Xsqlite3BtreeSecureDelete(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt, -1)) + Xsqlite3BtreeSetPagerFlags(tls, (*Db)(unsafe.Pointer(pNew)).FpBt, + uint32(uint64(PAGER_SYNCHRONOUS_FULL)|(*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK))) + Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) +__20: + ; +__19: + ; + (*Db)(unsafe.Pointer(pNew)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) + if !(rc == SQLITE_OK && (*Db)(unsafe.Pointer(pNew)).FzDbSName == uintptr(0)) { + goto __24 + } + rc = SQLITE_NOMEM +__24: + ; + Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */))) + + // If the file was opened successfully, read the schema for the new database. + // If this fails, or if opening the file failed, then close the file and + // remove the entry from the db->aDb[] array. i.e. put everything back the + // way we found it. + if !(rc == SQLITE_OK) { + goto __25 + } + Xsqlite3BtreeEnterAll(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) + *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) + if !!(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2) != 0) { + goto __26 + } + rc = Xsqlite3Init(tls, db, bp+56) +__26: + ; + Xsqlite3BtreeLeaveAll(tls, db) + +__25: + ; + if !(rc != 0) { + goto __27 + } + if !!(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2) != 0) { + goto __28 + } + iDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 + + if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt != 0) { + goto __29 + } + Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt) + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt = uintptr(0) + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema = uintptr(0) +__29: + ; + Xsqlite3ResetAllSchemasOfConnection(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).FnDb = iDb + if !(rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8) { + goto __30 + } + Xsqlite3OomFault(tls, db) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */))) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+1461, 0) + goto __31 +__30: + if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { + goto __32 + } + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11719, libc.VaList(bp+16, zFile)) +__32: + ; +__31: + ; +__28: + ; + goto attach_error +__27: + ; + + return + +attach_error: + // Return an error if we get here + if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { + goto __33 + } + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)), -1) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */))) +__33: + ; + if !(rc != 0) { + goto __34 + } + Xsqlite3_result_error_code(tls, context, rc) +__34: +} + +// An SQL user-function registered to do the work of an DETACH statement. The +// three arguments to the function come directly from a detach statement: +// +// DETACH DATABASE x +// +// SELECT sqlite_detach(x) +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ + bp := tls.Alloc(152) + defer tls.Free(152) + + var zName uintptr + var db uintptr + var i int32 + var pDb uintptr + var pEntry uintptr + // var zErr [128]uint8 at bp+24, 128 + + var pTrig uintptr + zName = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + db = Xsqlite3_context_db_handle(tls, context) + pDb = uintptr(0) + + _ = NotUsed + + if !(zName == uintptr(0)) { + goto __1 + } + zName = ts + 1525 /* "" */ +__1: + ; + i = 0 +__2: + if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __4 + } + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 + if !((*Db)(unsafe.Pointer(pDb)).FpBt == uintptr(0)) { + goto __5 + } + goto __3 +__5: + ; + if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { + goto __6 + } + goto __4 +__6: + ; + goto __3 +__3: + i++ + goto __2 + goto __4 +__4: + ; + + if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __7 + } + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11747, libc.VaList(bp, zName)) + goto detach_error +__7: + ; + if !(i < 2) { + goto __8 + } + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11768, libc.VaList(bp+8, zName)) + goto detach_error +__8: + ; + if !(Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != SQLITE_TXN_NONE || + Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { + goto __9 + } + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11794, libc.VaList(bp+16, zName)) + goto detach_error +__9: + ; + + // If any TEMP triggers reference the schema being detached, move those + // triggers to reference the TEMP schema itself. + + pEntry = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56)).Ffirst +__10: + if !(pEntry != 0) { + goto __11 + } + pTrig = (*HashElem)(unsafe.Pointer(pEntry)).Fdata + if !((*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema == (*Db)(unsafe.Pointer(pDb)).FpSchema) { + goto __12 + } + (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema = (*Trigger)(unsafe.Pointer(pTrig)).FpSchema +__12: + ; + pEntry = (*HashElem)(unsafe.Pointer(pEntry)).Fnext + goto __10 +__11: + ; + + Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + (*Db)(unsafe.Pointer(pDb)).FpBt = uintptr(0) + (*Db)(unsafe.Pointer(pDb)).FpSchema = uintptr(0) + Xsqlite3CollapseDatabaseArray(tls, db) + return + +detach_error: + Xsqlite3_result_error(tls, context, bp+24, -1) +} + +// This procedure generates VDBE code for a single invocation of either the +// sqlite_detach() or sqlite_attach() SQL user functions. +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var rc int32 + // var sName NameContext at bp, 56 + + var v uintptr + var db uintptr + var regArgs int32 + var zAuthArg uintptr + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __1 + } + goto attach_end +__1: + ; + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp /* &sName */)).FpParse = pParse + + if !(SQLITE_OK != resolveAttachExpr(tls, bp, pFilename) || SQLITE_OK != resolveAttachExpr(tls, bp, pDbname) || SQLITE_OK != resolveAttachExpr(tls, bp, pKey)) { + goto __2 + } + goto attach_end +__2: + ; + + if !(pAuthArg != 0) { + goto __3 + } + if !(int32((*Expr)(unsafe.Pointer(pAuthArg)).Fop) == TK_STRING) { + goto __4 + } + + zAuthArg = *(*uintptr)(unsafe.Pointer(pAuthArg + 8)) + goto __5 +__4: + zAuthArg = uintptr(0) +__5: + ; + rc = Xsqlite3AuthCheck(tls, pParse, type1, zAuthArg, uintptr(0), uintptr(0)) + if !(rc != SQLITE_OK) { + goto __6 + } + goto attach_end +__6: + ; +__3: + ; + + v = Xsqlite3GetVdbe(tls, pParse) + regArgs = Xsqlite3GetTempRange(tls, pParse, 4) + Xsqlite3ExprCode(tls, pParse, pFilename, regArgs) + Xsqlite3ExprCode(tls, pParse, pDbname, regArgs+1) + Xsqlite3ExprCode(tls, pParse, pKey, regArgs+2) + + if !(v != 0) { + goto __7 + } + Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regArgs+3-int32((*FuncDef)(unsafe.Pointer(pFunc)).FnArg), regArgs+3, + int32((*FuncDef)(unsafe.Pointer(pFunc)).FnArg), pFunc, 0) + // Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this + // statement only). For DETACH, set it to false (expire all existing + // statements). + Xsqlite3VdbeAddOp1(tls, v, OP_Expire, libc.Bool32(type1 == SQLITE_ATTACH)) +__7: + ; + +attach_end: + Xsqlite3ExprDelete(tls, db, pFilename) + Xsqlite3ExprDelete(tls, db, pDbname) + Xsqlite3ExprDelete(tls, db, pKey) +} + +// Called by the parser to compile a DETACH statement. +// +// DETACH pDbname +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ + codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) +} + +var detach_func = FuncDef{ + FnArg: int8(1), // nArg + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11816} /* sqlite3.c:113413:24 */ + +// Called by the parser to compile an ATTACH statement. +// +// ATTACH p AS pDbname KEY pKey +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ + codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) +} + +var attach_func = FuncDef{ + FnArg: int8(3), // nArg + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11830} /* sqlite3.c:113433:24 */ + +// Expression callback used by sqlite3FixAAAA() routines. +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pFix uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) + if !(int32((*DbFixer)(unsafe.Pointer(pFix)).FbTemp) != 0) { + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_FromDDL) + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VARIABLE { + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) + } else { + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11844, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + return WRC_Abort + } + } + return WRC_Continue +} + +// Select callback used by sqlite3FixAAAA() routines. +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pFix uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) + var i int32 + var pItem uintptr + var db uintptr = (*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb + var iDb int32 = Xsqlite3FindDbName(tls, db, (*DbFixer)(unsafe.Pointer(pFix)).FzDb) + var pList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc + + if pList == uintptr(0) { + return WRC_Continue + } + i = 0 + pItem = pList + 8 /* &.a */ +__1: + if !(i < (*SrcList)(unsafe.Pointer(pList)).FnSrc) { + goto __3 + } + { + if int32((*DbFixer)(unsafe.Pointer(pFix)).FbTemp) == 0 { + if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { + if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, + ts+11868, + libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) + return WRC_Abort + } + Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = uintptr(0) + libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 8, 0x100) + } + (*SrcItem)(unsafe.Pointer(pItem)).FpSchema = (*DbFixer)(unsafe.Pointer(pFix)).FpSchema + libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) + } + if Xsqlite3WalkExpr(tls, pFix+8, (*SrcItem)(unsafe.Pointer(pList+8+uintptr(i)*112)).FpOn) != 0 { + return WRC_Abort + } + + } + goto __2 +__2: + i++ + pItem += 112 + goto __1 + goto __3 +__3: + ; + if (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { + for i = 0; i < (*With)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpWith)).FnCte; i++ { + if Xsqlite3WalkSelect(tls, p, (*Cte)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpWith+16+uintptr(i)*48)).FpSelect) != 0 { + return WRC_Abort + } + } + } + return WRC_Continue +} + +// Initialize a DbFixer structure. This routine must be called prior +// to passing the structure to one of the sqliteFixAAAA() routines below. +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse + (*DbFixer)(unsafe.Pointer(pFix)).FzDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + (*DbFixer)(unsafe.Pointer(pFix)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + (*DbFixer)(unsafe.Pointer(pFix)).FzType = zType + (*DbFixer)(unsafe.Pointer(pFix)).FpName = pName + (*DbFixer)(unsafe.Pointer(pFix)).FbTemp = U8(libc.Bool32(iDb == 1)) + (*DbFixer)(unsafe.Pointer(pFix)).Fw.FpParse = pParse + (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{fixExprCb})) + (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{fixSelectCb})) + (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3WalkWinDefnDummyCallback})) + (*DbFixer)(unsafe.Pointer(pFix)).Fw.FwalkerDepth = 0 + (*DbFixer)(unsafe.Pointer(pFix)).Fw.FeCode = U16(0) + *(*uintptr)(unsafe.Pointer(pFix + 8 + 40)) = pFix +} + +// The following set of routines walk through the parse tree and assign +// a specific database to all table references where the database name +// was left unspecified in the original SQL statement. The pFix structure +// must have been initialized by a prior call to sqlite3FixInit(). +// +// These routines are used to make sure that an index, trigger, or +// view in one database does not refer to objects in a different database. +// (Exception: indices, triggers, and views in the TEMP database are +// allowed to refer to anything.) If a reference is explicitly made +// to an object in a different database, an error message is added to +// pParse->zErrMsg and these routines return non-zero. If everything +// checks out, these routines return 0. +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + var res int32 = 0 + if pList != 0 { + // var s Select at bp, 128 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) + (*Select)(unsafe.Pointer(bp /* &s */)).FpSrc = pList + res = Xsqlite3WalkSelect(tls, pFix+8, bp) + } + return res +} + +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ + return Xsqlite3WalkSelect(tls, pFix+8, pSelect) +} + +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ + return Xsqlite3WalkExpr(tls, pFix+8, pExpr) +} + +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ + for pStep != 0 { + if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || + Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || + Xsqlite3WalkExprList(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) != 0 || + Xsqlite3FixSrcList(tls, pFix, (*TriggerStep)(unsafe.Pointer(pStep)).FpFrom) != 0 { + return 1 + } + { + var pUp uintptr + for pUp = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert; pUp != 0; pUp = (*Upsert)(unsafe.Pointer(pUp)).FpNextUpsert { + if Xsqlite3WalkExprList(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTarget) != 0 || + Xsqlite3WalkExpr(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTargetWhere) != 0 || + Xsqlite3WalkExprList(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertSet) != 0 || + Xsqlite3WalkExpr(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertWhere) != 0 { + return 1 + } + } + + } + pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext + } + + return 0 +} + +//************* End of attach.c ********************************************* +//************* Begin file auth.c ******************************************* +// 2003 January 11 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code used to implement the sqlite3_set_authorizer() +// API. This facility is an optional feature of the library. Embedded +// systems that do not need this facility may omit it by recompiling +// the library with -DSQLITE_OMIT_AUTHORIZATION=1 +// #include "sqliteInt.h" + +// All of the code in this file may be omitted by defining a single +// macro. + +// Set or clear the access authorization function. +// +// The access authorization function is be called during the compilation +// phase to verify that the user has read and/or write access permission on +// various fields of the database. The first argument to the auth function +// is a copy of the 3rd argument to this routine. The second argument +// to the auth function is one of these constants: +// +// SQLITE_CREATE_INDEX +// SQLITE_CREATE_TABLE +// SQLITE_CREATE_TEMP_INDEX +// SQLITE_CREATE_TEMP_TABLE +// SQLITE_CREATE_TEMP_TRIGGER +// SQLITE_CREATE_TEMP_VIEW +// SQLITE_CREATE_TRIGGER +// SQLITE_CREATE_VIEW +// SQLITE_DELETE +// SQLITE_DROP_INDEX +// SQLITE_DROP_TABLE +// SQLITE_DROP_TEMP_INDEX +// SQLITE_DROP_TEMP_TABLE +// SQLITE_DROP_TEMP_TRIGGER +// SQLITE_DROP_TEMP_VIEW +// SQLITE_DROP_TRIGGER +// SQLITE_DROP_VIEW +// SQLITE_INSERT +// SQLITE_PRAGMA +// SQLITE_READ +// SQLITE_SELECT +// SQLITE_TRANSACTION +// SQLITE_UPDATE +// +// The third and fourth arguments to the auth function are the name of +// the table and the column that are being accessed. The auth function +// should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE. If +// SQLITE_OK is returned, it means that access is allowed. SQLITE_DENY +// means that the SQL statement will never-run - the sqlite3_exec() call +// will return with an error. SQLITE_IGNORE means that the SQL statement +// should run but attempts to read the specified column will return NULL +// and attempts to write the column will be ignored. +// +// Setting the auth function to NULL disables this hook. The default +// setting of the auth function is NULL. +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth + (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg + if (*Sqlite3)(unsafe.Pointer(db)).FxAuth != 0 { + Xsqlite3ExpirePreparedStatements(tls, db, 1) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// Write an error message into pParse->zErrMsg that explains that the +// user-supplied authorization function returned an illegal value. +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11914, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR +} + +// Invoke the authorization callback for permission to read column zCol from +// table zTab in database zDb. This function assumes that an authorization +// callback has been registered (i.e. that sqlite3.xAuth is not NULL). +// +// If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed +// to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE +// is treated as SQLITE_DENY. In this case an error is left in pParse. +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName // Schema name of attached database + var rc int32 // Auth callback return code + + if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { + return SQLITE_OK + } + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) + if rc == SQLITE_DENY { + var z uintptr = Xsqlite3_mprintf(tls, ts+11937, libc.VaList(bp, zTab, zCol)) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { + z = Xsqlite3_mprintf(tls, ts+11943, libc.VaList(bp+16, zDb, z)) + } + Xsqlite3ErrorMsg(tls, pParse, ts+11949, libc.VaList(bp+32, z)) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH + } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { + sqliteAuthBadReturnCode(tls, pParse) + } + return rc +} + +// The pExpr should be a TK_COLUMN expression. The table referred to +// is in pTabList or else it is the NEW or OLD table of a trigger. +// Check to see if it is OK to read this particular column. +// +// If the auth function returns SQLITE_IGNORE, change the TK_COLUMN +// instruction into a TK_NULL. If the auth function returns SQLITE_DENY, +// then generate an error. +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ + var pTab uintptr = uintptr(0) // The table being read + var zCol uintptr // Name of the column of the table + var iSrc int32 // Index in pTabList->a[] of table being read + var iDb int32 // The index of the database the expression refers to + var iCol int32 // Index of column in table + + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSchema) + if iDb < 0 { + // An attempt to read a column out of a subquery or other + // temporary table. + return + } + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER { + pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab + } else { + + for iSrc = 0; iSrc < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc; iSrc++ { + if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(iSrc)*112)).FiCursor { + pTab = (*SrcItem)(unsafe.Pointer(pTabList + 8 + uintptr(iSrc)*112)).FpTab + break + } + } + } + iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + if pTab == uintptr(0) { + return + } + + if iCol >= 0 { + + zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName + } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { + + zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName + } else { + zCol = ts + 7591 /* "ROWID" */ + } + + if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) + } +} + +// Do an authorization check using the code and arguments given. Return +// either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY +// is returned, then the error count and error message in pParse are +// modified appropriately. +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var rc int32 + + // Don't do any authorization checks if the database is initialising + // or if the parser is being invoked from within sqlite3_declare_vtab. + + if (*Sqlite3)(unsafe.Pointer(db)).FxAuth == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + return SQLITE_OK + } + + // EVIDENCE-OF: R-43249-19882 The third through sixth parameters to the + // callback are either NULL pointers or zero-terminated strings that + // contain additional details about the action to be authorized. + // + // The following testcase() macros show that any of the 3rd through 6th + // parameters can be either NULL or a string. + + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) + if rc == SQLITE_DENY { + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH + } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { + rc = SQLITE_DENY + sqliteAuthBadReturnCode(tls, pParse) + } + return rc +} + +// Push an authorization context. After this routine is called, the +// zArg3 argument to authorization callbacks will be zContext until +// popped. Or if pParse==0, this routine is a no-op. +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ + + (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse + (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext + (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zContext +} + +// Pop an authorization context that was previously pushed +// by sqlite3AuthContextPush +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ + if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { + (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext + (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) + } +} + +// Record the fact that we want to lock a table at run-time. +// +// The table to be locked has root page iTab and is found in database iDb. +// A read or a write lock can be taken depending on isWritelock. +// +// This routine just records the fact that the lock is desired. The +// code to make the lock occur is generated by a later call to +// codeTableLocks() which occurs during sqlite3FinishCoding(). +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ + var pToplevel uintptr + var i int32 + var nBytes int32 + var p uintptr + + pToplevel = func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }() + for i = 0; i < (*Parse)(unsafe.Pointer(pToplevel)).FnTableLock; i++ { + p = (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock + uintptr(i)*24 + if (*TableLock)(unsafe.Pointer(p)).FiDb == iDb && (*TableLock)(unsafe.Pointer(p)).FiTab == iTab { + (*TableLock)(unsafe.Pointer(p)).FisWriteLock = U8(libc.Bool32((*TableLock)(unsafe.Pointer(p)).FisWriteLock != 0 || isWriteLock != 0)) + return + } + } + + nBytes = int32(uint64(unsafe.Sizeof(TableLock{})) * uint64((*Parse)(unsafe.Pointer(pToplevel)).FnTableLock+1)) + (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(pToplevel)).Fdb, (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock, uint64(nBytes)) + if (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock != 0 { + p = (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock + uintptr(libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pToplevel)).FnTableLock, 1))*24 + (*TableLock)(unsafe.Pointer(p)).FiDb = iDb + (*TableLock)(unsafe.Pointer(p)).FiTab = iTab + (*TableLock)(unsafe.Pointer(p)).FisWriteLock = isWriteLock + (*TableLock)(unsafe.Pointer(p)).FzLockName = zName + } else { + (*Parse)(unsafe.Pointer(pToplevel)).FnTableLock = 0 + Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(pToplevel)).Fdb) + } +} + +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ + if iDb == 1 { + return + } + if !(Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FpBt) != 0) { + return + } + lockTable(tls, pParse, iDb, iTab, isWriteLock, zName) +} + +// Code an OP_TableLock instruction for each table locked by the +// statement (configured by calls to sqlite3TableLock()). +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ + var i int32 + var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + for i = 0; i < (*Parse)(unsafe.Pointer(pParse)).FnTableLock; i++ { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FaTableLock + uintptr(i)*24 + var p1 int32 = (*TableLock)(unsafe.Pointer(p)).FiDb + Xsqlite3VdbeAddOp4(tls, pVdbe, OP_TableLock, p1, int32((*TableLock)(unsafe.Pointer(p)).FiTab), int32((*TableLock)(unsafe.Pointer(p)).FisWriteLock), + (*TableLock)(unsafe.Pointer(p)).FzLockName, -1) + } +} + +// Return TRUE if the given yDbMask object is empty - if it contains no +// 1 bits. This routine is used by the DbMaskAllZero() and DbMaskNotZero() +// macros when SQLITE_MAX_ATTACHED is greater than 30. + +// This routine is called after a single SQL statement has been +// parsed and a VDBE program to execute that statement has been +// prepared. This routine puts the finishing touches on the +// VDBE program and resets the pParse structure for the next +// parse. +// +// Note that if an error occurred, it might be the case that +// no VDBE code was generated. +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ + var db uintptr + var v uintptr + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if (*Parse)(unsafe.Pointer(pParse)).Fnested != 0 { + return + } + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + } + return + } + + // Begin by generating some termination code at the end of the + // vdbe program + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + if v == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_DONE + return + } + v = Xsqlite3GetVdbe(tls, pParse) + if v == uintptr(0) { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + } + } + + if v != 0 { + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var addrRewind int32 + var i int32 + var reg int32 + + if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol == 0 { + + } else { + Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) + addrRewind = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur) + + reg = (*Returning)(unsafe.Pointer(pReturning)).FiRetReg + for i = 0; i < (*Returning)(unsafe.Pointer(pReturning)).FnRetCol; i++ { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, i, reg+i) + } + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, reg, i) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, addrRewind+1) + + Xsqlite3VdbeJumpHere(tls, v, addrRewind) + } + } + Xsqlite3VdbeAddOp0(tls, v, OP_Halt) + + // The cookie mask contains one bit for each database file open. + // (Bit 0 is for main, bit 1 is for temp, and so forth.) Bits are + // set for each database that is used. Generate code to start a + // transaction on each used database and to verify the schema cookie + // on each used database. + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && + ((*Parse)(unsafe.Pointer(pParse)).FcookieMask != YDbMask(0) || (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0) { + var iDb int32 + var i int32 + + Xsqlite3VdbeJumpHere(tls, v, 0) + for iDb = 0; iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb; iDb++ { + var pSchema uintptr + if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(YDbMask(1))< 0 { + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) + } + } + } + + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol == 0 { + + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } + } + + // Finally, jump back to the beginning of the executable code. + Xsqlite3VdbeGoto(tls, v, 1) + } + } + + // Get the VDBE program ready for execution + + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { + // A minimum of one cursor is required if autoincrement is used + // See ticket [a696379c1f08866] + + Xsqlite3VdbeMakeReady(tls, v, pParse) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_DONE + } else { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + } +} + +// Run the parser and code generator recursively in order to generate +// code for the SQL statement given onto the end of the pParse context +// currently under construction. Notes: +// +// * The final OP_Halt is not appended and other initialization +// and finalization steps are omitted because those are handling by the +// outermost parser. +// +// * Built-in SQL functions always take precedence over application-defined +// SQL functions. In other words, it is not possible to override a +// built-in function. +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var ap Va_list + _ = ap + var zSql uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var savedDbFlags U32 = (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags + // var saveBuf [136]uint8 at bp, 136 + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + // Nesting should only be of limited depth + ap = va + zSql = Xsqlite3VMPrintf(tls, db, zFormat, ap) + _ = ap + if zSql == uintptr(0) { + // This can result either from an OOM or because the formatted string + // exceeds SQLITE_LIMIT_LENGTH. In the latter case, we need to set + // an error + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_TOOBIG + } + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } + (*Parse)(unsafe.Pointer(pParse)).Fnested++ + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+272)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) + Xsqlite3RunParser(tls, pParse, zSql) + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags + Xsqlite3DbFree(tls, db, zSql) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+272)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + (*Parse)(unsafe.Pointer(pParse)).Fnested-- +} + +// Locate the in-memory structure that describes a particular database +// table given the name of that table and (optionally) the name of the +// database containing the table. Return NULL if not found. +// +// If zDatabase is 0, all databases are searched for the table and the +// first matching table is returned. (No checking for duplicate table +// names is done.) The search order is TEMP first, then MAIN, then any +// auxiliary databases added using the ATTACH command. +// +// See also sqlite3LocateTable(). +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ + var p uintptr = uintptr(0) + var i int32 + + // All mutexes are required for schema access. Make sure we hold them. + + if zDatabase != 0 { + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + if Xsqlite3StrICmp(tls, zDatabase, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName) == 0 { + break + } + } + if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { + // No match against the official names. But always match "main" + // to schema 0 as a legacy fallback. + if Xsqlite3StrICmp(tls, zDatabase, ts+6323) == 0 { + i = 0 + } else { + return uintptr(0) + } + } + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8010, 7) == 0 { + if i == 1 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11991+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12010+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5835+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, + ts+12024) + } + } else { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12010+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, + ts+5835) + } + } + } + } else { + // Match against TEMP first + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, zName) + if p != 0 { + return p + } + // The main database is second + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, zName) + if p != 0 { + return p + } + // Attached databases are in order of attachment + for i = 2; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) + if p != 0 { + break + } + } + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8010, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12010+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5835) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11991+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, + ts+12024) + } + } + } + return p +} + +// Locate the in-memory structure that describes a particular database +// table given the name of that table and (optionally) the name of the +// database containing the table. Return NULL if not found. Also leave an +// error message in pParse->zErrMsg. +// +// The difference between this routine and sqlite3FindTable() is that this +// routine leaves an error message in pParse->zErrMsg where +// sqlite3FindTable() does not. +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var p uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + // Read the database schema. If an error occurs, leave an error message + // and code in pParse and return NULL. + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaKnownOk) == U32(0) && + SQLITE_OK != Xsqlite3ReadSchema(tls, pParse) { + return uintptr(0) + } + + p = Xsqlite3FindTable(tls, db, zName, zDbase) + if p == uintptr(0) { + // If zName is the not the name of a table in the schema created using + // CREATE, then check to see if it is the name of an virtual table that + // can be an eponymous virtual table. + if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12043, 7) == 0 { + pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) + } + if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { + + return (*Module)(unsafe.Pointer(pMod)).FpEpoTab + } + } + if flags&U32(LOCATE_NOERR) != 0 { + return uintptr(0) + } + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && (*Parse)(unsafe.Pointer(pParse)).FdisableVtab != 0 { + p = uintptr(0) + } + + if p == uintptr(0) { + var zMsg uintptr + if flags&U32(LOCATE_VIEW) != 0 { + zMsg = ts + 12051 /* "no such view" */ + } else { + zMsg = ts + 12064 /* "no such table" */ + } + if zDbase != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+6518, libc.VaList(bp, zMsg, zDbase, zName)) + } else { + Xsqlite3ErrorMsg(tls, pParse, ts+6528, libc.VaList(bp+24, zMsg, zName)) + } + } else { + + } + + return p +} + +// Locate the table identified by *p. +// +// This is a wrapper around sqlite3LocateTable(). The difference between +// sqlite3LocateTable() and this function is that this function restricts +// the search to schema (p->pSchema) if it is not NULL. p->pSchema may be +// non-NULL if it is part of a view or trigger program definition. See +// sqlite3FixSrcList() for details. +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ + var zDb uintptr + + if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { + var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(p)).FpSchema) + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName + } else { + zDb = (*SrcItem)(unsafe.Pointer(p)).FzDatabase + } + return Xsqlite3LocateTable(tls, pParse, flags, (*SrcItem)(unsafe.Pointer(p)).FzName, zDb) +} + +// Return the preferred table name for system tables. Translate legacy +// names into the new preferred names, as appropriate. +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ + if Xsqlite3_strnicmp(tls, zName, ts+8010, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5835+7) == 0 { + return ts + 12010 /* "sqlite_schema" */ + } + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12024+7) == 0 { + return ts + 11991 /* "sqlite_temp_sche..." */ + } + } + return zName +} + +// Locate the in-memory structure that describes +// a particular index given the name of that index +// and the name of the database that contains the index. +// Return NULL if not found. +// +// If zDatabase is 0, all databases are searched for the +// table and the first matching index is returned. (No checking +// for duplicate index names is done.) The search order is +// TEMP first, then MAIN, then any auxiliary databases added +// using the ATTACH command. +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ + var p uintptr = uintptr(0) + var i int32 + // All mutexes are required for schema access. Make sure we hold them. + + for i = OMIT_TEMPDB; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var j int32 + if i < 2 { + j = i ^ 1 + } else { + j = i + } // Search TEMP before MAIN + var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(j)*32)).FpSchema + + if zDb != 0 && Xsqlite3DbIsNamed(tls, db, j, zDb) == 0 { + continue + } + + p = Xsqlite3HashFind(tls, pSchema+32, zName) + if p != 0 { + break + } + } + return p +} + +// Reclaim the memory used by an index +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ + Xsqlite3DeleteIndexSamples(tls, db, p) + Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) + Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) + Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(p)).FzColAff) + if uint32(int32(*(*uint16)(unsafe.Pointer(p + 100))&0x10>>4)) != 0 { + Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(p)).FazColl) + } + Xsqlite3_free(tls, (*Index)(unsafe.Pointer(p)).FaiRowEst) + Xsqlite3DbFree(tls, db, p) +} + +// For the index called zIdxName which is found in the database iDb, +// unlike that index from its Table then remove the index from +// the index hash table and free all memory structures associated +// with the index. +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ + var pIndex uintptr + var pHash uintptr + + pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 32 + pIndex = Xsqlite3HashInsert(tls, pHash, zIdxName, uintptr(0)) + if pIndex != 0 { + if (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex == pIndex { + (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex = (*Index)(unsafe.Pointer(pIndex)).FpNext + } else { + var p uintptr + // Justification of ALWAYS(); The index must be on the list of + // indices. + p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex + for p != 0 && (*Index)(unsafe.Pointer(p)).FpNext != pIndex { + p = (*Index)(unsafe.Pointer(p)).FpNext + } + if p != 0 && (*Index)(unsafe.Pointer(p)).FpNext == pIndex { + (*Index)(unsafe.Pointer(p)).FpNext = (*Index)(unsafe.Pointer(pIndex)).FpNext + } + } + Xsqlite3FreeIndex(tls, db, pIndex) + } + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) +} + +// Look through the list of open database files in db->aDb[] and if +// any have been closed, remove them from the list. Reallocate the +// db->aDb[] structure to a smaller size, if possible. +// +// Entry 0 (the "main" database) and entry 1 (the "temp" database) +// are never candidates for being collapsed. +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ + var i int32 + var j int32 + for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 + if (*Db1)(unsafe.Pointer(pDb)).FpBt == uintptr(0) { + Xsqlite3DbFree(tls, db, (*Db1)(unsafe.Pointer(pDb)).FzDbSName) + (*Db1)(unsafe.Pointer(pDb)).FzDbSName = uintptr(0) + continue + } + if j < i { + *(*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(j)*32)) = *(*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)) + } + j++ + } + (*Sqlite3)(unsafe.Pointer(db)).FnDb = j + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+688 { + libc.Xmemcpy(tls, db+688, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{}))) + Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 /* &.aDbStatic */ + } +} + +// Reset the schema for the database at index iDb. Also reset the +// TEMP schema. The reset is deferred if db->nSchemaLock is not zero. +// Deferred resets may be run by calling with iDb<0. +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ + var i int32 + + if iDb >= 0 { + + *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 114)) |= U16(DB_ResetWanted) + *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 114)) |= U16(DB_ResetWanted) + *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) + } + + if (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock == U32(0) { + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + if int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema)).FschemaFlags)&DB_ResetWanted == DB_ResetWanted { + Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema) + } + } + } +} + +// Erase all schema information from all attached databases (including +// "main" and "temp") for a single database connection. +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ + var i int32 + Xsqlite3BtreeEnterAll(tls, db) + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 + if (*Db)(unsafe.Pointer(pDb)).FpSchema != 0 { + if (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock == U32(0) { + Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer(pDb)).FpSchema) + } else { + *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema + 114)) |= U16(DB_ResetWanted) + } + } + } + *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange | DBFLAG_SchemaKnownOk)) + Xsqlite3VtabUnlockList(tls, db) + Xsqlite3BtreeLeaveAll(tls, db) + if (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock == U32(0) { + Xsqlite3CollapseDatabaseArray(tls, db) + } +} + +// This routine is called when a commit occurs. +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ + *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) +} + +// Set the expression associated with a column. This is usually +// the DEFAULT value, but might also be the expression that computes +// the value for a generated column. +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ + var pList uintptr + + pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) + if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 || + pList == uintptr(0) || + (*ExprList)(unsafe.Pointer(pList)).FnExpr < int32((*Column)(unsafe.Pointer(pCol)).FiDflt) { + (*Column)(unsafe.Pointer(pCol)).FiDflt = func() uint16 { + if pList == uintptr(0) { + return uint16(1) + } + return uint16((*ExprList)(unsafe.Pointer(pList)).FnExpr + 1) + }() + *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) = Xsqlite3ExprListAppend(tls, pParse, pList, pExpr) + } else { + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(int32((*Column)(unsafe.Pointer(pCol)).FiDflt)-1)*32)).FpExpr) + (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(int32((*Column)(unsafe.Pointer(pCol)).FiDflt)-1)*32)).FpExpr = pExpr + } +} + +// Return the expression associated with a column. The expression might be +// the DEFAULT clause or the AS clause of a generated column. +// Return NULL if the column has no associated expression. +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ + if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { + return uintptr(0) + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + return uintptr(0) + } + if *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) == uintptr(0) { + return uintptr(0) + } + if (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FnExpr < int32((*Column)(unsafe.Pointer(pCol)).FiDflt) { + return uintptr(0) + } + return (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) + 8 + uintptr(int32((*Column)(unsafe.Pointer(pCol)).FiDflt)-1)*32)).FpExpr +} + +// Set the collating sequence name for a column. +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ + var nColl I64 + var n I64 + var zNew uintptr + + n = I64(Xsqlite3Strlen30(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName) + 1) + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { + n = n + I64(Xsqlite3Strlen30(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName+uintptr(n))+1) + } + nColl = I64(Xsqlite3Strlen30(tls, zColl) + 1) + zNew = Xsqlite3DbRealloc(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName, uint64(nColl+n)) + if zNew != 0 { + (*Column)(unsafe.Pointer(pCol)).FzCnName = zNew + libc.Xmemcpy(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName+uintptr(n), zColl, uint64(nColl)) + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_HASCOLL) + } +} + +// Return the collating squence name for a column +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ + var z uintptr + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { + return uintptr(0) + } + z = (*Column)(unsafe.Pointer(pCol)).FzCnName + for *(*uint8)(unsafe.Pointer(z)) != 0 { + z++ + } + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { + for __ccgo := true; __ccgo; __ccgo = *(*uint8)(unsafe.Pointer(z)) != 0 { + z++ + } + } + return z + uintptr(1) +} + +// Delete memory allocated for the column names of a table or view (the +// Table.aCol[] array). +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ + var i int32 + var pCol uintptr + + if libc.AssignUintptr(&pCol, (*Table)(unsafe.Pointer(pTable)).FaCol) != uintptr(0) { + i = 0 + __1: + if !(i < int32((*Table)(unsafe.Pointer(pTable)).FnCol)) { + goto __3 + } + { + + Xsqlite3DbFree(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName) + + } + goto __2 + __2: + i++ + pCol += 24 + goto __1 + goto __3 + __3: + ; + Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { + Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 16 /* &.pDfltList */))) + } + if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + (*Table)(unsafe.Pointer(pTable)).FaCol = uintptr(0) + (*Table)(unsafe.Pointer(pTable)).FnCol = int16(0) + if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { + *(*uintptr)(unsafe.Pointer(pTable + 64 + 16 /* &.pDfltList */)) = uintptr(0) + } + } + } +} + +// Remove the memory data structures associated with the given +// Table. No changes are made to disk by this routine. +// +// This routine just deletes the data structure. It does not unlink +// the table data structure from the hash table. But it does destroy +// memory structures of the indices and foreign keys associated with +// the table. +// +// The db parameter is optional. It is needed if the Table object +// contains lookaside memory. (Table objects in the schema do not use +// lookaside memory, but some ephemeral Table objects do.) Or the +// db parameter can be used with db->pnBytesFreed to measure the memory +// used by the Table object. +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ + var pIndex uintptr + var pNext uintptr + + // Delete all indices associated with this table. + for pIndex = (*Table)(unsafe.Pointer(pTable)).FpIndex; pIndex != 0; pIndex = pNext { + pNext = (*Index)(unsafe.Pointer(pIndex)).FpNext + + if (db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) { + var zName uintptr = (*Index)(unsafe.Pointer(pIndex)).FzName + Xsqlite3HashInsert(tls, + (*Index)(unsafe.Pointer(pIndex)).FpSchema+32, zName, uintptr(0)) + + } + Xsqlite3FreeIndex(tls, db, pIndex) + } + + if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { + Xsqlite3FkDelete(tls, db, pTable) + } else if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB { + Xsqlite3VtabClear(tls, db, pTable) + } else { + + Xsqlite3SelectDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64))) + } + + // Delete the Table structure itself. + Xsqlite3DeleteColumnNames(tls, db, pTable) + Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FzName) + Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FzColAff) + Xsqlite3ExprListDelete(tls, db, (*Table)(unsafe.Pointer(pTable)).FpCheck) + Xsqlite3DbFree(tls, db, pTable) + + // Verify that no lookaside memory was used by schema tables + +} + +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ + // Do not delete the table until the reference count reaches zero. + if !(pTable != 0) { + return + } + if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + return + } + deleteTable(tls, db, pTable) +} + +// Unlink the given table from the hash tables and the delete the +// table structure with all its indices and foreign keys. +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ + var p uintptr + var pDb uintptr + + // Zero-length table names are allowed + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + p = Xsqlite3HashInsert(tls, (*Db)(unsafe.Pointer(pDb)).FpSchema+8, zTabName, uintptr(0)) + Xsqlite3DeleteTable(tls, db, p) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) +} + +// Given a token, return a string that consists of the text of that +// token. Space to hold the returned string +// is obtained from sqliteMalloc() and must be freed by the calling +// function. +// +// Any quotation marks (ex: "name", 'name', [name], or `name`) that +// surround the body of the token are removed. +// +// Tokens are often just pointers into the original SQL text and so +// are not \000 terminated and are not persistent. The returned string +// is \000 terminated and is persistent. +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ + var zName uintptr + if pName != 0 { + zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) + Xsqlite3Dequote(tls, zName) + } else { + zName = uintptr(0) + } + return zName +} + +// Open the sqlite_schema table stored in database number iDb for +// writing. The table is opened using cursor 0. +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ + var v uintptr = Xsqlite3GetVdbe(tls, p) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5835) + Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) + if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { + (*Parse)(unsafe.Pointer(p)).FnTab = 1 + } +} + +// Parameter zName points to a nul-terminated buffer containing the name +// of a database ("main", "temp" or the name of an attached db). This +// function returns the index of the named database in db->aDb[], or +// -1 if the named db cannot be found. +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ + var i int32 = -1 // Database number + if zName != 0 { + var pDb uintptr + i = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 + __1: + if !(i >= 0) { + goto __3 + } + { + if 0 == Xsqlite3_stricmp(tls, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zName) { + goto __3 + } + // "main" is always an acceptable alias for the primary database + // even if it has been renamed using SQLITE_DBCONFIG_MAINDBNAME. + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6323, zName) { + goto __3 + } + + } + goto __2 + __2: + i-- + pDb -= 32 + goto __1 + goto __3 + __3: + } + return i +} + +// The token *pName contains the name of a database (either "main" or +// "temp" or the name of an attached db). This routine returns the +// index of the named database in db->aDb[], or -1 if the named db +// does not exist. +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ + var i int32 // Database number + var zName uintptr // Name we are searching for + zName = Xsqlite3NameFromToken(tls, db, pName) + i = Xsqlite3FindDbName(tls, db, zName) + Xsqlite3DbFree(tls, db, zName) + return i +} + +// The table or view or trigger name is passed to this routine via tokens +// pName1 and pName2. If the table name was fully qualified, for example: +// +// CREATE TABLE xxx.yyy (...); +// +// Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if +// the table name is not fully qualified, i.e.: +// +// CREATE TABLE yyy(...); +// +// Then pName1 is set to "yyy" and pName2 is "". +// +// This routine sets the *ppUnqual pointer to point at the token (pName1 or +// pName2) that stores the unqualified table name. The index of the +// database "xxx" is returned. +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var iDb int32 // Database holding the object + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+12078, 0) + return -1 + } + *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 + iDb = Xsqlite3FindDb(tls, db, pName1) + if iDb < 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+12095, libc.VaList(bp, pName1)) + return -1 + } + } else { + + iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) + *(*uintptr)(unsafe.Pointer(pUnqual)) = pName1 + } + return iDb +} + +// True if PRAGMA writable_schema is ON +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ + + return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) +} + +// This routine is used to check if the UTF-8 string zName is a legal +// unqualified name for a new schema object (table, index, view or +// trigger). All names are legal except those that begin with the string +// "sqlite_" (in upper, lower or mixed case). This portion of the namespace +// is reserved for internal use. +// +// When parsing the sqlite_schema table, this routine also checks to +// make sure the "type", "name", and "tbl_name" columns are consistent +// with the SQL. +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if Xsqlite3WritableSchema(tls, db) != 0 || + uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x2>>1)) != 0 || + !(int32(Xsqlite3Config.FbExtraSchemaChecks) != 0) { + // Skip these error checks for writable_schema=ON + return SQLITE_OK + } + if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { + if Xsqlite3_stricmp(tls, zType, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit))) != 0 || + Xsqlite3_stricmp(tls, zName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 1*8))) != 0 || + Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*8))) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+1525, 0) // corruptSchema() will supply the error + return SQLITE_ERROR + } + } else { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8010, 7) || + Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+12115, + libc.VaList(bp, zName)) + return SQLITE_ERROR + } + + } + return SQLITE_OK +} + +// Return the PRIMARY KEY index of a table +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ + var p uintptr + for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { + } + return p +} + +// Convert an table column number into a index column number. That is, +// for the column iCol in the table (as defined by the CREATE TABLE statement) +// find the (first) offset of that column in index pIdx. Or return -1 +// if column iCol is not used in index pIdx. +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ + var i int32 + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { + return I16(i) + } + } + return int16(-1) +} + +// Convert a storage column number into a table column number. +// +// The storage column number (0,1,2,....) is the index of the value +// as it appears in the record on disk. The true column number +// is the index (0,1,2,...) of the column in the CREATE TABLE statement. +// +// The storage column number is less than the table column number if +// and only there are VIRTUAL columns to the left. +// +// If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { + var i int32 + for i = 0; i <= int32(iCol); i++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + iCol++ + } + } + } + return iCol +} + +// Convert a table column number into a storage column number. +// +// The storage column number (0,1,2,....) is the index of the value +// as it appears in the record on disk. Or, if the input column is +// the N-th virtual column (zero-based) then the storage number is +// the number of non-virtual columns in the table plus N. +// +// The true column number is the index (0,1,2,...) of the column in +// the CREATE TABLE statement. +// +// If the input column is a VIRTUAL column, then it should not appear +// in storage. But the value sometimes is cached in registers that +// follow the range of registers used to construct storage. This +// avoids computing the same VIRTUAL column multiple times, and provides +// values for use by OP_Param opcodes in triggers. Hence, if the +// input column is a VIRTUAL table, put it after all the other columns. +// +// In the following, N means "normal column", S means STORED, and +// V means VIRTUAL. Suppose the CREATE TABLE has columns like this: +// +// CREATE TABLE ex(N,S,V,N,S,V,N,S,V); +// -- 0 1 2 3 4 5 6 7 8 +// +// Then the mapping from this function is as follows: +// +// INPUTS: 0 1 2 3 4 5 6 7 8 +// OUTPUTS: 0 1 6 2 3 7 4 5 8 +// +// So, in other words, this routine shifts all the virtual columns to +// the end. +// +// If SQLITE_OMIT_GENERATED_COLUMNS then there are no virtual columns and +// this routine is a no-op macro. If the pTab does not have any virtual +// columns, then this routine is no-op that always return iCol. If iCol +// is negative (indicating the ROWID column) then this routine return iCol. +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ + var i int32 + var n I16 + + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) == U32(0) || int32(iCol) < 0 { + return iCol + } + i = 0 + n = int16(0) + for ; i < int32(iCol); i++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + n++ + } + } + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + // iCol is a virtual column itself + return I16(int32((*Table)(unsafe.Pointer(pTab)).FnNVCol) + i - int32(n)) + } else { + // iCol is a normal or stored column + return n + } + return I16(0) +} + +// Insert a single OP_JournalMode query opcode in order to force the +// prepared statement to return false for sqlite3_stmt_readonly(). This +// is used by CREATE TABLE IF NOT EXISTS and similar if the table already +// exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS +// will return false for sqlite3_stmt_readonly() even if that statement +// is a read-only no-op. +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ + var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + if v != 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_JournalMode, 0, iReg, -1) + Xsqlite3VdbeUsesBtree(tls, v, 0) + } +} + +// Begin constructing a new table representation in memory. This is +// the first of several action routines that get called in response +// to a CREATE TABLE statement. In particular, this routine is called +// after seeing tokens "CREATE" and "TABLE" and the table name. The isTemp +// flag is true if the table should be stored in the auxiliary database +// file instead of in the main database file. This is normally the case +// when the "TEMP" or "TEMPORARY" keyword occurs in between +// CREATE and TABLE. +// +// The new table record is initialized and put in pParse->pNewTable. +// As more of the CREATE TABLE statement is parsed, additional action +// routines will be called to add more information to this record. +// At the end of the CREATE TABLE statement, the sqlite3EndTable() routine +// is called to complete the construction of the new table record. +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pTable uintptr + var zName uintptr // The name of the new table + var db uintptr + var v uintptr + var iDb int32 // Database number to create the table in + // var pName uintptr at bp+24, 8 + + var zDb uintptr + var zDb1 uintptr + var addr1 int32 + var fileFormat int32 + var reg1 int32 + var reg2 int32 + var reg3 int32 + zName = uintptr(0) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb // Unqualified name of the table to create + + if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum == Pgno(1)) { + goto __1 + } + // Special case: Parsing the sqlite_schema or sqlite_temp_schema schema + iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) + zName = Xsqlite3DbStrDup(tls, db, func() uintptr { + if !(0 != 0) && iDb == 1 { + return ts + 12024 /* "sqlite_temp_mast..." */ + } + return ts + 5835 /* "sqlite_master" */ + }()) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */)) = pName1 + goto __2 +__1: + // The common case + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+24) + if !(iDb < 0) { + goto __3 + } + return +__3: + ; + if !(!(0 != 0) && isTemp != 0 && (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) && iDb != 1) { + goto __4 + } + // If creating a temp table, the name may not be qualified. Unless + // the database name is "temp" anyway. + Xsqlite3ErrorMsg(tls, pParse, ts+12157, 0) + return +__4: + ; + if !(!(0 != 0) && isTemp != 0) { + goto __5 + } + iDb = 1 +__5: + ; + zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */))) + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __6 + } + Xsqlite3RenameTokenMap(tls, pParse, zName, *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */))) +__6: + ; +__2: + ; + (*Parse)(unsafe.Pointer(pParse)).FsNameToken = *(*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pName */)))) + if !(zName == uintptr(0)) { + goto __7 + } + return +__7: + ; + if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { + if isView != 0 { + return ts + 10367 + } + return ts + 8752 + }(), zName) != 0) { + goto __8 + } + goto begin_table_error +__8: + ; + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) == 1) { + goto __9 + } + isTemp = 1 +__9: + ; + + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { + if !(0 != 0) && isTemp == 1 { + return ts + 12024 + } + return ts + 5835 + }(), uintptr(0), zDb) != 0) { + goto __10 + } + goto begin_table_error +__10: + ; + if !(!(isVirtual != 0) && Xsqlite3AuthCheck(tls, pParse, int32(aCode[isTemp+2*isView]), + zName, uintptr(0), zDb) != 0) { + goto __11 + } + goto begin_table_error +__11: + ; + + // Make sure the new table name does not collide with an existing + // index or table name in the same database. Issue an error message if + // it does. The exception is if the statement being parsed was passed + // to an sqlite3_declare_vtab() call. In that case only the column names + // and types will be used, so there is no need to test for namespace + // collisions. + if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) { + goto __12 + } + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { + goto __13 + } + goto begin_table_error +__13: + ; + pTable = Xsqlite3FindTable(tls, db, zName, zDb1) + if !(pTable != 0) { + goto __14 + } + if !!(noErr != 0) { + goto __15 + } + Xsqlite3ErrorMsg(tls, pParse, ts+12198, + libc.VaList(bp, func() uintptr { + if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { + return ts + 10367 /* "view" */ + } + return ts + 8752 /* "table" */ + }(), *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */)))) + goto __16 +__15: + ; + Xsqlite3CodeVerifySchema(tls, pParse, iDb) + sqlite3ForceNotReadOnly(tls, pParse) +__16: + ; + goto begin_table_error +__14: + ; + if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { + goto __17 + } + Xsqlite3ErrorMsg(tls, pParse, ts+12219, libc.VaList(bp+16, zName)) + goto begin_table_error +__17: + ; +__12: + ; + + pTable = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) + if !(pTable == uintptr(0)) { + goto __18 + } + + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + goto begin_table_error +__18: + ; + (*Table)(unsafe.Pointer(pTable)).FzName = zName + (*Table)(unsafe.Pointer(pTable)).FiPKey = int16(-1) + (*Table)(unsafe.Pointer(pTable)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + (*Table)(unsafe.Pointer(pTable)).FnTabRef = U32(1) + (*Table)(unsafe.Pointer(pTable)).FnRowLogEst = int16(200) + + (*Parse)(unsafe.Pointer(pParse)).FpNewTable = pTable + + // Begin generating the code that will insert the table record into + // the schema table. Note in particular that we must go ahead + // and allocate the record number for the table entry now. Before any + // PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause + // indices to be created and the table record must come before the + // indices. Hence, the record number for the table must be allocated + // now. + if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) && libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0)) { + goto __19 + } + Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) + + if !(isVirtual != 0) { + goto __20 + } + Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) +__20: + ; + + // If the file format and encoding in the database have not been set, + // set them now. + reg1 = libc.AssignPtrInt32(pParse+120, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+124, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg3 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp3(tls, v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT) + Xsqlite3VdbeUsesBtree(tls, v, iDb) + addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_If, reg3) + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LegacyFileFmt) != uint64(0) { + fileFormat = 1 + } else { + fileFormat = SQLITE_MAX_FILE_FORMAT + } + Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, fileFormat) + Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) + Xsqlite3VdbeJumpHere(tls, v, addr1) + + // This just creates a place-holder record in the sqlite_schema table. + // The record created does not contain anything yet. It will be replaced + // by the real entry in code generated at sqlite3EndTable(). + // + // The rowid for the new entry is left in register pParse->regRowid. + // The root page number of the new table is left in reg pParse->regRoot. + // The rowid and root page number values are needed by the code that + // sqlite3EndTable will generate. + if !(isView != 0 || isVirtual != 0) { + goto __21 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, reg2) + goto __22 +__21: + ; + *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) +__22: + ; + Xsqlite3OpenSchemaTable(tls, pParse, iDb) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, 0, reg1) + Xsqlite3VdbeAddOp4(tls, v, OP_Blob, 6, reg3, 0, uintptr(unsafe.Pointer(&nullRow)), -1) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, 0, reg3, reg1) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) + Xsqlite3VdbeAddOp0(tls, v, OP_Close) +__19: + ; + + // Normal (non-error) return. + return + + // If an error occurs, we jump here +begin_table_error: + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + Xsqlite3DbFree(tls, db, zName) + return +} + +var aCode = [4]U8{ + U8(SQLITE_CREATE_TABLE), + U8(SQLITE_CREATE_TEMP_TABLE), + U8(SQLITE_CREATE_VIEW), + U8(SQLITE_CREATE_TEMP_VIEW), +} /* sqlite3.c:115149:21 */ +var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:115228:23 */ + +// Set properties of a table column based on the (magical) +// name of the column. + +// Name of the special TEMP trigger used to implement RETURNING. The +// name begins with "sqlite_" so that it is guaranteed not to collide +// with any application-generated triggers. + +// Clean up the data structures associated with the RETURNING clause. +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ + var pHash uintptr + pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 + Xsqlite3HashInsert(tls, pHash, ts+12254, uintptr(0)) + Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) + Xsqlite3DbFree(tls, db, pRet) +} + +// Add the RETURNING clause to the parse currently underway. +// +// This routine creates a special TEMP trigger that will fire for each row +// of the DML statement. That TEMP trigger contains a single SELECT +// statement with a result set that is the argument of the RETURNING clause. +// The trigger has the Trigger.bReturning flag and an opcode of +// TK_RETURNING instead of TK_SELECT, so that the trigger code generator +// knows to handle it specially. The TEMP trigger is automatically +// removed at the end of the parse. +// +// When this routine is called, we do not yet know if the RETURNING clause +// is attached to a DELETE, INSERT, or UPDATE, so construct it as a +// RETURNING trigger instead. It will then be converted into the appropriate +// type on the first call to sqlite3TriggersExist(). +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ + var pRet uintptr + var pHash uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+12271, 0) + } else { + + } + (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) + pRet = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Returning{}))) + if pRet == uintptr(0) { + Xsqlite3ExprListDelete(tls, db, pList) + return + } + *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse + (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{sqlite3DeleteReturning})), pRet) + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return + } + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12254 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) + (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpSchema + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FpTabSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpSchema + (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fstep_list = pRet + 88 + (*Returning)(unsafe.Pointer(pRet)).FretTStep.Fop = U8(TK_RETURNING) + (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpTrig = pRet + 16 + (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList + pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 + + if Xsqlite3HashInsert(tls, pHash, ts+12254, pRet+16) == + pRet+16 { + Xsqlite3OomFault(tls, db) + } +} + +// Add a new column to the table currently being constructed. +// +// The parser calls this routine once for each column declaration +// in a CREATE TABLE statement. sqlite3StartTable() gets called +// first to get things going. Then this routine is called for each +// column. +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ + bp := tls.Alloc(48) + defer tls.Free(48) + *(*Token)(unsafe.Pointer(bp + 16)) = sName + *(*Token)(unsafe.Pointer(bp + 32)) = sType + + var p uintptr + var i int32 + var z uintptr + var zType uintptr + var pCol uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var hName U8 + var aNew uintptr + var eType U8 = U8(COLTYPE_CUSTOM) + var szEst U8 = U8(1) + var affinity uint8 = uint8(SQLITE_AFF_BLOB) + + if libc.AssignUintptr(&p, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { + return + } + if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { + Xsqlite3ErrorMsg(tls, pParse, ts+12305, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + return + } + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + Xsqlite3DequoteToken(tls, bp+16) + } + + // Because keywords GENERATE ALWAYS can be converted into indentifiers + // by the parser, we can sometimes end up with a typename that ends + // with "generated always". Check for this case and omit the surplus + // text. + if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12328, 6) == 0 { + *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) + for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { + (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- + } + if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12335, 9) == 0 { + *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) + for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { + (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- + } + } + } + + // Check for standard typenames. For standard typenames we will + // set the Column.eType field rather than storing the typename after + // the column name, in order to save space. + if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(3) { + Xsqlite3DequoteToken(tls, bp+32) + for i = 0; i < SQLITE_N_STDTYPE; i++ { + if (*Token)(unsafe.Pointer(bp+32)).Fn == uint32(Xsqlite3StdTypeLen[i]) && + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz, Xsqlite3StdType[i], int32((*Token)(unsafe.Pointer(bp+32)).Fn)) == 0 { + (*Token)(unsafe.Pointer(bp + 32 /* &sType */)).Fn = uint32(0) + eType = U8(i + 1) + affinity = Xsqlite3StdTypeAffinity[i] + if int32(affinity) <= SQLITE_AFF_TEXT { + szEst = U8(5) + } + break + } + } + } + + z = Xsqlite3DbMallocRaw(tls, db, uint64(I64((*Token)(unsafe.Pointer(bp+16)).Fn)+int64(1)+I64((*Token)(unsafe.Pointer(bp+32)).Fn)+I64(libc.Bool32((*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0))))) + if z == uintptr(0) { + return + } + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameTokenMap(tls, pParse, z, bp+16) + } + libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fz, uint64((*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fn)) + *(*uint8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fn))) = uint8(0) + Xsqlite3Dequote(tls, z) + hName = Xsqlite3StrIHash(tls, z) + for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+12345, libc.VaList(bp+8, z)) + Xsqlite3DbFree(tls, db, z) + return + } + } + aNew = Xsqlite3DbRealloc(tls, db, (*Table)(unsafe.Pointer(p)).FaCol, uint64(I64((*Table)(unsafe.Pointer(p)).FnCol)+int64(1))*uint64(unsafe.Sizeof(Column{}))) + if aNew == uintptr(0) { + Xsqlite3DbFree(tls, db, z) + return + } + (*Table)(unsafe.Pointer(p)).FaCol = aNew + pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr((*Table)(unsafe.Pointer(p)).FnCol)*24 + libc.Xmemset(tls, pCol, 0, uint64(unsafe.Sizeof(Column{}))) + (*Column)(unsafe.Pointer(pCol)).FzCnName = z + (*Column)(unsafe.Pointer(pCol)).FhName = hName + + if (*Token)(unsafe.Pointer(bp+32)).Fn == uint32(0) { + // If there is no type specified, columns have the default affinity + // 'BLOB' with a default size of 4 bytes. + (*Column)(unsafe.Pointer(pCol)).Faffinity = affinity + libc.SetBitFieldPtr8Uint32(pCol+8, uint32(eType), 4, 0xf0) + (*Column)(unsafe.Pointer(pCol)).FszEst = szEst + } else { + zType = z + uintptr(Xsqlite3Strlen30(tls, z)) + uintptr(1) + libc.Xmemcpy(tls, zType, (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fz, uint64((*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn)) + *(*uint8)(unsafe.Pointer(zType + uintptr((*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn))) = uint8(0) + Xsqlite3Dequote(tls, zType) + (*Column)(unsafe.Pointer(pCol)).Faffinity = Xsqlite3AffinityType(tls, zType, pCol) + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_HASTYPE) + } + (*Table)(unsafe.Pointer(p)).FnCol++ + (*Table)(unsafe.Pointer(p)).FnNVCol++ + (*Parse)(unsafe.Pointer(pParse)).FconstraintName.Fn = uint32(0) +} + +// This routine is called by the parser while in the middle of +// parsing a CREATE TABLE statement. A "NOT NULL" constraint has +// been seen on a column. This routine sets the notNull flag on +// the column currently under construction. +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ + var p uintptr + var pCol uintptr + p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + if p == uintptr(0) || int32((*Table)(unsafe.Pointer(p)).FnCol) < 1 { + return + } + pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 + libc.SetBitFieldPtr8Uint32(pCol+8, uint32(U8(onError)), 0, 0xf) + *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_HasNotNull) + + // Set the uniqNotNull flag on any UNIQUE or PK indexes already created + // on this column. + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_UNIQUE != 0 { + var pIdx uintptr + for pIdx = (*Table)(unsafe.Pointer(p)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn))) == int32((*Table)(unsafe.Pointer(p)).FnCol)-1 { + libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 3, 0x8) + } + } + } +} + +// Scan the column type name zType (length nType) and return the +// associated affinity type. +// +// This routine does a case-independent search of zType for the +// substrings in the following table. If one of the substrings is +// found, the corresponding affinity is returned. If zType contains +// more than one of the substrings, entries toward the top of +// the table take priority. For example, if zType is 'BLOBINT', +// SQLITE_AFF_INTEGER is returned. +// +// Substring | Affinity +// -------------------------------- +// 'INT' | SQLITE_AFF_INTEGER +// 'CHAR' | SQLITE_AFF_TEXT +// 'CLOB' | SQLITE_AFF_TEXT +// 'TEXT' | SQLITE_AFF_TEXT +// 'BLOB' | SQLITE_AFF_BLOB +// 'REAL' | SQLITE_AFF_REAL +// 'FLOA' | SQLITE_AFF_REAL +// 'DOUB' | SQLITE_AFF_REAL +// +// If none of the substrings in the above table are found, +// SQLITE_AFF_NUMERIC is returned. +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:115545:21: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var h U32 = U32(0) + var aff uint8 = uint8(SQLITE_AFF_NUMERIC) + var zChar uintptr = uintptr(0) + + for *(*uint8)(unsafe.Pointer(zIn)) != 0 { + h = h<<8 + U32(Xsqlite3UpperToLower[int32(*(*uint8)(unsafe.Pointer(zIn)))&0xff]) + zIn++ + if h == U32(int32('c')<<24+int32('h')<<16+int32('a')<<8+'r') { // CHAR + aff = uint8(SQLITE_AFF_TEXT) + zChar = zIn + } else if h == U32(int32('c')<<24+int32('l')<<16+int32('o')<<8+'b') { // CLOB + aff = uint8(SQLITE_AFF_TEXT) + } else if h == U32(int32('t')<<24+int32('e')<<16+int32('x')<<8+'t') { // TEXT + aff = uint8(SQLITE_AFF_TEXT) + } else if h == U32(int32('b')<<24+int32('l')<<16+int32('o')<<8+'b') && + (int32(aff) == SQLITE_AFF_NUMERIC || int32(aff) == SQLITE_AFF_REAL) { + aff = uint8(SQLITE_AFF_BLOB) + if int32(*(*uint8)(unsafe.Pointer(zIn))) == '(' { + zChar = zIn + } + } else if h == U32(int32('r')<<24+int32('e')<<16+int32('a')<<8+'l') && + int32(aff) == SQLITE_AFF_NUMERIC { + aff = uint8(SQLITE_AFF_REAL) + } else if h == U32(int32('f')<<24+int32('l')<<16+int32('o')<<8+'a') && + int32(aff) == SQLITE_AFF_NUMERIC { + aff = uint8(SQLITE_AFF_REAL) + } else if h == U32(int32('d')<<24+int32('o')<<16+int32('u')<<8+'b') && + int32(aff) == SQLITE_AFF_NUMERIC { + aff = uint8(SQLITE_AFF_REAL) + } else if h&U32(0x00FFFFFF) == U32(int32('i')<<16+int32('n')<<8+'t') { // INT + aff = uint8(SQLITE_AFF_INTEGER) + break + } + } + + // If pCol is not NULL, store an estimate of the field size. The + // estimate is scaled so that the size of an integer is 1. + if pCol != 0 { + *(*int32)(unsafe.Pointer(bp /* v */)) = 0 // default size is approx 4 bytes + if int32(aff) < SQLITE_AFF_NUMERIC { + if zChar != 0 { + for *(*uint8)(unsafe.Pointer(zChar)) != 0 { + if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zChar)))])&0x04 != 0 { + // BLOB(k), VARCHAR(k), CHAR(k) -> r=(k/4+1) + Xsqlite3GetInt32(tls, zChar, bp) + break + } + zChar++ + } + } else { + *(*int32)(unsafe.Pointer(bp /* v */)) = 16 // BLOB, TEXT, CLOB -> r=5 (approx 20 bytes) + } + } + *(*int32)(unsafe.Pointer(bp /* v */)) = *(*int32)(unsafe.Pointer(bp))/4 + 1 + if *(*int32)(unsafe.Pointer(bp)) > 255 { + *(*int32)(unsafe.Pointer(bp /* v */)) = 255 + } + (*Column)(unsafe.Pointer(pCol)).FszEst = U8(*(*int32)(unsafe.Pointer(bp /* v */))) + } + return aff +} + +// The expression is the default value for the most recently added column +// of the table currently under construction. +// +// Default value expressions must be constant. Raise an exception if this +// is not the case. +// +// This routine is called by the parser while in the middle of +// parsing a CREATE TABLE statement. +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var p uintptr + var pCol uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + if p != uintptr(0) { + var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) + pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 + if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { + Xsqlite3ErrorMsg(tls, pParse, ts+12371, + libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { + + Xsqlite3ErrorMsg(tls, pParse, ts+12416, 0) + } else { + // A copy of pExpr is used instead of the original, as pExpr contains + // tokens that point to volatile memory. + // var x Expr at bp+8, 72 + + var pDfltExpr uintptr + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fop = U8(TK_SPAN) + *(*uintptr)(unsafe.Pointer(bp + 8 + 8)) = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) + (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).FpLeft = pExpr + (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fflags = U32(EP_Skip) + pDfltExpr = Xsqlite3ExprDup(tls, db, bp+8, EXPRDUP_REDUCE) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 + 8))) + Xsqlite3ColumnSetExpr(tls, pParse, p, pCol, pDfltExpr) + } + } + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameExprUnmap(tls, pParse, pExpr) + } + Xsqlite3ExprDelete(tls, db, pExpr) +} + +// Backwards Compatibility Hack: +// +// Historical versions of SQLite accepted strings as column names in +// indexes and PRIMARY KEY constraints and in UNIQUE constraints. Example: +// +// CREATE TABLE xyz(a,b,c,d,e,PRIMARY KEY('a'),UNIQUE('b','c' COLLATE trim) +// CREATE INDEX abc ON xyz('c','d' DESC,'e' COLLATE nocase DESC); +// +// This is goofy. But to preserve backwards compatibility we continue to +// accept it. This routine does the necessary conversion. It converts +// the expression given in its argument from a TK_STRING into a TK_ID +// if the expression is just a TK_STRING with an optional COLLATE clause. +// If the expression is anything other than TK_STRING, the expression is +// unchanged. +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { + (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) + } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { + (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop = U8(TK_ID) + } +} + +// Tag the given column as being part of the PRIMARY KEY +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { + + Xsqlite3ErrorMsg(tls, pParse, + ts+12457, 0) + } +} + +// Designate the PRIMARY KEY for the table. pList is a list of names +// of columns that form the primary key. If pList is NULL, then the +// most recently added column of the table is the primary key. +// +// A table can have at most one primary key. If the table already has +// a primary key (and this is the second primary key) then create an +// error. +// +// If the PRIMARY KEY is on a single column whose datatype is INTEGER, +// then we will try to use that column as the rowid. Set the Table.iPKey +// field of the table under construction to be the index of the +// INTEGER PRIMARY KEY column. Table.iPKey is set to -1 if there is +// no INTEGER PRIMARY KEY. +// +// If the key is not an INTEGER PRIMARY KEY, then create a unique +// index for the key. No index is created for INTEGER PRIMARY KEYs. +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pTab uintptr + var pCol uintptr + var iCol int32 + var i int32 + var nTerm int32 + var zCName uintptr + var pCExpr uintptr + var pCExpr1 uintptr + pTab = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + pCol = uintptr(0) + iCol = -1 + if !(pTab == uintptr(0)) { + goto __1 + } + goto primary_key_exit +__1: + ; + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasPrimaryKey) != 0) { + goto __2 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+12509, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto primary_key_exit +__2: + ; + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasPrimaryKey) + if !(pList == uintptr(0)) { + goto __3 + } + iCol = int32((*Table)(unsafe.Pointer(pTab)).FnCol) - 1 + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 + makeColumnPartOfPrimaryKey(tls, pParse, pCol) + nTerm = 1 + goto __4 +__3: + nTerm = (*ExprList)(unsafe.Pointer(pList)).FnExpr + i = 0 +__5: + if !(i < nTerm) { + goto __7 + } + pCExpr = Xsqlite3ExprSkipCollate(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr) + + sqlite3StringToId(tls, pCExpr) + if !(int32((*Expr)(unsafe.Pointer(pCExpr)).Fop) == TK_ID) { + goto __8 + } + + zCName = *(*uintptr)(unsafe.Pointer(pCExpr + 8)) + iCol = 0 +__9: + if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __11 + } + if !(Xsqlite3StrICmp(tls, zCName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName) == 0) { + goto __12 + } + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 + makeColumnPartOfPrimaryKey(tls, pParse, pCol) + goto __11 +__12: + ; + goto __10 +__10: + iCol++ + goto __9 + goto __11 +__11: + ; +__8: + ; + goto __6 +__6: + i++ + goto __5 + goto __7 +__7: + ; +__4: + ; + if !(nTerm == 1 && + pCol != 0 && + int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_INTEGER && + sortOrder != SQLITE_SO_DESC) { + goto __13 + } + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && pList != 0) { + goto __15 + } + pCExpr1 = Xsqlite3ExprSkipCollate(tls, (*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr) + Xsqlite3RenameTokenRemap(tls, pParse, pTab+52, pCExpr1) +__15: + ; + (*Table)(unsafe.Pointer(pTab)).FiPKey = I16(iCol) + (*Table)(unsafe.Pointer(pTab)).FkeyConf = U8(onError) + + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(autoInc * TF_Autoincrement) + if !(pList != 0) { + goto __16 + } + (*Parse)(unsafe.Pointer(pParse)).FiPkSortOrder = (*ExprList_item)(unsafe.Pointer(pList + 8)).FsortFlags +__16: + ; + Xsqlite3HasExplicitNulls(tls, pParse, pList) + goto __14 +__13: + if !(autoInc != 0) { + goto __17 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+12550, 0) + goto __18 +__17: + Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), + uintptr(0), sortOrder, 0, uint8(SQLITE_IDXTYPE_PRIMARYKEY)) + pList = uintptr(0) +__18: + ; +__14: + ; + +primary_key_exit: + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList) + return +} + +// Add a new CHECK constraint to the table currently under construction. +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pTab uintptr = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if pTab != 0 && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) && + !(Xsqlite3BtreeIsReadonly(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*32)).FpBt) != 0) { + (*Table)(unsafe.Pointer(pTab)).FpCheck = Xsqlite3ExprListAppend(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pCheckExpr) + if (*Parse)(unsafe.Pointer(pParse)).FconstraintName.Fn != 0 { + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+96, 1) + } else { + // var t Token at bp, 16 + + for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { + } + for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zEnd + libc.UintptrFromInt32(-1))))])&0x01 != 0 { + zEnd-- + } + (*Token)(unsafe.Pointer(bp /* &t */)).Fz = zStart + (*Token)(unsafe.Pointer(bp /* &t */)).Fn = uint32(int32((int64(zEnd) - int64((*Token)(unsafe.Pointer(bp)).Fz)) / 1)) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, bp, 1) + } + } else { + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCheckExpr) + } +} + +// Set the collation function of the most recently parsed table column +// to the CollSeq given. +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ + var p uintptr + var i int32 + var zColl uintptr // Dequoted name of collation sequence + var db uintptr + + if libc.AssignUintptr(&p, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + return + } + i = int32((*Table)(unsafe.Pointer(p)).FnCol) - 1 + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + zColl = Xsqlite3NameFromToken(tls, db, pToken) + if !(zColl != 0) { + return + } + + if Xsqlite3LocateCollSeq(tls, pParse, zColl) != 0 { + var pIdx uintptr + Xsqlite3ColumnSetColl(tls, db, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24, zColl) + + // If the column is declared as " PRIMARY KEY COLLATE ", + // then an index may have been created on this column before the + // collation type was added. Correct this if it is the case. + for pIdx = (*Table)(unsafe.Pointer(p)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn))) == i { + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl)) = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24) + } + } + } + Xsqlite3DbFree(tls, db, zColl) +} + +// Change the most recently parsed column to be a GENERATED ALWAYS AS +// column. +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var eType U8 + var pTab uintptr + var pCol uintptr + eType = U8(COLFLAG_VIRTUAL) + pTab = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + if !(pTab == uintptr(0)) { + goto __1 + } + // generated column in an CREATE TABLE IF NOT EXISTS that already exists + goto generated_done +__1: + ; + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1)*24 + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { + goto __2 + } + Xsqlite3ErrorMsg(tls, pParse, ts+12606, 0) + goto generated_done +__2: + ; + if !(int32((*Column)(unsafe.Pointer(pCol)).FiDflt) > 0) { + goto __3 + } + goto generated_error +__3: + ; + if !(pType != 0) { + goto __4 + } + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12649, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + goto __5 + } + // no-op + goto __6 +__5: + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12657, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + goto __7 + } + eType = U8(COLFLAG_STORED) + goto __8 +__7: + goto generated_error +__8: + ; +__6: + ; +__4: + ; + if !(int32(eType) == COLFLAG_VIRTUAL) { + goto __9 + } + (*Table)(unsafe.Pointer(pTab)).FnNVCol-- +__9: + ; + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(int32(eType)) + + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(eType) + if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0) { + goto __10 + } + makeColumnPartOfPrimaryKey(tls, pParse, pCol) // For the error message +__10: + ; + Xsqlite3ColumnSetExpr(tls, pParse, pTab, pCol, pExpr) + pExpr = uintptr(0) + goto generated_done + +generated_error: + Xsqlite3ErrorMsg(tls, pParse, ts+12664, + libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) +generated_done: + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) +} + +// Generate code that will increment the schema cookie. +// +// The schema cookie is used to determine when the schema for the +// database changes. After each schema change, the cookie value +// changes. When a process first reads the schema it records the +// cookie. Thereafter, whenever it goes to access the database, +// it checks the cookie to make sure the schema has not changed +// since it was last read. +// +// This plan is not completely bullet-proof. It is possible for +// the schema to change multiple times and for the cookie to be +// set back to prior value. But schema changes are infrequent +// and the probability of hitting the same cookie value is only +// 1 chance in 2^32. So we're safe enough. +// +// IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments +// the schema-version whenever the schema changes. +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_SCHEMA_VERSION, + int32(uint32(1)+uint32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).Fschema_cookie))) +} + +// Measure the number of characters needed to output the given +// identifier. The number returned includes any quotes used +// but does not include the null terminator. +// +// The estimate is conservative. It might be larger that what is +// really needed. +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ + var n int32 + n = 0 +__1: + if !(*(*uint8)(unsafe.Pointer(z)) != 0) { + goto __3 + } + { + if int32(*(*uint8)(unsafe.Pointer(z))) == '"' { + n++ + } + + } + goto __2 +__2: + n++ + z++ + goto __1 + goto __3 +__3: + ; + return n + 2 +} + +// The first parameter is a pointer to an output buffer. The second +// parameter is a pointer to an integer that contains the offset at +// which to write into the output buffer. This function copies the +// nul-terminated string pointed to by the third parameter, zSignedIdent, +// to the specified offset in the buffer and updates *pIdx to refer +// to the first byte after the last byte written before returning. +// +// If the string zSignedIdent consists entirely of alpha-numeric +// characters, does not begin with a digit and is not an SQL keyword, +// then it is copied to the output buffer exactly as it is. Otherwise, +// it is quoted using double-quotes. +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ + var zIdent uintptr = zSignedIdent + var i int32 + var j int32 + var needQuote int32 + i = *(*int32)(unsafe.Pointer(pIdx)) + + for j = 0; *(*uint8)(unsafe.Pointer(zIdent + uintptr(j))) != 0; j++ { + if !(int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))])&0x06 != 0) && int32(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) != '_' { + break + } + } + needQuote = libc.Bool32(int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zIdent))])&0x04 != 0 || + Xsqlite3KeywordCode(tls, zIdent, j) != TK_ID || + int32(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) != 0 || + j == 0) + + if needQuote != 0 { + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('"') + } + for j = 0; *(*uint8)(unsafe.Pointer(zIdent + uintptr(j))) != 0; j++ { + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) + if int32(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) == '"' { + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('"') + } + } + if needQuote != 0 { + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('"') + } + *(*uint8)(unsafe.Pointer(z + uintptr(i))) = uint8(0) + *(*int32)(unsafe.Pointer(pIdx)) = i +} + +// Generate a CREATE TABLE statement appropriate for the given +// table. Memory to hold the text of the statement is obtained +// from sqliteMalloc() and must be freed by the calling function. +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var i int32 + // var k int32 at bp+8, 4 + + var n int32 + var zStmt uintptr + var zSep uintptr + var zSep2 uintptr + var zEnd uintptr + var pCol uintptr + n = 0 + pCol = (*Table)(unsafe.Pointer(p)).FaCol + i = 0 +__1: + if !(i < int32((*Table)(unsafe.Pointer(p)).FnCol)) { + goto __3 + } + { + n = n + (identLength(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName) + 5) + + } + goto __2 +__2: + i++ + pCol += 24 + goto __1 + goto __3 +__3: + ; + n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) + if n < 50 { + zSep = ts + 1525 /* "" */ + zSep2 = ts + 12695 /* "," */ + zEnd = ts + 4899 /* ")" */ + } else { + zSep = ts + 12697 /* "\n " */ + zSep2 = ts + 12701 /* ",\n " */ + zEnd = ts + 12706 /* "\n)" */ + } + n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) + zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) + if zStmt == uintptr(0) { + Xsqlite3OomFault(tls, db) + return uintptr(0) + } + Xsqlite3_snprintf(tls, n, zStmt, ts+12709, 0) + *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) + identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) + *(*uint8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = uint8('(') + pCol = (*Table)(unsafe.Pointer(p)).FaCol + i = 0 +__4: + if !(i < int32((*Table)(unsafe.Pointer(p)).FnCol)) { + goto __6 + } + { + var len int32 + var zType uintptr + + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), zSep, 0) + *(*int32)(unsafe.Pointer(bp + 8 /* k */)) += Xsqlite3Strlen30(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))) + zSep = zSep2 + identPut(tls, zStmt, bp+8, (*Column)(unsafe.Pointer(pCol)).FzCnName) + + zType = azType1[int32((*Column)(unsafe.Pointer(pCol)).Faffinity)-SQLITE_AFF_BLOB] + len = Xsqlite3Strlen30(tls, zType) + + libc.Xmemcpy(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), zType, uint64(len)) + *(*int32)(unsafe.Pointer(bp + 8 /* k */)) += len + + } + goto __5 +__5: + i++ + pCol += 24 + goto __4 + goto __6 +__6: + ; + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3605, libc.VaList(bp, zEnd)) + return zStmt +} + +var azType1 = [5]uintptr{ + ts + 1525, + ts + 12723, + ts + 12729, + ts + 12734, + ts + 12739, +} /* sqlite3.c:116029:23 */ + +// Resize an Index object to hold N columns total. Return SQLITE_OK +// on success and SQLITE_NOMEM on an OOM error. +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ + var zExtra uintptr + var nByte int32 + if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { + return SQLITE_OK + } + + nByte = int32((uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(LogEst(0))) + uint64(unsafe.Sizeof(I16(0))) + uint64(1)) * uint64(N)) + zExtra = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) + if zExtra == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FazColl, uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Index)(unsafe.Pointer(pIdx)).FnColumn)) + (*Index)(unsafe.Pointer(pIdx)).FazColl = zExtra + zExtra += uintptr(uint64(unsafe.Sizeof(uintptr(0))) * uint64(N)) + libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst, uint64(unsafe.Sizeof(LogEst(0)))*uint64(int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)+1)) + (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst = zExtra + zExtra += uintptr(uint64(unsafe.Sizeof(LogEst(0))) * uint64(N)) + libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FaiColumn, uint64(unsafe.Sizeof(I16(0)))*uint64((*Index)(unsafe.Pointer(pIdx)).FnColumn)) + (*Index)(unsafe.Pointer(pIdx)).FaiColumn = zExtra + zExtra += uintptr(uint64(unsafe.Sizeof(I16(0))) * uint64(N)) + libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FaSortOrder, uint64((*Index)(unsafe.Pointer(pIdx)).FnColumn)) + (*Index)(unsafe.Pointer(pIdx)).FaSortOrder = zExtra + (*Index)(unsafe.Pointer(pIdx)).FnColumn = U16(N) + libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 4, 0x10) + return SQLITE_OK +} + +// Estimate the total row width for a table. +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ + var wTable uint32 = uint32(0) + var pTabCol uintptr + var i int32 + i = int32((*Table)(unsafe.Pointer(pTab)).FnCol) + pTabCol = (*Table)(unsafe.Pointer(pTab)).FaCol +__1: + if !(i > 0) { + goto __3 + } + { + wTable = wTable + uint32((*Column)(unsafe.Pointer(pTabCol)).FszEst) + + } + goto __2 +__2: + i-- + pTabCol += 24 + goto __1 + goto __3 +__3: + ; + if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) < 0 { + wTable++ + } + (*Table)(unsafe.Pointer(pTab)).FszTabRow = Xsqlite3LogEst(tls, uint64(wTable*uint32(4))) +} + +// Estimate the average size of a row for an index. +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ + var wIndex uint32 = uint32(0) + var i int32 + var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var x I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) + + wIndex = wIndex + func() uint32 { + if int32(x) < 0 { + return uint32(1) + } + return uint32((*Column)(unsafe.Pointer(aCol + uintptr(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)))*24)).FszEst) + }() + } + (*Index)(unsafe.Pointer(pIdx)).FszIdxRow = Xsqlite3LogEst(tls, uint64(wIndex*uint32(4))) +} + +// Return true if column number x is any of the first nCol entries of aiCol[]. +// This is used to determine if the column number x appears in any of the +// first nCol entries of an index. +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ + for libc.PostDecInt32(&nCol, 1) > 0 { + if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { + return 1 + } + } + return 0 +} + +// Return true if any of the first nKey entries of index pIdx exactly +// match the iCol-th entry of pPk. pPk is always a WITHOUT ROWID +// PRIMARY KEY index. pIdx is an index on the same table. pIdx may +// or may not be the same index as pPk. +// +// The first nKey entries of pIdx are guaranteed to be ordinary columns, +// not a rowid or expression. +// +// This routine differs from hasColumn() in that both the column and the +// collating sequence must match for this routine, but for hasColumn() only +// the column name must match. +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ + var i int32 + var j int32 + + j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(iCol)*2))) + + for i = 0; i < nKey; i++ { + + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) == j && + Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(iCol)*8))) == 0 { + return 1 + } + } + return 0 +} + +// Recompute the colNotIdxed field of the Index. +// +// colNotIdxed is a bitmask that has a 0 bit representing each indexed +// columns that are within the first 63 columns of the table. The +// high-order bit of colNotIdxed is always 1. All unindexed columns +// of the table have a 1. +// +// 2019-10-24: For the purpose of this computation, virtual columns are +// not considered to be covered by the index, even if they are in the +// index, because we do not trust the logic in whereIndexExprTrans() to be +// able to find all instances of a reference to the indexed table column +// and convert them into references to the index. Hence we always want +// the actual table at hand in order to recompute the virtual column, if +// necessary. +// +// The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask +// to determine if the index is covering index. +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ + var m Bitmask = uint64(0) + var j int32 + var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable + for j = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) - 1; j >= 0; j-- { + var x int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) + if x >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(x)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + + if x < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + m = m | Bitmask(uint64(1))<>1) != 0) { + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 && + int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + 8))&0xf>>0) == OE_None { + libc.SetBitFieldPtr8Uint32((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24+8, uint32(OE_Abort), 0, 0xf) + } + } + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) + } + + // Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY + // into BTREE_BLOBKEY. + + if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { + + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + } + + // Locate the PRIMARY KEY index. Or, if this table was originally + // an INTEGER PRIMARY KEY table, create a new PRIMARY KEY index. + if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { + var pList uintptr + // var ipkToken Token at bp, 16 + + Xsqlite3TokenInit(tls, bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName) + pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp, 0)) + if pList == uintptr(0) { + *(*U32)(unsafe.Pointer(pTab + 48)) &= libc.Uint32FromInt32(libc.CplInt32(TF_WithoutRowid)) + return + } + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameTokenRemap(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr, pTab+52) + } + (*ExprList_item)(unsafe.Pointer(pList + 8)).FsortFlags = (*Parse)(unsafe.Pointer(pParse)).FiPkSortOrder + + (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) + Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, int32((*Table)(unsafe.Pointer(pTab)).FkeyConf), uintptr(0), uintptr(0), 0, 0, + uint8(SQLITE_IDXTYPE_PRIMARYKEY)) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + *(*U32)(unsafe.Pointer(pTab + 48)) &= libc.Uint32FromInt32(libc.CplInt32(TF_WithoutRowid)) + return + } + + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + + } else { + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + + // Remove all redundant columns from the PRIMARY KEY. For example, change + // "PRIMARY KEY(a,b,a,b,c,b,c,d)" into just "PRIMARY KEY(a,b,c,d)". Later + // code assumes the PRIMARY KEY contains no repeated columns. + for i = libc.AssignInt32(&j, 1); i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); i++ { + if isDupColumn(tls, pPk, j, pPk, i) != 0 { + (*Index)(unsafe.Pointer(pPk)).FnColumn-- + } else { + + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8)) + *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(j))) = *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(i))) + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(libc.PostIncInt32(&j, 1))*2)) = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)) + } + } + (*Index)(unsafe.Pointer(pPk)).FnKeyCol = U16(j) + } + + libc.SetBitFieldPtr16Uint32(pPk+100, uint32(1), 5, 0x20) + if !(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x2>>1) != 0) { + libc.SetBitFieldPtr16Uint32(pPk+100, uint32(1), 3, 0x8) + } + nPk = int32(libc.AssignPtrUint16(pPk+96, (*Index)(unsafe.Pointer(pPk)).FnKeyCol)) + + // Bypass the creation of the PRIMARY KEY btree and the sqlite_schema + // table entry. This is only required if currently generating VDBE + // code for a CREATE TABLE (not when parsing one as part of reading + // a database schema). + if v != 0 && (*Index)(unsafe.Pointer(pPk)).Ftnum > Pgno(0) { + + Xsqlite3VdbeChangeOpcode(tls, v, int32((*Index)(unsafe.Pointer(pPk)).Ftnum), uint8(OP_Goto)) + } + + // The root page of the PRIMARY KEY is the table root page + (*Index)(unsafe.Pointer(pPk)).Ftnum = (*Table)(unsafe.Pointer(pTab)).Ftnum + + // Update the in-memory representation of all UNIQUE indices by converting + // the final rowid column into one or more columns of the PRIMARY KEY. + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + var n int32 + if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + continue + } + for i = libc.AssignInt32(&n, 0); i < nPk; i++ { + if !(isDupColumn(tls, pIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol), pPk, i) != 0) { + + n++ + } + } + if n == 0 { + // This index is a superset of the primary key + (*Index)(unsafe.Pointer(pIdx)).FnColumn = (*Index)(unsafe.Pointer(pIdx)).FnKeyCol + continue + } + if resizeIndexObject(tls, db, pIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)+n) != 0 { + return + } + i = 0 + j = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + for ; i < nPk; i++ { + if !(isDupColumn(tls, pIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol), pPk, i) != 0) { + + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)) = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)) + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8)) + if *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(i))) != 0 { + // See ticket https://www.sqlite.org/src/info/bba7b69f9849b5bf + libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 9, 0x200) + } + j++ + } + } + + } + + // Add all table columns to the PRIMARY KEY index + nExtra = 0 + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + if !(hasColumn(tls, (*Index)(unsafe.Pointer(pPk)).FaiColumn, nPk, i) != 0) && + int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + nExtra++ + } + } + if resizeIndexObject(tls, db, pPk, nPk+nExtra) != 0 { + return + } + i = 0 + j = nPk + for ; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + if !(hasColumn(tls, (*Index)(unsafe.Pointer(pPk)).FaiColumn, j, i) != 0) && + int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)) = I16(i) + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(j)*8)) = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) + j++ + } + } + + recomputeColumnsNotIndexed(tls, pPk) +} + +// Return true if pTab is a virtual table and zName is a shadow table name +// for that virtual table. +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ + var nName int32 // Length of zName + var pMod uintptr // Module for the virtual table + + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + return 0 + } + nName = Xsqlite3Strlen30(tls, (*Table)(unsafe.Pointer(pTab)).FzName) + if Xsqlite3_strnicmp(tls, zName, (*Table)(unsafe.Pointer(pTab)).FzName, nName) != 0 { + return 0 + } + if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { + return 0 + } + pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */))))) + if pMod == uintptr(0) { + return 0 + } + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FiVersion < 3 { + return 0 + } + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName == uintptr(0) { + return 0 + } + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName})).f(tls, zName+uintptr(nName)+uintptr(1)) +} + +// Table pTab is a virtual table. If it the virtual table implementation +// exists and has an xShadowName method, then loop over all other ordinary +// tables within the same schema looking for shadow tables of pTab, and mark +// any shadow tables seen using the TF_Shadow flag. +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ + var nName int32 // Length of pTab->zName + var pMod uintptr // Module for the virtual table + var k uintptr // For looping through the symbol table + + pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */))))) + if pMod == uintptr(0) { + return + } + if (*Module)(unsafe.Pointer(pMod)).FpModule == uintptr(0) { + return + } + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FiVersion < 3 { + return + } + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName == uintptr(0) { + return + } + + nName = Xsqlite3Strlen30(tls, (*Table)(unsafe.Pointer(pTab)).FzName) + for k = (*Hash)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpSchema + 8)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { + var pOther uintptr = (*HashElem)(unsafe.Pointer(k)).Fdata + + if !(int32((*Table)(unsafe.Pointer(pOther)).FeTabType) == TABTYP_NORM) { + continue + } + if (*Table)(unsafe.Pointer(pOther)).FtabFlags&U32(TF_Shadow) != 0 { + continue + } + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pOther)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, nName) == 0 && + int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pOther)).FzName + uintptr(nName)))) == '_' && + (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName})).f(tls, (*Table)(unsafe.Pointer(pOther)).FzName+uintptr(nName)+uintptr(1)) != 0 { + *(*U32)(unsafe.Pointer(pOther + 48)) |= U32(TF_Shadow) + } + } +} + +// Return true if zName is a shadow table name in the current database +// connection. +// +// zName is temporarily modified while this routine is running, but is +// restored to its original value prior to this routine returning. +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ + var zTail uintptr // Pointer to the last "_" in zName + var pTab uintptr // Table that zName is a shadow of + zTail = libc.Xstrrchr(tls, zName, '_') + if zTail == uintptr(0) { + return 0 + } + *(*uint8)(unsafe.Pointer(zTail)) = uint8(0) + pTab = Xsqlite3FindTable(tls, db, zName, uintptr(0)) + *(*uint8)(unsafe.Pointer(zTail)) = uint8('_') + if pTab == uintptr(0) { + return 0 + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + return 0 + } + return Xsqlite3IsShadowTableOf(tls, db, pTab, zName) +} + +// This routine is called to report the final ")" that terminates +// a CREATE TABLE statement. +// +// The table structure that other action routines have been building +// is added to the internal hash tables, assuming no errors have +// occurred. +// +// An entry for the table is made in the schema table on disk, unless +// this is a temporary table or db->init.busy==1. When db->init.busy==1 +// it means we are reading the sqlite_schema table because we just +// connected to the database or because the sqlite_schema table has +// recently changed, so the entry for this table already exists in +// the sqlite_schema table. We do not want to create it again. +// +// If the pSelect argument is not NULL, it means that this routine +// was called to create a table generated from a +// "CREATE TABLE ... AS SELECT ..." statement. The column names of +// the new table will match the result set of the SELECT. +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ + bp := tls.Alloc(184) + defer tls.Free(184) + + var p uintptr // The new table + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + var iDb int32 // Database in which the table lives + var pIdx uintptr // An implied index of the table + + if pEnd == uintptr(0) && pSelect == uintptr(0) { + return + } + p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + if p == uintptr(0) { + return + } + + if pSelect == uintptr(0) && Xsqlite3ShadowTableName(tls, db, (*Table)(unsafe.Pointer(p)).FzName) != 0 { + *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_Shadow) + } + + // If the db->init.busy is 1 it means we are reading the SQL off the + // "sqlite_schema" or "sqlite_temp_schema" table on the disk. + // So do not write to the disk again. Extract the root page number + // for the table from the db->init.newTnum field. (The page number + // should have been put there by the sqliteOpenCb routine.) + // + // If the root page number is 1, that means this is the sqlite_schema + // table itself. So mark it read-only. + if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { + if pSelect != 0 || !(int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM) && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+1525, 0) + return + } + (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum + if (*Table)(unsafe.Pointer(p)).Ftnum == Pgno(1) { + *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_Readonly) + } + } + + // Special processing for tables that include the STRICT keyword: + // + // * Do not allow custom column datatypes. Every column must have + // a datatype that is one of INT, INTEGER, REAL, TEXT, or BLOB. + // + // * If a PRIMARY KEY is defined, other than the INTEGER PRIMARY KEY, + // then all columns of the PRIMARY KEY must have a NOT NULL + // constraint. + if tabOpts&U32(TF_Strict) != 0 { + var ii int32 + *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_Strict) + for ii = 0; ii < int32((*Table)(unsafe.Pointer(p)).FnCol); ii++ { + var pCol uintptr = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(ii)*24 + if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+12745, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1525))) + } else { + Xsqlite3ErrorMsg(tls, pParse, ts+12778, + libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + } + return + } else if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_ANY { + (*Column)(unsafe.Pointer(pCol)).Faffinity = uint8(SQLITE_AFF_BLOB) + } + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 && + int32((*Table)(unsafe.Pointer(p)).FiPKey) != ii && + int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0) == OE_None { + libc.SetBitFieldPtr8Uint32(pCol+8, uint32(OE_Abort), 0, 0xf) + *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_HasNotNull) + } + } + } + + // Special processing for WITHOUT ROWID Tables + if tabOpts&U32(TF_WithoutRowid) != 0 { + if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+12805, 0) + return + } + if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { + Xsqlite3ErrorMsg(tls, pParse, ts+12855, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + return + } + *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) + convertToWithoutRowidTable(tls, pParse, p) + } + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) + + // Resolve names in all CHECK constraint expressions. + if (*Table)(unsafe.Pointer(p)).FpCheck != 0 { + Xsqlite3ResolveSelfReference(tls, pParse, p, NC_IsCheck, uintptr(0), (*Table)(unsafe.Pointer(p)).FpCheck) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + // If errors are seen, delete the CHECK constraints now, else they might + // actually be used if PRAGMA writable_schema=ON is set. + Xsqlite3ExprListDelete(tls, db, (*Table)(unsafe.Pointer(p)).FpCheck) + (*Table)(unsafe.Pointer(p)).FpCheck = uintptr(0) + } else { + + } + } + if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasGenerated) != 0 { + var ii int32 + var nNG int32 = 0 + + for ii = 0; ii < int32((*Table)(unsafe.Pointer(p)).FnCol); ii++ { + var colFlags U32 = U32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol + uintptr(ii)*24)).FcolFlags) + if colFlags&U32(COLFLAG_GENERATED) != U32(0) { + var pX uintptr = Xsqlite3ColumnExpr(tls, p, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(ii)*24) + + if Xsqlite3ResolveSelfReference(tls, pParse, p, NC_GenCol, pX, uintptr(0)) != 0 { + // If there are errors in resolving the expression, change the + // expression to a NULL. This prevents code generators that operate + // on the expression from inserting extra parts into the expression + // tree that have been allocated from lookaside memory, which is + // illegal in a schema and will lead to errors or heap corruption + // when the database connection closes. + Xsqlite3ColumnSetExpr(tls, pParse, p, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(ii)*24, + Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0)) + } + } else { + nNG++ + } + } + if nNG == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+12887, 0) + return + } + } + + // Estimate the average row size for the table and for all implied indices + estimateTableWidth(tls, p) + for pIdx = (*Table)(unsafe.Pointer(p)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + estimateIndexWidth(tls, pIdx) + } + + // If not initializing, then create a record for the new table + // in the schema table of the database. + // + // If this is a TEMPORARY table, write the entry into the auxiliary + // file instead of into the main database file. + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { + var n int32 + var v uintptr + var zType uintptr // "view" or "table" + var zType2 uintptr // "VIEW" or "TABLE" + var zStmt uintptr // Text of the CREATE TABLE or CREATE VIEW statement + + v = Xsqlite3GetVdbe(tls, pParse) + if v == uintptr(0) { + return + } + + Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) + + // Initialize zType for the new view or table. + if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { + // A regular table + zType = ts + 8752 /* "table" */ + zType2 = ts + 12931 /* "TABLE" */ + } else { + // A view + zType = ts + 10367 /* "view" */ + zType2 = ts + 12937 /* "VIEW" */ + } + + // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT + // statement to populate the new table. The root-page number for the + // new table is in register pParse->regRoot. + // + // Once the SELECT has been coded by sqlite3Select(), it is in a + // suitable state to query for the column names and types to be used + // by the new table. + // + // A shared-cache write-lock is not required to write to the new table, + // as a schema-lock must have already been obtained to create it. Since + // a schema-lock excludes all other database users, the write-lock would + // be redundant. + if pSelect != 0 { + // var dest SelectDest at bp+144, 40 + // Where the SELECT should store results + var regYield int32 // Register holding co-routine entry-point + var addrTop int32 // Top of the co-routine + var regRec int32 // A record to be insert into the new table + var regRowid int32 // Rowid of the next row to insert + var addrInsLoop int32 // Top of the loop for inserting rows + var pSelTab uintptr // A table that describes the SELECT results + + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } + regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + + Xsqlite3MayAbort(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenWrite, 1, (*Parse)(unsafe.Pointer(pParse)).FregRoot, iDb) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_P2ISREG)) + (*Parse)(unsafe.Pointer(pParse)).FnTab = 2 + addrTop = Xsqlite3VdbeCurrentAddr(tls, v) + 1 + Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, addrTop) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSelect, uint8(SQLITE_AFF_BLOB)) + if pSelTab == uintptr(0) { + return + } + + (*Table)(unsafe.Pointer(p)).FnCol = libc.AssignPtrInt16(p+56, (*Table)(unsafe.Pointer(pSelTab)).FnCol) + (*Table)(unsafe.Pointer(p)).FaCol = (*Table)(unsafe.Pointer(pSelTab)).FaCol + (*Table)(unsafe.Pointer(pSelTab)).FnCol = int16(0) + (*Table)(unsafe.Pointer(pSelTab)).FaCol = uintptr(0) + Xsqlite3DeleteTable(tls, db, pSelTab) + Xsqlite3SelectDestInit(tls, bp+144, SRT_Coroutine, regYield) + Xsqlite3Select(tls, pParse, pSelect, bp+144) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + Xsqlite3VdbeEndCoroutine(tls, v, regYield) + Xsqlite3VdbeJumpHere(tls, v, addrTop-1) + addrInsLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FiSDParm) + + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FnSdst, regRec) + Xsqlite3TableAffinity(tls, v, p, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, 1, regRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, 1, regRec, regRowid) + Xsqlite3VdbeGoto(tls, v, addrInsLoop) + Xsqlite3VdbeJumpHere(tls, v, addrInsLoop) + Xsqlite3VdbeAddOp1(tls, v, OP_Close, 1) + } + + // Compute the complete text of the CREATE statement + if pSelect != 0 { + zStmt = createTableStmt(tls, db, p) + } else { + var pEnd2 uintptr + if tabOpts != 0 { + pEnd2 = pParse + 272 + } else { + pEnd2 = pEnd + } + n = int32((int64((*Token)(unsafe.Pointer(pEnd2)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) / 1) + if int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pEnd2)).Fz))) != ';' { + n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) + } + zStmt = Xsqlite3MPrintf(tls, db, + ts+12942, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + } + + // A slot for the record has already been allocated in the + // schema table. We just need to update that slot with all + // the information we've collected. + Xsqlite3NestedParse(tls, pParse, + + ts+12957, + libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, + zType, + (*Table)(unsafe.Pointer(p)).FzName, + (*Table)(unsafe.Pointer(p)).FzName, + (*Parse)(unsafe.Pointer(pParse)).FregRoot, + zStmt, + (*Parse)(unsafe.Pointer(pParse)).FregRowid)) + Xsqlite3DbFree(tls, db, zStmt) + Xsqlite3ChangeCookie(tls, pParse, iDb) + + // Check to see if we need to create an sqlite_sequence table for + // keeping track of autoincrement keys. + if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != U32(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) { + var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + + if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { + Xsqlite3NestedParse(tls, pParse, + ts+13055, + libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) + } + } + + // Reparse everything to update our internal data structures + Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, + Xsqlite3MPrintf(tls, db, ts+13097, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + } + + // Add the table to the in-memory representation of the database. + if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { + var pOld uintptr + var pSchema uintptr = (*Table)(unsafe.Pointer(p)).FpSchema + + pOld = Xsqlite3HashInsert(tls, pSchema+8, (*Table)(unsafe.Pointer(p)).FzName, p) + if pOld != 0 { + // Malloc must have failed inside HashInsert() + Xsqlite3OomFault(tls, db) + return + } + (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) + + // If this is the magic sqlite_sequence table used by autoincrement, + // then record a pointer to this table in the main database structure + // so that INSERT can find the table easily. + + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9274) == 0 { + + (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p + } + } + + if !(pSelect != 0) && int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { + + if (*Token)(unsafe.Pointer(pCons)).Fz == uintptr(0) { + pCons = pEnd + } + *(*int32)(unsafe.Pointer(p + 64)) = 13 + int32((int64((*Token)(unsafe.Pointer(pCons)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1) + } +} + +// The parser calls this routine in order to create a new VIEW +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ + bp := tls.Alloc(120) + defer tls.Free(120) + + var p uintptr + var n int32 + var z uintptr + // var sEnd Token at bp+104, 16 + + // var sFix DbFixer at bp+8, 96 + + // var pName uintptr at bp, 8 + + var iDb int32 + var db uintptr + *(*uintptr)(unsafe.Pointer(bp /* pName */)) = uintptr(0) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { + goto __1 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13131, 0) + goto create_view_fail +__1: + ; + Xsqlite3StartTable(tls, pParse, pName1, pName2, isTemp, 1, 0, noErr) + p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + if !(p == uintptr(0) || (*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __2 + } + goto create_view_fail +__2: + ; + + // Legacy versions of SQLite allowed the use of the magic "rowid" column + // on a view, even though views do not have rowids. The following flag + // setting fixes this problem. But the fix can be disabled by compiling + // with -DSQLITE_ALLOW_ROWID_IN_VIEW in case there are legacy apps that + // depend upon the old buggy behavior. + *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_NoVisibleRowid) + + Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10367, *(*uintptr)(unsafe.Pointer(bp /* pName */))) + if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { + goto __3 + } + goto create_view_fail +__3: + ; + + // Make a copy of the entire SELECT statement that defines the view. + // This will force all the Expr.token.z values to be dynamically + // allocated rather than point to the input string - which means that + // they will persist after the current sqlite3_exec() call returns. + *(*U32)(unsafe.Pointer(pSelect + 4)) |= U32(SF_View) + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __4 + } + *(*uintptr)(unsafe.Pointer(p + 64)) = pSelect + pSelect = uintptr(0) + goto __5 +__4: + *(*uintptr)(unsafe.Pointer(p + 64)) = Xsqlite3SelectDup(tls, db, pSelect, EXPRDUP_REDUCE) +__5: + ; + (*Table)(unsafe.Pointer(p)).FpCheck = Xsqlite3ExprListDup(tls, db, pCNames, EXPRDUP_REDUCE) + (*Table)(unsafe.Pointer(p)).FeTabType = U8(TABTYP_VIEW) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __6 + } + goto create_view_fail +__6: + ; + + // Locate the end of the CREATE VIEW statement. Make sEnd point to + // the end. + *(*Token)(unsafe.Pointer(bp + 104 /* sEnd */)) = (*Parse)(unsafe.Pointer(pParse)).FsLastToken + + if !(int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 104)).Fz))) != ';') { + goto __7 + } + *(*uintptr)(unsafe.Pointer(bp + 104)) += uintptr((*Token)(unsafe.Pointer(bp + 104)).Fn) +__7: + ; + (*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fn = uint32(0) + n = int32((int64((*Token)(unsafe.Pointer(bp+104)).Fz) - int64((*Token)(unsafe.Pointer(pBegin)).Fz)) / 1) + + z = (*Token)(unsafe.Pointer(pBegin)).Fz +__8: + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(n-1))))])&0x01 != 0) { + goto __9 + } + n-- + goto __8 +__9: + ; + (*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fz = z + uintptr(n-1) + (*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fn = uint32(1) + + // Use sqlite3EndTable() to add the view to the schema table + Xsqlite3EndTable(tls, pParse, uintptr(0), bp+104, uint32(0), uintptr(0)) + +create_view_fail: + Xsqlite3SelectDelete(tls, db, pSelect) + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __10 + } + Xsqlite3RenameExprlistUnmap(tls, pParse, pCNames) +__10: + ; + Xsqlite3ExprListDelete(tls, db, pCNames) + return +} + +// The Table structure pTable is really a VIEW. Fill in the names of +// the columns of the view in the pTable structure. Return the number +// of errors. If an error is seen leave an error message in pParse->zErrMsg. +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pSelTab uintptr // A fake table from which we get the result set + var pSel uintptr // Copy of the SELECT that implements the view + var nErr int32 = 0 // Number of errors encountered + var n int32 // Temporarily holds the number of cursors assigned + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection for malloc errors + var rc int32 + var xAuth Sqlite3_xauth // Saved xAuth pointer + + if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB { + (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock++ + rc = Xsqlite3VtabCallConnect(tls, pParse, pTable) + (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock-- + return rc + } + + // A positive nCol means the columns names for this view are + // already known. + if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + + // A negative nCol is a special marker meaning that we are currently + // trying to compute the column names. If we enter this routine with + // a negative nCol, it means two or more views form a loop, like this: + // + // CREATE VIEW one AS SELECT * FROM two; + // CREATE VIEW two AS SELECT * FROM one; + // + // Actually, the error above is now caught prior to reaching this point. + // But the following test is still important as it does come up + // in the following: + // + // CREATE TABLE main.ex1(a); + // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; + // SELECT * FROM temp.ex1; + if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+13167, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + return 1 + } + + // If we get this far, it means we need to compute the table names. + // Note that the call to sqlite3ResultSetOfSelect() will expand any + // "*" elements in the results set of the view and will assign cursors + // to the elements of the FROM clause. But we do not want these changes + // to be permanent. So the computation is done on a copy of the SELECT + // statement that defines the view. + + pSel = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64)), 0) + if pSel != 0 { + var eParseMode U8 = (*Parse)(unsafe.Pointer(pParse)).FeParseMode + (*Parse)(unsafe.Pointer(pParse)).FeParseMode = U8(PARSE_MODE_NORMAL) + n = (*Parse)(unsafe.Pointer(pParse)).FnTab + Xsqlite3SrcListAssignCursors(tls, pParse, (*Select)(unsafe.Pointer(pSel)).FpSrc) + (*Table)(unsafe.Pointer(pTable)).FnCol = int16(-1) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) + xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) + pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSel, uint8(SQLITE_AFF_NONE)) + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth + (*Parse)(unsafe.Pointer(pParse)).FnTab = n + if pSelTab == uintptr(0) { + (*Table)(unsafe.Pointer(pTable)).FnCol = int16(0) + nErr++ + } else if (*Table)(unsafe.Pointer(pTable)).FpCheck != 0 { + // CREATE VIEW name(arglist) AS ... + // The names of the columns in the table are taken from + // arglist which is stored in pTable->pCheck. The pCheck field + // normally holds CHECK constraints on an ordinary table, but for + // a VIEW it holds the list of column names. + Xsqlite3ColumnsFromExprList(tls, pParse, (*Table)(unsafe.Pointer(pTable)).FpCheck, + pTable+54, pTable+8) + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && + int32((*Table)(unsafe.Pointer(pTable)).FnCol) == (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr { + + Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTable, pSel, + uint8(SQLITE_AFF_NONE)) + } + } else { + // CREATE VIEW name AS... without an argument list. Construct + // the column names from the SELECT statement that defines the view. + + (*Table)(unsafe.Pointer(pTable)).FnCol = (*Table)(unsafe.Pointer(pSelTab)).FnCol + (*Table)(unsafe.Pointer(pTable)).FaCol = (*Table)(unsafe.Pointer(pSelTab)).FaCol + *(*U32)(unsafe.Pointer(pTable + 48)) |= (*Table)(unsafe.Pointer(pSelTab)).FtabFlags & U32(COLFLAG_NOINSERT) + (*Table)(unsafe.Pointer(pSelTab)).FnCol = int16(0) + (*Table)(unsafe.Pointer(pSelTab)).FaCol = uintptr(0) + + } + (*Table)(unsafe.Pointer(pTable)).FnNVCol = (*Table)(unsafe.Pointer(pTable)).FnCol + Xsqlite3DeleteTable(tls, db, pSelTab) + Xsqlite3SelectDelete(tls, db, pSel) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { + if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { + return uint16(0) + } + return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue + }() + (*Parse)(unsafe.Pointer(pParse)).FeParseMode = eParseMode + } else { + nErr++ + } + *(*U16)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FpSchema + 114)) |= U16(DB_UnresetViews) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3DeleteColumnNames(tls, db, pTable) + } + return nErr +} + +// Clear the column names from every VIEW in database idx. +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ + var i uintptr + + if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { + return + } + for i = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema + 8)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { + Xsqlite3DeleteColumnNames(tls, db, pTab) + } + } + *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema + 114)) &= libc.Uint16FromInt32(libc.CplInt32(DB_UnresetViews)) +} + +// This function is called by the VDBE to adjust the internal schema +// used by SQLite when the btree layer moves a table root page. The +// root-page of a table or index in database iDb has changed from iFrom +// to iTo. +// +// Ticket #1728: The symbol table might still contain information +// on tables and/or indices that are the process of being deleted. +// If you are unlucky, one of those deleted indices or tables might +// have the same rootpage number as the real table or index that is +// being moved. So we cannot stop searching after the first match +// because the first match might be for one of the deleted indices +// or tables and not the table/index that is actually being moved. +// We must continue looping until all tables and indices with +// rootpage==iFrom have been converted to have a rootpage of iTo +// in order to be certain that we got the right one. +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ + var pElem uintptr + var pHash uintptr + var pDb uintptr + + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + pHash = (*Db)(unsafe.Pointer(pDb)).FpSchema + 8 + for pElem = (*Hash)(unsafe.Pointer(pHash)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata + if (*Table)(unsafe.Pointer(pTab)).Ftnum == iFrom { + (*Table)(unsafe.Pointer(pTab)).Ftnum = iTo + } + } + pHash = (*Db)(unsafe.Pointer(pDb)).FpSchema + 32 + for pElem = (*Hash)(unsafe.Pointer(pHash)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + var pIdx uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata + if (*Index)(unsafe.Pointer(pIdx)).Ftnum == iFrom { + (*Index)(unsafe.Pointer(pIdx)).Ftnum = iTo + } + } +} + +// Write code to erase the table with root-page iTable from database iDb. +// Also write code to modify the sqlite_schema table and internal schema +// if a root-page of another table is moved by the btree-layer whilst +// erasing iTable (this can happen with an auto-vacuum database). +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + if iTable < 2 { + Xsqlite3ErrorMsg(tls, pParse, ts+13197, 0) + } + Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) + Xsqlite3MayAbort(tls, pParse) + // OP_Destroy stores an in integer r1. If this integer + // is non-zero, then it is the root page number of a table moved to + // location iTable. The following code modifies the sqlite_schema table to + // reflect this. + // + // The "#NNN" in the SQL is a special constant that means whatever value + // is in register NNN. See grammar rules associated with the TK_REGISTER + // token for additional information. + Xsqlite3NestedParse(tls, pParse, + + ts+13212, + libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) + Xsqlite3ReleaseTempReg(tls, pParse, r1) +} + +// Write VDBE code to erase table pTab and all associated indices on disk. +// Code to update the sqlite_schema tables and internal schema definitions +// in case a root-page belonging to another table is moved by the btree layer +// is also added (this can happen with an auto-vacuum database). +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ + // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM + // is not defined), then it is important to call OP_Destroy on the + // table and index root-pages in order, starting with the numerically + // largest root-page number. This guarantees that none of the root-pages + // to be destroyed is relocated by an earlier OP_Destroy. i.e. if the + // following were coded: + // + // OP_Destroy 4 0 + // ... + // OP_Destroy 5 0 + // + // and root page 5 happened to be the largest root-page number in the + // database, then root page 5 would be moved to page 4 by the + // "OP_Destroy 4 0" opcode. The subsequent "OP_Destroy 5 0" would hit + // a free-list page. + var iTab Pgno = (*Table)(unsafe.Pointer(pTab)).Ftnum + var iDestroyed Pgno = Pgno(0) + + for 1 != 0 { + var pIdx uintptr + var iLargest Pgno = Pgno(0) + + if iDestroyed == Pgno(0) || iTab < iDestroyed { + iLargest = iTab + } + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + var iIdx Pgno = (*Index)(unsafe.Pointer(pIdx)).Ftnum + + if (iDestroyed == Pgno(0) || iIdx < iDestroyed) && iIdx > iLargest { + iLargest = iIdx + } + } + if iLargest == Pgno(0) { + return + } else { + var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + destroyRootPage(tls, pParse, int32(iLargest), iDb) + iDestroyed = iLargest + } + } +} + +// Remove entries from the sqlite_statN tables (for N in (1,2,3)) +// after a DROP INDEX or DROP TABLE command. +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName + for i = 1; i <= 4; i++ { + // var zTab [24]uint8 at bp+40, 24 + + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13279, libc.VaList(bp, i)) + if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { + Xsqlite3NestedParse(tls, pParse, + ts+11176, + libc.VaList(bp+8, zDbName, bp+40, zType, zName)) + } + } +} + +// Generate code to drop a table. +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var v uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pTrigger uintptr + var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + + v = Xsqlite3GetVdbe(tls, pParse) + + Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) + + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) + } + + // Drop all triggers associated with the table being dropped. Code + // is generated to remove entries from sqlite_schema and/or + // sqlite_temp_schema if required. + pTrigger = Xsqlite3TriggerList(tls, pParse, pTab) + for pTrigger != 0 { + + Xsqlite3DropTriggerPtr(tls, pParse, pTrigger) + pTrigger = (*Trigger)(unsafe.Pointer(pTrigger)).FpNext + } + + // Remove any entries of the sqlite_sequence table associated with + // the table being dropped. This is done before the table is dropped + // at the btree level, in case the sqlite_sequence table needs to + // move as a result of the drop (can happen in auto-vacuum mode). + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { + Xsqlite3NestedParse(tls, pParse, + ts+13293, + libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + + // Drop all entries in the schema table that refer to the + // table. The program name loops through the schema table and deletes + // every row that refers to a table of the same name as the one being + // dropped. Triggers are handled separately because a trigger can be + // created in the temp database that refers to a table in another + // database. + Xsqlite3NestedParse(tls, pParse, + + ts+13338, + libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) + if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + destroyTable(tls, pParse, pTab) + } + + // Remove the table entry from SQLite's internal schema and modify + // the schema cookie. + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + Xsqlite3VdbeAddOp4(tls, v, OP_VDestroy, iDb, 0, 0, (*Table)(unsafe.Pointer(pTab)).FzName, 0) + Xsqlite3MayAbort(tls, pParse) + } + Xsqlite3VdbeAddOp4(tls, v, OP_DropTable, iDb, 0, 0, (*Table)(unsafe.Pointer(pTab)).FzName, 0) + Xsqlite3ChangeCookie(tls, pParse, iDb) + sqliteViewResetAll(tls, db, iDb) +} + +// Return TRUE if shadow tables should be read-only in the current +// context. +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && + (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && + (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && + !((*Sqlite3)(unsafe.Pointer(db)).FnVTrans > 0 && (*Sqlite3)(unsafe.Pointer(db)).FaVTrans == uintptr(0)) { + return 1 + } + return 0 +} + +// Return true if it is not allowed to drop the given table +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8010, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3228, 4) == 0 { + return 0 + } + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7006, 10) == 0 { + return 0 + } + return 1 + } + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Shadow) != U32(0) && Xsqlite3ReadOnlyShadowTables(tls, db) != 0 { + return 1 + } + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Eponymous) != 0 { + return 1 + } + return 0 +} + +// This routine is called to do the work of a DROP TABLE statement. +// pName is the name of the table to be dropped. +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pTab uintptr + var v uintptr + var db uintptr + var iDb int32 + var code int32 + var zTab uintptr + var zDb uintptr + var zArg2 uintptr + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __1 + } + goto exit_drop_table +__1: + ; + + if !(Xsqlite3ReadSchema(tls, pParse) != 0) { + goto __2 + } + goto exit_drop_table +__2: + ; + if !(noErr != 0) { + goto __3 + } + (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr++ +__3: + ; + + pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(isView), pName+8) + if !(noErr != 0) { + goto __4 + } + (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr-- +__4: + ; + + if !(pTab == uintptr(0)) { + goto __5 + } + if !(noErr != 0) { + goto __6 + } + Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) + sqlite3ForceNotReadOnly(tls, pParse) +__6: + ; + goto exit_drop_table +__5: + ; + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + // If pTab is a virtual table, call ViewGetColumnNames() to ensure + // it is initialized. + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB && Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { + goto __7 + } + goto exit_drop_table +__7: + ; + + zTab = func() uintptr { + if !(0 != 0) && iDb == 1 { + return ts + 12024 + } + return ts + 5835 + }() + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + zArg2 = uintptr(0) + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { + goto __8 + } + goto exit_drop_table +__8: + ; + if !(isView != 0) { + goto __9 + } + if !(!(0 != 0) && iDb == 1) { + goto __11 + } + code = SQLITE_DROP_TEMP_VIEW + goto __12 +__11: + code = SQLITE_DROP_VIEW +__12: + ; + goto __10 +__9: + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __13 + } + code = SQLITE_DROP_VTABLE + zArg2 = (*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, db, pTab))).FpMod)).FzName + goto __14 +__13: + if !(!(0 != 0) && iDb == 1) { + goto __15 + } + code = SQLITE_DROP_TEMP_TABLE + goto __16 +__15: + code = SQLITE_DROP_TABLE +__16: + ; +__14: + ; +__10: + ; + if !(Xsqlite3AuthCheck(tls, pParse, code, (*Table)(unsafe.Pointer(pTab)).FzName, zArg2, zDb) != 0) { + goto __17 + } + goto exit_drop_table +__17: + ; + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), zDb) != 0) { + goto __18 + } + goto exit_drop_table +__18: + ; + + if !(tableMayNotBeDropped(tls, db, pTab) != 0) { + goto __19 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13405, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto exit_drop_table +__19: + ; + + // Ensure DROP TABLE is not used on a view, and DROP VIEW is not used + // on a table. + if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { + goto __20 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13433, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto exit_drop_table +__20: + ; + if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __21 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto exit_drop_table +__21: + ; + + // Generate code to remove the table from the schema table + // on disk. + v = Xsqlite3GetVdbe(tls, pParse) + if !(v != 0) { + goto __22 + } + Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) + if !!(isView != 0) { + goto __23 + } + sqlite3ClearStatTables(tls, pParse, iDb, ts+11368, (*Table)(unsafe.Pointer(pTab)).FzName) + Xsqlite3FkDropTable(tls, pParse, pName, pTab) +__23: + ; + Xsqlite3CodeDropTable(tls, pParse, pTab, iDb, isView) +__22: + ; + +exit_drop_table: + Xsqlite3SrcListDelete(tls, db, pName) +} + +// This routine is called to create a new foreign key on the table +// currently under construction. pFromCol determines which columns +// in the current table point to the foreign key. If pFromCol==0 then +// connect the key to the last column inserted. pTo is the name of +// the table referred to (a.k.a the "parent" table). pToCol is a list +// of tables in the parent pTo table. flags contains all +// information about the conflict resolution algorithms specified +// in the ON DELETE, ON UPDATE and ON INSERT clauses. +// +// An FKey structure is created and added to the table currently +// under construction in the pParse->pNewTable field. +// +// The foreign key is set for IMMEDIATE processing. A subsequent call +// to sqlite3DeferForeignKey() might change this to DEFERRED. +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var db uintptr + var pFKey uintptr + var pNextTo uintptr + var p uintptr + var nByte I64 + var i int32 + var nCol int32 + var z uintptr + var iCol int32 + var j int32 + var n int32 + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + pFKey = uintptr(0) + p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + + if !(p == uintptr(0) || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { + goto __1 + } + goto fk_end +__1: + ; + if !(pFromCol == uintptr(0)) { + goto __2 + } + iCol = int32((*Table)(unsafe.Pointer(p)).FnCol) - 1 + if !(iCol < 0) { + goto __4 + } + goto fk_end +__4: + ; + if !(pToCol != 0 && (*ExprList)(unsafe.Pointer(pToCol)).FnExpr != 1) { + goto __5 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+13499, + libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) + goto fk_end +__5: + ; + nCol = 1 + goto __3 +__2: + if !(pToCol != 0 && (*ExprList)(unsafe.Pointer(pToCol)).FnExpr != (*ExprList)(unsafe.Pointer(pFromCol)).FnExpr) { + goto __6 + } + Xsqlite3ErrorMsg(tls, pParse, + + ts+13562, 0) + goto fk_end + goto __7 +__6: + nCol = (*ExprList)(unsafe.Pointer(pFromCol)).FnExpr +__7: + ; +__3: + ; + nByte = I64(uint64(unsafe.Sizeof(FKey{})) + uint64(nCol-1)*uint64(unsafe.Sizeof(sColMap{})) + uint64((*Token)(unsafe.Pointer(pTo)).Fn) + uint64(1)) + if !(pToCol != 0) { + goto __8 + } + i = 0 +__9: + if !(i < (*ExprList)(unsafe.Pointer(pToCol)).FnExpr) { + goto __11 + } + nByte = nByte + I64(Xsqlite3Strlen30(tls, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName)+1) + goto __10 +__10: + i++ + goto __9 + goto __11 +__11: + ; +__8: + ; + pFKey = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) + if !(pFKey == uintptr(0)) { + goto __12 + } + goto fk_end +__12: + ; + (*FKey)(unsafe.Pointer(pFKey)).FpFrom = p + + (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom = *(*uintptr)(unsafe.Pointer(p + 64 + 8 /* &.pFKey */)) + z = pFKey + 64 + uintptr(nCol)*16 + (*FKey)(unsafe.Pointer(pFKey)).FzTo = z + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __13 + } + Xsqlite3RenameTokenMap(tls, pParse, z, pTo) +__13: + ; + libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(pTo)).Fz, uint64((*Token)(unsafe.Pointer(pTo)).Fn)) + *(*uint8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(pTo)).Fn))) = uint8(0) + Xsqlite3Dequote(tls, z) + z += uintptr((*Token)(unsafe.Pointer(pTo)).Fn + uint32(1)) + (*FKey)(unsafe.Pointer(pFKey)).FnCol = nCol + if !(pFromCol == uintptr(0)) { + goto __14 + } + (*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom = int32((*Table)(unsafe.Pointer(p)).FnCol) - 1 + goto __15 +__14: + i = 0 +__16: + if !(i < nCol) { + goto __18 + } + j = 0 +__19: + if !(j < int32((*Table)(unsafe.Pointer(p)).FnCol)) { + goto __21 + } + if !(Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(j)*24)).FzCnName, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName) == 0) { + goto __22 + } + (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FiFrom = j + goto __21 +__22: + ; + goto __20 +__20: + j++ + goto __19 + goto __21 +__21: + ; + if !(j >= int32((*Table)(unsafe.Pointer(p)).FnCol)) { + goto __23 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+13656, + libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) + goto fk_end +__23: + ; + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __24 + } + Xsqlite3RenameTokenRemap(tls, pParse, pFKey+64+uintptr(i)*16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName) +__24: + ; + goto __17 +__17: + i++ + goto __16 + goto __18 +__18: + ; +__15: + ; + if !(pToCol != 0) { + goto __25 + } + i = 0 +__26: + if !(i < nCol) { + goto __28 + } + n = Xsqlite3Strlen30(tls, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName) + (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FzCol = z + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __29 + } + Xsqlite3RenameTokenRemap(tls, pParse, z, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName) +__29: + ; + libc.Xmemcpy(tls, z, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName, uint64(n)) + *(*uint8)(unsafe.Pointer(z + uintptr(n))) = uint8(0) + z += uintptr(n + 1) + goto __27 +__27: + i++ + goto __26 + goto __28 +__28: + ; +__25: + ; + (*FKey)(unsafe.Pointer(pFKey)).FisDeferred = U8(0) + *(*U8)(unsafe.Pointer(pFKey + 45)) = U8(flags & 0xff) // ON DELETE action + *(*U8)(unsafe.Pointer(pFKey + 45 + 1)) = U8(flags >> 8 & 0xff) // ON UPDATE action + + pNextTo = Xsqlite3HashInsert(tls, (*Table)(unsafe.Pointer(p)).FpSchema+80, + (*FKey)(unsafe.Pointer(pFKey)).FzTo, pFKey) + if !(pNextTo == pFKey) { + goto __30 + } + Xsqlite3OomFault(tls, db) + goto fk_end +__30: + ; + if !(pNextTo != 0) { + goto __31 + } + + (*FKey)(unsafe.Pointer(pFKey)).FpNextTo = pNextTo + (*FKey)(unsafe.Pointer(pNextTo)).FpPrevTo = pFKey +__31: + ; + + // Link the foreign key to the table as the last step. + + *(*uintptr)(unsafe.Pointer(p + 64 + 8 /* &.pFKey */)) = pFKey + pFKey = uintptr(0) + +fk_end: + Xsqlite3DbFree(tls, db, pFKey) + Xsqlite3ExprListDelete(tls, db, pFromCol) + Xsqlite3ExprListDelete(tls, db, pToCol) +} + +// This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED +// clause is seen as part of a foreign key definition. The isDeferred +// parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. +// The behavior of the most recently created foreign key is adjusted +// accordingly. +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ + var pTab uintptr + var pFKey uintptr + if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { + return + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + return + } + if libc.AssignUintptr(&pFKey, *(*uintptr)(unsafe.Pointer(pTab + 64 + 8))) == uintptr(0) { + return + } + // EV: R-30323-21917 + (*FKey)(unsafe.Pointer(pFKey)).FisDeferred = U8(isDeferred) +} + +// Generate code that will erase and refill index *pIdx. This is +// used to initialize a newly created index or to recompute the +// content of an index in response to a REINDEX command. +// +// if memRootPage is not negative, it means that the index is newly +// created. The register specified by memRootPage contains the +// root page number of the index. If memRootPage is negative, then +// the index already exists and must be cleared before being refilled and +// the root page number of the index is taken from pIndex->tnum. +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pTab uintptr = (*Index)(unsafe.Pointer(pIndex)).FpTable // The table that is indexed + var iTab int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Btree cursor used for pTab + var iIdx int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Btree cursor used for pIndex + var iSorter int32 // Cursor opened by OpenSorter (if in use) + var addr1 int32 // Address of top of loop + var addr2 int32 // Address to jump to for next iteration + var tnum Pgno // Root page of index + // var iPartIdxLabel int32 at bp, 4 + // Jump to this label to skip a row + var v uintptr // Generate code into this virtual machine + var pKey uintptr // KeyInfo for index + var regRecord int32 // Register holding assembled index record + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + var iDb int32 = Xsqlite3SchemaToIndex(tls, db, (*Index)(unsafe.Pointer(pIndex)).FpSchema) + + if Xsqlite3AuthCheck(tls, pParse, SQLITE_REINDEX, (*Index)(unsafe.Pointer(pIndex)).FzName, uintptr(0), + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) != 0 { + return + } + + // Require a write-lock on the table to perform this operation + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(1), (*Table)(unsafe.Pointer(pTab)).FzName) + + v = Xsqlite3GetVdbe(tls, pParse) + if v == uintptr(0) { + return + } + if memRootPage >= 0 { + tnum = Pgno(memRootPage) + } else { + tnum = (*Index)(unsafe.Pointer(pIndex)).Ftnum + } + pKey = Xsqlite3KeyInfoOfIndex(tls, pParse, pIndex) + + // Open the sorter cursor if we are to use one. + iSorter = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + Xsqlite3VdbeAddOp4(tls, v, OP_SorterOpen, iSorter, 0, int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol), Xsqlite3KeyInfoRef(tls, pKey), -9) + + // Open the table. Loop through all rows of the table, inserting index + // records into the sorter. + Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iTab, 0) + regRecord = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3MultiWrite(tls, pParse) + + Xsqlite3GenerateIndexKey(tls, pParse, pIndex, iTab, regRecord, 0, bp, uintptr(0), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, iSorter, regRecord) + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp /* iPartIdxLabel */))) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iTab, addr1+1) + Xsqlite3VdbeJumpHere(tls, v, addr1) + if memRootPage < 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(tnum), iDb) + } + Xsqlite3VdbeAddOp4(tls, v, OP_OpenWrite, iIdx, int32(tnum), iDb, + pKey, -9) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_BULKCSR|func() int32 { + if memRootPage >= 0 { + return OPFLAG_P2ISREG + } + return 0 + }())) + + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, iSorter, 0) + if int32((*Index)(unsafe.Pointer(pIndex)).FonError) != OE_None { + var j2 int32 = Xsqlite3VdbeGoto(tls, v, 1) + addr2 = Xsqlite3VdbeCurrentAddr(tls, v) + + Xsqlite3VdbeAddOp4Int(tls, v, OP_SorterCompare, iSorter, j2, regRecord, + int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol)) + Xsqlite3UniqueConstraint(tls, pParse, OE_Abort, pIndex) + Xsqlite3VdbeJumpHere(tls, v, j2) + } else { + // Most CREATE INDEX and REINDEX statements that are not UNIQUE can not + // abort. The exception is if one of the indexed expressions contains a + // user function that throws an exception when it is evaluated. But the + // overhead of adding a statement journal to a CREATE INDEX statement is + // very small (since most of the pages written do not contain content that + // needs to be restored if the statement aborts), so we call + // sqlite3MayAbort() for all CREATE INDEX statements. + Xsqlite3MayAbort(tls, pParse) + addr2 = Xsqlite3VdbeCurrentAddr(tls, v) + } + Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, iSorter, regRecord, iIdx) + if !(int32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x200>>9) != 0) { + // This OP_SeekEnd opcode makes index insert for a REINDEX go much + // faster by avoiding unnecessary seeks. But the optimization does + // not work for UNIQUE constraint indexes on WITHOUT ROWID tables + // with DESC primary keys, since those indexes have there keys in + // a different order from the main table. + // See ticket: https://www.sqlite.org/src/info/bba7b69f9849b5bf + Xsqlite3VdbeAddOp1(tls, v, OP_SeekEnd, iIdx) + } + Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, iIdx, regRecord) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) + Xsqlite3ReleaseTempReg(tls, pParse, regRecord) + Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, iSorter, addr2) + Xsqlite3VdbeJumpHere(tls, v, addr1) + + Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTab) + Xsqlite3VdbeAddOp1(tls, v, OP_Close, iIdx) + Xsqlite3VdbeAddOp1(tls, v, OP_Close, iSorter) +} + +// Allocate heap space to hold an Index object with nCol columns. +// +// Increase the allocation size to provide an extra nExtra bytes +// of 8-byte aligned space after the Index object and return a +// pointer to this extra space in *ppExtra. +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ + var p uintptr // Allocated index object + var nByte int32 // Bytes of space for Index object + arrays + + nByte = int32((uint64(unsafe.Sizeof(Index{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + (uint64(unsafe.Sizeof(uintptr(0)))*uint64(nCol)+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + (uint64(unsafe.Sizeof(LogEst(0)))*uint64(int32(nCol)+1)+uint64(unsafe.Sizeof(I16(0)))*uint64(nCol)+uint64(unsafe.Sizeof(U8(0)))*uint64(nCol)+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) // Index.aSortOrder + p = Xsqlite3DbMallocZero(tls, db, uint64(nByte+nExtra)) + if p != 0 { + var pExtra uintptr = p + uintptr((uint64(unsafe.Sizeof(Index{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) + (*Index)(unsafe.Pointer(p)).FazColl = pExtra + pExtra += uintptr((uint64(unsafe.Sizeof(uintptr(0)))*uint64(nCol) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) + (*Index)(unsafe.Pointer(p)).FaiRowLogEst = pExtra + pExtra += uintptr(uint64(unsafe.Sizeof(LogEst(0))) * uint64(int32(nCol)+1)) + (*Index)(unsafe.Pointer(p)).FaiColumn = pExtra + pExtra += uintptr(uint64(unsafe.Sizeof(I16(0))) * uint64(nCol)) + (*Index)(unsafe.Pointer(p)).FaSortOrder = pExtra + (*Index)(unsafe.Pointer(p)).FnColumn = U16(nCol) + (*Index)(unsafe.Pointer(p)).FnKeyCol = U16(int32(nCol) - 1) + *(*uintptr)(unsafe.Pointer(ppExtra)) = p + uintptr(nByte) + } + return p +} + +// If expression list pList contains an expression that was parsed with +// an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in +// pParse and return non-zero. Otherwise, return zero. +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if pList != 0 { + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { + var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags + Xsqlite3ErrorMsg(tls, pParse, ts+13702, + libc.VaList(bp, func() uintptr { + if int32(sf) == 0 || int32(sf) == 3 { + return ts + 13730 /* "FIRST" */ + } + return ts + 13736 /* "LAST" */ + }())) + return 1 + } + } + } + return 0 +} + +// Create a new index for an SQL table. pName1.pName2 is the name of the index +// and pTblList is the name of the table that is to be indexed. Both will +// be NULL for a primary key or an index that is created to satisfy a +// UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable +// as the table to be indexed. pParse->pNewTable is a table that is +// currently being constructed by a CREATE TABLE statement. +// +// pList is a list of columns to be indexed. pList will be NULL if this +// is a primary key or unique-constraint on the most recent column added +// to the table currently under construction. +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ + bp := tls.Alloc(256) + defer tls.Free(256) + + var pTab uintptr // Table to be indexed + var pIndex uintptr // The index to be created + var zName uintptr // Name of the index + var nName int32 // Number of characters in zName + var i int32 + var j int32 + // var sFix DbFixer at bp+136, 96 + // For assigning database names to pTable + var sortOrderMask int32 // 1 to honor DESC in index. 0 to ignore. + var db uintptr + var pDb uintptr // The specific table containing the indexed database + var iDb int32 // Index of the database that is being written + // var pName uintptr at bp+128, 8 + // Unqualified name of the index to create + var pListItem uintptr // For looping over pList + var nExtra int32 // Space allocated for zExtra[] + var nExtraCol int32 // Number of extra columns needed + // var zExtra uintptr at bp+248, 8 + // Extra space after the Index object + var pPk uintptr + var n int32 + var pLoop uintptr + var zDb uintptr + // var prevCol Token at bp+232, 16 + + var pCol uintptr + var pExpr uintptr + var nColl int32 + var pCExpr uintptr // The i-th index expression + var requestedSortOrder int32 // ASC or DESC on the i-th expression + var zColl uintptr + var x int32 + var z1 uintptr + var z2 uintptr + var k int32 + // This routine has been called to create an automatic index as a + // result of a PRIMARY KEY or UNIQUE clause on a column definition, or + // a PRIMARY KEY or UNIQUE clause following the column definitions. + // i.e. one of: + // + // CREATE TABLE t(x PRIMARY KEY, y); + // CREATE TABLE t(x, y, UNIQUE(x, y)); + // + // Either way, check to see if the table already has such an index. If + // so, don't bother creating this one. This only applies to + // automatically created indices. Users can do as they wish with + // explicit indices. + // + // Two UNIQUE or PRIMARY KEY constraints are considered equivalent + // (and thus suppressing the second one) even if they have different + // sort orders. + // + // If there are different collating sequences or if the columns of + // the constraint occur in different orders, then the constraints are + // considered distinct and both result in separate indices. + var pIdx uintptr + var p uintptr + var n1 int32 + var v uintptr + var zStmt uintptr + var iMem int32 + var pNext uintptr + // Ensure all REPLACE indexes on pTab are at the end of the pIndex list. + // The list was already ordered when this routine was entered, so at this + // point at most a single index (the newly added index) will be out of + // order. So we have to reorder at most one index. + var ppFrom uintptr + var pThis uintptr + pTab = uintptr(0) + pIndex = uintptr(0) + zName = uintptr(0) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)) = uintptr(0) + nExtra = 0 + *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) = uintptr(0) + pPk = uintptr(0) // PRIMARY KEY index for WITHOUT ROWID tables + + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __1 + } + goto exit_create_index +__1: + ; + + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB && int32(idxType) != SQLITE_IDXTYPE_PRIMARYKEY) { + goto __2 + } + goto exit_create_index +__2: + ; + if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { + goto __3 + } + goto exit_create_index +__3: + ; + if !(Xsqlite3HasExplicitNulls(tls, pParse, pList) != 0) { + goto __4 + } + goto exit_create_index +__4: + ; + + // Find the table that is to be indexed. Return early if not found. + if !(pTblName != uintptr(0)) { + goto __5 + } + + // Use the two-part index name to determine the database + // to search for the table. 'Fix' the table name to this db + // before looking up the table. + + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+128) + if !(iDb < 0) { + goto __7 + } + goto exit_create_index +__7: + ; + + // If the index name was unqualified, check if the table + // is a temp table. If so, set the database to 1. Do not do this + // if initialising a database schema. + if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { + goto __8 + } + pTab = Xsqlite3SrcListLookup(tls, pParse, pTblName) + if !((*Token)(unsafe.Pointer(pName2)).Fn == uint32(0) && pTab != 0 && (*Table)(unsafe.Pointer(pTab)).FpSchema == (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema) { + goto __9 + } + iDb = 1 +__9: + ; +__8: + ; + + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13741, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { + goto __10 + } + // Because the parser constructs pTblName from a single identifier, + // sqlite3FixSrcList can never fail. + +__10: + ; + pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pTblName+8) + + if !(pTab == uintptr(0)) { + goto __11 + } + goto exit_create_index +__11: + ; + if !(iDb == 1 && (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema != (*Table)(unsafe.Pointer(pTab)).FpSchema) { + goto __12 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+13747, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto exit_create_index +__12: + ; + if !!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __13 + } + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) +__13: + ; + goto __6 +__5: + ; + + pTab = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + if !!(pTab != 0) { + goto __14 + } + goto exit_create_index +__14: + ; + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) +__6: + ; + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8010, 7) == 0 && + int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && + pTblName != uintptr(0)) { + goto __15 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13797, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto exit_create_index +__15: + ; + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __16 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13825, 0) + goto exit_create_index +__16: + ; + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __17 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13850, 0) + goto exit_create_index +__17: + ; + + // Find the name of the index. Make sure there is not already another + // index or table with the same name. + // + // Exception: If we are reading the names of permanent indices from the + // sqlite_schema table (because some other process changed the schema) and + // one of the index names collides with the name of a temporary table or + // index, then we will continue to process this index. + // + // If pName==0 it means that we are + // dealing with a primary key or UNIQUE constraint. We have to invent our + // own name. + if !(*(*uintptr)(unsafe.Pointer(bp + 128)) != 0) { + goto __18 + } + zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + if !(zName == uintptr(0)) { + goto __20 + } + goto exit_create_index +__20: + ; + + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13741, (*Table)(unsafe.Pointer(pTab)).FzName)) { + goto __21 + } + goto exit_create_index +__21: + ; + if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __22 + } + if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { + goto __23 + } + if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + goto __24 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13884, libc.VaList(bp+16, zName)) + goto exit_create_index +__24: + ; +__23: + ; + if !(Xsqlite3FindIndex(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { + goto __25 + } + if !!(ifNotExist != 0) { + goto __26 + } + Xsqlite3ErrorMsg(tls, pParse, ts+13918, libc.VaList(bp+24, zName)) + goto __27 +__26: + ; + Xsqlite3CodeVerifySchema(tls, pParse, iDb) + sqlite3ForceNotReadOnly(tls, pParse) +__27: + ; + goto exit_create_index +__25: + ; +__22: + ; + goto __19 +__18: + pLoop = (*Table)(unsafe.Pointer(pTab)).FpIndex + n = 1 +__28: + if !(pLoop != 0) { + goto __30 + } + goto __29 +__29: + pLoop = (*Index)(unsafe.Pointer(pLoop)).FpNext + n++ + goto __28 + goto __30 +__30: + ; + zName = Xsqlite3MPrintf(tls, db, ts+13942, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + if !(zName == uintptr(0)) { + goto __31 + } + goto exit_create_index +__31: + ; + + // Automatic index names generated from within sqlite3_declare_vtab() + // must have names that are distinct from normal automatic index names. + // The following statement converts "sqlite3_autoindex..." into + // "sqlite3_butoindex..." in order to make the names distinct. + // The "vtab_err.test" test demonstrates the need of this statement. + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) { + goto __32 + } + *(*uint8)(unsafe.Pointer(zName + 7))++ +__32: + ; +__19: + ; + + // Check for authorization to create an index. + if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __33 + } + zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { + if !(0 != 0) && iDb == 1 { + return ts + 12024 + } + return ts + 5835 + }(), uintptr(0), zDb) != 0) { + goto __34 + } + goto exit_create_index +__34: + ; + i = SQLITE_CREATE_INDEX + if !(!(0 != 0) && iDb == 1) { + goto __35 + } + i = SQLITE_CREATE_TEMP_INDEX +__35: + ; + if !(Xsqlite3AuthCheck(tls, pParse, i, zName, (*Table)(unsafe.Pointer(pTab)).FzName, zDb) != 0) { + goto __36 + } + goto exit_create_index +__36: + ; +__33: + ; + + // If pList==0, it means this routine was called to make a primary + // key out of the last column added to the table under construction. + // So create a fake list to simulate this. + if !(pList == uintptr(0)) { + goto __37 + } + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1)*24 + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_UNIQUE) + Xsqlite3TokenInit(tls, bp+232, (*Column)(unsafe.Pointer(pCol)).FzCnName) + pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+232, 0)) + if !(pList == uintptr(0)) { + goto __39 + } + goto exit_create_index +__39: + ; + + Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) + goto __38 +__37: + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13741) + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __40 + } + goto exit_create_index +__40: + ; +__38: + ; + + // Figure out how many bytes of space are required to store explicitly + // specified collation sequence names. + i = 0 +__41: + if !(i < (*ExprList)(unsafe.Pointer(pList)).FnExpr) { + goto __43 + } + pExpr = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr + + if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLLATE) { + goto __44 + } + + nExtra = nExtra + (1 + Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) +__44: + ; + goto __42 +__42: + i++ + goto __41 + goto __43 +__43: + ; + + // Allocate the index structure. + nName = Xsqlite3Strlen30(tls, zName) + if pPk != 0 { + nExtraCol = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + } else { + nExtraCol = 1 + } + + pIndex = Xsqlite3AllocateIndexObject(tls, db, int16((*ExprList)(unsafe.Pointer(pList)).FnExpr+nExtraCol), + nName+nExtra+1, bp+248) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __45 + } + goto exit_create_index +__45: + ; + + (*Index)(unsafe.Pointer(pIndex)).FzName = *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) + *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) += uintptr(nName + 1) + libc.Xmemcpy(tls, (*Index)(unsafe.Pointer(pIndex)).FzName, zName, uint64(nName+1)) + (*Index)(unsafe.Pointer(pIndex)).FpTable = pTab + (*Index)(unsafe.Pointer(pIndex)).FonError = U8(onError) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(libc.Bool32(onError != OE_None)), 3, 0x8) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(idxType), 0, 0x3) + (*Index)(unsafe.Pointer(pIndex)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + (*Index)(unsafe.Pointer(pIndex)).FnKeyCol = U16((*ExprList)(unsafe.Pointer(pList)).FnExpr) + if !(pPIWhere != 0) { + goto __46 + } + Xsqlite3ResolveSelfReference(tls, pParse, pTab, NC_PartIdx, pPIWhere, uintptr(0)) + (*Index)(unsafe.Pointer(pIndex)).FpPartIdxWhere = pPIWhere + pPIWhere = uintptr(0) +__46: + ; + + // Check to see if we should honor DESC requests on index columns + if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) >= 4) { + goto __47 + } + sortOrderMask = -1 // Honor DESC + goto __48 +__47: + sortOrderMask = 0 // Ignore DESC +__48: + ; + + // Analyze the list of expressions that form the terms of the index and + // report any errors. In the common case where the expression is exactly + // a table column, store that column in aiColumn[]. For general expressions, + // populate pIndex->aColExpr and store XN_EXPR (-2) in aiColumn[]. + // + // TODO: Issue a warning if two or more columns of the index are identical. + // TODO: Issue a warning if the table primary key is used as part of the + // index key. + pListItem = pList + 8 /* &.a */ + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __49 + } + (*Index)(unsafe.Pointer(pIndex)).FaColExpr = pList + pList = uintptr(0) +__49: + ; + i = 0 +__50: + if !(i < int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol)) { + goto __52 + } // Collation sequence name + + sqlite3StringToId(tls, (*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr) + Xsqlite3ResolveSelfReference(tls, pParse, pTab, NC_IdxExpr, (*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr, uintptr(0)) + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __53 + } + goto exit_create_index +__53: + ; + pCExpr = Xsqlite3ExprSkipCollate(tls, (*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr) + if !(int32((*Expr)(unsafe.Pointer(pCExpr)).Fop) != TK_COLUMN) { + goto __54 + } + if !(pTab == (*Parse)(unsafe.Pointer(pParse)).FpNewTable) { + goto __56 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+13965, 0) + goto exit_create_index +__56: + ; + if !((*Index)(unsafe.Pointer(pIndex)).FaColExpr == uintptr(0)) { + goto __57 + } + (*Index)(unsafe.Pointer(pIndex)).FaColExpr = pList + pList = uintptr(0) +__57: + ; + j = -2 + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) + goto __55 +__54: + j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) + + if !(j < 0) { + goto __58 + } + j = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) + goto __59 +__58: + if !(int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24 + 8))&0xf>>0) == 0) { + goto __60 + } + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) +__60: + ; + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __61 + } + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) +__61: + ; +__59: + ; + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = I16(j) +__55: + ; + zColl = uintptr(0) + if !(int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr)).Fop) == TK_COLLATE) { + goto __62 + } + + zColl = *(*uintptr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr + 8)) + nColl = Xsqlite3Strlen30(tls, zColl) + 1 + + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)), zColl, uint64(nColl)) + zColl = *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) + *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) += uintptr(nColl) + nExtra = nExtra - nColl + goto __63 +__62: + if !(j >= 0) { + goto __64 + } + zColl = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) +__64: + ; +__63: + ; + if !!(zColl != 0) { + goto __65 + } + zColl = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) +__65: + ; + if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) && !(Xsqlite3LocateCollSeq(tls, pParse, zColl) != 0)) { + goto __66 + } + goto exit_create_index +__66: + ; + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) = zColl + requestedSortOrder = int32((*ExprList_item)(unsafe.Pointer(pListItem)).FsortFlags) & sortOrderMask + *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaSortOrder + uintptr(i))) = U8(requestedSortOrder) + goto __51 +__51: + i++ + pListItem += 32 + goto __50 + goto __52 +__52: + ; + + // Append the table key to the end of the index. For WITHOUT ROWID + // tables (when pPk!=0) this will be the declared PRIMARY KEY. For + // normal tables (when pPk==0) this will be the rowid. + if !(pPk != 0) { + goto __67 + } + j = 0 +__69: + if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { + goto __71 + } + x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2))) + + if !(isDupColumn(tls, pIndex, int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol), pPk, j) != 0) { + goto __72 + } + (*Index)(unsafe.Pointer(pIndex)).FnColumn-- + goto __73 +__72: + ; + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = I16(x) + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(j)*8)) + *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaSortOrder + uintptr(i))) = *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(j))) + i++ +__73: + ; + goto __70 +__70: + j++ + goto __69 + goto __71 +__71: + ; + + goto __68 +__67: + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-1) + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) +__68: + ; + Xsqlite3DefaultRowEst(tls, pIndex) + if !((*Parse)(unsafe.Pointer(pParse)).FpNewTable == uintptr(0)) { + goto __74 + } + estimateIndexWidth(tls, pIndex) +__74: + ; + + // If this index contains every column of its table, then mark + // it as a covering index + + recomputeColumnsNotIndexed(tls, pIndex) + if !(pTblName != uintptr(0) && int32((*Index)(unsafe.Pointer(pIndex)).FnColumn) >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __75 + } + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 5, 0x20) + j = 0 +__76: + if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __78 + } + if !(j == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { + goto __79 + } + goto __77 +__79: + ; + if !(int32(Xsqlite3TableColumnToIndex(tls, pIndex, int16(j))) >= 0) { + goto __80 + } + goto __77 +__80: + ; + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 5, 0x20) + goto __78 + goto __77 +__77: + j++ + goto __76 + goto __78 +__78: + ; +__75: + ; + + if !(pTab == (*Parse)(unsafe.Pointer(pParse)).FpNewTable) { + goto __81 + } + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__82: + if !(pIdx != 0) { + goto __84 + } + + if !(int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol)) { + goto __85 + } + goto __83 +__85: + ; + k = 0 +__86: + if !(k < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) { + goto __88 + } + + if !(int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(k)*2))) != int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(k)*2)))) { + goto __89 + } + goto __88 +__89: + ; + z1 = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(k)*8)) + z2 = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(k)*8)) + if !(Xsqlite3StrICmp(tls, z1, z2) != 0) { + goto __90 + } + goto __88 +__90: + ; + goto __87 +__87: + k++ + goto __86 + goto __88 +__88: + ; + if !(k == int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) { + goto __91 + } + if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) != int32((*Index)(unsafe.Pointer(pIndex)).FonError)) { + goto __92 + } + // This constraint creates the same index as a previous + // constraint specified somewhere in the CREATE TABLE statement. + // However the ON CONFLICT clauses are different. If both this + // constraint and the previous equivalent constraint have explicit + // ON CONFLICT clauses this is an error. Otherwise, use the + // explicitly specified behavior for the index. + if !!(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default || int32((*Index)(unsafe.Pointer(pIndex)).FonError) == OE_Default) { + goto __93 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+14026, libc.VaList(bp+48, 0)) +__93: + ; + if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { + goto __94 + } + (*Index)(unsafe.Pointer(pIdx)).FonError = (*Index)(unsafe.Pointer(pIndex)).FonError +__94: + ; +__92: + ; + if !(int32(idxType) == SQLITE_IDXTYPE_PRIMARYKEY) { + goto __95 + } + libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(idxType), 0, 0x3) +__95: + ; + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __96 + } + (*Index)(unsafe.Pointer(pIndex)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpNewIndex + (*Parse)(unsafe.Pointer(pParse)).FpNewIndex = pIndex + pIndex = uintptr(0) +__96: + ; + goto exit_create_index +__91: + ; + goto __83 +__83: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __82 + goto __84 +__84: + ; +__81: + ; + + if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __97 + } + + // Link the new Index structure to its table and to the other + // in-memory database structures. + + if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0) { + goto __98 + } + + if !(pTblName != uintptr(0)) { + goto __100 + } + (*Index)(unsafe.Pointer(pIndex)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum + if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { + goto __101 + } + Xsqlite3ErrorMsg(tls, pParse, ts+14068, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) + goto exit_create_index +__101: + ; +__100: + ; + p = Xsqlite3HashInsert(tls, (*Index)(unsafe.Pointer(pIndex)).FpSchema+32, + (*Index)(unsafe.Pointer(pIndex)).FzName, pIndex) + if !(p != 0) { + goto __102 + } + // Malloc must have failed + Xsqlite3OomFault(tls, db) + goto exit_create_index +__102: + ; + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) + goto __99 +__98: + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || pTblName != uintptr(0)) { + goto __103 + } + iMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + + v = Xsqlite3GetVdbe(tls, pParse) + if !(v == uintptr(0)) { + goto __104 + } + goto exit_create_index +__104: + ; + + Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) + + // Create the rootpage for the index using CreateIndex. But before + // doing so, code a Noop instruction and store its address in + // Index.tnum. This is required in case this index is actually a + // PRIMARY KEY and the table is actually a WITHOUT ROWID table. In + // that case the convertToWithoutRowidTable() routine will replace + // the Noop with a Goto to jump over the VDBE code generated below. + (*Index)(unsafe.Pointer(pIndex)).Ftnum = Pgno(Xsqlite3VdbeAddOp0(tls, v, OP_Noop)) + Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, iMem, BTREE_BLOBKEY) + + // Gather the complete text of the CREATE INDEX statement into + // the zStmt variable + + if !(pStart != 0) { + goto __105 + } + n1 = int32(uint32(int32((int64((*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz)-int64((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz))/1)) + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn) + if !(int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz + uintptr(n1-1)))) == ';') { + goto __107 + } + n1-- +__107: + ; + // A named index with an explicit CREATE INDEX statement + zStmt = Xsqlite3MPrintf(tls, db, ts+14085, + libc.VaList(bp+56, func() uintptr { + if onError == OE_None { + return ts + 1525 /* "" */ + } + return ts + 14105 /* " UNIQUE" */ + }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) + goto __106 +__105: + // An automatic index created by a PRIMARY KEY or UNIQUE constraint + // zStmt = sqlite3MPrintf(""); + zStmt = uintptr(0) +__106: + ; + + // Add an entry in sqlite_schema for this index + Xsqlite3NestedParse(tls, pParse, + ts+14113, + libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, + (*Index)(unsafe.Pointer(pIndex)).FzName, + (*Table)(unsafe.Pointer(pTab)).FzName, + iMem, + zStmt)) + Xsqlite3DbFree(tls, db, zStmt) + + // Fill the index with data and reparse the schema. Code an OP_Expire + // to invalidate all pre-compiled statements. + if !(pTblName != 0) { + goto __108 + } + sqlite3RefillIndex(tls, pParse, pIndex, iMem) + Xsqlite3ChangeCookie(tls, pParse, iDb) + Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, + Xsqlite3MPrintf(tls, db, ts+14172, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) +__108: + ; + + Xsqlite3VdbeJumpHere(tls, v, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum)) +__103: + ; +__99: + ; +__97: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 || pTblName == uintptr(0)) { + goto __109 + } + (*Index)(unsafe.Pointer(pIndex)).FpNext = (*Table)(unsafe.Pointer(pTab)).FpIndex + (*Table)(unsafe.Pointer(pTab)).FpIndex = pIndex + pIndex = uintptr(0) + goto __110 +__109: + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __111 + } + + (*Parse)(unsafe.Pointer(pParse)).FpNewIndex = pIndex + pIndex = uintptr(0) +__111: + ; +__110: + ; + + // Clean up before exiting +exit_create_index: + if !(pIndex != 0) { + goto __112 + } + Xsqlite3FreeIndex(tls, db, pIndex) +__112: + ; + if !(pTab != 0) { + goto __113 + } + ppFrom = pTab + 16 +__114: + if !(libc.AssignUintptr(&pThis, *(*uintptr)(unsafe.Pointer(ppFrom))) != uintptr(0)) { + goto __116 + } + if !(int32((*Index)(unsafe.Pointer(pThis)).FonError) != OE_Replace) { + goto __117 + } + goto __115 +__117: + ; +__118: + if !(libc.AssignUintptr(&pNext, (*Index)(unsafe.Pointer(pThis)).FpNext) != uintptr(0) && int32((*Index)(unsafe.Pointer(pNext)).FonError) != OE_Replace) { + goto __119 + } + *(*uintptr)(unsafe.Pointer(ppFrom)) = pNext + (*Index)(unsafe.Pointer(pThis)).FpNext = (*Index)(unsafe.Pointer(pNext)).FpNext + (*Index)(unsafe.Pointer(pNext)).FpNext = pThis + ppFrom = pNext + 40 + goto __118 +__119: + ; + goto __116 + goto __115 +__115: + ppFrom = pThis + 40 + goto __114 + goto __116 +__116: + ; +__113: + ; + Xsqlite3ExprDelete(tls, db, pPIWhere) + Xsqlite3ExprListDelete(tls, db, pList) + Xsqlite3SrcListDelete(tls, db, pTblName) + Xsqlite3DbFree(tls, db, zName) +} + +// Fill the Index.aiRowEst[] array with default information - information +// to be used when we have not run the ANALYZE command. +// +// aiRowEst[0] is supposed to contain the number of elements in the index. +// Since we do not know, guess 1 million. aiRowEst[1] is an estimate of the +// number of rows in the table that match any particular value of the +// first column of the index. aiRowEst[2] is an estimate of the number +// of rows that match any particular combination of the first 2 columns +// of the index. And so forth. It must always be the case that +// +// aiRowEst[N]<=aiRowEst[N-1] +// aiRowEst[N]>=1 +// +// Apart from that, we have little to go on besides intuition as to +// how aiRowEst[] should be initialized. The numbers generated here +// are based on typical values found in actual indices. +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ + var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst + var x LogEst + var nCopy int32 = func() int32 { + if int32(uint64(unsafe.Sizeof(aVal))/uint64(unsafe.Sizeof(LogEst(0)))) < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) { + return int32(uint64(unsafe.Sizeof(aVal)) / uint64(unsafe.Sizeof(LogEst(0)))) + } + return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + }() + var i int32 + + // Indexes with default row estimates should not have stat1 data + + // Set the first entry (number of rows in the index) to the estimated + // number of rows in the table, or half the number of rows in the table + // for a partial index. + // + // 2020-05-27: If some of the stat data is coming from the sqlite_stat1 + // table but other parts we are having to guess at, then do not let the + // estimated number of rows in the table be less than 1000 (LogEst 99). + // Failure to do this can cause the indexes for which we do not have + // stat1 data to be ignored by the query planner. + x = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FnRowLogEst + + if int32(x) < 99 { + (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FnRowLogEst = libc.AssignInt16(&x, int16(99)) + } + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != uintptr(0) { + x = int16(int32(x) - 10) + } + *(*LogEst)(unsafe.Pointer(a)) = x + + // Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is + // 6 and each subsequent value (if any) is 5. + libc.Xmemcpy(tls, a+1*2, uintptr(unsafe.Pointer(&aVal)), uint64(nCopy)*uint64(unsafe.Sizeof(LogEst(0)))) + for i = nCopy + 1; i <= int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { + *(*LogEst)(unsafe.Pointer(a + uintptr(i)*2)) = int16(23) + } + + if int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None { + *(*LogEst)(unsafe.Pointer(a + uintptr((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)*2)) = int16(0) + } +} + +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ + +// This routine will drop an existing named index. This routine +// implements the DROP INDEX statement. +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pIndex uintptr + var v uintptr + var db uintptr + var iDb int32 + var code int32 + var pTab uintptr + var zDb uintptr + var zTab uintptr + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __1 + } + goto exit_drop_index +__1: + ; + // Never called with prior non-OOM errors + + if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { + goto __2 + } + goto exit_drop_index +__2: + ; + pIndex = Xsqlite3FindIndex(tls, db, (*SrcItem)(unsafe.Pointer(pName+8)).FzName, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) + if !(pIndex == uintptr(0)) { + goto __3 + } + if !!(ifExists != 0) { + goto __4 + } + Xsqlite3ErrorMsg(tls, pParse, ts+14199, libc.VaList(bp, pName+8)) + goto __5 +__4: + Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) + sqlite3ForceNotReadOnly(tls, pParse) +__5: + ; + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + goto exit_drop_index +__3: + ; + if !(int32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x3>>0) != SQLITE_IDXTYPE_APPDEF) { + goto __6 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+14217, libc.VaList(bp+8, 0)) + goto exit_drop_index +__6: + ; + iDb = Xsqlite3SchemaToIndex(tls, db, (*Index)(unsafe.Pointer(pIndex)).FpSchema) + + code = SQLITE_DROP_INDEX + pTab = (*Index)(unsafe.Pointer(pIndex)).FpTable + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + zTab = func() uintptr { + if !(0 != 0) && iDb == 1 { + return ts + 12024 + } + return ts + 5835 + }() + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { + goto __7 + } + goto exit_drop_index +__7: + ; + if !(!(0 != 0) && iDb == 1) { + goto __8 + } + code = SQLITE_DROP_TEMP_INDEX +__8: + ; + if !(Xsqlite3AuthCheck(tls, pParse, code, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, zDb) != 0) { + goto __9 + } + goto exit_drop_index +__9: + ; + + // Generate code to remove the index and from the schema table + v = Xsqlite3GetVdbe(tls, pParse) + if !(v != 0) { + goto __10 + } + Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) + Xsqlite3NestedParse(tls, pParse, + ts+14290, + libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11364, (*Index)(unsafe.Pointer(pIndex)).FzName) + Xsqlite3ChangeCookie(tls, pParse, iDb) + destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) + Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) +__10: + ; + +exit_drop_index: + Xsqlite3SrcListDelete(tls, db, pName) +} + +// pArray is a pointer to an array of objects. Each object in the +// array is szEntry bytes in size. This routine uses sqlite3DbRealloc() +// to extend the array so that there is space for a new object at the end. +// +// When this function is called, *pnEntry contains the current size of +// the array (in entries - so the allocation is ((*pnEntry) * szEntry) bytes +// in total). +// +// If the realloc() is successful (i.e. if no OOM condition occurs), the +// space allocated for the new object is zeroed, *pnEntry updated to +// reflect the new size of the array and a pointer to the new allocation +// returned. *pIdx is set to the index of the new array entry in this case. +// +// Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains +// unchanged and a copy of pArray returned. +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ + var z uintptr + var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) + if n&(n-int64(1)) == int64(0) { + var sz Sqlite3_int64 + if n == int64(0) { + sz = int64(1) + } else { + sz = int64(2) * n + } + var pNew uintptr = Xsqlite3DbRealloc(tls, db, pArray, uint64(sz*Sqlite3_int64(szEntry))) + if pNew == uintptr(0) { + *(*int32)(unsafe.Pointer(pIdx)) = -1 + return pArray + } + pArray = pNew + } + z = pArray + libc.Xmemset(tls, z+uintptr(n*Sqlite3_int64(szEntry)), 0, uint64(szEntry)) + *(*int32)(unsafe.Pointer(pnEntry))++ + return pArray +} + +// Append a new element to the given IdList. Create a new IdList if +// need be. +// +// A new IdList is returned, or NULL if malloc() fails. +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + // var i int32 at bp, 4 + + if pList == uintptr(0) { + pList = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(IdList{}))) + if pList == uintptr(0) { + return uintptr(0) + } + } + (*IdList)(unsafe.Pointer(pList)).Fa = Xsqlite3ArrayAllocate(tls, + db, + (*IdList)(unsafe.Pointer(pList)).Fa, + int32(unsafe.Sizeof(IdList_item{})), + pList+8, + bp) + if *(*int32)(unsafe.Pointer(bp)) < 0 { + Xsqlite3IdListDelete(tls, db, pList) + return uintptr(0) + } + (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa + uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*16)).FzName = Xsqlite3NameFromToken(tls, db, pToken) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(*(*int32)(unsafe.Pointer(bp)))*16)).FzName != 0 { + Xsqlite3RenameTokenMap(tls, pParse, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*16)).FzName, pToken) + } + return pList +} + +// Delete an IdList. +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ + var i int32 + if pList == uintptr(0) { + return + } + for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { + Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(i)*16)).FzName) + } + Xsqlite3DbFree(tls, db, (*IdList)(unsafe.Pointer(pList)).Fa) + Xsqlite3DbFreeNN(tls, db, pList) +} + +// Return the index in pList of the identifier named zId. Return -1 +// if not found. +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ + var i int32 + if pList == uintptr(0) { + return -1 + } + for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { + if Xsqlite3StrICmp(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(i)*16)).FzName, zName) == 0 { + return i + } + } + return -1 +} + +// Maximum size of a SrcList object. +// The SrcList object is used to represent the FROM clause of a +// SELECT statement, and the query planner cannot deal with more +// than 64 tables in a join. So any value larger than 64 here +// is sufficient for most uses. Smaller values, like say 10, are +// appropriate for small and memory-limited applications. + +// Expand the space allocated for the given SrcList object by +// creating nExtra new slots beginning at iStart. iStart is zero based. +// New slots are zeroed. +// +// For example, suppose a SrcList initially contains two entries: A,B. +// To append 3 new entries onto the end, do this: +// +// sqlite3SrcListEnlarge(db, pSrclist, 3, 2); +// +// After the call above it would contain: A, B, nil, nil, nil. +// If the iStart argument had been 1 instead of 2, then the result +// would have been: A, nil, nil, nil, B. To prepend the new slots, +// the iStart value would be 0. The result then would +// be: nil, nil, nil, A, B. +// +// If a memory allocation fails or the SrcList becomes too large, leave +// the original SrcList unchanged, return NULL, and leave an error message +// in pParse. +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var i int32 + + // Sanity checking on calling parameters + + // Allocate additional space if needed + if U32((*SrcList)(unsafe.Pointer(pSrc)).FnSrc)+U32(nExtra) > (*SrcList)(unsafe.Pointer(pSrc)).FnAlloc { + var pNew uintptr + var nAlloc Sqlite3_int64 = int64(2)*Sqlite3_int64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc) + Sqlite3_int64(nExtra) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { + Xsqlite3ErrorMsg(tls, pParse, ts+14350, + libc.VaList(bp, SQLITE_MAX_SRCLIST)) + return uintptr(0) + } + if nAlloc > int64(SQLITE_MAX_SRCLIST) { + nAlloc = int64(SQLITE_MAX_SRCLIST) + } + pNew = Xsqlite3DbRealloc(tls, db, pSrc, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nAlloc-int64(1))*uint64(unsafe.Sizeof(SrcItem{}))) + if pNew == uintptr(0) { + + return uintptr(0) + } + pSrc = pNew + (*SrcList)(unsafe.Pointer(pSrc)).FnAlloc = U32(nAlloc) + } + + // Move existing slots that come after the newly inserted slots + // out of the way + for i = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc - 1; i >= iStart; i-- { + *(*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i+nExtra)*112)) = *(*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)) + } + *(*int32)(unsafe.Pointer(pSrc)) += nExtra + + // Zero the newly allocated slots + libc.Xmemset(tls, pSrc+8+uintptr(iStart)*112, 0, uint64(unsafe.Sizeof(SrcItem{}))*uint64(nExtra)) + for i = iStart; i < iStart+nExtra; i++ { + (*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)).FiCursor = -1 + } + + // Return a pointer to the enlarged SrcList + return pSrc +} + +// Append a new table name to the given SrcList. Create a new SrcList if +// need be. A new entry is created in the SrcList even if pTable is NULL. +// +// A SrcList is returned, or NULL if there is an OOM error or if the +// SrcList grows to large. The returned +// SrcList might be the same as the SrcList that was input or it might be +// a new one. If an OOM error does occurs, then the prior value of pList +// that is input to this routine is automatically freed. +// +// If pDatabase is not null, it means that the table has an optional +// database name prefix. Like this: "database.table". The pDatabase +// points to the table name and the pTable points to the database name. +// The SrcList.a[].zName field is filled with the table name which might +// come from pTable (if pDatabase is NULL) or from pDatabase. +// SrcList.a[].zDatabase is filled with the database name from pTable, +// or with NULL if no database is specified. +// +// In other words, if call like this: +// +// sqlite3SrcListAppend(D,A,B,0); +// +// Then B is a table name and the database name is unspecified. If called +// like this: +// +// sqlite3SrcListAppend(D,A,B,C); +// +// Then C is the table name and B is the database name. If C is defined +// then so is B. In other words, we never have a case where: +// +// sqlite3SrcListAppend(D,A,0,C); +// +// Both pTable and pDatabase are assumed to be quoted. They are dequoted +// before being added to the SrcList. +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ + var pItem uintptr + var db uintptr + // Cannot have C without B + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + if pList == uintptr(0) { + pList = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(SrcList{}))) + if pList == uintptr(0) { + return uintptr(0) + } + (*SrcList)(unsafe.Pointer(pList)).FnAlloc = U32(1) + (*SrcList)(unsafe.Pointer(pList)).FnSrc = 1 + libc.Xmemset(tls, pList+8, 0, uint64(unsafe.Sizeof(SrcItem{}))) + (*SrcItem)(unsafe.Pointer(pList + 8)).FiCursor = -1 + } else { + var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, pList, 1, (*SrcList)(unsafe.Pointer(pList)).FnSrc) + if pNew == uintptr(0) { + Xsqlite3SrcListDelete(tls, db, pList) + return uintptr(0) + } else { + pList = pNew + } + } + pItem = pList + 8 + uintptr((*SrcList)(unsafe.Pointer(pList)).FnSrc-1)*112 + if pDatabase != 0 && (*Token)(unsafe.Pointer(pDatabase)).Fz == uintptr(0) { + pDatabase = uintptr(0) + } + if pDatabase != 0 { + (*SrcItem)(unsafe.Pointer(pItem)).FzName = Xsqlite3NameFromToken(tls, db, pDatabase) + (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = Xsqlite3NameFromToken(tls, db, pTable) + } else { + (*SrcItem)(unsafe.Pointer(pItem)).FzName = Xsqlite3NameFromToken(tls, db, pTable) + (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = uintptr(0) + } + return pList +} + +// Assign VdbeCursor index numbers to all tables in a SrcList +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ + var i int32 + var pItem uintptr + + if pList != 0 { + i = 0 + pItem = pList + 8 /* &.a */ + __1: + if !(i < (*SrcList)(unsafe.Pointer(pList)).FnSrc) { + goto __3 + } + { + if (*SrcItem)(unsafe.Pointer(pItem)).FiCursor >= 0 { + goto __2 + } + (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 { + Xsqlite3SrcListAssignCursors(tls, pParse, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FpSrc) + } + + } + goto __2 + __2: + i++ + pItem += 112 + goto __1 + goto __3 + __3: + } +} + +// Delete an entire SrcList including all its substructure. +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ + var i int32 + var pItem uintptr + if pList == uintptr(0) { + return + } + pItem = pList + 8 /* &.a */ + i = 0 +__1: + if !(i < (*SrcList)(unsafe.Pointer(pList)).FnSrc) { + goto __3 + } + { + if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { + Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) + if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { + Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x2>>1)) != 0 { + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 96))) + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 { + Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 96))) + } + Xsqlite3DeleteTable(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpTab) + if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 { + Xsqlite3SelectDelete(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FpOn != 0 { + Xsqlite3ExprDelete(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpOn) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FpUsing != 0 { + Xsqlite3IdListDelete(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpUsing) + } + + } + goto __2 +__2: + i++ + pItem += 112 + goto __1 + goto __3 +__3: + ; + Xsqlite3DbFreeNN(tls, db, pList) +} + +// This routine is called by the parser to add a new term to the +// end of a growing FROM clause. The "p" parameter is the part of +// the FROM clause that has already been constructed. "p" is NULL +// if this is the first term of the FROM clause. pTable and pDatabase +// are the name of the table and database named in the FROM clause term. +// pDatabase is NULL if the database name qualifier is missing - the +// usual case. If the term has an alias, then pAlias points to the +// alias token. If the term is a subquery, then pSubquery is the +// SELECT statement that the subquery encodes. The pTable and +// pDatabase parameters are NULL for subqueries. The pOn and pUsing +// parameters are the content of the ON and USING clauses. +// +// Return a new SrcList which encodes is the FROM with the new +// term added. +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pItem uintptr + var db uintptr + var pToken uintptr + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { + goto __1 + } + Xsqlite3ErrorMsg(tls, pParse, ts+14386, + libc.VaList(bp, func() uintptr { + if pOn != 0 { + return ts + 14422 /* "ON" */ + } + return ts + 14425 /* "USING" */ + }())) + goto append_from_error +__1: + ; + p = Xsqlite3SrcListAppend(tls, pParse, p, pTable, pDatabase) + if !(p == uintptr(0)) { + goto __2 + } + goto append_from_error +__2: + ; + + pItem = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 + + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0) { + goto __3 + } + if pDatabase != 0 && (*Token)(unsafe.Pointer(pDatabase)).Fz != 0 { + pToken = pDatabase + } else { + pToken = pTable + } + Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer(pItem)).FzName, pToken) +__3: + ; + + if !((*Token)(unsafe.Pointer(pAlias)).Fn != 0) { + goto __4 + } + (*SrcItem)(unsafe.Pointer(pItem)).FzAlias = Xsqlite3NameFromToken(tls, db, pAlias) +__4: + ; + (*SrcItem)(unsafe.Pointer(pItem)).FpSelect = pSubquery + (*SrcItem)(unsafe.Pointer(pItem)).FpOn = pOn + (*SrcItem)(unsafe.Pointer(pItem)).FpUsing = pUsing + return p + +append_from_error: + ; + Xsqlite3ExprDelete(tls, db, pOn) + Xsqlite3IdListDelete(tls, db, pUsing) + Xsqlite3SelectDelete(tls, db, pSubquery) + return uintptr(0) +} + +// Add an INDEXED BY or NOT INDEXED clause to the most recently added +// element of the source-list passed as the second argument. +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ + + if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { + var pItem uintptr + + pItem = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 + + if (*Token)(unsafe.Pointer(pIndexedBy)).Fn == uint32(1) && !(int32((*Token)(unsafe.Pointer(pIndexedBy)).Fz) != 0) { + // A "NOT INDEXED" clause was supplied. See parse.y + // construct "indexed_opt" for details. + libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 0, 0x1) + } else { + *(*uintptr)(unsafe.Pointer(pItem + 96)) = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIndexedBy) + libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 1, 0x2) + // No collision on union u2 + } + } +} + +// Append the contents of SrcList p2 to SrcList p1 and return the resulting +// SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 +// are deleted by this function. +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ + + if p2 != 0 { + var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) + if pNew == uintptr(0) { + Xsqlite3SrcListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p2) + } else { + p1 = pNew + libc.Xmemcpy(tls, p1+8+1*112, p2+8, uint64((*SrcList)(unsafe.Pointer(p2)).FnSrc)*uint64(unsafe.Sizeof(SrcItem{}))) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p2) + } + } + return p1 +} + +// Add the list of function arguments to the SrcList entry for a +// table-valued-function. +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ + if p != 0 { + var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 + + *(*uintptr)(unsafe.Pointer(pItem + 96)) = pList + libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 2, 0x4) + } else { + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList) + } +} + +// When building up a FROM clause in the parser, the join operator +// is initially attached to the left operand. But the code generator +// expects the join operator to be on the right operand. This routine +// Shifts all join operators from left to right for an entire FROM +// clause. +// +// Example: Suppose the join is like this: +// +// A natural cross join B +// +// The operator is "natural cross join". The A and B operands are stored +// in p->a[0] and p->a[1], respectively. The parser initially stores the +// operator with A. This routine shifts that operator over to B. +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ + if p != 0 { + var i int32 + for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { + (*SrcItem)(unsafe.Pointer(p + 8 + uintptr(i)*112)).Ffg.Fjointype = (*SrcItem)(unsafe.Pointer(p + 8 + uintptr(i-1)*112)).Ffg.Fjointype + } + (*SrcItem)(unsafe.Pointer(p + 8)).Ffg.Fjointype = U8(0) + } +} + +// Generate VDBE code for a BEGIN statement. +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ + var db uintptr + var v uintptr + var i int32 + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14431, uintptr(0), uintptr(0)) != 0 { + return + } + v = Xsqlite3GetVdbe(tls, pParse) + if !(v != 0) { + return + } + if type1 != TK_DEFERRED { + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var eTxnType int32 + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 && Xsqlite3BtreeIsReadonly(tls, pBt) != 0 { + eTxnType = 0 // Read txn + } else if type1 == TK_EXCLUSIVE { + eTxnType = 2 // Exclusive txn + } else { + eTxnType = 1 // Write txn + } + Xsqlite3VdbeAddOp2(tls, v, OP_Transaction, i, eTxnType) + Xsqlite3VdbeUsesBtree(tls, v, i) + } + } + Xsqlite3VdbeAddOp0(tls, v, OP_AutoCommit) +} + +// Generate VDBE code for a COMMIT or ROLLBACK statement. +// Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise +// code is generated for a COMMIT. +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ + var v uintptr + var isRollback int32 + + isRollback = libc.Bool32(eType == TK_ROLLBACK) + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, + func() uintptr { + if isRollback != 0 { + return ts + 14437 + } + return ts + 14446 + }(), uintptr(0), uintptr(0)) != 0 { + return + } + v = Xsqlite3GetVdbe(tls, pParse) + if v != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_AutoCommit, 1, isRollback) + } +} + +// This function is called by the parser when it parses a command to create, +// release or rollback an SQL savepoint. +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ + var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) + if zName != 0 { + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + + if !(v != 0) || Xsqlite3AuthCheck(tls, pParse, SQLITE_SAVEPOINT, az[op], zName, uintptr(0)) != 0 { + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zName) + return + } + Xsqlite3VdbeAddOp4(tls, v, OP_Savepoint, op, 0, 0, zName, -7) + } +} + +var az = [3]uintptr{ts + 14431, ts + 14453, ts + 14437} /* sqlite3.c:119019:23 */ + +// Make sure the TEMP database is open and available for use. Return +// the number of errors. Leave any error messages in the pParse structure. +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt == uintptr(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) != 0) { + var rc int32 + // var pBt uintptr at bp, 8 + + rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) + if rc != SQLITE_OK { + Xsqlite3ErrorMsg(tls, pParse, + ts+14461, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = rc + return 1 + } + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpBt = *(*uintptr)(unsafe.Pointer(bp /* pBt */)) + + if SQLITE_NOMEM == Xsqlite3BtreeSetPageSize(tls, *(*uintptr)(unsafe.Pointer(bp)), (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize, 0, 0) { + Xsqlite3OomFault(tls, db) + return 1 + } + } + return 0 +} + +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ + +// Record the fact that the schema cookie will need to be verified +// for database iDb. The code to actually verify the schema cookie +// will occur at the end of the top-level VDBE and will be generated +// later, by sqlite3FinishCoding(). +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ + + if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<>0) == SQLITE_IDXTYPE_PRIMARYKEY { + return SQLITE_CONSTRAINT | int32(6)<<8 + } + return SQLITE_CONSTRAINT | int32(8)<<8 + }(), + onError, zErr, int8(-7), uint8(P5_ConstraintUnique)) +} + +// Code an OP_Halt due to non-unique rowid. +func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab uintptr) { /* sqlite3.c:119217:21: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var zMsg uintptr + var rc int32 + if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11937, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + rc = SQLITE_CONSTRAINT | int32(6)<<8 + } else { + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14545, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + rc = SQLITE_CONSTRAINT | int32(10)<<8 + } + Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), + uint8(P5_ConstraintUnique)) +} + +// Check to see if pIndex uses the collating sequence pColl. Return +// true if it does and false if it does not. +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ + var i int32 + + for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { + var z uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) + + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2))) >= 0 && 0 == Xsqlite3StrICmp(tls, z, zColl) { + return 1 + } + } + return 0 +} + +// Recompute all indices of pTab that use the collating sequence pColl. +// If pColl==0 then recompute all indices of pTab. +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + var pIndex uintptr // An index associated with pTab + + for pIndex = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIndex != 0; pIndex = (*Index)(unsafe.Pointer(pIndex)).FpNext { + if zColl == uintptr(0) || collationMatch(tls, zColl, pIndex) != 0 { + var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) + Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) + sqlite3RefillIndex(tls, pParse, pIndex, -1) + } + } + } +} + +// Recompute all indices of all tables in all databases where the +// indices use the collating sequence pColl. If pColl==0 then recompute +// all indices everywhere. +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ + var pDb uintptr // A single database + var iDb int32 // The database index number + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + var k uintptr // For looping over tables in pDb + var pTab uintptr // A table in the database + + // Needed for schema access + iDb = 0 + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb +__1: + if !(iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __3 + } + { + + for k = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema + 8)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { + pTab = (*HashElem)(unsafe.Pointer(k)).Fdata + reindexTable(tls, pParse, pTab, zColl) + } + + } + goto __2 +__2: + iDb++ + pDb += 32 + goto __1 + goto __3 +__3: +} + +// Generate code for the REINDEX command. +// +// REINDEX -- 1 +// REINDEX -- 2 +// REINDEX ?.? -- 3 +// REINDEX ?.? -- 4 +// +// Form 1 causes all indices in all attached databases to be rebuilt. +// Form 2 rebuilds all indices in all databases that use the named +// collating function. Forms 3 and 4 rebuild the named index or all +// indices associated with the named table. +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pColl uintptr // Collating sequence to be reindexed, or NULL + var z uintptr // Name of a table or index + var zDb uintptr // Name of the database + var pTab uintptr // A table in the database + var pIndex uintptr // An index associated with pTab + var iDb int32 // The database index number + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + // var pObjName uintptr at bp, 8 + // Name of the table or index to be reindexed + + // Read the database schema. If an error occurs, leave an error message + // and code in pParse and return NULL. + if SQLITE_OK != Xsqlite3ReadSchema(tls, pParse) { + return + } + + if pName1 == uintptr(0) { + reindexDatabases(tls, pParse, uintptr(0)) + return + } else if pName2 == uintptr(0) || (*Token)(unsafe.Pointer(pName2)).Fz == uintptr(0) { + var zColl uintptr + + zColl = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName1) + if !(zColl != 0) { + return + } + pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) + if pColl != 0 { + reindexDatabases(tls, pParse, zColl) + Xsqlite3DbFree(tls, db, zColl) + return + } + Xsqlite3DbFree(tls, db, zColl) + } + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) + if iDb < 0 { + return + } + z = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pObjName */))) + if z == uintptr(0) { + return + } + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + pTab = Xsqlite3FindTable(tls, db, z, zDb) + if pTab != 0 { + reindexTable(tls, pParse, pTab, uintptr(0)) + Xsqlite3DbFree(tls, db, z) + return + } + pIndex = Xsqlite3FindIndex(tls, db, z, zDb) + Xsqlite3DbFree(tls, db, z) + if pIndex != 0 { + Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) + sqlite3RefillIndex(tls, pParse, pIndex, -1) + return + } + Xsqlite3ErrorMsg(tls, pParse, ts+14554, 0) +} + +// Return a KeyInfo structure that is appropriate for the given Index. +// +// The caller should invoke sqlite3KeyInfoUnref() on the returned object +// when it has finished using it. +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ + var i int32 + var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + var pKey uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { + pKey = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nKey, nCol-nKey) + } else { + pKey = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nCol, 0) + } + if pKey != 0 { + + for i = 0; i < nCol; i++ { + var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8)) + *(*uintptr)(unsafe.Pointer(pKey + 32 + uintptr(i)*8)) = func() uintptr { + if zColl == uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) { + return uintptr(0) + } + return Xsqlite3LocateCollSeq(tls, pParse, zColl) + }() + *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKey)).FaSortFlags + uintptr(i))) = *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i))) + + } + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + + if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x100>>8) == 0 { + // Deactivate the index because it contains an unknown collating + // sequence. The only way to reactive the index is to reload the + // schema. Adding the missing collating sequence later does not + // reactive the index. The application had the chance to register + // the missing index using the collation-needed callback. For + // simplicity, SQLite will not give the application a second chance. + libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 8, 0x100) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(2)<<8 + } + Xsqlite3KeyInfoUnref(tls, pKey) + pKey = uintptr(0) + } + } + return pKey +} + +// Create a new CTE object +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ + var pNew uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Cte{}))) + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3ExprListDelete(tls, db, pArglist) + Xsqlite3SelectDelete(tls, db, pQuery) + } else { + (*Cte)(unsafe.Pointer(pNew)).FpSelect = pQuery + (*Cte)(unsafe.Pointer(pNew)).FpCols = pArglist + (*Cte)(unsafe.Pointer(pNew)).FzName = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) + (*Cte)(unsafe.Pointer(pNew)).FeM10d = eM10d + } + return pNew +} + +// Clear information from a Cte object, but do not deallocate storage +// for the object itself. +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ + + Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) + Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) + Xsqlite3DbFree(tls, db, (*Cte)(unsafe.Pointer(pCte)).FzName) +} + +// Free the contents of the CTE object passed as the second argument. +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ + + cteClear(tls, db, pCte) + Xsqlite3DbFree(tls, db, pCte) +} + +// This routine is invoked once per CTE by the parser while parsing a +// WITH clause. The CTE described by teh third argument is added to +// the WITH clause of the second argument. If the second argument is +// NULL, then a new WITH argument is created. +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pNew uintptr + var zName uintptr + + if pCte == uintptr(0) { + return pWith + } + + // Check that the CTE name is unique within this WITH clause. If + // not, store an error in the Parse structure. + zName = (*Cte)(unsafe.Pointer(pCte)).FzName + if zName != 0 && pWith != 0 { + var i int32 + for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { + if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+14600, libc.VaList(bp, zName)) + } + } + } + + if pWith != 0 { + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(pWith)).FnCte)) + pNew = Xsqlite3DbRealloc(tls, db, pWith, uint64(nByte)) + } else { + pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(With{}))) + } + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3CteDelete(tls, db, pCte) + pNew = pWith + } else { + *(*Cte)(unsafe.Pointer(pNew + 16 + uintptr(libc.PostIncInt32(&(*With)(unsafe.Pointer(pNew)).FnCte, 1))*48)) = *(*Cte)(unsafe.Pointer(pCte)) + Xsqlite3DbFree(tls, db, pCte) + } + + return pNew +} + +// Free the contents of the With object passed as the second argument. +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ + if pWith != 0 { + var i int32 + for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { + cteClear(tls, db, pWith+16+uintptr(i)*48) + } + Xsqlite3DbFree(tls, db, pWith) + } +} + +//************* End of build.c ********************************************** +//************* Begin file callback.c *************************************** +// 2005 May 23 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains functions used to access the internal hash tables +// of user defined functions and collation sequences. + +// #include "sqliteInt.h" + +// Invoke the 'collation needed' callback to request a collation sequence +// in the encoding enc of name zName, length nName. +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ + + if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { + var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) + if !(zExternal != 0) { + return + } + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, enc, zExternal) + Xsqlite3DbFree(tls, db, zExternal) + } + if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 != 0 { + var zExternal uintptr + var pTmp uintptr = Xsqlite3ValueNew(tls, db) + Xsqlite3ValueSetStr(tls, pTmp, -1, zName, uint8(SQLITE_UTF8), uintptr(0)) + zExternal = Xsqlite3ValueText(tls, pTmp, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) + if zExternal != 0 { + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, int32((*Sqlite3)(unsafe.Pointer(db)).Fenc), zExternal) + } + Xsqlite3ValueFree(tls, pTmp) + } +} + +// This routine is called if the collation factory fails to deliver a +// collation function in the best encoding but there may be other versions +// of this collation function (for other text encodings) available. Use one +// of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if +// possible. +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ + var pColl2 uintptr + var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName + var i int32 + for i = 0; i < 3; i++ { + pColl2 = Xsqlite3FindCollSeq(tls, db, aEnc[i], z, 0) + if (*CollSeq)(unsafe.Pointer(pColl2)).FxCmp != uintptr(0) { + libc.Xmemcpy(tls, pColl, pColl2, uint64(unsafe.Sizeof(CollSeq{}))) + (*CollSeq)(unsafe.Pointer(pColl)).FxDel = uintptr(0) // Do not copy the destructor + return SQLITE_OK + } + } + return SQLITE_ERROR +} + +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ + +// This routine is called on a collation sequence before it is used to +// check that it is defined. An undefined collation sequence exists when +// a database is loaded that contains references to collation sequences +// that have not been defined by sqlite3_create_collation() etc. +// +// If required, this routine calls the 'collation needed' callback to +// request a definition of the collating sequence. If this doesn't work, +// an equivalent collating sequence that uses a text encoding different +// from the main database is substituted, if one is available. +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ + if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { + var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var p uintptr = Xsqlite3GetCollSeq(tls, pParse, (*Sqlite3)(unsafe.Pointer(db)).Fenc, pColl, zName) + if !(p != 0) { + return SQLITE_ERROR + } + + } + return SQLITE_OK +} + +// Locate and return an entry from the db.aCollSeq hash table. If the entry +// specified by zName and nName is not found and parameter 'create' is +// true, then create a new entry. Otherwise return NULL. +// +// Each pointer stored in the sqlite3.aCollSeq hash table contains an +// array of three CollSeq structures. The first is the collation sequence +// preferred for UTF-8, the second UTF-16le, and the third UTF-16be. +// +// Stored immediately after the three collation sequences is a copy of +// the collation sequence name. A pointer to this string is stored in +// each collation sequence structure. +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ + var pColl uintptr + pColl = Xsqlite3HashFind(tls, db+640, zName) + + if uintptr(0) == pColl && create != 0 { + var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 + pColl = Xsqlite3DbMallocZero(tls, db, uint64(uint64(3)*uint64(unsafe.Sizeof(CollSeq{}))+uint64(nName))) + if pColl != 0 { + var pDel uintptr = uintptr(0) + (*CollSeq)(unsafe.Pointer(pColl)).FzName = pColl + 3*40 + (*CollSeq)(unsafe.Pointer(pColl)).Fenc = U8(SQLITE_UTF8) + (*CollSeq)(unsafe.Pointer(pColl + 1*40)).FzName = pColl + 3*40 + (*CollSeq)(unsafe.Pointer(pColl + 1*40)).Fenc = U8(SQLITE_UTF16LE) + (*CollSeq)(unsafe.Pointer(pColl + 2*40)).FzName = pColl + 3*40 + (*CollSeq)(unsafe.Pointer(pColl + 2*40)).Fenc = U8(SQLITE_UTF16BE) + libc.Xmemcpy(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint64(nName)) + pDel = Xsqlite3HashInsert(tls, db+640, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + + // If a malloc() failure occurred in sqlite3HashInsert(), it will + // return the pColl pointer to be deleted (because it wasn't added + // to the hash table). + + if pDel != uintptr(0) { + Xsqlite3OomFault(tls, db) + Xsqlite3DbFree(tls, db, pDel) + pColl = uintptr(0) + } + } + } + return pColl +} + +// Parameter zName points to a UTF-8 encoded string nName bytes long. +// Return the CollSeq* pointer for the collation sequence named zName +// for the encoding 'enc' from the database 'db'. +// +// If the entry specified is not found and 'create' is true, then create a +// new entry. Otherwise return NULL. +// +// A separate function sqlite3LocateCollSeq() is a wrapper around +// this routine. sqlite3LocateCollSeq() invokes the collation factory +// if necessary and generates an error message if the collating sequence +// cannot be found. +// +// See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ + var pColl uintptr + + if zName != 0 { + pColl = findCollSeqEntry(tls, db, zName, create) + if pColl != 0 { + pColl += 40 * uintptr(int32(enc)-1) + } + } else { + pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl + } + return pColl +} + +// Change the text encoding for a database connection. This means that +// the pDfltColl must change as well. +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ + + (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc + // EVIDENCE-OF: R-08308-17224 The default collating function for all + // strings is BINARY. + (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl = Xsqlite3FindCollSeq(tls, db, enc, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), 0) +} + +// This function is responsible for invoking the collation factory callback +// or substituting a collation sequence of a different encoding when the +// requested collation sequence is not available in the desired encoding. +// +// If it is not NULL, then pColl must point to the database native encoding +// collation sequence with name zName, length nName. +// +// The return value is either the collation sequence to be used in database +// db for collation type name zName, length nName, or NULL, if no collation +// sequence can be found. If no collation is found, leave an error message. +// +// See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + p = pColl + if !(p != 0) { + p = Xsqlite3FindCollSeq(tls, db, enc, zName, 0) + } + if !(p != 0) || !(int32((*CollSeq)(unsafe.Pointer(p)).FxCmp) != 0) { + // No collation sequence of this type for this encoding is registered. + // Call the collation factory to see if it can supply us with one. + callCollNeeded(tls, db, int32(enc), zName) + p = Xsqlite3FindCollSeq(tls, db, enc, zName, 0) + } + if p != 0 && !(int32((*CollSeq)(unsafe.Pointer(p)).FxCmp) != 0) && synthCollSeq(tls, db, p) != 0 { + p = uintptr(0) + } + + if p == uintptr(0) { + Xsqlite3ErrorMsg(tls, pParse, ts+14630, libc.VaList(bp, zName)) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 + } + return p +} + +// This function returns the collation sequence for database native text +// encoding identified by the string zName. +// +// If the requested collation sequence is not available, or not available +// in the database native encoding, the collation factory is invoked to +// request it. If the collation factory does not supply such a sequence, +// and the sequence is available in another text encoding, then that is +// returned instead. +// +// If no versions of the requested collations sequence are available, or +// another error occurs, NULL is returned and an error message written into +// pParse. +// +// This routine is a wrapper around sqlite3FindCollSeq(). This routine +// invokes the collation factory if the named collation cannot be found +// and generates an error message. +// +// See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc + var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy + var pColl uintptr + + pColl = Xsqlite3FindCollSeq(tls, db, enc, zName, int32(initbusy)) + if !(initbusy != 0) && (!(pColl != 0) || !(int32((*CollSeq)(unsafe.Pointer(pColl)).FxCmp) != 0)) { + pColl = Xsqlite3GetCollSeq(tls, pParse, enc, pColl, zName) + } + + return pColl +} + +// During the search for the best function definition, this procedure +// is called to test how well the function passed as the first argument +// matches the request for a function with nArg arguments in a system +// that uses encoding enc. The value returned indicates how well the +// request is matched. A higher value indicates a better match. +// +// If nArg is -1 that means to only return a match (non-zero) if p->nArg +// is also -1. In other words, we are searching for a function that +// takes a variable number of arguments. +// +// If nArg is -2 that means that we are searching for any function +// regardless of the number of arguments it uses, so return a positive +// match score for any +// +// The returned value is always between 0 and 6, as follows: +// +// 0: Not a match. +// 1: UTF8/16 conversion required and function takes any number of arguments. +// 2: UTF16 byte order change required and function takes any number of args. +// 3: encoding matches and function takes any number of arguments +// 4: UTF8/16 conversion required - argument count matches exactly +// 5: UTF16 byte order conversion required - argument count matches exactly +// 6: Perfect match: encoding and argument count match exactly. +// +// If nArg==(-2) then any function with a non-null xSFunc is +// a perfect match and any function with xSFunc NULL is +// a non-match. +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ + var match int32 + + // Wrong number of arguments means "no match" + if int32((*FuncDef)(unsafe.Pointer(p)).FnArg) != nArg { + if nArg == -2 { + if (*FuncDef)(unsafe.Pointer(p)).FxSFunc == uintptr(0) { + return 0 + } + return FUNC_PERFECT_MATCH + } + if int32((*FuncDef)(unsafe.Pointer(p)).FnArg) >= 0 { + return 0 + } + } + + // Give a better score to a function with a specific number of arguments + // than to function that accepts any number of arguments. + if int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { + match = 4 + } else { + match = 1 + } + + // Bonus points if the text encoding matches + if U32(enc) == (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) { + match = match + 2 // Exact encoding match + } else if U32(enc)&(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(2) != U32(0) { + match = match + 1 // Both are UTF16, but with different byte orders + } + + return match +} + +// Search a FuncDefHash for a function with the given name. Return +// a pointer to the matching FuncDef if found, or 0 if there is no match. +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ + var p uintptr + for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { + + if Xsqlite3StrICmp(tls, (*FuncDef)(unsafe.Pointer(p)).FzName, zFunc) == 0 { + return p + } + } + return uintptr(0) +} + +// Insert a new FuncDef into a FuncDefHash hash table. +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ + var i int32 + for i = 0; i < nDef; i++ { + var pOther uintptr + var zName uintptr = (*FuncDef)(unsafe.Pointer(aDef + uintptr(i)*72)).FzName + var nName int32 = Xsqlite3Strlen30(tls, zName) + var h int32 = (int32(*(*uint8)(unsafe.Pointer(zName))) + nName) % SQLITE_FUNC_HASH_SZ + + pOther = Xsqlite3FunctionSearch(tls, h, zName) + if pOther != 0 { + + (*FuncDef)(unsafe.Pointer(aDef + uintptr(i)*72)).FpNext = (*FuncDef)(unsafe.Pointer(pOther)).FpNext + (*FuncDef)(unsafe.Pointer(pOther)).FpNext = aDef + uintptr(i)*72 + } else { + (*FuncDef)(unsafe.Pointer(aDef + uintptr(i)*72)).FpNext = uintptr(0) + *(*uintptr)(unsafe.Pointer(aDef + uintptr(i)*72 + 64)) = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)) + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)) = aDef + uintptr(i)*72 + } + } +} + +// Locate a user function given a name, a number of arguments and a flag +// indicating whether the function prefers UTF-16 over UTF-8. Return a +// pointer to the FuncDef structure that defines that function, or return +// NULL if the function does not exist. +// +// If the createFlag argument is true, then a new (blank) FuncDef +// structure is created and liked into the "db" structure if a +// no matching function previously existed. +// +// If nArg is -2, then the first valid function found is returned. A +// function is valid if xSFunc is non-zero. The nArg==(-2) +// case is used to see if zName is a valid function name for some number +// of arguments. If nArg is -2, then createFlag must be 0. +// +// If createFlag is false, then a function with the required name and +// number of arguments may be returned even if the eTextRep flag does not +// match that requested. +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ + var p uintptr // Iterator variable + var pBest uintptr = uintptr(0) // Best match found so far + var bestScore int32 = 0 // Score of best match + var h int32 // Hash value + var nName int32 // Length of the name + + nName = Xsqlite3Strlen30(tls, zName) + + // First search for a match amongst the application-defined functions. + p = Xsqlite3HashFind(tls, db+616, zName) + for p != 0 { + var score int32 = matchQuality(tls, p, nArg, enc) + if score > bestScore { + pBest = p + bestScore = score + } + p = (*FuncDef)(unsafe.Pointer(p)).FpNext + } + + // If no match is found, search the built-in functions. + // + // If the DBFLAG_PreferBuiltin flag is set, then search the built-in + // functions even if a prior app-defined function was found. And give + // priority to built-in functions. + // + // Except, if createFlag is true, that means that we are trying to + // install a new function. Whatever FuncDef structure is returned it will + // have fields overwritten with new information appropriate for the + // new function. But the FuncDefs for built-in functions are read-only. + // So we must not search for built-ins when creating a new function. + if !(createFlag != 0) && (pBest == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_PreferBuiltin) != U32(0)) { + bestScore = 0 + h = (int32(Xsqlite3UpperToLower[U8(*(*uint8)(unsafe.Pointer(zName)))]) + nName) % SQLITE_FUNC_HASH_SZ + p = Xsqlite3FunctionSearch(tls, h, zName) + for p != 0 { + var score int32 = matchQuality(tls, p, nArg, enc) + if score > bestScore { + pBest = p + bestScore = score + } + p = (*FuncDef)(unsafe.Pointer(p)).FpNext + } + } + + // If the createFlag parameter is true and the search did not reveal an + // exact match for the name, number of arguments and encoding, then add a + // new entry to the hash table and return it. + if createFlag != 0 && bestScore < FUNC_PERFECT_MATCH && libc.AssignUintptr(&pBest, Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(FuncDef{}))+uint64(nName)+uint64(1)))) != uintptr(0) { + var pOther uintptr + var z uintptr + (*FuncDef)(unsafe.Pointer(pBest)).FzName = pBest + 1*72 + (*FuncDef)(unsafe.Pointer(pBest)).FnArg = I8(U16(nArg)) + (*FuncDef)(unsafe.Pointer(pBest)).FfuncFlags = U32(enc) + libc.Xmemcpy(tls, pBest+1*72, zName, uint64(nName+1)) + for z = (*FuncDef)(unsafe.Pointer(pBest)).FzName; *(*U8)(unsafe.Pointer(z)) != 0; z++ { + *(*U8)(unsafe.Pointer(z)) = Xsqlite3UpperToLower[*(*U8)(unsafe.Pointer(z))] + } + pOther = Xsqlite3HashInsert(tls, db+616, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) + if pOther == pBest { + Xsqlite3DbFree(tls, db, pBest) + Xsqlite3OomFault(tls, db) + return uintptr(0) + } else { + (*FuncDef)(unsafe.Pointer(pBest)).FpNext = pOther + } + } + + if pBest != 0 && ((*FuncDef)(unsafe.Pointer(pBest)).FxSFunc != 0 || createFlag != 0) { + return pBest + } + return uintptr(0) +} + +// Free all resources held by the schema structure. The void* argument points +// at a Schema struct. This function does not call sqlite3DbFree(db, ) on the +// pointer itself, it just cleans up subsidiary resources (i.e. the contents +// of the schema hash tables). +// +// The Schema.cache_size variable is not cleared. +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var temp1 Hash at bp+24, 24 + + // var temp2 Hash at bp, 24 + + var pElem uintptr + var pSchema uintptr = p + + *(*Hash)(unsafe.Pointer(bp + 24 /* temp1 */)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp /* temp2 */)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + Xsqlite3HashInit(tls, pSchema+56) + Xsqlite3HashClear(tls, pSchema+32) + for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) + } + Xsqlite3HashClear(tls, bp) + Xsqlite3HashInit(tls, pSchema+8) + for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata + Xsqlite3DeleteTable(tls, uintptr(0), pTab) + } + Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, pSchema+80) + (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) + if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { + (*Schema)(unsafe.Pointer(pSchema)).FiGeneration++ + } + *(*U16)(unsafe.Pointer(pSchema + 114)) &= libc.Uint16FromInt32(libc.CplInt32(DB_SchemaLoaded | DB_ResetWanted)) +} + +// Find and return the schema associated with a BTree. Create +// a new one if necessary. +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ + var p uintptr + if pBt != 0 { + p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) + } else { + p = Xsqlite3DbMallocZero(tls, uintptr(0), uint64(unsafe.Sizeof(Schema{}))) + } + if !(p != 0) { + Xsqlite3OomFault(tls, db) + } else if 0 == int32((*Schema)(unsafe.Pointer(p)).Ffile_format) { + Xsqlite3HashInit(tls, p+8) + Xsqlite3HashInit(tls, p+32) + Xsqlite3HashInit(tls, p+56) + Xsqlite3HashInit(tls, p+80) + (*Schema)(unsafe.Pointer(p)).Fenc = U8(SQLITE_UTF8) + } + return p +} + +//************* End of callback.c ******************************************* +//************* Begin file delete.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains C code routines that are called by the parser +// in order to generate code for DELETE FROM statements. +// #include "sqliteInt.h" + +// While a SrcList can in general represent multiple tables and subqueries +// (as in the FROM clause of a SELECT statement) in this case it contains +// the name of a single table, as one might find in an INSERT, DELETE, +// or UPDATE statement. Look up that table in the symbol table and +// return a pointer. Set an error message and return NULL if the table +// name is not found or if any other error occurs. +// +// The following fields are initialized appropriate in pSrc: +// +// pSrc->a[0].pTab Pointer to the Table object +// pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one +// +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ + var pItem uintptr = pSrc + 8 /* &.a */ + var pTab uintptr + + pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pItem) + Xsqlite3DeleteTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pItem)).FpTab) + (*SrcItem)(unsafe.Pointer(pItem)).FpTab = pTab + if pTab != 0 { + (*Table)(unsafe.Pointer(pTab)).FnTabRef++ + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x2>>1)) != 0 && Xsqlite3IndexedByLookup(tls, pParse, pItem) != 0 { + pTab = uintptr(0) + } + } + return pTab +} + +// Generate byte-code that will report the number of rows modified +// by a DELETE, INSERT, or UPDATE statement. +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ + Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) + Xsqlite3VdbeSetNumCols(tls, v, 1) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) +} + +// Return true if table pTab is read-only. +// +// A table is read-only if any of the following are true: +// +// 1) It is a virtual table and no implementation of the xUpdate method +// has been provided +// +// 2) It is a system table (i.e. sqlite_schema), this call is not +// part of a nested parse and writable_schema pragma has not +// been specified +// +// 3) The table is a shadow table, the database connection is in +// defensive mode, and the current sqlite3_prepare() +// is for a top-level SQL statement. +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ + var db uintptr + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) + } + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { + return 0 + } + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly) != U32(0) { + return libc.Bool32(Xsqlite3WritableSchema(tls, db) == 0 && int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) + } + + return Xsqlite3ReadOnlyShadowTables(tls, db) +} + +// Check to make sure the given table is writable. If it is not +// writable, generate an error message and return 1. If it is +// writable return 0; +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if tabIsReadOnly(tls, pParse, pTab) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+14661, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + return 1 + } + if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { + Xsqlite3ErrorMsg(tls, pParse, ts+14690, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + return 1 + } + return 0 +} + +// Evaluate a view and store its result in an ephemeral table. The +// pWhere argument is an optional WHERE clause that restricts the +// set of rows in the view that are to be added to the ephemeral table. +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + // var dest SelectDest at bp, 40 + + var pSel uintptr + var pFrom uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var iDb int32 = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pView)).FpSchema) + pWhere = Xsqlite3ExprDup(tls, db, pWhere, 0) + pFrom = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0)) + if pFrom != 0 { + + (*SrcItem)(unsafe.Pointer(pFrom + 8)).FzName = Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pView)).FzName) + (*SrcItem)(unsafe.Pointer(pFrom + 8)).FzDatabase = Xsqlite3DbStrDup(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) + + } + pSel = Xsqlite3SelectNew(tls, pParse, uintptr(0), pFrom, pWhere, uintptr(0), uintptr(0), pOrderBy, + uint32(SF_IncludeHidden), pLimit) + Xsqlite3SelectDestInit(tls, bp, SRT_EphemTab, iCur) + Xsqlite3Select(tls, pParse, pSel, bp) + Xsqlite3SelectDelete(tls, db, pSel) +} + +// && !defined(SQLITE_OMIT_SUBQUERY) + +// Generate code for a DELETE FROM statement. +// +// DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; +// \________/ \________________/ +// pTabList pWhere +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + var v uintptr // The virtual database engine + var pTab uintptr // The table from which records will be deleted + var i int32 // Loop counter + var pWInfo uintptr // Information about the WHERE clause + var pIdx uintptr // For looping over indices of the table + var iTabCur int32 // Cursor number for the table + // var iDataCur int32 at bp+80, 4 + // VDBE cursor for the canonical data source + // var iIdxCur int32 at bp+84, 4 + // Cursor number of the first index + var nIdx int32 // Number of indices + var db uintptr // Main database structure + // var sContext AuthContext at bp, 16 + // Authorization context + // var sNC NameContext at bp+16, 56 + // Name context to resolve expressions in + var iDb int32 // Database number + var memCnt int32 // Memory cell used for change counting + var rcauth int32 // Value returned by authorization callback + var eOnePass int32 // ONEPASS_OFF or _SINGLE or _MULTI + // var aiCurOnePass [2]int32 at bp+72, 8 + // The write cursors opened by WHERE_ONEPASS + var aToOpen uintptr // Open cursor iTabCur+j if aToOpen[j] is true + var pPk uintptr // The PRIMARY KEY index on the table + var iPk int32 // First of nPk registers holding PRIMARY KEY value + var nPk I16 // Number of columns in the PRIMARY KEY + var iKey int32 // Memory cell holding key of row to be deleted + var nKey I16 // Number of memory cells in the row key + var iEphCur int32 // Ephemeral table holding all primary key values + var iRowSet int32 // Register for rowset of rows to delete + var addrBypass int32 // Address of jump over the delete logic + var addrLoop int32 // Top of the delete loop + var addrEphOpen int32 // Instruction to open the Ephemeral table + var bComplex int32 // True if there are triggers or FKs or + // subqueries in the WHERE clause + + var isView int32 // True if attempting to delete from a view + var pTrigger uintptr + var iAddrOnce int32 + var pVTab uintptr + var count int32 + var wcf U16 + *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)) = 0 + *(*int32)(unsafe.Pointer(bp + 84 /* iIdxCur */)) = 0 + memCnt = 0 + aToOpen = uintptr(0) + iPk = 0 + nPk = int16(1) + iEphCur = 0 + iRowSet = 0 + addrBypass = 0 + addrLoop = 0 + addrEphOpen = 0 // List of table triggers, if required + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(AuthContext{}))) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __1 + } + goto delete_from_cleanup +__1: + ; + + // Locate the table which we want to delete. This table has to be + // put in an SrcList structure because some of the subroutines we + // will be calling are designed to work with multiple tables and expect + // an SrcList* parameter instead of just a Table* parameter. + pTab = Xsqlite3SrcListLookup(tls, pParse, pTabList) + if !(pTab == uintptr(0)) { + goto __2 + } + goto delete_from_cleanup +__2: + ; + + // Figure out if we have any triggers and if the table being + // deleted from is a view + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_DELETE, uintptr(0), uintptr(0)) + isView = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) + bComplex = libc.Bool32(pTrigger != 0 || Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) != 0) + + // If pTab is really a view, make sure it has been initialized. + if !(Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { + goto __3 + } + goto delete_from_cleanup +__3: + ; + + if !(Xsqlite3IsReadOnly(tls, pParse, pTab, func() int32 { + if pTrigger != 0 { + return 1 + } + return 0 + }()) != 0) { + goto __4 + } + goto delete_from_cleanup +__4: + ; + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + rcauth = Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) + + if !(rcauth == SQLITE_DENY) { + goto __5 + } + goto delete_from_cleanup +__5: + ; + + // Assign cursor numbers to the table and all its indices. + + iTabCur = libc.AssignPtrInt32(pTabList+8+68, libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)) + nIdx = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__6: + if !(pIdx != 0) { + goto __8 + } + (*Parse)(unsafe.Pointer(pParse)).FnTab++ + goto __7 +__7: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + nIdx++ + goto __6 + goto __8 +__8: + ; + + // Start the view context + if !(isView != 0) { + goto __9 + } + Xsqlite3AuthContextPush(tls, pParse, bp, (*Table)(unsafe.Pointer(pTab)).FzName) +__9: + ; + + // Begin generating code. + v = Xsqlite3GetVdbe(tls, pParse) + if !(v == uintptr(0)) { + goto __10 + } + goto delete_from_cleanup +__10: + ; + if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) { + goto __11 + } + Xsqlite3VdbeCountChanges(tls, v) +__11: + ; + Xsqlite3BeginWriteOperation(tls, pParse, bComplex, iDb) + + // If we are trying to delete from a view, realize that view into + // an ephemeral table. + if !(isView != 0) { + goto __12 + } + Xsqlite3MaterializeView(tls, pParse, pTab, + pWhere, pOrderBy, pLimit, iTabCur) + *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)) = libc.AssignPtrInt32(bp+84 /* iIdxCur */, iTabCur) + pOrderBy = uintptr(0) + pLimit = uintptr(0) +__12: + ; + + // Resolve the column names in the WHERE clause. + libc.Xmemset(tls, bp+16, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpSrcList = pTabList + if !(Xsqlite3ResolveExprNames(tls, bp+16, pWhere) != 0) { + goto __13 + } + goto delete_from_cleanup +__13: + ; + + // Initialize the counter of the number of rows deleted, if + // we are counting rows. + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00001))<<32) != uint64(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FbReturning) != 0)) { + goto __14 + } + memCnt = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, memCnt) +__14: + ; + + // Special case: A DELETE without a WHERE clause deletes everything. + // It is easier just to erase the whole table. Prior to version 3.6.5, + // this optimization caused the row change count (the value returned by + // API function sqlite3_count_changes) to be set incorrectly. + // + // The "rcauth==SQLITE_OK" terms is the + // IMPLEMENTATION-OF: R-17228-37124 If the action code is SQLITE_DELETE and + // the callback returns SQLITE_IGNORE then the DELETE operation proceeds but + // the truncate optimization is disabled and all rows are deleted + // individually. + if !(rcauth == SQLITE_OK && + pWhere == uintptr(0) && + !(bComplex != 0) && + !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && + (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback == uintptr(0)) { + goto __15 + } + + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(1), (*Table)(unsafe.Pointer(pTab)).FzName) + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __17 + } + Xsqlite3VdbeAddOp4(tls, v, OP_Clear, int32((*Table)(unsafe.Pointer(pTab)).Ftnum), iDb, func() int32 { + if memCnt != 0 { + return memCnt + } + return -1 + }(), + (*Table)(unsafe.Pointer(pTab)).FzName, -1) +__17: + ; + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__18: + if !(pIdx != 0) { + goto __20 + } + + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) + if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { + goto __21 + } + Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { + if memCnt != 0 { + return memCnt + } + return -1 + }()) +__21: + ; + goto __19 +__19: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __18 + goto __20 +__20: + ; + goto __16 +__15: + + wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) + if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { + goto __22 + } + bComplex = 1 +__22: + ; + wcf = U16(int32(wcf) | func() int32 { + if bComplex != 0 { + return 0 + } + return WHERE_ONEPASS_MULTIROW + }()) + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __23 + } + // For a rowid table, initialize the RowSet to an empty set + pPk = uintptr(0) + nPk = int16(1) + iRowSet = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, iRowSet) + goto __24 +__23: + // For a WITHOUT ROWID table, create an ephemeral table used to + // hold all primary keys for rows to be deleted. + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + + nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + iPk = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += int32(nPk) + iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) +__24: + ; + + // Construct a query to find the rowid or primary key for every row + // to be deleted, based on the WHERE clause. Set variable eOnePass + // to indicate the strategy used to implement this delete: + // + // ONEPASS_OFF: Two-pass approach - use a FIFO for rowids/PK values. + // ONEPASS_SINGLE: One-pass approach - at most one row deleted. + // ONEPASS_MULTI: One-pass approach - any number of rows may be deleted. + pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) + if !(pWInfo == uintptr(0)) { + goto __25 + } + goto delete_from_cleanup +__25: + ; + eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) + + if !(eOnePass != ONEPASS_SINGLE) { + goto __26 + } + Xsqlite3MultiWrite(tls, pParse) +__26: + ; + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { + goto __27 + } + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) +__27: + ; + + // Keep track of the number of rows to be deleted + if !(memCnt != 0) { + goto __28 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__28: + ; + + // Extract the rowid or primary key for the current row + if !(pPk != 0) { + goto __29 + } + i = 0 +__31: + if !(i < int32(nPk)) { + goto __33 + } + + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, + int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))), iPk+i) + goto __32 +__32: + i++ + goto __31 + goto __33 +__33: + ; + iKey = iPk + goto __30 +__29: + iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) +__30: + ; + + if !(eOnePass != ONEPASS_OFF) { + goto __34 + } + // For ONEPASS, no need to store the rowid/primary-key. There is only + // one, so just keep it in its register(s) and fall through to the + // delete code. + nKey = nPk // OP_Found will use an unpacked key + aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) + if !(aToOpen == uintptr(0)) { + goto __36 + } + Xsqlite3WhereEnd(tls, pWInfo) + goto delete_from_cleanup +__36: + ; + libc.Xmemset(tls, aToOpen, 1, uint64(nIdx+1)) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) + if !(*(*int32)(unsafe.Pointer(bp + 72)) >= 0) { + goto __37 + } + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) +__37: + ; + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { + goto __38 + } + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) +__38: + ; + if !(addrEphOpen != 0) { + goto __39 + } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__39: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __35 +__34: + if !(pPk != 0) { + goto __40 + } + // Add the PK key for this row to the temporary table + iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + nKey = int16(0) // Zero tells OP_Found to use a composite key + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, iPk, int32(nPk), iKey, + Xsqlite3IndexAffinityStr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPk), int32(nPk)) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iEphCur, iKey, iPk, int32(nPk)) + goto __41 +__40: + // Add the rowid of the row to be deleted to the RowSet + nKey = int16(1) // OP_DeferredSeek always uses a single rowid + Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) +__41: + ; + Xsqlite3WhereEnd(tls, pWInfo) +__35: + ; + + // Unless this is a view, open cursors for the table we are + // deleting from and all its indices. If this is a view, then the + // only effect this statement has is to fire the INSTEAD OF + // triggers. + if !!(isView != 0) { + goto __42 + } + iAddrOnce = 0 + if !(eOnePass == ONEPASS_MULTI) { + goto __43 + } + iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) +__43: + ; + + Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), + iTabCur, aToOpen, bp+80, bp+84) + + if !(eOnePass == ONEPASS_MULTI) { + goto __44 + } + Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) +__44: + ; +__42: + ; + + // Set up a loop over the rowids/primary-keys that were found in the + // where-clause loop above. + if !(eOnePass != ONEPASS_OFF) { + goto __45 + } + // OP_Found will use an unpacked key + if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { + goto __47 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)), addrBypass, iKey, int32(nKey)) + +__47: + ; + goto __46 +__45: + if !(pPk != 0) { + goto __48 + } + addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __50 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) + goto __51 +__50: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__51: + ; + // OP_Found will use a composite key + goto __49 +__48: + addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) + +__49: + ; +__46: + ; + + // Delete the row + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __52 + } + pVTab = Xsqlite3GetVTable(tls, db, pTab) + Xsqlite3VtabMakeWritable(tls, pParse, pTab) + + Xsqlite3MayAbort(tls, pParse) + if !(eOnePass == ONEPASS_SINGLE) { + goto __54 + } + Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) + if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { + goto __55 + } + (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) +__55: + ; +__54: + ; + Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -12) + Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) + goto __53 +__52: + + count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) // True to count changes + Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 84 /* iIdxCur */)), + iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) +__53: + ; + + // End of the loop over all rowids/primary-keys. + if !(eOnePass != ONEPASS_OFF) { + goto __56 + } + Xsqlite3VdbeResolveLabel(tls, v, addrBypass) + Xsqlite3WhereEnd(tls, pWInfo) + goto __57 +__56: + if !(pPk != 0) { + goto __58 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) + Xsqlite3VdbeJumpHere(tls, v, addrLoop) + goto __59 +__58: + Xsqlite3VdbeGoto(tls, v, addrLoop) + Xsqlite3VdbeJumpHere(tls, v, addrLoop) +__59: + ; +__57: + ; +__16: + ; // End non-truncate path + + // Update the sqlite_sequence table by storing the content of the + // maximum rowid counter values recorded while inserting into + // autoincrement tables. + if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { + goto __60 + } + Xsqlite3AutoincrementEnd(tls, pParse) +__60: + ; + + // Return the number of rows that were deleted. If this routine is + // generating code because of a call to sqlite3NestedParse(), do not + // invoke the callback function. + if !(memCnt != 0) { + goto __61 + } + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14728) +__61: + ; + +delete_from_cleanup: + Xsqlite3AuthContextPop(tls, bp) + Xsqlite3SrcListDelete(tls, db, pTabList) + Xsqlite3ExprDelete(tls, db, pWhere) + Xsqlite3DbFree(tls, db, aToOpen) + return +} + +// Make sure "isView" and other macros defined above are undefined. Otherwise +// they may interfere with compilation of other functions in this file +// (or in another file, if this file becomes part of the amalgamation). + +// This routine generates VDBE code that causes a single row of a +// single table to be deleted. Both the original table entry and +// all indices are removed. +// +// Preconditions: +// +// 1. iDataCur is an open cursor on the btree that is the canonical data +// store for the table. (This will be either the table itself, +// in the case of a rowid table, or the PRIMARY KEY index in the case +// of a WITHOUT ROWID table.) +// +// 2. Read/write cursors for all indices of pTab must be open as +// cursor number iIdxCur+i for the i-th index. +// +// 3. The primary key for the row to be deleted must be stored in a +// sequence of nPk memory cells starting at iPk. If nPk==0 that means +// that a search record formed from OP_MakeRecord is contained in the +// single memory location iPk. +// +// eMode: +// Parameter eMode may be passed either ONEPASS_OFF (0), ONEPASS_SINGLE, or +// ONEPASS_MULTI. If eMode is not ONEPASS_OFF, then the cursor +// iDataCur already points to the row to delete. If eMode is ONEPASS_OFF +// then this function must seek iDataCur to the entry identified by iPk +// and nPk before reading from it. +// +// If eMode is ONEPASS_MULTI, then this call is being made as part +// of a ONEPASS delete that affects multiple rows. In this case, if +// iIdxNoSeek is a valid cursor number (>=0) and is not the same as +// iDataCur, then its position should be preserved following the delete +// operation. Or, if iIdxNoSeek is not a valid cursor number, the +// position of iDataCur should be preserved instead. +// +// iIdxNoSeek: +// If iIdxNoSeek is a valid cursor number (>=0) not equal to iDataCur, +// then it identifies an index cursor (from within array of cursors +// starting at iIdxCur) that already points to the index entry to be deleted. +// Except, this optimization is disabled if there are BEFORE triggers since +// the trigger body might have moved the cursor. +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe + var iOld int32 = 0 // First register in OLD.* array + var iLabel int32 // Label resolved to end of generated code + var opSeek U8 // Seek opcode + + // Vdbe is guaranteed to have been allocated by this stage. + + // Seek cursor iCur to the row to delete. If this row no longer exists + // (this can happen if a trigger program has already deleted it), do + // not attempt to delete it or fire any DELETE triggers. + iLabel = Xsqlite3VdbeMakeLabel(tls, pParse) + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + opSeek = uint8(OP_NotExists) + } else { + opSeek = uint8(OP_NotFound) + } + if int32(eMode) == ONEPASS_OFF { + Xsqlite3VdbeAddOp4Int(tls, v, int32(opSeek), iDataCur, iLabel, iPk, int32(nPk)) + + } + + // If there are any triggers to fire, allocate a range of registers to + // use for the old.* references in the triggers. + if Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) != 0 || pTrigger != 0 { + var mask U32 // Mask of OLD.* columns in use + var iCol int32 // Iterator used while populating OLD.* + var addrStart int32 // Start of BEFORE trigger programs + + // TODO: Could use temporary registers here. Also could attempt to + // avoid copying the contents of the rowid register. + mask = Xsqlite3TriggerColmask(tls, + pParse, pTrigger, uintptr(0), 0, TRIGGER_BEFORE|TRIGGER_AFTER, pTab, int32(onconf)) + mask = mask | Xsqlite3FkOldmask(tls, pParse, pTab) + iOld = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += 1 + int32((*Table)(unsafe.Pointer(pTab)).FnCol) + + // Populate the OLD.* pseudo-table register array. These values will be + // used by any BEFORE and AFTER triggers that exist. + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, iPk, iOld) + for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { + + if mask == 0xffffffff || iCol <= 31 && mask&(uint32(uint32(1))<= 0 && iIdxNoSeek != iDataCur { + Xsqlite3VdbeAddOp1(tls, v, OP_Delete, iIdxNoSeek) + } + if int32(eMode) == ONEPASS_MULTI { + p5 = U8(int32(p5) | OPFLAG_SAVEPOSITION) + } + Xsqlite3VdbeChangeP5(tls, v, uint16(p5)) + } + + // Do any ON CASCADE, SET NULL or SET DEFAULT operations required to + // handle rows (possibly in other tables) that refer via a foreign key + // to the row just deleted. + Xsqlite3FkActions(tls, pParse, pTab, uintptr(0), iOld, uintptr(0), 0) + + // Invoke AFTER DELETE trigger programs. + Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, + TK_DELETE, uintptr(0), TRIGGER_AFTER, pTab, iOld, int32(onconf), iLabel) + + // Jump here if the row had already been deleted before any BEFORE + // trigger programs were invoked. Or if a trigger program throws a + // RAISE(IGNORE) exception. + Xsqlite3VdbeResolveLabel(tls, v, iLabel) + +} + +// This routine generates VDBE code that causes the deletion of all +// index entries associated with a single row of a single table, pTab +// +// Preconditions: +// +// 1. A read/write cursor "iDataCur" must be open on the canonical storage +// btree for the table pTab. (This will be either the table itself +// for rowid tables or to the primary key index for WITHOUT ROWID +// tables.) +// +// 2. Read/write cursors for all indices of pTab must be open as +// cursor number iIdxCur+i for the i-th index. (The pTab->pIndex +// index is the 0-th index.) +// +// 3. The "iDataCur" cursor must be already be positioned on the row +// that is to be deleted. +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i int32 // Index loop counter + var r1 int32 = -1 // Register holding an index key + // var iPartIdxLabel int32 at bp, 4 + // Jump destination for skipping partial index entries + var pIdx uintptr // Current index + var pPrior uintptr = uintptr(0) // Prior index + var v uintptr // The prepared statement under construction + var pPk uintptr // PRIMARY KEY index, or NULL for rowid tables + + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + pPk = uintptr(0) + } else { + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + } + i = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__1: + if !(pIdx != 0) { + goto __3 + } + { + + if aRegIdx != uintptr(0) && *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) == 0 { + goto __2 + } + if pIdx == pPk { + goto __2 + } + if iIdxCur+i == iIdxNoSeek { + goto __2 + } + + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx, iDataCur, 0, 1, + bp, pPrior, r1) + Xsqlite3VdbeAddOp3(tls, v, OP_IdxDelete, iIdxCur+i, r1, + func() int32 { + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { + return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + } + return int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + }()) + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Cause IdxDelete to error if no entry found + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp /* iPartIdxLabel */))) + pPrior = pIdx + + } + goto __2 +__2: + i++ + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __1 + goto __3 +__3: +} + +// Generate code that will assemble an index key and stores it in register +// regOut. The key with be for index pIdx which is an index on pTab. +// iCur is the index of a cursor open on the pTab table and pointing to +// the entry that needs indexing. If pTab is a WITHOUT ROWID table, then +// iCur must be the cursor of the PRIMARY KEY index. +// +// Return a register number which is the first in a block of +// registers that holds the elements of the index key. The +// block of registers has already been deallocated by the time +// this routine returns. +// +// If *piPartIdxLabel is not NULL, fill it in with a label and jump +// to that label if pIdx is a partial index that should be skipped. +// The label should be resolved using sqlite3ResolvePartIdxLabel(). +// A partial index should be skipped if its WHERE clause evaluates +// to false or null. If pIdx is not a partial index, *piPartIdxLabel +// will be set to zero which is an empty label that is ignored by +// sqlite3ResolvePartIdxLabel(). +// +// The pPrior and regPrior parameters are used to implement a cache to +// avoid unnecessary register loads. If pPrior is not NULL, then it is +// a pointer to a different index for which an index key has just been +// computed into register regPrior. If the current pIdx index is generating +// its key into the same sequence of registers and if pPrior and pIdx share +// a column in common, then the register corresponding to that column already +// holds the correct value and the loading of that register is skipped. +// This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK +// on a table with multiple indices, and especially with the ROWID or +// PRIMARY KEY columns of the index. +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var j int32 + var regBase int32 + var nCol int32 + + if piPartIdxLabel != 0 { + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + *(*int32)(unsafe.Pointer(piPartIdxLabel)) = Xsqlite3VdbeMakeLabel(tls, pParse) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = iDataCur + 1 + Xsqlite3ExprIfFalseDup(tls, pParse, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, *(*int32)(unsafe.Pointer(piPartIdxLabel)), + SQLITE_JUMPIFNULL) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 + pPrior = uintptr(0) // Ticket a9efb42811fa41ee 2019-11-02; + // pPartIdxWhere may have corrupted regPrior registers + } else { + *(*int32)(unsafe.Pointer(piPartIdxLabel)) = 0 + } + } + if prefixOnly != 0 && uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { + nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + } else { + nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + } + regBase = Xsqlite3GetTempRange(tls, pParse, nCol) + if pPrior != 0 && (regBase != regPrior || (*Index)(unsafe.Pointer(pPrior)).FpPartIdxWhere != 0) { + pPrior = uintptr(0) + } + for j = 0; j < nCol; j++ { + if pPrior != 0 && + int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPrior)).FaiColumn + uintptr(j)*2))) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) && + int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPrior)).FaiColumn + uintptr(j)*2))) != -2 { + // This column was already computed by the previous index + continue + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pIdx, iDataCur, j, regBase+j) + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) >= 0 { + // If the column affinity is REAL but the number is an integer, then it + // might be stored in the table as an integer (using a compact + // representation) then converted to REAL by an OP_RealAffinity opcode. + // But we are getting ready to store this value back into an index, where + // it should be converted by to INTEGER again. So omit the + // OP_RealAffinity opcode if it is present + Xsqlite3VdbeDeletePriorOpcode(tls, v, uint8(OP_RealAffinity)) + } + } + if regOut != 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regOut) + } + Xsqlite3ReleaseTempRange(tls, pParse, regBase, nCol) + return regBase +} + +// If a prior call to sqlite3GenerateIndexKey() generated a jump-over label +// because it was a partial index, then this routine should be called to +// resolve that label. +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ + if iLabel != 0 { + Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) + } +} + +//************* End of delete.c ********************************************* +//************* Begin file func.c ******************************************* +// 2002 February 23 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the C-language implementations for many of the SQL +// functions of SQLite. (Some function, and in particular the date and +// time functions, are implemented separately.) +// #include "sqliteInt.h" +// #include +// #include +// #include +// #include "vdbeInt.h" + +// Return the collating function associated with a function. +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ + var pOp uintptr + + pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 + + return *(*uintptr)(unsafe.Pointer(pOp + 16)) +} + +// Indicate that the accumulator load should be skipped on this +// iteration of the aggregate loop. +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ + + (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 + (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) +} + +// Implementation of the non-aggregate min() and max() functions +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ + var i int32 + var mask int32 // 0 for min() or 0xffffffff for max() + var iBest int32 + var pColl uintptr + + if Xsqlite3_user_data(tls, context) == uintptr(0) { + mask = 0 + } else { + mask = -1 + } + pColl = sqlite3GetFuncCollSeq(tls, context) + + iBest = 0 + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { + return + } + for i = 1; i < argc; i++ { + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) == SQLITE_NULL { + return + } + if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(iBest)*8)), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), pColl)^mask >= 0 { + + iBest = i + } + } + Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(iBest)*8))) +} + +// Return the type of the argument. +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ + var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 + _ = NotUsed + + // EVIDENCE-OF: R-01470-60482 The sqlite3_value_type(V) interface returns + // the datatype code for the initial datatype of the sqlite3_value object + // V. The returned value is one of SQLITE_INTEGER, SQLITE_FLOAT, + // SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. + Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) +} + +var azType2 = [5]uintptr{ts + 6133, ts + 6128, ts + 7883, ts + 7878, ts + 6123} /* sqlite3.c:121136:21 */ + +// subtype(X) +// +// Return the subtype of X +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ + _ = argc + Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) +} + +// Implementation of the length() function +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ + + _ = argc + switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_BLOB: + fallthrough + case SQLITE_INTEGER: + fallthrough + case SQLITE_FLOAT: + { + Xsqlite3_result_int(tls, context, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) + break + + } + case SQLITE_TEXT: + { + var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + var z0 uintptr + var c uint8 + if z == uintptr(0) { + return + } + z0 = z + for int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(z)))) != 0 { + z++ + if int32(c) >= 0xc0 { + for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { + z++ + z0++ + } + } + } + Xsqlite3_result_int(tls, context, int32((int64(z)-int64(z0))/1)) + break + + } + default: + { + Xsqlite3_result_null(tls, context) + break + + } + } +} + +// Implementation of the abs() function. +// +// IMP: R-23979-26855 The abs(X) function returns the absolute value of +// the numeric argument X. +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ + + _ = argc + switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_INTEGER: + { + var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + if iVal < int64(0) { + if iVal == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { + // IMP: R-31676-45509 If X is the integer -9223372036854775808 + // then abs(X) throws an integer overflow error since there is no + // equivalent positive 64-bit two complement value. + Xsqlite3_result_error(tls, context, ts+14741, -1) + return + } + iVal = -iVal + } + Xsqlite3_result_int64(tls, context, iVal) + break + + } + case SQLITE_NULL: + { + // IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. + Xsqlite3_result_null(tls, context) + break + + } + default: + { + // Because sqlite3_value_double() returns 0.0 if the argument is not + // something that can be converted into a number, we have: + // IMP: R-01992-00519 Abs(X) returns 0.0 if X is a string or blob + // that cannot be converted to a numeric value. + var rVal float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + if rVal < float64(0) { + rVal = -rVal + } + Xsqlite3_result_double(tls, context, rVal) + break + + } + } +} + +// Implementation of the instr() function. +// +// instr(haystack,needle) finds the first occurrence of needle +// in haystack and returns the number of previous characters plus 1, +// or 0 if needle does not occur within haystack. +// +// If both haystack and needle are BLOBs, then the result is one more than +// the number of bytes in haystack prior to the first occurrence of needle, +// or 0 if needle never occurs in haystack. +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ + var zHaystack uintptr + var zNeedle uintptr + var nHaystack int32 + var nNeedle int32 + var typeHaystack int32 + var typeNeedle int32 + var N int32 + var isText int32 + var firstChar uint8 + var pC1 uintptr + var pC2 uintptr + N = 1 + pC1 = uintptr(0) + pC2 = uintptr(0) + + _ = argc + typeHaystack = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + typeNeedle = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if !(typeHaystack == SQLITE_NULL || typeNeedle == SQLITE_NULL) { + goto __1 + } + return +__1: + ; + nHaystack = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + nNeedle = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if !(nNeedle > 0) { + goto __2 + } + if !(typeHaystack == SQLITE_BLOB && typeNeedle == SQLITE_BLOB) { + goto __3 + } + zHaystack = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) + zNeedle = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + isText = 0 + goto __4 +__3: + if !(typeHaystack != SQLITE_BLOB && typeNeedle != SQLITE_BLOB) { + goto __5 + } + zHaystack = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + zNeedle = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + isText = 1 + goto __6 +__5: + pC1 = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(argv))) + zHaystack = Xsqlite3_value_text(tls, pC1) + if !(zHaystack == uintptr(0)) { + goto __7 + } + goto endInstrOOM +__7: + ; + nHaystack = Xsqlite3_value_bytes(tls, pC1) + pC2 = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + zNeedle = Xsqlite3_value_text(tls, pC2) + if !(zNeedle == uintptr(0)) { + goto __8 + } + goto endInstrOOM +__8: + ; + nNeedle = Xsqlite3_value_bytes(tls, pC2) + isText = 1 +__6: + ; +__4: + ; + if !(zNeedle == uintptr(0) || nHaystack != 0 && zHaystack == uintptr(0)) { + goto __9 + } + goto endInstrOOM +__9: + ; + firstChar = *(*uint8)(unsafe.Pointer(zNeedle)) +__10: + if !(nNeedle <= nHaystack && + (int32(*(*uint8)(unsafe.Pointer(zHaystack))) != int32(firstChar) || libc.Xmemcmp(tls, zHaystack, zNeedle, uint64(nNeedle)) != 0)) { + goto __11 + } + N++ +__12: + nHaystack-- + zHaystack++ + goto __13 +__13: + if isText != 0 && int32(*(*uint8)(unsafe.Pointer(zHaystack)))&0xc0 == 0x80 { + goto __12 + } + goto __14 +__14: + ; + goto __10 +__11: + ; + if !(nNeedle > nHaystack) { + goto __15 + } + N = 0 +__15: + ; +__2: + ; + Xsqlite3_result_int(tls, context, N) +endInstr: + Xsqlite3_value_free(tls, pC1) + Xsqlite3_value_free(tls, pC2) + return +endInstrOOM: + Xsqlite3_result_error_nomem(tls, context) + goto endInstr +} + +// Implementation of the printf() (a.k.a. format()) SQL function. +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + // var x PrintfArguments at bp+40, 16 + + // var str StrAccum at bp+8, 32 + + var zFormat uintptr + var n int32 + var db uintptr = Xsqlite3_context_db_handle(tls, context) + + if argc >= 1 && libc.AssignUintptr(&zFormat, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != uintptr(0) { + (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FnArg = argc - 1 + (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FnUsed = 0 + (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FapArg = argv + uintptr(1)*8 + Xsqlite3StrAccumInit(tls, bp+8, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) + (*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_SQLFUNC) + Xsqlite3_str_appendf(tls, bp+8, zFormat, libc.VaList(bp, bp+40)) + n = int32((*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FnChar) + Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp+8), n, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) + } +} + +// Implementation of the substr() function. +// +// substr(x,p1,p2) returns p2 characters of x[] beginning with p1. +// p1 is 1-indexed. So substr(x,1,1) returns the first character +// of x. If x is text, then we actually count UTF-8 characters. +// If x is a blob, then we count bytes. +// +// If p1 is negative, then we begin abs(p1) from the end of x[]. +// +// If p2 is negative, return the p2 characters preceding p1. +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ + var z uintptr + var z2 uintptr + var len int32 + var p0type int32 + var p1 I64 + var p2 I64 + var negP2 int32 = 0 + + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == SQLITE_NULL || + argc == 3 && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) == SQLITE_NULL { + return + } + p0type = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + p1 = I64(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) + if p0type == SQLITE_BLOB { + len = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + z = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) + if z == uintptr(0) { + return + } + + } else { + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if z == uintptr(0) { + return + } + len = 0 + if p1 < int64(0) { + for z2 = z; *(*uint8)(unsafe.Pointer(z2)) != 0; len++ { + { + if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z2, 1)))) >= 0xc0 { + for int32(*(*uint8)(unsafe.Pointer(z2)))&0xc0 == 0x80 { + z2++ + } + } + } + + } + } + } + if argc == 3 { + p2 = I64(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + if p2 < int64(0) { + p2 = -p2 + negP2 = 1 + } + } else { + p2 = I64(*(*int32)(unsafe.Pointer(Xsqlite3_context_db_handle(tls, context) + 136))) + } + if p1 < int64(0) { + p1 = p1 + I64(len) + if p1 < int64(0) { + p2 = p2 + p1 + if p2 < int64(0) { + p2 = int64(0) + } + p1 = int64(0) + } + } else if p1 > int64(0) { + p1-- + } else if p2 > int64(0) { + p2-- + } + if negP2 != 0 { + p1 = p1 - p2 + if p1 < int64(0) { + p2 = p2 + p1 + p1 = int64(0) + } + } + + if p0type != SQLITE_BLOB { + for *(*uint8)(unsafe.Pointer(z)) != 0 && p1 != 0 { + { + if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { + for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { + z++ + } + } + } + + p1-- + } + for z2 = z; *(*uint8)(unsafe.Pointer(z2)) != 0 && p2 != 0; p2-- { + { + if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z2, 1)))) >= 0xc0 { + for int32(*(*uint8)(unsafe.Pointer(z2)))&0xc0 == 0x80 { + z2++ + } + } + } + + } + Xsqlite3_result_text64(tls, context, z, uint64((int64(z2)-int64(z))/1), libc.UintptrFromInt32(-1), + uint8(SQLITE_UTF8)) + } else { + if p1+p2 > I64(len) { + p2 = I64(len) - p1 + if p2 < int64(0) { + p2 = int64(0) + } + } + Xsqlite3_result_blob64(tls, context, z+uintptr(p1), U64(p2), libc.UintptrFromInt32(-1)) + } +} + +// Implementation of the round() function +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var n int32 = 0 + // var r float64 at bp+16, 8 + + var zBuf uintptr + + if argc == 2 { + if SQLITE_NULL == Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) { + return + } + n = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if n > 30 { + n = 30 + } + if n < 0 { + n = 0 + } + } + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { + return + } + *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + // If Y==0 and X will fit in a 64-bit int, + // handle the rounding directly, + // otherwise use printf. + if *(*float64)(unsafe.Pointer(bp + 16)) < -4503599627370496.0 || *(*float64)(unsafe.Pointer(bp + 16)) > +4503599627370496.0 { + // The value has no fractional part so there is nothing to round + } else if n == 0 { + *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = float64(libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 16)) + func() float64 { + if *(*float64)(unsafe.Pointer(bp + 16)) < float64(0) { + return -0.5 + } + return +0.5 + }())) + } else { + zBuf = Xsqlite3_mprintf(tls, ts+14758, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + if zBuf == uintptr(0) { + Xsqlite3_result_error_nomem(tls, context) + return + } + Xsqlite3AtoF(tls, zBuf, bp+16, Xsqlite3Strlen30(tls, zBuf), uint8(SQLITE_UTF8)) + Xsqlite3_free(tls, zBuf) + } + Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 16 /* r */))) +} + +// Allocate nByte bytes of space using sqlite3Malloc(). If the +// allocation fails, call sqlite3_result_error_nomem() to notify +// the database handle that malloc() has failed and return NULL. +// If nByte is larger than the maximum string or blob length, then +// raise an SQLITE_TOOBIG exception and return NULL. +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ + var z uintptr + var db uintptr = Xsqlite3_context_db_handle(tls, context) + + if nByte > I64(*(*int32)(unsafe.Pointer(db + 136))) { + Xsqlite3_result_error_toobig(tls, context) + z = uintptr(0) + } else { + z = Xsqlite3Malloc(tls, uint64(nByte)) + if !(z != 0) { + Xsqlite3_result_error_nomem(tls, context) + } + } + return z +} + +// Implementation of the upper() and lower() SQL functions. +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ + var z1 uintptr + var z2 uintptr + var i int32 + var n int32 + _ = argc + z2 = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + // Verify that the call to _bytes() does not invalidate the _text() pointer + + if z2 != 0 { + z1 = contextMalloc(tls, context, I64(n)+int64(1)) + if z1 != 0 { + for i = 0; i < n; i++ { + *(*uint8)(unsafe.Pointer(z1 + uintptr(i))) = uint8(int32(*(*uint8)(unsafe.Pointer(z2 + uintptr(i)))) & ^(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z2 + uintptr(i))))]) & 0x20)) + } + Xsqlite3_result_text(tls, context, z1, n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + } + } +} + +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ + var z1 uintptr + var z2 uintptr + var i int32 + var n int32 + _ = argc + z2 = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + // Verify that the call to _bytes() does not invalidate the _text() pointer + + if z2 != 0 { + z1 = contextMalloc(tls, context, I64(n)+int64(1)) + if z1 != 0 { + for i = 0; i < n; i++ { + *(*uint8)(unsafe.Pointer(z1 + uintptr(i))) = uint8(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z2 + uintptr(i))))]) + } + Xsqlite3_result_text(tls, context, z1, n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + } + } +} + +// Some functions like COALESCE() and IFNULL() and UNLIKELY() are implemented +// as VDBE code so that unused argument values do not have to be computed. +// However, we still need some kind of function implementation for this +// routines in the function table. The noopFunc macro provides this. +// noopFunc will never be called so it doesn't matter what the implementation +// is. We might as well use the "version()" function as a substitute. + +// Implementation of random(). Return a random integer. +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var r Sqlite_int64 at bp, 8 + + _ = NotUsed + _ = NotUsed2 + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(Sqlite_int64(0))), bp) + if *(*Sqlite_int64)(unsafe.Pointer(bp)) < int64(0) { + // We need to prevent a random number of 0x8000000000000000 + // (or -9223372036854775808) since when you do abs() of that + // number of you get the same value back again. To do this + // in a way that is testable, mask the sign bit off of negative + // values, resulting in a positive value. Then take the + // 2s complement of that positive value. The end result can + // therefore be no less than -9223372036854775807. + *(*Sqlite_int64)(unsafe.Pointer(bp /* r */)) = -(*(*Sqlite_int64)(unsafe.Pointer(bp)) & (int64(0xffffffff) | I64(int64(0x7fffffff))<<32)) + } + Xsqlite3_result_int64(tls, context, *(*Sqlite_int64)(unsafe.Pointer(bp /* r */))) +} + +// Implementation of randomblob(N). Return a random blob +// that is N bytes long. +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ + var n Sqlite3_int64 + var p uintptr + + _ = argc + n = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + if n < int64(1) { + n = int64(1) + } + p = contextMalloc(tls, context, n) + if p != 0 { + Xsqlite3_randomness(tls, int32(n), p) + Xsqlite3_result_blob(tls, context, p, int32(n), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + } +} + +// Implementation of the last_insert_rowid() SQL function. The return +// value is the same as the sqlite3_last_insert_rowid() API function. +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ + var db uintptr = Xsqlite3_context_db_handle(tls, context) + _ = NotUsed + _ = NotUsed2 + // IMP: R-51513-12026 The last_insert_rowid() SQL function is a + // wrapper around the sqlite3_last_insert_rowid() C/C++ interface + // function. + Xsqlite3_result_int64(tls, context, Xsqlite3_last_insert_rowid(tls, db)) +} + +// Implementation of the changes() SQL function. +// +// IMP: R-32760-32347 The changes() SQL function is a wrapper +// around the sqlite3_changes64() C/C++ function and hence follows the +// same rules for counting changes. +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ + var db uintptr = Xsqlite3_context_db_handle(tls, context) + _ = NotUsed + _ = NotUsed2 + Xsqlite3_result_int64(tls, context, Xsqlite3_changes64(tls, db)) +} + +// Implementation of the total_changes() SQL function. The return value is +// the same as the sqlite3_total_changes64() API function. +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ + var db uintptr = Xsqlite3_context_db_handle(tls, context) + _ = NotUsed + _ = NotUsed2 + // IMP: R-11217-42568 This function is a wrapper around the + // sqlite3_total_changes64() C/C++ interface. + Xsqlite3_result_int64(tls, context, Xsqlite3_total_changes64(tls, db)) +} + +// A structure defining how to do GLOB-style comparisons. +type compareInfo = struct { + FmatchAll U8 + FmatchOne U8 + FmatchSet U8 + FnoCase U8 +} /* sqlite3.c:121671:1 */ + +// For LIKE and GLOB matching on EBCDIC machines, assume that every +// character is exactly one byte in size. Also, provde the Utf8Read() +// macro for fast reading of the next character in the common case where +// the next character is ASCII. + +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ +// The correct SQL-92 behavior is for the LIKE operator to ignore +// case. Thus 'a' LIKE 'A' would be true. +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ +// If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator +// is case sensitive causing 'a' LIKE 'A' to be false +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ + +// Possible error returns from patternMatch() + +// Compare two UTF-8 strings for equality where the first string is +// a GLOB or LIKE expression. Return values: +// +// SQLITE_MATCH: Match +// SQLITE_NOMATCH: No match +// SQLITE_NOWILDCARDMATCH: No match in spite of having * or % wildcards. +// +// Globbing rules: +// +// '*' Matches any sequence of zero or more characters. +// +// '?' Matches exactly one character. +// +// [...] Matches one character from the enclosed list of +// characters. +// +// [^...] Matches one character not in the enclosed list. +// +// With the [...] and [^...] matching, a ']' character can be included +// in the list by making it the first character after '[' or '^'. A +// range of characters can be specified using '-'. Example: +// "[a-z]" matches any single lower-case letter. To match a '-', make +// it the last character in the list. +// +// Like matching rules: +// +// '%' Matches any sequence of zero or more characters +// +// '_' Matches any one character +// +// Ec Where E is the "esc" character and c is any other +// character, including '%', '_', and esc, match exactly c. +// +// The comments within this routine usually assume glob matching. +// +// This routine is usually quick, but can be N**2 in the worst case. +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ + bp := tls.Alloc(19) + defer tls.Free(19) + *(*uintptr)(unsafe.Pointer(bp)) = zPattern + *(*uintptr)(unsafe.Pointer(bp + 8)) = zString + + var c U32 + var c2 U32 // Next pattern and input string chars + var matchOne U32 = U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne) // "?" or "_" + var matchAll U32 = U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) // "*" or "%" + var noCase U8 = (*compareInfo)(unsafe.Pointer(pInfo)).FnoCase // True if uppercase==lowercase + var zEscaped uintptr = uintptr(0) // One past the last escaped input char + + for libc.AssignUint32(&c, func() uint32 { + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) < 0x80 { + return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 1)))) + } + return Xsqlite3Utf8Read(tls, bp) + }()) != U32(0) { + if c == matchAll { // Match "*" + // Skip over multiple "*" characters in the pattern. If there + // are also "?" characters, skip those as well, but consume a + // single character of the input string for each "?" skipped + for libc.AssignUint32(&c, func() uint32 { + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) < 0x80 { + return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 1)))) + } + return Xsqlite3Utf8Read(tls, bp) + }()) == matchAll || + c == matchOne && matchOne != U32(0) { + if c == matchOne && Xsqlite3Utf8Read(tls, bp+8) == U32(0) { + return SQLITE_NOWILDCARDMATCH + } + } + if c == U32(0) { + return SQLITE_MATCH // "*" at the end of the pattern matches + } else if c == matchOther { + if int32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) == 0 { + c = Xsqlite3Utf8Read(tls, bp) + if c == U32(0) { + return SQLITE_NOWILDCARDMATCH + } + } else { + // "[...]" immediately follows the "*". We have to do a slow + // recursive search in this case, but it is an unusual case. + // '[' is a single-byte character + for *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) != 0 { + var bMatch int32 = patternCompare(tls, *(*uintptr)(unsafe.Pointer(bp))+libc.UintptrFromInt32(-1), *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), pInfo, matchOther) + if bMatch != SQLITE_NOMATCH { + return bMatch + } + { + if int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 8)), 1)))) >= 0xc0 { + for int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))&0xc0 == 0x80 { + *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */))++ + } + } + } + + } + return SQLITE_NOWILDCARDMATCH + } + } + + // At this point variable c contains the first character of the + // pattern string past the "*". Search in the input string for the + // first matching character and recursively continue the match from + // that point. + // + // For a case-insensitive search, set variable cx to be the same as + // c but in the other case and search the input string for either + // c or cx. + if c <= U32(0x80) { + // var zStop [3]uint8 at bp+16, 3 + + var bMatch int32 + if noCase != 0 { + *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) + *(*uint8)(unsafe.Pointer(bp + 16 + 1)) = uint8(Xsqlite3UpperToLower[uint8(c)]) + *(*uint8)(unsafe.Pointer(bp + 16 + 2)) = uint8(0) + } else { + *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(c) + *(*uint8)(unsafe.Pointer(bp + 16 + 1)) = uint8(0) + } + for 1 != 0 { + *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)) += uintptr(libc.Xstrcspn(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), bp+16)) + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == 0 { + break + } + *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */))++ + bMatch = patternCompare(tls, *(*uintptr)(unsafe.Pointer(bp /* zPattern */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), pInfo, matchOther) + if bMatch != SQLITE_NOMATCH { + return bMatch + } + } + } else { + var bMatch int32 + for libc.AssignUint32(&c2, func() uint32 { + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) < 0x80 { + return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 8)), 1)))) + } + return Xsqlite3Utf8Read(tls, bp+8) + }()) != U32(0) { + if c2 != c { + continue + } + bMatch = patternCompare(tls, *(*uintptr)(unsafe.Pointer(bp /* zPattern */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), pInfo, matchOther) + if bMatch != SQLITE_NOMATCH { + return bMatch + } + } + } + return SQLITE_NOWILDCARDMATCH + } + if c == matchOther { + if int32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) == 0 { + c = Xsqlite3Utf8Read(tls, bp) + if c == U32(0) { + return SQLITE_NOMATCH + } + zEscaped = *(*uintptr)(unsafe.Pointer(bp /* zPattern */)) + } else { + var prior_c U32 = U32(0) + var seen int32 = 0 + var invert int32 = 0 + c = Xsqlite3Utf8Read(tls, bp+8) + if c == U32(0) { + return SQLITE_NOMATCH + } + c2 = Xsqlite3Utf8Read(tls, bp) + if c2 == U32('^') { + invert = 1 + c2 = Xsqlite3Utf8Read(tls, bp) + } + if c2 == U32(']') { + if c == U32(']') { + seen = 1 + } + c2 = Xsqlite3Utf8Read(tls, bp) + } + for c2 != 0 && c2 != U32(']') { + if c2 == U32('-') && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != ']' && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0 && prior_c > U32(0) { + c2 = Xsqlite3Utf8Read(tls, bp) + if c >= prior_c && c <= c2 { + seen = 1 + } + prior_c = U32(0) + } else { + if c == c2 { + seen = 1 + } + prior_c = c2 + } + c2 = Xsqlite3Utf8Read(tls, bp) + } + if c2 == U32(0) || seen^invert == 0 { + return SQLITE_NOMATCH + } + continue + } + } + c2 = func() uint32 { + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) < 0x80 { + return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 8)), 1)))) + } + return Xsqlite3Utf8Read(tls, bp+8) + }() + if c == c2 { + continue + } + if noCase != 0 && int32(Xsqlite3UpperToLower[uint8(c)]) == int32(Xsqlite3UpperToLower[uint8(c2)]) && c < U32(0x80) && c2 < U32(0x80) { + continue + } + if c == matchOne && *(*uintptr)(unsafe.Pointer(bp)) != zEscaped && c2 != U32(0) { + continue + } + return SQLITE_NOMATCH + } + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == 0 { + return SQLITE_MATCH + } + return SQLITE_NOMATCH +} + +// The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and +// non-zero if there is no match. +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) +} + +// The sqlite3_strlike() interface. Return 0 on a match and non-zero for +// a miss - like strcmp(). +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) +} + +// Count the number of times that the LIKE operator (or GLOB which is +// just a variation of LIKE) gets called. This is used for testing +// only. + +// Implementation of the like() SQL function. This function implements +// the build-in LIKE operator. The first argument to the function is the +// pattern and the second argument is the string. So, the SQL statements: +// +// A LIKE B +// +// is implemented as like(B,A). +// +// This same function (with a different compareInfo structure) computes +// the GLOB operator. +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var zA uintptr + var zB uintptr + var escape U32 + var nPat int32 + var db uintptr = Xsqlite3_context_db_handle(tls, context) + var pInfo uintptr = Xsqlite3_user_data(tls, context) + // var backupInfo compareInfo at bp+8, 4 + + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_BLOB || + Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == SQLITE_BLOB { + Xsqlite3_result_int(tls, context, 0) + return + } + + // Limit the length of the LIKE or GLOB pattern to avoid problems + // of deep recursion and N*N behavior in patternCompare(). + nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + + if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { + Xsqlite3_result_error(tls, context, ts+14763, -1) + return + } + if argc == 3 { + // The escape character string must consist of a single UTF-8 character. + // Otherwise, return an error. + *(*uintptr)(unsafe.Pointer(bp /* zEsc */)) = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { + return + } + if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { + Xsqlite3_result_error(tls, context, + ts+14796, -1) + return + } + escape = Xsqlite3Utf8Read(tls, bp) + if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) || escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne) { + libc.Xmemcpy(tls, bp+8, pInfo, uint64(unsafe.Sizeof(compareInfo{}))) + pInfo = bp + 8 /* &backupInfo */ + if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) { + (*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll = U8(0) + } + if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne) { + (*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne = U8(0) + } + } + } else { + escape = U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) + } + zB = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + zA = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if zA != 0 && zB != 0 { + Xsqlite3_result_int(tls, context, + libc.Bool32(patternCompare(tls, zB, zA, pInfo, escape) == SQLITE_MATCH)) + } +} + +// Implementation of the NULLIF(x,y) function. The result is the first +// argument if the arguments are different. The result is NULL if the +// arguments are equal to each other. +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ + var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) + _ = NotUsed + if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { + Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv))) + } +} + +// Implementation of the sqlite_version() function. The result is the version +// of the SQLite library that is running. +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ + _ = NotUsed + _ = NotUsed2 + // IMP: R-48699-48617 This function is an SQL wrapper around the + // sqlite3_libversion() C-interface. + Xsqlite3_result_text(tls, context, Xsqlite3_libversion(tls), -1, uintptr(0)) +} + +// Implementation of the sqlite_source_id() function. The result is a string +// that identifies the particular version of the source code used to build +// SQLite. +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ + _ = NotUsed + _ = NotUsed2 + // IMP: R-24470-31136 This function is an SQL wrapper around the + // sqlite3_sourceid() C interface. + Xsqlite3_result_text(tls, context, Xsqlite3_sourceid(tls), -1, uintptr(0)) +} + +// Implementation of the sqlite_log() function. This is a wrapper around +// sqlite3_log(). The return value is NULL. The function exists purely for +// its side-effects. +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + _ = argc + _ = context + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3605, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) +} + +// Implementation of the sqlite_compileoption_used() function. +// The result is an integer that identifies if the compiler option +// was used to build SQLite. +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ + var zOptName uintptr + + _ = argc + // IMP: R-39564-36305 The sqlite_compileoption_used() SQL + // function is a wrapper around the sqlite3_compileoption_used() C/C++ + // function. + if libc.AssignUintptr(&zOptName, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != uintptr(0) { + Xsqlite3_result_int(tls, context, Xsqlite3_compileoption_used(tls, zOptName)) + } +} + +// Implementation of the sqlite_compileoption_get() function. +// The result is a string that identifies the compiler options +// used to build SQLite. +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ + var n int32 + + _ = argc + // IMP: R-04922-24076 The sqlite_compileoption_get() SQL function + // is a wrapper around the sqlite3_compileoption_get() C/C++ function. + n = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) + Xsqlite3_result_text(tls, context, Xsqlite3_compileoption_get(tls, n), -1, uintptr(0)) +} + +// Array for converting from half-bytes (nybbles) into ASCII hex +// digits. +var hexdigits = [16]uint8{ + uint8('0'), uint8('1'), uint8('2'), uint8('3'), uint8('4'), uint8('5'), uint8('6'), uint8('7'), + uint8('8'), uint8('9'), uint8('A'), uint8('B'), uint8('C'), uint8('D'), uint8('E'), uint8('F'), +} /* sqlite3.c:122088:19 */ + +// Append to pStr text that is the SQL literal representation of the +// value contained in pValue. +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + // As currently implemented, the string must be initially empty. + // we might relax this requirement in the future, but that will + // require enhancements to the implementation. + + switch Xsqlite3_value_type(tls, pValue) { + case SQLITE_FLOAT: + { + var r1 float64 + // var r2 float64 at bp+32, 8 + + var zVal uintptr + r1 = Xsqlite3_value_double(tls, pValue) + Xsqlite3_str_appendf(tls, pStr, ts+4867, libc.VaList(bp, r1)) + zVal = Xsqlite3_str_value(tls, pStr) + if zVal != 0 { + Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) + if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { + Xsqlite3_str_reset(tls, pStr) + Xsqlite3_str_appendf(tls, pStr, ts+14841, libc.VaList(bp+8, r1)) + } + } + break + + } + case SQLITE_INTEGER: + { + Xsqlite3_str_appendf(tls, pStr, ts+1305, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + break + + } + case SQLITE_BLOB: + { + var zBlob uintptr = Xsqlite3_value_blob(tls, pValue) + var nBlob int32 = Xsqlite3_value_bytes(tls, pValue) + // No encoding change + Xsqlite3StrAccumEnlarge(tls, pStr, nBlob*2+4) + if int32((*StrAccum)(unsafe.Pointer(pStr)).FaccError) == 0 { + var zText uintptr = (*StrAccum)(unsafe.Pointer(pStr)).FzText + var i int32 + for i = 0; i < nBlob; i++ { + *(*uint8)(unsafe.Pointer(zText + uintptr(i*2+2))) = hexdigits[int32(*(*uint8)(unsafe.Pointer(zBlob + uintptr(i))))>>4&0x0F] + *(*uint8)(unsafe.Pointer(zText + uintptr(i*2+3))) = hexdigits[int32(*(*uint8)(unsafe.Pointer(zBlob + uintptr(i))))&0x0F] + } + *(*uint8)(unsafe.Pointer(zText + uintptr(nBlob*2+2))) = uint8('\'') + *(*uint8)(unsafe.Pointer(zText + uintptr(nBlob*2+3))) = uint8(0) + *(*uint8)(unsafe.Pointer(zText)) = uint8('X') + *(*uint8)(unsafe.Pointer(zText + 1)) = uint8('\'') + (*StrAccum)(unsafe.Pointer(pStr)).FnChar = U32(nBlob*2 + 3) + } + break + + } + case SQLITE_TEXT: + { + var zArg uintptr = Xsqlite3_value_text(tls, pValue) + Xsqlite3_str_appendf(tls, pStr, ts+14848, libc.VaList(bp+24, zArg)) + break + + } + default: + { + + Xsqlite3_str_append(tls, pStr, ts+1526, 4) + break + + } + } +} + +// Implementation of the QUOTE() function. +// +// The quote(X) function returns the text of an SQL literal which is the +// value of its argument suitable for inclusion into an SQL statement. +// Strings are surrounded by single-quotes with escapes on interior quotes +// as needed. BLOBs are encoded as hexadecimal literals. Strings with +// embedded NUL characters cannot be represented as string literals in SQL +// and hence the returned string literal is truncated prior to the first NUL. +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + // var str Sqlite3_str at bp, 32 + + var db uintptr = Xsqlite3_context_db_handle(tls, context) + + _ = argc + Xsqlite3StrAccumInit(tls, bp, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) + Xsqlite3QuoteValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv))) + Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp), int32((*Sqlite3_str)(unsafe.Pointer(bp /* &str */)).FnChar), + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) + if int32((*Sqlite3_str)(unsafe.Pointer(bp)).FaccError) != SQLITE_OK { + Xsqlite3_result_null(tls, context) + Xsqlite3_result_error_code(tls, context, int32((*Sqlite3_str)(unsafe.Pointer(bp /* &str */)).FaccError)) + } +} + +// The unicode() function. Return the integer unicode code-point value +// for the first character of the input string. +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* z */)) = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + _ = argc + if *(*uintptr)(unsafe.Pointer(bp)) != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 { + Xsqlite3_result_int(tls, context, int32(Xsqlite3Utf8Read(tls, bp))) + } +} + +// The char() function takes zero or more arguments, each of which is +// an integer. It constructs a string where each character of the string +// is the unicode character for the corresponding integer argument. +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ + var z uintptr + var zOut uintptr + var i int32 + zOut = libc.AssignUintptr(&z, Xsqlite3_malloc64(tls, uint64(argc*4+1))) + if z == uintptr(0) { + Xsqlite3_result_error_nomem(tls, context) + return + } + for i = 0; i < argc; i++ { + var x Sqlite3_int64 + var c uint32 + x = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + if x < int64(0) || x > int64(0x10ffff) { + x = int64(0xfffd) + } + c = uint32(x & int64(0x1fffff)) + if c < uint32(0x00080) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = U8(c & uint32(0xFF)) + } else if c < uint32(0x00800) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xC0 + int32(U8(c>>6&uint32(0x1F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) + } else if c < uint32(0x10000) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xE0 + int32(U8(c>>12&uint32(0x0F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) + } else { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xF0 + int32(U8(c>>18&uint32(0x07)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c>>12&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) + } + } + Xsqlite3_result_text64(tls, context, z, uint64((int64(zOut)-int64(z))/1), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})), uint8(SQLITE_UTF8)) +} + +// The hex() function. Interpret the argument as a blob. Return +// a hexadecimal rendering as text. +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ + var i int32 + var n int32 + var pBlob uintptr + var zHex uintptr + var z uintptr + + _ = argc + pBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) + n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + // No encoding change + z = libc.AssignUintptr(&zHex, contextMalloc(tls, context, I64(n)*int64(2)+int64(1))) + if zHex != 0 { + i = 0 + __1: + if !(i < n) { + goto __3 + } + { + var c uint8 = *(*uint8)(unsafe.Pointer(pBlob)) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[int32(c)>>4&0xf] + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[int32(c)&0xf] + + } + goto __2 + __2: + i++ + pBlob++ + goto __1 + goto __3 + __3: + ; + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + Xsqlite3_result_text(tls, context, zHex, n*2, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + } +} + +// The zeroblob(N) function returns a zero-filled blob of size N bytes. +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ + var n I64 + var rc int32 + + _ = argc + n = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + if n < int64(0) { + n = int64(0) + } + rc = Xsqlite3_result_zeroblob64(tls, context, uint64(n)) // IMP: R-00293-64994 + if rc != 0 { + Xsqlite3_result_error_code(tls, context, rc) + } +} + +// The replace() function. Three arguments are all strings: call +// them A, B, and C. The result is also a string which is derived +// from A by replacing every occurrence of B with C. The match +// must be exact. Collating sequences are not used. +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ + var zStr uintptr // The input string A + var zPattern uintptr // The pattern string B + var zRep uintptr // The replacement string C + var zOut uintptr // The output + var nStr int32 // Size of zStr + var nPattern int32 // Size of zPattern + var nRep int32 // Size of zRep + var nOut I64 // Maximum size of zOut + var loopLimit int32 // Last zStr[] that might match zPattern[] + var i int32 + var j int32 // Loop counters + var cntExpand uint32 // Number zOut expansions + var db uintptr = Xsqlite3_context_db_handle(tls, context) + + _ = argc + zStr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if zStr == uintptr(0) { + return + } + nStr = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + // No encoding change + zPattern = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if zPattern == uintptr(0) { + + return + } + if int32(*(*uint8)(unsafe.Pointer(zPattern))) == 0 { + + Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv))) + return + } + nPattern = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + // No encoding change + zRep = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + if zRep == uintptr(0) { + return + } + nRep = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + + nOut = I64(nStr + 1) + + zOut = contextMalloc(tls, context, nOut) + if zOut == uintptr(0) { + return + } + loopLimit = nStr - nPattern + cntExpand = uint32(0) + for i = libc.AssignInt32(&j, 0); i <= loopLimit; i++ { + if int32(*(*uint8)(unsafe.Pointer(zStr + uintptr(i)))) != int32(*(*uint8)(unsafe.Pointer(zPattern))) || libc.Xmemcmp(tls, zStr+uintptr(i), zPattern, uint64(nPattern)) != 0 { + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&j, 1)))) = *(*uint8)(unsafe.Pointer(zStr + uintptr(i))) + } else { + if nRep > nPattern { + nOut = nOut + I64(nRep-nPattern) + + if nOut-int64(1) > I64(*(*int32)(unsafe.Pointer(db + 136))) { + Xsqlite3_result_error_toobig(tls, context) + Xsqlite3_free(tls, zOut) + return + } + cntExpand++ + if cntExpand&(cntExpand-uint32(1)) == uint32(0) { + // Grow the size of the output buffer only on substitutions + // whose index is a power of two: 1, 2, 4, 8, 16, 32, ... + var zOld uintptr + zOld = zOut + zOut = Xsqlite3Realloc(tls, zOut, uint64(I64(int32(nOut))+(nOut-I64(nStr)-int64(1)))) + if zOut == uintptr(0) { + Xsqlite3_result_error_nomem(tls, context) + Xsqlite3_free(tls, zOld) + return + } + } + } + libc.Xmemcpy(tls, zOut+uintptr(j), zRep, uint64(nRep)) + j = j + nRep + i = i + (nPattern - 1) + } + } + + libc.Xmemcpy(tls, zOut+uintptr(j), zStr+uintptr(i), uint64(nStr-i)) + j = j + (nStr - i) + + *(*uint8)(unsafe.Pointer(zOut + uintptr(j))) = uint8(0) + Xsqlite3_result_text(tls, context, zOut, j, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) +} + +// Implementation of the TRIM(), LTRIM(), and RTRIM() functions. +// The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ + var zIn uintptr // Input string + var zCharSet uintptr // Set of characters to trim + var nIn uint32 // Number of bytes in input + var flags int32 // 1: trimleft 2: trimright 3: trim + var i int32 // Loop counter + var aLen uintptr = uintptr(0) // Length of each character in zCharSet + var azChar uintptr = uintptr(0) // Individual characters in zCharSet + var nChar int32 // Number of characters in zCharSet + + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { + return + } + zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if zIn == uintptr(0) { + return + } + nIn = uint32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) + + if argc == 1 { + nChar = 1 + aLen = uintptr(uintptr(unsafe.Pointer(&lenOne))) + azChar = uintptr(uintptr(unsafe.Pointer(&azOne))) + zCharSet = uintptr(0) + } else if libc.AssignUintptr(&zCharSet, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) == uintptr(0) { + return + } else { + var z uintptr + z = zCharSet + nChar = 0 + for ; *(*uint8)(unsafe.Pointer(z)) != 0; nChar++ { + { + if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { + for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { + z++ + } + } + } + + } + if nChar > 0 { + azChar = contextMalloc(tls, context, + int64(uint64(I64(nChar))*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(unsafe.Sizeof(uint32(0)))))) + if azChar == uintptr(0) { + return + } + aLen = azChar + uintptr(nChar)*8 + z = zCharSet + nChar = 0 + for ; *(*uint8)(unsafe.Pointer(z)) != 0; nChar++ { + *(*uintptr)(unsafe.Pointer(azChar + uintptr(nChar)*8)) = z + { + if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { + for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { + z++ + } + } + } + + *(*uint32)(unsafe.Pointer(aLen + uintptr(nChar)*4)) = uint32((int64(z) - int64(*(*uintptr)(unsafe.Pointer(azChar + uintptr(nChar)*8)))) / 1) + } + } + } + if nChar > 0 { + flags = int32(Xsqlite3_user_data(tls, context)) + if flags&1 != 0 { + for nIn > uint32(0) { + var len uint32 = uint32(0) + for i = 0; i < nChar; i++ { + len = *(*uint32)(unsafe.Pointer(aLen + uintptr(i)*4)) + if len <= nIn && libc.Xmemcmp(tls, zIn, *(*uintptr)(unsafe.Pointer(azChar + uintptr(i)*8)), uint64(len)) == 0 { + break + } + } + if i >= nChar { + break + } + zIn += uintptr(len) + nIn = nIn - len + } + } + if flags&2 != 0 { + for nIn > uint32(0) { + var len uint32 = uint32(0) + for i = 0; i < nChar; i++ { + len = *(*uint32)(unsafe.Pointer(aLen + uintptr(i)*4)) + if len <= nIn && libc.Xmemcmp(tls, zIn+uintptr(nIn-len), *(*uintptr)(unsafe.Pointer(azChar + uintptr(i)*8)), uint64(len)) == 0 { + break + } + } + if i >= nChar { + break + } + nIn = nIn - len + } + } + if zCharSet != 0 { + Xsqlite3_free(tls, azChar) + } + } + Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) +} + +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10796 /* " " */)} /* sqlite3.c:122408:26 */ + +// IMP: R-25361-16150 This function is omitted from SQLite by default. It +// is only available if the SQLITE_SOUNDEX compile-time option is used +// when SQLite is built. +// Compute the soundex encoding of a word. +// +// IMP: R-59782-00072 The soundex(X) function returns a string that is the +// soundex encoding of the string X. +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var zResult [8]uint8 at bp, 8 + + var zIn uintptr + var i int32 + var j int32 + + zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if zIn == uintptr(0) { + zIn = ts + 1525 /* "" */ + } + for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { + } + if *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 { + var prevcode U8 = iCode[int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))&0x7f] + *(*uint8)(unsafe.Pointer(bp)) = uint8(int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i)))) & ^(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))]) & 0x20)) + for j = 1; j < 4 && *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0; i++ { + var code int32 = int32(iCode[int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))&0x7f]) + if code > 0 { + if code != int32(prevcode) { + prevcode = U8(code) + *(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&j, 1)))) = uint8(code + '0') + } + } else { + prevcode = U8(0) + } + } + for j < 4 { + *(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&j, 1)))) = uint8('0') + } + *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) + Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) + } else { + // IMP: R-64894-50321 The string "?000" is returned if the argument + // is NULL or contains no ASCII alphabetic characters. + Xsqlite3_result_text(tls, context, ts+14851, 4, uintptr(0)) + } +} + +var iCode = [128]uint8{ + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), + uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), + uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), +} /* sqlite3.c:122506:30 */ + +// A function that loads a shared-library extension then returns NULL. +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var zFile uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + var zProc uintptr + var db uintptr = Xsqlite3_context_db_handle(tls, context) + *(*uintptr)(unsafe.Pointer(bp /* zErrMsg */)) = uintptr(0) + + // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc + // flag is set. See the sqlite3_enable_load_extension() API. + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { + Xsqlite3_result_error(tls, context, ts+11976, -1) + return + } + + if argc == 2 { + zProc = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + } else { + zProc = uintptr(0) + } + if zFile != 0 && Xsqlite3_load_extension(tls, db, zFile, zProc, bp) != 0 { + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp /* zErrMsg */)), -1) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* zErrMsg */))) + } +} + +// An instance of the following structure holds the context of a +// sum() or avg() aggregate computation. +type SumCtx1 = struct { + FrSum float64 + FiSum I64 + Fcnt I64 + Foverflow U8 + Fapprox U8 + F__ccgo_pad1 [6]byte +} /* sqlite3.c:122582:9 */ + +// An instance of the following structure holds the context of a +// sum() or avg() aggregate computation. +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ + +// Routines used to compute the sum, average, and total. +// +// The SUM() function follows the (broken) SQL standard which means +// that it returns NULL if it sums over no inputs. TOTAL returns +// 0.0 in that case. In addition, TOTAL always returns a float where +// SUM might return an integer if it never encounters a floating point +// value. TOTAL never fails, but SUM might through an exception if +// it overflows an integer. +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ + var p uintptr + var type1 int32 + + _ = argc + p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(SumCtx{}))) + type1 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + if p != 0 && type1 != SQLITE_NULL { + (*SumCtx)(unsafe.Pointer(p)).Fcnt++ + if type1 == SQLITE_INTEGER { + var v I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + *(*float64)(unsafe.Pointer(p)) += float64(v) + if int32((*SumCtx)(unsafe.Pointer(p)).Fapprox)|int32((*SumCtx)(unsafe.Pointer(p)).Foverflow) == 0 && Xsqlite3AddInt64(tls, p+8, v) != 0 { + (*SumCtx)(unsafe.Pointer(p)).Fapprox = libc.AssignPtrUint8(p+24, U8(1)) + } + } else { + *(*float64)(unsafe.Pointer(p)) += Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + (*SumCtx)(unsafe.Pointer(p)).Fapprox = U8(1) + } + } +} + +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ + var p uintptr + var type1 int32 + + _ = argc + p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(SumCtx{}))) + type1 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + // p is always non-NULL because sumStep() will have been called first + // to initialize it + if p != 0 && type1 != SQLITE_NULL { + + (*SumCtx)(unsafe.Pointer(p)).Fcnt-- + + if type1 == SQLITE_INTEGER && int32((*SumCtx)(unsafe.Pointer(p)).Fapprox) == 0 { + var v I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + *(*float64)(unsafe.Pointer(p)) -= float64(v) + *(*I64)(unsafe.Pointer(p + 8)) -= v + } else { + *(*float64)(unsafe.Pointer(p)) -= Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + } + } +} + +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, context, 0) + if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { + if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { + Xsqlite3_result_error(tls, context, ts+14741, -1) + } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { + Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) + } else { + Xsqlite3_result_int64(tls, context, (*SumCtx)(unsafe.Pointer(p)).FiSum) + } + } +} + +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, context, 0) + if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { + 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:122668:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, context, 0) + // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... + Xsqlite3_result_double(tls, context, func() float64 { + if p != 0 { + return (*SumCtx)(unsafe.Pointer(p)).FrSum + } + return float64(0) + }()) +} + +// The following structure keeps track of state information for the +// count() aggregate function. +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ + +// The following structure keeps track of state information for the +// count() aggregate function. +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ + +// Routines to implement the count() aggregate function. +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) + if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { + (*CountCtx)(unsafe.Pointer(p)).Fn++ + } + + // The sqlite3_aggregate_count() function is deprecated. But just to make + // sure it still operates correctly, verify that its count agrees with our + // internal count when using count(*) and when the total count can be + // expressed as a 32-bit integer. + +} + +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, context, 0) + Xsqlite3_result_int64(tls, context, func() int64 { + if p != 0 { + return (*CountCtx)(unsafe.Pointer(p)).Fn + } + return int64(0) + }()) +} + +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) + // p is always non-NULL since countStep() will have been called first + if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { + (*CountCtx)(unsafe.Pointer(p)).Fn-- + } +} + +// Routines to implement min() and max() aggregate functions. +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ + var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) + var pBest uintptr + _ = NotUsed + + pBest = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(Mem{}))) + if !(pBest != 0) { + return + } + + if Xsqlite3_value_type(tls, pArg) == SQLITE_NULL { + if (*Mem)(unsafe.Pointer(pBest)).Fflags != 0 { + sqlite3SkipAccumulatorLoad(tls, context) + } + } else if (*Mem)(unsafe.Pointer(pBest)).Fflags != 0 { + var max int32 + var cmp int32 + var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) + // This step function is used for both the min() and max() aggregates, + // the only difference between the two being that the sense of the + // comparison is inverted. For the max() aggregate, the + // sqlite3_user_data() function returns (void *)-1. For min() it + // returns (void *)db, where db is the sqlite3* database pointer. + // Therefore the next statement sets variable 'max' to 1 for the max() + // aggregate, or 0 for min(). + max = libc.Bool32(Xsqlite3_user_data(tls, context) != uintptr(0)) + cmp = Xsqlite3MemCompare(tls, pBest, pArg, pColl) + if max != 0 && cmp < 0 || !(max != 0) && cmp > 0 { + Xsqlite3VdbeMemCopy(tls, pBest, pArg) + } else { + sqlite3SkipAccumulatorLoad(tls, context) + } + } else { + (*Mem)(unsafe.Pointer(pBest)).Fdb = Xsqlite3_context_db_handle(tls, context) + Xsqlite3VdbeMemCopy(tls, pBest, pArg) + } +} + +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ + var pRes uintptr + pRes = Xsqlite3_aggregate_context(tls, context, 0) + if pRes != 0 { + if (*Sqlite3_value)(unsafe.Pointer(pRes)).Fflags != 0 { + Xsqlite3_result_value(tls, context, pRes) + } + if bValue == 0 { + Xsqlite3VdbeMemRelease(tls, pRes) + } + } +} + +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ + minMaxValueFinalize(tls, context, 1) +} + +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ + minMaxValueFinalize(tls, context, 0) +} + +// group_concat(EXPR, ?SEPARATOR?) +// +// The SEPARATOR goes before the EXPR string. This is tragic. The +// groupConcatInverse() implementation would have been easier if the +// SEPARATOR were appended after EXPR. And the order is undocumented, +// so we could change it, in theory. But the old behavior has been +// around for so long that we dare not, for fear of breaking something. +type GroupConcatCtx = struct { + Fstr StrAccum + FnAccum int32 + FnFirstSepLength int32 + FpnSepLengths uintptr +} /* sqlite3.c:122810:3 */ + +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ + var zVal uintptr + var pGCC uintptr + var zSep uintptr + var nVal int32 + var nSep int32 + + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { + return + } + pGCC = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(GroupConcatCtx{}))) + if pGCC != 0 { + var db uintptr = Xsqlite3_context_db_handle(tls, context) + var firstTerm int32 = libc.Bool32((*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FmxAlloc == U32(0)) + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FmxAlloc = U32(*(*int32)(unsafe.Pointer(db + 136))) + if argc == 1 { + if !(firstTerm != 0) { + Xsqlite3_str_appendchar(tls, pGCC, 1, uint8(',')) + } else { + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength = 1 + } + } else if !(firstTerm != 0) { + zSep = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + nSep = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if zSep != 0 { + Xsqlite3_str_append(tls, pGCC, zSep, nSep) + } else { + nSep = 0 + } + if nSep != (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength || (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths != uintptr(0) { + var pnsl uintptr = (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths + if pnsl == uintptr(0) { + // First separator length variation seen, start tracking them. + pnsl = Xsqlite3_malloc64(tls, uint64(uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum+1)*uint64(unsafe.Sizeof(int32(0))))) + if pnsl != uintptr(0) { + var i int32 = 0 + var nA int32 = (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum - 1 + for i < nA { + *(*int32)(unsafe.Pointer(pnsl + uintptr(libc.PostIncInt32(&i, 1))*4)) = (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength + } + } + } else { + pnsl = Xsqlite3_realloc64(tls, pnsl, uint64(uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum)*uint64(unsafe.Sizeof(int32(0))))) + } + if pnsl != uintptr(0) { + if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum > 0 { + *(*int32)(unsafe.Pointer(pnsl + uintptr((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum-1)*4)) = nSep + } + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths = pnsl + } else { + Xsqlite3StrAccumSetError(tls, pGCC, uint8(SQLITE_NOMEM)) + } + } + } else { + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + } + *(*int32)(unsafe.Pointer(pGCC + 32)) += 1 + zVal = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + nVal = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + if zVal != 0 { + Xsqlite3_str_append(tls, pGCC, zVal, nVal) + } + } +} + +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ + var pGCC uintptr + + _ = argc // Suppress unused parameter warning + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { + return + } + pGCC = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(GroupConcatCtx{}))) + // pGCC is always non-NULL since groupConcatStep() will have always + // run frist to initialize it + if pGCC != 0 { + var nVS int32 + // Must call sqlite3_value_text() to convert the argument into text prior + // to invoking sqlite3_value_bytes(), in case the text encoding is UTF16 + Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + nVS = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + *(*int32)(unsafe.Pointer(pGCC + 32)) -= 1 + if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths != uintptr(0) { + + if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum > 0 { + nVS = nVS + *(*int32)(unsafe.Pointer((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths)) + libc.Xmemmove(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths+uintptr(1)*4, + uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum-1)*uint64(unsafe.Sizeof(int32(0)))) + } + } else { + // If removing single accumulated string, harmlessly over-do. + nVS = nVS + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength + } + if nVS >= int32((*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar) { + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar = U32(0) + } else { + *(*U32)(unsafe.Pointer(pGCC + 24)) -= U32(nVS) + libc.Xmemmove(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FzText, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FzText+uintptr(nVS), uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar)) + } + if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar == U32(0) { + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FmxAlloc = U32(0) + Xsqlite3_free(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths) + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths = uintptr(0) + } + } +} + +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ + var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) + if pGCC != 0 { + Xsqlite3ResultStrAccum(tls, context, pGCC) + Xsqlite3_free(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths) + } +} + +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ + var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) + if pGCC != 0 { + var pAccum uintptr = pGCC + if int32((*StrAccum)(unsafe.Pointer(pAccum)).FaccError) == SQLITE_TOOBIG { + Xsqlite3_result_error_toobig(tls, context) + } else if int32((*StrAccum)(unsafe.Pointer(pAccum)).FaccError) == SQLITE_NOMEM { + Xsqlite3_result_error_nomem(tls, context) + } else { + var zText uintptr = Xsqlite3_str_value(tls, pAccum) + Xsqlite3_result_text(tls, context, zText, int32((*StrAccum)(unsafe.Pointer(pAccum)).FnChar), libc.UintptrFromInt32(-1)) + } + } +} + +// This routine does per-connection function registration. Most +// of the built-in functions above are part of the global function set. +// This routine only deals with those that are not global. +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14856, 2) + + if rc == SQLITE_NOMEM { + Xsqlite3OomFault(tls, db) + } +} + +// Re-register the built-in LIKE functions. The caseSensitive +// parameter determines whether or not the LIKE operator is case +// sensitive. +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ + var pInfo uintptr + var flags int32 + if caseSensitive != 0 { + pInfo = uintptr(unsafe.Pointer(&likeInfoAlt)) + flags = SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE + } else { + pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) + flags = SQLITE_FUNC_LIKE + } + Xsqlite3CreateFunc(tls, db, ts+14862, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3CreateFunc(tls, db, ts+14862, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14862, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14862, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) +} + +// pExpr points to an expression which implements a function. If +// it is appropriate to apply the LIKE optimization to that function +// then set aWc[0] through aWc[2] to the wildcard characters and the +// escape character and then return TRUE. If the function is not a +// LIKE-style function then return FALSE. +// +// The expression "a LIKE b ESCAPE c" is only considered a valid LIKE +// operator if c is a string literal that is exactly one byte in length. +// That one byte is stored in aWc[3]. aWc[3] is set to zero if there is +// no ESCAPE clause. +// +// *pIsNocase is set to true if uppercase and lowercase are equivalent for +// the function (default for LIKE). If the function makes the distinction +// between uppercase and lowercase (as does GLOB) then *pIsNocase is set to +// false. +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ + var pDef uintptr + var nExpr int32 + + if !(int32(*(*uintptr)(unsafe.Pointer(pExpr + 32))) != 0) { + return 0 + } + nExpr = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr + + pDef = Xsqlite3FindFunction(tls, db, *(*uintptr)(unsafe.Pointer(pExpr + 8)), nExpr, uint8(SQLITE_UTF8), uint8(0)) + if pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_LIKE) == U32(0) { + return 0 + } + + // The memcpy() statement assumes that the wildcard characters are + // the first three statements in the compareInfo structure. The + // asserts() that follow verify that assumption + libc.Xmemcpy(tls, aWc, (*FuncDef)(unsafe.Pointer(pDef)).FpUserData, uint64(3)) + + if nExpr < 3 { + *(*uint8)(unsafe.Pointer(aWc + 3)) = uint8(0) + } else { + var pEscape uintptr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8 + 2*32)).FpExpr + var zEscape uintptr + if int32((*Expr)(unsafe.Pointer(pEscape)).Fop) != TK_STRING { + return 0 + } + + zEscape = *(*uintptr)(unsafe.Pointer(pEscape + 8)) + if int32(*(*uint8)(unsafe.Pointer(zEscape))) == 0 || int32(*(*uint8)(unsafe.Pointer(zEscape + 1))) != 0 { + return 0 + } + if int32(*(*uint8)(unsafe.Pointer(zEscape))) == int32(*(*uint8)(unsafe.Pointer(aWc))) { + return 0 + } + if int32(*(*uint8)(unsafe.Pointer(zEscape))) == int32(*(*uint8)(unsafe.Pointer(aWc + 1))) { + return 0 + } + *(*uint8)(unsafe.Pointer(aWc + 3)) = *(*uint8)(unsafe.Pointer(zEscape)) + } + + *(*int32)(unsafe.Pointer(pIsNocase)) = libc.Bool32((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CASE) == U32(0)) + return 1 +} + +// Mathematical Constants + +// Extra math functions that require linking with -lm +// Implementation SQL functions: +// +// ceil(X) +// ceiling(X) +// floor(X) +// +// The sqlite3_user_data() pointer is a pointer to the libm implementation +// of the underlying C function. +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ + + switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_INTEGER: + { + Xsqlite3_result_int64(tls, context, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))) + break + + } + case SQLITE_FLOAT: + { + var x uintptr = Xsqlite3_user_data(tls, context) + Xsqlite3_result_double(tls, context, (*struct { + f func(*libc.TLS, float64) float64 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))))) + break + + } + default: + { + break + + } + } +} + +// On some systems, ceil() and floor() are intrinsic function. You are +// unable to take a pointer to these functions. Hence, we here wrap them +// in our own actual functions. +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ + return libc.Xceil(tls, x) +} + +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ + return libc.Xfloor(tls, x) +} + +// Implementation of SQL functions: +// +// ln(X) - natural logarithm +// log(X) - log X base 10 +// log10(X) - log X base 10 +// log(B,X) - log X base B +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ + var x float64 + var b float64 + var ans float64 + + switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_INTEGER: + fallthrough + case SQLITE_FLOAT: + x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + if x <= 0.0 { + return + } + break + default: + return + } + if argc == 2 { + switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_INTEGER: + fallthrough + case SQLITE_FLOAT: + b = libc.Xlog(tls, x) + if b <= 0.0 { + return + } + x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if x <= 0.0 { + return + } + break + fallthrough + default: + return + } + ans = libc.Xlog(tls, x) / b + } else { + ans = libc.Xlog(tls, x) + switch int32(Xsqlite3_user_data(tls, context)) { + case 1: + // Convert from natural logarithm to log base 10 + ans = ans * (float64(1.0) / 2.30258509299404568402) + break + fallthrough + case 2: + // Convert from natural logarithm to log base 2 + ans = ans * (float64(1.0) / 0.69314718055994530942) + break + fallthrough + default: + break + } + } + Xsqlite3_result_double(tls, context, ans) +} + +// Functions to converts degrees to radians and radians to degrees. +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ + return x * (float64(3.14159265358979323846) / 180.0) +} + +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ + return x * (float64(180.0) / 3.14159265358979323846) +} + +// Implementation of 1-argument SQL math functions: +// +// exp(X) - Compute e to the X-th power +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ + var type0 int32 + var v0 float64 + var ans float64 + var x uintptr + + type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { + return + } + v0 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + x = Xsqlite3_user_data(tls, context) + ans = (*struct { + f func(*libc.TLS, float64) float64 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, v0) + Xsqlite3_result_double(tls, context, ans) +} + +// Implementation of 2-argument SQL math functions: +// +// power(X,Y) - Compute X to the Y-th power +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ + var type0 int32 + var type1 int32 + var v0 float64 + var v1 float64 + var ans float64 + var x uintptr + + type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { + return + } + type1 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if type1 != SQLITE_INTEGER && type1 != SQLITE_FLOAT { + return + } + v0 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + v1 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + x = Xsqlite3_user_data(tls, context) + ans = (*struct { + f func(*libc.TLS, float64, float64) float64 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, v0, v1) + Xsqlite3_result_double(tls, context, ans) +} + +// Implementation of 0-argument pi() function. +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ + + Xsqlite3_result_double(tls, context, 3.14159265358979323846) +} + +// Implementation of sign(X) function. +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ + var type0 int32 + var x float64 + _ = argc + + type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { + return + } + x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + Xsqlite3_result_int(tls, context, func() int32 { + if x < 0.0 { + return -1 + } + return func() int32 { + if x > 0.0 { + return +1 + } + return 0 + }() + }()) +} + +// All of the FuncDef structures in the aBuiltinFunc[] array above +// to the global function hash table. This occurs at start-time (as +// a consequence of calling sqlite3_initialize()). +// +// After this routine runs +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ + Xsqlite3AlterFunctions(tls) + Xsqlite3WindowFunctions(tls) + Xsqlite3RegisterDateTimeFunctions(tls) + Xsqlite3RegisterJsonFunctions(tls) + Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aBuiltinFunc)), int32(uint64(unsafe.Sizeof(aBuiltinFunc))/uint64(unsafe.Sizeof(FuncDef{})))) + +} + +var aBuiltinFunc = [101]FuncDef{ + //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14867}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14887}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14900}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14918}, + //**** Regular functions **** + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14927}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14935}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14935}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14950}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14976}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15001}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15010}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15021}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15028}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15042}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15042}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15048}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15048}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15054}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15054}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15059}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15059}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15059}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15063}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15063}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15063}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15067}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15074}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15082}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15089}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15095}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15102}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15109}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15117}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15122}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15132}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15138}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15144}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15148}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15155}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15173}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15180}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15195}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15212}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15223}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15229}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15247}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15255}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15269}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15293}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15293}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15303}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15313}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15317}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15317}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15323}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15323}, + + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15336}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14862}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14862}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15341}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15341}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15355}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15363}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15369}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15375}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15378}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15382}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15388}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15378}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15393}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15401}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15407}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15411}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15421}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15426}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15444}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15449}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15454}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15459}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15465}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15471}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15477}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15482}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15490}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15498}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15501}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15341}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15506}} /* sqlite3.c:123269:18 */ + +//************* End of func.c *********************************************** +//************* Begin file fkey.c ******************************************* +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code used by the compiler to add foreign key +// support to compiled SQL statements. +// #include "sqliteInt.h" + +// Deferred and Immediate FKs +// -------------------------- +// +// Foreign keys in SQLite come in two flavours: deferred and immediate. +// If an immediate foreign key constraint is violated, +// SQLITE_CONSTRAINT_FOREIGNKEY is returned and the current +// statement transaction rolled back. If a +// deferred foreign key constraint is violated, no action is taken +// immediately. However if the application attempts to commit the +// transaction before fixing the constraint violation, the attempt fails. +// +// Deferred constraints are implemented using a simple counter associated +// with the database handle. The counter is set to zero each time a +// database transaction is opened. Each time a statement is executed +// that causes a foreign key violation, the counter is incremented. Each +// time a statement is executed that removes an existing violation from +// the database, the counter is decremented. When the transaction is +// committed, the commit fails if the current value of the counter is +// greater than zero. This scheme has two big drawbacks: +// +// * When a commit fails due to a deferred foreign key constraint, +// there is no way to tell which foreign constraint is not satisfied, +// or which row it is not satisfied for. +// +// * If the database contains foreign key violations when the +// transaction is opened, this may cause the mechanism to malfunction. +// +// Despite these problems, this approach is adopted as it seems simpler +// than the alternatives. +// +// INSERT operations: +// +// I.1) For each FK for which the table is the child table, search +// the parent table for a match. If none is found increment the +// constraint counter. +// +// I.2) For each FK for which the table is the parent table, +// search the child table for rows that correspond to the new +// row in the parent table. Decrement the counter for each row +// found (as the constraint is now satisfied). +// +// DELETE operations: +// +// D.1) For each FK for which the table is the child table, +// search the parent table for a row that corresponds to the +// deleted row in the child table. If such a row is not found, +// decrement the counter. +// +// D.2) For each FK for which the table is the parent table, search +// the child table for rows that correspond to the deleted row +// in the parent table. For each found increment the counter. +// +// UPDATE operations: +// +// An UPDATE command requires that all 4 steps above are taken, but only +// for FK constraints for which the affected columns are actually +// modified (values must be compared at runtime). +// +// Note that I.1 and D.1 are very similar operations, as are I.2 and D.2. +// This simplifies the implementation a bit. +// +// For the purposes of immediate FK constraints, the OR REPLACE conflict +// resolution is considered to delete rows before the new row is inserted. +// If a delete caused by OR REPLACE violates an FK constraint, an exception +// is thrown, even if the FK constraint would be satisfied after the new +// row is inserted. +// +// Immediate constraints are usually handled similarly. The only difference +// is that the counter used is stored as part of each individual statement +// object (struct Vdbe). If, after the statement has run, its immediate +// constraint counter is greater than zero, +// it returns SQLITE_CONSTRAINT_FOREIGNKEY +// and the statement transaction is rolled back. An exception is an INSERT +// statement that inserts a single row only (no triggers). In this case, +// instead of using a counter, an exception is thrown immediately if the +// INSERT violates a foreign key constraint. This is necessary as such +// an INSERT does not open a statement transaction. +// +// TODO: How should dropping a table be handled? How should renaming a +// table be handled? +// +// +// Query API Notes +// --------------- +// +// Before coding an UPDATE or DELETE row operation, the code-generator +// for those two operations needs to know whether or not the operation +// requires any FK processing and, if so, which columns of the original +// row are required by the FK processing VDBE code (i.e. if FKs were +// implemented using triggers, which of the old.* columns would be +// accessed). No information is required by the code-generator before +// coding an INSERT operation. The functions used by the UPDATE/DELETE +// generation code to query for this information are: +// +// sqlite3FkRequired() - Test to see if FK processing is required. +// sqlite3FkOldmask() - Query for the set of required old.* columns. +// +// +// Externally accessible module functions +// -------------------------------------- +// +// sqlite3FkCheck() - Check for foreign key violations. +// sqlite3FkActions() - Code triggers for ON UPDATE/ON DELETE actions. +// sqlite3FkDelete() - Delete an FKey structure. + +// VDBE Calling Convention +// ----------------------- +// +// Example: +// +// For the following INSERT statement: +// +// CREATE TABLE t1(a, b INTEGER PRIMARY KEY, c); +// INSERT INTO t1 VALUES(1, 2, 3.1); +// +// Register (x): 2 (type integer) +// Register (x+1): 1 (type integer) +// Register (x+2): NULL (type NULL) +// Register (x+3): 3.1 (type real) + +// A foreign key constraint requires that the key columns in the parent +// table are collectively subject to a UNIQUE or PRIMARY KEY constraint. +// Given that pParent is the parent table for foreign key constraint pFKey, +// search the schema for a unique index on the parent key columns. +// +// If successful, zero is returned. If the parent key is an INTEGER PRIMARY +// KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx +// is set to point to the unique index. +// +// If the parent key consists of a single column (the foreign key constraint +// is not a composite foreign key), output variable *paiCol is set to NULL. +// Otherwise, it is set to point to an allocated array of size N, where +// N is the number of columns in the parent key. The first element of the +// array is the index of the child table column that is mapped by the FK +// constraint to the parent table column stored in the left-most column +// of index *ppIdx. The second element of the array is the index of the +// child table column that corresponds to the second left-most column of +// *ppIdx, and so on. +// +// If the required index cannot be found, either because: +// +// 1) The named parent key columns do not exist, or +// +// 2) The named parent key columns do exist, but are not subject to a +// UNIQUE or PRIMARY KEY constraint, or +// +// 3) No parent key columns were provided explicitly as part of the +// foreign key definition, and the parent table does not have a +// PRIMARY KEY, or +// +// 4) No parent key columns were provided explicitly as part of the +// foreign key definition, and the PRIMARY KEY of the parent table +// consists of a different number of columns to the child key in +// the child table. +// +// then non-zero is returned, and a "foreign key mismatch" error loaded +// into pParse. If an OOM error occurs, non-zero is returned and the +// pParse->db->mallocFailed flag is set. +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pIdx uintptr = uintptr(0) // Value to return via *ppIdx + var aiCol uintptr = uintptr(0) // Value to return via *paiCol + var nCol int32 = (*FKey)(unsafe.Pointer(pFKey)).FnCol // Number of columns in parent key + var zKey uintptr = (*sColMap)(unsafe.Pointer(pFKey + 64)).FzCol // Name of left-most parent key column + + // The caller is responsible for zeroing output parameters. + + // If this is a non-composite (single column) foreign key, check if it + // maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx + // and *paiCol set to zero and return early. + // + // Otherwise, for a composite foreign key (more than one column), allocate + // space for the aiCol array (returned via output parameter *paiCol). + // Non-composite foreign keys do not require the aiCol array. + if nCol == 1 { + // The FK maps to the IPK if any of the following are true: + // + // 1) There is an INTEGER PRIMARY KEY column and the FK is implicitly + // mapped to the primary key of table pParent, or + // 2) The FK is explicitly mapped to a column declared as INTEGER + // PRIMARY KEY. + if int32((*Table)(unsafe.Pointer(pParent)).FiPKey) >= 0 { + if !(zKey != 0) { + return 0 + } + if !(Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pParent)).FaCol+uintptr((*Table)(unsafe.Pointer(pParent)).FiPKey)*24)).FzCnName, zKey) != 0) { + return 0 + } + } + } else if paiCol != 0 { + + aiCol = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(nCol)*uint64(unsafe.Sizeof(int32(0))))) + if !(aiCol != 0) { + return 1 + } + *(*uintptr)(unsafe.Pointer(paiCol)) = aiCol + } + + for pIdx = (*Table)(unsafe.Pointer(pParent)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + if int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) == nCol && int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None && (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { + // pIdx is a UNIQUE index (or a PRIMARY KEY) and has the right number + // of columns. If each indexed column corresponds to a foreign key + // column of pFKey, then this index is a winner. + + if zKey == uintptr(0) { + // If zKey is NULL, then this foreign key is implicitly mapped to + // the PRIMARY KEY of table pParent. The PRIMARY KEY index may be + // identified by the test. + if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + if aiCol != 0 { + var i int32 + for i = 0; i < nCol; i++ { + *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) = (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FiFrom + } + } + break + } + } else { + // If zKey is non-NULL, then this foreign key was declared to + // map to an explicit list of columns in table pParent. Check if this + // index matches those columns. Also, check that the index uses + // the default collation sequences for each column. + var i int32 + var j int32 + for i = 0; i < nCol; i++ { + var iCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) // Index of column in parent tbl + var zDfltColl uintptr // Def. collation for column + var zIdxCol uintptr // Name of indexed column + + if int32(iCol) < 0 { + break + } // No foreign keys against expression indexes + + // If the index uses a collation sequence that is different from + // the default collation sequence for the column, this index is + // unusable. Bail out early in this case. + zDfltColl = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pParent)).FaCol+uintptr(iCol)*24) + if !(zDfltColl != 0) { + zDfltColl = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) + } + if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8)), zDfltColl) != 0 { + break + } + + zIdxCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pParent)).FaCol + uintptr(iCol)*24)).FzCnName + for j = 0; j < nCol; j++ { + if Xsqlite3StrICmp(tls, (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FzCol, zIdxCol) == 0 { + if aiCol != 0 { + *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) = (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(j)*16)).FiFrom + } + break + } + } + if j == nCol { + break + } + } + if i == nCol { + break + } // pIdx is usable + } + } + } + + if !(pIdx != 0) { + if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { + Xsqlite3ErrorMsg(tls, pParse, + ts+15510, + libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) + } + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) + return 1 + } + + *(*uintptr)(unsafe.Pointer(ppIdx)) = pIdx + return 0 +} + +// This function is called when a row is inserted into or deleted from the +// child table of foreign key constraint pFKey. If an SQL UPDATE is executed +// on the child table of pFKey, this function is invoked twice for each row +// affected - once to "delete" the old row, and then again to "insert" the +// new row. +// +// Each time it is called, this function generates VDBE code to locate the +// row in the parent table that corresponds to the row being inserted into +// or deleted from the child table. If the parent row can be found, no +// special action is taken. Otherwise, if the parent row can *not* be +// found in the parent table: +// +// Operation | FK type | Action taken +// -------------------------------------------------------------------------- +// INSERT immediate Increment the "immediate constraint counter". +// +// DELETE immediate Decrement the "immediate constraint counter". +// +// INSERT deferred Increment the "deferred constraint counter". +// +// DELETE deferred Decrement the "deferred constraint counter". +// +// These operations are identified in the comment at the top of this file +// (fkey.c) as "I.1" and "D.1". +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ + var i int32 // Iterator variable + var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to + var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use + var iOk int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // jump here if parent key found + + // If nIncr is less than zero, then check at runtime if there are any + // outstanding constraints to resolve. If there are not, there is no need + // to check if deleting this row resolves any outstanding violations. + // + // Check if any of the key columns in the child table row are NULL. If + // any are, then the constraint is considered satisfied. No need to + // search for a matching row in the parent table. + if nIncr < 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), iOk) + + } + for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { + var iReg int32 = int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4))))) + regData + 1 + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, iReg, iOk) + } + + if isIgnore == 0 { + if pIdx == uintptr(0) { + // If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY + // column of the parent table (table pTab). + var iMustBeInt int32 // Address of MustBeInt instruction + var regTemp int32 = Xsqlite3GetTempReg(tls, pParse) + + // Invoke MustBeInt to coerce the child key value to an integer (i.e. + // apply the affinity of the parent key). If this fails, then there + // is no matching parent key. Before using MustBeInt, make a copy of + // the value. Otherwise, the value inserted into the child key column + // will have INTEGER affinity applied to it, which may not be correct. + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, + int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol)))))+1+regData, regTemp) + iMustBeInt = Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, regTemp, 0) + + // If the parent table is the same as the child table, and we are about + // to increment the constraint-counter (i.e. this is an INSERT operation), + // then check if the row being inserted matches itself. If so, do not + // increment the constraint-counter. + if pTab == (*FKey)(unsafe.Pointer(pFKey)).FpFrom && nIncr == 1 { + Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regData, iOk, regTemp) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) + } + + Xsqlite3OpenTable(tls, pParse, iCur, iDb, pTab, OP_OpenRead) + Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iCur, 0, regTemp) + Xsqlite3VdbeGoto(tls, v, iOk) + Xsqlite3VdbeJumpHere(tls, v, Xsqlite3VdbeCurrentAddr(tls, v)-2) + Xsqlite3VdbeJumpHere(tls, v, iMustBeInt) + Xsqlite3ReleaseTempReg(tls, pParse, regTemp) + } else { + var nCol int32 = (*FKey)(unsafe.Pointer(pFKey)).FnCol + var regTemp int32 = Xsqlite3GetTempRange(tls, pParse, nCol) + var regRec int32 = Xsqlite3GetTempReg(tls, pParse) + + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iCur, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) + for i = 0; i < nCol; i++ { + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, + int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)))))+1+regData, + regTemp+i) + } + + // If the parent table is the same as the child table, and we are about + // to increment the constraint-counter (i.e. this is an INSERT operation), + // then check if the row being inserted matches itself. If so, do not + // increment the constraint-counter. + // + // If any of the parent-key values are NULL, then the row cannot match + // itself. So set JUMPIFNULL to make sure we do the OP_Found if any + // of the parent-key values are NULL (at this point it is known that + // none of the child key values are). + if pTab == (*FKey)(unsafe.Pointer(pFKey)).FpFrom && nIncr == 1 { + var iJump int32 = Xsqlite3VdbeCurrentAddr(tls, v) + nCol + 1 + for i = 0; i < nCol; i++ { + var iChild int32 = int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4))))) + + 1 + regData + var iParent int32 = 1 + regData + iParent = iParent + int32(Xsqlite3TableColumnToStorage(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable, + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)))) + + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + // The parent key is a composite key that includes the IPK column + iParent = regData + } + Xsqlite3VdbeAddOp3(tls, v, OP_Ne, iChild, iJump, iParent) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_JUMPIFNULL)) + } + Xsqlite3VdbeGoto(tls, v, iOk) + } + + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTemp, nCol, regRec, + Xsqlite3IndexAffinityStr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIdx), nCol) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iCur, iOk, regRec, 0) + + Xsqlite3ReleaseTempReg(tls, pParse, regRec) + Xsqlite3ReleaseTempRange(tls, pParse, regTemp, nCol) + } + } + + if !(int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) != 0) && !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_DeferFKs) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FpToplevel) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite) != 0) { + // Special case: If this is an INSERT statement that will insert exactly + // one row into the table, raise a constraint immediately instead of + // incrementing a counter. This is necessary as the VM code is being + // generated for will not open a statement transaction. + + Xsqlite3HaltConstraint(tls, pParse, SQLITE_CONSTRAINT|int32(3)<<8, + OE_Abort, uintptr(0), int8(-1), uint8(P5_ConstraintFK)) + } else { + if nIncr > 0 && int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) == 0 { + Xsqlite3MayAbort(tls, pParse) + } + Xsqlite3VdbeAddOp2(tls, v, OP_FkCounter, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), nIncr) + } + + Xsqlite3VdbeResolveLabel(tls, v, iOk) + Xsqlite3VdbeAddOp1(tls, v, OP_Close, iCur) +} + +// Return an Expr object that refers to a memory register corresponding +// to column iCol of table pTab. +// +// regBase is the first of an array of register that contains the data +// for pTab. regBase itself holds the rowid. regBase+1 holds the first +// column. regBase+2 holds the second column, and so forth. +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ + var pExpr uintptr + var pCol uintptr + var zColl uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + pExpr = Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0)) + if pExpr != 0 { + if int32(iCol) >= 0 && int32(iCol) != int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 + (*Expr)(unsafe.Pointer(pExpr)).FiTable = regBase + int32(Xsqlite3TableColumnToStorage(tls, pTab, iCol)) + 1 + (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = (*Column)(unsafe.Pointer(pCol)).Faffinity + zColl = Xsqlite3ColumnColl(tls, pCol) + if zColl == uintptr(0) { + zColl = (*CollSeq)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpDfltColl)).FzName + } + pExpr = Xsqlite3ExprAddCollateString(tls, pParse, pExpr, zColl) + } else { + (*Expr)(unsafe.Pointer(pExpr)).FiTable = regBase + (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER) + } + } + return pExpr +} + +// Return an Expr object that refers to column iCol of table pTab which +// has cursor iCur. +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ + var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) + if pExpr != 0 { + + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab + (*Expr)(unsafe.Pointer(pExpr)).FiTable = iCursor + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = iCol + } + return pExpr +} + +// This function is called to generate code executed when a row is deleted +// from the parent table of foreign key constraint pFKey and, if pFKey is +// deferred, when a row is inserted into the same table. When generating +// code for an SQL UPDATE operation, this function may be called twice - +// once to "delete" the old row and once to "insert" the new row. +// +// Parameter nIncr is passed -1 when inserting a row (as this may decrease +// the number of FK violations in the db) or +1 when deleting one (as this +// may increase the number of FK constraint problems). +// +// The code generated by this function scans through the rows in the child +// table that correspond to the parent table row being deleted or inserted. +// For each child row found, one of the following actions is taken: +// +// Operation | FK type | Action taken +// -------------------------------------------------------------------------- +// DELETE immediate Increment the "immediate constraint counter". +// Or, if the ON (UPDATE|DELETE) action is RESTRICT, +// throw a "FOREIGN KEY constraint failed" exception. +// +// INSERT immediate Decrement the "immediate constraint counter". +// +// DELETE deferred Increment the "deferred constraint counter". +// Or, if the ON (UPDATE|DELETE) action is RESTRICT, +// throw a "FOREIGN KEY constraint failed" exception. +// +// INSERT deferred Decrement the "deferred constraint counter". +// +// These operations are identified in the comment at the top of this file +// (fkey.c) as "I.2" and "D.2". +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var i int32 // Iterator variable + var pWhere uintptr = uintptr(0) // WHERE clause to scan with + // var sNameContext NameContext at bp, 56 + // Context used to resolve WHERE clause + var pWInfo uintptr // Context used by sqlite3WhereXXX() + var iFkIfZero int32 = 0 // Address of OP_FkIfZero + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + + if nIncr < 0 { + iFkIfZero = Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), 0) + + } + + // Create an Expr object representing an SQL expression like: + // + // = AND = ... + // + // The collation sequence used for the comparison should be that of + // the parent key columns. The affinity of the parent key column should + // be applied to each child key value before the comparison takes place. + for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { + var pLeft uintptr // Value from parent table row + var pRight uintptr // Column ref to child table + var pEq uintptr // Expression (pLeft = pRight) + var iCol I16 // Index of column in child table + var zCol uintptr // Name of column in child table + + if pIdx != 0 { + iCol = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) + } else { + iCol = int16(-1) + } + pLeft = exprTableRegister(tls, pParse, pTab, regData, iCol) + if aiCol != 0 { + iCol = int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4))) + } else { + iCol = int16((*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom) + } + + zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol + uintptr(iCol)*24)).FzCnName + pRight = Xsqlite3Expr(tls, db, TK_ID, zCol) + pEq = Xsqlite3PExpr(tls, pParse, TK_EQ, pLeft, pRight) + pWhere = Xsqlite3ExprAnd(tls, pParse, pWhere, pEq) + } + + // If the child table is the same as the parent table, then add terms + // to the WHERE clause that prevent this entry from being scanned. + // The added WHERE clause terms are like this: + // + // $current_rowid!=rowid + // NOT( $current_a==a AND $current_b==b AND ... ) + // + // The first form is used for rowid tables. The second form is used + // for WITHOUT ROWID tables. In the second form, the *parent* key is + // (a,b,...). Either the parent or primary key could be used to + // uniquely identify the current row, but the parent key is more convenient + // as the required values have already been loaded into registers + // by the caller. + if pTab == (*FKey)(unsafe.Pointer(pFKey)).FpFrom && nIncr > 0 { + var pNe uintptr // Expression (pLeft != pRight) + var pLeft uintptr // Value from parent table row + var pRight uintptr // Column ref to child table + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + pLeft = exprTableRegister(tls, pParse, pTab, regData, int16(-1)) + pRight = exprTableColumn(tls, db, pTab, (*SrcItem)(unsafe.Pointer(pSrc+8)).FiCursor, int16(-1)) + pNe = Xsqlite3PExpr(tls, pParse, TK_NE, pLeft, pRight) + } else { + var pEq uintptr + var pAll uintptr = uintptr(0) + + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { + var iCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) + + pLeft = exprTableRegister(tls, pParse, pTab, regData, iCol) + pRight = Xsqlite3Expr(tls, db, TK_ID, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName) + pEq = Xsqlite3PExpr(tls, pParse, TK_IS, pLeft, pRight) + pAll = Xsqlite3ExprAnd(tls, pParse, pAll, pEq) + } + pNe = Xsqlite3PExpr(tls, pParse, TK_NOT, pAll, uintptr(0)) + } + pWhere = Xsqlite3ExprAnd(tls, pParse, pWhere, pNe) + } + + // Resolve the references in the WHERE clause. + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp /* &sNameContext */)).FpSrcList = pSrc + (*NameContext)(unsafe.Pointer(bp /* &sNameContext */)).FpParse = pParse + Xsqlite3ResolveExprNames(tls, bp, pWhere) + + // Create VDBE to loop through the entries in pSrc that match the WHERE + // clause. For each row found, increment either the deferred or immediate + // foreign key constraint counter. + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { + pWInfo = Xsqlite3WhereBegin(tls, pParse, pSrc, pWhere, uintptr(0), uintptr(0), uintptr(0), uint16(0), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_FkCounter, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), nIncr) + if pWInfo != 0 { + Xsqlite3WhereEnd(tls, pWInfo) + } + } + + // Clean up the WHERE clause constructed above. + Xsqlite3ExprDelete(tls, db, pWhere) + if iFkIfZero != 0 { + Xsqlite3VdbeJumpHereOrPopInst(tls, v, iFkIfZero) + } +} + +// This function returns a linked list of FKey objects (connected by +// FKey.pNextTo) holding all children of table pTab. For example, +// given the following schema: +// +// CREATE TABLE t1(a PRIMARY KEY); +// CREATE TABLE t2(b REFERENCES t1(a); +// +// Calling this function with table "t1" as an argument returns a pointer +// to the FKey structure representing the foreign key constraint on table +// "t2". Calling this function with "t2" as the argument would return a +// NULL pointer (as there are no FK constraints for which t2 is the parent +// table). +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ + return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) +} + +// The second argument is a Trigger structure allocated by the +// fkActionTrigger() routine. This function deletes the Trigger structure +// and all of its sub-components. +// +// The Trigger structure or any of its sub-components may be allocated from +// the lookaside buffer belonging to database handle dbMem. +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ + if p != 0 { + var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list + Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) + Xsqlite3ExprListDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) + Xsqlite3SelectDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) + Xsqlite3ExprDelete(tls, dbMem, (*Trigger)(unsafe.Pointer(p)).FpWhen) + Xsqlite3DbFree(tls, dbMem, p) + } +} + +// Clear the apTrigger[] cache of CASCADE triggers for all foreign keys +// in a particular database. This needs to happen when the schema +// changes. +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ + var k uintptr + var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 + for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(k)).Fdata + var pFKey uintptr + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + continue + } + for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { + fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48))) + *(*uintptr)(unsafe.Pointer(pFKey + 48)) = uintptr(0) + fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8))) + *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8)) = uintptr(0) + } + } +} + +// This function is called to generate code that runs when table pTab is +// being dropped from the database. The SrcList passed as the second argument +// to this function contains a single entry guaranteed to resolve to +// table pTab. +// +// Normally, no code is required. However, if either +// +// (a) The table is the parent table of a FK constraint, or +// (b) The table is the child table of a deferred FK constraint and it is +// determined at runtime that there are outstanding deferred FK +// constraint violations in the database, +// +// then the equivalent of "DELETE FROM " is executed before dropping +// the table from the database. Triggers are disabled while running this +// DELETE, but foreign key actions are not. +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { + var iSkip int32 = 0 + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + + // VDBE has already been allocated + + if Xsqlite3FkReferences(tls, pTab) == uintptr(0) { + // Search for a deferred foreign key constraint for which this table + // is the child table. If one cannot be found, return without + // generating any VDBE code. If one can be found, then jump over + // the entire DELETE if there are no outstanding deferred constraints + // when this statement is run. + var p uintptr + for p = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextFrom { + if (*FKey)(unsafe.Pointer(p)).FisDeferred != 0 || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 { + break + } + } + if !(p != 0) { + return + } + iSkip = Xsqlite3VdbeMakeLabel(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, 1, iSkip) + } + + (*Parse)(unsafe.Pointer(pParse)).FdisableTriggers = U8(1) + Xsqlite3DeleteFrom(tls, pParse, Xsqlite3SrcListDup(tls, db, pName, 0), uintptr(0), uintptr(0), uintptr(0)) + (*Parse)(unsafe.Pointer(pParse)).FdisableTriggers = U8(0) + + // If the DELETE has generated immediate foreign key constraint + // violations, halt the VDBE and return an error at this point, before + // any modifications to the schema are made. This is because statement + // transactions are not able to rollback schema changes. + // + // If the SQLITE_DeferFKs flag is set, then this is not required, as + // the statement transaction will not be rolled back even if FK + // constraints are violated. + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) == uint64(0) { + + Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) + + Xsqlite3HaltConstraint(tls, pParse, SQLITE_CONSTRAINT|int32(3)<<8, + OE_Abort, uintptr(0), int8(-1), uint8(P5_ConstraintFK)) + } + + if iSkip != 0 { + Xsqlite3VdbeResolveLabel(tls, v, iSkip) + } + } +} + +// The second argument points to an FKey object representing a foreign key +// for which pTab is the child table. An UPDATE statement against pTab +// is currently being processed. For each column of the table that is +// actually updated, the corresponding element in the aChange[] array +// is zero or greater (if a column is unmodified the corresponding element +// is set to -1). If the rowid column is modified by the UPDATE statement +// the bChngRowid argument is non-zero. +// +// This function returns true if any of the columns that are part of the +// child key for FK constraint *p are modified. +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ + var i int32 + for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { + var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom + if *(*int32)(unsafe.Pointer(aChange + uintptr(iChildKey)*4)) >= 0 { + return 1 + } + if iChildKey == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) && bChngRowid != 0 { + return 1 + } + } + return 0 +} + +// The second argument points to an FKey object representing a foreign key +// for which pTab is the parent table. An UPDATE statement against pTab +// is currently being processed. For each column of the table that is +// actually updated, the corresponding element in the aChange[] array +// is zero or greater (if a column is unmodified the corresponding element +// is set to -1). If the rowid column is modified by the UPDATE statement +// the bChngRowid argument is non-zero. +// +// This function returns true if any of the columns that are part of the +// parent key for FK constraint *p are modified. +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ + var i int32 + for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { + var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol + var iKey int32 + for iKey = 0; iKey < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iKey++ { + if *(*int32)(unsafe.Pointer(aChange + uintptr(iKey)*4)) >= 0 || iKey == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) && bChngRowid != 0 { + var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iKey)*24 + if zKey != 0 { + if 0 == Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zKey) { + return 1 + } + } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { + return 1 + } + } + } + } + return 0 +} + +// Return true if the parser passed as the first argument is being +// used to code a trigger that is really a "SET NULL" action belonging +// to trigger pFKey. +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ + var pTop uintptr = func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }() + if (*Parse)(unsafe.Pointer(pTop)).FpTriggerPrg != 0 { + var p uintptr = (*TriggerPrg)(unsafe.Pointer((*Parse)(unsafe.Pointer(pTop)).FpTriggerPrg)).FpTrigger + if p == *(*uintptr)(unsafe.Pointer(pFKey + 48)) && int32(*(*U8)(unsafe.Pointer(pFKey + 45))) == OE_SetNull || + p == *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8)) && int32(*(*U8)(unsafe.Pointer(pFKey + 45 + 1))) == OE_SetNull { + return 1 + } + } + return 0 +} + +// This function is called when inserting, deleting or updating a row of +// table pTab to generate VDBE code to perform foreign key constraint +// processing for the operation. +// +// For a DELETE operation, parameter regOld is passed the index of the +// first register in an array of (pTab->nCol+1) registers containing the +// rowid of the row being deleted, followed by each of the column values +// of the row being deleted, from left to right. Parameter regNew is passed +// zero in this case. +// +// For an INSERT operation, regOld is passed zero and regNew is passed the +// first register of an array of (pTab->nCol+1) registers containing the new +// row data. +// +// For an UPDATE operation, this function is called twice. Once before +// the original record is deleted from the table using the calling convention +// described for DELETE. Then again after the original record is deleted +// but before the new record is inserted using the INSERT convention. +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var pFKey uintptr // Used to iterate through FKs + var iDb int32 // Index of database containing pTab + var zDb uintptr // Name of database containing pTab + var isIgnoreErrors int32 = int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) + + // Exactly one of regOld and regNew should be non-zero. + + // If foreign-keys are disabled, this function is a no-op. + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) == uint64(0) { + return + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + return + } + + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + + // Loop through all the foreign key constraints for which pTab is the + // child table (the table that the foreign key definition is part of). + for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { + var pTo uintptr // Parent table of foreign key pFKey + *(*uintptr)(unsafe.Pointer(bp /* pIdx */)) = uintptr(0) // Index on key columns in pTo + *(*uintptr)(unsafe.Pointer(bp + 8 /* aiFree */)) = uintptr(0) + var aiCol uintptr + // var iCol int32 at bp+16, 4 + + var i int32 + var bIgnore int32 = 0 + + if aChange != 0 && + Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo) != 0 && + fkChildIsModified(tls, pTab, pFKey, aChange, bChngRowid) == 0 { + continue + } + + // Find the parent table of this foreign key. Also find a unique index + // on the parent key columns in the parent table. If either of these + // schema items cannot be located, set an error in pParse and return + // early. + if (*Parse)(unsafe.Pointer(pParse)).FdisableTriggers != 0 { + pTo = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zDb) + } else { + pTo = Xsqlite3LocateTable(tls, pParse, uint32(0), (*FKey)(unsafe.Pointer(pFKey)).FzTo, zDb) + } + if !(pTo != 0) || Xsqlite3FkLocateIndex(tls, pParse, pTo, pFKey, bp, bp+8) != 0 { + + if !(isIgnoreErrors != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return + } + if pTo == uintptr(0) { + // If isIgnoreErrors is true, then a table is being dropped. In this + // case SQLite runs a "DELETE FROM xxx" on the table being dropped + // before actually dropping it in order to check FK constraints. + // If the parent table of an FK constraint on the current table is + // missing, behave as if it is empty. i.e. decrement the relevant + // FK counter for each row of the current table with non-NULL keys. + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var iJump int32 = Xsqlite3VdbeCurrentAddr(tls, v) + (*FKey)(unsafe.Pointer(pFKey)).FnCol + 1 + for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { + var iFromCol int32 + var iReg int32 + iFromCol = (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FiFrom + iReg = int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(iFromCol))) + regOld + 1 + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, iReg, iJump) + } + Xsqlite3VdbeAddOp2(tls, v, OP_FkCounter, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), -1) + } + continue + } + + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + aiCol = *(*uintptr)(unsafe.Pointer(bp + 8 /* aiFree */)) + } else { + *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) = (*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom + aiCol = bp + 16 /* &iCol */ + } + for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { + if *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) = -1 + } + + // Request permission to read the parent key columns. If the + // authorization callback returns SQLITE_IGNORE, behave as if any + // values read from the parent table are NULL. + if (*Sqlite3)(unsafe.Pointer(db)).FxAuth != 0 { + var rcauth int32 + var zCol uintptr = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTo)).FaCol + uintptr(func() int32 { + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + return int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FaiColumn + uintptr(i)*2))) + } + return int32((*Table)(unsafe.Pointer(pTo)).FiPKey) + }())*24)).FzCnName + rcauth = Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTo)).FzName, zCol, iDb) + bIgnore = libc.Bool32(rcauth == SQLITE_IGNORE) + } + } + + // Take a shared-cache advisory read-lock on the parent table. Allocate + // a cursor to use to search the unique index on the parent key columns + // in the parent table. + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTo)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTo)).FzName) + (*Parse)(unsafe.Pointer(pParse)).FnTab++ + + if regOld != 0 { + // A row is being removed from the child table. Search for the parent. + // If the parent does not exist, removing the child row resolves an + // outstanding foreign key constraint violation. + fkLookupParent(tls, pParse, iDb, pTo, *(*uintptr)(unsafe.Pointer(bp /* pIdx */)), pFKey, aiCol, regOld, -1, bIgnore) + } + if regNew != 0 && !(isSetNullAction(tls, pParse, pFKey) != 0) { + // A row is being added to the child table. If a parent row cannot + // be found, adding the child row has violated the FK constraint. + // + // If this operation is being performed as part of a trigger program + // that is actually a "SET NULL" action belonging to this very + // foreign key, then omit this scan altogether. As all child key + // values are guaranteed to be NULL, it is not possible for adding + // this row to cause an FK violation. + fkLookupParent(tls, pParse, iDb, pTo, *(*uintptr)(unsafe.Pointer(bp /* pIdx */)), pFKey, aiCol, regNew, +1, bIgnore) + } + + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* aiFree */))) + } + + // Loop through all the foreign key constraints that refer to this table. + // (the "child" constraints) + for pFKey = Xsqlite3FkReferences(tls, pTab); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pIdx */)) = uintptr(0) // Foreign key index for pFKey + var pSrc uintptr + *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */)) = uintptr(0) + + if aChange != 0 && fkParentIsModified(tls, pTab, pFKey, aChange, bChngRowid) == 0 { + continue + } + + if !(int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) != 0) && !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FpToplevel) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite) != 0) { + + // Inserting a single row into a parent table cannot cause (or fix) + // an immediate foreign key violation. So do nothing in this case. + continue + } + + if Xsqlite3FkLocateIndex(tls, pParse, pTab, pFKey, bp+24, bp+32) != 0 { + if !(isIgnoreErrors != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return + } + continue + } + + // Create a SrcList structure containing the child table. We need the + // child table as a SrcList for sqlite3WhereBegin() + pSrc = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0)) + if pSrc != 0 { + var pItem uintptr = pSrc + 8 /* &.a */ + (*SrcItem)(unsafe.Pointer(pItem)).FpTab = (*FKey)(unsafe.Pointer(pFKey)).FpFrom + (*SrcItem)(unsafe.Pointer(pItem)).FzName = (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName + (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FnTabRef++ + (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + + if regNew != 0 { + fkScanChildren(tls, pParse, pSrc, pTab, *(*uintptr)(unsafe.Pointer(bp + 24 /* pIdx */)), pFKey, *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */)), regNew, -1) + } + if regOld != 0 { + var eAction int32 = int32(*(*U8)(unsafe.Pointer(pFKey + 45 + uintptr(libc.Bool32(aChange != uintptr(0)))))) + fkScanChildren(tls, pParse, pSrc, pTab, *(*uintptr)(unsafe.Pointer(bp + 24 /* pIdx */)), pFKey, *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */)), regOld, 1) + // If this is a deferred FK constraint, or a CASCADE or SET NULL + // action applies, then any foreign key violations caused by + // removing the parent key will be rectified by the action trigger. + // So do not set the "may-abort" flag in this case. + // + // Note 1: If the FK is declared "ON UPDATE CASCADE", then the + // may-abort flag will eventually be set on this statement anyway + // (when this function is called as part of processing the UPDATE + // within the action trigger). + // + // Note 2: At first glance it may seem like SQLite could simply omit + // all OP_FkCounter related scans when either CASCADE or SET NULL + // applies. The trouble starts if the CASCADE or SET NULL action + // trigger causes other triggers or action rules attached to the + // child table to fire. In these cases the fk constraint counters + // might be set incorrectly if any OP_FkCounter related scans are + // omitted. + if !(int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) != 0) && eAction != OE_Cascade && eAction != OE_SetNull { + Xsqlite3MayAbort(tls, pParse) + } + } + (*SrcItem)(unsafe.Pointer(pItem)).FzName = uintptr(0) + Xsqlite3SrcListDelete(tls, db, pSrc) + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */))) + } +} + +// This function is called before generating code to update or delete a +// row contained in table pTab. +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var mask U32 = U32(0) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { + var p uintptr + var i int32 + for p = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextFrom { + for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { + mask = mask | func() uint32 { + if (*sColMap)(unsafe.Pointer(p+64+uintptr(i)*16)).FiFrom > 31 { + return 0xffffffff + } + return U32(U32(1)) << (*sColMap)(unsafe.Pointer(p+64+uintptr(i)*16)).FiFrom + }() + } + } + for p = Xsqlite3FkReferences(tls, pTab); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextTo { + *(*uintptr)(unsafe.Pointer(bp /* pIdx */)) = uintptr(0) + Xsqlite3FkLocateIndex(tls, pParse, pTab, p, bp, uintptr(0)) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + for i = 0; i < int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FnKeyCol); i++ { + + mask = mask | func() uint32 { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaiColumn + uintptr(i)*2))) > 31 { + return 0xffffffff + } + return U32(U32(1)) << int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaiColumn + uintptr(i)*2))) + }() + } + } + } + } + return mask +} + +// This function is called before generating code to update or delete a +// row contained in table pTab. If the operation is a DELETE, then +// parameter aChange is passed a NULL value. For an UPDATE, aChange points +// to an array of size N, where N is the number of columns in table pTab. +// If the i'th column is not modified by the UPDATE, then the corresponding +// entry in the aChange[] array is set to -1. If the column is modified, +// the value is 0 or greater. Parameter chngRowid is set to true if the +// UPDATE statement modifies the rowid fields of the table. +// +// If any foreign key processing will be required, this function returns +// non-zero. If there is no foreign key related processing, this function +// returns zero. +// +// For an UPDATE, this function returns 2 if: +// +// * There are any FKs for which pTab is the child and the parent table +// and any FK processing at all is required (even of a different FK), or +// +// * the UPDATE modifies one or more parent keys for which the action is +// not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). +// +// Or, assuming some other foreign key processing is required, 1. +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ + var eRet int32 = 1 // Value to return if bHaveFK is true + var bHaveFK int32 = 0 // If FK processing is required + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { + if !(aChange != 0) { + // A DELETE operation. Foreign key processing is required if the + // table in question is either the child or parent table for any + // foreign key constraint. + bHaveFK = libc.Bool32(Xsqlite3FkReferences(tls, pTab) != 0 || *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)) != 0) + } else { + // This is an UPDATE. Foreign key processing is only required if the + // operation modifies one or more child or parent key columns. + var p uintptr + + // Check if any child key columns are being modified. + for p = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextFrom { + if fkChildIsModified(tls, pTab, p, aChange, chngRowid) != 0 { + if 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, (*FKey)(unsafe.Pointer(p)).FzTo) { + eRet = 2 + } + bHaveFK = 1 + } + } + + // Check if any parent key columns are being modified. + for p = Xsqlite3FkReferences(tls, pTab); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextTo { + if fkParentIsModified(tls, pTab, p, aChange, chngRowid) != 0 { + if int32(*(*U8)(unsafe.Pointer(p + 45 + 1))) != OE_None { + return 2 + } + bHaveFK = 1 + } + } + } + } + if bHaveFK != 0 { + return eRet + } + return 0 +} + +// This function is called when an UPDATE or DELETE operation is being +// compiled on table pTab, which is the parent table of foreign-key pFKey. +// If the current operation is an UPDATE, then the pChanges parameter is +// passed a pointer to the list of columns being modified. If it is a +// DELETE, pChanges is passed a NULL pointer. +// +// It returns a pointer to a Trigger structure containing a trigger +// equivalent to the ON UPDATE or ON DELETE action specified by pFKey. +// If the action is "NO ACTION" or "RESTRICT", then a NULL pointer is +// returned (these actions require no special handling by the triggers +// sub-system, code for them is created by fkScanChildren()). +// +// For example, if pFKey is the foreign key and pTab is table "p" in +// the following schema: +// +// CREATE TABLE p(pk PRIMARY KEY); +// CREATE TABLE c(ck REFERENCES p ON DELETE CASCADE); +// +// then the returned trigger structure is equivalent to: +// +// CREATE TRIGGER ... DELETE ON p BEGIN +// DELETE FROM c WHERE ck = old.pk; +// END; +// +// The returned pointer is cached as part of the foreign key object. It +// is eventually freed along with the rest of the foreign key object by +// sqlite3FkDelete(). +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var action int32 // One of OE_None, OE_Cascade etc. + var pTrigger uintptr // Trigger definition to return + var iAction int32 = libc.Bool32(pChanges != uintptr(0)) // 1 for UPDATE, 0 for DELETE + + action = int32(*(*U8)(unsafe.Pointer(pFKey + 45 + uintptr(iAction)))) + if action == OE_Restrict && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 { + return uintptr(0) + } + pTrigger = *(*uintptr)(unsafe.Pointer(pFKey + 48 + uintptr(iAction)*8)) + + if action != OE_None && !(pTrigger != 0) { + var zFrom uintptr // Name of child table + var nFrom int32 // Length in bytes of zFrom + *(*uintptr)(unsafe.Pointer(bp /* pIdx */)) = uintptr(0) // Parent key index for this FK + *(*uintptr)(unsafe.Pointer(bp + 8 /* aiCol */)) = uintptr(0) // child table cols -> parent key cols + var pStep uintptr = uintptr(0) // First (only) step of trigger program + var pWhere uintptr = uintptr(0) // WHERE clause of trigger step + var pList uintptr = uintptr(0) // Changes list if ON UPDATE CASCADE + var pSelect uintptr = uintptr(0) // If RESTRICT, "SELECT RAISE(...)" + var i int32 // Iterator variable + var pWhen uintptr = uintptr(0) // WHEN clause for the trigger + + if Xsqlite3FkLocateIndex(tls, pParse, pTab, pFKey, bp, bp+8) != 0 { + return uintptr(0) + } + + for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { + *(*Token)(unsafe.Pointer(bp + 48 /* tOld */)) = Token{Fz: ts + 6334, Fn: uint32(3)} // Literal "old" token + *(*Token)(unsafe.Pointer(bp + 64 /* tNew */)) = Token{Fz: ts + 6330, Fn: uint32(3)} // Literal "new" token + // var tFromCol Token at bp+32, 16 + // Name of column in child table + // var tToCol Token at bp+16, 16 + // Name of column in parent table + var iFromCol int32 // Idx of column in child table + var pEq uintptr // tFromCol = OLD.tToCol + + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + iFromCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* aiCol */)) + uintptr(i)*4)) + } else { + iFromCol = (*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom + } + + Xsqlite3TokenInit(tls, bp+16, + (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(func() int32 { + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + return int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FaiColumn + uintptr(i)*2))) + } + return int32((*Table)(unsafe.Pointer(pTab)).FiPKey) + }())*24)).FzCnName) + Xsqlite3TokenInit(tls, bp+32, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol+uintptr(iFromCol)*24)).FzCnName) + + // Create the expression "OLD.zToCol = zFromCol". It is important + // that the "OLD.zToCol" term is on the LHS of the = operator, so + // that the affinity and collation sequence associated with the + // parent table are used for the comparison. + pEq = Xsqlite3PExpr(tls, pParse, TK_EQ, + Xsqlite3PExpr(tls, pParse, TK_DOT, + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+48, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0)), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+32, 0)) + pWhere = Xsqlite3ExprAnd(tls, pParse, pWhere, pEq) + + // For ON UPDATE, construct the next term of the WHEN clause. + // The final WHEN clause will be like this: + // + // WHEN NOT(old.col1 IS new.col1 AND ... AND old.colN IS new.colN) + if pChanges != 0 { + pEq = Xsqlite3PExpr(tls, pParse, TK_IS, + Xsqlite3PExpr(tls, pParse, TK_DOT, + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+48, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0)), + Xsqlite3PExpr(tls, pParse, TK_DOT, + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+64, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0))) + pWhen = Xsqlite3ExprAnd(tls, pParse, pWhen, pEq) + } + + if action != OE_Restrict && (action != OE_Cascade || pChanges != 0) { + var pNew uintptr + if action == OE_Cascade { + pNew = Xsqlite3PExpr(tls, pParse, TK_DOT, + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+64, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0)) + } else if action == OE_SetDflt { + var pCol uintptr = (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol + uintptr(iFromCol)*24 + var pDflt uintptr + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { + + pDflt = uintptr(0) + } else { + pDflt = Xsqlite3ColumnExpr(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, pCol) + } + if pDflt != 0 { + pNew = Xsqlite3ExprDup(tls, db, pDflt, 0) + } else { + pNew = Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0) + } + } else { + pNew = Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0) + } + pList = Xsqlite3ExprListAppend(tls, pParse, pList, pNew) + Xsqlite3ExprListSetName(tls, pParse, pList, bp+32, 0) + } + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* aiCol */))) + + zFrom = (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName + nFrom = Xsqlite3Strlen30(tls, zFrom) + + if action == OE_Restrict { + // var tFrom Token at bp+80, 16 + + var pRaise uintptr + + (*Token)(unsafe.Pointer(bp + 80 /* &tFrom */)).Fz = zFrom + (*Token)(unsafe.Pointer(bp + 80 /* &tFrom */)).Fn = uint32(nFrom) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5078) + if pRaise != 0 { + (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) + } + pSelect = Xsqlite3SelectNew(tls, pParse, + Xsqlite3ExprListAppend(tls, pParse, uintptr(0), pRaise), + Xsqlite3SrcListAppend(tls, pParse, uintptr(0), bp+80, uintptr(0)), + pWhere, + uintptr(0), uintptr(0), uintptr(0), uint32(0), uintptr(0)) + pWhere = uintptr(0) + } + + // Disable lookaside memory allocation + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) + + pTrigger = Xsqlite3DbMallocZero(tls, db, + uint64(uint64(unsafe.Sizeof(Trigger{}))+uint64(unsafe.Sizeof(TriggerStep{}))+uint64(nFrom)+uint64(1))) + if pTrigger != 0 { + pStep = libc.AssignPtrUintptr(pTrigger+56, pTrigger+1*72) + (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget = pStep + 1*96 + libc.Xmemcpy(tls, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zFrom, uint64(nFrom)) + + (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere = Xsqlite3ExprDup(tls, db, pWhere, EXPRDUP_REDUCE) + (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList = Xsqlite3ExprListDup(tls, db, pList, EXPRDUP_REDUCE) + (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect = Xsqlite3SelectDup(tls, db, pSelect, EXPRDUP_REDUCE) + if pWhen != 0 { + pWhen = Xsqlite3PExpr(tls, pParse, TK_NOT, pWhen, uintptr(0)) + (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen = Xsqlite3ExprDup(tls, db, pWhen, EXPRDUP_REDUCE) + } + } + + // Re-enable the lookaside buffer, if it was disabled earlier. + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { + if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { + return uint16(0) + } + return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue + }() + + Xsqlite3ExprDelete(tls, db, pWhere) + Xsqlite3ExprDelete(tls, db, pWhen) + Xsqlite3ExprListDelete(tls, db, pList) + Xsqlite3SelectDelete(tls, db, pSelect) + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 1 { + fkTriggerDelete(tls, db, pTrigger) + return uintptr(0) + } + + switch action { + case OE_Restrict: + (*TriggerStep)(unsafe.Pointer(pStep)).Fop = U8(TK_SELECT) + break + fallthrough + case OE_Cascade: + if !(pChanges != 0) { + (*TriggerStep)(unsafe.Pointer(pStep)).Fop = U8(TK_DELETE) + break + } + fallthrough + default: + (*TriggerStep)(unsafe.Pointer(pStep)).Fop = U8(TK_UPDATE) + } + (*TriggerStep)(unsafe.Pointer(pStep)).FpTrig = pTrigger + (*Trigger)(unsafe.Pointer(pTrigger)).FpSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema + (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema + *(*uintptr)(unsafe.Pointer(pFKey + 48 + uintptr(iAction)*8)) = pTrigger + (*Trigger)(unsafe.Pointer(pTrigger)).Fop = func() uint8 { + if pChanges != 0 { + return uint8(TK_UPDATE) + } + return uint8(TK_DELETE) + }() + } + + return pTrigger +} + +// This function is called when deleting or updating a row to implement +// any required CASCADE, SET NULL or SET DEFAULT actions. +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ + // If foreign-key support is enabled, iterate through all FKs that + // refer to table pTab. If there is an action associated with the FK + // for this operation (either update or delete), invoke the associated + // trigger sub-program. + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 { + var pFKey uintptr // Iterator variable + for pFKey = Xsqlite3FkReferences(tls, pTab); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo { + if aChange == uintptr(0) || fkParentIsModified(tls, pTab, pFKey, aChange, bChngRowid) != 0 { + var pAct uintptr = fkActionTrigger(tls, pParse, pTab, pFKey, pChanges) + if pAct != 0 { + Xsqlite3CodeRowTriggerDirect(tls, pParse, pAct, pTab, regOld, OE_Abort, 0) + } + } + } + } +} + +// Free all memory associated with foreign key definitions attached to +// table pTab. Remove the deleted foreign keys from the Schema.fkeyHash +// hash table. +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ + var pFKey uintptr // Iterator variable + var pNext uintptr // Copy of pFKey->pNextFrom + + for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = pNext { + + // Remove the FK from the fkeyHash hash table. + if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*FKey)(unsafe.Pointer(pFKey)).FpPrevTo != 0 { + (*FKey)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpPrevTo)).FpNextTo = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo + } else { + var p uintptr = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo + var z uintptr = func() uintptr { + if p != 0 { + return (*FKey)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpNextTo)).FzTo + } + return (*FKey)(unsafe.Pointer(pFKey)).FzTo + }() + Xsqlite3HashInsert(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, z, p) + } + if (*FKey)(unsafe.Pointer(pFKey)).FpNextTo != 0 { + (*FKey)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpNextTo)).FpPrevTo = (*FKey)(unsafe.Pointer(pFKey)).FpPrevTo + } + } + + // EV: R-30323-21917 Each foreign key constraint in SQLite is + // classified as either immediate or deferred. + + // Delete any triggers created to implement actions for this FK. + fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48))) + fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8))) + + pNext = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom + Xsqlite3DbFree(tls, db, pFKey) + } +} + +//************* End of fkey.c *********************************************** +//************* Begin file insert.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains C code routines that are called by the parser +// to handle INSERT statements in SQLite. +// #include "sqliteInt.h" + +// Generate code that will +// +// (1) acquire a lock for table pTab then +// (2) open pTab as cursor iCur. +// +// If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index +// for that table that is actually opened. +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ + var v uintptr + + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, + func() uint8 { + if opcode == OP_OpenWrite { + return uint8(1) + } + return uint8(0) + }(), (*Table)(unsafe.Pointer(pTab)).FzName) + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + Xsqlite3VdbeAddOp4Int(tls, v, opcode, iCur, int32((*Table)(unsafe.Pointer(pTab)).Ftnum), iDb, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)) + + } else { + var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) + + Xsqlite3VdbeAddOp3(tls, v, opcode, iCur, int32((*Index)(unsafe.Pointer(pPk)).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) + + } +} + +// Return a pointer to the column affinity string associated with index +// pIdx. A column affinity string has one character for each column in +// the table, according to the affinity of the column: +// +// Character Column affinity +// ------------------------------ +// 'A' BLOB +// 'B' TEXT +// 'C' NUMERIC +// 'D' INTEGER +// 'F' REAL +// +// An extra 'D' is appended to the end of the string to cover the +// rowid that appears as the last column in every index. +// +// Memory for the buffer containing the column index affinity string +// is managed along with the rest of the Index structure. It will be +// released when sqlite3DeleteIndex() is called. +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ + if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { + // The first time a column affinity string for a particular index is + // required, it is allocated and populated here. It is then stored as + // a member of the Index structure for subsequent use. + // + // The column affinity string will eventually be deleted by + // sqliteDeleteIndex() when the Index structure itself is cleaned + // up. + var n int32 + var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable + (*Index)(unsafe.Pointer(pIdx)).FzColAff = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)+1)) + if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { + Xsqlite3OomFault(tls, db) + return uintptr(0) + } + for n = 0; n < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); n++ { + var x I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(n)*2)) + var aff uint8 + if int32(x) >= 0 { + aff = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(x)*24)).Faffinity + } else if int32(x) == -1 { + aff = uint8(SQLITE_AFF_INTEGER) + } else { + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(n)*32)).FpExpr) + } + if int32(aff) < SQLITE_AFF_BLOB { + aff = uint8(SQLITE_AFF_BLOB) + } + if int32(aff) > SQLITE_AFF_NUMERIC { + aff = uint8(SQLITE_AFF_NUMERIC) + } + *(*uint8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = aff + } + *(*uint8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = uint8(0) + } + + return (*Index)(unsafe.Pointer(pIdx)).FzColAff +} + +// Make changes to the evolving bytecode to do affinity transformations +// of values that are about to be gathered into a row for table pTab. +// +// For ordinary (legacy, non-strict) tables: +// ----------------------------------------- +// +// Compute the affinity string for table pTab, if it has not already been +// computed. As an optimization, omit trailing SQLITE_AFF_BLOB affinities. +// +// If the affinity string is empty (because it was all SQLITE_AFF_BLOB entries +// which were then optimized out) then this routine becomes a no-op. +// +// Otherwise if iReg>0 then code an OP_Affinity opcode that will set the +// affinities for register iReg and following. Or if iReg==0, +// then just set the P4 operand of the previous opcode (which should be +// an OP_MakeRecord) to the affinity string. +// +// A column affinity string has one character per column: +// +// Character Column affinity +// --------- --------------- +// 'A' BLOB +// 'B' TEXT +// 'C' NUMERIC +// 'D' INTEGER +// 'E' REAL +// +// For STRICT tables: +// ------------------ +// +// Generate an appropropriate OP_TypeCheck opcode that will verify the +// datatypes against the column definitions in pTab. If iReg==0, that +// means an OP_MakeRecord opcode has already been generated and should be +// the last opcode generated. The new OP_TypeCheck needs to be inserted +// before the OP_MakeRecord. The new OP_TypeCheck should use the same +// register set as the OP_MakeRecord. If iReg>0 then register iReg is +// the first of a series of registers that will form the new record. +// Apply the type checking to that array of registers. +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ + var i int32 + var j int32 + var zColAff uintptr + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { + if iReg == 0 { + // Move the previous opcode (which should be OP_MakeRecord) forward + // by one slot and insert a new OP_TypeCheck where the current + // OP_MakeRecord is found + var pPrev uintptr + Xsqlite3VdbeAppendP4(tls, v, pTab, -6) + pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + + (*VdbeOp)(unsafe.Pointer(pPrev)).Fopcode = U8(OP_TypeCheck) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp1, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp2, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp3) + } else { + // Insert an isolated OP_Typecheck + Xsqlite3VdbeAddOp2(tls, v, OP_TypeCheck, iReg, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)) + Xsqlite3VdbeAppendP4(tls, v, pTab, -6) + } + return + } + zColAff = (*Table)(unsafe.Pointer(pTab)).FzColAff + if zColAff == uintptr(0) { + var db uintptr = Xsqlite3VdbeDb(tls, v) + zColAff = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if !(zColAff != 0) { + Xsqlite3OomFault(tls, db) + return + } + + for i = libc.AssignInt32(&j, 0); i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24)).Faffinity + } + } + for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*uint8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = uint8(0) + } + (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff + } + + i = int32(libc.Xstrlen(tls, zColAff) & uint64(0x3fffffff)) + if i != 0 { + if iReg != 0 { + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, i, 0, zColAff, i) + } else { + + Xsqlite3VdbeChangeP4(tls, v, -1, zColAff, i) + } + } +} + +// Return non-zero if the table pTab in database iDb or any of its indices +// have been opened at any point in the VDBE program. This is used to see if +// a statement of the form "INSERT INTO SELECT ..." can +// run without using a temporary table for the results of the SELECT. +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ + var v uintptr = Xsqlite3GetVdbe(tls, p) + var i int32 + var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) + var pVTab uintptr + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + pVTab = Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(p)).Fdb, pTab) + } else { + pVTab = uintptr(0) + } + + for i = 1; i < iEnd; i++ { + var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, i) + + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenRead && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDb { + var pIndex uintptr + var tnum Pgno = Pgno((*VdbeOp)(unsafe.Pointer(pOp)).Fp2) + if tnum == (*Table)(unsafe.Pointer(pTab)).Ftnum { + return 1 + } + for pIndex = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIndex != 0; pIndex = (*Index)(unsafe.Pointer(pIndex)).FpNext { + if tnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum { + return 1 + } + } + } + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_VOpen && *(*uintptr)(unsafe.Pointer(pOp + 16)) == pVTab { + + return 1 + } + } + return 0 +} + +// This walker callback will compute the union of colFlags flags for all +// referenced columns in a CHECK constraint or generated column expression. +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { + + *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) + } + return WRC_Continue +} + +// All regular columns for table pTab have been puts into registers +// starting with iRegStore. The registers that correspond to STORED +// or VIRTUAL columns have not yet been initialized. This routine goes +// back and computes the values for those columns based on the previously +// computed normal columns. +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var i int32 + // var w Walker at bp+8, 48 + + var pRedo uintptr + var eProgress int32 + var pOp uintptr + + // Before computing generated columns, first go through and make sure + // that appropriate affinity has been applied to the regular columns + Xsqlite3TableAffinity(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iRegStore) + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStored) != U32(0) { + pOp = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, -1) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { + // Change the OP_Affinity argument to '@' (NONE) for all stored + // columns. '@' is the no-op affinity and those columns have not + // yet been computed. + var ii int32 + var jj int32 + var zP4 uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) + + for ii = libc.AssignInt32(&jj, 0); *(*uint8)(unsafe.Pointer(zP4 + uintptr(jj))) != 0; ii++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(ii)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + continue + } + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(ii)*24)).FcolFlags)&COLFLAG_STORED != 0 { + *(*uint8)(unsafe.Pointer(zP4 + uintptr(jj))) = uint8(SQLITE_AFF_NONE) + } + jj++ + } + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_TypeCheck { + // If an OP_TypeCheck was generated because the table is STRICT, + // then set the P3 operand to indicate that generated columns should + // not be checked + (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 = 1 + } + } + + // Because there can be multiple generated columns that refer to one another, + // this is a two-pass algorithm. On the first pass, mark all generated + // columns as "not available". + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_GENERATED != 0 { + + *(*U16)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + 16)) |= U16(COLFLAG_NOTAVAIL) + } + } + + *(*uintptr)(unsafe.Pointer(bp + 8 + 40)) = pTab + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{exprColumnFlagUnion})) + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxSelectCallback = uintptr(0) + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxSelectCallback2 = uintptr(0) + + // On the second pass, compute the value of each NOT-AVAILABLE column. + // Companion code in the TK_COLUMN case of sqlite3ExprCodeTarget() will + // compute dependencies and mark remove the COLSPAN_NOTAVAIL mark, as + // they are needed. + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -iRegStore + for __ccgo := true; __ccgo; __ccgo = pRedo != 0 && eProgress != 0 { + eProgress = 0 + pRedo = uintptr(0) + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_NOTAVAIL != 0 { + var x int32 + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_BUSY) + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FeCode = U16(0) + Xsqlite3WalkExpr(tls, bp+8, Xsqlite3ColumnExpr(tls, pTab, pCol)) + *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY)) + if int32((*Walker)(unsafe.Pointer(bp+8)).FeCode)&COLFLAG_NOTAVAIL != 0 { + pRedo = pCol + continue + } + eProgress = 1 + + x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(i))) + iRegStore + Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab, pCol, x) + *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_NOTAVAIL)) + } + } + } + if pRedo != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+7848, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + } + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 +} + +// Locate or create an AutoincInfo structure associated with table pTab +// which is in database iDb. Return the register number for the register +// that holds the maximum rowid. Return zero if pTab is not an AUTOINCREMENT +// table. (Also return zero when doing a VACUUM since we do not want to +// update the AUTOINCREMENT counters during a VACUUM.) +// +// There is at most one AutoincInfo structure per table even if the +// same table is autoincremented multiple times due to inserts within +// triggers. A new AutoincInfo structure is created if this is the +// first use of table pTab. On 2nd and subsequent uses, the original +// AutoincInfo structure is used. +// +// Four consecutive registers are allocated: +// +// (1) The name of the pTab table. +// (2) The maximum ROWID of pTab. +// (3) The rowid in sqlite_sequence of pTab +// (4) The original value of the max ROWID in pTab, or NULL if none +// +// The 2nd register is the one that is returned. That is all the +// insert routine needs to know about. +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ + var memId int32 = 0 // Register holding maximum rowid + + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { + var pToplevel uintptr = func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }() + var pInfo uintptr + var pSeqTab uintptr = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FpSchema)).FpSeqTab + + // Verify that the sqlite_sequence table exists and is an ordinary + // rowid table with exactly two columns. + // Ticket d8dc2b3a58cd5dc2918a1d4acb 2018-05-23 + if pSeqTab == uintptr(0) || + !((*Table)(unsafe.Pointer(pSeqTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) || + int32((*Table)(unsafe.Pointer(pSeqTab)).FeTabType) == TABTYP_VTAB || + int32((*Table)(unsafe.Pointer(pSeqTab)).FnCol) != 2 { + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_CORRUPT | int32(2)<<8 + return 0 + } + + pInfo = (*Parse)(unsafe.Pointer(pToplevel)).FpAinc + for pInfo != 0 && (*AutoincInfo)(unsafe.Pointer(pInfo)).FpTab != pTab { + pInfo = (*AutoincInfo)(unsafe.Pointer(pInfo)).FpNext + } + if pInfo == uintptr(0) { + pInfo = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(AutoincInfo{}))) + Xsqlite3ParserAddCleanup(tls, pToplevel, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3DbFree})), pInfo) + + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + return 0 + } + (*AutoincInfo)(unsafe.Pointer(pInfo)).FpNext = (*Parse)(unsafe.Pointer(pToplevel)).FpAinc + (*Parse)(unsafe.Pointer(pToplevel)).FpAinc = pInfo + (*AutoincInfo)(unsafe.Pointer(pInfo)).FpTab = pTab + (*AutoincInfo)(unsafe.Pointer(pInfo)).FiDb = iDb + (*Parse)(unsafe.Pointer(pToplevel)).FnMem++ // Register to hold name of table + (*AutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pToplevel)).FnMem, 1) // Max rowid register + *(*int32)(unsafe.Pointer(pToplevel + 56)) += 2 // Rowid in sqlite_sequence + orig max val + } + memId = (*AutoincInfo)(unsafe.Pointer(pInfo)).FregCtr + } + return memId +} + +// This routine generates code that will initialize all of the +// register used by the autoincrement tracker. +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ + var p uintptr // Information about an AUTOINCREMENT + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + var pDb uintptr // Database only autoinc table + var memId int32 // Register holding max rowid + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // VDBE under construction + + // This routine is never called during trigger-generation. It is + // only called from the top-level + + // We failed long ago if this is not so + for p = (*Parse)(unsafe.Pointer(pParse)).FpAinc; p != 0; p = (*AutoincInfo)(unsafe.Pointer(p)).FpNext { + var aOp uintptr + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*AutoincInfo)(unsafe.Pointer(p)).FiDb)*32 + memId = (*AutoincInfo)(unsafe.Pointer(p)).FregCtr + + Xsqlite3OpenTable(tls, pParse, 0, (*AutoincInfo)(unsafe.Pointer(p)).FiDb, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab, OP_OpenRead) + Xsqlite3VdbeLoadString(tls, v, memId-1, (*Table)(unsafe.Pointer((*AutoincInfo)(unsafe.Pointer(p)).FpTab)).FzName) + aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(autoInc))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&autoInc)), iLn1) + if aOp == uintptr(0) { + break + } + (*VdbeOp)(unsafe.Pointer(aOp)).Fp2 = memId + (*VdbeOp)(unsafe.Pointer(aOp)).Fp3 = memId + 2 + (*VdbeOp)(unsafe.Pointer(aOp + 2*24)).Fp3 = memId + (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp1 = memId - 1 + (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp3 = memId + (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp5 = U16(SQLITE_JUMPIFNULL) + (*VdbeOp)(unsafe.Pointer(aOp + 4*24)).Fp2 = memId + 1 + (*VdbeOp)(unsafe.Pointer(aOp + 5*24)).Fp3 = memId + (*VdbeOp)(unsafe.Pointer(aOp + 6*24)).Fp1 = memId + (*VdbeOp)(unsafe.Pointer(aOp + 7*24)).Fp2 = memId + 2 + (*VdbeOp)(unsafe.Pointer(aOp + 7*24)).Fp1 = memId + (*VdbeOp)(unsafe.Pointer(aOp + 10*24)).Fp2 = memId + if (*Parse)(unsafe.Pointer(pParse)).FnTab == 0 { + (*Parse)(unsafe.Pointer(pParse)).FnTab = 1 + } + } +} + +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ +var autoInc = [12]VdbeOpList{ + /* 0 */ {Fopcode: U8(OP_Null)}, + /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, + /* 2 */ {Fopcode: U8(OP_Column)}, + /* 3 */ {Fopcode: U8(OP_Ne), Fp2: int8(9)}, + /* 4 */ {Fopcode: U8(OP_Rowid)}, + /* 5 */ {Fopcode: U8(OP_Column), Fp2: int8(1)}, + /* 6 */ {Fopcode: U8(OP_AddImm)}, + /* 7 */ {Fopcode: U8(OP_Copy)}, + /* 8 */ {Fopcode: U8(OP_Goto), Fp2: int8(11)}, + /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, + /* 10 */ {Fopcode: U8(OP_Integer)}, + /* 11 */ {Fopcode: U8(OP_Close)}, +} /* sqlite3.c:125373:29 */ + +// Update the maximum rowid for an autoincrement calculation. +// +// This routine should be called when the regRowid register holds a +// new rowid that is about to be inserted. If that new rowid is +// larger than the maximum rowid in the memId memory cell, then the +// memory cell is updated. +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ + if memId > 0 { + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) + } +} + +// This routine generates the code needed to write autoincrement +// maximum rowid values back into the sqlite_sequence register. +// Every statement that might do an INSERT into an autoincrement +// table (either directly or through triggers) needs to call this +// routine just before the "exit" code. +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ + var p uintptr + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + for p = (*Parse)(unsafe.Pointer(pParse)).FpAinc; p != 0; p = (*AutoincInfo)(unsafe.Pointer(p)).FpNext { + var aOp uintptr + var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*AutoincInfo)(unsafe.Pointer(p)).FiDb)*32 + var iRec int32 + var memId int32 = (*AutoincInfo)(unsafe.Pointer(p)).FregCtr + + iRec = Xsqlite3GetTempReg(tls, pParse) + + Xsqlite3VdbeAddOp3(tls, v, OP_Le, memId+2, Xsqlite3VdbeCurrentAddr(tls, v)+7, memId) + + Xsqlite3OpenTable(tls, pParse, 0, (*AutoincInfo)(unsafe.Pointer(p)).FiDb, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab, OP_OpenWrite) + aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(autoIncEnd))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&autoIncEnd)), iLn2) + if aOp == uintptr(0) { + break + } + (*VdbeOp)(unsafe.Pointer(aOp)).Fp1 = memId + 1 + (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp2 = memId + 1 + (*VdbeOp)(unsafe.Pointer(aOp + 2*24)).Fp1 = memId - 1 + (*VdbeOp)(unsafe.Pointer(aOp + 2*24)).Fp3 = iRec + (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp2 = iRec + (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp3 = memId + 1 + (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp5 = U16(OPFLAG_APPEND) + Xsqlite3ReleaseTempReg(tls, pParse, iRec) + } +} + +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ +var autoIncEnd = [5]VdbeOpList{ + /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, + /* 1 */ {Fopcode: U8(OP_NewRowid)}, + /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, + /* 3 */ {Fopcode: U8(OP_Insert)}, + /* 4 */ {Fopcode: U8(OP_Close)}, +} /* sqlite3.c:125440:29 */ + +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ + if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { + autoIncrementEnd(tls, pParse) + } +} + +// This routine is called to handle SQL of the following forms: +// +// insert into TABLE (IDLIST) values(EXPRLIST),(EXPRLIST),... +// insert into TABLE (IDLIST) select +// insert into TABLE (IDLIST) default values +// +// The IDLIST following the table name is always optional. If omitted, +// then a list of all (non-hidden) columns for the table is substituted. +// The IDLIST appears in the pColumn parameter. pColumn is NULL if IDLIST +// is omitted. +// +// For the pSelect parameter holds the values to be inserted for the +// first two forms shown above. A VALUES clause is really just short-hand +// for a SELECT statement that omits the FROM clause and everything else +// that follows. If the pSelect parameter is NULL, that means that the +// DEFAULT VALUES form of the INSERT statement is intended. +// +// The code generated follows one of four templates. For a simple +// insert with data coming from a single-row VALUES clause, the code executes +// once straight down through. Pseudo-code follows (we call this +// the "1st template"): +// +// open write cursor to
    and its indices +// put VALUES clause expressions into registers +// write the resulting record into
    +// cleanup +// +// The three remaining templates assume the statement is of the form +// +// INSERT INTO
    SELECT ... +// +// If the SELECT clause is of the restricted form "SELECT * FROM " - +// in other words if the SELECT pulls all columns from a single table +// and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and +// if and are distinct tables but have identical +// schemas, including all the same indices, then a special optimization +// is invoked that copies raw records from over to . +// See the xferOptimization() function for the implementation of this +// template. This is the 2nd template. +// +// open a write cursor to
    +// open read cursor on +// transfer all records in over to
    +// close cursors +// foreach index on
    +// open a write cursor on the
    index +// open a read cursor on the corresponding index +// transfer all records from the read to the write cursors +// close cursors +// end foreach +// +// The 3rd template is for when the second template does not apply +// and the SELECT clause does not read from
    at any time. +// The generated code follows this template: +// +// X <- A +// goto B +// A: setup for the SELECT +// loop over the rows in the SELECT +// load values into registers R..R+n +// yield X +// end loop +// cleanup after the SELECT +// end-coroutine X +// B: open write cursor to
    and its indices +// C: yield X, at EOF goto D +// insert the select result into
    from R..R+n +// goto C +// D: cleanup +// +// The 4th template is used if the insert statement takes its +// values from a SELECT but the data is being inserted into a table +// that is also read as part of the SELECT. In the third form, +// we have to use an intermediate table to store the results of +// the select. The template is like this: +// +// X <- A +// goto B +// A: setup for the SELECT +// loop over the tables in the SELECT +// load value into register R..R+n +// yield X +// end loop +// cleanup after the SELECT +// end co-routine R +// B: open temp table +// L: yield X, at EOF goto M +// insert row from R..R+n into temp table +// goto L +// M: open write cursor to
    and its indices +// rewind temp table +// C: loop over rows of intermediate table +// transfer values form intermediate table into
    +// end loop +// D: cleanup +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ + bp := tls.Alloc(188) + defer tls.Free(188) + + var db uintptr // The main database structure + var pTab uintptr // The table to insert into. aka TABLE + var i int32 + var j int32 // Loop counters + var v uintptr // Generate code into this virtual machine + var pIdx uintptr // For looping over indices of the table + var nColumn int32 // Number of columns in the data + var nHidden int32 // Number of hidden columns if TABLE is virtual + // var iDataCur int32 at bp+176, 4 + // VDBE cursor that is the main data repository + // var iIdxCur int32 at bp+180, 4 + // First index cursor + var ipkColumn int32 // Column that is the INTEGER PRIMARY KEY + var endOfLoop int32 // Label for the end of the insertion loop + var srcTab int32 // Data comes from this temporary cursor if >=0 + var addrInsTop int32 // Jump to label "D" + var addrCont int32 // Top of insert loop. Label "C" in templates 3 and 4 + // var dest SelectDest at bp+80, 40 + // Destination for SELECT on rhs of INSERT + var iDb int32 // Index of database holding TABLE + var useTempTable U8 // Store SELECT results in intermediate table + var appendFlag U8 // True if the insert is likely to be an append + var withoutRowid U8 // 0 for normal table. 1 for WITHOUT ROWID table + var bIdListInOrder U8 // True if IDLIST is in table order + var pList uintptr // List of VALUES() to be inserted + var iRegStore int32 // Register in which to store next column + + // Register allocations + var regFromSelect int32 // Base register for data coming from SELECT + var regAutoinc int32 // Register holding the AUTOINCREMENT counter + var regRowCount int32 // Memory cell used for the row counter + var regIns int32 // Block of regs holding rowid+data being inserted + var regRowid int32 // registers holding insert rowid + var regData int32 // register holding first column to insert + var aRegIdx uintptr // One register allocated to each index + + var isView int32 // True if attempting to insert into a view + var pTrigger uintptr // List of triggers on pTab, if required + // var tmask int32 at bp+72, 4 + + // Invoke the coroutine to extract information from the SELECT + // and add it to a transient table srcTab. The code generated + // here is from the 4th template: + // + // B: open temp table + // L: yield X, goto M at EOF + // insert row from R..R+n into temp table + // goto L + // M: ... + var regRec int32 // Register to hold packed record + var regTempRowid int32 // Register to hold temp table ROWID + var addrL int32 + // Data is coming from a SELECT or from a multi-row VALUES clause. + // Generate a co-routine to run the SELECT. + var regYield int32 // Register holding co-routine entry-point + var addrTop int32 // Top of the co-routine + var rc int32 + // This is the case if the data for the INSERT is coming from a + // single-row VALUES clause + // var sNC NameContext at bp+120, 56 + + var nIdx int32 + var pNx uintptr + var k int32 + var colFlags U32 + var addr1 int32 + var regCols int32 + var pIpk uintptr + var addr11 int32 + var pVTab uintptr + // var isReplace int32 at bp+184, 4 + // Set to true if constraints may cause a replace + var bUseSeek int32 + nHidden = 0 + *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) = 0 + *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)) = 0 + ipkColumn = -1 + srcTab = 0 + addrInsTop = 0 + addrCont = 0 + useTempTable = U8(0) + appendFlag = U8(0) + pList = uintptr(0) + regFromSelect = 0 + regAutoinc = 0 + regRowCount = 0 + aRegIdx = uintptr(0) // Mask of trigger times + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __1 + } + goto insert_cleanup +__1: + ; + + (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSDParm = 0 // Suppress a harmless compiler warning + + // If the Select object is really just a simple VALUES() list with a + // single row (the common case) then keep that one row of values + // and discard the other (unused) parts of the pSelect object + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FselFlags&U32(SF_Values) != U32(0) && (*Select)(unsafe.Pointer(pSelect)).FpPrior == uintptr(0)) { + goto __2 + } + pList = (*Select)(unsafe.Pointer(pSelect)).FpEList + (*Select)(unsafe.Pointer(pSelect)).FpEList = uintptr(0) + Xsqlite3SelectDelete(tls, db, pSelect) + pSelect = uintptr(0) +__2: + ; + + // Locate the table into which we will be inserting new information. + + pTab = Xsqlite3SrcListLookup(tls, pParse, pTabList) + if !(pTab == uintptr(0)) { + goto __3 + } + goto insert_cleanup +__3: + ; + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) != 0) { + goto __4 + } + goto insert_cleanup +__4: + ; + withoutRowid = libc.BoolUint8(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) + + // Figure out if we have any triggers and if the table being + // inserted into is a view + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+72) + isView = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) + + // If pTab is really a view, make sure it has been initialized. + // ViewGetColumnNames() is a no-op if pTab is not a view. + if !(Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { + goto __5 + } + goto insert_cleanup +__5: + ; + + // Cannot insert into a read-only table. + if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 72))) != 0) { + goto __6 + } + goto insert_cleanup +__6: + ; + + // Allocate a VDBE + v = Xsqlite3GetVdbe(tls, pParse) + if !(v == uintptr(0)) { + goto __7 + } + goto insert_cleanup +__7: + ; + if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) { + goto __8 + } + Xsqlite3VdbeCountChanges(tls, v) +__8: + ; + Xsqlite3BeginWriteOperation(tls, pParse, libc.Bool32(pSelect != 0 || pTrigger != 0), iDb) + + // If the statement is of the form + // + // INSERT INTO SELECT * FROM ; + // + // Then special optimizations can be applied that make the transfer + // very fast and which reduce fragmentation of indices. + // + // This is the 2nd template. + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + goto __9 + } + + goto insert_end +__9: + ; + + // If this is an AUTOINCREMENT table, look up the sequence number in the + // sqlite_sequence table and store it in memory cell regAutoinc. + regAutoinc = autoIncBegin(tls, pParse, iDb, pTab) + + // Allocate a block registers to hold the rowid and the values + // for all columns of the new row. + regRowid = libc.AssignInt32(®Ins, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Table)(unsafe.Pointer(pTab)).FnCol) + 1 + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __10 + } + regRowid++ + (*Parse)(unsafe.Pointer(pParse)).FnMem++ +__10: + ; + regData = regRowid + 1 + + // If the INSERT statement included an IDLIST term, then make sure + // all elements of the IDLIST really are columns of the table and + // remember the column indices. + // + // If the table has an INTEGER PRIMARY KEY column and that column + // is named in the IDLIST, then record in the ipkColumn variable + // the index into IDLIST of the primary key column. ipkColumn is + // the index of the primary key as it appears in IDLIST, not as + // is appears in the original table. (The index of the INTEGER + // PRIMARY KEY in the original table is pTab->iPKey.) After this + // loop, if ipkColumn==(-1), that means that integer primary key + // is unspecified, and hence the table is either WITHOUT ROWID or + // it will automatically generated an integer primary key. + // + // bIdListInOrder is true if the columns in IDLIST are in storage + // order. This enables an optimization that avoids shuffling the + // columns into storage order. False negatives are harmless, + // but false positives will cause database corruption. + bIdListInOrder = U8(libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_OOOHidden|TF_HasStored) == U32(0))) + if !(pColumn != 0) { + goto __11 + } + i = 0 +__12: + if !(i < (*IdList)(unsafe.Pointer(pColumn)).FnId) { + goto __14 + } + (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa + uintptr(i)*16)).Fidx = -1 + goto __13 +__13: + i++ + goto __12 + goto __14 +__14: + ; + i = 0 +__15: + if !(i < (*IdList)(unsafe.Pointer(pColumn)).FnId) { + goto __17 + } + j = 0 +__18: + if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __20 + } + if !(Xsqlite3StrICmp(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName) == 0) { + goto __21 + } + (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa + uintptr(i)*16)).Fidx = j + if !(i != j) { + goto __22 + } + bIdListInOrder = U8(0) +__22: + ; + if !(j == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { + goto __23 + } + ipkColumn = i +__23: + ; + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&(COLFLAG_STORED|COLFLAG_VIRTUAL) != 0) { + goto __24 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+15555, + libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) + goto insert_cleanup +__24: + ; + goto __20 +__21: + ; + goto __19 +__19: + j++ + goto __18 + goto __20 +__20: + ; + if !(j >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __25 + } + if !(Xsqlite3IsRowid(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName) != 0 && !(withoutRowid != 0)) { + goto __26 + } + ipkColumn = i + bIdListInOrder = U8(0) + goto __27 +__26: + Xsqlite3ErrorMsg(tls, pParse, ts+15596, + libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + goto insert_cleanup +__27: + ; +__25: + ; + goto __16 +__16: + i++ + goto __15 + goto __17 +__17: + ; +__11: + ; + + // Figure out how many columns of data are supplied. If the data + // is coming from a SELECT statement, then generate a co-routine that + // produces a single row of the SELECT on each invocation. The + // co-routine is the common header to the 3rd and 4th templates. + if !(pSelect != 0) { + goto __28 + } // Result code + + regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + addrTop = Xsqlite3VdbeCurrentAddr(tls, v) + 1 + Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, addrTop) + Xsqlite3SelectDestInit(tls, bp+80, SRT_Coroutine, regYield) + (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst = func() int32 { + if bIdListInOrder != 0 { + return regData + } + return 0 + }() + (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FnSdst = int32((*Table)(unsafe.Pointer(pTab)).FnCol) + rc = Xsqlite3Select(tls, pParse, pSelect, bp+80) + regFromSelect = (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst + + if !(rc != 0 || (*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __30 + } + goto insert_cleanup +__30: + ; + + Xsqlite3VdbeEndCoroutine(tls, v, regYield) + Xsqlite3VdbeJumpHere(tls, v, addrTop-1) // label B: + + nColumn = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList)).FnExpr + + // Set useTempTable to TRUE if the result of the SELECT statement + // should be written into a temporary table (template 4). Set to + // FALSE if each output row of the SELECT can be written directly into + // the destination table (template 3). + // + // A temp table must be used if the table being updated is also one + // of the tables being read by the SELECT statement. Also use a + // temp table in the case of row triggers. + if !(pTrigger != 0 || readsTable(tls, pParse, iDb, pTab) != 0) { + goto __31 + } + useTempTable = U8(1) +__31: + ; + + if !(useTempTable != 0) { + goto __32 + } // Label "L" + + srcTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + regRec = Xsqlite3GetTempReg(tls, pParse) + regTempRowid = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, srcTab, nColumn) + addrL = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regFromSelect, nColumn, regRec) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, srcTab, regTempRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, srcTab, regRec, regTempRowid) + Xsqlite3VdbeGoto(tls, v, addrL) + Xsqlite3VdbeJumpHere(tls, v, addrL) + Xsqlite3ReleaseTempReg(tls, pParse, regRec) + Xsqlite3ReleaseTempReg(tls, pParse, regTempRowid) +__32: + ; + goto __29 +__28: + libc.Xmemset(tls, bp+120, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 120 /* &sNC */)).FpParse = pParse + srcTab = -1 + + if !(pList != 0) { + goto __33 + } + nColumn = (*ExprList)(unsafe.Pointer(pList)).FnExpr + if !(Xsqlite3ResolveExprListNames(tls, bp+120, pList) != 0) { + goto __35 + } + goto insert_cleanup +__35: + ; + goto __34 +__33: + nColumn = 0 +__34: + ; +__29: + ; + + // If there is no IDLIST term but the table has an integer primary + // key, the set the ipkColumn variable to the integer primary key + // column index in the original table definition. + if !(pColumn == uintptr(0) && nColumn > 0) { + goto __36 + } + ipkColumn = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) + if !(ipkColumn >= 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != U32(0)) { + goto __37 + } + + i = ipkColumn - 1 +__38: + if !(i >= 0) { + goto __40 + } + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { + goto __41 + } + + ipkColumn-- +__41: + ; + goto __39 +__39: + i-- + goto __38 + goto __40 +__40: + ; +__37: + ; + + // Make sure the number of columns in the source data matches the number + // of columns to be inserted into the table. + + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated|TF_HasHidden) != U32(0)) { + goto __42 + } + i = 0 +__43: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __45 + } + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_NOINSERT != 0) { + goto __46 + } + nHidden++ +__46: + ; + goto __44 +__44: + i++ + goto __43 + goto __45 +__45: + ; +__42: + ; + if !(nColumn != int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden) { + goto __47 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+15628, + libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) + goto insert_cleanup +__47: + ; +__36: + ; + if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { + goto __48 + } + Xsqlite3ErrorMsg(tls, pParse, ts+15680, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + goto insert_cleanup +__48: + ; + + // Initialize the count of rows to be inserted + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00001))<<32) != uint64(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FbReturning) != 0)) { + goto __49 + } + regRowCount = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regRowCount) +__49: + ; + + // If this is not a view, open the table and and all indices + if !!(isView != 0) { + goto __50 + } + nIdx = Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(0), -1, uintptr(0), + bp+176, bp+180) + aRegIdx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(int32(0)))*uint64(nIdx+2))) + if !(aRegIdx == uintptr(0)) { + goto __51 + } + goto insert_cleanup +__51: + ; + i = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__52: + if !(i < nIdx) { + goto __54 + } + + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + goto __53 +__53: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + i++ + goto __52 + goto __54 +__54: + ; + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) // Register to store the table record +__50: + ; + if !(pUpsert != 0) { + goto __55 + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __56 + } + Xsqlite3ErrorMsg(tls, pParse, ts+15705, + libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) + goto insert_cleanup +__56: + ; + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __57 + } + Xsqlite3ErrorMsg(tls, pParse, ts+15751, 0) + goto insert_cleanup +__57: + ; + if !(Xsqlite3HasExplicitNulls(tls, pParse, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) != 0) { + goto __58 + } + goto insert_cleanup +__58: + ; + (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) + pNx = pUpsert +__59: + (*Upsert)(unsafe.Pointer(pNx)).FpUpsertSrc = pTabList + (*Upsert)(unsafe.Pointer(pNx)).FregData = regData + (*Upsert)(unsafe.Pointer(pNx)).FiDataCur = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) + (*Upsert)(unsafe.Pointer(pNx)).FiIdxCur = *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)) + if !((*Upsert)(unsafe.Pointer(pNx)).FpUpsertTarget != 0) { + goto __62 + } + if !(Xsqlite3UpsertAnalyzeTarget(tls, pParse, pTabList, pNx) != 0) { + goto __63 + } + goto insert_cleanup +__63: + ; +__62: + ; + pNx = (*Upsert)(unsafe.Pointer(pNx)).FpNextUpsert + goto __60 +__60: + if pNx != uintptr(0) { + goto __59 + } + goto __61 +__61: + ; +__55: + ; + + // This is the top of the main insertion loop + if !(useTempTable != 0) { + goto __64 + } + // This block codes the top of loop only. The complete loop is the + // following pseudocode (template 4): + // + // rewind temp table, if empty goto D + // C: loop over rows of intermediate table + // transfer values form intermediate table into
    + // end loop + // D: ... + addrInsTop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, srcTab) + addrCont = Xsqlite3VdbeCurrentAddr(tls, v) + goto __65 +__64: + if !(pSelect != 0) { + goto __66 + } + // This block codes the top of loop only. The complete loop is the + // following pseudocode (template 3): + // + // C: yield X, at EOF goto D + // insert the select result into
    from R..R+n + // goto C + // D: ... + + addrInsTop = libc.AssignInt32(&addrCont, Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm)) + + if !(ipkColumn >= 0) { + goto __67 + } + // tag-20191021-001: If the INTEGER PRIMARY KEY is being generated by the + // SELECT, go ahead and copy the value into the rowid slot now, so that + // the value does not get overwritten by a NULL at tag-20191021-002. + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, regFromSelect+ipkColumn, regRowid) +__67: + ; +__66: + ; +__65: + ; + + // Compute data for ordinary columns of the new entry. Values + // are written in storage order into registers starting with regData. + // Only ordinary columns are computed in this loop. The rowid + // (if there is one) is computed later and generated columns are + // computed after the rowid since they might depend on the value + // of the rowid. + nHidden = 0 + iRegStore = regData + i = 0 +__68: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __70 + } + + if !(i == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { + goto __71 + } + // tag-20191021-002: References to the INTEGER PRIMARY KEY are filled + // using the rowid. So put a NULL in the IPK slot of the record to avoid + // using excess space. The file format definition requires this extra + // NULL - we cannot optimize further by skipping the column completely + Xsqlite3VdbeAddOp1(tls, v, OP_SoftNull, iRegStore) + goto __69 +__71: + ; + if !(libc.AssignUint32(&colFlags, U32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags))&U32(COLFLAG_NOINSERT) != U32(0)) { + goto __72 + } + nHidden++ + if !(colFlags&U32(COLFLAG_VIRTUAL) != U32(0)) { + goto __73 + } + // Virtual columns do not participate in OP_MakeRecord. So back up + // iRegStore by one slot to compensate for the iRegStore++ in the + // outer for() loop + iRegStore-- + goto __69 + goto __74 +__73: + if !(colFlags&U32(COLFLAG_STORED) != U32(0)) { + goto __75 + } + // Stored columns are computed later. But if there are BEFORE + // triggers, the slots used for stored columns will be OP_Copy-ed + // to a second block of registers, so the register needs to be + // initialized to NULL to avoid an uninitialized register read + if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { + goto __77 + } + Xsqlite3VdbeAddOp1(tls, v, OP_SoftNull, iRegStore) +__77: + ; + goto __69 + goto __76 +__75: + if !(pColumn == uintptr(0)) { + goto __78 + } + // Hidden columns that are not explicitly named in the INSERT + // get there default value + Xsqlite3ExprCodeFactorable(tls, pParse, + Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24), + iRegStore) + goto __69 +__78: + ; +__76: + ; +__74: + ; +__72: + ; + if !(pColumn != 0) { + goto __79 + } + j = 0 +__81: + if !(j < (*IdList)(unsafe.Pointer(pColumn)).FnId && (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(j)*16)).Fidx != i) { + goto __83 + } + goto __82 +__82: + j++ + goto __81 + goto __83 +__83: + ; + if !(j >= (*IdList)(unsafe.Pointer(pColumn)).FnId) { + goto __84 + } + // A column not named in the insert column list gets its + // default value + Xsqlite3ExprCodeFactorable(tls, pParse, + Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24), + iRegStore) + goto __69 +__84: + ; + k = j + goto __80 +__79: + if !(nColumn == 0) { + goto __85 + } + // This is INSERT INTO ... DEFAULT VALUES. Load the default value. + Xsqlite3ExprCodeFactorable(tls, pParse, + Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24), + iRegStore) + goto __69 + goto __86 +__85: + k = i - nHidden +__86: + ; +__80: + ; + + if !(useTempTable != 0) { + goto __87 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, k, iRegStore) + goto __88 +__87: + if !(pSelect != 0) { + goto __89 + } + if !(regFromSelect != regData) { + goto __91 + } + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, regFromSelect+k, iRegStore) +__91: + ; + goto __90 +__89: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) +__90: + ; +__88: + ; + goto __69 +__69: + i++ + iRegStore++ + goto __68 + goto __70 +__70: + ; + + // Run the BEFORE and INSTEAD OF triggers, if there are any + endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) + if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { + goto __92 + } + regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) + + // build the NEW.* reference row. Note that if there is an INTEGER + // PRIMARY KEY into which a NULL is being inserted, that NULL will be + // translated into a unique ID for the row. But on a BEFORE trigger, + // we do not know what the unique ID will be (because the insert has + // not happened yet) so we substitute a rowid of -1 + if !(ipkColumn < 0) { + goto __93 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) + goto __94 +__93: + ; + if !(useTempTable != 0) { + goto __95 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) + goto __96 +__95: + ; // Otherwise useTempTable is true + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) +__96: + ; + addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regCols) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) + Xsqlite3VdbeJumpHere(tls, v, addr1) + Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regCols) +__94: + ; + + // Copy the new data already generated. + + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) + + // Compute the new value for generated columns after all other + // columns have already been computed. This must be done after + // computing the ROWID in case one of the generated columns + // refers to the ROWID. + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { + goto __97 + } + + Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) +__97: + ; + + // If this is an INSERT on a view with an INSTEAD OF INSERT trigger, + // do not attempt any conversions before assembling the record. + // If this is a real table, attempt conversions as required by the + // table column affinities. + if !!(isView != 0) { + goto __98 + } + Xsqlite3TableAffinity(tls, v, pTab, regCols+1) +__98: + ; + + // Fire BEFORE or INSTEAD OF triggers + Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_BEFORE, + pTab, regCols-int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1, onError, endOfLoop) + + Xsqlite3ReleaseTempRange(tls, pParse, regCols, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) +__92: + ; + + if !!(isView != 0) { + goto __99 + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __100 + } + // The row that the VUpdate opcode will delete: none + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__100: + ; + if !(ipkColumn >= 0) { + goto __101 + } + // Compute the new rowid + if !(useTempTable != 0) { + goto __103 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __104 +__103: + if !(pSelect != 0) { + goto __105 + } + // Rowid already initialized at tag-20191021-001 + goto __106 +__105: + pIpk = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ipkColumn)*32)).FpExpr + if !(int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB)) { + goto __107 + } + Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) + appendFlag = U8(1) + goto __108 +__107: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__108: + ; +__106: + ; +__104: + ; + // If the PRIMARY KEY expression is NULL, then use OP_NewRowid + // to generate a unique primary key value. + if !!(appendFlag != 0) { + goto __109 + } + if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __110 + } + addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) + Xsqlite3VdbeJumpHere(tls, v, addr11) + goto __111 +__110: + addr11 = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) +__111: + ; + Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) +__109: + ; + goto __102 +__101: + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { + goto __112 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) + goto __113 +__112: + Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) + appendFlag = U8(1) +__113: + ; +__102: + ; + autoIncStep(tls, pParse, regAutoinc, regRowid) + + // Compute the new value for generated columns after all other + // columns have already been computed. This must be done after + // computing the ROWID in case one of the generated columns + // is derived from the INTEGER PRIMARY KEY. + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { + goto __114 + } + Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) +__114: + ; + + // Generate code to check constraints and generate index keys and + // do the insertion. + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __115 + } + pVTab = Xsqlite3GetVTable(tls, db, pTab) + Xsqlite3VtabMakeWritable(tls, pParse, pTab) + Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 1, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+2, regIns, pVTab, -12) + Xsqlite3VdbeChangeP5(tls, v, func() uint16 { + if onError == OE_Default { + return uint16(OE_Abort) + } + return uint16(onError) + }()) + Xsqlite3MayAbort(tls, pParse) + goto __116 +__115: + + *(*int32)(unsafe.Pointer(bp + 184 /* isReplace */)) = 0 // True to use OPFLAG_SEEKRESULT + Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)), + regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) + + // Set the OPFLAG_USESEEKRESULT flag if either (a) there are no REPLACE + // constraints or (b) there are no triggers and this table is not a + // parent table in a foreign key constraint. It is safe to set the + // flag in the second case as if any REPLACE constraint is hit, an + // OP_Delete or OP_IdxDelete instruction will be executed on each + // cursor that is disturbed. And these instructions both clear the + // VdbeCursor.seekResult variable, disabling the OPFLAG_USESEEKRESULT + // functionality. + bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) + Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)), + regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) +__116: + ; +__99: + ; + + // Update the count of rows that are inserted + if !(regRowCount != 0) { + goto __117 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__117: + ; + + if !(pTrigger != 0) { + goto __118 + } + // Code AFTER triggers + Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, + pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) +__118: + ; + + // The bottom of the main insertion loop, if the data source + // is a SELECT statement. + Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) + if !(useTempTable != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) + Xsqlite3VdbeJumpHere(tls, v, addrInsTop) + Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) + goto __120 +__119: + if !(pSelect != 0) { + goto __121 + } + Xsqlite3VdbeGoto(tls, v, addrCont) + Xsqlite3VdbeJumpHere(tls, v, addrInsTop) +__121: + ; +__120: + ; + +insert_end: + // Update the sqlite_sequence table by storing the content of the + // maximum rowid counter values recorded while inserting into + // autoincrement tables. + if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { + goto __122 + } + Xsqlite3AutoincrementEnd(tls, pParse) +__122: + ; + + // Return the number of rows inserted. If this routine is + // generating code because of a call to sqlite3NestedParse(), do not + // invoke the callback function. + if !(regRowCount != 0) { + goto __123 + } + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15772) +__123: + ; + +insert_cleanup: + Xsqlite3SrcListDelete(tls, db, pTabList) + Xsqlite3ExprListDelete(tls, db, pList) + Xsqlite3UpsertDelete(tls, db, pUpsert) + Xsqlite3SelectDelete(tls, db, pSelect) + Xsqlite3IdListDelete(tls, db, pColumn) + Xsqlite3DbFree(tls, db, aRegIdx) +} + +// Make sure "isView" and other macros defined above are undefined. Otherwise +// they may interfere with compilation of other functions in this file +// (or in another file, if this file becomes part of the amalgamation). + +// Meanings of bits in of pWalker->eCode for +// sqlite3ExprReferencesUpdatedColumn() + +// This is the Walker callback from sqlite3ExprReferencesUpdatedColumn(). +// Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this +// expression node references any of the +// columns that are being modifed by an UPDATE statement. +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { + if *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)) + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*4)) >= 0 { + *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(CKCNSTRNT_COLUMN) + } + } else { + *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(CKCNSTRNT_ROWID) + } + } + return WRC_Continue +} + +// pExpr is a CHECK constraint on a row that is being UPDATE-ed. The +// only columns that are modified by the UPDATE are those for which +// aiChng[i]>=0, and also the ROWID is modified if chngRowid is true. +// +// Return true if CHECK constraint pExpr uses any of the +// changing columns (or the rowid if it is changing). In other words, +// return true if this CHECK constraint must be validated for +// the new row in the UPDATE statement. +// +// 2018-09-15: pExpr might also be an expression for an index-on-expressions. +// The operation of this routine is the same - return true if an only if +// the expression uses one or more of columns identified by the second and +// third arguments. +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{checkConstraintExprNode})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = aiChng + Xsqlite3WalkExpr(tls, bp, pExpr) + if !(chngRowid != 0) { + + *(*U16)(unsafe.Pointer(bp + 36)) &= libc.Uint16FromInt32(libc.CplInt32(CKCNSTRNT_ROWID)) + } + + return libc.Bool32(int32((*Walker)(unsafe.Pointer(bp)).FeCode) != 0) +} + +// The sqlite3GenerateConstraintChecks() routine usually wants to visit +// the indexes of a table in the order provided in the Table->pIndex list. +// However, sometimes (rarely - when there is an upsert) it wants to visit +// the indexes in a different order. The following data structures accomplish +// this. +// +// The IndexIterator object is used to walk through all of the indexes +// of a table in either Index.pNext order, or in some other order established +// by an array of IndexListTerm objects. +type IndexListTerm1 = struct { + Fp uintptr + Fix int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:126409:9 */ + +// The sqlite3GenerateConstraintChecks() routine usually wants to visit +// the indexes of a table in the order provided in the Table->pIndex list. +// However, sometimes (rarely - when there is an upsert) it wants to visit +// the indexes in a different order. The following data structures accomplish +// this. +// +// The IndexIterator object is used to walk through all of the indexes +// of a table in either Index.pNext order, or in some other order established +// by an array of IndexListTerm objects. +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ +type IndexIterator1 = struct { + FeType int32 + Fi int32 + Fu struct { + Flx struct{ FpIdx uintptr } + F__ccgo_pad1 [8]byte + } +} /* sqlite3.c:126410:9 */ + +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ + +// Return the first index on the list +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ + + if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { + *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix + return (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fp + } else { + *(*int32)(unsafe.Pointer(pIx)) = 0 + return *(*uintptr)(unsafe.Pointer(pIter + 8)) + } + return uintptr(0) +} + +// Return the next index from the list. Return NULL when out of indexes +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ + if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { + var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) + if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { + *(*int32)(unsafe.Pointer(pIx)) = i + return uintptr(0) + } + *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix + return (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp + } else { + *(*int32)(unsafe.Pointer(pIx))++ + *(*uintptr)(unsafe.Pointer(pIter + 8)) = (*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8)))).FpNext + return *(*uintptr)(unsafe.Pointer(pIter + 8)) + } + return uintptr(0) +} + +// Generate code to do constraint checks prior to an INSERT or an UPDATE +// on table pTab. +// +// The regNewData parameter is the first register in a range that contains +// the data to be inserted or the data after the update. There will be +// pTab->nCol+1 registers in this range. The first register (the one +// that regNewData points to) will contain the new rowid, or NULL in the +// case of a WITHOUT ROWID table. The second register in the range will +// contain the content of the first table column. The third register will +// contain the content of the second table column. And so forth. +// +// The regOldData parameter is similar to regNewData except that it contains +// the data prior to an UPDATE rather than afterwards. regOldData is zero +// for an INSERT. This routine can distinguish between UPDATE and INSERT by +// checking regOldData for zero. +// +// For an UPDATE, the pkChng boolean is true if the true primary key (the +// rowid for a normal table or the PRIMARY KEY for a WITHOUT ROWID table) +// might be modified by the UPDATE. If pkChng is false, then the key of +// the iDataCur content table is guaranteed to be unchanged by the UPDATE. +// +// For an INSERT, the pkChng boolean indicates whether or not the rowid +// was explicitly specified as part of the INSERT statement. If pkChng +// is zero, it means that the either rowid is computed automatically or +// that the table is a WITHOUT ROWID table and has no rowid. On an INSERT, +// pkChng will only be true if the INSERT statement provides an integer +// value for either the rowid column or its INTEGER PRIMARY KEY alias. +// +// The code generated by this routine will store new index entries into +// registers identified by aRegIdx[]. No index entry is created for +// indices where aRegIdx[i]==0. The order of indices in aRegIdx[] is +// the same as the order of indices on the linked list of indices +// at pTab->pIndex. +// +// (2019-05-07) The generated code also creates a new record for the +// main table, if pTab is a rowid table, and stores that record in the +// register identified by aRegIdx[nIdx] - in other words in the first +// entry of aRegIdx[] past the last index. It is important that the +// record be generated during constraint checks to avoid affinity changes +// to the register content that occur after constraint checks but before +// the new record is inserted. +// +// The caller must have already opened writeable cursors on the main +// table and all applicable indices (that is to say, all indices for which +// aRegIdx[] is not zero). iDataCur is the cursor for the main table when +// inserting or updating a rowid table, or the cursor for the PRIMARY KEY +// index when operating on a WITHOUT ROWID table. iIdxCur is the cursor +// for the first index in the pTab->pIndex list. Cursors for other indices +// are at iIdxCur+N for the N-th element of the pTab->pIndex list. +// +// This routine also generates code to check constraints. NOT NULL, +// CHECK, and UNIQUE constraints are all checked. If a constraint fails, +// then the appropriate action is performed. There are five possible +// actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE. +// +// Constraint type Action What Happens +// --------------- ---------- ---------------------------------------- +// any ROLLBACK The current transaction is rolled back and +// sqlite3_step() returns immediately with a +// return code of SQLITE_CONSTRAINT. +// +// any ABORT Back out changes from the current command +// only (do not do a complete rollback) then +// cause sqlite3_step() to return immediately +// with SQLITE_CONSTRAINT. +// +// any FAIL Sqlite3_step() returns immediately with a +// return code of SQLITE_CONSTRAINT. The +// transaction is not rolled back and any +// changes to prior rows are retained. +// +// any IGNORE The attempt in insert or update the current +// row is skipped, without throwing an error. +// Processing continues with the next row. +// (There is an immediate jump to ignoreDest.) +// +// NOT NULL REPLACE The NULL value is replace by the default +// value for that column. If the default value +// is NULL, the action is the same as ABORT. +// +// UNIQUE REPLACE The other row that conflicts with the row +// being inserted is removed. +// +// CHECK REPLACE Illegal. The results in an exception. +// +// Which action to take is determined by the overrideError parameter. +// Or if overrideError==OE_Default, then the pParse->onError parameter +// is used. Or if pParse->onError==OE_Default then the onError value +// for the constraint is used. +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + var v uintptr // VDBE under constrution + var pIdx uintptr // Pointer to one of the indices + var pPk uintptr = uintptr(0) // The PRIMARY KEY index for WITHOUT ROWID tables + var db uintptr // Database connection + var i int32 // loop counter + // var ix int32 at bp+40, 4 + // Index loop counter + var nCol int32 // Number of columns + var onError int32 // Conflict resolution strategy + var seenReplace int32 = 0 // True if REPLACE is used to resolve INT PK conflict + var nPkField int32 // Number of fields in PRIMARY KEY. 1 for ROWID tables + var pUpsertClause uintptr = uintptr(0) // The specific ON CONFLICT clause for pIdx + var isUpdate U8 // True if this is an UPDATE operation + var bAffinityDone U8 = U8(0) // True if the OP_Affinity operation has been run + var upsertIpkReturn int32 = 0 // Address of Goto at end of IPK uniqueness check + var upsertIpkDelay int32 = 0 // Address of Goto to bypass initial IPK check + var ipkTop int32 = 0 // Top of the IPK uniqueness check + var ipkBottom int32 = 0 // OP_Goto at the end of the IPK uniqueness check + // Variables associated with retesting uniqueness constraints after + // replace triggers fire have run + var regTrigCnt int32 // Register used to count replace trigger invocations + var addrRecheck int32 = 0 // Jump here to recheck all uniqueness constraints + var lblRecheckOk int32 = 0 // Each recheck jumps to this label if it passes + var pTrigger uintptr // List of DELETE triggers on the table pTab + var nReplaceTrig int32 = 0 // Number of replace triggers coded + // var sIdxIter IndexIterator at bp+16, 24 + // Index iterator + + isUpdate = U8(libc.Bool32(regOldData != 0)) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + // This table is not a VIEW + nCol = int32((*Table)(unsafe.Pointer(pTab)).FnCol) + + // pPk is the PRIMARY KEY index for WITHOUT ROWID tables and NULL for + // normal rowid tables. nPkField is the number of key fields in the + // pPk index or 1 for a rowid table. In other words, nPkField is the + // number of fields in the true primary key of the table. + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + pPk = uintptr(0) + nPkField = 1 + } else { + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + nPkField = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + } + + // Record that this module has started + + // Test all NOT NULL constraints. + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasNotNull) != 0 { + var b2ndPass int32 = 0 // True if currently running 2nd pass + var nSeenReplace int32 = 0 // Number of ON CONFLICT REPLACE operations + var nGenerated int32 = 0 // Number of generated columns with NOT NULL + for 1 != 0 { // Make 2 passes over columns. Exit loop via "break" + for i = 0; i < nCol; i++ { + var iReg int32 // Register holding column value + var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 // The column to check for NOT NULL + var isGenerated int32 // non-zero if column is generated + onError = int32(*(*uint8)(unsafe.Pointer(pCol + 8)) & 0xf >> 0) + if onError == OE_None { + continue + } // No NOT NULL on this column + if i == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + continue // ROWID is never NULL + } + isGenerated = int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_GENERATED + if isGenerated != 0 && !(b2ndPass != 0) { + nGenerated++ + continue // Generated columns processed on 2nd pass + } + if aiChng != 0 && *(*int32)(unsafe.Pointer(aiChng + uintptr(i)*4)) < 0 && !(isGenerated != 0) { + // Do not check NOT NULL on columns that do not change + continue + } + if int32(overrideError) != OE_Default { + onError = int32(overrideError) + } else if onError == OE_Default { + onError = OE_Abort + } + if onError == OE_Replace { + if b2ndPass != 0 || + int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { + + onError = OE_Abort + } else { + + } + } else if b2ndPass != 0 && !(isGenerated != 0) { + continue + } + + iReg = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(i))) + regNewData + 1 + switch onError { + case OE_Replace: + { + var addr1 int32 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, iReg) + + nSeenReplace++ + Xsqlite3ExprCodeCopy(tls, pParse, + Xsqlite3ColumnExpr(tls, pTab, pCol), iReg) + Xsqlite3VdbeJumpHere(tls, v, addr1) + break + + } + fallthrough + case OE_Abort: + Xsqlite3MayAbort(tls, pParse) + fallthrough + case OE_Rollback: + fallthrough + case OE_Fail: + { + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11937, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + (*Column)(unsafe.Pointer(pCol)).FzCnName)) + Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, + onError, iReg) + Xsqlite3VdbeAppendP4(tls, v, zMsg, -7) + Xsqlite3VdbeChangeP5(tls, v, uint16(P5_ConstraintNotNull)) + + break + + } + fallthrough + default: + { + + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, iReg, ignoreDest) + + break + + } + } // end switch(onError) + } // end loop i over columns + if nGenerated == 0 && nSeenReplace == 0 { + // If there are no generated columns with NOT NULL constraints + // and no NOT NULL ON CONFLICT REPLACE constraints, then a single + // pass is sufficient + break + } + if b2ndPass != 0 { + break + } // Never need more than 2 passes + b2ndPass = 1 + if nSeenReplace > 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != U32(0) { + // If any NOT NULL ON CONFLICT REPLACE constraints fired on the + // first pass, recomputed values for all generated columns, as + // those values might depend on columns affected by the REPLACE. + Xsqlite3ComputeGeneratedColumns(tls, pParse, regNewData+1, pTab) + } + } // end of 2-pass loop + } // end if( has-not-null-constraints ) + + // Test all CHECK constraints + if (*Table)(unsafe.Pointer(pTab)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0) { + var pCheck uintptr = (*Table)(unsafe.Pointer(pTab)).FpCheck + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -(regNewData + 1) + if int32(overrideError) != OE_Default { + onError = int32(overrideError) + } else { + onError = OE_Abort + } + for i = 0; i < (*ExprList)(unsafe.Pointer(pCheck)).FnExpr; i++ { + var allOk int32 + var pCopy uintptr + var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pCheck + 8 + uintptr(i)*32)).FpExpr + if aiChng != 0 && + !(Xsqlite3ExprReferencesUpdatedColumn(tls, pExpr, aiChng, int32(pkChng)) != 0) { + // The check constraints do not reference any of the columns being + // updated so there is no point it verifying the check constraint + continue + } + if int32(bAffinityDone) == 0 { + Xsqlite3TableAffinity(tls, v, pTab, regNewData+1) + bAffinityDone = U8(1) + } + allOk = Xsqlite3VdbeMakeLabel(tls, pParse) + + pCopy = Xsqlite3ExprDup(tls, db, pExpr, 0) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + Xsqlite3ExprIfTrue(tls, pParse, pCopy, allOk, SQLITE_JUMPIFNULL) + } + Xsqlite3ExprDelete(tls, db, pCopy) + if onError == OE_Ignore { + Xsqlite3VdbeGoto(tls, v, ignoreDest) + } else { + var zName uintptr = (*ExprList_item)(unsafe.Pointer(pCheck + 8 + uintptr(i)*32)).FzEName + + if onError == OE_Replace { + onError = OE_Abort + } // IMP: R-26383-51744 + Xsqlite3HaltConstraint(tls, pParse, SQLITE_CONSTRAINT|int32(1)<<8, + onError, zName, int8(P4_TRANSIENT), + uint8(P5_ConstraintCheck)) + } + Xsqlite3VdbeResolveLabel(tls, v, allOk) + } + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 + } + + // UNIQUE and PRIMARY KEY constraints should be handled in the following + // order: + // + // (1) OE_Update + // (2) OE_Abort, OE_Fail, OE_Rollback, OE_Ignore + // (3) OE_Replace + // + // OE_Fail and OE_Ignore must happen before any changes are made. + // OE_Update guarantees that only a single row will change, so it + // must happen before OE_Replace. Technically, OE_Abort and OE_Rollback + // could happen in any order, but they are grouped up front for + // convenience. + // + // 2018-08-14: Ticket https://www.sqlite.org/src/info/908f001483982c43 + // The order of constraints used to have OE_Update as (2) and OE_Abort + // and so forth as (1). But apparently PostgreSQL checks the OE_Update + // constraint before any others, so it had to be moved. + // + // Constraint checking code is generated in this order: + // (A) The rowid constraint + // (B) Unique index constraints that do not have OE_Replace as their + // default conflict resolution strategy + // (C) Unique index that do use OE_Replace by default. + // + // The ordering of (2) and (3) is accomplished by making sure the linked + // list of indexes attached to a table puts all OE_Replace indexes last + // in the list. See sqlite3CreateIndex() for where that happens. + (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).FeType = 0 + (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).Fi = 0 + *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) = uintptr(0) // Silence harmless compiler warning + *(*uintptr)(unsafe.Pointer(bp + 16 + 8)) = (*Table)(unsafe.Pointer(pTab)).FpIndex + if pUpsert != 0 { + if (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget == uintptr(0) { + // There is just on ON CONFLICT clause and it has no constraint-target + + if int32((*Upsert)(unsafe.Pointer(pUpsert)).FisDoUpdate) == 0 { + // A single ON CONFLICT DO NOTHING clause, without a constraint-target. + // Make all unique constraint resolution be OE_Ignore + overrideError = U8(OE_Ignore) + pUpsert = uintptr(0) + } else { + // A single ON CONFLICT DO UPDATE. Make all resolutions OE_Update + overrideError = U8(OE_Update) + } + } else if (*Table)(unsafe.Pointer(pTab)).FpIndex != uintptr(0) { + // Otherwise, we'll need to run the IndexListTerm array version of the + // iterator to ensure that all of the ON CONFLICT conditions are + // checked first and in order. + var nIdx int32 + var jj int32 + var nByte U64 + var pTerm uintptr + var bUsed uintptr + nIdx = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex + __1: + if !(pIdx != 0) { + goto __3 + } + { + + } + goto __2 + __2: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + nIdx++ + goto __1 + goto __3 + __3: + ; + (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).FeType = 1 + *(*int32)(unsafe.Pointer(bp + 16 + 8)) = nIdx + nByte = U64((uint64(unsafe.Sizeof(IndexListTerm{}))+uint64(1))*uint64(nIdx) + uint64(nIdx)) + *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) = Xsqlite3DbMallocZero(tls, db, nByte) + if *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8)) == uintptr(0) { + return + } // OOM + bUsed = *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8)) + uintptr(nIdx)*16 + (*Upsert)(unsafe.Pointer(pUpsert)).FpToFree = *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + i = 0 + pTerm = pUpsert + for ; pTerm != 0; pTerm = (*Upsert)(unsafe.Pointer(pTerm)).FpNextUpsert { + if (*Upsert)(unsafe.Pointer(pTerm)).FpUpsertTarget == uintptr(0) { + break + } + if (*Upsert)(unsafe.Pointer(pTerm)).FpUpsertIdx == uintptr(0) { + continue + } // Skip ON CONFLICT for the IPK + jj = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex + for pIdx != uintptr(0) && pIdx != (*Upsert)(unsafe.Pointer(pTerm)).FpUpsertIdx { + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + jj++ + } + if *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) != 0 { + continue + } // Duplicate ON CONFLICT clause ignored + *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) = U8(1) + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj + i++ + } + jj = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex + __4: + if !(pIdx != 0) { + goto __6 + } + { + if *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) != 0 { + goto __5 + } + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj + i++ + + } + goto __5 + __5: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + jj++ + goto __4 + goto __6 + __6: + + } + } + + // Determine if it is possible that triggers (either explicitly coded + // triggers or FK resolution actions) might run as a result of deletes + // that happen when OE_Replace conflict resolution occurs. (Call these + // "replace triggers".) If any replace triggers run, we will need to + // recheck all of the uniqueness constraints after they have all run. + // But on the recheck, the resolution is OE_Abort instead of OE_Replace. + // + // If replace triggers are a possibility, then + // + // (1) Allocate register regTrigCnt and initialize it to zero. + // That register will count the number of replace triggers that + // fire. Constraint recheck only occurs if the number is positive. + // (2) Initialize pTrigger to the list of all DELETE triggers on pTab. + // (3) Initialize addrRecheck and lblRecheckOk + // + // The uniqueness rechecking code will create a series of tests to run + // in a second pass. The addrRecheck and lblRecheckOk variables are + // used to link together these tests which are separated from each other + // in the generate bytecode. + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_RecTriggers|SQLITE_ForeignKeys) == uint64(0) { + // There are not DELETE triggers nor FK constraints. No constraint + // rechecks are needed. + pTrigger = uintptr(0) + regTrigCnt = 0 + } else { + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_RecTriggers) != 0 { + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_DELETE, uintptr(0), uintptr(0)) + regTrigCnt = libc.Bool32(pTrigger != uintptr(0) || Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) != 0) + } else { + pTrigger = uintptr(0) + regTrigCnt = Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) + } + if regTrigCnt != 0 { + // Replace triggers might exist. Allocate the counter and + // initialize it to zero. + regTrigCnt = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regTrigCnt) + + lblRecheckOk = Xsqlite3VdbeMakeLabel(tls, pParse) + addrRecheck = lblRecheckOk + } + } + + // If rowid is changing, make sure the new rowid does not previously + // exist in the table. + if pkChng != 0 && pPk == uintptr(0) { + var addrRowidOk int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + + // Figure out what action to take in case of a rowid collision + onError = int32((*Table)(unsafe.Pointer(pTab)).FkeyConf) + if int32(overrideError) != OE_Default { + onError = int32(overrideError) + } else if onError == OE_Default { + onError = OE_Abort + } + + // figure out whether or not upsert applies in this case + if pUpsert != 0 { + pUpsertClause = Xsqlite3UpsertOfIndex(tls, pUpsert, uintptr(0)) + if pUpsertClause != uintptr(0) { + if int32((*Upsert)(unsafe.Pointer(pUpsertClause)).FisDoUpdate) == 0 { + onError = OE_Ignore // DO NOTHING is the same as INSERT OR IGNORE + } else { + onError = OE_Update // DO UPDATE + } + } + if pUpsertClause != pUpsert { + // The first ON CONFLICT clause has a conflict target other than + // the IPK. We have to jump ahead to that first ON CONFLICT clause + // and then come back here and deal with the IPK afterwards + upsertIpkDelay = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + } + } + + // If the response to a rowid conflict is REPLACE but the response + // to some other UNIQUE constraint is FAIL or IGNORE, then we need + // to defer the running of the rowid conflict checking until after + // the UNIQUE constraints have run. + if onError == OE_Replace && + onError != int32(overrideError) && + (*Table)(unsafe.Pointer(pTab)).FpIndex != 0 && + !(upsertIpkDelay != 0) { + ipkTop = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + 1 + + } + + if isUpdate != 0 { + // pkChng!=0 does not mean that the rowid has changed, only that + // it might have changed. Skip the conflict logic below if the rowid + // is unchanged. + Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regNewData, addrRowidOk, regOldData) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) + + } + + // Check to see if the new rowid already exists in the table. Skip + // the following conflict logic if it does not. + + Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iDataCur, addrRowidOk, regNewData) + + switch onError { + default: + { + onError = OE_Abort + + } + fallthrough + case OE_Rollback: + fallthrough + case OE_Abort: + fallthrough + case OE_Fail: + { + + Xsqlite3RowidConstraint(tls, pParse, onError, pTab) + break + + } + fallthrough + case OE_Replace: + { + // If there are DELETE triggers on this table and the + // recursive-triggers flag is set, call GenerateRowDelete() to + // remove the conflicting row from the table. This will fire + // the triggers and remove both the table and index b-tree entries. + // + // Otherwise, if there are no triggers or the recursive-triggers + // flag is not set, but the table has one or more indexes, call + // GenerateRowIndexDelete(). This removes the index b-tree entries + // only. The table b-tree entry will be replaced by the new entry + // when it is inserted. + // + // If either GenerateRowDelete() or GenerateRowIndexDelete() is called, + // also invoke MultiWrite() to indicate that this VDBE may require + // statement rollback (if the statement is aborted after the delete + // takes place). Earlier versions called sqlite3MultiWrite() regardless, + // but being more selective here allows statements like: + // + // REPLACE INTO t(rowid) VALUES($newrowid) + // + // to run without a statement journal if there are no indexes on the + // table. + if regTrigCnt != 0 { + Xsqlite3MultiWrite(tls, pParse) + Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, iDataCur, iIdxCur, + regNewData, int16(1), uint8(0), uint8(OE_Replace), uint8(1), -1) + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regTrigCnt, 1) // incr trigger cnt + nReplaceTrig++ + } else { + + // This OP_Delete opcode fires the pre-update-hook only. It does + // not modify the b-tree. It is more efficient to let the coming + // OP_Insert replace the existing entry than it is to delete the + // existing entry and then insert a new one. + Xsqlite3VdbeAddOp2(tls, v, OP_Delete, iDataCur, OPFLAG_ISNOOP) + Xsqlite3VdbeAppendP4(tls, v, pTab, -6) + if (*Table)(unsafe.Pointer(pTab)).FpIndex != 0 { + Xsqlite3MultiWrite(tls, pParse) + Xsqlite3GenerateRowIndexDelete(tls, pParse, pTab, iDataCur, iIdxCur, uintptr(0), -1) + } + } + seenReplace = 1 + break + + } + fallthrough + case OE_Update: + { + Xsqlite3UpsertDoUpdate(tls, pParse, pUpsert, pTab, uintptr(0), iDataCur) + + } + fallthrough + case OE_Ignore: + { + + Xsqlite3VdbeGoto(tls, v, ignoreDest) + break + + } + } + Xsqlite3VdbeResolveLabel(tls, v, addrRowidOk) + if pUpsert != 0 && pUpsertClause != pUpsert { + upsertIpkReturn = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + } else if ipkTop != 0 { + ipkBottom = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + Xsqlite3VdbeJumpHere(tls, v, ipkTop-1) + } + } + + // Test all UNIQUE constraints by creating entries for each UNIQUE + // index and making sure that duplicate entries do not already exist. + // Compute the revised record entries for indices as we go. + // + // This loop also handles the case of the PRIMARY KEY index for a + // WITHOUT ROWID table. + for pIdx = indexIteratorFirst(tls, bp+16, bp+40); pIdx != 0; pIdx = indexIteratorNext(tls, bp+16, bp+40) { + var regIdx int32 // Range of registers hold conent for pIdx + var regR int32 // Range of registers holding conflicting PK + var iThisCur int32 // Cursor for this UNIQUE index + var addrUniqueOk int32 // Jump here if the UNIQUE constraint is satisfied + var addrConflictCk int32 // First opcode in the conflict check logic + + if *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40)))*4)) == 0 { + continue + } // Skip indices that do not change + if pUpsert != 0 { + pUpsertClause = Xsqlite3UpsertOfIndex(tls, pUpsert, pIdx) + if upsertIpkDelay != 0 && pUpsertClause == pUpsert { + Xsqlite3VdbeJumpHere(tls, v, upsertIpkDelay) + } + } + addrUniqueOk = Xsqlite3VdbeMakeLabel(tls, pParse) + if int32(bAffinityDone) == 0 { + Xsqlite3TableAffinity(tls, v, pTab, regNewData+1) + bAffinityDone = U8(1) + } + + iThisCur = iIdxCur + *(*int32)(unsafe.Pointer(bp + 40)) + + // Skip partial indices for which the WHERE clause is not true + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4))) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -(regNewData + 1) + Xsqlite3ExprIfFalseDup(tls, pParse, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, addrUniqueOk, + SQLITE_JUMPIFNULL) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 + } + + // Create a record for this index entry as it should appear after + // the insert or update. Store that record in the aRegIdx[ix] register + regIdx = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40)))*4)) + 1 + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var iField int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var x int32 + if iField == -2 { + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -(regNewData + 1) + Xsqlite3ExprCodeCopy(tls, pParse, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(i)*32)).FpExpr, regIdx+i) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 + + } else if iField == -1 || iField == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { + x = regNewData + Xsqlite3VdbeAddOp2(tls, v, OP_IntCopy, x, regIdx+i) + + } else { + + x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iField))) + regNewData + 1 + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, x, regIdx+i) + + } + } + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnColumn), *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4))) + + // In an UPDATE operation, if this index is the PRIMARY KEY index + // of a WITHOUT ROWID table and there has been no change the + // primary key, then no collision is possible. The collision detection + // logic below can all be skipped. + if isUpdate != 0 && pPk == pIdx && int32(pkChng) == 0 { + Xsqlite3VdbeResolveLabel(tls, v, addrUniqueOk) + continue + } + + // Find out what action to take in case there is a uniqueness conflict + onError = int32((*Index)(unsafe.Pointer(pIdx)).FonError) + if onError == OE_None { + Xsqlite3VdbeResolveLabel(tls, v, addrUniqueOk) + continue // pIdx is not a UNIQUE index + } + if int32(overrideError) != OE_Default { + onError = int32(overrideError) + } else if onError == OE_Default { + onError = OE_Abort + } + + // Figure out if the upsert clause applies to this index + if pUpsertClause != 0 { + if int32((*Upsert)(unsafe.Pointer(pUpsertClause)).FisDoUpdate) == 0 { + onError = OE_Ignore // DO NOTHING is the same as INSERT OR IGNORE + } else { + onError = OE_Update // DO UPDATE + } + } + + // Collision detection may be omitted if all of the following are true: + // (1) The conflict resolution algorithm is REPLACE + // (2) The table is a WITHOUT ROWID table + // (3) There are no secondary indexes on the table + // (4) No delete triggers need to be fired if there is a conflict + // (5) No FK constraint counters need to be updated if a conflict occurs. + // + // This is not possible for ENABLE_PREUPDATE_HOOK builds, as the row + // must be explicitly deleted in order to ensure any pre-update hook + // is invoked. + + // Check to see if the new index entry will be unique + + addrConflictCk = Xsqlite3VdbeAddOp4Int(tls, v, OP_NoConflict, iThisCur, addrUniqueOk, + regIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) + + // Generate code to handle collisions + if pIdx == pPk { + regR = regIdx + } else { + regR = Xsqlite3GetTempRange(tls, pParse, nPkField) + } + if isUpdate != 0 || onError == OE_Replace { + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + Xsqlite3VdbeAddOp2(tls, v, OP_IdxRowid, iThisCur, regR) + // Conflict only if the rowid of the existing index entry + // is different from old-rowid + if isUpdate != 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regR, addrUniqueOk, regOldData) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) + + } + } else { + var x int32 + // Extract the PRIMARY KEY from the end of the index entry and + // store it in registers regR..regR+nPk-1 + if pIdx != pPk { + for i = 0; i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); i++ { + + x = int32(Xsqlite3TableColumnToIndex(tls, pIdx, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iThisCur, x, regR+i) + + } + } + if isUpdate != 0 { + // If currently processing the PRIMARY KEY of a WITHOUT ROWID + // table, only conflict if the new PRIMARY KEY values are actually + // different from the old. + // + // For a UNIQUE index, only conflict if the PRIMARY KEY values + // of the matched index row are different from the original PRIMARY + // KEY values of this row before the update. + var addrJump int32 = Xsqlite3VdbeCurrentAddr(tls, v) + int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + var op int32 = OP_Ne + var regCmp int32 = func() int32 { + if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + return regIdx + } + return regR + }() + + for i = 0; i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); i++ { + var p4 uintptr = Xsqlite3LocateCollSeq(tls, pParse, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8))) + x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))) + + if i == int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)-1 { + addrJump = addrUniqueOk + op = OP_Eq + } + x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(x))) + Xsqlite3VdbeAddOp4(tls, v, op, + regOldData+1+x, addrJump, regCmp+i, p4, -2) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) + + } + } + } + } + + // Generate code that executes if the new index entry is not unique + + switch onError { + case OE_Rollback: + fallthrough + case OE_Abort: + fallthrough + case OE_Fail: + { + + Xsqlite3UniqueConstraint(tls, pParse, onError, pIdx) + break + + } + case OE_Update: + { + Xsqlite3UpsertDoUpdate(tls, pParse, pUpsert, pTab, pIdx, iIdxCur+*(*int32)(unsafe.Pointer(bp + 40))) + + } + fallthrough + case OE_Ignore: + { + + Xsqlite3VdbeGoto(tls, v, ignoreDest) + break + + } + default: + { + var nConflictCk int32 // Number of opcodes in conflict check logic + + nConflictCk = Xsqlite3VdbeCurrentAddr(tls, v) - addrConflictCk + + if regTrigCnt != 0 { + Xsqlite3MultiWrite(tls, pParse) + nReplaceTrig++ + } + if pTrigger != 0 && isUpdate != 0 { + Xsqlite3VdbeAddOp1(tls, v, OP_CursorLock, iDataCur) + } + Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, iDataCur, iIdxCur, + regR, int16(nPkField), uint8(0), uint8(OE_Replace), + func() uint8 { + if pIdx == pPk { + return uint8(ONEPASS_SINGLE) + } + return uint8(ONEPASS_OFF) + }(), iThisCur) + if pTrigger != 0 && isUpdate != 0 { + Xsqlite3VdbeAddOp1(tls, v, OP_CursorUnlock, iDataCur) + } + if regTrigCnt != 0 { + var addrBypass int32 // Jump destination to bypass recheck logic + + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regTrigCnt, 1) // incr trigger cnt + addrBypass = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) // Bypass recheck + + // Here we insert code that will be invoked after all constraint + // checks have run, if and only if one or more replace triggers + // fired. + Xsqlite3VdbeResolveLabel(tls, v, lblRecheckOk) + lblRecheckOk = Xsqlite3VdbeMakeLabel(tls, pParse) + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + // Bypass the recheck if this partial index is not defined + // for the current row + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regIdx-1, lblRecheckOk) + + } + // Copy the constraint check code from above, except change + // the constraint-ok jump destination to be the address of + // the next retest block + for nConflictCk > 0 { + // var x VdbeOp at bp+48, 24 + // Conflict check opcode to copy + // The sqlite3VdbeAddOp4() call might reallocate the opcode array. + // Hence, make a complete copy of the opcode, rather than using + // a pointer to the opcode. + *(*VdbeOp)(unsafe.Pointer(bp + 48 /* x */)) = *(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, addrConflictCk))) + if int32((*VdbeOp)(unsafe.Pointer(bp+48)).Fopcode) != OP_IdxRowid { + var p2 int32 // New P2 value for copied conflict check opcode + var zP4 uintptr + if int32(Xsqlite3OpcodeProperty[(*VdbeOp)(unsafe.Pointer(bp+48)).Fopcode])&OPFLG_JUMP != 0 { + p2 = lblRecheckOk + } else { + p2 = (*VdbeOp)(unsafe.Pointer(bp + 48 /* &x */)).Fp2 + } + if int32((*VdbeOp)(unsafe.Pointer(bp+48)).Fp4type) == -3 { + zP4 = uintptr(int64(*(*int32)(unsafe.Pointer(bp + 48 + 16)))) + } else { + zP4 = *(*uintptr)(unsafe.Pointer(bp + 48 + 16)) + } + Xsqlite3VdbeAddOp4(tls, v, int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fopcode), (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp1, p2, (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp3, zP4, int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp4type)) + Xsqlite3VdbeChangeP5(tls, v, (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp5) + + } + nConflictCk-- + addrConflictCk++ + } + // If the retest fails, issue an abort + Xsqlite3UniqueConstraint(tls, pParse, OE_Abort, pIdx) + + Xsqlite3VdbeJumpHere(tls, v, addrBypass) // Terminate the recheck bypass + } + seenReplace = 1 + break + + } + } + Xsqlite3VdbeResolveLabel(tls, v, addrUniqueOk) + if regR != regIdx { + Xsqlite3ReleaseTempRange(tls, pParse, regR, nPkField) + } + if pUpsertClause != 0 && + upsertIpkReturn != 0 && + Xsqlite3UpsertNextIsIPK(tls, pUpsertClause) != 0 { + Xsqlite3VdbeGoto(tls, v, upsertIpkDelay+1) + Xsqlite3VdbeJumpHere(tls, v, upsertIpkReturn) + upsertIpkReturn = 0 + } + } + + // If the IPK constraint is a REPLACE, run it last + if ipkTop != 0 { + Xsqlite3VdbeGoto(tls, v, ipkTop) + + Xsqlite3VdbeJumpHere(tls, v, ipkBottom) + } + + // Recheck all uniqueness constraints after replace triggers have run + + if nReplaceTrig != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regTrigCnt, lblRecheckOk) + + if !(pPk != 0) { + if isUpdate != 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regNewData, addrRecheck, regOldData) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) + + } + Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iDataCur, addrRecheck, regNewData) + + Xsqlite3RowidConstraint(tls, pParse, OE_Abort, pTab) + } else { + Xsqlite3VdbeGoto(tls, v, addrRecheck) + } + Xsqlite3VdbeResolveLabel(tls, v, lblRecheckOk) + } + + // Generate the table record + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + var regRec int32 = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4)) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regNewData+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol), regRec) + + if !(bAffinityDone != 0) { + Xsqlite3TableAffinity(tls, v, pTab, 0) + } + } + + *(*int32)(unsafe.Pointer(pbMayReplace)) = seenReplace + +} + +// Table pTab is a WITHOUT ROWID table that is being written to. The cursor +// number is iCur, and register regData contains the new record for the +// PK index. This function adds code to invoke the pre-update hook, +// if one is registered. +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var r int32 = Xsqlite3GetTempReg(tls, pParse) + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, r) + Xsqlite3VdbeAddOp4(tls, v, OP_Insert, iCur, regData, r, pTab, -6) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_ISNOOP)) + Xsqlite3ReleaseTempReg(tls, pParse, r) +} + +// This routine generates code to finish the INSERT or UPDATE operation +// that was started by a prior call to sqlite3GenerateConstraintChecks. +// A consecutive range of registers starting at regNewData contains the +// rowid and the content to be inserted. +// +// The arguments to this routine should be the same as the first six +// arguments to sqlite3GenerateConstraintChecks. +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ + var v uintptr // Prepared statements under construction + var pIdx uintptr // An index being inserted or updated + var pik_flags U8 // flag values passed to the btree insert + var i int32 // Loop counter + + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + // This table is not a VIEW + i = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__1: + if !(pIdx != 0) { + goto __3 + } + { + // All REPLACE indexes are at the end of the list + + if *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) == 0 { + goto __2 + } + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)), Xsqlite3VdbeCurrentAddr(tls, v)+2) + + } + pik_flags = func() uint8 { + if useSeekResult != 0 { + return uint8(OPFLAG_USESEEKRESULT) + } + return uint8(0) + }() + if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + pik_flags = U8(int32(pik_flags) | OPFLAG_NCHANGE) + pik_flags = U8(int32(pik_flags) | update_flags&OPFLAG_SAVEPOSITION) + if update_flags == 0 { + codeWithoutRowidPreupdate(tls, pParse, pTab, iIdxCur+i, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4))) + } + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iIdxCur+i, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)), + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4))+1, + func() int32 { + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { + return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + } + return int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + }()) + Xsqlite3VdbeChangeP5(tls, v, uint16(pik_flags)) + + } + goto __2 +__2: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + i++ + goto __1 + goto __3 +__3: + ; + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + return + } + if (*Parse)(unsafe.Pointer(pParse)).Fnested != 0 { + pik_flags = U8(0) + } else { + pik_flags = U8(OPFLAG_NCHANGE) + pik_flags = U8(int32(pik_flags) | func() int32 { + if update_flags != 0 { + return update_flags + } + return OPFLAG_LASTROWID + }()) + } + if appendBias != 0 { + pik_flags = U8(int32(pik_flags) | OPFLAG_APPEND) + } + if useSeekResult != 0 { + pik_flags = U8(int32(pik_flags) | OPFLAG_USESEEKRESULT) + } + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iDataCur, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)), regNewData) + if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { + Xsqlite3VdbeAppendP4(tls, v, pTab, -6) + } + Xsqlite3VdbeChangeP5(tls, v, uint16(pik_flags)) +} + +// Allocate cursors for the pTab table and all its indices and generate +// code to open and initialized those cursors. +// +// The cursor for the object that contains the complete data (normally +// the table itself, but the PRIMARY KEY index in the case of a WITHOUT +// ROWID table) is returned in *piDataCur. The first index cursor is +// returned in *piIdxCur. The number of indices is returned. +// +// Use iBase as the first cursor (either the *piDataCur for rowid tables +// or the first index for WITHOUT ROWID tables) if it is non-negative. +// If iBase is negative, then allocate the next available cursor. +// +// For a rowid table, *piDataCur will be exactly one less than *piIdxCur. +// For a WITHOUT ROWID table, *piDataCur will be somewhere in the range +// of *piIdxCurs, depending on where the PRIMARY KEY index appears on the +// pTab->pIndex list. +// +// If pTab is a virtual table, then this routine is a no-op and the +// *piDataCur and *piIdxCur values are left uninitialized. +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ + var i int32 + var iDb int32 + var iDataCur int32 + var pIdx uintptr + var v uintptr + + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + // This routine is a no-op for virtual tables. Leave the output + // variables *piDataCur and *piIdxCur set to illegal cursor numbers + // for improved error detection. + *(*int32)(unsafe.Pointer(piDataCur)) = libc.AssignPtrInt32(piIdxCur, -999) + return 0 + } + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + if iBase < 0 { + iBase = (*Parse)(unsafe.Pointer(pParse)).FnTab + } + iDataCur = libc.PostIncInt32(&iBase, 1) + if piDataCur != 0 { + *(*int32)(unsafe.Pointer(piDataCur)) = iDataCur + } + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) && (aToOpen == uintptr(0) || *(*U8)(unsafe.Pointer(aToOpen)) != 0) { + Xsqlite3OpenTable(tls, pParse, iDataCur, iDb, pTab, op) + } else { + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(libc.Bool32(op == OP_OpenWrite)), (*Table)(unsafe.Pointer(pTab)).FzName) + } + if piIdxCur != 0 { + *(*int32)(unsafe.Pointer(piIdxCur)) = iBase + } + i = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__1: + if !(pIdx != 0) { + goto __3 + } + { + var iIdxCur int32 = libc.PostIncInt32(&iBase, 1) + + if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + if piDataCur != 0 { + *(*int32)(unsafe.Pointer(piDataCur)) = iIdxCur + } + p5 = U8(0) + } + if aToOpen == uintptr(0) || *(*U8)(unsafe.Pointer(aToOpen + uintptr(i+1))) != 0 { + Xsqlite3VdbeAddOp3(tls, v, op, iIdxCur, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) + Xsqlite3VdbeChangeP5(tls, v, uint16(p5)) + + } + + } + goto __2 +__2: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + i++ + goto __1 + goto __3 +__3: + ; + if iBase > (*Parse)(unsafe.Pointer(pParse)).FnTab { + (*Parse)(unsafe.Pointer(pParse)).FnTab = iBase + } + return i +} + +// Check to see if index pSrc is compatible as a source of data +// for index pDest in an insert transfer optimization. The rules +// for a compatible index: +// +// * The index is over the same set of columns +// * The same DESC and ASC markings occurs on all columns +// * The same onError processing (OE_Abort, OE_Ignore, etc) +// * The same collating sequence on each column +// * The index has the exact same WHERE clause +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ + var i int32 + + if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { + return 0 // Different number of columns + } + if int32((*Index)(unsafe.Pointer(pDest)).FonError) != int32((*Index)(unsafe.Pointer(pSrc)).FonError) { + return 0 // Different conflict resolution strategies + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaiColumn + uintptr(i)*2))) != int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FaiColumn + uintptr(i)*2))) { + return 0 // Different columns indexed + } + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaiColumn + uintptr(i)*2))) == -2 { + + if Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaColExpr+8+uintptr(i)*32)).FpExpr, + (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FaColExpr+8+uintptr(i)*32)).FpExpr, -1) != 0 { + return 0 // Different expressions in the index + } + } + if int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaSortOrder + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FaSortOrder + uintptr(i)))) { + return 0 // Different sort orders + } + if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FazColl + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FazColl + uintptr(i)*8))) != 0 { + return 0 // Different collating sequences + } + } + if Xsqlite3ExprCompare(tls, uintptr(0), (*Index)(unsafe.Pointer(pSrc)).FpPartIdxWhere, (*Index)(unsafe.Pointer(pDest)).FpPartIdxWhere, -1) != 0 { + return 0 // Different WHERE clauses + } + + // If no test above fails then the indices must be compatible + return 1 +} + +// Attempt the transfer optimization on INSERTs of the form +// +// INSERT INTO tab1 SELECT * FROM tab2; +// +// The xfer optimization transfers raw records from tab2 over to tab1. +// Columns are not decoded and reassembled, which greatly improves +// performance. Raw index records are transferred in the same way. +// +// The xfer optimization is only attempted if tab1 and tab2 are compatible. +// There are lots of rules for determining compatibility - see comments +// embedded in the code for details. +// +// This routine returns TRUE if the optimization is guaranteed to be used. +// Sometimes the xfer optimization will only work if the destination table +// is empty - a factor that can only be determined at run-time. In that +// case, this routine generates code for the xfer optimization but also +// does a test to see if the destination table is empty and jumps over the +// xfer optimization code if the test fails. In that case, this routine +// returns FALSE so that the caller will know to go ahead and generate +// an unoptimized transfer. This routine also returns FALSE if there +// is no chance that the xfer optimization can be applied. +// +// This optimization is particularly useful at making VACUUM run faster. +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pEList uintptr // The result set of the SELECT + var pSrc uintptr // The table in the FROM clause of SELECT + var pSrcIdx uintptr + var pDestIdx uintptr // Source and destination indices + var pItem uintptr // An element of pSelect->pSrc + var i int32 // Loop counter + var iDbSrc int32 // The database of pSrc + var iSrc int32 + var iDest int32 // Cursors from source and destination + var addr1 int32 + var addr2 int32 // Loop addresses + var emptyDestTest int32 = 0 // Address of test for empty pDest + var emptySrcTest int32 = 0 // Address of test for empty pSrc + var v uintptr // The VDBE we are building + var regAutoinc int32 // Memory register used by AUTOINC + var destHasUniqueIdx int32 = 0 // True if pDest has a UNIQUE index + var regData int32 + var regRowid int32 // Registers holding data and rowid + + if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { + // Do not attempt to process this query if there are an WITH clauses + // attached to it. Proceeding may generate a false "no such table: xxx" + // error if pSelect reads from a CTE named "xxx". + return 0 + } + if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { + return 0 // tab1 must not be a virtual table + } + if onError == OE_Default { + if int32((*Table)(unsafe.Pointer(pDest)).FiPKey) >= 0 { + onError = int32((*Table)(unsafe.Pointer(pDest)).FkeyConf) + } + if onError == OE_Default { + onError = OE_Abort + } + } + // allocated even if there is no FROM clause + if (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc)).FnSrc != 1 { + return 0 // FROM clause must have exactly one term + } + if (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc+8)).FpSelect != 0 { + return 0 // FROM clause cannot contain a subquery + } + if (*Select)(unsafe.Pointer(pSelect)).FpWhere != 0 { + return 0 // SELECT may not have a WHERE clause + } + if (*Select)(unsafe.Pointer(pSelect)).FpOrderBy != 0 { + return 0 // SELECT may not have an ORDER BY clause + } + // Do not need to test for a HAVING clause. If HAVING is present but + // there is no ORDER BY, we will get an error. + if (*Select)(unsafe.Pointer(pSelect)).FpGroupBy != 0 { + return 0 // SELECT may not have a GROUP BY clause + } + if (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0 { + return 0 // SELECT may not have a LIMIT clause + } + if (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { + return 0 // SELECT may not be a compound query + } + if (*Select)(unsafe.Pointer(pSelect)).FselFlags&U32(SF_Distinct) != 0 { + return 0 // SELECT may not be DISTINCT + } + pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList + + if (*ExprList)(unsafe.Pointer(pEList)).FnExpr != 1 { + return 0 // The result set must have exactly one column + } + + if int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr)).Fop) != TK_ASTERISK { + return 0 // The result set must be the special operator "*" + } + + // At this point we have established that the statement is of the + // correct syntactic form to participate in this optimization. Now + // we have to check the semantics. + pItem = (*Select)(unsafe.Pointer(pSelect)).FpSrc + 8 /* &.a */ + pSrc = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pItem) + if pSrc == uintptr(0) { + return 0 // FROM clause does not contain a real table + } + if (*Table)(unsafe.Pointer(pSrc)).Ftnum == (*Table)(unsafe.Pointer(pDest)).Ftnum && (*Table)(unsafe.Pointer(pSrc)).FpSchema == (*Table)(unsafe.Pointer(pDest)).FpSchema { + // Possible due to bad sqlite_schema.rootpage + return 0 // tab1 and tab2 may not be the same table + } + if libc.Bool32((*Table)(unsafe.Pointer(pDest)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) != libc.Bool32((*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + return 0 // source and destination must both be WITHOUT ROWID or not + } + if !(int32((*Table)(unsafe.Pointer(pSrc)).FeTabType) == TABTYP_NORM) { + return 0 // tab2 may not be a view or virtual table + } + if int32((*Table)(unsafe.Pointer(pDest)).FnCol) != int32((*Table)(unsafe.Pointer(pSrc)).FnCol) { + return 0 // Number of columns must be the same in tab1 and tab2 + } + if int32((*Table)(unsafe.Pointer(pDest)).FiPKey) != int32((*Table)(unsafe.Pointer(pSrc)).FiPKey) { + return 0 // Both tables must have the same INTEGER PRIMARY KEY + } + if (*Table)(unsafe.Pointer(pDest)).FtabFlags&U32(TF_Strict) != U32(0) && (*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_Strict) == U32(0) { + return 0 // Cannot feed from a non-strict into a strict table + } + for i = 0; i < int32((*Table)(unsafe.Pointer(pDest)).FnCol); i++ { + var pDestCol uintptr = (*Table)(unsafe.Pointer(pDest)).FaCol + uintptr(i)*24 + var pSrcCol uintptr = (*Table)(unsafe.Pointer(pSrc)).FaCol + uintptr(i)*24 + // Even if tables t1 and t2 have identical schemas, if they contain + // generated columns, then this statement is semantically incorrect: + // + // INSERT INTO t2 SELECT * FROM t1; + // + // The reason is that generated column values are returned by the + // the SELECT statement on the right but the INSERT statement on the + // left wants them to be omitted. + // + // Nevertheless, this is a useful notational shorthand to tell SQLite + // to do a bulk transfer all of the content from t1 over to t2. + // + // We could, in theory, disable this (except for internal use by the + // VACUUM command where it is actually needed). But why do that? It + // seems harmless enough, and provides a useful service. + if int32((*Column)(unsafe.Pointer(pDestCol)).FcolFlags)&COLFLAG_GENERATED != int32((*Column)(unsafe.Pointer(pSrcCol)).FcolFlags)&COLFLAG_GENERATED { + return 0 // Both columns have the same generated-column type + } + // But the transfer is only allowed if both the source and destination + // tables have the exact same expressions for generated columns. + // This requirement could be relaxed for VIRTUAL columns, I suppose. + if int32((*Column)(unsafe.Pointer(pDestCol)).FcolFlags)&COLFLAG_GENERATED != 0 { + if Xsqlite3ExprCompare(tls, uintptr(0), + Xsqlite3ColumnExpr(tls, pSrc, pSrcCol), + Xsqlite3ColumnExpr(tls, pDest, pDestCol), -1) != 0 { + + return 0 // Different generator expressions + } + } + if int32((*Column)(unsafe.Pointer(pDestCol)).Faffinity) != int32((*Column)(unsafe.Pointer(pSrcCol)).Faffinity) { + return 0 // Affinity must be the same on all columns + } + if Xsqlite3_stricmp(tls, Xsqlite3ColumnColl(tls, pDestCol), + Xsqlite3ColumnColl(tls, pSrcCol)) != 0 { + return 0 // Collating sequence must be the same on all columns + } + if uint32(int32(*(*uint8)(unsafe.Pointer(pDestCol + 8))&0xf>>0)) != 0 && !(int32(*(*uint8)(unsafe.Pointer(pSrcCol + 8))&0xf>>0) != 0) { + return 0 // tab2 must be NOT NULL if tab1 is + } + // Default values for second and subsequent columns need to match. + if int32((*Column)(unsafe.Pointer(pDestCol)).FcolFlags)&COLFLAG_GENERATED == 0 && i > 0 { + var pDestExpr uintptr = Xsqlite3ColumnExpr(tls, pDest, pDestCol) + var pSrcExpr uintptr = Xsqlite3ColumnExpr(tls, pSrc, pSrcCol) + + if libc.Bool32(pDestExpr == uintptr(0)) != libc.Bool32(pSrcExpr == uintptr(0)) || + pDestExpr != uintptr(0) && libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(pDestExpr + 8)), + *(*uintptr)(unsafe.Pointer(pSrcExpr + 8))) != 0 { + return 0 // Default values must be the same for all columns + } + } + } + for pDestIdx = (*Table)(unsafe.Pointer(pDest)).FpIndex; pDestIdx != 0; pDestIdx = (*Index)(unsafe.Pointer(pDestIdx)).FpNext { + if int32((*Index)(unsafe.Pointer(pDestIdx)).FonError) != OE_None { + destHasUniqueIdx = 1 + } + for pSrcIdx = (*Table)(unsafe.Pointer(pSrc)).FpIndex; pSrcIdx != 0; pSrcIdx = (*Index)(unsafe.Pointer(pSrcIdx)).FpNext { + if xferCompatibleIndex(tls, pDestIdx, pSrcIdx) != 0 { + break + } + } + if pSrcIdx == uintptr(0) { + return 0 // pDestIdx has no corresponding index in pSrc + } + if (*Index)(unsafe.Pointer(pSrcIdx)).Ftnum == (*Index)(unsafe.Pointer(pDestIdx)).Ftnum && (*Table)(unsafe.Pointer(pSrc)).FpSchema == (*Table)(unsafe.Pointer(pDest)).FpSchema && + Xsqlite3FaultSim(tls, 411) == SQLITE_OK { + // The sqlite3FaultSim() call allows this corruption test to be + // bypassed during testing, in order to exercise other corruption tests + // further downstream. + return 0 // Corrupt schema - two indexes on the same btree + } + } + if (*Table)(unsafe.Pointer(pDest)).FpCheck != 0 && Xsqlite3ExprListCompare(tls, (*Table)(unsafe.Pointer(pSrc)).FpCheck, (*Table)(unsafe.Pointer(pDest)).FpCheck, -1) != 0 { + return 0 // Tables have different CHECK constraints. Ticket #2252 + } + // Disallow the transfer optimization if the destination table constains + // any foreign key constraints. This is more restrictive than necessary. + // But the main beneficiary of the transfer optimization is the VACUUM + // command, and the VACUUM command disables foreign key constraints. So + // the extra complication to make this rule less restrictive is probably + // not worth the effort. Ticket [6284df89debdfa61db8073e062908af0c9b6118e] + + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != uint64(0) && *(*uintptr)(unsafe.Pointer(pDest + 64 + 8)) != uintptr(0) { + return 0 + } + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00001))<<32) != uint64(0) { + return 0 // xfer opt does not play well with PRAGMA count_changes + } + + // If we get this far, it means that the xfer optimization is at + // least a possibility, though it might only work if the destination + // table (tab1) is initially empty. + iDbSrc = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pSrc)).FpSchema) + v = Xsqlite3GetVdbe(tls, pParse) + Xsqlite3CodeVerifySchema(tls, pParse, iDbSrc) + iSrc = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + iDest = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + regAutoinc = autoIncBegin(tls, pParse, iDbDest, pDest) + regData = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regData) + regRowid = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3OpenTable(tls, pParse, iDest, iDbDest, pDest, OP_OpenWrite) + + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) && (int32((*Table)(unsafe.Pointer(pDest)).FiPKey) < 0 && (*Table)(unsafe.Pointer(pDest)).FpIndex != uintptr(0) || + destHasUniqueIdx != 0 || + onError != OE_Abort && onError != OE_Rollback) { + // In some circumstances, we are able to run the xfer optimization + // only if the destination table is initially empty. Unless the + // DBFLAG_Vacuum flag is set, this block generates code to make + // that determination. If DBFLAG_Vacuum is set, then the destination + // table is always empty. + // + // Conditions under which the destination must be empty: + // + // (1) There is no INTEGER PRIMARY KEY but there are indices. + // (If the destination is not initially empty, the rowid fields + // of index entries might need to change.) + // + // (2) The destination has a unique index. (The xfer optimization + // is unable to test uniqueness.) + // + // (3) onError is something other than OE_Abort and OE_Rollback. + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iDest, 0) + emptyDestTest = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + Xsqlite3VdbeJumpHere(tls, v, addr1) + } + if (*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + var insFlags U8 + Xsqlite3OpenTable(tls, pParse, iSrc, iDbSrc, pSrc, OP_OpenRead) + emptySrcTest = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iSrc, 0) + if int32((*Table)(unsafe.Pointer(pDest)).FiPKey) >= 0 { + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iSrc, regRowid) + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { + + addr2 = Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iDest, 0, regRowid) + + Xsqlite3RowidConstraint(tls, pParse, onError, pDest) + Xsqlite3VdbeJumpHere(tls, v, addr2) + } + autoIncStep(tls, pParse, regAutoinc, regRowid) + } else if (*Table)(unsafe.Pointer(pDest)).FpIndex == uintptr(0) && !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_VacuumInto) != 0) { + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iDest, regRowid) + } else { + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iSrc, regRowid) + + } + + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) != 0 { + Xsqlite3VdbeAddOp1(tls, v, OP_SeekEnd, iDest) + insFlags = U8(OPFLAG_APPEND | OPFLAG_USESEEKRESULT | OPFLAG_PREFORMAT) + } else { + insFlags = U8(OPFLAG_NCHANGE | OPFLAG_LASTROWID | OPFLAG_APPEND | OPFLAG_PREFORMAT) + } + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { + Xsqlite3VdbeAddOp3(tls, v, OP_RowData, iSrc, regData, 1) + insFlags = libc.Uint8FromInt32(int32(insFlags) & libc.CplInt32(OPFLAG_PREFORMAT)) + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_RowCell, iDest, iSrc, regRowid) + } + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iDest, regData, regRowid) + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { + Xsqlite3VdbeChangeP4(tls, v, -1, pDest, -6) + } + Xsqlite3VdbeChangeP5(tls, v, uint16(insFlags)) + + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iSrc, addr1) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, iSrc, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, iDest, 0) + } else { + Xsqlite3TableLock(tls, pParse, iDbDest, (*Table)(unsafe.Pointer(pDest)).Ftnum, uint8(1), (*Table)(unsafe.Pointer(pDest)).FzName) + Xsqlite3TableLock(tls, pParse, iDbSrc, (*Table)(unsafe.Pointer(pSrc)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pSrc)).FzName) + } + for pDestIdx = (*Table)(unsafe.Pointer(pDest)).FpIndex; pDestIdx != 0; pDestIdx = (*Index)(unsafe.Pointer(pDestIdx)).FpNext { + var idxInsFlags U8 = U8(0) + for pSrcIdx = (*Table)(unsafe.Pointer(pSrc)).FpIndex; pSrcIdx != 0; pSrcIdx = (*Index)(unsafe.Pointer(pSrcIdx)).FpNext { + if xferCompatibleIndex(tls, pDestIdx, pSrcIdx) != 0 { + break + } + } + + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iSrc, int32((*Index)(unsafe.Pointer(pSrcIdx)).Ftnum), iDbSrc) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pSrcIdx) + + Xsqlite3VdbeAddOp3(tls, v, OP_OpenWrite, iDest, int32((*Index)(unsafe.Pointer(pDestIdx)).Ftnum), iDbDest) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pDestIdx) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_BULKCSR)) + + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iSrc, 0) + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) != 0 { + // This INSERT command is part of a VACUUM operation, which guarantees + // that the destination table is empty. If all indexed columns use + // collation sequence BINARY, then it can also be assumed that the + // index will be populated by inserting keys in strictly sorted + // order. In this case, instead of seeking within the b-tree as part + // of every OP_IdxInsert opcode, an OP_SeekEnd is added before the + // OP_IdxInsert to seek to the point within the b-tree where each key + // should be inserted. This is faster. + // + // If any of the indexed columns use a collation sequence other than + // BINARY, this optimization is disabled. This is because the user + // might change the definition of a collation sequence and then run + // a VACUUM command. In that case keys may not be written in strictly + // sorted order. + for i = 0; i < int32((*Index)(unsafe.Pointer(pSrcIdx)).FnColumn); i++ { + var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrcIdx)).FazColl + uintptr(i)*8)) + if Xsqlite3_stricmp(tls, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), zColl) != 0 { + break + } + } + if i == int32((*Index)(unsafe.Pointer(pSrcIdx)).FnColumn) { + idxInsFlags = U8(OPFLAG_USESEEKRESULT | OPFLAG_PREFORMAT) + Xsqlite3VdbeAddOp1(tls, v, OP_SeekEnd, iDest) + Xsqlite3VdbeAddOp2(tls, v, OP_RowCell, iDest, iSrc) + } + } else if !((*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pDestIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + idxInsFlags = U8(int32(idxInsFlags) | OPFLAG_NCHANGE) + } + if int32(idxInsFlags) != OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT { + Xsqlite3VdbeAddOp3(tls, v, OP_RowData, iSrc, regData, 1) + if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) && + !((*Table)(unsafe.Pointer(pDest)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && + int32(*(*uint16)(unsafe.Pointer(pDestIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + codeWithoutRowidPreupdate(tls, pParse, pDest, iDest, regData) + } + } + Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, iDest, regData) + Xsqlite3VdbeChangeP5(tls, v, uint16(int32(idxInsFlags)|OPFLAG_APPEND)) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iSrc, addr1+1) + Xsqlite3VdbeJumpHere(tls, v, addr1) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, iSrc, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, iDest, 0) + } + if emptySrcTest != 0 { + Xsqlite3VdbeJumpHere(tls, v, emptySrcTest) + } + Xsqlite3ReleaseTempReg(tls, pParse, regRowid) + Xsqlite3ReleaseTempReg(tls, pParse, regData) + if emptyDestTest != 0 { + Xsqlite3AutoincrementEnd(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_Halt, SQLITE_OK, 0) + Xsqlite3VdbeJumpHere(tls, v, emptyDestTest) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, iDest, 0) + return 0 + } else { + return 1 + } + return int32(0) +} + +//************* End of insert.c ********************************************* +//************* Begin file legacy.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// Main file for the SQLite library. The routines in this file +// implement the programmer interface to the library. Routines in +// other files are for internal use by SQLite and should not be +// accessed by users of the library. + +// #include "sqliteInt.h" + +// Execute SQL code. Return one of the SQLITE_ success/failure +// codes. Also write an error message into memory obtained from +// malloc() and make *pzErrMsg point to that message. +// +// If the SQL is a query, then for each row in the query result +// the xCallback() function is called. pArg becomes the first +// argument to xCallback(). If xCallback=NULL then no callback +// is invoked, even for queries. +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 // Return code + // var zLeftover uintptr at bp+8, 8 + // Tail of unprocessed SQL + // var pStmt uintptr at bp, 8 + // The current SQL statement + var azCols uintptr // Names of result columns + var callbackIsInit int32 + var i int32 + var nCol int32 + var azVals uintptr + rc = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + azCols = uintptr(0) // True if callback data is initialized + + if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { + goto __1 + } + return Xsqlite3MisuseError(tls, 128091) +__1: + ; + if !(zSql == uintptr(0)) { + goto __2 + } + zSql = ts + 1525 /* "" */ +__2: + ; + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + Xsqlite3Error(tls, db, SQLITE_OK) +__3: + if !(rc == SQLITE_OK && *(*uint8)(unsafe.Pointer(zSql)) != 0) { + goto __4 + } + nCol = 0 + azVals = uintptr(0) + + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp, bp+8) + + if !(rc != SQLITE_OK) { + goto __5 + } + goto __3 +__5: + ; + if !!(*(*uintptr)(unsafe.Pointer(bp)) != 0) { + goto __6 + } + // this happens for a comment or white-space + zSql = *(*uintptr)(unsafe.Pointer(bp + 8 /* zLeftover */)) + goto __3 +__6: + ; + callbackIsInit = 0 + +__7: + if !(1 != 0) { + goto __8 + } + rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + + // Invoke the callback function if required + if !(xCallback != 0 && (SQLITE_ROW == rc || SQLITE_DONE == rc && !(callbackIsInit != 0) && + (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NullCallback) != 0)) { + goto __9 + } + if !!(callbackIsInit != 0) { + goto __10 + } + nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + azCols = Xsqlite3DbMallocRaw(tls, db, uint64(uint64(2*nCol+1)*uint64(unsafe.Sizeof(uintptr(0))))) + if !(azCols == uintptr(0)) { + goto __11 + } + goto exec_out +__11: + ; + i = 0 +__12: + if !(i < nCol) { + goto __14 + } + *(*uintptr)(unsafe.Pointer(azCols + uintptr(i)*8)) = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i) + // sqlite3VdbeSetColName() installs column names as UTF8 + // strings so there is no way for sqlite3_column_name() to fail. + + goto __13 +__13: + i++ + goto __12 + goto __14 +__14: + ; + callbackIsInit = 1 +__10: + ; + if !(rc == SQLITE_ROW) { + goto __15 + } + azVals = azCols + uintptr(nCol)*8 + i = 0 +__16: + if !(i < nCol) { + goto __18 + } + *(*uintptr)(unsafe.Pointer(azVals + uintptr(i)*8)) = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i) + if !(!(int32(*(*uintptr)(unsafe.Pointer(azVals + uintptr(i)*8))) != 0) && Xsqlite3_column_type(tls, *(*uintptr)(unsafe.Pointer(bp)), i) != SQLITE_NULL) { + goto __19 + } + Xsqlite3OomFault(tls, db) + goto exec_out +__19: + ; + goto __17 +__17: + i++ + goto __16 + goto __18 +__18: + ; + *(*uintptr)(unsafe.Pointer(azVals + uintptr(i)*8)) = uintptr(0) +__15: + ; + if !((*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, pArg, nCol, azVals, azCols) != 0) { + goto __20 + } + // EVIDENCE-OF: R-38229-40159 If the callback function to + // sqlite3_exec() returns non-zero, then sqlite3_exec() will + // return SQLITE_ABORT. + rc = SQLITE_ABORT + Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + Xsqlite3Error(tls, db, SQLITE_ABORT) + goto exec_out +__20: + ; +__9: + ; + + if !(rc != SQLITE_ROW) { + goto __21 + } + rc = Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + zSql = *(*uintptr)(unsafe.Pointer(bp + 8 /* zLeftover */)) +__22: + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zSql)))])&0x01 != 0) { + goto __23 + } + zSql++ + goto __22 +__23: + ; + goto __8 +__21: + ; + goto __7 +__8: + ; + + Xsqlite3DbFree(tls, db, azCols) + azCols = uintptr(0) + goto __3 +__4: + ; + +exec_out: + if !(*(*uintptr)(unsafe.Pointer(bp)) != 0) { + goto __24 + } + Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) +__24: + ; + Xsqlite3DbFree(tls, db, azCols) + + rc = Xsqlite3ApiExit(tls, db, rc) + if !(rc != SQLITE_OK && pzErrMsg != 0) { + goto __25 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3DbStrDup(tls, uintptr(0), Xsqlite3_errmsg(tls, db)) + if !(*(*uintptr)(unsafe.Pointer(pzErrMsg)) == uintptr(0)) { + goto __27 + } + rc = SQLITE_NOMEM + Xsqlite3Error(tls, db, SQLITE_NOMEM) +__27: + ; + goto __26 +__25: + if !(pzErrMsg != 0) { + goto __28 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0) +__28: + ; +__26: + ; + + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// This is the function signature used for all extension entry points. It +// is also defined in the file "loadext.c". +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ + +// The following macros redefine the API routines so that they are +// redirected through the global sqlite3_api structure. +// +// This header file is also used by the loadext.c source file +// (part of the main SQLite library - not an extension) so that +// it can get access to the sqlite3_api_routines structure +// definition. But the main library does not want to redefine +// the API. So the redefinition macros are only valid if the +// SQLITE_CORE macros is undefined. + +// This case when the file is being statically linked into the +// application + +//************* End of sqlite3ext.h ***************************************** +//************* Continuing where we left off in loadext.c ******************* +// #include "sqliteInt.h" + +// Some API routines are omitted when various features are +// excluded from a build of SQLite. Substitute a NULL pointer +// for any missing APIs. + +// The following structure contains pointers to all SQLite API routines. +// A pointer to this structure is passed into extensions when they are +// loaded so that the extension can make calls back into the SQLite +// library. +// +// When adding new APIs, add them to the bottom of this structure +// in order to preserve backwards compatibility. +// +// Extensions that use newer APIs should first call the +// sqlite3_libversion_number() to make sure that the API they +// intend to use is supported by the library. Extensions should +// also check to make sure that the pointer to the function is +// not NULL before calling it. +var sqlite3Apis = Sqlite3_api_routines{ + Faggregate_context: 0, + Faggregate_count: 0, + Fbind_blob: 0, + Fbind_double: 0, + Fbind_int: 0, + Fbind_int64: 0, + Fbind_null: 0, + Fbind_parameter_count: 0, + Fbind_parameter_index: 0, + Fbind_parameter_name: 0, + Fbind_text: 0, + Fbind_text16: 0, + Fbind_value: 0, + Fbusy_handler: 0, + Fbusy_timeout: 0, + Fchanges: 0, + Fclose: 0, + Fcollation_needed: 0, + Fcollation_needed16: 0, + Fcolumn_blob: 0, + Fcolumn_bytes: 0, + Fcolumn_bytes16: 0, + Fcolumn_count: 0, + Fcolumn_database_name: 0, + Fcolumn_database_name16: 0, + Fcolumn_decltype: 0, + Fcolumn_decltype16: 0, + Fcolumn_double: 0, + Fcolumn_int: 0, + Fcolumn_int64: 0, + Fcolumn_name: 0, + Fcolumn_name16: 0, + Fcolumn_origin_name: 0, + Fcolumn_origin_name16: 0, + Fcolumn_table_name: 0, + Fcolumn_table_name16: 0, + Fcolumn_text: 0, + Fcolumn_text16: 0, + Fcolumn_type: 0, + Fcolumn_value: 0, + Fcommit_hook: 0, + Fcomplete: 0, + Fcomplete16: 0, + Fcreate_collation: 0, + Fcreate_collation16: 0, + Fcreate_function: 0, + Fcreate_function16: 0, + Fcreate_module: 0, + Fdata_count: 0, + Fdb_handle: 0, + Fdeclare_vtab: 0, + Fenable_shared_cache: 0, + Ferrcode: 0, + Ferrmsg: 0, + Ferrmsg16: 0, + Fexec: 0, + Fexpired: 0, + Ffinalize: 0, + Ffree: 0, + Ffree_table: 0, + Fget_autocommit: 0, + Fget_auxdata: 0, + Fget_table: 0, // Was sqlite3_global_recover(), but that function is deprecated + Finterruptx: 0, + Flast_insert_rowid: 0, + Flibversion: 0, + Flibversion_number: 0, + Fmalloc: 0, + Fmprintf: 0, + Fopen: 0, + Fopen16: 0, + Fprepare: 0, + Fprepare16: 0, + Fprofile: 0, + Fprogress_handler: 0, + Frealloc: 0, + Freset: 0, + Fresult_blob: 0, + Fresult_double: 0, + Fresult_error: 0, + Fresult_error16: 0, + Fresult_int: 0, + Fresult_int64: 0, + Fresult_null: 0, + Fresult_text: 0, + Fresult_text16: 0, + Fresult_text16be: 0, + Fresult_text16le: 0, + Fresult_value: 0, + Frollback_hook: 0, + Fset_authorizer: 0, + Fset_auxdata: 0, + Fxsnprintf: 0, + Fstep: 0, + Ftable_column_metadata: 0, + Fthread_cleanup: 0, + Ftotal_changes: 0, + Ftrace: 0, + Ftransfer_bindings: 0, + Fupdate_hook: 0, + Fuser_data: 0, + Fvalue_blob: 0, + Fvalue_bytes: 0, + Fvalue_bytes16: 0, + Fvalue_double: 0, + Fvalue_int: 0, + Fvalue_int64: 0, + Fvalue_numeric_type: 0, + Fvalue_text: 0, + Fvalue_text16: 0, + Fvalue_text16be: 0, + Fvalue_text16le: 0, + Fvalue_type: 0, + Fvmprintf: 0, + // The original API set ends here. All extensions can call any + // of the APIs above provided that the pointer is not NULL. But + // before calling APIs that follow, extension should check the + // sqlite3_libversion_number() to make sure they are dealing with + // a library that is new enough to support that API. + // + Foverload_function: 0, + + // Added after 3.3.13 + Fprepare_v2: 0, + Fprepare16_v2: 0, + Fclear_bindings: 0, + + // Added for 3.4.1 + Fcreate_module_v2: 0, + + // Added for 3.5.0 + Fbind_zeroblob: 0, + Fblob_bytes: 0, + Fblob_close: 0, + Fblob_open: 0, + Fblob_read: 0, + Fblob_write: 0, + Fcreate_collation_v2: 0, + Ffile_control: 0, + Fmemory_highwater: 0, + Fmemory_used: 0, + Fmutex_alloc: 0, + Fmutex_enter: 0, + Fmutex_free: 0, + Fmutex_leave: 0, + Fmutex_try: 0, + Fopen_v2: 0, + Frelease_memory: 0, + Fresult_error_nomem: 0, + Fresult_error_toobig: 0, + Fsleep: 0, + Fsoft_heap_limit: 0, + Fvfs_find: 0, + Fvfs_register: 0, + Fvfs_unregister: 0, + + // Added for 3.5.8 + Fxthreadsafe: 0, + Fresult_zeroblob: 0, + Fresult_error_code: 0, + Ftest_control: 0, + Frandomness: 0, + Fcontext_db_handle: 0, + + // Added for 3.6.0 + Fextended_result_codes: 0, + Flimit: 0, + Fnext_stmt: 0, + Fsql: 0, + Fstatus: 0, + + // Added for 3.7.4 + Fbackup_finish: 0, + Fbackup_init: 0, + Fbackup_pagecount: 0, + Fbackup_remaining: 0, + Fbackup_step: 0, + Fcompileoption_get: 0, + Fcompileoption_used: 0, + Fcreate_function_v2: 0, + Fdb_config: 0, + Fdb_mutex: 0, + Fdb_status: 0, + Fextended_errcode: 0, + Flog: 0, + Fsoft_heap_limit64: 0, + Fsourceid: 0, + Fstmt_status: 0, + Fstrnicmp: 0, + Funlock_notify: 0, + Fwal_autocheckpoint: 0, + Fwal_checkpoint: 0, + Fwal_hook: 0, + Fblob_reopen: 0, + Fvtab_config: 0, + Fvtab_on_conflict: 0, + Fclose_v2: 0, + Fdb_filename: 0, + Fdb_readonly: 0, + Fdb_release_memory: 0, + Ferrstr: 0, + Fstmt_busy: 0, + Fstmt_readonly: 0, + Fstricmp: 0, + Furi_boolean: 0, + Furi_int64: 0, + Furi_parameter: 0, + Fxvsnprintf: 0, + Fwal_checkpoint_v2: 0, + // Version 3.8.7 and later + Fauto_extension: 0, + Fbind_blob64: 0, + Fbind_text64: 0, + Fcancel_auto_extension: 0, + Fload_extension: 0, + Fmalloc64: 0, + Fmsize: 0, + Frealloc64: 0, + Freset_auto_extension: 0, + Fresult_blob64: 0, + Fresult_text64: 0, + Fstrglob: 0, + // Version 3.8.11 and later + Fvalue_dup: 0, + Fvalue_free: 0, + Fresult_zeroblob64: 0, + Fbind_zeroblob64: 0, + // Version 3.9.0 and later + Fvalue_subtype: 0, + Fresult_subtype: 0, + // Version 3.10.0 and later + Fstatus64: 0, + Fstrlike: 0, + Fdb_cacheflush: 0, + // Version 3.12.0 and later + Fsystem_errno: 0, + // Version 3.14.0 and later + Ftrace_v2: 0, + Fexpanded_sql: 0, + // Version 3.18.0 and later + Fset_last_insert_rowid: 0, + // Version 3.20.0 and later + Fprepare_v3: 0, + Fprepare16_v3: 0, + Fbind_pointer: 0, + Fresult_pointer: 0, + Fvalue_pointer: 0, + // Version 3.22.0 and later + Fvtab_nochange: 0, + Fvalue_nochange: 0, + Fvtab_collation: 0, + // Version 3.24.0 and later + Fkeyword_count: 0, + Fkeyword_name: 0, + Fkeyword_check: 0, + Fstr_new: 0, + Fstr_finish: 0, + Fstr_appendf: 0, + Fstr_vappendf: 0, + Fstr_append: 0, + Fstr_appendall: 0, + Fstr_appendchar: 0, + Fstr_reset: 0, + Fstr_errcode: 0, + Fstr_length: 0, + Fstr_value: 0, + // Version 3.25.0 and later + Fcreate_window_function: 0, + // Version 3.28.0 and later + Fstmt_isexplain: 0, + Fvalue_frombind: 0, + // Version 3.30.0 and later + Fdrop_modules: 0, + // Version 3.31.0 and later + Fhard_heap_limit64: 0, + Furi_key: 0, + Ffilename_database: 0, + Ffilename_journal: 0, + Ffilename_wal: 0, + // Version 3.32.0 and later + Fcreate_filename: 0, + Ffree_filename: 0, + Fdatabase_file_object: 0, + // Version 3.34.0 and later + Ftxn_state: 0, + // Version 3.36.1 and later + Fchanges64: 0, + Ftotal_changes64: 0, + // Version 3.37.0 and later + Fautovacuum_pages: 0, + // Version 3.38.0 and later + Ferror_offset: 0, + Fvtab_rhs_value: 0, + Fvtab_distinct: 0, + Fvtab_in: 0, + Fvtab_in_first: 0, + Fvtab_in_next: 0, +} /* sqlite3.c:129018:35 */ + +// True if x is the directory separator character + +// Attempt to load an SQLite extension library contained in the file +// zFile. The entry point is zProc. zProc may be 0 in which case a +// default entry point name (sqlite3_extension_init) is used. Use +// of the default name is recommended. +// +// Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong. +// +// If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with +// error message text. The calling function should free this memory +// by calling sqlite3DbFree(db, ). +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var pVfs uintptr + var handle uintptr + var xInit Sqlite3_loadext_entry + // var zErrmsg uintptr at bp+56, 8 + + var zEntry uintptr + var zAltEntry uintptr + var aHandle uintptr + var nMsg U64 + var ii int32 + var rc int32 + var zAltFile uintptr + var iFile int32 + var iEntry int32 + var c int32 + var ncFile int32 + pVfs = (*Sqlite3)(unsafe.Pointer(db)).FpVfs + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) = uintptr(0) + zAltEntry = uintptr(0) + nMsg = U64(libc.Xstrlen(tls, zFile)) + + if !(pzErrMsg != 0) { + goto __1 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0) +__1: + ; + + // Ticket #1863. To avoid a creating security problems for older + // applications that relink against newer versions of SQLite, the + // ability to run load_extension is turned off by default. One + // must call either sqlite3_enable_load_extension(db) or + // sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, 0) + // to turn on extension loading. + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtension) == uint64(0)) { + goto __2 + } + if !(pzErrMsg != 0) { + goto __3 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11976, 0) +__3: + ; + return SQLITE_ERROR +__2: + ; + + if zProc != 0 { + zEntry = zProc + } else { + zEntry = ts + 15786 /* "sqlite3_extensio..." */ + } + + // tag-20210611-1. Some dlopen() implementations will segfault if given + // an oversize filename. Most filesystems have a pathname limit of 4K, + // so limit the extension filename length to about twice that. + // https://sqlite.org/forum/forumpost/08a0d6d9bf + if !(nMsg > uint64(FILENAME_MAX)) { + goto __4 + } + goto extension_not_found +__4: + ; + + handle = Xsqlite3OsDlOpen(tls, pVfs, zFile) + ii = 0 +__5: + if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { + goto __7 + } + zAltFile = Xsqlite3_mprintf(tls, ts+11937, libc.VaList(bp, zFile, azEndings[ii])) + if !(zAltFile == uintptr(0)) { + goto __8 + } + return SQLITE_NOMEM +__8: + ; + handle = Xsqlite3OsDlOpen(tls, pVfs, zAltFile) + Xsqlite3_free(tls, zAltFile) + goto __6 +__6: + ii++ + goto __5 + goto __7 +__7: + ; + if !(handle == uintptr(0)) { + goto __9 + } + goto extension_not_found +__9: + ; + xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) + + // If no entry point was specified and the default legacy + // entry point name "sqlite3_extension_init" was not found, then + // construct an entry point name "sqlite3_X_init" where the X is + // replaced by the lowercase value of every ASCII alphabetic + // character in the filename after the last "/" upto the first ".", + // and eliding the first three characters if they are "lib". + // Examples: + // + // /usr/local/lib/libExample5.4.3.so ==> sqlite3_example_init + // C:/lib/mathfuncs.dll ==> sqlite3_mathfuncs_init + if !(xInit == uintptr(0) && zProc == uintptr(0)) { + goto __10 + } + ncFile = Xsqlite3Strlen30(tls, zFile) + zAltEntry = Xsqlite3_malloc64(tls, uint64(ncFile+30)) + if !(zAltEntry == uintptr(0)) { + goto __11 + } + Xsqlite3OsDlClose(tls, pVfs, handle) + return SQLITE_NOMEM +__11: + ; + libc.Xmemcpy(tls, zAltEntry, ts+15809, uint64(8)) + iFile = ncFile - 1 +__12: + if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { + goto __14 + } + goto __13 +__13: + iFile-- + goto __12 + goto __14 +__14: + ; + iFile++ + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15818, 3) == 0) { + goto __15 + } + iFile = iFile + 3 +__15: + ; + iEntry = 8 +__16: + if !(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile))))) != 0 && c != '.') { + goto __18 + } + if !(int32(Xsqlite3CtypeMap[uint8(c)])&0x02 != 0) { + goto __19 + } + *(*uint8)(unsafe.Pointer(zAltEntry + uintptr(libc.PostIncInt32(&iEntry, 1)))) = uint8(Xsqlite3UpperToLower[uint32(c)]) +__19: + ; + goto __17 +__17: + iFile++ + goto __16 + goto __18 +__18: + ; + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15822, uint64(6)) + zEntry = zAltEntry + xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) +__10: + ; + if !(xInit == uintptr(0)) { + goto __20 + } + if !(pzErrMsg != 0) { + goto __21 + } + nMsg = nMsg + U64(libc.Xstrlen(tls, zEntry)+uint64(300)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) + if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { + goto __22 + } + // zErrmsg would be NULL if not so + Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), + ts+15828, libc.VaList(bp+16, zEntry, zFile)) + Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) +__22: + ; +__21: + ; + Xsqlite3OsDlClose(tls, pVfs, handle) + Xsqlite3_free(tls, zAltEntry) + return SQLITE_ERROR +__20: + ; + Xsqlite3_free(tls, zAltEntry) + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+56 /* &zErrmsg */, uintptr(unsafe.Pointer(&sqlite3Apis))) + if !(rc != 0) { + goto __23 + } + if !(rc == SQLITE_OK|int32(1)<<8) { + goto __24 + } + return SQLITE_OK +__24: + ; + if !(pzErrMsg != 0) { + goto __25 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15871, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) +__25: + ; + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) + Xsqlite3OsDlClose(tls, pVfs, handle) + return SQLITE_ERROR +__23: + ; + + // Append the new shared library handle to the db->aExtension array. + aHandle = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(handle))*uint64((*Sqlite3)(unsafe.Pointer(db)).FnExtension+1))) + if !(aHandle == uintptr(0)) { + goto __26 + } + return SQLITE_NOMEM +__26: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FnExtension > 0) { + goto __27 + } + libc.Xmemcpy(tls, aHandle, (*Sqlite3)(unsafe.Pointer(db)).FaExtension, uint64(unsafe.Sizeof(handle))*uint64((*Sqlite3)(unsafe.Pointer(db)).FnExtension)) +__27: + ; + Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaExtension) + (*Sqlite3)(unsafe.Pointer(db)).FaExtension = aHandle + + *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaExtension + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnExtension, 1))*8)) = handle + return SQLITE_OK + +extension_not_found: + if !(pzErrMsg != 0) { + goto __28 + } + nMsg = nMsg + uint64(300) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) + if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { + goto __29 + } + // zErrmsg would be NULL if not so + Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), + ts+15903, libc.VaList(bp+40, FILENAME_MAX, zFile)) + Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) +__29: + ; +__28: + ; + return SQLITE_ERROR +} + +var azEndings = [1]uintptr{ + ts + 15940, +} /* sqlite3.c:129420:21 */ + +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ + var rc int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Call this routine when the database connection is closing in order +// to clean up loaded extensions +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ + var i int32 + + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { + Xsqlite3OsDlClose(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaExtension + uintptr(i)*8))) + } + Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaExtension) +} + +// Enable or disable extension loading. Extension loading is disabled by +// default so as not to open security holes in older applications. +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if onoff != 0 { + *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) + } else { + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc)) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// The following object holds the list of automatically loaded +// extensions. +// +// This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN +// mutex must be held while accessing this list. +type sqlite3AutoExtList = struct { + FnExt U32 + F__ccgo_pad1 [4]byte + FaExt uintptr +} /* sqlite3.c:129604:9 */ + +// The following object holds the list of automatically loaded +// extensions. +// +// This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN +// mutex must be held while accessing this list. +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ + +// The "wsdAutoext" macro will resolve to the autoextension +// state vector. If writable static data is unsupported on the target, +// we have to locate the state vector at run-time. In the more common +// case where writable static data is supported, wsdStat can refer directly +// to the "sqlite3Autoext" state vector declared above. + +// Register a statically linked extension that is automatically +// loaded by every new database connection. +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ + var rc int32 = SQLITE_OK + rc = Xsqlite3_initialize(tls) + if rc != 0 { + return rc + } else { + var i U32 + var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + + Xsqlite3_mutex_enter(tls, mutex) + for i = U32(0); i < sqlite3Autoext.FnExt; i++ { + if *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) == xInit { + break + } + } + if i == sqlite3Autoext.FnExt { + var nByte U64 = U64(uint64(sqlite3Autoext.FnExt+U32(1)) * uint64(unsafe.Sizeof(uintptr(0)))) + var aNew uintptr + aNew = Xsqlite3_realloc64(tls, sqlite3Autoext.FaExt, nByte) + if aNew == uintptr(0) { + rc = SQLITE_NOMEM + } else { + sqlite3Autoext.FaExt = aNew + *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(sqlite3Autoext.FnExt)*8)) = xInit + sqlite3Autoext.FnExt++ + } + } + Xsqlite3_mutex_leave(tls, mutex) + + return rc + } + return int32(0) +} + +// Cancel a prior call to sqlite3_auto_extension. Remove xInit from the +// set of routines that is invoked for each new database connection, if it +// is currently on the list. If xInit is not on the list, then this +// routine is a no-op. +// +// Return 1 if xInit was found on the list and removed. Return 0 if xInit +// was not on the list. +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ + var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + var i int32 + var n int32 = 0 + + Xsqlite3_mutex_enter(tls, mutex) + for i = int32(sqlite3Autoext.FnExt) - 1; i >= 0; i-- { + if *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) == xInit { + sqlite3Autoext.FnExt-- + *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(sqlite3Autoext.FnExt)*8)) + n++ + break + } + } + Xsqlite3_mutex_leave(tls, mutex) + return n +} + +// Reset the automatic extension loading mechanism. +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ + if Xsqlite3_initialize(tls) == SQLITE_OK { + var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + + Xsqlite3_mutex_enter(tls, mutex) + Xsqlite3_free(tls, sqlite3Autoext.FaExt) + sqlite3Autoext.FaExt = uintptr(0) + sqlite3Autoext.FnExt = U32(0) + Xsqlite3_mutex_leave(tls, mutex) + } +} + +// Load all automatic extensions. +// +// If anything goes wrong, set an error in the database connection. +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var i U32 + var go1 int32 = 1 + var rc int32 + var xInit Sqlite3_loadext_entry + + if sqlite3Autoext.FnExt == U32(0) { + // Common case: early out without every having to acquire a mutex + return + } + for i = U32(0); go1 != 0; i++ { + // var zErrmsg uintptr at bp+8, 8 + + var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + var pThunk uintptr = uintptr(unsafe.Pointer(&sqlite3Apis)) + Xsqlite3_mutex_enter(tls, mutex) + if i >= sqlite3Autoext.FnExt { + xInit = uintptr(0) + go1 = 0 + } else { + xInit = *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) + } + Xsqlite3_mutex_leave(tls, mutex) + *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)) = uintptr(0) + if xInit != 0 && libc.AssignInt32(&rc, (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { + Xsqlite3ErrorWithMsg(tls, db, rc, + ts+15943, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + go1 = 0 + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) + } +} + +//************* End of loadext.c ******************************************** +//************* Begin file pragma.c ***************************************** +// 2003 April 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code used to implement the PRAGMA command. +// #include "sqliteInt.h" + +// ************************************************************************** +// +// The "pragma.h" include file is an automatically generated file that +// that includes the PragType_XXXX macro definitions and the aPragmaName[] +// object. This ensures that the aPragmaName[] table is arranged in +// lexicographical order to facility a binary search of the pragma name. +// Do not edit pragma.h directly. Edit and rerun the script in at +// ../tool/mkpragmatab.tcl. +//************* Include pragma.h in the middle of pragma.c ****************** +//************* Begin file pragma.h ***************************************** +// DO NOT EDIT! +// This file is automatically generated by the script at +// ../tool/mkpragmatab.tcl. To update the set of pragmas, edit +// that script and rerun it. + +// The various pragma types + +// Property flags associated with various pragma. + +// Names of columns for pragmas that return multi-column result +// or that return single-column results where the name of the +// result column is different from the name of the pragma +var pragCName = [57]uintptr{ + ts + 4999, + ts + 15982, + ts + 8752, + ts + 15986, + ts + 15991, + ts + 15994, + ts + 16004, + ts + 16014, + ts + 16020, + ts + 16024, + ts + 16029, + ts + 16034, + ts + 16042, + ts + 16053, + ts + 16056, + + ts + 16063, + ts + 16024, + ts + 16029, + ts + 16070, + ts + 16075, + ts + 16078, + ts + 16085, + ts + 16020, + ts + 16024, + ts + 16091, + ts + 16096, + ts + 16101, + ts + 16024, + ts + 16105, + ts + 16029, + ts + 16113, + ts + 16117, + ts + 16122, + ts + 11368, + ts + 11364, + ts + 16128, + ts + 16133, + ts + 16138, + ts + 15982, + ts + 16024, + ts + 16143, + ts + 16150, + ts + 16157, + ts + 8752, + ts + 16165, + ts + 5002, + ts + 16171, + + ts + 15982, + ts + 16024, + ts + 16176, + ts + 16181, + ts + 15378, + ts + 16186, + + ts + 16199, + ts + 16208, + ts + 16215, + + ts + 16226, +} /* sqlite3.c:129865:19 */ + +// Definitions of all built-in pragmas +type PragmaName1 = struct { + FzName uintptr + FePragTyp U8 + FmPragFlg U8 + FiPragCName U8 + FnPragCName U8 + F__ccgo_pad1 [4]byte + FiArg U64 +} /* sqlite3.c:129930:9 */ + +// Definitions of all built-in pragmas +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ +var aPragmaName = [66]PragmaName{ + { /* zName: */ FzName: ts + 16234, + /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, + { /* zName: */ FzName: ts + 16249, + /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), + /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, + { /* zName: */ FzName: ts + 16264, + /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 16276, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, + { /* zName: */ FzName: ts + 16292, + /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), + /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, + { /* zName: */ FzName: ts + 16215, + /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 16305, + /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 16317, + /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, + { /* zName: */ FzName: ts + 16337, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, + { /* zName: */ FzName: ts + 16353, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, + { /* zName: */ FzName: ts + 16374, + /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), + /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, + { /* zName: */ FzName: ts + 16389, + /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, + { /* zName: */ FzName: ts + 16405, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, + { /* zName: */ FzName: ts + 16419, + /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), + /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, + { /* zName: */ FzName: ts + 16432, + /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), + /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, + { /* zName: */ FzName: ts + 16446, + /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), + /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, + { /* zName: */ FzName: ts + 16465, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, + { /* zName: */ FzName: ts + 16484, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, + { /* zName: */ FzName: ts + 16507, + /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 16516, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), + /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, + { /* zName: */ FzName: ts + 16534, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, + { /* zName: */ FzName: ts + 16551, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, + { /* zName: */ FzName: ts + 16564, + /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, + { /* zName: */ FzName: ts + 16579, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, + { /* zName: */ FzName: ts + 16597, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, + { /* zName: */ FzName: ts + 16607, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), + /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, + { /* zName: */ FzName: ts + 16621, + /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, + { /* zName: */ FzName: ts + 16637, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, + { /* zName: */ FzName: ts + 16662, + /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, + { /* zName: */ FzName: ts + 16681, + /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), + /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, + { /* zName: */ FzName: ts + 16692, + /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), + /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, + { /* zName: */ FzName: ts + 16703, + /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), + /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), + /* iArg: */ FiArg: uint64(1)}, + { /* zName: */ FzName: ts + 16715, + /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, + { /* zName: */ FzName: ts + 16731, + /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, + { /* zName: */ FzName: ts + 16744, + /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, + { /* zName: */ FzName: ts + 16763, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, + { /* zName: */ FzName: ts + 16782, + /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, + { /* zName: */ FzName: ts + 16795, + /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, + { /* zName: */ FzName: ts + 16810, + /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, + { /* zName: */ FzName: ts + 16820, + /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), + /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, + { /* zName: */ FzName: ts + 16832, + /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, + { /* zName: */ FzName: ts + 16841, + /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, + { /* zName: */ FzName: ts + 16852, + /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 16862, + /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), + /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, + { /* zName: */ FzName: ts + 16874, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, + { /* zName: */ FzName: ts + 16885, + /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, + { /* zName: */ FzName: ts + 16897, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, + { /* zName: */ FzName: ts + 16914, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, + { /* zName: */ FzName: ts + 16933, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, + { /* zName: */ FzName: ts + 16959, + /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), + /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, + { /* zName: */ FzName: ts + 16974, + /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, + { /* zName: */ FzName: ts + 16988, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, + { /* zName: */ FzName: ts + 17007, + /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, + { /* zName: */ FzName: ts + 17021, + /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, + { /* zName: */ FzName: ts + 17037, + /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 17049, + /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), + /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, + { /* zName: */ FzName: ts + 17060, + /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), + /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, + { /* zName: */ FzName: ts + 17071, + /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), + /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), + /* iArg: */ FiArg: uint64(1)}, + { /* zName: */ FzName: ts + 17083, + /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 17094, + /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, + { /* zName: */ FzName: ts + 17115, + /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, + { /* zName: */ FzName: ts + 17123, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, + { /* zName: */ FzName: ts + 17138, + /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), + /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, + { /* zName: */ FzName: ts + 17151, + /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, + { /* zName: */ FzName: ts + 17170, + /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), + /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, + { /* zName: */ FzName: ts + 17185, + /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), + /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), + /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, +} /* sqlite3.c:129938:25 */ + +// Number of pragmas: 68 on by default, 78 total. + +//************* End of pragma.h ********************************************* +//************* Continuing where we left off in pragma.c ******************** + +// Interpret the given string as a safety level. Return 0 for OFF, +// 1 for ON or NORMAL, 2 for FULL, and 3 for EXTRA. Return 1 for an empty or +// unrecognized string argument. The FULL and EXTRA option is disallowed +// if the omitFull parameter it 1. +// +// Note that the values returned are one less that the values that +// should be passed into sqlite3BtreeSetSafetyLevel(). The is done +// to support legacy SQL code. The safety level used to be boolean +// and older scripts may have used numbers 0 for OFF and 1 for ON. +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ + // on no off false yes true extra full + var i int32 + var n int32 + if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))])&0x04 != 0 { + return U8(Xsqlite3Atoi(tls, z)) + } + n = Xsqlite3Strlen30(tls, z) + for i = 0; i < int32(uint64(unsafe.Sizeof(iLength))/uint64(unsafe.Sizeof(U8(0)))); i++ { + if int32(iLength[i]) == n && Xsqlite3_strnicmp(tls, uintptr(unsafe.Pointer(&zText))+uintptr(iOffset[i]), z, n) == 0 && + (!(omitFull != 0) || int32(iValue[i]) <= 1) { + return iValue[i] + } + } + return dflt +} + +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17201)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ + +// Interpret the given string as a boolean value. +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ + return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) +} + +// The sqlite3GetBoolean() function is used by other modules but the +// remainder of this file is specific to PRAGMA processing. So omit +// the rest of the file if PRAGMAs are omitted from the build. + +// Interpret the given string as a locking mode value. +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ + if z != 0 { + if 0 == Xsqlite3StrICmp(tls, z, ts+17226) { + return PAGER_LOCKINGMODE_EXCLUSIVE + } + if 0 == Xsqlite3StrICmp(tls, z, ts+17236) { + return PAGER_LOCKINGMODE_NORMAL + } + } + return -1 +} + +// Interpret the given string as an auto-vacuum mode value. +// +// The following strings, "none", "full" and "incremental" are +// acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ + var i int32 + if 0 == Xsqlite3StrICmp(tls, z, ts+7896) { + return BTREE_AUTOVACUUM_NONE + } + if 0 == Xsqlite3StrICmp(tls, z, ts+17243) { + return BTREE_AUTOVACUUM_FULL + } + if 0 == Xsqlite3StrICmp(tls, z, ts+17248) { + return BTREE_AUTOVACUUM_INCR + } + i = Xsqlite3Atoi(tls, z) + return int32(func() uint8 { + if i >= 0 && i <= 2 { + return uint8(i) + } + return uint8(0) + }()) +} + +// Interpret the given string as a temp db location. Return 1 for file +// backed temporary databases, 2 for the Red-Black tree in memory database +// and 0 to use the compile-time default. +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ + if int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '2' { + return int32(*(*uint8)(unsafe.Pointer(z))) - '0' + } else if Xsqlite3StrICmp(tls, z, ts+16176) == 0 { + return 1 + } else if Xsqlite3StrICmp(tls, z, ts+17260) == 0 { + return 2 + } else { + return 0 + } + return int32(0) +} + +// Invalidate temp storage, either when the temp storage is changed +// from default, or when 'file' and the temp_store_directory has changed +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || + Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { + Xsqlite3ErrorMsg(tls, pParse, + ts+17267, 0) + return SQLITE_ERROR + } + Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpBt = uintptr(0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + } + return SQLITE_OK +} + +// If the TEMP database is open, close it and mark the database schema +// as needing reloading. This must be done when using the SQLITE_TEMP_STORE +// or DEFAULT_TEMP_STORE pragmas. +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ + var ts int32 = getTempStore(tls, zStorageType) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { + return SQLITE_OK + } + if invalidateTempStorage(tls, pParse) != SQLITE_OK { + return SQLITE_ERROR + } + (*Sqlite3)(unsafe.Pointer(db)).Ftemp_store = U8(ts) + return SQLITE_OK +} + +// Set result column names for a pragma. +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ + var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName + Xsqlite3VdbeSetNumCols(tls, v, func() int32 { + if int32(n) == 0 { + return 1 + } + return int32(n) + }()) + if int32(n) == 0 { + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, (*PragmaName)(unsafe.Pointer(pPragma)).FzName, uintptr(0)) + } else { + var i int32 + var j int32 + i = 0 + j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) + __1: + if !(i < int32(n)) { + goto __3 + } + { + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, pragCName[j], uintptr(0)) + + } + goto __2 + __2: + i++ + j++ + goto __1 + goto __3 + __3: + } +} + +// Generate code to return a single integer value. +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*I64)(unsafe.Pointer(bp)) = value + + Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, 1, 0, bp, -14) + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) +} + +// Generate code to return a single text value. +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ + if zValue != 0 { + Xsqlite3VdbeLoadString(tls, v, 1, zValue) + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) + } +} + +// Set the safety_level and pager flags for pager iDb. Or if iDb<0 +// set these values for all pagers. +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ + if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { + var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb + + for libc.PostDecInt32(&n, 1) > 0 { + if (*Db)(unsafe.Pointer(pDb)).FpBt != 0 { + Xsqlite3BtreeSetPagerFlags(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, + uint32(U64((*Db)(unsafe.Pointer(pDb)).Fsafety_level)|(*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK))) + } + pDb += 32 + } + } +} + +// Return a human-readable name for a constraint resolution action. +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ + var zName uintptr + switch int32(action) { + case OE_SetNull: + zName = ts + 17329 /* "SET NULL" */ + break + case OE_SetDflt: + zName = ts + 17338 /* "SET DEFAULT" */ + break + case OE_Cascade: + zName = ts + 17350 /* "CASCADE" */ + break + case OE_Restrict: + zName = ts + 17358 /* "RESTRICT" */ + break + default: + zName = ts + 17367 /* "NO ACTION" */ + break + } + return zName +} + +// Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants +// defined in pager.h. This function returns the associated lowercase +// journal-mode name. +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ + + if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { + return uintptr(0) + } + return azModeName[eMode] +} + +var azModeName = [6]uintptr{ + ts + 17377, ts + 17384, ts + 17392, ts + 17396, ts + 17260, ts + 17405, +} /* sqlite3.c:130690:15 */ + +// Locate a pragma in the aPragmaName[] array. +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ + var upr int32 + var lwr int32 + var mid int32 = 0 + var rc int32 + lwr = 0 + upr = int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{}))) - 1 + for lwr <= upr { + mid = (lwr + upr) / 2 + rc = Xsqlite3_stricmp(tls, zName, aPragmaName[mid].FzName) + if rc == 0 { + break + } + if rc < 0 { + upr = mid - 1 + } else { + lwr = mid + 1 + } + } + if lwr > upr { + return uintptr(0) + } + return uintptr(unsafe.Pointer(&aPragmaName)) + uintptr(mid)*24 +} + +// Create zero or more entries in the output for the SQL functions +// defined by FuncDef p. +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + for ; p != 0; p = (*FuncDef)(unsafe.Pointer(p)).FpNext { + var zType uintptr + + if (*FuncDef)(unsafe.Pointer(p)).FxSFunc == uintptr(0) { + continue + } + if (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_INTERNAL) != U32(0) && + showInternFuncs == 0 { + continue + } + if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { + zType = ts + 17409 /* "w" */ + } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { + zType = ts + 17411 /* "a" */ + } else { + zType = ts + 7406 /* "s" */ + } + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17413, + libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, + zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], + int32((*FuncDef)(unsafe.Pointer(p)).FnArg), + (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&mask^U32(SQLITE_INNOCUOUS))) + } +} + +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17420, ts + 17425, ts + 17433 /* "utf16be" */} /* sqlite3.c:130747:23 */ + +// Helper subroutine for PRAGMA integrity_check: +// +// Generate code to output a single-column result row with a value of the +// string held in register 3. Decrement the result count in register 1 +// and halt if the maximum number of result rows have been issued. +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ + var addr int32 + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) + addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) + + Xsqlite3VdbeAddOp0(tls, v, OP_Halt) + return addr +} + +// Process a pragma statement. +// +// Pragmas are of this form: +// +// PRAGMA [schema.]id [= value] +// +// The identifier might also be a string. The value is a string, and +// identifier, or a number. If minusFlag is true, then the value is +// a number that was preceded by a minus sign. +// +// If the left side is "database.id" then pId1 is the database name +// and pId2 is the id. If the left side is just "id" then pId1 is the +// id and pId2 is any empty string. +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ + bp := tls.Alloc(616) + defer tls.Free(616) + + var zLeft uintptr // Nul-terminated UTF-8 string + var zRight uintptr // Nul-terminated UTF-8 string , or NULL + var zDb uintptr // The database name + // var pId uintptr at bp+440, 8 + // Pointer to token + // var aFcntl [4]uintptr at bp+448, 32 + // Argument to SQLITE_FCNTL_PRAGMA + var iDb int32 // Database index for + var rc int32 // return value form SQLITE_FCNTL_PRAGMA + var db uintptr // The database connection + var pDb uintptr // The specific database being pragmaed + var v uintptr // Prepared statement + var pPragma uintptr + var size int32 + var aOp uintptr + var size1 int32 + var pBt uintptr + var ii int32 + var pBt1 uintptr + var b int32 + var iReg int32 + // var x I64 at bp+480, 8 + + // This indicates that no database name was specified as part + // of the PRAGMA command. In this case the locking-mode must be + // set on all attached databases, as well as the main db file. + // + // Also, the sqlite3.dfltLockMode variable is set so that + // any subsequently attached databases also use the specified + // locking mode. + var ii1 int32 + var pPager uintptr + var zRet uintptr + var eMode int32 + var zMode uintptr + var n int32 + var eMode1 int32 // One of the PAGER_JOURNALMODE_XXX symbols + var ii2 int32 + var pPager1 uintptr + // var iLimit I64 at bp+488, 8 + + var aOp1 uintptr + var iAddr int32 + var eAuto int32 + var pBt2 uintptr + // var iLimit1 int32 at bp+496, 4 + + var addr int32 + var size2 int32 + // var size3 int32 at bp+500, 4 + + var ii3 int32 + // var sz Sqlite3_int64 at bp+504, 8 + + // var res int32 at bp+512, 4 + + var iLevel int32 + var mask U64 + var isHidden int32 + var pColExpr uintptr + var i int32 + var k int32 + var nHidden int32 + var pCol uintptr + var pPk uintptr + var pTab uintptr + // var pDummy uintptr at bp+520, 8 + + var zSql uintptr + var pTab1 uintptr + var pTab2 uintptr + var zType uintptr + var k1 uintptr + var pHash uintptr + var initNCol int32 + var ii4 int32 + var cnum I16 + var iIdxDb int32 + var i1 int32 + var mx int32 + var pIdx uintptr + var pTab3 uintptr + // var azOrigin [3]uintptr at bp+528, 24 + + var iTabDb int32 + var pIdx1 uintptr + var pTab4 uintptr + var i2 int32 + var i3 int32 + var pColl uintptr + var i4 int32 + var p uintptr + var i5 int32 + var j uintptr + var p1 uintptr + var showInternFunc int32 + var pMod uintptr + var j1 uintptr + var i6 int32 + var j2 int32 + var iTabDb1 int32 + var i7 int32 + var pFK uintptr + var pTab5 uintptr + var iCol int32 + var jmp int32 + var pFK1 uintptr // A foreign key constraint + var pTab6 uintptr // Child table contain "REFERENCES" keyword + var pParent uintptr // Parent table that child points to + // var pIdx2 uintptr at bp+552, 8 + // Index in the parent table + var i8 int32 // Loop counter: Foreign key number for pTab + var j3 int32 // Loop counter: Field of the foreign key + var k2 uintptr // Loop counter: Next table in schema + var x1 int32 // result variable + var regResult int32 // 3 registers to hold a result row + var regKey int32 // Register to hold key for checking the FK + var regRow int32 // Registers to hold a row from pTab + var addrTop int32 // Top of a loop checking foreign keys + var addrOk int32 // Jump here if the key is OK + // var aiCols uintptr at bp+560, 8 + + var pTab7 uintptr // Current table + var pIdx3 uintptr // An index on pTab + var nIdx int32 + var pTab8 uintptr + var pIdx4 uintptr + var zErr uintptr + var pCol1 uintptr + var doError int32 + var jmp2 int32 + var addrCkFault int32 + var addrCkOk int32 + var zErr1 uintptr + var k3 int32 + var pCheck uintptr + var iCol1 int32 + var uniqOk int32 + var jmp6 int32 + var kk int32 + var jmp21 int32 + // var jmp3 int32 at bp+580, 4 + + var jmp4 int32 + var jmp5 int32 + var ckUniq int32 + var pTab9 uintptr + var pIdx5 uintptr + var pPk1 uintptr + var pPrior uintptr + var loopTop int32 + // var iDataCur int32 at bp+572, 4 + + // var iIdxCur int32 at bp+576, 4 + + var r1 int32 + var bStrict int32 + var x2 uintptr // For looping over tables in the schema + var pTbls uintptr // Set of all tables in the schema + var aRoot uintptr // Array of root page numbers of all btrees + var cnt int32 // Number of entries in aRoot[] + var mxIdx int32 + var aOp2 uintptr + var i9 int32 + var j4 int32 + var addr1 int32 + // var mxErr int32 at bp+568, 4 + + var pObjTab uintptr // Check only this one table, if not NULL + + var isQuick int32 + var enc U8 + var pEnc uintptr + var aOp3 uintptr + var aOp4 uintptr + var iCookie int32 + var i10 int32 + var zOpt uintptr + var iBt int32 + var eMode2 int32 + var r11 int32 + var iDbLast int32 // Loop termination point for the schema loop + var iTabCur int32 // Cursor for a table whose size needs checking + var k4 uintptr // Loop over tables of a schema + var pSchema uintptr // The current schema + var pTab10 uintptr // A table in the schema + var pIdx6 uintptr // An index of the table + var szThreshold LogEst // Size threshold above which reanalysis is needd + var zSubSql uintptr // SQL statement for the OP_SqlExec opcode + var opMask U32 + // var N Sqlite3_int64 at bp+584, 8 + + var iPrior Sqlite3_int64 + // var N1 Sqlite3_int64 at bp+592, 8 + + // var N2 Sqlite3_int64 at bp+600, 8 + + // var N3 Sqlite3_int64 at bp+608, 8 + zLeft = uintptr(0) + zRight = uintptr(0) + zDb = uintptr(0) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + v = Xsqlite3GetVdbe(tls, pParse) // The pragma + + if !(v == uintptr(0)) { + goto __1 + } + return +__1: + ; + Xsqlite3VdbeRunOnlyOnce(tls, v) + (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 + + // Interpret the [schema.] part of the pragma statement. iDb is the + // index of the database this pragma is being applied to in db.aDb[]. + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + if !(iDb < 0) { + goto __2 + } + return +__2: + ; + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + + // If the temp database has been explicitly named as part of the + // pragma, make sure it is open. + if !(iDb == 1 && Xsqlite3OpenTempDatabase(tls, pParse) != 0) { + goto __3 + } + return +__3: + ; + + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440 /* pId */))) + if !!(zLeft != 0) { + goto __4 + } + return +__4: + ; + if !(minusFlag != 0) { + goto __5 + } + zRight = Xsqlite3MPrintf(tls, db, ts+17441, libc.VaList(bp, pValue)) + goto __6 +__5: + zRight = Xsqlite3NameFromToken(tls, db, pValue) +__6: + ; + + if (*Token)(unsafe.Pointer(pId2)).Fn > uint32(0) { + zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName + } else { + zDb = uintptr(0) + } + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_PRAGMA, zLeft, zRight, zDb) != 0) { + goto __7 + } + goto pragma_out +__7: + ; + + // Send an SQLITE_FCNTL_PRAGMA file-control to the underlying VFS + // connection. If it returns SQLITE_OK, then assume that the VFS + // handled the pragma and generate a no-op prepared statement. + // + // IMPLEMENTATION-OF: R-12238-55120 Whenever a PRAGMA statement is parsed, + // an SQLITE_FCNTL_PRAGMA file control is sent to the open sqlite3_file + // object corresponding to the database file to which the pragma + // statement refers. + // + // IMPLEMENTATION-OF: R-29875-31678 The argument to the SQLITE_FCNTL_PRAGMA + // file control is an array of pointers to strings (char**) in which the + // second element of the array is the name of the pragma and the third + // element is the argument to the pragma or NULL if the pragma has no + // argument. + *(*uintptr)(unsafe.Pointer(bp + 448)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 448 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 448 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 448 + 3*8)) = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + if !(rc == SQLITE_OK) { + goto __8 + } + Xsqlite3VdbeSetNumCols(tls, v, 1) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 448)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + goto pragma_out +__8: + ; + if !(rc != SQLITE_NOTFOUND) { + goto __9 + } + if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + goto __10 + } + Xsqlite3ErrorMsg(tls, pParse, ts+3605, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) +__10: + ; + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + (*Parse)(unsafe.Pointer(pParse)).Frc = rc + goto pragma_out +__9: + ; + + // Locate the pragma in the lookup table + pPragma = pragmaLocate(tls, zLeft) + if !(pPragma == uintptr(0)) { + goto __11 + } + // IMP: R-43042-22504 No error messages are generated if an + // unknown pragma is issued. + goto pragma_out +__11: + ; + + // Make sure the database schema is loaded if the pragma requires that + if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NeedSchema != 0) { + goto __12 + } + if !(Xsqlite3ReadSchema(tls, pParse) != 0) { + goto __13 + } + goto pragma_out +__13: + ; +__12: + ; + + // Register the result column names for pragmas that return results + if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns == 0 && + (int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 == 0 || zRight == uintptr(0))) { + goto __14 + } + setPragmaResultColumnNames(tls, v, pPragma) +__14: + ; + + // Jump to the appropriate pragma handler + switch int32((*PragmaName)(unsafe.Pointer(pPragma)).FePragTyp) { + + // PRAGMA [schema.]default_cache_size + // PRAGMA [schema.]default_cache_size=N + // + // The first form reports the current persistent setting for the + // page cache size. The value returned is the maximum number of + // pages in the page cache. The second form sets both the current + // page cache size value and the persistent page cache size value + // stored in the database file. + // + // Older versions of SQLite would set the default cache size to a + // negative number to indicate synchronous=OFF. These days, synchronous + // is always on by default regardless of the sign of the default cache + // size. But continue to take the absolute value of the default cache + // size of historical compatibility. + case PragTyp_DEFAULT_CACHE_SIZE: + goto __16 + + // PRAGMA [schema.]page_size + // PRAGMA [schema.]page_size=N + // + // The first form reports the current setting for the + // database page size in bytes. The second form sets the + // database page size value. The value can only be set if + // the database has not yet been created. + case PragTyp_PAGE_SIZE: + goto __17 + + // PRAGMA [schema.]secure_delete + // PRAGMA [schema.]secure_delete=ON/OFF/FAST + // + // The first form reports the current setting for the + // secure_delete flag. The second form changes the secure_delete + // flag setting and reports the new value. + case PragTyp_SECURE_DELETE: + goto __18 + + // PRAGMA [schema.]max_page_count + // PRAGMA [schema.]max_page_count=N + // + // The first form reports the current setting for the + // maximum number of pages in the database file. The + // second form attempts to change this setting. Both + // forms return the current setting. + // + // The absolute value of N is used. This is undocumented and might + // change. The only purpose is to provide an easy way to test + // the sqlite3AbsInt32() function. + // + // PRAGMA [schema.]page_count + // + // Return the number of pages in the specified database. + case PragTyp_PAGE_COUNT: + goto __19 + + // PRAGMA [schema.]locking_mode + // PRAGMA [schema.]locking_mode = (normal|exclusive) + case PragTyp_LOCKING_MODE: + goto __20 + + // PRAGMA [schema.]journal_mode + // PRAGMA [schema.]journal_mode = + // (delete|persist|off|truncate|memory|wal|off) + case PragTyp_JOURNAL_MODE: + goto __21 + + // PRAGMA [schema.]journal_size_limit + // PRAGMA [schema.]journal_size_limit=N + // + // Get or set the size limit on rollback journal files. + case PragTyp_JOURNAL_SIZE_LIMIT: + goto __22 + + // PRAGMA [schema.]auto_vacuum + // PRAGMA [schema.]auto_vacuum=N + // + // Get or set the value of the database 'auto-vacuum' parameter. + // The value is one of: 0 NONE 1 FULL 2 INCREMENTAL + case PragTyp_AUTO_VACUUM: + goto __23 + + // PRAGMA [schema.]incremental_vacuum(N) + // + // Do N steps of incremental vacuuming on a database. + case PragTyp_INCREMENTAL_VACUUM: + goto __24 + + // PRAGMA [schema.]cache_size + // PRAGMA [schema.]cache_size=N + // + // The first form reports the current local setting for the + // page cache size. The second form sets the local + // page cache size value. If N is positive then that is the + // number of pages in the cache. If N is negative, then the + // number of pages is adjusted so that the cache uses -N kibibytes + // of memory. + case PragTyp_CACHE_SIZE: + goto __25 + + // PRAGMA [schema.]cache_spill + // PRAGMA cache_spill=BOOLEAN + // PRAGMA [schema.]cache_spill=N + // + // The first form reports the current local setting for the + // page cache spill size. The second form turns cache spill on + // or off. When turnning cache spill on, the size is set to the + // current cache_size. The third form sets a spill size that + // may be different form the cache size. + // If N is positive then that is the + // number of pages in the cache. If N is negative, then the + // number of pages is adjusted so that the cache uses -N kibibytes + // of memory. + // + // If the number of cache_spill pages is less then the number of + // cache_size pages, no spilling occurs until the page count exceeds + // the number of cache_size pages. + // + // The cache_spill=BOOLEAN setting applies to all attached schemas, + // not just the schema specified. + case PragTyp_CACHE_SPILL: + goto __26 + + // PRAGMA [schema.]mmap_size(N) + // + // Used to set mapping size limit. The mapping size limit is + // used to limit the aggregate size of all memory mapped regions of the + // database file. If this parameter is set to zero, then memory mapping + // is not used at all. If N is negative, then the default memory map + // limit determined by sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) is set. + // The parameter N is measured in bytes. + // + // This value is advisory. The underlying VFS is free to memory map + // as little or as much as it wants. Except, if N is set to 0 then the + // upper layers will never invoke the xFetch interfaces to the VFS. + case PragTyp_MMAP_SIZE: + goto __27 + + // PRAGMA temp_store + // PRAGMA temp_store = "default"|"memory"|"file" + // + // Return or set the local value of the temp_store flag. Changing + // the local value does not make changes to the disk file and the default + // value will be restored the next time the database is opened. + // + // Note that it is possible for the library compile-time options to + // override this setting + case PragTyp_TEMP_STORE: + goto __28 + + // PRAGMA temp_store_directory + // PRAGMA temp_store_directory = ""|"directory_name" + // + // Return or set the local value of the temp_store_directory flag. Changing + // the value sets a specific directory to be used for temporary files. + // Setting to a null string reverts to the default temporary directory search. + // If temporary directory is changed, then invalidateTempStorage. + // + case PragTyp_TEMP_STORE_DIRECTORY: + goto __29 + + // PRAGMA [schema.]synchronous + // PRAGMA [schema.]synchronous=OFF|ON|NORMAL|FULL|EXTRA + // + // Return or set the local value of the synchronous flag. Changing + // the local value does not make changes to the disk file and the + // default value will be restored the next time the database is + // opened. + case PragTyp_SYNCHRONOUS: + goto __30 + + case PragTyp_FLAG: + goto __31 + + // PRAGMA table_info(
    ) + // + // Return a single row for each column of the named table. The columns of + // the returned data set are: + // + // cid: Column id (numbered from left to right, starting at 0) + // name: Column name + // type: Column declaration type. + // notnull: True if 'NOT NULL' is part of column declaration + // dflt_value: The default value for the column, if any. + // pk: Non-zero for PK fields. + case PragTyp_TABLE_INFO: + goto __32 + + // PRAGMA table_list + // + // Return a single row for each table, virtual table, or view in the + // entire schema. + // + // schema: Name of attached database hold this table + // name: Name of the table itself + // type: "table", "view", "virtual", "shadow" + // ncol: Number of columns + // wr: True for a WITHOUT ROWID table + // strict: True for a STRICT table + case PragTyp_TABLE_LIST: + goto __33 + + case PragTyp_INDEX_INFO: + goto __34 + + case PragTyp_INDEX_LIST: + goto __35 + + case PragTyp_DATABASE_LIST: + goto __36 + + case PragTyp_COLLATION_LIST: + goto __37 + + case PragTyp_FUNCTION_LIST: + goto __38 + + case PragTyp_MODULE_LIST: + goto __39 + + case PragTyp_PRAGMA_LIST: + goto __40 + + case PragTyp_FOREIGN_KEY_LIST: + goto __41 + + case PragTyp_FOREIGN_KEY_CHECK: + goto __42 + + // Reinstall the LIKE and GLOB functions. The variant of LIKE + // used will be case sensitive or not depending on the RHS. + case PragTyp_CASE_SENSITIVE_LIKE: + goto __43 + + // PRAGMA integrity_check + // PRAGMA integrity_check(N) + // PRAGMA quick_check + // PRAGMA quick_check(N) + // + // Verify the integrity of the database. + // + // The "quick_check" is reduced version of + // integrity_check designed to detect most database corruption + // without the overhead of cross-checking indexes. Quick_check + // is linear time wherease integrity_check is O(NlogN). + // + // The maximum nubmer of errors is 100 by default. A different default + // can be specified using a numeric parameter N. + // + // Or, the parameter N can be the name of a table. In that case, only + // the one table named is verified. The freelist is only verified if + // the named table is "sqlite_schema" (or one of its aliases). + // + // All schemas are checked by default. To check just a single + // schema, use the form: + // + // PRAGMA schema.integrity_check; + case PragTyp_INTEGRITY_CHECK: + goto __44 + + // PRAGMA encoding + // PRAGMA encoding = "utf-8"|"utf-16"|"utf-16le"|"utf-16be" + // + // In its first form, this pragma returns the encoding of the main + // database. If the database is not initialized, it is initialized now. + // + // The second form of this pragma is a no-op if the main database file + // has not already been initialized. In this case it sets the default + // encoding that will be used for the main database file if a new file + // is created. If an existing main database file is opened, then the + // default text encoding for the existing database is used. + // + // In all cases new databases created using the ATTACH command are + // created to use the same default text encoding as the main database. If + // the main database has not been initialized and/or created when ATTACH + // is executed, this is done before the ATTACH operation. + // + // In the second form this pragma sets the text encoding to be used in + // new database files created using this database handle. It is only + // useful if invoked immediately after the main database i + case PragTyp_ENCODING: + goto __45 + + // PRAGMA [schema.]schema_version + // PRAGMA [schema.]schema_version = + // + // PRAGMA [schema.]user_version + // PRAGMA [schema.]user_version = + // + // PRAGMA [schema.]freelist_count + // + // PRAGMA [schema.]data_version + // + // PRAGMA [schema.]application_id + // PRAGMA [schema.]application_id = + // + // The pragma's schema_version and user_version are used to set or get + // the value of the schema-version and user-version, respectively. Both + // the schema-version and the user-version are 32-bit signed integers + // stored in the database header. + // + // The schema-cookie is usually only manipulated internally by SQLite. It + // is incremented by SQLite whenever the database schema is modified (by + // creating or dropping a table or index). The schema version is used by + // SQLite each time a query is executed to ensure that the internal cache + // of the schema used when compiling the SQL query matches the schema of + // the database against which the compiled query is actually executed. + // Subverting this mechanism by using "PRAGMA schema_version" to modify + // the schema-version is potentially dangerous and may lead to program + // crashes or database corruption. Use with caution! + // + // The user-version is not used internally by SQLite. It may be used by + // applications for any purpose. + case PragTyp_HEADER_VALUE: + goto __46 + + // PRAGMA compile_options + // + // Return the names of all compile-time options used in this build, + // one option per row. + case PragTyp_COMPILE_OPTIONS: + goto __47 + + // PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate + // + // Checkpoint the database. + case PragTyp_WAL_CHECKPOINT: + goto __48 + + // PRAGMA wal_autocheckpoint + // PRAGMA wal_autocheckpoint = N + // + // Configure a database connection to automatically checkpoint a database + // after accumulating N frames in the log. Or query for the current value + // of N. + case PragTyp_WAL_AUTOCHECKPOINT: + goto __49 + + // PRAGMA shrink_memory + // + // IMPLEMENTATION-OF: R-23445-46109 This pragma causes the database + // connection on which it is invoked to free up as much memory as it + // can, by calling sqlite3_db_release_memory(). + case PragTyp_SHRINK_MEMORY: + goto __50 + + // PRAGMA optimize + // PRAGMA optimize(MASK) + // PRAGMA schema.optimize + // PRAGMA schema.optimize(MASK) + // + // Attempt to optimize the database. All schemas are optimized in the first + // two forms, and only the specified schema is optimized in the latter two. + // + // The details of optimizations performed by this pragma are expected + // to change and improve over time. Applications should anticipate that + // this pragma will perform new optimizations in future releases. + // + // The optional argument is a bitmask of optimizations to perform: + // + // 0x0001 Debugging mode. Do not actually perform any optimizations + // but instead return one line of text for each optimization + // that would have been done. Off by default. + // + // 0x0002 Run ANALYZE on tables that might benefit. On by default. + // See below for additional information. + // + // 0x0004 (Not yet implemented) Record usage and performance + // information from the current session in the + // database file so that it will be available to "optimize" + // pragmas run by future database connections. + // + // 0x0008 (Not yet implemented) Create indexes that might have + // been helpful to recent queries + // + // The default MASK is and always shall be 0xfffe. 0xfffe means perform all + // of the optimizations listed above except Debug Mode, including new + // optimizations that have not yet been invented. If new optimizations are + // ever added that should be off by default, those off-by-default + // optimizations will have bitmasks of 0x10000 or larger. + // + // DETERMINATION OF WHEN TO RUN ANALYZE + // + // In the current implementation, a table is analyzed if only if all of + // the following are true: + // + // (1) MASK bit 0x02 is set. + // + // (2) The query planner used sqlite_stat1-style statistics for one or + // more indexes of the table at some point during the lifetime of + // the current connection. + // + // (3) One or more indexes of the table are currently unanalyzed OR + // the number of rows in the table has increased by 25 times or more + // since the last time ANALYZE was run. + // + // The rules for when tables are analyzed are likely to change in + // future releases. + case PragTyp_OPTIMIZE: + goto __51 + + // PRAGMA busy_timeout + // PRAGMA busy_timeout = N + // + // Call sqlite3_busy_timeout(db, N). Return the current timeout value + // if one is set. If no busy handler or a different busy handler is set + // then 0 is returned. Setting the busy_timeout to 0 or negative + // disables the timeout. + /*case PragTyp_BUSY_TIMEOUT*/ + default: + goto __52 + + // PRAGMA soft_heap_limit + // PRAGMA soft_heap_limit = N + // + // IMPLEMENTATION-OF: R-26343-45930 This pragma invokes the + // sqlite3_soft_heap_limit64() interface with the argument N, if N is + // specified and is a non-negative integer. + // IMPLEMENTATION-OF: R-64451-07163 The soft_heap_limit pragma always + // returns the same integer that would be returned by the + // sqlite3_soft_heap_limit64(-1) C-language function. + case PragTyp_SOFT_HEAP_LIMIT: + goto __53 + + // PRAGMA hard_heap_limit + // PRAGMA hard_heap_limit = N + // + // Invoke sqlite3_hard_heap_limit64() to query or set the hard heap + // limit. The hard heap limit can be activated or lowered by this + // pragma, but not raised or deactivated. Only the + // sqlite3_hard_heap_limit64() C-language API can raise or deactivate + // the hard heap limit. This allows an application to set a heap limit + // constraint that cannot be relaxed by an untrusted SQL script. + case PragTyp_HARD_HEAP_LIMIT: + goto __54 + + // PRAGMA threads + // PRAGMA threads = N + // + // Configure the maximum number of worker threads. Return the new + // maximum, which might be less than requested. + case PragTyp_THREADS: + goto __55 + + // PRAGMA analysis_limit + // PRAGMA analysis_limit = N + // + // Configure the maximum number of rows that ANALYZE will examine + // in each index that it looks at. Return the new limit. + case PragTyp_ANALYSIS_LIMIT: + goto __56 + } + goto __15 + + // PRAGMA [schema.]default_cache_size + // PRAGMA [schema.]default_cache_size=N + // + // The first form reports the current persistent setting for the + // page cache size. The value returned is the maximum number of + // pages in the page cache. The second form sets both the current + // page cache size value and the persistent page cache size value + // stored in the database file. + // + // Older versions of SQLite would set the default cache size to a + // negative number to indicate synchronous=OFF. These days, synchronous + // is always on by default regardless of the sign of the default cache + // size. But continue to take the absolute value of the default cache + // size of historical compatibility. +__16: + Xsqlite3VdbeUsesBtree(tls, v, iDb) + if !!(zRight != 0) { + goto __57 + } + *(*int32)(unsafe.Pointer(pParse + 56)) += 2 + + aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(getCacheSize))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&getCacheSize)), iLn3) + if !(0 != 0) { + goto __59 + } + goto __15 +__59: + ; + (*VdbeOp)(unsafe.Pointer(aOp)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp + 6*24)).Fp1 = -2000 + goto __58 +__57: + size = Xsqlite3AbsInt32(tls, Xsqlite3Atoi(tls, zRight)) + Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) + Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_DEFAULT_CACHE_SIZE, size) + + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size = size + Xsqlite3BtreeSetCacheSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size) +__58: + ; + goto __15 + + // PRAGMA [schema.]page_size + // PRAGMA [schema.]page_size=N + // + // The first form reports the current setting for the + // database page size in bytes. The second form sets the + // database page size value. The value can only be set if + // the database has not yet been created. +__17: + pBt = (*Db)(unsafe.Pointer(pDb)).FpBt + + if !!(zRight != 0) { + goto __60 + } + if pBt != 0 { + size1 = Xsqlite3BtreeGetPageSize(tls, pBt) + } else { + size1 = 0 + } + returnSingleInt(tls, v, int64(size1)) + goto __61 +__60: + // Malloc may fail when setting the page-size, as there is an internal + // buffer that the pager module resizes using sqlite3_realloc(). + (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize = Xsqlite3Atoi(tls, zRight) + if !(SQLITE_NOMEM == Xsqlite3BtreeSetPageSize(tls, pBt, (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize, 0, 0)) { + goto __62 + } + Xsqlite3OomFault(tls, db) +__62: + ; +__61: + ; + goto __15 + + // PRAGMA [schema.]secure_delete + // PRAGMA [schema.]secure_delete=ON/OFF/FAST + // + // The first form reports the current setting for the + // secure_delete flag. The second form changes the secure_delete + // flag setting and reports the new value. +__18: + pBt1 = (*Db)(unsafe.Pointer(pDb)).FpBt + b = -1 + + if !(zRight != 0) { + goto __63 + } + if !(Xsqlite3_stricmp(tls, zRight, ts+17445) == 0) { + goto __64 + } + b = 2 + goto __65 +__64: + b = int32(Xsqlite3GetBoolean(tls, zRight, uint8(0))) +__65: + ; +__63: + ; + if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && b >= 0) { + goto __66 + } + ii = 0 +__67: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __69 + } + Xsqlite3BtreeSecureDelete(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, b) + goto __68 +__68: + ii++ + goto __67 + goto __69 +__69: + ; +__66: + ; + b = Xsqlite3BtreeSecureDelete(tls, pBt1, b) + returnSingleInt(tls, v, int64(b)) + goto __15 + + // PRAGMA [schema.]max_page_count + // PRAGMA [schema.]max_page_count=N + // + // The first form reports the current setting for the + // maximum number of pages in the database file. The + // second form attempts to change this setting. Both + // forms return the current setting. + // + // The absolute value of N is used. This is undocumented and might + // change. The only purpose is to provide an easy way to test + // the sqlite3AbsInt32() function. + // + // PRAGMA [schema.]page_count + // + // Return the number of pages in the specified database. +__19: + *(*I64)(unsafe.Pointer(bp + 480 /* x */)) = int64(0) + Xsqlite3CodeVerifySchema(tls, pParse, iDb) + iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + if !(int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(zLeft)))]) == 'p') { + goto __70 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) + goto __71 +__70: + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + goto __72 + } + if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + goto __74 + } + *(*I64)(unsafe.Pointer(bp + 480 /* x */)) = int64(0) + goto __75 +__74: + if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + goto __76 + } + *(*I64)(unsafe.Pointer(bp + 480 /* x */)) = int64(0xfffffffe) +__76: + ; +__75: + ; + goto __73 +__72: + *(*I64)(unsafe.Pointer(bp + 480 /* x */)) = int64(0) +__73: + ; + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480 /* x */)))) +__71: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) + goto __15 + + // PRAGMA [schema.]locking_mode + // PRAGMA [schema.]locking_mode = (normal|exclusive) +__20: + zRet = ts + 17236 /* "normal" */ + eMode = getLockingMode(tls, zRight) + + if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { + goto __77 + } + // Simple "PRAGMA locking_mode;" statement. This is a query for + // the current default locking mode (which may be different to + // the locking-mode of the main database). + eMode = int32((*Sqlite3)(unsafe.Pointer(db)).FdfltLockMode) + goto __78 +__77: + if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { + goto __79 + } + + ii1 = 2 +__80: + if !(ii1 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __82 + } + pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii1)*32)).FpBt) + Xsqlite3PagerLockingMode(tls, pPager, eMode) + goto __81 +__81: + ii1++ + goto __80 + goto __82 +__82: + ; + (*Sqlite3)(unsafe.Pointer(db)).FdfltLockMode = U8(eMode) +__79: + ; + pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + eMode = Xsqlite3PagerLockingMode(tls, pPager, eMode) +__78: + ; + + if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { + goto __83 + } + zRet = ts + 17226 /* "exclusive" */ +__83: + ; + returnSingleText(tls, v, zRet) + goto __15 + + // PRAGMA [schema.]journal_mode + // PRAGMA [schema.]journal_mode = + // (delete|persist|off|truncate|memory|wal|off) +__21: // Loop counter + + if !(zRight == uintptr(0)) { + goto __84 + } + // If there is no "=MODE" part of the pragma, do a query for the + // current mode + eMode1 = -1 + goto __85 +__84: + n = Xsqlite3Strlen30(tls, zRight) + eMode1 = 0 +__86: + if !(libc.AssignUintptr(&zMode, Xsqlite3JournalModename(tls, eMode1)) != uintptr(0)) { + goto __88 + } + if !(Xsqlite3_strnicmp(tls, zRight, zMode, n) == 0) { + goto __89 + } + goto __88 +__89: + ; + goto __87 +__87: + eMode1++ + goto __86 + goto __88 +__88: + ; + if !!(zMode != 0) { + goto __90 + } + // If the "=MODE" part does not match any known journal mode, + // then do a query + eMode1 = -1 +__90: + ; + if !(eMode1 == PAGER_JOURNALMODE_OFF && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __91 + } + // Do not allow journal-mode "OFF" in defensive since the database + // can become corrupted using ordinary SQL when the journal is off + eMode1 = -1 +__91: + ; +__85: + ; + if !(eMode1 == -1 && (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { + goto __92 + } + // Convert "PRAGMA journal_mode" into "PRAGMA main.journal_mode" + iDb = 0 + (*Token)(unsafe.Pointer(pId2)).Fn = uint32(1) +__92: + ; + ii2 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 +__93: + if !(ii2 >= 0) { + goto __95 + } + if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii2)*32)).FpBt != 0 && (ii2 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { + goto __96 + } + Xsqlite3VdbeUsesBtree(tls, v, ii2) + Xsqlite3VdbeAddOp3(tls, v, OP_JournalMode, ii2, 1, eMode1) +__96: + ; + goto __94 +__94: + ii2-- + goto __93 + goto __95 +__95: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) + goto __15 + + // PRAGMA [schema.]journal_size_limit + // PRAGMA [schema.]journal_size_limit=N + // + // Get or set the size limit on rollback journal files. +__22: + pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + *(*I64)(unsafe.Pointer(bp + 488 /* iLimit */)) = int64(-2) + if !(zRight != 0) { + goto __97 + } + Xsqlite3DecOrHexToI64(tls, zRight, bp+488) + if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + goto __98 + } + *(*I64)(unsafe.Pointer(bp + 488 /* iLimit */)) = int64(-1) +__98: + ; +__97: + ; + *(*I64)(unsafe.Pointer(bp + 488 /* iLimit */)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488 /* iLimit */))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488 /* iLimit */))) + goto __15 + + // PRAGMA [schema.]auto_vacuum + // PRAGMA [schema.]auto_vacuum=N + // + // Get or set the value of the database 'auto-vacuum' parameter. + // The value is one of: 0 NONE 1 FULL 2 INCREMENTAL +__23: + pBt2 = (*Db)(unsafe.Pointer(pDb)).FpBt + + if !!(zRight != 0) { + goto __99 + } + returnSingleInt(tls, v, int64(Xsqlite3BtreeGetAutoVacuum(tls, pBt2))) + goto __100 +__99: + eAuto = getAutoVacuum(tls, zRight) + + (*Sqlite3)(unsafe.Pointer(db)).FnextAutovac = int8(U8(eAuto)) + // Call SetAutoVacuum() to set initialize the internal auto and + // incr-vacuum flags. This is required in case this connection + // creates the database file. It is important that it is created + // as an auto-vacuum capable db. + rc = Xsqlite3BtreeSetAutoVacuum(tls, pBt2, eAuto) + if !(rc == SQLITE_OK && (eAuto == 1 || eAuto == 2)) { + goto __101 + } + iAddr = Xsqlite3VdbeCurrentAddr(tls, v) + + aOp1 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setMeta6))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setMeta6)), iLn4) + if !(0 != 0) { + goto __102 + } + goto __15 +__102: + ; + (*VdbeOp)(unsafe.Pointer(aOp1)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp1 + 1*24)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp1 + 2*24)).Fp2 = iAddr + 4 + (*VdbeOp)(unsafe.Pointer(aOp1 + 4*24)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp1 + 4*24)).Fp3 = eAuto - 1 + Xsqlite3VdbeUsesBtree(tls, v, iDb) +__101: + ; +__100: + ; + goto __15 + + // PRAGMA [schema.]incremental_vacuum(N) + // + // Do N steps of incremental vacuuming on a database. +__24: + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + goto __103 + } + *(*int32)(unsafe.Pointer(bp + 496 /* iLimit1 */)) = 0x7fffffff +__103: + ; + Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496 /* iLimit1 */)), 1) + addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) + Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) + Xsqlite3VdbeAddOp2(tls, v, OP_IfPos, 1, addr) + Xsqlite3VdbeJumpHere(tls, v, addr) + goto __15 + + // PRAGMA [schema.]cache_size + // PRAGMA [schema.]cache_size=N + // + // The first form reports the current local setting for the + // page cache size. The second form sets the local + // page cache size value. If N is positive then that is the + // number of pages in the cache. If N is negative, then the + // number of pages is adjusted so that the cache uses -N kibibytes + // of memory. +__25: + ; + if !!(zRight != 0) { + goto __104 + } + returnSingleInt(tls, v, int64((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size)) + goto __105 +__104: + size2 = Xsqlite3Atoi(tls, zRight) + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size = size2 + Xsqlite3BtreeSetCacheSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size) +__105: + ; + goto __15 + + // PRAGMA [schema.]cache_spill + // PRAGMA cache_spill=BOOLEAN + // PRAGMA [schema.]cache_spill=N + // + // The first form reports the current local setting for the + // page cache spill size. The second form turns cache spill on + // or off. When turnning cache spill on, the size is set to the + // current cache_size. The third form sets a spill size that + // may be different form the cache size. + // If N is positive then that is the + // number of pages in the cache. If N is negative, then the + // number of pages is adjusted so that the cache uses -N kibibytes + // of memory. + // + // If the number of cache_spill pages is less then the number of + // cache_size pages, no spilling occurs until the page count exceeds + // the number of cache_size pages. + // + // The cache_spill=BOOLEAN setting applies to all attached schemas, + // not just the schema specified. +__26: + ; + if !!(zRight != 0) { + goto __106 + } + returnSingleInt(tls, v, + func() int64 { + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_CacheSpill) == uint64(0) { + return int64(0) + } + return int64(Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, 0)) + }()) + goto __107 +__106: + *(*int32)(unsafe.Pointer(bp + 500 /* size3 */)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + goto __108 + } + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500 /* size3 */))) +__108: + ; + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + goto __109 + } + *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) + goto __110 +__109: + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_CacheSpill)) +__110: + ; + setAllPagerFlags(tls, db) +__107: + ; + goto __15 + + // PRAGMA [schema.]mmap_size(N) + // + // Used to set mapping size limit. The mapping size limit is + // used to limit the aggregate size of all memory mapped regions of the + // database file. If this parameter is set to zero, then memory mapping + // is not used at all. If N is negative, then the default memory map + // limit determined by sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) is set. + // The parameter N is measured in bytes. + // + // This value is advisory. The underlying VFS is free to memory map + // as little or as much as it wants. Except, if N is set to 0 then the + // upper layers will never invoke the xFetch interfaces to the VFS. +__27: + ; + if !(zRight != 0) { + goto __111 + } + Xsqlite3DecOrHexToI64(tls, zRight, bp+504) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + goto __112 + } + *(*Sqlite3_int64)(unsafe.Pointer(bp + 504 /* sz */)) = Xsqlite3Config.FszMmap +__112: + ; + if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { + goto __113 + } + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504 /* sz */)) +__113: + ; + ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 +__114: + if !(ii3 >= 0) { + goto __116 + } + if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0 && (ii3 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { + goto __117 + } + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504 /* sz */))) +__117: + ; + goto __115 +__115: + ii3-- + goto __114 + goto __116 +__116: + ; +__111: + ; + *(*Sqlite3_int64)(unsafe.Pointer(bp + 504 /* sz */)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + if !(rc == SQLITE_OK) { + goto __118 + } + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504 /* sz */))) + goto __119 +__118: + if !(rc != SQLITE_NOTFOUND) { + goto __120 + } + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + (*Parse)(unsafe.Pointer(pParse)).Frc = rc +__120: + ; +__119: + ; + goto __15 + + // PRAGMA temp_store + // PRAGMA temp_store = "default"|"memory"|"file" + // + // Return or set the local value of the temp_store flag. Changing + // the local value does not make changes to the disk file and the default + // value will be restored the next time the database is opened. + // + // Note that it is possible for the library compile-time options to + // override this setting +__28: + if !!(zRight != 0) { + goto __121 + } + returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store)) + goto __122 +__121: + changeTempStorage(tls, pParse, zRight) +__122: + ; + goto __15 + + // PRAGMA temp_store_directory + // PRAGMA temp_store_directory = ""|"directory_name" + // + // Return or set the local value of the temp_store_directory flag. Changing + // the value sets a specific directory to be used for temporary files. + // Setting to a null string reverts to the default temporary directory search. + // If temporary directory is changed, then invalidateTempStorage. + // +__29: + if !!(zRight != 0) { + goto __123 + } + returnSingleText(tls, v, Xsqlite3_temp_directory) + goto __124 +__123: + if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { + goto __125 + } + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+512) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { + goto __126 + } + Xsqlite3ErrorMsg(tls, pParse, ts+17450, 0) + goto pragma_out +__126: + ; +__125: + ; + if !(SQLITE_TEMP_STORE == 0 || + SQLITE_TEMP_STORE == 1 && int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) <= 1 || + SQLITE_TEMP_STORE == 2 && int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 1) { + goto __127 + } + invalidateTempStorage(tls, pParse) +__127: + ; + Xsqlite3_free(tls, Xsqlite3_temp_directory) + if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { + goto __128 + } + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+16, zRight)) + goto __129 +__128: + Xsqlite3_temp_directory = uintptr(0) +__129: + ; +__124: + ; + goto __15 + + // PRAGMA [schema.]synchronous + // PRAGMA [schema.]synchronous=OFF|ON|NORMAL|FULL|EXTRA + // + // Return or set the local value of the synchronous flag. Changing + // the local value does not make changes to the disk file and the + // default value will be restored the next time the database is + // opened. +__30: + if !!(zRight != 0) { + goto __130 + } + returnSingleInt(tls, v, int64(int32((*Db)(unsafe.Pointer(pDb)).Fsafety_level)-1)) + goto __131 +__130: + if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { + goto __132 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+17475, 0) + goto __133 +__132: + if !(iDb != 1) { + goto __134 + } + iLevel = (int32(getSafetyLevel(tls, zRight, 0, uint8(1))) + 1) & PAGER_SYNCHRONOUS_MASK + if !(iLevel == 0) { + goto __135 + } + iLevel = 1 +__135: + ; + (*Db)(unsafe.Pointer(pDb)).Fsafety_level = U8(iLevel) + (*Db)(unsafe.Pointer(pDb)).FbSyncSet = U8(1) + setAllPagerFlags(tls, db) +__134: + ; +__133: + ; +__131: + ; + goto __15 + +__31: + if !(zRight == uintptr(0)) { + goto __136 + } + setPragmaResultColumnNames(tls, v, pPragma) + returnSingleInt(tls, v, int64(libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&(*PragmaName)(unsafe.Pointer(pPragma)).FiArg != uint64(0)))) + goto __137 +__136: + mask = (*PragmaName)(unsafe.Pointer(pPragma)).FiArg // Mask of bits to set or clear. + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { + goto __138 + } + // Foreign key support may not be enabled or disabled while not + // in auto-commit mode. + mask = mask & libc.Uint64FromInt32(libc.CplInt32(SQLITE_ForeignKeys)) +__138: + ; + + if !(Xsqlite3GetBoolean(tls, zRight, uint8(0)) != 0) { + goto __139 + } + *(*U64)(unsafe.Pointer(db + 48)) |= mask + goto __140 +__139: + *(*U64)(unsafe.Pointer(db + 48)) &= ^mask + if !(mask == uint64(SQLITE_DeferFKs)) { + goto __141 + } + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = int64(0) +__141: + ; + if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && + Xsqlite3_stricmp(tls, zRight, ts+17528) == 0) { + goto __142 + } + // IMP: R-60817-01178 If the argument is "RESET" then schema + // writing is disabled (as with "PRAGMA writable_schema=OFF") and, + // in addition, the schema is reloaded. + Xsqlite3ResetAllSchemasOfConnection(tls, db) +__142: + ; +__140: + ; + + // Many of the flag-pragmas modify the code generated by the SQL + // compiler (eg. count_changes). So add an opcode to expire all + // compiled SQL statements after modifying a pragma value. + Xsqlite3VdbeAddOp0(tls, v, OP_Expire) + setAllPagerFlags(tls, db) +__137: + ; + goto __15 + + // PRAGMA table_info(
    ) + // + // Return a single row for each column of the named table. The columns of + // the returned data set are: + // + // cid: Column id (numbered from left to right, starting at 0) + // name: Column name + // type: Column declaration type. + // notnull: True if 'NOT NULL' is part of column declaration + // dflt_value: The default value for the column, if any. + // pk: Non-zero for PK fields. +__32: + if !(zRight != 0) { + goto __143 + } + Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) + pTab = Xsqlite3LocateTable(tls, pParse, uint32(LOCATE_NOERR), zRight, zDb) + if !(pTab != 0) { + goto __144 + } + nHidden = 0 + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + (*Parse)(unsafe.Pointer(pParse)).FnMem = 7 + Xsqlite3ViewGetColumnNames(tls, pParse, pTab) + i = 0 + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol +__145: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __147 + } + isHidden = 0 + if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_NOINSERT != 0) { + goto __148 + } + if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg == uint64(0)) { + goto __149 + } + nHidden++ + goto __146 +__149: + ; + if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __150 + } + isHidden = 2 // GENERATED ALWAYS AS ... VIRTUAL + goto __151 +__150: + if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0) { + goto __152 + } + isHidden = 3 // GENERATED ALWAYS AS ... STORED + goto __153 +__152: + ; + isHidden = 1 // HIDDEN +__153: + ; +__151: + ; +__148: + ; + if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY == 0) { + goto __154 + } + k = 0 + goto __155 +__154: + if !(pPk == uintptr(0)) { + goto __156 + } + k = 1 + goto __157 +__156: + k = 1 +__158: + if !(k <= int32((*Table)(unsafe.Pointer(pTab)).FnCol) && int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(k-1)*2))) != i) { + goto __160 + } + goto __159 +__159: + k++ + goto __158 + goto __160 +__160: + ; +__157: + ; +__155: + ; + pColExpr = Xsqlite3ColumnExpr(tls, pTab, pCol) + + Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { + if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { + return ts + 17534 /* "issisii" */ + } + return ts + 17542 /* "issisi" */ + }(), + libc.VaList(bp+24, i-nHidden, + (*Column)(unsafe.Pointer(pCol)).FzCnName, + Xsqlite3ColumnType(tls, pCol, ts+1525), + func() int32 { + if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { + return 1 + } + return 0 + }(), + func() uintptr { + if isHidden >= 2 || pColExpr == uintptr(0) { + return uintptr(0) + } + return *(*uintptr)(unsafe.Pointer(pColExpr + 8)) + }(), + k, + isHidden)) + goto __146 +__146: + i++ + pCol += 24 + goto __145 + goto __147 +__147: + ; +__144: + ; +__143: + ; + goto __15 + + // PRAGMA table_list + // + // Return a single row for each table, virtual table, or view in the + // entire schema. + // + // schema: Name of attached database hold this table + // name: Name of the table itself + // type: "table", "view", "virtual", "shadow" + // ncol: Number of columns + // wr: True for a WITHOUT ROWID table + // strict: True for a STRICT table +__33: + (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 + Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) + ii4 = 0 +__161: + if !(ii4 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __163 + } + if !(zDb != 0 && Xsqlite3_stricmp(tls, zDb, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName) != 0) { + goto __164 + } + goto __162 +__164: + ; + + // Ensure that the Table.nCol field is initialized for all views + // and virtual tables. Each time we initialize a Table.nCol value + // for a table, that can potentially disrupt the hash table, so restart + // the initialization scan. + pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FpSchema + 8 + initNCol = int32((*Hash)(unsafe.Pointer(pHash)).Fcount) +__165: + if !(libc.PostDecInt32(&initNCol, 1) != 0) { + goto __166 + } + k1 = (*Hash)(unsafe.Pointer(pHash)).Ffirst +__167: + if !(1 != 0) { + goto __169 + } + if !(k1 == uintptr(0)) { + goto __170 + } + initNCol = 0 + goto __169 +__170: + ; + pTab1 = (*HashElem)(unsafe.Pointer(k1)).Fdata + if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { + goto __171 + } + zSql = Xsqlite3MPrintf(tls, db, ts+17549, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + if !(zSql != 0) { + goto __172 + } + *(*uintptr)(unsafe.Pointer(bp + 520 /* pDummy */)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520 /* pDummy */))) + Xsqlite3DbFree(tls, db, zSql) +__172: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __173 + } + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1461, 0) + (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM +__173: + ; + pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FpSchema + 8 + goto __169 +__171: + ; + goto __168 +__168: + k1 = (*HashElem)(unsafe.Pointer(k1)).Fnext + goto __167 + goto __169 +__169: + ; + goto __165 +__166: + ; + + k1 = (*Hash)(unsafe.Pointer(pHash)).Ffirst +__174: + if !(k1 != 0) { + goto __176 + } + pTab2 = (*HashElem)(unsafe.Pointer(k1)).Fdata + if !(zRight != 0 && Xsqlite3_stricmp(tls, zRight, (*Table)(unsafe.Pointer(pTab2)).FzName) != 0) { + goto __177 + } + goto __175 +__177: + ; + if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { + goto __178 + } + zType = ts + 10367 /* "view" */ + goto __179 +__178: + if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { + goto __180 + } + zType = ts + 12649 /* "virtual" */ + goto __181 +__180: + if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { + goto __182 + } + zType = ts + 17565 /* "shadow" */ + goto __183 +__182: + zType = ts + 8752 /* "table" */ +__183: + ; +__181: + ; +__179: + ; + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17572, + libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, + Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), + zType, + int32((*Table)(unsafe.Pointer(pTab2)).FnCol), + libc.Bool32((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) != U32(0)), + libc.Bool32((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Strict) != U32(0)))) + goto __175 +__175: + k1 = (*HashElem)(unsafe.Pointer(k1)).Fnext + goto __174 + goto __176 +__176: + ; + goto __162 +__162: + ii4++ + goto __161 + goto __163 +__163: + ; + + goto __15 + +__34: + if !(zRight != 0) { + goto __184 + } + pIdx = Xsqlite3FindIndex(tls, db, zRight, zDb) + if !(pIdx == uintptr(0)) { + goto __185 + } + // If there is no index named zRight, check to see if there is a + // WITHOUT ROWID table named zRight, and if there is, show the + // structure of the PRIMARY KEY index for that table. + pTab3 = Xsqlite3LocateTable(tls, pParse, uint32(LOCATE_NOERR), zRight, zDb) + if !(pTab3 != 0 && !((*Table)(unsafe.Pointer(pTab3)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { + goto __186 + } + pIdx = Xsqlite3PrimaryKeyIndex(tls, pTab3) +__186: + ; +__185: + ; + if !(pIdx != 0) { + goto __187 + } + iIdxDb = Xsqlite3SchemaToIndex(tls, db, (*Index)(unsafe.Pointer(pIdx)).FpSchema) + if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { + goto __188 + } + // PRAGMA index_xinfo (newer version with more rows and columns) + mx = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 + goto __189 +__188: + // PRAGMA index_info (legacy version) + mx = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 +__189: + ; + pTab3 = (*Index)(unsafe.Pointer(pIdx)).FpTable + Xsqlite3CodeVerifySchema(tls, pParse, iIdxDb) + + i1 = 0 +__190: + if !(i1 < mx) { + goto __192 + } + cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17579, libc.VaList(bp+136, i1, int32(cnum), + func() uintptr { + if int32(cnum) < 0 { + return uintptr(0) + } + return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab3)).FaCol + uintptr(cnum)*24)).FzCnName + }())) + if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { + goto __193 + } + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17584, + libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), + libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) +__193: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, (*Parse)(unsafe.Pointer(pParse)).FnMem) + goto __191 +__191: + i1++ + goto __190 + goto __192 +__192: + ; +__187: + ; +__184: + ; + goto __15 + +__35: + if !(zRight != 0) { + goto __194 + } + pTab4 = Xsqlite3FindTable(tls, db, zRight, zDb) + if !(pTab4 != 0) { + goto __195 + } + iTabDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab4)).FpSchema) + (*Parse)(unsafe.Pointer(pParse)).FnMem = 5 + Xsqlite3CodeVerifySchema(tls, pParse, iTabDb) + pIdx1 = (*Table)(unsafe.Pointer(pTab4)).FpIndex + i2 = 0 +__196: + if !(pIdx1 != 0) { + goto __198 + } + *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17589, ts + 17591, ts + 16053} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17593, + libc.VaList(bp+184, i2, + (*Index)(unsafe.Pointer(pIdx1)).FzName, + libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), + *(*uintptr)(unsafe.Pointer(bp + 528 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), + libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) + goto __197 +__197: + pIdx1 = (*Index)(unsafe.Pointer(pIdx1)).FpNext + i2++ + goto __196 + goto __198 +__198: + ; +__195: + ; +__194: + ; + goto __15 + +__36: + (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 + i3 = 0 +__199: + if !(i3 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __201 + } + if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt == uintptr(0)) { + goto __202 + } + goto __200 +__202: + ; + + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17599, + libc.VaList(bp+224, i3, + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, + Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) + goto __200 +__200: + i3++ + goto __199 + goto __201 +__201: + ; + + goto __15 + +__37: + i4 = 0 + (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 + p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst +__203: + if !(p != 0) { + goto __205 + } + pColl = (*HashElem)(unsafe.Pointer(p)).Fdata + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17603, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + goto __204 +__204: + p = (*HashElem)(unsafe.Pointer(p)).Fnext + goto __203 + goto __205 +__205: + ; + + goto __15 + +__38: + showInternFunc = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_InternalFunc) != U32(0)) + (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 + i5 = 0 +__206: + if !(i5 < SQLITE_FUNC_HASH_SZ) { + goto __208 + } + p1 = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(i5)*8)) +__209: + if !(p1 != 0) { + goto __211 + } + + pragmaFunclistLine(tls, v, p1, 1, showInternFunc) + goto __210 +__210: + p1 = *(*uintptr)(unsafe.Pointer(p1 + 64)) + goto __209 + goto __211 +__211: + ; + goto __207 +__207: + i5++ + goto __206 + goto __208 +__208: + ; + j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst +__212: + if !(j != 0) { + goto __214 + } + p1 = (*HashElem)(unsafe.Pointer(j)).Fdata + + pragmaFunclistLine(tls, v, p1, 0, showInternFunc) + goto __213 +__213: + j = (*HashElem)(unsafe.Pointer(j)).Fnext + goto __212 + goto __214 +__214: + ; + + goto __15 + +__39: + (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 + j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst +__215: + if !(j1 != 0) { + goto __217 + } + pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7406, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + goto __216 +__216: + j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext + goto __215 + goto __217 +__217: + ; + + goto __15 + +__40: + i6 = 0 +__218: + if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { + goto __220 + } + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7406, libc.VaList(bp+272, aPragmaName[i6].FzName)) + goto __219 +__219: + i6++ + goto __218 + goto __220 +__220: + ; + + goto __15 + +__41: + if !(zRight != 0) { + goto __221 + } + pTab5 = Xsqlite3FindTable(tls, db, zRight, zDb) + if !(pTab5 != 0 && int32((*Table)(unsafe.Pointer(pTab5)).FeTabType) == TABTYP_NORM) { + goto __222 + } + pFK = *(*uintptr)(unsafe.Pointer(pTab5 + 64 + 8 /* &.pFKey */)) + if !(pFK != 0) { + goto __223 + } + iTabDb1 = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab5)).FpSchema) + i7 = 0 + (*Parse)(unsafe.Pointer(pParse)).FnMem = 8 + Xsqlite3CodeVerifySchema(tls, pParse, iTabDb1) +__224: + if !(pFK != 0) { + goto __225 + } + j2 = 0 +__226: + if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { + goto __228 + } + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17606, + libc.VaList(bp+280, i7, + j2, + (*FKey)(unsafe.Pointer(pFK)).FzTo, + (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab5)).FaCol+uintptr((*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FiFrom)*24)).FzCnName, + (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, + actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE + actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), + ts+17615)) + goto __227 +__227: + j2++ + goto __226 + goto __228 +__228: + ; + i7++ + pFK = (*FKey)(unsafe.Pointer(pFK)).FpNextFrom + goto __224 +__225: + ; +__223: + ; +__222: + ; +__221: + ; + goto __15 + +__42: // child to parent column mapping + + regResult = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += 4 + regKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regRow = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + k2 = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8)).Ffirst +__229: + if !(k2 != 0) { + goto __230 + } + if !(zRight != 0) { + goto __231 + } + pTab6 = Xsqlite3LocateTable(tls, pParse, uint32(0), zRight, zDb) + k2 = uintptr(0) + goto __232 +__231: + pTab6 = (*HashElem)(unsafe.Pointer(k2)).Fdata + k2 = (*HashElem)(unsafe.Pointer(k2)).Fnext +__232: + ; + if !(pTab6 == uintptr(0) || !(int32((*Table)(unsafe.Pointer(pTab6)).FeTabType) == TABTYP_NORM) || *(*uintptr)(unsafe.Pointer(pTab6 + 64 + 8)) == uintptr(0)) { + goto __233 + } + goto __229 +__233: + ; + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab6)).FpSchema) + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + Xsqlite3CodeVerifySchema(tls, pParse, iDb) + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab6)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab6)).FzName) + if !(int32((*Table)(unsafe.Pointer(pTab6)).FnCol)+regRow > (*Parse)(unsafe.Pointer(pParse)).FnMem) { + goto __234 + } + (*Parse)(unsafe.Pointer(pParse)).FnMem = int32((*Table)(unsafe.Pointer(pTab6)).FnCol) + regRow +__234: + ; + Xsqlite3OpenTable(tls, pParse, 0, iDb, pTab6, OP_OpenRead) + Xsqlite3VdbeLoadString(tls, v, regResult, (*Table)(unsafe.Pointer(pTab6)).FzName) + + i8 = 1 + pFK1 = *(*uintptr)(unsafe.Pointer(pTab6 + 64 + 8 /* &.pFKey */)) +__235: + if !(pFK1 != 0) { + goto __237 + } + pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) + if !(pParent == uintptr(0)) { + goto __238 + } + goto __236 +__238: + ; + *(*uintptr)(unsafe.Pointer(bp + 552 /* pIdx2 */)) = uintptr(0) + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pParent)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pParent)).FzName) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, uintptr(0)) + if !(x1 == 0) { + goto __239 + } + if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + goto __241 + } + Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) + goto __242 +__241: + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 552 /* pIdx2 */)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552 /* pIdx2 */))) +__242: + ; + goto __240 +__239: + k2 = uintptr(0) + goto __237 +__240: + ; + goto __236 +__236: + i8++ + pFK1 = (*FKey)(unsafe.Pointer(pFK1)).FpNextFrom + goto __235 + goto __237 +__237: + ; + + if !(pFK1 != 0) { + goto __243 + } + goto __230 +__243: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnTab < i8) { + goto __244 + } + (*Parse)(unsafe.Pointer(pParse)).FnTab = i8 +__244: + ; + addrTop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, 0) + + i8 = 1 + pFK1 = *(*uintptr)(unsafe.Pointer(pTab6 + 64 + 8 /* &.pFKey */)) +__245: + if !(pFK1 != 0) { + goto __247 + } + pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) + *(*uintptr)(unsafe.Pointer(bp + 552 /* pIdx2 */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 560 /* aiCols */)) = uintptr(0) + if !(pParent != 0) { + goto __248 + } + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + +__248: + ; + addrOk = Xsqlite3VdbeMakeLabel(tls, pParse) + + // Generate code to read the child key values into registers + // regRow..regRow+n. If any of the child key values are NULL, this + // row cannot cause an FK violation. Jump directly to addrOk in + // this case. + if !(regRow+(*FKey)(unsafe.Pointer(pFK1)).FnCol > (*Parse)(unsafe.Pointer(pParse)).FnMem) { + goto __249 + } + (*Parse)(unsafe.Pointer(pParse)).FnMem = regRow + (*FKey)(unsafe.Pointer(pFK1)).FnCol +__249: + ; + j3 = 0 +__250: + if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { + goto __252 + } + if *(*uintptr)(unsafe.Pointer(bp + 560)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560 /* aiCols */)) + uintptr(j3)*4)) + } else { + iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab6, 0, iCol, regRow+j3) + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRow+j3, addrOk) + goto __251 +__251: + j3++ + goto __250 + goto __252 +__252: + ; + + // Generate code to query the parent index for a matching parent + // key. If a match is found, jump to addrOk. + if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + goto __253 + } + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, regKey, + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552 /* pIdx2 */))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regKey, 0) + + goto __254 +__253: + if !(pParent != 0) { + goto __255 + } + jmp = Xsqlite3VdbeCurrentAddr(tls, v) + 2 + Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, i8, jmp, regRow) + Xsqlite3VdbeGoto(tls, v, addrOk) + +__255: + ; +__254: + ; + + // Generate code to report an FK violation to the caller. + if !((*Table)(unsafe.Pointer(pTab6)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __256 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, 0, regResult+1) + goto __257 +__256: + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) +__257: + ; + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17620, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) + Xsqlite3VdbeResolveLabel(tls, v, addrOk) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560 /* aiCols */))) + goto __246 +__246: + i8++ + pFK1 = (*FKey)(unsafe.Pointer(pFK1)).FpNextFrom + goto __245 + goto __247 +__247: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Next, 0, addrTop+1) + Xsqlite3VdbeJumpHere(tls, v, addrTop) + goto __229 +__230: + ; + + goto __15 + + // Reinstall the LIKE and GLOB functions. The variant of LIKE + // used will be case sensitive or not depending on the RHS. +__43: + if !(zRight != 0) { + goto __258 + } + Xsqlite3RegisterLikeFunctions(tls, db, int32(Xsqlite3GetBoolean(tls, zRight, uint8(0)))) +__258: + ; + + goto __15 + + // PRAGMA integrity_check + // PRAGMA integrity_check(N) + // PRAGMA quick_check + // PRAGMA quick_check(N) + // + // Verify the integrity of the database. + // + // The "quick_check" is reduced version of + // integrity_check designed to detect most database corruption + // without the overhead of cross-checking indexes. Quick_check + // is linear time wherease integrity_check is O(NlogN). + // + // The maximum nubmer of errors is 100 by default. A different default + // can be specified using a numeric parameter N. + // + // Or, the parameter N can be the name of a table. In that case, only + // the one table named is verified. The freelist is only verified if + // the named table is "sqlite_schema" (or one of its aliases). + // + // All schemas are checked by default. To check just a single + // schema, use the form: + // + // PRAGMA schema.integrity_check; +__44: + pObjTab = uintptr(0) // Check only this one table, if not NULL + + isQuick = libc.Bool32(int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(zLeft)))]) == 'q') + + // If the PRAGMA command was of the form "PRAGMA .integrity_check", + // then iDb is set to the index of the database identified by . + // In this case, the integrity of database iDb only is verified by + // the VDBE created below. + // + // Otherwise, if the command was simply "PRAGMA integrity_check" (or + // "PRAGMA quick_check"), then iDb is set to 0. In this case, set iDb + // to -1 here, to indicate that the VDBE should verify the integrity + // of all attached databases. + + if !((*Token)(unsafe.Pointer(pId2)).Fz == uintptr(0)) { + goto __259 + } + iDb = -1 +__259: + ; + + // Initialize the VDBE program + (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 + + // Set the maximum error count + *(*int32)(unsafe.Pointer(bp + 568 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + if !(zRight != 0) { + goto __260 + } + if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + goto __261 + } + if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + goto __263 + } + *(*int32)(unsafe.Pointer(bp + 568 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX +__263: + ; + goto __262 +__261: + pObjTab = Xsqlite3LocateTable(tls, pParse, uint32(0), zRight, + func() uintptr { + if iDb >= 0 { + return (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + } + return uintptr(0) + }()) +__262: + ; +__260: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) // reg[1] holds errors left + + // Do an integrity check on each database file + i9 = 0 +__264: + if !(i9 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __266 + } // Array of root page numbers of all btrees + cnt = 0 // Number of entries in aRoot[] + mxIdx = 0 // Maximum number of indexes for any table + + if !(0 != 0 && i9 == 1) { + goto __267 + } + goto __265 +__267: + ; + if !(iDb >= 0 && i9 != iDb) { + goto __268 + } + goto __265 +__268: + ; + + Xsqlite3CodeVerifySchema(tls, pParse, i9) + + // Do an integrity check of the B-Tree + // + // Begin by finding the root pages numbers + // for all tables and indices in the database. + + pTbls = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FpSchema + 8 + cnt = 0 + x2 = (*Hash)(unsafe.Pointer(pTbls)).Ffirst +__269: + if !(x2 != 0) { + goto __271 + } + pTab7 = (*HashElem)(unsafe.Pointer(x2)).Fdata // Number of indexes on pTab + if !(pObjTab != 0 && pObjTab != pTab7) { + goto __272 + } + goto __270 +__272: + ; + if !((*Table)(unsafe.Pointer(pTab7)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __273 + } + cnt++ +__273: + ; + nIdx = 0 + pIdx3 = (*Table)(unsafe.Pointer(pTab7)).FpIndex +__274: + if !(pIdx3 != 0) { + goto __276 + } + cnt++ + goto __275 +__275: + pIdx3 = (*Index)(unsafe.Pointer(pIdx3)).FpNext + nIdx++ + goto __274 + goto __276 +__276: + ; + if !(nIdx > mxIdx) { + goto __277 + } + mxIdx = nIdx +__277: + ; + goto __270 +__270: + x2 = (*HashElem)(unsafe.Pointer(x2)).Fnext + goto __269 + goto __271 +__271: + ; + if !(cnt == 0) { + goto __278 + } + goto __265 +__278: + ; + if !(pObjTab != 0) { + goto __279 + } + cnt++ +__279: + ; + aRoot = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(int32(0)))*uint64(cnt+1))) + if !(aRoot == uintptr(0)) { + goto __280 + } + goto __266 +__280: + ; + cnt = 0 + if !(pObjTab != 0) { + goto __281 + } + *(*int32)(unsafe.Pointer(aRoot + uintptr(libc.PreIncInt32(&cnt, 1))*4)) = 0 +__281: + ; + x2 = (*Hash)(unsafe.Pointer(pTbls)).Ffirst +__282: + if !(x2 != 0) { + goto __284 + } + pTab8 = (*HashElem)(unsafe.Pointer(x2)).Fdata + if !(pObjTab != 0 && pObjTab != pTab8) { + goto __285 + } + goto __283 +__285: + ; + if !((*Table)(unsafe.Pointer(pTab8)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __286 + } + *(*int32)(unsafe.Pointer(aRoot + uintptr(libc.PreIncInt32(&cnt, 1))*4)) = int32((*Table)(unsafe.Pointer(pTab8)).Ftnum) +__286: + ; + pIdx4 = (*Table)(unsafe.Pointer(pTab8)).FpIndex +__287: + if !(pIdx4 != 0) { + goto __289 + } + *(*int32)(unsafe.Pointer(aRoot + uintptr(libc.PreIncInt32(&cnt, 1))*4)) = int32((*Index)(unsafe.Pointer(pIdx4)).Ftnum) + goto __288 +__288: + pIdx4 = (*Index)(unsafe.Pointer(pIdx4)).FpNext + goto __287 + goto __289 +__289: + ; + goto __283 +__283: + x2 = (*HashElem)(unsafe.Pointer(x2)).Fnext + goto __282 + goto __284 +__284: + ; + *(*int32)(unsafe.Pointer(aRoot)) = cnt + + // Make sure sufficient number of registers have been allocated + (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { + if (*Parse)(unsafe.Pointer(pParse)).FnMem > 8+mxIdx { + return (*Parse)(unsafe.Pointer(pParse)).FnMem + } + return 8 + mxIdx + }() + Xsqlite3ClearTempRegCache(tls, pParse) + + // Do the b-tree integrity checks + Xsqlite3VdbeAddOp4(tls, v, OP_IntegrityCk, 2, cnt, 1, aRoot, -15) + Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) + addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, + Xsqlite3MPrintf(tls, db, ts+17624, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + -7) + Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, addr1) + + // Make sure all the indices are constructed correctly. + x2 = (*Hash)(unsafe.Pointer(pTbls)).Ffirst +__290: + if !(x2 != 0) { + goto __292 + } + pTab9 = (*HashElem)(unsafe.Pointer(x2)).Fdata + pPrior = uintptr(0) + r1 = -1 + + if !!(int32((*Table)(unsafe.Pointer(pTab9)).FeTabType) == TABTYP_NORM) { + goto __293 + } + goto __291 +__293: + ; + if !(pObjTab != 0 && pObjTab != pTab9) { + goto __294 + } + goto __291 +__294: + ; + if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + pPk1 = uintptr(0) + } else { + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + } + Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), + 1, uintptr(0), bp+572, bp+576) + // reg[7] counts the number of entries in the table. + // reg[8+i] counts the number of entries in the i-th index + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) + j4 = 0 + pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex +__295: + if !(pIdx5 != 0) { + goto __297 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) // index entries counter + goto __296 +__296: + pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext + j4++ + goto __295 + goto __297 +__297: + ; + + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572 /* iDataCur */)), 0) + loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + if !!(isQuick != 0) { + goto __298 + } + // Sanity check on record header decoding + Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572 /* iDataCur */)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) + +__298: + ; + // Verify that all NOT NULL columns really are NOT NULL. At the + // same time verify the type of the content of STRICT tables + bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) + j4 = 0 +__299: + if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { + goto __301 + } + pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __302 + } + goto __300 +__302: + ; + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { + goto __303 + } + goto __300 +__303: + ; + if bStrict != 0 { + doError = Xsqlite3VdbeMakeLabel(tls, pParse) + } else { + doError = 0 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572 /* iDataCur */)), j4, 3) + if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { + goto __304 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) +__304: + ; + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { + goto __305 + } + jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) + zErr = Xsqlite3MPrintf(tls, db, ts+17648, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + (*Column)(unsafe.Pointer(pCol1)).FzCnName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) + if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { + goto __306 + } + Xsqlite3VdbeGoto(tls, v, doError) + goto __307 +__306: + integrityCheckResultRow(tls, v) +__307: + ; + Xsqlite3VdbeJumpHere(tls, v, jmp2) +__305: + ; + if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && + int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { + goto __308 + } + jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, + int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) + + zErr = Xsqlite3MPrintf(tls, db, ts+17668, + libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], + (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) + Xsqlite3VdbeResolveLabel(tls, v, doError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, jmp2) +__308: + ; + goto __300 +__300: + j4++ + goto __299 + goto __301 +__301: + ; + // Verify CHECK constraints + if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { + goto __309 + } + pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { + goto __310 + } + addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) + addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 +__311: + if !(k3 > 0) { + goto __313 + } + Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) + goto __312 +__312: + k3-- + goto __311 + goto __313 +__313: + ; + Xsqlite3ExprIfTrue(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8)).FpExpr, addrCkOk, + SQLITE_JUMPIFNULL) + Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 + zErr1 = Xsqlite3MPrintf(tls, db, ts+17690, + libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) +__310: + ; + Xsqlite3ExprListDelete(tls, db, pCheck) +__309: + ; + if !!(isQuick != 0) { + goto __314 + } // Omit the remaining tests for quick_check + // Validate index entries for the current row + j4 = 0 + pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex +__315: + if !(pIdx5 != 0) { + goto __317 + } + ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) + if !(pPk1 == pIdx5) { + goto __318 + } + goto __316 +__318: + ; + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572 /* iDataCur */)), 0, 0, bp+580, + pPrior, r1) + pPrior = pIdx5 + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) // increment entry count + // Verify that an index entry exists for the current table row + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17720) + Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17725) + Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) + jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) + Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) + jmp4 = integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, jmp21) + // For UNIQUE indexes, verify that only one entry exists with the + // current key. The entry is unique if (1) any column is NULL + // or (2) the next entry has a different key + if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { + goto __319 + } + uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) + kk = 0 +__320: + if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { + goto __322 + } + iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx5)).FaiColumn + uintptr(kk)*2))) + + if !(iCol1 >= 0 && uint32(int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(iCol1)*24 + 8))&0xf>>0)) != 0) { + goto __323 + } + goto __321 +__323: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) + + goto __321 +__321: + kk++ + goto __320 + goto __322 +__322: + ; + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + Xsqlite3VdbeGoto(tls, v, uniqOk) + Xsqlite3VdbeJumpHere(tls, v, jmp6) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17746) + Xsqlite3VdbeGoto(tls, v, jmp5) + Xsqlite3VdbeResolveLabel(tls, v, uniqOk) +__319: + ; + Xsqlite3VdbeJumpHere(tls, v, jmp4) + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580 /* jmp3 */))) + goto __316 +__316: + pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext + j4++ + goto __315 + goto __317 +__317: + ; +__314: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572 /* iDataCur */)), loopTop) + Xsqlite3VdbeJumpHere(tls, v, loopTop-1) + if !!(isQuick != 0) { + goto __324 + } + Xsqlite3VdbeLoadString(tls, v, 2, ts+17773) + j4 = 0 + pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex +__325: + if !(pIdx5 != 0) { + goto __327 + } + if !(pPk1 == pIdx5) { + goto __328 + } + goto __326 +__328: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_Eq, 8+j4, 0, 3) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) + Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) + Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 2, 3) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, addr1) + goto __326 +__326: + pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext + j4++ + goto __325 + goto __327 +__327: + ; +__324: + ; + goto __291 +__291: + x2 = (*HashElem)(unsafe.Pointer(x2)).Fnext + goto __290 + goto __292 +__292: + ; + goto __265 +__265: + i9++ + goto __264 + goto __266 +__266: + ; + + aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) + if !(aOp2 != 0) { + goto __329 + } + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17802 /* "ok" */ + (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) + *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) +__329: + ; + Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) + + goto __15 + + // PRAGMA encoding + // PRAGMA encoding = "utf-8"|"utf-16"|"utf-16le"|"utf-16be" + // + // In its first form, this pragma returns the encoding of the main + // database. If the database is not initialized, it is initialized now. + // + // The second form of this pragma is a no-op if the main database file + // has not already been initialized. In this case it sets the default + // encoding that will be used for the main database file if a new file + // is created. If an existing main database file is opened, then the + // default text encoding for the existing database is used. + // + // In all cases new databases created using the ATTACH command are + // created to use the same default text encoding as the main database. If + // the main database has not been initialized and/or created when ATTACH + // is executed, this is done before the ATTACH operation. + // + // In the second form this pragma sets the text encoding to be used in + // new database files created using this database handle. It is only + // useful if invoked immediately after the main database i +__45: + if !!(zRight != 0) { + goto __330 + } // "PRAGMA encoding" + if !(Xsqlite3ReadSchema(tls, pParse) != 0) { + goto __332 + } + goto pragma_out +__332: + ; + + returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) + goto __331 +__330: // "PRAGMA encoding = XXX" + // Only change the value of sqlite.enc if the database handle is not + // initialized. If the main database exists, the new sqlite.enc value + // will be overwritten when the schema is next loaded. If it does not + // already exists, it will be created to use the new encoding value. + if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { + goto __333 + } + pEnc = uintptr(unsafe.Pointer(&encnames1)) +__334: + if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { + goto __336 + } + if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { + goto __337 + } + if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { + enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc + } else { + enc = func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }() + } + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc + Xsqlite3SetTextEncoding(tls, db, enc) + goto __336 +__337: + ; + goto __335 +__335: + pEnc += 16 + goto __334 + goto __336 +__336: + ; + if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { + goto __338 + } + Xsqlite3ErrorMsg(tls, pParse, ts+17805, libc.VaList(bp+416, zRight)) +__338: + ; +__333: + ; +__331: + ; + + goto __15 + + // PRAGMA [schema.]schema_version + // PRAGMA [schema.]schema_version = + // + // PRAGMA [schema.]user_version + // PRAGMA [schema.]user_version = + // + // PRAGMA [schema.]freelist_count + // + // PRAGMA [schema.]data_version + // + // PRAGMA [schema.]application_id + // PRAGMA [schema.]application_id = + // + // The pragma's schema_version and user_version are used to set or get + // the value of the schema-version and user-version, respectively. Both + // the schema-version and the user-version are 32-bit signed integers + // stored in the database header. + // + // The schema-cookie is usually only manipulated internally by SQLite. It + // is incremented by SQLite whenever the database schema is modified (by + // creating or dropping a table or index). The schema version is used by + // SQLite each time a query is executed to ensure that the internal cache + // of the schema used when compiling the SQL query matches the schema of + // the database against which the compiled query is actually executed. + // Subverting this mechanism by using "PRAGMA schema_version" to modify + // the schema-version is potentially dangerous and may lead to program + // crashes or database corruption. Use with caution! + // + // The user-version is not used internally by SQLite. It may be used by + // applications for any purpose. +__46: + iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) // Which cookie to read or write + Xsqlite3VdbeUsesBtree(tls, v, iDb) + if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { + goto __339 + } + + aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) + if !(0 != 0) { + goto __341 + } + goto __15 +__341: + ; + (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp2 = iCookie + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp3 = Xsqlite3Atoi(tls, zRight) + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp5 = U16(1) + goto __340 +__339: + ; + aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) + if !(0 != 0) { + goto __342 + } + goto __15 +__342: + ; + (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp4 + 1*24)).Fp1 = iDb + (*VdbeOp)(unsafe.Pointer(aOp4 + 1*24)).Fp3 = iCookie + Xsqlite3VdbeReusable(tls, v) +__340: + ; + + goto __15 + + // PRAGMA compile_options + // + // Return the names of all compile-time options used in this build, + // one option per row. +__47: + i10 = 0 + (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 +__343: + if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { + goto __344 + } + Xsqlite3VdbeLoadString(tls, v, 1, zOpt) + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) + goto __343 +__344: + ; + Xsqlite3VdbeReusable(tls, v) + + goto __15 + + // PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate + // + // Checkpoint the database. +__48: + iBt = func() int32 { + if (*Token)(unsafe.Pointer(pId2)).Fz != 0 { + return iDb + } + return SQLITE_MAX_ATTACHED + 2 + }() + eMode2 = SQLITE_CHECKPOINT_PASSIVE + if !(zRight != 0) { + goto __345 + } + if !(Xsqlite3StrICmp(tls, zRight, ts+17243) == 0) { + goto __346 + } + eMode2 = SQLITE_CHECKPOINT_FULL + goto __347 +__346: + if !(Xsqlite3StrICmp(tls, zRight, ts+17830) == 0) { + goto __348 + } + eMode2 = SQLITE_CHECKPOINT_RESTART + goto __349 +__348: + if !(Xsqlite3StrICmp(tls, zRight, ts+17396) == 0) { + goto __350 + } + eMode2 = SQLITE_CHECKPOINT_TRUNCATE +__350: + ; +__349: + ; +__347: + ; +__345: + ; + (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 + Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 3) + + goto __15 + + // PRAGMA wal_autocheckpoint + // PRAGMA wal_autocheckpoint = N + // + // Configure a database connection to automatically checkpoint a database + // after accumulating N frames in the log. Or query for the current value + // of N. +__49: + if !(zRight != 0) { + goto __351 + } + Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) +__351: + ; + returnSingleInt(tls, v, + func() int64 { + if (*Sqlite3)(unsafe.Pointer(db)).FxWalCallback == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 + }{Xsqlite3WalDefaultHook})) { + return int64(int32((*Sqlite3)(unsafe.Pointer(db)).FpWalArg)) + } + return int64(0) + }()) + + goto __15 + + // PRAGMA shrink_memory + // + // IMPLEMENTATION-OF: R-23445-46109 This pragma causes the database + // connection on which it is invoked to free up as much memory as it + // can, by calling sqlite3_db_release_memory(). +__50: + Xsqlite3_db_release_memory(tls, db) + goto __15 + + // PRAGMA optimize + // PRAGMA optimize(MASK) + // PRAGMA schema.optimize + // PRAGMA schema.optimize(MASK) + // + // Attempt to optimize the database. All schemas are optimized in the first + // two forms, and only the specified schema is optimized in the latter two. + // + // The details of optimizations performed by this pragma are expected + // to change and improve over time. Applications should anticipate that + // this pragma will perform new optimizations in future releases. + // + // The optional argument is a bitmask of optimizations to perform: + // + // 0x0001 Debugging mode. Do not actually perform any optimizations + // but instead return one line of text for each optimization + // that would have been done. Off by default. + // + // 0x0002 Run ANALYZE on tables that might benefit. On by default. + // See below for additional information. + // + // 0x0004 (Not yet implemented) Record usage and performance + // information from the current session in the + // database file so that it will be available to "optimize" + // pragmas run by future database connections. + // + // 0x0008 (Not yet implemented) Create indexes that might have + // been helpful to recent queries + // + // The default MASK is and always shall be 0xfffe. 0xfffe means perform all + // of the optimizations listed above except Debug Mode, including new + // optimizations that have not yet been invented. If new optimizations are + // ever added that should be off by default, those off-by-default + // optimizations will have bitmasks of 0x10000 or larger. + // + // DETERMINATION OF WHEN TO RUN ANALYZE + // + // In the current implementation, a table is analyzed if only if all of + // the following are true: + // + // (1) MASK bit 0x02 is set. + // + // (2) The query planner used sqlite_stat1-style statistics for one or + // more indexes of the table at some point during the lifetime of + // the current connection. + // + // (3) One or more indexes of the table are currently unanalyzed OR + // the number of rows in the table has increased by 25 times or more + // since the last time ANALYZE was run. + // + // The rules for when tables are analyzed are likely to change in + // future releases. +__51: // Mask of operations to perform + + if !(zRight != 0) { + goto __352 + } + opMask = U32(Xsqlite3Atoi(tls, zRight)) + if !(opMask&U32(0x02) == U32(0)) { + goto __354 + } + goto __15 +__354: + ; + goto __353 +__352: + opMask = U32(0xfffe) +__353: + ; + iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + iDbLast = func() int32 { + if zDb != 0 { + return iDb + } + return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 + }() +__355: + if !(iDb <= iDbLast) { + goto __357 + } + if !(iDb == 1) { + goto __358 + } + goto __356 +__358: + ; + Xsqlite3CodeVerifySchema(tls, pParse, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst +__359: + if !(k4 != 0) { + goto __361 + } + pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata + + // If table pTab has not been used in a way that would benefit from + // having analysis statistics during the current session, then skip it. + // This also has the effect of skipping virtual tables and views + if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { + goto __362 + } + goto __360 +__362: + ; + + // Reanalyze if the table is 25 times larger than the last analysis + szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) + pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex +__363: + if !(pIdx6 != 0) { + goto __365 + } + if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { + goto __366 + } + szThreshold = int16(0) // Always analyze if any index lacks statistics + goto __365 +__366: + ; + goto __364 +__364: + pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext + goto __363 + goto __365 +__365: + ; + if !(szThreshold != 0) { + goto __367 + } + Xsqlite3OpenTable(tls, pParse, iTabCur, iDb, pTab10, OP_OpenRead) + Xsqlite3VdbeAddOp3(tls, v, OP_IfSmaller, iTabCur, + int32(U32(Xsqlite3VdbeCurrentAddr(tls, v)+2)+opMask&U32(1)), int32(szThreshold)) + +__367: + ; + zSubSql = Xsqlite3MPrintf(tls, db, ts+17838, + libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + if !(opMask&U32(0x01) != 0) { + goto __368 + } + r11 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -7) + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) + goto __369 +__368: + Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -7) +__369: + ; + goto __360 +__360: + k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext + goto __359 + goto __361 +__361: + ; + goto __356 +__356: + iDb++ + goto __355 + goto __357 +__357: + ; + Xsqlite3VdbeAddOp0(tls, v, OP_Expire) + goto __15 + + // PRAGMA busy_timeout + // PRAGMA busy_timeout = N + // + // Call sqlite3_busy_timeout(db, N). Return the current timeout value + // if one is set. If no busy handler or a different busy handler is set + // then 0 is returned. Setting the busy_timeout to 0 or negative + // disables the timeout. + /*case PragTyp_BUSY_TIMEOUT*/ +__52: + ; + if !(zRight != 0) { + goto __370 + } + Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) +__370: + ; + returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) + goto __15 + + // PRAGMA soft_heap_limit + // PRAGMA soft_heap_limit = N + // + // IMPLEMENTATION-OF: R-26343-45930 This pragma invokes the + // sqlite3_soft_heap_limit64() interface with the argument N, if N is + // specified and is a non-negative integer. + // IMPLEMENTATION-OF: R-64451-07163 The soft_heap_limit pragma always + // returns the same integer that would be returned by the + // sqlite3_soft_heap_limit64(-1) C-language function. +__53: + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { + goto __371 + } + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584 /* N */))) +__371: + ; + returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) + goto __15 + + // PRAGMA hard_heap_limit + // PRAGMA hard_heap_limit = N + // + // Invoke sqlite3_hard_heap_limit64() to query or set the hard heap + // limit. The hard heap limit can be activated or lowered by this + // pragma, but not raised or deactivated. Only the + // sqlite3_hard_heap_limit64() C-language API can raise or deactivate + // the hard heap limit. This allows an application to set a heap limit + // constraint that cannot be relaxed by an untrusted SQL script. +__54: + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { + goto __372 + } + iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)))) { + goto __373 + } + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592 /* N1 */))) +__373: + ; +__372: + ; + returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) + goto __15 + + // PRAGMA threads + // PRAGMA threads = N + // + // Configure the maximum number of worker threads. Return the new + // maximum, which might be less than requested. +__55: + if !(zRight != 0 && + Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { + goto __374 + } + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) +__374: + ; + returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) + goto __15 + + // PRAGMA analysis_limit + // PRAGMA analysis_limit = N + // + // Configure the maximum number of rows that ANALYZE will examine + // in each index that it looks at. Return the new limit. +__56: + if !(zRight != 0 && + Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { + goto __375 + } + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) +__375: + ; + returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) // IMP: R-57594-65522 + goto __15 + +__15: + ; // End of the PRAGMA switch + + // The following block is a no-op unless SQLITE_DEBUG is defined. Its only + // purpose is to execute assert() statements to verify that if the + // PragFlg_NoColumns1 flag is set and the caller specified an argument + // to the PRAGMA, the implementation has not added any OP_ResultRow + // instructions to the VM. + if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { + goto __376 + } + +__376: + ; + +pragma_out: + Xsqlite3DbFree(tls, db, zLeft) + Xsqlite3DbFree(tls, db, zRight) +} + +type EncName = struct { + FzName uintptr + Fenc U8 + F__ccgo_pad1 [7]byte +} /* sqlite3.c:132383:18 */ + +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ +var getCacheSize = [9]VdbeOpList{ + {Fopcode: U8(OP_Transaction)}, // 0 + {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 + {Fopcode: U8(OP_IfPos), Fp1: int8(1), Fp2: int8(8)}, + {Fopcode: U8(OP_Integer), Fp2: int8(2)}, + {Fopcode: U8(OP_Subtract), Fp1: int8(1), Fp2: int8(2), Fp3: int8(1)}, + {Fopcode: U8(OP_IfPos), Fp1: int8(1), Fp2: int8(8)}, + {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 + {Fopcode: U8(OP_Noop)}, + {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ +var setMeta6 = [5]VdbeOpList{ + {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 + {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, + {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 + {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 + {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ +var endCode = [7]VdbeOpList{ + {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 + {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 + {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 2 + {Fopcode: U8(OP_ResultRow), Fp1: int8(3), Fp2: int8(1)}, // 3 + {Fopcode: U8(OP_Halt)}, // 4 + {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 + {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 +} /* sqlite3.c:132334:31 */ +var encnames1 = [9]EncName{ + {FzName: ts + 17856, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17861, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17867, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17876, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17885, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17893, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17901}, + {FzName: ts + 17908}, + {}, +} /* sqlite3.c:132386:7 */ +var setCookie = [2]VdbeOpList{ + {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 + {Fopcode: U8(OP_SetCookie)}, // 1 +} /* sqlite3.c:132466:31 */ +var readCookie = [3]VdbeOpList{ + {Fopcode: U8(OP_Transaction)}, // 0 + {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 + {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, +} /* sqlite3.c:132481:31 */ +// **************************************************************************** +// +// Implementation of an eponymous virtual table that runs a pragma. +// +type PragmaVtab1 = struct { + Fbase Sqlite3_vtab + Fdb uintptr + FpName uintptr + FnHidden U8 + FiHidden U8 + F__ccgo_pad1 [6]byte +} /* sqlite3.c:132841:9 */ + +// **************************************************************************** +// +// Implementation of an eponymous virtual table that runs a pragma. +// +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ +type PragmaVtabCursor1 = struct { + Fbase Sqlite3_vtab_cursor + FpPragma uintptr + FiRowid Sqlite_int64 + FazArg [2]uintptr +} /* sqlite3.c:132842:9 */ + +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ + +// Pragma virtual table module xConnect method. +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ + bp := tls.Alloc(264) + defer tls.Free(264) + + var pPragma uintptr = pAux + var pTab uintptr = uintptr(0) + var rc int32 + var i int32 + var j int32 + var cSep uint8 = uint8('(') + // var acc StrAccum at bp+32, 32 + + // var zBuf [200]uint8 at bp+64, 200 + + _ = argc + _ = argv + Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]uint8{})), 0) + Xsqlite3_str_appendall(tls, bp+32, ts+17914) + i = 0 + j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) +__1: + if !(i < int32((*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName)) { + goto __3 + } + { + Xsqlite3_str_appendf(tls, bp+32, ts+17929, libc.VaList(bp, int32(cSep), pragCName[j])) + cSep = uint8(',') + + } + goto __2 +__2: + i++ + j++ + goto __1 + goto __3 +__3: + ; + if i == 0 { + Xsqlite3_str_appendf(tls, bp+32, ts+17936, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + i++ + } + j = 0 + if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { + Xsqlite3_str_appendall(tls, bp+32, ts+17942) + j++ + } + if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { + Xsqlite3_str_appendall(tls, bp+32, ts+17954) + j++ + } + Xsqlite3_str_append(tls, bp+32, ts+4899, 1) + Xsqlite3StrAccumFinish(tls, bp+32) + + rc = Xsqlite3_declare_vtab(tls, db, bp+64) + if rc == SQLITE_OK { + pTab = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtab{}))) + if pTab == uintptr(0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(PragmaVtab{}))) + (*PragmaVtab)(unsafe.Pointer(pTab)).FpName = pPragma + (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb = db + (*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden = U8(i) + (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) + } + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + } + + *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab + return rc +} + +// Pragma virtual table module xDisconnect method. +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ + var pTab uintptr = pVtab + Xsqlite3_free(tls, pTab) + return SQLITE_OK +} + +// Figure out the best index to use to search a pragma virtual table. +// +// There are not really any index choices. But we want to encourage the +// query planner to give == constraints on as many hidden parameters as +// possible, and especially on the first hidden parameter. So return a +// high cost if hidden parameters are unconstrained. +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pTab uintptr = tab + var pConstraint uintptr + var i int32 + var j int32 + // var seen [2]int32 at bp, 8 + + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(1) + if int32((*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden) == 0 { + return SQLITE_OK + } + pConstraint = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + *(*int32)(unsafe.Pointer(bp)) = 0 + *(*int32)(unsafe.Pointer(bp + 1*4)) = 0 + i = 0 +__1: + if !(i < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { + goto __3 + } + { + if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { + goto __2 + } + if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) != SQLITE_INDEX_CONSTRAINT_EQ { + goto __2 + } + if (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { + goto __2 + } + j = (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn - int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) + + *(*int32)(unsafe.Pointer(bp + uintptr(j)*4)) = i + 1 + + } + goto __2 +__2: + i++ + pConstraint += 12 + goto __1 + goto __3 +__3: + ; + if *(*int32)(unsafe.Pointer(bp)) == 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(2147483647) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(2147483647) + return SQLITE_OK + } + j = *(*int32)(unsafe.Pointer(bp)) - 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).FargvIndex = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).Fomit = uint8(1) + if *(*int32)(unsafe.Pointer(bp + 1*4)) == 0 { + return SQLITE_OK + } + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(20) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(20) + j = *(*int32)(unsafe.Pointer(bp + 1*4)) - 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).FargvIndex = 2 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).Fomit = uint8(1) + return SQLITE_OK +} + +// Create a new cursor for the pragma virtual table +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ + var pCsr uintptr + pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) + if pCsr == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(PragmaVtabCursor{}))) + (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab = pVtab + *(*uintptr)(unsafe.Pointer(ppCursor)) = pCsr + return SQLITE_OK +} + +// Clear all content from pragma virtual table cursor. +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ + var i int32 + Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) + (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) + for i = 0; i < int32(uint64(unsafe.Sizeof([2]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))); i++ { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(i)*8)) = uintptr(0) + } +} + +// Close a pragma virtual table cursor +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ + var pCsr uintptr = cur + pragmaVtabCursorClear(tls, pCsr) + Xsqlite3_free(tls, pCsr) + return SQLITE_OK +} + +// Advance the pragma virtual table cursor to the next row +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ + var pCsr uintptr = pVtabCursor + var rc int32 = SQLITE_OK + + // Increment the xRowid value + (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid++ + + if SQLITE_ROW != Xsqlite3_step(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) { + rc = Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) + (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) + pragmaVtabCursorClear(tls, pCsr) + } + return rc +} + +// Pragma virtual table module xFilter method. +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var pCsr uintptr = pVtabCursor + var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab + var rc int32 + var i int32 + var j int32 + // var acc StrAccum at bp+32, 32 + + var zSql uintptr + + _ = idxNum + _ = idxStr + pragmaVtabCursorClear(tls, pCsr) + if int32((*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FmPragFlg)&PragFlg_Result1 != 0 { + j = 0 + } else { + j = 1 + } + i = 0 +__1: + if !(i < argc) { + goto __3 + } + { + var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + + if zText != 0 { + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, zText)) + if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { + return SQLITE_NOMEM + } + } + + } + goto __2 +__2: + i++ + j++ + goto __1 + goto __3 +__3: + ; + Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) + Xsqlite3_str_appendall(tls, bp+32, ts+17969) + if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { + Xsqlite3_str_appendf(tls, bp+32, ts+17977, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + } + Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) + if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { + Xsqlite3_str_appendf(tls, bp+32, ts+17981, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + } + zSql = Xsqlite3StrAccumFinish(tls, bp+32) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+8, uintptr(0)) + Xsqlite3_free(tls, zSql) + if rc != SQLITE_OK { + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + return rc + } + return pragmaVtabNext(tls, pVtabCursor) +} + +// Pragma virtual table module xEof method. +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ + var pCsr uintptr = pVtabCursor + return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) +} + +// The xColumn method simply returns the corresponding column from +// the PRAGMA. +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ + var pCsr uintptr = pVtabCursor + var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab + if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { + Xsqlite3_result_value(tls, ctx, Xsqlite3_column_value(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma, i)) + } else { + Xsqlite3_result_text(tls, ctx, *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(i-int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden))*8)), -1, libc.UintptrFromInt32(-1)) + } + return SQLITE_OK +} + +// Pragma virtual table module xRowid method. +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ + var pCsr uintptr = pVtabCursor + *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid + return SQLITE_OK +} + +// The pragma virtual table object +var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table + FxConnect: 0, // xConnect - connect to an existing table + FxBestIndex: 0, // xBestIndex - Determine search strategy + FxDisconnect: 0, // xDestroy - Drop a table + FxOpen: 0, // xOpen - open a cursor + FxClose: 0, // xClose - close a cursor + FxFilter: 0, // xFilter - configure scan constraints + FxNext: 0, // xNext - advance a cursor + FxEof: 0, // xEof + FxColumn: 0, // xColumn - read data + FxRowid: 0, // xShadowName +} /* sqlite3.c:133103:29 */ + +// Check to see if zTabName is really the name of a pragma. If it is, +// then register an eponymous virtual table for that pragma and return +// a pointer to the Module object for the new virtual table. +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ + var pName uintptr + + pName = pragmaLocate(tls, zName+uintptr(7)) + if pName == uintptr(0) { + return uintptr(0) + } + if int32((*PragmaName)(unsafe.Pointer(pName)).FmPragFlg)&(PragFlg_Result0|PragFlg_Result1) == 0 { + return uintptr(0) + } + + return Xsqlite3VtabCreateModule(tls, db, zName, uintptr(unsafe.Pointer(&pragmaVtabModule)), pName, uintptr(0)) +} + +//************* End of pragma.c ********************************************* +//************* Begin file prepare.c **************************************** +// 2005 May 25 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the implementation of the sqlite3_prepare() +// interface, and routines that contribute to loading the database schema +// from disk. +// #include "sqliteInt.h" + +// Fill the InitData structure with an error message that indicates +// that the database is corrupt. +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var db uintptr = (*InitData)(unsafe.Pointer(pData)).Fdb + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_NOMEM + } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { + // A error message has already been generated. Do not overwrite it + } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { + *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, + ts+17985, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], + zExtra)) + (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR + } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) + } else { + var z uintptr + var zObj uintptr + if *(*uintptr)(unsafe.Pointer(azObj + 1*8)) != 0 { + zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*8)) + } else { + zObj = ts + 4950 /* "?" */ + } + z = Xsqlite3MPrintf(tls, db, ts+18013, libc.VaList(bp+32, zObj)) + if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { + z = Xsqlite3MPrintf(tls, db, ts+18044, libc.VaList(bp+40, z, zExtra)) + } + *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) + } +} + +var azAlterType = [3]uintptr{ + ts + 18052, + ts + 18059, + ts + 18071, +} /* sqlite3.c:133183:23 */ + +// Check to see if any sibling index (another index on the same table) +// of pIndex has the same root page number, and if it does, return true. +// This would indicate a corrupt schema. +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ + var p uintptr + for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { + if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { + return 1 + } + } + return 0 +} + +// This is the callback routine for the code that initializes the +// database. See sqlite3Init() below for additional information. +// This routine is also called from the OP_ParseSchema opcode of the VDBE. +// +// Each callback contains the following information: +// +// argv[0] = type of object: "table", "index", "trigger", or "view". +// argv[1] = name of thing being created +// argv[2] = associated table if an index or trigger +// argv[3] = root page number for table or index. 0 for trigger or view. +// argv[4] = SQL text for the CREATE statement. +// +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pData uintptr = pInit + var db uintptr = (*InitData)(unsafe.Pointer(pData)).Fdb + var iDb int32 = (*InitData)(unsafe.Pointer(pData)).FiDb + + _ = NotUsed + _ = argc + + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_EncodingFixed) + if argv == uintptr(0) { + return 0 + } // Might happen if EMPTY_RESULT_CALLBACKS are on + (*InitData)(unsafe.Pointer(pData)).FnInitRow++ + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + corruptSchema(tls, pData, argv, uintptr(0)) + return 1 + } + + if *(*uintptr)(unsafe.Pointer(argv + 3*8)) == uintptr(0) { + corruptSchema(tls, pData, argv, uintptr(0)) + } else if *(*uintptr)(unsafe.Pointer(argv + 4*8)) != 0 && + 'c' == int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)))))]) && + 'r' == int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)) + 1)))]) { + // Call the parser to process a CREATE TABLE, INDEX or VIEW. + // But because db->init.busy is set to 1, no VDBE code is generated + // or executed. All the parser does is build the internal data + // structures that describe the table, index, or view. + // + // No other valid SQL statement, other than the variable CREATE statements, + // can begin with the letters "C" and "R". Thus, it is not possible run + // any other kind of statement while parsing the schema, even a corrupt + // schema. + var rc int32 + var saved_iDb U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb + // var pStmt uintptr at bp, 8 + + // Return code from sqlite3_prepare() + + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb) + if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || + (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { + if Xsqlite3Config.FbExtraSchemaChecks != 0 { + corruptSchema(tls, pData, argv, ts+14068) + } + } + libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) + (*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = argv + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + sqlite3Prepare(tls, db, *(*uintptr)(unsafe.Pointer(argv + 4*8)), -1, uint32(0), uintptr(0), bp, uintptr(0)) + rc = (*Sqlite3)(unsafe.Pointer(db)).FerrCode + + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = saved_iDb + // assert( saved_iDb==0 || (db->mDbFlags & DBFLAG_Vacuum)!=0 ); + if SQLITE_OK != rc { + if uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x1>>0)) != 0 { + + } else { + if rc > (*InitData)(unsafe.Pointer(pData)).Frc { + (*InitData)(unsafe.Pointer(pData)).Frc = rc + } + if rc == SQLITE_NOMEM { + Xsqlite3OomFault(tls, db) + } else if rc != SQLITE_INTERRUPT && rc&0xFF != SQLITE_LOCKED { + corruptSchema(tls, pData, argv, Xsqlite3_errmsg(tls, db)) + } + } + } + (*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = uintptr(unsafe.Pointer(&Xsqlite3StdType)) // Any array of string ptrs will do + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + } else if *(*uintptr)(unsafe.Pointer(argv + 1*8)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(argv + 4*8)) != uintptr(0) && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8))))) != 0 { + corruptSchema(tls, pData, argv, uintptr(0)) + } else { + // If the SQL column is blank it means this is an index that + // was created to be the PRIMARY KEY or to fulfill a UNIQUE + // constraint for a CREATE TABLE. The index should have already + // been created when we processed the CREATE TABLE. All we have + // to do here is record the root page number for that index. + var pIndex uintptr + pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) + if pIndex == uintptr(0) { + corruptSchema(tls, pData, argv, ts+18082) + } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || + (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || + (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || + Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { + if Xsqlite3Config.FbExtraSchemaChecks != 0 { + corruptSchema(tls, pData, argv, ts+14068) + } + } + } + return 0 +} + +// Attempt to read the database schema and initialize internal +// data structures for a single database file. The index of the +// database file is given by iDb. iDb==0 is used for the main +// database. iDb==1 should never be used. iDb>=2 is used for +// auxiliary databases. Return one of the SQLITE_ error codes to +// indicate success or failure. +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ + bp := tls.Alloc(124) + defer tls.Free(124) + + var rc int32 + var i int32 + var size int32 + var pDb uintptr + // var azArg [6]uintptr at bp+16, 48 + + // var meta [5]int32 at bp+104, 20 + + // var initData InitData at bp+64, 40 + + var zSchemaTabName uintptr + var openedTransaction int32 + var mask int32 + var encoding U8 + var xAuth Sqlite3_xauth + var zSql uintptr + openedTransaction = 0 + mask = int32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) | libc.Uint32FromInt32(libc.CplInt32(DBFLAG_EncodingFixed))) + + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) + + // Construct the in-memory representation schema tables (sqlite_schema or + // sqlite_temp_schema) by invoking the parser directly. The appropriate + // table name will be inserted automatically by the parser so we can just + // use the abbreviation "x" here. The parser will also automatically tag + // the schema table as read-only. + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8752 /* "table" */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { + if !(0 != 0) && iDb == 1 { + return ts + 12024 + } + return ts + 5835 + }()) + *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7816 /* "1" */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18095 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc = SQLITE_OK + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FpzErrMsg = pzErrMsg + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmInitFlags = mFlags + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FnInitRow = U32(0) + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Pgno(0) + Xsqlite3InitCallback(tls, bp+64, 5, bp+16, uintptr(0)) + *(*U32)(unsafe.Pointer(db + 44)) &= U32(mask) + if !((*InitData)(unsafe.Pointer(bp+64)).Frc != 0) { + goto __1 + } + rc = (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc + goto error_out +__1: + ; + + // Create a cursor to hold the database open + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + if !((*Db)(unsafe.Pointer(pDb)).FpBt == uintptr(0)) { + goto __2 + } + + *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 114)) |= U16(DB_SchemaLoaded) + rc = SQLITE_OK + goto error_out +__2: + ; + + // If there is not already a read-only (or read-write) transaction opened + // on the b-tree database, open one now. If a transaction is opened, it + // will be closed before this function returns. + Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + if !(Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) == SQLITE_TXN_NONE) { + goto __3 + } + rc = Xsqlite3BtreeBeginTrans(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, 0, uintptr(0)) + if !(rc != SQLITE_OK) { + goto __4 + } + Xsqlite3SetString(tls, pzErrMsg, db, Xsqlite3ErrStr(tls, rc)) + goto initone_error_out +__4: + ; + openedTransaction = 1 +__3: + ; + + // Get the database meta information. + // + // Meta values are as follows: + // meta[0] Schema cookie. Changes with each schema change. + // meta[1] File format of schema layer. + // meta[2] Size of the page cache. + // meta[3] Largest rootpage (auto/incr_vacuum mode) + // meta[4] Db text encoding. 1:UTF-8 2:UTF-16LE 3:UTF-16BE + // meta[5] User version + // meta[6] Incremental vacuum mode + // meta[7] unused + // meta[8] unused + // meta[9] unused + // + // Note: The #defined SQLITE_UTF* symbols in sqliteInt.h correspond to + // the possible values of meta[4]. + i = 0 +__5: + if !(i < int32(uint64(unsafe.Sizeof([5]int32{}))/uint64(unsafe.Sizeof(int32(0))))) { + goto __7 + } + Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, i+1, bp+104+uintptr(i)*4) + goto __6 +__6: + i++ + goto __5 + goto __7 +__7: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ResetDatabase) != uint64(0)) { + goto __8 + } + libc.Xmemset(tls, bp+104, 0, uint64(unsafe.Sizeof([5]int32{}))) +__8: + ; + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = *(*int32)(unsafe.Pointer(bp + 104)) + + // If opening a non-empty database, check the text encoding. For the + // main database, set sqlite3.enc to the encoding of the main database. + // For an attached db, it is an error if the encoding is not the same + // as sqlite3.enc. + if !(*(*int32)(unsafe.Pointer(bp + 104 + 4*4)) != 0) { + goto __9 + } // text encoding + if !(iDb == 0 && (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { + goto __10 + } + // If opening the main database, set ENC(db). + encoding = U8(int32(U8(*(*int32)(unsafe.Pointer(bp + 104 + 4*4)))) & 3) + if !(int32(encoding) == 0) { + goto __12 + } + encoding = U8(SQLITE_UTF8) +__12: + ; + Xsqlite3SetTextEncoding(tls, db, encoding) + goto __11 +__10: + // If opening an attached database, the encoding much match ENC(db) + if !(*(*int32)(unsafe.Pointer(bp + 104 + 4*4))&3 != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { + goto __13 + } + Xsqlite3SetString(tls, pzErrMsg, db, + ts+11651) + rc = SQLITE_ERROR + goto initone_error_out +__13: + ; +__11: + ; +__9: + ; + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc + + if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size == 0) { + goto __14 + } + size = Xsqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(bp + 104 + 2*4))) + if !(size == 0) { + goto __15 + } + size = -2000 +__15: + ; + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size = size + Xsqlite3BtreeSetCacheSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size) +__14: + ; + + // file_format==1 Version 3.0.0. + // file_format==2 Version 3.1.3. // ALTER TABLE ADD COLUMN + // file_format==3 Version 3.1.4. // ditto but with non-NULL defaults + // file_format==4 Version 3.3.0. // DESC indices. Boolean constants + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(*(*int32)(unsafe.Pointer(bp + 104 + 1*4))) + if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) == 0) { + goto __16 + } + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(1) +__16: + ; + if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { + goto __17 + } + Xsqlite3SetString(tls, pzErrMsg, db, ts+18167) + rc = SQLITE_ERROR + goto initone_error_out +__17: + ; + + // Ticket #2804: When we open a database in the newer file format, + // clear the legacy_file_format pragma flag so that a VACUUM will + // not downgrade the database and thus invalidate any descending + // indices that the user might have created. + if !(iDb == 0 && *(*int32)(unsafe.Pointer(bp + 104 + 1*4)) >= 4) { + goto __18 + } + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyFileFmt)) +__18: + ; + + // Read the schema information out of the schema tables + + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + + zSql = Xsqlite3MPrintf(tls, db, + ts+18191, + libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) + + xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) + rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + }{Xsqlite3InitCallback})), bp+64 /* &initData */, uintptr(0)) + (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth + + if !(rc == SQLITE_OK) { + goto __19 + } + rc = (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc +__19: + ; + Xsqlite3DbFree(tls, db, zSql) + if !(rc == SQLITE_OK) { + goto __20 + } + Xsqlite3AnalysisLoad(tls, db, iDb) +__20: + ; + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __21 + } + rc = SQLITE_NOMEM + Xsqlite3ResetAllSchemasOfConnection(tls, db) + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 + goto __22 +__21: + if !(rc == SQLITE_OK || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NoSchemaError) != 0) { + goto __23 + } + // Hack: If the SQLITE_NoSchemaError flag is set, then consider + // the schema loaded, even if errors (other than OOM) occurred. In + // this situation the current sqlite3_prepare() operation will fail, + // but the following one will attempt to compile the supplied statement + // against whatever subset of the schema was loaded before the error + // occurred. + // + // The primary purpose of this is to allow access to the sqlite_schema + // table even when its contents have been corrupted. + *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 114)) |= U16(DB_SchemaLoaded) + rc = SQLITE_OK +__23: + ; +__22: + ; + + // Jump here for an error that occurs after successfully allocating + // curMain and calling sqlite3BtreeEnter(). For an error that occurs + // before that point, jump to error_out. +initone_error_out: + if !(openedTransaction != 0) { + goto __24 + } + Xsqlite3BtreeCommit(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) +__24: + ; + Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + +error_out: + if !(rc != 0) { + goto __25 + } + if !(rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8) { + goto __26 + } + Xsqlite3OomFault(tls, db) +__26: + ; + Xsqlite3ResetOneSchema(tls, db, iDb) +__25: + ; + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) + return rc +} + +// Initialize all database files - the main database file, the file +// used to store temporary tables, and any additional database files +// created using ATTACH statements. Return a success code. If an +// error occurs, write an error message into *pzErrMsg. +// +// After a database is initialized, the DB_SchemaLoaded bit is set +// bit is set in the flags field of the Db structure. +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ + var i int32 + var rc int32 + var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) + + (*Sqlite3)(unsafe.Pointer(db)).Fenc = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc + + // Do the main schema first + if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).FschemaFlags)&DB_SchemaLoaded == DB_SchemaLoaded) { + rc = Xsqlite3InitOne(tls, db, 0, pzErrMsg, uint32(0)) + if rc != 0 { + return rc + } + } + // All other schemas after the main schema. The "temp" schema must be last + for i = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1; i > 0; i-- { + + if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema)).FschemaFlags)&DB_SchemaLoaded == DB_SchemaLoaded) { + rc = Xsqlite3InitOne(tls, db, i, pzErrMsg, uint32(0)) + if rc != 0 { + return rc + } + } + } + if commit_internal != 0 { + Xsqlite3CommitInternalChanges(tls, db) + } + return SQLITE_OK +} + +// This routine is a no-op if the database schema is already initialized. +// Otherwise, the schema is loaded. An error code is returned. +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ + var rc int32 = SQLITE_OK + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { + rc = Xsqlite3Init(tls, db, pParse+8) + if rc != SQLITE_OK { + (*Parse)(unsafe.Pointer(pParse)).Frc = rc + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + } else if (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache != 0 { + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaKnownOk) + } + } + return rc +} + +// Check schema cookies in all databases. If any cookie is out +// of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies +// make no changes to pParse->rc. +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var iDb int32 + var rc int32 + // var cookie int32 at bp, 4 + + for iDb = 0; iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb; iDb++ { + var openedTransaction int32 = 0 // True if a transaction is opened + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt // Btree database to read cookie from + if pBt == uintptr(0) { + continue + } + + // If there is not already a read-only (or read-write) transaction opened + // on the b-tree database, open one now. If a transaction is opened, it + // will be closed immediately after reading the meta-value. + if Xsqlite3BtreeTxnState(tls, pBt) == SQLITE_TXN_NONE { + rc = Xsqlite3BtreeBeginTrans(tls, pBt, 0, uintptr(0)) + if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { + Xsqlite3OomFault(tls, db) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + } + if rc != SQLITE_OK { + return + } + openedTransaction = 1 + } + + // Read the schema cookie from the database. If it does not match the + // value stored as part of the in-memory schema representation, + // set Parse.rc to SQLITE_SCHEMA. + Xsqlite3BtreeGetMeta(tls, pBt, BTREE_SCHEMA_VERSION, bp) + + if *(*int32)(unsafe.Pointer(bp)) != (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).Fschema_cookie { + Xsqlite3ResetOneSchema(tls, db, iDb) + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_SCHEMA + } + + // Close the transaction, if one was opened. + if openedTransaction != 0 { + Xsqlite3BtreeCommit(tls, pBt) + } + } +} + +// Convert a schema pointer into the iDb index that indicates +// which database file in db->aDb[] the schema refers to. +// +// If the same database is attached more than once, the first +// attached database is returned. +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ + var i int32 = -32768 + + // If pSchema is NULL, then return -32768. This happens when code in + // expr.c is trying to resolve a reference to a transient table (i.e. one + // created by a sub-select). In this case the return value of this + // function should never be used. + // + // We return -32768 instead of the more usual -1 simply because using + // -32768 as the incorrect index into db->aDb[] is much + // more likely to cause a segfault than -1 (of course there are assert() + // statements too, but it never hurts to play the odds) and + // -32768 will still fit into a 16-bit signed integer. + + if pSchema != 0 { + for i = 0; 1 != 0; i++ { + + if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema == pSchema { + break + } + } + + } + return i +} + +// Free all memory allocations in the pParse object +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + for (*Parse)(unsafe.Pointer(pParse)).FpCleanup != 0 { + var pCleanup uintptr = (*Parse)(unsafe.Pointer(pParse)).FpCleanup + (*Parse)(unsafe.Pointer(pParse)).FpCleanup = (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*ParseCleanup)(unsafe.Pointer(pCleanup)).FxCleanup})).f(tls, db, (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr) + Xsqlite3DbFreeNN(tls, db, pCleanup) + } + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) + } + + *(*U32)(unsafe.Pointer(db + 440)) -= U32((*Parse)(unsafe.Pointer(pParse)).FdisableLookaside) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { + if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { + return uint16(0) + } + return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue + }() + + (*Sqlite3)(unsafe.Pointer(db)).FpParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse + (*Parse)(unsafe.Pointer(pParse)).Fdb = uintptr(0) + (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside = U8(0) +} + +// Add a new cleanup operation to a Parser. The cleanup should happen when +// the parser object is destroyed. But, beware: the cleanup might happen +// immediately. +// +// Use this mechanism for uncommon cleanups. There is a higher setup +// cost for this mechansim (an extra malloc), so it should not be used +// for common cleanups that happen on most calls. But for less +// common cleanups, we save a single NULL-pointer comparison in +// sqlite3ParseObjectReset(), which reduces the total CPU cycle count. +// +// If a memory allocation error occurs, then the cleanup happens immediately. +// When either SQLITE_DEBUG or SQLITE_COVERAGE_TEST are defined, the +// pParse->earlyCleanup flag is set in that case. Calling code show verify +// that test cases exist for which this happens, to guard against possible +// use-after-free errors following an OOM. The preferred way to do this is +// to immediately follow the call to this routine with: +// +// testcase( pParse->earlyCleanup ); +// +// This routine returns a copy of its pPtr input (the third parameter) +// except if an early cleanup occurs, in which case it returns NULL. So +// another way to check for early cleanup is to check the return value. +// Or, stop using the pPtr parameter with this call and use only its +// return value thereafter. Something like this: +// +// pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ + var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) + if pCleanup != 0 { + (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup + (*Parse)(unsafe.Pointer(pParse)).FpCleanup = pCleanup + (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr = pPtr + (*ParseCleanup)(unsafe.Pointer(pCleanup)).FxCleanup = xCleanup + } else { + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xCleanup})).f(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPtr) + pPtr = uintptr(0) + } + return pPtr +} + +// Turn bulk memory into a valid Parse object and link that Parse object +// into database connection db. +// +// Call sqlite3ParseObjectReset() to undo this operation. +// +// Caution: Do not confuse this routine with sqlite3ParseObjectInit() which +// is generated by Lemon. +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + + (*Parse)(unsafe.Pointer(pParse)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse + (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse + (*Parse)(unsafe.Pointer(pParse)).Fdb = db + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+1461, 0) + } +} + +// Compile the UTF-8 encoded SQL statement zSql into a statement handle. +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ + bp := tls.Alloc(424) + defer tls.Free(424) + + var rc int32 // Result code + var i int32 // Loop counter + // var sParse Parse at bp+16, 408 + + var zDb uintptr + var pBt uintptr + var zSqlCopy uintptr + var mxLen int32 + var pT uintptr + rc = SQLITE_OK // Parsing context + + // sqlite3ParseObjectInit(&sParse, db); // inlined for performance + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse + (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 /* &sParse */ + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = db + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpReprepare = pReprepare + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __1 + } + Xsqlite3ErrorMsg(tls, bp+16, ts+1461, 0) +__1: + ; + + // For a long-term use prepared statement avoid the use of + // lookaside memory. + if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { + goto __2 + } + (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FdisableLookaside++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) +__2: + ; + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + + // Check to verify that it is possible to get a read lock on all + // database schemas. The inability to get a read lock indicates that + // some other database connection is holding a write-lock, which in + // turn means that the other connection has made uncommitted changes + // to the schema. + // + // Were we to proceed and prepare the statement against the uncommitted + // schema changes and if those schema changes are subsequently rolled + // back and different changes are made in their place, then when this + // prepared statement goes to run the schema cookie would fail to detect + // the schema change. Disaster would follow. + // + // This thread is currently holding mutexes on all Btrees (because + // of the sqlite3BtreeEnterAll() in sqlite3LockAndPrepare()) so it + // is not possible for another thread to start a new schema change + // while this routine is running. Hence, we do not need to hold + // locks on the schema, we just need to make sure nobody else is + // holding them. + // + // Note that setting READ_UNCOMMITTED overrides most lock detection, + // but it does *not* override schema lock detection, so this all still + // works even if READ_UNCOMMITTED is set. + if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { + goto __3 + } + i = 0 +__4: + if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __6 + } + pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if !(pBt != 0) { + goto __7 + } + + rc = Xsqlite3BtreeSchemaLocked(tls, pBt) + if !(rc != 0) { + goto __8 + } + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18225, libc.VaList(bp, zDb)) + + goto end_prepare +__8: + ; +__7: + ; + goto __5 +__5: + i++ + goto __4 + goto __6 +__6: + ; +__3: + ; + + Xsqlite3VtabUnlockList(tls, db) + + if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + goto __9 + } + mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) + + if !(nBytes > mxLen) { + goto __11 + } + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18255, 0) + rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) + goto end_prepare +__11: + ; + zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) + if !(zSqlCopy != 0) { + goto __12 + } + Xsqlite3RunParser(tls, bp+16, zSqlCopy) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail = zSql + uintptr((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSqlCopy))/1) + Xsqlite3DbFree(tls, db, zSqlCopy) + goto __13 +__12: + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail = zSql + uintptr(nBytes) +__13: + ; + goto __10 +__9: + Xsqlite3RunParser(tls, bp+16, zSql) +__10: + ; + + if !(pzTail != 0) { + goto __14 + } + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail +__14: + ; + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __15 + } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__15: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __16 + } + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Frc = SQLITE_NOMEM + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FcheckSchema = U8(0) +__16: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { + goto __17 + } + if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __19 + } + schemaIsValid(tls, bp+16) +__19: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __20 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe) +__20: + ; + + rc = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Frc + if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { + goto __21 + } + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3605, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)) + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg) + goto __22 +__21: + Xsqlite3Error(tls, db, rc) +__22: + ; + goto __18 +__17: + ; + *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpVdbe + rc = SQLITE_OK + Xsqlite3ErrorClear(tls, db) +__18: + ; + + // Delete any TriggerPrg structures allocated while parsing this statement. +__23: + if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { + goto __24 + } + pT = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpTriggerPrg + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext + Xsqlite3DbFree(tls, db, pT) + goto __23 +__24: + ; + +end_prepare: + + Xsqlite3ParseObjectReset(tls, bp+16) + return rc +} + +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ + var rc int32 + var cnt int32 = 0 + + *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) + if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { + return Xsqlite3MisuseError(tls, 133979) + } + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + Xsqlite3BtreeEnterAll(tls, db) + for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_ERROR|int32(2)<<8 || + rc == SQLITE_SCHEMA && func() int32 { Xsqlite3ResetOneSchema(tls, db, -1); return libc.PostIncInt32(&cnt, 1) }() == 0 { + // Make multiple attempts to compile the SQL, until it either succeeds + // or encounters a permanent error. A schema problem after one schema + // reset is considered a permanent error. + rc = sqlite3Prepare(tls, db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail) + + if rc == SQLITE_OK || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + break + } + } + Xsqlite3BtreeLeaveAll(tls, db) + rc = Xsqlite3ApiExit(tls, db, rc) + + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Rerun the compilation of a statement after a schema change. +// +// If the statement is successfully recompiled, return SQLITE_OK. Otherwise, +// if the statement cannot be recompiled because another connection has +// locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error +// occurs, return SQLITE_SCHEMA. +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + // var pNew uintptr at bp, 8 + + var zSql uintptr + var db uintptr + var prepFlags U8 + + zSql = Xsqlite3_sql(tls, p) + // Reprepare only called for prepare_v2() statements + db = Xsqlite3VdbeDb(tls, p) + + prepFlags = Xsqlite3VdbePrepareFlags(tls, p) + rc = sqlite3LockAndPrepare(tls, db, zSql, -1, uint32(prepFlags), p, bp, uintptr(0)) + if rc != 0 { + if rc == SQLITE_NOMEM { + Xsqlite3OomFault(tls, db) + } + + return rc + } else { + + } + Xsqlite3VdbeSwap(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), p) + Xsqlite3TransferBindings(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), p) + Xsqlite3VdbeResetStepResult(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + return SQLITE_OK +} + +// Two versions of the official API. Legacy and new use. In the legacy +// version, the original SQL text is not saved in the prepared statement +// and so if a schema change occurs, SQLITE_SCHEMA is returned by +// sqlite3_step(). In the new version, the original SQL text is retained +// and the statement is automatically recompiled if an schema change +// occurs. +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ + var rc int32 + rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) + // VERIFY: F13021 + return rc +} + +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ + var rc int32 + // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works + // exactly the same as sqlite3_prepare_v3() with a zero prepFlags + // parameter. + // + // Proof in that the 5th parameter to sqlite3LockAndPrepare is 0 + rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), uintptr(0), + ppStmt, pzTail) + + return rc +} + +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ + var rc int32 + // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from + // sqlite3_prepare_v2() only in having the extra prepFlags parameter, + // which is a bit array consisting of zero or more of the + // SQLITE_PREPARE_* flags. + // + // Proof by comparison to the implementation of sqlite3_prepare_v2() + // directly above. + rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, + uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), + uintptr(0), ppStmt, pzTail) + + return rc +} + +// Compile the UTF-16 encoded SQL statement zSql into a statement handle. +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // This function currently works by first transforming the UTF-16 + // encoded string to UTF-8, then invoking sqlite3_prepare(). The + // tricky bit is figuring out the pointer to return in *pzTail. + var zSql8 uintptr + *(*uintptr)(unsafe.Pointer(bp /* zTail8 */)) = uintptr(0) + var rc int32 = SQLITE_OK + + *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) + if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { + return Xsqlite3MisuseError(tls, 134127) + } + if nBytes >= 0 { + var sz int32 + var z uintptr = zSql + for sz = 0; sz < nBytes && (int32(*(*uint8)(unsafe.Pointer(z + uintptr(sz)))) != 0 || int32(*(*uint8)(unsafe.Pointer(z + uintptr(sz+1)))) != 0); sz = sz + 2 { + } + nBytes = sz + } + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + zSql8 = Xsqlite3Utf16to8(tls, db, zSql, nBytes, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) + if zSql8 != 0 { + rc = sqlite3LockAndPrepare(tls, db, zSql8, -1, prepFlags, uintptr(0), ppStmt, bp) + } + + if *(*uintptr)(unsafe.Pointer(bp)) != 0 && pzTail != 0 { + // If sqlite3_prepare returns a tail pointer, we calculate the + // equivalent pointer into the UTF-16 string by counting the unicode + // characters between zSql8 and zTail8, and then returning a pointer + // the same number of characters into the UTF-16 string. + var chars_parsed int32 = Xsqlite3Utf8CharLen(tls, zSql8, int32((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(zSql8))/1)) + *(*uintptr)(unsafe.Pointer(pzTail)) = zSql + uintptr(Xsqlite3Utf16ByteLen(tls, zSql, chars_parsed)) + } + Xsqlite3DbFree(tls, db, zSql8) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Two versions of the official API. Legacy and new use. In the legacy +// version, the original SQL text is not saved in the prepared statement +// and so if a schema change occurs, SQLITE_SCHEMA is returned by +// sqlite3_step(). In the new version, the original SQL text is retained +// and the statement is automatically recompiled if an schema change +// occurs. +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ + var rc int32 + rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) + // VERIFY: F13021 + return rc +} + +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ + var rc int32 + rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134188:16: */ + var rc int32 + rc = sqlite3Prepare16(tls, db, zSql, nBytes, + uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), + ppStmt, pzTail) + // VERIFY: F13021 + return rc +} + +//************* End of prepare.c ******************************************** +//************* Begin file select.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains C code routines that are called by the parser +// to handle SELECT statements in SQLite. +// #include "sqliteInt.h" + +// An instance of the following object is used to record information about +// how to process the DISTINCT keyword, to simplify passing that information +// into the selectInnerLoop() routine. +type DistinctCtx1 = struct { + FisTnct U8 + FeTnctType U8 + F__ccgo_pad1 [2]byte + FtabTnct int32 + FaddrTnct int32 +} /* sqlite3.c:134229:9 */ + +//************* End of prepare.c ******************************************** +//************* Begin file select.c ***************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains C code routines that are called by the parser +// to handle SELECT statements in SQLite. +// #include "sqliteInt.h" + +// An instance of the following object is used to record information about +// how to process the DISTINCT keyword, to simplify passing that information +// into the selectInnerLoop() routine. +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ + +// An instance of the following object is used to record information about +// the ORDER BY (or GROUP BY) clause of query is being coded. +// +// The aDefer[] array is used by the sorter-references optimization. For +// example, assuming there is no index that can be used for the ORDER BY, +// for the query: +// +// SELECT a, bigblob FROM t1 ORDER BY a LIMIT 10; +// +// it may be more efficient to add just the "a" values to the sorter, and +// retrieve the associated "bigblob" values directly from table t1 as the +// 10 smallest "a" values are extracted from the sorter. +// +// When the sorter-reference optimization is used, there is one entry in the +// aDefer[] array for each database table that may be read as values are +// extracted from the sorter. +type SortCtx1 = struct { + FpOrderBy uintptr + FnOBSat int32 + FiECursor int32 + FregReturn int32 + FlabelBkOut int32 + FaddrSortIndex int32 + FlabelDone int32 + FlabelOBLopt int32 + FsortFlags U8 + F__ccgo_pad1 [3]byte + FpDeferredRowLoad uintptr +} /* sqlite3.c:134255:9 */ + +// An instance of the following object is used to record information about +// the ORDER BY (or GROUP BY) clause of query is being coded. +// +// The aDefer[] array is used by the sorter-references optimization. For +// example, assuming there is no index that can be used for the ORDER BY, +// for the query: +// +// SELECT a, bigblob FROM t1 ORDER BY a LIMIT 10; +// +// it may be more efficient to add just the "a" values to the sorter, and +// retrieve the associated "bigblob" values directly from table t1 as the +// 10 smallest "a" values are extracted from the sorter. +// +// When the sorter-reference optimization is used, there is one entry in the +// aDefer[] array for each database table that may be read as values are +// extracted from the sorter. +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ +type RowLoadInfo1 = struct { + FregResult int32 + FecelFlags U8 + F__ccgo_pad1 [3]byte +} /* sqlite3.c:134255:9 */ + +// Delete all the content of a Select structure. Deallocate the structure +// itself depending on the value of bFree +// +// If bFree==1, call sqlite3DbFree() on the p object. +// If bFree==0, Leave the first Select object unfreed +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ + for p != 0 { + var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior + Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) + Xsqlite3SrcListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpSrc) + Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpWhere) + Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpGroupBy) + Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpHaving) + Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpOrderBy) + Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) + if (*Select)(unsafe.Pointer(p)).FpWith != 0 { + Xsqlite3WithDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpWith) + } + if (*Select)(unsafe.Pointer(p)).FpWinDefn != 0 { + Xsqlite3WindowListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpWinDefn) + } + for (*Select)(unsafe.Pointer(p)).FpWin != 0 { + + Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) + } + if bFree != 0 { + Xsqlite3DbFreeNN(tls, db, p) + } + p = pPrior + bFree = 1 + } +} + +// Initialize a SelectDest structure. +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ + (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) + (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm + (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 + (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst = uintptr(0) + (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = 0 + (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = 0 +} + +// Allocate a new Select structure and return a pointer to that +// structure. +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + var pNew uintptr + var pAllocated uintptr + // var standin Select at bp, 128 + + pAllocated = libc.AssignUintptr(&pNew, Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Select{})))) + if pNew == uintptr(0) { + + pNew = bp /* &standin */ + } + if pEList == uintptr(0) { + pEList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), + Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_ASTERISK, uintptr(0))) + } + (*Select)(unsafe.Pointer(pNew)).FpEList = pEList + (*Select)(unsafe.Pointer(pNew)).Fop = U8(TK_SELECT) + (*Select)(unsafe.Pointer(pNew)).FselFlags = selFlags + (*Select)(unsafe.Pointer(pNew)).FiLimit = 0 + (*Select)(unsafe.Pointer(pNew)).FiOffset = 0 + (*Select)(unsafe.Pointer(pNew)).FselId = U32(libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnSelect, 1)) + *(*int32)(unsafe.Pointer(pNew + 20)) = -1 + *(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -1 + (*Select)(unsafe.Pointer(pNew)).FnSelectRow = int16(0) + if pSrc == uintptr(0) { + pSrc = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(SrcList{}))) + } + (*Select)(unsafe.Pointer(pNew)).FpSrc = pSrc + (*Select)(unsafe.Pointer(pNew)).FpWhere = pWhere + (*Select)(unsafe.Pointer(pNew)).FpGroupBy = pGroupBy + (*Select)(unsafe.Pointer(pNew)).FpHaving = pHaving + (*Select)(unsafe.Pointer(pNew)).FpOrderBy = pOrderBy + (*Select)(unsafe.Pointer(pNew)).FpPrior = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpNext = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpLimit = pLimit + (*Select)(unsafe.Pointer(pNew)).FpWith = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpWin = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpWinDefn = uintptr(0) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + clearSelect(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew, libc.Bool32(pNew != bp)) + pAllocated = uintptr(0) + } else { + + } + return pAllocated +} + +// Delete the given Select structure and all of its substructures. +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ + if p != 0 { + clearSelect(tls, db, p, 1) + } +} + +// Return a pointer to the right-most SELECT statement in a compound. +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ + for (*Select)(unsafe.Pointer(p)).FpNext != 0 { + p = (*Select)(unsafe.Pointer(p)).FpNext + } + return p +} + +// Given 1 to 3 identifiers preceding the JOIN keyword, determine the +// type of join. Return an integer constant that expresses that type +// in terms of the following bit values: +// +// JT_INNER +// JT_CROSS +// JT_OUTER +// JT_NATURAL +// JT_LEFT +// JT_RIGHT +// +// A full outer join is the combination of JT_LEFT and JT_RIGHT. +// +// If an illegal or unsupported join type is seen, then still return +// a join type, but put an error in the pParse structure. +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var jointype int32 = 0 + // var apAll [3]uintptr at bp+32, 24 + + var p uintptr + var i int32 + var j int32 + *(*uintptr)(unsafe.Pointer(bp + 32)) = pA + *(*uintptr)(unsafe.Pointer(bp + 32 + 1*8)) = pB + *(*uintptr)(unsafe.Pointer(bp + 32 + 2*8)) = pC + for i = 0; i < 3 && *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + uintptr(i)*8)) != 0; i++ { + p = *(*uintptr)(unsafe.Pointer(bp + 32 + uintptr(i)*8)) + for j = 0; j < int32(uint64(unsafe.Sizeof(aKeyword))/uint64(unsafe.Sizeof(struct { + Fi U8 + FnChar U8 + Fcode U8 + }{}))); j++ { + if (*Token)(unsafe.Pointer(p)).Fn == uint32(aKeyword[j].FnChar) && + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(p)).Fz, uintptr(unsafe.Pointer(&zKeyText))+uintptr(aKeyword[j].Fi), int32((*Token)(unsafe.Pointer(p)).Fn)) == 0 { + jointype = jointype | int32(aKeyword[j].Fcode) + break + } + } + + if j >= int32(uint64(unsafe.Sizeof(aKeyword))/uint64(unsafe.Sizeof(struct { + Fi U8 + FnChar U8 + Fcode U8 + }{}))) { + jointype = jointype | JT_ERROR + break + } + } + if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 { + var zSp uintptr = ts + 10796 /* " " */ + + if pC == uintptr(0) { + zSp++ + } + Xsqlite3ErrorMsg(tls, pParse, + ts+18274, libc.VaList(bp, pA, pB, zSp, pC)) + jointype = JT_INNER + } else if jointype&JT_OUTER != 0 && + jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { + Xsqlite3ErrorMsg(tls, pParse, + ts+18318, 0) + jointype = JT_INNER + } + return jointype +} + +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18373)) /* sqlite3.c:134420:21 */ +var aKeyword = [7]struct { + Fi U8 + FnChar U8 + Fcode U8 +}{ + /* natural */ {FnChar: U8(7), Fcode: U8(JT_NATURAL)}, + /* left */ {Fi: U8(6), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_OUTER)}, + /* outer */ {Fi: U8(10), FnChar: U8(5), Fcode: U8(JT_OUTER)}, + /* right */ {Fi: U8(14), FnChar: U8(5), Fcode: U8(JT_RIGHT | JT_OUTER)}, + /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, + /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, + /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, +} /* sqlite3.c:134425:5 */ + +// Return the index of a column in a table. Return -1 if the column +// is not contained in the table. +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ + var i int32 + var h U8 = Xsqlite3StrIHash(tls, zCol) + var pCol uintptr + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + i = 0 +__1: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __3 + } + { + if int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(h) && Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 { + return i + } + + } + goto __2 +__2: + pCol += 24 + i++ + goto __1 + goto __3 +__3: + ; + return -1 +} + +// Search the first N tables in pSrc, from left to right, looking for a +// table that has a column named zCol. +// +// When found, set *piTab and *piCol to the table index and column index +// of the matching column and return TRUE. +// +// If not found, return FALSE. +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ + var i int32 // For looping over tables in pSrc + var iCol int32 // Index of column matching zCol + + // Both or neither are NULL + for i = 0; i < N; i++ { + iCol = Xsqlite3ColumnIndex(tls, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpTab, zCol) + if iCol >= 0 && + (bIgnoreHidden == 0 || libc.Bool32(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_HIDDEN != 0) == 0) { + if piTab != 0 { + *(*int32)(unsafe.Pointer(piTab)) = i + *(*int32)(unsafe.Pointer(piCol)) = iCol + } + return 1 + } + } + return 0 +} + +// This function is used to add terms implied by JOIN syntax to the +// WHERE clause expression of a SELECT statement. The new term, which +// is ANDed with the existing WHERE clause, is of the form: +// +// (tab1.col1 = tab2.col2) +// +// where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the +// (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is +// column iColRight of tab2. +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pE1 uintptr + var pE2 uintptr + var pEq uintptr + + pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, iLeft, iColLeft) + pE2 = Xsqlite3CreateColumnExpr(tls, db, pSrc, iRight, iColRight) + + pEq = Xsqlite3PExpr(tls, pParse, TK_EQ, pE1, pE2) + // Due to db->mallocFailed test + // in sqlite3DbMallocRawNN() called from + // sqlite3PExpr(). + if pEq != 0 && isOuterJoin != 0 { + *(*U32)(unsafe.Pointer(pEq + 4)) |= U32(EP_FromJoin) + + *(*int32)(unsafe.Pointer(pEq + 52)) = (*Expr)(unsafe.Pointer(pE2)).FiTable + } + *(*uintptr)(unsafe.Pointer(ppWhere)) = Xsqlite3ExprAnd(tls, pParse, *(*uintptr)(unsafe.Pointer(ppWhere)), pEq) +} + +// Set the EP_FromJoin property on all terms of the given expression. +// And set the Expr.w.iRightJoinTable to iTable for every term in the +// expression. +// +// The EP_FromJoin property is used on terms of an expression to tell +// the LEFT OUTER JOIN processing logic that this term is part of the +// join restriction specified in the ON or USING clause and not a part +// of the more general WHERE clause. These terms are moved over to the +// WHERE clause during join processing but we need to remember that they +// originated in the ON or USING clause. +// +// The Expr.w.iRightJoinTable tells the WHERE clause processing that the +// expression depends on table w.iRightJoinTable even if that table is not +// explicitly mentioned in the expression. That information is needed +// for cases like this: +// +// SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5 +// +// The where clause needs to defer the handling of the t1.x=5 +// term until after the t2 loop of the join. In that way, a +// NULL t2 row will be inserted whenever t1.x!=5. If we do not +// defer the handling of t1.x=5, it will be processed immediately +// after the t1 loop and rows with t1.x!=5 will never appear in +// the output, which is incorrect. +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ + for p != 0 { + *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) + + *(*int32)(unsafe.Pointer(p + 52)) = iTable + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_FUNCTION { + + if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32 /* &.x */)))).FnExpr; i++ { + Xsqlite3SetJoinExpr(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr, iTable) + } + } + } + Xsqlite3SetJoinExpr(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, iTable) + p = (*Expr)(unsafe.Pointer(p)).FpRight + } +} + +// Undo the work of sqlite3SetJoinExpr(). In the expression p, convert every +// term that is marked with EP_FromJoin and w.iRightJoinTable==iTable into +// an ordinary term that omits the EP_FromJoin mark. +// +// This happens when a LEFT JOIN is simplified into an ordinary JOIN. +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ + for p != 0 { + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && + (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_FromJoin)) + } + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(p)).FiTable == iTable { + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_CanBeNull)) + } + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_FUNCTION { + + if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32 /* &.x */)))).FnExpr; i++ { + unsetJoinExpr(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr, iTable) + } + } + } + unsetJoinExpr(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, iTable) + p = (*Expr)(unsafe.Pointer(p)).FpRight + } +} + +// This routine processes the join information for a SELECT statement. +// ON and USING clauses are converted into extra terms of the WHERE clause. +// NATURAL joins also create extra WHERE clause terms. +// +// The terms of a FROM clause are contained in the Select.pSrc structure. +// The left most table is the first entry in Select.pSrc. The right-most +// table is the last entry. The join operator is held in the entry to +// the left. Thus entry 0 contains the join operator for the join between +// entries 0 and 1. Any ON or USING clauses associated with the join are +// also attached to the left entry. +// +// This routine returns the number of errors encountered. +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pSrc uintptr // All tables in the FROM clause + var i int32 + var j int32 // Loop counters + var pLeft uintptr // Left table being joined + var pRight uintptr // Right table being joined + + pSrc = (*Select)(unsafe.Pointer(p)).FpSrc + pLeft = pSrc + 8 + pRight = pLeft + 1*112 + i = 0 +__1: + if !(i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc-1) { + goto __3 + } + { + var pRightTab uintptr = (*SrcItem)(unsafe.Pointer(pRight)).FpTab + var isOuter int32 + + if (*SrcItem)(unsafe.Pointer(pLeft)).FpTab == uintptr(0) || pRightTab == uintptr(0) { + goto __2 + } + isOuter = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_OUTER != 0) + + // When the NATURAL keyword is present, add WHERE clause terms for + // every column that the two tables have in common. + if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { + if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+18407, libc.VaList(bp, 0)) + return 1 + } + for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { + var zName uintptr // Name of column in the right table + // var iLeft int32 at bp+16, 4 + // Matching left table + // var iLeftCol int32 at bp+20, 4 + // Matching column in the left table + + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pRightTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_HIDDEN != 0 { + continue + } + zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pRightTab)).FaCol + uintptr(j)*24)).FzCnName + if tableAndColumnIndex(tls, pSrc, i+1, zName, bp+16, bp+20, 1) != 0 { + addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 16 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 20 /* iLeftCol */)), i+1, j, + isOuter, p+48) + } + } + } + + // Disallow both ON and USING clauses in the same join + if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+18457, 0) + return 1 + } + + // Add the ON clause to the end of the WHERE clause, connected by + // an AND operator. + if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 { + if isOuter != 0 { + Xsqlite3SetJoinExpr(tls, (*SrcItem)(unsafe.Pointer(pRight)).FpOn, (*SrcItem)(unsafe.Pointer(pRight)).FiCursor) + } + (*Select)(unsafe.Pointer(p)).FpWhere = Xsqlite3ExprAnd(tls, pParse, (*Select)(unsafe.Pointer(p)).FpWhere, (*SrcItem)(unsafe.Pointer(pRight)).FpOn) + (*SrcItem)(unsafe.Pointer(pRight)).FpOn = uintptr(0) + } + + // Create extra terms on the WHERE clause for each column named + // in the USING clause. Example: If the two tables to be joined are + // A and B and the USING clause names X, Y, and Z, then add this + // to the WHERE clause: A.X=B.X AND A.Y=B.Y AND A.Z=B.Z + // Report an error if any column mentioned in the USING clause is + // not contained in both tables to be joined. + if (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { + var pList uintptr = (*SrcItem)(unsafe.Pointer(pRight)).FpUsing + for j = 0; j < (*IdList)(unsafe.Pointer(pList)).FnId; j++ { + var zName uintptr // Name of the term in the USING clause + // var iLeft int32 at bp+24, 4 + // Table on the left with matching column name + // var iLeftCol int32 at bp+28, 4 + // Column number of matching column on the left + var iRightCol int32 // Column number of matching column on the right + + zName = (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa + uintptr(j)*16)).FzName + iRightCol = Xsqlite3ColumnIndex(tls, pRightTab, zName) + if iRightCol < 0 || + !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { + Xsqlite3ErrorMsg(tls, pParse, + ts+18512, libc.VaList(bp+8, zName)) + return 1 + } + addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, + isOuter, p+48) + } + } + + } + goto __2 +__2: + i++ + pRight += 112 + pLeft += 112 + goto __1 + goto __3 +__3: + ; + return 0 +} + +// An instance of this object holds information (beyond pParse and pSelect) +// needed to load the next result row that is to be added to the sorter. +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ + +// This routine does the work of loading query data into an array of +// registers so that it can be added to the sorter. +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ + Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, + 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) +} + +// Code the OP_MakeRecord instruction that generates the entry to be +// added into the sorter. +// +// Return the register in which the result is stored. +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ + var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + if (*SortCtx)(unsafe.Pointer(pSort)).FpDeferredRowLoad != 0 { + innerLoopLoadRow(tls, pParse, pSelect, (*SortCtx)(unsafe.Pointer(pSort)).FpDeferredRowLoad) + } + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase+nOBSat, nBase-nOBSat, regOut) + return regOut +} + +// Generate code that will push the record in registers regData +// through regData+nData-1 onto the sorter. +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction + var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) + var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms + var nBase int32 = nExpr + bSeq + nData // Fields in sorter record + var regBase int32 // Regs for sorter record + var regRecord int32 = 0 // Assembled sorter record + var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat // ORDER BY terms to skip + var op int32 // Opcode to add sorter record to sorter + var iLimit int32 // LIMIT counter + var iSkip int32 = 0 // End of the sorter insert loop + + // Three cases: + // (1) The data to be sorted has already been packed into a Record + // by a prior OP_MakeRecord. In this case nData==1 and regData + // will be completely unrelated to regOrigData. + // (2) All output columns are included in the sort record. In that + // case regData==regOrigData. + // (3) Some output columns are omitted from the sort record due to + // the SQLITE_ENABLE_SORTER_REFERENCE optimization, or due to the + // SQLITE_ECEL_OMITREF optimization, or due to the + // SortCtx.pDeferredRowLoad optimiation. In any of these cases + // regOrigData is 0 to prevent this routine from trying to copy + // values that might not yet exist. + + if nPrefixReg != 0 { + + regBase = regData - nPrefixReg + } else { + regBase = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nBase + } + + if (*Select)(unsafe.Pointer(pSelect)).FiOffset != 0 { + iLimit = (*Select)(unsafe.Pointer(pSelect)).FiOffset + 1 + } else { + iLimit = (*Select)(unsafe.Pointer(pSelect)).FiLimit + } + (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone = Xsqlite3VdbeMakeLabel(tls, pParse) + Xsqlite3ExprCodeExprList(tls, pParse, (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy, regBase, regOrigData, + uint8(SQLITE_ECEL_DUP|func() int32 { + if regOrigData != 0 { + return SQLITE_ECEL_REF + } + return 0 + }())) + if bSeq != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Sequence, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor, regBase+nExpr) + } + if nPrefixReg == 0 && nData > 0 { + Xsqlite3ExprCodeMove(tls, pParse, regData, regBase+nExpr+bSeq, nData) + } + if nOBSat > 0 { + var regPrevKey int32 // The first nOBSat columns of the previous row + var addrFirst int32 // Address of the OP_IfNot opcode + var addrJmp int32 // Address of the OP_Jump opcode + var pOp uintptr // Opcode that opens the sorter + var nKey int32 // Number of sorting key columns, including OP_Sequence + var pKI uintptr // Original KeyInfo on the sorter table + + regRecord = makeSorterRecord(tls, pParse, pSort, pSelect, regBase, nBase) + regPrevKey = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat + nKey = nExpr - (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat + bSeq + if bSeq != 0 { + addrFirst = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regBase+nExpr) + } else { + addrFirst = Xsqlite3VdbeAddOp1(tls, v, OP_SequenceTest, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor) + } + + Xsqlite3VdbeAddOp3(tls, v, OP_Compare, regPrevKey, regBase, (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat) + pOp = Xsqlite3VdbeGetOp(tls, v, (*SortCtx)(unsafe.Pointer(pSort)).FaddrSortIndex) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + return + } + (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = nKey + nData + pKI = *(*uintptr)(unsafe.Pointer(pOp + 16)) + libc.Xmemset(tls, (*KeyInfo)(unsafe.Pointer(pKI)).FaSortFlags, 0, uint64((*KeyInfo)(unsafe.Pointer(pKI)).FnKeyField)) // Makes OP_Jump testable + Xsqlite3VdbeChangeP4(tls, v, -1, pKI, -9) + + *(*uintptr)(unsafe.Pointer(pOp + 16)) = Xsqlite3KeyInfoFromExprList(tls, pParse, (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy, nOBSat, + int32((*KeyInfo)(unsafe.Pointer(pKI)).FnAllField)-int32((*KeyInfo)(unsafe.Pointer(pKI)).FnKeyField)-1) + pOp = uintptr(0) // Ensure pOp not used after sqltie3VdbeAddOp3() + addrJmp = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addrJmp+1, 0, addrJmp+1) + (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut = Xsqlite3VdbeMakeLabel(tls, pParse) + (*SortCtx)(unsafe.Pointer(pSort)).FregReturn = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn, (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) + Xsqlite3VdbeAddOp1(tls, v, OP_ResetSorter, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor) + if iLimit != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, iLimit, (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone) + + } + Xsqlite3VdbeJumpHere(tls, v, addrFirst) + Xsqlite3ExprCodeMove(tls, pParse, regBase, regPrevKey, (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat) + Xsqlite3VdbeJumpHere(tls, v, addrJmp) + } + if iLimit != 0 { + // At this point the values for the new sorter entry are stored + // in an array of registers. They need to be composed into a record + // and inserted into the sorter if either (a) there are currently + // less than LIMIT+OFFSET items or (b) the new record is smaller than + // the largest record currently in the sorter. If (b) is true and there + // are already LIMIT+OFFSET items in the sorter, delete the largest + // entry before inserting the new one. This way there are never more + // than LIMIT+OFFSET items in the sorter. + // + // If the new record does not need to be inserted into the sorter, + // jump to the next iteration of the loop. If the pSort->labelOBLopt + // value is not zero, then it is a label of where to jump. Otherwise, + // just bypass the row insert logic. See the header comment on the + // sqlite3WhereOrderByLimitOptLabel() function for additional info. + var iCsr int32 = (*SortCtx)(unsafe.Pointer(pSort)).FiECursor + Xsqlite3VdbeAddOp2(tls, v, OP_IfNotZero, iLimit, Xsqlite3VdbeCurrentAddr(tls, v)+4) + + Xsqlite3VdbeAddOp2(tls, v, OP_Last, iCsr, 0) + iSkip = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxLE, + iCsr, 0, regBase+nOBSat, nExpr-nOBSat) + + Xsqlite3VdbeAddOp1(tls, v, OP_Delete, iCsr) + } + if regRecord == 0 { + regRecord = makeSorterRecord(tls, pParse, pSort, pSelect, regBase, nBase) + } + if int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0 { + op = OP_SorterInsert + } else { + op = OP_IdxInsert + } + Xsqlite3VdbeAddOp4Int(tls, v, op, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor, regRecord, + regBase+nOBSat, nBase-nOBSat) + if iSkip != 0 { + Xsqlite3VdbeChangeP2(tls, v, iSkip, + func() int32 { + if (*SortCtx)(unsafe.Pointer(pSort)).FlabelOBLopt != 0 { + return (*SortCtx)(unsafe.Pointer(pSort)).FlabelOBLopt + } + return Xsqlite3VdbeCurrentAddr(tls, v) + }()) + } +} + +// Add code to implement the OFFSET +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ + if iOffset > 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) + + } +} + +// Add code that will check to make sure the array of registers starting at +// iMem form a distinct entry. This is used by both "SELECT DISTINCT ..." and +// distinct aggregates ("SELECT count(DISTINCT ) ..."). Three strategies +// are available. Which is used depends on the value of parameter eTnctType, +// as follows: +// +// WHERE_DISTINCT_UNORDERED/WHERE_DISTINCT_NOOP: +// Build an ephemeral table that contains all entries seen before and +// skip entries which have been seen before. +// +// Parameter iTab is the cursor number of an ephemeral table that must +// be opened before the VM code generated by this routine is executed. +// The ephemeral cursor table is queried for a record identical to the +// record formed by the current array of registers. If one is found, +// jump to VM address addrRepeat. Otherwise, insert a new record into +// the ephemeral cursor and proceed. +// +// The returned value in this case is a copy of parameter iTab. +// +// WHERE_DISTINCT_ORDERED: +// In this case rows are being delivered sorted order. The ephermal +// table is not required. Instead, the current set of values +// is compared against previous row. If they match, the new row +// is not distinct and control jumps to VM address addrRepeat. Otherwise, +// the VM program proceeds with processing the new row. +// +// The returned value in this case is the register number of the first +// in an array of registers used to store the previous result row so that +// it can be compared to the next. The caller must ensure that this +// register is initialized to NULL. (The fixDistinctOpenEph() routine +// will take care of this initialization.) +// +// WHERE_DISTINCT_UNIQUE: +// In this case it has already been determined that the rows are distinct. +// No special action is required. The return value is zero. +// +// Parameter pEList is the list of expressions used to generated the +// contents of each row. It is used by this routine to determine (a) +// how many elements there are in the array of registers and (b) the +// collation sequences that should be used for the comparisons if +// eTnctType is WHERE_DISTINCT_ORDERED. +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ + var iRet int32 = 0 + var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + switch eTnctType { + case WHERE_DISTINCT_ORDERED: + { + var i int32 + var iJump int32 // Jump destination + var regPrev int32 // Previous row content + + // Allocate space for the previous row + iRet = libc.AssignInt32(®Prev, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) + *(*int32)(unsafe.Pointer(pParse + 56)) += nResultCol + + iJump = Xsqlite3VdbeCurrentAddr(tls, v) + nResultCol + for i = 0; i < nResultCol; i++ { + var pColl uintptr = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) + if i < nResultCol-1 { + Xsqlite3VdbeAddOp3(tls, v, OP_Ne, regElem+i, iJump, regPrev+i) + + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regElem+i, addrRepeat, regPrev+i) + + } + Xsqlite3VdbeChangeP4(tls, v, -1, pColl, -2) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ)) + } + + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regElem, regPrev, nResultCol-1) + break + + } + + case WHERE_DISTINCT_UNIQUE: + { + // nothing to do + break + + } + + default: + { + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iTab, addrRepeat, regElem, nResultCol) + + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regElem, nResultCol, r1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r1, regElem, nResultCol) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + iRet = iTab + break + + } + } + + return iRet +} + +// This routine runs after codeDistinct(). It makes necessary +// adjustments to the OP_OpenEphemeral opcode that the codeDistinct() +// routine made use of. This processing must be done separately since +// sometimes codeDistinct is called before the OP_OpenEphemeral is actually +// laid down. +// +// WHERE_DISTINCT_NOOP: +// WHERE_DISTINCT_UNORDERED: +// +// No adjustments necessary. This function is a no-op. +// +// WHERE_DISTINCT_UNIQUE: +// +// The ephemeral table is not needed. So change the +// OP_OpenEphemeral opcode into an OP_Noop. +// +// WHERE_DISTINCT_ORDERED: +// +// The ephemeral table is not needed. But we do need register +// iVal to be initialized to NULL. So change the OP_OpenEphemeral +// into an OP_Null on the iVal register. +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && + (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + Xsqlite3VdbeChangeToNoop(tls, v, iOpenEphAddr) + if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, iOpenEphAddr+1))).Fopcode) == OP_Explain { + Xsqlite3VdbeChangeToNoop(tls, v, iOpenEphAddr+1) + } + if eTnctType == WHERE_DISTINCT_ORDERED { + // Change the OP_OpenEphemeral to an OP_Null that sets the MEM_Cleared + // bit on the first register of the previous value. This will cause the + // OP_Ne added in codeDistinct() to always fail on the first iteration of + // the loop even if the first row is all NULLs. + var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iOpenEphAddr) + (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Null) + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = 1 + (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = iVal + } + } +} + +// This routine generates the code for the inside of the inner loop +// of a SELECT. +// +// If srcTab is negative, then the p->pEList expressions +// are evaluated in order to get the data for this row. If srcTab is +// zero or more, then data is pulled from srcTab and p->pEList is used only +// to get the number of columns and the collation sequence for each column. +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var i int32 + var hasDistinct int32 // True if the DISTINCT keyword is present + var eDest int32 = int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) // How to dispose of results + var iParm int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm // First argument to disposal method + var nResultCol int32 // Number of result columns + var nPrefixReg int32 = 0 // Number of extra registers before regResult + // var sRowLoadInfo RowLoadInfo at bp, 8 + // Info for deferred row loading + + // Usually, regResult is the first cell in an array of memory cells + // containing the current result row. In this case regOrig is set to the + // same value. However, if the results are being sent to the sorter, the + // values for any expressions that are also part of the sort-key are omitted + // from this array. In this case regOrig is set to zero. + var regResult int32 // Start of memory holding current results + var regOrig int32 // Start of memory holding full result (or 0) + + if pDistinct != 0 { + hasDistinct = int32((*DistinctCtx)(unsafe.Pointer(pDistinct)).FeTnctType) + } else { + hasDistinct = WHERE_DISTINCT_NOOP + } + if pSort != 0 && (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy == uintptr(0) { + pSort = uintptr(0) + } + if pSort == uintptr(0) && !(hasDistinct != 0) { + + codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, iContinue) + } + + // Pull the requested columns. + nResultCol = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr + + if (*SelectDest)(unsafe.Pointer(pDest)).FiSdst == 0 { + if pSort != 0 { + nPrefixReg = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr + if !(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0) { + nPrefixReg++ + } + *(*int32)(unsafe.Pointer(pParse + 56)) += nPrefixReg + } + (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nResultCol + } else if (*SelectDest)(unsafe.Pointer(pDest)).FiSdst+nResultCol > (*Parse)(unsafe.Pointer(pParse)).FnMem { + // This is an error condition that can result, for example, when a SELECT + // on the right-hand side of an INSERT contains more result columns than + // there are columns in the table on the left. The error will be caught + // and reported later. But we need to make sure enough memory is allocated + // to avoid other spurious errors in the meantime. + *(*int32)(unsafe.Pointer(pParse + 56)) += nResultCol + } + (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = nResultCol + regOrig = libc.AssignInt32(®Result, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst) + if srcTab >= 0 { + for i = 0; i < nResultCol; i++ { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, i, regResult+i) + + } + } else if eDest != SRT_Exists { + // If the destination is an EXISTS(...) expression, the actual + // values returned by the SELECT are not required. + var ecelFlags U8 // "ecel" is an abbreviation of "ExprCodeExprList" + var pEList uintptr + if eDest == SRT_Mem || eDest == SRT_Output || eDest == SRT_Coroutine { + ecelFlags = U8(SQLITE_ECEL_DUP) + } else { + ecelFlags = U8(0) + } + if pSort != 0 && hasDistinct == 0 && eDest != SRT_EphemTab && eDest != SRT_Table { + // For each expression in p->pEList that is a copy of an expression in + // the ORDER BY clause (pSort->pOrderBy), set the associated + // iOrderByCol value to one more than the index of the ORDER BY + // expression within the sort-key that pushOntoSorter() will generate. + // This allows the p->pEList field to be omitted from the sorted record, + // saving space and CPU cycles. + ecelFlags = U8(int32(ecelFlags) | (SQLITE_ECEL_OMITREF | SQLITE_ECEL_REF)) + + for i = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat; i < (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr; i++ { + var j int32 + if libc.AssignInt32(&j, int32(*(*U16)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy + 8 + uintptr(i)*32 + 24)))) > 0 { + *(*U16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList + 8 + uintptr(j-1)*32 + 24)) = U16(i + 1 - (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat) + } + } + + // Adjust nResultCol to account for columns that are omitted + // from the sorter by the optimizations in this branch + pEList = (*Select)(unsafe.Pointer(p)).FpEList + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + if int32(*(*U16)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 24))) > 0 { + nResultCol-- + regOrig = 0 + } + } + + } + (*RowLoadInfo)(unsafe.Pointer(bp /* &sRowLoadInfo */)).FregResult = regResult + (*RowLoadInfo)(unsafe.Pointer(bp /* &sRowLoadInfo */)).FecelFlags = ecelFlags + if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && + int32(ecelFlags)&SQLITE_ECEL_OMITREF != 0 && + nPrefixReg > 0 { + + (*SortCtx)(unsafe.Pointer(pSort)).FpDeferredRowLoad = bp /* &sRowLoadInfo */ + regOrig = 0 + } else { + innerLoopLoadRow(tls, pParse, p, bp) + } + } + + // If the DISTINCT keyword was present on the SELECT statement + // and this row has been seen before, then do not make this row + // part of the result. + if hasDistinct != 0 { + var eType int32 = int32((*DistinctCtx)(unsafe.Pointer(pDistinct)).FeTnctType) + var iTab int32 = (*DistinctCtx)(unsafe.Pointer(pDistinct)).FtabTnct + + iTab = codeDistinct(tls, pParse, eType, iTab, iContinue, (*Select)(unsafe.Pointer(p)).FpEList, regResult) + fixDistinctOpenEph(tls, pParse, eType, iTab, (*DistinctCtx)(unsafe.Pointer(pDistinct)).FaddrTnct) + if pSort == uintptr(0) { + codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, iContinue) + } + } + + switch eDest { + // In this mode, write each query result to the key of the temporary + // table iParm. + case SRT_Union: + { + var r1 int32 + r1 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regResult, nResultCol) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + break + + } + + // Construct a record from the query result, but instead of + // saving that record, use it as a key to delete elements from + // the temporary table iParm. + case SRT_Except: + { + Xsqlite3VdbeAddOp3(tls, v, OP_IdxDelete, iParm, regResult, nResultCol) + break + + } + + // Store the result as data using a unique key. + case SRT_Fifo: + fallthrough + case SRT_DistFifo: + fallthrough + case SRT_Table: + fallthrough + case SRT_EphemTab: + { + var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) + + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if eDest == SRT_DistFifo { + // If the destination is DistFifo, then cursor (iParm+1) is open + // on an ephemeral index. If the current row is already present + // in the index, do not write it to the output. If not, add the + // current row to the index and proceed with writing it to the + // output table as well. + var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 + Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm+1, r1, regResult, nResultCol) + + } + if pSort != 0 { + + pushOntoSorter(tls, pParse, pSort, p, r1+nPrefixReg, regOrig, 1, nPrefixReg) + } else { + var r2 int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iParm, r2) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, r1, r2) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) + Xsqlite3ReleaseTempReg(tls, pParse, r2) + } + Xsqlite3ReleaseTempRange(tls, pParse, r1, nPrefixReg+1) + break + + } + + case SRT_Upfrom: + { + if pSort != 0 { + pushOntoSorter(tls, + pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg) + } else { + var i2 int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + + // If the UPDATE FROM join is an aggregate that matches no rows, it + // might still be trying to return one row, because that is what + // aggregates do. Don't record that empty row in the output table. + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regResult, iBreak) + + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, + regResult+libc.Bool32(i2 < 0), nResultCol-libc.Bool32(i2 < 0), r1) + if i2 < 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, r1, regResult) + } else { + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regResult, i2) + } + } + break + + } + + // If we are creating a set for an "expr IN (SELECT ...)" construct, + // then there should be a single item on the stack. Write this + // item into the set table with bogus data. + case SRT_Set: + { + if pSort != 0 { + // At first glance you would think we could optimize out the + // ORDER BY in this case since the order of entries in the set + // does not matter. But there might be a LIMIT clause, in which + // case the order does matter + pushOntoSorter(tls, + pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg) + } else { + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regResult, nResultCol, + r1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regResult, nResultCol) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + } + break + + } + + // If any row exist in the result set, record that fact and abort. + case SRT_Exists: + { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iParm) + // The LIMIT clause will terminate the loop for us + break + + } + + // If this is a scalar select that is part of an expression, then + // store the results in the appropriate memory cell or array of + // memory cells and break out of the scan loop. + case SRT_Mem: + { + if pSort != 0 { + + pushOntoSorter(tls, + pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg) + } else { + + // The LIMIT clause will jump out of the loop for us + } + break + + } + + case SRT_Coroutine: + fallthrough // Send data to a co-routine + case SRT_Output: + { // Return the results + + if pSort != 0 { + pushOntoSorter(tls, pParse, pSort, p, regResult, regOrig, nResultCol, + nPrefixReg) + } else if eDest == SRT_Coroutine { + Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, nResultCol) + } + break + + } + + // Write the results into a priority queue that is order according to + // pDest->pOrderBy (in pSO). pDest->iSDParm (in iParm) is the cursor for an + // index with pSO->nExpr+2 columns. Build a key using pSO for the first + // pSO->nExpr columns, then make sure all keys are unique by adding a + // final OP_Sequence column. The last column is the record as a blob. + case SRT_DistQueue: + fallthrough + case SRT_Queue: + { + var nKey int32 + var r1 int32 + var r2 int32 + var r3 int32 + var addrTest int32 = 0 + var pSO uintptr + pSO = (*SelectDest)(unsafe.Pointer(pDest)).FpOrderBy + + nKey = (*ExprList)(unsafe.Pointer(pSO)).FnExpr + r1 = Xsqlite3GetTempReg(tls, pParse) + r2 = Xsqlite3GetTempRange(tls, pParse, nKey+2) + r3 = r2 + nKey + 1 + if eDest == SRT_DistQueue { + // If the destination is DistQueue, then cursor (iParm+1) is open + // on a second ephemeral index that holds all values every previously + // added to the queue. + addrTest = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, 0, + regResult, nResultCol) + + } + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r3) + if eDest == SRT_DistQueue { + Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, iParm+1, r3) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) + } + for i = 0; i < nKey; i++ { + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, + regResult+int32(*(*U16)(unsafe.Pointer(pSO + 8 + uintptr(i)*32 + 24)))-1, + r2+i) + } + Xsqlite3VdbeAddOp2(tls, v, OP_Sequence, iParm, r2+nKey) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r2, nKey+2, r1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, r2, nKey+2) + if addrTest != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrTest) + } + Xsqlite3ReleaseTempReg(tls, pParse, r1) + Xsqlite3ReleaseTempRange(tls, pParse, r2, nKey+2) + break + + } + + // Discard the results. This is used for SELECT statements inside + // the body of a TRIGGER. The purpose of such selects is to call + // user-defined functions that have side effects. We do not care + // about the actual results of the select. + default: + { + + break + + } + } + + // Jump to the end of the loop if the LIMIT is reached. Except, if + // there is a sorter, in which case the sorter has already limited + // the output for us. + if pSort == uintptr(0) && (*Select)(unsafe.Pointer(p)).FiLimit != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_DecrJumpZero, (*Select)(unsafe.Pointer(p)).FiLimit, iBreak) + } +} + +// Allocate a KeyInfo object sufficient for an index of N key columns and +// X extra columns. +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ + var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) + var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) + if p != 0 { + (*KeyInfo)(unsafe.Pointer(p)).FaSortFlags = p + 32 + uintptr(N+X)*8 + (*KeyInfo)(unsafe.Pointer(p)).FnKeyField = U16(N) + (*KeyInfo)(unsafe.Pointer(p)).FnAllField = U16(N + X) + (*KeyInfo)(unsafe.Pointer(p)).Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc + (*KeyInfo)(unsafe.Pointer(p)).Fdb = db + (*KeyInfo)(unsafe.Pointer(p)).FnRef = U32(1) + libc.Xmemset(tls, p+1*40, 0, uint64(nExtra)) + } else { + return Xsqlite3OomFault(tls, db) + } + return p +} + +// Deallocate a KeyInfo object +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ + if p != 0 { + + (*KeyInfo)(unsafe.Pointer(p)).FnRef-- + if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { + Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + } + } +} + +// Make a new pointer to a KeyInfo object +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ + if p != 0 { + + (*KeyInfo)(unsafe.Pointer(p)).FnRef++ + } + return p +} + +// Given an expression list, generate a KeyInfo structure that records +// the collating sequence for each expression in that expression list. +// +// If the ExprList is an ORDER BY or GROUP BY clause then the resulting +// KeyInfo structure is appropriate for initializing a virtual index to +// implement that clause. If the ExprList is the result set of a SELECT +// then the KeyInfo structure is appropriate for initializing a virtual +// index to implement a DISTINCT test. +// +// Space to hold the KeyInfo structure is obtained from malloc. The calling +// function is responsible for seeing that this structure is eventually +// freed. +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ + var nExpr int32 + var pInfo uintptr + var pItem uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var i int32 + + nExpr = (*ExprList)(unsafe.Pointer(pList)).FnExpr + pInfo = Xsqlite3KeyInfoAlloc(tls, db, nExpr-iStart, nExtra+1) + if pInfo != 0 { + + i = iStart + pItem = pList + 8 + uintptr(iStart)*32 + __1: + if !(i < nExpr) { + goto __3 + } + { + *(*uintptr)(unsafe.Pointer(pInfo + 32 + uintptr(i-iStart)*8)) = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) + *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags + uintptr(i-iStart))) = (*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags + + } + goto __2 + __2: + i++ + pItem += 32 + goto __1 + goto __3 + __3: + } + return pInfo +} + +// Name of the connection operator, used for error messages. +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ + var z uintptr + switch id { + case TK_ALL: + z = ts + 18576 /* "UNION ALL" */ + break + case TK_INTERSECT: + z = ts + 18586 /* "INTERSECT" */ + break + case TK_EXCEPT: + z = ts + 18596 /* "EXCEPT" */ + break + default: + z = ts + 18603 /* "UNION" */ + break + } + return z +} + +// Unless an "EXPLAIN QUERY PLAN" command is being processed, this function +// is a no-op. Otherwise, it adds a single row of output to the EQP result, +// where the caption is of the form: +// +// "USE TEMP B-TREE FOR xxx" +// +// where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which +// is determined by the zUsage argument. +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18609, libc.VaList(bp, zUsage)) +} + +// Assign expression b to lvalue a. A second, no-op, version of this macro +// is provided when SQLITE_OMIT_EXPLAIN is defined. This allows the code +// in sqlite3Select() to assign values to structure member variables that +// only exist if SQLITE_OMIT_EXPLAIN is not defined without polluting the +// code with #ifndef directives. + +// If the inner loop was generated using a non-null pOrderBy argument, +// then the results were placed in a sorter. After the loop is terminated +// we need to run the sorter and output the results. The following +// routine generates the code needed to do that. +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement + var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop + var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle + var addr int32 // Top of output loop. Jump for Next. + var addrOnce int32 = 0 + var iTab int32 + var pOrderBy uintptr = (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy + var eDest int32 = int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) + var iParm int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm + var regRow int32 + var regRowid int32 + var iCol int32 + var nKey int32 // Number of key columns in sorter record + var iSortTab int32 // Sorter cursor to read from + var i int32 + var bSeq int32 // True if sorter record includes seq. no. + var nRefKey int32 = 0 + var aOutEx uintptr = (*Select)(unsafe.Pointer(p)).FpEList + 8 /* &.a */ + + if (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn, (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) + Xsqlite3VdbeGoto(tls, v, addrBreak) + Xsqlite3VdbeResolveLabel(tls, v, (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) + } + + iTab = (*SortCtx)(unsafe.Pointer(pSort)).FiECursor + if eDest == SRT_Output || eDest == SRT_Coroutine || eDest == SRT_Mem { + if eDest == SRT_Mem && (*Select)(unsafe.Pointer(p)).FiOffset != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst) + } + regRowid = 0 + regRow = (*SelectDest)(unsafe.Pointer(pDest)).FiSdst + } else { + regRowid = Xsqlite3GetTempReg(tls, pParse) + if eDest == SRT_EphemTab || eDest == SRT_Table { + regRow = Xsqlite3GetTempReg(tls, pParse) + nColumn = 0 + } else { + regRow = Xsqlite3GetTempRange(tls, pParse, nColumn) + } + } + nKey = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr - (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat + if int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0 { + var regSortOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + iSortTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut != 0 { + addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + } + Xsqlite3VdbeAddOp3(tls, v, OP_OpenPseudo, iSortTab, regSortOut, + nKey+1+nColumn+nRefKey) + if addrOnce != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrOnce) + } + addr = 1 + Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, iTab, addrBreak) + + codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, addrContinue) + Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, iTab, regSortOut, iSortTab) + bSeq = 0 + } else { + addr = 1 + Xsqlite3VdbeAddOp2(tls, v, OP_Sort, iTab, addrBreak) + codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, addrContinue) + iSortTab = iTab + bSeq = 1 + } + i = 0 + iCol = nKey + bSeq - 1 + for ; i < nColumn; i++ { + if int32(*(*U16)(unsafe.Pointer(aOutEx + uintptr(i)*32 + 24))) == 0 { + iCol++ + } + } + for i = nColumn - 1; i >= 0; i-- { + { + var iRead int32 + if *(*U16)(unsafe.Pointer(aOutEx + uintptr(i)*32 + 24)) != 0 { + iRead = int32(*(*U16)(unsafe.Pointer(aOutEx + uintptr(i)*32 + 24))) - 1 + } else { + iRead = libc.PostDecInt32(&iCol, 1) + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iSortTab, iRead, regRow+i) + + } + } + switch eDest { + case SRT_Table: + fallthrough + case SRT_EphemTab: + { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iSortTab, nKey+bSeq, regRow) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iParm, regRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, regRow, regRowid) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) + break + + } + case SRT_Set: + { + + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regRow, nColumn, regRowid, + (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nColumn) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, regRowid, regRow, nColumn) + break + + } + case SRT_Mem: + { + // The LIMIT clause will terminate the loop for us + break + + } + case SRT_Upfrom: + { + var i2 int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regRow+libc.Bool32(i2 < 0), nColumn-libc.Bool32(i2 < 0), r1) + if i2 < 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, r1, regRow) + } else { + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regRow, i2) + } + break + + } + default: + { + + if eDest == SRT_Output { + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst, nColumn) + } else { + Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm) + } + break + + } + } + if regRowid != 0 { + if eDest == SRT_Set { + Xsqlite3ReleaseTempRange(tls, pParse, regRow, nColumn) + } else { + Xsqlite3ReleaseTempReg(tls, pParse, regRow) + } + Xsqlite3ReleaseTempReg(tls, pParse, regRowid) + } + // The bottom of the loop + Xsqlite3VdbeResolveLabel(tls, v, addrContinue) + if int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, iTab, addr) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iTab, addr) + } + if (*SortCtx)(unsafe.Pointer(pSort)).FregReturn != 0 { + Xsqlite3VdbeAddOp1(tls, v, OP_Return, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn) + } + Xsqlite3VdbeResolveLabel(tls, v, addrBreak) +} + +// Return a pointer to a string containing the 'declaration type' of the +// expression pExpr. The string may be treated as static by the caller. +// +// Also try to estimate the size of the returned value and return that +// result in *pEstWidth. +// +// The declaration type is the exact datatype definition extracted from the +// original CREATE TABLE statement if the expression is a column. The +// declaration type for a ROWID field is INTEGER. Exactly when an expression +// is considered a column can be complex in the presence of subqueries. The +// result-set expression in all of the following SELECT statements is +// considered a column by this function. +// +// SELECT col FROM tbl; +// SELECT (SELECT col FROM tbl; +// SELECT (SELECT col FROM tbl); +// SELECT abc FROM (SELECT col AS abc FROM tbl); +// +// The declaration type for any expression other than a column is NULL. +// +// This routine has either 3 or 6 parameters depending on whether or not +// the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var zType uintptr = uintptr(0) + var j int32 + *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = uintptr(0) + + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_COLUMN: + { + // The expression is a column. Locate the table the column is being + // extracted from in NameContext.pSrcList. This table may be real + // database table or a subquery. + var pTab uintptr = uintptr(0) // Table structure column is extracted from + var pS uintptr = uintptr(0) // Select the column is extracted from + var iCol int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) // Index of column in pTab + for pNC != 0 && !(pTab != 0) { + var pTabList uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList + for j = 0; j < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && (*SrcItem)(unsafe.Pointer(pTabList+8 /* &.a */ +uintptr(j)*112)).FiCursor != (*Expr)(unsafe.Pointer(pExpr)).FiTable; j++ { + } + if j < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { + pTab = (*SrcItem)(unsafe.Pointer(pTabList + 8 + uintptr(j)*112)).FpTab + pS = (*SrcItem)(unsafe.Pointer(pTabList + 8 + uintptr(j)*112)).FpSelect + } else { + pNC = (*NameContext)(unsafe.Pointer(pNC)).FpNext + } + } + + if pTab == uintptr(0) { + // At one time, code such as "SELECT new.x" within a trigger would + // cause this condition to run. Since then, we have restructured how + // trigger code is generated and so this condition is no longer + // possible. However, it can still be true for statements like + // the following: + // + // CREATE TABLE t1(col INTEGER); + // SELECT (SELECT t1.col) FROM FROM t1; + // + // when columnType() is called on the expression "t1.col" in the + // sub-select. In this case, set the column type to NULL, even + // though it should really be "INTEGER". + // + // This is not a problem, as the column type of "t1.col" is never + // used. When columnType() is called on the expression + // "(SELECT t1.col)", the correct type is returned (see the TK_SELECT + // branch below. + break + } + + if pS != 0 { + // The "table" is actually a sub-select or a view in the FROM clause + // of the SELECT statement. Return the declaration type and origin + // data for the result-set column of the sub-select. + if iCol < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList)).FnExpr && + iCol >= 0 { + // If iCol is less than zero, then the expression requests the + // rowid of the sub-select or view. This expression is legal (see + // test case misc2.2.2) - it always evaluates to NULL. + // var sNC NameContext at bp, 56 + + var p uintptr = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList + 8 + uintptr(iCol)*32)).FpExpr + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pS)).FpSrc + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = pNC + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse + zType = columnTypeImpl(tls, bp, p, bp+56, bp+64, bp+72) + } + } else { + // A real table or a CTE table + + if iCol < 0 { + iCol = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) + } + + if iCol < 0 { + zType = ts + 1090 /* "INTEGER" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16165 /* "rowid" */ + } else { + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName + zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) + } + *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) = (*Table)(unsafe.Pointer(pTab)).FzName + if (*NameContext)(unsafe.Pointer(pNC)).FpParse != 0 && (*Table)(unsafe.Pointer(pTab)).FpSchema != 0 { + var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer((*NameContext)(unsafe.Pointer(pNC)).FpParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*NameContext)(unsafe.Pointer(pNC)).FpParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName + } + } + break + + } + case TK_SELECT: + { + // The expression is a sub-select. Return the declaration type and + // origin info for the single column in the result set of the SELECT + // statement. + // var sNC NameContext at bp+80, 56 + + var pS uintptr + var p uintptr + + pS = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + p = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList + 8)).FpExpr + (*NameContext)(unsafe.Pointer(bp + 80 /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pS)).FpSrc + (*NameContext)(unsafe.Pointer(bp + 80 /* &sNC */)).FpNext = pNC + (*NameContext)(unsafe.Pointer(bp + 80 /* &sNC */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse + zType = columnTypeImpl(tls, bp+80, p, bp+56, bp+64, bp+72) + break + + } + } + + if pzOrigDb != 0 { + + *(*uintptr)(unsafe.Pointer(pzOrigDb)) = *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) + *(*uintptr)(unsafe.Pointer(pzOrigTab)) = *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) + *(*uintptr)(unsafe.Pointer(pzOrigCol)) = *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) + } + return zType +} + +// Generate code that will tell the VDBE the declaration types of columns +// in the result set. +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var i int32 + // var sNC NameContext at bp, 56 + + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = pTabList + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = uintptr(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + var p uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr + var zType uintptr + *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = uintptr(0) + zType = columnTypeImpl(tls, bp, p, bp+56, bp+64, bp+72) + + // The vdbe must make its own copy of the column-type and other + // column specific strings, in case the schema is reset before this + // virtual machine is deleted. + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_DATABASE, *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)), libc.UintptrFromInt32(-1)) + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_TABLE, *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)), libc.UintptrFromInt32(-1)) + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_COLUMN, *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)), libc.UintptrFromInt32(-1)) + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_DECLTYPE, zType, libc.UintptrFromInt32(-1)) + } +} + +// Compute the column names for a SELECT statement. +// +// The only guarantee that SQLite makes about column names is that if the +// column has an AS clause assigning it a name, that will be the name used. +// That is the only documented guarantee. However, countless applications +// developed over the years have made baseless assumptions about column names +// and will break if those assumptions changes. Hence, use extreme caution +// when modifying this routine to avoid breaking legacy. +// +// See Also: sqlite3ColumnsFromExprList() +// +// The PRAGMA short_column_names and PRAGMA full_column_names settings are +// deprecated. The default setting is short=ON, full=OFF. 99.9% of all +// applications should operate this way. Nevertheless, we need to support the +// other modes for legacy: +// +// short=OFF, full=OFF: Column name is the text of the expression has it +// originally appears in the SELECT statement. In +// other words, the zSpan of the result expression. +// +// short=ON, full=OFF: (This is the default setting). If the result +// refers directly to a table column, then the +// result column name is just the table column +// name: COLUMN. Otherwise use zSpan. +// +// full=ON, short=ANY: If the result refers directly to a table column, +// then the result column name with the table name +// prefix, ex: TABLE.COLUMN. Otherwise use zSpan. +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var i int32 + var pTab uintptr + var pTabList uintptr + var pEList uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var fullName int32 // TABLE.COLUMN if no AS clause and is a direct table ref + var srcName int32 // COLUMN or TABLE.COLUMN if no AS clause and is direct + + // If this is an EXPLAIN, skip this step + if (*Parse)(unsafe.Pointer(pParse)).Fexplain != 0 { + return + } + + if (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet != 0 { + return + } + // Column names are determined by the left-most term of a compound select + for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { + pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior + } + + pTabList = (*Select)(unsafe.Pointer(pSelect)).FpSrc + pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList + + (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) + fullName = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_FullColNames) != uint64(0)) + srcName = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ShortColNames) != uint64(0) || fullName != 0) + Xsqlite3VdbeSetNumCols(tls, v, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { + var p uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr + + // Agg processing has not run yet + // Covering idx not yet coded + if (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName != 0 && int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { + // An AS clause always takes first priority + var zName uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, libc.UintptrFromInt32(-1)) + } else if srcName != 0 && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN { + var zCol uintptr + var iCol int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) + pTab = *(*uintptr)(unsafe.Pointer(p + 64)) + + if iCol < 0 { + iCol = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) + } + + if iCol < 0 { + zCol = ts + 16165 /* "rowid" */ + } else { + zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName + } + if fullName != 0 { + var zName uintptr = uintptr(0) + zName = Xsqlite3MPrintf(tls, db, ts+11937, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) + } else { + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) + } + } else { + var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName + if z == uintptr(0) { + z = Xsqlite3MPrintf(tls, db, ts+18632, libc.VaList(bp+16, i+1)) + } else { + z = Xsqlite3DbStrDup(tls, db, z) + } + Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, z, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3OomFault}))) + } + } + generateColumnTypes(tls, pParse, pTabList, pEList) +} + +// Given an expression list (which is really the list of expressions +// that form the result set of a SELECT statement) compute appropriate +// column names for a table that would hold the expression list. +// +// All column names will be unique. +// +// Only the column names are computed. Column.zType, Column.zColl, +// and other fields of Column are zeroed. +// +// Return SQLITE_OK on success. If a memory allocation error occurs, +// store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM. +// +// The only guarantee that SQLite makes about column names is that if the +// column has an AS clause assigning it a name, that will be the name used. +// That is the only documented guarantee. However, countless applications +// developed over the years have made baseless assumptions about column names +// and will break if those assumptions changes. Hence, use extreme caution +// when modifying this routine to avoid breaking legacy. +// +// See Also: sqlite3GenerateColumnNames() +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ + bp := tls.Alloc(60) + defer tls.Free(60) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection + var i int32 + var j int32 // Loop counters + // var cnt U32 at bp+56, 4 + // Index added to make the name unique + var aCol uintptr + var pCol uintptr // For looping over result columns + var nCol int32 // Number of columns in the result set + var zName uintptr // Column name + var nName int32 // Size of name in zName[] + // var ht Hash at bp+32, 24 + // Hash table of column names + var pTab uintptr + + Xsqlite3HashInit(tls, bp+32) + if pEList != 0 { + nCol = (*ExprList)(unsafe.Pointer(pEList)).FnExpr + aCol = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(Column{}))*uint64(nCol))) + + if nCol > 32767 { + nCol = 32767 + } + } else { + nCol = 0 + aCol = uintptr(0) + } + + *(*I16)(unsafe.Pointer(pnCol)) = I16(nCol) + *(*uintptr)(unsafe.Pointer(paCol)) = aCol + + i = 0 + pCol = aCol +__1: + if !(i < nCol && !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0)) { + goto __3 + } + { + // Get an appropriate name for the column + if libc.AssignUintptr(&zName, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName) != uintptr(0) && int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { + // If the column contains an "AS " phrase, use as the name + } else { + var pColExpr uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) + for pColExpr != uintptr(0) && int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_DOT { + pColExpr = (*Expr)(unsafe.Pointer(pColExpr)).FpRight + + } + if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pColExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && + libc.AssignUintptr(&pTab, *(*uintptr)(unsafe.Pointer(pColExpr + 64))) != uintptr(0) { + // For columns use the column name name + var iCol int32 = int32((*Expr)(unsafe.Pointer(pColExpr)).FiColumn) + if iCol < 0 { + iCol = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) + } + if iCol >= 0 { + zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName + } else { + zName = ts + 16165 /* "rowid" */ + } + } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { + + zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) + } else { + // Use the original text of the column expression as its name + zName = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName + } + } + if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { + zName = Xsqlite3DbStrDup(tls, db, zName) + } else { + zName = Xsqlite3MPrintf(tls, db, ts+18632, libc.VaList(bp, i+1)) + } + + // Make sure the column name is unique. If the name is not unique, + // append an integer to the name so that it becomes unique. + *(*U32)(unsafe.Pointer(bp + 56 /* cnt */)) = U32(0) + for zName != 0 && Xsqlite3HashFind(tls, bp+32, zName) != uintptr(0) { + nName = Xsqlite3Strlen30(tls, zName) + if nName > 0 { + for j = nName - 1; j > 0 && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zName + uintptr(j))))])&0x04 != 0; j-- { + } + if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(j)))) == ':' { + nName = j + } + } + zName = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) + } + } + (*Column)(unsafe.Pointer(pCol)).FzCnName = zName + (*Column)(unsafe.Pointer(pCol)).FhName = Xsqlite3StrIHash(tls, zName) + + if zName != 0 && Xsqlite3HashInsert(tls, bp+32, zName, pCol) == pCol { + Xsqlite3OomFault(tls, db) + } + + } + goto __2 +__2: + i++ + pCol += 24 + goto __1 + goto __3 +__3: + ; + Xsqlite3HashClear(tls, bp+32) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + for j = 0; j < i; j++ { + Xsqlite3DbFree(tls, db, (*Column)(unsafe.Pointer(aCol+uintptr(j)*24)).FzCnName) + } + Xsqlite3DbFree(tls, db, aCol) + *(*uintptr)(unsafe.Pointer(paCol)) = uintptr(0) + *(*I16)(unsafe.Pointer(pnCol)) = int16(0) + return SQLITE_NOMEM + } + return SQLITE_OK +} + +// Add type and collation information to a column list based on +// a SELECT statement. +// +// The column list presumably came from selectColumnNamesFromExprList(). +// The column list has only names, not types or collations. This +// routine goes through and adds the types and collations. +// +// This routine requires that all identifiers in the SELECT +// statement be resolved. +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:136386:21: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + // var sNC NameContext at bp, 56 + + var pCol uintptr + var pColl uintptr + var i int32 + var p uintptr + var a uintptr + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return + } + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc + a = (*Select)(unsafe.Pointer(pSelect)).FpEList + 8 /* &.a */ + i = 0 + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol +__1: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __3 + } + { + var zType uintptr + var n I64 + var m I64 + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_NOINSERT) + p = (*ExprList_item)(unsafe.Pointer(a + uintptr(i)*32)).FpExpr + zType = columnTypeImpl(tls, bp, p, uintptr(0), uintptr(0), uintptr(0)) + // pCol->szEst = ... // Column size est for SELECT tables never used + (*Column)(unsafe.Pointer(pCol)).Faffinity = Xsqlite3ExprAffinity(tls, p) + if zType != 0 { + m = I64(Xsqlite3Strlen30(tls, zType)) + n = I64(Xsqlite3Strlen30(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + (*Column)(unsafe.Pointer(pCol)).FzCnName = Xsqlite3DbReallocOrFree(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName, uint64(n+m+int64(2))) + if (*Column)(unsafe.Pointer(pCol)).FzCnName != 0 { + libc.Xmemcpy(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName+uintptr(n+int64(1)), zType, uint64(m+int64(1))) + *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_HASTYPE) + } else { + + *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_HASTYPE | COLFLAG_HASCOLL)) + } + } + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) <= SQLITE_AFF_NONE { + (*Column)(unsafe.Pointer(pCol)).Faffinity = aff + } + pColl = Xsqlite3ExprCollSeq(tls, pParse, p) + if pColl != 0 { + + Xsqlite3ColumnSetColl(tls, db, pCol, (*CollSeq)(unsafe.Pointer(pColl)).FzName) + } + + } + goto __2 +__2: + i++ + pCol += 24 + goto __1 + goto __3 +__3: + ; + (*Table)(unsafe.Pointer(pTab)).FszTabRow = int16(1) // Any non-zero value works +} + +// Given a SELECT statement, generate a Table structure that describes +// the result set of that SELECT. +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:136441:22: */ + var pTab uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var savedFlags U64 + + savedFlags = (*Sqlite3)(unsafe.Pointer(db)).Fflags + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_FullColNames)) + *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_ShortColNames) + Xsqlite3SelectPrep(tls, pParse, pSelect, uintptr(0)) + (*Sqlite3)(unsafe.Pointer(db)).Fflags = savedFlags + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } + for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { + pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior + } + pTab = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) + if pTab == uintptr(0) { + return uintptr(0) + } + (*Table)(unsafe.Pointer(pTab)).FnTabRef = U32(1) + (*Table)(unsafe.Pointer(pTab)).FzName = uintptr(0) + (*Table)(unsafe.Pointer(pTab)).FnRowLogEst = int16(200) + Xsqlite3ColumnsFromExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, pTab+54, pTab+8) + Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTab, pSelect, aff) + (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3DeleteTable(tls, db, pTab) + return uintptr(0) + } + return pTab +} + +// Get a VDBE for the given parser context. Create a new one if necessary. +// If an error occurs, return NULL and leave a message in pParse. +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ + if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpVdbe + } + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0) && + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_FactorOutConst) == U32(0) { + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(1) + } + return Xsqlite3VdbeCreate(tls, pParse) +} + +// Compute the iLimit and iOffset fields of the SELECT based on the +// pLimit expressions. pLimit->pLeft and pLimit->pRight hold the expressions +// that appear in the original SQL statement after the LIMIT and OFFSET +// keywords. Or NULL if those keywords are omitted. iLimit and iOffset +// are the integer memory register numbers for counters used to compute +// the limit and offset. If there is no limit and/or offset, then +// iLimit and iOffset are negative. +// +// This routine changes the values of iLimit and iOffset only if +// a limit or offset is defined by pLimit->pLeft and pLimit->pRight. iLimit +// and iOffset should have been preset to appropriate default values (zero) +// prior to calling this routine. +// +// The iOffset register (if it exists) is initialized to the value +// of the OFFSET. The iLimit register is initialized to LIMIT. Register +// iOffset+1 is initialized to LIMIT+OFFSET. +// +// Only if pLimit->pLeft!=0 do the limit registers get +// redefined. The UNION ALL operator uses this property to force +// the reuse of the same limit and offset registers across multiple +// SELECT statements. +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var v uintptr = uintptr(0) + var iLimit int32 = 0 + var iOffset int32 + // var n int32 at bp, 4 + + var pLimit uintptr = (*Select)(unsafe.Pointer(p)).FpLimit + + if (*Select)(unsafe.Pointer(p)).FiLimit != 0 { + return + } + + // "LIMIT -1" always shows all rows. There is some + // controversy about what the correct behavior should be. + // The current implementation interprets "LIMIT 0" to mean + // no rows. + if pLimit != 0 { + + (*Select)(unsafe.Pointer(p)).FiLimit = libc.AssignInt32(&iLimit, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + v = Xsqlite3GetVdbe(tls, pParse) + + if Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer(pLimit)).FpLeft, bp) != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp /* n */)), iLimit) + + if *(*int32)(unsafe.Pointer(bp)) == 0 { + Xsqlite3VdbeGoto(tls, v, iBreak) + } else if *(*int32)(unsafe.Pointer(bp)) >= 0 && int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32(Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp))))) { + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp /* n */)))) + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_FixedLimit) + } + } else { + Xsqlite3ExprCode(tls, pParse, (*Expr)(unsafe.Pointer(pLimit)).FpLeft, iLimit) + Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, iLimit) + + Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, iLimit, iBreak) + } + if (*Expr)(unsafe.Pointer(pLimit)).FpRight != 0 { + (*Select)(unsafe.Pointer(p)).FiOffset = libc.AssignInt32(&iOffset, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + (*Parse)(unsafe.Pointer(pParse)).FnMem++ // Allocate an extra register for limit+offset + Xsqlite3ExprCode(tls, pParse, (*Expr)(unsafe.Pointer(pLimit)).FpRight, iOffset) + Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, iOffset) + + Xsqlite3VdbeAddOp3(tls, v, OP_OffsetLimit, iLimit, iOffset+1, iOffset) + + } + } +} + +// Return the appropriate collating sequence for the iCol-th column of +// the result set for the compound-select statement "p". Return NULL if +// the column has no default collating sequence. +// +// The collating sequence for the compound select is taken from the +// left-most term of the select that has a collating sequence. +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ + var pRet uintptr + if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { + pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) + } else { + pRet = uintptr(0) + } + + // iCol must be less than p->pEList->nExpr. Otherwise an error would + // have been thrown during name resolution and we would not have gotten + // this far + if pRet == uintptr(0) && iCol < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr { + pRet = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList+8+uintptr(iCol)*32)).FpExpr) + } + return pRet +} + +// The select statement passed as the second parameter is a compound SELECT +// with an ORDER BY clause. This function allocates and returns a KeyInfo +// structure suitable for implementing the ORDER BY. +// +// Space to hold the KeyInfo structure is obtained from malloc. The calling +// function is responsible for ensuring that this structure is eventually +// freed. +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ + var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy + var nOrderBy int32 + if pOrderBy != uintptr(0) { + nOrderBy = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr + } else { + nOrderBy = 0 + } + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pRet uintptr = Xsqlite3KeyInfoAlloc(tls, db, nOrderBy+nExtra, 1) + if pRet != 0 { + var i int32 + for i = 0; i < nOrderBy; i++ { + var pItem uintptr = pOrderBy + 8 + uintptr(i)*32 + var pTerm uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr + var pColl uintptr + + if (*Expr)(unsafe.Pointer(pTerm)).Fflags&U32(EP_Collate) != 0 { + pColl = Xsqlite3ExprCollSeq(tls, pParse, pTerm) + } else { + pColl = multiSelectCollSeq(tls, pParse, p, int32(*(*U16)(unsafe.Pointer(pItem + 24)))-1) + if pColl == uintptr(0) { + pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl + } + (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr = Xsqlite3ExprAddCollateString(tls, pParse, pTerm, (*CollSeq)(unsafe.Pointer(pColl)).FzName) + } + + *(*uintptr)(unsafe.Pointer(pRet + 32 + uintptr(i)*8)) = pColl + *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pRet)).FaSortFlags + uintptr(i))) = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FsortFlags + } + } + + return pRet +} + +// This routine generates VDBE code to compute the content of a WITH RECURSIVE +// query of the form: +// +// AS ( UNION [ALL] ) +// \___________/ \_______________/ +// p->pPrior p +// +// +// There is exactly one reference to the recursive-table in the FROM clause +// of recursive-query, marked with the SrcList->a[].fg.isRecursive flag. +// +// The setup-query runs once to generate an initial set of rows that go +// into a Queue table. Rows are extracted from the Queue table one by +// one. Each row extracted from Queue is output to pDest. Then the single +// extracted row (now in the iCurrent table) becomes the content of the +// recursive-table for a recursive-query run. The output of the recursive-query +// is added back into the Queue table. Then another row is extracted from Queue +// and the iteration continues until the Queue table is empty. +// +// If the compound query operator is UNION then no duplicate rows are ever +// inserted into the Queue table. The iDistinct table keeps a copy of all rows +// that have ever been inserted into Queue and causes duplicates to be +// discarded. If the operator is UNION ALL, then duplicates are allowed. +// +// If the query has an ORDER BY, then entries in the Queue table are kept in +// ORDER BY order and the first entry is extracted for each cycle. Without +// an ORDER BY, the Queue table is just a FIFO. +// +// If a LIMIT clause is provided, then the iteration stops after LIMIT rows +// have been output to pDest. A LIMIT of zero means to output no rows and a +// negative LIMIT means to output all rows. If there is also an OFFSET clause +// with a positive value, then the first OFFSET outputs are discarded rather +// than being sent to pDest. The LIMIT count does not begin until after OFFSET +// rows have been skipped. +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var pSrc uintptr // The FROM clause of the recursive query + var nCol int32 // Number of columns in the recursive table + var v uintptr // The prepared statement under construction + var pSetup uintptr // The setup query + var pFirstRec uintptr // Left-most recursive term + var addrTop int32 // Top of the loop + var addrCont int32 + var addrBreak int32 // CONTINUE and BREAK addresses + var iCurrent int32 // The Current table + var regCurrent int32 // Register holding Current table + var iQueue int32 // The Queue table + var iDistinct int32 // To ensure unique results if UNION + var eDest int32 // How to write to Queue + // var destQueue SelectDest at bp, 40 + // SelectDest targetting the Queue table + var i int32 // Loop counter + var rc int32 // Result code + var pOrderBy uintptr // The ORDER BY clause + var pLimit uintptr // Saved LIMIT and OFFSET + var regLimit int32 + var regOffset int32 + var pKeyInfo uintptr + pSrc = (*Select)(unsafe.Pointer(p)).FpSrc + nCol = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + iCurrent = 0 + iDistinct = 0 + eDest = SRT_Fifo // Registers used by LIMIT and OFFSET + + if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { + goto __1 + } + Xsqlite3ErrorMsg(tls, pParse, ts+18649, 0) + return +__1: + ; + + // Obtain authorization to do a recursive query + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_RECURSIVE, uintptr(0), uintptr(0), uintptr(0)) != 0) { + goto __2 + } + return +__2: + ; + + // Process the LIMIT and OFFSET clauses, if they exist + addrBreak = Xsqlite3VdbeMakeLabel(tls, pParse) + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) // 4 billion rows + computeLimitRegisters(tls, pParse, p, addrBreak) + pLimit = (*Select)(unsafe.Pointer(p)).FpLimit + regLimit = (*Select)(unsafe.Pointer(p)).FiLimit + regOffset = (*Select)(unsafe.Pointer(p)).FiOffset + (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) + (*Select)(unsafe.Pointer(p)).FiLimit = libc.AssignPtrInt32(p+12, 0) + pOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy + + // Locate the cursor number of the Current table + i = 0 +__3: + if !(i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc) { + goto __5 + } + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112 + 60 + 4))&0x20>>5)) != 0) { + goto __6 + } + iCurrent = (*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)).FiCursor + goto __5 +__6: + ; + goto __4 +__4: + i++ + goto __3 + goto __5 +__5: + ; + + // Allocate cursors numbers for Queue and Distinct. The cursor number for + // the Distinct table must be exactly one greater than Queue in order + // for the SRT_DistFifo and SRT_DistQueue destinations to work. + iQueue = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(int32((*Select)(unsafe.Pointer(p)).Fop) == TK_UNION) { + goto __7 + } + if pOrderBy != 0 { + eDest = SRT_DistQueue + } else { + eDest = SRT_DistFifo + } + iDistinct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __8 +__7: + if pOrderBy != 0 { + eDest = SRT_Queue + } else { + eDest = SRT_Fifo + } +__8: + ; + Xsqlite3SelectDestInit(tls, bp, eDest, iQueue) + + // Allocate cursors for Current, Queue, and Distinct. + regCurrent = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenPseudo, iCurrent, regCurrent, nCol) + if !(pOrderBy != 0) { + goto __9 + } + pKeyInfo = multiSelectOrderByKeyInfo(tls, pParse, p, 1) + Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, iQueue, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr+2, 0, + pKeyInfo, -9) + (*SelectDest)(unsafe.Pointer(bp /* &destQueue */)).FpOrderBy = pOrderBy + goto __10 +__9: + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iQueue, nCol) +__10: + ; + + if !(iDistinct != 0) { + goto __11 + } + *(*int32)(unsafe.Pointer(p + 20)) = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iDistinct, 0) + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_UsesEphemeral) +__11: + ; + + // Detach the ORDER BY clause from the compound SELECT + (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) + + // Figure out how many elements of the compound SELECT are part of the + // recursive query. Make sure no recursive elements use aggregate + // functions. Mark the recursive elements as UNION ALL even if they + // are really UNION because the distinctness will be enforced by the + // iDistinct table. pFirstRec is left pointing to the left-most + // recursive term of the CTE. + pFirstRec = p +__12: + if !(pFirstRec != uintptr(0)) { + goto __14 + } + if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { + goto __15 + } + Xsqlite3ErrorMsg(tls, pParse, ts+18698, 0) + goto end_of_recursive_query +__15: + ; + (*Select)(unsafe.Pointer(pFirstRec)).Fop = U8(TK_ALL) + if !((*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(pFirstRec)).FpPrior)).FselFlags&U32(SF_Recursive) == U32(0)) { + goto __16 + } + goto __14 +__16: + ; + goto __13 +__13: + pFirstRec = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior + goto __12 + goto __14 +__14: + ; + + // Store the results of the setup-query in Queue. + pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior + (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18740, 0) + rc = Xsqlite3Select(tls, pParse, pSetup, bp) + (*Select)(unsafe.Pointer(pSetup)).FpNext = p + if !(rc != 0) { + goto __17 + } + goto end_of_recursive_query +__17: + ; + + // Find the next row in the Queue and output that row + addrTop = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iQueue, addrBreak) + + // Transfer the next row in Queue over to Current + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iCurrent) // To reset column cache + if !(pOrderBy != 0) { + goto __18 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iQueue, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr+1, regCurrent) + goto __19 +__18: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iQueue, regCurrent) +__19: + ; + Xsqlite3VdbeAddOp1(tls, v, OP_Delete, iQueue) + + // Output the single row in Current + addrCont = Xsqlite3VdbeMakeLabel(tls, pParse) + codeOffset(tls, v, regOffset, addrCont) + selectInnerLoop(tls, pParse, p, iCurrent, + uintptr(0), uintptr(0), pDest, addrCont, addrBreak) + if !(regLimit != 0) { + goto __20 + } + Xsqlite3VdbeAddOp2(tls, v, OP_DecrJumpZero, regLimit, addrBreak) + +__20: + ; + Xsqlite3VdbeResolveLabel(tls, v, addrCont) + + // Execute the recursive SELECT taking the single row in Current as + // the value for the recursive-table. Store the results in the Queue. + (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18746, 0) + Xsqlite3Select(tls, pParse, p, bp) + + (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup + + // Keep running the loop until the Queue is empty + Xsqlite3VdbeGoto(tls, v, addrTop) + Xsqlite3VdbeResolveLabel(tls, v, addrBreak) + +end_of_recursive_query: + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Select)(unsafe.Pointer(p)).FpOrderBy) + (*Select)(unsafe.Pointer(p)).FpOrderBy = pOrderBy + (*Select)(unsafe.Pointer(p)).FpLimit = pLimit + return +} + +// Handle the special case of a compound-select that originates from a +// VALUES clause. By handling this as a special case, we avoid deep +// recursion, and thus do not need to enforce the SQLITE_LIMIT_COMPOUND_SELECT +// on a VALUES clause. +// +// Because the Select object originates from a VALUES clause: +// (1) There is no LIMIT or OFFSET or else there is a LIMIT of exactly 1 +// (2) All terms are UNION ALL +// (3) There is no ORDER BY clause +// +// The "LIMIT of exactly 1" case of condition (1) comes about when a VALUES +// clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). +// The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. +// Since the limit is exactly 1, we only need to evalutes the left-most VALUES. +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var nRow int32 = 1 + var rc int32 = 0 + var bShowAll int32 = libc.Bool32((*Select)(unsafe.Pointer(p)).FpLimit == uintptr(0)) + + for __ccgo := true; __ccgo; __ccgo = 1 != 0 { + + if (*Select)(unsafe.Pointer(p)).FpWin != 0 { + return -1 + } + if (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { + break + } + + p = (*Select)(unsafe.Pointer(p)).FpPrior + nRow = nRow + bShowAll + } + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18761, libc.VaList(bp, nRow, func() uintptr { + if nRow == 1 { + return ts + 1525 /* "" */ + } + return ts + 18784 /* "S" */ + }())) + for p != 0 { + selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) + if !(bShowAll != 0) { + break + } + (*Select)(unsafe.Pointer(p)).FnSelectRow = LogEst(nRow) + p = (*Select)(unsafe.Pointer(p)).FpNext + } + return rc +} + +// Return true if the SELECT statement which is known to be the recursive +// part of a recursive CTE still has its anchor terms attached. If the +// anchor terms have already been removed, then return false. +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ + for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { + p = (*Select)(unsafe.Pointer(p)).FpPrior + } + return libc.Bool32(p != uintptr(0)) +} + +// This routine is called to process a compound query form from +// two or more separate queries using UNION, UNION ALL, EXCEPT, or +// INTERSECT +// +// "p" points to the right-most of the two queries. the query on the +// left is p->pPrior. The left query could also be a compound query +// in which case this routine will be called recursively. +// +// The results of the total query are to be written into a destination +// of type eDest with parameter iParm. +// +// Example 1: Consider a three-way compound SQL statement. +// +// SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3 +// +// This statement is parsed up as follows: +// +// SELECT c FROM t3 +// | +// `-----> SELECT b FROM t2 +// | +// `------> SELECT a FROM t1 +// +// The arrows in the diagram above represent the Select.pPrior pointer. +// So if this routine is called with p equal to the t3 query, then +// pPrior will be the t2 query. p->op will be TK_UNION in this case. +// +// Notice that because of the way SQLite parses compound SELECTs, the +// individual selects always group from left to right. +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + var rc int32 // Success code from a subroutine + var pPrior uintptr // Another SELECT immediately to our left + var v uintptr // Generate code to this VDBE + // var dest SelectDest at bp+16, 40 + // Alternative data destination + var pDelete uintptr // Chain of simple selects to delete + var db uintptr + var addr int32 + // var nLimit int32 at bp+56, 4 + + var iCont int32 + var iBreak int32 + var iStart int32 + var unionTab int32 // Cursor number of the temp table holding result + var op U8 // One of the SRT_ operations to apply to self + var priorOp int32 // The SRT_ operation to apply to prior selects + var pLimit uintptr // Saved values of p->nLimit + var addr1 int32 + // var uniondest SelectDest at bp+64, 40 + + var tab1 int32 + var tab2 int32 + var iCont1 int32 + var iBreak1 int32 + var iStart1 int32 + var pLimit1 uintptr + var addr2 int32 + // var intersectdest SelectDest at bp+104, 40 + + var r1 int32 + var addr3 int32 + var i int32 // Loop counter + var pKeyInfo uintptr // Collating sequence for the result set + var pLoop uintptr // For looping through SELECT statements + var apColl uintptr // For looping through pKeyInfo->aColl[] + var nCol int32 + rc = SQLITE_OK + pDelete = uintptr(0) // Database connection + + // Make sure there is no ORDER BY or LIMIT clause on prior SELECTs. Only + // the last (right-most) SELECT in the series may have an ORDER BY or LIMIT. + // Calling function guarantees this much + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + pPrior = (*Select)(unsafe.Pointer(p)).FpPrior + *(*SelectDest)(unsafe.Pointer(bp + 16 /* dest */)) = *(*SelectDest)(unsafe.Pointer(pDest)) + + v = Xsqlite3GetVdbe(tls, pParse) + // The VDBE already created by calling function + + // Create the destination temporary table if necessary + if !(int32((*SelectDest)(unsafe.Pointer(bp+16)).FeDest) == SRT_EphemTab) { + goto __1 + } + + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*SelectDest)(unsafe.Pointer(bp+16 /* &dest */)).FiSDParm, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr) + (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FeDest = U8(SRT_Table) +__1: + ; + + // Special handling for a compound-select that originates as a VALUES clause. + if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) != 0) { + goto __2 + } + rc = multiSelectValues(tls, pParse, p, bp+16) + if !(rc >= 0) { + goto __3 + } + goto multi_select_end +__3: + ; + rc = SQLITE_OK +__2: + ; + + // Make sure all SELECTs in the statement have the same number of elements + // in their result sets. + + if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) && hasAnchor(tls, p) != 0) { + goto __4 + } + generateWithRecursiveQuery(tls, pParse, p, bp+16) + goto __5 +__4: + + // Compound SELECTs that have an ORDER BY clause are handled separately. + if !((*Select)(unsafe.Pointer(p)).FpOrderBy != 0) { + goto __6 + } + return multiSelectOrderBy(tls, pParse, p, pDest) + goto __7 +__6: + + if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { + goto __8 + } + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18786, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18801, 0) +__8: + ; + + // Generate code for the left and right SELECT statements. + switch int32((*Select)(unsafe.Pointer(p)).Fop) { + case TK_ALL: + goto __10 + case TK_EXCEPT: + goto __11 + case TK_UNION: + goto __12 + default: + goto __13 + } + goto __9 +__10: + addr = 0 + *(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)) = 0 // Initialize to suppress harmless compiler warning + + (*Select)(unsafe.Pointer(pPrior)).FiLimit = (*Select)(unsafe.Pointer(p)).FiLimit + (*Select)(unsafe.Pointer(pPrior)).FiOffset = (*Select)(unsafe.Pointer(p)).FiOffset + (*Select)(unsafe.Pointer(pPrior)).FpLimit = (*Select)(unsafe.Pointer(p)).FpLimit + + rc = Xsqlite3Select(tls, pParse, pPrior, bp+16) + (*Select)(unsafe.Pointer(pPrior)).FpLimit = uintptr(0) + if !(rc != 0) { + goto __14 + } + goto multi_select_end +__14: + ; + (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) + (*Select)(unsafe.Pointer(p)).FiLimit = (*Select)(unsafe.Pointer(pPrior)).FiLimit + (*Select)(unsafe.Pointer(p)).FiOffset = (*Select)(unsafe.Pointer(pPrior)).FiOffset + if !((*Select)(unsafe.Pointer(p)).FiLimit != 0) { + goto __15 + } + addr = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, (*Select)(unsafe.Pointer(p)).FiLimit) + + if !((*Select)(unsafe.Pointer(p)).FiOffset != 0) { + goto __16 + } + Xsqlite3VdbeAddOp3(tls, v, OP_OffsetLimit, + (*Select)(unsafe.Pointer(p)).FiLimit, (*Select)(unsafe.Pointer(p)).FiOffset+1, (*Select)(unsafe.Pointer(p)).FiOffset) +__16: + ; +__15: + ; + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18576, 0) + + rc = Xsqlite3Select(tls, pParse, p, bp+16) + + pDelete = (*Select)(unsafe.Pointer(p)).FpPrior + (*Select)(unsafe.Pointer(p)).FpPrior = pPrior + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEstAdd(tls, (*Select)(unsafe.Pointer(p)).FnSelectRow, (*Select)(unsafe.Pointer(pPrior)).FnSelectRow) + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0 && + Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpLimit)).FpLeft, bp+56) != 0 && + *(*int32)(unsafe.Pointer(bp + 56)) > 0 && int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32(Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 56)))))) { + goto __17 + } + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)))) +__17: + ; + if !(addr != 0) { + goto __18 + } + Xsqlite3VdbeJumpHere(tls, v, addr) +__18: + ; + goto __9 + +__11: +__12: // Cursor number of the temp table holding result + op = U8(0) + + priorOp = SRT_Union + if !(int32((*SelectDest)(unsafe.Pointer(bp+16)).FeDest) == priorOp) { + goto __19 + } + // We can reuse a temporary table generated by a SELECT to our + // right. + // Not allowed on leftward elements + unionTab = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FiSDParm + goto __20 +__19: + // We will need to create our own temporary table to hold the + // intermediate results. + unionTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + + addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, unionTab, 0) + + *(*int32)(unsafe.Pointer(p + 20)) = addr1 + *(*U32)(unsafe.Pointer(findRightmost(tls, p) + 4)) |= U32(SF_UsesEphemeral) + +__20: + ; + + // Code the SELECT statements to our left + + Xsqlite3SelectDestInit(tls, bp+64, priorOp, unionTab) + + rc = Xsqlite3Select(tls, pParse, pPrior, bp+64) + if !(rc != 0) { + goto __21 + } + goto multi_select_end +__21: + ; + + // Code the current SELECT statement + if !(int32((*Select)(unsafe.Pointer(p)).Fop) == TK_EXCEPT) { + goto __22 + } + op = U8(SRT_Except) + goto __23 +__22: + ; + op = U8(SRT_Union) +__23: + ; + (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) + pLimit = (*Select)(unsafe.Pointer(p)).FpLimit + (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) + (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + + rc = Xsqlite3Select(tls, pParse, p, bp+64) + + pDelete = (*Select)(unsafe.Pointer(p)).FpPrior + (*Select)(unsafe.Pointer(p)).FpPrior = pPrior + (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) + if !(int32((*Select)(unsafe.Pointer(p)).Fop) == TK_UNION) { + goto __24 + } + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEstAdd(tls, (*Select)(unsafe.Pointer(p)).FnSelectRow, (*Select)(unsafe.Pointer(pPrior)).FnSelectRow) +__24: + ; + Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) + (*Select)(unsafe.Pointer(p)).FpLimit = pLimit + (*Select)(unsafe.Pointer(p)).FiLimit = 0 + (*Select)(unsafe.Pointer(p)).FiOffset = 0 + + // Convert the data in the temporary table into whatever form + // it is that we currently need. + + if !(int32((*SelectDest)(unsafe.Pointer(bp+16)).FeDest) != priorOp && int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { + goto __25 + } + iBreak = Xsqlite3VdbeMakeLabel(tls, pParse) + iCont = Xsqlite3VdbeMakeLabel(tls, pParse) + computeLimitRegisters(tls, pParse, p, iBreak) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, unionTab, iBreak) + iStart = Xsqlite3VdbeCurrentAddr(tls, v) + selectInnerLoop(tls, pParse, p, unionTab, + uintptr(0), uintptr(0), bp+16, iCont, iBreak) + Xsqlite3VdbeResolveLabel(tls, v, iCont) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, unionTab, iStart) + Xsqlite3VdbeResolveLabel(tls, v, iBreak) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, unionTab, 0) +__25: + ; + goto __9 + +__13: + ; + + // INTERSECT is different from the others since it requires + // two temporary tables. Hence it has its own case. Begin + // by allocating the tables we will need. + tab1 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + tab2 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + + addr2 = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, tab1, 0) + + *(*int32)(unsafe.Pointer(p + 20)) = addr2 + *(*U32)(unsafe.Pointer(findRightmost(tls, p) + 4)) |= U32(SF_UsesEphemeral) + + // Code the SELECTs to our left into temporary table "tab1". + Xsqlite3SelectDestInit(tls, bp+104, SRT_Union, tab1) + + rc = Xsqlite3Select(tls, pParse, pPrior, bp+104) + if !(rc != 0) { + goto __26 + } + goto multi_select_end +__26: + ; + + // Code the current SELECT into temporary table "tab2" + addr2 = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, tab2, 0) + + *(*int32)(unsafe.Pointer(p + 20 + 1*4)) = addr2 + (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) + pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit + (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) + (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + + rc = Xsqlite3Select(tls, pParse, p, bp+104) + + pDelete = (*Select)(unsafe.Pointer(p)).FpPrior + (*Select)(unsafe.Pointer(p)).FpPrior = pPrior + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32((*Select)(unsafe.Pointer(pPrior)).FnSelectRow)) { + goto __27 + } + (*Select)(unsafe.Pointer(p)).FnSelectRow = (*Select)(unsafe.Pointer(pPrior)).FnSelectRow +__27: + ; + Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) + (*Select)(unsafe.Pointer(p)).FpLimit = pLimit1 + + // Generate code to take the intersection of the two temporary + // tables. + if !(rc != 0) { + goto __28 + } + goto __9 +__28: + ; + + iBreak1 = Xsqlite3VdbeMakeLabel(tls, pParse) + iCont1 = Xsqlite3VdbeMakeLabel(tls, pParse) + computeLimitRegisters(tls, pParse, p, iBreak1) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, tab1, iBreak1) + r1 = Xsqlite3GetTempReg(tls, pParse) + iStart1 = Xsqlite3VdbeAddOp2(tls, v, OP_RowData, tab1, r1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, tab2, iCont1, r1, 0) + + Xsqlite3ReleaseTempReg(tls, pParse, r1) + selectInnerLoop(tls, pParse, p, tab1, + uintptr(0), uintptr(0), bp+16, iCont1, iBreak1) + Xsqlite3VdbeResolveLabel(tls, v, iCont1) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, tab1, iStart1) + Xsqlite3VdbeResolveLabel(tls, v, iBreak1) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, tab2, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, tab1, 0) + goto __9 + +__9: + ; + + if !((*Select)(unsafe.Pointer(p)).FpNext == uintptr(0)) { + goto __29 + } + Xsqlite3VdbeExplainPop(tls, pParse) +__29: + ; +__7: + ; +__5: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __30 + } + goto multi_select_end +__30: + ; + + // Compute collating sequences used by + // temporary tables needed to implement the compound select. + // Attach the KeyInfo structure to all temporary tables. + // + // This section is run by the right-most SELECT statement only. + // SELECT statements to the left always skip this part. The right-most + // SELECT might also skip this part if it has no ORDER BY clause and + // no temp tables are required. + if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_UsesEphemeral) != 0) { + goto __31 + } // Number of columns in result set + + nCol = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr + pKeyInfo = Xsqlite3KeyInfoAlloc(tls, db, nCol, 1) + if !!(pKeyInfo != 0) { + goto __32 + } + rc = SQLITE_NOMEM + goto multi_select_end +__32: + ; + i = 0 + apColl = pKeyInfo + 32 /* &.aColl */ +__33: + if !(i < nCol) { + goto __35 + } + *(*uintptr)(unsafe.Pointer(apColl)) = multiSelectCollSeq(tls, pParse, p, i) + if !(uintptr(0) == *(*uintptr)(unsafe.Pointer(apColl))) { + goto __36 + } + *(*uintptr)(unsafe.Pointer(apColl)) = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl +__36: + ; + goto __34 +__34: + i++ + apColl += 8 + goto __33 + goto __35 +__35: + ; + + pLoop = p +__37: + if !(pLoop != 0) { + goto __39 + } + i = 0 +__40: + if !(i < 2) { + goto __42 + } + addr3 = *(*int32)(unsafe.Pointer(pLoop + 20 + uintptr(i)*4)) + if !(addr3 < 0) { + goto __43 + } + // If [0] is unused then [1] is also unused. So we can + // always safely abort as soon as the first unused slot is found + + goto __42 +__43: + ; + Xsqlite3VdbeChangeP2(tls, v, addr3, nCol) + Xsqlite3VdbeChangeP4(tls, v, addr3, Xsqlite3KeyInfoRef(tls, pKeyInfo), + -9) + *(*int32)(unsafe.Pointer(pLoop + 20 + uintptr(i)*4)) = -1 + goto __41 +__41: + i++ + goto __40 + goto __42 +__42: + ; + goto __38 +__38: + pLoop = (*Select)(unsafe.Pointer(pLoop)).FpPrior + goto __37 + goto __39 +__39: + ; + Xsqlite3KeyInfoUnref(tls, pKeyInfo) +__31: + ; + +multi_select_end: + (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FiSdst + (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FnSdst + if !(pDelete != 0) { + goto __44 + } + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3SelectDelete})), + pDelete) +__44: + ; + return rc +} + +// Error message for when two or more terms of a compound select have different +// size result sets. +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+18841, 0) + } else { + Xsqlite3ErrorMsg(tls, pParse, + ts+18887, + libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + } +} + +// Code an output subroutine for a coroutine implementation of a +// SELECT statment. +// +// The data to be output is contained in pIn->iSdst. There are +// pIn->nSdst columns to be output. pDest is where the output should +// be sent. +// +// regReturn is the number of the register holding the subroutine +// return address. +// +// If regPrev>0 then it is the first register in a vector that +// records the previous output. mem[regPrev] is a flag that is false +// if there has been no previous output. If regPrev>0 then code is +// generated to suppress duplicates. pKeyInfo is used for comparing +// keys. +// +// If the LIMIT found in p->iLimit is reached, jump immediately to +// iBreak. +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var iContinue int32 + var addr int32 + + addr = Xsqlite3VdbeCurrentAddr(tls, v) + iContinue = Xsqlite3VdbeMakeLabel(tls, pParse) + + // Suppress duplicates for UNION, EXCEPT, and INTERSECT + if regPrev != 0 { + var addr1 int32 + var addr2 int32 + addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regPrev) + addr2 = Xsqlite3VdbeAddOp4(tls, v, OP_Compare, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, regPrev+1, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst, + Xsqlite3KeyInfoRef(tls, pKeyInfo), -9) + Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addr2+2, iContinue, addr2+2) + Xsqlite3VdbeJumpHere(tls, v, addr1) + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, regPrev+1, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst-1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regPrev) + } + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + return 0 + } + + // Suppress the first OFFSET entries if there is an OFFSET clause + codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, iContinue) + + switch int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) { + // Store the result as data using a unique key. + case SRT_EphemTab: + { + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + var r2 int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst, r1) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, r2) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, r1, r2) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) + Xsqlite3ReleaseTempReg(tls, pParse, r2) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + break + + } + + // If we are creating a set for an "expr IN (SELECT ...)". + case SRT_Set: + { + var r1 int32 + + r1 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst, + r1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, r1, + (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + break + + } + + // If this is a scalar select that is part of an expression, then + // store the results in the appropriate memory cell and break out + // of the scan loop. Note that the select might return multiple columns + // if it is the RHS of a row-value IN operator. + case SRT_Mem: + { + + Xsqlite3ExprCodeMove(tls, pParse, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) + // The LIMIT clause will jump out of the loop for us + break + + } + + // The results are stored in a sequence of registers + // starting at pDest->iSdst. Then the co-routine yields. + case SRT_Coroutine: + { + if (*SelectDest)(unsafe.Pointer(pDest)).FiSdst == 0 { + (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = Xsqlite3GetTempRange(tls, pParse, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) + (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = (*SelectDest)(unsafe.Pointer(pIn)).FnSdst + } + Xsqlite3ExprCodeMove(tls, pParse, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) + Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm) + break + + } + + // If none of the above, then the result destination must be + // SRT_Output. This routine is never called with any other + // destination other than the ones handled above or SRT_Output. + // + // For SRT_Output, results are stored in a sequence of registers. + // Then the OP_ResultRow opcode is used to cause sqlite3_step() to + // return the next row of result. + default: + { + + Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) + break + + } + } + + // Jump to the end of the loop if the LIMIT is reached. + if (*Select)(unsafe.Pointer(p)).FiLimit != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_DecrJumpZero, (*Select)(unsafe.Pointer(p)).FiLimit, iBreak) + } + + // Generate the subroutine return + Xsqlite3VdbeResolveLabel(tls, v, iContinue) + Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReturn) + + return addr +} + +// Alternative compound select code generator for cases when there +// is an ORDER BY clause. +// +// We assume a query of the following form: +// +// ORDER BY +// +// is one of UNION ALL, UNION, EXCEPT, or INTERSECT. The idea +// is to code both and with the ORDER BY clause as +// co-routines. Then run the co-routines in parallel and merge the results +// into the output. In addition to the two coroutines (called selectA and +// selectB) there are 7 subroutines: +// +// outA: Move the output of the selectA coroutine into the output +// of the compound query. +// +// outB: Move the output of the selectB coroutine into the output +// of the compound query. (Only generated for UNION and +// UNION ALL. EXCEPT and INSERTSECT never output a row that +// appears only in B.) +// +// AltB: Called when there is data from both coroutines and AB. +// +// EofA: Called when data is exhausted from selectA. +// +// EofB: Called when data is exhausted from selectB. +// +// The implementation of the latter five subroutines depend on which +// is used: +// +// +// UNION ALL UNION EXCEPT INTERSECT +// ------------- ----------------- -------------- ----------------- +// AltB: outA, nextA outA, nextA outA, nextA nextA +// +// AeqB: outA, nextA nextA nextA outA, nextA +// +// AgtB: outB, nextB outB, nextB nextB nextB +// +// EofA: outB, nextB outB, nextB halt halt +// +// EofB: outA, nextA outA, nextA outA, nextA halt +// +// In the AltB, AeqB, and AgtB subroutines, an EOF on A following nextA +// causes an immediate jump to EofA and an EOF on B following nextB causes +// an immediate jump to EofB. Within EofA and EofB, and EOF on entry or +// following nextX causes a jump to the end of the select processing. +// +// Duplicate removal in the UNION, EXCEPT, and INTERSECT cases is handled +// within the output subroutine. The regPrev register set holds the previously +// output value. A comparison is made against this value and the output +// is skipped if the next results would be the same as the previous. +// +// The implementation plan is to implement the two coroutines and seven +// subroutines first, then put the control logic at the bottom. Like this: +// +// goto Init +// coA: coroutine for left query (A) +// coB: coroutine for right query (B) +// outA: output one row of A +// outB: output one row of B (UNION and UNION ALL only) +// EofA: ... +// EofB: ... +// AltB: ... +// AeqB: ... +// AgtB: ... +// Init: initialize coroutine registers +// yield coA +// if eof(A) goto EofA +// yield coB +// if eof(B) goto EofB +// Cmpr: Compare A, B +// Jump AltB, AeqB, AgtB +// End: ... +// +// We call AltB, AeqB, AgtB, EofA, and EofB "subroutines" but they are not +// actually called using Gosub and they do not Return. EofA and EofB loop +// until all data is exhausted then jump to the "end" labe. AltB, AeqB, +// and AgtB jump to either L2 or to one of EofA or EofB. +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + var i int32 + var j int32 // Loop counters + var pPrior uintptr // Another SELECT immediately to our left + var pSplit uintptr // Left-most SELECT in the right-hand group + var nSelect int32 // Number of SELECT statements in the compound + var v uintptr // Generate code to this VDBE + // var destA SelectDest at bp+8, 40 + // Destination for coroutine A + // var destB SelectDest at bp+48, 40 + // Destination for coroutine B + var regAddrA int32 // Address register for select-A coroutine + var regAddrB int32 // Address register for select-B coroutine + var addrSelectA int32 // Address of the select-A coroutine + var addrSelectB int32 // Address of the select-B coroutine + var regOutA int32 // Address register for the output-A subroutine + var regOutB int32 // Address register for the output-B subroutine + var addrOutA int32 // Address of the output-A subroutine + var addrOutB int32 = 0 // Address of the output-B subroutine + var addrEofA int32 // Address of the select-A-exhausted subroutine + var addrEofA_noB int32 // Alternate addrEofA if B is uninitialized + var addrEofB int32 // Address of the select-B-exhausted subroutine + var addrAltB int32 // Address of the AB subroutine + var regLimitA int32 // Limit register for select-A + var regLimitB int32 // Limit register for select-A + var regPrev int32 // A range of registers to hold previous output + var savedLimit int32 // Saved value of p->iLimit + var savedOffset int32 // Saved value of p->iOffset + var labelCmpr int32 // Label for the start of the merge algorithm + var labelEnd int32 // Label for the end of the overall SELECT stmt + var addr1 int32 // Jump instructions that get retargetted + var op int32 // One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT + var pKeyDup uintptr = uintptr(0) // Comparison information for duplicate removal + var pKeyMerge uintptr // Comparison information for merging rows + var db uintptr // Database connection + var pOrderBy uintptr // The ORDER BY clause + var nOrderBy int32 // Number of terms in the ORDER BY clause + var aPermute uintptr // Mapping from ORDER BY terms to result set columns + + // "Managed" code needs this. Ticket #3382. + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + // Already thrown the error if VDBE alloc failed + labelEnd = Xsqlite3VdbeMakeLabel(tls, pParse) + labelCmpr = Xsqlite3VdbeMakeLabel(tls, pParse) + + // Patch up the ORDER BY clause + op = int32((*Select)(unsafe.Pointer(p)).Fop) + + pOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy + + nOrderBy = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr + + // For operators other than UNION ALL we have to make sure that + // the ORDER BY clause covers every term of the result set. Add + // terms to the ORDER BY clause as necessary. + if op != TK_ALL { + for i = 1; int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && i <= (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr; i++ { + var pItem uintptr + j = 0 + pItem = pOrderBy + 8 /* &.a */ + __1: + if !(j < nOrderBy) { + goto __3 + } + { + + if int32(*(*U16)(unsafe.Pointer(pItem + 24))) == i { + goto __3 + } + + } + goto __2 + __2: + j++ + pItem += 32 + goto __1 + goto __3 + __3: + ; + if j == nOrderBy { + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, uintptr(0)) + if pNew == uintptr(0) { + return SQLITE_NOMEM + } + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_IntValue) + *(*int32)(unsafe.Pointer(pNew + 8)) = i + (*Select)(unsafe.Pointer(p)).FpOrderBy = libc.AssignUintptr(&pOrderBy, Xsqlite3ExprListAppend(tls, pParse, pOrderBy, pNew)) + if pOrderBy != 0 { + *(*U16)(unsafe.Pointer(pOrderBy + 8 + uintptr(libc.PostIncInt32(&nOrderBy, 1))*32 + 24)) = U16(i) + } + } + } + } + + // Compute the comparison permutation and keyinfo that is used with + // the permutation used to determine if the next + // row of results comes from selectA or selectB. Also add explicit + // collations to the ORDER BY clause terms so that when the subqueries + // to the right and the left are evaluated, they use the correct + // collation. + aPermute = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64(nOrderBy+1))) + if aPermute != 0 { + var pItem uintptr + *(*U32)(unsafe.Pointer(aPermute)) = U32(nOrderBy) + i = 1 + pItem = pOrderBy + 8 /* &.a */ + __4: + if !(i <= nOrderBy) { + goto __6 + } + { + + *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) = U32(int32(*(*U16)(unsafe.Pointer(pItem + 24))) - 1) + + } + goto __5 + __5: + i++ + pItem += 32 + goto __4 + goto __6 + __6: + ; + pKeyMerge = multiSelectOrderByKeyInfo(tls, pParse, p, 1) + } else { + pKeyMerge = uintptr(0) + } + + // Allocate a range of temporary registers and the KeyInfo needed + // for the logic that removes duplicate result rows when the + // operator is UNION, EXCEPT, or INTERSECT (but not UNION ALL). + if op == TK_ALL { + regPrev = 0 + } else { + var nExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr + + regPrev = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nExpr + 1 + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regPrev) + pKeyDup = Xsqlite3KeyInfoAlloc(tls, db, nExpr, 1) + if pKeyDup != 0 { + + for i = 0; i < nExpr; i++ { + *(*uintptr)(unsafe.Pointer(pKeyDup + 32 + uintptr(i)*8)) = multiSelectCollSeq(tls, pParse, p, i) + *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyDup)).FaSortFlags + uintptr(i))) = U8(0) + } + } + } + + // Separate the left and the right query from one another + nSelect = 1 + if (op == TK_ALL || op == TK_UNION) && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BalancedMerge) == U32(0) { + for pSplit = p; (*Select)(unsafe.Pointer(pSplit)).FpPrior != uintptr(0) && int32((*Select)(unsafe.Pointer(pSplit)).Fop) == op; pSplit = (*Select)(unsafe.Pointer(pSplit)).FpPrior { + nSelect++ + + } + } + if nSelect <= 3 { + pSplit = p + } else { + pSplit = p + for i = 2; i < nSelect; i = i + 2 { + pSplit = (*Select)(unsafe.Pointer(pSplit)).FpPrior + } + } + pPrior = (*Select)(unsafe.Pointer(pSplit)).FpPrior + + (*Select)(unsafe.Pointer(pSplit)).FpPrior = uintptr(0) + (*Select)(unsafe.Pointer(pPrior)).FpNext = uintptr(0) + + (*Select)(unsafe.Pointer(pPrior)).FpOrderBy = Xsqlite3ExprListDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pOrderBy, 0) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7107) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7107) + + // Compute the limit registers + computeLimitRegisters(tls, pParse, p, labelEnd) + if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { + regLimitA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regLimitB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, func() int32 { + if (*Select)(unsafe.Pointer(p)).FiOffset != 0 { + return (*Select)(unsafe.Pointer(p)).FiOffset + 1 + } + return (*Select)(unsafe.Pointer(p)).FiLimit + }(), + regLimitA) + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, regLimitA, regLimitB) + } else { + regLimitA = libc.AssignInt32(®LimitB, 0) + } + Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) + (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) + + regAddrA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regAddrB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regOutA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regOutB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) + Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) + + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18969, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + + // Generate a coroutine to evaluate the SELECT statement to the + // left of the compound operator - the "A" select. + addrSelectA = Xsqlite3VdbeCurrentAddr(tls, v) + 1 + addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) + + (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18980, 0) + Xsqlite3Select(tls, pParse, pPrior, bp+8) + Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) + Xsqlite3VdbeJumpHere(tls, v, addr1) + + // Generate a coroutine to evaluate the SELECT statement on + // the right - the "B" select + addrSelectB = Xsqlite3VdbeCurrentAddr(tls, v) + 1 + addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrB, 0, addrSelectB) + + savedLimit = (*Select)(unsafe.Pointer(p)).FiLimit + savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset + (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB + (*Select)(unsafe.Pointer(p)).FiOffset = 0 + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18985, 0) + Xsqlite3Select(tls, pParse, p, bp+48) + (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit + (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset + Xsqlite3VdbeEndCoroutine(tls, v, regAddrB) + + // Generate a subroutine that outputs the current row of the A + // select as the next output row of the compound select. + + addrOutA = generateOutputSubroutine(tls, pParse, + p, bp+8, pDest, regOutA, + regPrev, pKeyDup, labelEnd) + + // Generate a subroutine that outputs the current row of the B + // select as the next output row of the compound select. + if op == TK_ALL || op == TK_UNION { + + addrOutB = generateOutputSubroutine(tls, pParse, + p, bp+48, pDest, regOutB, + regPrev, pKeyDup, labelEnd) + } + Xsqlite3KeyInfoUnref(tls, pKeyDup) + + // Generate a subroutine to run when the results from select A + // are exhausted and only data in select B remains. + if op == TK_EXCEPT || op == TK_INTERSECT { + addrEofA_noB = libc.AssignInt32(&addrEofA, labelEnd) + } else { + + addrEofA = Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutB, addrOutB) + addrEofA_noB = Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrB, labelEnd) + + Xsqlite3VdbeGoto(tls, v, addrEofA) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEstAdd(tls, (*Select)(unsafe.Pointer(p)).FnSelectRow, (*Select)(unsafe.Pointer(pPrior)).FnSelectRow) + } + + // Generate a subroutine to run when the results from select B + // are exhausted and only data in select A remains. + if op == TK_INTERSECT { + addrEofB = addrEofA + if int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32((*Select)(unsafe.Pointer(pPrior)).FnSelectRow) { + (*Select)(unsafe.Pointer(p)).FnSelectRow = (*Select)(unsafe.Pointer(pPrior)).FnSelectRow + } + } else { + + addrEofB = Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutA, addrOutA) + Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrA, labelEnd) + Xsqlite3VdbeGoto(tls, v, addrEofB) + } + + // Generate code to handle the case of AB + + addrAgtB = Xsqlite3VdbeCurrentAddr(tls, v) + if op == TK_ALL || op == TK_UNION { + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutB, addrOutB) + } + Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrB, addrEofB) + Xsqlite3VdbeGoto(tls, v, labelCmpr) + + // This code runs once to initialize everything. + Xsqlite3VdbeJumpHere(tls, v, addr1) + Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrA, addrEofA_noB) + Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrB, addrEofB) + + // Implement the main merge loop + Xsqlite3VdbeResolveLabel(tls, v, labelCmpr) + Xsqlite3VdbeAddOp4(tls, v, OP_Permutation, 0, 0, 0, aPermute, -15) + Xsqlite3VdbeAddOp4(tls, v, OP_Compare, (*SelectDest)(unsafe.Pointer(bp+8 /* &destA */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+48 /* &destB */)).FiSdst, nOrderBy, + pKeyMerge, -9) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_PERMUTE)) + Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addrAltB, addrAeqB, addrAgtB) + + // Jump to the this point in order to terminate the query. + Xsqlite3VdbeResolveLabel(tls, v, labelEnd) + + // Reassembly the compound query so that it will be freed correctly + // by the calling function + if (*Select)(unsafe.Pointer(pSplit)).FpPrior != 0 { + Xsqlite3SelectDelete(tls, db, (*Select)(unsafe.Pointer(pSplit)).FpPrior) + } + (*Select)(unsafe.Pointer(pSplit)).FpPrior = pPrior + (*Select)(unsafe.Pointer(pPrior)).FpNext = pSplit + Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy) + (*Select)(unsafe.Pointer(pPrior)).FpOrderBy = uintptr(0) + + // ** TBD: Insert subroutine calls to close cursors on incomplete + // subqueries *** + Xsqlite3VdbeExplainPop(tls, pParse) + return libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) +} + +// An instance of the SubstContext object describes an substitution edit +// to be performed on a parse tree. +// +// All references to columns in table iTable are to be replaced by corresponding +// expressions in pEList. +type SubstContext1 = struct { + FpParse uintptr + FiTable int32 + FiNewTable int32 + FisLeftJoin int32 + F__ccgo_pad1 [4]byte + FpEList uintptr +} /* sqlite3.c:137827:9 */ + +// An instance of the SubstContext object describes an substitution edit +// to be performed on a parse tree. +// +// All references to columns in table iTable are to be replaced by corresponding +// expressions in pEList. +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ + +// Scan through the expression pExpr. Replace every reference to +// a column in table number iTable with a copy of the iColumn-th +// entry in pEList. (But leave references to the ROWID column +// unchanged.) +// +// This routine is part of the flattening procedure. A subquery +// whose result set is defined by pEList appears as entry in the +// FROM clause of a SELECT such that the VDBE cursor assigned to that +// FORM clause entry is iTable. This routine makes the necessary +// changes to pExpr so that it refers directly to the source table +// of the subquery rather the result set of the subquery. +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + if pExpr == uintptr(0) { + return uintptr(0) + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) && + *(*int32)(unsafe.Pointer(pExpr + 52)) == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable { + *(*int32)(unsafe.Pointer(pExpr + 52)) = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable && + !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { + { + var pNew uintptr + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr + // var ifNullRow Expr at bp, 72 + + if Xsqlite3ExprIsVector(tls, pCopy) != 0 { + Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) + } else { + var db uintptr = (*Parse)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpParse)).Fdb + if (*SubstContext)(unsafe.Pointer(pSubst)).FisLeftJoin != 0 && int32((*Expr)(unsafe.Pointer(pCopy)).Fop) != TK_COLUMN { + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).Fop = U8(TK_IF_NULL_ROW) + (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).FpLeft = pCopy + (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).Fflags = U32(EP_IfNullRow) + pCopy = bp /* &ifNullRow */ + } + + pNew = Xsqlite3ExprDup(tls, db, pCopy, 0) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3ExprDelete(tls, db, pNew) + return pExpr + } + if (*SubstContext)(unsafe.Pointer(pSubst)).FisLeftJoin != 0 { + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_CanBeNull) + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { + Xsqlite3SetJoinExpr(tls, pNew, *(*int32)(unsafe.Pointer(pExpr + 52))) + } + Xsqlite3ExprDelete(tls, db, pExpr) + pExpr = pNew + + // Ensure that the expression now has an implicit collation sequence, + // just as it did when it was a column of a view or sub-query. + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1070 + }()) + } + *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) + } + + } + } else { + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IF_NULL_ROW && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable { + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + } + (*Expr)(unsafe.Pointer(pExpr)).FpLeft = substExpr(tls, pSubst, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + (*Expr)(unsafe.Pointer(pExpr)).FpRight = substExpr(tls, pSubst, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + substSelect(tls, pSubst, *(*uintptr)(unsafe.Pointer(pExpr + 32)), 1) + } else { + substExprList(tls, pSubst, *(*uintptr)(unsafe.Pointer(pExpr + 32))) + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + (*Window)(unsafe.Pointer(pWin)).FpFilter = substExpr(tls, pSubst, (*Window)(unsafe.Pointer(pWin)).FpFilter) + substExprList(tls, pSubst, (*Window)(unsafe.Pointer(pWin)).FpPartition) + substExprList(tls, pSubst, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) + } + } + return pExpr +} + +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ + var i int32 + if pList == uintptr(0) { + return + } + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr) + } +} + +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ + var pSrc uintptr + var pItem uintptr + var i int32 + if !(p != 0) { + return + } + for __ccgo := true; __ccgo; __ccgo = doPrior != 0 && libc.AssignUintptr(&p, (*Select)(unsafe.Pointer(p)).FpPrior) != uintptr(0) { + substExprList(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpEList) + substExprList(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpGroupBy) + substExprList(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpOrderBy) + (*Select)(unsafe.Pointer(p)).FpHaving = substExpr(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpHaving) + (*Select)(unsafe.Pointer(p)).FpWhere = substExpr(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpWhere) + pSrc = (*Select)(unsafe.Pointer(p)).FpSrc + + i = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc + pItem = pSrc + 8 /* &.a */ + __1: + if !(i > 0) { + goto __3 + } + { + substSelect(tls, pSubst, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect, 1) + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 { + substExprList(tls, pSubst, *(*uintptr)(unsafe.Pointer(pItem + 96))) + } + + } + goto __2 + __2: + i-- + pItem += 112 + goto __1 + goto __3 + __3: + } +} + +// pSelect is a SELECT statement and pSrcItem is one item in the FROM +// clause of that SELECT. +// +// This routine scans the entire SELECT statement and recomputes the +// pSrcItem->colUsed mask. +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ + var pItem uintptr + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { + return WRC_Continue + } + pItem = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + if (*SrcItem)(unsafe.Pointer(pItem)).FiCursor != (*Expr)(unsafe.Pointer(pExpr)).FiTable { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < 0 { + return WRC_Continue + } + *(*Bitmask)(unsafe.Pointer(pItem + 88)) |= Xsqlite3ExprColUsed(tls, pExpr) + return WRC_Continue +} + +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + if (*SrcItem)(unsafe.Pointer(pSrcItem)).FpTab == uintptr(0) { + return + } + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{recomputeColumnsUsedExpr})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = pSrcItem + (*SrcItem)(unsafe.Pointer(pSrcItem)).FcolUsed = uint64(0) + Xsqlite3WalkSelect(tls, bp, pSelect) +} + +// Assign new cursor numbers to each of the items in pSrc. For each +// new cursor number assigned, set an entry in the aCsrMap[] array +// to map the old cursor number to the new: +// +// aCsrMap[iOld+1] = iNew; +// +// The array is guaranteed by the caller to be large enough for all +// existing cursor numbers in pSrc. aCsrMap[0] is the array size. +// +// If pSrc contains any sub-selects, call this routine recursively +// on the FROM clause of each such sub-select, with iExcept set to -1. +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ + var i int32 + var pItem uintptr + i = 0 + pItem = pSrc + 8 /* &.a */ +__1: + if !(i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc) { + goto __3 + } + { + if i != iExcept { + var p uintptr + + if !(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x20>>5) != 0) || *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor+1)*4)) == 0 { + *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor+1)*4)) = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + } + (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor+1)*4)) + for p = (*SrcItem)(unsafe.Pointer(pItem)).FpSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { + srclistRenumberCursors(tls, pParse, aCsrMap, (*Select)(unsafe.Pointer(p)).FpSrc, -1) + } + } + + } + goto __2 +__2: + i++ + pItem += 112 + goto __1 + goto __3 +__3: +} + +// *piCursor is a cursor number. Change it if it needs to be mapped. +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ + var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) + if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { + *(*int32)(unsafe.Pointer(piCursor)) = *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) + } +} + +// Expression walker callback used by renumberCursors() to update +// Expr objects to match newly assigned cursor numbers. +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ + var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + if op == TK_COLUMN || op == TK_IF_NULL_ROW { + renumberCursorDoMapping(tls, pWalker, pExpr+44) + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { + renumberCursorDoMapping(tls, pWalker, pExpr+52) + } + return WRC_Continue +} + +// Assign a new cursor number to each cursor in the FROM clause (Select.pSrc) +// of the SELECT statement passed as the second argument, and to each +// cursor in the FROM clause of any FROM clause sub-selects, recursively. +// Except, do not assign a new cursor number to the iExcept'th element in +// the FROM clause of (*p). Update all expressions and other references +// to refer to the new cursor numbers. +// +// Argument aCsrMap is an array that may be used for temporary working +// space. Two guarantees are made by the caller: +// +// * the array is larger than the largest cursor number used within the +// select statement passed as an argument, and +// +// * the array entries for all cursor numbers that do *not* appear in +// FROM clauses of the select statement as described above are +// initialized to zero. +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + srclistRenumberCursors(tls, pParse, aCsrMap, (*Select)(unsafe.Pointer(p)).FpSrc, iExcept) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = aCsrMap + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{renumberCursorsCb})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + Xsqlite3WalkSelect(tls, bp, p) +} + +// This routine attempts to flatten subqueries as a performance optimization. +// This routine returns 1 if it makes changes and 0 if no flattening occurs. +// +// To understand the concept of flattening, consider the following +// query: +// +// SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5 +// +// The default way of implementing this query is to execute the +// subquery first and store the results in a temporary table, then +// run the outer query on that temporary table. This requires two +// passes over the data. Furthermore, because the temporary table +// has no indices, the WHERE clause on the outer query cannot be +// optimized. +// +// This routine attempts to rewrite queries such as the above into +// a single flat select, like this: +// +// SELECT x+y AS a FROM t1 WHERE z<100 AND a>5 +// +// The code generated for this simplification gives the same result +// but only has to scan the data once. And because indices might +// exist on the table t1, a complete scan of the data might be +// avoided. +// +// Flattening is subject to the following constraints: +// +// (**) We no longer attempt to flatten aggregate subqueries. Was: +// The subquery and the outer query cannot both be aggregates. +// +// (**) We no longer attempt to flatten aggregate subqueries. Was: +// (2) If the subquery is an aggregate then +// (2a) the outer query must not be a join and +// (2b) the outer query must not use subqueries +// other than the one FROM-clause subquery that is a candidate +// for flattening. (This is due to ticket [2f7170d73bf9abf80] +// from 2015-02-09.) +// +// (3) If the subquery is the right operand of a LEFT JOIN then +// (3a) the subquery may not be a join and +// (3b) the FROM clause of the subquery may not contain a virtual +// table and +// (3c) the outer query may not be an aggregate. +// (3d) the outer query may not be DISTINCT. +// +// (4) The subquery can not be DISTINCT. +// +// (**) At one point restrictions (4) and (5) defined a subset of DISTINCT +// sub-queries that were excluded from this optimization. Restriction +// (4) has since been expanded to exclude all DISTINCT subqueries. +// +// (**) We no longer attempt to flatten aggregate subqueries. Was: +// If the subquery is aggregate, the outer query may not be DISTINCT. +// +// (7) The subquery must have a FROM clause. TODO: For subqueries without +// A FROM clause, consider adding a FROM clause with the special +// table sqlite_once that consists of a single row containing a +// single NULL. +// +// (8) If the subquery uses LIMIT then the outer query may not be a join. +// +// (9) If the subquery uses LIMIT then the outer query may not be aggregate. +// +// (**) Restriction (10) was removed from the code on 2005-02-05 but we +// accidently carried the comment forward until 2014-09-15. Original +// constraint: "If the subquery is aggregate then the outer query +// may not use LIMIT." +// +// (11) The subquery and the outer query may not both have ORDER BY clauses. +// +// (**) Not implemented. Subsumed into restriction (3). Was previously +// a separate restriction deriving from ticket #350. +// +// (13) The subquery and outer query may not both use LIMIT. +// +// (14) The subquery may not use OFFSET. +// +// (15) If the outer query is part of a compound select, then the +// subquery may not use LIMIT. +// (See ticket #2339 and ticket [02a8e81d44]). +// +// (16) If the outer query is aggregate, then the subquery may not +// use ORDER BY. (Ticket #2942) This used to not matter +// until we introduced the group_concat() function. +// +// (17) If the subquery is a compound select, then +// (17a) all compound operators must be a UNION ALL, and +// (17b) no terms within the subquery compound may be aggregate +// or DISTINCT, and +// (17c) every term within the subquery compound must have a FROM clause +// (17d) the outer query may not be +// (17d1) aggregate, or +// (17d2) DISTINCT +// (17e) the subquery may not contain window functions, and +// (17f) the subquery must not be the RHS of a LEFT JOIN. +// +// The parent and sub-query may contain WHERE clauses. Subject to +// rules (11), (13) and (14), they may also contain ORDER BY, +// LIMIT and OFFSET clauses. The subquery cannot use any compound +// operator other than UNION ALL because all the other compound +// operators have an implied DISTINCT which is disallowed by +// restriction (4). +// +// Also, each component of the sub-query must return the same number +// of result columns. This is actually a requirement for any compound +// SELECT statement, but all the code here does is make sure that no +// such (illegal) sub-query is flattened. The caller will detect the +// syntax error and return a detailed message. +// +// (18) If the sub-query is a compound select, then all terms of the +// ORDER BY clause of the parent must be copies of a term returned +// by the parent query. +// +// (19) If the subquery uses LIMIT then the outer query may not +// have a WHERE clause. +// +// (20) If the sub-query is a compound select, then it must not use +// an ORDER BY clause. Ticket #3773. We could relax this constraint +// somewhat by saying that the terms of the ORDER BY clause must +// appear as unmodified result columns in the outer query. But we +// have other optimizations in mind to deal with that case. +// +// (21) If the subquery uses LIMIT then the outer query may not be +// DISTINCT. (See ticket [752e1646fc]). +// +// (22) The subquery may not be a recursive CTE. +// +// (23) If the outer query is a recursive CTE, then the sub-query may not be +// a compound query. This restriction is because transforming the +// parent to a compound query confuses the code that handles +// recursive queries in multiSelect(). +// +// (**) We no longer attempt to flatten aggregate subqueries. Was: +// The subquery may not be an aggregate that uses the built-in min() or +// or max() functions. (Without this restriction, a query like: +// "SELECT x FROM (SELECT max(y), x FROM t1)" would not necessarily +// return the value X for which Y was maximal.) +// +// (25) If either the subquery or the parent query contains a window +// function in the select list or ORDER BY clause, flattening +// is not attempted. +// +// +// In this routine, the "p" parameter is a pointer to the outer query. +// The subquery is p->pSrc->a[iFrom]. isAgg is true if the outer query +// uses aggregates. +// +// If flattening is not attempted, this routine is a no-op and returns 0. +// If flattening is attempted this routine returns 1. +// +// All of the expression analysis must occur on both the outer query and +// the subquery before this routine runs. +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext + var pParent uintptr // Current UNION ALL term of the other query + var pSub uintptr // The inner query or "subquery" + var pSub1 uintptr // Pointer to the rightmost select in sub-query + var pSrc uintptr // The FROM clause of the outer query + var pSubSrc uintptr // The FROM clause of the subquery + var iParent int32 // VDBE cursor number of the pSub result set temp table + var iNewParent int32 = -1 // Replacement table for iParent + var isLeftJoin int32 = 0 // True if pSub is the right side of a LEFT JOIN + var i int32 // Loop counter + var pWhere uintptr // The WHERE clause + var pSubitem uintptr // The subquery + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + // var w Walker at bp+32, 48 + // Walker to persist agginfo data + var aCsrMap uintptr = uintptr(0) + + // Check to see if flattening is permitted. Return 0 if not. + + if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_QueryFlattener) != U32(0) { + return 0 + } + pSrc = (*Select)(unsafe.Pointer(p)).FpSrc + + pSubitem = pSrc + 8 + uintptr(iFrom)*112 + iParent = (*SrcItem)(unsafe.Pointer(pSubitem)).FiCursor + pSub = (*SrcItem)(unsafe.Pointer(pSubitem)).FpSelect + + if (*Select)(unsafe.Pointer(p)).FpWin != 0 || (*Select)(unsafe.Pointer(pSub)).FpWin != 0 { + return 0 + } // Restriction (25) + + pSubSrc = (*Select)(unsafe.Pointer(pSub)).FpSrc + + // Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants, + // not arbitrary expressions, we allowed some combining of LIMIT and OFFSET + // because they could be computed at compile-time. But when LIMIT and OFFSET + // became arbitrary expressions, we were forced to add restrictions (13) + // and (14). + if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 { + return 0 + } // Restriction (13) + if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpLimit)).FpRight != 0 { + return 0 + } // Restriction (14) + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Compound) != U32(0) && (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 { + return 0 // Restriction (15) + } + if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc == 0 { + return 0 + } // Restriction (7) + if (*Select)(unsafe.Pointer(pSub)).FselFlags&U32(SF_Distinct) != 0 { + return 0 + } // Restriction (4) + if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && ((*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 || isAgg != 0) { + return 0 // Restrictions (8)(9) + } + if (*Select)(unsafe.Pointer(p)).FpOrderBy != 0 && (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { + return 0 // Restriction (11) + } + if isAgg != 0 && (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { + return 0 + } // Restriction (16) + if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FpWhere != 0 { + return 0 + } // Restriction (19) + if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0) { + return 0 // Restriction (21) + } + if (*Select)(unsafe.Pointer(pSub)).FselFlags&U32(SF_Recursive) != 0 { + return 0 // Restrictions (22) + } + + // If the subquery is the right operand of a LEFT JOIN, then the + // subquery may not be a join itself (3a). Example of why this is not + // allowed: + // + // t1 LEFT OUTER JOIN (t2 JOIN t3) + // + // If we flatten the above, we would get + // + // (t1 LEFT OUTER JOIN t2) JOIN t3 + // + // which is not at all the same thing. + // + // If the subquery is the right operand of a LEFT JOIN, then the outer + // query cannot be an aggregate. (3c) This is an artifact of the way + // aggregates are processed - there is no mechanism to determine if + // the LEFT JOIN table should be all-NULL. + // + // See also tickets #306, #350, and #3300. + if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_OUTER != 0 { + isLeftJoin = 1 + if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc > 1 || + isAgg != 0 || + int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSubSrc+8)).FpTab)).FeTabType) == TABTYP_VTAB || + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0) { + return 0 + } + } + + // Restriction (17): If the sub-query is a compound SELECT, then it must + // use only the UNION ALL operator. And none of the simple select queries + // that make up the compound SELECT are allowed to be aggregate or distinct + // queries. + if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { + return 0 // Restriction (20) + } + if isAgg != 0 || (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0) || isLeftJoin > 0 { + return 0 // (17d1), (17d2), or (17f) + } + for pSub1 = pSub; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + + if (*Select)(unsafe.Pointer(pSub1)).FselFlags&U32(SF_Distinct|SF_Aggregate) != U32(0) || + (*Select)(unsafe.Pointer(pSub1)).FpPrior != 0 && int32((*Select)(unsafe.Pointer(pSub1)).Fop) != TK_ALL || + (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpSrc)).FnSrc < 1 || + (*Select)(unsafe.Pointer(pSub1)).FpWin != 0 { + return 0 + } + + } + + // Restriction (18). + if (*Select)(unsafe.Pointer(p)).FpOrderBy != 0 { + var ii int32 + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy)).FnExpr; ii++ { + if int32(*(*U16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy + 8 + uintptr(ii)*32 + 24))) == 0 { + return 0 + } + } + } + + // Restriction (23) + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != 0 { + return 0 + } + + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { + if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { + return 0 + } + aCsrMap = Xsqlite3DbMallocZero(tls, db, uint64(I64((*Parse)(unsafe.Pointer(pParse)).FnTab)+int64(1))*uint64(unsafe.Sizeof(int32(0)))) + if aCsrMap != 0 { + *(*int32)(unsafe.Pointer(aCsrMap)) = (*Parse)(unsafe.Pointer(pParse)).FnTab + } + } + } + + //**** If we reach this point, flattening is permitted. **** + + // Authorize the subquery + (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = (*SrcItem)(unsafe.Pointer(pSubitem)).FzName + Xsqlite3AuthCheck(tls, pParse, SQLITE_SELECT, uintptr(0), uintptr(0), uintptr(0)) + + (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext + + // Delete the transient structures associated with thesubquery + pSub1 = (*SrcItem)(unsafe.Pointer(pSubitem)).FpSelect + Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pSubitem)).FzDatabase) + Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pSubitem)).FzName) + Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pSubitem)).FzAlias) + (*SrcItem)(unsafe.Pointer(pSubitem)).FzDatabase = uintptr(0) + (*SrcItem)(unsafe.Pointer(pSubitem)).FzName = uintptr(0) + (*SrcItem)(unsafe.Pointer(pSubitem)).FzAlias = uintptr(0) + (*SrcItem)(unsafe.Pointer(pSubitem)).FpSelect = uintptr(0) + + // If the sub-query is a compound SELECT statement, then (by restrictions + // 17 and 18 above) it must be a UNION ALL and the parent query must + // be of the form: + // + // SELECT FROM () + // + // followed by any ORDER BY, LIMIT and/or OFFSET clauses. This block + // creates N-1 copies of the parent query without any ORDER BY, LIMIT or + // OFFSET clauses and joins them to the left-hand-side of the original + // using UNION ALL operators. In this case N is the number of simple + // select statements in the compound sub-query. + // + // Example: + // + // SELECT a+1 FROM ( + // SELECT x FROM tab + // UNION ALL + // SELECT y FROM tab + // UNION ALL + // SELECT abs(z*2) FROM tab2 + // ) WHERE a!=5 ORDER BY 1 + // + // Transformed into: + // + // SELECT x+1 FROM tab WHERE x+1!=5 + // UNION ALL + // SELECT y+1 FROM tab WHERE y+1!=5 + // UNION ALL + // SELECT abs(z*2)+1 FROM tab2 WHERE abs(z*2)+1!=5 + // ORDER BY 1 + // + // We call this the "compound-subquery flattening". + for pSub = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub != 0; pSub = (*Select)(unsafe.Pointer(pSub)).FpPrior { + var pNew uintptr + var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy + var pLimit uintptr = (*Select)(unsafe.Pointer(p)).FpLimit + var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior + var pItemTab uintptr = (*SrcItem)(unsafe.Pointer(pSubitem)).FpTab + (*SrcItem)(unsafe.Pointer(pSubitem)).FpTab = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) + pNew = Xsqlite3SelectDup(tls, db, p, 0) + (*Select)(unsafe.Pointer(p)).FpLimit = pLimit + (*Select)(unsafe.Pointer(p)).FpOrderBy = pOrderBy + (*Select)(unsafe.Pointer(p)).Fop = U8(TK_ALL) + (*SrcItem)(unsafe.Pointer(pSubitem)).FpTab = pItemTab + if pNew == uintptr(0) { + (*Select)(unsafe.Pointer(p)).FpPrior = pPrior + } else { + (*Select)(unsafe.Pointer(pNew)).FselId = U32(libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnSelect, 1)) + if aCsrMap != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { + renumberCursors(tls, pParse, pNew, iFrom, aCsrMap) + } + (*Select)(unsafe.Pointer(pNew)).FpPrior = pPrior + if pPrior != 0 { + (*Select)(unsafe.Pointer(pPrior)).FpNext = pNew + } + (*Select)(unsafe.Pointer(pNew)).FpNext = p + (*Select)(unsafe.Pointer(p)).FpPrior = pNew + + } + + } + Xsqlite3DbFree(tls, db, aCsrMap) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*SrcItem)(unsafe.Pointer(pSubitem)).FpSelect = pSub1 + return 1 + } + + // Defer deleting the Table object associated with the + // subquery until code generation is + // complete, since there may still exist Expr.pTab entries that + // refer to the subquery even after flattening. Ticket #3346. + // + // pSubitem->pTab is always non-NULL by test restrictions and tests above. + if (*SrcItem)(unsafe.Pointer(pSubitem)).FpTab != uintptr(0) { + var pTabToDel uintptr = (*SrcItem)(unsafe.Pointer(pSubitem)).FpTab + if (*Table)(unsafe.Pointer(pTabToDel)).FnTabRef == U32(1) { + var pToplevel uintptr = func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }() + Xsqlite3ParserAddCleanup(tls, pToplevel, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3DeleteTable})), + pTabToDel) + + } else { + (*Table)(unsafe.Pointer(pTabToDel)).FnTabRef-- + } + (*SrcItem)(unsafe.Pointer(pSubitem)).FpTab = uintptr(0) + } + + // The following loop runs once for each term in a compound-subquery + // flattening (as described above). If we are doing a different kind + // of flattening - a flattening other than a compound-subquery flattening - + // then this loop only runs once. + // + // This loop moves all of the FROM elements of the subquery into the + // the FROM clause of the outer query. Before doing this, remember + // the cursor number for the original outer query FROM element in + // iParent. The iParent cursor will never be used. Subsequent code + // will scan expressions looking for iParent references and replace + // those references with expressions that resolve to the subquery FROM + // elements we are now copying in. + pSub = pSub1 + pParent = p +__1: + if !(pParent != 0) { + goto __3 + } + { + var nSubSrc int32 + var jointype U8 = U8(0) + + pSubSrc = (*Select)(unsafe.Pointer(pSub)).FpSrc // FROM clause of subquery + nSubSrc = (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc // Number of terms in subquery FROM clause + pSrc = (*Select)(unsafe.Pointer(pParent)).FpSrc // FROM clause of the outer query + + if pParent == p { + jointype = (*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype // First time through the loop + } + + // The subquery uses a single slot of the FROM clause of the outer + // query. If the subquery has more than one element in its FROM clause, + // then expand the outer query to make space for it to hold all elements + // of the subquery. + // + // Example: + // + // SELECT * FROM tabA, (SELECT * FROM sub1, sub2), tabB; + // + // The outer query has 3 slots in its FROM clause. One slot of the + // outer query (the middle slot) is used by the subquery. The next + // block of code will expand the outer query FROM clause to 4 slots. + // The middle slot is expanded to two slots in order to make space + // for the two elements in the FROM clause of the subquery. + if nSubSrc > 1 { + pSrc = Xsqlite3SrcListEnlarge(tls, pParse, pSrc, nSubSrc-1, iFrom+1) + if pSrc == uintptr(0) { + goto __3 + } + (*Select)(unsafe.Pointer(pParent)).FpSrc = pSrc + } + + // Transfer the FROM clause terms from the subquery into the + // outer query. + for i = 0; i < nSubSrc; i++ { + Xsqlite3IdListDelete(tls, db, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i+iFrom)*112)).FpUsing) + + *(*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i+iFrom)*112)) = *(*SrcItem)(unsafe.Pointer(pSubSrc + 8 + uintptr(i)*112)) + iNewParent = (*SrcItem)(unsafe.Pointer(pSubSrc + 8 + uintptr(i)*112)).FiCursor + libc.Xmemset(tls, pSubSrc+8+uintptr(i)*112, 0, uint64(unsafe.Sizeof(SrcItem{}))) + } + (*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(iFrom)*112)).Ffg.Fjointype = jointype + + // Now begin substituting subquery result set expressions for + // references to the iParent in the outer query. + // + // Example: + // + // SELECT a+5, b*10 FROM (SELECT x*3 AS a, y+10 AS b FROM t1) WHERE a>b; + // \ \_____________ subquery __________/ / + // \_____________________ outer query ______________________________/ + // + // We look at every expression in the outer query and every place we see + // "a" we substitute "x*3" and every place we see "b" we substitute "y+10". + if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 && (*Select)(unsafe.Pointer(pParent)).FselFlags&U32(SF_NoopOrderBy) == U32(0) { + // At this point, any non-zero iOrderByCol values indicate that the + // ORDER BY column expression is identical to the iOrderByCol'th + // expression returned by SELECT statement pSub. Since these values + // do not necessarily correspond to columns in SELECT statement pParent, + // zero them before transfering the ORDER BY clause. + // + // Not doing this may cause an error if a subsequent call to this + // function attempts to flatten a compound sub-query into pParent + // (the only way this can happen is if the compound sub-query is + // currently part of pSub->pSrc). See ticket [d11a6e908f]. + var pOrderBy uintptr = (*Select)(unsafe.Pointer(pSub)).FpOrderBy + for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { + *(*U16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 24)) = U16(0) + } + + (*Select)(unsafe.Pointer(pParent)).FpOrderBy = pOrderBy + (*Select)(unsafe.Pointer(pSub)).FpOrderBy = uintptr(0) + } + pWhere = (*Select)(unsafe.Pointer(pSub)).FpWhere + (*Select)(unsafe.Pointer(pSub)).FpWhere = uintptr(0) + if isLeftJoin > 0 { + Xsqlite3SetJoinExpr(tls, pWhere, iNewParent) + } + if pWhere != 0 { + if (*Select)(unsafe.Pointer(pParent)).FpWhere != 0 { + (*Select)(unsafe.Pointer(pParent)).FpWhere = Xsqlite3PExpr(tls, pParse, TK_AND, pWhere, (*Select)(unsafe.Pointer(pParent)).FpWhere) + } else { + (*Select)(unsafe.Pointer(pParent)).FpWhere = pWhere + } + } + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { + // var x SubstContext at bp, 32 + + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FpParse = pParse + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FiTable = iParent + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FiNewTable = iNewParent + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FisLeftJoin = isLeftJoin + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + substSelect(tls, bp, pParent, 0) + } + + // The flattened query is a compound if either the inner or the + // outer query is a compound. + *(*U32)(unsafe.Pointer(pParent + 4)) |= (*Select)(unsafe.Pointer(pSub)).FselFlags & U32(SF_Compound) + // restriction (17b) + + // SELECT ... FROM (SELECT ... LIMIT a OFFSET b) LIMIT x OFFSET y; + // + // One is tempted to try to add a and b to combine the limits. But this + // does not work if either limit is negative. + if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 { + (*Select)(unsafe.Pointer(pParent)).FpLimit = (*Select)(unsafe.Pointer(pSub)).FpLimit + (*Select)(unsafe.Pointer(pSub)).FpLimit = uintptr(0) + } + + // Recompute the SrcList_item.colUsed masks for the flattened + // tables. + for i = 0; i < nSubSrc; i++ { + recomputeColumnsUsed(tls, pParent, pSrc+8+uintptr(i+iFrom)*112) + } + + } + goto __2 +__2: + pParent = (*Select)(unsafe.Pointer(pParent)).FpPrior + pSub = (*Select)(unsafe.Pointer(pSub)).FpPrior + goto __1 + goto __3 +__3: + ; + + // Finially, delete what is left of the subquery and return + // success. + Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) + Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3SelectDelete(tls, db, pSub1) + + return 1 +} + +// A structure to keep track of all of the column values that are fixed to +// a known value due to WHERE clause constraints of the form COLUMN=VALUE. +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ + +// Add a new entry to the pConst object. Except, do not add duplicate +// pColumn entires. Also, do not add if doing so would not be appropriate. +// +// The caller guarantees the pColumn is a column and pValue is a constant. +// This routine has to do some additional checks before completing the +// insert. +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ + var i int32 + + if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { + return + } + if int32(Xsqlite3ExprAffinity(tls, pValue)) != 0 { + return + } + if !(Xsqlite3IsBinary(tls, Xsqlite3ExprCompareCollSeq(tls, (*WhereConst)(unsafe.Pointer(pConst)).FpParse, pExpr)) != 0) { + return + } + + // 2018-10-25 ticket [cf5ed20f] + // Make sure the same pColumn is not inserted more than once + for i = 0; i < (*WhereConst)(unsafe.Pointer(pConst)).FnConst; i++ { + var pE2 uintptr = *(*uintptr)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr(i*2)*8)) + + if (*Expr)(unsafe.Pointer(pE2)).FiTable == (*Expr)(unsafe.Pointer(pColumn)).FiTable && + int32((*Expr)(unsafe.Pointer(pE2)).FiColumn) == int32((*Expr)(unsafe.Pointer(pColumn)).FiColumn) { + return // Already present. Return without doing anything. + } + } + if int32(Xsqlite3ExprAffinity(tls, pColumn)) == SQLITE_AFF_BLOB { + (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob = 1 + } + + (*WhereConst)(unsafe.Pointer(pConst)).FnConst++ + (*WhereConst)(unsafe.Pointer(pConst)).FapExpr = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, (*WhereConst)(unsafe.Pointer(pConst)).FapExpr, + uint64(uint64((*WhereConst)(unsafe.Pointer(pConst)).FnConst*2)*uint64(unsafe.Sizeof(uintptr(0))))) + if (*WhereConst)(unsafe.Pointer(pConst)).FapExpr == uintptr(0) { + (*WhereConst)(unsafe.Pointer(pConst)).FnConst = 0 + } else { + *(*uintptr)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr((*WhereConst)(unsafe.Pointer(pConst)).FnConst*2-2)*8)) = pColumn + *(*uintptr)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr((*WhereConst)(unsafe.Pointer(pConst)).FnConst*2-1)*8)) = pValue + } +} + +// Find all terms of COLUMN=VALUE or VALUE=COLUMN in pExpr where VALUE +// is a constant expression and where the term must be true because it +// is part of the AND-connected terms of the expression. For each term +// found, add it to the pConst structure. +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ + var pRight uintptr + var pLeft uintptr + if pExpr == uintptr(0) { + return + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { + return + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND { + findConstInWhere(tls, pConst, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + findConstInWhere(tls, pConst, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + return + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_EQ { + return + } + pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight + pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + + if int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && Xsqlite3ExprIsConstant(tls, pLeft) != 0 { + constInsert(tls, pConst, pRight, pLeft, pExpr) + } + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && Xsqlite3ExprIsConstant(tls, pRight) != 0 { + constInsert(tls, pConst, pLeft, pRight, pExpr) + } +} + +// This is a helper function for Walker callback propagateConstantExprRewrite(). +// +// Argument pExpr is a candidate expression to be replaced by a value. If +// pExpr is equivalent to one of the columns named in pWalker->u.pConst, +// then overwrite it with the corresponding value. Except, do not do so +// if argument bIgnoreAffBlob is non-zero and the affinity of pExpr +// is SQLITE_AFF_BLOB. +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ + var i int32 + if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { + return WRC_Prune + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol|EP_FromJoin) != U32(0) { + + return WRC_Continue + } + for i = 0; i < (*WhereConst)(unsafe.Pointer(pConst)).FnConst; i++ { + var pColumn uintptr = *(*uintptr)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr(i*2)*8)) + if pColumn == pExpr { + continue + } + if (*Expr)(unsafe.Pointer(pColumn)).FiTable != (*Expr)(unsafe.Pointer(pExpr)).FiTable { + continue + } + if int32((*Expr)(unsafe.Pointer(pColumn)).FiColumn) != int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + continue + } + if bIgnoreAffBlob != 0 && int32(Xsqlite3ExprAffinity(tls, pColumn)) == SQLITE_AFF_BLOB { + break + } + // A match is found. Add the EP_FixedCol property + (*WhereConst)(unsafe.Pointer(pConst)).FnChng++ + *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Leaf)) + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_FixedCol) + + (*Expr)(unsafe.Pointer(pExpr)).FpLeft = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, *(*uintptr)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr(i*2+1)*8)), 0) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb)).FmallocFailed != 0 { + return WRC_Prune + } + break + } + return WRC_Prune +} + +// This is a Walker expression callback. pExpr is a node from the WHERE +// clause of a SELECT statement. This function examines pExpr to see if +// any substitutions based on the contents of pWalker->u.pConst should +// be made to pExpr or its immediate children. +// +// A substitution is made if: +// +// + pExpr is a column with an affinity other than BLOB that matches +// one of the columns in pWalker->u.pConst, or +// +// + pExpr is a binary comparison operator (=, <=, >=, <, >) that +// uses an affinity other than TEXT and one of its immediate +// children is a column that matches one of the columns in +// pWalker->u.pConst. +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ + var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + + if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) >= TK_EQ && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) <= TK_GE || + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IS { + propagateConstantExprRewriteOne(tls, pConst, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, 0) + if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { + return WRC_Prune + } + if int32(Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)) != SQLITE_AFF_TEXT { + propagateConstantExprRewriteOne(tls, pConst, (*Expr)(unsafe.Pointer(pExpr)).FpRight, 0) + } + } + } + return propagateConstantExprRewriteOne(tls, pConst, pExpr, (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob) +} + +// The WHERE-clause constant propagation optimization. +// +// If the WHERE clause contains terms of the form COLUMN=CONSTANT or +// CONSTANT=COLUMN that are top-level AND-connected terms that are not +// part of a ON clause from a LEFT JOIN, then throughout the query +// replace all other occurrences of COLUMN with CONSTANT. +// +// For example, the query: +// +// SELECT * FROM t1, t2, t3 WHERE t1.a=39 AND t2.b=t1.a AND t3.c=t2.b +// +// Is transformed into +// +// SELECT * FROM t1, t2, t3 WHERE t1.a=39 AND t2.b=39 AND t3.c=39 +// +// Return true if any transformations where made and false if not. +// +// Implementation note: Constant propagation is tricky due to affinity +// and collating sequence interactions. Consider this example: +// +// CREATE TABLE t1(a INT,b TEXT); +// INSERT INTO t1 VALUES(123,'0123'); +// SELECT * FROM t1 WHERE a=123 AND b=a; +// SELECT * FROM t1 WHERE a=123 AND b=123; +// +// The two SELECT statements above should return different answers. b=a +// is alway true because the comparison uses numeric affinity, but b=123 +// is false because it uses text affinity and '0123' is not the same as '123'. +// To work around this, the expression tree is not actually changed from +// "b=a" to "b=123" but rather the "a" in "b=a" is tagged with EP_FixedCol +// and the "123" value is hung off of the pLeft pointer. Code generator +// routines know to generate the constant "123" instead of looking up the +// column value. Also, to avoid collation problems, this optimization is +// only attempted if the "a=123" term uses the default BINARY collation. +// +// 2021-05-25 forum post 6a06202608: Another troublesome case is... +// +// CREATE TABLE t1(x); +// INSERT INTO t1 VALUES(10.0); +// SELECT 1 FROM t1 WHERE x=10 AND x LIKE 10; +// +// The query should return no rows, because the t1.x value is '10.0' not '10' +// and '10.0' is not LIKE '10'. But if we are not careful, the first WHERE +// term "x=10" will cause the second WHERE term to become "10 LIKE 10", +// resulting in a false positive. To avoid this, constant propagation for +// columns with BLOB affinity is only allowed if the constant is used with +// operators ==, <=, <, >=, >, or IS in a way that will cause the correct +// type conversions to occur. See logic associated with the bHasAffBlob flag +// for details. +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + // var x WhereConst at bp, 40 + + // var w Walker at bp+40, 48 + + var nChng int32 = 0 + (*WhereConst)(unsafe.Pointer(bp /* &x */)).FpParse = pParse + (*WhereConst)(unsafe.Pointer(bp /* &x */)).FpOomFault = (*Parse)(unsafe.Pointer(pParse)).Fdb + 103 + for __ccgo := true; __ccgo; __ccgo = (*WhereConst)(unsafe.Pointer(bp)).FnChng != 0 { + (*WhereConst)(unsafe.Pointer(bp /* &x */)).FnConst = 0 + (*WhereConst)(unsafe.Pointer(bp /* &x */)).FnChng = 0 + (*WhereConst)(unsafe.Pointer(bp /* &x */)).FapExpr = uintptr(0) + (*WhereConst)(unsafe.Pointer(bp /* &x */)).FbHasAffBlob = 0 + findConstInWhere(tls, bp, (*Select)(unsafe.Pointer(p)).FpWhere) + if (*WhereConst)(unsafe.Pointer(bp)).FnConst != 0 { + libc.Xmemset(tls, bp+40, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FpParse = pParse + (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{propagateConstantExprRewrite})) + (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FxSelectCallback2 = uintptr(0) + (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FwalkerDepth = 0 + *(*uintptr)(unsafe.Pointer(bp + 40 + 40)) = bp /* &x */ + Xsqlite3WalkExpr(tls, bp+40, (*Select)(unsafe.Pointer(p)).FpWhere) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(bp /* &x */)).FpParse)).Fdb, (*WhereConst)(unsafe.Pointer(bp /* &x */)).FapExpr) + nChng = nChng + (*WhereConst)(unsafe.Pointer(bp)).FnChng + } + } + return nChng +} + +// This function is called to determine whether or not it is safe to +// push WHERE clause expression pExpr down to FROM clause sub-query +// pSubq, which contains at least one window function. Return 1 +// if it is safe and the expression should be pushed down, or 0 +// otherwise. +// +// It is only safe to push the expression down if it consists only +// of constants and copies of expressions that appear in the PARTITION +// BY clause of all window function used by the sub-query. It is safe +// to filter out entire partitions, but not rows within partitions, as +// this may change the results of the window functions. +// +// At the time this function is called it is guaranteed that +// +// * the sub-query uses only one distinct window frame, and +// * that the window frame has a PARTITION BY clase. +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ + + return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) +} + +// Make copies of relevant WHERE clause terms of the outer query into +// the WHERE clause of subquery. Example: +// +// SELECT * FROM (SELECT a AS x, c-d AS y FROM t1) WHERE x=5 AND y=10; +// +// Transformed into: +// +// SELECT * FROM (SELECT a AS x, c-d AS y FROM t1 WHERE a=5 AND c-d=10) +// WHERE x=5 AND y=10; +// +// The hope is that the terms added to the inner query will make it more +// efficient. +// +// Do not attempt this optimization if: +// +// (1) (** This restriction was removed on 2017-09-29. We used to +// disallow this optimization for aggregate subqueries, but now +// it is allowed by putting the extra terms on the HAVING clause. +// The added HAVING clause is pointless if the subquery lacks +// a GROUP BY clause. But such a HAVING clause is also harmless +// so there does not appear to be any reason to add extra logic +// to suppress it. **) +// +// (2) The inner query is the recursive part of a common table expression. +// +// (3) The inner query has a LIMIT clause (since the changes to the WHERE +// clause would change the meaning of the LIMIT). +// +// (4) The inner query is the right operand of a LEFT JOIN and the +// expression to be pushed down does not come from the ON clause +// on that LEFT JOIN. +// +// (5) The WHERE clause expression originates in the ON or USING clause +// of a LEFT JOIN where iCursor is not the right-hand table of that +// left join. An example: +// +// SELECT * +// FROM (SELECT 1 AS a1 UNION ALL SELECT 2) AS aa +// JOIN (SELECT 1 AS b2 UNION ALL SELECT 2) AS bb ON (a1=b2) +// LEFT JOIN (SELECT 8 AS c3 UNION ALL SELECT 9) AS cc ON (b2=2); +// +// The correct answer is three rows: (1,1,NULL),(2,2,8),(2,2,9). +// But if the (b2=2) term were to be pushed down into the bb subquery, +// then the (1,1,NULL) row would be suppressed. +// +// (6) Window functions make things tricky as changes to the WHERE clause +// of the inner query could change the window over which window +// functions are calculated. Therefore, do not attempt the optimization +// if: +// +// (6a) The inner query uses multiple incompatible window partitions. +// +// (6b) The inner query is a compound and uses window-functions. +// +// (6c) The WHERE clause does not consist entirely of constants and +// copies of expressions found in the PARTITION BY clause of +// all window-functions used by the sub-query. It is safe to +// filter out entire partitions, as this does not change the +// window over which any window-function is calculated. +// +// (7) The inner query is a Common Table Expression (CTE) that should +// be materialized. (This restriction is implemented in the calling +// routine.) +// +// Return 0 if no changes are made and non-zero if one or more WHERE clause +// terms are duplicated into the subquery. +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pNew uintptr + var nChng int32 = 0 + if pWhere == uintptr(0) { + return 0 + } + if (*Select)(unsafe.Pointer(pSubq)).FselFlags&U32(SF_Recursive|SF_MultiPart) != 0 { + return 0 + } + + if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { + var pSel uintptr + for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { + return 0 + } // restriction (6b) + } + } else { + if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition == uintptr(0) { + return 0 + } + } + + if (*Select)(unsafe.Pointer(pSubq)).FpLimit != uintptr(0) { + return 0 // restriction (3) + } + for int32((*Expr)(unsafe.Pointer(pWhere)).Fop) == TK_AND { + nChng = nChng + pushDownWhereTerms(tls, pParse, pSubq, (*Expr)(unsafe.Pointer(pWhere)).FpRight, + iCursor, isLeftJoin) + pWhere = (*Expr)(unsafe.Pointer(pWhere)).FpLeft + } + if isLeftJoin != 0 && + (libc.Bool32((*Expr)(unsafe.Pointer(pWhere)).Fflags&U32(EP_FromJoin) != U32(0)) == 0 || + *(*int32)(unsafe.Pointer(pWhere + 52)) != iCursor) { + return 0 // restriction (4) + } + if (*Expr)(unsafe.Pointer(pWhere)).Fflags&U32(EP_FromJoin) != U32(0) && + *(*int32)(unsafe.Pointer(pWhere + 52)) != iCursor { + return 0 // restriction (5) + } + if Xsqlite3ExprIsTableConstant(tls, pWhere, iCursor) != 0 { + nChng++ + *(*U32)(unsafe.Pointer(pSubq + 4)) |= U32(SF_PushDown) + for pSubq != 0 { + // var x SubstContext at bp, 32 + + pNew = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWhere, 0) + unsetJoinExpr(tls, pNew, -1) + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FpParse = pParse + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FiTable = iCursor + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FiNewTable = iCursor + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FisLeftJoin = 0 + (*SubstContext)(unsafe.Pointer(bp /* &x */)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + pNew = substExpr(tls, bp, pNew) + if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { + // Restriction 6c has prevented push-down in this case + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) + nChng-- + break + } + if (*Select)(unsafe.Pointer(pSubq)).FselFlags&U32(SF_Aggregate) != 0 { + (*Select)(unsafe.Pointer(pSubq)).FpHaving = Xsqlite3ExprAnd(tls, pParse, (*Select)(unsafe.Pointer(pSubq)).FpHaving, pNew) + } else { + (*Select)(unsafe.Pointer(pSubq)).FpWhere = Xsqlite3ExprAnd(tls, pParse, (*Select)(unsafe.Pointer(pSubq)).FpWhere, pNew) + } + pSubq = (*Select)(unsafe.Pointer(pSubq)).FpPrior + } + } + return nChng +} + +// The pFunc is the only aggregate function in the query. Check to see +// if the query is a candidate for the min/max optimization. +// +// If the query is a candidate for the min/max optimization, then set +// *ppMinMax to be an ORDER BY clause to be used for the optimization +// and return either WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX depending on +// whether pFunc is a min() or max() function. +// +// If the query is not a candidate for the min/max optimization, return +// WHERE_ORDERBY_NORMAL (which must be zero). +// +// This routine must be called after aggregate functions have been +// located but before their arguments have been subjected to aggregate +// analysis. +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ + var eRet int32 = WHERE_ORDERBY_NORMAL // Return value + var pEList uintptr // Arguments to agg function + var zFunc uintptr // Name of aggregate function pFunc + var pOrderBy uintptr + var sortFlags U8 = U8(0) + + pEList = *(*uintptr)(unsafe.Pointer(pFunc + 32)) + if pEList == uintptr(0) || + (*ExprList)(unsafe.Pointer(pEList)).FnExpr != 1 || + (*Expr)(unsafe.Pointer(pFunc)).Fflags&U32(EP_WinFunc) != U32(0) || + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_MinMaxOpt) != U32(0) { + return U8(eRet) + } + + zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) + if Xsqlite3StrICmp(tls, zFunc, ts+15059) == 0 { + eRet = WHERE_ORDERBY_MIN + if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { + sortFlags = U8(KEYINFO_ORDER_BIGNULL) + } + } else if Xsqlite3StrICmp(tls, zFunc, ts+15063) == 0 { + eRet = WHERE_ORDERBY_MAX + sortFlags = U8(KEYINFO_ORDER_DESC) + } else { + return U8(eRet) + } + *(*uintptr)(unsafe.Pointer(ppMinMax)) = libc.AssignUintptr(&pOrderBy, Xsqlite3ExprListDup(tls, db, pEList, 0)) + + if pOrderBy != 0 { + (*ExprList_item)(unsafe.Pointer(pOrderBy + 8)).FsortFlags = sortFlags + } + return U8(eRet) +} + +// The select statement passed as the first argument is an aggregate query. +// The second argument is the associated aggregate-info object. This +// function tests if the SELECT is of the form: +// +// SELECT count(*) FROM +// +// where table is a database table, not a sub-select or view. If the query +// does match this pattern, then a pointer to the Table object representing +// is returned. Otherwise, NULL is returned. +// +// This routine checks to see if it is safe to use the count optimization. +// A correct answer is still obtained (though perhaps more slowly) if +// this routine returns NULL when it could have returned a table pointer. +// But returning the pointer when NULL should have been returned can +// result in incorrect answers and/or crashes. So, when in doubt, return NULL. +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ + var pTab uintptr + var pExpr uintptr + + if (*Select)(unsafe.Pointer(p)).FpWhere != 0 || + (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr != 1 || + (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc != 1 || + (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc+8)).FpSelect != 0 || + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc != 1 { + return uintptr(0) + } + pTab = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpTab + + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + return uintptr(0) + } + pExpr = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList + 8)).FpExpr + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { + return uintptr(0) + } + if (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != pAggInfo { + return uintptr(0) + } + if (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_COUNT) == U32(0) { + return uintptr(0) + } + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Distinct|EP_WinFunc) != U32(0) { + return uintptr(0) + } + + return pTab +} + +// If the source-list item passed as an argument was augmented with an +// INDEXED BY clause, then try to locate the specified index. If there +// was such a clause and the named index cannot be found, return +// SQLITE_ERROR and leave an error in pParse. Otherwise, populate +// pFrom->pIndex and return SQLITE_OK. +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpTab + var zIndexedBy uintptr = *(*uintptr)(unsafe.Pointer(pFrom + 96)) + var pIdx uintptr + + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + } + if !(pIdx != 0) { + Xsqlite3ErrorMsg(tls, pParse, ts+18991, libc.VaList(bp, zIndexedBy, 0)) + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + return SQLITE_ERROR + } + + *(*uintptr)(unsafe.Pointer(pFrom + 104)) = pIdx + return SQLITE_OK +} + +// Detect compound SELECT statements that use an ORDER BY clause with +// an alternative collating sequence. +// +// SELECT ... FROM t1 EXCEPT SELECT ... FROM t2 ORDER BY .. COLLATE ... +// +// These are rewritten as a subquery: +// +// SELECT * FROM (SELECT ... FROM t1 EXCEPT SELECT ... FROM t2) +// ORDER BY ... COLLATE ... +// +// This transformation is necessary because the multiSelectOrderBy() routine +// above that generates the code for a compound SELECT with an ORDER BY clause +// uses a merge algorithm that requires the same collating sequence on the +// result columns as on the ORDER BY clause. See ticket +// http://www.sqlite.org/src/info/6709574d2a +// +// This transformation is only needed for EXCEPT, INTERSECT, and UNION. +// The UNION ALL operator works fine with multiSelectOrderBy() even when +// there are COLLATE terms in the ORDER BY. +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var i int32 + var pNew uintptr + var pX uintptr + var db uintptr + var a uintptr + var pNewSrc uintptr + var pParse uintptr + // var dummy Token at bp, 16 + + if (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { + return WRC_Continue + } + if (*Select)(unsafe.Pointer(p)).FpOrderBy == uintptr(0) { + return WRC_Continue + } + for pX = p; pX != 0 && (int32((*Select)(unsafe.Pointer(pX)).Fop) == TK_ALL || int32((*Select)(unsafe.Pointer(pX)).Fop) == TK_SELECT); pX = (*Select)(unsafe.Pointer(pX)).FpPrior { + } + if pX == uintptr(0) { + return WRC_Continue + } + a = (*Select)(unsafe.Pointer(p)).FpOrderBy + 8 /* &.a */ + // If iOrderByCol is already non-zero, then it has already been matched + // to a result column of the SELECT statement. This occurs when the + // SELECT is rewritten for window-functions processing and then passed + // to sqlite3SelectPrep() and similar a second time. The rewriting done + // by this function is not required in this case. + if *(*U16)(unsafe.Pointer(a + 24)) != 0 { + return WRC_Continue + } + for i = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy)).FnExpr - 1; i >= 0; i-- { + if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(a+uintptr(i)*32)).FpExpr)).Fflags&U32(EP_Collate) != 0 { + break + } + } + if i < 0 { + return WRC_Continue + } + + // If we reach this point, that means the transformation is required. + + pParse = (*Walker)(unsafe.Pointer(pWalker)).FpParse + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Select{}))) + if pNew == uintptr(0) { + return WRC_Abort + } + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Token{}))) + pNewSrc = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp, pNew, uintptr(0), uintptr(0)) + if pNewSrc == uintptr(0) { + return WRC_Abort + } + *(*Select)(unsafe.Pointer(pNew)) = *(*Select)(unsafe.Pointer(p)) + (*Select)(unsafe.Pointer(p)).FpSrc = pNewSrc + (*Select)(unsafe.Pointer(p)).FpEList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), Xsqlite3Expr(tls, db, TK_ASTERISK, uintptr(0))) + (*Select)(unsafe.Pointer(p)).Fop = U8(TK_SELECT) + (*Select)(unsafe.Pointer(p)).FpWhere = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpGroupBy = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpHaving = uintptr(0) + (*Select)(unsafe.Pointer(pNew)).FpOrderBy = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpNext = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpWith = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpWinDefn = uintptr(0) + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_Compound)) + + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_Converted) + + (*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(pNew)).FpPrior)).FpNext = pNew + (*Select)(unsafe.Pointer(pNew)).FpLimit = uintptr(0) + return WRC_Continue +} + +// Check to see if the FROM clause term pFrom has table-valued function +// arguments. If it does, leave an error message in pParse and return +// non-zero, since pFrom is not allowed to be a table-valued function. +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+19009, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + return 1 + } + return 0 +} + +// Argument pWith (which may be NULL) points to a linked list of nested +// WITH contexts, from inner to outermost. If the table identified by +// FROM clause element pItem is really a common-table-expression (CTE) +// then return a pointer to the CTE definition for that table. Otherwise +// return NULL. +// +// If a non-NULL value is returned, set *ppContext to point to the With +// object that the returned CTE belongs to. +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ + var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName + var p uintptr + + for p = pWith; p != 0; p = (*With)(unsafe.Pointer(p)).FpOuter { + var i int32 + for i = 0; i < (*With)(unsafe.Pointer(p)).FnCte; i++ { + if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(p+16+uintptr(i)*48)).FzName) == 0 { + *(*uintptr)(unsafe.Pointer(ppContext)) = p + return p + 16 + uintptr(i)*48 + } + } + if (*With)(unsafe.Pointer(p)).FbView != 0 { + break + } + } + return uintptr(0) +} + +// The code generator maintains a stack of active WITH clauses +// with the inner-most WITH clause being at the top of the stack. +// +// This routine pushes the WITH clause passed as the second argument +// onto the top of the stack. If argument bFree is true, then this +// WITH clause will never be popped from the stack but should instead +// be freed along with the Parse object. In other cases, when +// bFree==0, the With object will be freed along with the SELECT +// statement with which it is associated. +// +// This routine returns a copy of pWith. Or, if bFree is true and +// the pWith object is destroyed immediately due to an OOM condition, +// then this routine return NULL. +// +// If bFree is true, do not continue to use the pWith pointer after +// calling this routine, Instead, use only the return value. +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ + if pWith != 0 { + if bFree != 0 { + pWith = Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3WithDelete})), + pWith) + if pWith == uintptr(0) { + return uintptr(0) + } + } + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { + + (*With)(unsafe.Pointer(pWith)).FpOuter = (*Parse)(unsafe.Pointer(pParse)).FpWith + (*Parse)(unsafe.Pointer(pParse)).FpWith = pWith + } + } + return pWith +} + +// This function checks if argument pFrom refers to a CTE declared by +// a WITH clause on the stack currently maintained by the parser (on the +// pParse->pWith linked list). And if currently processing a CTE +// CTE expression, through routine checks to see if the reference is +// a recursive reference to the CTE. +// +// If pFrom matches a CTE according to either of these two above, pFrom->pTab +// and other fields are populated accordingly. +// +// Return 0 if no match is found. +// Return 1 if a match is found. +// Return 2 if an error condition is detected. +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var pCte uintptr // Matched CTE (or NULL if no match) + // var pWith uintptr at bp+48, 8 + // The matching WITH + + if (*Parse)(unsafe.Pointer(pParse)).FpWith == uintptr(0) { + // There are no WITH clauses in the stack. No match is possible + return 0 + } + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + // Prior errors might have left pParse->pWith in a goofy state, so + // go no further. + return 0 + } + if (*SrcItem)(unsafe.Pointer(pFrom)).FzDatabase != uintptr(0) { + // The FROM term contains a schema qualifier (ex: main.t1) and so + // it cannot possibly be a CTE reference. + return 0 + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x100>>8)) != 0 { + // The FROM term is specifically excluded from matching a CTE. + // (1) It is part of a trigger that used to have zDatabase but had + // zDatabase removed by sqlite3FixTriggerStep(). + // (2) This is the first term in the FROM clause of an UPDATE. + return 0 + } + pCte = searchWith(tls, (*Parse)(unsafe.Pointer(pParse)).FpWith, pFrom, bp+48) + if pCte != 0 { + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pTab uintptr + var pEList uintptr + var pSel uintptr + var pLeft uintptr // Left-most SELECT statement + var pRecTerm uintptr // Left-most recursive term + var bMayRecursive int32 // True if compound joined by UNION [ALL] + var pSavedWith uintptr // Initial value of pParse->pWith + var iRecTab int32 = -1 // Cursor for recursive table + var pCteUse uintptr + + // If pCte->zCteErr is non-NULL at this point, then this is an illegal + // recursive reference to CTE pCte. Leave an error in pParse and return + // early. If pCte->zCteErr is NULL, then this is not a recursive reference. + // In this case, proceed. + if (*Cte)(unsafe.Pointer(pCte)).FzCteErr != 0 { + Xsqlite3ErrorMsg(tls, pParse, (*Cte)(unsafe.Pointer(pCte)).FzCteErr, libc.VaList(bp, (*Cte)(unsafe.Pointer(pCte)).FzName)) + return 2 + } + if cannotBeFunction(tls, pParse, pFrom) != 0 { + return 2 + } + + pTab = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) + if pTab == uintptr(0) { + return 2 + } + pCteUse = (*Cte)(unsafe.Pointer(pCte)).FpUse + if pCteUse == uintptr(0) { + (*Cte)(unsafe.Pointer(pCte)).FpUse = libc.AssignUintptr(&pCteUse, Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(CteUse{})))) + if pCteUse == uintptr(0) || + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3DbFree})), pCteUse) == uintptr(0) { + Xsqlite3DbFree(tls, db, pTab) + return 2 + } + (*CteUse)(unsafe.Pointer(pCteUse)).FeM10d = (*Cte)(unsafe.Pointer(pCte)).FeM10d + } + (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = pTab + (*Table)(unsafe.Pointer(pTab)).FnTabRef = U32(1) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, db, (*Cte)(unsafe.Pointer(pCte)).FzName) + (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) + (*Table)(unsafe.Pointer(pTab)).FnRowLogEst = int16(200) + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_Ephemeral | TF_NoVisibleRowid) + (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect, 0) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return 2 + } + *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) + + if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+19032, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + return 2 + } + libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) + *(*uintptr)(unsafe.Pointer(pFrom + 104)) = pCteUse + (*CteUse)(unsafe.Pointer(pCteUse)).FnUse++ + if (*CteUse)(unsafe.Pointer(pCteUse)).FnUse >= 2 && int32((*CteUse)(unsafe.Pointer(pCteUse)).FeM10d) == M10d_Any { + (*CteUse)(unsafe.Pointer(pCteUse)).FeM10d = U8(M10d_Yes) + } + + // Check if this is a recursive CTE. + pRecTerm = libc.AssignUintptr(&pSel, (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect) + bMayRecursive = libc.Bool32(int32((*Select)(unsafe.Pointer(pSel)).Fop) == TK_ALL || int32((*Select)(unsafe.Pointer(pSel)).Fop) == TK_UNION) + for bMayRecursive != 0 && int32((*Select)(unsafe.Pointer(pRecTerm)).Fop) == int32((*Select)(unsafe.Pointer(pSel)).Fop) { + var i int32 + var pSrc uintptr = (*Select)(unsafe.Pointer(pRecTerm)).FpSrc + + for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; i++ { + var pItem uintptr = pSrc + 8 + uintptr(i)*112 + if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase == uintptr(0) && + (*SrcItem)(unsafe.Pointer(pItem)).FzName != uintptr(0) && + 0 == Xsqlite3StrICmp(tls, (*SrcItem)(unsafe.Pointer(pItem)).FzName, (*Cte)(unsafe.Pointer(pCte)).FzName) { + (*SrcItem)(unsafe.Pointer(pItem)).FpTab = pTab + (*Table)(unsafe.Pointer(pTab)).FnTabRef++ + libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) + if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+19052, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + return 2 + } + *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) + if iRecTab < 0 { + iRecTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + } + (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = iRecTab + } + } + if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) == U32(0) { + break + } + pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior + } + + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19095 /* "circular referen..." */ + pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith + (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) + if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { + var rc int32 + + (*Select)(unsafe.Pointer(pRecTerm)).FpWith = (*Select)(unsafe.Pointer(pSel)).FpWith + rc = Xsqlite3WalkSelect(tls, pWalker, pRecTerm) + (*Select)(unsafe.Pointer(pRecTerm)).FpWith = uintptr(0) + if rc != 0 { + (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith + return 2 + } + } else { + if Xsqlite3WalkSelect(tls, pWalker, pSel) != 0 { + (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith + return 2 + } + } + (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) + + for pLeft = pSel; (*Select)(unsafe.Pointer(pLeft)).FpPrior != 0; pLeft = (*Select)(unsafe.Pointer(pLeft)).FpPrior { + } + pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList + if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { + if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { + Xsqlite3ErrorMsg(tls, pParse, ts+19118, + libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) + (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith + return 2 + } + pEList = (*Cte)(unsafe.Pointer(pCte)).FpCols + } + + Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) + if bMayRecursive != 0 { + if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19156 /* "multiple recursi..." */ + } else { + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19190 /* "recursive refere..." */ + } + Xsqlite3WalkSelect(tls, pWalker, pSel) + } + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = uintptr(0) + (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith + return 1 // Success + } + return 0 // No match +} + +// If the SELECT passed as the second argument has an associated WITH +// clause, pop it from the stack stored as part of the Parse object. +// +// This function is used as the xSelectCallback2() callback by +// sqlite3SelectExpand() when walking a SELECT tree to resolve table +// names and other FROM clause elements. +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ + var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse + if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { + var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith + if pWith != uintptr(0) { + + (*Parse)(unsafe.Pointer(pParse)).FpWith = (*With)(unsafe.Pointer(pWith)).FpOuter + } + } +} + +// The SrcList_item structure passed as the second argument represents a +// sub-query in the FROM clause of a SELECT statement. This function +// allocates and populates the SrcList_item.pTab object. If successful, +// SQLITE_OK is returned. Otherwise, if an OOM error is encountered, +// SQLITE_NOMEM. +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pSel uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + var pTab uintptr + + (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = libc.AssignUintptr(&pTab, Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Table{})))) + if pTab == uintptr(0) { + return SQLITE_NOMEM + } + (*Table)(unsafe.Pointer(pTab)).FnTabRef = U32(1) + if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) + } else { + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19228, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + } + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + Xsqlite3ColumnsFromExprList(tls, pParse, (*Select)(unsafe.Pointer(pSel)).FpEList, pTab+54, pTab+8) + (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) + (*Table)(unsafe.Pointer(pTab)).FnRowLogEst = int16(200) + // The usual case - do not allow ROWID on a subquery + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_Ephemeral | TF_NoVisibleRowid) + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return SQLITE_ERROR + } + return SQLITE_OK +} + +// This routine is a Walker callback for "expanding" a SELECT statement. +// "Expanding" means to do the following: +// +// (1) Make sure VDBE cursor numbers have been assigned to every +// element of the FROM clause. +// +// (2) Fill in the pTabList->a[].pTab fields in the SrcList that +// defines FROM clause. When views appear in the FROM clause, +// fill pTabList->a[].pSelect with a copy of the SELECT statement +// that implements the view. A copy is made of the view's SELECT +// statement so that we can freely modify or delete that statement +// without worrying about messing up the persistent representation +// of the view. +// +// (3) Add terms to the WHERE clause to accommodate the NATURAL keyword +// on joins and the ON and USING clause of joins. +// +// (4) Scan the list of columns in the result set (pEList) looking +// for instances of the "*" operator or the TABLE.* operator. +// If found, expand each "*" to be every column in every table +// and TABLE.* to be every column in TABLE. +// +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse + var i int32 + var j int32 + var k int32 + var rc int32 + var pTabList uintptr + var pEList uintptr + var pFrom uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pE uintptr + var pRight uintptr + var pExpr uintptr + var selFlags U16 = U16((*Select)(unsafe.Pointer(p)).FselFlags) + var elistFlags U32 = U32(0) + + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_Expanded) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return WRC_Abort + } + + if int32(selFlags)&SF_Expanded != 0 { + return WRC_Prune + } + if (*Walker)(unsafe.Pointer(pWalker)).FeCode != 0 { + // Renumber selId because it has been copied from a view + (*Select)(unsafe.Pointer(p)).FselId = U32(libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnSelect, 1)) + } + pTabList = (*Select)(unsafe.Pointer(p)).FpSrc + pEList = (*Select)(unsafe.Pointer(p)).FpEList + if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View) != 0 { + if (*Select)(unsafe.Pointer(p)).FpWith == uintptr(0) { + (*Select)(unsafe.Pointer(p)).FpWith = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(With{}))) + if (*Select)(unsafe.Pointer(p)).FpWith == uintptr(0) { + return WRC_Abort + } + } + (*With)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpWith)).FbView = 1 + } + Xsqlite3WithPush(tls, pParse, (*Select)(unsafe.Pointer(p)).FpWith, uint8(0)) + + // Make sure cursor numbers have been assigned to all entries in + // the FROM clause of the SELECT statement. + Xsqlite3SrcListAssignCursors(tls, pParse, pTabList) + + // Look up every table named in the FROM clause of the select. If + // an entry of the FROM clause is a subquery instead of a table or view, + // then create a transient table structure to describe the subquery. + i = 0 + pFrom = pTabList + 8 /* &.a */ +__1: + if !(i < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc) { + goto __3 + } + { + var pTab uintptr + + if (*SrcItem)(unsafe.Pointer(pFrom)).FpTab != 0 { + goto __2 + } + + if (*SrcItem)(unsafe.Pointer(pFrom)).FzName == uintptr(0) { + var pSel uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + // A sub-query in the FROM clause of a SELECT + + if Xsqlite3WalkSelect(tls, pWalker, pSel) != 0 { + return WRC_Abort + } + if Xsqlite3ExpandSubquery(tls, pParse, pFrom) != 0 { + return WRC_Abort + } + } else if libc.AssignInt32(&rc, resolveFromTermToCte(tls, pParse, pWalker, pFrom)) != 0 { + if rc > 1 { + return WRC_Abort + } + pTab = (*SrcItem)(unsafe.Pointer(pFrom)).FpTab + + } else { + // An ordinary table or view name in the FROM clause + + (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = libc.AssignUintptr(&pTab, Xsqlite3LocateTableItem(tls, pParse, uint32(0), pFrom)) + if pTab == uintptr(0) { + return WRC_Abort + } + if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { + Xsqlite3ErrorMsg(tls, pParse, ts+19240, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) + return WRC_Abort + } + (*Table)(unsafe.Pointer(pTab)).FnTabRef++ + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && cannotBeFunction(tls, pParse, pFrom) != 0 { + return WRC_Abort + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + var nCol I16 + var eCodeOrig U8 = U8((*Walker)(unsafe.Pointer(pWalker)).FeCode) + if Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0 { + return WRC_Abort + } + + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { + if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && + (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { + Xsqlite3ErrorMsg(tls, pParse, ts+19279, + libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) + } else if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB && + uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && + *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+19310, + libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + + nCol = (*Table)(unsafe.Pointer(pTab)).FnCol + (*Table)(unsafe.Pointer(pTab)).FnCol = int16(-1) + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(1) // Turn on Select.selId renumbering + Xsqlite3WalkSelect(tls, pWalker, (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect) + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(eCodeOrig) + (*Table)(unsafe.Pointer(pTab)).FnCol = nCol + } + } + + // Locate the index named by the INDEXED BY clause, if any. + if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 && Xsqlite3IndexedByLookup(tls, pParse, pFrom) != 0 { + return WRC_Abort + } + + } + goto __2 +__2: + i++ + pFrom += 112 + goto __1 + goto __3 +__3: + ; + + // Process NATURAL keywords, and ON and USING clauses of joins. + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 || sqliteProcessJoin(tls, pParse, p) != 0 { + return WRC_Abort + } + + // For every "*" that occurs in the column list, insert the names of + // all columns in all tables. And for every TABLE.* insert the names + // of all columns in TABLE. The parser inserted a special expression + // with the TK_ASTERISK operator for each "*" that it found in the column + // list. The following code just has to locate the TK_ASTERISK + // expressions and expand each one to the list of all columns in + // all tables. + // + // The first loop just checks to see if there are any "*" operators + // that need expanding. + for k = 0; k < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; k++ { + pE = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(k)*32)).FpExpr + if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_ASTERISK { + break + } + + if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_DOT && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pE)).FpRight)).Fop) == TK_ASTERISK { + break + } + elistFlags = elistFlags | (*Expr)(unsafe.Pointer(pE)).Fflags + } + if k < (*ExprList)(unsafe.Pointer(pEList)).FnExpr { + // If we get here it means the result set contains one or more "*" + // operators that need to be expanded. Loop through each expression + // in the result set and expand them one by one. + var a uintptr = pEList + 8 /* &.a */ + var pNew uintptr = uintptr(0) + var flags int32 = int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags) + var longNames int32 = libc.Bool32(flags&SQLITE_FullColNames != 0 && + flags&SQLITE_ShortColNames == 0) + + for k = 0; k < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; k++ { + pE = (*ExprList_item)(unsafe.Pointer(a + uintptr(k)*32)).FpExpr + elistFlags = elistFlags | (*Expr)(unsafe.Pointer(pE)).Fflags + pRight = (*Expr)(unsafe.Pointer(pE)).FpRight + + if int32((*Expr)(unsafe.Pointer(pE)).Fop) != TK_ASTERISK && + (int32((*Expr)(unsafe.Pointer(pE)).Fop) != TK_DOT || int32((*Expr)(unsafe.Pointer(pRight)).Fop) != TK_ASTERISK) { + // This particular expression does not need to be expanded. + pNew = Xsqlite3ExprListAppend(tls, pParse, pNew, (*ExprList_item)(unsafe.Pointer(a+uintptr(k)*32)).FpExpr) + if pNew != 0 { + (*ExprList_item)(unsafe.Pointer(pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32)).FzEName = (*ExprList_item)(unsafe.Pointer(a + uintptr(k)*32)).FzEName + libc.SetBitFieldPtr8Uint32(pNew+8+uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32+20, uint32(int32(*(*uint8)(unsafe.Pointer(a + uintptr(k)*32 + 20))&0x3>>0)), 0, 0x3) + (*ExprList_item)(unsafe.Pointer(a + uintptr(k)*32)).FzEName = uintptr(0) + } + (*ExprList_item)(unsafe.Pointer(a + uintptr(k)*32)).FpExpr = uintptr(0) + } else { + // This expression is a "*" or a "TABLE.*" and needs to be + // expanded. + var tableSeen int32 = 0 // Set to 1 when TABLE matches + var zTName uintptr = uintptr(0) // text of name of TABLE + if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_DOT { + + zTName = *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pE)).FpLeft + 8)) + } + i = 0 + pFrom = pTabList + 8 /* &.a */ + __4: + if !(i < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc) { + goto __6 + } + { + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpTab + var pSub uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + var zTabName uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias + var zSchemaName uintptr = uintptr(0) + var iDb int32 + if zTabName == uintptr(0) { + zTabName = (*Table)(unsafe.Pointer(pTab)).FzName + } + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + goto __6 + } + if pSub == uintptr(0) || (*Select)(unsafe.Pointer(pSub)).FselFlags&U32(SF_NestedFrom) == U32(0) { + pSub = uintptr(0) + if zTName != 0 && Xsqlite3StrICmp(tls, zTName, zTabName) != 0 { + goto __5 + } + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + if iDb >= 0 { + zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + } else { + zSchemaName = ts + 6328 /* "*" */ + } + } + for j = 0; j < int32((*Table)(unsafe.Pointer(pTab)).FnCol); j++ { + var zName uintptr = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName + var zColname uintptr // The computed column name + var zToFree uintptr // Malloced string that needs to be freed + // var sColname Token at bp+72, 16 + // Computed column name as a token + + if zTName != 0 && pSub != 0 && + Xsqlite3MatchEName(tls, (*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32, uintptr(0), zTName, uintptr(0)) == 0 { + continue + } + + // If a column is marked as 'hidden', omit it from the expanded + // result-set list unless the SELECT has the SF_IncludeHidden + // bit set. + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_IncludeHidden) == U32(0) && + int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_HIDDEN != 0 { + continue + } + tableSeen = 1 + + if i > 0 && zTName == uintptr(0) { + if int32((*SrcItem)(unsafe.Pointer(pFrom)).Ffg.Fjointype)&JT_NATURAL != 0 && + tableAndColumnIndex(tls, pTabList, i, zName, uintptr(0), uintptr(0), 1) != 0 { + // In a NATURAL join, omit the join columns from the + // table to the right of the join + continue + } + if Xsqlite3IdListIndex(tls, (*SrcItem)(unsafe.Pointer(pFrom)).FpUsing, zName) >= 0 { + // In a join with a USING clause, omit columns in the + // using clause from the table on the right. + continue + } + } + pRight = Xsqlite3Expr(tls, db, TK_ID, zName) + zColname = zName + zToFree = uintptr(0) + if longNames != 0 || (*SrcList)(unsafe.Pointer(pTabList)).FnSrc > 1 { + var pLeft uintptr + pLeft = Xsqlite3Expr(tls, db, TK_ID, zTabName) + pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pRight) + if zSchemaName != 0 { + pLeft = Xsqlite3Expr(tls, db, TK_ID, zSchemaName) + pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) + } + if longNames != 0 { + zColname = Xsqlite3MPrintf(tls, db, ts+11937, libc.VaList(bp+24, zTabName, zName)) + zToFree = zColname + } + } else { + pExpr = pRight + } + pNew = Xsqlite3ExprListAppend(tls, pParse, pNew, pExpr) + Xsqlite3TokenInit(tls, bp+72, zColname) + Xsqlite3ExprListSetName(tls, pParse, pNew, bp+72, 0) + if pNew != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_NestedFrom) != U32(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 + Xsqlite3DbFree(tls, db, (*ExprList_item)(unsafe.Pointer(pX)).FzEName) + if pSub != 0 { + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) + + } else { + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19343, + libc.VaList(bp+40, zSchemaName, zTabName, zColname)) + + } + libc.SetBitFieldPtr8Uint32(pX+20, uint32(ENAME_TAB), 0, 0x3) + } + Xsqlite3DbFree(tls, db, zToFree) + } + + } + goto __5 + __5: + i++ + pFrom += 112 + goto __4 + goto __6 + __6: + ; + if !(tableSeen != 0) { + if zTName != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+19352, libc.VaList(bp+64, zTName)) + } else { + Xsqlite3ErrorMsg(tls, pParse, ts+19370, 0) + } + } + } + } + Xsqlite3ExprListDelete(tls, db, pEList) + (*Select)(unsafe.Pointer(p)).FpEList = pNew + } + if (*Select)(unsafe.Pointer(p)).FpEList != 0 { + if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { + Xsqlite3ErrorMsg(tls, pParse, ts+19390, 0) + return WRC_Abort + } + if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_ComplexResult) + } + } + return WRC_Continue +} + +// This routine "expands" a SELECT statement and all of its subqueries. +// For additional information on what it means to "expand" a SELECT +// statement, see the comment on the selectExpand worker callback above. +// +// Expanding a SELECT statement is the first step in processing a +// SELECT statement. The SELECT statement must be expanded before +// name resolution is performed. +// +// If anything goes wrong, an error message is written into pParse. +// The calling function can detect the problem by looking at pParse->nErr +// and/or pParse->db->mallocFailed. +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3ExprWalkNoop})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse + if (*Parse)(unsafe.Pointer(pParse)).FhasCompound != 0 { + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{convertCompoundSelectToSubquery})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) + Xsqlite3WalkSelect(tls, bp, pSelect) + } + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{selectExpander})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3SelectPopWith})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, pSelect) +} + +// This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo() +// interface. +// +// For each FROM-clause subquery, add Column.zType and Column.zColl +// information to the Table structure that represents the result set +// of that subquery. +// +// The Table structure that represents the result set was constructed +// by selectExpander() but the type and collation information was omitted +// at that point because identifiers had not yet been resolved. This +// routine is called after identifier resolution. +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ + var pParse uintptr + var i int32 + var pTabList uintptr + var pFrom uintptr + + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_HasTypeInfo) != 0 { + return + } + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_HasTypeInfo) + pParse = (*Walker)(unsafe.Pointer(pWalker)).FpParse + pTabList = (*Select)(unsafe.Pointer(p)).FpSrc + i = 0 + pFrom = pTabList + 8 /* &.a */ +__1: + if !(i < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc) { + goto __3 + } + { + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpTab + + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + // A sub-query in the FROM clause of a SELECT + var pSel uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + if pSel != 0 { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTab, pSel, + uint8(SQLITE_AFF_NONE)) + } + } + + } + goto __2 +__2: + i++ + pFrom += 112 + goto __1 + goto __3 +__3: +} + +// This routine adds datatype and collating sequence information to +// the Table structures of all FROM-clause subqueries in a +// SELECT statement. +// +// Use this routine after name resolution. +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{selectAddSubqueryTypeInfo})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3ExprWalkNoop})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse + Xsqlite3WalkSelect(tls, bp, pSelect) +} + +// This routine sets up a SELECT statement for processing. The +// following is accomplished: +// +// * VDBE Cursor numbers are assigned to all FROM-clause terms. +// * Ephemeral Table objects are created for all FROM-clause subqueries. +// * ON and USING clauses are shifted into WHERE statements +// * Wildcards "*" and "TABLE.*" in result sets are expanded. +// * Identifiers in expression are matched to tables. +// +// This routine acts recursively on all subqueries within the SELECT. +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ + + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + return + } + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_HasTypeInfo) != 0 { + return + } + sqlite3SelectExpand(tls, pParse, p) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + Xsqlite3ResolveSelectNames(tls, pParse, p, pOuterNC) + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + sqlite3SelectAddTypeInfo(tls, pParse, p) +} + +// Reset the aggregate accumulator. +// +// The aggregate accumulator is a set of memory cells that hold +// intermediate results while calculating an aggregate. This +// routine generates code that stores NULLs in all of those memory +// cells. +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var i int32 + var pFunc uintptr + var nReg int32 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + + if nReg == 0 { + return + } + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*AggInfo)(unsafe.Pointer(pAggInfo)).FmnReg, (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg) + pFunc = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + i = 0 +__1: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { + goto __3 + } + { + if (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct >= 0 { + var pE uintptr = (*AggInfo_func)(unsafe.Pointer(pFunc)).FpFExpr + + if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { + Xsqlite3ErrorMsg(tls, pParse, + ts+19421, 0) + (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 + } else { + var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) + (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, + (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19472, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + } + } + + } + goto __2 +__2: + i++ + pFunc += 32 + goto __1 + goto __3 +__3: +} + +// Invoke the OP_AggFinalize opcode for every aggregate function +// in the AggInfo structure. +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var i int32 + var pF uintptr + i = 0 + pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc +__1: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { + goto __3 + } + { + var pList uintptr + + pList = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFExpr + 32)) + Xsqlite3VdbeAddOp2(tls, v, OP_AggFinal, (*AggInfo_func)(unsafe.Pointer(pF)).FiMem, func() int32 { + if pList != 0 { + return (*ExprList)(unsafe.Pointer(pList)).FnExpr + } + return 0 + }()) + Xsqlite3VdbeAppendP4(tls, v, (*AggInfo_func)(unsafe.Pointer(pF)).FpFunc, -8) + + } + goto __2 +__2: + i++ + pF += 32 + goto __1 + goto __3 +__3: +} + +// Update the accumulator memory cells for an aggregate based on +// the current cursor position. +// +// If regAcc is non-zero and there are no min() or max() aggregates +// in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator +// registers if register regAcc contains 0. The caller will take care +// of setting and clearing regAcc. +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var i int32 + var regHit int32 = 0 + var addrHitTest int32 = 0 + var pF uintptr + var pC uintptr + + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) + i = 0 + pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc +__1: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { + goto __3 + } + { + var nArg int32 + var addrNext int32 = 0 + var regAgg int32 + var pList uintptr + + pList = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFExpr + 32)) + if (*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + var pFilter uintptr = (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFExpr + 64)))).FpFilter + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0 && + (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0 && + regAcc != 0 { + // If regAcc==0, there there exists some min() or max() function + // without a FILTER clause that will ensure the magnet registers + // are populated. + if regHit == 0 { + regHit = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + // If this is the first row of the group (regAcc contains 0), clear the + // "magnet" register regHit so that the accumulator registers + // are populated if the FILTER clause jumps over the the + // invocation of min() or max() altogether. Or, if this is not + // the first row (regAcc contains 1), set the magnet register so that + // the accumulators are not populated unless the min()/max() is invoked + // and indicates that they should be. + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, regAcc, regHit) + } + addrNext = Xsqlite3VdbeMakeLabel(tls, pParse) + Xsqlite3ExprIfFalse(tls, pParse, pFilter, addrNext, SQLITE_JUMPIFNULL) + } + if pList != 0 { + nArg = (*ExprList)(unsafe.Pointer(pList)).FnExpr + regAgg = Xsqlite3GetTempRange(tls, pParse, nArg) + Xsqlite3ExprCodeExprList(tls, pParse, pList, regAgg, 0, uint8(SQLITE_ECEL_DUP)) + } else { + nArg = 0 + regAgg = 0 + } + if (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct >= 0 && pList != 0 { + if addrNext == 0 { + addrNext = Xsqlite3VdbeMakeLabel(tls, pParse) + } + (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct = codeDistinct(tls, pParse, eDistinctType, + (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, addrNext, pList, regAgg) + } + if (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0 { + var pColl uintptr = uintptr(0) + var pItem uintptr + var j int32 + // pList!=0 if pF->pFunc has NEEDCOLL + j = 0 + pItem = pList + 8 /* &.a */ + __4: + if !(!(pColl != 0) && j < nArg) { + goto __6 + } + { + pColl = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) + + } + goto __5 + __5: + j++ + pItem += 32 + goto __4 + goto __6 + __6: + ; + if !(pColl != 0) { + pColl = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl + } + if regHit == 0 && (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0 { + regHit = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + Xsqlite3VdbeAddOp4(tls, v, OP_CollSeq, regHit, 0, 0, pColl, -2) + } + Xsqlite3VdbeAddOp3(tls, v, OP_AggStep, 0, regAgg, (*AggInfo_func)(unsafe.Pointer(pF)).FiMem) + Xsqlite3VdbeAppendP4(tls, v, (*AggInfo_func)(unsafe.Pointer(pF)).FpFunc, -8) + Xsqlite3VdbeChangeP5(tls, v, uint16(U8(nArg))) + Xsqlite3ReleaseTempRange(tls, pParse, regAgg, nArg) + if addrNext != 0 { + Xsqlite3VdbeResolveLabel(tls, v, addrNext) + } + + } + goto __2 +__2: + i++ + pF += 32 + goto __1 + goto __3 +__3: + ; + if regHit == 0 && (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0 { + regHit = regAcc + } + if regHit != 0 { + addrHitTest = Xsqlite3VdbeAddOp1(tls, v, OP_If, regHit) + } + i = 0 + pC = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol +__7: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator) { + goto __9 + } + { + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pC)).FpCExpr, (*AggInfo_col)(unsafe.Pointer(pC)).FiMem) + + } + goto __8 +__8: + i++ + pC += 32 + goto __7 + goto __9 +__9: + ; + + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) + if addrHitTest != 0 { + Xsqlite3VdbeJumpHereOrPopInst(tls, v, addrHitTest) + } +} + +// Add a single OP_Explain instruction to the VDBE to explain a simple +// count(*) query ("SELECT count(*) FROM pTab"). +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { + var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19505, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + func() uintptr { + if bCover != 0 { + return ts + 19517 /* " USING COVERING ..." */ + } + return ts + 1525 /* "" */ + }(), + func() uintptr { + if bCover != 0 { + return (*Index)(unsafe.Pointer(pIdx)).FzName + } + return ts + 1525 /* "" */ + }())) + } +} + +// sqlite3WalkExpr() callback used by havingToWhere(). +// +// If the node passed to the callback is a TK_AND node, return +// WRC_Continue to tell sqlite3WalkExpr() to iterate through child nodes. +// +// Otherwise, return WRC_Prune. In this case, also check if the +// sub-expression matches the criteria for being moved to the WHERE +// clause. If so, add it to the WHERE clause and replace the sub-expression +// within the HAVING expression with a constant "1". +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { + var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + // This routine is called before the HAVING clause of the current + // SELECT is analyzed for aggregates. So if pExpr->pAggInfo is set + // here, it indicates that the expression is a correlated reference to a + // column from an outer aggregate query, or an aggregate function that + // belongs to an outer query. Do not move the expression to the WHERE + // clause in this obscure case, as doing so may corrupt the outer Select + // statements AggInfo structure. + if Xsqlite3ExprIsConstantOrGroupBy(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, pExpr, (*Select)(unsafe.Pointer(pS)).FpGroupBy) != 0 && + libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) == 0 && + (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { + var db uintptr = (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(pWalker)).FpParse)).Fdb + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7816) + if pNew != 0 { + var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere + { + var t = *(*Expr)(unsafe.Pointer(pNew)) + *(*Expr)(unsafe.Pointer(pNew)) = *(*Expr)(unsafe.Pointer(pExpr)) + *(*Expr)(unsafe.Pointer(pExpr)) = t + } + + pNew = Xsqlite3ExprAnd(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, pWhere, pNew) + (*Select)(unsafe.Pointer(pS)).FpWhere = pNew + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(1) + } + } + return WRC_Prune + } + return WRC_Continue +} + +// Transfer eligible terms from the HAVING clause of a query, which is +// processed after grouping, to the WHERE clause, which is processed before +// grouping. For example, the query: +// +// SELECT * FROM WHERE a=? GROUP BY b HAVING b=? AND c=? +// +// can be rewritten as: +// +// SELECT * FROM WHERE a=? AND b=? GROUP BY b HAVING c=? +// +// A term of the HAVING expression is eligible for transfer if it consists +// entirely of constants and expressions that are also GROUP BY terms that +// use the "BINARY" collation sequence. +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var sWalker Walker at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{havingToWhereExprCb})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = p + Xsqlite3WalkExpr(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) +} + +// Check to see if the pThis entry of pTabList is a self-join of a prior view. +// If it is, then return the SrcList_item for the prior view. If it is not, +// then return 0. +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ + var pItem uintptr + + if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { + return uintptr(0) + } + for pItem = pTabList + 8; /* &.a */ pItem < pThis; pItem += 112 { + var pS1 uintptr + if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect == uintptr(0) { + continue + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x10>>4)) != 0 { + continue + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName == uintptr(0) { + continue + } + + if (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FpSchema != (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpTab)).FpSchema { + continue + } + if Xsqlite3_stricmp(tls, (*SrcItem)(unsafe.Pointer(pItem)).FzName, (*SrcItem)(unsafe.Pointer(pThis)).FzName) != 0 { + continue + } + pS1 = (*SrcItem)(unsafe.Pointer(pItem)).FpSelect + if (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FpSchema == uintptr(0) && (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselId != (*Select)(unsafe.Pointer(pS1)).FselId { + // The query flattener left two different CTE tables with identical + // names in the same FROM clause. + continue + } + if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { + // The view was modified by some other optimization such as + // pushDownWhereTerms() + continue + } + return pItem + } + return uintptr(0) +} + +// Deallocate a single AggInfo object +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ + Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) + Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) + Xsqlite3DbFreeNN(tls, db, p) +} + +// Generate code for the SELECT statement given in the p argument. +// +// The results are returned according to the SelectDest structure. +// See comments in sqliteInt.h for further information. +// +// This routine returns the number of errors. If any errors are +// encountered, then an appropriate error message is left in +// pParse->zErrMsg. +// +// This routine does NOT free the Select structure passed in. The +// calling function needs to do that. +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ + bp := tls.Alloc(216) + defer tls.Free(216) + + var i int32 + var j int32 // Loop counters + var pWInfo uintptr // Return from sqlite3WhereBegin() + var v uintptr // The virtual machine under construction + var isAgg int32 // True for select lists like "count(*)" + var pEList uintptr // List of columns to extract. + var pTabList uintptr // List of tables to select from + var pWhere uintptr // The WHERE clause. May be NULL + var pGroupBy uintptr // The GROUP BY clause. May be NULL + var pHaving uintptr // The HAVING clause. May be NULL + var pAggInfo uintptr // Aggregate information + var rc int32 // Value to return from this function + // var sDistinct DistinctCtx at bp+136, 12 + // Info on how to code the DISTINCT keyword + // var sSort SortCtx at bp+48, 48 + // Info on how to code the ORDER BY clause + var iEnd int32 // Address of the end of the query + var db uintptr // The database connection + // var pMinMaxOrderBy uintptr at bp+208, 8 + // Added ORDER BY for min/max queries + var minMaxFlag U8 + var p1 uintptr + var p0 uintptr + var pItem uintptr + var pSub uintptr + var pTab uintptr + // Implement a co-routine that will return a single row of the result + // set on each invocation. + var addrTop int32 + // This is a CTE for which materialization code has already been + // generated. Invoke the subroutine to compute the materialization, + // the make the pItem->iCursor be a copy of the ephemerial table that + // holds the result of the materialization. + var pCteUse uintptr + var pCteUse1 uintptr + // Materialize the view. If the view is not correlated, generate a + // subroutine to do the materialization so that subsequent uses of + // the same view can reuse the materialization. + var topAddr int32 + var onceAddr int32 + var retAddr int32 + var pItem1 uintptr + var pPrior uintptr + // var dest SelectDest at bp+96, 40 + + var pSub1 uintptr + var zSavedAuthContext uintptr + var pKeyInfo uintptr + var addrGosub int32 + var iCont int32 + var iBreak int32 + var regGosub int32 + // No aggregate functions and no GROUP BY clause + var wctrlFlags U16 + var pWin uintptr + var sortFlags U8 + var ii int32 + var k int32 // Loop counter + var pItem2 uintptr + var pExpr uintptr + var pExpr1 uintptr + var r1 int32 + var pCol uintptr + // Rows are coming out in undetermined order. We have to push + // each row into a sorting index, terminate the first loop, + // then loop over the sorting index in order to get the output + // in sorted order + var regBase int32 + var regRecord int32 + var nCol int32 + var nGroupBy int32 + var pF uintptr + var pKeyInfo1 uintptr // Keying information for the group by clause + var addr1 int32 // A-vs-B comparision jump + var addrOutputRow int32 // Start of subroutine that outputs a result row + var regOutputRow int32 // Return address register for output subroutine + var addrSetAbort int32 // Set the abort flag and return + var addrTopOfLoop int32 // Top of the input loop + var addrSortingIdx int32 // The OP_OpenEphemeral for the sorting index + var addrReset int32 // Subroutine for resetting the accumulator + var regReset int32 // Return address register for reset subroutine + var pDistinct uintptr + var distFlag U16 + var eDist int32 + // If isSimpleCount() returns a pointer to a Table structure, then + // the SQL statement is of the form: + // + // SELECT count(*) FROM + // + // where the Table structure returned represents table . + // + // This statement is so common that it is optimized specially. The + // OP_Count instruction is executed either on the intkey table that + // contains the data for table or on one of its indexes. It + // is better to execute the op on an index, as indexes are almost + // always spread across less pages than their corresponding tables. + var iDb int32 + var iCsr int32 // Cursor to scan b-tree + var pIdx uintptr // Iterator variable + var pKeyInfo2 uintptr // Keyinfo for scanned index + var pBest uintptr // Best index found so far + var iRoot Pgno + var pF1 uintptr + var regAcc int32 // "populate accumulators" flag + var pDistinct1 uintptr + var distFlag1 U16 + var eDist1 int32 + var pTab1 uintptr + // This case when there exist aggregate functions or a GROUP BY clause + // or both + // var sNC NameContext at bp+152, 56 + // Name context for processing aggregate information + var iAMem int32 // First Mem address for storing current GROUP BY + var iBMem int32 // First Mem address for previous GROUP BY + var iUseFlag int32 // Mem address holding flag indicating that at least + // one row of the input to the aggregator has been + // processed + var iAbortFlag int32 // Mem address which causes query abort if positive + var groupBySort int32 // Rows come from source in GROUP BY order + var addrEnd int32 // End of processing for this SELECT + var sortPTab int32 // Pseudotable used to decode sorting results + var sortOut int32 // Output register from the sorter + var orderByGrp int32 + pEList = uintptr(0) + pAggInfo = uintptr(0) + rc = 1 + *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */)) = uintptr(0) // Flag for min/max queries + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + v = Xsqlite3GetVdbe(tls, pParse) + if !(p == uintptr(0) || (*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __1 + } + return 1 +__1: + ; + + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_SELECT, uintptr(0), uintptr(0), uintptr(0)) != 0) { + goto __2 + } + return 1 +__2: + ; + + if !(int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) <= SRT_DistQueue) { + goto __3 + } + + // All of these destinations are also able to ignore the ORDER BY clause + if !((*Select)(unsafe.Pointer(p)).FpOrderBy != 0) { + goto __4 + } + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprListDelete})), + (*Select)(unsafe.Pointer(p)).FpOrderBy) + + (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) +__4: + ; + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_Distinct)) + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_NoopOrderBy) +__3: + ; + Xsqlite3SelectPrep(tls, pParse, p, uintptr(0)) + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __5 + } + goto select_end +__5: + ; + + // If the SF_UFSrcCheck flag is set, then this function is being called + // as part of populating the temp table for an UPDATE...FROM statement. + // In this case, it is an error if the target object (pSrc->a[0]) name + // or alias is duplicated within FROM clause (pSrc->a[1..n]). + // + // Postgres disallows this case too. The reason is that some other + // systems handle this case differently, and not all the same way, + // which is just confusing. To avoid this, we follow PG's lead and + // disallow it altogether. + if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_UFSrcCheck) != 0) { + goto __6 + } + p0 = (*Select)(unsafe.Pointer(p)).FpSrc + 8 + i = 1 +__7: + if !(i < (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc) { + goto __9 + } + p1 = (*Select)(unsafe.Pointer(p)).FpSrc + 8 + uintptr(i)*112 + if !((*SrcItem)(unsafe.Pointer(p0)).FpTab == (*SrcItem)(unsafe.Pointer(p1)).FpTab && 0 == Xsqlite3_stricmp(tls, (*SrcItem)(unsafe.Pointer(p0)).FzAlias, (*SrcItem)(unsafe.Pointer(p1)).FzAlias)) { + goto __10 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+19540, + libc.VaList(bp, func() uintptr { + if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { + return (*SrcItem)(unsafe.Pointer(p0)).FzAlias + } + return (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(p0)).FpTab)).FzName + }())) + goto select_end +__10: + ; + goto __8 +__8: + i++ + goto __7 + goto __9 +__9: + ; + + // Clear the SF_UFSrcCheck flag. The check has already been performed, + // and leaving this flag set can cause errors if a compound sub-query + // in p->pSrc is flattened into this query and this function called + // again as part of compound SELECT processing. + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_UFSrcCheck)) +__6: + ; + + if !(int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) == SRT_Output) { + goto __11 + } + Xsqlite3GenerateColumnNames(tls, pParse, p) +__11: + ; + + if !(Xsqlite3WindowRewrite(tls, pParse, p) != 0) { + goto __12 + } + + goto select_end +__12: + ; + pTabList = (*Select)(unsafe.Pointer(p)).FpSrc + isAgg = libc.Bool32((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) != U32(0)) + libc.Xmemset(tls, bp+48, 0, uint64(unsafe.Sizeof(SortCtx{}))) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy + + // Try to do various optimizations (flattening subqueries, and strength + // reduction of join operators) in the FROM clause up into the main query + i = 0 +__13: + if !(!(int32((*Select)(unsafe.Pointer(p)).FpPrior) != 0) && i < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc) { + goto __15 + } + pItem = pTabList + 8 + uintptr(i)*112 + pSub = (*SrcItem)(unsafe.Pointer(pItem)).FpSelect + pTab = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + + // The expander should have already created transient Table objects + // even for FROM clause elements such as subqueries that do not correspond + // to a real table + + // Convert LEFT JOIN into JOIN if there are terms of the right table + // of the LEFT JOIN used in the WHERE clause. + if !(int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 && + Xsqlite3ExprImpliesNonNullRow(tls, (*Select)(unsafe.Pointer(p)).FpWhere, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) != 0 && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_SimplifyJoin) == U32(0)) { + goto __16 + } + + *(*U8)(unsafe.Pointer(pItem + 60)) &= libc.Uint8FromInt32(libc.CplInt32(JT_LEFT | JT_OUTER)) + unsetJoinExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) +__16: + ; + + // No futher action if this term of the FROM clause is no a subquery + if !(pSub == uintptr(0)) { + goto __17 + } + goto __14 +__17: + ; + + // Catch mismatch in the declared columns of a view and the number of + // columns in the SELECT on the RHS + if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { + goto __18 + } + Xsqlite3ErrorMsg(tls, pParse, ts+19594, + libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) + goto select_end +__18: + ; + + // Do not try to flatten an aggregate subquery. + // + // Flattening an aggregate subquery is only possible if the outer query + // is not a join. But if the outer query is not a join, then the subquery + // will be implemented as a co-routine and there is no advantage to + // flattening in that case. + if !((*Select)(unsafe.Pointer(pSub)).FselFlags&U32(SF_Aggregate) != U32(0)) { + goto __19 + } + goto __14 +__19: + ; + + // If a FROM-clause subquery has an ORDER BY clause that is not + // really doing anything, then delete it now so that it does not + // interfere with query flattening. See the discussion at + // https://sqlite.org/forum/forumpost/2d76f2bcf65d256a + // + // Beware of these cases where the ORDER BY clause may not be safely + // omitted: + // + // (1) There is also a LIMIT clause + // (2) The subquery was added to help with window-function + // processing + // (3) The subquery is in the FROM clause of an UPDATE + // (4) The outer query uses an aggregate function other than + // the built-in count(), min(), or max(). + // (5) The ORDER BY isn't going to accomplish anything because + // one of: + // (a) The outer query has a different ORDER BY clause + // (b) The subquery is part of a join + // See forum post 062d576715d277c8 + if !((*Select)(unsafe.Pointer(pSub)).FpOrderBy != uintptr(0) && + ((*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) || (*SrcList)(unsafe.Pointer(pTabList)).FnSrc > 1) && + (*Select)(unsafe.Pointer(pSub)).FpLimit == uintptr(0) && + (*Select)(unsafe.Pointer(pSub)).FselFlags&U32(SF_OrderByReqd) == U32(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_OrderByReqd) == U32(0) && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_OmitOrderBy) == U32(0)) { + goto __20 + } + + Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(pSub)).FpOrderBy) + (*Select)(unsafe.Pointer(pSub)).FpOrderBy = uintptr(0) +__20: + ; + + // If the outer query contains a "complex" result set (that is, + // if the result set of the outer query uses functions or subqueries) + // and if the subquery contains an ORDER BY clause and if + // it will be implemented as a co-routine, then do not flatten. This + // restriction allows SQL constructs like this: + // + // SELECT expensive_function(x) + // FROM (SELECT x FROM tab ORDER BY y LIMIT 10); + // + // The expensive_function() is only computed on the 10 rows that + // are output, rather than every row of the table. + // + // The requirement that the outer query have a complex result set + // means that flattening does occur on simpler SQL constraints without + // the expensive_function() like: + // + // SELECT x FROM (SELECT x FROM tab ORDER BY y LIMIT 10); + if !((*Select)(unsafe.Pointer(pSub)).FpOrderBy != uintptr(0) && + i == 0 && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_ComplexResult) != U32(0) && + ((*SrcList)(unsafe.Pointer(pTabList)).FnSrc == 1 || + int32((*SrcItem)(unsafe.Pointer(pTabList+8+1*112)).Ffg.Fjointype)&(JT_LEFT|JT_CROSS) != 0)) { + goto __21 + } + goto __14 +__21: + ; + + if !(flattenSubquery(tls, pParse, p, i, isAgg) != 0) { + goto __22 + } + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __23 + } + goto select_end +__23: + ; + // This subquery can be absorbed into its parent. + i = -1 +__22: + ; + pTabList = (*Select)(unsafe.Pointer(p)).FpSrc + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __24 + } + goto select_end +__24: + ; + if !!(int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) <= SRT_Fifo) { + goto __25 + } + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy +__25: + ; + goto __14 +__14: + i++ + goto __13 + goto __15 +__15: + ; + + // Handle compound SELECT statements using the separate multiSelect() + // procedure. + if !((*Select)(unsafe.Pointer(p)).FpPrior != 0) { + goto __26 + } + rc = multiSelect(tls, pParse, p, pDest) + if !((*Select)(unsafe.Pointer(p)).FpNext == uintptr(0)) { + goto __27 + } + Xsqlite3VdbeExplainPop(tls, pParse) +__27: + ; + return rc +__26: + ; + + // Do the WHERE-clause constant propagation optimization if this is + // a join. No need to speed time on this operation for non-join queries + // as the equivalent optimization will be handled by query planner in + // sqlite3WhereBegin(). + if !((*Select)(unsafe.Pointer(p)).FpWhere != uintptr(0) && + int32((*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpWhere)).Fop) == TK_AND && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PropagateConst) == U32(0) && + propagateConstants(tls, pParse, p) != 0) { + goto __28 + } + goto __29 +__28: + ; +__29: + ; + + // For each term in the FROM clause, do two things: + // (1) Authorized unreferenced tables + // (2) Generate code for all sub-queries + i = 0 +__30: + if !(i < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc) { + goto __32 + } + pItem1 = pTabList + 8 + uintptr(i)*112 + + // Issue SQLITE_READ authorizations with a fake column name for any + // tables that are referenced but from which no values are extracted. + // Examples of where these kinds of null SQLITE_READ authorizations + // would occur: + // + // SELECT count(*) FROM t1; -- SQLITE_READ t1."" + // SELECT t1.* FROM t1, t2; -- SQLITE_READ t2."" + // + // The fake column name is an empty string. It is possible for a table to + // have a column named by the empty string, in which case there is no way to + // distinguish between an unreferenced table and an actual reference to the + // "" column. The original design was for the fake column name to be a NULL, + // which would be unambiguous. But legacy authorization callbacks might + // assume the column name is non-NULL and segfault. The use of an empty + // string for the fake column name seems safer. + if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { + goto __33 + } + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1525, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) +__33: + ; + + // Generate code for all sub-queries in the FROM clause + pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect + if !(pSub1 == uintptr(0)) { + goto __34 + } + goto __31 +__34: + ; + + // The code for a subquery should only be generated once. + + // Increment Parse.nHeight by the height of the largest expression + // tree referred to by this, the parent select. The child select + // may contain expression trees of at most + // (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit + // more conservative than necessary, but much easier than enforcing + // an exact limit. + *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + + // Make copies of constant WHERE-clause terms in the outer query down + // inside the subquery. This can help the subquery to run more efficiently. + if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && + (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x80>>7) == 0 || + int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104)))).FeM10d) != M10d_Yes && (*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104)))).FnUse < 2) && + pushDownWhereTerms(tls, pParse, pSub1, (*Select)(unsafe.Pointer(p)).FpWhere, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor, + libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pItem1)).Ffg.Fjointype)&JT_OUTER != 0)) != 0) { + goto __35 + } + + goto __36 +__35: + ; +__36: + ; + + zSavedAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext + (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = (*SrcItem)(unsafe.Pointer(pItem1)).FzName + + // Generate code to implement the subquery + // + // The subquery is implemented as a co-routine if: + // (1) the subquery is guaranteed to be the outer loop (so that + // it does not need to be computed more than once), and + // (2) the subquery is not a CTE that should be materialized + // + // TODO: Are there other reasons beside (1) and (2) to use a co-routine + // implementation? + if !(i == 0 && + ((*SrcList)(unsafe.Pointer(pTabList)).FnSrc == 1 || + int32((*SrcItem)(unsafe.Pointer(pTabList+8+1*112)).Ffg.Fjointype)&(JT_LEFT|JT_CROSS) != 0) && + (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x80>>7) == 0 || int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104)))).FeM10d) != M10d_Yes)) { + goto __37 + } + // Implement a co-routine that will return a single row of the result + // set on each invocation. + addrTop = Xsqlite3VdbeCurrentAddr(tls, v) + 1 + + (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn, 0, addrTop) + + (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop + Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19634, libc.VaList(bp+32, pItem1)) + Xsqlite3Select(tls, pParse, pSub1, bp+96) + (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow + libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) + (*SrcItem)(unsafe.Pointer(pItem1)).FregResult = (*SelectDest)(unsafe.Pointer(bp + 96 /* &dest */)).FiSdst + Xsqlite3VdbeEndCoroutine(tls, v, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) + Xsqlite3VdbeJumpHere(tls, v, addrTop-1) + Xsqlite3ClearTempRegCache(tls, pParse) + goto __38 +__37: + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x80>>7)) != 0 && (*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104)))).FaddrM9e > 0) { + goto __39 + } + // This is a CTE for which materialization code has already been + // generated. Invoke the subroutine to compute the materialization, + // the make the pItem->iCursor be a copy of the ephemerial table that + // holds the result of the materialization. + pCteUse = *(*uintptr)(unsafe.Pointer(pItem1 + 104)) + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*CteUse)(unsafe.Pointer(pCteUse)).FregRtn, (*CteUse)(unsafe.Pointer(pCteUse)).FaddrM9e) + if !((*SrcItem)(unsafe.Pointer(pItem1)).FiCursor != (*CteUse)(unsafe.Pointer(pCteUse)).FiCur) { + goto __41 + } + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor, (*CteUse)(unsafe.Pointer(pCteUse)).FiCur) + +__41: + ; + (*Select)(unsafe.Pointer(pSub1)).FnSelectRow = (*CteUse)(unsafe.Pointer(pCteUse)).FnRowEst + goto __40 +__39: + if !(libc.AssignUintptr(&pPrior, isSelfJoinView(tls, pTabList, pItem1)) != uintptr(0)) { + goto __42 + } + // This view has already been materialized by a prior entry in + // this same FROM clause. Reuse it. + if !((*SrcItem)(unsafe.Pointer(pPrior)).FaddrFillSub != 0) { + goto __44 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pPrior)).FregReturn, (*SrcItem)(unsafe.Pointer(pPrior)).FaddrFillSub) +__44: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor, (*SrcItem)(unsafe.Pointer(pPrior)).FiCursor) + (*Select)(unsafe.Pointer(pSub1)).FnSelectRow = (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pPrior)).FpSelect)).FnSelectRow + goto __43 +__42: + onceAddr = 0 + + (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + topAddr = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) + (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = topAddr + 1 + if !(int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x8>>3) == 0) { + goto __45 + } + // If the subquery is not correlated and if we are not inside of + // a trigger, then we only need to compute the value of the subquery + // once. + onceAddr = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + + goto __46 +__45: + ; +__46: + ; + Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19649, libc.VaList(bp+40, pItem1)) + Xsqlite3Select(tls, pParse, pSub1, bp+96) + (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow + if !(onceAddr != 0) { + goto __47 + } + Xsqlite3VdbeJumpHere(tls, v, onceAddr) +__47: + ; + retAddr = Xsqlite3VdbeAddOp1(tls, v, OP_Return, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) + + Xsqlite3VdbeChangeP1(tls, v, topAddr, retAddr) + Xsqlite3ClearTempRegCache(tls, pParse) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x80>>7)) != 0 && int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x8>>3) == 0) { + goto __48 + } + pCteUse1 = *(*uintptr)(unsafe.Pointer(pItem1 + 104)) + (*CteUse)(unsafe.Pointer(pCteUse1)).FaddrM9e = (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub + (*CteUse)(unsafe.Pointer(pCteUse1)).FregRtn = (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn + (*CteUse)(unsafe.Pointer(pCteUse1)).FiCur = (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor + (*CteUse)(unsafe.Pointer(pCteUse1)).FnRowEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow +__48: + ; +__43: + ; +__40: + ; +__38: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __49 + } + goto select_end +__49: + ; + *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext + goto __31 +__31: + i++ + goto __30 + goto __32 +__32: + ; + + // Various elements of the SELECT copied into local variables for + // convenience + pEList = (*Select)(unsafe.Pointer(p)).FpEList + pWhere = (*Select)(unsafe.Pointer(p)).FpWhere + pGroupBy = (*Select)(unsafe.Pointer(p)).FpGroupBy + pHaving = (*Select)(unsafe.Pointer(p)).FpHaving + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FisTnct = U8(libc.Bool32((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0))) + + // If the query is DISTINCT with an ORDER BY but is not an aggregate, and + // if the select-list is the same as the ORDER BY list, then this query + // can be rewritten as a GROUP BY. In other words, this: + // + // SELECT DISTINCT xyz FROM ... ORDER BY xyz + // + // is transformed to: + // + // SELECT xyz FROM ... GROUP BY xyz ORDER BY xyz + // + // The second form is preferred as a single index (or temp-table) may be + // used for both the ORDER BY and DISTINCT processing. As originally + // written the query must use a temp-table for at least one of the ORDER + // BY and DISTINCT, and an index or separate temp-table for the other. + if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(SF_Distinct) && + Xsqlite3ExprListCompare(tls, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, pEList, -1) == 0 && + (*Select)(unsafe.Pointer(p)).FpWin == uintptr(0)) { + goto __50 + } + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_Distinct)) + pGroupBy = libc.AssignPtrUintptr(p+56, Xsqlite3ExprListDup(tls, db, pEList, 0)) + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_Aggregate) + // Notice that even thought SF_Distinct has been cleared from p->selFlags, + // the sDistinct.isTnct is still set. Hence, isTnct represents the + // original setting of the SF_Distinct flag, not the current setting + +__50: + ; + + // If there is an ORDER BY clause, then create an ephemeral index to + // do the sorting. But this sorting ephemeral index might end up + // being unused if the data can be extracted in pre-sorted order. + // If that is the case, then the OP_OpenEphemeral instruction will be + // changed to an OP_Noop once we figure out that the sorting index is + // not needed. The sSort.addrSortIndex variable is used to facilitate + // that change. + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + goto __51 + } + pKeyInfo = Xsqlite3KeyInfoFromExprList(tls, + pParse, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy, 0, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FiECursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FaddrSortIndex = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, + (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FiECursor, (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr+1+(*ExprList)(unsafe.Pointer(pEList)).FnExpr, 0, + pKeyInfo, -9) + goto __52 +__51: + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FaddrSortIndex = -1 +__52: + ; + + // If the output is destined for a temporary table, open that table. + if !(int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) == SRT_EphemTab) { + goto __53 + } + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) +__53: + ; + + // Set the limiter. + iEnd = Xsqlite3VdbeMakeLabel(tls, pParse) + if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit) == U32(0)) { + goto __54 + } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) // 4 billion rows +__54: + ; + computeLimitRegisters(tls, pParse, p, iEnd) + if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + goto __55 + } + Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex, uint8(OP_SorterOpen)) + *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) +__55: + ; + + // Open an ephemeral index to use for the distinct set. + if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { + goto __56 + } + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, + (*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FtabTnct, 0, 0, + Xsqlite3KeyInfoFromExprList(tls, pParse, (*Select)(unsafe.Pointer(p)).FpEList, 0, 0), + -9) + Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) + goto __57 +__56: + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__57: + ; + + if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { + goto __58 + } + // No aggregate functions and no GROUP BY clause + wctrlFlags = U16(func() uint32 { + if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 { + return uint32(WHERE_WANT_DISTINCT) + } + return uint32(0) + }() | + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) + pWin = (*Select)(unsafe.Pointer(p)).FpWin // Main window object (or NULL) + if !(pWin != 0) { + goto __60 + } + Xsqlite3WindowCodeInit(tls, pParse, p) +__60: + ; + + // Begin the database scan. + + pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy, + (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) + if !(pWInfo == uintptr(0)) { + goto __61 + } + goto select_end +__61: + ; + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { + goto __62 + } + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) +__62: + ; + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + goto __63 + } + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__63: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + goto __64 + } + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) + if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + goto __65 + } + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0) +__65: + ; +__64: + ; + + // If sorting index that was created by a prior OP_OpenEphemeral + // instruction ended up not being needed, then change the OP_OpenEphemeral + // into an OP_Noop. + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { + goto __66 + } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex) +__66: + ; + + if !(pWin != 0) { + goto __67 + } + addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) + iCont = Xsqlite3VdbeMakeLabel(tls, pParse) + iBreak = Xsqlite3VdbeMakeLabel(tls, pParse) + regGosub = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + + Xsqlite3WindowCodeStep(tls, pParse, p, pWInfo, regGosub, addrGosub) + + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, iBreak) + Xsqlite3VdbeResolveLabel(tls, v, addrGosub) + + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FlabelOBLopt = 0 + selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, iCont, iBreak) + Xsqlite3VdbeResolveLabel(tls, v, iCont) + Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) + + Xsqlite3VdbeResolveLabel(tls, v, iBreak) + goto __68 +__67: + + // Use the standard inner loop. + selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, + Xsqlite3WhereContinueLabel(tls, pWInfo), + Xsqlite3WhereBreakLabel(tls, pWInfo)) + + // End the database scan loop. + + Xsqlite3WhereEnd(tls, pWInfo) +__68: + ; + goto __59 +__58: // End of processing for this SELECT + sortPTab = 0 // Pseudotable used to decode sorting results + sortOut = 0 // Output register from the sorter + orderByGrp = 0 // True if the GROUP BY and ORDER BY are the same + + // Remove any and all aliases between the result set and the + // GROUP BY clause. + if !(pGroupBy != 0) { + goto __69 + } // For looping over expression in a list + + k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr + pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 /* &.a */ +__71: + if !(k > 0) { + goto __73 + } + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2 /* &.iAlias */)) = U16(0) + goto __72 +__72: + k-- + pItem2 += 32 + goto __71 + goto __73 +__73: + ; + k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr + pItem2 = pGroupBy + 8 /* &.a */ +__74: + if !(k > 0) { + goto __76 + } + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2 /* &.iAlias */)) = U16(0) + goto __75 +__75: + k-- + pItem2 += 32 + goto __74 + goto __76 +__76: + ; + + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + goto __77 + } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__77: + ; + + // If there is both a GROUP BY and an ORDER BY clause and they are + // identical, then it may be possible to disable the ORDER BY clause + // on the grounds that the GROUP BY will cause elements to come out + // in the correct order. It also may not - the GROUP BY might use a + // database index that causes rows to be grouped together as required + // but not actually sorted. Either way, record the fact that the + // ORDER BY and GROUP BY clauses are the same by setting the orderByGrp + // variable. + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + goto __78 + } + // The GROUP BY processing doesn't care whether rows are delivered in + // ASC or DESC order - only that each group is returned contiguously. + // So set the ASC/DESC flags in the GROUP BY to match those in the + // ORDER BY to maximize the chances of rows being delivered in an + // order that makes the ORDER BY redundant. + ii = 0 +__79: + if !(ii < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { + goto __81 + } + sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii)*32)).FsortFlags) & KEYINFO_ORDER_DESC) + (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii)*32)).FsortFlags = sortFlags + goto __80 +__80: + ii++ + goto __79 + goto __81 +__81: + ; + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __82 + } + orderByGrp = 1 +__82: + ; +__78: + ; + goto __70 +__69: + ; + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) +__70: + ; + + // Create a label to jump to when we want to abort the query + addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) + + // Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in + // sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the + // SELECT statement. + pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) + if !(pAggInfo != 0) { + goto __83 + } + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{agginfoFree})), pAggInfo) + +__83: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __84 + } + goto select_end +__84: + ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId + libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 152 /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp + 152 /* &sNC */)).FpSrcList = pTabList + *(*uintptr)(unsafe.Pointer(bp + 152 + 16)) = pAggInfo + + (*AggInfo)(unsafe.Pointer(pAggInfo)).FmnReg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = func() int32 { + if pGroupBy != 0 { + return (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr + } + return 0 + }() + (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy = pGroupBy + Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) + Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy) + if !(pHaving != 0) { + goto __85 + } + if !(pGroupBy != 0) { + goto __86 + } + + havingToWhere(tls, pParse, p) + pWhere = (*Select)(unsafe.Pointer(p)).FpWhere +__86: + ; + Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) +__85: + ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator = (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + if !((*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(0) && (*Select)(unsafe.Pointer(p)).FpHaving == uintptr(0) && (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1) { + goto __87 + } + minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) + goto __88 +__87: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__88: + ; + i = 0 +__89: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { + goto __91 + } + pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr + + *(*int32)(unsafe.Pointer(bp + 152 + 40)) |= NC_InAggFunc + Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) + + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { + goto __92 + } + Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) +__92: + ; + *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) + goto __90 +__90: + i++ + goto __89 + goto __91 +__91: + ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __93 + } + goto select_end +__93: + ; + + // Processing for aggregates with GROUP BY is very different and + // much more complex than aggregates without a GROUP BY. + if !(pGroupBy != 0) { + goto __94 + } // Return address register for reset subroutine + pDistinct = uintptr(0) + distFlag = U16(0) + eDist = WHERE_DISTINCT_NOOP + + if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && + (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0 && + (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr != uintptr(0) && + (*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr)).Fflags&U32(EP_xIsSelect) == U32(0) && + *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) != uintptr(0)) { + goto __96 + } + pExpr1 = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) + 8)).FpExpr + pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0) + pDistinct = Xsqlite3ExprListDup(tls, db, pGroupBy, 0) + pDistinct = Xsqlite3ExprListAppend(tls, pParse, pDistinct, pExpr1) + if pDistinct != 0 { + distFlag = uint16(WHERE_WANT_DISTINCT | WHERE_AGG_DISTINCT) + } else { + distFlag = uint16(0) + } +__96: + ; + + // If there is a GROUP BY clause we might need a sorting index to + // implement it. Allocate that sorting index now. If it turns out + // that we do not need it after all, the OP_SorterOpen instruction + // will be converted into a Noop. + (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, + 0, (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) + addrSortingIdx = Xsqlite3VdbeAddOp4(tls, v, OP_SorterOpen, + (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn, + 0, pKeyInfo1, -9) + + // Initialize memory locations used by GROUP BY aggregate processing + iUseFlag = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + iAbortFlag = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regOutputRow = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + addrOutputRow = Xsqlite3VdbeMakeLabel(tls, pParse) + regReset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + addrReset = Xsqlite3VdbeMakeLabel(tls, pParse) + iAMem = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr + iBMem = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, iAbortFlag) + + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, iAMem, iAMem+(*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr-1) + + // Begin a loop that will extract all source rows in GROUP BY order. + // This might involve two separate loops with an OP_Sort in between, or + // it might be a single loop that uses an index to extract information + // in the right order to begin with. + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) + + pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, + uintptr(0), uint16(WHERE_GROUPBY|func() int32 { + if orderByGrp != 0 { + return WHERE_SORTBYGROUP + } + return 0 + }()|int32(distFlag)), 0) + if !(pWInfo == uintptr(0)) { + goto __97 + } + Xsqlite3ExprListDelete(tls, db, pDistinct) + goto select_end +__97: + ; + eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) + + if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { + goto __98 + } + // The optimizer is able to deliver rows in group by order so + // we do not have to sort. The OP_OpenEphemeral table will be + // cancelled later because we still need to use the pKeyInfo + groupBySort = 0 + goto __99 +__98: + + explainTempTable(tls, pParse, + func() uintptr { + if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { + return ts + 19665 /* "DISTINCT" */ + } + return ts + 19674 /* "GROUP BY" */ + }()) + + groupBySort = 1 + nGroupBy = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr + nCol = nGroupBy + j = nGroupBy + i = 0 +__100: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { + goto __102 + } + if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { + goto __103 + } + nCol++ + j++ +__103: + ; + goto __101 +__101: + i++ + goto __100 + goto __102 +__102: + ; + regBase = Xsqlite3GetTempRange(tls, pParse, nCol) + Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) + j = nGroupBy + i = 0 +__104: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { + goto __106 + } + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 + if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { + goto __107 + } + r1 = j + regBase + Xsqlite3ExprCodeGetColumnOfTable(tls, v, + (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab, (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable, int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn), r1) + j++ +__107: + ; + goto __105 +__105: + i++ + goto __104 + goto __106 +__106: + ; + regRecord = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) + Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) + Xsqlite3ReleaseTempReg(tls, pParse, regRecord) + Xsqlite3ReleaseTempRange(tls, pParse, regBase, nCol) + + Xsqlite3WhereEnd(tls, pWInfo) + (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab = libc.AssignInt32(&sortPTab, libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)) + sortOut = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenPseudo, sortPTab, sortOut, nCol) + Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) + + (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) +__99: + ; + + // If the index or temporary table used by the GROUP BY sort + // will naturally deliver rows in the order required by the ORDER BY + // clause, cancel the ephemeral table open coded earlier. + // + // This is an optimization - the correct answer should result regardless. + // Use the SQLITE_GroupByOrder flag with SQLITE_TESTCTRL_OPTIMIZER to + // disable this optimization for testing purposes. + if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && + (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { + goto __108 + } + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0) + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex) +__108: + ; + + // Evaluate the current GROUP BY terms and store in b0, b1, b2... + // (b0 is memory location iBMem+0, b1 is iBMem+1, and so forth) + // Then compare the current GROUP BY terms against the GROUP BY terms + // from the previous row currently stored in a0, a1, a2... + addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) + if !(groupBySort != 0) { + goto __109 + } + Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, + sortOut, sortPTab) +__109: + ; + j = 0 +__110: + if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { + goto __112 + } + if !(groupBySort != 0) { + goto __113 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) + goto __114 +__113: + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) +__114: + ; + goto __111 +__111: + j++ + goto __110 + goto __112 +__112: + ; + Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, + Xsqlite3KeyInfoRef(tls, pKeyInfo1), -9) + addr1 = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addr1+1, 0, addr1+1) + + // Generate code that runs whenever the GROUP BY changes. + // Changes in the GROUP BY are detected by the previous code + // block. If there were no changes, this block is skipped. + // + // This code copies current group by terms in b0,b1,b2,... + // over to a0,a1,a2. It then calls the output subroutine + // and resets the aggregate accumulator registers in preparation + // for the next GROUP BY batch. + Xsqlite3ExprCodeMove(tls, pParse, iBMem, iAMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutputRow, addrOutputRow) + + Xsqlite3VdbeAddOp2(tls, v, OP_IfPos, iAbortFlag, addrEnd) + + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) + + // Update the aggregate accumulators based on the content of + // the current row + Xsqlite3VdbeJumpHere(tls, v, addr1) + updateAccumulator(tls, pParse, iUseFlag, pAggInfo, eDist) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) + + // End of the loop + if !(groupBySort != 0) { + goto __115 + } + Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) + + goto __116 +__115: + ; + Xsqlite3WhereEnd(tls, pWInfo) + Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) +__116: + ; + Xsqlite3ExprListDelete(tls, db, pDistinct) + + // Output the final row of result + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutputRow, addrOutputRow) + + // Jump over the subroutines + Xsqlite3VdbeGoto(tls, v, addrEnd) + + // Generate a subroutine that outputs a single row of the result + // set. This subroutine first looks at the iUseFlag. If iUseFlag + // is less than or equal to zero, the subroutine is a no-op. If + // the processing calls for the query to abort, this subroutine + // increments the iAbortFlag memory location before returning in + // order to signal the caller to abort. + addrSetAbort = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iAbortFlag) + + Xsqlite3VdbeAddOp1(tls, v, OP_Return, regOutputRow) + Xsqlite3VdbeResolveLabel(tls, v, addrOutputRow) + addrOutputRow = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp2(tls, v, OP_IfPos, iUseFlag, addrOutputRow+2) + + Xsqlite3VdbeAddOp1(tls, v, OP_Return, regOutputRow) + finalizeAggFunctions(tls, pParse, pAggInfo) + Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL) + selectInnerLoop(tls, pParse, p, -1, bp+48, + bp+136, pDest, + addrOutputRow+1, addrSetAbort) + Xsqlite3VdbeAddOp1(tls, v, OP_Return, regOutputRow) + + // Generate a subroutine that will reset the group-by accumulator + Xsqlite3VdbeResolveLabel(tls, v, addrReset) + resetAccumulator(tls, pParse, pAggInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, iUseFlag) + + Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) + + if !(eDist != WHERE_DISTINCT_NOOP) { + goto __117 + } + pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) +__117: + ; + goto __95 +__94: + if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { + goto __118 + } + // If isSimpleCount() returns a pointer to a Table structure, then + // the SQL statement is of the form: + // + // SELECT count(*) FROM + // + // where the Table structure returned represents table . + // + // This statement is so common that it is optimized specially. The + // OP_Count instruction is executed either on the intkey table that + // contains the data for table or on one of its indexes. It + // is better to execute the op on an index, as indexes are almost + // always spread across less pages than their corresponding tables. + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) + iCsr = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Iterator variable + pKeyInfo2 = uintptr(0) // Keyinfo for scanned index + pBest = uintptr(0) // Best index found so far + iRoot = (*Table)(unsafe.Pointer(pTab1)).Ftnum // Root page of scanned b-tree + + Xsqlite3CodeVerifySchema(tls, pParse, iDb) + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) + + // Search for the index that has the lowest scan cost. + // + // (2011-04-15) Do not do a full scan of an unordered index. + // + // (2013-10-03) Do not count the entries in a partial index. + // + // In practice the KeyInfo structure will not be used. It is only + // passed to keep OP_OpenRead happy. + if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __120 + } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__120: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + goto __121 + } + pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex +__122: + if !(pIdx != 0) { + goto __124 + } + if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x4>>2) == 0 && + int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Table)(unsafe.Pointer(pTab1)).FszTabRow) && + (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) && + (!(pBest != 0) || int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Index)(unsafe.Pointer(pBest)).FszIdxRow))) { + goto __125 + } + pBest = pIdx +__125: + ; + goto __123 +__123: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __122 + goto __124 +__124: + ; +__121: + ; + if !(pBest != 0) { + goto __126 + } + iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum + pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) +__126: + ; + + // Open a read-only cursor, execute the OP_Count, close the cursor. + Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) + if !(pKeyInfo2 != 0) { + goto __127 + } + Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -9) +__127: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Count, iCsr, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiMem) + Xsqlite3VdbeAddOp1(tls, v, OP_Close, iCsr) + explainSimpleCount(tls, pParse, pTab1, pBest) + goto __119 +__118: + regAcc = 0 // "populate accumulators" flag + pDistinct1 = uintptr(0) + distFlag1 = U16(0) + + // If there are accumulator registers but no min() or max() functions + // without FILTER clauses, allocate register regAcc. Register regAcc + // will contain 0 the first time the inner loop runs, and 1 thereafter. + // The code generated by updateAccumulator() uses this to ensure + // that the accumulator registers are (a) updated only once if + // there are no min() or max functions or (b) always updated for the + // first row visited by the aggregate, so that they are updated at + // least once even if the FILTER clause means the min() or max() + // function visits zero rows. + if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { + goto __128 + } + i = 0 +__130: + if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { + goto __132 + } + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { + goto __133 + } + goto __131 +__133: + ; + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __134 + } + goto __132 +__134: + ; + goto __131 +__131: + i++ + goto __130 + goto __132 +__132: + ; + if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { + goto __135 + } + regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) +__135: + ; + goto __129 +__128: + if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { + goto __136 + } + + pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) + if pDistinct1 != 0 { + distFlag1 = uint16(WHERE_WANT_DISTINCT | WHERE_AGG_DISTINCT) + } else { + distFlag1 = uint16(0) + } +__136: + ; +__129: + ; + + // This case runs if the aggregate has no GROUP BY clause. The + // processing is much simpler since there is only a single row + // of output. + + resetAccumulator(tls, pParse, pAggInfo) + + // If this query is a candidate for the min/max optimization, then + // minMaxFlag will have been previously set to either + // WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX and pMinMaxOrderBy will + // be an appropriate ORDER BY expression for the optimization. + + pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */)), + pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + if !(pWInfo == uintptr(0)) { + goto __137 + } + goto select_end +__137: + ; + + eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) + updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) + if !(eDist1 != WHERE_DISTINCT_NOOP) { + goto __138 + } + pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) +__138: + ; + + if !(regAcc != 0) { + goto __139 + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) +__139: + ; + if !(minMaxFlag != 0) { + goto __140 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__140: + ; + + Xsqlite3WhereEnd(tls, pWInfo) + finalizeAggFunctions(tls, pParse, pAggInfo) +__119: + ; + + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0) + Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) + selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), + pDest, addrEnd, addrEnd) +__95: + ; + Xsqlite3VdbeResolveLabel(tls, v, addrEnd) + +__59: + ; // endif aggregate query + + if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { + goto __141 + } + explainTempTable(tls, pParse, ts+19665) +__141: + ; + + // If there is an ORDER BY clause, then we need to sort the results + // and send them to the callback one by one. + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + goto __142 + } + explainTempTable(tls, pParse, + func() uintptr { + if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { + return ts + 19683 /* "RIGHT PART OF OR..." */ + } + return ts + 19706 /* "ORDER BY" */ + }()) + + generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) +__142: + ; + + // Jump here to skip this query + Xsqlite3VdbeResolveLabel(tls, v, iEnd) + + // The SELECT has been coded. If there is an error in the Parse structure, + // set the return code to 1. Otherwise 0. + rc = libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FnErr > 0) + + // Control jumps to here if an error is encountered above, or upon + // successful coding of the SELECT. +select_end: + ; + + Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */))) + + Xsqlite3VdbeExplainPop(tls, pParse) + return rc +} + +//************* End of select.c ********************************************* +//************* Begin file table.c ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the sqlite3_get_table() and sqlite3_free_table() +// interface routines. These are just wrappers around the main +// interface routine of sqlite3_exec(). +// +// These routines are in a separate files so that they will not be linked +// if they are not used. +// #include "sqliteInt.h" + +// This structure is used to pass data from sqlite3_get_table() through +// to the callback function is uses to build the result. +type TabResult1 = struct { + FazResult uintptr + FzErrMsg uintptr + FnAlloc U32 + FnRow U32 + FnColumn U32 + FnData U32 + Frc int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:141786:9 */ + +//************* End of select.c ********************************************* +//************* Begin file table.c ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the sqlite3_get_table() and sqlite3_free_table() +// interface routines. These are just wrappers around the main +// interface routine of sqlite3_exec(). +// +// These routines are in a separate files so that they will not be linked +// if they are not used. +// #include "sqliteInt.h" + +// This structure is used to pass data from sqlite3_get_table() through +// to the callback function is uses to build the result. +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ + +// This routine is called once for each row in the result table. Its job +// is to fill in the TabResult structure appropriately, allocating new +// memory as necessary. +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr // Result accumulator + var need int32 // Slots needed in p->azResult[] + var i int32 // Loop counter + var z uintptr + var azNew uintptr + var n int32 + p = pArg // A single column of result + + // Make sure there is enough space in p->azResult to hold everything + // we need to remember from this invocation of the callback. + if !((*TabResult)(unsafe.Pointer(p)).FnRow == U32(0) && argv != uintptr(0)) { + goto __1 + } + need = nCol * 2 + goto __2 +__1: + need = nCol +__2: + ; + if !((*TabResult)(unsafe.Pointer(p)).FnData+U32(need) > (*TabResult)(unsafe.Pointer(p)).FnAlloc) { + goto __3 + } + (*TabResult)(unsafe.Pointer(p)).FnAlloc = (*TabResult)(unsafe.Pointer(p)).FnAlloc*U32(2) + U32(need) + azNew = Xsqlite3Realloc(tls, (*TabResult)(unsafe.Pointer(p)).FazResult, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*TabResult)(unsafe.Pointer(p)).FnAlloc))) + if !(azNew == uintptr(0)) { + goto __4 + } + goto malloc_failed +__4: + ; + (*TabResult)(unsafe.Pointer(p)).FazResult = azNew +__3: + ; + + // If this is the first row, then generate an extra row containing + // the names of all columns. + if !((*TabResult)(unsafe.Pointer(p)).FnRow == U32(0)) { + goto __5 + } + (*TabResult)(unsafe.Pointer(p)).FnColumn = U32(nCol) + i = 0 +__7: + if !(i < nCol) { + goto __9 + } + z = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + if !(z == uintptr(0)) { + goto __10 + } + goto malloc_failed +__10: + ; + *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(p)).FazResult + uintptr(libc.PostIncUint32(&(*TabResult)(unsafe.Pointer(p)).FnData, 1))*8)) = z + goto __8 +__8: + i++ + goto __7 + goto __9 +__9: + ; + goto __6 +__5: + if !(int32((*TabResult)(unsafe.Pointer(p)).FnColumn) != nCol) { + goto __11 + } + Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) + (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, + ts+19715, 0) + (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + return 1 +__11: + ; +__6: + ; + + // Copy over the row data + if !(argv != uintptr(0)) { + goto __12 + } + i = 0 +__13: + if !(i < nCol) { + goto __15 + } + if !(*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) == uintptr(0)) { + goto __16 + } + z = uintptr(0) + goto __17 +__16: + n = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + 1 + z = Xsqlite3_malloc64(tls, uint64(n)) + if !(z == uintptr(0)) { + goto __18 + } + goto malloc_failed +__18: + ; + libc.Xmemcpy(tls, z, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), uint64(n)) +__17: + ; + *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(p)).FazResult + uintptr(libc.PostIncUint32(&(*TabResult)(unsafe.Pointer(p)).FnData, 1))*8)) = z + goto __14 +__14: + i++ + goto __13 + goto __15 +__15: + ; + (*TabResult)(unsafe.Pointer(p)).FnRow++ +__12: + ; + return 0 + +malloc_failed: + (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + return 1 +} + +// Query the database. But instead of invoking a callback for each row, +// malloc() for space to hold the result and return the entire results +// at the conclusion of the call. +// +// The result that is written to ***pazResult is held in memory obtained +// from malloc(). But the caller cannot free this memory directly. +// Instead, the entire table should be passed to sqlite3_free_table() when +// the calling procedure is finished using it. +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var rc int32 + // var res TabResult at bp+8, 40 + + *(*uintptr)(unsafe.Pointer(pazResult)) = uintptr(0) + if pnColumn != 0 { + *(*int32)(unsafe.Pointer(pnColumn)) = 0 + } + if pnRow != 0 { + *(*int32)(unsafe.Pointer(pnRow)) = 0 + } + if pzErrMsg != 0 { + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0) + } + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FzErrMsg = uintptr(0) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnRow = U32(0) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnColumn = U32(0) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnData = U32(1) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnAlloc = U32(20) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).Frc = SQLITE_OK + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*TabResult)(unsafe.Pointer(bp+8)).FnAlloc))) + if (*TabResult)(unsafe.Pointer(bp+8)).FazResult == uintptr(0) { + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_NOMEM + return SQLITE_NOMEM + } + *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult)) = uintptr(0) + rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + }{sqlite3_get_table_cb})), bp+8 /* &res */, pzErrMsg) + + *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult)) = uintptr(int64((*TabResult)(unsafe.Pointer(bp + 8)).FnData)) + if rc&0xff == SQLITE_ABORT { + Xsqlite3_free_table(tls, (*TabResult)(unsafe.Pointer(bp+8)).FazResult+1*8) + if (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { + if pzErrMsg != 0 { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErrMsg))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg)) + } + Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg) + } + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).Frc // Assume 32-bit assignment is atomic + return (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).Frc + } + Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg) + if rc != SQLITE_OK { + Xsqlite3_free_table(tls, (*TabResult)(unsafe.Pointer(bp+8)).FazResult+1*8) + return rc + } + if (*TabResult)(unsafe.Pointer(bp+8)).FnAlloc > (*TabResult)(unsafe.Pointer(bp+8)).FnData { + var azNew uintptr + azNew = Xsqlite3Realloc(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FazResult, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*TabResult)(unsafe.Pointer(bp+8)).FnData))) + if azNew == uintptr(0) { + Xsqlite3_free_table(tls, (*TabResult)(unsafe.Pointer(bp+8)).FazResult+1*8) + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_NOMEM + return SQLITE_NOMEM + } + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult = azNew + } + *(*uintptr)(unsafe.Pointer(pazResult)) = (*TabResult)(unsafe.Pointer(bp+8)).FazResult + 1*8 + if pnColumn != 0 { + *(*int32)(unsafe.Pointer(pnColumn)) = int32((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnColumn) + } + if pnRow != 0 { + *(*int32)(unsafe.Pointer(pnRow)) = int32((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnRow) + } + return rc +} + +// This routine frees the space the sqlite3_get_table() malloced. +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ + if azResult != 0 { + var i int32 + var n int32 + azResult -= 8 + + n = int32(*(*uintptr)(unsafe.Pointer(azResult))) + for i = 1; i < n; i++ { + if *(*uintptr)(unsafe.Pointer(azResult + uintptr(i)*8)) != 0 { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(azResult + uintptr(i)*8))) + } + } + Xsqlite3_free(tls, azResult) + } +} + +//************* End of table.c ********************************************** +//************* Begin file trigger.c **************************************** +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains the implementation for TRIGGERs +// #include "sqliteInt.h" + +// Delete a linked list of TriggerStep structures. +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ + for pTriggerStep != 0 { + var pTmp uintptr = pTriggerStep + pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext + + Xsqlite3ExprDelete(tls, db, (*TriggerStep)(unsafe.Pointer(pTmp)).FpWhere) + Xsqlite3ExprListDelete(tls, db, (*TriggerStep)(unsafe.Pointer(pTmp)).FpExprList) + Xsqlite3SelectDelete(tls, db, (*TriggerStep)(unsafe.Pointer(pTmp)).FpSelect) + Xsqlite3IdListDelete(tls, db, (*TriggerStep)(unsafe.Pointer(pTmp)).FpIdList) + Xsqlite3UpsertDelete(tls, db, (*TriggerStep)(unsafe.Pointer(pTmp)).FpUpsert) + Xsqlite3SrcListDelete(tls, db, (*TriggerStep)(unsafe.Pointer(pTmp)).FpFrom) + Xsqlite3DbFree(tls, db, (*TriggerStep)(unsafe.Pointer(pTmp)).FzSpan) + + Xsqlite3DbFree(tls, db, pTmp) + } +} + +// Given table pTab, return a list of all the triggers attached to +// the table. The list is connected by Trigger.pNext pointers. +// +// All of the triggers on pTab that are in the same database as pTab +// are already attached to pTab->pTrigger. But there might be additional +// triggers on pTab in the TEMP schema. This routine prepends all +// TEMP triggers on pTab to the beginning of the pTab->pTrigger list +// and returns the combined list. +// +// To state it another way: This routine returns a list of all triggers +// that fire off of pTab. The list will include any TEMP triggers on +// pTab as well as the triggers lised in pTab->pTrigger. +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ + var pTmpSchema uintptr // Schema of the pTab table + var pList uintptr // List of triggers to return + var p uintptr // Loop variable for TEMP triggers + + if (*Parse)(unsafe.Pointer(pParse)).FdisableTriggers != 0 { + return uintptr(0) + } + pTmpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + 1*32)).FpSchema + p = (*Hash)(unsafe.Pointer(pTmpSchema + 56)).Ffirst + pList = (*Table)(unsafe.Pointer(pTab)).FpTrigger + for p != 0 { + var pTrig uintptr = (*HashElem)(unsafe.Pointer(p)).Fdata + if (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema == (*Table)(unsafe.Pointer(pTab)).FpSchema && + (*Trigger)(unsafe.Pointer(pTrig)).Ftable != 0 && + 0 == Xsqlite3StrICmp(tls, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, (*Table)(unsafe.Pointer(pTab)).FzName) && + (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema != pTmpSchema { + (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList + pList = pTrig + } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING && + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpVtabCtx == uintptr(0) { + + (*Trigger)(unsafe.Pointer(pTrig)).Ftable = (*Table)(unsafe.Pointer(pTab)).FzName + (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema + (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList + pList = pTrig + } + p = (*HashElem)(unsafe.Pointer(p)).Fnext + } + return pList +} + +// This is called by the parser when it sees a CREATE TRIGGER statement +// up to the point of the BEGIN before the trigger actions. A Trigger +// structure is generated based on the information available and stored +// in pParse->pNewTrigger. After the trigger actions have been parsed, the +// sqlite3FinishTrigger() function is called to complete the trigger +// construction process. +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var pTrigger uintptr // The new trigger + var pTab uintptr // Table that the trigger fires off of + var zName uintptr // Name of the trigger + var db uintptr // The database connection + var iDb int32 // The database to store the trigger in + // var pName uintptr at bp+32, 8 + // The unqualified db name + // var sFix DbFixer at bp+40, 96 + + var iTabDb int32 + var code int32 + var zDb uintptr + var zDbTrig uintptr + pTrigger = uintptr(0) + zName = uintptr(0) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb // State vector for the DB fixer + + // pName1->z might be NULL, but not pName1 itself + + if !(isTemp != 0) { + goto __1 + } + // If TEMP was specified, then the trigger name may not be qualified. + if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { + goto __3 + } + Xsqlite3ErrorMsg(tls, pParse, ts+19780, 0) + goto trigger_cleanup +__3: + ; + iDb = 1 + *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)) = pName1 + goto __2 +__1: + // Figure out the db that the trigger will be created in + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+32) + if !(iDb < 0) { + goto __4 + } + goto trigger_cleanup +__4: + ; +__2: + ; + if !(!(pTableName != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __5 + } + goto trigger_cleanup +__5: + ; + + // A long-standing parser bug is that this syntax was allowed: + // + // CREATE TRIGGER attached.demo AFTER INSERT ON attached.tab .... + // ^^^^^^^^ + // + // To maintain backwards compatibility, ignore the database + // name on pTableName if we are reparsing out of the schema table + if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && iDb != 1) { + goto __6 + } + Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pTableName+8)).FzDatabase) + (*SrcItem)(unsafe.Pointer(pTableName + 8)).FzDatabase = uintptr(0) +__6: + ; + + // If the trigger name was unqualified, and the table is a temp table, + // then set iDb to 1 to create the trigger in the temporary database. + // If sqlite3SrcListLookup() returns 0, indicating the table does not + // exist, the error is caught by the block below. + pTab = Xsqlite3SrcListLookup(tls, pParse, pTableName) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && (*Token)(unsafe.Pointer(pName2)).Fn == uint32(0) && pTab != 0 && + (*Table)(unsafe.Pointer(pTab)).FpSchema == (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema) { + goto __7 + } + iDb = 1 +__7: + ; + + // Ensure the table name matches database name and that the table exists + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __8 + } + goto trigger_cleanup +__8: + ; + + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19826, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { + goto __9 + } + goto trigger_cleanup +__9: + ; + pTab = Xsqlite3SrcListLookup(tls, pParse, pTableName) + if !!(pTab != 0) { + goto __10 + } + // The table does not exist. + goto trigger_orphan_error +__10: + ; + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __11 + } + Xsqlite3ErrorMsg(tls, pParse, ts+19834, 0) + goto trigger_orphan_error +__11: + ; + + // Check that the trigger name is not reserved and that no trigger of the + // specified name exists + zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + if !(zName == uintptr(0)) { + goto __12 + } + + goto trigger_cleanup +__12: + ; + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19826, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + goto __13 + } + goto trigger_cleanup +__13: + ; + + if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __14 + } + if !(Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema+56, zName) != 0) { + goto __15 + } + if !!(noErr != 0) { + goto __16 + } + Xsqlite3ErrorMsg(tls, pParse, ts+19875, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + goto __17 +__16: + ; + Xsqlite3CodeVerifySchema(tls, pParse, iDb) +__17: + ; + goto trigger_cleanup +__15: + ; +__14: + ; + + // Do not create a trigger on a system table + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8010, 7) == 0) { + goto __18 + } + Xsqlite3ErrorMsg(tls, pParse, ts+19901, 0) + goto trigger_cleanup +__18: + ; + + // INSTEAD of triggers are only for views and views only support INSTEAD + // of triggers. + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { + goto __19 + } + Xsqlite3ErrorMsg(tls, pParse, ts+19939, + libc.VaList(bp+8, func() uintptr { + if tr_tm == TK_BEFORE { + return ts + 19976 /* "BEFORE" */ + } + return ts + 19983 /* "AFTER" */ + }(), pTableName+8 /* &.a */)) + goto trigger_orphan_error +__19: + ; + if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) && tr_tm == TK_INSTEAD) { + goto __20 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+19989, libc.VaList(bp+24, pTableName+8)) + goto trigger_orphan_error +__20: + ; + + if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __21 + } + iTabDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + code = SQLITE_CREATE_TRIGGER + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iTabDb)*32)).FzDbSName + if isTemp != 0 { + zDbTrig = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName + } else { + zDbTrig = zDb + } + if !(iTabDb == 1 || isTemp != 0) { + goto __22 + } + code = SQLITE_CREATE_TEMP_TRIGGER +__22: + ; + if !(Xsqlite3AuthCheck(tls, pParse, code, zName, (*Table)(unsafe.Pointer(pTab)).FzName, zDbTrig) != 0) { + goto __23 + } + goto trigger_cleanup +__23: + ; + if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { + if !(0 != 0) && iTabDb == 1 { + return ts + 12024 + } + return ts + 5835 + }(), uintptr(0), zDb) != 0) { + goto __24 + } + goto trigger_cleanup +__24: + ; +__21: + ; + + // INSTEAD OF triggers can only appear on views and BEFORE triggers + // cannot appear on views. So we might as well translate every + // INSTEAD OF trigger into a BEFORE trigger. It simplifies code + // elsewhere. + if !(tr_tm == TK_INSTEAD) { + goto __25 + } + tr_tm = TK_BEFORE +__25: + ; + + // Build the Trigger object + pTrigger = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Trigger{}))) + if !(pTrigger == uintptr(0)) { + goto __26 + } + goto trigger_cleanup +__26: + ; + (*Trigger)(unsafe.Pointer(pTrigger)).FzName = zName + zName = uintptr(0) + (*Trigger)(unsafe.Pointer(pTrigger)).Ftable = Xsqlite3DbStrDup(tls, db, (*SrcItem)(unsafe.Pointer(pTableName+8)).FzName) + (*Trigger)(unsafe.Pointer(pTrigger)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema + (*Trigger)(unsafe.Pointer(pTrigger)).Fop = U8(op) + (*Trigger)(unsafe.Pointer(pTrigger)).Ftr_tm = func() uint8 { + if tr_tm == TK_BEFORE { + return uint8(TRIGGER_BEFORE) + } + return uint8(TRIGGER_AFTER) + }() + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __27 + } + Xsqlite3RenameTokenRemap(tls, pParse, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable, (*SrcItem)(unsafe.Pointer(pTableName+8)).FzName) + (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen = pWhen + pWhen = uintptr(0) + goto __28 +__27: + (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen = Xsqlite3ExprDup(tls, db, pWhen, EXPRDUP_REDUCE) +__28: + ; + (*Trigger)(unsafe.Pointer(pTrigger)).FpColumns = pColumns + pColumns = uintptr(0) + + (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger = pTrigger + +trigger_cleanup: + Xsqlite3DbFree(tls, db, zName) + Xsqlite3SrcListDelete(tls, db, pTableName) + Xsqlite3IdListDelete(tls, db, pColumns) + Xsqlite3ExprDelete(tls, db, pWhen) + if !!(int32((*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) != 0) { + goto __29 + } + Xsqlite3DeleteTrigger(tls, db, pTrigger) + goto __30 +__29: + ; +__30: + ; + return + +trigger_orphan_error: + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) == 1) { + goto __31 + } + // Ticket #3810. + // Normally, whenever a table is dropped, all associated triggers are + // dropped too. But if a TEMP trigger is created on a non-TEMP table + // and the table is dropped by a different database connection, the + // trigger is not visible to the database connection that does the + // drop so the trigger cannot be dropped. This results in an + // "orphaned trigger" - a trigger whose associated table is missing. + // + // 2020-11-05 see also https://sqlite.org/forum/forumpost/157dc791df + libc.SetBitFieldPtr8Uint32(db+192+8, uint32(1), 0, 0x1) +__31: + ; + goto trigger_cleanup +} + +// This routine is called after all of the trigger actions have been parsed +// in order to complete the process of building the trigger. +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ + bp := tls.Alloc(152) + defer tls.Free(152) + + var pTrig uintptr // Trigger being finished + var zName uintptr // Name of trigger + var db uintptr // The database + // var sFix DbFixer at bp+56, 96 + // Fixer object + var iDb int32 // Database containing the trigger + // var nameToken Token at bp+40, 16 + + var v uintptr + var z uintptr + var pTab uintptr + var pLink uintptr + var pHash uintptr + pTrig = (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger + db = (*Parse)(unsafe.Pointer(pParse)).Fdb // Trigger name for error reporting + + (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger = uintptr(0) + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0 || !(pTrig != 0)) { + goto __1 + } + goto triggerfinish_cleanup +__1: + ; + zName = (*Trigger)(unsafe.Pointer(pTrig)).FzName + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Trigger)(unsafe.Pointer(pTrig)).FpSchema) + (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list = pStepList +__2: + if !(pStepList != 0) { + goto __3 + } + (*TriggerStep)(unsafe.Pointer(pStepList)).FpTrig = pTrig + pStepList = (*TriggerStep)(unsafe.Pointer(pStepList)).FpNext + goto __2 +__3: + ; + Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19826, bp+40) + if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || + Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { + goto __4 + } + goto triggerfinish_cleanup +__4: + ; + + if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + goto __5 + } + + (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger = pTrig + pTrig = uintptr(0) + goto __6 +__5: + + // if we are not initializing, + // build the sqlite_schema entry + if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { + goto __7 + } + + // Make an entry in the sqlite_schema table + v = Xsqlite3GetVdbe(tls, pParse) + if !(v == uintptr(0)) { + goto __8 + } + goto triggerfinish_cleanup +__8: + ; + Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) + z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) + + Xsqlite3NestedParse(tls, pParse, + + ts+20035, + libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, + (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) + Xsqlite3DbFree(tls, db, z) + Xsqlite3ChangeCookie(tls, pParse, iDb) + Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, + Xsqlite3MPrintf(tls, db, ts+20110, libc.VaList(bp+32, zName)), uint16(0)) +__7: + ; +__6: + ; + + if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0) { + goto __9 + } + pLink = pTrig + pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 56 + + pTrig = Xsqlite3HashInsert(tls, pHash, zName, pTrig) + if !(pTrig != 0) { + goto __10 + } + Xsqlite3OomFault(tls, db) + goto __11 +__10: + if !((*Trigger)(unsafe.Pointer(pLink)).FpSchema == (*Trigger)(unsafe.Pointer(pLink)).FpTabSchema) { + goto __12 + } + pTab = Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pLink)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pLink)).Ftable) + + (*Trigger)(unsafe.Pointer(pLink)).FpNext = (*Table)(unsafe.Pointer(pTab)).FpTrigger + (*Table)(unsafe.Pointer(pTab)).FpTrigger = pLink +__12: + ; +__11: + ; +__9: + ; + +triggerfinish_cleanup: + Xsqlite3DeleteTrigger(tls, db, pTrig) + + Xsqlite3DeleteTriggerStep(tls, db, pStepList) +} + +// Duplicate a range of text from an SQL statement, then convert all +// whitespace characters into ordinary space characters. +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ + var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) + var i int32 + if z != 0 { + for i = 0; *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0; i++ { + if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x01 != 0 { + *(*uint8)(unsafe.Pointer(z + uintptr(i))) = uint8(' ') + } + } + } + return z +} + +// Turn a SELECT statement (that the pSelect parameter points to) into +// a trigger step. Return a pointer to a TriggerStep structure. +// +// The parser calls this routine when it finds a SELECT statement in +// body of a TRIGGER. +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ + var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) + if pTriggerStep == uintptr(0) { + Xsqlite3SelectDelete(tls, db, pSelect) + return uintptr(0) + } + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).Fop = U8(TK_SELECT) + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpSelect = pSelect + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).Forconf = U8(OE_Default) + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FzSpan = triggerSpanDup(tls, db, zStart, zEnd) + return pTriggerStep +} + +// Allocate space to hold a new trigger step. The allocated space +// holds both the TriggerStep object and the TriggerStep.target.z string. +// +// If an OOM error occurs, NULL is returned and db->mallocFailed is set. +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pTriggerStep uintptr + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } + pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) + if pTriggerStep != 0 { + var z uintptr = pTriggerStep + 1*96 + libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) + Xsqlite3Dequote(tls, z) + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FzTarget = z + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).Fop = op + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FzSpan = triggerSpanDup(tls, db, zStart, zEnd) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameTokenMap(tls, pParse, (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FzTarget, pName) + } + } + return pTriggerStep +} + +// Build a trigger step out of an INSERT statement. Return a pointer +// to the new trigger step. +// +// The parser calls this routine when it sees an INSERT inside the +// body of a trigger. +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pTriggerStep uintptr + + pTriggerStep = triggerStepAllocate(tls, pParse, uint8(TK_INSERT), pTableName, zStart, zEnd) + if pTriggerStep != 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpSelect = pSelect + pSelect = uintptr(0) + } else { + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpSelect = Xsqlite3SelectDup(tls, db, pSelect, EXPRDUP_REDUCE) + } + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpIdList = pColumn + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpUpsert = pUpsert + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).Forconf = orconf + if pUpsert != 0 { + Xsqlite3HasExplicitNulls(tls, pParse, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) + } + } else { + + Xsqlite3IdListDelete(tls, db, pColumn) + + Xsqlite3UpsertDelete(tls, db, pUpsert) + } + Xsqlite3SelectDelete(tls, db, pSelect) + + return pTriggerStep +} + +// Construct a trigger step that implements an UPDATE statement and return +// a pointer to that trigger step. The parser calls this routine when it +// sees an UPDATE statement inside the body of a CREATE TRIGGER. +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pTriggerStep uintptr + + pTriggerStep = triggerStepAllocate(tls, pParse, uint8(TK_UPDATE), pTableName, zStart, zEnd) + if pTriggerStep != 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpExprList = pEList + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpWhere = pWhere + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpFrom = pFrom + pEList = uintptr(0) + pWhere = uintptr(0) + pFrom = uintptr(0) + } else { + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpExprList = Xsqlite3ExprListDup(tls, db, pEList, EXPRDUP_REDUCE) + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpWhere = Xsqlite3ExprDup(tls, db, pWhere, EXPRDUP_REDUCE) + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpFrom = Xsqlite3SrcListDup(tls, db, pFrom, EXPRDUP_REDUCE) + } + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).Forconf = orconf + } + Xsqlite3ExprListDelete(tls, db, pEList) + Xsqlite3ExprDelete(tls, db, pWhere) + Xsqlite3SrcListDelete(tls, db, pFrom) + return pTriggerStep +} + +// Construct a trigger step that implements a DELETE statement and return +// a pointer to that trigger step. The parser calls this routine when it +// sees a DELETE statement inside the body of a CREATE TRIGGER. +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pTriggerStep uintptr + + pTriggerStep = triggerStepAllocate(tls, pParse, uint8(TK_DELETE), pTableName, zStart, zEnd) + if pTriggerStep != 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpWhere = pWhere + pWhere = uintptr(0) + } else { + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpWhere = Xsqlite3ExprDup(tls, db, pWhere, EXPRDUP_REDUCE) + } + (*TriggerStep)(unsafe.Pointer(pTriggerStep)).Forconf = U8(OE_Default) + } + Xsqlite3ExprDelete(tls, db, pWhere) + return pTriggerStep +} + +// Recursively delete a Trigger structure +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ + if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { + return + } + Xsqlite3DeleteTriggerStep(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).Fstep_list) + Xsqlite3DbFree(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).FzName) + Xsqlite3DbFree(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) + Xsqlite3ExprDelete(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen) + Xsqlite3IdListDelete(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).FpColumns) + Xsqlite3DbFree(tls, db, pTrigger) +} + +// +// This function is called to drop a trigger from the database schema. +// +// This may be called directly from the parser and therefore identifies +// the trigger by name. The sqlite3DropTriggerPtr() routine does the +// same job as this routine except it takes a pointer to the trigger +// instead of the trigger name. +// +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pTrigger uintptr + var i int32 + var zDb uintptr + var zName uintptr + var db uintptr + var j int32 + pTrigger = uintptr(0) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __1 + } + goto drop_trigger_cleanup +__1: + ; + if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { + goto __2 + } + goto drop_trigger_cleanup +__2: + ; + + zDb = (*SrcItem)(unsafe.Pointer(pName + 8)).FzDatabase + zName = (*SrcItem)(unsafe.Pointer(pName + 8)).FzName + + i = OMIT_TEMPDB +__3: + if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __5 + } + if i < 2 { + j = i ^ 1 + } else { + j = i + } // Search TEMP before MAIN + if !(zDb != 0 && Xsqlite3DbIsNamed(tls, db, j, zDb) == 0) { + goto __6 + } + goto __4 +__6: + ; + + pTrigger = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(j)*32)).FpSchema+56, zName) + if !(pTrigger != 0) { + goto __7 + } + goto __5 +__7: + ; + goto __4 +__4: + i++ + goto __3 + goto __5 +__5: + ; + if !!(pTrigger != 0) { + goto __8 + } + if !!(noErr != 0) { + goto __9 + } + Xsqlite3ErrorMsg(tls, pParse, ts+20139, libc.VaList(bp, pName+8)) + goto __10 +__9: + Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) +__10: + ; + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + goto drop_trigger_cleanup +__8: + ; + Xsqlite3DropTriggerPtr(tls, pParse, pTrigger) + +drop_trigger_cleanup: + Xsqlite3SrcListDelete(tls, db, pName) +} + +// Return a pointer to the Table structure for the table that a trigger +// is set on. +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ + return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) +} + +// Drop a trigger given a pointer to that trigger. +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pTable uintptr + var v uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var iDb int32 + + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Trigger)(unsafe.Pointer(pTrigger)).FpSchema) + + pTable = tableOfTrigger(tls, pTrigger) + + if pTable != 0 { + var code int32 = SQLITE_DROP_TRIGGER + var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + var zTab uintptr = func() uintptr { + if !(0 != 0) && iDb == 1 { + return ts + 12024 + } + return ts + 5835 + }() + if iDb == 1 { + code = SQLITE_DROP_TEMP_TRIGGER + } + if Xsqlite3AuthCheck(tls, pParse, code, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, (*Table)(unsafe.Pointer(pTable)).FzName, zDb) != 0 || Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0 { + return + } + } + + // Generate code to destroy the database record of the trigger. + if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { + Xsqlite3NestedParse(tls, pParse, + ts+20159, + libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) + Xsqlite3ChangeCookie(tls, pParse, iDb) + Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) + } +} + +// Remove a trigger from the hash tables of the sqlite* pointer. +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ + var pTrigger uintptr + var pHash uintptr + + pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 56 + pTrigger = Xsqlite3HashInsert(tls, pHash, zName, uintptr(0)) + if pTrigger != 0 { + if (*Trigger)(unsafe.Pointer(pTrigger)).FpSchema == (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema { + var pTab uintptr = tableOfTrigger(tls, pTrigger) + if pTab != 0 { + var pp uintptr + for pp = pTab + 88; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 64 { + if *(*uintptr)(unsafe.Pointer(pp)) == pTrigger { + *(*uintptr)(unsafe.Pointer(pp)) = (*Trigger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext + break + } + } + } + } + Xsqlite3DeleteTrigger(tls, db, pTrigger) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) + } +} + +// pEList is the SET clause of an UPDATE statement. Each entry +// in pEList is of the format =. If any of the entries +// in pEList have an which matches an identifier in pIdList, +// then return TRUE. If pIdList==NULL, then it is considered a +// wildcard that matches anything. Likewise if pEList==NULL then +// it matches anything so always return true. Return false only +// if there is no match. +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ + var e int32 + if pIdList == uintptr(0) || pEList == uintptr(0) { + return 1 + } + for e = 0; e < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; e++ { + if Xsqlite3IdListIndex(tls, pIdList, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(e)*32)).FzEName) >= 0 { + return 1 + } + } + return 0 +} + +// Return a list of all triggers on table pTab if there exists at least +// one trigger that must be fired when an operation of type 'op' is +// performed on the table, and, if that operation is an UPDATE, if at +// least one of the columns in pChanges is being modified. +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var mask int32 + var pList uintptr + var p uintptr + mask = 0 + pList = uintptr(0) + + pList = Xsqlite3TriggerList(tls, pParse, pTab) + + if !(pList != uintptr(0)) { + goto __1 + } + p = pList + if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_EnableTrigger) == uint64(0) && + (*Table)(unsafe.Pointer(pTab)).FpTrigger != uintptr(0)) { + goto __2 + } + // The SQLITE_DBCONFIG_ENABLE_TRIGGER setting is off. That means that + // only TEMP triggers are allowed. Truncate the pList so that it + // includes only TEMP triggers + if !(pList == (*Table)(unsafe.Pointer(pTab)).FpTrigger) { + goto __3 + } + pList = uintptr(0) + goto exit_triggers_exist +__3: + ; +__4: + if !((*Trigger)(unsafe.Pointer(p)).FpNext != 0 && (*Trigger)(unsafe.Pointer(p)).FpNext != (*Table)(unsafe.Pointer(pTab)).FpTrigger) { + goto __5 + } + p = (*Trigger)(unsafe.Pointer(p)).FpNext + goto __4 +__5: + ; + (*Trigger)(unsafe.Pointer(p)).FpNext = uintptr(0) + p = pList +__2: + ; +__6: + if !(int32((*Trigger)(unsafe.Pointer(p)).Fop) == op && checkColumnOverlap(tls, (*Trigger)(unsafe.Pointer(p)).FpColumns, pChanges) != 0) { + goto __9 + } + mask = mask | int32((*Trigger)(unsafe.Pointer(p)).Ftr_tm) + goto __10 +__9: + if !(int32((*Trigger)(unsafe.Pointer(p)).Fop) == TK_RETURNING) { + goto __11 + } + // The first time a RETURNING trigger is seen, the "op" value tells + // us what time of trigger it should be. + + (*Trigger)(unsafe.Pointer(p)).Fop = U8(op) + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __13 + } + if !(op != TK_INSERT) { + goto __15 + } + Xsqlite3ErrorMsg(tls, pParse, + ts+20221, + libc.VaList(bp, func() uintptr { + if op == TK_DELETE { + return ts + 20269 /* "DELETE" */ + } + return ts + 20276 /* "UPDATE" */ + }())) +__15: + ; + (*Trigger)(unsafe.Pointer(p)).Ftr_tm = U8(TRIGGER_BEFORE) + goto __14 +__13: + (*Trigger)(unsafe.Pointer(p)).Ftr_tm = U8(TRIGGER_AFTER) +__14: + ; + mask = mask | int32((*Trigger)(unsafe.Pointer(p)).Ftr_tm) + goto __12 +__11: + if !((*Trigger)(unsafe.Pointer(p)).FbReturning != 0 && int32((*Trigger)(unsafe.Pointer(p)).Fop) == TK_INSERT && op == TK_UPDATE && + (*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { + goto __16 + } + // Also fire a RETURNING trigger for an UPSERT + mask = mask | int32((*Trigger)(unsafe.Pointer(p)).Ftr_tm) +__16: + ; +__12: + ; +__10: + ; + p = (*Trigger)(unsafe.Pointer(p)).FpNext + goto __7 +__7: + if p != 0 { + goto __6 + } + goto __8 +__8: + ; +__1: + ; +exit_triggers_exist: + if !(pMask != 0) { + goto __17 + } + *(*int32)(unsafe.Pointer(pMask)) = mask +__17: + ; + return func() uintptr { + if mask != 0 { + return pList + } + return uintptr(0) + }() +} + +// Convert the pStep->zTarget string into a SrcList and return a pointer +// to that SrcList. +// +// This routine adds a specific database name, if needed, to the target when +// forming the SrcList. This prevents a trigger in one database from +// referring to a target in another database. An exception is when the +// trigger is in TEMP in which case it can refer to any other database it +// wants. +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pSrc uintptr // SrcList to be returned + var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) + pSrc = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0)) + + if pSrc != 0 { + var pSchema uintptr = (*Trigger)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpTrig)).FpSchema + (*SrcItem)(unsafe.Pointer(pSrc + 8)).FzName = zName + if pSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { + (*SrcItem)(unsafe.Pointer(pSrc + 8)).FpSchema = pSchema + } + if (*TriggerStep)(unsafe.Pointer(pStep)).FpFrom != 0 { + var pDup uintptr = Xsqlite3SrcListDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpFrom, 0) + pSrc = Xsqlite3SrcListAppendList(tls, pParse, pSrc, pDup) + } + } else { + Xsqlite3DbFree(tls, db, zName) + } + return pSrc +} + +// Return true if the pExpr term from the RETURNING clause argument +// list is of the form "*". Raise an error if the terms if of the +// form "table.*". +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ + + if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { + return 1 + } + if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) != TK_DOT { + return 0 + } + + if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { + return 0 + } + Xsqlite3ErrorMsg(tls, pParse, ts+20283, 0) + return 1 +} + +// The input list pList is the list of result set terms from a RETURNING +// clause. The table that we are returning from is pTab. +// +// This routine makes a copy of the pList, and at the same time expands +// any "*" wildcards to be the complete set of columns from pTab. +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ + var pNew uintptr = uintptr(0) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var i int32 + + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + var pOldExpr uintptr = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr + if pOldExpr == uintptr(0) { + continue + } + if isAsteriskTerm(tls, pParse, pOldExpr) != 0 { + var jj int32 + for jj = 0; jj < int32((*Table)(unsafe.Pointer(pTab)).FnCol); jj++ { + var pNewExpr uintptr + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(jj)*24)).FcolFlags)&COLFLAG_HIDDEN != 0 { + continue + } + pNewExpr = Xsqlite3Expr(tls, db, TK_ID, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(jj)*24)).FzCnName) + pNew = Xsqlite3ExprListAppend(tls, pParse, pNew, pNewExpr) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var pItem uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 + (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrDup(tls, db, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(jj)*24)).FzCnName) + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(ENAME_NAME), 0, 0x3) + } + } + } else { + var pNewExpr uintptr = Xsqlite3ExprDup(tls, db, pOldExpr, 0) + pNew = Xsqlite3ExprListAppend(tls, pParse, pNew, pNewExpr) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) && (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FzEName != uintptr(0) { + var pItem uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 + (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FzEName) + libc.SetBitFieldPtr8Uint32(pItem+20, uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x3>>0)), 0, 0x3) + } + } + } + return pNew +} + +// Generate code for the RETURNING trigger. Unlike other triggers +// that invoke a subprogram in the bytecode, the code for RETURNING +// is generated in-line. +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ + bp := tls.Alloc(304) + defer tls.Free(304) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pNew uintptr + var pReturning uintptr + // var sSelect Select at bp, 128 + + // var sFrom SrcList at bp+128, 120 + + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) + libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) + (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpEList = Xsqlite3ExprListDup(tls, db, (*Returning)(unsafe.Pointer(pReturning)).FpReturnEL, 0) + (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpSrc = bp + 128 /* &sFrom */ + (*SrcList)(unsafe.Pointer(bp + 128 /* &sFrom */)).FnSrc = 1 + (*SrcItem)(unsafe.Pointer(bp + 128 + 8)).FpTab = pTab + (*SrcItem)(unsafe.Pointer(bp + 128 + 8)).FiCursor = -1 + Xsqlite3SelectPrep(tls, pParse, bp, uintptr(0)) + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { + + Xsqlite3GenerateColumnNames(tls, pParse, bp) + } + Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpEList) + pNew = sqlite3ExpandReturning(tls, pParse, (*Returning)(unsafe.Pointer(pReturning)).FpReturnEL, pTab) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + // var sNC NameContext at bp+248, 56 + + libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(NameContext{}))) + if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol == 0 { + (*Returning)(unsafe.Pointer(pReturning)).FnRetCol = (*ExprList)(unsafe.Pointer(pNew)).FnExpr + (*Returning)(unsafe.Pointer(pReturning)).FiRetCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + } + (*NameContext)(unsafe.Pointer(bp + 248 /* &sNC */)).FpParse = pParse + *(*int32)(unsafe.Pointer(bp + 248 + 16)) = regIn + (*NameContext)(unsafe.Pointer(bp + 248 /* &sNC */)).FncFlags = NC_UBaseReg + (*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop + (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = pTab + if Xsqlite3ResolveExprListNames(tls, bp+248, pNew) == SQLITE_OK && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var i int32 + var nCol int32 = (*ExprList)(unsafe.Pointer(pNew)).FnExpr + var reg int32 = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nCol + 2 + (*Returning)(unsafe.Pointer(pReturning)).FiRetReg = reg + for i = 0; i < nCol; i++ { + var pCol uintptr = (*ExprList_item)(unsafe.Pointer(pNew + 8 + uintptr(i)*32)).FpExpr + // Due to !db->mallocFailed ~9 lines above + Xsqlite3ExprCodeFactorable(tls, pParse, pCol, reg+i) + if int32(Xsqlite3ExprAffinity(tls, pCol)) == SQLITE_AFF_REAL { + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, reg+i) + } + } + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, reg, i, reg+i) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, reg+i+1) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, reg+i, reg+i+1) + } + } + Xsqlite3ExprListDelete(tls, db, pNew) + (*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = U8(0) + (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = uintptr(0) +} + +// Generate VDBE code for the statements inside the body of a single +// trigger. +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var pStep uintptr + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + for pStep = pStepList; pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { + // Figure out the ON CONFLICT policy that will be used for this step + // of the trigger program. If the statement that caused this trigger + // to fire had an explicit ON CONFLICT, then use it. Otherwise, use + // the ON CONFLICT policy that was specified as part of the trigger + // step statement. Example: + // + // CREATE TRIGGER AFTER INSERT ON t1 BEGIN; + // INSERT OR REPLACE INTO t2 VALUES(new.a, new.b); + // END; + // + // INSERT INTO t1 ... ; -- insert into t2 uses REPLACE policy + // INSERT OR IGNORE INTO t1 ... ; -- insert into t2 uses IGNORE policy + (*Parse)(unsafe.Pointer(pParse)).FeOrconf = func() uint8 { + if orconf == OE_Default { + return (*TriggerStep)(unsafe.Pointer(pStep)).Forconf + } + return U8(orconf) + }() + + if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { + Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, + Xsqlite3MPrintf(tls, db, ts+6022, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + -7) + } + + switch int32((*TriggerStep)(unsafe.Pointer(pStep)).Fop) { + case TK_UPDATE: + { + Xsqlite3Update(tls, pParse, + Xsqlite3TriggerStepSrc(tls, pParse, pStep), + Xsqlite3ExprListDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList, 0), + Xsqlite3ExprDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere, 0), + int32((*Parse)(unsafe.Pointer(pParse)).FeOrconf), uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3VdbeAddOp0(tls, v, OP_ResetCount) + break + + } + case TK_INSERT: + { + Xsqlite3Insert(tls, pParse, + Xsqlite3TriggerStepSrc(tls, pParse, pStep), + Xsqlite3SelectDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, 0), + Xsqlite3IdListDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpIdList), + int32((*Parse)(unsafe.Pointer(pParse)).FeOrconf), + Xsqlite3UpsertDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert)) + Xsqlite3VdbeAddOp0(tls, v, OP_ResetCount) + break + + } + case TK_DELETE: + { + Xsqlite3DeleteFrom(tls, pParse, + Xsqlite3TriggerStepSrc(tls, pParse, pStep), + Xsqlite3ExprDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere, 0), uintptr(0), uintptr(0)) + Xsqlite3VdbeAddOp0(tls, v, OP_ResetCount) + break + + } + default: + { + // var sDest SelectDest at bp+8, 40 + + var pSelect uintptr = Xsqlite3SelectDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, 0) + Xsqlite3SelectDestInit(tls, bp+8, SRT_Discard, 0) + Xsqlite3Select(tls, pParse, pSelect, bp+8) + Xsqlite3SelectDelete(tls, db, pSelect) + break + + } + } + } + + return 0 +} + +// Parse context structure pFrom has just been used to create a sub-vdbe +// (trigger program). If an error has occurred, transfer error information +// from pFrom to pTo. +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ + + if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { + (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg + (*Parse)(unsafe.Pointer(pTo)).FnErr = (*Parse)(unsafe.Pointer(pFrom)).FnErr + (*Parse)(unsafe.Pointer(pTo)).Frc = (*Parse)(unsafe.Pointer(pFrom)).Frc + } else { + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pFrom)).Fdb, (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg) + } +} + +// Create and populate a new TriggerPrg object with a sub-program +// implementing trigger pTrigger with ON CONFLICT policy orconf. +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ + bp := tls.Alloc(472) + defer tls.Free(472) + + var pTop uintptr = func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }() + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var pPrg uintptr // Value to return + var pWhen uintptr = uintptr(0) // Duplicate of trigger WHEN expression + var v uintptr // Temporary VM + // var sNC NameContext at bp+416, 56 + // Name context for sub-vdbe + var pProgram uintptr = uintptr(0) // Sub-vdbe for trigger program + var iEndTrigger int32 = 0 // Label to jump to if WHEN is false + // var sSubParse Parse at bp+8, 408 + // Parse context for sub-vdbe + + // Allocate the TriggerPrg and SubProgram objects. To ensure that they + // are freed if an error occurs, link them into the Parse.pTriggerPrg + // list of the top-level Parse object sooner rather than later. + pPrg = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerPrg{}))) + if !(pPrg != 0) { + return uintptr(0) + } + (*TriggerPrg)(unsafe.Pointer(pPrg)).FpNext = (*Parse)(unsafe.Pointer(pTop)).FpTriggerPrg + (*Parse)(unsafe.Pointer(pTop)).FpTriggerPrg = pPrg + (*TriggerPrg)(unsafe.Pointer(pPrg)).FpProgram = libc.AssignUintptr(&pProgram, Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(SubProgram{})))) + if !(pProgram != 0) { + return uintptr(0) + } + Xsqlite3VdbeLinkSubProgram(tls, (*Parse)(unsafe.Pointer(pTop)).FpVdbe, pProgram) + (*TriggerPrg)(unsafe.Pointer(pPrg)).FpTrigger = pTrigger + (*TriggerPrg)(unsafe.Pointer(pPrg)).Forconf = orconf + *(*U32)(unsafe.Pointer(pPrg + 28)) = 0xffffffff + *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff + + // Allocate and populate a new Parse context to use for coding the + // trigger sub-program. + Xsqlite3ParseObjectInit(tls, bp+8, db) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416 /* &sNC */)).FpParse = bp + 8 /* &sSubParse */ + (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FpTriggerTab = pTab + (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FpToplevel = pTop + (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName + (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop + (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop + (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + + v = Xsqlite3GetVdbe(tls, bp+8) + if v != 0 { + + if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, + Xsqlite3MPrintf(tls, db, ts+20325, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + } + + // If one was specified, code the WHEN clause. If it evaluates to false + // (or NULL) the sub-vdbe is immediately halted by jumping to the + // OP_Halt inserted at the end of the program. + if (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen != 0 { + pWhen = Xsqlite3ExprDup(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen, 0) + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+416, pWhen) { + iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) + Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) + } + Xsqlite3ExprDelete(tls, db, pWhen) + } + + // Code the trigger program into the sub-vdbe. + codeTriggerProgram(tls, bp+8, (*Trigger)(unsafe.Pointer(pTrigger)).Fstep_list, orconf) + + // Insert an OP_Halt at the end of the sub-program. + if iEndTrigger != 0 { + Xsqlite3VdbeResolveLabel(tls, v, iEndTrigger) + } + Xsqlite3VdbeAddOp0(tls, v, OP_Halt) + + transferParseError(tls, pParse, bp+8) + + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { + + (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+128) + } + (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).FnTab + (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken = pTrigger + *(*U32)(unsafe.Pointer(pPrg + 28)) = (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).Foldmask + *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = (*Parse)(unsafe.Pointer(bp + 8 /* &sSubParse */)).Fnewmask + Xsqlite3VdbeDelete(tls, v) + } else { + transferParseError(tls, pParse, bp+8) + } + + Xsqlite3ParseObjectReset(tls, bp+8) + return pPrg +} + +// Return a pointer to a TriggerPrg object containing the sub-program for +// trigger pTrigger with default ON CONFLICT algorithm orconf. If no such +// TriggerPrg object exists, a new object is allocated and populated before +// being returned. +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ + var pRoot uintptr = func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }() + var pPrg uintptr + + // It may be that this trigger has already been coded (or is in the + // process of being coded). If this is the case, then an entry with + // a matching TriggerPrg.pTrigger field will be present somewhere + // in the Parse.pTriggerPrg list. Search for such an entry. + for pPrg = (*Parse)(unsafe.Pointer(pRoot)).FpTriggerPrg; pPrg != 0 && ((*TriggerPrg)(unsafe.Pointer(pPrg)).FpTrigger != pTrigger || (*TriggerPrg)(unsafe.Pointer(pPrg)).Forconf != orconf); pPrg = (*TriggerPrg)(unsafe.Pointer(pPrg)).FpNext { + } + + // If an existing TriggerPrg could not be located, create a new one. + if !(pPrg != 0) { + pPrg = codeRowTrigger(tls, pParse, pTrigger, pTab, orconf) + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FerrByteOffset = -1 + } + + return pPrg +} + +// Generate code for the trigger program associated with trigger p on +// table pTab. The reg, orconf and ignoreJump parameters passed to this +// function are the same as those described in the header function for +// sqlite3CodeRowTrigger() +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ + var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM + var pPrg uintptr + pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) + + // Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program + // is a pointer to the sub-vdbe containing the trigger program. + if pPrg != 0 { + var bRecursive int32 = libc.Bool32((*Trigger)(unsafe.Pointer(p)).FzName != 0 && uint64(0) == (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_RecTriggers)) + + Xsqlite3VdbeAddOp4(tls, v, OP_Program, reg, ignoreJump, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1), + (*TriggerPrg)(unsafe.Pointer(pPrg)).FpProgram, -4) + + // Set the P5 operand of the OP_Program instruction to non-zero if + // recursive invocation of this trigger program is disallowed. Recursive + // invocation is disallowed if (a) the sub-program is really a trigger, + // not a foreign key action, and (b) the flag to enable recursive triggers + // is clear. + Xsqlite3VdbeChangeP5(tls, v, uint16(U8(bRecursive))) + } +} + +// This is called to code the required FOR EACH ROW triggers for an operation +// on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE) +// is given by the op parameter. The tr_tm parameter determines whether the +// BEFORE or AFTER triggers are coded. If the operation is an UPDATE, then +// parameter pChanges is passed the list of columns being modified. +// +// If there are no triggers that fire at the specified time for the specified +// operation on pTab, this function is a no-op. +// +// The reg argument is the address of the first in an array of registers +// that contain the values substituted for the new.* and old.* references +// in the trigger program. If N is the number of columns in table pTab +// (a copy of pTab->nCol), then registers are populated as follows: +// +// Register Contains +// ------------------------------------------------------ +// reg+0 OLD.rowid +// reg+1 OLD.* value of left-most column of pTab +// ... ... +// reg+N OLD.* value of right-most column of pTab +// reg+N+1 NEW.rowid +// reg+N+2 NEW.* value of left-most column of pTab +// ... ... +// reg+N+N+1 NEW.* value of right-most column of pTab +// +// For ON DELETE triggers, the registers containing the NEW.* values will +// never be accessed by the trigger program, so they are not allocated or +// populated by the caller (there is no data to populate them with anyway). +// Similarly, for ON INSERT triggers the values stored in the OLD.* registers +// are never accessed, and so are not allocated by the caller. So, for an +// ON INSERT trigger, the value passed to this function as parameter reg +// is not a readable register, although registers (reg+N) through +// (reg+N+N+1) are. +// +// Parameter orconf is the default conflict resolution algorithm for the +// trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump +// is the instruction that control should jump to if a trigger program +// raises an IGNORE exception. +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ + var p uintptr // Used to iterate through pTrigger list + + for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { + + // Sanity checking: The schema for the trigger and for the table are + // always defined. The trigger must be in the same schema as the table + // or else it must be a TEMP trigger. + + // Determine whether we should code this trigger. One of two choices: + // 1. The trigger is an exact match to the current DML statement + // 2. This is a RETURNING trigger for INSERT but we are currently + // doing the UPDATE part of an UPSERT. + if (int32((*Trigger)(unsafe.Pointer(p)).Fop) == op || (*Trigger)(unsafe.Pointer(p)).FbReturning != 0 && int32((*Trigger)(unsafe.Pointer(p)).Fop) == TK_INSERT && op == TK_UPDATE) && + int32((*Trigger)(unsafe.Pointer(p)).Ftr_tm) == tr_tm && + checkColumnOverlap(tls, (*Trigger)(unsafe.Pointer(p)).FpColumns, pChanges) != 0 { + if !(int32((*Trigger)(unsafe.Pointer(p)).FbReturning) != 0) { + Xsqlite3CodeRowTriggerDirect(tls, pParse, p, pTab, reg, orconf, ignoreJump) + } else if (*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0) { + codeReturningTrigger(tls, pParse, p, pTab, reg) + } + } + } +} + +// Triggers may access values stored in the old.* or new.* pseudo-table. +// This function returns a 32-bit bitmask indicating which columns of the +// old.* or new.* tables actually are used by triggers. This information +// may be used by the caller, for example, to avoid having to load the entire +// old.* record into memory when executing an UPDATE or DELETE command. +// +// Bit 0 of the returned mask is set if the left-most column of the +// table may be accessed using an [old|new].reference. Bit 1 is set if +// the second leftmost column value is required, and so on. If there +// are more than 32 columns in the table, and at least one of the columns +// with an index greater than 32 may be accessed, 0xffffffff is returned. +// +// It is not possible to determine if the old.rowid or new.rowid column is +// accessed by triggers. The caller must always assume that it is. +// +// Parameter isNew must be either 1 or 0. If it is 0, then the mask returned +// applies to the old.* table. If 1, the new.* table. +// +// Parameter tr_tm must be a mask with one or both of the TRIGGER_BEFORE +// and TRIGGER_AFTER bits set. Values accessed by BEFORE triggers are only +// included in the returned mask if the TRIGGER_BEFORE bit is set in the +// tr_tm parameter. Similarly, values accessed by AFTER triggers are only +// included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ + var op int32 + if pChanges != 0 { + op = TK_UPDATE + } else { + op = TK_DELETE + } + var mask U32 = U32(0) + var p uintptr + + for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { + if int32((*Trigger)(unsafe.Pointer(p)).Fop) == op && + tr_tm&int32((*Trigger)(unsafe.Pointer(p)).Ftr_tm) != 0 && + checkColumnOverlap(tls, (*Trigger)(unsafe.Pointer(p)).FpColumns, pChanges) != 0 { + if (*Trigger)(unsafe.Pointer(p)).FbReturning != 0 { + mask = 0xffffffff + } else { + var pPrg uintptr + pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) + if pPrg != 0 { + mask = mask | *(*U32)(unsafe.Pointer(pPrg + 28 + uintptr(isNew)*4)) + } + } + } + } + + return mask +} + +// The most recently coded instruction was an OP_Column to retrieve the +// i-th column of table pTab. This routine sets the P4 parameter of the +// OP_Column to the default value, if any. +// +// The default value of a column is specified by a DEFAULT clause in the +// column definition. This was either supplied by the user when the table +// was created, or added later to the table definition by an ALTER TABLE +// command. If the latter, then the row-records in the table btree on disk +// may not contain a value for the column and the default value, taken +// from the P4 parameter of the OP_Column instruction, is returned instead. +// If the former, then all row-records are guaranteed to include a value +// for the column and the P4 value is not required. +// +// Column definitions created by an ALTER TABLE command may only have +// literal default values specified: a number, null or a string. (If a more +// complicated default expression value was provided, it is evaluated +// when the ALTER TABLE is executed and one of the literal values written +// into the sqlite_schema table.) +// +// Therefore, the P4 parameter is only required if the default value for +// the column is a literal number, string or null. The sqlite3ValueFromExpr() +// function is capable of transforming these types of expressions into +// sqlite3_value objects. +// +// If column as REAL affinity and the table is an ordinary b-tree table +// (not a virtual table) then the value might have been stored as an +// integer. In that case, add an OP_RealAffinity opcode to make sure +// it has been converted into REAL. +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + *(*uintptr)(unsafe.Pointer(bp /* pValue */)) = uintptr(0) + var enc U8 = (*Sqlite3)(unsafe.Pointer(Xsqlite3VdbeDb(tls, v))).Fenc + var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + + Xsqlite3ValueFromExpr(tls, Xsqlite3VdbeDb(tls, v), + Xsqlite3ColumnExpr(tls, pTab, pCol), enc, + uint8((*Column)(unsafe.Pointer(pCol)).Faffinity), bp) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp /* pValue */)), -11) + } + } + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) + } +} + +// Check to see if column iCol of index pIdx references any of the +// columns defined by aXRef and chngRowid. Return true if it does +// and false if not. This is an optimization. False-positives are a +// performance degradation, but false-negatives can result in a corrupt +// index and incorrect answers. +// +// aXRef[j] will be non-negative if column j of the original table is +// being updated. chngRowid will be true if the rowid of the table is +// being updated. +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ + var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) + // Cannot index rowid + if int32(iIdxCol) >= 0 { + return libc.Bool32(*(*int32)(unsafe.Pointer(aXRef + uintptr(iIdxCol)*4)) >= 0) + } + + return Xsqlite3ExprReferencesUpdatedColumn(tls, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(iCol)*32)).FpExpr, + aXRef, chngRowid) +} + +// Check to see if index pIdx is a partial index whose conditional +// expression might change values due to an UPDATE. Return true if +// the index is subject to change and false if the index is guaranteed +// to be unchanged. This is an optimization. False-positives are a +// performance degradation, but false-negatives can result in a corrupt +// index and incorrect answers. +// +// aXRef[j] will be non-negative if column j of the original table is +// being updated. chngRowid will be true if the rowid of the table is +// being updated. +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { + return 0 + } + return Xsqlite3ExprReferencesUpdatedColumn(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, + aXRef, chngRowid) +} + +// Allocate and return a pointer to an expression of type TK_ROW with +// Expr.iColumn set to value (iCol+1). The resolver will modify the +// expression to be a TK_COLUMN reading column iCol of the first +// table in the source-list (pSrc->a[0]). +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ + var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) + if pRet != 0 { + (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) + } + return pRet +} + +// Assuming both the pLimit and pOrderBy parameters are NULL, this function +// generates VM code to run the query: +// +// SELECT , pChanges FROM pTabList WHERE pWhere +// +// and write the results to the ephemeral table already opened as cursor +// iEph. None of pChanges, pTabList or pWhere are modified or consumed by +// this function, they must be deleted by the caller. +// +// Or, if pLimit and pOrderBy are not NULL, and pTab is not a view: +// +// SELECT , pChanges FROM pTabList +// WHERE pWhere +// GROUP BY +// ORDER BY pOrderBy LIMIT pLimit +// +// If pTab is a view, the GROUP BY clause is omitted. +// +// Exactly how results are written to table iEph, and exactly what +// the in the query above are is determined by the type +// of table pTabList->a[0].pTab. +// +// If the table is a WITHOUT ROWID table, then argument pPk must be its +// PRIMARY KEY. In this case are the primary key columns +// of the table, in order. The results of the query are written to ephemeral +// table iEph as index keys, using OP_IdxInsert. +// +// If the table is actually a view, then are all columns of +// the view. The results are written to the ephemeral table iEph as records +// with automatically assigned integer keys. +// +// If the table is a virtual or ordinary intkey table, then +// is its rowid. For a virtual table, the results are written to iEph as +// records with automatically assigned integer keys For intkey tables, the +// rowid value in is used as the integer key, and the +// remaining fields make up the table record. +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var i int32 + // var dest SelectDest at bp, 40 + + var pSelect uintptr = uintptr(0) + var pList uintptr = uintptr(0) + var pGrp uintptr = uintptr(0) + var pLimit2 uintptr = uintptr(0) + var pOrderBy2 uintptr = uintptr(0) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FpTab + var pSrc uintptr + var pWhere2 uintptr + var eDest int32 + + _ = pOrderBy + _ = pLimit + + pSrc = Xsqlite3SrcListDup(tls, db, pTabList, 0) + pWhere2 = Xsqlite3ExprDup(tls, db, pWhere, 0) + + if pSrc != 0 { + libc.SetBitFieldPtr16Uint32(pSrc+8+60+4, uint32(1), 8, 0x100) + (*SrcItem)(unsafe.Pointer(pSrc + 8)).FiCursor = -1 + (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc+8)).FpTab)).FnTabRef-- + (*SrcItem)(unsafe.Pointer(pSrc + 8)).FpTab = uintptr(0) + } + if pPk != 0 { + for i = 0; i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); i++ { + var pNew uintptr = exprRowColumn(tls, pParse, int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) + pList = Xsqlite3ExprListAppend(tls, pParse, pList, pNew) + } + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + eDest = SRT_Table + } else { + eDest = SRT_Upfrom + } + } else if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + pList = Xsqlite3ExprListAppend(tls, pParse, pList, exprRowColumn(tls, pParse, i)) + } + eDest = SRT_Table + } else { + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + eDest = SRT_Table + } else { + eDest = SRT_Upfrom + } + pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0))) + } + + if pChanges != 0 { + for i = 0; i < (*ExprList)(unsafe.Pointer(pChanges)).FnExpr; i++ { + pList = Xsqlite3ExprListAppend(tls, pParse, pList, + Xsqlite3ExprDup(tls, db, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FpExpr, 0)) + } + } + pSelect = Xsqlite3SelectNew(tls, pParse, pList, + pSrc, pWhere2, pGrp, uintptr(0), pOrderBy2, uint32(SF_UFSrcCheck|SF_IncludeHidden), pLimit2) + if pSelect != 0 { + *(*U32)(unsafe.Pointer(pSelect + 4)) |= U32(SF_OrderByReqd) + } + Xsqlite3SelectDestInit(tls, bp, eDest, iEph) + (*SelectDest)(unsafe.Pointer(bp /* &dest */)).FiSDParm2 = func() int32 { + if pPk != 0 { + return int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + } + return -1 + }() + Xsqlite3Select(tls, pParse, pSelect, bp) + Xsqlite3SelectDelete(tls, db, pSelect) +} + +// Process an UPDATE statement. +// +// UPDATE OR IGNORE tbl SET a=b, c=d FROM tbl2... WHERE e<5 AND f NOT NULL; +// \_______/ \_/ \______/ \_____/ \________________/ +// onError | pChanges | pWhere +// \_______________________/ +// pTabList +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ + bp := tls.Alloc(108) + defer tls.Free(108) + + var i int32 + var j int32 + var k int32 // Loop counters + var pTab uintptr // The table to be updated + var addrTop int32 // VDBE instruction address of the start of the loop + var pWInfo uintptr // Information about the WHERE clause + var v uintptr // The virtual database engine + var pIdx uintptr // For looping over indices + var pPk uintptr // The PRIMARY KEY index for WITHOUT ROWID tables + var nIdx int32 // Number of indices that need updating + var nAllIdx int32 // Total number of indexes + var iBaseCur int32 // Base cursor number + var iDataCur int32 // Cursor for the canonical data btree + var iIdxCur int32 // Cursor for the first index + var db uintptr // The database structure + var aRegIdx uintptr // Registers for to each index and the main table + var aXRef uintptr // aXRef[i] is the index in pChanges->a[] of the + // an expression for the i-th column of the table. + // aXRef[i]==-1 if the i-th column is not changed. + var aToOpen uintptr // 1 for tables and indices to be opened + var chngPk U8 // PRIMARY KEY changed in a WITHOUT ROWID table + var chngRowid U8 // Rowid changed in a normal table + var chngKey U8 // Either chngPk or chngRowid + var pRowidExpr uintptr // Expression defining the new record number + var iRowidExpr int32 // Index of "rowid=" (or IPK) assignment in pChanges + // var sContext AuthContext at bp+16, 16 + // The authorization context + // var sNC NameContext at bp+40, 56 + // The name-context to resolve expressions in + var iDb int32 // Database containing the table being updated + var eOnePass int32 // ONEPASS_XXX value from where.c + var hasFK int32 // True if foreign key processing is required + var labelBreak int32 // Jump here to break out of UPDATE loop + var labelContinue int32 // Jump here to continue next step of UPDATE loop + var flags int32 // Flags for sqlite3WhereBegin() + + var isView int32 // True when updating a view (INSTEAD OF trigger) + var pTrigger uintptr // List of triggers on pTab, if required + // var tmask int32 at bp+32, 4 + // Mask of TRIGGER_BEFORE|TRIGGER_AFTER + var newmask int32 // Mask of NEW.* columns accessed by BEFORE triggers + var iEph int32 // Ephemeral table holding all primary key values + var nKey int32 // Number of elements in regKey for WITHOUT ROWID + // var aiCurOnePass [2]int32 at bp+96, 8 + // The write cursors opened by WHERE_ONEPASS + var addrOpen int32 // Address of OP_OpenEphemeral + var iPk int32 // First of nPk cells holding PRIMARY KEY value + var nPk I16 // Number of components of the PRIMARY KEY + // var bReplace int32 at bp+104, 4 + // True if REPLACE conflict resolution might happen + var bFinishSeek int32 // The OP_FinishSeek opcode is needed + var nChangeFrom int32 // If there is a FROM, pChanges->nExpr, else 0 + + // Register Allocations + var regRowCount int32 // A count of rows changed + var regOldRowid int32 // The old rowid + var regNewRowid int32 // The new rowid + var regNew int32 // Content of the NEW.* table in triggers + var regOld int32 // Content of OLD.* table in triggers + var regRowSet int32 // Rowset of rows to be updated + var regKey int32 + var rc int32 + var hCol U8 + var bProgress int32 + var reg int32 + var pKeyInfo uintptr + var nEphCol int32 + var iCur int32 + var addrOnce int32 + var colFlags U32 + var oldmask U32 + var nOff int32 + addrTop = 0 + pWInfo = uintptr(0) + aRegIdx = uintptr(0) + aXRef = uintptr(0) + pRowidExpr = uintptr(0) + iRowidExpr = -1 + iEph = 0 + nKey = 0 + addrOpen = 0 + iPk = 0 + nPk = int16(0) + *(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) = 0 + bFinishSeek = 1 + nChangeFrom = 0 + regRowCount = 0 + regOldRowid = 0 + regNewRowid = 0 + regNew = 0 + regOld = 0 + regRowSet = 0 + regKey = 0 // composite PRIMARY KEY value + + libc.Xmemset(tls, bp+16, 0, uint64(unsafe.Sizeof(AuthContext{}))) + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __1 + } + goto update_cleanup +__1: + ; + + // Locate the table which we want to update. + pTab = Xsqlite3SrcListLookup(tls, pParse, pTabList) + if !(pTab == uintptr(0)) { + goto __2 + } + goto update_cleanup +__2: + ; + iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) + + // Figure out if we have any triggers and if the table being + // updated is a view. + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_UPDATE, pChanges, bp+32) + isView = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) + + // If there was a FROM clause, set nChangeFrom to the number of expressions + // in the change-list. Otherwise, set it to 0. There cannot be a FROM + // clause if this function is being called to generate code for part of + // an UPSERT statement. + if (*SrcList)(unsafe.Pointer(pTabList)).FnSrc > 1 { + nChangeFrom = (*ExprList)(unsafe.Pointer(pChanges)).FnExpr + } else { + nChangeFrom = 0 + } + + if !(Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { + goto __3 + } + goto update_cleanup +__3: + ; + if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 32))) != 0) { + goto __4 + } + goto update_cleanup +__4: + ; + + // Allocate a cursors for the main database table and for all indices. + // The index cursors might not be used, but if they are used they + // need to occur right after the database cursor. So go ahead and + // allocate enough space, just in case. + iBaseCur = libc.AssignInt32(&iDataCur, libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)) + iIdxCur = iDataCur + 1 + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + pPk = uintptr(0) + } else { + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + } + + nIdx = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__5: + if !(pIdx != 0) { + goto __7 + } + if !(pPk == pIdx) { + goto __8 + } + iDataCur = (*Parse)(unsafe.Pointer(pParse)).FnTab +__8: + ; + (*Parse)(unsafe.Pointer(pParse)).FnTab++ + goto __6 +__6: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + nIdx++ + goto __5 + goto __7 +__7: + ; + if !(pUpsert != 0) { + goto __9 + } + // On an UPSERT, reuse the same cursors already opened by INSERT + iDataCur = (*Upsert)(unsafe.Pointer(pUpsert)).FiDataCur + iIdxCur = (*Upsert)(unsafe.Pointer(pUpsert)).FiIdxCur + (*Parse)(unsafe.Pointer(pParse)).FnTab = iBaseCur +__9: + ; + (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor = iDataCur + + // Allocate space for aXRef[], aRegIdx[], and aToOpen[]. + // Initialize aXRef[] and aToOpen[] to their default values. + aXRef = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(int32(0)))*uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+nIdx+1)+uint64(nIdx)+uint64(2))) + if !(aXRef == uintptr(0)) { + goto __10 + } + goto update_cleanup +__10: + ; + aRegIdx = aXRef + uintptr((*Table)(unsafe.Pointer(pTab)).FnCol)*4 + aToOpen = aRegIdx + uintptr(nIdx)*4 + uintptr(1)*4 + libc.Xmemset(tls, aToOpen, 1, uint64(nIdx+1)) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) + i = 0 +__11: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __13 + } + *(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) = -1 + goto __12 +__12: + i++ + goto __11 + goto __13 +__13: + ; + + // Initialize the name-context + libc.Xmemset(tls, bp+40, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 40 /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp + 40 /* &sNC */)).FpSrcList = pTabList + *(*uintptr)(unsafe.Pointer(bp + 40 + 16)) = pUpsert + (*NameContext)(unsafe.Pointer(bp + 40 /* &sNC */)).FncFlags = NC_UUpsert + + // Begin generating code. + v = Xsqlite3GetVdbe(tls, pParse) + if !(v == uintptr(0)) { + goto __14 + } + goto update_cleanup +__14: + ; + + // Resolve the column names in all the expressions of the + // of the UPDATE statement. Also find the column index + // for each column to be updated in the pChanges array. For each + // column to be updated, make sure we have authorization to change + // that column. + chngRowid = libc.AssignUint8(&chngPk, U8(0)) + i = 0 +__15: + if !(i < (*ExprList)(unsafe.Pointer(pChanges)).FnExpr) { + goto __17 + } + hCol = Xsqlite3StrIHash(tls, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName) + // If this is an UPDATE with a FROM clause, do not resolve expressions + // here. The call to sqlite3Select() below will do that. + if !(nChangeFrom == 0 && Xsqlite3ResolveExprNames(tls, bp+40, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FpExpr) != 0) { + goto __18 + } + goto update_cleanup +__18: + ; + j = 0 +__19: + if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __21 + } + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FhName) == int32(hCol) && + Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName) == 0) { + goto __22 + } + if !(j == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { + goto __23 + } + chngRowid = U8(1) + pRowidExpr = (*ExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32)).FpExpr + iRowidExpr = i + goto __24 +__23: + if !(pPk != 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0) { + goto __25 + } + chngPk = U8(1) + goto __26 +__25: + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { + goto __27 + } + + Xsqlite3ErrorMsg(tls, pParse, + ts+20339, + libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) + goto update_cleanup +__27: + ; +__26: + ; +__24: + ; + *(*int32)(unsafe.Pointer(aXRef + uintptr(j)*4)) = i + goto __21 +__22: + ; + goto __20 +__20: + j++ + goto __19 + goto __21 +__21: + ; + if !(j >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __28 + } + if !(pPk == uintptr(0) && Xsqlite3IsRowid(tls, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName) != 0) { + goto __29 + } + j = -1 + chngRowid = U8(1) + pRowidExpr = (*ExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32)).FpExpr + iRowidExpr = i + goto __30 +__29: + Xsqlite3ErrorMsg(tls, pParse, ts+20375, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) + goto update_cleanup +__30: + ; +__28: + ; + + rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, + func() uintptr { + if j < 0 { + return ts + 7591 /* "ROWID" */ + } + return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName + }(), + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) + if !(rc == SQLITE_DENY) { + goto __31 + } + goto update_cleanup + goto __32 +__31: + if !(rc == SQLITE_IGNORE) { + goto __33 + } + *(*int32)(unsafe.Pointer(aXRef + uintptr(j)*4)) = -1 +__33: + ; +__32: + ; + + goto __16 +__16: + i++ + goto __15 + goto __17 +__17: + ; + + chngKey = U8(int32(chngRowid) + int32(chngPk)) + + // Mark generated columns as changing if their generator expressions + // reference any changing column. The actual aXRef[] value for + // generated expressions is not used, other than to check to see that it + // is non-negative, so the value of aXRef[] for generated columns can be + // set to any non-negative number. We use 99999 so that the value is + // obvious when looking at aXRef[] in a symbolic debugger. + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { + goto __34 + } + +__35: + bProgress = 0 + i = 0 +__38: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __40 + } + if !(*(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) >= 0) { + goto __41 + } + goto __39 +__41: + ; + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_GENERATED == 0) { + goto __42 + } + goto __39 +__42: + ; + if !(Xsqlite3ExprReferencesUpdatedColumn(tls, + Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24), + aXRef, int32(chngRowid)) != 0) { + goto __43 + } + *(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) = 99999 + bProgress = 1 +__43: + ; + goto __39 +__39: + i++ + goto __38 + goto __40 +__40: + ; + goto __36 +__36: + if bProgress != 0 { + goto __35 + } + goto __37 +__37: + ; +__34: + ; + + // The SET expressions are not actually used inside the WHERE loop. + // So reset the colUsed mask. Unless this is a virtual table. In that + // case, set all bits of the colUsed mask (to ensure that the virtual + // table implementation makes all columns available). + (*SrcItem)(unsafe.Pointer(pTabList + 8)).FcolUsed = func() uint64 { + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + return libc.Uint64(libc.Uint64FromInt32(-1)) + } + return uint64(0) + }() + + hasFK = Xsqlite3FkRequired(tls, pParse, pTab, aXRef, int32(chngKey)) + + // There is one entry in the aRegIdx[] array for each index on the table + // being updated. Fill in aRegIdx[] with a register number that will hold + // the key for accessing each index. + if !(onError == OE_Replace) { + goto __44 + } + *(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) = 1 +__44: + ; + nAllIdx = 0 + pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex +__45: + if !(pIdx != 0) { + goto __47 + } + if !(chngKey != 0 || hasFK > 1 || pIdx == pPk || + indexWhereClauseMightChange(tls, pIdx, aXRef, int32(chngRowid)) != 0) { + goto __48 + } + reg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + goto __49 +__48: + reg = 0 + i = 0 +__50: + if !(i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) { + goto __52 + } + if !(indexColumnIsBeingUpdated(tls, pIdx, i, aXRef, int32(chngRowid)) != 0) { + goto __53 + } + reg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) + if !(onError == OE_Default && int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Replace) { + goto __54 + } + *(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) = 1 +__54: + ; + goto __52 +__53: + ; + goto __51 +__51: + i++ + goto __50 + goto __52 +__52: + ; +__49: + ; + if !(reg == 0) { + goto __55 + } + *(*U8)(unsafe.Pointer(aToOpen + uintptr(nAllIdx+1))) = U8(0) +__55: + ; + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = reg + goto __46 +__46: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + nAllIdx++ + goto __45 + goto __47 +__47: + ; + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) // Register storing the table record + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __56 + } + // If REPLACE conflict resolution might be invoked, open cursors on all + // indexes in case they are needed to delete records. + libc.Xmemset(tls, aToOpen, 1, uint64(nIdx+1)) +__56: + ; + + if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) { + goto __57 + } + Xsqlite3VdbeCountChanges(tls, v) +__57: + ; + Xsqlite3BeginWriteOperation(tls, pParse, libc.Bool32(pTrigger != 0 || hasFK != 0), iDb) + + // Allocate required registers. + if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __58 + } + // For now, regRowSet and aRegIdx[nAllIdx] share the same register. + // If regRowSet turns out to be needed, then aRegIdx[nAllIdx] will be + // reallocated. aRegIdx[nAllIdx] is the register in which the main + // table record is written. regRowSet holds the RowSet for the + // two-pass update algorithm. + + regRowSet = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) + regOldRowid = libc.AssignInt32(®NewRowid, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + if !(chngPk != 0 || pTrigger != 0 || hasFK != 0) { + goto __59 + } + regOld = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Table)(unsafe.Pointer(pTab)).FnCol) +__59: + ; + if !(chngKey != 0 || pTrigger != 0 || hasFK != 0) { + goto __60 + } + regNewRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) +__60: + ; + regNew = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Table)(unsafe.Pointer(pTab)).FnCol) +__58: + ; + + // Start the view context. + if !(isView != 0) { + goto __61 + } + Xsqlite3AuthContextPush(tls, pParse, bp+16, (*Table)(unsafe.Pointer(pTab)).FzName) +__61: + ; + + // If we are trying to update a view, realize that view into + // an ephemeral table. + if !(nChangeFrom == 0 && isView != 0) { + goto __62 + } + Xsqlite3MaterializeView(tls, pParse, pTab, + pWhere, pOrderBy, pLimit, iDataCur) + pOrderBy = uintptr(0) + pLimit = uintptr(0) +__62: + ; + + // Resolve the column names in all the expressions in the + // WHERE clause. + if !(nChangeFrom == 0 && Xsqlite3ResolveExprNames(tls, bp+40, pWhere) != 0) { + goto __63 + } + goto update_cleanup +__63: + ; + + // Virtual tables must be handled separately + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __64 + } + updateVirtualTable(tls, pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef, + pWhere, onError) + goto update_cleanup +__64: + ; + + // Jump to labelBreak to abandon further processing of this UPDATE + labelContinue = libc.AssignInt32(&labelBreak, Xsqlite3VdbeMakeLabel(tls, pParse)) + + // Not an UPSERT. Normal processing. Begin by + // initialize the count of updated rows + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00001))<<32) != uint64(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FbReturning) != 0) && + pUpsert == uintptr(0)) { + goto __65 + } + regRowCount = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regRowCount) +__65: + ; + + if !(nChangeFrom == 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __66 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, regRowSet, regOldRowid) + iEph = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + addrOpen = Xsqlite3VdbeAddOp3(tls, v, OP_OpenEphemeral, iEph, 0, regRowSet) + goto __67 +__66: + ; + if pPk != 0 { + nPk = int16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + } else { + nPk = int16(0) + } + iPk = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += int32(nPk) + *(*int32)(unsafe.Pointer(pParse + 56)) += nChangeFrom + regKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + if !(pUpsert == uintptr(0)) { + goto __68 + } + nEphCol = int32(nPk) + nChangeFrom + func() int32 { + if isView != 0 { + return int32((*Table)(unsafe.Pointer(pTab)).FnCol) + } + return 0 + }() + iEph = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(pPk != 0) { + goto __69 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, iPk, iPk+int32(nPk)-1) +__69: + ; + addrOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEph, nEphCol) + if !(pPk != 0) { + goto __70 + } + pKeyInfo = Xsqlite3KeyInfoOfIndex(tls, pParse, pPk) + if !(pKeyInfo != 0) { + goto __71 + } + (*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField = U16(nEphCol) + Xsqlite3VdbeAppendP4(tls, v, pKeyInfo, -9) +__71: + ; +__70: + ; + if !(nChangeFrom != 0) { + goto __72 + } + updateFromSelect(tls, + pParse, iEph, pPk, pChanges, pTabList, pWhere, pOrderBy, pLimit) + if !(isView != 0) { + goto __73 + } + iDataCur = iEph +__73: + ; +__72: + ; +__68: + ; +__67: + ; + + if !(nChangeFrom != 0) { + goto __74 + } + Xsqlite3MultiWrite(tls, pParse) + eOnePass = ONEPASS_OFF + nKey = int32(nPk) + regKey = iPk + goto __75 +__74: + if !(pUpsert != 0) { + goto __76 + } + // If this is an UPSERT, then all cursors have already been opened by + // the outer INSERT and the data cursor should be pointing at the row + // that is to be updated. So bypass the code that searches for the + // row(s) to be updated. + pWInfo = uintptr(0) + eOnePass = ONEPASS_SINGLE + Xsqlite3ExprIfFalse(tls, pParse, pWhere, labelBreak, SQLITE_JUMPIFNULL) + bFinishSeek = 0 + goto __77 +__76: + // Begin the database scan. + // + // Do not consider a single-pass strategy for a multi-row update if + // there are any triggers or foreign keys to process, or rows may + // be deleted as a result of REPLACE conflict handling. Any of these + // things might disturb a cursor being used to scan through the table + // or index, causing a single-pass approach to malfunction. + flags = WHERE_ONEPASS_DESIRED + if !(!(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && !(pTrigger != 0) && !(hasFK != 0) && !(chngKey != 0) && !(*(*int32)(unsafe.Pointer(bp + 104)) != 0)) { + goto __78 + } + flags = flags | WHERE_ONEPASS_MULTIROW +__78: + ; + pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), uint16(flags), iIdxCur) + if !(pWInfo == uintptr(0)) { + goto __79 + } + goto update_cleanup +__79: + ; + + // A one-pass strategy that might update more than one row may not + // be used if any column of the index used for the scan is being + // updated. Otherwise, if there is an index on "b", statements like + // the following could create an infinite loop: + // + // UPDATE t1 SET b=b+1 WHERE b>? + // + // Fall back to ONEPASS_OFF if where.c has selected a ONEPASS_MULTI + // strategy that uses an index for which one or more columns are being + // updated. + eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+96) + bFinishSeek = Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) + if !(eOnePass != ONEPASS_SINGLE) { + goto __80 + } + Xsqlite3MultiWrite(tls, pParse) + if !(eOnePass == ONEPASS_MULTI) { + goto __81 + } + iCur = *(*int32)(unsafe.Pointer(bp + 96 + 1*4)) + if !(iCur >= 0 && iCur != iDataCur && *(*U8)(unsafe.Pointer(aToOpen + uintptr(iCur-iBaseCur))) != 0) { + goto __82 + } + eOnePass = ONEPASS_OFF +__82: + ; + +__81: + ; +__80: + ; +__77: + ; + + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __83 + } + // Read the rowid of the current row of the WHERE scan. In ONEPASS_OFF + // mode, write the rowid into the FIFO. In either of the one-pass modes, + // leave it in register regOldRowid. + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iDataCur, regOldRowid) + if !(eOnePass == ONEPASS_OFF) { + goto __85 + } + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iEph, regRowSet, regOldRowid) + goto __86 +__85: + if !(addrOpen != 0) { + goto __87 + } + Xsqlite3VdbeChangeToNoop(tls, v, addrOpen) +__87: + ; +__86: + ; + goto __84 +__83: + // Read the PK of the current row into an array of registers. In + // ONEPASS_OFF mode, serialize the array into a record and store it in + // the ephemeral table. Or, in ONEPASS_SINGLE or MULTI mode, change + // the OP_OpenEphemeral instruction to a Noop (the ephemeral table + // is not required) and leave the PK fields in the array of registers. + i = 0 +__88: + if !(i < int32(nPk)) { + goto __90 + } + + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iDataCur, + int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))), iPk+i) + goto __89 +__89: + i++ + goto __88 + goto __90 +__90: + ; + if !(eOnePass != 0) { + goto __91 + } + if !(addrOpen != 0) { + goto __93 + } + Xsqlite3VdbeChangeToNoop(tls, v, addrOpen) +__93: + ; + nKey = int32(nPk) + regKey = iPk + goto __92 +__91: + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, iPk, int32(nPk), regKey, + Xsqlite3IndexAffinityStr(tls, db, pPk), int32(nPk)) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iEph, regKey, iPk, int32(nPk)) +__92: + ; +__84: + ; +__75: + ; + + if !(pUpsert == uintptr(0)) { + goto __94 + } + if !(nChangeFrom == 0 && eOnePass != ONEPASS_MULTI) { + goto __95 + } + Xsqlite3WhereEnd(tls, pWInfo) +__95: + ; + + if !!(isView != 0) { + goto __96 + } + addrOnce = 0 + + // Open every index that needs updating. + if !(eOnePass != ONEPASS_OFF) { + goto __97 + } + if !(*(*int32)(unsafe.Pointer(bp + 96)) >= 0) { + goto __98 + } + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 96))-iBaseCur))) = U8(0) +__98: + ; + if !(*(*int32)(unsafe.Pointer(bp + 96 + 1*4)) >= 0) { + goto __99 + } + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 96 + 1*4))-iBaseCur))) = U8(0) +__99: + ; +__97: + ; + + if !(eOnePass == ONEPASS_MULTI && nIdx-libc.Bool32(*(*int32)(unsafe.Pointer(bp + 96 + 1*4)) >= 0) > 0) { + goto __100 + } + addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) +__100: + ; + Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(0), iBaseCur, + aToOpen, uintptr(0), uintptr(0)) + if !(addrOnce != 0) { + goto __101 + } + Xsqlite3VdbeJumpHereOrPopInst(tls, v, addrOnce) +__101: + ; +__96: + ; + + // Top of the update loop + if !(eOnePass != ONEPASS_OFF) { + goto __102 + } + if !(*(*int32)(unsafe.Pointer(bp + 96)) != iDataCur && + *(*int32)(unsafe.Pointer(bp + 96 + 1*4)) != iDataCur) { + goto __104 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iDataCur, labelBreak, regKey, nKey) + +__104: + ; + if !(eOnePass != ONEPASS_SINGLE) { + goto __105 + } + labelContinue = Xsqlite3VdbeMakeLabel(tls, pParse) +__105: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, func() int32 { + if pPk != 0 { + return regKey + } + return regOldRowid + }(), labelBreak) + + goto __103 +__102: + if !(pPk != 0 || nChangeFrom != 0) { + goto __106 + } + labelContinue = Xsqlite3VdbeMakeLabel(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iEph, labelBreak) + addrTop = Xsqlite3VdbeCurrentAddr(tls, v) + if !(nChangeFrom != 0) { + goto __108 + } + if !!(isView != 0) { + goto __110 + } + if !(pPk != 0) { + goto __111 + } + i = 0 +__113: + if !(i < int32(nPk)) { + goto __115 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEph, i, iPk+i) + goto __114 +__114: + i++ + goto __113 + goto __115 +__115: + ; + Xsqlite3VdbeAddOp4Int(tls, + v, OP_NotFound, iDataCur, labelContinue, iPk, int32(nPk)) + goto __112 +__111: + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iEph, regOldRowid) + Xsqlite3VdbeAddOp3(tls, + v, OP_NotExists, iDataCur, labelContinue, regOldRowid) +__112: + ; +__110: + ; + goto __109 +__108: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEph, regKey) + Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iDataCur, labelContinue, regKey, 0) + +__109: + ; + goto __107 +__106: + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iEph, labelBreak) + labelContinue = Xsqlite3VdbeMakeLabel(tls, pParse) + addrTop = Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iEph, regOldRowid) + + Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iDataCur, labelContinue, regOldRowid) + +__107: + ; +__103: + ; +__94: + ; + + // If the rowid value will change, set register regNewRowid to + // contain the new value. If the rowid is not being modified, + // then regNewRowid is the same register as regOldRowid, which is + // already populated. + + if !(chngRowid != 0) { + goto __116 + } + + if !(nChangeFrom == 0) { + goto __117 + } + Xsqlite3ExprCode(tls, pParse, pRowidExpr, regNewRowid) + goto __118 +__117: + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEph, iRowidExpr, regNewRowid) +__118: + ; + Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regNewRowid) +__116: + ; + + // Compute the old pre-UPDATE content of the row being changed, if that + // information is needed + if !(chngPk != 0 || hasFK != 0 || pTrigger != 0) { + goto __119 + } + oldmask = func() uint32 { + if hasFK != 0 { + return Xsqlite3FkOldmask(tls, pParse, pTab) + } + return uint32(0) + }() + oldmask = oldmask | Xsqlite3TriggerColmask(tls, pParse, + pTrigger, pChanges, 0, TRIGGER_BEFORE|TRIGGER_AFTER, pTab, onError) + i = 0 +__120: + if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __122 + } + colFlags = U32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24)).FcolFlags) + k = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(i))) + regOld + if !(oldmask == 0xffffffff || + i < 32 && oldmask&(uint32(uint32(1))<= 0) { + goto __134 + } + if !(nChangeFrom != 0) { + goto __136 + } + nOff = func() int32 { + if isView != 0 { + return int32((*Table)(unsafe.Pointer(pTab)).FnCol) + } + return int32(nPk) + }() + + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEph, nOff+j, k) + goto __137 +__136: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(j)*32)).FpExpr, k) +__137: + ; + goto __135 +__134: + if !(0 == *(*int32)(unsafe.Pointer(bp + 32))&TRIGGER_BEFORE || i > 31 || uint32(newmask)&(uint32(uint32(1))< 1 || chngKey != 0 { + return 0 + } + return OPFLAG_ISNOOP + }(), + regNewRowid) + if !(eOnePass == ONEPASS_MULTI) { + goto __159 + } + + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SAVEPOSITION)) +__159: + ; + if !!(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { + goto __160 + } + Xsqlite3VdbeAppendP4(tls, v, pTab, -6) +__160: + ; + + if !(hasFK != 0) { + goto __161 + } + Xsqlite3FkCheck(tls, pParse, pTab, 0, regNewRowid, aXRef, int32(chngKey)) +__161: + ; + + // Insert the new index entries and the new record. + Xsqlite3CompleteInsertion(tls, + pParse, pTab, iDataCur, iIdxCur, regNewRowid, aRegIdx, + OPFLAG_ISUPDATE|func() int32 { + if eOnePass == ONEPASS_MULTI { + return OPFLAG_SAVEPOSITION + } + return 0 + }(), + 0, 0) + + // Do any ON CASCADE, SET NULL or SET DEFAULT operations required to + // handle rows (possibly in other tables) that refer via a foreign key + // to the row just updated. + if !(hasFK != 0) { + goto __162 + } + Xsqlite3FkActions(tls, pParse, pTab, pChanges, regOldRowid, aXRef, int32(chngKey)) +__162: + ; +__153: + ; + + // Increment the row counter + if !(regRowCount != 0) { + goto __163 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__163: + ; + + Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_UPDATE, pChanges, + TRIGGER_AFTER, pTab, regOldRowid, onError, labelContinue) + + // Repeat the above with the next record to be updated, until + // all record selected by the WHERE clause have been updated. + if !(eOnePass == ONEPASS_SINGLE) { + goto __164 + } + // Nothing to do at end-of-loop for a single-pass + goto __165 +__164: + if !(eOnePass == ONEPASS_MULTI) { + goto __166 + } + Xsqlite3VdbeResolveLabel(tls, v, labelContinue) + Xsqlite3WhereEnd(tls, pWInfo) + goto __167 +__166: + Xsqlite3VdbeResolveLabel(tls, v, labelContinue) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEph, addrTop) +__167: + ; +__165: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelBreak) + + // Update the sqlite_sequence table by storing the content of the + // maximum rowid counter values recorded while inserting into + // autoincrement tables. + if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0) && pUpsert == uintptr(0)) { + goto __168 + } + Xsqlite3AutoincrementEnd(tls, pParse) +__168: + ; + + // Return the number of rows that were changed, if we are tracking + // that information. + if !(regRowCount != 0) { + goto __169 + } + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20394) +__169: + ; + +update_cleanup: + Xsqlite3AuthContextPop(tls, bp+16) + Xsqlite3DbFree(tls, db, aXRef) // Also frees aRegIdx[] and aToOpen[] + Xsqlite3SrcListDelete(tls, db, pTabList) + Xsqlite3ExprListDelete(tls, db, pChanges) + Xsqlite3ExprDelete(tls, db, pWhere) + return +} + +// Make sure "isView" and other macros defined above are undefined. Otherwise +// they may interfere with compilation of other functions in this file +// (or in another file, if this file becomes part of the amalgamation). + +// Generate code for an UPDATE of a virtual table. +// +// There are two possible strategies - the default and the special +// "onepass" strategy. Onepass is only used if the virtual table +// implementation indicates that pWhere may match at most one row. +// +// The default strategy is to create an ephemeral table that contains +// for each row to be changed: +// +// (A) The original rowid of that row. +// (B) The revised rowid for the row. +// (C) The content of every column in the row. +// +// Then loop through the contents of this ephemeral table executing a +// VUpdate for each row. When finished, drop the ephemeral table. +// +// The "onepass" strategy does not use an ephemeral table. Instead, it +// stores the same values (A, B and C above) in a register array and +// makes a single invocation of VUpdate. +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Virtual machine under construction + var ephemTab int32 // Table holding the result of the SELECT + var i int32 // Loop counter + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection + var pVTab uintptr = Xsqlite3GetVTable(tls, db, pTab) + var pWInfo uintptr = uintptr(0) + var nArg int32 = 2 + int32((*Table)(unsafe.Pointer(pTab)).FnCol) // Number of arguments to VUpdate + var regArg int32 // First register in VUpdate arg array + var regRec int32 // Register in which to assemble record + var regRowid int32 // Register for ephem table rowid + var iCsr int32 = (*SrcItem)(unsafe.Pointer(pSrc + 8)).FiCursor // Cursor used for virtual table scan + // var aDummy [2]int32 at bp, 8 + // Unused arg for sqlite3WhereOkOnePass() + var eOnePass int32 // True to use onepass strategy + var addr int32 // Address of OP_OpenEphemeral + + // Allocate nArg registers in which to gather the arguments for VUpdate. Then + // create and open the ephemeral table in which the records created from + // these arguments will be temporarily stored. + + ephemTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + addr = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, ephemTab, nArg) + regArg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nArg + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { + var pPk uintptr = uintptr(0) + var pRow uintptr + var pList uintptr + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + if pRowid != 0 { + pRow = Xsqlite3ExprDup(tls, db, pRowid, 0) + } else { + pRow = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) + } + } else { + var iPk I16 // PRIMARY KEY column + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + + iPk = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn)) + if *(*int32)(unsafe.Pointer(aXRef + uintptr(iPk)*4)) >= 0 { + pRow = Xsqlite3ExprDup(tls, db, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(*(*int32)(unsafe.Pointer(aXRef + uintptr(iPk)*4)))*32)).FpExpr, 0) + } else { + pRow = exprRowColumn(tls, pParse, int32(iPk)) + } + } + pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), pRow) + + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + if *(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) >= 0 { + pList = Xsqlite3ExprListAppend(tls, pParse, pList, + Xsqlite3ExprDup(tls, db, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(*(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)))*32)).FpExpr, 0)) + } else { + pList = Xsqlite3ExprListAppend(tls, pParse, pList, exprRowColumn(tls, pParse, i)) + } + } + + updateFromSelect(tls, pParse, ephemTab, pPk, pList, pSrc, pWhere, uintptr(0), uintptr(0)) + Xsqlite3ExprListDelete(tls, db, pList) + eOnePass = ONEPASS_OFF + } else { + regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + + // Start scanning the virtual table + pWInfo = Xsqlite3WhereBegin(tls, + pParse, pSrc, pWhere, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_ONEPASS_DESIRED), 0) + if pWInfo == uintptr(0) { + return + } + + // Populate the argument registers. + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + + if *(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) >= 0 { + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(*(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)))*32)).FpExpr, regArg+2+i) + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_VColumn, iCsr, i, regArg+2+i) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_NOCHNG)) // For sqlite3_vtab_nochange() + } + } + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iCsr, regArg) + if pRowid != 0 { + Xsqlite3ExprCode(tls, pParse, pRowid, regArg+1) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iCsr, regArg+1) + } + } else { + var pPk uintptr // PRIMARY KEY index + var iPk I16 // PRIMARY KEY column + pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) + + iPk = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn)) + Xsqlite3VdbeAddOp3(tls, v, OP_VColumn, iCsr, int32(iPk), regArg) + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, regArg+2+int32(iPk), regArg+1) + } + + eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp) + + // There is no ONEPASS_MULTI on virtual tables + + if eOnePass != 0 { + // If using the onepass strategy, no-op out the OP_OpenEphemeral coded + // above. + Xsqlite3VdbeChangeToNoop(tls, v, addr) + Xsqlite3VdbeAddOp1(tls, v, OP_Close, iCsr) + } else { + // Create a record from the argument register contents and insert it into + // the ephemeral table. + Xsqlite3MultiWrite(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regArg, nArg, regRec) + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, ephemTab, regRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, ephemTab, regRec, regRowid) + } + } + + if eOnePass == ONEPASS_OFF { + // End the virtual table scan + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc == 1 { + Xsqlite3WhereEnd(tls, pWInfo) + } + + // Begin scannning through the ephemeral table. + addr = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, ephemTab) + + // Extract arguments from the current row of the ephemeral table and + // invoke the VUpdate method. + for i = 0; i < nArg; i++ { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, ephemTab, i, regArg+i) + } + } + Xsqlite3VtabMakeWritable(tls, pParse, pTab) + Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, nArg, regArg, pVTab, -12) + Xsqlite3VdbeChangeP5(tls, v, func() uint16 { + if onError == OE_Default { + return uint16(OE_Abort) + } + return uint16(onError) + }()) + Xsqlite3MayAbort(tls, pParse) + + // End of the ephemeral table scan. Or, if using the onepass strategy, + // jump to here if the scan visited zero rows. + if eOnePass == ONEPASS_OFF { + Xsqlite3VdbeAddOp2(tls, v, OP_Next, ephemTab, addr+1) + Xsqlite3VdbeJumpHere(tls, v, addr) + Xsqlite3VdbeAddOp2(tls, v, OP_Close, ephemTab, 0) + } else { + Xsqlite3WhereEnd(tls, pWInfo) + } +} + +//************* End of update.c ********************************************* +//************* Begin file upsert.c ***************************************** +// 2018-04-12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code to implement various aspects of UPSERT +// processing and handling of the Upsert object. +// #include "sqliteInt.h" + +// Free a list of Upsert objects +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ + for __ccgo := true; __ccgo; __ccgo = p != 0 { + var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert + Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) + Xsqlite3ExprDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTargetWhere) + Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertSet) + Xsqlite3ExprDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertWhere) + Xsqlite3DbFree(tls, db, (*Upsert)(unsafe.Pointer(p)).FpToFree) + Xsqlite3DbFree(tls, db, p) + p = pNext + } +} + +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ + if p != 0 { + upsertDelete(tls, db, p) + } +} + +// Duplicate an Upsert object. +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ + if p == uintptr(0) { + return uintptr(0) + } + return Xsqlite3UpsertNew(tls, db, + Xsqlite3ExprListDup(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget, 0), + Xsqlite3ExprDup(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTargetWhere, 0), + Xsqlite3ExprListDup(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertSet, 0), + Xsqlite3ExprDup(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertWhere, 0), + Xsqlite3UpsertDup(tls, db, (*Upsert)(unsafe.Pointer(p)).FpNextUpsert)) +} + +// Create a new Upsert object. +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ + var pNew uintptr + pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) + if pNew == uintptr(0) { + Xsqlite3ExprListDelete(tls, db, pTarget) + Xsqlite3ExprDelete(tls, db, pTargetWhere) + Xsqlite3ExprListDelete(tls, db, pSet) + Xsqlite3ExprDelete(tls, db, pWhere) + Xsqlite3UpsertDelete(tls, db, pNext) + return uintptr(0) + } else { + (*Upsert)(unsafe.Pointer(pNew)).FpUpsertTarget = pTarget + (*Upsert)(unsafe.Pointer(pNew)).FpUpsertTargetWhere = pTargetWhere + (*Upsert)(unsafe.Pointer(pNew)).FpUpsertSet = pSet + (*Upsert)(unsafe.Pointer(pNew)).FpUpsertWhere = pWhere + (*Upsert)(unsafe.Pointer(pNew)).FisDoUpdate = U8(libc.Bool32(pSet != uintptr(0))) + (*Upsert)(unsafe.Pointer(pNew)).FpNextUpsert = pNext + } + return pNew +} + +// Analyze the ON CONFLICT clause described by pUpsert. Resolve all +// symbols in the conflict-target. +// +// Return SQLITE_OK if everything works, or an error code is something +// is wrong. +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + var pTab uintptr // That table into which we are inserting + var rc int32 // Result code + var iCursor int32 // Cursor used by pTab + var pIdx uintptr // One of the indexes of pTab + var pTarget uintptr // The conflict-target clause + var pTerm uintptr // One term of the conflict-target clause + // var sNC NameContext at bp+16, 56 + // Context for resolving symbolic names + // var sCol [2]Expr at bp+72, 144 + // Index column converted into an Expr + var nClause int32 = 0 // Counter of ON CONFLICT clauses + + // Resolve all symbolic names in the conflict-target clause, which + // includes both the list of columns and the optional partial-index + // WHERE clause. + libc.Xmemset(tls, bp+16, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpSrcList = pTabList +__1: + if !(pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != 0) { + goto __3 + } + { + rc = Xsqlite3ResolveExprListNames(tls, bp+16, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) + if rc != 0 { + return rc + } + rc = Xsqlite3ResolveExprNames(tls, bp+16, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) + if rc != 0 { + return rc + } + + // Check to see if the conflict target matches the rowid. + pTab = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FpTab + pTarget = (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget + iCursor = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) && + (*ExprList)(unsafe.Pointer(pTarget)).FnExpr == 1 && + int32((*Expr)(unsafe.Pointer(libc.AssignUintptr(&pTerm, (*ExprList_item)(unsafe.Pointer(pTarget+8)).FpExpr))).Fop) == TK_COLUMN && + int32((*Expr)(unsafe.Pointer(pTerm)).FiColumn) == -1 { + // The conflict-target is the rowid of the primary table + + goto __2 + } + + // Initialize sCol[0..1] to be an expression parse tree for a + // single column of an index. The sCol[0] node will be the TK_COLLATE + // operator and sCol[1] will be the TK_COLUMN operator. Code below + // will populate the specific collation and column number values + // prior to comparing against the conflict-target expression. + libc.Xmemset(tls, bp+72, 0, uint64(unsafe.Sizeof([2]Expr{}))) + (*Expr)(unsafe.Pointer(bp + 72)).Fop = U8(TK_COLLATE) + (*Expr)(unsafe.Pointer(bp + 72)).FpLeft = bp + 72 + 1*72 + (*Expr)(unsafe.Pointer(bp + 72 + 1*72)).Fop = U8(TK_COLUMN) + (*Expr)(unsafe.Pointer(bp + 72 + 1*72)).FiTable = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor + + // Check for matches against other indexes + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + var ii int32 + var jj int32 + var nn int32 + if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None) { + continue + } + if (*ExprList)(unsafe.Pointer(pTarget)).FnExpr != int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) { + continue + } + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + if (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere == uintptr(0) { + continue + } + if Xsqlite3ExprCompare(tls, pParse, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere, + (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCursor) != 0 { + continue + } + } + nn = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) + for ii = 0; ii < nn; ii++ { + var pExpr uintptr + *(*uintptr)(unsafe.Pointer(bp + 72 + 8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(ii)*8)) + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(ii)*2))) == -2 { + + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(ii)*32)).FpExpr + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + (*Expr)(unsafe.Pointer(bp + 72)).FpLeft = pExpr + pExpr = bp + 72 + } + } else { + (*Expr)(unsafe.Pointer(bp + 72)).FpLeft = bp + 72 + 1*72 + (*Expr)(unsafe.Pointer(bp + 72 + 1*72)).FiColumn = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(ii)*2)) + pExpr = bp + 72 + } + for jj = 0; jj < nn; jj++ { + if Xsqlite3ExprCompare(tls, pParse, (*ExprList_item)(unsafe.Pointer(pTarget+8+uintptr(jj)*32)).FpExpr, pExpr, iCursor) < 2 { + break // Column ii of the index matches column jj of target + } + } + if jj >= nn { + // The target contains no match for column jj of the index + break + } + } + if ii < nn { + // Column ii of the index did not match any term of the conflict target. + // Continue the search with the next index. + continue + } + (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx = pIdx + break + } + if (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx == uintptr(0) { + // var zWhich [16]uint8 at bp+216, 16 + + if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { + *(*uint8)(unsafe.Pointer(bp + 216)) = uint8(0) + } else { + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20407, libc.VaList(bp, nClause+1)) + } + Xsqlite3ErrorMsg(tls, pParse, + ts+20411, libc.VaList(bp+8, bp+216)) + return SQLITE_ERROR + } + + } + goto __2 +__2: + pUpsert = (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert + nClause++ + goto __1 + goto __3 +__3: + ; + return SQLITE_OK +} + +// Return true if pUpsert is the last ON CONFLICT clause with a +// conflict target, or if pUpsert is followed by another ON CONFLICT +// clause that targets the INTEGER PRIMARY KEY. +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ + var pNext uintptr + if pUpsert == uintptr(0) { + return 0 + } + pNext = (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert + if pNext == uintptr(0) { + return 1 + } + if (*Upsert)(unsafe.Pointer(pNext)).FpUpsertTarget == uintptr(0) { + return 1 + } + if (*Upsert)(unsafe.Pointer(pNext)).FpUpsertIdx == uintptr(0) { + return 1 + } + return 0 +} + +// Given the list of ON CONFLICT clauses described by pUpsert, and +// a particular index pIdx, return a pointer to the particular ON CONFLICT +// clause that applies to the index. Or, if the index is not subject to +// any ON CONFLICT clause, return NULL. +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ + for pUpsert != 0 && + (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && + (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { + pUpsert = (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert + } + return pUpsert +} + +// Generate bytecode that does an UPDATE as part of an upsert. +// +// If pIdx is NULL, then the UNIQUE constraint that failed was the IPK. +// In this case parameter iCur is a cursor open on the table b-tree that +// currently points to the conflicting table row. Otherwise, if pIdx +// is not NULL, then pIdx is the constraint that failed and iCur is a +// cursor points to the conflicting row. +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pSrc uintptr // FROM clause for the UPDATE + var iDataCur int32 + var i int32 + var pTop uintptr = pUpsert + + iDataCur = (*Upsert)(unsafe.Pointer(pUpsert)).FiDataCur + pUpsert = Xsqlite3UpsertOfIndex(tls, pTop, pIdx) + + if pIdx != 0 && iCur != iDataCur { + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + var regRowid int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_IdxRowid, iCur, regRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, iDataCur, 0, regRowid) + + Xsqlite3ReleaseTempReg(tls, pParse, regRowid) + } else { + var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) + var nPk int32 = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + var iPk int32 = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nPk + for i = 0; i < nPk; i++ { + var k int32 + + k = int32(Xsqlite3TableColumnToIndex(tls, pIdx, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iCur, k, iPk+i) + + } + + i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) + + Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, + ts+12078, -1) + Xsqlite3MayAbort(tls, pParse) + Xsqlite3VdbeJumpHere(tls, v, i) + } + } + // pUpsert does not own pTop->pUpsertSrc - the outer INSERT statement does. + // So we have to make a copy before passing it down into sqlite3Update() + pSrc = Xsqlite3SrcListDup(tls, db, (*Upsert)(unsafe.Pointer(pTop)).FpUpsertSrc, 0) + // excluded.* columns of type REAL need to be converted to a hard real + for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).Faffinity) == SQLITE_AFF_REAL { + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, (*Upsert)(unsafe.Pointer(pTop)).FregData+i) + } + } + Xsqlite3Update(tls, pParse, pSrc, Xsqlite3ExprListDup(tls, db, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSet, 0), + Xsqlite3ExprDup(tls, db, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertWhere, 0), OE_Abort, uintptr(0), uintptr(0), pUpsert) + +} + +//************* End of upsert.c ********************************************* +//************* Begin file vacuum.c ***************************************** +// 2003 April 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains code used to implement the VACUUM command. +// +// Most of the code in this file may be omitted by defining the +// SQLITE_OMIT_VACUUM macro. +// #include "sqliteInt.h" +// #include "vdbeInt.h" + +// Execute zSql on database db. +// +// If zSql returns rows, then each row will have exactly one +// column. (This will only happen if zSql begins with "SELECT".) +// Take each row of result and call execSql() again recursively. +// +// The execSqlF() routine does the same thing, except it accepts +// a format string as its third argument +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pStmt uintptr at bp, 8 + + var rc int32 + + // printf("SQL: [%s]\n", zSql); fflush(stdout); + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp, uintptr(0)) + if rc != SQLITE_OK { + return rc + } + for SQLITE_ROW == libc.AssignInt32(&rc, Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp)))) { + var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) + + // The secondary SQL must be one of CREATE TABLE, CREATE INDEX, + // or INSERT. Historically there have been attacks that first + // corrupt the sqlite_schema.sql field with other kinds of statements + // then run VACUUM to get those statements to execute at inappropriate + // times. + if zSubSql != 0 && + (libc.Xstrncmp(tls, zSubSql, ts+20484, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20488, uint64(3)) == 0) { + rc = execSql(tls, db, pzErrMsg, zSubSql) + if rc != SQLITE_OK { + break + } + } + } + + if rc == SQLITE_DONE { + rc = SQLITE_OK + } + if rc != 0 { + Xsqlite3SetString(tls, pzErrMsg, db, Xsqlite3_errmsg(tls, db)) + } + 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:145111:12: */ + var z uintptr + var ap Va_list + _ = ap + var rc int32 + ap = va + z = Xsqlite3VMPrintf(tls, db, zSql, ap) + _ = ap + if z == uintptr(0) { + return SQLITE_NOMEM + } + rc = execSql(tls, db, pzErrMsg, z) + Xsqlite3DbFree(tls, db, z) + return rc +} + +// The VACUUM command is used to clean up the database, +// collapse free space, etc. It is modelled after the VACUUM command +// in PostgreSQL. The VACUUM command works as follows: +// +// (1) Create a new transient database file +// (2) Copy all content from the database being vacuumed into +// the new transient database file +// (3) Copy content from the transient database back into the +// original database. +// +// The transient database requires temporary disk space approximately +// equal to the size of the original database. The copy operation of +// step (3) requires additional temporary disk space approximately equal +// to the size of the original database for the rollback journal. +// Hence, temporary disk space that is approximately 2x the size of the +// original database is required. Every page of the database is written +// approximately 3 times: Once for step (2) and twice for step (3). +// Two writes per page are required in step (3) because the original +// database content must be written into the rollback journal prior to +// overwriting the database with the vacuumed content. +// +// Only 1x temporary space and only 1x writes would be required if +// the copy of step (3) were replaced by deleting the original database +// and renaming the transient database as the original. But that will +// not work if other processes are attached to the original database. +// And a power loss in between deleting the original and renaming the +// transient would cause the database file to appear to be deleted +// following reboot. +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = pNm + + var v uintptr + var iDb int32 + var iIntoReg int32 + v = Xsqlite3GetVdbe(tls, pParse) + iDb = 0 + if !(v == uintptr(0)) { + goto __1 + } + goto build_vacuum_end +__1: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __2 + } + goto build_vacuum_end +__2: + ; + if !(*(*uintptr)(unsafe.Pointer(bp)) != 0) { + goto __3 + } + // Default behavior: Report an error if the argument to VACUUM is + // not recognized + iDb = Xsqlite3TwoPartName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pNm */)), *(*uintptr)(unsafe.Pointer(bp /* pNm */)), bp) + if !(iDb < 0) { + goto __4 + } + goto build_vacuum_end +__4: + ; +__3: + ; + if !(iDb != 1) { + goto __5 + } + iIntoReg = 0 + if !(pInto != 0 && Xsqlite3ResolveSelfReference(tls, pParse, uintptr(0), 0, pInto, uintptr(0)) == 0) { + goto __6 + } + iIntoReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3ExprCode(tls, pParse, pInto, iIntoReg) +__6: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Vacuum, iDb, iIntoReg) + Xsqlite3VdbeUsesBtree(tls, v, iDb) +__5: + ; +build_vacuum_end: + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pInto) + return +} + +// This routine implements the OP_Vacuum opcode of the VDBE. +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + var rc int32 // Return code from service routines + var pMain uintptr // The database being vacuumed + var pTemp uintptr // The temporary database we vacuum into + var saved_mDbFlags U32 // Saved value of db->mDbFlags + var saved_flags U64 // Saved value of db->flags + var saved_nChange I64 // Saved value of db->nChange + var saved_nTotalChange I64 // Saved value of db->nTotalChange + var saved_openFlags U32 // Saved value of db->openFlags + var saved_mTrace U8 // Saved trace settings + var pDb uintptr // Database to detach at end of vacuum + var isMemDb int32 // True if vacuuming a :memory: database + var nRes int32 // Bytes of reserved space at the end of each page + var nDb int32 // Number of attached databases + var zDbMain uintptr // Schema name of database to vacuum + var zOut uintptr + var id uintptr + // var sz I64 at bp+40, 8 + + // var meta U32 at bp+48, 4 + + var i int32 + rc = SQLITE_OK + pDb = uintptr(0) // Name of output file + + if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { + goto __1 + } + Xsqlite3SetString(tls, pzErrMsg, db, ts+20492) + return SQLITE_ERROR // IMP: R-12218-18073 +__1: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { + goto __2 + } + Xsqlite3SetString(tls, pzErrMsg, db, ts+20532) + return SQLITE_ERROR // IMP: R-15610-35227 +__2: + ; + saved_openFlags = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags + if !(pOut != 0) { + goto __3 + } + if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { + goto __5 + } + Xsqlite3SetString(tls, pzErrMsg, db, ts+20575) + return SQLITE_ERROR +__5: + ; + zOut = Xsqlite3_value_text(tls, pOut) + *(*uint32)(unsafe.Pointer(db + 76)) &= libc.Uint32FromInt32(libc.CplInt32(SQLITE_OPEN_READONLY)) + *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) + goto __4 +__3: + zOut = ts + 1525 /* "" */ +__4: + ; + + // Save the current value of the database flags so that it can be + // restored before returning. Then set the writable-schema flag, and + // disable CHECK and foreign key constraints. + saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags + saved_mDbFlags = (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags + saved_nChange = (*Sqlite3)(unsafe.Pointer(db)).FnChange + saved_nTotalChange = (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange + saved_mTrace = (*Sqlite3)(unsafe.Pointer(db)).FmTrace + *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_WriteSchema | SQLITE_IgnoreChecks) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin | DBFLAG_Vacuum) + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_ForeignKeys|SQLITE_ReverseOrder| + SQLITE_Defensive) | U64(uint64(0x00001))<<32) + (*Sqlite3)(unsafe.Pointer(db)).FmTrace = U8(0) + + zDbMain = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + pMain = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt + isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) + + // Attach the temporary database as 'vacuum_db'. The synchronous pragma + // can be set to 'off' for this file, as it is not recovered if a crash + // occurs anyway. The integrity of the database is maintained by a + // (possibly synchronous) transaction opened on the main database before + // sqlite3BtreeCopyFile() is called. + // + // An optimisation would be to use a non-journaled pager. + // (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but + // that actually made the VACUUM run slower. Very little journalling + // actually occurs when doing a vacuum since the vacuum_db is initially + // empty. Only the journal header is written. Apparently it takes more + // time to parse and run the PRAGMA to turn journalling off than it does + // to write the journal header file. + nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb + rc = execSqlF(tls, db, pzErrMsg, ts+20593, libc.VaList(bp, zOut)) + (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags + if !(rc != SQLITE_OK) { + goto __6 + } + goto end_of_vacuum +__6: + ; + + pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(nDb)*32 + + pTemp = (*Db)(unsafe.Pointer(pDb)).FpBt + if !(pOut != 0) { + goto __7 + } + id = Xsqlite3PagerFile(tls, Xsqlite3BtreePager(tls, pTemp)) + *(*I64)(unsafe.Pointer(bp + 40 /* sz */)) = int64(0) + if !((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != uintptr(0) && (Xsqlite3OsFileSize(tls, id, bp+40) != SQLITE_OK || *(*I64)(unsafe.Pointer(bp + 40)) > int64(0))) { + goto __8 + } + rc = SQLITE_ERROR + Xsqlite3SetString(tls, pzErrMsg, db, ts+20616) + goto end_of_vacuum +__8: + ; + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) +__7: + ; + nRes = Xsqlite3BtreeGetRequestedReserve(tls, pMain) + + Xsqlite3BtreeSetCacheSize(tls, pTemp, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).Fcache_size) + Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, uint32(PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL)) + + // Begin a transaction and take an exclusive lock on the main database + // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, + // to ensure that we do not try to change the page-size on a WAL database. + rc = execSql(tls, db, pzErrMsg, ts+14431) + if !(rc != SQLITE_OK) { + goto __9 + } + goto end_of_vacuum +__9: + ; + rc = Xsqlite3BtreeBeginTrans(tls, pMain, func() int32 { + if pOut == uintptr(0) { + return 2 + } + return 0 + }(), uintptr(0)) + if !(rc != SQLITE_OK) { + goto __10 + } + goto end_of_vacuum +__10: + ; + + // Do not attempt to change the page size for a WAL database + if !(Xsqlite3PagerGetJournalMode(tls, Xsqlite3BtreePager(tls, pMain)) == + PAGER_JOURNALMODE_WAL && + pOut == uintptr(0)) { + goto __11 + } + (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize = 0 +__11: + ; + + if !(Xsqlite3BtreeSetPageSize(tls, pTemp, Xsqlite3BtreeGetPageSize(tls, pMain), nRes, 0) != 0 || + !(isMemDb != 0) && Xsqlite3BtreeSetPageSize(tls, pTemp, (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize, nRes, 0) != 0 || + (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __12 + } + rc = SQLITE_NOMEM + goto end_of_vacuum +__12: + ; + + Xsqlite3BtreeSetAutoVacuum(tls, pTemp, func() int32 { + if int32((*Sqlite3)(unsafe.Pointer(db)).FnextAutovac) >= 0 { + return int32((*Sqlite3)(unsafe.Pointer(db)).FnextAutovac) + } + return Xsqlite3BtreeGetAutoVacuum(tls, pMain) + }()) + + // Query the schema of the main database. Create a mirror schema + // in the temporary database. + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db + rc = execSqlF(tls, db, pzErrMsg, + + ts+20643, + libc.VaList(bp+8, zDbMain)) + if !(rc != SQLITE_OK) { + goto __13 + } + goto end_of_vacuum +__13: + ; + rc = execSqlF(tls, db, pzErrMsg, + + ts+20751, + libc.VaList(bp+16, zDbMain)) + if !(rc != SQLITE_OK) { + goto __14 + } + goto end_of_vacuum +__14: + ; + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) + + // Loop through the tables in the main database. For each, do + // an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy + // the contents to the temporary database. + rc = execSqlF(tls, db, pzErrMsg, + + ts+20805, + libc.VaList(bp+24, zDbMain)) + + *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) + if !(rc != SQLITE_OK) { + goto __15 + } + goto end_of_vacuum +__15: + ; + + // Copy the triggers, views, and virtual tables from the main database + // over to the temporary database. None of these objects has any + // associated storage, so all we have to do is copy their entries + // from the schema table. + rc = execSqlF(tls, db, pzErrMsg, + + ts+20956, + libc.VaList(bp+32, zDbMain)) + if !(rc != 0) { + goto __16 + } + goto end_of_vacuum +__16: + ; + + /* At this point, there is a write transaction open on both the + ** vacuum database and the main database. Assuming no error occurs, + ** both transactions are closed by this block - the main database + ** transaction by sqlite3BtreeCopyFile() and the other by an explicit + ** call to sqlite3BtreeCommit(). + */ + + // Copy Btree meta values + i = 0 +__17: + if !(i < int32(uint64(unsafe.Sizeof(aCopy))/uint64(unsafe.Sizeof(uint8(0))))) { + goto __19 + } + // GetMeta() and UpdateMeta() cannot fail in this context because + // we already have page 1 loaded into cache and marked dirty. + Xsqlite3BtreeGetMeta(tls, pMain, int32(aCopy[i]), bp+48) + rc = Xsqlite3BtreeUpdateMeta(tls, pTemp, int32(aCopy[i]), *(*U32)(unsafe.Pointer(bp + 48))+U32(aCopy[i+1])) + if !(rc != SQLITE_OK) { + goto __20 + } + goto end_of_vacuum +__20: + ; + goto __18 +__18: + i = i + 2 + goto __17 + goto __19 +__19: + ; + + if !(pOut == uintptr(0)) { + goto __21 + } + rc = Xsqlite3BtreeCopyFile(tls, pMain, pTemp) +__21: + ; + if !(rc != SQLITE_OK) { + goto __22 + } + goto end_of_vacuum +__22: + ; + rc = Xsqlite3BtreeCommit(tls, pTemp) + if !(rc != SQLITE_OK) { + goto __23 + } + goto end_of_vacuum +__23: + ; + if !(pOut == uintptr(0)) { + goto __24 + } + Xsqlite3BtreeSetAutoVacuum(tls, pMain, Xsqlite3BtreeGetAutoVacuum(tls, pTemp)) +__24: + ; + + if !(pOut == uintptr(0)) { + goto __25 + } + rc = Xsqlite3BtreeSetPageSize(tls, pMain, Xsqlite3BtreeGetPageSize(tls, pTemp), nRes, 1) +__25: + ; + +end_of_vacuum: + // Restore the original value of db->flags + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) + (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = saved_mDbFlags + (*Sqlite3)(unsafe.Pointer(db)).Fflags = saved_flags + (*Sqlite3)(unsafe.Pointer(db)).FnChange = saved_nChange + (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange = saved_nTotalChange + (*Sqlite3)(unsafe.Pointer(db)).FmTrace = saved_mTrace + Xsqlite3BtreeSetPageSize(tls, pMain, -1, 0, 1) + + // Currently there is an SQL level transaction open on the vacuum + // database. No locks are held on any other files (since the main file + // was committed at the btree level). So it safe to end the transaction + // by manually setting the autoCommit flag to true and detaching the + // vacuum database. The vacuum_db journal file is deleted when the pager + // is closed by the DETACH. + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) + + if !(pDb != 0) { + goto __26 + } + Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + (*Db)(unsafe.Pointer(pDb)).FpBt = uintptr(0) + (*Db)(unsafe.Pointer(pDb)).FpSchema = uintptr(0) +__26: + ; + + // This both clears the schemas and reduces the size of the db->aDb[] + // array. + Xsqlite3ResetAllSchemasOfConnection(tls, db) + + return rc +} + +var aCopy = [10]uint8{ + uint8(BTREE_SCHEMA_VERSION), uint8(1), // Add one to the old schema cookie + uint8(BTREE_DEFAULT_CACHE_SIZE), uint8(0), // Preserve the default page cache size + uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding + uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version + uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id +} /* sqlite3.c:145385:32 */ + +// Construct and install a Module object for a virtual table. When this +// routine is called, it is guaranteed that all appropriate locks are held +// and the module is not already part of the connection. +// +// If there already exists a module with zName, replace it with the new one. +// If pModule==0, then delete the module zName if it exists. +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ + var pMod uintptr + var pDel uintptr + var zCopy uintptr + if pModule == uintptr(0) { + zCopy = zName + pMod = uintptr(0) + } else { + var nName int32 = Xsqlite3Strlen30(tls, zName) + pMod = Xsqlite3Malloc(tls, uint64(uint64(unsafe.Sizeof(Module{}))+uint64(nName)+uint64(1))) + if pMod == uintptr(0) { + Xsqlite3OomFault(tls, db) + return uintptr(0) + } + zCopy = pMod + 1*48 + libc.Xmemcpy(tls, zCopy, zName, uint64(nName+1)) + (*Module)(unsafe.Pointer(pMod)).FzName = zCopy + (*Module)(unsafe.Pointer(pMod)).FpModule = pModule + (*Module)(unsafe.Pointer(pMod)).FpAux = pAux + (*Module)(unsafe.Pointer(pMod)).FxDestroy = xDestroy + (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) + (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 + } + pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + if pDel != 0 { + if pDel == pMod { + Xsqlite3OomFault(tls, db) + Xsqlite3DbFree(tls, db, pDel) + pMod = uintptr(0) + } else { + Xsqlite3VtabEponymousTableClear(tls, db, pDel) + Xsqlite3VtabModuleUnref(tls, db, pDel) + } + } + return pMod +} + +// The actual function that does the work of creating a new module. +// This function implements the sqlite3_create_module() and +// sqlite3_create_module_v2() interfaces. +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ + var rc int32 = SQLITE_OK + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + Xsqlite3VtabCreateModule(tls, db, zName, pModule, pAux, xDestroy) + rc = Xsqlite3ApiExit(tls, db, rc) + if rc != SQLITE_OK && xDestroy != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, pAux) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// External API function used to create a new virtual-table module. +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ + return createModule(tls, db, zName, pModule, pAux, uintptr(0)) +} + +// External API function used to create a new virtual-table module. +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ + return createModule(tls, db, zName, pModule, pAux, xDestroy) +} + +// External API to drop all virtual-table modules, except those named +// on the azNames list. +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ + var pThis uintptr + var pNext uintptr + for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata + pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext + if azNames != 0 { + var ii int32 + for ii = 0; *(*uintptr)(unsafe.Pointer(azNames + uintptr(ii)*8)) != uintptr(0) && libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(azNames + uintptr(ii)*8)), (*Module)(unsafe.Pointer(pMod)).FzName) != 0; ii++ { + } + if *(*uintptr)(unsafe.Pointer(azNames + uintptr(ii)*8)) != uintptr(0) { + continue + } + } + createModule(tls, db, (*Module)(unsafe.Pointer(pMod)).FzName, uintptr(0), uintptr(0), uintptr(0)) + } + return SQLITE_OK +} + +// Decrement the reference count on a Module object. Destroy the +// module when the reference count reaches zero. +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ + + (*Module)(unsafe.Pointer(pMod)).FnRefModule-- + if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { + if (*Module)(unsafe.Pointer(pMod)).FxDestroy != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Module)(unsafe.Pointer(pMod)).FxDestroy})).f(tls, (*Module)(unsafe.Pointer(pMod)).FpAux) + } + + Xsqlite3DbFree(tls, db, pMod) + } +} + +// Lock the virtual table so that it cannot be disconnected. +// Locks nest. Every lock should have a corresponding unlock. +// If an unlock is omitted, resources leaks will occur. +// +// If a disconnect is attempted while a virtual table is locked, +// the disconnect is deferred until all locks have been removed. +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ + (*VTable)(unsafe.Pointer(pVTab)).FnRef++ +} + +// pTab is a pointer to a Table structure representing a virtual-table. +// Return a pointer to the VTable object used by connection db to access +// this virtual-table, if one has been created, or NULL otherwise. +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ + var pVtab uintptr + + for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { + } + return pVtab +} + +// Decrement the ref-count on a virtual table object. When the ref-count +// reaches zero, call the xDisconnect() method to delete the object. +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ + var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb + + (*VTable)(unsafe.Pointer(pVTab)).FnRef-- + if (*VTable)(unsafe.Pointer(pVTab)).FnRef == 0 { + var p uintptr = (*VTable)(unsafe.Pointer(pVTab)).FpVtab + Xsqlite3VtabModuleUnref(tls, (*VTable)(unsafe.Pointer(pVTab)).Fdb, (*VTable)(unsafe.Pointer(pVTab)).FpMod) + if p != 0 { + (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(p)).FpModule)).FxDisconnect})).f(tls, p) + } + Xsqlite3DbFree(tls, db, pVTab) + } +} + +// Table p is a virtual table. This function moves all elements in the +// p->u.vtab.p list to the sqlite3.pDisconnect lists of their associated +// database connections to be disconnected at the next opportunity. +// Except, if argument db is not NULL, then the entry associated with +// connection db is left in the p->u.vtab.p list. +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ + var pRet uintptr = uintptr(0) + var pVTable uintptr + + pVTable = *(*uintptr)(unsafe.Pointer(p + 64 + 16 /* &.p */)) + *(*uintptr)(unsafe.Pointer(p + 64 + 16 /* &.p */)) = uintptr(0) + + // Assert that the mutex (if any) associated with the BtShared database + // that contains table p is held by the caller. See header comments + // above function sqlite3VtabUnlockList() for an explanation of why + // this makes it safe to access the sqlite3.pDisconnect list of any + // database connection that may have an entry in the p->u.vtab.p list. + + for pVTable != 0 { + var db2 uintptr = (*VTable)(unsafe.Pointer(pVTable)).Fdb + var pNext uintptr = (*VTable)(unsafe.Pointer(pVTable)).FpNext + + if db2 == db { + pRet = pVTable + *(*uintptr)(unsafe.Pointer(p + 64 + 16 /* &.p */)) = pRet + (*VTable)(unsafe.Pointer(pRet)).FpNext = uintptr(0) + } else { + (*VTable)(unsafe.Pointer(pVTable)).FpNext = (*Sqlite3)(unsafe.Pointer(db2)).FpDisconnect + (*Sqlite3)(unsafe.Pointer(db2)).FpDisconnect = pVTable + } + pVTable = pNext + } + + return pRet +} + +// Table *p is a virtual table. This function removes the VTable object +// for table *p associated with database connection db from the linked +// list in p->pVTab. It also decrements the VTable ref count. This is +// used when closing database connection db to free all of its VTable +// objects without disturbing the rest of the Schema object (which may +// be being used by other shared-cache connections). +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ + var ppVTab uintptr + + for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { + if (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppVTab)))).Fdb == db { + var pVTab uintptr = *(*uintptr)(unsafe.Pointer(ppVTab)) + *(*uintptr)(unsafe.Pointer(ppVTab)) = (*VTable)(unsafe.Pointer(pVTab)).FpNext + Xsqlite3VtabUnlock(tls, pVTab) + break + } + } +} + +// Disconnect all the virtual table objects in the sqlite3.pDisconnect list. +// +// This function may only be called when the mutexes associated with all +// shared b-tree databases opened using connection db are held by the +// caller. This is done to protect the sqlite3.pDisconnect list. The +// sqlite3.pDisconnect list is accessed only as follows: +// +// 1) By this function. In this case, all BtShared mutexes and the mutex +// associated with the database handle itself must be held. +// +// 2) By function vtabDisconnectAll(), when it adds a VTable entry to +// the sqlite3.pDisconnect list. In this case either the BtShared mutex +// associated with the database the virtual table is stored in is held +// or, if the virtual table is stored in a non-sharable database, then +// the database handle mutex is held. +// +// As a result, a sqlite3.pDisconnect cannot be accessed simultaneously +// by multiple threads. It is thread-safe. +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ + var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect + + if p != 0 { + (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect = uintptr(0) + Xsqlite3ExpirePreparedStatements(tls, db, 0) + for __ccgo := true; __ccgo; __ccgo = p != 0 { + var pNext uintptr = (*VTable)(unsafe.Pointer(p)).FpNext + Xsqlite3VtabUnlock(tls, p) + p = pNext + } + } +} + +// Clear any and all virtual-table information from the Table record. +// This routine is called, for example, just before deleting the Table +// record. +// +// Since it is a virtual-table, the Table structure contains a pointer +// to the head of a linked list of VTable structures. Each VTable +// structure is associated with a single sqlite3* user of the schema. +// The reference count of the VTable structure associated with database +// connection db is decremented immediately (which may lead to the +// structure being xDisconnected and free). Any other VTable structures +// in the list are moved to the sqlite3.pDisconnect list of the associated +// database connection. +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ + + if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + vtabDisconnectAll(tls, uintptr(0), p) + } + if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { + var i int32 + for i = 0; i < *(*int32)(unsafe.Pointer(p + 64 /* &.u */ /* &.vtab */ /* &.nArg */)); i++ { + if i != 1 { + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64 + 8 /* &.azArg */)) + uintptr(i)*8))) + } + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 64 + 8 /* &.azArg */))) + } +} + +// Add a new module argument to pTable->u.vtab.azArg[]. +// The string is not copied - the pointer is stored. The +// string will be freed automatically when the table is +// deleted. +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var nBytes Sqlite3_int64 + var azModuleArg uintptr + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + + nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) + if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { + Xsqlite3ErrorMsg(tls, pParse, ts+12305, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + } + azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) + if azModuleArg == uintptr(0) { + Xsqlite3DbFree(tls, db, zArg) + } else { + var i int32 = libc.PostIncInt32(&*(*int32)(unsafe.Pointer(pTable + 64)), 1) + *(*uintptr)(unsafe.Pointer(azModuleArg + uintptr(i)*8)) = zArg + *(*uintptr)(unsafe.Pointer(azModuleArg + uintptr(i+1)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)) = azModuleArg + } +} + +// The parser calls this routine when it first sees a CREATE VIRTUAL TABLE +// statement. The module name has been parsed, but the optional list +// of parameters that follow the module name are still pending. +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ + var pTable uintptr // The new virtual table + var db uintptr // Database connection + + Xsqlite3StartTable(tls, pParse, pName1, pName2, 0, 0, 1, ifNotExists) + pTable = (*Parse)(unsafe.Pointer(pParse)).FpNewTable + if pTable == uintptr(0) { + return + } + + (*Table)(unsafe.Pointer(pTable)).FeTabType = U8(TABTYP_VTAB) + + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + + addModuleArgument(tls, pParse, pTable, Xsqlite3NameFromToken(tls, db, pModuleName)) + addModuleArgument(tls, pParse, pTable, uintptr(0)) + addModuleArgument(tls, pParse, pTable, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTable)).FzName)) + + (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pModuleName)).Fz+uintptr((*Token)(unsafe.Pointer(pModuleName)).Fn)) - int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) / 1)) + + // Creating a virtual table invokes the authorization callback twice. + // The first invocation, to obtain permission to INSERT a row into the + // sqlite_schema table, has already been made by sqlite3StartTable(). + // The second call, to obtain permission to create the table, is made now. + if *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)) != 0 { + var iDb int32 = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTable)).FpSchema) + // The database the table is being created in + Xsqlite3AuthCheck(tls, pParse, SQLITE_CREATE_VTABLE, (*Table)(unsafe.Pointer(pTable)).FzName, + *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)))), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName) + } +} + +// This routine takes the module argument that has been accumulating +// in pParse->zArg[] and appends it to the list of arguments on the +// virtual table currently under construction in pParse->pTable. +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ + if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { + var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz + var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + addModuleArgument(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpNewTable, Xsqlite3DbStrNDup(tls, db, z, uint64(n))) + } +} + +// The parser calls this routine after the CREATE VIRTUAL TABLE statement +// has been completely parsed. +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var pTab uintptr = (*Parse)(unsafe.Pointer(pParse)).FpNewTable // The table being constructed + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + + if pTab == uintptr(0) { + return + } + + addArgumentToVtab(tls, pParse) + (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) + if *(*int32)(unsafe.Pointer(pTab + 64)) < 1 { + return + } + + // If the CREATE VIRTUAL TABLE statement is being entered for the + // first time (in other words if the virtual table is actually being + // created now instead of just being read out of sqlite_schema) then + // do additional initialization work and store the statement text + // in the sqlite_schema table. + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { + var zStmt uintptr + var zWhere uintptr + var iDb int32 + var iReg int32 + var v uintptr + + Xsqlite3MayAbort(tls, pParse) + + // Compute the complete text of the CREATE VIRTUAL TABLE statement + if pEnd != 0 { + (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn + } + zStmt = Xsqlite3MPrintf(tls, db, ts+21086, libc.VaList(bp, pParse+256)) + + // A slot for the record has already been allocated in the + // schema table. We just need to update that slot with all + // the information we've collected. + // + // The VM register number pParse->regRowid holds the rowid of an + // entry in the sqlite_schema table tht was created for this vtab + // by sqlite3StartTable(). + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + Xsqlite3NestedParse(tls, pParse, + + ts+21110, + libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, + (*Table)(unsafe.Pointer(pTab)).FzName, + (*Table)(unsafe.Pointer(pTab)).FzName, + zStmt, + (*Parse)(unsafe.Pointer(pParse)).FregRowid)) + v = Xsqlite3GetVdbe(tls, pParse) + Xsqlite3ChangeCookie(tls, pParse, iDb) + + Xsqlite3VdbeAddOp0(tls, v, OP_Expire) + zWhere = Xsqlite3MPrintf(tls, db, ts+21209, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) + Xsqlite3DbFree(tls, db, zStmt) + + iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeLoadString(tls, v, iReg, (*Table)(unsafe.Pointer(pTab)).FzName) + Xsqlite3VdbeAddOp2(tls, v, OP_VCreate, iDb, iReg) + } else { + // If we are rereading the sqlite_schema table create the in-memory + // record of the table. + var pOld uintptr + var pSchema uintptr = (*Table)(unsafe.Pointer(pTab)).FpSchema + var zName uintptr = (*Table)(unsafe.Pointer(pTab)).FzName + + Xsqlite3MarkAllShadowTablesOf(tls, db, pTab) + pOld = Xsqlite3HashInsert(tls, pSchema+8, zName, pTab) + if pOld != 0 { + Xsqlite3OomFault(tls, db) + // Malloc must have failed inside HashInsert() + return + } + (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) + } +} + +// The parser calls this routine when it sees the first token +// of an argument to the module name in a CREATE VIRTUAL TABLE statement. +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ + addArgumentToVtab(tls, pParse) + (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) + (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) +} + +// The parser calls this routine for each token after the first token +// in an argument to the module name in a CREATE VIRTUAL TABLE statement. +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ + var pArg uintptr = pParse + 368 + if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { + (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz + (*Token)(unsafe.Pointer(pArg)).Fn = (*Token)(unsafe.Pointer(p)).Fn + } else { + + (*Token)(unsafe.Pointer(pArg)).Fn = uint32(int32((int64((*Token)(unsafe.Pointer(p)).Fz+uintptr((*Token)(unsafe.Pointer(p)).Fn)) - int64((*Token)(unsafe.Pointer(pArg)).Fz)) / 1)) + } +} + +// Invoke a virtual table constructor (either xCreate or xConnect). The +// pointer to the function to invoke is passed as the fourth parameter +// to this procedure. +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + // var sCtx VtabCtx at bp+32, 32 + + var pVTable uintptr + var rc int32 + var azArg uintptr + var nArg int32 = *(*int32)(unsafe.Pointer(pTab + 64)) + *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) + var zModuleName uintptr + var iDb int32 + var pCtx uintptr + + azArg = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)) + + // Check that the virtual-table is not already being initialized + for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { + if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, + ts+21228, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + return SQLITE_LOCKED + } + } + + zModuleName = Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName) + if !(zModuleName != 0) { + return SQLITE_NOMEM + } + + pVTable = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(VTable{}))) + if !(pVTable != 0) { + Xsqlite3OomFault(tls, db) + Xsqlite3DbFree(tls, db, zModuleName) + return SQLITE_NOMEM + } + (*VTable)(unsafe.Pointer(pVTable)).Fdb = db + (*VTable)(unsafe.Pointer(pVTable)).FpMod = pMod + (*VTable)(unsafe.Pointer(pVTable)).FeVtabRisk = U8(SQLITE_VTABRISK_Normal) + + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)) + 1*8)) = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + + // Invoke the virtual table constructor + + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpTab = pTab + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpVTable = pVTable + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpPrior = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FbDeclared = 0 + (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = bp + 32 /* &sCtx */ + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xConstruct})).f(tls, db, (*Module)(unsafe.Pointer(pMod)).FpAux, nArg, azArg, pVTable+16 /* &.pVtab */, bp+64 /* &zErr */) + (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpPrior + if rc == SQLITE_NOMEM { + Xsqlite3OomFault(tls, db) + } + + if SQLITE_OK != rc { + if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21270, libc.VaList(bp+8, zModuleName)) + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3605, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) + } + Xsqlite3DbFree(tls, db, pVTable) + } else if (*VTable)(unsafe.Pointer(pVTable)).FpVtab != 0 { + // Justification of ALWAYS(): A correct vtab constructor must allocate + // the sqlite3_vtab object if successful. + libc.Xmemset(tls, (*VTable)(unsafe.Pointer(pVTable)).FpVtab, 0, uint64(unsafe.Sizeof(Sqlite3_vtab{}))) + (*Sqlite3_vtab)(unsafe.Pointer((*VTable)(unsafe.Pointer(pVTable)).FpVtab)).FpModule = (*Module)(unsafe.Pointer(pMod)).FpModule + (*Module)(unsafe.Pointer(pMod)).FnRefModule++ + (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 + if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { + var zFormat uintptr = ts + 21300 /* "vtable construct..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VtabUnlock(tls, pVTable) + rc = SQLITE_ERROR + } else { + var iCol int32 + var oooHidden U16 = U16(0) + // If everything went according to plan, link the new VTable structure + // into the linked list headed by pTab->u.vtab.p. Then loop through the + // columns of the table to see if any of them contain the token "hidden". + // If so, set the Column COLFLAG_HIDDEN flag and remove the token from + // the type string. + (*VTable)(unsafe.Pointer(pVTable)).FpNext = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)) + *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)) = pVTable + + for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1525) + var nType int32 + var i int32 = 0 + nType = Xsqlite3Strlen30(tls, zType) + for i = 0; i < nType; i++ { + if 0 == Xsqlite3_strnicmp(tls, ts+16056, zType+uintptr(i), 6) && + (i == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && + (int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { + break + } + } + if i < nType { + var j int32 + var nDel int32 = 6 + func() int32 { + if *(*uint8)(unsafe.Pointer(zType + uintptr(i+6))) != 0 { + return 1 + } + return 0 + }() + for j = i; j+nDel <= nType; j++ { + *(*uint8)(unsafe.Pointer(zType + uintptr(j))) = *(*uint8)(unsafe.Pointer(zType + uintptr(j+nDel))) + } + if int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i)))) == 0 && i > 0 { + + *(*uint8)(unsafe.Pointer(zType + uintptr(i-1))) = uint8(0) + } + *(*U16)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 + 16)) |= U16(COLFLAG_HIDDEN) + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasHidden) + oooHidden = U16(TF_OOOHidden) + } else { + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(oooHidden) + } + } + } + } + + Xsqlite3DbFree(tls, db, zModuleName) + return rc +} + +// This function is invoked by the parser to call the xConnect() method +// of the virtual table pTab. If an error occurs, an error code is returned +// and an error left in pParse. +// +// This call is a no-op if table pTab is not a virtual table. +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var zMod uintptr + var pMod uintptr + var rc int32 + + if Xsqlite3GetVTable(tls, db, pTab) != 0 { + return SQLITE_OK + } + + // Locate the required virtual table module + zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) + pMod = Xsqlite3HashFind(tls, db+568, zMod) + + if !(pMod != 0) { + var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21346, libc.VaList(bp, zModule)) + rc = SQLITE_ERROR + } else { + *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) + rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp+16) + if rc != SQLITE_OK { + Xsqlite3ErrorMsg(tls, pParse, ts+3605, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))) + (*Parse)(unsafe.Pointer(pParse)).Frc = rc + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */))) + } + + return rc +} + +// Grow the db->aVTrans[] array so that there is room for at least one +// more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ + var ARRAY_INCR int32 = 5 + + // Grow the sqlite3.aVTrans array if required + if (*Sqlite3)(unsafe.Pointer(db)).FnVTrans%ARRAY_INCR == 0 { + var aVTrans uintptr + var nBytes Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(Sqlite3_int64((*Sqlite3)(unsafe.Pointer(db)).FnVTrans)+Sqlite3_int64(ARRAY_INCR))) + aVTrans = Xsqlite3DbRealloc(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaVTrans, uint64(nBytes)) + if !(aVTrans != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, aVTrans+uintptr((*Sqlite3)(unsafe.Pointer(db)).FnVTrans)*8, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64(ARRAY_INCR)) + (*Sqlite3)(unsafe.Pointer(db)).FaVTrans = aVTrans + } + + return SQLITE_OK +} + +// Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should +// have already been reserved using growVTrans(). +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ + // Add pVtab to the end of sqlite3.aVTrans + *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab + Xsqlite3VtabLock(tls, pVTab) +} + +// This function is invoked by the vdbe to call the xCreate method +// of the virtual table named zTab in database iDb. +// +// If an error occurs, *pzErr is set to point to an English language +// description of the error and an SQLITE_XXX error code is returned. +// In this case the caller must call sqlite3DbFree(db, ) on *pzErr. +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var pTab uintptr + var pMod uintptr + var zMod uintptr + + pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) + + // Locate the required virtual table module + zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) + pMod = Xsqlite3HashFind(tls, db+568, zMod) + + // If the module has been registered and includes a Create method, + // invoke it now. If the module has not been registered, return an + // error. Otherwise, do nothing. + if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21346, libc.VaList(bp, zMod)) + rc = SQLITE_ERROR + } else { + rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) + } + + // Justification of ALWAYS(): The xConstructor method is required to + // create a valid sqlite3_vtab if it returns SQLITE_OK. + if rc == SQLITE_OK && Xsqlite3GetVTable(tls, db, pTab) != 0 { + rc = growVTrans(tls, db) + if rc == SQLITE_OK { + addToVTrans(tls, db, Xsqlite3GetVTable(tls, db, pTab)) + } + } + + return rc +} + +// This function is used to set the schema of a virtual table. It is only +// valid to call this function from within the xCreate() or xConnect() of a +// virtual table module. +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ + bp := tls.Alloc(416) + defer tls.Free(416) + + var pCtx uintptr + var rc int32 = SQLITE_OK + var pTab uintptr + // var sParse Parse at bp+8, 408 + + var initBusy int32 + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx + if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { + Xsqlite3Error(tls, db, SQLITE_MISUSE) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return Xsqlite3MisuseError(tls, 146281) + } + pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab + + Xsqlite3ParseObjectInit(tls, bp+8, db) + (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FeParseMode = U8(PARSE_MODE_DECLARE_VTAB) + // We should never be able to reach this point while loading the + // schema. Nevertheless, defend against that (turn off db->init.busy) + // in case a bug arises. + + initBusy = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) + (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FnQueryLoop = U32(1) + if SQLITE_OK == Xsqlite3RunParser(tls, bp+8, zCreateTable) && + (*Parse)(unsafe.Pointer(bp+8)).FpNewTable != uintptr(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) && + int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+8)).FpNewTable)).FeTabType) == TABTYP_NORM { + + if !(int32((*Table)(unsafe.Pointer(pTab)).FaCol) != 0) { + var pNew uintptr = (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FpNewTable + var pIdx uintptr + (*Table)(unsafe.Pointer(pTab)).FaCol = (*Table)(unsafe.Pointer(pNew)).FaCol + Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pNew + 64 + 16 /* &.pDfltList */))) + (*Table)(unsafe.Pointer(pTab)).FnNVCol = libc.AssignPtrInt16(pTab+54, (*Table)(unsafe.Pointer(pNew)).FnCol) + *(*U32)(unsafe.Pointer(pTab + 48)) |= (*Table)(unsafe.Pointer(pNew)).FtabFlags & U32(TF_WithoutRowid|TF_NoVisibleRowid) + (*Table)(unsafe.Pointer(pNew)).FnCol = int16(0) + (*Table)(unsafe.Pointer(pNew)).FaCol = uintptr(0) + + if !((*Table)(unsafe.Pointer(pNew)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && + (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer((*VtabCtx)(unsafe.Pointer(pCtx)).FpVTable)).FpMod)).FpModule)).FxUpdate != uintptr(0) && + int32((*Index)(unsafe.Pointer(Xsqlite3PrimaryKeyIndex(tls, pNew))).FnKeyCol) != 1 { + // WITHOUT ROWID virtual tables must either be read-only (xUpdate==0) + // or else must have a single-column PRIMARY KEY + rc = SQLITE_ERROR + } + pIdx = (*Table)(unsafe.Pointer(pNew)).FpIndex + if pIdx != 0 { + + (*Table)(unsafe.Pointer(pTab)).FpIndex = pIdx + (*Table)(unsafe.Pointer(pNew)).FpIndex = uintptr(0) + (*Index)(unsafe.Pointer(pIdx)).FpTable = pTab + } + } + (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared = 1 + } else { + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, + func() uintptr { + if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { + return ts + 3605 /* "%s" */ + } + return uintptr(0) + }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FzErrMsg)) + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FzErrMsg) + rc = SQLITE_ERROR + } + (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FeParseMode = U8(PARSE_MODE_NORMAL) + + if (*Parse)(unsafe.Pointer(bp+8)).FpVdbe != 0 { + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpVdbe) + } + Xsqlite3DeleteTable(tls, db, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpNewTable) + Xsqlite3ParseObjectReset(tls, bp+8) + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(initBusy) + + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// This function is invoked by the vdbe to call the xDestroy method +// of the virtual table named zTab in database iDb. This occurs +// when a DROP TABLE is mentioned. +// +// This call is a no-op if zTab is not a virtual table. +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ + var rc int32 = SQLITE_OK + var pTab uintptr + + pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) + if pTab != uintptr(0) && + int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB && + *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) { + var p uintptr + var xDestroy uintptr + for p = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); p != 0; p = (*VTable)(unsafe.Pointer(p)).FpNext { + + if (*Sqlite3_vtab)(unsafe.Pointer((*VTable)(unsafe.Pointer(p)).FpVtab)).FnRef > 0 { + return SQLITE_LOCKED + } + } + p = vtabDisconnectAll(tls, db, pTab) + xDestroy = (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(p)).FpMod)).FpModule)).FxDestroy + if xDestroy == uintptr(0) { + xDestroy = (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(p)).FpMod)).FpModule)).FxDisconnect + } + + (*Table)(unsafe.Pointer(pTab)).FnTabRef++ + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, (*VTable)(unsafe.Pointer(p)).FpVtab) + // Remove the sqlite3_vtab* from the aVTrans[] array, if applicable + if rc == SQLITE_OK { + + (*VTable)(unsafe.Pointer(p)).FpVtab = uintptr(0) + *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)) = uintptr(0) + Xsqlite3VtabUnlock(tls, p) + } + Xsqlite3DeleteTable(tls, db, pTab) + } + + return rc +} + +// This function invokes either the xRollback or xCommit method +// of each of the virtual tables in the sqlite3.aVTrans array. The method +// called is identified by the second argument, "offset", which is +// the offset of the method to call in the sqlite3_module structure. +// +// The array is cleared after invoking the callbacks. +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ + var i int32 + if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { + var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans + (*Sqlite3)(unsafe.Pointer(db)).FaVTrans = uintptr(0) + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnVTrans; i++ { + var pVTab uintptr = *(*uintptr)(unsafe.Pointer(aVTrans + uintptr(i)*8)) + var p uintptr = (*VTable)(unsafe.Pointer(pVTab)).FpVtab + if p != 0 { + var x uintptr + x = *(*uintptr)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(p)).FpModule + uintptr(offset))) + if x != 0 { + (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p) + } + } + (*VTable)(unsafe.Pointer(pVTab)).FiSavepoint = 0 + Xsqlite3VtabUnlock(tls, pVTab) + } + Xsqlite3DbFree(tls, db, aVTrans) + (*Sqlite3)(unsafe.Pointer(db)).FnVTrans = 0 + } +} + +// Invoke the xSync method of all virtual tables in the sqlite3.aVTrans +// array. Return the error code for the first error that occurs, or +// SQLITE_OK if all xSync operations are successful. +// +// If an error message is available, leave it in p->zErrMsg. +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ + var i int32 + var rc int32 = SQLITE_OK + var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans + + (*Sqlite3)(unsafe.Pointer(db)).FaVTrans = uintptr(0) + for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnVTrans; i++ { + var x uintptr + var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aVTrans + uintptr(i)*8)))).FpVtab + if pVtab != 0 && libc.AssignUintptr(&x, (*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule)).FxSync) != uintptr(0) { + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, pVtab) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + } + } + (*Sqlite3)(unsafe.Pointer(db)).FaVTrans = aVTrans + return rc +} + +// Invoke the xRollback method of all virtual tables in the +// sqlite3.aVTrans array. Then clear the array itself. +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ + callFinaliser(tls, db, int32(uintptr(0)+136)) + return SQLITE_OK +} + +// Invoke the xCommit method of all virtual tables in the +// sqlite3.aVTrans array. Then clear the array itself. +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ + callFinaliser(tls, db, int32(uintptr(0)+128)) + return SQLITE_OK +} + +// If the virtual table pVtab supports the transaction interface +// (xBegin/xRollback/xCommit and optionally xSync) and a transaction is +// not currently open, invoke the xBegin method now. +// +// If the xBegin call is successful, place the sqlite3_vtab pointer +// in the sqlite3.aVTrans array. +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ + var rc int32 = SQLITE_OK + var pModule uintptr + + // Special case: If db->aVTrans is NULL and db->nVTrans is greater + // than zero, then this function is being called from within a + // virtual module xSync() callback. It is illegal to write to + // virtual module tables in this case, so return SQLITE_LOCKED. + if (*Sqlite3)(unsafe.Pointer(db)).FnVTrans > 0 && (*Sqlite3)(unsafe.Pointer(db)).FaVTrans == uintptr(0) { + return SQLITE_LOCKED + } + if !(pVTab != 0) { + return SQLITE_OK + } + pModule = (*Sqlite3_vtab)(unsafe.Pointer((*VTable)(unsafe.Pointer(pVTab)).FpVtab)).FpModule + + if (*Sqlite3_module)(unsafe.Pointer(pModule)).FxBegin != 0 { + var i int32 + + // If pVtab is already in the aVTrans array, return early + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnVTrans; i++ { + if *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(i)*8)) == pVTab { + return SQLITE_OK + } + } + + // Invoke the xBegin method. If successful, add the vtab to the + // sqlite3.aVTrans[] array. + rc = growVTrans(tls, db) + if rc == SQLITE_OK { + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxBegin})).f(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) + if rc == SQLITE_OK { + var iSvpt int32 = (*Sqlite3)(unsafe.Pointer(db)).FnStatement + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + addToVTrans(tls, db, pVTab) + if iSvpt != 0 && (*Sqlite3_module)(unsafe.Pointer(pModule)).FxSavepoint != 0 { + (*VTable)(unsafe.Pointer(pVTab)).FiSavepoint = iSvpt + rc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxSavepoint})).f(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab, iSvpt-1) + } + } + } + } + return rc +} + +// Invoke either the xSavepoint, xRollbackTo or xRelease method of all +// virtual tables that currently have an open transaction. Pass iSavepoint +// as the second argument to the virtual table method invoked. +// +// If op is SAVEPOINT_BEGIN, the xSavepoint method is invoked. If it is +// SAVEPOINT_ROLLBACK, the xRollbackTo method. Otherwise, if op is +// SAVEPOINT_RELEASE, then the xRelease method of each virtual table with +// an open transaction is invoked. +// +// If any virtual table method returns an error code other than SQLITE_OK, +// processing is abandoned and the error returned to the caller of this +// function immediately. If all calls to virtual table methods are successful, +// SQLITE_OK is returned. +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ + var rc int32 = SQLITE_OK + + if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { + var i int32 + for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnVTrans; i++ { + var pVTab uintptr = *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(i)*8)) + var pMod uintptr = (*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(pVTab)).FpMod)).FpModule + if (*VTable)(unsafe.Pointer(pVTab)).FpVtab != 0 && (*Sqlite3_module)(unsafe.Pointer(pMod)).FiVersion >= 2 { + var xMethod uintptr + Xsqlite3VtabLock(tls, pVTab) + switch op { + case SAVEPOINT_BEGIN: + xMethod = (*Sqlite3_module)(unsafe.Pointer(pMod)).FxSavepoint + (*VTable)(unsafe.Pointer(pVTab)).FiSavepoint = iSavepoint + 1 + break + fallthrough + case SAVEPOINT_ROLLBACK: + xMethod = (*Sqlite3_module)(unsafe.Pointer(pMod)).FxRollbackTo + break + fallthrough + default: + xMethod = (*Sqlite3_module)(unsafe.Pointer(pMod)).FxRelease + break + } + if xMethod != 0 && (*VTable)(unsafe.Pointer(pVTab)).FiSavepoint > iSavepoint { + rc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xMethod})).f(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab, iSavepoint) + } + Xsqlite3VtabUnlock(tls, pVTab) + } + } + } + return rc +} + +// The first parameter (pDef) is a function implementation. The +// second parameter (pExpr) is the first argument to this function. +// If pExpr is a column in a virtual table, then let the virtual +// table implementation have an opportunity to overload the function. +// +// This routine is used to allow virtual table implementations to +// overload MATCH, LIKE, GLOB, and REGEXP operators. +// +// Return either the pDef argument (indicating no change) or a +// new FuncDef structure that is marked as ephemeral using the +// SQLITE_FUNC_EPHEM flag. +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pTab uintptr + var pVtab uintptr + var pMod uintptr + *(*uintptr)(unsafe.Pointer(bp /* xSFunc */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pArg */)) = uintptr(0) + var pNew uintptr + var rc int32 = 0 + + // Check to see the left operand is a column in a virtual table + if pExpr == uintptr(0) { + return pDef + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { + return pDef + } + + pTab = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + if pTab == uintptr(0) { + return pDef + } + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + return pDef + } + pVtab = (*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, db, pTab))).FpVtab + + pMod = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule + if (*Sqlite3_module)(unsafe.Pointer(pMod)).FxFindFunction == uintptr(0) { + return pDef + } + + // Call the xFindFunction method on the virtual table implementation + // to see if the implementation wants to overload this function. + // + // Though undocumented, we have historically always invoked xFindFunction + // with an all lower-case function name. Continue in this tradition to + // avoid any chance of an incompatibility. + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pMod)).FxFindFunction})).f(tls, pVtab, nArg, (*FuncDef)(unsafe.Pointer(pDef)).FzName, bp /* &xSFunc */, bp+8 /* &pArg */) + if rc == 0 { + return pDef + } + + // Create a new ephemeral function definition for the overloaded + // function + pNew = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(FuncDef{}))+ + uint64(Xsqlite3Strlen30(tls, (*FuncDef)(unsafe.Pointer(pDef)).FzName))+uint64(1))) + if pNew == uintptr(0) { + return pDef + } + *(*FuncDef)(unsafe.Pointer(pNew)) = *(*FuncDef)(unsafe.Pointer(pDef)) + (*FuncDef)(unsafe.Pointer(pNew)).FzName = pNew + 1*72 + libc.Xmemcpy(tls, pNew+1*72, (*FuncDef)(unsafe.Pointer(pDef)).FzName, uint64(Xsqlite3Strlen30(tls, (*FuncDef)(unsafe.Pointer(pDef)).FzName)+1)) + (*FuncDef)(unsafe.Pointer(pNew)).FxSFunc = *(*uintptr)(unsafe.Pointer(bp /* xSFunc */)) + (*FuncDef)(unsafe.Pointer(pNew)).FpUserData = *(*uintptr)(unsafe.Pointer(bp + 8 /* pArg */)) + *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(SQLITE_FUNC_EPHEM) + return pNew +} + +// Make sure virtual table pTab is contained in the pParse->apVirtualLock[] +// array so that an OP_VBegin will get generated for it. Add pTab to the +// array if it is missing. If pTab is already in the array, this routine +// is a no-op. +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ + var pToplevel uintptr = func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }() + var i int32 + var n int32 + var apVtabLock uintptr + + for i = 0; i < (*Parse)(unsafe.Pointer(pToplevel)).FnVtabLock; i++ { + if pTab == *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(pToplevel)).FapVtabLock + uintptr(i)*8)) { + return + } + } + n = int32(uint64((*Parse)(unsafe.Pointer(pToplevel)).FnVtabLock+1) * uint64(unsafe.Sizeof(uintptr(0)))) + apVtabLock = Xsqlite3Realloc(tls, (*Parse)(unsafe.Pointer(pToplevel)).FapVtabLock, uint64(n)) + if apVtabLock != 0 { + (*Parse)(unsafe.Pointer(pToplevel)).FapVtabLock = apVtabLock + *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(pToplevel)).FapVtabLock + uintptr(libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pToplevel)).FnVtabLock, 1))*8)) = pTab + } else { + Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(pToplevel)).Fdb) + } +} + +// Check to see if virtual table module pMod can be have an eponymous +// virtual table instance. If it can, create one if one does not already +// exist. Return non-zero if either the eponymous virtual table instance +// exists when this routine returns or if an attempt to create it failed +// and an error message was left in pParse. +// +// An eponymous virtual table instance is one that is named after its +// module, and more importantly, does not require a CREATE VIRTUAL TABLE +// statement in order to come into existance. Eponymous virtual table +// instances always exist. They cannot be DROP-ed. +// +// Any virtual table module for which xConnect and xCreate are the same +// method can have an eponymous virtual table instance. +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pModule uintptr = (*Module)(unsafe.Pointer(pMod)).FpModule + var pTab uintptr + *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)) = uintptr(0) + var rc int32 + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*Module)(unsafe.Pointer(pMod)).FpEpoTab != 0 { + return 1 + } + if (*Sqlite3_module)(unsafe.Pointer(pModule)).FxCreate != uintptr(0) && (*Sqlite3_module)(unsafe.Pointer(pModule)).FxCreate != (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect { + return 0 + } + pTab = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) + if pTab == uintptr(0) { + return 0 + } + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, db, (*Module)(unsafe.Pointer(pMod)).FzName) + if (*Table)(unsafe.Pointer(pTab)).FzName == uintptr(0) { + Xsqlite3DbFree(tls, db, pTab) + return 0 + } + (*Module)(unsafe.Pointer(pMod)).FpEpoTab = pTab + (*Table)(unsafe.Pointer(pTab)).FnTabRef = U32(1) + (*Table)(unsafe.Pointer(pTab)).FeTabType = U8(TABTYP_VTAB) + (*Table)(unsafe.Pointer(pTab)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema + + (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_Eponymous) + addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName)) + addModuleArgument(tls, pParse, pTab, uintptr(0)) + addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName)) + rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp+8) + if rc != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+3605, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))) + Xsqlite3VtabEponymousTableClear(tls, db, pMod) + } + return 1 +} + +// Erase the eponymous virtual table instance associated with +// virtual table module pMod, if it exists. +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ + var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab + if pTab != uintptr(0) { + // Mark the table as Ephemeral prior to deleting it, so that the + // sqlite3DeleteTable() routine will know that it is not stored in + // the schema. + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_Ephemeral) + Xsqlite3DeleteTable(tls, db, pTab) + (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) + } +} + +// Return the ON CONFLICT resolution mode in effect for the virtual +// table update operation currently in progress. +// +// The results of this routine are undefined unless it is called from +// within an xUpdate method. +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ + + return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) +} + +var aMap = [5]uint8{ + uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), +} /* sqlite3.c:146743:30 */ + +// Call from within the xCreate() or xConnect() methods to provide +// the SQLite core with additional information about the behavior +// of the virtual table being implemented. +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ + var ap Va_list + _ = ap + var rc int32 = SQLITE_OK + var p uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx + if !(p != 0) { + rc = Xsqlite3MisuseError(tls, 146771) + } else { + + ap = va + switch op { + case SQLITE_VTAB_CONSTRAINT_SUPPORT: + { + (*VTable)(unsafe.Pointer((*VtabCtx)(unsafe.Pointer(p)).FpVTable)).FbConstraint = U8(libc.VaInt32(&ap)) + break + + } + fallthrough + case SQLITE_VTAB_INNOCUOUS: + { + (*VTable)(unsafe.Pointer((*VtabCtx)(unsafe.Pointer(p)).FpVTable)).FeVtabRisk = U8(SQLITE_VTABRISK_Low) + break + + } + fallthrough + case SQLITE_VTAB_DIRECTONLY: + { + (*VTable)(unsafe.Pointer((*VtabCtx)(unsafe.Pointer(p)).FpVTable)).FeVtabRisk = U8(SQLITE_VTABRISK_High) + break + + } + fallthrough + default: + { + rc = Xsqlite3MisuseError(tls, 146789) + break + + } + } + _ = ap + } + + if rc != SQLITE_OK { + Xsqlite3Error(tls, db, rc) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +//************* End of vtab.c *********************************************** +//************* Begin file wherecode.c ************************************** +// 2015-06-06 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This module contains C code that generates VDBE code used to process +// the WHERE clause of SQL statements. +// +// This file was split off from where.c on 2015-06-06 in order to reduce the +// size of where.c and make it easier to edit. This file contains the routines +// that actually generate the bulk of the WHERE loop code. The original where.c +// file retains the code that does query planning and analysis. +// #include "sqliteInt.h" +//************* Include whereInt.h in the middle of wherecode.c ************* +//************* Begin file whereInt.h *************************************** +// 2013-11-12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains structure and macro definitions for the query +// planner logic in "where.c". These definitions are broken out into +// a separate source file for easier editing. + +// Forward references +type WhereClause1 = struct { + FpWInfo uintptr + FpOuter uintptr + Fop U8 + FhasOr U8 + F__ccgo_pad1 [2]byte + FnTerm int32 + FnSlot int32 + FnBase int32 + Fa uintptr + FaStatic [8]WhereTerm +} /* sqlite3.c:14626:9 */ + +//************* End of vtab.c *********************************************** +//************* Begin file wherecode.c ************************************** +// 2015-06-06 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This module contains C code that generates VDBE code used to process +// the WHERE clause of SQL statements. +// +// This file was split off from where.c on 2015-06-06 in order to reduce the +// size of where.c and make it easier to edit. This file contains the routines +// that actually generate the bulk of the WHERE loop code. The original where.c +// file retains the code that does query planning and analysis. +// #include "sqliteInt.h" +//************* Include whereInt.h in the middle of wherecode.c ************* +//************* Begin file whereInt.h *************************************** +// 2013-11-12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains structure and macro definitions for the query +// planner logic in "where.c". These definitions are broken out into +// a separate source file for easier editing. + +// Forward references +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ +type WhereMaskSet1 = struct { + FbVarSelect int32 + Fn int32 + Fix [64]int32 +} /* sqlite3.c:14626:9 */ + +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ +type WhereOrInfo1 = struct { + Fwc WhereClause + Findexable Bitmask +} /* sqlite3.c:146851:9 */ + +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ + +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ +type WhereLevel1 = struct { + FiLeftJoin int32 + FiTabCur int32 + FiIdxCur int32 + FaddrBrk int32 + FaddrNxt int32 + FaddrSkip int32 + FaddrCont int32 + FaddrFirst int32 + FaddrBody int32 + FregBignull int32 + FaddrBignull int32 + FregFilter int32 + FiFrom U8 + Fop U8 + Fp3 U8 + Fp5 U8 + Fp1 int32 + Fp2 int32 + F__ccgo_pad1 [4]byte + Fu struct { + Fin struct { + FnIn int32 + F__ccgo_pad1 [4]byte + FaInLoop uintptr + } + } + FpWLoop uintptr + FnotReady Bitmask +} /* sqlite3.c:14626:9 */ + +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ +type WhereLoop1 = struct { + Fprereq Bitmask + FmaskSelf Bitmask + FiTab U8 + FiSortIdx U8 + FrSetup LogEst + FrRun LogEst + FnOut LogEst + Fu struct { + Fbtree struct { + FnEq U16 + FnBtm U16 + FnTop U16 + FnDistinctCol U16 + FpIndex uintptr + } + F__ccgo_pad1 [16]byte + } + FwsFlags U32 + FnLTerm U16 + FnSkip U16 + FnLSlot U16 + F__ccgo_pad1 [6]byte + FaLTerm uintptr + FpNextLoop uintptr + FaLTermSpace [3]uintptr +} /* sqlite3.c:14626:9 */ + +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ +type WherePath1 = struct { + FmaskLoop Bitmask + FrevLoop Bitmask + FnRow LogEst + FrCost LogEst + FrUnsorted LogEst + FisOrdered I8 + F__ccgo_pad1 [1]byte + FaLoop uintptr +} /* sqlite3.c:146855:9 */ + +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ +type WhereTerm1 = struct { + FpExpr uintptr + FpWC uintptr + FtruthProb LogEst + FwtFlags U16 + FeOperator U16 + FnChild U8 + FeMatchOp U8 + FiParent int32 + FleftCursor int32 + Fu struct { + F__ccgo_pad1 [0]uint64 + Fx struct { + FleftColumn int32 + FiField int32 + } + } + FprereqRight Bitmask + FprereqAll Bitmask +} /* sqlite3.c:14626:9 */ + +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ +type WhereLoopBuilder1 = struct { + FpWInfo uintptr + FpWC uintptr + FpNew uintptr + FpOrSet uintptr + FpRec uintptr + FnRecValid int32 + FbldFlags1 uint8 + FbldFlags2 uint8 + F__ccgo_pad1 [2]byte + FiPlanLimit uint32 + F__ccgo_pad2 [4]byte +} /* sqlite3.c:146857:9 */ + +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ +type WhereScan1 = struct { + FpOrigWC uintptr + FpWC uintptr + FzCollName uintptr + FpIdxExpr uintptr + Fk int32 + FopMask U32 + Fidxaff uint8 + FiEquiv uint8 + FnEquiv uint8 + F__ccgo_pad1 [1]byte + FaiCur [11]int32 + FaiColumn [11]I16 + F__ccgo_pad2 [2]byte +} /* sqlite3.c:146858:9 */ + +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ +type WhereOrCost1 = struct { + Fprereq Bitmask + FrRun LogEst + FnOut LogEst + F__ccgo_pad1 [4]byte +} /* sqlite3.c:146857:9 */ + +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ +type WhereOrSet1 = struct { + Fn U16 + F__ccgo_pad1 [6]byte + Fa [3]WhereOrCost +} /* sqlite3.c:146857:9 */ + +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ + +// This object contains information needed to implement a single nested +// loop in WHERE clause. +// +// Contrast this object with WhereLoop. This object describes the +// implementation of the loop. WhereLoop describes the algorithm. +// This object contains a pointer to the WhereLoop algorithm as one of +// its elements. +// +// The WhereInfo object contains a single instance of this object for +// each term in the FROM clause (which is to say, for each of the +// nested loops as implemented). The order of WhereLevel objects determines +// the loop nested order, with WhereInfo.a[0] being the outer loop and +// WhereInfo.a[WhereInfo.nLevel-1] being the inner loop. +type InLoop = struct { + FiCur int32 + FaddrInTop int32 + FiBase int32 + FnPrefix int32 + FeEndLoopOp U8 + F__ccgo_pad1 [3]byte +} /* sqlite3.c:146900:7 */ + +// Allowed values for WhereLoopBuider.bldFlags + +// The WhereLoopBuilder.iPlanLimit is used to limit the number of +// index+constraint combinations the query planner will consider for a +// particular query. If this parameter is unlimited, then certain +// pathological queries can spend excess time in the sqlite3WhereBegin() +// routine. The limit is high enough that is should not impact real-world +// queries. +// +// SQLITE_QUERY_PLANNER_LIMIT is the baseline limit. The limit is +// increased by SQLITE_QUERY_PLANNER_LIMIT_INCR before each term of the FROM +// clause is processed, so that every table in a join is guaranteed to be +// able to propose a some index+constraint combinations even if the initial +// baseline limit was exhausted by prior tables of the join. + +// Each instance of this object records a change to a single node +// in an expression tree to cause that node to point to a column +// of an index rather than an expression or a virtual column. All +// such transformations need to be undone at the end of WHERE clause +// processing. +type WhereExprMod1 = struct { + FpNext uintptr + FpExpr uintptr + Forig Expr +} /* sqlite3.c:14626:9 */ + +// Allowed values for WhereLoopBuider.bldFlags + +// The WhereLoopBuilder.iPlanLimit is used to limit the number of +// index+constraint combinations the query planner will consider for a +// particular query. If this parameter is unlimited, then certain +// pathological queries can spend excess time in the sqlite3WhereBegin() +// routine. The limit is high enough that is should not impact real-world +// queries. +// +// SQLITE_QUERY_PLANNER_LIMIT is the baseline limit. The limit is +// increased by SQLITE_QUERY_PLANNER_LIMIT_INCR before each term of the FROM +// clause is processed, so that every table in a join is guaranteed to be +// able to propose a some index+constraint combinations even if the initial +// baseline limit was exhausted by prior tables of the join. + +// Each instance of this object records a change to a single node +// in an expression tree to cause that node to point to a column +// of an index rather than an expression or a virtual column. All +// such transformations need to be undone at the end of WHERE clause +// processing. +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ + +// Bitmasks for the operators on WhereTerm objects. These are all +// operators that are of interest to the query planner. An +// OR-ed combination of these values can be used when searching for +// particular WhereTerms within a WhereClause. +// +// Value constraints: +// WO_EQ == SQLITE_INDEX_CONSTRAINT_EQ +// WO_LT == SQLITE_INDEX_CONSTRAINT_LT +// WO_LE == SQLITE_INDEX_CONSTRAINT_LE +// WO_GT == SQLITE_INDEX_CONSTRAINT_GT +// WO_GE == SQLITE_INDEX_CONSTRAINT_GE + +// These are definitions of bits in the WhereLoop.wsFlags field. +// The particular combination of bits in each WhereLoop help to +// determine the algorithm that WhereLoop represents. + +//************* End of whereInt.h ******************************************* +//************* Continuing where we left off in wherecode.c ***************** + +// Return the name of the i-th column of the pIdx index. +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ + i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + if i == -2 { + return ts + 21365 /* "" */ + } + if i == -1 { + return ts + 16165 /* "rowid" */ + } + return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName +} + +// This routine is a helper for explainIndexRange() below +// +// pStr holds the text of an expression that we are building up one term +// at a time. This routine adds a new term to the end of the expression. +// Terms are separated by AND so add the "AND" text for second and subsequent +// terms only. +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ + var i int32 + + if bAnd != 0 { + Xsqlite3_str_append(tls, pStr, ts+21372, 5) + } + + if nTerm > 1 { + Xsqlite3_str_append(tls, pStr, ts+21378, 1) + } + for i = 0; i < nTerm; i++ { + if i != 0 { + Xsqlite3_str_append(tls, pStr, ts+12695, 1) + } + Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) + } + if nTerm > 1 { + Xsqlite3_str_append(tls, pStr, ts+4899, 1) + } + + Xsqlite3_str_append(tls, pStr, zOp, 1) + + if nTerm > 1 { + Xsqlite3_str_append(tls, pStr, ts+21378, 1) + } + for i = 0; i < nTerm; i++ { + if i != 0 { + Xsqlite3_str_append(tls, pStr, ts+12695, 1) + } + Xsqlite3_str_append(tls, pStr, ts+4950, 1) + } + if nTerm > 1 { + Xsqlite3_str_append(tls, pStr, ts+4899, 1) + } +} + +// Argument pLevel describes a strategy for scanning table pTab. This +// function appends text to pStr that describes the subset of table +// rows scanned by the strategy in the form of an SQL expression. +// +// For example, if the query: +// +// SELECT * FROM t1 WHERE a=1 AND b>2; +// +// is run and there is an index on (a, b), then this function returns a +// string similar to: +// +// "a=? AND b>?" +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pIndex uintptr = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + var nEq U16 = *(*U16)(unsafe.Pointer(pLoop + 24)) + var nSkip U16 = (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip + var i int32 + var j int32 + + if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { + return + } + Xsqlite3_str_append(tls, pStr, ts+21380, 2) + for i = 0; i < int32(nEq); i++ { + var z uintptr = explainIndexColumnName(tls, pIndex, i) + if i != 0 { + Xsqlite3_str_append(tls, pStr, ts+21372, 5) + } + Xsqlite3_str_appendf(tls, pStr, func() uintptr { + if i >= int32(nSkip) { + return ts + 21383 /* "%s=?" */ + } + return ts + 21388 /* "ANY(%s)" */ + }(), libc.VaList(bp, z)) + } + + j = i + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21396) + i = 1 + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21398) + } + Xsqlite3_str_append(tls, pStr, ts+4899, 1) +} + +// This function is a no-op unless currently processing an EXPLAIN QUERY PLAN +// command, or if either SQLITE_DEBUG or SQLITE_ENABLE_STMT_SCANSTATUS was +// defined at compile-time. If it is not a no-op, a single OP_Explain opcode +// is added to the output to describe the table scan strategy in pLevel. +// +// If an OP_Explain opcode is added to the VM, its address is returned. +// Otherwise, if no OP_Explain is coded, zero is returned. +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ + bp := tls.Alloc(196) + defer tls.Free(196) + + var ret int32 = 0 + if int32((*Parse)(unsafe.Pointer(func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }())).Fexplain) == 2 { + var pItem uintptr = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // VM being constructed + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var isSearch int32 // True for a SEARCH. False for SCAN. + var pLoop uintptr // The controlling WhereLoop object + var flags U32 // Flags that describe this loop + var zMsg uintptr // Text to add to EQP output + // var str StrAccum at bp+64, 32 + // EQP output string + // var zBuf [100]uint8 at bp+96, 100 + // Initial space for EQP output string + + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + flags = (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags + if flags&U32(WHERE_MULTI_OR) != 0 || int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0 { + return 0 + } + + isSearch = libc.Bool32(flags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) != U32(0) || + flags&U32(WHERE_VIRTUALTABLE) == U32(0) && int32(*(*U16)(unsafe.Pointer(pLoop + 24))) > 0 || + int32(wctrlFlags)&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) != 0) + + Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) + (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) + Xsqlite3_str_appendf(tls, bp+64, ts+21400, libc.VaList(bp, func() uintptr { + if isSearch != 0 { + return ts + 21406 /* "SEARCH" */ + } + return ts + 21413 /* "SCAN" */ + }(), pItem)) + if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { + var zFmt uintptr = uintptr(0) + var pIdx uintptr + + pIdx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + + if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { + if isSearch != 0 { + zFmt = ts + 10852 /* "PRIMARY KEY" */ + } + } else if flags&U32(WHERE_PARTIALIDX) != 0 { + zFmt = ts + 21418 /* "AUTOMATIC PARTIA..." */ + } else if flags&U32(WHERE_AUTO_INDEX) != 0 { + zFmt = ts + 21451 /* "AUTOMATIC COVERI..." */ + } else if flags&U32(WHERE_IDX_ONLY) != 0 { + zFmt = ts + 21476 /* "COVERING INDEX %..." */ + } else { + zFmt = ts + 21494 /* "INDEX %s" */ + } + if zFmt != 0 { + Xsqlite3_str_append(tls, bp+64, ts+21503, 7) + Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) + explainIndexRange(tls, bp+64, pLoop) + } + } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { + var cRangeOp uint8 + var zRowid uintptr = ts + 16165 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21511, libc.VaList(bp+24, zRowid)) + if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { + cRangeOp = uint8('=') + } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { + Xsqlite3_str_appendf(tls, bp+64, ts+21542, libc.VaList(bp+32, zRowid)) + cRangeOp = uint8('<') + } else if flags&U32(WHERE_BTM_LIMIT) != 0 { + cRangeOp = uint8('>') + } else { + + cRangeOp = uint8('<') + } + Xsqlite3_str_appendf(tls, bp+64, ts+21552, libc.VaList(bp+40, int32(cRangeOp))) + } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { + Xsqlite3_str_appendf(tls, bp+64, ts+21557, + libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) + } + zMsg = Xsqlite3StrAccumFinish(tls, bp+64) + + ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), + (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -7) + } + return ret +} + +// Add a single OP_Explain opcode that describes a Bloom filter. +// +// Or if not processing EXPLAIN QUERY PLAN and not in a SQLITE_DEBUG and/or +// SQLITE_ENABLE_STMT_SCANSTATUS build, then OP_Explain opcodes are not +// required and this routine is a no-op. +// +// If an OP_Explain opcode is added to the VM, its address is returned. +// Otherwise, if no OP_Explain is coded, zero is returned. +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ + bp := tls.Alloc(156) + defer tls.Free(156) + + var ret int32 = 0 + var pItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // VM being constructed + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle + var zMsg uintptr // Text to add to EQP output + var i int32 // Loop counter + var pLoop uintptr // The where loop + // var str StrAccum at bp+24, 32 + // EQP output string + // var zBuf [100]uint8 at bp+56, 100 + // Initial space for EQP output string + + Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) + (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) + Xsqlite3_str_appendf(tls, bp+24, ts+21584, libc.VaList(bp, pItem)) + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { + Xsqlite3_str_appendf(tls, bp+24, ts+21383, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + } else { + Xsqlite3_str_appendf(tls, bp+24, ts+21605, 0) + } + } else { + for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { + var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) + if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { + Xsqlite3_str_append(tls, bp+24, ts+21372, 5) + } + Xsqlite3_str_appendf(tls, bp+24, ts+21383, libc.VaList(bp+16, z)) + } + } + Xsqlite3_str_append(tls, bp+24, ts+4899, 1) + zMsg = Xsqlite3StrAccumFinish(tls, bp+24) + ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), + (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -7) + return ret +} + +// Disable a term in the WHERE clause. Except, do not disable the term +// if it controls a LEFT OUTER JOIN and it did not originate in the ON +// or USING clause of that join. +// +// Consider the term t2.z='ok' in the following queries: +// +// (1) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok' +// (2) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok' +// (3) SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok' +// +// The t2.z='ok' is disabled in the in (2) because it originates +// in the ON clause. The term is disabled in (3) because it is not part +// of a LEFT OUTER JOIN. In (1), the term is not disabled. +// +// Disabling a term causes that term to not be tested in the inner loop +// of the join. Disabling is an optimization. When terms are satisfied +// by indices, we disable them to prevent redundant tests in the inner +// loop. We would get the correct results if nothing were ever disabled, +// but joins might run a little slower. The trick is to disable as much +// as we can without disabling too much. If we disabled in (1), we'd get +// the wrong answer. See ticket #813. +// +// If all the children of a term are disabled, then that term is also +// automatically disabled. In this way, terms get disabled if derived +// virtual terms are tested first. For example: +// +// x GLOB 'abc*' AND x>='abc' AND x<'acd' +// \___________/ \______/ \_____/ +// parent child1 child2 +// +// Only the parent term was in the original WHERE clause. The child1 +// and child2 terms were added by the LIKE optimization. If both of +// the virtual child terms are valid, then testing of the parent can be +// skipped. +// +// Usually the parent term is marked as TERM_CODED. But if the parent +// term was originally TERM_LIKE, then the parent gets TERM_LIKECOND instead. +// The TERM_LIKECOND marking indicates that the term should be coded inside +// a conditional such that is only evaluated on the second pass of a +// LIKE-optimization loop, when scanning BLOBs instead of strings. +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ + var nLoop int32 = 0 + + for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && + ((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0 || (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_FromJoin) != U32(0)) && + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady&(*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll == uint64(0) { + if nLoop != 0 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKE != 0 { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_LIKECOND) + } else { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FiParent < 0 { + break + } + pTerm = (*WhereClause)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpWC)).Fa + uintptr((*WhereTerm)(unsafe.Pointer(pTerm)).FiParent)*56 + + (*WhereTerm)(unsafe.Pointer(pTerm)).FnChild-- + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FnChild) != 0 { + break + } + nLoop++ + } +} + +// Code an OP_Affinity opcode to apply the column affinity string zAff +// to the n registers starting at base. +// +// As an optimization, SQLITE_AFF_BLOB and SQLITE_AFF_NONE entries (which +// are no-ops) at the beginning and end of zAff are ignored. If all entries +// in zAff are SQLITE_AFF_BLOB or SQLITE_AFF_NONE, then no code gets generated. +// +// This routine makes its own copy of zAff so that the caller is free +// to modify zAff after this routine returns. +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + if zAff == uintptr(0) { + + return + } + + // Adjust base and n to skip over SQLITE_AFF_BLOB and SQLITE_AFF_NONE + // entries at the beginning and end of the affinity string. + + for n > 0 && int32(*(*uint8)(unsafe.Pointer(zAff))) <= SQLITE_AFF_BLOB { + n-- + base++ + zAff++ + } + for n > 1 && int32(*(*uint8)(unsafe.Pointer(zAff + uintptr(n-1)))) <= SQLITE_AFF_BLOB { + n-- + } + + // Code the OP_Affinity opcode if there is anything left to do. + if n > 0 { + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, base, n, 0, zAff, n) + } +} + +// Expression pRight, which is the RHS of a comparison operation, is +// either a vector of n elements or, if n==1, a scalar expression. +// Before the comparison operation, affinity zAff is to be applied +// to the pRight values. This function modifies characters within the +// affinity string to SQLITE_AFF_BLOB if either: +// +// * the comparison will be performed with no affinity, or +// * the affinity change in zAff is guaranteed not to change the value. +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ + var i int32 + for i = 0; i < n; i++ { + var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) + if int32(Xsqlite3CompareAffinity(tls, p, *(*uint8)(unsafe.Pointer(zAff + uintptr(i))))) == SQLITE_AFF_BLOB || + Xsqlite3ExprNeedsNoAffinityChange(tls, p, *(*uint8)(unsafe.Pointer(zAff + uintptr(i)))) != 0 { + *(*uint8)(unsafe.Pointer(zAff + uintptr(i))) = uint8(SQLITE_AFF_BLOB) + } + } +} + +// pX is an expression of the form: (vector) IN (SELECT ...) +// In other words, it is a vector IN operator with a SELECT clause on the +// LHS. But not all terms in the vector are indexable and the terms might +// not be in the correct order for indexing. +// +// This routine makes a copy of the input pX expression and then adjusts +// the vector on the LHS with corresponding changes to the SELECT so that +// the vector contains only index terms and those terms are in the correct +// order. The modified IN expression is returned. The caller is responsible +// for deleting the returned expression. +// +// Example: +// +// CREATE TABLE t1(a,b,c,d,e,f); +// CREATE INDEX t1x1 ON t1(e,c); +// SELECT * FROM t1 WHERE (a,b,c,d,e) IN (SELECT v,w,x,y,z FROM t2) +// \_______________________________________/ +// The pX expression +// +// Since only columns e and c can be used with the index, in that order, +// the modified IN expression that is returned will be: +// +// (e,c) IN (SELECT z,x FROM t2) +// +// The reduced pX is different from the original (obviously) and thus is +// only used for indexing, to improve performance. The original unaltered +// IN expression must also be run on each output row for correctness. +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pNew uintptr + pNew = Xsqlite3ExprDup(tls, db, pX, 0) + if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { + var pOrigRhs uintptr // Original unmodified RHS + var pOrigLhs uintptr // Original unmodified LHS + var pRhs uintptr = uintptr(0) // New RHS after modifications + var pLhs uintptr = uintptr(0) // New LHS after mods + var i int32 // Loop counter + var pSelect uintptr // Pointer to the SELECT on the RHS + + pOrigRhs = (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 32)))).FpEList + + pOrigLhs = *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 32)) + for i = iEq; i < int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm); i++ { + if (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)))).FpExpr == pX { + var iField int32 + + iField = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)) + 32 + 4)) - 1 + if (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*32)).FpExpr == uintptr(0) { + continue + } // Duplicate PK column + pRhs = Xsqlite3ExprListAppend(tls, pParse, pRhs, (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*32)).FpExpr) + (*ExprList_item)(unsafe.Pointer(pOrigRhs + 8 + uintptr(iField)*32)).FpExpr = uintptr(0) + + pLhs = Xsqlite3ExprListAppend(tls, pParse, pLhs, (*ExprList_item)(unsafe.Pointer(pOrigLhs+8+uintptr(iField)*32)).FpExpr) + (*ExprList_item)(unsafe.Pointer(pOrigLhs + 8 + uintptr(iField)*32)).FpExpr = uintptr(0) + } + } + Xsqlite3ExprListDelete(tls, db, pOrigRhs) + Xsqlite3ExprListDelete(tls, db, pOrigLhs) + *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 32)) = pLhs + (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 32)))).FpEList = pRhs + if pLhs != 0 && (*ExprList)(unsafe.Pointer(pLhs)).FnExpr == 1 { + // Take care here not to generate a TK_VECTOR containing only a + // single value. Since the parser never creates such a vector, some + // of the subroutines do not handle this case. + var p uintptr = (*ExprList_item)(unsafe.Pointer(pLhs + 8)).FpExpr + (*ExprList_item)(unsafe.Pointer(pLhs + 8)).FpExpr = uintptr(0) + Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pNew)).FpLeft) + (*Expr)(unsafe.Pointer(pNew)).FpLeft = p + } + pSelect = *(*uintptr)(unsafe.Pointer(pNew + 32)) + if (*Select)(unsafe.Pointer(pSelect)).FpOrderBy != 0 { + // If the SELECT statement has an ORDER BY clause, zero the + // iOrderByCol variables. These are set to non-zero when an + // ORDER BY term exactly matches one of the terms of the + // result-set. Since the result-set of the SELECT statement may + // have been modified or reordered, these variables are no longer + // set correctly. Since setting them is just an optimization, + // it's easiest just to zero them here. + var pOrderBy uintptr = (*Select)(unsafe.Pointer(pSelect)).FpOrderBy + for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { + *(*U16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 24)) = U16(0) + } + } + + } + return pNew +} + +// Generate code for a single equality term of the WHERE clause. An equality +// term can be either X=expr or X IN (...). pTerm is the term to be +// coded. +// +// The current value for the constraint is left in a register, the index +// of which is returned. An attempt is made store the result in iTarget but +// this is only guaranteed for TK_ISNULL and TK_IN constraints. If the +// constraint is a TK_EQ or TK_IS, then the current value might be left in +// some other register and it is the caller's responsibility to compensate. +// +// For a constraint of the form X=expr, the expression is evaluated in +// straight-line code. For constraints of the form X IN (...) +// this routine sets up a loop that will iterate over all values of X. +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pX uintptr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var iReg int32 // Register holding results + + if int32((*Expr)(unsafe.Pointer(pX)).Fop) == TK_EQ || int32((*Expr)(unsafe.Pointer(pX)).Fop) == TK_IS { + iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, iTarget) + } else if int32((*Expr)(unsafe.Pointer(pX)).Fop) == TK_ISNULL { + iReg = iTarget + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, iReg) + } else { + var eType int32 = IN_INDEX_NOOP + // var iTab int32 at bp, 4 + + var pIn uintptr + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + var i int32 + var nEq int32 = 0 + var aiMap uintptr = uintptr(0) + + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) == U32(0) && + *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) != uintptr(0) && + *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)))).FaSortOrder + uintptr(iEq))) != 0 { + + bRev = libc.BoolInt32(!(bRev != 0)) + } + + iReg = iTarget + + for i = 0; i < iEq; i++ { + if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)) != 0 && (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)))).FpExpr == pX { + disableTerm(tls, pLevel, pTerm) + return iTarget + } + } + for i = iEq; i < int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm); i++ { + + if (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)))).FpExpr == pX { + nEq++ + } + } + + *(*int32)(unsafe.Pointer(bp /* iTab */)) = 0 + if !((*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_xIsSelect) != U32(0)) || (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pX + 32)))).FpEList)).FnExpr == 1 { + eType = Xsqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), uintptr(0), bp) + } else { + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + pX = removeUnindexableInClauseTerms(tls, pParse, iEq, pLoop, pX) + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + aiMap = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(unsafe.Sizeof(int32(0)))*uint64(nEq))) + eType = Xsqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), aiMap, bp) + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FiTable = *(*int32)(unsafe.Pointer(bp /* iTab */)) + } + Xsqlite3ExprDelete(tls, db, pX) + pX = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + } + + if eType == IN_INDEX_INDEX_DESC { + + bRev = libc.BoolInt32(!(bRev != 0)) + } + Xsqlite3VdbeAddOp2(tls, v, func() int32 { + if bRev != 0 { + return OP_Last + } + return OP_Rewind + }(), *(*int32)(unsafe.Pointer(bp /* iTab */)), 0) + + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_IN_ABLE) + if *(*int32)(unsafe.Pointer(pLevel + 64)) == 0 { + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrNxt = Xsqlite3VdbeMakeLabel(tls, pParse) + } + if iEq > 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_SEEKSCAN) == U32(0) { + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_IN_EARLYOUT) + } + + i = *(*int32)(unsafe.Pointer(pLevel + 64)) + *(*int32)(unsafe.Pointer(pLevel + 64)) += nEq + *(*uintptr)(unsafe.Pointer(pLevel + 64 + 8 /* &.aInLoop */)) = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(pLevel + 64 + 8 /* &.aInLoop */)), + uint64(uint64(unsafe.Sizeof(InLoop{}))*uint64(*(*int32)(unsafe.Pointer(pLevel + 64))))) + pIn = *(*uintptr)(unsafe.Pointer(pLevel + 64 + 8 /* &.aInLoop */)) + if pIn != 0 { + var iMap int32 = 0 // Index in aiMap[] + pIn += 20 * uintptr(i) + for i = iEq; i < int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm); i++ { + if (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)))).FpExpr == pX { + var iOut int32 = iReg + i - iEq + if eType == IN_INDEX_ROWID { + *(*int32)(unsafe.Pointer(pIn + 4 /* &.addrInTop */)) = Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, *(*int32)(unsafe.Pointer(bp /* iTab */)), iOut) + } else { + var iCol int32 + if aiMap != 0 { + iCol = *(*int32)(unsafe.Pointer(aiMap + uintptr(libc.PostIncInt32(&iMap, 1))*4)) + } else { + iCol = 0 + } + *(*int32)(unsafe.Pointer(pIn + 4 /* &.addrInTop */)) = Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp /* iTab */)), iCol, iOut) + } + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, iOut) + if i == iEq { + *(*int32)(unsafe.Pointer(pIn /* &.iCur */)) = *(*int32)(unsafe.Pointer(bp /* iTab */)) + *(*U8)(unsafe.Pointer(pIn + 16 /* &.eEndLoopOp */)) = func() uint8 { + if bRev != 0 { + return uint8(OP_Prev) + } + return uint8(OP_Next) + }() + if iEq > 0 { + *(*int32)(unsafe.Pointer(pIn + 8 /* &.iBase */)) = iReg - i + *(*int32)(unsafe.Pointer(pIn + 12 /* &.nPrefix */)) = i + } else { + *(*int32)(unsafe.Pointer(pIn + 12 /* &.nPrefix */)) = 0 + } + } else { + *(*U8)(unsafe.Pointer(pIn + 16 /* &.eEndLoopOp */)) = U8(OP_Noop) + } + pIn += 20 + } + } + + if iEq > 0 && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_SEEKSCAN|WHERE_VIRTUALTABLE) == U32(0) { + Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur, 0, iEq) + } + } else { + *(*int32)(unsafe.Pointer(pLevel + 64)) = 0 + } + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiMap) + } + + // As an optimization, try to disable the WHERE clause term that is + // driving the index as it will always be true. The correct answer is + // obtained regardless, but we might get the answer with fewer CPU cycles + // by omitting the term. + // + // But do not disable the term unless we are certain that the term is + // not a transitive constraint. For an example of where that does not + // work, see https://sqlite.org/forum/forumpost/eb8613976a (2021-05-04) + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags&U32(WHERE_TRANSCONS) == U32(0) || + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0 { + disableTerm(tls, pLevel, pTerm) + } + + return iReg +} + +// Generate code that will evaluate all == and IN constraints for an +// index scan. +// +// For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c). +// Suppose the WHERE clause is this: a==5 AND b IN (1,2,3) AND c>5 AND c<10 +// The index has as many as three equality constraints, but in this +// example, the third "c" value is an inequality. So only two +// constraints are coded. This routine will generate code to evaluate +// a==5 and b IN (1,2,3). The current values for a and b will be stored +// in consecutive registers and the index of the first register is returned. +// +// In the example above nEq==2. But this subroutine works for any value +// of nEq including 0. If nEq==0, this routine is nearly a no-op. +// The only thing it does is allocate the pLevel->iMem memory cell and +// compute the affinity string. +// +// The nExtraReg parameter is 0 or 1. It is 0 if all WHERE clause constraints +// are == or IN and are covered by the nEq. nExtraReg is 1 if there is +// an inequality constraint (such as the "c>=5 AND c<10" in the example) that +// occurs after the nEq quality constraints. +// +// This routine allocates a range of nEq+nExtraReg memory cells and returns +// the index of the first memory cell in that range. The code that +// calls this routine will use that memory range to store keys for +// start and termination conditions of the loop. +// key value of the loop. If one or more IN operators appear, then +// this routine allocates an additional nEq memory cells for internal +// use. +// +// Before returning, *pzAff is set to point to a buffer containing a +// copy of the column affinity string of the index allocated using +// sqlite3DbMalloc(). Except, entries in the copy of the string associated +// with equality constraints that use BLOB or NONE affinity are set to +// SQLITE_AFF_BLOB. This is to deal with SQL such as the following: +// +// CREATE TABLE t1(a TEXT PRIMARY KEY, b); +// SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b; +// +// In the example above, the index on t1(a) has TEXT affinity. But since +// the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity, +// no conversion should be attempted before using a t2.b value as part of +// a key to search the index. Hence the first byte in the returned affinity +// string in this example would be set to SQLITE_AFF_BLOB. +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ + var nEq U16 // The number of == or IN constraints to code + var nSkip U16 // Number of left-most columns to skip + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction + var pIdx uintptr // The index being used for this loop + var pTerm uintptr // A single constraint term + var pLoop uintptr // The WhereLoop object + var j int32 // Loop counter + var regBase int32 // Base register + var nReg int32 // Number of registers to allocate + var zAff uintptr // Affinity string to return + + // This module is only called on query plans that use an index. + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + + nEq = *(*U16)(unsafe.Pointer(pLoop + 24)) + nSkip = (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip + pIdx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + + // Figure out how many memory cells we will need then allocate them. + regBase = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + nReg = int32(*(*U16)(unsafe.Pointer(pLoop + 24))) + nExtraReg + *(*int32)(unsafe.Pointer(pParse + 56)) += nReg + + zAff = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, Xsqlite3IndexAffinityStr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIdx)) + + if nSkip != 0 { + var iIdxCur int32 = (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, regBase, regBase+int32(nSkip)-1) + Xsqlite3VdbeAddOp1(tls, v, func() int32 { + if bRev != 0 { + return OP_Last + } + return OP_Rewind + }(), iIdxCur) + + j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { + if bRev != 0 { + return OP_SeekLT + } + return OP_SeekGT + }(), + iIdxCur, 0, regBase, int32(nSkip)) + + Xsqlite3VdbeJumpHere(tls, v, j) + for j = 0; j < int32(nSkip); j++ { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, j, regBase+j) + + } + } + + // Evaluate the equality constraints + + for j = int32(nSkip); j < int32(nEq); j++ { + var r1 int32 + pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + + // The following testcase is true for indices with redundant columns. + // Ex: CREATE INDEX i1 ON t1(a,b,a); SELECT * FROM t1 WHERE a=0 AND b=0; + + r1 = codeEqualityTerm(tls, pParse, pTerm, pLevel, j, bRev, regBase+j) + if r1 != regBase+j { + if nReg == 1 { + Xsqlite3ReleaseTempReg(tls, pParse, regBase) + regBase = r1 + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, r1, regBase+j) + } + } + } + for j = int32(nSkip); j < int32(nEq); j++ { + pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 { + if (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_xIsSelect) != 0 { + // No affinity ever needs to be (or should be) applied to a value + // from the RHS of an "? IN (SELECT ...)" expression. The + // sqlite3FindInIndex() routine has already ensured that the + // affinity of the comparison has been applied to the value. + if zAff != 0 { + *(*uint8)(unsafe.Pointer(zAff + uintptr(j))) = uint8(SQLITE_AFF_BLOB) + } + } + } else if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_ISNULL == 0 { + var pRight uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_IS == 0 && Xsqlite3ExprCanBeNull(tls, pRight) != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+j, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) + + } + if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { + + if int32(Xsqlite3CompareAffinity(tls, pRight, *(*uint8)(unsafe.Pointer(zAff + uintptr(j))))) == SQLITE_AFF_BLOB { + *(*uint8)(unsafe.Pointer(zAff + uintptr(j))) = uint8(SQLITE_AFF_BLOB) + } + if Xsqlite3ExprNeedsNoAffinityChange(tls, pRight, *(*uint8)(unsafe.Pointer(zAff + uintptr(j)))) != 0 { + *(*uint8)(unsafe.Pointer(zAff + uintptr(j))) = uint8(SQLITE_AFF_BLOB) + } + } + } + } + *(*uintptr)(unsafe.Pointer(pzAff)) = zAff + return regBase +} + +// Cursor iCur is open on an intkey b-tree (a table). Register iRowid contains +// a rowid value just read from cursor iIdxCur, open on index pIdx. This +// function generates code to do a deferred seek of cursor iCur to the +// rowid stored in register iRowid. +// +// Normally, this is just: +// +// OP_DeferredSeek $iCur $iRowid +// +// However, if the scan currently being coded is a branch of an OR-loop and +// the statement currently being coded is a SELECT, then P3 of OP_DeferredSeek +// is set to iIdxCur and P4 is set to point to an array of integers +// containing one entry for each column of the table cursor iCur is open +// on. For each table column, if the column is the i'th column of the +// index, then the corresponding array entry is set to (i+1). If the column +// does not appear in the index at all, the array entry is set to 0. +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within + + libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_OR_SUBCLAUSE != 0 && + (*Parse)(unsafe.Pointer(func() uintptr { + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { + return (*Parse)(unsafe.Pointer(pParse)).FpToplevel + } + return pParse + }())).FwriteMask == YDbMask(0) { + var i int32 + var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable + var ai uintptr = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1))) + if ai != 0 { + *(*U32)(unsafe.Pointer(ai)) = U32((*Table)(unsafe.Pointer(pTab)).FnCol) + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)-1; i++ { + var x1 int32 + var x2 int32 + + x1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + x2 = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(x1))) + + if x1 >= 0 { + *(*U32)(unsafe.Pointer(ai + uintptr(x2+1)*4)) = U32(i + 1) + } + } + Xsqlite3VdbeChangeP4(tls, v, -1, ai, -15) + } + } +} + +// If the expression passed as the second argument is a vector, generate +// code to write the first nReg elements of the vector into an array +// of registers starting with iReg. +// +// If the expression is not a vector, then nReg must be passed 1. In +// this case, generate code to evaluate the expression and leave the +// result in register iReg. +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ + + if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var iSelect int32 + + iSelect = Xsqlite3CodeSubselect(tls, pParse, p) + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, iSelect, iReg, nReg-1) + } else { + var i int32 + var pList uintptr + + pList = *(*uintptr)(unsafe.Pointer(p + 32)) + + for i = 0; i < nReg; i++ { + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr, iReg+i) + } + } + } else { + + Xsqlite3ExprCode(tls, pParse, p, iReg) + } +} + +// An instance of the IdxExprTrans object carries information about a +// mapping from an expression on table columns into a column in an index +// down through the Walker. +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ + +// Preserve pExpr on the WhereETrans list of the WhereInfo. +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ + var pNew uintptr + pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) + if pNew == uintptr(0) { + return + } + (*WhereExprMod)(unsafe.Pointer(pNew)).FpNext = (*WhereInfo)(unsafe.Pointer((*IdxExprTrans)(unsafe.Pointer(pTrans)).FpWInfo)).FpExprMods + (*WhereInfo)(unsafe.Pointer((*IdxExprTrans)(unsafe.Pointer(pTrans)).FpWInfo)).FpExprMods = pNew + (*WhereExprMod)(unsafe.Pointer(pNew)).FpExpr = pExpr + libc.Xmemcpy(tls, pNew+16, pExpr, uint64(unsafe.Sizeof(Expr{}))) +} + +// The walker node callback used to transform matching expressions into +// a reference to an index column for an index on an expression. +// +// If pExpr matches, then transform it into a reference to the index column +// that contains the value of pExpr. +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ + var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) + if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { + preserveExpr(tls, pX, pExpr) + (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3ExprAffinity(tls, pExpr) + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_COLUMN) + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCur + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar((*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCol) + + *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Skip | EP_Unlikely | EP_WinFunc | EP_Subrtn)) + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = uintptr(0) + return WRC_Prune + } else { + return WRC_Continue + } + return int32(0) +} + +// A walker node callback that translates a column reference to a table +// into a corresponding column reference of an index. +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) + if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { + + preserveExpr(tls, pX, pExpr) + (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCur + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar((*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCol) + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = uintptr(0) + } + } + return WRC_Continue +} + +// For an indexes on expression X, locate every instance of expression X +// in pExpr and change that subexpression into a reference to the appropriate +// column of the index. +// +// 2019-10-24: Updated to also translate references to a VIRTUAL column in +// the table into references to the corresponding (stored) column of the +// index. +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + var iIdxCol int32 // Column number of the index + var aColExpr uintptr // Expressions that are indexed + var pTab uintptr + // var w Walker at bp, 48 + + // var x IdxExprTrans at bp+48, 40 + + aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr + if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x400>>10) != 0) { + // The index does not reference any expressions or virtual columns + // so no translations are needed. + return + } + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 /* &x */ + (*IdxExprTrans)(unsafe.Pointer(bp + 48 /* &x */)).FiTabCur = iTabCur + (*IdxExprTrans)(unsafe.Pointer(bp + 48 /* &x */)).FiIdxCur = iIdxCur + (*IdxExprTrans)(unsafe.Pointer(bp + 48 /* &x */)).FpWInfo = pWInfo + (*IdxExprTrans)(unsafe.Pointer(bp + 48 /* &x */)).Fdb = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb + for iIdxCol = 0; iIdxCol < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); iIdxCol++ { + var iRef I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) + if int32(iRef) == -2 { + + (*IdxExprTrans)(unsafe.Pointer(bp + 48 /* &x */)).FpIdxExpr = (*ExprList_item)(unsafe.Pointer(aColExpr + 8 + uintptr(iIdxCol)*32)).FpExpr + if Xsqlite3ExprIsConstant(tls, (*IdxExprTrans)(unsafe.Pointer(bp+48)).FpIdxExpr) != 0 { + continue + } + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIndexExprTransNode})) + } else if int32(iRef) >= 0 && + int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*24)).FcolFlags)&COLFLAG_HASCOLL == 0 || + Xsqlite3StrICmp(tls, Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*24), + uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) == 0) { + // Check to see if there are direct references to generated columns + // that are contained in the index. Pulling the generated column + // out of the index is an optimization only - the main table is always + // available if the index cannot be used. To avoid unnecessary + // complication, omit this optimization if the collating sequence for + // the column is non-standard + (*IdxExprTrans)(unsafe.Pointer(bp + 48 /* &x */)).FiTabCol = int32(iRef) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIndexExprTransColumn})) + } else { + continue + } + (*IdxExprTrans)(unsafe.Pointer(bp + 48 /* &x */)).FiIdxCol = iIdxCol + Xsqlite3WalkExpr(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpWhere) + Xsqlite3WalkExprList(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + Xsqlite3WalkExprList(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + } +} + +// The pTruth expression is always true because it is the WHERE clause +// a partial index that is driving a query loop. Look through all of the +// WHERE clause terms on the query, and if any of those terms must be +// true because pTruth is true, then mark those WHERE clause terms as +// coded. +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ + var i int32 + var pTerm uintptr + for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { + whereApplyPartialIndexConstraints(tls, (*Expr)(unsafe.Pointer(pTruth)).FpLeft, iTabCur, pWC) + pTruth = (*Expr)(unsafe.Pointer(pTruth)).FpRight + } + i = 0 + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa +__1: + if !(i < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { + goto __3 + } + { + var pExpr uintptr + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED != 0 { + goto __2 + } + pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, pTruth, iTabCur) == 0 { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) + } + + } + goto __2 +__2: + i++ + pTerm += 56 + goto __1 + goto __3 +__3: +} + +// This routine is called right after An OP_Filter has been generated and +// before the corresponding index search has been performed. This routine +// checks to see if there are additional Bloom filters in inner loops that +// can be checked prior to doing the index lookup. If there are available +// inner-loop Bloom filters, then evaluate those filters now, before the +// index lookup. The idea is that a Bloom filter check is way faster than +// an index lookup, and the Bloom filter might return false, meaning that +// the index lookup can be skipped. +// +// We know that an inner loop uses a Bloom filter because it has the +// WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, +// then clear the WhereLevel.regFilter value to prevent the Bloom filter +// from being checked a second time when the inner loop is evaluated. +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pLevel uintptr = pWInfo + 864 + uintptr(iLevel)*96 + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { + continue + } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } + // ,--- Because sqlite3ConstructBloomFilter() has will not have set + // vvvvv--' pLevel->regFilter if this were true. + if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { + continue + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { + var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm)) + var regRowid int32 + + regRowid = Xsqlite3GetTempReg(tls, pParse) + regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, + addrNxt, regRowid, 1) + + } else { + var nEq U16 = *(*U16)(unsafe.Pointer(pLoop + 24)) + var r1 int32 + // var zStartAff uintptr at bp, 8 + + r1 = codeAllEqualityTerms(tls, pParse, pLevel, 0, 0, bp) + codeApplyAffinity(tls, pParse, r1, int32(nEq), *(*uintptr)(unsafe.Pointer(bp /* zStartAff */))) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(bp /* zStartAff */))) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, + addrNxt, r1, int32(nEq)) + + } + (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter = 0 + } +} + +// Generate code for the start of the iLevel-th loop in the WHERE clause +// implementation described by pWInfo. +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + var j int32 + var k int32 // Loop counters + var iCur int32 // The VDBE cursor for the table + var addrNxt int32 // Where to jump to continue with the next IN case + var bRev int32 // True if we need to scan in reverse order + var pLoop uintptr // The WhereLoop object being coded + var pWC uintptr // Decomposition of the entire WHERE clause + var pTerm uintptr // A WHERE clause term + var db uintptr // Database connection + var pTabItem uintptr // FROM clause term being coded + var addrBrk int32 // Jump here to break out of the loop + var addrHalt int32 // addrBrk for the outermost loop + var addrCont int32 // Jump here to continue with next cycle + var iRowidReg int32 = 0 // Rowid is stored in this register, if not zero + var iReleaseReg int32 = 0 // Temp register to free before returning + var pIdx uintptr = uintptr(0) // Index used by loop (if any) + var iLoop int32 // Iteration of constraint generator loop + + pWC = pWInfo + 112 + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+600, iCur) + bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) + + // Create labels for the "break" and "continue" instructions + // for the current loop. Jump to addrBrk to break out of a loop. + // Jump to cont to go immediately to the next iteration of the + // loop. + // + // When there is an IN operator, we also have a "addrNxt" label that + // means to continue with the next IN value combination. When + // there are no IN operators in the constraints, the "addrNxt" label + // is the same as "addrBrk". + addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) + addrCont = libc.AssignPtrInt32(pLevel+24, Xsqlite3VdbeMakeLabel(tls, pParse)) + + // If this is the right table of a LEFT OUTER JOIN, allocate and + // initialize a memory cell that records if this table matches any + // row of the left table of the join. + + if int32((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom) > 0 && int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) + + } + + // Compute a safe address to jump to if we discover that the table for + // this loop is empty and can never contribute content. + for j = iLevel; j > 0 && (*WhereLevel)(unsafe.Pointer(pWInfo+864 /* &.a */ +uintptr(j)*96)).FiLeftJoin == 0; j-- { + } + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 864 + uintptr(j)*96)).FaddrBrk + + // Special case of a FROM clause subquery implemented as a co-routine + if uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x10>>4)) != 0 { + var regYield int32 = (*SrcItem)(unsafe.Pointer(pTabItem)).FregReturn + Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, (*SrcItem)(unsafe.Pointer(pTabItem)).FaddrFillSub) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regYield, addrBrk) + + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Goto) + } else if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0) { + // Case 1: The table is a virtual-table. Use the VFilter and VNext + // to access the data. + var iReg int32 // P3 Value for OP_VFilter + var addrNotFound int32 + var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) + + iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) + addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk + for j = 0; j < nConstraint; j++ { + var iTarget int32 = iReg + j + 2 + pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if pTerm == uintptr(0) { + continue + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 { + if func() uint32 { + if j <= 31 { + return uint32(uint32(1)) << j + } + return uint32(0) + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) != 0 { + var iTab int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + var iCache int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3CodeRhsOfIN(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, iTab) + Xsqlite3VdbeAddOp3(tls, v, OP_VInitIn, iTab, iTarget, iCache) + } else { + codeEqualityTerm(tls, pParse, pTerm, pLevel, j, bRev, iTarget) + addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrNxt + } + } else { + var pRight uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight + codeExprOrVector(tls, pParse, pRight, iTarget, 1) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) == SQLITE_INDEX_CONSTRAINT_OFFSET && + U32(int32(*(*uint8)(unsafe.Pointer(pLoop + 24 + 4))&0x2>>1)) != 0 { + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + + } + } + } + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(pLoop + 24)), iReg) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, nConstraint, iReg+1) + Xsqlite3VdbeAddOp4(tls, v, OP_VFilter, iCur, addrNotFound, iReg, + *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)), + func() int32 { + if U32(int32(*(*uint8)(unsafe.Pointer(pLoop + 24 + 4))&0x1>>0)) != 0 { + return -7 + } + return -1 + }()) + + libc.SetBitFieldPtr8Uint32(pLoop+24+4, U32(0), 0, 0x1) + // An OOM inside of AddOp4(OP_VFilter) instruction above might have freed + // the u.vtab.idxStr. NULL it out to prevent a use-after-free + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)) = uintptr(0) + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iCur + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = func() uint8 { + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass != 0 { + return uint8(OP_Noop) + } + return uint8(OP_VNext) + }() + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) + + for j = 0; j < nConstraint; j++ { + pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && + func() uint32 { + if j <= 31 { + return uint32(uint32(1)) << j + } + return uint32(0) + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var pCompare uintptr // The comparison operator + var pRight uintptr // RHS of the comparison + var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint + + // Reload the constraint value into reg[iReg+j+2]. The same value + // was loaded into the same register prior to the OP_VFilter, but + // the xFilter implementation might have changed the datatype or + // encoding of the value in the register, so it *must* be reloaded. + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { + pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { + + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } + } + + // Generate code that will continue to the next row if + // the IN constraint is not satisfied + pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } + (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) + if pRight != 0 { + (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 + Xsqlite3ExprIfFalse(tls, + pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) + } + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) + } + Xsqlite3ExprDelete(tls, db, pCompare) + } + } + + // These registers need to be preserved in case there is an IN operator + // loop. So we could deallocate the registers here (and potentially + // reuse them later) if (pLoop->wsFlags & WHERE_IN_ABLE)==0. But it seems + // simpler and safer to simply not reuse the registers. + // + // sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2); + } else if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_COLUMN_IN|WHERE_COLUMN_EQ) != U32(0) { + // Case 2: We can directly reference a single row using an + // equality comparison against the ROWID field. Or + // we reference multiple rows using a "rowid IN (...)" + // construct. + + pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm)) + + iReleaseReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + iRowidReg = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, bRev, iReleaseReg) + if iRowidReg != iReleaseReg { + Xsqlite3ReleaseTempReg(tls, pParse, iReleaseReg) + } + addrNxt = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrNxt + if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0 { + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, + iRowidReg, 1) + + filterPullDown(tls, pParse, pWInfo, iLevel, addrNxt, notReady) + } + Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, iCur, addrNxt, iRowidReg) + + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) + } else if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_COLUMN_RANGE) != U32(0) { + // Case 3: We have an inequality comparison against the ROWID field. + var testOp int32 = OP_Noop + var start int32 + var memEndValue int32 = 0 + var pStart uintptr + var pEnd uintptr + + j = 0 + pStart = libc.AssignUintptr(&pEnd, uintptr(0)) + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { + pStart = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(libc.PostIncInt32(&j, 1))*8)) + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { + pEnd = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(libc.PostIncInt32(&j, 1))*8)) + } + + if bRev != 0 { + pTerm = pStart + pStart = pEnd + pEnd = pTerm + } + + if pStart != 0 { + var pX uintptr // The expression that defines the start bound + var r1 int32 + // var rTemp int32 at bp+12, 4 + // Registers for holding the start boundary + var op int32 // Cursor seek operation + + // The following constant maps TK_xx codes into corresponding + // seek opcodes. It depends on a particular ordering of TK_xx + *(*[4]U8)(unsafe.Pointer(bp + 8 /* aMoveOp */)) = [4]U8{ + /* TK_GT */ U8(OP_SeekGT), + /* TK_LE */ U8(OP_SeekLE), + /* TK_LT */ U8(OP_SeekLT), + /* TK_GE */ U8(OP_SeekGE), + } + // Make sure the ordering.. + // ... of the TK_xx values... + // ... is correcct. + + pX = (*WhereTerm)(unsafe.Pointer(pStart)).FpExpr + + // transitive constraints + if Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pX)).FpRight) != 0 { + r1 = libc.AssignPtrInt32(bp+12 /* rTemp */, Xsqlite3GetTempReg(tls, pParse)) + codeExprOrVector(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, r1, 1) + + op = int32(*(*U8)(unsafe.Pointer(bp + 8 + uintptr((int32((*Expr)(unsafe.Pointer(pX)).Fop)-TK_GT-1)&0x3|0x1)))) + + } else { + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, bp+12) + disableTerm(tls, pLevel, pStart) + op = int32(*(*U8)(unsafe.Pointer(bp + 8 + uintptr(int32((*Expr)(unsafe.Pointer(pX)).Fop)-TK_GT)))) + } + Xsqlite3VdbeAddOp3(tls, v, op, iCur, addrBrk, r1) + + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 12 /* rTemp */))) + } else { + Xsqlite3VdbeAddOp2(tls, v, func() int32 { + if bRev != 0 { + return OP_Last + } + return OP_Rewind + }(), iCur, addrHalt) + + } + if pEnd != 0 { + var pX uintptr + pX = (*WhereTerm)(unsafe.Pointer(pEnd)).FpExpr + + // Transitive constraints + + memEndValue = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + codeExprOrVector(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, memEndValue, 1) + if 0 == Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pX)).FpRight) && + (int32((*Expr)(unsafe.Pointer(pX)).Fop) == TK_LT || int32((*Expr)(unsafe.Pointer(pX)).Fop) == TK_GT) { + if bRev != 0 { + testOp = OP_Le + } else { + testOp = OP_Ge + } + } else { + if bRev != 0 { + testOp = OP_Lt + } else { + testOp = OP_Gt + } + } + if 0 == Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pX)).FpRight) { + disableTerm(tls, pLevel, pEnd) + } + } + start = Xsqlite3VdbeCurrentAddr(tls, v) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = func() uint8 { + if bRev != 0 { + return uint8(OP_Prev) + } + return uint8(OP_Next) + }() + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iCur + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = start + + if testOp != OP_Noop { + iRowidReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iCur, iRowidReg) + Xsqlite3VdbeAddOp3(tls, v, testOp, memEndValue, addrBrk, iRowidReg) + + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) + } + } else if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0 { + var nEq U16 = *(*U16)(unsafe.Pointer(pLoop + 24)) // Number of == or IN terms + var nBtm U16 = *(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */)) // Length of BTM vector + var nTop U16 = *(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */)) // Length of TOP vector + var regBase int32 // Base register holding constraint values + var pRangeStart uintptr = uintptr(0) // Inequality constraint at range start + var pRangeEnd uintptr = uintptr(0) // Inequality constraint at range end + var startEq int32 // True if range start uses ==, >= or <= + var endEq int32 // True if range end uses ==, >= or <= + var start_constraints int32 // Start of range is constrained + var nConstraint int32 // Number of constraint terms + var iIdxCur int32 // The VDBE cursor for the index + var nExtraReg int32 = 0 // Number of extra registers needed + var op int32 // Instruction opcode + // var zStartAff uintptr at bp+16, 8 + // Affinity for start of range constraint + var zEndAff uintptr = uintptr(0) // Affinity for end of range constraint + var bSeekPastNull U8 = U8(0) // True to seek past initial nulls + var bStopAtNull U8 = U8(0) // Add condition to terminate at NULLs + var omitTable int32 // True if we use the index only + var regBignull int32 = 0 // big-null flag register + var addrSeekScan int32 = 0 // Opcode of the OP_SeekScan, if any + + pIdx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur + + // Find any inequality constraint terms for the start and end + // of the range. + j = int32(nEq) + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { + pRangeStart = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(libc.PostIncInt32(&j, 1))*8)) + nExtraReg = func() int32 { + if nExtraReg > int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))) { + return nExtraReg + } + return int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))) + }() + // Like optimization range constraints always occur in pairs + + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { + pRangeEnd = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(libc.PostIncInt32(&j, 1))*8)) + nExtraReg = func() int32 { + if nExtraReg > int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))) { + return nExtraReg + } + return int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))) + }() + if pRangeStart == uintptr(0) { + j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(nEq)*2))) + if j >= 0 && int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(j)*24 + 8))&0xf>>0) == 0 || j == -2 { + bSeekPastNull = U8(1) + } + } + } + + // If the WHERE_BIGNULL_SORT flag is set, then index column nEq uses + // a non-default "big-null" sort (either ASC NULLS LAST or DESC NULLS + // FIRST). In both cases separate ordered scans are made of those + // index entries for which the column is null and for those for which + // it is not. For an ASC sort, the non-NULL entries are scanned first. + // For DESC, NULL entries are scanned first. + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT|WHERE_BTM_LIMIT) == U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BIGNULL_SORT) != U32(0) { + + nExtraReg = 1 + bSeekPastNull = U8(1) + (*WhereLevel)(unsafe.Pointer(pLevel)).FregBignull = libc.AssignInt32(®Bignull, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + if (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regBignull) + } + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBignull = Xsqlite3VdbeMakeLabel(tls, pParse) + } + + // If we are doing a reverse order scan on an ascending index, or + // a forward order scan on a descending index, interchange the + // start and end terms (pRangeStart and pRangeEnd). + if int32(nEq) < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) && bRev == libc.Bool32(int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(nEq)))) == SQLITE_SO_ASC) { + { + var t uintptr = pRangeEnd + pRangeEnd = pRangeStart + pRangeStart = t + } + + { + var t U8 = bSeekPastNull + bSeekPastNull = bStopAtNull + bStopAtNull = t + } + + { + var t U8 = U8(nBtm) + nBtm = nTop + nTop = U16(t) + } + + } + + if iLevel > 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_SEEKSCAN) != U32(0) { + // In case OP_SeekScan is used, ensure that the index cursor does not + // point to a valid row for the first iteration of this loop. + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) + } + + // Generate code to evaluate all constraint terms using == or IN + // and store the values of those terms in an array of registers + // starting at regBase. + + regBase = codeAllEqualityTerms(tls, pParse, pLevel, bRev, nExtraReg, bp+16) + + if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 && nTop != 0 { + zEndAff = Xsqlite3DbStrDup(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))+uintptr(nEq)) + } + addrNxt = func() int32 { + if regBignull != 0 { + return (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBignull + } + return (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrNxt + }() + + startEq = libc.Bool32(!(pRangeStart != 0) || int32((*WhereTerm)(unsafe.Pointer(pRangeStart)).FeOperator)&(int32(WO_EQ)<<(TK_LE-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0) + endEq = libc.Bool32(!(pRangeEnd != 0) || int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FeOperator)&(int32(WO_EQ)<<(TK_LE-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0) + start_constraints = libc.Bool32(pRangeStart != 0 || int32(nEq) > 0) + + // Seek the index cursor to the start of the range. + nConstraint = int32(nEq) + if pRangeStart != 0 { + var pRight uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeStart)).FpExpr)).FpRight + codeExprOrVector(tls, pParse, pRight, regBase+int32(nEq), int32(nBtm)) + + if int32((*WhereTerm)(unsafe.Pointer(pRangeStart)).FwtFlags)&TERM_VNULL == 0 && + Xsqlite3ExprCanBeNull(tls, pRight) != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) + + } + if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { + updateRangeAffinityStr(tls, pRight, int32(nBtm), *(*uintptr)(unsafe.Pointer(bp + 16))+uintptr(nEq)) + } + nConstraint = nConstraint + int32(nBtm) + + if Xsqlite3ExprIsVector(tls, pRight) == 0 { + disableTerm(tls, pLevel, pRangeStart) + } else { + startEq = 1 + } + bSeekPastNull = U8(0) + } else if bSeekPastNull != 0 { + startEq = 0 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) + start_constraints = 1 + nConstraint++ + } else if regBignull != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) + start_constraints = 1 + nConstraint++ + } + codeApplyAffinity(tls, pParse, regBase, nConstraint-int32(bSeekPastNull), *(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */))) + if int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) > 0 && nConstraint == int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { + // The skip-scan logic inside the call to codeAllEqualityConstraints() + // above has already left the cursor sitting on the correct row, + // so no further seeking is needed + } else { + if regBignull != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regBignull) + + } + if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0 { + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, + regBase, int32(nEq)) + + filterPullDown(tls, pParse, pWInfo, iLevel, addrNxt, notReady) + } + + op = int32(aStartOp[start_constraints<<2+startEq<<1+bRev]) + + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_SEEKSCAN) != U32(0) && op == OP_SeekGE { + + // TUNING: The OP_SeekScan opcode seeks to reduce the number + // of expensive seek operations by replacing a single seek with + // 1 or more step operations. The question is, how many steps + // should we try before giving up and going with a seek. The cost + // of a seek is proportional to the logarithm of the of the number + // of entries in the tree, so basing the number of steps to try + // on the estimated number of rows in the btree seems like a good + // guess. + addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, + (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) + + } + Xsqlite3VdbeAddOp4Int(tls, v, op, iIdxCur, addrNxt, regBase, nConstraint) + + if regBignull != 0 { + + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) + op = int32(aStartOp[libc.Bool32(nConstraint > 1)*4+2+bRev]) + Xsqlite3VdbeAddOp4Int(tls, v, op, iIdxCur, addrNxt, regBase, + nConstraint-startEq) + + } + } + + // Load the value for the inequality constraint at the end of the + // range (if any). + nConstraint = int32(nEq) + + if pRangeEnd != 0 { + var pRight uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight + if addrSeekScan != 0 { + // For a seek-scan that has a range on the lowest term of the index, + // we have to make the top of the loop be code that sets the end + // condition of the range. Otherwise, the OP_SeekScan might jump + // over that initialization, leaving the range-end value set to the + // range-start value, resulting in a wrong answer. + // See ticket 5981a8c041a3c2f3 (2021-11-02). + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) + } + codeExprOrVector(tls, pParse, pRight, regBase+int32(nEq), int32(nTop)) + + if int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && + Xsqlite3ExprCanBeNull(tls, pRight) != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) + + } + if zEndAff != 0 { + updateRangeAffinityStr(tls, pRight, int32(nTop), zEndAff) + codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) + } else { + + } + nConstraint = nConstraint + int32(nTop) + + if Xsqlite3ExprIsVector(tls, pRight) == 0 { + disableTerm(tls, pLevel, pRangeEnd) + } else { + endEq = 1 + } + } else if bStopAtNull != 0 { + if regBignull == 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) + endEq = 0 + } + nConstraint++ + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */))) + Xsqlite3DbFree(tls, db, zEndAff) + + // Top of the loop body + if (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0 { + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) + } + + // Check if the index cursor is past the end of the range. + if nConstraint != 0 { + if regBignull != 0 { + // Except, skip the end-of-range check while doing the NULL-scan + Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) + + } + op = int32(aEndOp[bRev*2+endEq]) + Xsqlite3VdbeAddOp4Int(tls, v, op, iIdxCur, addrNxt, regBase, nConstraint) + + if addrSeekScan != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) + } + } + if regBignull != 0 { + // During a NULL-scan, check to see if we have reached the end of + // the NULLs + + Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) + + op = int32(aEndOp[bRev*2+int32(bSeekPastNull)]) + Xsqlite3VdbeAddOp4Int(tls, v, op, iIdxCur, addrNxt, regBase, + nConstraint+int32(bSeekPastNull)) + + } + + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0) { + Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) + } + + // Seek the table cursor, if required + omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_OR_SUBCLAUSE == 0) + if omitTable != 0 { + // pIdx is a covering index. No need to access the main table. + } else if (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) + } else if iCur != iIdxCur { + var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) + iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) + for j = 0; j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); j++ { + k = int32(Xsqlite3TableColumnToIndex(tls, pIdx, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, k, iRowidReg+j) + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, + iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) + } + + if (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0 { + // If pIdx is an index on one or more expressions, then look through + // all the expressions in pWInfo and try to transform matching expressions + // into reference to index columns. Also attempt to translate references + // to virtual columns in the table into references to (stored) columns + // of the index. + // + // Do not do this for the RHS of a LEFT JOIN. This is because the + // expression may be evaluated after OP_NullRow has been executed on + // the cursor. In this case it is important to do the full evaluation, + // as the result of the expression may not be NULL, even if all table + // column values are. https://www.sqlite.org/src/info/7fa8049685b50b5a + // + // Also, do not do this when processing one index an a multi-index + // OR clause, since the transformation will become invalid once we + // move forward to the next index. + // https://sqlite.org/src/info/4e8e4857d32d401f + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_OR_SUBCLAUSE == 0 { + whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) + } + + // If a partial index is driving the loop, try to eliminate WHERE clause + // terms from the query that must be true due to the WHERE clause of + // the partial index. + // + // 2019-11-02 ticket 623eff57e76d45f6: This optimization does not work + // for a LEFT JOIN. + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) + } + } else { + + // The following assert() is not a requirement, merely an observation: + // The OR-optimization doesn't work for the right hand table of + // a LEFT JOIN: + + } + + // Record the instruction used to terminate the loop. + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0 { + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) + } else if bRev != 0 { + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + } else { + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_UNQ_WANTED) != U32(0) { + return uint8(1) + } + return uint8(0) + }() + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0) { + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + } else { + + } + if omitTable != 0 { + pIdx = uintptr(0) + } + } else if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0 { + // Case 5: Two or more separately indexed terms connected by OR + // + // Example: + // + // CREATE TABLE t1(a,b,c,d); + // CREATE INDEX i1 ON t1(a); + // CREATE INDEX i2 ON t1(b); + // CREATE INDEX i3 ON t1(c); + // + // SELECT * FROM t1 WHERE a=5 OR b=7 OR (c=11 AND d=13) + // + // In the example, there are three indexed terms connected by OR. + // The top of the loop looks like this: + // + // Null 1 # Zero the rowset in reg 1 + // + // Then, for each indexed term, the following. The arguments to + // RowSetTest are such that the rowid of the current row is inserted + // into the RowSet. If it is already present, control skips the + // Gosub opcode and jumps straight to the code generated by WhereEnd(). + // + // sqlite3WhereBegin() + // RowSetTest # Insert rowid into rowset + // Gosub 2 A + // sqlite3WhereEnd() + // + // Following the above, code to terminate the loop. Label A, the target + // of the Gosub above, jumps to the instruction right after the Goto. + // + // Null 1 # Zero the rowset in reg 1 + // Goto B # The loop is finished. + // + // A: # Return data, whatever. + // + // Return 2 # Jump back to the Gosub + // + // B: + // + // Added 2014-05-26: If the table is a WITHOUT ROWID table, then + // use an ephemeral index instead of a RowSet to record the primary + // keys of the rows we have already seen. + // + var pOrWc uintptr // The OR-clause broken out into subterms + var pOrTab uintptr // Shortened table list or OR-clause generation + var pCov uintptr = uintptr(0) // Potential covering index (or NULL) + var iCovCur int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Cursor used for index scans (if any) + + var regReturn int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) // Register used with OP_Gosub + var regRowset int32 = 0 // Register for RowSet object + var regRowid int32 = 0 // Register holding rowid + var iLoopBody int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Start of loop body + var iRetInit int32 // Address of regReturn init + var untestedTerms int32 = 0 // Some terms not completely tested + var ii int32 // Loop counter + var pAndExpr uintptr = uintptr(0) // An ".. AND (...)" expression + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pTabItem)).FpTab + + pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm)) + + pOrWc = *(*uintptr)(unsafe.Pointer(pTerm + 32)) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Return) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn + + // Set up a new SrcList in pOrTab containing the table being scanned + // by this loop in the a[0] slot and all notReady tables in a[1..] slots. + // This becomes the SrcList in the recursive call to sqlite3WhereBegin(). + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1 { + var nNotReady int32 // The number of notReady tables + var origSrc uintptr // Original list of tables + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{})))) + if pOrTab == uintptr(0) { + return notReady + } + (*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc = U32(U8(nNotReady + 1)) + (*SrcList)(unsafe.Pointer(pOrTab)).FnSrc = int32((*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc) + libc.Xmemcpy(tls, pOrTab+8, pTabItem, uint64(unsafe.Sizeof(SrcItem{}))) + origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 /* &.a */ + for k = 1; k <= nNotReady; k++ { + libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*112, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*96)).FiFrom)*112, uint64(unsafe.Sizeof(SrcItem{}))) + } + } else { + pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + } + + // Initialize the rowset register to contain NULL. An SQL NULL is + // equivalent to an empty rowset. Or, create an ephemeral index + // capable of holding primary keys in the case of a WITHOUT ROWID. + // + // Also initialize regReturn to contain the address of the instruction + // immediately following the OP_Return at the bottom of the loop. This + // is required in a few obscure LEFT JOIN cases where control jumps + // over the top of the loop into the body of it. In this case the + // correct response for the end-of-loop code (the OP_Return) is to + // fall through to the next instruction, just as an OP_Next does if + // called on an uninitialized cursor. + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0 { + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) + } else { + var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) + regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) + } + regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) + + // If the original WHERE clause is z of the form: (x1 OR x2 OR ...) AND y + // Then for every term xN, evaluate as the subexpression: xN AND y + // That way, terms in y that are factored into the disjunction will + // be picked up by the recursive calls to sqlite3WhereBegin() below. + // + // Actually, each subexpression is converted to "xN AND w" where w is + // the "interesting" terms of z - terms that did not originate in the + // ON or USING clause of a LEFT JOIN, and terms that are usable as + // indices. + // + // This optimization also only applies if the (x1 OR x2 OR ...) term + // is not contained in the ON clause of a LEFT JOIN. + // See ticket http://www.sqlite.org/src/info/f2369304e4 + // + // 2022-02-04: Do not push down slices of a row-value comparison. + // In other words, "w" or "y" may not be a slice of a vector. Otherwise, + // the initialization of the right-hand operand of the vector comparison + // might not occur, or might occur only in an OR branch that is not + // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 + if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { + var iTerm int32 + for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { + var pExpr uintptr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr + if (*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm { + continue + } + + if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0 { + continue + } + if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { + continue + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a + pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) + pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) + } + if pAndExpr != 0 { + // The extra 0x10000 bit on the opcode is masked off and does not + // become part of the new Expr.op. However, it does make the + // op==TK_AND comparison inside of sqlite3PExpr() false, and this + // prevents sqlite3PExpr() from applying the AND short-circuit + // optimization, which we do not want here. + pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) + } + } + + // Run a separate WHERE clause for each term of the OR clause. After + // eliminating duplicates from other WHERE clauses, the action for each + // sub-WHERE clause is to to invoke the main loop body as a subroutine. + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21613, 0) + for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { + var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 + if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { + var pSubWInfo uintptr // Info for single OR-term scan + var pOrExpr uintptr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr // Current OR clause term + var pDelete uintptr // Local copy of OR clause term + var jmp1 int32 = 0 // Address of jump operation + // See TH3 vtab25.400 and ticket 614b25314c766238 + pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3ExprDelete(tls, db, pDelete) + continue + } + if pAndExpr != 0 { + (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr + pOrExpr = pAndExpr + } + // Loop through table entries that match term pOrTerm. + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21628, libc.VaList(bp, ii+1)) + + pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), + uint16(WHERE_OR_SUBCLAUSE), iCovCur) + + if pSubWInfo != 0 { + var pSubLoop uintptr + var addrExplain int32 = Xsqlite3WhereExplainOneScan(tls, + pParse, pOrTab, pSubWInfo+864, uint16(0)) + _ = addrExplain + _ = addrExplain + + // This is the sub-WHERE clause body. First skip over + // duplicate rows from prior sub-WHERE clauses, and record the + // rowid (or PRIMARY KEY) for the current row so that the same + // row will be skipped in subsequent sub-WHERE clauses. + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0 { + var iSet int32 = func() int32 { + if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { + return -1 + } + return ii + }() + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) + jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, + regRowid, iSet) + + } else { + var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) + var nPk int32 = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) + var iPk int32 + var r int32 + + // Read the PK into an array of temp registers. + r = Xsqlite3GetTempRange(tls, pParse, nPk) + for iPk = 0; iPk < nPk; iPk++ { + var iCol int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(iPk)*2))) + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) + } + + // Check if the temp table already contains this key. If so, + // the row has already been included in the result set and + // can be ignored (by jumping past the Gosub below). Otherwise, + // insert the key into the temp table and proceed with processing + // the row. + // + // Use some of the same optimizations as OP_RowSetTest: If iSet + // is zero, assume that the key cannot already be present in + // the temp table. And if iSet is -1, assume that there is no + // need to insert the key into the temp table, as it will never + // be tested for. + if iSet != 0 { + jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) + + } + if iSet >= 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, + r, nPk) + if iSet != 0 { + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) + } + } + + // Release the array of temp registers + Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) + } + } + + // Invoke the main loop body as a subroutine + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) + + // Jump here (skipping the main loop body subroutine) if the + // current sub-WHERE row is a duplicate from prior sub-WHEREs. + if jmp1 != 0 { + Xsqlite3VdbeJumpHere(tls, v, jmp1) + } + + // The pSubWInfo->untestedTerms flag means that this OR term + // contained one or more AND term from a notReady table. The + // terms from the notReady table could not be tested and will + // need to be tested later. + if uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x2>>1)) != 0 { + untestedTerms = 1 + } + + // If all of the OR-connected terms are optimized using the same + // index, and the index is opened using the same cursor number + // by each call to sqlite3WhereBegin() made by this loop, it may + // be possible to use that index as a covering index. + // + // If the call to sqlite3WhereBegin() above resulted in a scan that + // uses an index, and this is either the first OR-connected term + // processed or the index is the same as that used by all previous + // terms, set pCov to the candidate covering index. Otherwise, set + // pCov to NULL to indicate that no candidate covering index will + // be available. + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 864)).FpWLoop + + if (*WhereLoop)(unsafe.Pointer(pSubLoop)).FwsFlags&U32(WHERE_INDEXED) != U32(0) && + (ii == 0 || *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) == pCov) && + ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY)) { + + pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8 /* &.pIndex */)) + } else { + pCov = uintptr(0) + } + if Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0 { + libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 0, 0x1) + } + + // Finish the loop through table entries that match term pOrTerm. + Xsqlite3WhereEnd(tls, pSubWInfo) + Xsqlite3VdbeExplainPop(tls, pParse) + } + Xsqlite3ExprDelete(tls, db, pDelete) + } + } + Xsqlite3VdbeExplainPop(tls, pParse) + + *(*uintptr)(unsafe.Pointer(pLevel + 64)) = pCov + if pCov != 0 { + (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur + } + if pAndExpr != 0 { + (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) + Xsqlite3ExprDelete(tls, db, pAndExpr) + } + Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) + Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) + Xsqlite3VdbeResolveLabel(tls, v, iLoopBody) + + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1 { + Xsqlite3DbFree(tls, db, pOrTab) + } + if !(untestedTerms != 0) { + disableTerm(tls, pLevel, pTerm) + } + } else { + + if uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x20>>5)) != 0 { + // Tables marked isRecursive have only a single row that is stored in + // a pseudo-cursor. No need to Rewind or Next such cursors. + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) + } else { + + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = aStep[bRev] + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iCur + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = 1 + Xsqlite3VdbeAddOp2(tls, v, int32(aStart[bRev]), iCur, addrHalt) + + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + } + } + + // Insert code to test every subexpression that can be completely + // computed using the current set of tables. + // + // This loop may run between one and three times, depending on the + // constraints to be generated. The value of stack variable iLoop + // determines the constraints coded by each iteration, as follows: + // + // iLoop==1: Code only expressions that are entirely covered by pIdx. + // iLoop==2: Code remaining expressions that do not contain correlated + // sub-queries. + // iLoop==3: Code all remaining expressions. + // + // An effort is made to skip unnecessary iterations of the loop. + iLoop = func() int32 { + if pIdx != 0 { + return 1 + } + return 2 + }() + for __ccgo := true; __ccgo; __ccgo = iLoop > 0 { + var iNext int32 = 0 // Next value for iLoop + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm + __1: + if !(j > 0) { + goto __3 + } + { + var pE uintptr + var skipLikeAddr int32 = 0 + + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0 { + goto __2 + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0) { + + libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 1, 0x2) + goto __2 + } + pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_FromJoin) != U32(0)) { + goto __2 + } + + if iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0) { + iNext = 2 + goto __2 + } + if iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0 { + if iNext == 0 { + iNext = 3 + } + goto __2 + } + + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0 { + // If the TERM_LIKECOND flag is set, that means that the range search + // is sufficient to guarantee that the LIKE operator is true, so we + // can skip the call to the like(A,B) function. But this only works + // for strings. So do not skip the call to the function on the pass + // that compares BLOBs. + goto __2 + } + Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) + if skipLikeAddr != 0 { + Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) + } + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) + + } + goto __2 + __2: + j-- + pTerm += 56 + goto __1 + goto __3 + __3: + ; + iLoop = iNext + } + + // Insert code to test for implied constraints based on transitivity + // of the "==" operator. + // + // Example: If the WHERE clause contains "t1.a=t2.b" and "t2.b=123" + // and we are coding the t1 loop and the t2 loop has not yet coded, + // then we cannot use the "t1.a=t2.b" constraint, but we can code + // the implied "t1.a=123" constraint. + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase +__4: + if !(j > 0) { + goto __6 + } + { + var pE uintptr + // var sEAlt Expr at bp+24, 72 + + var pAlt uintptr + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0 { + goto __5 + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0 { + goto __5 + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0 { + goto __5 + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur { + goto __5 + } + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + goto __5 + } + pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + + pAlt = Xsqlite3WhereFindTerm(tls, pWC, iCur, *(*int32)(unsafe.Pointer(pTerm + 32)), notReady, + uint32(WO_EQ|WO_IN|WO_IS), uintptr(0)) + if pAlt == uintptr(0) { + goto __5 + } + if int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0 { + goto __5 + } + if int32((*WhereTerm)(unsafe.Pointer(pAlt)).FeOperator)&WO_IN != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)).Fflags&U32(EP_xIsSelect) != U32(0) && + (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr + 32)))).FpEList)).FnExpr > 1 { + goto __5 + } + + *(*Expr)(unsafe.Pointer(bp + 24 /* sEAlt */)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) + (*Expr)(unsafe.Pointer(bp + 24 /* &sEAlt */)).FpLeft = (*Expr)(unsafe.Pointer(pE)).FpLeft + Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) + *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) + + } + goto __5 +__5: + j-- + pTerm += 56 + goto __4 + goto __6 +__6: + ; + + // For a LEFT OUTER JOIN, generate code that will record the fact that + // at least one row of the right table has matched the left table. + if (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0 { + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) + + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + j = 0 + __7: + if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { + goto __9 + } + { + + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0 { + goto __8 + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0) { + + goto __8 + } + + Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) + + } + goto __8 + __8: + j++ + pTerm += 56 + goto __7 + goto __9 + __9: + } + + return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady +} + +var aStartOp = [8]U8{ + U8(0), + U8(0), + U8(OP_Rewind), // 2: (!start_constraints && startEq && !bRev) + U8(OP_Last), // 3: (!start_constraints && startEq && bRev) + U8(OP_SeekGT), // 4: (start_constraints && !startEq && !bRev) + U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) + U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) + U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) +} /* sqlite3.c:149238:21 */ +var aEndOp = [4]U8{ + U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) + U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) + U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) + U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ + +// Deallocate all memory associated with a WhereOrInfo object. +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ + Xsqlite3WhereClauseClear(tls, p) + Xsqlite3DbFree(tls, db, p) +} + +// Deallocate all memory associated with a WhereAndInfo object. +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ + Xsqlite3WhereClauseClear(tls, p) + Xsqlite3DbFree(tls, db, p) +} + +// Add a single new WhereTerm entry to the WhereClause object pWC. +// The new WhereTerm object is constructed from Expr p and with wtFlags. +// The index in pWC->a[] of the new WhereTerm is returned on success. +// 0 is returned if the new WhereTerm could not be added due to a memory +// allocation error. The memory allocation failure will be recorded in +// the db->mallocFailed flag so that higher-level functions can detect it. +// +// This routine will increase the size of the pWC->a[] array as necessary. +// +// If the wtFlags argument includes TERM_DYNAMIC, then responsibility +// for freeing the expression p is assumed by the WhereClause object pWC. +// This is true even if this routine fails to allocate a new WhereTerm. +// +// WARNING: This routine might reallocate the space used to store +// WhereTerms. All pointers to WhereTerms should be invalidated after +// calling this routine. Such pointers may be reinitialized by referencing +// the pWC->a[] array. +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ + var pTerm uintptr + var idx int32 + + if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm >= (*WhereClause)(unsafe.Pointer(pWC)).FnSlot { + var pOld uintptr = (*WhereClause)(unsafe.Pointer(pWC)).Fa + var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb + (*WhereClause)(unsafe.Pointer(pWC)).Fa = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(WhereTerm{}))*uint64((*WhereClause)(unsafe.Pointer(pWC)).FnSlot)*uint64(2))) + if (*WhereClause)(unsafe.Pointer(pWC)).Fa == uintptr(0) { + if int32(wtFlags)&TERM_DYNAMIC != 0 { + Xsqlite3ExprDelete(tls, db, p) + } + (*WhereClause)(unsafe.Pointer(pWC)).Fa = pOld + return 0 + } + libc.Xmemcpy(tls, (*WhereClause)(unsafe.Pointer(pWC)).Fa, pOld, uint64(unsafe.Sizeof(WhereTerm{}))*uint64((*WhereClause)(unsafe.Pointer(pWC)).FnTerm)) + if pOld != pWC+40 { + Xsqlite3DbFree(tls, db, pOld) + } + (*WhereClause)(unsafe.Pointer(pWC)).FnSlot = int32(uint64(Xsqlite3DbMallocSize(tls, db, (*WhereClause)(unsafe.Pointer(pWC)).Fa)) / uint64(unsafe.Sizeof(WhereTerm{}))) + } + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(libc.AssignInt32(&idx, libc.PostIncInt32(&(*WhereClause)(unsafe.Pointer(pWC)).FnTerm, 1)))*56 + if int32(wtFlags)&TERM_VIRTUAL == 0 { + (*WhereClause)(unsafe.Pointer(pWC)).FnBase = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm + } + if p != 0 && (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Unlikely) != U32(0) { + (*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb = LogEst(int32(Xsqlite3LogEst(tls, uint64((*Expr)(unsafe.Pointer(p)).FiTable))) - 270) + } else { + (*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb = int16(1) + } + (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr = Xsqlite3ExprSkipCollateAndLikely(tls, p) + (*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags = wtFlags + (*WhereTerm)(unsafe.Pointer(pTerm)).FpWC = pWC + (*WhereTerm)(unsafe.Pointer(pTerm)).FiParent = -1 + libc.Xmemset(tls, pTerm+20, 0, + uint64(unsafe.Sizeof(WhereTerm{}))-uint64(uintptr(0)+20)) + return idx +} + +// Return TRUE if the given operator is one of the operators that is +// allowed for an indexable WHERE clause term. The allowed operators are +// "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ + + return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) +} + +// Commute a comparison operator. Expressions of the form "X op Y" +// are converted into "Y op X". +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ + if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || + int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || + Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { + *(*U32)(unsafe.Pointer(pExpr + 4)) ^= U32(EP_Commuted) + } + { + var t uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpRight + (*Expr)(unsafe.Pointer(pExpr)).FpRight = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + (*Expr)(unsafe.Pointer(pExpr)).FpLeft = t + } + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) >= TK_GT { + + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) - TK_GT ^ 2 + TK_GT) + } + return U16(0) +} + +// Translate from TK_xx operator to WO_xx bitmask. +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ + var c U16 + + if op == TK_IN { + c = U16(WO_IN) + } else if op == TK_ISNULL { + c = U16(WO_ISNULL) + } else if op == TK_IS { + c = U16(WO_IS) + } else { + + c = U16(int32(WO_EQ) << (op - TK_EQ)) + } + + return c +} + +// Check to see if the given expression is a LIKE or GLOB operator that +// can be optimized using inequality constraints. Return TRUE if it is +// so and false if not. +// +// In order for the operator to be optimizible, the RHS must be a string +// literal that does not begin with a wildcard. The LHS must be a column +// that may only be NULL, a string, or a BLOB, never a number. (This means +// that virtual tables cannot participate in the LIKE optimization.) The +// collating sequence for the column on the LHS must be appropriate for +// the operator. +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var z uintptr = uintptr(0) // String on RHS of LIKE operator + var pRight uintptr + var pLeft uintptr // Right and left size of LIKE operator + var pList uintptr // List of operands to the LIKE operator + var c U8 // One character in z[] + var cnt int32 // Number of non-wildcard prefix characters + // var wc [4]U8 at bp, 4 + // Wildcard characters + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection + var pVal uintptr = uintptr(0) + var op int32 // Opcode of pRight + var rc int32 // Result code to return + + if !(Xsqlite3IsLikeFunction(tls, db, pExpr, pnoCase, bp) != 0) { + return 0 + } + + pList = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + pLeft = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*32)).FpExpr + + pRight = Xsqlite3ExprSkipCollate(tls, (*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr) + op = int32((*Expr)(unsafe.Pointer(pRight)).Fop) + if op == TK_VARIABLE && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableQPSG) == uint64(0) { + var pReprepare uintptr = (*Parse)(unsafe.Pointer(pParse)).FpReprepare + var iCol int32 = int32((*Expr)(unsafe.Pointer(pRight)).FiColumn) + pVal = Xsqlite3VdbeGetBoundValue(tls, pReprepare, iCol, uint8(SQLITE_AFF_BLOB)) + if pVal != 0 && Xsqlite3_value_type(tls, pVal) == SQLITE_TEXT { + z = Xsqlite3_value_text(tls, pVal) + } + Xsqlite3VdbeSetVarmask(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iCol) + + } else if op == TK_STRING { + + z = *(*uintptr)(unsafe.Pointer(pRight + 8)) + } + if z != 0 { + + // Count the number of prefix characters prior to the first wildcard + cnt = 0 + for int32(libc.AssignUint8(&c, *(*U8)(unsafe.Pointer(z + uintptr(cnt))))) != 0 && int32(c) != int32(*(*U8)(unsafe.Pointer(bp))) && int32(c) != int32(*(*U8)(unsafe.Pointer(bp + 1))) && int32(c) != int32(*(*U8)(unsafe.Pointer(bp + 2))) { + cnt++ + if int32(c) == int32(*(*U8)(unsafe.Pointer(bp + 3))) && int32(*(*U8)(unsafe.Pointer(z + uintptr(cnt)))) != 0 { + cnt++ + } + } + + // The optimization is possible only if (1) the pattern does not begin + // with a wildcard and if (2) the non-wildcard prefix does not end with + // an (illegal 0xff) character, or (3) the pattern does not consist of + // a single escape character. The second condition is necessary so + // that we can increment the prefix key to find an upper bound for the + // range search. The third is because the caller assumes that the pattern + // consists of at least one character after all escapes have been + // removed. + if cnt != 0 && 255 != int32(*(*U8)(unsafe.Pointer(z + uintptr(cnt-1)))) && (cnt > 1 || int32(*(*U8)(unsafe.Pointer(z))) != int32(*(*U8)(unsafe.Pointer(bp + 3)))) { + var pPrefix uintptr + + // A "complete" match if the pattern ends with "*" or "%" + *(*int32)(unsafe.Pointer(pisComplete)) = libc.Bool32(int32(c) == int32(*(*U8)(unsafe.Pointer(bp))) && int32(*(*U8)(unsafe.Pointer(z + uintptr(cnt+1)))) == 0) + + // Get the pattern prefix. Remove all escapes from the prefix. + pPrefix = Xsqlite3Expr(tls, db, TK_STRING, z) + if pPrefix != 0 { + var iFrom int32 + var iTo int32 + var zNew uintptr + + zNew = *(*uintptr)(unsafe.Pointer(pPrefix + 8)) + *(*uint8)(unsafe.Pointer(zNew + uintptr(cnt))) = uint8(0) + for iFrom = libc.AssignInt32(&iTo, 0); iFrom < cnt; iFrom++ { + if int32(*(*uint8)(unsafe.Pointer(zNew + uintptr(iFrom)))) == int32(*(*U8)(unsafe.Pointer(bp + 3))) { + iFrom++ + } + *(*uint8)(unsafe.Pointer(zNew + uintptr(libc.PostIncInt32(&iTo, 1)))) = *(*uint8)(unsafe.Pointer(zNew + uintptr(iFrom))) + } + *(*uint8)(unsafe.Pointer(zNew + uintptr(iTo))) = uint8(0) + + // If the LHS is not an ordinary column with TEXT affinity, then the + // pattern prefix boundaries (both the start and end boundaries) must + // not look like a number. Otherwise the pattern might be treated as + // a number, which will invalidate the LIKE optimization. + // + // Getting this right has been a persistent source of bugs in the + // LIKE optimization. See, for example: + // 2018-09-10 https://sqlite.org/src/info/c94369cae9b561b1 + // 2019-05-02 https://sqlite.org/src/info/b043a54c3de54b28 + // 2019-06-10 https://sqlite.org/src/info/fd76310a5e843e07 + // 2019-06-14 https://sqlite.org/src/info/ce8717f0885af975 + // 2019-09-03 https://sqlite.org/src/info/0f0428096f17252a + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) != TK_COLUMN || + int32(Xsqlite3ExprAffinity(tls, pLeft)) != SQLITE_AFF_TEXT || + (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && + *(*uintptr)(unsafe.Pointer(pLeft + 64)) != 0 && + int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 64)))).FeTabType) == TABTYP_VTAB { + var isNum int32 + // var rDummy float64 at bp+8, 8 + + isNum = Xsqlite3AtoF(tls, zNew, bp+8, iTo, uint8(SQLITE_UTF8)) + if isNum <= 0 { + if iTo == 1 && int32(*(*uint8)(unsafe.Pointer(zNew))) == '-' { + isNum = +1 + } else { + *(*uint8)(unsafe.Pointer(zNew + uintptr(iTo-1)))++ + isNum = Xsqlite3AtoF(tls, zNew, bp+8, iTo, uint8(SQLITE_UTF8)) + *(*uint8)(unsafe.Pointer(zNew + uintptr(iTo-1)))-- + } + } + if isNum > 0 { + Xsqlite3ExprDelete(tls, db, pPrefix) + Xsqlite3ValueFree(tls, pVal) + return 0 + } + } + } + *(*uintptr)(unsafe.Pointer(ppPrefix)) = pPrefix + + // If the RHS pattern is a bound parameter, make arrangements to + // reprepare the statement when that parameter is rebound + if op == TK_VARIABLE { + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + Xsqlite3VdbeSetVarmask(tls, v, int32((*Expr)(unsafe.Pointer(pRight)).FiColumn)) + + if *(*int32)(unsafe.Pointer(pisComplete)) != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 8)) + 1)) != 0 { + // If the rhs of the LIKE expression is a variable, and the current + // value of the variable means there is no need to invoke the LIKE + // function, then no OP_Variable will be added to the program. + // This causes problems for the sqlite3_bind_parameter_name() + // API. To work around them, add a dummy OP_Variable here. + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3ExprCodeTarget(tls, pParse, pRight, r1) + Xsqlite3VdbeChangeP3(tls, v, Xsqlite3VdbeCurrentAddr(tls, v)-1, 0) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + } + } + } else { + z = uintptr(0) + } + } + + rc = libc.Bool32(z != uintptr(0)) + Xsqlite3ValueFree(tls, pVal) + return rc +} + +// Check to see if the pExpr expression is a form that needs to be passed +// to the xBestIndex method of virtual tables. Forms of interest include: +// +// Expression Virtual Table Operator +// ----------------------- --------------------------------- +// 1. column MATCH expr SQLITE_INDEX_CONSTRAINT_MATCH +// 2. column GLOB expr SQLITE_INDEX_CONSTRAINT_GLOB +// 3. column LIKE expr SQLITE_INDEX_CONSTRAINT_LIKE +// 4. column REGEXP expr SQLITE_INDEX_CONSTRAINT_REGEXP +// 5. column != expr SQLITE_INDEX_CONSTRAINT_NE +// 6. expr != column SQLITE_INDEX_CONSTRAINT_NE +// 7. column IS NOT expr SQLITE_INDEX_CONSTRAINT_ISNOT +// 8. expr IS NOT column SQLITE_INDEX_CONSTRAINT_ISNOT +// 9. column IS NOT NULL SQLITE_INDEX_CONSTRAINT_ISNOTNULL +// +// In every case, "column" must be a column of a virtual table. If there +// is a match, set *ppLeft to the "column" expression, set *ppRight to the +// "expr" expression (even though in forms (6) and (8) the column is on the +// right and the expression is on the left). Also set *peOp2 to the +// appropriate virtual table operator. The return value is 1 or 2 if there +// is a match. The usual return is 1, but if the RHS is also a column +// of virtual table in forms (5) or (7) then return 2. +// +// If the expression matches none of the patterns above, return 0. +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION { + var pList uintptr + var pCol uintptr // Column reference + var i int32 + + pList = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + if pList == uintptr(0) || (*ExprList)(unsafe.Pointer(pList)).FnExpr != 2 { + return 0 + } + + // Built-in operators MATCH, GLOB, LIKE, and REGEXP attach to a + // virtual table on their second argument, which is the same as + // the left-hand side operand in their in-fix form. + // + // vtab_column MATCH expression + // MATCH(expression,vtab_column) + pCol = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*32)).FpExpr + + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { + for i = 0; i < int32(uint64(unsafe.Sizeof(aOp))/uint64(unsafe.Sizeof(Op2{}))); i++ { + + if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), aOp[i].FzOp) == 0 { + *(*uint8)(unsafe.Pointer(peOp2)) = aOp[i].FeOp2 + *(*uintptr)(unsafe.Pointer(ppRight)) = (*ExprList_item)(unsafe.Pointer(pList + 8)).FpExpr + *(*uintptr)(unsafe.Pointer(ppLeft)) = pCol + return 1 + } + } + } + + // We can also match against the first column of overloaded + // functions where xFindFunction returns a value of at least + // SQLITE_INDEX_CONSTRAINT_FUNCTION. + // + // OVERLOADED(vtab_column,expression) + // + // Historically, xFindFunction expected to see lower-case function + // names. But for this use case, xFindFunction is expected to deal + // with function names in an arbitrary case. + pCol = (*ExprList_item)(unsafe.Pointer(pList + 8)).FpExpr + + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { + var pVtab uintptr + var pMod uintptr + // var xNotUsed uintptr at bp, 8 + + // var pNotUsed uintptr at bp+8, 8 + + pVtab = (*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, db, *(*uintptr)(unsafe.Pointer(pCol + 64))))).FpVtab + + pMod = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule + if (*Sqlite3_module)(unsafe.Pointer(pMod)).FxFindFunction != uintptr(0) { + i = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pMod)).FxFindFunction})).f(tls, pVtab, 2, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)), bp /* &xNotUsed */, bp+8 /* &pNotUsed */) + if i >= SQLITE_INDEX_CONSTRAINT_FUNCTION { + *(*uint8)(unsafe.Pointer(peOp2)) = uint8(i) + *(*uintptr)(unsafe.Pointer(ppRight)) = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*32)).FpExpr + *(*uintptr)(unsafe.Pointer(ppLeft)) = pCol + return 1 + } + } + } + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NE || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_ISNOT || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL { + var res int32 = 0 + var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + var pRight uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpRight + + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pLeft + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 64)))).FeTabType) == TABTYP_VTAB { + res++ + } + + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pRight + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { + res++ + { + var t uintptr = pLeft + pLeft = pRight + pRight = t + } + + } + *(*uintptr)(unsafe.Pointer(ppLeft)) = pLeft + *(*uintptr)(unsafe.Pointer(ppRight)) = pRight + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NE { + *(*uint8)(unsafe.Pointer(peOp2)) = uint8(SQLITE_INDEX_CONSTRAINT_NE) + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_ISNOT { + *(*uint8)(unsafe.Pointer(peOp2)) = uint8(SQLITE_INDEX_CONSTRAINT_ISNOT) + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL { + *(*uint8)(unsafe.Pointer(peOp2)) = uint8(SQLITE_INDEX_CONSTRAINT_ISNOTNULL) + } + return res + } + return 0 +} + +type Op2 = struct { + FzOp uintptr + FeOp2 uint8 + F__ccgo_pad1 [7]byte +} /* sqlite3.c:150510:18 */ + +var aOp = [4]Op2{ + {FzOp: ts + 16014, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15336, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14862, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21637, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ + +// If the pBase expression originated in the ON or USING clause of +// a join, then transfer the appropriate markings over to derived. +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ + if pDerived != 0 { + *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) + *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) + } +} + +// Mark term iChild as being a child of term iParent +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ + (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent + (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb + (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ +} + +// Return the N-th AND-connected subterm of pTerm. Or if pTerm is not +// a conjunction, then return just pTerm when N==0. If N is exceeds +// the number of available subterms, return NULL. +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { + if N == 0 { + return pTerm + } + return uintptr(0) + } + if N < (*WhereAndInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTerm + 32)))).Fwc.FnTerm { + return (*WhereAndInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTerm + 32)))).Fwc.Fa + uintptr(N)*56 + } + return uintptr(0) +} + +// Subterms pOne and pTwo are contained within WHERE clause pWC. The +// two subterms are in disjunction - they are OR-ed together. +// +// If these two terms are both of the form: "A op B" with the same +// A and B values but different operators and if the operators are +// compatible (if one is = and the other is <, for example) then +// add a new virtual AND term to pWC that is the combination of the +// two. +// +// Some examples: +// +// x x<=y +// x=y OR x=y --> x=y +// x<=y OR x x<=y +// +// The following is NOT generated: +// +// xy --> x!=y +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ + var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) + var db uintptr // Database connection (for malloc) + var pNew uintptr // New virtual expression + var op int32 // Operator for the combined expression + var idxNew int32 // Index in pWC of the next virtual term + + if (int32((*WhereTerm)(unsafe.Pointer(pOne)).FwtFlags)|int32((*WhereTerm)(unsafe.Pointer(pTwo)).FwtFlags))&TERM_VNULL != 0 { + return + } + if int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator)&(WO_EQ|int32(WO_EQ)<<(TK_LT-TK_EQ)|int32(WO_EQ)<<(TK_LE-TK_EQ)|int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) == 0 { + return + } + if int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)&(WO_EQ|int32(WO_EQ)<<(TK_LT-TK_EQ)|int32(WO_EQ)<<(TK_LE-TK_EQ)|int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) == 0 { + return + } + if int32(eOp)&(WO_EQ|int32(WO_EQ)<<(TK_LT-TK_EQ)|int32(WO_EQ)<<(TK_LE-TK_EQ)) != int32(eOp) && + int32(eOp)&(WO_EQ|int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != int32(eOp) { + return + } + + if Xsqlite3ExprCompare(tls, uintptr(0), (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOne)).FpExpr)).FpLeft, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTwo)).FpExpr)).FpLeft, -1) != 0 { + return + } + if Xsqlite3ExprCompare(tls, uintptr(0), (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOne)).FpExpr)).FpRight, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTwo)).FpExpr)).FpRight, -1) != 0 { + return + } + // If we reach this point, it means the two subterms can be combined + if int32(eOp)&(int32(eOp)-1) != 0 { + if int32(eOp)&(int32(WO_EQ)<<(TK_LT-TK_EQ)|int32(WO_EQ)<<(TK_LE-TK_EQ)) != 0 { + eOp = U16(int32(WO_EQ) << (TK_LE - TK_EQ)) + } else { + + eOp = U16(int32(WO_EQ) << (TK_GE - TK_EQ)) + } + } + db = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb + pNew = Xsqlite3ExprDup(tls, db, (*WhereTerm)(unsafe.Pointer(pOne)).FpExpr, 0) + if pNew == uintptr(0) { + return + } + for op = TK_EQ; int32(eOp) != int32(WO_EQ)<<(op-TK_EQ); op++ { + } + (*Expr)(unsafe.Pointer(pNew)).Fop = U8(op) + idxNew = whereClauseInsert(tls, pWC, pNew, uint16(TERM_VIRTUAL|TERM_DYNAMIC)) + exprAnalyze(tls, pSrc, pWC, idxNew) +} + +// Analyze a term that consists of two or more OR-connected +// subterms. So in: +// +// ... WHERE (a=5) AND (b=7 OR c=9 OR d=13) AND (d=13) +// ^^^^^^^^^^^^^^^^^^^^ +// +// This routine analyzes terms such as the middle term in the above example. +// A WhereOrTerm object is computed and attached to the term under +// analysis, regardless of the outcome of the analysis. Hence: +// +// WhereTerm.wtFlags |= TERM_ORINFO +// WhereTerm.u.pOrInfo = a dynamically allocated WhereOrTerm object +// +// The term being analyzed must have two or more of OR-connected subterms. +// A single subterm might be a set of AND-connected sub-subterms. +// Examples of terms under analysis: +// +// (A) t1.x=t2.y OR t1.x=t2.z OR t1.y=15 OR t1.z=t3.a+5 +// (B) x=expr1 OR expr2=x OR x=expr3 +// (C) t1.x=t2.y OR (t1.x=t2.z AND t1.y=15) +// (D) x=expr1 OR (y>11 AND y<22 AND z LIKE '*hello*') +// (E) (p.a=1 AND q.b=2 AND r.c=3) OR (p.x=4 AND q.y=5 AND r.z=6) +// (F) x>A OR (x=A AND y>=B) +// +// CASE 1: +// +// If all subterms are of the form T.C=expr for some single column of C and +// a single table T (as shown in example B above) then create a new virtual +// term that is an equivalent IN expression. In other words, if the term +// being analyzed is: +// +// x = expr1 OR expr2 = x OR x = expr3 +// +// then create a new virtual term like this: +// +// x IN (expr1,expr2,expr3) +// +// CASE 2: +// +// If there are exactly two disjuncts and one side has x>A and the other side +// has x=A (for the same x and A) then add a new virtual conjunct term to the +// WHERE clause of the form "x>=A". Example: +// +// x>A OR (x=A AND y>B) adds: x>=A +// +// The added conjunct can sometimes be helpful in query planning. +// +// CASE 3: +// +// If all subterms are indexable by a single table T, then set +// +// WhereTerm.eOperator = WO_OR +// WhereTerm.u.pOrInfo->indexable |= the cursor number for table T +// +// A subterm is "indexable" if it is of the form +// "T.C " where C is any column of table T and +// is one of "=", "<", "<=", ">", ">=", "IS NULL", or "IN". +// A subterm is also indexable if it is an AND of two or more +// subsubterms at least one of which is indexable. Indexable AND +// subterms have their eOperator set to WO_AND and they have +// u.pAndInfo set to a dynamically allocated WhereAndTerm object. +// +// From another point of view, "indexable" means that the subterm could +// potentially be used with an index if an appropriate index exists. +// This analysis does not consider whether or not the index exists; that +// is decided elsewhere. This analysis only looks at whether subterms +// appropriate for indexing exist. +// +// All examples A through E above satisfy case 3. But if a term +// also satisfies case 1 (such as B) we know that the optimizer will +// always prefer case 1, so in that case we pretend that case 3 is not +// satisfied. +// +// It might be the case that multiple tables are indexable. For example, +// (E) above is indexable on tables P, Q, and R. +// +// Terms that satisfy case 3 are candidates for lookup by using +// separate indices to find rowids for each subterm and composing +// the union of all rowids using a RowSet object. This is similar +// to "bitmap indices" in other database engines. +// +// OTHERWISE: +// +// If none of cases 1, 2, or 3 apply, then leave the eOperator set to +// zero. This term is not useful for search. +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ + var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection + var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 // The term to be analyzed + var pExpr uintptr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr // The expression of the term + var i int32 // Loop counters + var pOrWc uintptr // Breakup of pTerm into subterms + var pOrTerm uintptr // A Sub-term within the pOrWc + var pOrInfo uintptr // Additional information associated with pTerm + var chngToIN Bitmask // Tables that might satisfy case 1 + var indexable Bitmask // Tables that are indexable, satisfying case 2 + + // Break the OR clause into its separate subterms. The subterms are + // stored in a WhereClause structure containing within the WhereOrInfo + // object that is attached to the original OR clause term. + + *(*uintptr)(unsafe.Pointer(pTerm + 32)) = libc.AssignUintptr(&pOrInfo, Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(WhereOrInfo{})))) + if pOrInfo == uintptr(0) { + return + } + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_ORINFO) + pOrWc = pOrInfo + libc.Xmemset(tls, pOrWc+40, 0, uint64(unsafe.Sizeof([8]WhereTerm{}))) + Xsqlite3WhereClauseInit(tls, pOrWc, pWInfo) + Xsqlite3WhereSplit(tls, pOrWc, pExpr, uint8(TK_OR)) + Xsqlite3WhereExprAnalyze(tls, pSrc, pOrWc) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return + } + + // Compute the set of tables that might satisfy cases 1 or 3. + indexable = libc.CplUint64(uint64(0)) + chngToIN = libc.CplUint64(uint64(0)) + i = (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm - 1 + pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa +__1: + if !(i >= 0 && indexable != 0) { + goto __3 + } + { + if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_SINGLE == 0 { + var pAndInfo uintptr + + chngToIN = uint64(0) + pAndInfo = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(WhereAndInfo{}))) + if pAndInfo != 0 { + var pAndWC uintptr + var pAndTerm uintptr + var j int32 + var b Bitmask = uint64(0) + *(*uintptr)(unsafe.Pointer(pOrTerm + 32)) = pAndInfo + *(*U16)(unsafe.Pointer(pOrTerm + 18)) |= U16(TERM_ANDINFO) + (*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator = U16(WO_AND) + (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor = -1 + pAndWC = pAndInfo + libc.Xmemset(tls, pAndWC+40, 0, uint64(unsafe.Sizeof([8]WhereTerm{}))) + Xsqlite3WhereClauseInit(tls, pAndWC, (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo) + Xsqlite3WhereSplit(tls, pAndWC, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr, uint8(TK_AND)) + Xsqlite3WhereExprAnalyze(tls, pSrc, pAndWC) + (*WhereClause)(unsafe.Pointer(pAndWC)).FpOuter = pWC + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + j = 0 + pAndTerm = (*WhereClause)(unsafe.Pointer(pAndWC)).Fa + __4: + if !(j < (*WhereClause)(unsafe.Pointer(pAndWC)).FnTerm) { + goto __6 + } + { + + if allowedOp(tls, int32((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAndTerm)).FpExpr)).Fop)) != 0 || + int32((*WhereTerm)(unsafe.Pointer(pAndTerm)).FeOperator) == WO_AUX { + b = b | Xsqlite3WhereGetMask(tls, pWInfo+600, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + } + + } + goto __5 + __5: + j++ + pAndTerm += 56 + goto __4 + goto __6 + __6: + } + indexable = indexable & b + } + } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { + // Skip this term for now. We revisit it when we process the + // corresponding TERM_VIRTUAL term + } else { + var b Bitmask + b = Xsqlite3WhereGetMask(tls, pWInfo+600, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_VIRTUAL != 0 { + var pOther uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr((*WhereTerm)(unsafe.Pointer(pOrTerm)).FiParent)*56 + b = b | Xsqlite3WhereGetMask(tls, pWInfo+600, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + } + indexable = indexable & b + if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { + chngToIN = uint64(0) + } else { + chngToIN = chngToIN & b + } + } + + } + goto __2 +__2: + i-- + pOrTerm += 56 + goto __1 + goto __3 +__3: + ; + + // Record the set of tables that satisfy case 3. The set might be + // empty. + (*WhereOrInfo)(unsafe.Pointer(pOrInfo)).Findexable = indexable + (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(WO_OR) + (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor = -1 + if indexable != 0 { + (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(1) + } + + // For a two-way OR, attempt to implementation case 2. + if indexable != 0 && (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm == 2 { + var iOne int32 = 0 + var pOne uintptr + for libc.AssignUintptr(&pOne, whereNthSubterm(tls, (*WhereClause)(unsafe.Pointer(pOrWc)).Fa, libc.PostIncInt32(&iOne, 1))) != uintptr(0) { + var iTwo int32 = 0 + var pTwo uintptr + for libc.AssignUintptr(&pTwo, whereNthSubterm(tls, (*WhereClause)(unsafe.Pointer(pOrWc)).Fa+1*56, libc.PostIncInt32(&iTwo, 1))) != uintptr(0) { + whereCombineDisjuncts(tls, pSrc, pWC, pOne, pTwo) + } + } + } + + // chngToIN holds a set of tables that *might* satisfy case 1. But + // we have to do some additional checking to see if case 1 really + // is satisfied. + // + // chngToIN will hold either 0, 1, or 2 bits. The 0-bit case means + // that there is no possibility of transforming the OR clause into an + // IN operator because one or more terms in the OR clause contain + // something other than == on a column in the single table. The 1-bit + // case means that every term of the OR clause is of the form + // "table.column=expr" for some single table. The one bit that is set + // will correspond to the common table. We still need to check to make + // sure the same column is used on all terms. The 2-bit case is when + // the all terms are of the form "table1.column=table2.column". It + // might be possible to form an IN operator with either table1.column + // or table2.column as the LHS if either is common to every term of + // the OR clause. + // + // Note that terms of the form "table.column1=table.column2" (the + // same table on both sizes of the ==) cannot be optimized. + if chngToIN != 0 { + var okToChngToIN int32 = 0 // True if the conversion to IN is valid + var iColumn int32 = -1 // Column index on lhs of IN operator + var iCursor int32 = -1 // Table cursor common to all terms + var j int32 = 0 // Loop counter + + // Search for a table and column that appears on one side or the + // other of the == operator in every subterm. That table and column + // will be recorded in iCursor and iColumn. There might not be any + // such table and column. Set okToChngToIN if an appropriate table + // and column is found but leave okToChngToIN false if not found. + for j = 0; j < 2 && !(okToChngToIN != 0); j++ { + var pLeft uintptr = uintptr(0) + pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + i = (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm - 1 + __7: + if !(i >= 0) { + goto __9 + } + { + + *(*U16)(unsafe.Pointer(pOrTerm + 18)) &= libc.Uint16FromInt32(libc.CplInt32(TERM_OK)) + if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { + // This is the 2-bit case and we are on the second iteration and + // current term is from the first iteration. So skip this term. + + goto __8 + } + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+600, + (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { + // This term must be of the form t1.a==t2.b where t2 is in the + // chngToIN set but t1 is not. This term will be either preceded + // or follwed by an inverted copy (t2.b==t1.a). Skip this term + // and use its inversion. + + goto __8 + } + + iColumn = *(*int32)(unsafe.Pointer(pOrTerm + 32)) + iCursor = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor + pLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr)).FpLeft + goto __9 + + } + goto __8 + __8: + i-- + pOrTerm += 56 + goto __7 + goto __9 + __9: + ; + if i < 0 { + // No candidate table+column was found. This can only occur + // on the second iteration + + break + } + + // We have found a candidate table and column. Check to see if that + // table and column is common to every term in the OR clause + okToChngToIN = 1 + __10: + if !(i >= 0 && okToChngToIN != 0) { + goto __12 + } + { + + if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor != iCursor { + *(*U16)(unsafe.Pointer(pOrTerm + 18)) &= libc.Uint16FromInt32(libc.CplInt32(TERM_OK)) + } else if *(*int32)(unsafe.Pointer(pOrTerm + 32)) != iColumn || iColumn == -2 && + Xsqlite3ExprCompare(tls, pParse, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr)).FpLeft, pLeft, -1) != 0 { + okToChngToIN = 0 + } else { + var affLeft int32 + var affRight int32 + // If the right-hand side is also a column, then the affinities + // of both right and left sides must be such that no type + // conversions are required on the right. (Ticket #2249) + affRight = int32(Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr)).FpRight)) + affLeft = int32(Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr)).FpLeft)) + if affRight != 0 && affRight != affLeft { + okToChngToIN = 0 + } else { + *(*U16)(unsafe.Pointer(pOrTerm + 18)) |= U16(TERM_OK) + } + } + + } + goto __11 + __11: + i-- + pOrTerm += 56 + goto __10 + goto __12 + __12: + } + + // At this point, okToChngToIN is true if original pTerm satisfies + // case 1. In that case, construct a new virtual term that is + // pTerm converted into an IN operator. + if okToChngToIN != 0 { + var pDup uintptr // A transient duplicate expression + var pList uintptr = uintptr(0) // The RHS of the IN operator + var pLeft uintptr = uintptr(0) // The LHS of the IN operator + var pNew uintptr // The complete IN operator + + i = (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm - 1 + pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + __13: + if !(i >= 0) { + goto __15 + } + { + if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_OK == 0 { + goto __14 + } + + pDup = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr)).FpRight, 0) + pList = Xsqlite3ExprListAppend(tls, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse, pList, pDup) + pLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr)).FpLeft + + } + goto __14 + __14: + i-- + pOrTerm += 56 + goto __13 + goto __15 + __15: + ; + + pDup = Xsqlite3ExprDup(tls, db, pLeft, 0) + pNew = Xsqlite3PExpr(tls, pParse, TK_IN, pDup, uintptr(0)) + if pNew != 0 { + var idxNew int32 + transferJoinMarkings(tls, pNew, pExpr) + + *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList + idxNew = whereClauseInsert(tls, pWC, pNew, uint16(TERM_VIRTUAL|TERM_DYNAMIC)) + + exprAnalyze(tls, pSrc, pWC, idxNew) + // pTerm = &pWC->a[idxTerm]; // would be needed if pTerm where reused + markTermAsChild(tls, pWC, idxNew, idxTerm) + } else { + Xsqlite3ExprListDelete(tls, db, pList) + } + } + } +} + +// We already know that pExpr is a binary operator where both operands are +// column references. This routine checks to see if pExpr is an equivalence +// relation: +// 1. The SQLITE_Transitive optimization must be enabled +// 2. Must be either an == or an IS operator +// 3. Not originating in the ON clause of an OUTER JOIN +// 4. The affinities of A and B must be compatible +// 5a. Both operands use the same collating sequence OR +// 5b. The overall collating sequence is BINARY +// If this routine returns TRUE, that means that the RHS can be substituted +// for the LHS anyplace else in the WHERE clause where the LHS column occurs. +// This is an optimization. No harm comes from returning 0. But if 1 is +// returned when it should not be, then incorrect answers might result. +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ + var aff1 uint8 + var aff2 uint8 + var pColl uintptr + if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_Transitive) == U32(0)) { + return 0 + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_EQ && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IS { + return 0 + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { + return 0 + } + aff1 = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + aff2 = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + if int32(aff1) != int32(aff2) && + (!(int32(aff1) >= SQLITE_AFF_NUMERIC) || !(int32(aff2) >= SQLITE_AFF_NUMERIC)) { + return 0 + } + pColl = Xsqlite3ExprCompareCollSeq(tls, pParse, pExpr) + if Xsqlite3IsBinary(tls, pColl) != 0 { + return 1 + } + return Xsqlite3ExprCollSeqMatch(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) +} + +// Recursively walk the expressions of a SELECT statement and generate +// a bitmask indicating which tables are used in that expression +// tree. +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ + var mask Bitmask = uint64(0) + for pS != 0 { + var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc + mask = mask | Xsqlite3WhereExprListUsage(tls, pMaskSet, (*Select)(unsafe.Pointer(pS)).FpEList) + mask = mask | Xsqlite3WhereExprListUsage(tls, pMaskSet, (*Select)(unsafe.Pointer(pS)).FpGroupBy) + mask = mask | Xsqlite3WhereExprListUsage(tls, pMaskSet, (*Select)(unsafe.Pointer(pS)).FpOrderBy) + mask = mask | Xsqlite3WhereExprUsage(tls, pMaskSet, (*Select)(unsafe.Pointer(pS)).FpWhere) + mask = mask | Xsqlite3WhereExprUsage(tls, pMaskSet, (*Select)(unsafe.Pointer(pS)).FpHaving) + if pSrc != uintptr(0) { + var i int32 + for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; i++ { + mask = mask | exprSelectUsage(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpSelect) + mask = mask | Xsqlite3WhereExprUsage(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpOn) + if uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112 + 60 + 4))&0x4>>2)) != 0 { + mask = mask | Xsqlite3WhereExprListUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112 + 96))) + } + } + } + pS = (*Select)(unsafe.Pointer(pS)).FpPrior + } + return mask +} + +// Expression pExpr is one operand of a comparison operator that might +// be useful for indexing. This routine checks to see if pExpr appears +// in any index. Return TRUE (1) if pExpr is an indexed term and return +// FALSE (0) if not. If TRUE is returned, also set aiCurCol[0] to the cursor +// number of the table that is indexed and aiCurCol[1] to the column number +// of the column that is indexed, or XN_EXPR (-2) if an expression is being +// indexed. +// +// If pExpr is a TK_COLUMN column reference, then this routine always returns +// true even if that particular column is not indexed, because the column +// might be added to an automatic index later. +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ + var pIdx uintptr + var i int32 + var iCur int32 + i = 0 +__1: + if !(mPrereq > uint64(1)) { + goto __3 + } + { + } + goto __2 +__2: + i++ + mPrereq >>= 1 + goto __1 + goto __3 +__3: + ; + iCur = (*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(i)*112)).FiCursor + for pIdx = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(i)*112)).FpTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + if (*Index)(unsafe.Pointer(pIdx)).FaColExpr == uintptr(0) { + continue + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) != -2 { + continue + } + if Xsqlite3ExprCompareSkip(tls, pExpr, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(i)*32)).FpExpr, iCur) == 0 { + *(*int32)(unsafe.Pointer(aiCurCol)) = iCur + *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 + return 1 + } + } + } + return 0 +} + +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ + // If this expression is a vector to the left or right of a + // inequality constraint (>, <, >= or <=), perform the processing + // on the first element of the vector. + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VECTOR && (op >= TK_GT && op <= TK_GE) { + + pExpr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8)).FpExpr + + } + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + *(*int32)(unsafe.Pointer(aiCurCol)) = (*Expr)(unsafe.Pointer(pExpr)).FiTable + *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + return 1 + } + if mPrereq == uint64(0) { + return 0 + } // No table references + if mPrereq&(mPrereq-uint64(1)) != uint64(0) { + return 0 + } // Refs more than one table + return exprMightBeIndexed2(tls, pFrom, mPrereq, aiCurCol, pExpr) +} + +// The input to this routine is an WhereTerm structure with only the +// "pExpr" field filled in. The job of this routine is to analyze the +// subexpression and populate all the other fields of the WhereTerm +// structure. +// +// If the expression is of the form " X" it gets commuted +// to the standard form of "X ". +// +// If the expression is of the form "X Y" where both X and Y are +// columns, then the original expression is unchanged and a new virtual +// term of the form "Y X" is added to the WHERE clause and +// analyzed separately. The original term is marked with TERM_COPIED +// and the new term is marked with TERM_DYNAMIC (because it's pExpr +// needs to be freed with the WhereClause) and TERM_VIRTUAL (because it +// is a commuted copy of a prior term.) The original term has nChild=1 +// and the copy has idxParent set to the index of the original term. +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context + var pTerm uintptr // The term to be analyzed + var pMaskSet uintptr // Set of table index masks + var pExpr uintptr // The expression to be analyzed + var prereqLeft Bitmask // Prerequesites of the pExpr->pLeft + var prereqAll Bitmask // Prerequesites of pExpr + var extraRight Bitmask = uint64(0) // Extra dependencies on LEFT JOIN + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */)) = uintptr(0) // RHS of LIKE/GLOB operator + *(*int32)(unsafe.Pointer(bp + 16 /* isComplete */)) = 0 // RHS of LIKE/GLOB ends with wildcard + *(*int32)(unsafe.Pointer(bp + 20 /* noCase */)) = 0 // uppercase equivalent to lowercase + var op int32 // Top-level operator. pExpr->op + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parsing context + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection + *(*uint8)(unsafe.Pointer(bp + 24 /* eOp2 */)) = uint8(0) // op2 value for LIKE/REGEXP/GLOB + var nLeft int32 // Number of elements on left side vector + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return + } + + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + pMaskSet = pWInfo + 600 + pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + // Because malloc() has not failed + + (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 + prereqLeft = Xsqlite3WhereExprUsage(tls, pMaskSet, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + if op == TK_IN { + + if Xsqlite3ExprCheckIN(tls, pParse, pExpr) != 0 { + return + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight = exprSelectUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer(pExpr + 32))) + } else { + (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight = Xsqlite3WhereExprListUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer(pExpr + 32))) + } + prereqAll = prereqLeft | (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight + } else { + (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight = Xsqlite3WhereExprUsage(tls, pMaskSet, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + if (*Expr)(unsafe.Pointer(pExpr)).FpLeft == uintptr(0) || + (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect|EP_IfNullRow) != U32(0) || + *(*uintptr)(unsafe.Pointer(pExpr + 32)) != uintptr(0) { + prereqAll = Xsqlite3WhereExprUsageNN(tls, pMaskSet, pExpr) + } else { + prereqAll = prereqLeft | (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight + } + } + if (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect != 0 { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_VARSELECT) + } + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { + var x Bitmask = Xsqlite3WhereGetMask(tls, pMaskSet, *(*int32)(unsafe.Pointer(pExpr + 52))) + prereqAll = prereqAll | x + extraRight = x - uint64(1) // ON clause terms may not be used with an index + // on left table of a LEFT JOIN. Ticket #3015 + if prereqAll>>1 >= x { + Xsqlite3ErrorMsg(tls, pParse, ts+21644, 0) + return + } + } + (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = prereqAll + (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor = -1 + (*WhereTerm)(unsafe.Pointer(pTerm)).FiParent = -1 + (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) + if allowedOp(tls, op) != 0 { + // var aiCurCol [2]int32 at bp, 8 + + var pLeft uintptr = Xsqlite3ExprSkipCollate(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) + var pRight uintptr = Xsqlite3ExprSkipCollate(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) + var opMask U16 + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight&prereqLeft == uint64(0) { + opMask = uint16(WO_ALL) + } else { + opMask = uint16(WO_EQUIV) + } + + if *(*int32)(unsafe.Pointer(pTerm + 32 + 4)) > 0 { + + pLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(*(*int32)(unsafe.Pointer(pTerm + 32 + 4))-1)*32)).FpExpr + } + + if exprMightBeIndexed(tls, pSrc, prereqLeft, bp, pLeft, op) != 0 { + (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor = *(*int32)(unsafe.Pointer(bp)) + + *(*int32)(unsafe.Pointer(pTerm + 32)) = *(*int32)(unsafe.Pointer(bp + 1*4)) + (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(int32(operatorMask(tls, op)) & int32(opMask)) + } + if op == TK_IS { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_IS) + } + if pRight != 0 && + exprMightBeIndexed(tls, pSrc, (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight, bp, pRight, op) != 0 && + !((*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FixedCol) != U32(0)) { + var pNew uintptr + var pDup uintptr + var eExtraOp U16 = U16(0) // Extra bits for pNew->eOperator + + if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor >= 0 { + var idxNew int32 + pDup = Xsqlite3ExprDup(tls, db, pExpr, 0) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3ExprDelete(tls, db, pDup) + return + } + idxNew = whereClauseInsert(tls, pWC, pDup, uint16(TERM_VIRTUAL|TERM_DYNAMIC)) + if idxNew == 0 { + return + } + pNew = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxNew)*56 + markTermAsChild(tls, pWC, idxNew, idxTerm) + if op == TK_IS { + *(*U16)(unsafe.Pointer(pNew + 18)) |= U16(TERM_IS) + } + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_COPIED) + + if termIsEquivalence(tls, pParse, pDup) != 0 { + *(*U16)(unsafe.Pointer(pTerm + 20)) |= U16(WO_EQUIV) + eExtraOp = U16(WO_EQUIV) + } + } else { + pDup = pExpr + pNew = pTerm + } + *(*U16)(unsafe.Pointer(pNew + 18)) |= U16(int32(exprCommute(tls, pParse, pDup))) + (*WhereTerm)(unsafe.Pointer(pNew)).FleftCursor = *(*int32)(unsafe.Pointer(bp)) + + *(*int32)(unsafe.Pointer(pNew + 32)) = *(*int32)(unsafe.Pointer(bp + 1*4)) + + (*WhereTerm)(unsafe.Pointer(pNew)).FprereqRight = prereqLeft | extraRight + (*WhereTerm)(unsafe.Pointer(pNew)).FprereqAll = prereqAll + (*WhereTerm)(unsafe.Pointer(pNew)).FeOperator = U16((int32(operatorMask(tls, int32((*Expr)(unsafe.Pointer(pDup)).Fop))) + int32(eExtraOp)) & int32(opMask)) + } else if op == TK_ISNULL && + !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0)) && + 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { + + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6642 /* "false" */ + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) + (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) + (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) + } + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_BETWEEN && int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND { + var pList uintptr + var i int32 + + pList = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + + for i = 0; i < 2; i++ { + var pNewExpr uintptr + var idxNew int32 + pNewExpr = Xsqlite3PExpr(tls, pParse, int32(ops[i]), + Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, 0), + Xsqlite3ExprDup(tls, db, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr, 0)) + transferJoinMarkings(tls, pNewExpr, pExpr) + idxNew = whereClauseInsert(tls, pWC, pNewExpr, uint16(TERM_VIRTUAL|TERM_DYNAMIC)) + + exprAnalyze(tls, pSrc, pWC, idxNew) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + markTermAsChild(tls, pWC, idxNew, idxTerm) + } + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { + + exprAnalyzeOrTerm(tls, pSrc, pWC, idxTerm) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL { + if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_COLUMN && + int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiColumn) >= 0 && + !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0)) { + var pNewExpr uintptr + var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + var idxNew int32 + var pNewTerm uintptr + + pNewExpr = Xsqlite3PExpr(tls, pParse, TK_GT, + Xsqlite3ExprDup(tls, db, pLeft, 0), + Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0)) + + idxNew = whereClauseInsert(tls, pWC, pNewExpr, + uint16(TERM_VIRTUAL|TERM_DYNAMIC|TERM_VNULL)) + if idxNew != 0 { + pNewTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxNew)*56 + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FprereqRight = uint64(0) + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FleftCursor = (*Expr)(unsafe.Pointer(pLeft)).FiTable + *(*int32)(unsafe.Pointer(pNewTerm + 32)) = int32((*Expr)(unsafe.Pointer(pLeft)).FiColumn) + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FeOperator = U16(int32(WO_EQ) << (TK_GT - TK_EQ)) + markTermAsChild(tls, pWC, idxNew, idxTerm) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_COPIED) + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FprereqAll = (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll + } + } + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && + int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND && + isLikeOrGlob(tls, pParse, pExpr, bp+8, bp+16, bp+20) != 0 { + var pLeft uintptr // LHS of LIKE/GLOB operator + var pStr2 uintptr // Copy of pStr1 - RHS of LIKE/GLOB operator + var pNewExpr1 uintptr + var pNewExpr2 uintptr + var idxNew1 int32 + var idxNew2 int32 + var zCollSeqName uintptr // Name of collating sequence + var wtFlags U16 = U16(TERM_LIKEOPT | TERM_VIRTUAL | TERM_DYNAMIC) + + pLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8 + 1*32)).FpExpr + pStr2 = Xsqlite3ExprDup(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */)), 0) + + // Convert the lower bound to upper-case and the upper bound to + // lower-case (upper-case is less than lower-case in ASCII) so that + // the range constraints also work for BLOBs + if *(*int32)(unsafe.Pointer(bp + 20)) != 0 && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { + var i int32 + var c uint8 + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_LIKE) + for i = 0; int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */)) + 8 /* &.u */)) + uintptr(i))))) != 0; i++ { + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 8)) + uintptr(i))) = uint8(int32(c) & ^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20)) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pStr2 + 8)) + uintptr(i))) = uint8(Xsqlite3UpperToLower[uint8(c)]) + } + } + + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var c U8 + var pC uintptr // Last character before the first wildcard + pC = *(*uintptr)(unsafe.Pointer(pStr2 + 8)) + uintptr(Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(pStr2 + 8)))-1) + c = *(*U8)(unsafe.Pointer(pC)) + if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { + // The point is to increment the last character before the first + // wildcard. But if we increment '@', that will push it into the + // alphabetic range where case conversions will mess up the + // inequality. To avoid this, make sure to also run the full + // LIKE on all candidate expressions by clearing the isComplete flag + if int32(c) == 'A'-1 { + *(*int32)(unsafe.Pointer(bp + 16 /* isComplete */)) = 0 + } + c = Xsqlite3UpperToLower[c] + } + *(*U8)(unsafe.Pointer(pC)) = U8(int32(c) + 1) + } + zCollSeqName = func() uintptr { + if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { + return ts + 21685 /* "NOCASE" */ + } + return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) + }() + pNewExpr1 = Xsqlite3ExprDup(tls, db, pLeft, 0) + pNewExpr1 = Xsqlite3PExpr(tls, pParse, TK_GE, + Xsqlite3ExprAddCollateString(tls, pParse, pNewExpr1, zCollSeqName), + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */))) + transferJoinMarkings(tls, pNewExpr1, pExpr) + idxNew1 = whereClauseInsert(tls, pWC, pNewExpr1, wtFlags) + + exprAnalyze(tls, pSrc, pWC, idxNew1) + pNewExpr2 = Xsqlite3ExprDup(tls, db, pLeft, 0) + pNewExpr2 = Xsqlite3PExpr(tls, pParse, TK_LT, + Xsqlite3ExprAddCollateString(tls, pParse, pNewExpr2, zCollSeqName), + pStr2) + transferJoinMarkings(tls, pNewExpr2, pExpr) + idxNew2 = whereClauseInsert(tls, pWC, pNewExpr2, wtFlags) + + exprAnalyze(tls, pSrc, pWC, idxNew2) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { + markTermAsChild(tls, pWC, idxNew1, idxTerm) + markTermAsChild(tls, pWC, idxNew2, idxTerm) + } + } + + // If there is a vector == or IS term - e.g. "(a, b) == (?, ?)" - create + // new terms for each component comparison - "a = ?" and "b = ?". The + // new terms completely replace the original vector comparison, which is + // no longer used. + // + // This is only required if at least one side of the comparison operation + // is not a sub-select. + // + // tag-20220128a + if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_EQ || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IS) && + libc.AssignInt32(&nLeft, Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)) > 1 && + Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) == nLeft && + ((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fflags&U32(EP_xIsSelect) == U32(0) || + (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fflags&U32(EP_xIsSelect) == U32(0)) && + int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND { + var i int32 + for i = 0; i < nLeft; i++ { + var idxNew int32 + var pNew uintptr + var pLeft uintptr = Xsqlite3ExprForVectorField(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, i, nLeft) + var pRight uintptr = Xsqlite3ExprForVectorField(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, i, nLeft) + + pNew = Xsqlite3PExpr(tls, pParse, int32((*Expr)(unsafe.Pointer(pExpr)).Fop), pLeft, pRight) + transferJoinMarkings(tls, pNew, pExpr) + idxNew = whereClauseInsert(tls, pWC, pNew, uint16(TERM_DYNAMIC|TERM_SLICE)) + exprAnalyze(tls, pSrc, pWC, idxNew) + } + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED | TERM_VIRTUAL) // Disable the original + (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) + } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IN && + *(*int32)(unsafe.Pointer(pTerm + 32 + 4)) == 0 && + int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR && + (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) && + (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpWin == uintptr(0) && + int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND { + var i int32 + for i = 0; i < Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft); i++ { + var idxNew int32 + idxNew = whereClauseInsert(tls, pWC, pExpr, uint16(TERM_VIRTUAL|TERM_SLICE)) + *(*int32)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxNew)*56 + 32 + 4 /* &.iField */)) = i + 1 + exprAnalyze(tls, pSrc, pWC, idxNew) + markTermAsChild(tls, pWC, idxNew, idxTerm) + } + } else if int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND { + *(*uintptr)(unsafe.Pointer(bp + 40 /* pRight */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 32 /* pLeft */)) = uintptr(0) + var res int32 = isAuxiliaryVtabOperator(tls, db, pExpr, bp+24, bp+32, bp+40) + for libc.PostDecInt32(&res, 1) > 0 { + var idxNew int32 + var pNewTerm uintptr + var prereqColumn Bitmask + var prereqExpr Bitmask + + prereqExpr = Xsqlite3WhereExprUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer(bp + 40 /* pRight */))) + prereqColumn = Xsqlite3WhereExprUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer(bp + 32 /* pLeft */))) + if prereqExpr&prereqColumn == uint64(0) { + var pNewExpr uintptr + pNewExpr = Xsqlite3PExpr(tls, pParse, TK_MATCH, + uintptr(0), Xsqlite3ExprDup(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40 /* pRight */)), 0)) + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) && pNewExpr != 0 { + *(*U32)(unsafe.Pointer(pNewExpr + 4)) |= U32(EP_FromJoin) + *(*int32)(unsafe.Pointer(pNewExpr + 52)) = *(*int32)(unsafe.Pointer(pExpr + 52)) + } + idxNew = whereClauseInsert(tls, pWC, pNewExpr, uint16(TERM_VIRTUAL|TERM_DYNAMIC)) + + pNewTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxNew)*56 + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FprereqRight = prereqExpr + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FleftCursor = (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* pLeft */)))).FiTable + *(*int32)(unsafe.Pointer(pNewTerm + 32)) = int32((*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* pLeft */)))).FiColumn) + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FeOperator = U16(WO_AUX) + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FeMatchOp = *(*uint8)(unsafe.Pointer(bp + 24 /* eOp2 */)) + markTermAsChild(tls, pWC, idxNew, idxTerm) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_COPIED) + (*WhereTerm)(unsafe.Pointer(pNewTerm)).FprereqAll = (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll + } + { + var t uintptr = *(*uintptr)(unsafe.Pointer(bp + 32 /* pLeft */)) + *(*uintptr)(unsafe.Pointer(bp + 32 /* pLeft */)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* pRight */)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* pRight */)) = t + } + + } + } + + // Prevent ON clause terms of a LEFT JOIN from being used to drive + // an index for tables to the left of the join. + + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight +} + +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ + +// ************************************************************************** +// +// Routines with file scope above. Interface to the rest of the where.c +// subsystem follows. +// + +// This routine identifies subexpressions in the WHERE clause where +// each subexpression is separated by the AND operator or some other +// operator specified in the op parameter. The WhereClause structure +// is filled with pointers to subexpressions. For example: +// +// WHERE a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22) +// \________/ \_______________/ \________________/ +// slot[0] slot[1] slot[2] +// +// The original WHERE clause in pExpr is unaltered. All this routine +// does is make slot[] entries point to substructure within pExpr. +// +// In the previous sentence and in the diagram, "slot[]" refers to +// the WhereClause.a[] array. The slot[] array grows as needed to contain +// all terms of the WHERE clause. +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ + var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) + (*WhereClause)(unsafe.Pointer(pWC)).Fop = op + + if pE2 == uintptr(0) { + return + } + if int32((*Expr)(unsafe.Pointer(pE2)).Fop) != int32(op) { + whereClauseInsert(tls, pWC, pExpr, uint16(0)) + } else { + Xsqlite3WhereSplit(tls, pWC, (*Expr)(unsafe.Pointer(pE2)).FpLeft, op) + Xsqlite3WhereSplit(tls, pWC, (*Expr)(unsafe.Pointer(pE2)).FpRight, op) + } +} + +// Add either a LIMIT (if eMatchOp==SQLITE_INDEX_CONSTRAINT_LIMIT) or +// OFFSET (if eMatchOp==SQLITE_INDEX_CONSTRAINT_OFFSET) term to the +// where-clause passed as the first argument. The value for the term +// is found in register iReg. +// +// In the common case where the value is a simple integer +// (example: "LIMIT 5 OFFSET 10") then the expression codes as a +// TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). +// If not, then it codes as a TK_REGISTER expression. +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pNew uintptr + *(*int32)(unsafe.Pointer(bp /* iVal */)) = 0 + + if Xsqlite3ExprIsInteger(tls, pExpr, bp) != 0 && *(*int32)(unsafe.Pointer(bp)) >= 0 { + var pVal uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, uintptr(0)) + if pVal == uintptr(0) { + return + } + *(*U32)(unsafe.Pointer(pVal + 4)) |= U32(EP_IntValue) + *(*int32)(unsafe.Pointer(pVal + 8)) = *(*int32)(unsafe.Pointer(bp /* iVal */)) + pNew = Xsqlite3PExpr(tls, pParse, TK_MATCH, uintptr(0), pVal) + } else { + var pVal uintptr = Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0)) + if pVal == uintptr(0) { + return + } + (*Expr)(unsafe.Pointer(pVal)).FiTable = iReg + pNew = Xsqlite3PExpr(tls, pParse, TK_MATCH, uintptr(0), pVal) + } + if pNew != 0 { + var pTerm uintptr + var idx int32 + idx = whereClauseInsert(tls, pWC, pNew, uint16(TERM_DYNAMIC|TERM_VIRTUAL)) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idx)*56 + (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor = iCsr + (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(WO_AUX) + (*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp = U8(eMatchOp) + } +} + +// Possibly add terms corresponding to the LIMIT and OFFSET clauses of the +// SELECT statement passed as the second argument. These terms are only +// added if: +// +// 1. The SELECT statement has a LIMIT clause, and +// 2. The SELECT statement is not an aggregate or DISTINCT query, and +// 3. The SELECT statement has exactly one object in its from clause, and +// that object is a virtual table, and +// 4. There are no terms in the WHERE clause that will not be passed +// to the virtual table xBestIndex method. +// 5. The ORDER BY clause, if any, will be made available to the xBestIndex +// method. +// +// LIMIT and OFFSET terms are ignored by most of the planner code. They +// exist only so that they may be passed to the xBestIndex method of the +// single virtual table in the FROM clause of the SELECT. +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ + + if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && + ((*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc == 1 && int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc+8)).FpTab)).FeTabType) == TABTYP_VTAB) { + var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy + var iCsr int32 = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FiCursor + var ii int32 + + // Check condition (4). Return early if it is not met. + for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; ii++ { + if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*56)).FwtFlags)&TERM_CODED != 0 { + // This term is a vector operation that has been decomposed into + // other, subsequent terms. It can be ignored. See tag-20220128a + + continue + } + if (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*56)).FleftCursor != iCsr { + return + } + } + + // Check condition (5). Return early if it is not met. + if pOrderBy != 0 { + for ii = 0; ii < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; ii++ { + var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(ii)*32)).FpExpr + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { + return + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != iCsr { + return + } + if int32((*ExprList_item)(unsafe.Pointer(pOrderBy+8+uintptr(ii)*32)).FsortFlags)&KEYINFO_ORDER_BIGNULL != 0 { + return + } + } + } + + // All conditions are met. Add the terms to the where-clause object. + + whereAddLimitExpr(tls, pWC, (*Select)(unsafe.Pointer(p)).FiLimit, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpLimit)).FpLeft, + iCsr, SQLITE_INDEX_CONSTRAINT_LIMIT) + if (*Select)(unsafe.Pointer(p)).FiOffset > 0 { + whereAddLimitExpr(tls, pWC, (*Select)(unsafe.Pointer(p)).FiOffset, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpLimit)).FpRight, + iCsr, SQLITE_INDEX_CONSTRAINT_OFFSET) + } + } +} + +// Initialize a preallocated WhereClause structure. +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ + (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo + (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) + (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) + (*WhereClause)(unsafe.Pointer(pWC)).FnTerm = 0 + (*WhereClause)(unsafe.Pointer(pWC)).FnBase = 0 + (*WhereClause)(unsafe.Pointer(pWC)).FnSlot = int32(uint64(unsafe.Sizeof([8]WhereTerm{})) / uint64(unsafe.Sizeof(WhereTerm{}))) + (*WhereClause)(unsafe.Pointer(pWC)).Fa = pWC + 40 /* &.aStatic */ +} + +// Deallocate a WhereClause structure. The WhereClause structure +// itself is not freed. This routine is the inverse of +// sqlite3WhereClauseInit(). +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ + var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb + + if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { + var a uintptr = (*WhereClause)(unsafe.Pointer(pWC)).Fa + var aLast uintptr = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer(pWC)).FnTerm-1)*56 + for 1 != 0 { + + if int32((*WhereTerm)(unsafe.Pointer(a)).FwtFlags)&TERM_DYNAMIC != 0 { + Xsqlite3ExprDelete(tls, db, (*WhereTerm)(unsafe.Pointer(a)).FpExpr) + } + if int32((*WhereTerm)(unsafe.Pointer(a)).FwtFlags)&(TERM_ORINFO|TERM_ANDINFO) != 0 { + if int32((*WhereTerm)(unsafe.Pointer(a)).FwtFlags)&TERM_ORINFO != 0 { + + whereOrInfoDelete(tls, db, *(*uintptr)(unsafe.Pointer(a + 32))) + } else { + + whereAndInfoDelete(tls, db, *(*uintptr)(unsafe.Pointer(a + 32))) + } + } + if a == aLast { + break + } + a += 56 + } + } + if (*WhereClause)(unsafe.Pointer(pWC)).Fa != pWC+40 { + Xsqlite3DbFree(tls, db, (*WhereClause)(unsafe.Pointer(pWC)).Fa) + } +} + +// These routines walk (recursively) an expression tree and generate +// a bitmask indicating which tables are used in that expression +// tree. +// +// sqlite3WhereExprUsage(MaskSet, Expr) -> +// +// Return a Bitmask of all tables referenced by Expr. Expr can be +// be NULL, in which case 0 is returned. +// +// sqlite3WhereExprUsageNN(MaskSet, Expr) -> +// +// Same as sqlite3WhereExprUsage() except that Expr must not be +// NULL. The "NN" suffix on the name stands for "Not Null". +// +// sqlite3WhereExprListUsage(MaskSet, ExprList) -> +// +// Return a Bitmask of all tables referenced by every expression +// in the expression list ExprList. ExprList can be NULL, in which +// case 0 is returned. +// +// sqlite3WhereExprUsageFull(MaskSet, ExprList) -> +// +// Internal use only. Called only by sqlite3WhereExprUsageNN() for +// complex expressions that require pushing register values onto +// the stack. Many calls to sqlite3WhereExprUsageNN() do not need +// the more complex analysis done by this routine. Hence, the +// computations done by this routine are broken out into a separate +// "no-inline" function to avoid the stack push overhead in the +// common case where it is not needed. +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ + var mask Bitmask + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { + mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) + } else { + mask = uint64(0) + } + if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 { + mask = mask | Xsqlite3WhereExprUsageNN(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FpLeft) + } + if (*Expr)(unsafe.Pointer(p)).FpRight != 0 { + mask = mask | Xsqlite3WhereExprUsageNN(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FpRight) + + } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_VarSelect) != U32(0) { + (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 1 + } + mask = mask | exprSelectUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer(p + 32))) + } else if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { + mask = mask | Xsqlite3WhereExprListUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer(p + 32))) + } + if (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_FUNCTION || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_AGG_FUNCTION) && (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_WinFunc) != U32(0) { + + mask = mask | Xsqlite3WhereExprListUsage(tls, pMaskSet, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FpPartition) + mask = mask | Xsqlite3WhereExprListUsage(tls, pMaskSet, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FpOrderBy) + mask = mask | Xsqlite3WhereExprUsage(tls, pMaskSet, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FpFilter) + } + return mask +} + +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ + if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { + return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) + } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { + + return uint64(0) + } + return sqlite3WhereExprUsageFull(tls, pMaskSet, p) +} + +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ + if p != 0 { + return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) + } + return uint64(0) +} + +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ + var i int32 + var mask Bitmask = uint64(0) + if pList != 0 { + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + mask = mask | Xsqlite3WhereExprUsage(tls, pMaskSet, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr) + } + } + return mask +} + +// Call exprAnalyze on all terms in a WHERE clause. +// +// Note that exprAnalyze() might add new virtual terms onto the +// end of the WHERE clause. We do not want to analyze these new +// virtual terms, so start analyzing at the end and work forward +// so that the added virtual terms are never processed. +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ + var i int32 + for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { + exprAnalyze(tls, pTabList, pWC, i) + } +} + +// For table-valued-functions, transform the function arguments into +// new WHERE clause terms. +// +// Each function argument translates into an equality constraint against +// a HIDDEN column in the table. +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pTab uintptr + var j int32 + var k int32 + var pArgs uintptr + var pColRef uintptr + var pTerm uintptr + if int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2) == 0 { + return + } + pTab = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + + pArgs = *(*uintptr)(unsafe.Pointer(pItem + 96)) + if pArgs == uintptr(0) { + return + } + for j = libc.AssignInt32(&k, 0); j < (*ExprList)(unsafe.Pointer(pArgs)).FnExpr; j++ { + var pRhs uintptr + for k < int32((*Table)(unsafe.Pointer(pTab)).FnCol) && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(k)*24)).FcolFlags)&COLFLAG_HIDDEN == 0 { + k++ + } + if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { + Xsqlite3ErrorMsg(tls, pParse, ts+21692, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) + return + } + pColRef = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLUMN, uintptr(0), 0) + if pColRef == uintptr(0) { + return + } + (*Expr)(unsafe.Pointer(pColRef)).FiTable = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor + (*Expr)(unsafe.Pointer(pColRef)).FiColumn = YnVar(libc.PostIncInt32(&k, 1)) + + *(*uintptr)(unsafe.Pointer(pColRef + 64)) = pTab + *(*Bitmask)(unsafe.Pointer(pItem + 88)) |= Xsqlite3ExprColUsed(tls, pColRef) + pRhs = Xsqlite3PExpr(tls, pParse, TK_UPLUS, + Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*ExprList_item)(unsafe.Pointer(pArgs+8+uintptr(j)*32)).FpExpr, 0), uintptr(0)) + pTerm = Xsqlite3PExpr(tls, pParse, TK_EQ, pColRef, pRhs) + if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { + Xsqlite3SetJoinExpr(tls, pTerm, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + } + whereClauseInsert(tls, pWC, pTerm, uint16(TERM_DYNAMIC)) + } +} + +//************* End of whereexpr.c ****************************************** +//************* Begin file where.c ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This module contains C code that generates VDBE code used to process +// the WHERE clause of SQL statements. This module is responsible for +// generating the code that loops through a table looking for applicable +// rows. Indices are selected and used to speed the search when doing +// so is applicable. Because this module is responsible for selecting +// indices, you might also think of this module as the "query optimizer". +// #include "sqliteInt.h" +// #include "whereInt.h" + +// Extra information appended to the end of sqlite3_index_info but not +// visible to the xBestIndex function, at least not directly. The +// sqlite3_vtab_collation() interface knows how to reach it, however. +// +// This object is not an API and can be changed from one release to the +// next. As long as allocateIndexInfo() and sqlite3_vtab_collation() +// agree on the structure, all will be well. +type HiddenIndexInfo1 = struct { + FpWC uintptr + FpParse uintptr + FeDistinct int32 + FmIn U32 + FmHandleIn U32 + F__ccgo_pad1 [4]byte + FaRhs [1]uintptr +} /* sqlite3.c:152019:9 */ + +//************* End of whereexpr.c ****************************************** +//************* Begin file where.c ****************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This module contains C code that generates VDBE code used to process +// the WHERE clause of SQL statements. This module is responsible for +// generating the code that loops through a table looking for applicable +// rows. Indices are selected and used to speed the search when doing +// so is applicable. Because this module is responsible for selecting +// indices, you might also think of this module as the "query optimizer". +// #include "sqliteInt.h" +// #include "whereInt.h" + +// Extra information appended to the end of sqlite3_index_info but not +// visible to the xBestIndex function, at least not directly. The +// sqlite3_vtab_collation() interface knows how to reach it, however. +// +// This object is not an API and can be changed from one release to the +// next. As long as allocateIndexInfo() and sqlite3_vtab_collation() +// agree on the structure, all will be well. +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ + +// Return the estimated number of output rows from a WHERE clause +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ + return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut +} + +// Return one of the WHERE_DISTINCT_xxxxx values to indicate how this +// WHERE clause returns outputs for DISTINCT processing. +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ + return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) +} + +// Return the number of ORDER BY terms that are satisfied by the +// WHERE clause. A return of 0 means that the output must be +// completely sorted. A return equal to the number of ORDER BY +// terms means that no sorting is needed at all. A return that +// is positive but less than the number of ORDER BY terms means that +// block sorting is required. +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ + return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) +} + +// In the ORDER BY LIMIT optimization, if the inner-most loop is known +// to emit rows in increasing order, and if the last row emitted by the +// inner-most loop did not fit within the sorter, then we can skip all +// subsequent rows for the current iteration of the inner loop (because they +// will not fit in the sorter either) and continue with the second inner +// loop - the loop immediately outside the inner-most. +// +// When a row does not fit in the sorter (because the sorter already +// holds LIMIT+OFFSET rows that are smaller), then a jump is made to the +// label returned by this function. +// +// If the ORDER BY LIMIT optimization applies, the jump destination should +// be the continuation for the second-inner-most loop. If the ORDER BY +// LIMIT optimization does not apply, then the jump destination should +// be the continuation for the inner-most loop. +// +// It is always safe for this routine to return the continuation of the +// inner-most loop, in the sense that a correct answer will result. +// Returning the continuation the second inner loop is an optimization +// that might make the code run a little faster, but should not change +// the final answer. +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ + var pInner uintptr + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + // The ORDER BY LIMIT optimization does not apply. Jump to the + // continuation of the inner-most loop. + return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue + } + pInner = pWInfo + 864 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*96 + + return (*WhereLevel)(unsafe.Pointer(pInner)).FaddrNxt +} + +// While generating code for the min/max optimization, after handling +// the aggregate-step call to min() or max(), check to see if any +// additional looping is required. If the output order is such that +// we are certain that the correct answer has already been found, then +// code an OP_Goto to by pass subsequent processing. +// +// Any extra OP_Goto that is coded here is an optimization. The +// correct answer should be obtained regardless. This OP_Goto just +// makes the answer appear faster. +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ + var pInner uintptr + var i int32 + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { + return + } + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == 0 { + return + } + for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { + pInner = pWInfo + 864 + uintptr(i)*96 + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pInner)).FpWLoop)).FwsFlags&U32(WHERE_COLUMN_IN) != U32(0) { + Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pInner)).FaddrNxt) + return + } + } + Xsqlite3VdbeGoto(tls, v, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak) +} + +// Return the VDBE address or label to jump to in order to continue +// immediately with the next row of a WHERE clause. +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ + + return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue +} + +// Return the VDBE address or label to jump to in order to break +// out of a WHERE loop. +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ + return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak +} + +// Return ONEPASS_OFF (0) if an UPDATE or DELETE statement is unable to +// operate directly on the rowids returned by a WHERE clause. Return +// ONEPASS_SINGLE (1) if the statement can operation directly because only +// a single row is to be changed. Return ONEPASS_MULTI (2) if the one-pass +// optimization can be used on multiple +// +// If the ONEPASS optimization is used (if this routine returns true) +// then also write the indices of open cursors used by ONEPASS +// into aiCur[0] and aiCur[1]. iaCur[0] gets the cursor of the data +// table and iaCur[1] gets the cursor used by an auxiliary index. +// Either value may be -1, indicating that cursor is not used. +// Any cursors returned will have been opened for writing. +// +// aiCur[0] and aiCur[1] both get -1 if the where-clause logic is +// unable to use the ONEPASS optimization. +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ + libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) +} + +// Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move +// the data cursor to the row selected by the index cursor. +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) +} + +// Move the content of pSrc into pDest +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ + (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn + libc.Xmemcpy(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{}))) +} + +// Try to insert a new prerequisite/cost entry into the WhereOrSet pSet. +// +// The new entry might overwrite an existing entry, or it might be +// appended, or it might be discarded. Do whatever is the right thing +// so that pSet keeps the N_OR_COST best entries seen so far. +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ + var i U16 + var p uintptr + i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn + p = pSet + 8 /* &.a */ +__1: + if !(int32(i) > 0) { + goto __3 + } + if !(int32(rRun) <= int32((*WhereOrCost)(unsafe.Pointer(p)).FrRun) && prereq&(*WhereOrCost)(unsafe.Pointer(p)).Fprereq == prereq) { + goto __4 + } + goto whereOrInsert_done +__4: + ; + if !(int32((*WhereOrCost)(unsafe.Pointer(p)).FrRun) <= int32(rRun) && (*WhereOrCost)(unsafe.Pointer(p)).Fprereq&prereq == (*WhereOrCost)(unsafe.Pointer(p)).Fprereq) { + goto __5 + } + return 0 +__5: + ; + goto __2 +__2: + i-- + p += 16 + goto __1 + goto __3 +__3: + ; + if !(int32((*WhereOrSet)(unsafe.Pointer(pSet)).Fn) < N_OR_COST) { + goto __6 + } + p = pSet + 8 + uintptr(libc.PostIncUint16(&(*WhereOrSet)(unsafe.Pointer(pSet)).Fn, 1))*16 + (*WhereOrCost)(unsafe.Pointer(p)).FnOut = nOut + goto __7 +__6: + p = pSet + 8 /* &.a */ + i = U16(1) +__8: + if !(int32(i) < int32((*WhereOrSet)(unsafe.Pointer(pSet)).Fn)) { + goto __10 + } + if !(int32((*WhereOrCost)(unsafe.Pointer(p)).FrRun) > int32((*WhereOrCost)(unsafe.Pointer(pSet+8+uintptr(i)*16)).FrRun)) { + goto __11 + } + p = pSet + 8 + uintptr(i)*16 +__11: + ; + goto __9 +__9: + i++ + goto __8 + goto __10 +__10: + ; + if !(int32((*WhereOrCost)(unsafe.Pointer(p)).FrRun) <= int32(rRun)) { + goto __12 + } + return 0 +__12: + ; +__7: + ; +whereOrInsert_done: + (*WhereOrCost)(unsafe.Pointer(p)).Fprereq = prereq + (*WhereOrCost)(unsafe.Pointer(p)).FrRun = rRun + if !(int32((*WhereOrCost)(unsafe.Pointer(p)).FnOut) > int32(nOut)) { + goto __13 + } + (*WhereOrCost)(unsafe.Pointer(p)).FnOut = nOut +__13: + ; + return 1 +} + +// Return the bitmask for the given cursor number. Return 0 if +// iCursor is not in the set. +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ + var i int32 + + if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { + return uint64(1) + } + for i = 1; i < (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn; i++ { + if *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(i)*4)) == iCursor { + return Bitmask(uint64(1)) << i + } + } + return uint64(0) +} + +// Create a new mask for cursor iCursor. +// +// There is one cursor per table in the FROM clause. The number of +// tables in the FROM clause is limited by a test early in the +// sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] +// array will never overflow. +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ + + *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor +} + +// If the right-hand branch of the expression is a TK_COLUMN, then return +// a pointer to the right-hand branch. Otherwise, return NULL. +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ + p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) + if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { + return p + } + return uintptr(0) +} + +// Advance to the next WhereTerm that matches according to the criteria +// established when the pScan object was initialized by whereScanInit(). +// Return NULL if there are no more matching WhereTerms. +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ + var iCur int32 // The cursor on the LHS of the term + var iColumn I16 // The column on the LHS of the term. -1 for IPK + var pX uintptr // An expression being tested + var pWC uintptr // Shorthand for pScan->pWC + var pTerm uintptr // The term being tested + var k int32 = (*WhereScan)(unsafe.Pointer(pScan)).Fk // Where to start scanning + + pWC = (*WhereScan)(unsafe.Pointer(pScan)).FpWC + for 1 != 0 { + iColumn = *(*I16)(unsafe.Pointer(pScan + 88 + uintptr(int32((*WhereScan)(unsafe.Pointer(pScan)).FiEquiv)-1)*2)) + iCur = *(*int32)(unsafe.Pointer(pScan + 44 + uintptr(int32((*WhereScan)(unsafe.Pointer(pScan)).FiEquiv)-1)*4)) + + for __ccgo := true; __ccgo; __ccgo = pWC != uintptr(0) { + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(k)*56 + __1: + if !(k < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { + goto __3 + } + { + + if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor == iCur && + *(*int32)(unsafe.Pointer(pTerm + 32)) == int32(iColumn) && + (int32(iColumn) != -2 || + Xsqlite3ExprCompareSkip(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft, + (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr, iCur) == 0) && + (int32((*WhereScan)(unsafe.Pointer(pScan)).FiEquiv) <= 1 || !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_FromJoin) != U32(0))) { + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV != 0 && + int32((*WhereScan)(unsafe.Pointer(pScan)).FnEquiv) < int32(uint64(unsafe.Sizeof([11]int32{}))/uint64(unsafe.Sizeof(int32(0)))) && + libc.AssignUintptr(&pX, whereRightSubexprIsColumn(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)) != uintptr(0) { + var j int32 + for j = 0; j < int32((*WhereScan)(unsafe.Pointer(pScan)).FnEquiv); j++ { + if *(*int32)(unsafe.Pointer(pScan + 44 + uintptr(j)*4)) == (*Expr)(unsafe.Pointer(pX)).FiTable && + int32(*(*I16)(unsafe.Pointer(pScan + 88 + uintptr(j)*2))) == int32((*Expr)(unsafe.Pointer(pX)).FiColumn) { + break + } + } + if j == int32((*WhereScan)(unsafe.Pointer(pScan)).FnEquiv) { + *(*int32)(unsafe.Pointer(pScan + 44 + uintptr(j)*4)) = (*Expr)(unsafe.Pointer(pX)).FiTable + *(*I16)(unsafe.Pointer(pScan + 88 + uintptr(j)*2)) = (*Expr)(unsafe.Pointer(pX)).FiColumn + (*WhereScan)(unsafe.Pointer(pScan)).FnEquiv++ + } + } + if U32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(*WhereScan)(unsafe.Pointer(pScan)).FopMask != U32(0) { + // Verify the affinity and collating sequence match + if (*WhereScan)(unsafe.Pointer(pScan)).FzCollName != 0 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_ISNULL == 0 { + var pColl uintptr + var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse + pX = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + if !(Xsqlite3IndexAffinityOk(tls, pX, (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff) != 0) { + goto __2 + } + + pColl = Xsqlite3ExprCompareCollSeq(tls, pParse, pX) + if pColl == uintptr(0) { + pColl = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl + } + if Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, (*WhereScan)(unsafe.Pointer(pScan)).FzCollName) != 0 { + goto __2 + } + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) != 0 && + func() bool { + pX = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight + return pX != uintptr(0) + }() && + int32((*Expr)(unsafe.Pointer(pX)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pX)).FiTable == *(*int32)(unsafe.Pointer(pScan + 44)) && + int32((*Expr)(unsafe.Pointer(pX)).FiColumn) == int32(*(*I16)(unsafe.Pointer(pScan + 88))) { + + goto __2 + } + (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC + (*WhereScan)(unsafe.Pointer(pScan)).Fk = k + 1 + return pTerm + } + } + + } + goto __2 + __2: + k++ + pTerm += 56 + goto __1 + goto __3 + __3: + ; + pWC = (*WhereClause)(unsafe.Pointer(pWC)).FpOuter + k = 0 + } + if int32((*WhereScan)(unsafe.Pointer(pScan)).FiEquiv) >= int32((*WhereScan)(unsafe.Pointer(pScan)).FnEquiv) { + break + } + pWC = (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC + k = 0 + (*WhereScan)(unsafe.Pointer(pScan)).FiEquiv++ + } + return uintptr(0) +} + +// This is whereScanInit() for the case of an index on an expression. +// It is factored out into a separate tail-recursion subroutine so that +// the normal whereScanInit() routine, which is a high-runner, does not +// need to push registers onto the stack as part of its prologue. +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ + (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) + return whereScanNext(tls, pScan) +} + +// Initialize a WHERE clause scanner object. Return a pointer to the +// first match. Return NULL if there are no matches. +// +// The scanner will be searching the WHERE clause pWC. It will look +// for terms of the form "X " where X is column iColumn of table +// iCur. Or if pIdx!=0 then X is column iColumn of index pIdx. pIdx +// must be one of the indexes of table iCur. +// +// The must be one of the operators described by opMask. +// +// If the search is for X and the WHERE clause contains terms of the +// form X=Y then this routine might also return terms of the form +// "Y ". The number of levels of transitivity is limited, +// but is enough to handle most commonly occurring SQL statements. +// +// If X is not the INTEGER PRIMARY KEY then X must be compatible with +// index pIdx. +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ + (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC + (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC + (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) + (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = uint8(0) + (*WhereScan)(unsafe.Pointer(pScan)).FzCollName = uintptr(0) + (*WhereScan)(unsafe.Pointer(pScan)).FopMask = opMask + (*WhereScan)(unsafe.Pointer(pScan)).Fk = 0 + *(*int32)(unsafe.Pointer(pScan + 44)) = iCur + (*WhereScan)(unsafe.Pointer(pScan)).FnEquiv = uint8(1) + (*WhereScan)(unsafe.Pointer(pScan)).FiEquiv = uint8(1) + if pIdx != 0 { + var j int32 = iColumn + iColumn = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) + if iColumn == int32((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FiPKey) { + iColumn = -1 + } else if iColumn >= 0 { + (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(iColumn)*24)).Faffinity + (*WhereScan)(unsafe.Pointer(pScan)).FzCollName = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8)) + } else if iColumn == -2 { + (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(j)*32)).FpExpr + (*WhereScan)(unsafe.Pointer(pScan)).FzCollName = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8)) + *(*I16)(unsafe.Pointer(pScan + 88)) = int16(-2) + return whereScanInitIndexExpr(tls, pScan) + } + } else if iColumn == -2 { + return uintptr(0) + } + *(*I16)(unsafe.Pointer(pScan + 88)) = I16(iColumn) + return whereScanNext(tls, pScan) +} + +// Search for a term in the WHERE clause that is of the form "X " +// where X is a reference to the iColumn of table iCur or of index pIdx +// if pIdx!=0 and is one of the WO_xx operator codes specified by +// the op parameter. Return a pointer to the term. Return 0 if not found. +// +// If pIdx!=0 then it must be one of the indexes of table iCur. +// Search for terms matching the iColumn-th column of pIdx +// rather than the iColumn-th column of table iCur. +// +// The term returned might by Y= if there is another constraint in +// the WHERE clause that specifies that X=Y. Any such constraints will be +// identified by the WO_EQUIV bit in the pTerm->eOperator field. The +// aiCur[]/iaColumn[] arrays hold X and all its equivalents. There are 11 +// slots in aiCur[]/aiColumn[] so that means we can look for X plus up to 10 +// other equivalent values. Hence a search for X will return if X=A1 +// and A1=A2 and A2=A3 and ... and A9=A10 and A10=. +// +// If there are multiple terms in the WHERE clause of the form "X " +// then try for the one with no dependencies on - in other words where +// is a constant expression of some kind. Only return entries of +// the form "X Y" where Y is a column in another table if no terms of +// the form "X " exist. If no terms with a constant RHS +// exist, try to return a term that does not use WO_EQUIV. +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + var pResult uintptr = uintptr(0) + var p uintptr + // var scan WhereScan at bp, 112 + + p = whereScanInit(tls, bp, pWC, iCur, iColumn, op, pIdx) + op = op & U32(WO_EQ|WO_IS) + for p != 0 { + if (*WhereTerm)(unsafe.Pointer(p)).FprereqRight¬Ready == uint64(0) { + if (*WhereTerm)(unsafe.Pointer(p)).FprereqRight == uint64(0) && U32((*WhereTerm)(unsafe.Pointer(p)).FeOperator)&op != U32(0) { + + return p + } + if pResult == uintptr(0) { + pResult = p + } + } + p = whereScanNext(tls, bp) + } + return pResult +} + +// This function searches pList for an entry that matches the iCol-th column +// of index pIdx. +// +// If such an expression is found, its index in pList->a[] is returned. If +// no expression is found, -1 is returned. +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ + var i int32 + var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) + + for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr) + if p != uintptr(0) && + (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_AGG_COLUMN) && + int32((*Expr)(unsafe.Pointer(p)).FiColumn) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) && + (*Expr)(unsafe.Pointer(p)).FiTable == iBase { + var pColl uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr) + if 0 == Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zColl) { + return i + } + } + } + + return -1 +} + +// Return TRUE if the iCol-th column of index pIdx is NOT NULL +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ + var j int32 + + j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) + if j >= 0 { + return int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(j)*24 + 8)) & 0xf >> 0) + } else if j == -1 { + return 1 + } else { + + return 0 // Assume an indexed expression can always yield a NULL + + } + return int32(0) +} + +// Return true if the DISTINCT expression-list passed as the third argument +// is redundant. +// +// A DISTINCT list is redundant if any subset of the columns in the +// DISTINCT list are collectively unique and individually non-null. +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ + var pTab uintptr + var pIdx uintptr + var i int32 + var iBase int32 + + // If there is more than one table or sub-select in the FROM clause of + // this query, then it will not be possible to show that the DISTINCT + // clause is redundant. + if (*SrcList)(unsafe.Pointer(pTabList)).FnSrc != 1 { + return 0 + } + iBase = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor + pTab = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FpTab + + // If any of the expressions is an IPK column on table iBase, then return + // true. Note: The (p->iTable==iBase) part of this test may be false if the + // current SELECT is a correlated sub-query. + for i = 0; i < (*ExprList)(unsafe.Pointer(pDistinct)).FnExpr; i++ { + var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pDistinct+8+uintptr(i)*32)).FpExpr) + if p == uintptr(0) { + continue + } + if int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_AGG_COLUMN { + continue + } + if (*Expr)(unsafe.Pointer(p)).FiTable == iBase && int32((*Expr)(unsafe.Pointer(p)).FiColumn) < 0 { + return 1 + } + } + + // Loop through all indices on the table, checking each to see if it makes + // the DISTINCT qualifier redundant. It does so if: + // + // 1. The index is itself UNIQUE, and + // + // 2. All of the columns in the index are either part of the pDistinct + // list, or else the WHERE clause contains a term of the form "col=X", + // where X is a constant value. The collation sequences of the + // comparison and select-list expressions must match those of the index. + // + // 3. All of those index columns for which the WHERE clause does not + // contain a "col=X" term are subject to a NOT NULL constraint. + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None) { + continue + } + if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + continue + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { + if uintptr(0) == Xsqlite3WhereFindTerm(tls, pWC, iBase, i, libc.CplUint64(uint64(0)), uint32(WO_EQ), pIdx) { + if findIndexCol(tls, pParse, pDistinct, iBase, pIdx, i) < 0 { + break + } + if indexColumnNotNull(tls, pIdx, i) == 0 { + break + } + } + } + if i == int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) { + // This index implies that the DISTINCT qualifier is redundant. + return 1 + } + } + + return 0 +} + +// Estimate the logarithm of the input value to base 2. +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ + if int32(N) <= 10 { + return int16(0) + } + return int16(int32(Xsqlite3LogEst(tls, uint64(N))) - 33) +} + +// Convert OP_Column opcodes to OP_Copy in previously generated code. +// +// This routine runs over generated VDBE code and translates OP_Column +// opcodes into OP_Copy when the table is being accessed via co-routine +// instead of via table lookup. +// +// If the iAutoidxCur is not zero, then any OP_Rowid instructions on +// cursor iTabCur are transformed into OP_Sequence opcode for the +// iAutoidxCur cursor, in order to generate unique rowids for the +// automatic index being generated. +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) + var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + return + } +__1: + if !(iStart < iEnd) { + goto __3 + } + { + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 != iTabCur { + goto __2 + } + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Copy) + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 + iRegister + (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 + (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 = 0 + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid { + (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Sequence) + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = iAutoidxCur + } + + } + goto __2 +__2: + iStart++ + pOp += 24 + goto __1 + goto __3 +__3: +} + +// Two routines for printing the content of an sqlite3_index_info +// structure. Used for testing and debugging only. If neither +// SQLITE_TEST or SQLITE_DEBUG are defined, then these routines +// are no-ops. + +// Return TRUE if the WHERE clause term pTerm is of a form where it +// could be used with an index to access pSrc, assuming an appropriate +// index existed. +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ + var aff uint8 + if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0 { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&JT_LEFT != 0 && + !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_FromJoin) != U32(0)) && + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IS != 0 { + // Cannot use an IS term from the WHERE clause as an index driver for + // the RHS of a LEFT JOIN. Such a term can only be used if it is from + // the ON clause. + return 0 + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { + return 0 + } + + if *(*int32)(unsafe.Pointer(pTerm + 32)) < 0 { + return 0 + } + aff = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FaCol + uintptr(*(*int32)(unsafe.Pointer(pTerm + 32)))*24)).Faffinity + if !(Xsqlite3IndexAffinityOk(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, aff) != 0) { + return 0 + } + + return 1 +} + +// Generate code to construct the Index object for an automatic index +// and to set up the WhereLevel object pLevel so that the code generator +// makes use of the automatic index. +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var nKeyCol int32 // Number of columns in the constructed index + var pTerm uintptr // A single term of the WHERE clause + var pWCEnd uintptr // End of pWC->a[] + var pIdx uintptr // Object describing the transient index + var v uintptr // Prepared statement under construction + var addrInit int32 // Address of the initialization bypass jump + var pTable uintptr // The table being indexed + var addrTop int32 // Top of the index fill loop + var regRecord int32 // Register holding an index record + var n int32 // Column counter + var i int32 // Loop counter + var mxBitCol int32 // Maximum column in pSrc->colUsed + var pColl uintptr // Collating sequence to on a column + var pLoop uintptr // The Loop object + // var zNotUsed uintptr at bp+16, 8 + // Extra space on the end of pIdx + var idxCols Bitmask // Bitmap of columns used for indexing + var extraCols Bitmask // Bitmap of additional columns + var sentWarning U8 // True if a warnning has been issued + var pPartial uintptr // Partial Index Expression + var iContinue int32 // Jump here to skip excluded rows + var pTabItem uintptr // FROM clause term being indexed + var addrCounter int32 // Address where integer counter is initialized + var regBase int32 + var iCol int32 + var cMask Bitmask + var pExpr uintptr + var pX uintptr + var iCol1 int32 + var cMask1 Bitmask + var regYield int32 + sentWarning = U8(0) + pPartial = uintptr(0) + iContinue = 0 + addrCounter = 0 // Array of registers where record is assembled + + // Generate code to skip over the creation and initialization of the + // transient index on 2nd and subsequent iterations of the loop. + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + addrInit = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + + // Count the number of columns that will be added to the index + // and used to match WHERE clause constraints + nKeyCol = 0 + pTable = (*SrcItem)(unsafe.Pointer(pSrc)).FpTab + pWCEnd = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer(pWC)).FnTerm)*56 + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + idxCols = uint64(0) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa +__1: + if !(pTerm < pWCEnd) { + goto __3 + } + pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + // Make the automatic index a partial index if there are terms in the + // WHERE clause (or the ON clause of a LEFT join) that constrain which + // rows of the target table (pSrc) that can be used. + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VIRTUAL == 0 && + (int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&JT_LEFT == 0 || (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0)) && + Xsqlite3ExprIsTableConstant(tls, pExpr, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor) != 0) { + goto __4 + } + pPartial = Xsqlite3ExprAnd(tls, pParse, pPartial, + Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0)) +__4: + ; + if !(termCanDriveIndex(tls, pTerm, pSrc, notReady) != 0) { + goto __5 + } + + iCol = *(*int32)(unsafe.Pointer(pTerm + 32)) + if iCol >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { + cMask = Bitmask(uint64(1)) << (int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) - 1) + } else { + cMask = Bitmask(uint64(1)) << iCol + } + + if !!(sentWarning != 0) { + goto __6 + } + Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, + ts+21728, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) + sentWarning = U8(1) +__6: + ; + if !(idxCols&cMask == uint64(0)) { + goto __7 + } + if !(whereLoopResize(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pLoop, nKeyCol+1) != 0) { + goto __8 + } + goto end_auto_index_create +__8: + ; + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(libc.PostIncInt32(&nKeyCol, 1))*8)) = pTerm + idxCols = idxCols | cMask +__7: + ; +__5: + ; + goto __2 +__2: + pTerm += 56 + goto __1 + goto __3 +__3: + ; + + *(*U16)(unsafe.Pointer(pLoop + 24)) = libc.AssignPtrUint16(pLoop+60, U16(nKeyCol)) + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(WHERE_COLUMN_EQ | WHERE_IDX_ONLY | WHERE_INDEXED | + WHERE_AUTO_INDEX) + + // Count the number of additional columns needed to create a + // covering index. A "covering index" is an index that contains all + // columns that are needed by the query. With a covering index, the + // original table never needs to be accessed. Automatic indices must + // be a covering index because the index will not be updated if the + // original table changes and the index and table cannot both be used + // if they go out of sync. + extraCols = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (^idxCols | Bitmask(uint64(1))<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1)) + mxBitCol = func() int32 { + if int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 < int32((*Table)(unsafe.Pointer(pTable)).FnCol) { + return int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) - 1 + } + return int32((*Table)(unsafe.Pointer(pTable)).FnCol) + }() + + i = 0 +__9: + if !(i < mxBitCol) { + goto __11 + } + if !(extraCols&(Bitmask(uint64(1))<= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { + cMask1 = Bitmask(uint64(1)) << (int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) - 1) + } else { + cMask1 = Bitmask(uint64(1)) << iCol1 + } + + if !(idxCols&cMask1 == uint64(0)) { + goto __19 + } + pX = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + idxCols = idxCols | cMask1 + *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(n)*2)) = I16(*(*int32)(unsafe.Pointer(pTerm + 32))) + pColl = Xsqlite3ExprCompareCollSeq(tls, pParse, pX) + // TH3 collate01.800 + *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(n)*8)) = func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) + }() + n++ +__19: + ; +__18: + ; + goto __16 +__16: + pTerm += 56 + goto __15 + goto __17 +__17: + ; + + // Add additional columns needed to make the automatic index into + // a covering index + i = 0 +__20: + if !(i < mxBitCol) { + goto __22 + } + if !(extraCols&(Bitmask(uint64(1))<>4)) != 0) { + goto __29 + } + regYield = (*SrcItem)(unsafe.Pointer(pTabItem)).FregReturn + addrCounter = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 0) + Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, (*SrcItem)(unsafe.Pointer(pTabItem)).FaddrFillSub) + addrTop = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, regYield) + + goto __30 +__29: + addrTop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur) +__30: + ; + if !(pPartial != 0) { + goto __31 + } + iContinue = Xsqlite3VdbeMakeLabel(tls, pParse) + Xsqlite3ExprIfFalse(tls, pParse, pPartial, iContinue, SQLITE_JUMPIFNULL) + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_PARTIALIDX) +__31: + ; + regRecord = Xsqlite3GetTempReg(tls, pParse) + regBase = Xsqlite3GenerateIndexKey(tls, + pParse, pIdx, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, regRecord, 0, uintptr(0), uintptr(0), 0) + if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { + goto __32 + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_FilterAdd, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, 0, + regBase, int32(*(*U16)(unsafe.Pointer(pLoop + 24)))) +__32: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur, regRecord) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) + if !(pPartial != 0) { + goto __33 + } + Xsqlite3VdbeResolveLabel(tls, v, iContinue) +__33: + ; + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x10>>4)) != 0) { + goto __34 + } + Xsqlite3VdbeChangeP2(tls, v, addrCounter, regBase+n) + + translateColumnToCopy(tls, pParse, addrTop, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, + (*SrcItem)(unsafe.Pointer(pTabItem)).FregResult, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur) + Xsqlite3VdbeGoto(tls, v, addrTop) + libc.SetBitFieldPtr16Uint32(pTabItem+60+4, uint32(0), 4, 0x10) + goto __35 +__34: + Xsqlite3VdbeAddOp2(tls, v, OP_Next, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, addrTop+1) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_STMTSTATUS_AUTOINDEX)) +__35: + ; + Xsqlite3VdbeJumpHere(tls, v, addrTop) + Xsqlite3ReleaseTempReg(tls, pParse, regRecord) + + // Jump here when skipping the initialization + Xsqlite3VdbeJumpHere(tls, v, addrInit) + +end_auto_index_create: + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPartial) +} + +// Generate bytecode that will initialize a Bloom filter that is appropriate +// for pLevel. +// +// If there are inner loops within pLevel that have the WHERE_BLOOMFILTER +// flag set, initialize a Bloomfilter for them as well. Except don't do +// this recursive initialization if the SQLITE_BloomPulldown optimization has +// been turned off. +// +// When the Bloom filter is initialized, the WHERE_BLOOMFILTER flag is cleared +// from the loop, but the regFilter value is set to a register that implements +// the Bloom filter. When regFilter is positive, the +// sqlite3WhereCodeOneLoopStart() will generate code to test the Bloom filter +// and skip the subsequence B-Tree seek if the Bloom filter indicates that +// no matching rows exist. +// +// This routine may only be called if it has previously been determined that +// the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit +// is set. +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ + var addrOnce int32 // Address of opening OP_Once + var addrTop int32 // Address of OP_Rewind + var addrCont int32 // Jump here to skip a row + var pTerm uintptr // For looping over WHERE clause terms + var pWCEnd uintptr // Last WHERE clause term + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parsing context + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // VDBE under construction + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop // The loop being coded + var iCur int32 // Cursor for table getting the filter + + addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) + for __ccgo := true; __ccgo; __ccgo = iLevel < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pItem uintptr + var pTab uintptr + var sz U64 + Xsqlite3WhereExplainBloomFilter(tls, pParse, pWInfo, pLevel) + addrCont = Xsqlite3VdbeMakeLabel(tls, pParse) + iCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur + (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + + // The Bloom filter is a Blob held in a register. Initialize it + // to zero-filled blob of at least 80K bits, but maybe more if the + // estimated size of the table is larger. We could actually + // measure the size of the table at run-time using OP_Count with + // P3==1 and use that value to initialize the blob. But that makes + // testing complicated. By basing the blob size on the value in the + // sqlite_stat1 table, testing is much easier. + pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + + pTab = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + + sz = Xsqlite3LogEstToInt(tls, (*Table)(unsafe.Pointer(pTab)).FnRowLogEst) + if sz < uint64(10000) { + sz = uint64(10000) + } else if sz > uint64(10000000) { + sz = uint64(10000000) + } + Xsqlite3VdbeAddOp2(tls, v, OP_Blob, int32(sz), (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter) + + addrTop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) + pWCEnd = (*WhereInfo)(unsafe.Pointer(pWInfo)).FsWC.Fa + uintptr((*WhereInfo)(unsafe.Pointer(pWInfo)).FsWC.FnTerm)*56 + for pTerm = (*WhereInfo)(unsafe.Pointer(pWInfo)).FsWC.Fa; pTerm < pWCEnd; pTerm += 56 { + var pExpr uintptr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VIRTUAL == 0 && + Xsqlite3ExprIsTableConstant(tls, pExpr, iCur) != 0 { + Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) + } + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { + var r1 int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iCur, r1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_FilterAdd, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, 0, r1, 1) + Xsqlite3ReleaseTempReg(tls, pParse, r1) + } else { + var pIdx uintptr = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + var n int32 = int32(*(*U16)(unsafe.Pointer(pLoop + 24))) + var r1 int32 = Xsqlite3GetTempRange(tls, pParse, n) + var jj int32 + for jj = 0; jj < n; jj++ { + var iCol int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(jj)*2))) + + Xsqlite3ExprCodeGetColumnOfTable(tls, v, (*Index)(unsafe.Pointer(pIdx)).FpTable, iCur, iCol, r1+jj) + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_FilterAdd, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, 0, r1, n) + Xsqlite3ReleaseTempRange(tls, pParse, r1, n) + } + Xsqlite3VdbeResolveLabel(tls, v, addrCont) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, addrTop+1) + + Xsqlite3VdbeJumpHere(tls, v, addrTop) + *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_BLOOMFILTER)) + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_BloomPulldown) != U32(0) { + break + } + for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr + pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + if pLoop == uintptr(0) { + continue + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { + continue + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BLOOMFILTER|WHERE_COLUMN_IN) == + U32(WHERE_BLOOMFILTER) { + // This is a candidate for bloom-filter pull-down (early evaluation). + // The test that WHERE_COLUMN_IN is omitted is important, as we are + // not able to do early evaluation of bloom filters that make use of + // the IN operator + break + } + } + } + Xsqlite3VdbeJumpHere(tls, v, addrOnce) +} + +// Allocate and populate an sqlite3_index_info structure. It is the +// responsibility of the caller to eventually release the structure +// by passing the pointer returned by this function to freeIndexInfo(). +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ + var i int32 + var j int32 + var nTerm int32 + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + var pIdxCons uintptr + var pIdxOrderBy uintptr + var pUsage uintptr + var pHidden uintptr + var pTerm uintptr + var nOrderBy int32 + var pIdxInfo uintptr + var mNoOmit U16 = U16(0) + var pTab uintptr + var eDistinct int32 = 0 + var pOrderBy uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy + + pTab = (*SrcItem)(unsafe.Pointer(pSrc)).FpTab + + // Find all WHERE clause constraints referring to this virtual table. + // Mark each term with the TERM_OK flag. Set nTerm to the number of + // terms found. + i = libc.AssignInt32(&nTerm, 0) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa +__1: + if !(i < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { + goto __3 + } + { + *(*U16)(unsafe.Pointer(pTerm + 18)) &= libc.Uint16FromInt32(libc.CplInt32(TERM_OK)) + if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + goto __2 + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight&mUnusable != 0 { + goto __2 + } + + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&libc.CplInt32(WO_EQUIV) == 0 { + goto __2 + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VNULL != 0 { + goto __2 + } + + // tag-20191211-002: WHERE-clause constraints are not useful to the + // right-hand table of a LEFT JOIN. See tag-20191211-001 for the + // equivalent restriction for ordinary tables. + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&JT_LEFT != 0 && + !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_FromJoin) != U32(0)) { + goto __2 + } + nTerm++ + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) + + } + goto __2 +__2: + i++ + pTerm += 56 + goto __1 + goto __3 +__3: + ; + + // If the ORDER BY clause contains only columns in the current + // virtual table then allocate space for the aOrderBy part of + // the sqlite3_index_info structure. + nOrderBy = 0 + if pOrderBy != 0 { + var n int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr + for i = 0; i < n; i++ { + var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr + var pE2 uintptr + + // Skip over constant terms in the ORDER BY clause + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + + // Virtual tables are unable to deal with NULLS FIRST + if int32((*ExprList_item)(unsafe.Pointer(pOrderBy+8+uintptr(i)*32)).FsortFlags)&KEYINFO_ORDER_BIGNULL != 0 { + break + } + + // First case - a direct column references without a COLLATE operator + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + + continue + } + + // 2nd case - a column reference with a COLLATE operator. Only match + // of the COLLATE operator matches the collation of the column. + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLLATE && + int32((*Expr)(unsafe.Pointer(libc.AssignUintptr(&pE2, (*Expr)(unsafe.Pointer(pExpr)).FpLeft))).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pE2)).FiTable == (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + var zColl uintptr // The collating sequence name + + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = (*Expr)(unsafe.Pointer(pE2)).FiColumn + if int32((*Expr)(unsafe.Pointer(pE2)).FiColumn) < 0 { + continue + } // Collseq does not matter for rowid + zColl = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Expr)(unsafe.Pointer(pE2)).FiColumn)*24) + if zColl == uintptr(0) { + zColl = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) + } + if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), zColl) == 0 { + continue + } + } + + // No matches cause a break out of the loop + break + } + if i == n { + nOrderBy = n + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_GROUPBY|WHERE_DISTINCTBY) != 0 { + eDistinct = 1 + libc.Bool32(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0) + } + } + } + + // Allocate the sqlite3_index_info structure + pIdxInfo = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(unsafe.Sizeof(Sqlite3_index_info{}))+ + (uint64(unsafe.Sizeof(sqlite3_index_constraint{}))+uint64(unsafe.Sizeof(sqlite3_index_constraint_usage{})))*uint64(nTerm)+ + uint64(unsafe.Sizeof(sqlite3_index_orderby{}))*uint64(nOrderBy)+uint64(unsafe.Sizeof(HiddenIndexInfo1{}))+ + uint64(unsafe.Sizeof(uintptr(0)))*uint64(nTerm))) + if pIdxInfo == uintptr(0) { + Xsqlite3ErrorMsg(tls, pParse, ts+1461, 0) + return uintptr(0) + } + pHidden = pIdxInfo + 1*96 + pIdxCons = pHidden + 32 + uintptr(nTerm)*8 + pIdxOrderBy = pIdxCons + uintptr(nTerm)*12 + pUsage = pIdxOrderBy + uintptr(nOrderBy)*8 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint = pIdxCons + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy = pIdxOrderBy + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage = pUsage + (*HiddenIndexInfo1)(unsafe.Pointer(pHidden)).FpWC = pWC + (*HiddenIndexInfo1)(unsafe.Pointer(pHidden)).FpParse = pParse + (*HiddenIndexInfo1)(unsafe.Pointer(pHidden)).FeDistinct = eDistinct + (*HiddenIndexInfo1)(unsafe.Pointer(pHidden)).FmIn = U32(0) + i = libc.AssignInt32(&j, 0) + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa +__4: + if !(i < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { + goto __6 + } + { + var op U16 + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_OK == 0 { + goto __5 + } + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons + uintptr(j)*12)).FiColumn = *(*int32)(unsafe.Pointer(pTerm + 32)) + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons + uintptr(j)*12)).FiTermOffset = i + op = U16(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) & WO_ALL) + if int32(op) == WO_IN { + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_SLICE == 0 { + *(*U32)(unsafe.Pointer(pHidden + 20)) |= func() uint32 { + if j <= 31 { + return uint32(uint32(1)) << j + } + return uint32(0) + }() + } + op = U16(WO_EQ) + } + if int32(op) == WO_AUX { + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons + uintptr(j)*12)).Fop = (*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp + } else if int32(op)&(WO_ISNULL|WO_IS) != 0 { + if int32(op) == WO_ISNULL { + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons + uintptr(j)*12)).Fop = uint8(SQLITE_INDEX_CONSTRAINT_ISNULL) + } else { + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons + uintptr(j)*12)).Fop = uint8(SQLITE_INDEX_CONSTRAINT_IS) + } + } else { + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons + uintptr(j)*12)).Fop = U8(op) + // The direct assignment in the previous line is possible only because + // the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical. The + // following asserts verify this fact. + + if int32(op)&(int32(WO_EQ)<<(TK_LT-TK_EQ)|int32(WO_EQ)<<(TK_LE-TK_EQ)|int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 && + Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight) != 0 { + + if j < 16 { + mNoOmit = U16(int32(mNoOmit) | int32(1)<idxStr if p->needToFreeIdxStr indicates +// that this is required. +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pVtab uintptr = (*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpVtab + var rc int32 + + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FnSchemaLock++ + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule)).FxBestIndex})).f(tls, pVtab, p) + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FnSchemaLock-- + + if rc != SQLITE_OK && rc != SQLITE_CONSTRAINT { + if rc == SQLITE_NOMEM { + Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) + } else if !(int32((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) != 0) { + Xsqlite3ErrorMsg(tls, pParse, ts+3605, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + } else { + Xsqlite3ErrorMsg(tls, pParse, ts+3605, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + } + } + Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = uintptr(0) + return rc +} + +// Estimate the location of a particular key among all keys in an +// index. Store the results in aStat as follows: +// +// aStat[0] Est. number of rows less than pRec +// aStat[1] Est. number of rows equal to pRec +// +// Return the index of the sample that is the smallest sample that +// is greater than or equal to pRec. Note that this index is not an index +// into the aSample[] array - it is an index into a virtual set of samples +// based on the contents of aSample[] and the number of fields in record +// pRec. +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ + var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample + var iCol int32 // Index of required stats in anEq[] etc. + var i int32 // Index of first sample >= pRec + var iSample int32 // Smallest sample larger than or equal to pRec + var iMin int32 = 0 // Smallest sample not yet tested + var iTest int32 // Next sample to test + var res int32 // Result of comparison operation + var nField int32 // Number of fields in pRec + var iLower TRowcnt = TRowcnt(0) // anLt[] + anEq[] of largest sample pRec is > + + _ = pParse + + // Do a binary search to find the first sample greater than or equal + // to pRec. If pRec contains a single field, the set of samples to search + // is simply the aSample[] array. If the samples in aSample[] contain more + // than one fields, all fields following the first are ignored. + // + // If pRec contains N fields, where N is more than one, then as well as the + // samples in aSample[] (truncated to N fields), the search also has to + // consider prefixes of those samples. For example, if the set of samples + // in aSample is: + // + // aSample[0] = (a, 5) + // aSample[1] = (a, 10) + // aSample[2] = (b, 5) + // aSample[3] = (c, 100) + // aSample[4] = (c, 105) + // + // Then the search space should ideally be the samples above and the + // unique prefixes [a], [b] and [c]. But since that is hard to organize, + // the code actually searches this set: + // + // 0: (a) + // 1: (a, 5) + // 2: (a, 10) + // 3: (a, 10) + // 4: (b) + // 5: (b, 5) + // 6: (c) + // 7: (c, 100) + // 8: (c, 105) + // 9: (c, 105) + // + // For each sample in the aSample[] array, N samples are present in the + // effective sample array. In the above, samples 0 and 1 are based on + // sample aSample[0]. Samples 2 and 3 on aSample[1] etc. + // + // Often, sample i of each block of N effective samples has (i+1) fields. + // Except, each sample may be extended to ensure that it is greater than or + // equal to the previous sample in the array. For example, in the above, + // sample 2 is the first sample of a block of N samples, so at first it + // appears that it should be 1 field in size. However, that would make it + // smaller than sample 1, so the binary search would not work. As a result, + // it is extended to two fields. The duplicates that this creates do not + // cause any problems. + nField = int32((*UnpackedRecord)(unsafe.Pointer(pRec)).FnField) + iCol = 0 + iSample = (*Index)(unsafe.Pointer(pIdx)).FnSample * nField + for __ccgo := true; __ccgo; __ccgo = res != 0 && iMin < iSample { + var iSamp int32 // Index in aSample[] of test sample + var n int32 // Number of fields in test sample + + iTest = (iMin + iSample) / 2 + iSamp = iTest / nField + if iSamp > 0 { + // The proposed effective sample is a prefix of sample aSample[iSamp]. + // Specifically, the shortest prefix of at least (1 + iTest%nField) + // fields that is greater than the previous effective sample. + for n = iTest%nField + 1; n < nField; n++ { + if *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp-1)*40)).FanLt + uintptr(n-1)*4)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*4)) { + break + } + } + } else { + n = iTest + 1 + } + + (*UnpackedRecord)(unsafe.Pointer(pRec)).FnField = U16(n) + res = Xsqlite3VdbeRecordCompare(tls, (*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).Fn, (*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).Fp, pRec) + if res < 0 { + iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*4)) + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanEq + uintptr(n-1)*4)) + iMin = iTest + 1 + } else if res == 0 && n < nField { + iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*4)) + iMin = iTest + 1 + res = -1 + } else { + iSample = iTest + iCol = n - 1 + } + } + i = iSample / nField + + if res == 0 { + // Record pRec is equal to sample i + + *(*TRowcnt)(unsafe.Pointer(aStat)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) + *(*TRowcnt)(unsafe.Pointer(aStat + 1*4)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanEq + uintptr(iCol)*4)) + } else { + // At this point, the (iCol+1) field prefix of aSample[i] is the first + // sample that is greater than pRec. Or, if i==pIdx->nSample then pRec + // is larger than all samples in the array. + var iUpper TRowcnt + var iGap TRowcnt + if i >= (*Index)(unsafe.Pointer(pIdx)).FnSample { + iUpper = TRowcnt(Xsqlite3LogEstToInt(tls, *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))) + } else { + iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) + } + + if iLower >= iUpper { + iGap = TRowcnt(0) + } else { + iGap = iUpper - iLower + } + if roundUp != 0 { + iGap = iGap * TRowcnt(2) / TRowcnt(3) + } else { + iGap = iGap / TRowcnt(3) + } + *(*TRowcnt)(unsafe.Pointer(aStat)) = iLower + iGap + *(*TRowcnt)(unsafe.Pointer(aStat + 1*4)) = *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(nField-1)*4)) + } + + // Restore the pRec->nField value before returning. + (*UnpackedRecord)(unsafe.Pointer(pRec)).FnField = U16(nField) + return i +} + +// If it is not NULL, pTerm is a term that provides an upper or lower +// bound on a range scan. Without considering pTerm, it is estimated +// that the scan will visit nNew rows. This function returns the number +// estimated to be visited after taking pTerm into account. +// +// If the user explicitly specified a likelihood() value for this term, +// then the return value is the likelihood multiplied by the number of +// input rows. Otherwise, this function assumes that an "IS NOT NULL" term +// has a likelihood of 0.50, and any other term a likelihood of 0.25. +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ + var nRet LogEst = nNew + if pTerm != 0 { + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { + nRet = LogEst(int32(nRet) + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb)) + } else if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VNULL == 0 { + nRet = int16(int32(nRet) - 20) + } + } + return nRet +} + +// Return the affinity for a single column of an index. +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:153574:21: */ + + if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { + if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { + return uint8(SQLITE_AFF_BLOB) + } + } + + return *(*uint8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(iCol))) +} + +// This function is called to estimate the number of rows visited by a +// range-scan on a skip-scan index. For example: +// +// CREATE INDEX i1 ON t1(a, b, c); +// SELECT * FROM t1 WHERE a=? AND c BETWEEN ? AND ?; +// +// Value pLoop->nOut is currently set to the estimated number of rows +// visited for scanning (a=? AND b=?). This function reduces that estimate +// by some factor to account for the (c BETWEEN ? AND ?) expression based +// on the stat4 data for the index. this scan will be peformed multiple +// times (once for each (a,b) combination that matches a=?) is dealt with +// by the caller. +// +// It does this by scanning through all stat4 samples, comparing values +// extracted from pLower and pUpper with the corresponding column in each +// sample. If L and U are the number of samples found to be less than or +// equal to the values extracted from pLower and pUpper respectively, and +// N is the total number of samples, the pLoop->nOut value is adjusted +// as follows: +// +// nOut = nOut * ( min(U - L, 1) / N ) +// +// If pLower is NULL, or a value cannot be extracted from the term, L is +// set to zero. If pUpper is NULL, or a value cannot be extracted from it, +// U is set to N. +// +// Normally, this function sets *pbDone to 1 before returning. However, +// if no value can be extracted from either pLower or pUpper (and so the +// estimate of the number of rows delivered remains unchanged), *pbDone +// is left as is. +// +// If an error occurs, an SQLite error code is returned. Otherwise, +// SQLITE_OK. +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var p uintptr = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + var nEq int32 = int32(*(*U16)(unsafe.Pointer(pLoop + 24))) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var nLower int32 = -1 + var nUpper int32 = (*Index)(unsafe.Pointer(p)).FnSample + 1 + var rc int32 = SQLITE_OK + var aff U8 = U8(Xsqlite3IndexColumnAffinity(tls, db, p, nEq)) + var pColl uintptr + + *(*uintptr)(unsafe.Pointer(bp /* p1 */)) = uintptr(0) // Value extracted from pLower + *(*uintptr)(unsafe.Pointer(bp + 8 /* p2 */)) = uintptr(0) // Value extracted from pUpper + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = uintptr(0) // Value extracted from record + + pColl = Xsqlite3LocateCollSeq(tls, pParse, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FazColl + uintptr(nEq)*8))) + if pLower != 0 { + rc = Xsqlite3Stat4ValueFromExpr(tls, pParse, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pLower)).FpExpr)).FpRight, aff, bp) + nLower = 0 + } + if pUpper != 0 && rc == SQLITE_OK { + rc = Xsqlite3Stat4ValueFromExpr(tls, pParse, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pUpper)).FpExpr)).FpRight, aff, bp+8) + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + nUpper = 0 + } else { + nUpper = (*Index)(unsafe.Pointer(p)).FnSample + } + } + + if *(*uintptr)(unsafe.Pointer(bp)) != 0 || *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + var i int32 + var nDiff int32 + for i = 0; rc == SQLITE_OK && i < (*Index)(unsafe.Pointer(p)).FnSample; i++ { + rc = Xsqlite3Stat4Column(tls, db, (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSample+uintptr(i)*40)).Fp, (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSample+uintptr(i)*40)).Fn, nEq, bp+16) + if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp)) != 0 { + var res int32 = Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(bp /* p1 */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), pColl) + if res >= 0 { + nLower++ + } + } + if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + var res int32 = Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p2 */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), pColl) + if res >= 0 { + nUpper++ + } + } + } + nDiff = nUpper - nLower + if nDiff <= 0 { + nDiff = 1 + } + + // If there is both an upper and lower bound specified, and the + // comparisons indicate that they are close together, use the fallback + // method (assume that the scan visits 1/64 of the rows) for estimating + // the number of rows visited. Otherwise, estimate the number of rows + // using the method described in the header comment for this function. + if nDiff != 1 || pUpper == uintptr(0) || pLower == uintptr(0) { + var nAdjust int32 = int32(Xsqlite3LogEst(tls, uint64((*Index)(unsafe.Pointer(p)).FnSample))) - int32(Xsqlite3LogEst(tls, uint64(nDiff))) + *(*LogEst)(unsafe.Pointer(pLoop + 22)) -= LogEst(nAdjust) + *(*int32)(unsafe.Pointer(pbDone)) = 1 + + } + + } else { + + } + + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp /* p1 */))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p2 */))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) + + return rc +} + +// This function is used to estimate the number of rows that will be visited +// by scanning an index for a range of values. The range may have an upper +// bound, a lower bound, or both. The WHERE clause terms that set the upper +// and lower bounds are represented by pLower and pUpper respectively. For +// example, assuming that index p is on t1(a): +// +// ... FROM t1 WHERE a > ? AND a < ? ... +// |_____| |_____| +// | | +// pLower pUpper +// +// If either of the upper or lower bound is not present, then NULL is passed in +// place of the corresponding WhereTerm. +// +// The value in (pBuilder->pNew->u.btree.nEq) is the number of the index +// column subject to the range constraint. Or, equivalently, the number of +// equality constraints optimized by the proposed index scan. For example, +// assuming index p is on t1(a, b), and the SQL query is: +// +// ... FROM t1 WHERE a = ? AND b > ? AND b < ? ... +// +// then nEq is set to 1 (as the range restricted column, b, is the second +// left-most column of the index). Or, if the query is: +// +// ... FROM t1 WHERE a > ? AND a < ? ... +// +// then nEq is set to 0. +// +// When this function is called, *pnOut is set to the sqlite3LogEst() of the +// number of rows that the index scan is expected to visit without +// considering the range constraints. If nEq is 0, then *pnOut is the number of +// rows in the index. Assuming no error occurs, *pnOut is adjusted (reduced) +// to account for the range constraints pLower and pUpper. +// +// In the absence of sqlite_stat4 ANALYZE data, or if such data cannot be +// used, a single range inequality reduces the search space by a factor of 4. +// and a pair of constraints (x>? AND x 0 && nEq < (*Index)(unsafe.Pointer(p)).FnSampleCol && + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { + if nEq == (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid { + *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)) = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec + // var a [2]TRowcnt at bp, 8 + + var nBtm int32 = int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))) + var nTop int32 = int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))) + + // Variable iLower will be set to the estimate of the number of rows in + // the index that are less than the lower bound of the range query. The + // lower bound being the concatenation of $P and $L, where $P is the + // key-prefix formed by the nEq values matched against the nEq left-most + // columns of the index, and $L is the value in pLower. + // + // Or, if pLower is NULL or $L cannot be extracted from it (because it + // is not a simple variable or literal value), the lower bound of the + // range is $P. Due to a quirk in the way whereKeyStats() works, even + // if $L is available, whereKeyStats() is called for both ($P) and + // ($P:$L) and the larger of the two returned values is used. + // + // Similarly, iUpper is to be set to the estimate of the number of rows + // less than the upper bound of the range query. Where the upper bound + // is either ($P) or ($P:$U). Again, even if $U is available, both values + // of iUpper are requested of whereKeyStats() and the smaller used. + // + // The number of rows between the two bounds is then just iUpper-iLower. + var iLower TRowcnt // Rows less than the lower bound + var iUpper TRowcnt // Rows less than the upper bound + var iLwrIdx int32 = -2 // aSample[] for the lower bound + var iUprIdx int32 = -1 // aSample[] for the upper bound + + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + + (*UnpackedRecord)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)))).FnField = U16((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid) + } + // Determine iLower and iUpper using ($P) only. + if nEq == 0 { + iLower = TRowcnt(0) + iUpper = (*Index)(unsafe.Pointer(p)).FnRowEst0 + } else { + // Note: this call could be optimized away - since the same values must + // have been requested when testing key $P in whereEqualScanEst(). + whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 0, bp) + iLower = *(*TRowcnt)(unsafe.Pointer(bp)) + iUpper = *(*TRowcnt)(unsafe.Pointer(bp)) + *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) + } + + if *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSortOrder + uintptr(nEq))) != 0 { + /* The roles of pLower and pUpper are swapped for a DESC index */ + { + var t uintptr = pLower + pLower = pUpper + pUpper = t + } + + { + var t int32 = nBtm + nBtm = nTop + nTop = t + } + + } + + // If possible, improve on the iLower estimate using ($P:$L). + if pLower != 0 { + // var n int32 at bp+16, 4 + // Values extracted from pExpr + var pExpr uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pLower)).FpExpr)).FpRight + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8, pExpr, nBtm, nEq, bp+16) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 16)) != 0 { + var iNew TRowcnt + var mask U16 = U16(int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ)) + if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 16)) { + mask = U16(int32(WO_EQ)<<(TK_LE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ)) + } + iLwrIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 0, bp) + iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint32 { + if int32((*WhereTerm)(unsafe.Pointer(pLower)).FeOperator)&int32(mask) != 0 { + return *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) + } + return uint32(0) + }() + if iNew > iLower { + iLower = iNew + } + nOut-- + pLower = uintptr(0) + } + } + + // If possible, improve on the iUpper estimate using ($P:$U). + if pUpper != 0 { + // var n int32 at bp+20, 4 + // Values extracted from pExpr + var pExpr uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pUpper)).FpExpr)).FpRight + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8, pExpr, nTop, nEq, bp+20) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 20)) != 0 { + var iNew TRowcnt + var mask U16 = U16(int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ)) + if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 20)) { + mask = U16(int32(WO_EQ)<<(TK_LE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ)) + } + iUprIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 1, bp) + iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint32 { + if int32((*WhereTerm)(unsafe.Pointer(pUpper)).FeOperator)&int32(mask) != 0 { + return *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) + } + return uint32(0) + }() + if iNew < iUpper { + iUpper = iNew + } + nOut-- + pUpper = uintptr(0) + } + } + + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec = *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)) + if rc == SQLITE_OK { + if iUpper > iLower { + nNew = Xsqlite3LogEst(tls, uint64(iUpper-iLower)) + // TUNING: If both iUpper and iLower are derived from the same + // sample, then assume they are 4x more selective. This brings + // the estimated selectivity more in line with what it would be + // if estimated without the use of STAT4 tables. + if iLwrIdx == iUprIdx { + nNew = int16(int32(nNew) - 20) + } + } else { + nNew = int16(10) + } + if int32(nNew) < nOut { + nOut = int32(nNew) + } + + } + } else { + *(*int32)(unsafe.Pointer(bp + 24 /* bDone */)) = 0 + rc = whereRangeSkipScanEst(tls, pParse, pLower, pUpper, pLoop, bp+24) + if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + return rc + } + } + } + + nNew = whereRangeAdjust(tls, pLower, int16(nOut)) + nNew = whereRangeAdjust(tls, pUpper, nNew) + + // TUNING: If there is both an upper and lower limit and neither limit + // has an application-defined likelihood(), assume the range is + // reduced by an additional 75%. This means that, by default, an open-ended + // range query (e.g. col > ?) is assumed to match 1/4 of the rows in the + // index. While a closed range (e.g. col BETWEEN ? AND ?) is estimated to + // match 1/64 of the index. + if pLower != 0 && int32((*WhereTerm)(unsafe.Pointer(pLower)).FtruthProb) > 0 && pUpper != 0 && int32((*WhereTerm)(unsafe.Pointer(pUpper)).FtruthProb) > 0 { + nNew = int16(int32(nNew) - 20) + } + + nOut = nOut - (libc.Bool32(pLower != uintptr(0)) + libc.Bool32(pUpper != uintptr(0))) + if int32(nNew) < 10 { + nNew = int16(10) + } + if int32(nNew) < nOut { + nOut = int32(nNew) + } + (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = LogEst(nOut) + return rc +} + +// Estimate the number of rows that will be returned based on +// an equality constraint x=VALUE and where that VALUE occurs in +// the histogram data. This only works when x is the left-most +// column of an index and sqlite_stat4 histogram data is available +// for that index. When pExpr==NULL that means the constraint is +// "x IS NULL" instead of "x=VALUE". +// +// Write the estimated row count into *pnRow and return SQLITE_OK. +// If unable to make an estimate, leave *pnRow unchanged and return +// non-zero. +// +// This routine can fail if it is unable to load a collating sequence +// required for string comparison, or if unable to allocate memory +// for a UTF conversion required for comparison. The error is stored +// in the pParse structure. +func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr uintptr, pnRow uintptr) int32 { /* sqlite3.c:153914:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var p uintptr = *(*uintptr)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + 24 + 8 /* &.pIndex */)) + var nEq int32 = int32(*(*U16)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + 24))) + *(*uintptr)(unsafe.Pointer(bp /* pRec */)) = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec + var rc int32 // Subfunction return code + // var a [2]TRowcnt at bp+12, 8 + // Statistics + // var bOk int32 at bp+8, 4 + + // If values are not available for all fields of the index to the left + // of this one, no estimate can be made. Return SQLITE_NOTFOUND. + if (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid < nEq-1 { + return SQLITE_NOTFOUND + } + + // This is an optimization only. The call to sqlite3Stat4ProbeSetValue() + // below would return the same value. + if nEq >= int32((*Index)(unsafe.Pointer(p)).FnColumn) { + *(*TRowcnt)(unsafe.Pointer(pnRow)) = TRowcnt(1) + return SQLITE_OK + } + + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp, pExpr, 1, nEq-1, bp+8) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec = *(*uintptr)(unsafe.Pointer(bp /* pRec */)) + if rc != SQLITE_OK { + return rc + } + if *(*int32)(unsafe.Pointer(bp + 8)) == 0 { + return SQLITE_NOTFOUND + } + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid = nEq + + whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp /* pRec */)), 0, bp+12) + + *(*TRowcnt)(unsafe.Pointer(pnRow)) = *(*TRowcnt)(unsafe.Pointer(bp + 12 + 1*4)) + + return rc +} + +// Estimate the number of rows that will be returned based on +// an IN constraint where the right-hand side of the IN operator +// is a list of values. Example: +// +// WHERE x IN (1,2,3,4) +// +// Write the estimated row count into *pnRow and return SQLITE_OK. +// If unable to make an estimate, leave *pnRow unchanged and return +// non-zero. +// +// This routine can fail if it is unable to load a collating sequence +// required for string comparison, or if unable to allocate memory +// for a UTF conversion required for comparison. The error is stored +// in the pParse structure. +func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintptr, pnRow uintptr) int32 { /* sqlite3.c:153978:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var p uintptr = *(*uintptr)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + 24 + 8 /* &.pIndex */)) + var nRow0 I64 = I64(Xsqlite3LogEstToInt(tls, *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaiRowLogEst)))) + var nRecValid int32 = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid + var rc int32 = SQLITE_OK // Subfunction return code + // var nEst TRowcnt at bp, 4 + // Number of rows for a single term + var nRowEst TRowcnt = TRowcnt(0) // New estimate of the number of rows + var i int32 // Loop counter + + for i = 0; rc == SQLITE_OK && i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { + *(*TRowcnt)(unsafe.Pointer(bp /* nEst */)) = TRowcnt(nRow0) + rc = whereEqualScanEst(tls, pParse, pBuilder, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr, bp) + nRowEst = nRowEst + *(*TRowcnt)(unsafe.Pointer(bp)) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid = nRecValid + } + + if rc == SQLITE_OK { + if I64(nRowEst) > nRow0 { + nRowEst = TRowcnt(nRow0) + } + *(*TRowcnt)(unsafe.Pointer(pnRow)) = nRowEst + + } + + return rc +} + +// Convert bulk memory into a valid WhereLoop that can be passed +// to whereLoopClear harmlessly. +func whereLoopInit(tls *libc.TLS, p uintptr) { /* sqlite3.c:154125:13: */ + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 /* &.aLTermSpace */ + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) +} + +// Clear the WhereLoop.u union. Leave WhereLoop.pLTerm intact. +func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154135:13: */ + if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_VIRTUALTABLE|WHERE_AUTO_INDEX) != 0 { + if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0) && U32(int32(*(*uint8)(unsafe.Pointer(p + 24 + 4))&0x1>>0)) != 0 { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) + libc.SetBitFieldPtr8Uint32(p+24+4, U32(0), 0, 0x1) + *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */)) = uintptr(0) + } else if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_AUTO_INDEX) != U32(0) && *(*uintptr)(unsafe.Pointer(p + 24 + 8)) != uintptr(0) { + Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 24 + 8 /* &.pIndex */)))).FzColAff) + Xsqlite3DbFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(p + 24 + 8 /* &.pIndex */))) + *(*uintptr)(unsafe.Pointer(p + 24 + 8 /* &.pIndex */)) = uintptr(0) + } + } +} + +// Deallocate internal memory used by a WhereLoop object +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ + if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { + Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + } + whereLoopClearUnion(tls, db, p) + whereLoopInit(tls, p) +} + +// Increase the memory allocation for pLoop->aLTerm[] to be at least n. +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ + var paNew uintptr + if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { + return SQLITE_OK + } + n = (n + 7) & libc.CplInt32(7) + paNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(n))) + if paNew == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, paNew, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm, uint64(unsafe.Sizeof(uintptr(0)))*uint64((*WhereLoop)(unsafe.Pointer(p)).FnLSlot)) + if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { + Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + } + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = paNew + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(n) + return SQLITE_OK +} + +// Transfer content from the second pLoop into the first. +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ + whereLoopClearUnion(tls, db, pTo) + if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, pTo, pFrom, uint64(uintptr(0)+64)) + libc.Xmemcpy(tls, (*WhereLoop)(unsafe.Pointer(pTo)).FaLTerm, (*WhereLoop)(unsafe.Pointer(pFrom)).FaLTerm, uint64((*WhereLoop)(unsafe.Pointer(pTo)).FnLTerm)*uint64(unsafe.Sizeof(uintptr(0)))) + if (*WhereLoop)(unsafe.Pointer(pFrom)).FwsFlags&U32(WHERE_VIRTUALTABLE) != 0 { + libc.SetBitFieldPtr8Uint32(pFrom+24+4, U32(0), 0, 0x1) + } else if (*WhereLoop)(unsafe.Pointer(pFrom)).FwsFlags&U32(WHERE_AUTO_INDEX) != U32(0) { + *(*uintptr)(unsafe.Pointer(pFrom + 24 + 8 /* &.pIndex */)) = uintptr(0) + } + return SQLITE_OK +} + +// Delete a WhereLoop object +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ + whereLoopClear(tls, db, p) + Xsqlite3DbFreeNN(tls, db, p) +} + +// Free a WhereInfo structure +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ + var i int32 + + for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { + var pLevel uintptr = pWInfo + 864 + uintptr(i)*96 + if (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop != 0 && (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags&U32(WHERE_IN_ABLE) != U32(0) { + + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pLevel + 64 + 8 /* &.aInLoop */))) + } + } + Xsqlite3WhereClauseClear(tls, pWInfo+112) + for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0 { + var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop + whereLoopDelete(tls, db, p) + } + + Xsqlite3DbFreeNN(tls, db, pWInfo) +} + +// Undo all Expr node modifications +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ + for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { + var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext + libc.Xmemcpy(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, p+16, uint64(unsafe.Sizeof(Expr{}))) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) + } +} + +// Return TRUE if all of the following are true: +// +// (1) X has the same or lower cost, or returns the same or fewer rows, +// than Y. +// (2) X uses fewer WHERE clause terms than Y +// (3) Every WHERE clause term used by X is also used by Y +// (4) X skips at least as many columns as Y +// (5) If X is a covering index, than Y is too +// +// Conditions (2) and (3) mean that X is a "proper subset" of Y. +// If X is a proper subset of Y then Y is a better choice and ought +// to have a lower cost. This routine returns TRUE when that cost +// relationship is inverted and needs to be adjusted. Constraint (4) +// was added because if X uses skip-scan less than Y it still might +// deserve a lower cost even if it is a proper subset of Y. Constraint (5) +// was added because a covering index probably deserves to have a lower cost +// than a non-covering index even if it is a proper subset. +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ + var i int32 + var j int32 + if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { + return 0 // X is not a subset of Y + } + if int32((*WhereLoop)(unsafe.Pointer(pX)).FrRun) > int32((*WhereLoop)(unsafe.Pointer(pY)).FrRun) && int32((*WhereLoop)(unsafe.Pointer(pX)).FnOut) > int32((*WhereLoop)(unsafe.Pointer(pY)).FnOut) { + return 0 + } + if int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) > int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) { + return 0 + } + for i = int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm) - 1; i >= 0; i-- { + if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pX)).FaLTerm + uintptr(i)*8)) == uintptr(0) { + continue + } + for j = int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm) - 1; j >= 0; j-- { + if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pY)).FaLTerm + uintptr(j)*8)) == *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pX)).FaLTerm + uintptr(i)*8)) { + break + } + } + if j < 0 { + return 0 + } // X not a subset of Y since term X[i] not used by Y + } + if (*WhereLoop)(unsafe.Pointer(pX)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && + (*WhereLoop)(unsafe.Pointer(pY)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) { + return 0 // Constraint (5) + } + return 1 // All conditions meet +} + +// Try to adjust the cost and number of output rows of WhereLoop pTemplate +// upwards or downwards so that: +// +// (1) pTemplate costs less than any other WhereLoops that are a proper +// subset of pTemplate +// +// (2) pTemplate costs more than any other WhereLoops for which pTemplate +// is a proper subset. +// +// To say "WhereLoop X is a proper subset of Y" means that X uses fewer +// WHERE clause terms than Y and that every WHERE clause term used by X is +// also used by Y. +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ + if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { + return + } + for ; p != 0; p = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop { + if int32((*WhereLoop)(unsafe.Pointer(p)).FiTab) != int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FiTab) { + continue + } + if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { + continue + } + if whereLoopCheaperProperSubset(tls, p, pTemplate) != 0 { + // Adjust pTemplate cost downward so that it is cheaper than its + // subset p. + + (*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun = func() int16 { + if int32((*WhereLoop)(unsafe.Pointer(p)).FrRun) < int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun) { + return (*WhereLoop)(unsafe.Pointer(p)).FrRun + } + return (*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun + }() + (*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut = func() int16 { + if int32((*WhereLoop)(unsafe.Pointer(p)).FnOut)-1 < int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut) { + return int16(int32((*WhereLoop)(unsafe.Pointer(p)).FnOut) - 1) + } + return (*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut + }() + } else if whereLoopCheaperProperSubset(tls, pTemplate, p) != 0 { + // Adjust pTemplate cost upward so that it is costlier than p since + // pTemplate is a proper subset of p + + (*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun = func() int16 { + if int32((*WhereLoop)(unsafe.Pointer(p)).FrRun) > int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun) { + return (*WhereLoop)(unsafe.Pointer(p)).FrRun + } + return (*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun + }() + (*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut = func() int16 { + if int32((*WhereLoop)(unsafe.Pointer(p)).FnOut)+1 > int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut) { + return int16(int32((*WhereLoop)(unsafe.Pointer(p)).FnOut) + 1) + } + return (*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut + }() + } + } +} + +// Search the list of WhereLoops in *ppPrev looking for one that can be +// replaced by pTemplate. +// +// Return NULL if pTemplate does not belong on the WhereLoop list. +// In other words if pTemplate ought to be dropped from further consideration. +// +// If pX is a WhereLoop that pTemplate can replace, then return the +// link that points to pX. +// +// If pTemplate cannot replace any existing element of the list but needs +// to be added to the list as a new entry, then return a pointer to the +// tail of the list. +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ + var p uintptr + p = *(*uintptr)(unsafe.Pointer(ppPrev)) +__1: + if !(p != 0) { + goto __3 + } + { + if int32((*WhereLoop)(unsafe.Pointer(p)).FiTab) != int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FiTab) || int32((*WhereLoop)(unsafe.Pointer(p)).FiSortIdx) != int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FiSortIdx) { + // If either the iTab or iSortIdx values for two WhereLoop are different + // then those WhereLoops need to be considered separately. Neither is + // a candidate to replace the other. + goto __2 + } + // In the current implementation, the rSetup value is either zero + // or the cost of building an automatic index (NlogN) and the NlogN + // is the same for compatible WhereLoops. + + // whereLoopAddBtree() always generates and inserts the automatic index + // case first. Hence compatible candidate WhereLoops never have a larger + // rSetup. Call this SETUP-INVARIANT + + // Any loop using an appliation-defined index (or PRIMARY KEY or + // UNIQUE constraint) with one or more == constraints is better + // than an automatic index. Unless it is a skip-scan. + if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_AUTO_INDEX) != U32(0) && + int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FnSkip) == 0 && + (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) != U32(0) && + (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_COLUMN_EQ) != U32(0) && + (*WhereLoop)(unsafe.Pointer(p)).Fprereq&(*WhereLoop)(unsafe.Pointer(pTemplate)).Fprereq == (*WhereLoop)(unsafe.Pointer(pTemplate)).Fprereq { + goto __3 + } + + // If existing WhereLoop p is better than pTemplate, pTemplate can be + // discarded. WhereLoop p is better if: + // (1) p has no more dependencies than pTemplate, and + // (2) p has an equal or lower cost than pTemplate + if (*WhereLoop)(unsafe.Pointer(p)).Fprereq&(*WhereLoop)(unsafe.Pointer(pTemplate)).Fprereq == (*WhereLoop)(unsafe.Pointer(p)).Fprereq && + int32((*WhereLoop)(unsafe.Pointer(p)).FrSetup) <= int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FrSetup) && + int32((*WhereLoop)(unsafe.Pointer(p)).FrRun) <= int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun) && + int32((*WhereLoop)(unsafe.Pointer(p)).FnOut) <= int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut) { + return uintptr(0) // Discard pTemplate + } + + // If pTemplate is always better than p, then cause p to be overwritten + // with pTemplate. pTemplate is better than p if: + // (1) pTemplate has no more dependences than p, and + // (2) pTemplate has an equal or lower cost than p. + if (*WhereLoop)(unsafe.Pointer(p)).Fprereq&(*WhereLoop)(unsafe.Pointer(pTemplate)).Fprereq == (*WhereLoop)(unsafe.Pointer(pTemplate)).Fprereq && + int32((*WhereLoop)(unsafe.Pointer(p)).FrRun) >= int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun) && + int32((*WhereLoop)(unsafe.Pointer(p)).FnOut) >= int32((*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut) { + // SETUP-INVARIANT above + goto __3 // Cause p to be overwritten by pTemplate + } + + } + goto __2 +__2: + ppPrev = p + 80 + p = *(*uintptr)(unsafe.Pointer(ppPrev)) + goto __1 + goto __3 +__3: + ; + return ppPrev +} + +// Insert or replace a WhereLoop entry using the template supplied. +// +// An existing WhereLoop entry might be overwritten if the new template +// is better and has fewer dependencies. Or the template will be ignored +// and no insert will occur if an existing WhereLoop is faster and has +// fewer dependencies than the template. Otherwise a new WhereLoop is +// added based on the template. +// +// If pBuilder->pOrSet is not NULL then we care about only the +// prerequisites and rRun and nOut costs of the N best loops. That +// information is gathered in the pBuilder->pOrSet object. This special +// processing mode is used only for OR clause processing. +// +// When accumulating multiple loops (when pBuilder->pOrSet is NULL) we +// still might overwrite similar loops with the new template if the +// new template is better. Loops may be overwritten if the following +// conditions are met: +// +// (1) They have the same iTab. +// (2) They have the same iSortIdx. +// (3) The template has same or fewer dependencies than the current loop +// (4) The template has the same or lower cost than the current loop +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ + var ppPrev uintptr + var p uintptr + var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo + var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb + var rc int32 + + // Stop the search once we hit the query planner search limit + if (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit == uint32(0) { + + if (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpOrSet != 0 { + (*WhereOrSet)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpOrSet)).Fn = U16(0) + } + return SQLITE_DONE + } + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit-- + + whereLoopAdjustCost(tls, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops, pTemplate) + + // If pBuilder->pOrSet is defined, then only keep track of the costs + // and prereqs. + if (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpOrSet != uintptr(0) { + if (*WhereLoop)(unsafe.Pointer(pTemplate)).FnLTerm != 0 { + whereOrInsert(tls, (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpOrSet, (*WhereLoop)(unsafe.Pointer(pTemplate)).Fprereq, (*WhereLoop)(unsafe.Pointer(pTemplate)).FrRun, + (*WhereLoop)(unsafe.Pointer(pTemplate)).FnOut) + } + return SQLITE_OK + } + + // Look for an existing WhereLoop to replace with pTemplate + ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + + if ppPrev == uintptr(0) { + // There already exists a WhereLoop on the list that is better + // than pTemplate, so just ignore pTemplate + return SQLITE_OK + } else { + p = *(*uintptr)(unsafe.Pointer(ppPrev)) + } + + // If we reach this point it means that either p[] should be overwritten + // with pTemplate[] if p[] exists, or if p==NULL then allocate a new + // WhereLoop and insert it. + if p == uintptr(0) { + // Allocate a new WhereLoop to add to the end of the list + *(*uintptr)(unsafe.Pointer(ppPrev)) = libc.AssignUintptr(&p, Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(WhereLoop{})))) + if p == uintptr(0) { + return SQLITE_NOMEM + } + whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop = uintptr(0) + } else { + // We will be overwriting WhereLoop p[]. But before we do, first + // go through the rest of the list and delete any other entries besides + // p[] that are also supplated by pTemplate + var ppTail uintptr = p + 80 + var pToDel uintptr + for *(*uintptr)(unsafe.Pointer(ppTail)) != 0 { + ppTail = whereLoopFindLesser(tls, ppTail, pTemplate) + if ppTail == uintptr(0) { + break + } + pToDel = *(*uintptr)(unsafe.Pointer(ppTail)) + if pToDel == uintptr(0) { + break + } + *(*uintptr)(unsafe.Pointer(ppTail)) = (*WhereLoop)(unsafe.Pointer(pToDel)).FpNextLoop + whereLoopDelete(tls, db, pToDel) + } + } + rc = whereLoopXfer(tls, db, p, pTemplate) + if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_VIRTUALTABLE) == U32(0) { + var pIndex uintptr = *(*uintptr)(unsafe.Pointer(p + 24 + 8 /* &.pIndex */)) + if pIndex != 0 && int32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x3>>0) == SQLITE_IDXTYPE_IPK { + *(*uintptr)(unsafe.Pointer(p + 24 + 8 /* &.pIndex */)) = uintptr(0) + } + } + return rc +} + +// Adjust the WhereLoop.nOut value downward to account for terms of the +// WHERE clause that reference the loop but which are not used by an +// index. +// +// For every WHERE clause term that is not used by the index +// and which has a truth probability assigned by one of the likelihood(), +// likely(), or unlikely() SQL functions, reduce the estimated number +// of output rows by the probability specified. +// +// TUNING: For every WHERE clause term that is not used by the index +// and which does not have an assigned truth probability, heuristics +// described below are used to try to estimate the truth probability. +// TODO --> Perhaps this is something that could be improved by better +// table statistics. +// +// Heuristic 1: Estimate the truth probability as 93.75%. The 93.75% +// value corresponds to -1 in LogEst notation, so this means decrement +// the WhereLoop.nOut field for every such WHERE clause term. +// +// Heuristic 2: If there exists one or more WHERE clause terms of the +// form "x==EXPR" and EXPR is not a constant 0 or 1, then make sure the +// final output row estimate is no greater than 1/4 of the total number +// of rows in the table. In other words, assume that x==EXPR will filter +// out at least 3 out of 4 rows. If EXPR is -1 or 0 or 1, then maybe the +// "x" column is boolean or else -1 or 0 or 1 is a common default value +// on the "x" column and so in that case only cap the output row estimate +// at 1/2 instead of 1/4. +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pTerm uintptr + var pX uintptr + var notAllowed Bitmask = ^((*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq | (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf) + var i int32 + var j int32 + var iReduce LogEst = int16(0) // pLoop->nOut should not exceed nRow-iReduce + + i = (*WhereClause)(unsafe.Pointer(pWC)).FnBase + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa +__1: + if !(i > 0) { + goto __3 + } + { + + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll¬Allowed != uint64(0) { + goto __2 + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf == uint64(0) { + goto __2 + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VIRTUAL != 0 { + goto __2 + } + for j = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - 1; j >= 0; j-- { + pX = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if pX == uintptr(0) { + continue + } + if pX == pTerm { + break + } + if (*WhereTerm)(unsafe.Pointer(pX)).FiParent >= 0 && (*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr((*WhereTerm)(unsafe.Pointer(pX)).FiParent)*56 == pTerm { + break + } + } + if j < 0 { + if (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf == (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll { + // If there are extra terms in the WHERE clause not used by an index + // that depend only on the table being scanned, and that will tend to + // cause many rows to be omitted, then mark that table as + // "self-culling". + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_SELFCULL) + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { + // If a truth probability is specified using the likelihood() hints, + // then use the probability provided by the application. + *(*LogEst)(unsafe.Pointer(pLoop + 22)) += LogEst(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb)) + } else { + // In the absence of explicit truth probabilities, use heuristics to + // guess a reasonable truth probability. + (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut-- + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) != 0 && + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_HIGHTRUTH == 0 { + var pRight uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight + *(*int32)(unsafe.Pointer(bp /* k */)) = 0 + + if Xsqlite3ExprIsInteger(tls, pRight, bp) != 0 && *(*int32)(unsafe.Pointer(bp)) >= -1 && *(*int32)(unsafe.Pointer(bp)) <= 1 { + *(*int32)(unsafe.Pointer(bp /* k */)) = 10 + } else { + *(*int32)(unsafe.Pointer(bp /* k */)) = 20 + } + if int32(iReduce) < *(*int32)(unsafe.Pointer(bp)) { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_HEURTRUTH) + iReduce = LogEst(*(*int32)(unsafe.Pointer(bp /* k */))) + } + } + } + } + + } + goto __2 +__2: + i-- + pTerm += 56 + goto __1 + goto __3 +__3: + ; + if int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnOut) > int32(nRow)-int32(iReduce) { + (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = LogEst(int32(nRow) - int32(iReduce)) + } +} + +// Term pTerm is a vector range comparison operation. The first comparison +// in the vector can be optimized using column nEq of the index. This +// function returns the total number of vector elements that can be used +// as part of the range comparison. +// +// For example, if the query is: +// +// WHERE a = ? AND (b, c, d) > (?, ?, ?) +// +// and the index: +// +// CREATE INDEX ... ON (a, b, c, d, e) +// +// then this function would be invoked with nEq=1. The value returned in +// this case is 3. +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ + var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) + var i int32 + + nCmp = func() int32 { + if nCmp < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)-nEq { + return nCmp + } + return int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) - nEq + }() + for i = 1; i < nCmp; i++ { + // Test if comparison i of pTerm is compatible with column (i+nEq) + // of the index. If not, exit the loop. + var aff uint8 // Comparison affinity + var idxaff uint8 = uint8(0) // Indexed columns affinity + var pColl uintptr // Comparison collation sequence + var pLhs uintptr + var pRhs uintptr + + pLhs = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + 32)) + 8 + uintptr(i)*32)).FpExpr + pRhs = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight + if (*Expr)(unsafe.Pointer(pRhs)).Fflags&U32(EP_xIsSelect) != U32(0) { + pRhs = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRhs + 32)))).FpEList + 8 + uintptr(i)*32)).FpExpr + } else { + pRhs = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRhs + 32)) + 8 + uintptr(i)*32)).FpExpr + } + + // Check that the LHS of the comparison is a column reference to + // the right column of the right source table. And that the sort + // order of the index column is the same as the sort order of the + // leftmost index column. + if int32((*Expr)(unsafe.Pointer(pLhs)).Fop) != TK_COLUMN || + (*Expr)(unsafe.Pointer(pLhs)).FiTable != iCur || + int32((*Expr)(unsafe.Pointer(pLhs)).FiColumn) != int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i+nEq)*2))) || + int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i+nEq)))) != int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(nEq)))) { + break + } + + aff = Xsqlite3CompareAffinity(tls, pRhs, Xsqlite3ExprAffinity(tls, pLhs)) + idxaff = Xsqlite3TableColumnAffinity(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable, int32((*Expr)(unsafe.Pointer(pLhs)).FiColumn)) + if int32(aff) != int32(idxaff) { + break + } + + pColl = Xsqlite3BinaryCompareCollSeq(tls, pParse, pLhs, pRhs) + if pColl == uintptr(0) { + break + } + if Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i+nEq)*8))) != 0 { + break + } + } + return i +} + +// Adjust the cost C by the costMult facter T. This only occurs if +// compiled with -DSQLITE_ENABLE_COSTMULT + +// We have so far matched pBuilder->pNew->u.btree.nEq terms of the +// index pIndex. Try to match one more. +// +// When this function is called, pBuilder->pNew->nOut contains the +// number of rows expected to be visited by filtering using the nEq +// terms only. If it is modified, this value is restored before this +// function returns. +// +// If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is +// a fake index used for the INTEGER PRIMARY KEY. +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ + bp := tls.Alloc(116) + defer tls.Free(116) + + var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo // WHERE analyse context + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parsing context + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection malloc context + var pNew uintptr // Template WhereLoop under construction + var pTerm uintptr // A WhereTerm under consideration + var opMask int32 // Valid operators for constraints + // var scan WhereScan at bp, 112 + // Iterator for WHERE terms + var saved_prereq Bitmask // Original value of pNew->prereq + var saved_nLTerm U16 // Original value of pNew->nLTerm + var saved_nEq U16 // Original value of pNew->u.btree.nEq + var saved_nBtm U16 // Original value of pNew->u.btree.nBtm + var saved_nTop U16 // Original value of pNew->u.btree.nTop + var saved_nSkip U16 // Original value of pNew->nSkip + var saved_wsFlags U32 // Original value of pNew->wsFlags + var saved_nOut LogEst // Original value of pNew->nOut + var rc int32 = SQLITE_OK // Return code + var rSize LogEst // Number of rows in the table + var rLogSize LogEst // Logarithm of table size + var pTop uintptr = uintptr(0) + var pBtm uintptr = uintptr(0) // Top and bottom range constraints + + pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return SQLITE_NOMEM + } + + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { + opMask = int32(WO_EQ)<<(TK_LT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ) + } else { + + opMask = WO_EQ | WO_IN | int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_GE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ) | WO_ISNULL | WO_IS + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x4>>2)) != 0 { + opMask = opMask & libc.CplInt32(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)|int32(WO_EQ)<<(TK_LT-TK_EQ)|int32(WO_EQ)<<(TK_LE-TK_EQ)) + } + + saved_nEq = *(*U16)(unsafe.Pointer(pNew + 24)) + saved_nBtm = *(*U16)(unsafe.Pointer(pNew + 24 + 2 /* &.nBtm */)) + saved_nTop = *(*U16)(unsafe.Pointer(pNew + 24 + 4 /* &.nTop */)) + saved_nSkip = (*WhereLoop)(unsafe.Pointer(pNew)).FnSkip + saved_nLTerm = (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm + saved_wsFlags = (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags + saved_prereq = (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq + saved_nOut = (*WhereLoop)(unsafe.Pointer(pNew)).FnOut + pTerm = whereScanInit(tls, bp, (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, int32(saved_nEq), + uint32(opMask), pProbe) + (*WhereLoop)(unsafe.Pointer(pNew)).FrSetup = int16(0) + rSize = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst)) + rLogSize = estLog(tls, rSize) + for ; rc == SQLITE_OK && pTerm != uintptr(0); pTerm = whereScanNext(tls, bp) { + var eOp U16 = (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator // Shorthand for pTerm->eOperator + var rCostIdx LogEst + var nOutUnadjusted LogEst // nOut before IN() and WHERE adjustments + var nIn int32 = 0 + var nRecValid int32 = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid + if (int32(eOp) == WO_ISNULL || int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VNULL != 0) && + indexColumnNotNull(tls, pProbe, int32(saved_nEq)) != 0 { + continue // ignore IS [NOT] NULL constraints on NOT NULL columns + } + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight&(*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf != 0 { + continue + } + + // Do not allow the upper bound of a LIKE optimization range constraint + // to mix with a lower range bound from some other source + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) == int32(WO_EQ)<<(TK_LT-TK_EQ) { + continue + } + + // tag-20191211-001: Do not allow constraints from the WHERE clause to + // be used by the right table of a LEFT JOIN. Only constraints in the + // ON clause are allowed. See tag-20191211-002 for the vtab equivalent. + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&JT_LEFT != 0 && + !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_FromJoin) != U32(0)) { + continue + } + + if int32((*Index)(unsafe.Pointer(pProbe)).FonError) != OE_None && int32(saved_nEq) == int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol)-1 { + *(*uint8)(unsafe.Pointer(pBuilder + 44)) |= uint8(SQLITE_BLDF1_UNIQUE) + } else { + *(*uint8)(unsafe.Pointer(pBuilder + 44)) |= uint8(SQLITE_BLDF1_INDEXED) + } + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = saved_wsFlags + *(*U16)(unsafe.Pointer(pNew + 24)) = saved_nEq + *(*U16)(unsafe.Pointer(pNew + 24 + 2 /* &.nBtm */)) = saved_nBtm + *(*U16)(unsafe.Pointer(pNew + 24 + 4 /* &.nTop */)) = saved_nTop + (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } // OOM + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm + (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq = (saved_prereq | (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight) & ^(*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf + + if int32(eOp)&WO_IN != 0 { + var pExpr uintptr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { + // "x IN (SELECT ...)": TUNING: the SELECT returns 25 rows + var i int32 + nIn = 46 + + // The expression may actually be of the form (x, y) IN (SELECT...). + // In this case there is a separate term for each of (x) and (y). + // However, the nIn multiplier should only be applied once, not once + // for each such term. The following loop checks that pTerm is the + // first such term in use, and sets nIn back to 0 if it is not. + for i = 0; i < int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)-1; i++ { + if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) != 0 && (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)))).FpExpr == pExpr { + nIn = 0 + } + } + } else if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != 0 && (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr != 0 { + // "x IN (value, value, ...)" + nIn = int32(Xsqlite3LogEst(tls, uint64((*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr))) + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x80>>7)) != 0 && int32(rLogSize) >= 10 { + var M LogEst + var logK LogEst + var x LogEst + // Let: + // N = the total number of rows in the table + // K = the number of entries on the RHS of the IN operator + // M = the number of rows in the table that match terms to the + // to the left in the same index. If the IN operator is on + // the left-most index column, M==N. + // + // Given the definitions above, it is better to omit the IN operator + // from the index lookup and instead do a scan of the M elements, + // testing each scanned row against the IN operator separately, if: + // + // M*log(K) < K*log(N) + // + // Our estimates for M, K, and N might be inaccurate, so we build in + // a safety margin of 2 (LogEst: 10) that favors using the IN operator + // with the index, as using an index has better worst-case behavior. + // If we do not have real sqlite_stat1 data, always prefer to use + // the index. Do not bother with this optimization on very small + // tables (less than 2 rows) as it is pointless in that case. + M = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(saved_nEq)*2)) + logK = estLog(tls, int16(nIn)) + // TUNING v----- 10 to bias toward indexed IN + x = LogEst(int32(M) + int32(logK) + 10 - (nIn + int32(rLogSize))) + if int32(x) >= 0 { + + } else if int32(nInMul) < 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_SeekScan) == U32(0) { + + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_IN_SEEKSCAN) + } else { + + continue + } + } + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_IN) + } else if int32(eOp)&(WO_EQ|WO_IS) != 0 { + var iCol int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiColumn + uintptr(saved_nEq)*2))) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_EQ) + + if iCol == -1 || + iCol >= 0 && int32(nInMul) == 0 && int32(saved_nEq) == int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol)-1 { + if iCol == -1 || uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x8>>3)) != 0 || + int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol) == 1 && (*Index)(unsafe.Pointer(pProbe)).FonError != 0 && int32(eOp) == WO_EQ { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_ONEROW) + } else { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_UNQ_WANTED) + } + } + if int32((*WhereScan)(unsafe.Pointer(bp)).FiEquiv) > 1 { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_TRANSCONS) + } + } else if int32(eOp)&WO_ISNULL != 0 { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_NULL) + } else if int32(eOp)&(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 { + + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 2 /* &.nBtm */)) = U16(whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm)) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + // Range constraints that come from the LIKE optimization are + // always used in pairs. + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } // OOM + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTop + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4 /* &.nTop */)) = U16(1) + } + } else { + + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4 /* &.nTop */)) = U16(whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm)) + pTop = pTerm + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_BTM_LIMIT) != U32(0) { + pBtm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)-2)*8)) + } else { + pBtm = uintptr(0) + } + } + + // At this point pNew->nOut is set to the number of rows expected to + // be visited by the index scan before considering term pTerm, or the + // values of nIn and nInMul. In other words, assuming that all + // "x IN(...)" terms are replaced with "x = ?". This block updates + // the value of pNew->nOut to account for pTerm (but not nIn/nInMul). + + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_COLUMN_RANGE) != 0 { + // Adjust nOut using stat4 data. Or, if there is no stat4 + // data, using some other estimate. + whereRangeScanEst(tls, pParse, pBuilder, pBtm, pTop, pNew) + } else { + var nEq int32 = int32(libc.PreIncUint16(&*(*U16)(unsafe.Pointer(pNew + 24)), 1)) + + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 && int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiColumn + uintptr(saved_nEq)*2))) >= 0 { + + *(*LogEst)(unsafe.Pointer(pNew + 22)) += LogEst(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb)) + *(*LogEst)(unsafe.Pointer(pNew + 22)) -= LogEst(nIn) + } else { + *(*TRowcnt)(unsafe.Pointer(bp + 112 /* nOut */)) = TRowcnt(0) + if int32(nInMul) == 0 && + (*Index)(unsafe.Pointer(pProbe)).FnSample != 0 && + int32(*(*U16)(unsafe.Pointer(pNew + 24))) <= (*Index)(unsafe.Pointer(pProbe)).FnSampleCol && + (int32(eOp)&WO_IN == 0 || (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_xIsSelect) == U32(0)) && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { + var pExpr uintptr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + if int32(eOp)&(WO_EQ|WO_ISNULL|WO_IS) != 0 { + + rc = whereEqualScanEst(tls, pParse, pBuilder, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+112) + } else { + rc = whereInScanEst(tls, pParse, pBuilder, *(*uintptr)(unsafe.Pointer(pExpr + 32)), bp+112) + } + if rc == SQLITE_NOTFOUND { + rc = SQLITE_OK + } + if rc != SQLITE_OK { + break + } // Jump out of the pTerm loop + if *(*TRowcnt)(unsafe.Pointer(bp + 112)) != 0 { + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = Xsqlite3LogEst(tls, uint64(*(*TRowcnt)(unsafe.Pointer(bp + 112 /* nOut */)))) + if nEq == 1 && + + int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut)+10 > int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst))) { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_HIGHTRUTH) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_HEURTRUTH != 0 { + // If the term has previously been used with an assumption of + // higher selectivity, then set the flag to rerun the + // loop computations. + *(*uint8)(unsafe.Pointer(pBuilder + 45)) |= uint8(SQLITE_BLDF2_2NDPASS) + } + } + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut) > int32(saved_nOut) { + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = saved_nOut + } + *(*LogEst)(unsafe.Pointer(pNew + 22)) -= LogEst(nIn) + } + } + if *(*TRowcnt)(unsafe.Pointer(bp + 112)) == TRowcnt(0) { + *(*LogEst)(unsafe.Pointer(pNew + 22)) += LogEst(int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(nEq)*2))) - int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(nEq-1)*2)))) + if int32(eOp)&WO_ISNULL != 0 { + // TUNING: If there is no likelihood() value, assume that a + // "col IS NULL" expression matches twice as many rows + // as (col=?). + *(*LogEst)(unsafe.Pointer(pNew + 22)) += int16(10) + } + } + } + } + + // Set rCostIdx to the cost of visiting selected rows in index. Add + // it to pNew->rRun, which is currently set to the cost of the index + // seek only. Then, if this is a non-covering index, add the cost of + // visiting the rows in the main table. + + rCostIdx = LogEst(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut) + 1 + 15*int32((*Index)(unsafe.Pointer(pProbe)).FszIdxRow)/int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FszTabRow)) + (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = Xsqlite3LogEstAdd(tls, rLogSize, rCostIdx) + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_IDX_ONLY|WHERE_IPK) == U32(0) { + (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = Xsqlite3LogEstAdd(tls, (*WhereLoop)(unsafe.Pointer(pNew)).FrRun, int16(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut)+16)) + } + + nOutUnadjusted = (*WhereLoop)(unsafe.Pointer(pNew)).FnOut + *(*LogEst)(unsafe.Pointer(pNew + 20)) += LogEst(int32(nInMul) + nIn) + *(*LogEst)(unsafe.Pointer(pNew + 22)) += LogEst(int32(nInMul) + nIn) + whereLoopOutputAdjust(tls, (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC, pNew, rSize) + rc = whereLoopInsert(tls, pBuilder, pNew) + + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_COLUMN_RANGE) != 0 { + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = saved_nOut + } else { + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = nOutUnadjusted + } + + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_TOP_LIMIT) == U32(0) && + int32(*(*U16)(unsafe.Pointer(pNew + 24))) < int32((*Index)(unsafe.Pointer(pProbe)).FnColumn) && + (int32(*(*U16)(unsafe.Pointer(pNew + 24))) < int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol) || int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x3>>0) != SQLITE_IDXTYPE_PRIMARYKEY) { + whereLoopAddBtreeIndex(tls, pBuilder, pSrc, pProbe, int16(int32(nInMul)+nIn)) + } + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = saved_nOut + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid = nRecValid + } + (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq = saved_prereq + *(*U16)(unsafe.Pointer(pNew + 24)) = saved_nEq + *(*U16)(unsafe.Pointer(pNew + 24 + 2 /* &.nBtm */)) = saved_nBtm + *(*U16)(unsafe.Pointer(pNew + 24 + 4 /* &.nTop */)) = saved_nTop + (*WhereLoop)(unsafe.Pointer(pNew)).FnSkip = saved_nSkip + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = saved_wsFlags + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = saved_nOut + (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm + + // Consider using a skip-scan if there are no WHERE clause constraints + // available for the left-most terms of the index, and if the average + // number of repeats in the left-most terms is at least 18. + // + // The magic number 18 is selected on the basis that scanning 17 rows + // is almost always quicker than an index seek (even though if the index + // contains fewer than 2^17 rows we assume otherwise in other parts of + // the code). And, even if it is not, it should not be too much slower. + // On the other hand, the extra seeks could end up being significantly + // more expensive. + + if int32(saved_nEq) == int32(saved_nSkip) && + int32(saved_nEq)+1 < int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol) && + int32(saved_nEq) == int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) && + int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x40>>6) == 0 && + int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x80>>7) != 0 && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_SkipScan) == U32(0) && + int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(int32(saved_nEq)+1)*2))) >= 42 && + libc.AssignInt32(&rc, whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1)) == SQLITE_OK { + var nIter LogEst + *(*U16)(unsafe.Pointer(pNew + 24))++ + (*WhereLoop)(unsafe.Pointer(pNew)).FnSkip++ + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_SKIPSCAN) + nIter = LogEst(int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(saved_nEq)*2))) - int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(int32(saved_nEq)+1)*2)))) + *(*LogEst)(unsafe.Pointer(pNew + 22)) -= LogEst(int32(nIter)) + // TUNING: Because uncertainties in the estimates for skip-scan queries, + // add a 1.375 fudge factor to make skip-scan slightly less likely. + nIter = int16(int32(nIter) + 5) + whereLoopAddBtreeIndex(tls, pBuilder, pSrc, pProbe, int16(int32(nIter)+int32(nInMul))) + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = saved_nOut + *(*U16)(unsafe.Pointer(pNew + 24)) = saved_nEq + (*WhereLoop)(unsafe.Pointer(pNew)).FnSkip = saved_nSkip + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = saved_wsFlags + } + + return rc +} + +// Return True if it is possible that pIndex might be useful in +// implementing the ORDER BY clause in pBuilder. +// +// Return False if pBuilder does not contain an ORDER BY clause or +// if there is no way for pIndex to be useful in implementing that +// ORDER BY clause. +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ + var pOB uintptr + var aColExpr uintptr + var ii int32 + var jj int32 + + if uint32(int32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x4>>2)) != 0 { + return 0 + } + if libc.AssignUintptr(&pOB, (*WhereInfo)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo)).FpOrderBy) == uintptr(0) { + return 0 + } + for ii = 0; ii < (*ExprList)(unsafe.Pointer(pOB)).FnExpr; ii++ { + var pExpr uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pOB+8+uintptr(ii)*32)).FpExpr) + if pExpr == uintptr(0) { + continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == iCursor { + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < 0 { + return 1 + } + for jj = 0; jj < int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol); jj++ { + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(jj)*2))) { + return 1 + } + } + } else if libc.AssignUintptr(&aColExpr, (*Index)(unsafe.Pointer(pIndex)).FaColExpr) != uintptr(0) { + for jj = 0; jj < int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol); jj++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(jj)*2))) != -2 { + continue + } + if Xsqlite3ExprCompareSkip(tls, pExpr, (*ExprList_item)(unsafe.Pointer(aColExpr+8+uintptr(jj)*32)).FpExpr, iCursor) == 0 { + return 1 + } + } + } + } + return 0 +} + +// Check to see if a partial index with pPartIndexWhere can be used +// in the current query. Return true if it can be and false if not. +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ + var i int32 + var pTerm uintptr + var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse + for int32((*Expr)(unsafe.Pointer(pWhere)).Fop) == TK_AND { + if !(whereUsablePartialIndex(tls, iTab, isLeft, pWC, (*Expr)(unsafe.Pointer(pWhere)).FpLeft) != 0) { + return 0 + } + pWhere = (*Expr)(unsafe.Pointer(pWhere)).FpRight + } + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_EnableQPSG) != 0 { + pParse = uintptr(0) + } + i = 0 + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa +__1: + if !(i < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { + goto __3 + } + { + var pExpr uintptr + pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + if (!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0)) || *(*int32)(unsafe.Pointer(pExpr + 52)) == iTab) && + (isLeft == 0 || (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0)) && + Xsqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, iTab) != 0 && + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VNULL == 0 { + return 1 + } + + } + goto __2 +__2: + i++ + pTerm += 56 + goto __1 + goto __3 +__3: + ; + return 0 +} + +// Add all WhereLoop objects for a single table of the join where the table +// is identified by pBuilder->pNew->iTab. That table is guaranteed to be +// a b-tree table, not a virtual table. +// +// The costs (WhereLoop.rRun) of the b-tree loops added by this function +// are calculated as follows: +// +// For a full scan, assuming the table (or index) contains nRow rows: +// +// cost = nRow * 3.0 // full-table scan +// cost = nRow * K // scan of covering index +// cost = nRow * (K+3.0) // scan of non-covering index +// +// where K is a value between 1.1 and 3.0 set based on the relative +// estimated average size of the index and table records. +// +// For an index scan, where nVisit is the number of index rows visited +// by the scan, and nSeek is the number of seek operations required on +// the index b-tree: +// +// cost = nSeek * (log(nRow) + K * nVisit) // covering index +// cost = nSeek * (log(nRow) + (K+3.0) * nVisit) // non-covering index +// +// Normally, nSeek is 1. nSeek values greater than 1 come about if the +// WHERE clause includes "x IN (....)" terms used in place of "x=?". Or when +// implicit "x IN (SELECT x FROM tbl)" terms are added for skip-scans. +// +// The estimated values (nRow, nVisit, nSeek) often contain a large amount +// of uncertainty. For this reason, scoring is designed to pick plans that +// "do the least harm" if the estimates are inaccurate. For example, a +// log(nRow) factor is omitted from a non-covering index scan in order to +// bias the scoring in favor of using an index, since the worst-case +// performance of using an index is far better than the worst-case performance +// of a full table scan. +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ + bp := tls.Alloc(158) + defer tls.Free(158) + + var pWInfo uintptr // WHERE analysis context + var pProbe uintptr // An index we are evaluating + // var sPk Index at bp, 152 + // A fake index object for the primary key + // var aiRowEstPk [2]LogEst at bp+154, 4 + // The aiRowLogEst[] value for the sPk index + *(*I16)(unsafe.Pointer(bp + 152 /* aiColumnPk */)) = int16(-1) // The aColumn[] value for the sPk index + var pTabList uintptr // The FROM clause + var pSrc uintptr // The FROM clause btree term to add + var pNew uintptr // Template WhereLoop object + var rc int32 = SQLITE_OK // Return code + var iSortIdx int32 = 1 // Index number + var b int32 // A boolean value + var rSize LogEst // number of rows in the table + var pWC uintptr // The parsed WHERE clause + var pTab uintptr // Table being queried + + pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + pWInfo = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo + pTabList = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + pSrc = pTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pNew)).FiTab)*112 + pTab = (*SrcItem)(unsafe.Pointer(pSrc)).FpTab + pWC = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC + + if uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x2>>1)) != 0 { + + // An INDEXED BY clause specifies a particular index to use + pProbe = *(*uintptr)(unsafe.Pointer(pSrc + 104)) + } else if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + pProbe = (*Table)(unsafe.Pointer(pTab)).FpIndex + } else { + // There is no INDEXED BY clause. Create a fake Index object in local + // variable sPk to represent the rowid primary key index. Make this + // fake index the first in a chain of Index objects with all of the real + // indices to follow + var pFirst uintptr // First of real indices on the table + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Index{}))) + (*Index)(unsafe.Pointer(bp /* &sPk */)).FnKeyCol = U16(1) + (*Index)(unsafe.Pointer(bp /* &sPk */)).FnColumn = U16(1) + (*Index)(unsafe.Pointer(bp /* &sPk */)).FaiColumn = bp + 152 /* &aiColumnPk */ + (*Index)(unsafe.Pointer(bp /* &sPk */)).FaiRowLogEst = bp + 154 /* &aiRowEstPk[0] */ + (*Index)(unsafe.Pointer(bp /* &sPk */)).FonError = U8(OE_Replace) + (*Index)(unsafe.Pointer(bp /* &sPk */)).FpTable = pTab + (*Index)(unsafe.Pointer(bp /* &sPk */)).FszIdxRow = (*Table)(unsafe.Pointer(pTab)).FszTabRow + libc.SetBitFieldPtr16Uint32(bp+100, uint32(SQLITE_IDXTYPE_IPK), 0, 0x3) + *(*LogEst)(unsafe.Pointer(bp + 154)) = (*Table)(unsafe.Pointer(pTab)).FnRowLogEst + *(*LogEst)(unsafe.Pointer(bp + 154 + 1*2)) = int16(0) + pFirst = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FpIndex + if int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x1>>0) == 0 { + // The real indices of the table are only considered if the + // NOT INDEXED qualifier is omitted from the FROM clause + (*Index)(unsafe.Pointer(bp /* &sPk */)).FpNext = pFirst + } + pProbe = bp /* &sPk */ + } + rSize = (*Table)(unsafe.Pointer(pTab)).FnRowLogEst + + // Automatic indexes + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpOrSet) != 0) && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_OR_SUBCLAUSE == 0 && + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb)).Fflags&uint64(SQLITE_AutoIndex) != uint64(0) && + !(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x2>>1) != 0) && + !(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x1>>0) != 0) && + (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) && + !(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x8>>3) != 0) && + !(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x20>>5) != 0) { + // Generate auto-index WhereLoops + var rLogSize LogEst // Logarithm of the number of rows in the table + var pTerm uintptr + var pWCEnd uintptr = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer(pWC)).FnTerm)*56 + rLogSize = estLog(tls, rSize) + for pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa; rc == SQLITE_OK && pTerm < pWCEnd; pTerm += 56 { + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight&(*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf != 0 { + continue + } + if termCanDriveIndex(tls, pTerm, pSrc, uint64(0)) != 0 { + *(*U16)(unsafe.Pointer(pNew + 24)) = U16(1) + (*WhereLoop)(unsafe.Pointer(pNew)).FnSkip = U16(0) + *(*uintptr)(unsafe.Pointer(pNew + 24 + 8 /* &.pIndex */)) = uintptr(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(1) + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm)) = pTerm + // TUNING: One-time cost for computing the automatic index is + // estimated to be X*N*log2(N) where N is the number of rows in + // the table being indexed and where X is 7 (LogEst=28) for normal + // tables or 0.5 (LogEst=-10) for views and subqueries. The value + // of X is smaller for views and subqueries so that the query planner + // will be more aggressive about generating automatic indexes for + // those objects, since there is no opportunity to add schema + // indexes on subqueries and views. + (*WhereLoop)(unsafe.Pointer(pNew)).FrSetup = LogEst(int32(rLogSize) + int32(rSize)) + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) == U32(0) { + *(*LogEst)(unsafe.Pointer(pNew + 18)) += int16(28) + } else { + *(*LogEst)(unsafe.Pointer(pNew + 18)) -= int16(10) + } + + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FrSetup) < 0 { + (*WhereLoop)(unsafe.Pointer(pNew)).FrSetup = int16(0) + } + // TUNING: Each index lookup yields 20 rows in the table. This + // is more than the usual guess of 10 rows, since we have no way + // of knowing how selective the index will ultimately be. It would + // not be unreasonable to make this value much larger. + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = int16(43) + (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = Xsqlite3LogEstAdd(tls, rLogSize, (*WhereLoop)(unsafe.Pointer(pNew)).FnOut) + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_AUTO_INDEX) + (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq = mPrereq | (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight + rc = whereLoopInsert(tls, pBuilder, pNew) + } + } + } + + // Loop over all indices. If there was an INDEXED BY clause, then only + // consider index pProbe. +__1: + if !(rc == SQLITE_OK && pProbe != 0) { + goto __3 + } + { + var isLeft int32 = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&JT_OUTER != 0) + if (*Index)(unsafe.Pointer(pProbe)).FpPartIdxWhere != uintptr(0) && + !(whereUsablePartialIndex(tls, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, isLeft, pWC, + (*Index)(unsafe.Pointer(pProbe)).FpPartIdxWhere) != 0) { + // See ticket [98d973b8f5] + goto __2 // Partial index inappropriate for this query + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x100>>8)) != 0 { + goto __2 + } + rSize = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst)) + *(*U16)(unsafe.Pointer(pNew + 24)) = U16(0) + *(*U16)(unsafe.Pointer(pNew + 24 + 2 /* &.nBtm */)) = U16(0) + *(*U16)(unsafe.Pointer(pNew + 24 + 4 /* &.nTop */)) = U16(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FnSkip = U16(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FiSortIdx = U8(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FrSetup = int16(0) + (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq = mPrereq + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = rSize + *(*uintptr)(unsafe.Pointer(pNew + 24 + 8 /* &.pIndex */)) = pProbe + b = indexMightHelpWithOrderBy(tls, pBuilder, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor) + + // The ONEPASS_DESIRED flags never occurs together with ORDER BY + + if int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x3>>0) == SQLITE_IDXTYPE_IPK { + // Integer primary key index + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_IPK) + + // Full table scan + (*WhereLoop)(unsafe.Pointer(pNew)).FiSortIdx = func() uint8 { + if b != 0 { + return uint8(iSortIdx) + } + return uint8(0) + }() + // TUNING: Cost of full table scan is 3.0*N. The 3.0 factor is an + // extra cost designed to discourage the use of full table scans, + // since index lookups have better worst-case performance if our + // stat guesses are wrong. Reduce the 3.0 penalty slightly + // (to 2.75) if we have valid STAT4 information for the table. + // At 2.75, a full table scan is preferred over using an index on + // a column with just two distinct values where each value has about + // an equal number of appearances. Without STAT4 data, we still want + // to use an index in that case, since the constraint might be for + // the scarcer of the two values, and in that case an index lookup is + // better. + (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + + whereLoopOutputAdjust(tls, pWC, pNew, rSize) + rc = whereLoopInsert(tls, pBuilder, pNew) + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = rSize + if rc != 0 { + goto __3 + } + } else { + var m Bitmask + if uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x20>>5)) != 0 { + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_IDX_ONLY | WHERE_INDEXED) + m = uint64(0) + } else { + m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { + if m == uint64(0) { + return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) + } + return uint32(WHERE_INDEXED) + }() + } + + // Full scan via index + if b != 0 || + !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) || + (*Index)(unsafe.Pointer(pProbe)).FpPartIdxWhere != uintptr(0) || + uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x2>>1)) != 0 || + m == uint64(0) && + int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x4>>2) == 0 && + int32((*Index)(unsafe.Pointer(pProbe)).FszIdxRow) < int32((*Table)(unsafe.Pointer(pTab)).FszTabRow) && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_ONEPASS_DESIRED == 0 && + Xsqlite3Config.FbUseCis != 0 && + (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb)).FdbOptFlags&U32(SQLITE_CoverIdxScan) == U32(0) { + (*WhereLoop)(unsafe.Pointer(pNew)).FiSortIdx = func() uint8 { + if b != 0 { + return uint8(iSortIdx) + } + return uint8(0) + }() + + // The cost of visiting the index rows is N*K, where K is + // between 1.1 and 3.0, depending on the relative sizes of the + // index and table rows. + (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 1 + 15*int32((*Index)(unsafe.Pointer(pProbe)).FszIdxRow)/int32((*Table)(unsafe.Pointer(pTab)).FszTabRow)) + if m != uint64(0) { + // If this is a non-covering index scan, add in the cost of + // doing table lookups. The cost will be 3x the number of + // lookups. Take into account WHERE clause terms that can be + // satisfied using just the index, and that do not require a + // table lookup. + var nLookup LogEst = LogEst(int32(rSize) + 16) // Base cost: N*3 + var ii int32 + var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor + var pWC2 uintptr = pWInfo + 112 + for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pWC2)).FnTerm; ii++ { + var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC2)).Fa + uintptr(ii)*56 + if !(Xsqlite3ExprCoveredByIndex(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, iCur, pProbe) != 0) { + break + } + // pTerm can be evaluated using just the index. So reduce + // the expected number of table lookups accordingly + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { + nLookup = LogEst(int32(nLookup) + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb)) + } else { + nLookup-- + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) != 0 { + nLookup = int16(int32(nLookup) - 19) + } + } + } + + (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = Xsqlite3LogEstAdd(tls, (*WhereLoop)(unsafe.Pointer(pNew)).FrRun, nLookup) + } + + whereLoopOutputAdjust(tls, pWC, pNew, rSize) + rc = whereLoopInsert(tls, pBuilder, pNew) + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = rSize + if rc != 0 { + goto __3 + } + } + } + + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FbldFlags1 = uint8(0) + rc = whereLoopAddBtreeIndex(tls, pBuilder, pSrc, pProbe, int16(0)) + if int32((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FbldFlags1) == SQLITE_BLDF1_INDEXED { + // If a non-unique index is used, or if a prefix of the key for + // unique index is used (making the index functionally non-unique) + // then the sqlite_stat1 data becomes important for scoring the + // plan + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_StatsUsed) + } + Xsqlite3Stat4ProbeFree(tls, (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid = 0 + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec = uintptr(0) + + } + goto __2 +__2: + pProbe = func() uintptr { + if uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x2>>1)) != 0 { + return uintptr(0) + } + return (*Index)(unsafe.Pointer(pProbe)).FpNext + }() + iSortIdx++ + goto __1 + goto __3 +__3: + ; + return rc +} + +// Return true if pTerm is a virtual table LIMIT or OFFSET term. +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ + + return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) +} + +// Argument pIdxInfo is already populated with all constraints that may +// be used by the virtual table identified by pBuilder->pNew->iTab. This +// function marks a subset of those constraints usable, invokes the +// xBestIndex method and adds the returned plan to pBuilder. +// +// A constraint is marked usable if: +// +// * Argument mUsable indicates that its prerequisites are available, and +// +// * It is not one of the operators specified in the mExclude mask passed +// as the fourth argument (which in practice is either WO_IN or 0). +// +// Argument mPrereq is a mask of tables that must be scanned before the +// virtual table in question. These are added to the plans prerequisites +// before it is added to pBuilder. +// +// Output parameter *pbIn is set to true if the plan added to pBuilder +// uses one or more WO_IN terms, or false otherwise. +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pWC uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC + var pHidden uintptr = pIdxInfo + 1*96 + var pIdxCons uintptr + var pUsage uintptr = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + var i int32 + var mxTerm int32 + var rc int32 = SQLITE_OK + var pNew uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo)).FpParse + var pSrc uintptr = (*WhereInfo)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pNew)).FiTab)*112 + var nConstraint int32 = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint + + *(*int32)(unsafe.Pointer(pbIn)) = 0 + (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq = mPrereq + + // Set the usable flag on the subset of constraints identified by + // arguments mUsable and mExclude. + pIdxCons = *(*uintptr)(unsafe.Pointer(pIdxInfo + 8)) + i = 0 +__1: + if !(i < nConstraint) { + goto __3 + } + { + var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).FiTermOffset)*56 + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable = uint8(0) + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight&mUsable == (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight && + int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&int32(mExclude) == 0 && + (pbRetryLimit != 0 || !(isLimitTerm(tls, pTerm) != 0)) { + (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable = uint8(1) + } + + } + goto __2 +__2: + i++ + pIdxCons += 12 + goto __1 + goto __3 +__3: + ; + + // Initialize the output fields of the sqlite3_index_info structure + libc.Xmemset(tls, pUsage, 0, uint64(unsafe.Sizeof(sqlite3_index_constraint_usage{}))*uint64(nConstraint)) + + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = uintptr(0) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 0 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 0 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(1e99) / float64(2) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(25) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxFlags = 0 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FcolUsed = Sqlite3_uint64(Sqlite3_int64((*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed)) + (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FmHandleIn = U32(0) + + // Invoke the virtual table xBestIndex() method + rc = vtabBestIndex(tls, pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FpTab, pIdxInfo) + if rc != 0 { + if rc == SQLITE_CONSTRAINT { + // If the xBestIndex method returns SQLITE_CONSTRAINT, that means + // that the particular combination of parameters provided is unusable. + // Make no entries in the loop table. + + return SQLITE_OK + } + return rc + } + + mxTerm = -1 + + libc.Xmemset(tls, (*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64(nConstraint)) + libc.Xmemset(tls, pNew+24, 0, uint64(unsafe.Sizeof(struct { + FidxNum int32 + FneedFree uint8 /* u32 needFree: 1, u32 bOmitOffset: 1 */ + F__ccgo_pad1 [1]byte + FisOrdered I8 + F__ccgo_pad2 [1]byte + FomitMask U16 + F__ccgo_pad3 [6]byte + FidxStr uintptr + FmHandleIn U32 + F__ccgo_pad4 [4]byte + }{}))) + pIdxCons = *(*uintptr)(unsafe.Pointer(pIdxInfo + 8)) + i = 0 +__4: + if !(i < nConstraint) { + goto __6 + } + { + var iTerm int32 + if libc.AssignInt32(&iTerm, (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage+uintptr(i)*8)).FargvIndex-1) >= 0 { + var pTerm uintptr + var j int32 = (*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).FiTermOffset + if iTerm >= nConstraint || + j < 0 || + j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || + int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+21765, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + + return SQLITE_ERROR + } + + pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(j)*56 + *(*Bitmask)(unsafe.Pointer(pNew)) |= (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight + + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) = pTerm + if iTerm > mxTerm { + mxTerm = iTerm + } + + if (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage+uintptr(i)*8)).Fomit != 0 { + if i < 16 && int32(1)<>0)) != 0 { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pNew + 24 + 16 /* &.idxStr */))) + libc.SetBitFieldPtr8Uint32(pNew+24+4, U32(0), 0, 0x1) + } + + return rc +} + +// Return the collating sequence for a constraint passed into xBestIndex. +// +// pIdxInfo must be an sqlite3_index_info structure passed into xBestIndex. +// This routine depends on there being a HiddenIndexInfo structure immediately +// following the sqlite3_index_info structure. +// +// Return a pointer to the collation name: +// +// 1. If there is an explicit COLLATE operator on the constaint, return it. +// +// 2. Else, if the column has an alternative collation, return that. +// +// 3. Otherwise, return "BINARY". +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ + var pHidden uintptr = pIdxInfo + 1*96 + var zRet uintptr = uintptr(0) + if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { + var pC uintptr = uintptr(0) + var iTerm int32 = (*sqlite3_index_constraint)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(iCons)*12)).FiTermOffset + var pX uintptr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer((*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FpWC)).Fa + uintptr(iTerm)*56)).FpExpr + if (*Expr)(unsafe.Pointer(pX)).FpLeft != 0 { + pC = Xsqlite3ExprCompareCollSeq(tls, (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FpParse, pX) + } + zRet = func() uintptr { + if pC != 0 { + return (*CollSeq)(unsafe.Pointer(pC)).FzName + } + return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) + }() + } + return zRet +} + +// Return true if constraint iCons is really an IN(...) constraint, or +// false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) +// or clear (if bHandle==0) the flag to handle it using an iterator. +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ + var pHidden uintptr = pIdxInfo + 1*96 + var m U32 = func() uint32 { + if iCons <= 31 { + return uint32(uint32(1)) << iCons + } + return uint32(0) + }() + if m&(*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FmIn != 0 { + if bHandle == 0 { + *(*U32)(unsafe.Pointer(pHidden + 24)) &= ^m + } else if bHandle > 0 { + *(*U32)(unsafe.Pointer(pHidden + 24)) |= m + } + return 1 + } + return 0 +} + +// This interface is callable from within the xBestIndex callback only. +// +// If possible, set (*ppVal) to point to an object containing the value +// on the right-hand-side of constraint iCons. +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ + var pH uintptr = pIdxInfo + 1*96 + var pVal uintptr = uintptr(0) + var rc int32 = SQLITE_OK + if iCons < 0 || iCons >= (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { + rc = SQLITE_MISUSE // EV: R-30545-25046 + } else { + if *(*uintptr)(unsafe.Pointer(pH + 32 + uintptr(iCons)*8)) == uintptr(0) { + var pTerm uintptr = (*WhereClause)(unsafe.Pointer((*HiddenIndexInfo)(unsafe.Pointer(pH)).FpWC)).Fa + uintptr((*sqlite3_index_constraint)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint+uintptr(iCons)*12)).FiTermOffset)*56 + rc = Xsqlite3ValueFromExpr(tls, + (*Parse)(unsafe.Pointer((*HiddenIndexInfo)(unsafe.Pointer(pH)).FpParse)).Fdb, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight, (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*HiddenIndexInfo)(unsafe.Pointer(pH)).FpParse)).Fdb)).Fenc, + uint8(SQLITE_AFF_BLOB), pH+32+uintptr(iCons)*8) + + } + pVal = *(*uintptr)(unsafe.Pointer(pH + 32 + uintptr(iCons)*8)) + } + *(*uintptr)(unsafe.Pointer(ppVal)) = pVal + + if rc == SQLITE_OK && pVal == uintptr(0) { // IMP: R-19933-32160 + rc = SQLITE_NOTFOUND // IMP: R-36424-56542 + } + + return rc +} + +// Return true if ORDER BY clause may be handled as DISTINCT. +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ + var pHidden uintptr = pIdxInfo + 1*96 + + return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct +} + +// Add all WhereLoop objects for a table of the join identified by +// pBuilder->pNew->iTab. That table is guaranteed to be a virtual table. +// +// If there are no LEFT or CROSS JOIN joins in the query, both mPrereq and +// mUnusable are set to 0. Otherwise, mPrereq is a mask of all FROM clause +// entries that occur before the virtual table in the FROM clause and are +// separated from it by at least one LEFT or CROSS JOIN. Similarly, the +// mUnusable mask contains all FROM clause entries that occur after the +// virtual table and are separated from it by at least one LEFT or +// CROSS JOIN. +// +// For example, if the query were: +// +// ... FROM t1, t2 LEFT JOIN t3, t4, vt CROSS JOIN t5, t6; +// +// then mPrereq corresponds to (t1, t2) and mUnusable to (t5, t6). +// +// All the tables in mPrereq must be scanned before the current virtual +// table. So any terms for which all prerequisites are satisfied by +// mPrereq may be specified as "usable" in all calls to xBestIndex. +// Conversely, all tables in mUnusable must be scanned after the current +// virtual table, so any terms for which the prerequisites overlap with +// mUnusable should always be configured as "not-usable" for xBestIndex. +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var rc int32 = SQLITE_OK // Return code + var pWInfo uintptr // WHERE analysis context + var pParse uintptr // The parsing context + var pWC uintptr // The WHERE clause + var pSrc uintptr // The FROM clause term to search + var p uintptr // Object to pass to xBestIndex() + var nConstraint int32 // Number of constraints in p + // var bIn int32 at bp+4, 4 + // True if plan uses IN(...) operator + var pNew uintptr + var mBest Bitmask // Tables used by best possible plan + // var mNoOmit U16 at bp, 2 + + *(*int32)(unsafe.Pointer(bp + 8 /* bRetry */)) = 0 // True to retry with LIMIT/OFFSET disabled + + pWInfo = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo + pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + pWC = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC + pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + pSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pNew)).FiTab)*112 + + p = allocateIndexInfo(tls, pWInfo, pWC, mUnusable, pSrc, bp) + if p == uintptr(0) { + return SQLITE_NOMEM + } + (*WhereLoop)(unsafe.Pointer(pNew)).FrSetup = int16(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_VIRTUALTABLE) + (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(0) + libc.SetBitFieldPtr8Uint32(pNew+24+4, U32(0), 0, 0x1) + nConstraint = (*Sqlite3_index_info)(unsafe.Pointer(p)).FnConstraint + if whereLoopResize(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew, nConstraint) != 0 { + freeIndexInfo(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p) + return SQLITE_NOMEM + } + + // First call xBestIndex() with all constraints usable. + + rc = whereLoopAddVirtualOne(tls, + pBuilder, mPrereq, libc.Uint64(libc.Uint64FromInt32(-1)), uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4, bp+8) + if *(*int32)(unsafe.Pointer(bp + 8)) != 0 { + + rc = whereLoopAddVirtualOne(tls, + pBuilder, mPrereq, libc.Uint64(libc.Uint64FromInt32(-1)), uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4, uintptr(0)) + } + + // If the call to xBestIndex() with all terms enabled produced a plan + // that does not require any source tables (IOW: a plan with mBest==0) + // and does not use an IN(...) operator, then there is no point in making + // any further calls to xBestIndex() since they will all return the same + // result (if the xBestIndex() implementation is sane). + if rc == SQLITE_OK && (libc.AssignUint64(&mBest, (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq & ^mPrereq) != uint64(0) || *(*int32)(unsafe.Pointer(bp + 4)) != 0) { + var seenZero int32 = 0 // True if a plan with no prereqs seen + var seenZeroNoIN int32 = 0 // Plan with no prereqs and no IN(...) seen + var mPrev Bitmask = uint64(0) + var mBestNoIn Bitmask = uint64(0) + + // If the plan produced by the earlier call uses an IN(...) term, call + // xBestIndex again, this time with IN(...) terms disabled. + if *(*int32)(unsafe.Pointer(bp + 4)) != 0 { + + rc = whereLoopAddVirtualOne(tls, + pBuilder, mPrereq, libc.Uint64(libc.Uint64FromInt32(-1)), uint16(WO_IN), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4, uintptr(0)) + + mBestNoIn = (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq & ^mPrereq + if mBestNoIn == uint64(0) { + seenZero = 1 + seenZeroNoIN = 1 + } + } + + // Call xBestIndex once for each distinct value of (prereqRight & ~mPrereq) + // in the set of terms that apply to the current virtual table. + for rc == SQLITE_OK { + var i int32 + var mNext Bitmask = libc.Uint64(libc.Uint64FromInt32(-1)) + + for i = 0; i < nConstraint; i++ { + var mThis Bitmask = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr((*sqlite3_index_constraint)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(p)).FaConstraint+uintptr(i)*12)).FiTermOffset)*56)).FprereqRight & ^mPrereq + if mThis > mPrev && mThis < mNext { + mNext = mThis + } + } + mPrev = mNext + if mNext == libc.Uint64(libc.Uint64FromInt32(-1)) { + break + } + if mNext == mBest || mNext == mBestNoIn { + continue + } + + rc = whereLoopAddVirtualOne(tls, + pBuilder, mPrereq, mNext|mPrereq, uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4, uintptr(0)) + if (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq == mPrereq { + seenZero = 1 + if *(*int32)(unsafe.Pointer(bp + 4)) == 0 { + seenZeroNoIN = 1 + } + } + } + + // If the calls to xBestIndex() in the above loop did not find a plan + // that requires no source tables at all (i.e. one guaranteed to be + // usable), make a call here with all source tables disabled + if rc == SQLITE_OK && seenZero == 0 { + + rc = whereLoopAddVirtualOne(tls, + pBuilder, mPrereq, mPrereq, uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4, uintptr(0)) + if *(*int32)(unsafe.Pointer(bp + 4)) == 0 { + seenZeroNoIN = 1 + } + } + + // If the calls to xBestIndex() have so far failed to find a plan + // that requires no source tables at all and does not use an IN(...) + // operator, make a final call to obtain one here. + if rc == SQLITE_OK && seenZeroNoIN == 0 { + + rc = whereLoopAddVirtualOne(tls, + pBuilder, mPrereq, mPrereq, uint16(WO_IN), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4, uintptr(0)) + } + } + + if (*Sqlite3_index_info)(unsafe.Pointer(p)).FneedToFreeIdxStr != 0 { + Xsqlite3_free(tls, (*Sqlite3_index_info)(unsafe.Pointer(p)).FidxStr) + } + freeIndexInfo(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p) + + return rc +} + +// Add WhereLoop entries to handle OR terms. This works for either +// btrees or virtual tables. +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ + bp := tls.Alloc(712) + defer tls.Free(712) + + var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo + var pWC uintptr + var pNew uintptr + var pTerm uintptr + var pWCEnd uintptr + var rc int32 = SQLITE_OK + var iCur int32 + // var tempWC WhereClause at bp+112, 488 + + // var sSubBuild WhereLoopBuilder at bp+600, 56 + + // var sSum WhereOrSet at bp, 56 + + // var sCur WhereOrSet at bp+56, 56 + + var pItem uintptr + + pWC = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC + pWCEnd = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer(pWC)).FnTerm)*56 + pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(WhereOrSet{}))) + pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pNew)).FiTab)*112 + iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor + + for pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa; pTerm < pWCEnd && rc == SQLITE_OK; pTerm += 56 { + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_OR != 0 && + (*WhereOrInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTerm + 32)))).Findexable&(*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf != uint64(0) { + var pOrWC uintptr = *(*uintptr)(unsafe.Pointer(pTerm + 32)) + var pOrWCEnd uintptr = (*WhereClause)(unsafe.Pointer(pOrWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer(pOrWC)).FnTerm)*56 + var pOrTerm uintptr + var once int32 = 1 + var i int32 + var j int32 + + *(*WhereLoopBuilder)(unsafe.Pointer(bp + 600 /* sSubBuild */)) = *(*WhereLoopBuilder)(unsafe.Pointer(pBuilder)) + (*WhereLoopBuilder)(unsafe.Pointer(bp + 600 /* &sSubBuild */)).FpOrSet = bp + 56 /* &sCur */ + + for pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWC)).Fa; pOrTerm < pOrWCEnd; pOrTerm += 56 { + if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { + (*WhereLoopBuilder)(unsafe.Pointer(bp + 600 /* &sSubBuild */)).FpWC = *(*uintptr)(unsafe.Pointer(pOrTerm + 32)) + } else if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur { + (*WhereClause)(unsafe.Pointer(bp + 112 /* &tempWC */)).FpWInfo = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo + (*WhereClause)(unsafe.Pointer(bp + 112 /* &tempWC */)).FpOuter = pWC + (*WhereClause)(unsafe.Pointer(bp + 112 /* &tempWC */)).Fop = U8(TK_AND) + (*WhereClause)(unsafe.Pointer(bp + 112 /* &tempWC */)).FnTerm = 1 + (*WhereClause)(unsafe.Pointer(bp + 112 /* &tempWC */)).FnBase = 1 + (*WhereClause)(unsafe.Pointer(bp + 112 /* &tempWC */)).Fa = pOrTerm + (*WhereLoopBuilder)(unsafe.Pointer(bp + 600 /* &sSubBuild */)).FpWC = bp + 112 /* &tempWC */ + } else { + continue + } + (*WhereOrSet)(unsafe.Pointer(bp + 56 /* &sCur */)).Fn = U16(0) + if int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FeTabType) == TABTYP_VTAB { + rc = whereLoopAddVirtual(tls, bp+600, mPrereq, mUnusable) + } else { + rc = whereLoopAddBtree(tls, bp+600, mPrereq) + } + if rc == SQLITE_OK { + rc = whereLoopAddOr(tls, bp+600, mPrereq, mUnusable) + } + + if int32((*WhereOrSet)(unsafe.Pointer(bp+56)).Fn) == 0 { + (*WhereOrSet)(unsafe.Pointer(bp /* &sSum */)).Fn = U16(0) + break + } else if once != 0 { + whereOrMove(tls, bp, bp+56) + once = 0 + } else { + // var sPrev WhereOrSet at bp+656, 56 + + whereOrMove(tls, bp+656, bp) + (*WhereOrSet)(unsafe.Pointer(bp /* &sSum */)).Fn = U16(0) + for i = 0; i < int32((*WhereOrSet)(unsafe.Pointer(bp+656 /* &sPrev */)).Fn); i++ { + for j = 0; j < int32((*WhereOrSet)(unsafe.Pointer(bp+56 /* &sCur */)).Fn); j++ { + whereOrInsert(tls, bp, (*WhereOrCost)(unsafe.Pointer(bp+656+8+uintptr(i)*16)).Fprereq|(*WhereOrCost)(unsafe.Pointer(bp+56+8+uintptr(j)*16)).Fprereq, + Xsqlite3LogEstAdd(tls, (*WhereOrCost)(unsafe.Pointer(bp+656+8+uintptr(i)*16)).FrRun, (*WhereOrCost)(unsafe.Pointer(bp+56+8+uintptr(j)*16)).FrRun), + Xsqlite3LogEstAdd(tls, (*WhereOrCost)(unsafe.Pointer(bp+656+8+uintptr(i)*16)).FnOut, (*WhereOrCost)(unsafe.Pointer(bp+56+8+uintptr(j)*16)).FnOut)) + } + } + } + } + (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(1) + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm)) = pTerm + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_MULTI_OR) + (*WhereLoop)(unsafe.Pointer(pNew)).FrSetup = int16(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FiSortIdx = U8(0) + libc.Xmemset(tls, pNew+24, 0, uint64(unsafe.Sizeof(struct { + Fbtree struct { + FnEq U16 + FnBtm U16 + FnTop U16 + FnDistinctCol U16 + FpIndex uintptr + } + F__ccgo_pad1 [16]byte + }{}))) + for i = 0; rc == SQLITE_OK && i < int32((*WhereOrSet)(unsafe.Pointer(bp /* &sSum */)).Fn); i++ { + // TUNING: Currently sSum.a[i].rRun is set to the sum of the costs + // of all sub-scans required by the OR-scan. However, due to rounding + // errors, it may be that the cost of the OR-scan is equal to its + // most expensive sub-scan. Add the smallest possible penalty + // (equivalent to multiplying the cost by 1.07) to ensure that + // this does not happen. Otherwise, for WHERE clauses such as the + // following where there is an index on "y": + // + // WHERE likelihood(x=?, 0.99) OR y=? + // + // the planner may elect to "OR" together a full-table scan and an + // index lookup. And other similarly odd results. + (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32((*WhereOrCost)(unsafe.Pointer(bp+8+uintptr(i)*16)).FrRun) + 1) + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = (*WhereOrCost)(unsafe.Pointer(bp + 8 + uintptr(i)*16)).FnOut + (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq = (*WhereOrCost)(unsafe.Pointer(bp + 8 + uintptr(i)*16)).Fprereq + rc = whereLoopInsert(tls, pBuilder, pNew) + } + + } + } + return rc +} + +// Add all WhereLoop objects for all tables +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ + var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo + var mPrereq Bitmask = uint64(0) + var mPrior Bitmask = uint64(0) + var iTab int32 + var pTabList uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + var pItem uintptr + var pEnd uintptr = pTabList + 8 + uintptr((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)*112 + var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb + var rc int32 = SQLITE_OK + var pNew uintptr + + // Loop over the tables in the join, from left to right + pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) + iTab = 0 + pItem = pTabList + 8 /* &.a */ +__1: + if !(pItem < pEnd) { + goto __3 + } + { + var mUnusable Bitmask = uint64(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FiTab = U8(iTab) + *(*uint32)(unsafe.Pointer(pBuilder + 48)) += uint32(SQLITE_QUERY_PLANNER_LIMIT_INCR) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+600, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_CROSS) != 0 { + // This condition is true when pItem is the FROM clause term on the + // right-hand-side of a LEFT or CROSS JOIN. + mPrereq = mPrior + } else { + mPrereq = uint64(0) + } + if int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FeTabType) == TABTYP_VTAB { + var p uintptr + for p = pItem + 1*112; p < pEnd; p += 112 { + if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_LEFT|JT_CROSS) != 0 { + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+600, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + } + } + rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) + } else { + rc = whereLoopAddBtree(tls, pBuilder, mPrereq) + } + if rc == SQLITE_OK && (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC)).FhasOr != 0 { + rc = whereLoopAddOr(tls, pBuilder, mPrereq, mUnusable) + } + mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf + if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if rc == SQLITE_DONE { + // We hit the query planner search limit set by iPlanLimit + Xsqlite3_log(tls, SQLITE_WARNING, ts+21791, 0) + rc = SQLITE_OK + } else { + goto __3 + } + } + + } + goto __2 +__2: + iTab++ + pItem += 112 + goto __1 + goto __3 +__3: + ; + + whereLoopClear(tls, db, pNew) + return rc +} + +// Examine a WherePath (with the addition of the extra WhereLoop of the 6th +// parameters) to see if it outputs rows in the requested ORDER BY +// (or GROUP BY) without requiring a separate sort operation. Return N: +// +// N>0: N terms of the ORDER BY clause are satisfied +// N==0: No terms of the ORDER BY clause are satisfied +// N<0: Unknown yet how many terms of ORDER BY might be satisfied. +// +// Note that processing for WHERE_GROUPBY and WHERE_DISTINCTBY is not as +// strict. With GROUP BY and DISTINCT the only requirement is that +// equivalent rows appear immediately adjacent to one another. GROUP BY +// and DISTINCT do not require rows to appear in any particular order as long +// as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT +// the pOrderBy terms can be matched in any order. With ORDER BY, the +// pOrderBy terms must be matched in strict left-to-right order. +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ + var revSet U8 // True if rev is known + var rev U8 // Composite sort order + var revIdx U8 // Index sort order + var isOrderDistinct U8 // All prior WhereLoops are order-distinct + var distinctColumns U8 // True if the loop has UNIQUE NOT NULL columns + var isMatch U8 // iColumn matches a term of the ORDER BY clause + var eqOpMask U16 // Allowed equality operators + var nKeyCol U16 // Number of key columns in pIndex + var nColumn U16 // Total number of ordered columns in the index + var nOrderBy U16 // Number terms in the ORDER BY clause + var iLoop int32 // Index of WhereLoop in pPath being processed + var i int32 + var j int32 // Loop counters + var iCur int32 // Cursor number for current WhereLoop + var iColumn int32 // A column number within table iCur + var pLoop uintptr = uintptr(0) // Current WhereLoop being processed. + var pTerm uintptr // A single term of the WHERE clause + var pOBExpr uintptr // An expression from the ORDER BY clause + var pColl uintptr // COLLATE function from an ORDER BY clause term + var pIndex uintptr // The index associated with pLoop + var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb // Database connection + var obSat Bitmask = uint64(0) // Mask of ORDER BY terms satisfied so far + var obDone Bitmask // Mask of all ORDER BY terms + var orderDistinctMask Bitmask // Mask of all well-ordered loops + var ready Bitmask // Mask of inner loops + + // We say the WhereLoop is "one-row" if it generates no more than one + // row of output. A WhereLoop is one-row if all of the following are true: + // (a) All index columns match with WHERE_COLUMN_EQ. + // (b) The index is unique + // Any WhereLoop with an WHERE_COLUMN_EQ constraint on the rowid is one-row. + // Every one-row WhereLoop will have the WHERE_ONEROW bit set in wsFlags. + // + // We say the WhereLoop is "order-distinct" if the set of columns from + // that WhereLoop that are in the ORDER BY clause are different for every + // row of the WhereLoop. Every one-row WhereLoop is automatically + // order-distinct. A WhereLoop that has no columns in the ORDER BY clause + // is not order-distinct. To be order-distinct is not quite the same as being + // UNIQUE since a UNIQUE column or index can have multiple rows that + // are NULL and NULL values are equivalent for the purpose of order-distinct. + // To be order-distinct, the columns must be UNIQUE and NOT NULL. + // + // The rowid for a table is always UNIQUE and NOT NULL so whenever the + // rowid appears in the ORDER BY clause, the corresponding WhereLoop is + // automatically order-distinct. + + if nLoop != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_OrderByIdxJoin) != U32(0) { + return int8(0) + } + + nOrderBy = U16((*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) + + if int32(nOrderBy) > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return int8(0) + } // Cannot optimize overly large ORDER BYs + isOrderDistinct = U8(1) + obDone = Bitmask(uint64(1))< 0 { + ready = ready | (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf + } + if iLoop < int32(nLoop) { + pLoop = *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pPath)).FaLoop + uintptr(iLoop)*8)) + if int32(wctrlFlags)&WHERE_ORDERBY_LIMIT != 0 { + continue + } + } else { + pLoop = pLast + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != 0 { + if *(*I8)(unsafe.Pointer(pLoop + 24 + 6)) != 0 && int32(wctrlFlags)&WHERE_DISTINCTBY == 0 { + obSat = obDone + } + break + } else if int32(wctrlFlags)&WHERE_DISTINCTBY != 0 { + *(*U16)(unsafe.Pointer(pLoop + 24 + 6 /* &.nDistinctCol */)) = U16(0) + } + iCur = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*112)).FiCursor + + // Mark off any ORDER BY term X that is a column in the table of + // the current loop for which there is term in the WHERE + // clause of the form X IS NULL or X=? that reference only outer + // loops. + for i = 0; i < int32(nOrderBy); i++ { + if Bitmask(uint64(1))<= int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) { + continue + } + } + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) != 0 && int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn) >= 0 { + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pOrderBy+8+uintptr(i)*32)).FpExpr) + var pColl2 uintptr = Xsqlite3ExprCompareCollSeq(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr) + + if pColl2 == uintptr(0) || Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) != 0 { + continue + } + + } + obSat = obSat | Bitmask(uint64(1))<>2)) != 0 { + return int8(0) + } else { + nKeyCol = (*Index)(unsafe.Pointer(pIndex)).FnKeyCol + nColumn = (*Index)(unsafe.Pointer(pIndex)).FnColumn + + // All relevant terms of the index must also be non-NULL in order + // for isOrderDistinct to be true. So the isOrderDistint value + // computed here might be a false positive. Corrections will be + // made at tag-20210426-1 below + isOrderDistinct = U8(libc.Bool32(int32((*Index)(unsafe.Pointer(pIndex)).FonError) != OE_None && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_SKIPSCAN) == U32(0))) + } + + // Loop through all columns of the index and deal with the ones + // that are not constrained by == or IN. + rev = libc.AssignUint8(&revSet, U8(0)) + distinctColumns = U8(0) + for j = 0; j < int32(nColumn); j++ { + var bOnce U8 = U8(1) // True to run the ORDER BY search loop + + if j < int32(*(*U16)(unsafe.Pointer(pLoop + 24))) && j >= int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { + var eOp U16 = (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)))).FeOperator + + // Skip over == and IS and ISNULL terms. (Also skip IN terms when + // doing WHERE_ORDERBY_LIMIT processing). Except, IS and ISNULL + // terms imply that the index is not UNIQUE NOT NULL in which case + // the loop need to be marked as not order-distinct because it can + // have repeated NULL rows. + // + // If the current term is a column of an ((?,?) IN (SELECT...)) + // expression for which the SELECT returns more than one column, + // check that it is the only column used by this loop. Otherwise, + // if it is one of two or more, none of the columns can be + // considered to match an ORDER BY term. + if int32(eOp)&int32(eqOpMask) != 0 { + if int32(eOp)&(WO_ISNULL|WO_IS) != 0 { + + isOrderDistinct = U8(0) + } + continue + } else if int32(eOp)&WO_IN != 0 { + // ALWAYS() justification: eOp is an equality operator due to the + // ju.btree.nEq constraint above. Any equality other + // than WO_IN is captured by the previous "if". So this one + // always has to be WO_IN. + var pX uintptr = (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)))).FpExpr + for i = j + 1; i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { + if (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)))).FpExpr == pX { + + bOnce = U8(0) + break + } + } + } + } + + // Get the column number in the table (iColumn) and sort order + // (revIdx) for the j-th column of the index. + if pIndex != 0 { + iColumn = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(j)*2))) + revIdx = U8(int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaSortOrder + uintptr(j)))) & KEYINFO_ORDER_DESC) + if iColumn == int32((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FiPKey) { + iColumn = -1 + } + } else { + iColumn = -1 + revIdx = U8(0) + } + + // An unconstrained column that might be NULL means that this + // WhereLoop is not well-ordered. tag-20210426-1 + if isOrderDistinct != 0 { + if iColumn >= 0 && + j >= int32(*(*U16)(unsafe.Pointer(pLoop + 24))) && + int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FaCol + uintptr(iColumn)*24 + 8))&0xf>>0) == 0 { + isOrderDistinct = U8(0) + } + if iColumn == -2 { + isOrderDistinct = U8(0) + } + } + + // Find the ORDER BY term that corresponds to the j-th column + // of the index and mark that ORDER BY term off + isMatch = U8(0) + for i = 0; bOnce != 0 && i < int32(nOrderBy); i++ { + if Bitmask(uint64(1))<= -1 { + if int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_AGG_COLUMN { + continue + } + if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { + continue + } + if int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn) != iColumn { + continue + } + } else { + var pIdxExpr uintptr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaColExpr + 8 + uintptr(j)*32)).FpExpr + if Xsqlite3ExprCompareSkip(tls, pOBExpr, pIdxExpr, iCur) != 0 { + continue + } + } + if iColumn != -1 { + pColl = Xsqlite3ExprNNCollSeq(tls, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse, (*ExprList_item)(unsafe.Pointer(pOrderBy+8+uintptr(i)*32)).FpExpr) + if Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(j)*8))) != 0 { + continue + } + } + if int32(wctrlFlags)&WHERE_DISTINCTBY != 0 { + *(*U16)(unsafe.Pointer(pLoop + 24 + 6 /* &.nDistinctCol */)) = U16(j + 1) + } + isMatch = U8(1) + break + } + if isMatch != 0 && int32(wctrlFlags)&WHERE_GROUPBY == 0 { + // Make sure the sort order is compatible in an ORDER BY clause. + // Sort order is irrelevant for a GROUP BY clause. + if revSet != 0 { + if int32(rev)^int32(revIdx) != int32((*ExprList_item)(unsafe.Pointer(pOrderBy+8+uintptr(i)*32)).FsortFlags)&KEYINFO_ORDER_DESC { + isMatch = U8(0) + } + } else { + rev = U8(int32(revIdx) ^ int32((*ExprList_item)(unsafe.Pointer(pOrderBy+8+uintptr(i)*32)).FsortFlags)&KEYINFO_ORDER_DESC) + if rev != 0 { + *(*Bitmask)(unsafe.Pointer(pRevMask)) |= Bitmask(uint64(1)) << iLoop + } + revSet = U8(1) + } + } + if isMatch != 0 && int32((*ExprList_item)(unsafe.Pointer(pOrderBy+8+uintptr(i)*32)).FsortFlags)&KEYINFO_ORDER_BIGNULL != 0 { + if j == int32(*(*U16)(unsafe.Pointer(pLoop + 24))) { + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_BIGNULL_SORT) + } else { + isMatch = U8(0) + } + } + if isMatch != 0 { + if iColumn == -1 { + + distinctColumns = U8(1) + } + obSat = obSat | Bitmask(uint64(1))< 0; i-- { + var m Bitmask + if i < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { + m = Bitmask(uint64(1))<> 3) +} + +// Return the cost of sorting nRow rows, assuming that the keys have +// nOrderby columns and that the first nSorted columns are already in +// order. +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ + // TUNING: Estimated cost of a full external sort, where N is + // the number of rows to sort is: + // + // cost = (3.0 * N * log(N)). + // + // Or, if the order-by clause has X terms but only the last Y + // terms are out of order, then block-sorting will reduce the + // sorting cost to: + // + // cost = (3.0 * N * log(N)) * (Y/X) + // + // The (Y/X) term is implemented using stack variable rScale + // below. + var rScale LogEst + var rSortCost LogEst + + rScale = LogEst(int32(Xsqlite3LogEst(tls, uint64((nOrderBy-nSorted)*100/nOrderBy))) - 66) + rSortCost = LogEst(int32(nRow) + int32(rScale) + 16) + + // Multiple by log(M) where M is the number of output rows. + // Use the LIMIT for M if it is smaller. Or if this sort is for + // a DISTINCT operator, M will be the number of distinct output + // rows, so fudge it downwards a bit. + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_USE_LIMIT != 0 && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit) < int32(nRow) { + nRow = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit + } else if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_WANT_DISTINCT != 0 { + // TUNING: In the sort for a DISTINCT operator, assume that the DISTINCT + // reduces the number of output rows by a factor of 2 + if int32(nRow) > 10 { + nRow = int16(int32(nRow) - 10) + } + } + rSortCost = LogEst(int32(rSortCost) + int32(estLog(tls, nRow))) + return rSortCost +} + +// Given the list of WhereLoop objects at pWInfo->pLoops, this routine +// attempts to find the lowest cost path that visits each WhereLoop +// once. This path is then loaded into the pWInfo->a[].pWLoop fields. +// +// Assume that the total number of output rows that will need to be sorted +// will be nRowEst (in the 10*log2 representation). Or, ignore sorting +// costs if nRowEst==0. +// +// Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation +// error occurs. +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var mxChoice int32 // Maximum number of simultaneous paths tracked + var nLoop int32 // Number of terms in the join + var pParse uintptr // Parsing context + var db uintptr // The database connection + var iLoop int32 // Loop counter over the terms of the join + var ii int32 + var jj int32 // Loop counters + var mxI int32 = 0 // Index of next entry to replace + var nOrderBy int32 // Number of ORDER BY clause terms + var mxCost LogEst = int16(0) // Maximum cost of a set of paths + var mxUnsorted LogEst = int16(0) // Maximum unsorted cost of a set of path + var nTo int32 + var nFrom int32 // Number of valid entries in aTo[] and aFrom[] + var aFrom uintptr // All nFrom paths at the previous level + var aTo uintptr // The nTo best paths at the current level + var pFrom uintptr // An element of aFrom[] that we are working on + var pTo uintptr // An element of aTo[] that we are working on + var pWLoop uintptr // One of the WhereLoop objects + var pX uintptr // Used to divy up the pSpace memory + var aSortCost uintptr = uintptr(0) // Sorting and partial sorting costs + var pSpace uintptr // Temporary memory used by this routine + var nSpace int32 // Bytes of space allocated at pSpace + + pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) + // TUNING: For simple queries, only the best path is tracked. + // For 2-way joins, the 5 best paths are followed. + // For joins of 3 or more tables, track the 10 best paths + if nLoop <= 1 { + mxChoice = 1 + } else { + mxChoice = func() int32 { + if nLoop == 2 { + return 5 + } + return 10 + }() + } + + // If nRowEst is zero and there is an ORDER BY clause, ignore it. In this + // case the purpose of this call is to estimate the number of rows returned + // by the overall query. Once this estimate has been obtained, the caller + // will invoke this function a second time, passing the estimate as the + // nRowEst parameter. + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) || int32(nRowEst) == 0 { + nOrderBy = 0 + } else { + nOrderBy = (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr + } + + // Allocate and initialize space for aTo, aFrom and aSortCost[] + nSpace = int32((uint64(unsafe.Sizeof(WherePath{})) + uint64(unsafe.Sizeof(uintptr(0)))*uint64(nLoop)) * uint64(mxChoice) * uint64(2)) + nSpace = int32(uint64(nSpace) + uint64(unsafe.Sizeof(LogEst(0)))*uint64(nOrderBy)) + pSpace = Xsqlite3DbMallocRawNN(tls, db, uint64(nSpace)) + if pSpace == uintptr(0) { + return SQLITE_NOMEM + } + aTo = pSpace + aFrom = aTo + uintptr(mxChoice)*32 + libc.Xmemset(tls, aFrom, 0, uint64(unsafe.Sizeof(WherePath{}))) + pX = aFrom + uintptr(mxChoice)*32 + ii = mxChoice * 2 + pFrom = aTo +__1: + if !(ii > 0) { + goto __3 + } + { + (*WherePath)(unsafe.Pointer(pFrom)).FaLoop = pX + + } + goto __2 +__2: + ii-- + pFrom += 32 + pX += 8 * uintptr(nLoop) + goto __1 + goto __3 +__3: + ; + if nOrderBy != 0 { + // If there is an ORDER BY clause and it is not being ignored, set up + // space for the aSortCost[] array. Each element of the aSortCost array + // is either zero - meaning it has not yet been initialized - or the + // cost of sorting nRowEst rows of data where the first X terms of + // the ORDER BY clause are already in order, where X is the array + // index. + aSortCost = pX + libc.Xmemset(tls, aSortCost, 0, uint64(unsafe.Sizeof(LogEst(0)))*uint64(nOrderBy)) + } + + // Seed the search with a single WherePath containing zero WhereLoops. + // + // TUNING: Do not let the number of iterations go above 28. If the cost + // of computing an automatic index is not paid back within the first 28 + // rows, then do not use the automatic index. + (*WherePath)(unsafe.Pointer(aFrom)).FnRow = func() int16 { + if (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop < U32(48) { + return int16((*Parse)(unsafe.Pointer(pParse)).FnQueryLoop) + } + return int16(48) + }() + nFrom = 1 + + if nOrderBy != 0 { + // If nLoop is zero, then there are no FROM terms in the query. Since + // in this case the query may return a maximum of one row, the results + // are already in the requested order. Set isOrdered to nOrderBy to + // indicate this. Or, if nLoop is greater than zero, set isOrdered to + // -1, indicating that the result set may or may not be ordered, + // depending on the loops added to the current plan. + (*WherePath)(unsafe.Pointer(aFrom)).FisOrdered = func() int8 { + if nLoop > 0 { + return int8(-1) + } + return int8(nOrderBy) + }() + } + + // Compute successively longer WherePaths using the previous generation + // of WherePaths as the basis for the next. Keep track of the mxChoice + // best paths at each generation + for iLoop = 0; iLoop < nLoop; iLoop++ { + nTo = 0 + ii = 0 + pFrom = aFrom + __4: + if !(ii < nFrom) { + goto __6 + } + { + for pWLoop = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops; pWLoop != 0; pWLoop = (*WhereLoop)(unsafe.Pointer(pWLoop)).FpNextLoop { + var nOut LogEst // Rows visited by (pFrom+pWLoop) + var rCost LogEst // Cost of path (pFrom+pWLoop) + var rUnsorted LogEst // Unsorted cost of (pFrom+pWLoop) + var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered // isOrdered for (pFrom+pWLoop) + var maskNew Bitmask // Mask of src visited by (..) + *(*Bitmask)(unsafe.Pointer(bp /* revMask */)) = uint64(0) // Mask of rev-order loops for (..) + + if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { + continue + } + if (*WhereLoop)(unsafe.Pointer(pWLoop)).FmaskSelf&(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { + continue + } + if (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_AUTO_INDEX) != U32(0) && int32((*WherePath)(unsafe.Pointer(pFrom)).FnRow) < 3 { + // Do not use an automatic index if the this loop is expected + // to run less than 1.25 times. It is tempting to also exclude + // automatic index usage on an outer loop, but sometimes an automatic + // index is useful in the outer loop of a correlated subquery. + + continue + } + + // At this point, pWLoop is a candidate to be the next loop. + // Compute its cost + rUnsorted = Xsqlite3LogEstAdd(tls, (*WhereLoop)(unsafe.Pointer(pWLoop)).FrSetup, int16(int32((*WhereLoop)(unsafe.Pointer(pWLoop)).FrRun)+int32((*WherePath)(unsafe.Pointer(pFrom)).FnRow))) + rUnsorted = Xsqlite3LogEstAdd(tls, rUnsorted, (*WherePath)(unsafe.Pointer(pFrom)).FrUnsorted) + nOut = LogEst(int32((*WherePath)(unsafe.Pointer(pFrom)).FnRow) + int32((*WhereLoop)(unsafe.Pointer(pWLoop)).FnOut)) + maskNew = (*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop | (*WhereLoop)(unsafe.Pointer(pWLoop)).FmaskSelf + if int32(isOrdered) < 0 { + isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, + uint16(iLoop), pWLoop, bp) + } else { + *(*Bitmask)(unsafe.Pointer(bp /* revMask */)) = (*WherePath)(unsafe.Pointer(pFrom)).FrevLoop + } + if int32(isOrdered) >= 0 && int32(isOrdered) < nOrderBy { + if int32(*(*LogEst)(unsafe.Pointer(aSortCost + uintptr(isOrdered)*2))) == 0 { + *(*LogEst)(unsafe.Pointer(aSortCost + uintptr(isOrdered)*2)) = whereSortingCost(tls, + pWInfo, nRowEst, nOrderBy, int32(isOrdered)) + } + // TUNING: Add a small extra penalty (5) to sorting as an + // extra encouragment to the query planner to select a plan + // where the rows emerge in the correct order without any sorting + // required. + rCost = LogEst(int32(Xsqlite3LogEstAdd(tls, rUnsorted, *(*LogEst)(unsafe.Pointer(aSortCost + uintptr(isOrdered)*2)))) + 5) + + } else { + rCost = rUnsorted + rUnsorted = int16(int32(rUnsorted) - 2) // TUNING: Slight bias in favor of no-sort plans + } + + // Check to see if pWLoop should be added to the set of + // mxChoice best-so-far paths. + // + // First look for an existing path among best-so-far paths + // that covers the same set of loops and has the same isOrdered + // setting as the current path candidate. + // + // The term "((pTo->isOrdered^isOrdered)&0x80)==0" is equivalent + // to (pTo->isOrdered==(-1))==(isOrdered==(-1))" for the range + // of legal values for isOrdered, -1..64. + jj = 0 + pTo = aTo + __7: + if !(jj < nTo) { + goto __9 + } + { + if (*WherePath)(unsafe.Pointer(pTo)).FmaskLoop == maskNew && + (int32((*WherePath)(unsafe.Pointer(pTo)).FisOrdered)^int32(isOrdered))&0x80 == 0 { + + goto __9 + } + + } + goto __8 + __8: + jj++ + pTo += 32 + goto __7 + goto __9 + __9: + ; + if jj >= nTo { + // None of the existing best-so-far paths match the candidate. + if nTo >= mxChoice && + (int32(rCost) > int32(mxCost) || int32(rCost) == int32(mxCost) && int32(rUnsorted) >= int32(mxUnsorted)) { + // The current candidate is no better than any of the mxChoice + // paths currently in the best-so-far buffer. So discard + // this candidate as not viable. + continue + } + // If we reach this points it means that the new candidate path + // needs to be added to the set of best-so-far paths. + if nTo < mxChoice { + // Increase the size of the aTo set by one + jj = libc.PostIncInt32(&nTo, 1) + } else { + // New path replaces the prior worst to keep count below mxChoice + jj = mxI + } + pTo = aTo + uintptr(jj)*32 + } else { + // Control reaches here if best-so-far path pTo=aTo[jj] covers the + // same set of loops and has the same isOrdered setting as the + // candidate path. Check to see if the candidate should replace + // pTo or if the candidate should be skipped. + // + // The conditional is an expanded vector comparison equivalent to: + // (pTo->rCost,pTo->nRow,pTo->rUnsorted) <= (rCost,nOut,rUnsorted) + if int32((*WherePath)(unsafe.Pointer(pTo)).FrCost) < int32(rCost) || + int32((*WherePath)(unsafe.Pointer(pTo)).FrCost) == int32(rCost) && + (int32((*WherePath)(unsafe.Pointer(pTo)).FnRow) < int32(nOut) || + int32((*WherePath)(unsafe.Pointer(pTo)).FnRow) == int32(nOut) && int32((*WherePath)(unsafe.Pointer(pTo)).FrUnsorted) <= int32(rUnsorted)) { + // Discard the candidate path from further consideration + + continue + } + + // Control reaches here if the candidate path is better than the + // pTo path. Replace pTo with the candidate. + } + // pWLoop is a winner. Add it to the set of best so far + (*WherePath)(unsafe.Pointer(pTo)).FmaskLoop = (*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop | (*WhereLoop)(unsafe.Pointer(pWLoop)).FmaskSelf + (*WherePath)(unsafe.Pointer(pTo)).FrevLoop = *(*Bitmask)(unsafe.Pointer(bp /* revMask */)) + (*WherePath)(unsafe.Pointer(pTo)).FnRow = nOut + (*WherePath)(unsafe.Pointer(pTo)).FrCost = rCost + (*WherePath)(unsafe.Pointer(pTo)).FrUnsorted = rUnsorted + (*WherePath)(unsafe.Pointer(pTo)).FisOrdered = isOrdered + libc.Xmemcpy(tls, (*WherePath)(unsafe.Pointer(pTo)).FaLoop, (*WherePath)(unsafe.Pointer(pFrom)).FaLoop, uint64(unsafe.Sizeof(uintptr(0)))*uint64(iLoop)) + *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pTo)).FaLoop + uintptr(iLoop)*8)) = pWLoop + if nTo >= mxChoice { + mxI = 0 + mxCost = (*WherePath)(unsafe.Pointer(aTo)).FrCost + mxUnsorted = (*WherePath)(unsafe.Pointer(aTo)).FnRow + jj = 1 + pTo = aTo + 1*32 + __10: + if !(jj < mxChoice) { + goto __12 + } + { + if int32((*WherePath)(unsafe.Pointer(pTo)).FrCost) > int32(mxCost) || + int32((*WherePath)(unsafe.Pointer(pTo)).FrCost) == int32(mxCost) && int32((*WherePath)(unsafe.Pointer(pTo)).FrUnsorted) > int32(mxUnsorted) { + mxCost = (*WherePath)(unsafe.Pointer(pTo)).FrCost + mxUnsorted = (*WherePath)(unsafe.Pointer(pTo)).FrUnsorted + mxI = jj + } + + } + goto __11 + __11: + jj++ + pTo += 32 + goto __10 + goto __12 + __12: + } + } + + } + goto __5 + __5: + ii++ + pFrom += 32 + goto __4 + goto __6 + __6: + ; + + // Swap the roles of aFrom and aTo for the next generation + pFrom = aTo + aTo = aFrom + aFrom = pFrom + nFrom = nTo + } + + if nFrom == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+21826, 0) + Xsqlite3DbFreeNN(tls, db, pSpace) + return SQLITE_ERROR + } + + // Find the lowest cost path. pFrom will be left pointing to that path + pFrom = aFrom + for ii = 1; ii < nFrom; ii++ { + if int32((*WherePath)(unsafe.Pointer(pFrom)).FrCost) > int32((*WherePath)(unsafe.Pointer(aFrom+uintptr(ii)*32)).FrCost) { + pFrom = aFrom + uintptr(ii)*32 + } + } + + // Load the lowest cost path into pWInfo + for iLoop = 0; iLoop < nLoop; iLoop++ { + var pLevel uintptr = pWInfo + 864 + uintptr(iLoop)*96 + (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop = libc.AssignUintptr(&pWLoop, *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(iLoop)*8))) + (*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom = (*WhereLoop)(unsafe.Pointer(pWLoop)).FiTab + (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112)).FiCursor + } + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_WANT_DISTINCT != 0 && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY == 0 && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) == WHERE_DISTINCT_NOOP && + nRowEst != 0 { + // var notUsed Bitmask at bp+8, 8 + + var rc int32 = int32(wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet, pFrom, + uint16(WHERE_DISTINCTBY), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*8)), bp+8)) + if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet)).FnExpr { + (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) + } + } + libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 2, 0x4) + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { + if int32((*WherePath)(unsafe.Pointer(pFrom)).FisOrdered) == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { + (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) + } + } else { + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = (*WherePath)(unsafe.Pointer(pFrom)).FrevLoop + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) <= 0 { + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) + if nLoop > 0 { + var wsFlags U32 = (*WhereLoop)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*8)))).FwsFlags + if wsFlags&U32(WHERE_ONEROW) == U32(0) && + wsFlags&U32(WHERE_IPK|WHERE_COLUMN_IN) != U32(WHERE_IPK|WHERE_COLUMN_IN) { + *(*Bitmask)(unsafe.Pointer(bp + 16 /* m */)) = uint64(0) + var rc int32 = int32(wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, + uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*8)), bp+16)) + + if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { + libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 2, 0x4) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16 /* m */)) + } + } + } + } else if nLoop != 0 && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == 1 && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) != 0 { + libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 2, 0x4) + } + } + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr && nLoop > 0 { + *(*Bitmask)(unsafe.Pointer(bp + 24 /* revMask */)) = uint64(0) + var nOrder int32 = int32(wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, + pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*8)), bp+24)) + + if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { + libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 3, 0x8) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24 /* revMask */)) + } + } + } + + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow + + // Free temporary memory and return success + Xsqlite3DbFreeNN(tls, db, pSpace) + return SQLITE_OK +} + +// Most queries use only a single table (they are not joins) and have +// simple == constraints against indexed fields. This routine attempts +// to plan those simple cases using much less ceremony than the +// general-purpose query planner, and thereby yield faster sqlite3_prepare() +// times for the common case. +// +// Return non-zero on success, if this query can be handled by this +// no-frills query planner. Return zero if this query needs the +// general-purpose query planner. +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + var pWInfo uintptr + var pItem uintptr + var pWC uintptr + var pTerm uintptr + var pLoop uintptr + var iCur int32 + var j int32 + var pTab uintptr + var pIdx uintptr + // var scan WhereScan at bp, 112 + + pWInfo = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_OR_SUBCLAUSE != 0 { + return 0 + } + + pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 /* &.a */ + pTab = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + return 0 + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x2>>1)) != 0 { + return 0 + } + iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor + pWC = pWInfo + 112 + pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) + (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) + pTerm = whereScanInit(tls, bp, pWC, iCur, -1, uint32(WO_EQ|WO_IS), uintptr(0)) + for pTerm != 0 && (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight != 0 { + pTerm = whereScanNext(tls, bp) + } + if pTerm != 0 { + + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(WHERE_COLUMN_EQ | WHERE_IPK | WHERE_ONEROW) + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm)) = pTerm + (*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm = U16(1) + *(*U16)(unsafe.Pointer(pLoop + 24)) = U16(1) + // TUNING: Cost of a rowid lookup is 10 + (*WhereLoop)(unsafe.Pointer(pLoop)).FrRun = int16(33) // 33==sqlite3LogEst(10) + } else { + for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + var opMask int32 + + if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None) || + (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != uintptr(0) || + int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) > int32(uint64(unsafe.Sizeof([3]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))) { + continue + } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { + opMask = WO_EQ | WO_IS + } else { + opMask = WO_EQ + } + for j = 0; j < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); j++ { + pTerm = whereScanInit(tls, bp, pWC, iCur, j, uint32(opMask), pIdx) + for pTerm != 0 && (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight != 0 { + pTerm = whereScanNext(tls, bp) + } + if pTerm == uintptr(0) { + break + } + + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) = pTerm + } + if j != int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) { + continue + } + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(WHERE_COLUMN_EQ | WHERE_ONEROW | WHERE_INDEXED) + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x20>>5)) != 0 || (*SrcItem)(unsafe.Pointer(pItem)).FcolUsed&(*Index)(unsafe.Pointer(pIdx)).FcolNotIdxed == uint64(0) { + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_IDX_ONLY) + } + (*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm = U16(j) + *(*U16)(unsafe.Pointer(pLoop + 24)) = U16(j) + *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx + // TUNING: Cost of a unique index lookup is 15 + (*WhereLoop)(unsafe.Pointer(pLoop)).FrRun = int16(39) // 39==sqlite3LogEst(15) + break + } + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { + (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) + (*WhereLevel)(unsafe.Pointer(pWInfo + 864)).FpWLoop = pLoop + + (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) // sqlite3WhereGetMask(&pWInfo->sMaskSet, iCur); + (*WhereLevel)(unsafe.Pointer(pWInfo + 864)).FiTabCur = iCur + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = int16(1) + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = I8((*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr) + } + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_WANT_DISTINCT != 0 { + (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) + } + if int32((*WhereScan)(unsafe.Pointer(bp)).FiEquiv) > 1 { + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_TRANSCONS) + } + return 1 + } + return 0 +} + +// Helper function for exprIsDeterministic(). +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { + (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) + return WRC_Abort + } + return WRC_Continue +} + +// Return true if the expression contains no non-deterministic SQL +// functions. Do not consider non-deterministic SQL functions that are +// part of sub-select statements. +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var w Walker at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(1) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{exprNodeIsDeterministic})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkFail})) + Xsqlite3WalkExpr(tls, bp, p) + return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) +} + +// Attempt to omit tables from a join that do not affect the result. +// For a table to not affect the result, the following must be true: +// +// 1) The query must not be an aggregate. +// 2) The table must be the RHS of a LEFT JOIN. +// 3) Either the query must be DISTINCT, or else the ON or USING clause +// must contain a constraint that limits the scan of the table to +// at most a single row. +// 4) The table must not be referenced by any part of the query apart +// from its own USING or ON clause. +// +// For example, given: +// +// CREATE TABLE t1(ipk INTEGER PRIMARY KEY, v1); +// CREATE TABLE t2(ipk INTEGER PRIMARY KEY, v2); +// CREATE TABLE t3(ipk INTEGER PRIMARY KEY, v3); +// +// then table t2 can be omitted from the following: +// +// SELECT v1, v3 FROM t1 +// LEFT JOIN t2 ON (t1.ipk=t2.ipk) +// LEFT JOIN t3 ON (t1.ipk=t3.ipk) +// +// or from: +// +// SELECT DISTINCT v1, v3 FROM t1 +// LEFT JOIN t2 +// LEFT JOIN t3 ON (t1.ipk=t3.ipk) +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ + var i int32 + var tabUsed Bitmask + + // Preconditions checked by the caller + + // These two preconditions checked by the caller combine to guarantee + // condition (1) of the header comment + + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+600, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+600, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + } + for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 1; i-- { + var pTerm uintptr + var pEnd uintptr + var pItem uintptr + var pLoop uintptr + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 864 + uintptr(i)*96)).FpWLoop + pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*112 + if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT == 0 { + continue + } + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_WANT_DISTINCT == 0 && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) == U32(0) { + continue + } + if tabUsed&(*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf != uint64(0) { + continue + } + pEnd = (*WhereInfo)(unsafe.Pointer(pWInfo)).FsWC.Fa + uintptr((*WhereInfo)(unsafe.Pointer(pWInfo)).FsWC.FnTerm)*56 + for pTerm = (*WhereInfo)(unsafe.Pointer(pWInfo)).FsWC.Fa; pTerm < pEnd; pTerm += 56 { + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf != uint64(0) { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_FromJoin) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pItem)).FiCursor { + break + } + } + } + if pTerm < pEnd { + continue + } + + notReady = notReady & ^(*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf + for pTerm = (*WhereInfo)(unsafe.Pointer(pWInfo)).FsWC.Fa; pTerm < pEnd; pTerm += 56 { + if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf != uint64(0) { + *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) + } + } + if i != int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1 { + var nByte int32 = int32(uint64(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1-i) * uint64(unsafe.Sizeof(WhereLevel{}))) + libc.Xmemmove(tls, pWInfo+864+uintptr(i)*96, pWInfo+864+uintptr(i+1)*96, uint64(nByte)) + } + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- + + } + return notReady +} + +// Check to see if there are any SEARCH loops that might benefit from +// using a Bloom filter. Consider a Bloom filter if: +// +// (1) The SEARCH happens more than N times where N is the number +// of rows in the table that is being considered for the Bloom +// filter. +// (2) Some searches are expected to find zero rows. (This is determined +// by the WHERE_SELFCULL flag on the term.) +// (3) Bloom-filter processing is not disabled. (Checked by the +// caller.) +// (4) The size of the table being searched is known by ANALYZE. +// +// This block of code merely checks to see if a Bloom filter would be +// appropriate, and if so sets the WHERE_BLOOMFILTER flag on the +// WhereLoop. The implementation of the Bloom filter comes further +// down where the code for each WhereLoop is generated. +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ + var i int32 + var nSearch LogEst + + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 864)).FpWLoop)).FnOut + for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 864 + uintptr(i)*96)).FpWLoop + var reqFlags uint32 = uint32(WHERE_SELFCULL | WHERE_COLUMN_EQ) + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&reqFlags == reqFlags && + + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK|WHERE_INDEXED) != U32(0) { + var pItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*112 + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_StatsUsed) + if int32(nSearch) > int32((*Table)(unsafe.Pointer(pTab)).FnRowLogEst) && + (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat1) != U32(0) { + + *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_BLOOMFILTER) + *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) + + } + } + nSearch = LogEst(int32(nSearch) + int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnOut)) + } +} + +// Generate the beginning of the loop used for WHERE clause processing. +// The return value is a pointer to an opaque structure that contains +// information needed to terminate the loop. Later, the calling routine +// should invoke sqlite3WhereEnd() with the return value of this function +// in order to complete the WHERE clause processing. +// +// If an error occurs, this routine returns NULL. +// +// The basic idea is to do a nested loop, one loop for each table in +// the FROM clause of a select. (INSERT and UPDATE statements are the +// same as a SELECT with only a single table in the FROM clause.) For +// example, if the SQL is this: +// +// SELECT * FROM t1, t2, t3 WHERE ...; +// +// Then the code generated is conceptually like the following: +// +// foreach row1 in t1 do \ Code generated +// foreach row2 in t2 do |-- by sqlite3WhereBegin() +// foreach row3 in t3 do / +// ... +// end \ Code generated +// end |-- by sqlite3WhereEnd() +// end / +// +// Note that the loops might not be nested in the order in which they +// appear in the FROM clause if a different order is better able to make +// use of indices. Note also that when the IN operator appears in +// the WHERE clause, it might result in additional nested loops for +// scanning through all values on the right-hand side of the IN. +// +// There are Btree cursors associated with each table. t1 uses cursor +// number pTabList->a[0].iCursor. t2 uses the cursor pTabList->a[1].iCursor. +// And so forth. This routine generates code to open those VDBE cursors +// and sqlite3WhereEnd() generates the code to close them. +// +// The code that sqlite3WhereBegin() generates leaves the cursors named +// in pTabList pointing at their appropriate entries. The [...] code +// can use OP_Column and OP_Rowid opcodes on these cursors to extract +// data from the various tables of the loop. +// +// If the WHERE clause is empty, the foreach loops must each scan their +// entire tables. Thus a three-way join is an O(N^3) operation. But if +// the tables have indices and there are terms in the WHERE clause that +// refer to those indices, a complete table scan can be avoided and the +// code will run much faster. Most of the work of this routine is checking +// to see if there are indices that can be used to speed up the loop. +// +// Terms of the WHERE clause are also used to limit which rows actually +// make it to the "..." in the middle of the loop. After each "foreach", +// terms of the WHERE clause that use only terms in that loop and outer +// loops are evaluated and if false a jump is made around all subsequent +// inner loops (or around the "..." if the test occurs within the inner- +// most loop) +// +// OUTER JOINS +// +// An outer join of tables t1 and t2 is conceptally coded as follows: +// +// foreach row1 in t1 do +// flag = 0 +// foreach row2 in t2 do +// start: +// ... +// flag = 1 +// end +// if flag==0 then +// move the row2 cursor to a null row +// goto start +// fi +// end +// +// ORDER BY CLAUSE PROCESSING +// +// pOrderBy is a pointer to the ORDER BY clause (or the GROUP BY clause +// if the WHERE_GROUPBY flag is set in wctrlFlags) of a SELECT statement +// if there is one. If there is no ORDER BY clause or if this routine +// is called from an UPDATE or DELETE statement, then pOrderBy is NULL. +// +// The iIdxCur parameter is the cursor number of an index. If +// WHERE_OR_SUBCLAUSE is set, iIdxCur is the cursor number of an index +// to use for OR clause processing. The WHERE clause should use this +// specific cursor. If WHERE_ONEPASS_DESIRED is set, then iIdxCur is +// the first cursor in an array of cursors for all indices. iIdxCur should +// be used to compute the appropriate cursor depending on which index is +// used. +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var nByteWInfo int32 // Num. bytes allocated for WhereInfo struct + var nTabList int32 // Number of elements in pTabList + var pWInfo uintptr // Will become the return value of this function + var v uintptr // The virtual database engine + var notReady Bitmask // Cursors that are not yet positioned + // var sWLB WhereLoopBuilder at bp+8, 56 + // The WhereLoop builder + var pMaskSet uintptr // The expression mask set + var pLevel uintptr // A single level in pWInfo->a[] + var pLoop uintptr // Pointer to a single WhereLoop object + var ii int32 // Loop counter + var db uintptr // Database connection + var rc int32 // Return code + var bFordelete U8 + var pT uintptr + var p uintptr + var wsFlags int32 + var bOnerow int32 + var pVTab uintptr + var iCur int32 + // If we know that only a prefix of the record will be used, + // it is advantageous to reduce the "column count" field in + // the P4 operand of the OP_OpenRead/Write opcode. + var b Bitmask + var n int32 + var op int32 + var pJ uintptr + var pIx uintptr + var iIndexCur int32 + var op1 int32 + var pTab uintptr // Table to open + var iDb int32 // Index of database containing table/index + var pTabItem uintptr + var addrExplain int32 + _ = addrExplain + var wsFlags1 int32 + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + bFordelete = U8(0) // OPFLAG_FORDELETE or zero, as appropriate + + // Only one of WHERE_OR_SUBCLAUSE or WHERE_USE_LIMIT + + // Variable initialization + db = (*Parse)(unsafe.Pointer(pParse)).Fdb + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(WhereLoopBuilder{}))) + + // An ORDER/GROUP BY clause of more than 63 terms cannot be optimized + + if !(pOrderBy != 0 && (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { + goto __1 + } + pOrderBy = uintptr(0) +__1: + ; + + // The number of tables in the FROM clause is limited by the number of + // bits in a Bitmask + + if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { + goto __2 + } + Xsqlite3ErrorMsg(tls, pParse, ts+21844, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + return uintptr(0) +__2: + ; + + // This function normally generates a nested loop for all tables in + // pTabList. But if the WHERE_OR_SUBCLAUSE flag is set, then we should + // only generate code for the first table in pTabList and assume that + // any cursors associated with subsequent tables are uninitialized. + if int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0 { + nTabList = 1 + } else { + nTabList = (*SrcList)(unsafe.Pointer(pTabList)).FnSrc + } + + // Allocate and initialize the WhereInfo structure that will become the + // return value. A single allocation is used to store the WhereInfo + // struct, the contents of WhereInfo.a[], the WhereClause structure + // and the WhereMaskSet structure. Since WhereClause contains an 8-byte + // field (type Bitmask) it must be aligned on an 8-byte boundary on + // some architectures. Hence the ROUND8() below. + nByteWInfo = int32((uint64(unsafe.Sizeof(WhereInfo{})) + uint64(nTabList-1)*uint64(unsafe.Sizeof(WhereLevel{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) + pWInfo = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(nByteWInfo)+uint64(unsafe.Sizeof(WhereLoop{})))) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __3 + } + Xsqlite3DbFree(tls, db, pWInfo) + pWInfo = uintptr(0) + goto whereBeginError +__3: + ; + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse = pParse + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList = pTabList + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pOrderBy + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpWhere = pWhere + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet = pResultSet + *(*int32)(unsafe.Pointer(pWInfo + 48)) = libc.AssignPtrInt32(pWInfo+48+1*4, -1) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel = U8(nTabList) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+56, Xsqlite3VdbeMakeLabel(tls, pParse)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags = wctrlFlags + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit = LogEst(iAuxArg) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop = int32((*Parse)(unsafe.Pointer(pParse)).FnQueryLoop) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit = pLimit + libc.Xmemset(tls, pWInfo+73, 0, + uint64(uintptr(0)+112)-uint64(uintptr(0)+73)) + libc.Xmemset(tls, pWInfo+864, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + // ONEPASS defaults to OFF + pMaskSet = pWInfo + 600 + (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 + *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 // Initialize ix[0] to a value that can never be + // a valid cursor number, to avoid an initial + // test for pMaskSet->n==0 in sqlite3WhereGetMask() + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpWInfo = pWInfo + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpWC = pWInfo + 112 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpNew = pWInfo + uintptr(nByteWInfo) + + whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpNew) + + // Split the WHERE clause into separate subexpressions where each + // subexpression is separated by an AND operator. + Xsqlite3WhereClauseInit(tls, pWInfo+112, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+112, pWhere, uint8(TK_AND)) + + // Special case: No FROM clause + if !(nTabList == 0) { + goto __4 + } + if !(pOrderBy != 0) { + goto __6 + } + (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = I8((*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) +__6: + ; + if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0 && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) == U32(0)) { + goto __7 + } + (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) +__7: + ; + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21872, 0) + goto __5 +__4: + // Assign a bit from the bitmask to every term in the FROM clause. + // + // The N-th term of the FROM clause is assigned a bitmask of 1<nSrc tables in + // pTabList, not just the first nTabList tables. nTabList is normally + // equal to pTabList->nSrc but might be shortened to 1 if the + // WHERE_OR_SUBCLAUSE flag is set. + ii = 0 +__8: + createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*112)).FiCursor) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*112, pWInfo+112) + goto __9 +__9: + if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { + goto __8 + } + goto __10 +__10: + ; +__5: + ; + + // Analyze all of the subexpressions. + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+112) + Xsqlite3WhereAddLimit(tls, pWInfo+112, pLimit) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __11 + } + goto whereBeginError +__11: + ; + + // Special case: WHERE terms that do not refer to any tables in the join + // (constant expressions). Evaluate each such term, and jump over all the + // generated code if the result is not true. + // + // Do not do this if the expression contains non-deterministic functions + // that are not within a sub-select. This is not strictly required, but + // preserves SQLite's legacy behaviour in the following two cases: + // + // FROM ... WHERE random()>0; -- eval random() once per row + // FROM ... WHERE (SELECT random())>0; -- eval random() once overall + ii = 0 +__12: + if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { + goto __14 + } + pT = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).Fa + uintptr(ii)*56 + if !(int32((*WhereTerm)(unsafe.Pointer(pT)).FwtFlags)&TERM_VIRTUAL != 0) { + goto __15 + } + goto __13 +__15: + ; + if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { + goto __16 + } + Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) + *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) +__16: + ; + goto __13 +__13: + ii++ + goto __12 + goto __14 +__14: + ; + + if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { + goto __17 + } + if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { + goto __18 + } + // Disable the DISTINCT optimization if SQLITE_DistinctOpt is set via + // sqlite3_test_ctrl(SQLITE_TESTCTRL_OPTIMIZATIONS,...) + wctrlFlags = libc.Uint16FromInt32(int32(wctrlFlags) & libc.CplInt32(WHERE_WANT_DISTINCT)) + *(*U16)(unsafe.Pointer(pWInfo + 68)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __19 +__18: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+112, pResultSet) != 0) { + goto __20 + } + // The DISTINCT marking is pointless. Ignore it. + (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) + goto __21 +__20: + if !(pOrderBy == uintptr(0)) { + goto __22 + } + // Try to ORDER BY the result set to make distinct processing easier + *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet +__22: + ; +__21: + ; +__19: + ; +__17: + ; + + // Construct the WhereLoop objects + + if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { + goto __23 + } + rc = whereLoopAddAll(tls, bp+8) + if !(rc != 0) { + goto __24 + } + goto whereBeginError +__24: + ; + + // If one or more WhereTerm.truthProb values were used in estimating + // loop parameters, but then those truthProb values were subsequently + // changed based on STAT4 information while computing subsequent loops, + // then we need to rerun the whole loop building process so that all + // loops will be built using the revised truthProb values. + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + goto __25 + } + +__26: + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { + goto __27 + } + p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop + whereLoopDelete(tls, db, p) + goto __26 +__27: + ; + rc = whereLoopAddAll(tls, bp+8) + if !(rc != 0) { + goto __28 + } + goto whereBeginError +__28: + ; +__25: + ; + + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __29 + } + goto whereBeginError +__29: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __30 + } + wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __31 + } + goto whereBeginError +__31: + ; +__30: + ; +__23: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { + goto __32 + } + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) +__32: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __33 + } + goto whereBeginError +__33: + ; + + // Attempt to omit tables from a join that do not affect the result. + // See the comment on whereOmitNoopJoin() for further information. + // + // This query optimization is factored out into a separate "no-inline" + // procedure to keep the sqlite3WhereBegin() procedure from becoming + // too large. If sqlite3WhereBegin() becomes too large, that prevents + // some C-compiler optimizers from in-lining the + // sqlite3WhereCodeOneLoopStart() procedure, and it is important to + // in-line sqlite3WhereCodeOneLoopStart() for performance reasons. + notReady = libc.CplUint64(uint64(0)) + if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && + pResultSet != uintptr(0) && + 0 == int32(wctrlFlags)&WHERE_AGG_DISTINCT && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_OmitNoopJoin) == U32(0)) { + goto __34 + } + notReady = whereOmitNoopJoin(tls, pWInfo, notReady) + nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) + +__34: + ; + + // Check to see if there are any SEARCH loops that might benefit from + // using a Bloom filter. + if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { + goto __35 + } + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__35: + ; + + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + // If the caller is an UPDATE or DELETE statement that is requesting + // to use a one-pass algorithm, determine if this is appropriate. + // + // A one-pass approach can be used if the caller has requested one + // and either (a) the scan visits at most one row or (b) each + // of the following are true: + // + // * the caller has indicated that a one-pass approach can be used + // with multiple rows (by setting WHERE_ONEPASS_MULTIROW), and + // * the table is not a virtual table, and + // * either the scan does not use the OR optimization or the caller + // is a DELETE operation (WHERE_DUPLICATES_OK is only specified + // for DELETE). + // + // The last qualification is because an UPDATE statement uses + // WhereInfo.aiCurOnePass[1] to determine whether or not it really can + // use a one-pass approach, and this is not set accurately for scans + // that use the OR optimization. + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __36 + } + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 864)).FpWLoop)).FwsFlags) + bOnerow = libc.Bool32(wsFlags&WHERE_ONEROW != 0) + + if !(bOnerow != 0 || 0 != int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW && + !(int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabList+8)).FpTab)).FeTabType) == TABTYP_VTAB) && + (0 == wsFlags&WHERE_MULTI_OR || int32(wctrlFlags)&WHERE_DUPLICATES_OK != 0)) { + goto __37 + } + (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { + if bOnerow != 0 { + return uint8(ONEPASS_SINGLE) + } + return uint8(ONEPASS_MULTI) + }() + if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabList+8)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) && wsFlags&WHERE_IDX_ONLY != 0) { + goto __38 + } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + goto __39 + } + bFordelete = U8(OPFLAG_FORDELETE) +__39: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 864)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) +__38: + ; +__37: + ; +__36: + ; + + // Open all tables in the pTabList and any indices selected for + // searching those tables. + ii = 0 + pLevel = pWInfo + 864 /* &.a */ +__40: + if !(ii < nTabList) { + goto __42 + } + + pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + pTab = (*SrcItem)(unsafe.Pointer(pTabItem)).FpTab + iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) || int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __43 + } + // Do nothing + goto __44 +__43: + if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { + goto __45 + } + pVTab = Xsqlite3GetVTable(tls, db, pTab) + iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -12) + goto __46 +__45: + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + goto __47 + } + // noop + goto __48 +__47: + if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && + int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0) { + goto __49 + } + op = OP_OpenRead + if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { + goto __51 + } + op = OP_OpenWrite + *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__51: + ; + + Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) + + if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) == ONEPASS_OFF && + int32((*Table)(unsafe.Pointer(pTab)).FnCol) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) && + (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated|TF_WithoutRowid) == U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) == U32(0)) { + goto __52 + } + // If we know that only a prefix of the record will be used, + // it is advantageous to reduce the "column count" field in + // the P4 operand of the OP_OpenRead/Write opcode. + b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed + n = 0 +__53: + if !(b != 0) { + goto __55 + } + goto __54 +__54: + b = b >> 1 + n++ + goto __53 + goto __55 +__55: + ; + Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) + +__52: + ; + + Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) + + goto __50 +__49: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__50: + ; +__48: + ; +__46: + ; +__44: + ; + if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { + goto __56 + } + pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + op1 = OP_OpenRead + // iAuxArg is always set to a positive value if ONEPASS is possible + + if !(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && + int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { + goto __57 + } + // This is one term of an OR-optimization using the PRIMARY KEY of a + // WITHOUT ROWID table. No need for a separate index + iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur + op1 = 0 + goto __58 +__57: + if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { + goto __59 + } + pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex + iIndexCur = iAuxArg + +__61: + if !(pJ != 0 && pJ != pIx) { + goto __62 + } + iIndexCur++ + pJ = (*Index)(unsafe.Pointer(pJ)).FpNext + goto __61 +__62: + ; + op1 = OP_OpenWrite + *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur + goto __60 +__59: + if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { + goto __63 + } + iIndexCur = iAuxArg + op1 = OP_ReopenIdx + goto __64 +__63: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) +__64: + ; +__60: + ; +__58: + ; + (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur + + if !(op1 != 0) { + goto __65 + } + Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) + if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) != U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_COLUMN_RANGE|WHERE_SKIPSCAN) == U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BIGNULL_SORT) == U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_SEEKSCAN) == U32(0) && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_ORDERBY_MIN == 0 && + int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) != WHERE_DISTINCT_ORDERED) { + goto __66 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) +__66: + ; + +__65: + ; +__56: + ; + if !(iDb >= 0) { + goto __67 + } + Xsqlite3CodeVerifySchema(tls, pParse, iDb) +__67: + ; + goto __41 +__41: + ii++ + pLevel += 96 + goto __40 + goto __42 +__42: + ; + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __68 + } + goto whereBeginError +__68: + ; + + // Generate the code to do the search. Each iteration of the for + // loop below generates code for a single nested loop of the VM + // program. + ii = 0 +__69: + if !(ii < nTabList) { + goto __71 + } + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __72 + } + goto whereBeginError +__72: + ; + pLevel = pWInfo + 864 + uintptr(ii)*96 + wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) + if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { + goto __73 + } + if !(wsFlags1&WHERE_AUTO_INDEX != 0) { + goto __74 + } + constructAutomaticIndex(tls, pParse, pWInfo+112, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112, notReady, pLevel) + goto __75 +__74: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__75: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __76 + } + goto whereBeginError +__76: + ; +__73: + ; + addrExplain = Xsqlite3WhereExplainOneScan(tls, + pParse, pTabList, pLevel, wctrlFlags) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody = Xsqlite3VdbeCurrentAddr(tls, v) + notReady = Xsqlite3WhereCodeOneLoopStart(tls, pParse, v, pWInfo, ii, pLevel, notReady) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont + if !(wsFlags1&WHERE_MULTI_OR == 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0) { + goto __77 + } + _ = addrExplain +__77: + ; + goto __70 +__70: + ii++ + goto __69 + goto __71 +__71: + ; + + // Done. + + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) + return pWInfo + + // Jump here if malloc fails +whereBeginError: + if !(pWInfo != 0) { + goto __78 + } + + whereUndoExprMods(tls, pWInfo) + (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) + whereInfoFree(tls, db, pWInfo) +__78: + ; + return uintptr(0) +} + +// Part of sqlite3WhereEnd() will rewrite opcodes to reference the +// index rather than the main table. In SQLITE_DEBUG mode, we want +// to trace those changes if PRAGMA vdbe_addoptrace=on. This routine +// does that. + +// Generate the end of the WHERE loop. See comments on +// sqlite3WhereBegin() for additional information. +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ + var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + var i int32 + var pLevel uintptr + var pLoop uintptr + var pTabList uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) + + // Generate loop termination code. + + for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { + var addr int32 + pLevel = pWInfo + 864 + uintptr(i)*96 + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + if int32((*WhereLevel)(unsafe.Pointer(pLevel)).Fop) != OP_Noop { + var addrSeek int32 = 0 + var pIdx uintptr + var n int32 + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) == WHERE_DISTINCT_ORDERED && + i == int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1 && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != U32(0) && + uint32(int32(*(*uint16)(unsafe.Pointer(libc.AssignUintptr(&pIdx, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8))) + 100))&0x80>>7)) != 0 && + libc.AssignInt32(&n, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 6)))) > 0 && + int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst + uintptr(n)*2))) >= 36 { + var r1 int32 = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + var j int32 + var op int32 + for j = 0; j < n; j++ { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur, j, r1+j) + } + *(*int32)(unsafe.Pointer(pParse + 56)) += n + 1 + if int32((*WhereLevel)(unsafe.Pointer(pLevel)).Fop) == OP_Prev { + op = OP_SeekLT + } else { + op = OP_SeekGT + } + addrSeek = Xsqlite3VdbeAddOp4Int(tls, v, op, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur, 0, r1, n) + + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2) + } + // The common case: Advance to the next row + Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) + Xsqlite3VdbeAddOp3(tls, v, int32((*WhereLevel)(unsafe.Pointer(pLevel)).Fop), (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1, (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2, int32((*WhereLevel)(unsafe.Pointer(pLevel)).Fp3)) + Xsqlite3VdbeChangeP5(tls, v, uint16((*WhereLevel)(unsafe.Pointer(pLevel)).Fp5)) + + if (*WhereLevel)(unsafe.Pointer(pLevel)).FregBignull != 0 { + Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBignull) + Xsqlite3VdbeAddOp2(tls, v, OP_DecrJumpZero, (*WhereLevel)(unsafe.Pointer(pLevel)).FregBignull, (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2-1) + + } + if addrSeek != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrSeek) + } + } else { + Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) + } + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != U32(0) && *(*int32)(unsafe.Pointer(pLevel + 64)) > 0 { + var pIn uintptr + var j int32 + Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrNxt) + j = *(*int32)(unsafe.Pointer(pLevel + 64)) + pIn = *(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(j-1)*20 + __1: + if !(j > 0) { + goto __3 + } + { + + Xsqlite3VdbeJumpHere(tls, v, *(*int32)(unsafe.Pointer(pIn + 4))+1) + if int32(*(*U8)(unsafe.Pointer(pIn + 16))) != OP_Noop { + if *(*int32)(unsafe.Pointer(pIn + 12)) != 0 { + var bEarlyOut int32 = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) == U32(0) && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) + if (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0 { + // For LEFT JOIN queries, cursor pIn->iCur may not have been + // opened yet. This occurs for WHERE clauses such as + // "a = ? AND b IN (...)", where the index is on (a, b). If + // the RHS of the (a=?) is NULL, then the "b IN (...)" may + // never have been coded, but the body of the loop run to + // return the null-row. So, if the cursor is not open yet, + // jump over the OP_Next or OP_Prev instruction about to + // be coded. + Xsqlite3VdbeAddOp2(tls, v, OP_IfNotOpen, *(*int32)(unsafe.Pointer(pIn)), + Xsqlite3VdbeCurrentAddr(tls, v)+2+bEarlyOut) + + } + if bEarlyOut != 0 { + Xsqlite3VdbeAddOp4Int(tls, v, OP_IfNoHope, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur, + Xsqlite3VdbeCurrentAddr(tls, v)+2, + *(*int32)(unsafe.Pointer(pIn + 8)), *(*int32)(unsafe.Pointer(pIn + 12))) + + // Retarget the OP_IsNull against the left operand of IN so + // it jumps past the OP_IfNoHope. This is because the + // OP_IsNull also bypasses the OP_Affinity opcode that is + // required by OP_IfNoHope. + Xsqlite3VdbeJumpHere(tls, v, *(*int32)(unsafe.Pointer(pIn + 4))+1) + } + } + Xsqlite3VdbeAddOp2(tls, v, int32(*(*U8)(unsafe.Pointer(pIn + 16))), *(*int32)(unsafe.Pointer(pIn)), *(*int32)(unsafe.Pointer(pIn + 4))) + + } + Xsqlite3VdbeJumpHere(tls, v, *(*int32)(unsafe.Pointer(pIn + 4))-1) + + } + goto __2 + __2: + j-- + pIn -= 20 + goto __1 + goto __3 + __3: + } + Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) + if (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip != 0 { + Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip) + + Xsqlite3VdbeJumpHere(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip) + Xsqlite3VdbeJumpHere(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip-2) + } + if (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0 { + var ws int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags) + addr = Xsqlite3VdbeAddOp1(tls, v, OP_IfPos, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) + + if ws&WHERE_IDX_ONLY == 0 { + + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur) + } + if ws&WHERE_INDEXED != 0 || + ws&WHERE_MULTI_OR != 0 && *(*uintptr)(unsafe.Pointer(pLevel + 64)) != 0 { + if ws&WHERE_MULTI_OR != 0 { + var pIx uintptr = *(*uintptr)(unsafe.Pointer(pLevel + 64)) + var iDb int32 = Xsqlite3SchemaToIndex(tls, db, (*Index)(unsafe.Pointer(pIx)).FpSchema) + Xsqlite3VdbeAddOp3(tls, v, OP_ReopenIdx, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) + } + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur) + } + if int32((*WhereLevel)(unsafe.Pointer(pLevel)).Fop) == OP_Return { + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst) + } else { + Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst) + } + Xsqlite3VdbeJumpHere(tls, v, addr) + } + + } + + // The "break" point is here, just past the end of the outer loop. + // Set it. + Xsqlite3VdbeResolveLabel(tls, v, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak) + + i = 0 + pLevel = pWInfo + 864 /* &.a */ +__4: + if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { + goto __6 + } + { + var k int32 + var last int32 + var pOp uintptr + var pLastOp uintptr + var pIdx uintptr = uintptr(0) + var pTabItem uintptr = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pTabItem)).FpTab + + pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop + + // For a co-routine, change all OP_Column references to the table of + // the co-routine into OP_Copy of result contained in a register. + // OP_Rowid becomes OP_Null. + if uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x10>>4)) != 0 { + + translateColumnToCopy(tls, pParse, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, + (*SrcItem)(unsafe.Pointer(pTabItem)).FregResult, 0) + goto __5 + } + + // If this scan uses an index, make VDBE code substitutions to read data + // from the index instead of from the table where possible. In some cases + // this optimization prevents the table from ever being read, which can + // yield a significant performance boost. + // + // Calls to the code generator in between sqlite3WhereBegin and + // sqlite3WhereEnd will have created code that references the table + // directly. This loop scans all that code looking for opcodes + // that reference the table and converts them into opcodes that + // reference the index. + if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED|WHERE_IDX_ONLY) != 0 { + pIdx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) + } else if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0 { + pIdx = *(*uintptr)(unsafe.Pointer(pLevel + 64)) + } + if pIdx != 0 && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) == ONEPASS_OFF || !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + last = iEnd + } else { + last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere + } + k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 + pOp = Xsqlite3VdbeGetOp(tls, v, k) + pLastOp = pOp + uintptr(last-k)*24 + + for __ccgo := true; __ccgo; __ccgo = libc.PreIncUintptr(&pOp, 24) < pLastOp { + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 != (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur { + // no-op + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + var x int32 = (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 + + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) + x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number + } else { + + x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) + } + x = int32(Xsqlite3TableColumnToIndex(tls, pIdx, int16(x))) + if x >= 0 { + (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = x + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur + + } + + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid { + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur + (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_IdxRowid) + + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNullRow { + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur + + } + } + } + + } + goto __5 +__5: + i++ + pLevel += 96 + goto __4 + goto __6 +__6: + ; + + // Final cleanup + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { + whereUndoExprMods(tls, pWInfo) + } + (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) + whereInfoFree(tls, db, pWInfo) + return +} + +//************* End of where.c ********************************************** +//************* Begin file window.c ***************************************** +// 2018 May 08 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// #include "sqliteInt.h" + +// SELECT REWRITING +// +// Any SELECT statement that contains one or more window functions in +// either the select list or ORDER BY clause (the only two places window +// functions may be used) is transformed by function sqlite3WindowRewrite() +// in order to support window function processing. For example, with the +// schema: +// +// CREATE TABLE t1(a, b, c, d, e, f, g); +// +// the statement: +// +// SELECT a+1, max(b) OVER (PARTITION BY c ORDER BY d) FROM t1 ORDER BY e; +// +// is transformed to: +// +// SELECT a+1, max(b) OVER (PARTITION BY c ORDER BY d) FROM ( +// SELECT a, e, c, d, b FROM t1 ORDER BY c, d +// ) ORDER BY e; +// +// The flattening optimization is disabled when processing this transformed +// SELECT statement. This allows the implementation of the window function +// (in this case max()) to process rows sorted in order of (c, d), which +// makes things easier for obvious reasons. More generally: +// +// * FROM, WHERE, GROUP BY and HAVING clauses are all moved to +// the sub-query. +// +// * ORDER BY, LIMIT and OFFSET remain part of the parent query. +// +// * Terminals from each of the expression trees that make up the +// select-list and ORDER BY expressions in the parent query are +// selected by the sub-query. For the purposes of the transformation, +// terminals are column references and aggregate functions. +// +// If there is more than one window function in the SELECT that uses +// the same window declaration (the OVER bit), then a single scan may +// be used to process more than one window function. For example: +// +// SELECT max(b) OVER (PARTITION BY c ORDER BY d), +// min(e) OVER (PARTITION BY c ORDER BY d) +// FROM t1; +// +// is transformed in the same way as the example above. However: +// +// SELECT max(b) OVER (PARTITION BY c ORDER BY d), +// min(e) OVER (PARTITION BY a ORDER BY b) +// FROM t1; +// +// Must be transformed to: +// +// SELECT max(b) OVER (PARTITION BY c ORDER BY d) FROM ( +// SELECT e, min(e) OVER (PARTITION BY a ORDER BY b), c, d, b FROM +// SELECT a, e, c, d, b FROM t1 ORDER BY a, b +// ) ORDER BY c, d +// ) ORDER BY e; +// +// so that both min() and max() may process rows in the order defined by +// their respective window declarations. +// +// INTERFACE WITH SELECT.C +// +// When processing the rewritten SELECT statement, code in select.c calls +// sqlite3WhereBegin() to begin iterating through the results of the +// sub-query, which is always implemented as a co-routine. It then calls +// sqlite3WindowCodeStep() to process rows and finish the scan by calling +// sqlite3WhereEnd(). +// +// sqlite3WindowCodeStep() generates VM code so that, for each row returned +// by the sub-query a sub-routine (OP_Gosub) coded by select.c is invoked. +// When the sub-routine is invoked: +// +// * The results of all window-functions for the row are stored +// in the associated Window.regResult registers. +// +// * The required terminal values are stored in the current row of +// temp table Window.iEphCsr. +// +// In some cases, depending on the window frame and the specific window +// functions invoked, sqlite3WindowCodeStep() caches each entire partition +// in a temp table before returning any rows. In other cases it does not. +// This detail is encapsulated within this file, the code generated by +// select.c is the same in either case. +// +// BUILT-IN WINDOW FUNCTIONS +// +// This implementation features the following built-in window functions: +// +// row_number() +// rank() +// dense_rank() +// percent_rank() +// cume_dist() +// ntile(N) +// lead(expr [, offset [, default]]) +// lag(expr [, offset [, default]]) +// first_value(expr) +// last_value(expr) +// nth_value(expr, N) +// +// These are the same built-in window functions supported by Postgres. +// Although the behaviour of aggregate window functions (functions that +// can be used as either aggregates or window funtions) allows them to +// be implemented using an API, built-in window functions are much more +// esoteric. Additionally, some window functions (e.g. nth_value()) +// may only be implemented by caching the entire partition in memory. +// As such, some built-in window functions use the same API as aggregate +// window functions and some are implemented directly using VDBE +// instructions. Additionally, for those functions that use the API, the +// window frame is sometimes modified before the SELECT statement is +// rewritten. For example, regardless of the specified window frame, the +// row_number() function always uses: +// +// ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW +// +// See sqlite3WindowUpdate() for details. +// +// As well as some of the built-in window functions, aggregate window +// functions min() and max() are implemented using VDBE instructions if +// the start of the window frame is declared as anything other than +// UNBOUNDED PRECEDING. + +// Implementation of built-in window function row_number(). Assumes that the +// window frame has been coerced to: +// +// ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ + var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) + if p != 0 { + *(*I64)(unsafe.Pointer(p))++ + } + _ = nArg + _ = apArg +} + +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ + var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) + Xsqlite3_result_int64(tls, pCtx, func() int64 { + if p != 0 { + return *(*I64)(unsafe.Pointer(p)) + } + return int64(0) + }()) +} + +// Context object type used by rank(), dense_rank(), percent_rank() and +// cume_dist(). +type CallCount = struct { + FnValue I64 + FnStep I64 + FnTotal I64 +} /* sqlite3.c:158350:1 */ + +// Implementation of built-in window function dense_rank(). Assumes that +// the window frame has been set to: +// +// RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) + if p != 0 { + (*CallCount)(unsafe.Pointer(p)).FnStep = int64(1) + } + _ = nArg + _ = apArg +} + +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) + if p != 0 { + if (*CallCount)(unsafe.Pointer(p)).FnStep != 0 { + (*CallCount)(unsafe.Pointer(p)).FnValue++ + (*CallCount)(unsafe.Pointer(p)).FnStep = int64(0) + } + Xsqlite3_result_int64(tls, pCtx, (*CallCount)(unsafe.Pointer(p)).FnValue) + } +} + +// Implementation of built-in window function nth_value(). This +// implementation is used in "slow mode" only - when the EXCLUDE clause +// is not set to the default value "NO OTHERS". +type NthValueCtx = struct { + FnStep I64 + FpValue uintptr +} /* sqlite3.c:158390:1 */ + +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ + var p uintptr + var fVal float64 + var iVal I64 + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) + if !(p != 0) { + goto __1 + } + switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) { + case SQLITE_INTEGER: + goto __3 + case SQLITE_FLOAT: + goto __4 + default: + goto __5 + } + goto __2 +__3: + iVal = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) + goto __2 +__4: + fVal = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) + if !(float64(I64(fVal)) != fVal) { + goto __6 + } + goto error_out +__6: + ; + iVal = I64(fVal) + goto __2 + +__5: + goto error_out +__2: + ; + if !(iVal <= int64(0)) { + goto __7 + } + goto error_out +__7: + ; + + (*NthValueCtx)(unsafe.Pointer(p)).FnStep++ + if !(iVal == (*NthValueCtx)(unsafe.Pointer(p)).FnStep) { + goto __8 + } + (*NthValueCtx)(unsafe.Pointer(p)).FpValue = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(apArg))) + if !!(int32((*NthValueCtx)(unsafe.Pointer(p)).FpValue) != 0) { + goto __9 + } + Xsqlite3_result_error_nomem(tls, pCtx) +__9: + ; +__8: + ; +__1: + ; + _ = nArg + _ = apArg + return + +error_out: + Xsqlite3_result_error(tls, + pCtx, ts+21890, -1) +} + +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, 0) + if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { + Xsqlite3_result_value(tls, pCtx, (*NthValueCtx)(unsafe.Pointer(p)).FpValue) + Xsqlite3_value_free(tls, (*NthValueCtx)(unsafe.Pointer(p)).FpValue) + (*NthValueCtx)(unsafe.Pointer(p)).FpValue = uintptr(0) + } +} + +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) + if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { + (*NthValueCtx)(unsafe.Pointer(p)).FpValue = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(apArg))) + if !(int32((*NthValueCtx)(unsafe.Pointer(p)).FpValue) != 0) { + Xsqlite3_result_error_nomem(tls, pCtx) + } + } + _ = nArg + _ = apArg +} + +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) + if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { + Xsqlite3_result_value(tls, pCtx, (*NthValueCtx)(unsafe.Pointer(p)).FpValue) + Xsqlite3_value_free(tls, (*NthValueCtx)(unsafe.Pointer(p)).FpValue) + (*NthValueCtx)(unsafe.Pointer(p)).FpValue = uintptr(0) + } +} + +// Implementation of built-in window function rank(). Assumes that +// the window frame has been set to: +// +// RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) + if p != 0 { + (*CallCount)(unsafe.Pointer(p)).FnStep++ + if (*CallCount)(unsafe.Pointer(p)).FnValue == int64(0) { + (*CallCount)(unsafe.Pointer(p)).FnValue = (*CallCount)(unsafe.Pointer(p)).FnStep + } + } + _ = nArg + _ = apArg +} + +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) + if p != 0 { + Xsqlite3_result_int64(tls, pCtx, (*CallCount)(unsafe.Pointer(p)).FnValue) + (*CallCount)(unsafe.Pointer(p)).FnValue = int64(0) + } +} + +// Implementation of built-in window function percent_rank(). Assumes that +// the window frame has been set to: +// +// GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ + var p uintptr + _ = nArg + _ = apArg + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) + if p != 0 { + (*CallCount)(unsafe.Pointer(p)).FnTotal++ + } +} + +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ + var p uintptr + _ = nArg + _ = apArg + 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:158536:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) + if p != 0 { + (*CallCount)(unsafe.Pointer(p)).FnValue = (*CallCount)(unsafe.Pointer(p)).FnStep + if (*CallCount)(unsafe.Pointer(p)).FnTotal > int64(1) { + var r float64 = float64((*CallCount)(unsafe.Pointer(p)).FnValue) / float64((*CallCount)(unsafe.Pointer(p)).FnTotal-int64(1)) + Xsqlite3_result_double(tls, pCtx, r) + } else { + Xsqlite3_result_double(tls, pCtx, 0.0) + } + } +} + +// Implementation of built-in window function cume_dist(). Assumes that +// the window frame has been set to: +// +// GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ + var p uintptr + _ = nArg + _ = apArg + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) + if p != 0 { + (*CallCount)(unsafe.Pointer(p)).FnTotal++ + } +} + +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ + var p uintptr + _ = nArg + _ = apArg + 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:158581:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, 0) + if p != 0 { + var r float64 = float64((*CallCount)(unsafe.Pointer(p)).FnStep) / float64((*CallCount)(unsafe.Pointer(p)).FnTotal) + Xsqlite3_result_double(tls, pCtx, r) + } +} + +// Context object for ntile() window function. +type NtileCtx = struct { + FnTotal I64 + FnParam I64 + FiRow I64 +} /* sqlite3.c:158594:1 */ + +// Implementation of ntile(). This assumes that the window frame has +// been coerced to: +// +// ROWS CURRENT ROW AND UNBOUNDED FOLLOWING +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ + var p uintptr + _ = nArg + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) + if p != 0 { + if (*NtileCtx)(unsafe.Pointer(p)).FnTotal == int64(0) { + (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) + if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { + Xsqlite3_result_error(tls, + pCtx, ts+21946, -1) + } + } + (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ + } +} + +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ + var p uintptr + _ = nArg + _ = apArg + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) + (*NtileCtx)(unsafe.Pointer(p)).FiRow++ +} + +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) + if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { + var nSize int32 = int32((*NtileCtx)(unsafe.Pointer(p)).FnTotal / (*NtileCtx)(unsafe.Pointer(p)).FnParam) + if nSize == 0 { + Xsqlite3_result_int64(tls, pCtx, (*NtileCtx)(unsafe.Pointer(p)).FiRow+int64(1)) + } else { + var nLarge I64 = (*NtileCtx)(unsafe.Pointer(p)).FnTotal - (*NtileCtx)(unsafe.Pointer(p)).FnParam*I64(nSize) + var iSmall I64 = nLarge * I64(nSize+1) + var iRow I64 = (*NtileCtx)(unsafe.Pointer(p)).FiRow + + if iRow < iSmall { + Xsqlite3_result_int64(tls, pCtx, int64(1)+iRow/I64(nSize+1)) + } else { + Xsqlite3_result_int64(tls, pCtx, int64(1)+nLarge+(iRow-iSmall)/I64(nSize)) + } + } + } +} + +// Context object for last_value() window function. +type LastValueCtx = struct { + FpVal uintptr + FnVal int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:158664:1 */ + +// Implementation of last_value(). +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ + var p uintptr + _ = nArg + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) + if p != 0 { + Xsqlite3_value_free(tls, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) + (*LastValueCtx)(unsafe.Pointer(p)).FpVal = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(apArg))) + if (*LastValueCtx)(unsafe.Pointer(p)).FpVal == uintptr(0) { + Xsqlite3_result_error_nomem(tls, pCtx) + } else { + (*LastValueCtx)(unsafe.Pointer(p)).FnVal++ + } + } +} + +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ + var p uintptr + _ = nArg + _ = apArg + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) + if p != 0 { + (*LastValueCtx)(unsafe.Pointer(p)).FnVal-- + if (*LastValueCtx)(unsafe.Pointer(p)).FnVal == 0 { + Xsqlite3_value_free(tls, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) + (*LastValueCtx)(unsafe.Pointer(p)).FpVal = uintptr(0) + } + } +} + +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, 0) + if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { + Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) + } +} + +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ + var p uintptr + p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) + if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { + Xsqlite3_result_value(tls, pCtx, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) + Xsqlite3_value_free(tls, (*LastValueCtx)(unsafe.Pointer(p)).FpVal) + (*LastValueCtx)(unsafe.Pointer(p)).FpVal = uintptr(0) + } +} + +// Static names for the built-in window function names. These static +// names are used, rather than string literals, so that FuncDef objects +// can be associated with a particular window function by direct +// comparison of the zName pointer. Example: +// +// if( pFuncDef->zName==row_valueName ){ ... } +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 21991)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22002)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22013)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22018)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22031)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22041)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22047)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22058)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22068)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22080)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22085 /* "lag" */)) /* sqlite3.c:158742:19 */ + +// No-op implementations of xStep() and xFinalize(). Used as place-holders +// for built-in window functions that never call those interfaces. +// +// The noopValueFunc() is called but is expected to do nothing. The +// noopStepFunc() is never called, and so it is marked with NO_TEST to +// let the test coverage routine know not to expect this function to be +// invoked. +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST + _ = p //NO_TEST + _ = n //NO_TEST + _ = a //NO_TEST + //NO_TEST +} + +//NO_TEST +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ + _ = p /*no-op*/ +} + +// Window functions that use all window interfaces: xStep, xFinal, +// xValue, and xInverse + +// Window functions that are implemented using bytecode and thus have +// no-op routines for their methods + +// Window functions that use all window interfaces: xStep, the +// same routine for xFinalize and xValue and which never call +// xInverse. + +// Register those built-in window functions that are not also aggregates. +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ + Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) +} + +var aWindowFuncs = [15]FuncDef{ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ + +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr + for p = pList; p != 0; p = (*Window)(unsafe.Pointer(p)).FpNextWin { + if Xsqlite3StrICmp(tls, (*Window)(unsafe.Pointer(p)).FzName, zName) == 0 { + break + } + } + if p == uintptr(0) { + Xsqlite3ErrorMsg(tls, pParse, ts+22089, libc.VaList(bp, zName)) + } + return p +} + +// This function is called immediately after resolving the function name +// for a window function within a SELECT statement. Argument pList is a +// linked list of WINDOW definitions for the current SELECT statement. +// Argument pFunc is the function definition just resolved and pWin +// is the Window object representing the associated OVER clause. This +// function updates the contents of pWin as follows: +// +// * If the OVER clause refered to a named window (as in "max(x) OVER win"), +// search list pList for a matching WINDOW definition, and update pWin +// accordingly. If no such WINDOW clause can be found, leave an error +// in pParse. +// +// * If the function is a built-in window function that requires the +// window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top +// of this file), pWin is updated here. +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ + bp := tls.Alloc(192) + defer tls.Free(192) + + if (*Window)(unsafe.Pointer(pWin)).FzName != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) == 0 { + var p uintptr = windowFind(tls, pParse, pList, (*Window)(unsafe.Pointer(pWin)).FzName) + if p == uintptr(0) { + return + } + (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Window)(unsafe.Pointer(p)).FpPartition, 0) + (*Window)(unsafe.Pointer(pWin)).FpOrderBy = Xsqlite3ExprListDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Window)(unsafe.Pointer(p)).FpOrderBy, 0) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Window)(unsafe.Pointer(p)).FpStart, 0) + (*Window)(unsafe.Pointer(pWin)).FpEnd = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Window)(unsafe.Pointer(p)).FpEnd, 0) + (*Window)(unsafe.Pointer(pWin)).FeStart = (*Window)(unsafe.Pointer(p)).FeStart + (*Window)(unsafe.Pointer(pWin)).FeEnd = (*Window)(unsafe.Pointer(p)).FeEnd + (*Window)(unsafe.Pointer(pWin)).FeFrmType = (*Window)(unsafe.Pointer(p)).FeFrmType + (*Window)(unsafe.Pointer(pWin)).FeExclude = (*Window)(unsafe.Pointer(p)).FeExclude + } else { + Xsqlite3WindowChain(tls, pParse, pWin, pList) + } + if int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) == TK_RANGE && + ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && + ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { + Xsqlite3ErrorMsg(tls, pParse, + ts+22108, 0) + } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+22179, 0) + } else { + *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ + {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, + {FzFunc: uintptr(unsafe.Pointer(&dense_rankName)), FeFrmType: TK_RANGE, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, + {FzFunc: uintptr(unsafe.Pointer(&rankName)), FeFrmType: TK_RANGE, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, + {FzFunc: uintptr(unsafe.Pointer(&percent_rankName)), FeFrmType: TK_GROUPS, FeStart: TK_CURRENT, FeEnd: TK_UNBOUNDED}, + {FzFunc: uintptr(unsafe.Pointer(&cume_distName)), FeFrmType: TK_GROUPS, FeStart: TK_FOLLOWING, FeEnd: TK_UNBOUNDED}, + {FzFunc: uintptr(unsafe.Pointer(&ntileName)), FeFrmType: TK_ROWS, FeStart: TK_CURRENT, FeEnd: TK_UNBOUNDED}, + {FzFunc: uintptr(unsafe.Pointer(&leadName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_UNBOUNDED}, + {FzFunc: uintptr(unsafe.Pointer(&lagName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, + } + var i int32 + for i = 0; i < int32(uint64(unsafe.Sizeof([8]WindowUpdate{}))/uint64(unsafe.Sizeof(WindowUpdate{}))); i++ { + if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == (*WindowUpdate)(unsafe.Pointer(bp+uintptr(i)*24)).FzFunc { + Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(pWin)).FpStart) + Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(pWin)).FpEnd) + (*Window)(unsafe.Pointer(pWin)).FpEnd = libc.AssignPtrUintptr(pWin+40, uintptr(0)) + (*Window)(unsafe.Pointer(pWin)).FeFrmType = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*24)).FeFrmType) + (*Window)(unsafe.Pointer(pWin)).FeStart = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*24)).FeStart) + (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*24)).FeEnd) + (*Window)(unsafe.Pointer(pWin)).FeExclude = U8(0) + if int32((*Window)(unsafe.Pointer(pWin)).FeStart) == TK_FOLLOWING { + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7816) + } + break + } + } + } + } + (*Window)(unsafe.Pointer(pWin)).FpFunc = pFunc +} + +type WindowUpdate = struct { + FzFunc uintptr + FeFrmType int32 + FeStart int32 + FeEnd int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:158878:7 */ + +// Context object passed through sqlite3WalkExprList() to +// selectWindowRewriteExprCb() by selectWindowRewriteEList(). +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ + +// Callback function used by selectWindowRewriteEList(). If necessary, +// this function appends to the output expression-list and updates +// expression (*ppExpr) in place. +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse + + // If this function is being called from within a scalar sub-select + // that used by the SELECT statement being processed, only process + // TK_COLUMN expressions that refer to it (the outer SELECT). Do + // not process aggregates or window functions at all, as they belong + // to the scalar sub-select. + if (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect != 0 { + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { + return WRC_Continue + } else { + var nSrc int32 = (*SrcList)(unsafe.Pointer((*WindowRewrite1)(unsafe.Pointer(p)).FpSrc)).FnSrc + var i int32 + for i = 0; i < nSrc; i++ { + if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer((*WindowRewrite1)(unsafe.Pointer(p)).FpSrc+8+uintptr(i)*112)).FiCursor { + break + } + } + if i == nSrc { + return WRC_Continue + } + } + } + + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + + case TK_FUNCTION: + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { + break + } else { + var pWin uintptr + for pWin = (*WindowRewrite1)(unsafe.Pointer(p)).FpWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + if *(*uintptr)(unsafe.Pointer(pExpr + 64)) == pWin { + + return WRC_Prune + } + } + } + fallthrough + + case TK_AGG_FUNCTION: + fallthrough + case TK_COLUMN: + { + var iCol int32 = -1 + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + return WRC_Abort + } + if (*WindowRewrite1)(unsafe.Pointer(p)).FpSub != 0 { + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer((*WindowRewrite1)(unsafe.Pointer(p)).FpSub)).FnExpr; i++ { + if 0 == Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer((*WindowRewrite1)(unsafe.Pointer(p)).FpSub+8+uintptr(i)*32)).FpExpr, pExpr, -1) { + iCol = i + break + } + } + } + if iCol < 0 { + var pDup uintptr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + if pDup != 0 && int32((*Expr)(unsafe.Pointer(pDup)).Fop) == TK_AGG_FUNCTION { + (*Expr)(unsafe.Pointer(pDup)).Fop = U8(TK_FUNCTION) + } + (*WindowRewrite1)(unsafe.Pointer(p)).FpSub = Xsqlite3ExprListAppend(tls, pParse, (*WindowRewrite1)(unsafe.Pointer(p)).FpSub, pDup) + } + if (*WindowRewrite1)(unsafe.Pointer(p)).FpSub != 0 { + var f int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fflags & U32(EP_Collate)) + + *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Static) + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Static)) + libc.Xmemset(tls, pExpr, 0, uint64(unsafe.Sizeof(Expr{}))) + + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_COLUMN) + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = func() int16 { + if iCol < 0 { + return int16((*ExprList)(unsafe.Pointer((*WindowRewrite1)(unsafe.Pointer(p)).FpSub)).FnExpr - 1) + } + return int16(iCol) + }() + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*Window)(unsafe.Pointer((*WindowRewrite1)(unsafe.Pointer(p)).FpWin)).FiEphCsr + *(*uintptr)(unsafe.Pointer(pExpr + 64)) = (*WindowRewrite1)(unsafe.Pointer(p)).FpTab + (*Expr)(unsafe.Pointer(pExpr)).Fflags = U32(f) + } + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { + return WRC_Abort + } + break + + } + + default: // no-op + break + } + + return WRC_Continue +} + +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) + var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect + if pSave == pSelect { + return WRC_Continue + } else { + (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect = pSelect + Xsqlite3WalkSelect(tls, pWalker, pSelect) + (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect = pSave + } + return WRC_Prune +} + +// Iterate through each expression in expression-list pEList. For each: +// +// * TK_COLUMN, +// * aggregate function, or +// * window function with a Window object that is not a member of the +// Window list passed as the second argument (pWin). +// +// Append the node to output expression-list (*ppSub). And replace it +// with a TK_COLUMN that reads the (N-1)th element of table +// pWin->iEphCsr, where N is the number of elements in (*ppSub) after +// appending the new one. +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + // var sWalker Walker at bp, 48 + + // var sRewrite WindowRewrite at bp+48, 40 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+48, 0, uint64(unsafe.Sizeof(WindowRewrite{}))) + + (*WindowRewrite)(unsafe.Pointer(bp + 48 /* &sRewrite */)).FpSub = *(*uintptr)(unsafe.Pointer(ppSub)) + (*WindowRewrite)(unsafe.Pointer(bp + 48 /* &sRewrite */)).FpWin = pWin + (*WindowRewrite)(unsafe.Pointer(bp + 48 /* &sRewrite */)).FpSrc = pSrc + (*WindowRewrite)(unsafe.Pointer(bp + 48 /* &sRewrite */)).FpTab = pTab + + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{selectWindowRewriteExprCb})) + (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{selectWindowRewriteSelectCb})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 /* &sRewrite */ + + Xsqlite3WalkExprList(tls, bp, pEList) + + *(*uintptr)(unsafe.Pointer(ppSub)) = (*WindowRewrite)(unsafe.Pointer(bp + 48 /* &sRewrite */)).FpSub +} + +// Append a copy of each expression in expression-list pAppend to +// expression list pList. Return a pointer to the result list. +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + if pAppend != 0 { + var i int32 + var nInit int32 + if pList != 0 { + nInit = (*ExprList)(unsafe.Pointer(pList)).FnExpr + } else { + nInit = 0 + } + for i = 0; i < (*ExprList)(unsafe.Pointer(pAppend)).FnExpr; i++ { + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pDup uintptr = Xsqlite3ExprDup(tls, db, (*ExprList_item)(unsafe.Pointer(pAppend+8+uintptr(i)*32)).FpExpr, 0) + + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + Xsqlite3ExprDelete(tls, db, pDup) + break + } + if bIntToNull != 0 { + // var iDummy int32 at bp, 4 + + var pSub uintptr + pSub = Xsqlite3ExprSkipCollateAndLikely(tls, pDup) + if Xsqlite3ExprIsInteger(tls, pSub, bp) != 0 { + (*Expr)(unsafe.Pointer(pSub)).Fop = U8(TK_NULL) + *(*U32)(unsafe.Pointer(pSub + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_IntValue | EP_IsTrue | EP_IsFalse)) + *(*uintptr)(unsafe.Pointer(pSub + 8)) = uintptr(0) + } + } + pList = Xsqlite3ExprListAppend(tls, pParse, pList, pDup) + if pList != 0 { + (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(nInit+i)*32)).FsortFlags = (*ExprList_item)(unsafe.Pointer(pAppend + 8 + uintptr(i)*32)).FsortFlags + } + } + } + return pList +} + +// When rewriting a query, if the new subquery in the FROM clause +// contains TK_AGG_FUNCTION nodes that refer to an outer query, +// then we have to increase the Expr->op2 values of those nodes +// due to the extra subquery layer that was added. +// +// See also the incrAggDepth() routine in resolve.c +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { + (*Expr)(unsafe.Pointer(pExpr)).Fop2++ + } + return WRC_Continue +} + +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { + + Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, + ts+22242, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + } + return WRC_Continue +} + +// If the SELECT statement passed as the second argument does not invoke +// any SQL window functions, this function is a no-op. Otherwise, it +// rewrites the SELECT statement so that window function xStep functions +// are invoked in the correct order as described under "SELECT REWRITING" +// at the top of this file. +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var rc int32 = SQLITE_OK + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pSub uintptr = uintptr(0) // The subquery + var pSrc uintptr = (*Select)(unsafe.Pointer(p)).FpSrc + var pWhere uintptr = (*Select)(unsafe.Pointer(p)).FpWhere + var pGroupBy uintptr = (*Select)(unsafe.Pointer(p)).FpGroupBy + var pHaving uintptr = (*Select)(unsafe.Pointer(p)).FpHaving + var pSort uintptr = uintptr(0) + + *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) = uintptr(0) // Expression list for sub-query + var pMWin uintptr = (*Select)(unsafe.Pointer(p)).FpWin // Main window object + var pWin uintptr // Window object iterator + var pTab uintptr + // var w Walker at bp, 48 + + var selFlags U32 = (*Select)(unsafe.Pointer(p)).FselFlags + + pTab = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) + if pTab == uintptr(0) { + return Xsqlite3ErrorToParser(tls, db, SQLITE_NOMEM) + } + Xsqlite3AggInfoPersistWalkerInit(tls, bp, pParse) + Xsqlite3WalkSelect(tls, bp, p) + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{disallowAggregatesInOrderByCb})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0) + Xsqlite3WalkExprList(tls, bp, (*Select)(unsafe.Pointer(p)).FpOrderBy) + } + + (*Select)(unsafe.Pointer(p)).FpSrc = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpWhere = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpGroupBy = uintptr(0) + (*Select)(unsafe.Pointer(p)).FpHaving = uintptr(0) + *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_Aggregate)) + *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_WinRewrite) + + // Create the ORDER BY clause for the sub-select. This is the concatenation + // of the window PARTITION and ORDER BY clauses. Then, if this makes it + // redundant, remove the ORDER BY from the parent SELECT. + pSort = exprListAppendList(tls, pParse, uintptr(0), (*Window)(unsafe.Pointer(pMWin)).FpPartition, 1) + pSort = exprListAppendList(tls, pParse, pSort, (*Window)(unsafe.Pointer(pMWin)).FpOrderBy, 1) + if pSort != 0 && (*Select)(unsafe.Pointer(p)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy)).FnExpr <= (*ExprList)(unsafe.Pointer(pSort)).FnExpr { + var nSave int32 = (*ExprList)(unsafe.Pointer(pSort)).FnExpr + (*ExprList)(unsafe.Pointer(pSort)).FnExpr = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy)).FnExpr + if Xsqlite3ExprListCompare(tls, pSort, (*Select)(unsafe.Pointer(p)).FpOrderBy, -1) == 0 { + Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpOrderBy) + (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) + } + (*ExprList)(unsafe.Pointer(pSort)).FnExpr = nSave + } + + // Assign a cursor number for the ephemeral table used to buffer rows. + // The OpenEphemeral instruction is coded later, after it is known how + // many columns the table will have. + (*Window)(unsafe.Pointer(pMWin)).FiEphCsr = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + *(*int32)(unsafe.Pointer(pParse + 52)) += 3 + + selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*Select)(unsafe.Pointer(p)).FpEList, pTab, bp+48) + selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*Select)(unsafe.Pointer(p)).FpOrderBy, pTab, bp+48) + (*Window)(unsafe.Pointer(pMWin)).FnBufferCol = func() int32 { + if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { + return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)))).FnExpr + } + return 0 + }() + + // Append the PARTITION BY and ORDER BY expressions to the to the + // sub-select expression list. They are required to figure out where + // boundaries for partitions and sets of peer rows lie. + *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) = exprListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)), (*Window)(unsafe.Pointer(pMWin)).FpPartition, 0) + *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) = exprListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)), (*Window)(unsafe.Pointer(pMWin)).FpOrderBy, 0) + + // Append the arguments passed to each window function to the + // sub-select expression list. Also allocate two registers for each + // window function - one for the accumulator, another for interim + // results. + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + var pArgs uintptr + + pArgs = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) + if (*FuncDef)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_SUBTYPE) != 0 { + selectWindowRewriteEList(tls, pParse, pMWin, pSrc, pArgs, pTab, bp+48) + (*Window)(unsafe.Pointer(pWin)).FiArgCol = func() int32 { + if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { + return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)))).FnExpr + } + return 0 + }() + (*Window)(unsafe.Pointer(pWin)).FbExprArgs = U8(1) + } else { + (*Window)(unsafe.Pointer(pWin)).FiArgCol = func() int32 { + if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { + return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)))).FnExpr + } + return 0 + }() + *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) = exprListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)), pArgs, 0) + } + if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { + var pFilter uintptr = Xsqlite3ExprDup(tls, db, (*Window)(unsafe.Pointer(pWin)).FpFilter, 0) + *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)), pFilter) + } + (*Window)(unsafe.Pointer(pWin)).FregAccum = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + (*Window)(unsafe.Pointer(pWin)).FregResult = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pWin)).FregAccum) + } + + // If there is no ORDER BY or PARTITION BY clause, and the window + // function accepts zero arguments, and there are no other columns + // selected (e.g. "SELECT row_number() OVER () FROM t1"), it is possible + // that pSublist is still NULL here. Add a constant expression here to + // keep everything legal in this case. + if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7408)) + } + + pSub = Xsqlite3SelectNew(tls, + pParse, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)), pSrc, pWhere, pGroupBy, pHaving, pSort, uint32(0), uintptr(0)) + + (*Select)(unsafe.Pointer(p)).FpSrc = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0)) + // Due to db->mallocFailed test inside + // of sqlite3DbMallocRawNN() called from + // sqlite3SrcListAppend() + if (*Select)(unsafe.Pointer(p)).FpSrc != 0 { + var pTab2 uintptr + (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpSelect = pSub + Xsqlite3SrcListAssignCursors(tls, pParse, (*Select)(unsafe.Pointer(p)).FpSrc) + *(*U32)(unsafe.Pointer(pSub + 4)) |= U32(SF_Expanded | SF_OrderByReqd) + pTab2 = Xsqlite3ResultSetOfSelect(tls, pParse, pSub, uint8(SQLITE_AFF_NONE)) + *(*U32)(unsafe.Pointer(pSub + 4)) |= selFlags & U32(SF_Aggregate) + if pTab2 == uintptr(0) { + // Might actually be some other kind of error, but in that case + // pParse->nErr will be set, so if SQLITE_NOMEM is set, we will get + // the correct error message regardless. + rc = SQLITE_NOMEM + } else { + libc.Xmemcpy(tls, pTab, pTab2, uint64(unsafe.Sizeof(Table{}))) + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_Ephemeral) + (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpTab = pTab + pTab = pTab2 + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{sqlite3WindowExtraAggFuncDepth})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3WalkerDepthIncrease})) + (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3WalkerDepthDecrease})) + Xsqlite3WalkSelect(tls, bp, pSub) + } + } else { + Xsqlite3SelectDelete(tls, db, pSub) + } + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + rc = SQLITE_NOMEM + } + + // Defer deleting the temporary table pTab because if an error occurred, + // there could still be references to that table embedded in the + // result-set or ORDER BY clause of the SELECT statement p. + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3DbFree})), pTab) + } + + return rc +} + +// Unlink the Window object from the Select to which it is attached, +// if it is attached. +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ + if (*Window)(unsafe.Pointer(p)).FppThis != 0 { + *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin + if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { + (*Window)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FpNextWin)).FppThis = (*Window)(unsafe.Pointer(p)).FppThis + } + (*Window)(unsafe.Pointer(p)).FppThis = uintptr(0) + } +} + +// Free the Window object passed as the second argument. +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ + if p != 0 { + Xsqlite3WindowUnlinkFromSelect(tls, p) + Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) + Xsqlite3ExprListDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpPartition) + Xsqlite3ExprListDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpOrderBy) + Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpEnd) + Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpStart) + Xsqlite3DbFree(tls, db, (*Window)(unsafe.Pointer(p)).FzName) + Xsqlite3DbFree(tls, db, (*Window)(unsafe.Pointer(p)).FzBase) + Xsqlite3DbFree(tls, db, p) + } +} + +// Free the linked list of Window objects starting at the second argument. +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ + for p != 0 { + var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin + Xsqlite3WindowDelete(tls, db, p) + p = pNext + } +} + +// The argument expression is an PRECEDING or FOLLOWING offset. The +// value should be a non-negative integer. If the value is not a +// constant, change it to NULL. The fact that it is then a non-negative +// integer will be caught later. But it is important not to leave +// variable values in the expression tree. +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ + if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameExprUnmap(tls, pParse, pExpr) + } + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) + pExpr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_NULL, uintptr(0), 0) + } + return pExpr +} + +// Allocate and return a new Window object describing a Window Definition. +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ + var pWin uintptr + var bImplicitFrame int32 + pWin = uintptr(0) + bImplicitFrame = 0 + + // Parser assures the following: + + if !(eType == 0) { + goto __1 + } + bImplicitFrame = 1 + eType = TK_RANGE +__1: + ; + + // Additionally, the + // starting boundary type may not occur earlier in the following list than + // the ending boundary type: + // + // UNBOUNDED PRECEDING + // PRECEDING + // CURRENT ROW + // FOLLOWING + // UNBOUNDED FOLLOWING + // + // The parser ensures that "UNBOUNDED PRECEDING" cannot be used as an ending + // boundary, and than "UNBOUNDED FOLLOWING" cannot be used as a starting + // frame boundary. + if !(eStart == TK_CURRENT && eEnd == TK_PRECEDING || + eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { + goto __2 + } + Xsqlite3ErrorMsg(tls, pParse, ts+22268, 0) + goto windowAllocErr +__2: + ; + + pWin = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Window{}))) + if !(pWin == uintptr(0)) { + goto __3 + } + goto windowAllocErr +__3: + ; + (*Window)(unsafe.Pointer(pWin)).FeFrmType = U8(eType) + (*Window)(unsafe.Pointer(pWin)).FeStart = U8(eStart) + (*Window)(unsafe.Pointer(pWin)).FeEnd = U8(eEnd) + if !(int32(eExclude) == 0 && (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_WindowFunc) != U32(0)) { + goto __4 + } + eExclude = U8(TK_NO) +__4: + ; + (*Window)(unsafe.Pointer(pWin)).FeExclude = eExclude + (*Window)(unsafe.Pointer(pWin)).FbImplicitFrame = U8(bImplicitFrame) + (*Window)(unsafe.Pointer(pWin)).FpEnd = sqlite3WindowOffsetExpr(tls, pParse, pEnd) + (*Window)(unsafe.Pointer(pWin)).FpStart = sqlite3WindowOffsetExpr(tls, pParse, pStart) + return pWin + +windowAllocErr: + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pEnd) + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pStart) + return uintptr(0) +} + +// Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window +// pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the +// equivalent nul-terminated string. +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ + if pWin != 0 { + (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition + (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy + if pBase != 0 { + (*Window)(unsafe.Pointer(pWin)).FzBase = Xsqlite3DbStrNDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Token)(unsafe.Pointer(pBase)).Fz, uint64((*Token)(unsafe.Pointer(pBase)).Fn)) + } + } else { + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPartition) + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pOrderBy) + } + return pWin +} + +// Window *pWin has just been created from a WINDOW clause. Tokne pBase +// is the base window. Earlier windows from the same WINDOW clause are +// stored in the linked list starting at pWin->pNextWin. This function +// either updates *pWin according to the base specification, or else +// leaves an error in pParse. +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Window)(unsafe.Pointer(pWin)).FzBase != 0 { + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pExist uintptr = windowFind(tls, pParse, pList, (*Window)(unsafe.Pointer(pWin)).FzBase) + if pExist != 0 { + var zErr uintptr = uintptr(0) + // Check for errors + if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { + zErr = ts + 22300 /* "PARTITION clause" */ + } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { + zErr = ts + 22317 /* "ORDER BY clause" */ + } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { + zErr = ts + 22333 /* "frame specificat..." */ + } + if zErr != 0 { + Xsqlite3ErrorMsg(tls, pParse, + ts+22353, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + } else { + (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) + if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { + + (*Window)(unsafe.Pointer(pWin)).FpOrderBy = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpOrderBy, 0) + } + Xsqlite3DbFree(tls, db, (*Window)(unsafe.Pointer(pWin)).FzBase) + (*Window)(unsafe.Pointer(pWin)).FzBase = uintptr(0) + } + } + } +} + +// Attach window object pWin to expression p. +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ + if p != 0 { + + *(*uintptr)(unsafe.Pointer(p + 64)) = pWin + *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_WinFunc) + (*Window)(unsafe.Pointer(pWin)).FpOwner = p + if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { + Xsqlite3ErrorMsg(tls, pParse, + ts+22386, 0) + } + } else { + Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) + } +} + +// Possibly link window pWin into the list at pSel->pWin (window functions +// to be processed as part of SELECT statement pSel). The window is linked +// in if either (a) there are no other windows already linked to this +// SELECT, or (b) the windows already linked use a compatible window frame. +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ + if pSel != 0 { + if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { + (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin + if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { + (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpWin)).FppThis = pWin + 64 + } + (*Select)(unsafe.Pointer(pSel)).FpWin = pWin + (*Window)(unsafe.Pointer(pWin)).FppThis = pSel + 112 + } else { + if Xsqlite3ExprListCompare(tls, (*Window)(unsafe.Pointer(pWin)).FpPartition, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpWin)).FpPartition, -1) != 0 { + *(*U32)(unsafe.Pointer(pSel + 4)) |= U32(SF_MultiPart) + } + } + } +} + +// Return 0 if the two window objects are identical, 1 if they are +// different, or 2 if it cannot be determined if the objects are identical +// or not. Identical window objects can be processed in a single scan. +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ + var res int32 + if p1 == uintptr(0) || p2 == uintptr(0) { + return 1 + } + if int32((*Window)(unsafe.Pointer(p1)).FeFrmType) != int32((*Window)(unsafe.Pointer(p2)).FeFrmType) { + return 1 + } + if int32((*Window)(unsafe.Pointer(p1)).FeStart) != int32((*Window)(unsafe.Pointer(p2)).FeStart) { + return 1 + } + if int32((*Window)(unsafe.Pointer(p1)).FeEnd) != int32((*Window)(unsafe.Pointer(p2)).FeEnd) { + return 1 + } + if int32((*Window)(unsafe.Pointer(p1)).FeExclude) != int32((*Window)(unsafe.Pointer(p2)).FeExclude) { + return 1 + } + if Xsqlite3ExprCompare(tls, pParse, (*Window)(unsafe.Pointer(p1)).FpStart, (*Window)(unsafe.Pointer(p2)).FpStart, -1) != 0 { + return 1 + } + if Xsqlite3ExprCompare(tls, pParse, (*Window)(unsafe.Pointer(p1)).FpEnd, (*Window)(unsafe.Pointer(p2)).FpEnd, -1) != 0 { + return 1 + } + if libc.AssignInt32(&res, Xsqlite3ExprListCompare(tls, (*Window)(unsafe.Pointer(p1)).FpPartition, (*Window)(unsafe.Pointer(p2)).FpPartition, -1)) != 0 { + return res + } + if libc.AssignInt32(&res, Xsqlite3ExprListCompare(tls, (*Window)(unsafe.Pointer(p1)).FpOrderBy, (*Window)(unsafe.Pointer(p2)).FpOrderBy, -1)) != 0 { + return res + } + if bFilter != 0 { + if libc.AssignInt32(&res, Xsqlite3ExprCompare(tls, pParse, (*Window)(unsafe.Pointer(p1)).FpFilter, (*Window)(unsafe.Pointer(p2)).FpFilter, -1)) != 0 { + return res + } + } + return 0 +} + +// This is called by code in select.c before it calls sqlite3WhereBegin() +// to begin iterating through the sub-query results. It is used to allocate +// and initialize registers and cursors used by sqlite3WindowCodeStep(). +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ + var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr + var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin + var pWin uintptr + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr, nEphExpr) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr+1, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr+2, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr+3, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr) + + // Allocate registers to use for PARTITION BY values, if any. Initialize + // said registers to NULL. + if (*Window)(unsafe.Pointer(pMWin)).FpPartition != 0 { + var nExpr int32 = (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pMWin)).FpPartition)).FnExpr + (*Window)(unsafe.Pointer(pMWin)).FregPart = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nExpr + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pMWin)).FregPart, (*Window)(unsafe.Pointer(pMWin)).FregPart+nExpr-1) + } + + (*Window)(unsafe.Pointer(pMWin)).FregOne = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*Window)(unsafe.Pointer(pMWin)).FregOne) + + if (*Window)(unsafe.Pointer(pMWin)).FeExclude != 0 { + (*Window)(unsafe.Pointer(pMWin)).FregStartRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + (*Window)(unsafe.Pointer(pMWin)).FregEndRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + (*Window)(unsafe.Pointer(pMWin)).FcsrApp = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*Window)(unsafe.Pointer(pMWin)).FregStartRowid) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Window)(unsafe.Pointer(pMWin)).FregEndRowid) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*Window)(unsafe.Pointer(pMWin)).FcsrApp, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr) + return + } + + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + var p uintptr = (*Window)(unsafe.Pointer(pWin)).FpFunc + if (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_MINMAX) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeStart) != TK_UNBOUNDED { + // The inline versions of min() and max() require a single ephemeral + // table and 3 registers. The registers are used as follows: + // + // regApp+0: slot to copy min()/max() argument to for MakeRecord + // regApp+1: integer value used to ensure keys are unique + // regApp+2: output of MakeRecord + var pList uintptr + var pKeyInfo uintptr + + pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) + pKeyInfo = Xsqlite3KeyInfoFromExprList(tls, pParse, pList, 0, 0) + (*Window)(unsafe.Pointer(pWin)).FcsrApp = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + (*Window)(unsafe.Pointer(pWin)).FregApp = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += 3 + if pKeyInfo != 0 && int32(*(*uint8)(unsafe.Pointer((*FuncDef)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpFunc)).FzName + 1))) == 'i' { + + *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags)) = U8(KEYINFO_ORDER_DESC) + } + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Window)(unsafe.Pointer(pWin)).FcsrApp, 2) + Xsqlite3VdbeAppendP4(tls, v, pKeyInfo, -9) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Window)(unsafe.Pointer(pWin)).FregApp+1) + } else if (*FuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&nth_valueName)) || (*FuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&first_valueName)) { + // Allocate two registers at pWin->regApp. These will be used to + // store the start and end index of the current frame. + (*Window)(unsafe.Pointer(pWin)).FregApp = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + (*Window)(unsafe.Pointer(pWin)).FcsrApp = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + *(*int32)(unsafe.Pointer(pParse + 56)) += 2 + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*Window)(unsafe.Pointer(pWin)).FcsrApp, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr) + } else if (*FuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&leadName)) || (*FuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&lagName)) { + (*Window)(unsafe.Pointer(pWin)).FcsrApp = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, (*Window)(unsafe.Pointer(pWin)).FcsrApp, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr) + } + } +} + +// A "PRECEDING " (eCond==0) or "FOLLOWING " (eCond==1) or the +// value of the second argument to nth_value() (eCond==2) has just been +// evaluated and the result left in register reg. This function generates VM +// code to check that the value is a non-negative integer and throws an +// exception if it is not. +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var regZero int32 = Xsqlite3GetTempReg(tls, pParse) + + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regZero) + if eCond >= WINDOW_STARTING_NUM { + var regString int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1525, -1) + Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) + + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, reg, Xsqlite3VdbeCurrentAddr(tls, v)+2) + + } + Xsqlite3VdbeAddOp3(tls, v, aOp1[eCond], regZero, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC)) + // NULL case captured by + // the OP_MustBeInt + + // NULL case caught by + // the OP_Ge + Xsqlite3MayAbort(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_Halt, SQLITE_ERROR, OE_Abort) + Xsqlite3VdbeAppendP4(tls, v, azErr[eCond], -1) + Xsqlite3ReleaseTempReg(tls, pParse, regZero) +} + +var azErr = [5]uintptr{ + ts + 22433, + ts + 22486, + ts + 21890, + ts + 22537, + ts + 22589, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ + +// Return the number of arguments passed to the window-function associated +// with the object passed as the only argument to this function. +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ + var pList uintptr + + pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) + return func() int32 { + if pList != 0 { + return (*ExprList)(unsafe.Pointer(pList)).FnExpr + } + return 0 + }() +} + +type WindowCodeArg1 = struct { + FpParse uintptr + FpMWin uintptr + FpVdbe uintptr + FaddrGosub int32 + FregGosub int32 + FregArg int32 + FeDelete int32 + FregRowid int32 + Fstart WindowCsrAndReg + Fcurrent WindowCsrAndReg + Fend WindowCsrAndReg + F__ccgo_pad1 [4]byte +} /* sqlite3.c:159714:9 */ + +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ +type WindowCsrAndReg1 = struct { + Fcsr int32 + Freg int32 +} /* sqlite3.c:159714:9 */ + +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ + +// Generate VM code to read the window frames peer values from cursor csr into +// an array of registers starting at reg. +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ + var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin + var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy + if pOrderBy != 0 { + var v uintptr = Xsqlite3GetVdbe(tls, (*WindowCodeArg)(unsafe.Pointer(p)).FpParse) + var pPart uintptr = (*Window)(unsafe.Pointer(pMWin)).FpPartition + var iColOff int32 = (*Window)(unsafe.Pointer(pMWin)).FnBufferCol + func() int32 { + if pPart != 0 { + return (*ExprList)(unsafe.Pointer(pPart)).FnExpr + } + return 0 + }() + var i int32 + for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, csr, iColOff+i, reg+i) + } + } +} + +// Generate VM code to invoke either xStep() (if bInverse is 0) or +// xInverse (if bInverse is non-zero) for each window function in the +// linked list starting at pMWin. Or, for built-in window functions +// that do not use the standard function API, generate the required +// inline VM code. +// +// If argument csr is greater than or equal to 0, then argument reg is +// the first register in an array of registers guaranteed to be large +// enough to hold the array of arguments for each function. In this case +// the arguments are extracted from the current row of csr into the +// array of registers before invoking OP_AggStep or OP_AggInverse +// +// Or, if csr is less than zero, then the array of registers at reg is +// already populated with all columns from the current row of the sub-query. +// +// If argument regPartSize is non-zero, then it is a register containing the +// number of rows in the current partition. +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ + var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var pWin uintptr + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + var pFunc uintptr = (*Window)(unsafe.Pointer(pWin)).FpFunc + var regArg int32 + var nArg int32 + if (*Window)(unsafe.Pointer(pWin)).FbExprArgs != 0 { + nArg = 0 + } else { + nArg = windowArgCount(tls, pWin) + } + var i int32 + + // All OVER clauses in the same window function aggregate step must + // be the same. + + for i = 0; i < nArg; i++ { + if i != 1 || (*FuncDef)(unsafe.Pointer(pFunc)).FzName != uintptr(unsafe.Pointer(&nth_valueName)) { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, csr, (*Window)(unsafe.Pointer(pWin)).FiArgCol+i, reg+i) + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr, (*Window)(unsafe.Pointer(pWin)).FiArgCol+i, reg+i) + } + } + regArg = reg + + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid == 0 && + (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_MINMAX) != 0 && + int32((*Window)(unsafe.Pointer(pWin)).FeStart) != TK_UNBOUNDED { + var addrIsNull int32 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, regArg) + + if bInverse == 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, (*Window)(unsafe.Pointer(pWin)).FregApp+1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, regArg, (*Window)(unsafe.Pointer(pWin)).FregApp) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*Window)(unsafe.Pointer(pWin)).FregApp, 2, (*Window)(unsafe.Pointer(pWin)).FregApp+2) + Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, (*Window)(unsafe.Pointer(pWin)).FcsrApp, (*Window)(unsafe.Pointer(pWin)).FregApp+2) + } else { + Xsqlite3VdbeAddOp4Int(tls, v, OP_SeekGE, (*Window)(unsafe.Pointer(pWin)).FcsrApp, 0, regArg, 1) + + Xsqlite3VdbeAddOp1(tls, v, OP_Delete, (*Window)(unsafe.Pointer(pWin)).FcsrApp) + Xsqlite3VdbeJumpHere(tls, v, Xsqlite3VdbeCurrentAddr(tls, v)-2) + } + Xsqlite3VdbeJumpHere(tls, v, addrIsNull) + } else if (*Window)(unsafe.Pointer(pWin)).FregApp != 0 { + + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, (*Window)(unsafe.Pointer(pWin)).FregApp+1-bInverse, 1) + } else if (*FuncDef)(unsafe.Pointer(pFunc)).FxSFunc != *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{noopStepFunc})) { + var addrIf int32 = 0 + if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { + var regTmp int32 + + regTmp = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, csr, (*Window)(unsafe.Pointer(pWin)).FiArgCol+nArg, regTmp) + addrIf = Xsqlite3VdbeAddOp3(tls, v, OP_IfNot, regTmp, 0, 1) + + Xsqlite3ReleaseTempReg(tls, pParse, regTmp) + } + + if (*Window)(unsafe.Pointer(pWin)).FbExprArgs != 0 { + var iOp int32 = Xsqlite3VdbeCurrentAddr(tls, v) + var iEnd int32 + + nArg = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)))).FnExpr + regArg = Xsqlite3GetTempRange(tls, pParse, nArg) + Xsqlite3ExprCodeExprList(tls, pParse, *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)), regArg, 0, uint8(0)) + + for iEnd = Xsqlite3VdbeCurrentAddr(tls, v); iOp < iEnd; iOp++ { + var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iOp) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 == (*Window)(unsafe.Pointer(pWin)).FiEphCsr { + (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = csr + } + } + } + if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0 { + var pColl uintptr + + pColl = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32))+8)).FpExpr) + Xsqlite3VdbeAddOp4(tls, v, OP_CollSeq, 0, 0, 0, pColl, -2) + } + Xsqlite3VdbeAddOp3(tls, v, func() int32 { + if bInverse != 0 { + return OP_AggInverse + } + return OP_AggStep + }(), + bInverse, regArg, (*Window)(unsafe.Pointer(pWin)).FregAccum) + Xsqlite3VdbeAppendP4(tls, v, pFunc, -8) + Xsqlite3VdbeChangeP5(tls, v, uint16(U8(nArg))) + if (*Window)(unsafe.Pointer(pWin)).FbExprArgs != 0 { + Xsqlite3ReleaseTempRange(tls, pParse, regArg, nArg) + } + if addrIf != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrIf) + } + } + } +} + +// Values that may be passed as the second argument to windowCodeOp(). + +// Generate VM code to invoke either xValue() (bFin==0) or xFinalize() +// (bFin==1) for each window function in the linked list starting at +// pMWin. Or, for built-in window-functions that do not use the standard +// API, generate the equivalent VM code. +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ + var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse + var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var pWin uintptr + + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid == 0 && + (*FuncDef)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_MINMAX) != 0 && + int32((*Window)(unsafe.Pointer(pWin)).FeStart) != TK_UNBOUNDED { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pWin)).FregResult) + Xsqlite3VdbeAddOp1(tls, v, OP_Last, (*Window)(unsafe.Pointer(pWin)).FcsrApp) + + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*Window)(unsafe.Pointer(pWin)).FcsrApp, 0, (*Window)(unsafe.Pointer(pWin)).FregResult) + Xsqlite3VdbeJumpHere(tls, v, Xsqlite3VdbeCurrentAddr(tls, v)-2) + } else if (*Window)(unsafe.Pointer(pWin)).FregApp != 0 { + + } else { + var nArg int32 = windowArgCount(tls, pWin) + if bFin != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_AggFinal, (*Window)(unsafe.Pointer(pWin)).FregAccum, nArg) + Xsqlite3VdbeAppendP4(tls, v, (*Window)(unsafe.Pointer(pWin)).FpFunc, -8) + Xsqlite3VdbeAddOp2(tls, v, OP_Copy, (*Window)(unsafe.Pointer(pWin)).FregAccum, (*Window)(unsafe.Pointer(pWin)).FregResult) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pWin)).FregAccum) + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_AggValue, (*Window)(unsafe.Pointer(pWin)).FregAccum, nArg, (*Window)(unsafe.Pointer(pWin)).FregResult) + Xsqlite3VdbeAppendP4(tls, v, (*Window)(unsafe.Pointer(pWin)).FpFunc, -8) + } + } + } +} + +// Generate code to calculate the current values of all window functions in the +// p->pMWin list by doing a full scan of the current window frame. Store the +// results in the Window.regResult registers, ready to return the upper +// layer. +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ + var pWin uintptr + var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse + var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin + var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe + + var regCRowid int32 = 0 // Current rowid value + var regCPeer int32 = 0 // Current peer values + var regRowid int32 = 0 // AggStep rowid value + var regPeer int32 = 0 // AggStep peer values + + var nPeer int32 + var lblNext int32 + var lblBrk int32 + var addrNext int32 + var csr int32 + + csr = (*Window)(unsafe.Pointer(pMWin)).FcsrApp + nPeer = func() int32 { + if (*Window)(unsafe.Pointer(pMWin)).FpOrderBy != 0 { + return (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pMWin)).FpOrderBy)).FnExpr + } + return 0 + }() + + lblNext = Xsqlite3VdbeMakeLabel(tls, pParse) + lblBrk = Xsqlite3VdbeMakeLabel(tls, pParse) + + regCRowid = Xsqlite3GetTempReg(tls, pParse) + regRowid = Xsqlite3GetTempReg(tls, pParse) + if nPeer != 0 { + regCPeer = Xsqlite3GetTempRange(tls, pParse, nPeer) + regPeer = Xsqlite3GetTempRange(tls, pParse, nPeer) + } + + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr, regCRowid) + windowReadPeerValues(tls, p, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr, regCPeer) + + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pWin)).FregAccum) + } + + Xsqlite3VdbeAddOp3(tls, v, OP_SeekGE, csr, lblBrk, (*Window)(unsafe.Pointer(pMWin)).FregStartRowid) + + addrNext = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, csr, regRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Gt, (*Window)(unsafe.Pointer(pMWin)).FregEndRowid, lblBrk, regRowid) + + if int32((*Window)(unsafe.Pointer(pMWin)).FeExclude) == TK_CURRENT { + Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regCRowid, lblNext, regRowid) + + } else if int32((*Window)(unsafe.Pointer(pMWin)).FeExclude) != TK_NO { + var addr int32 + var addrEq int32 = 0 + var pKeyInfo uintptr = uintptr(0) + + if (*Window)(unsafe.Pointer(pMWin)).FpOrderBy != 0 { + pKeyInfo = Xsqlite3KeyInfoFromExprList(tls, pParse, (*Window)(unsafe.Pointer(pMWin)).FpOrderBy, 0, 0) + } + if int32((*Window)(unsafe.Pointer(pMWin)).FeExclude) == TK_TIES { + addrEq = Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regCRowid, 0, regRowid) + + } + if pKeyInfo != 0 { + windowReadPeerValues(tls, p, csr, regPeer) + Xsqlite3VdbeAddOp3(tls, v, OP_Compare, regPeer, regCPeer, nPeer) + Xsqlite3VdbeAppendP4(tls, v, pKeyInfo, -9) + addr = Xsqlite3VdbeCurrentAddr(tls, v) + 1 + Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addr, lblNext, addr) + + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, lblNext) + } + if addrEq != 0 { + Xsqlite3VdbeJumpHere(tls, v, addrEq) + } + } + + windowAggStep(tls, p, pMWin, csr, 0, (*WindowCodeArg)(unsafe.Pointer(p)).FregArg) + + Xsqlite3VdbeResolveLabel(tls, v, lblNext) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, csr, addrNext) + + Xsqlite3VdbeJumpHere(tls, v, addrNext-1) + Xsqlite3VdbeJumpHere(tls, v, addrNext+1) + Xsqlite3ReleaseTempReg(tls, pParse, regRowid) + Xsqlite3ReleaseTempReg(tls, pParse, regCRowid) + if nPeer != 0 { + Xsqlite3ReleaseTempRange(tls, pParse, regPeer, nPeer) + Xsqlite3ReleaseTempRange(tls, pParse, regCPeer, nPeer) + } + + windowAggFinal(tls, p, 1) + +} + +// Invoke the sub-routine at regGosub (generated by code in select.c) to +// return the current row of Window.iEphCsr. If all window functions are +// aggregate window functions that use the standard API, a single +// OP_Gosub instruction is all that this routine generates. Extra VM code +// for per-row processing is only generated for the following built-in window +// functions: +// +// nth_value() +// first_value() +// lag() +// lead() +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ + var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin + var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe + + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { + windowFullScan(tls, p) + } else { + var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse + var pWin uintptr + + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + var pFunc uintptr = (*Window)(unsafe.Pointer(pWin)).FpFunc + + if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&nth_valueName)) || + (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&first_valueName)) { + var csr int32 = (*Window)(unsafe.Pointer(pWin)).FcsrApp + var lbl int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + var tmpReg int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pWin)).FregResult) + + if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&nth_valueName)) { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*Window)(unsafe.Pointer(pMWin)).FiEphCsr, (*Window)(unsafe.Pointer(pWin)).FiArgCol+1, tmpReg) + windowCheckValue(tls, pParse, tmpReg, 2) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, tmpReg) + } + Xsqlite3VdbeAddOp3(tls, v, OP_Add, tmpReg, (*Window)(unsafe.Pointer(pWin)).FregApp, tmpReg) + Xsqlite3VdbeAddOp3(tls, v, OP_Gt, (*Window)(unsafe.Pointer(pWin)).FregApp+1, lbl, tmpReg) + + Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, csr, 0, tmpReg) + + Xsqlite3VdbeAddOp3(tls, v, OP_Column, csr, (*Window)(unsafe.Pointer(pWin)).FiArgCol, (*Window)(unsafe.Pointer(pWin)).FregResult) + Xsqlite3VdbeResolveLabel(tls, v, lbl) + Xsqlite3ReleaseTempReg(tls, pParse, tmpReg) + } else if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&leadName)) || (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&lagName)) { + var nArg int32 = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)))).FnExpr + var csr int32 = (*Window)(unsafe.Pointer(pWin)).FcsrApp + var lbl int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + var tmpReg int32 = Xsqlite3GetTempReg(tls, pParse) + var iEph int32 = (*Window)(unsafe.Pointer(pMWin)).FiEphCsr + + if nArg < 3 { + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pWin)).FregResult) + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEph, (*Window)(unsafe.Pointer(pWin)).FiArgCol+2, (*Window)(unsafe.Pointer(pWin)).FregResult) + } + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iEph, tmpReg) + if nArg < 2 { + var val int32 = func() int32 { + if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&leadName)) { + return 1 + } + return -1 + }() + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, tmpReg, val) + } else { + var op int32 = func() int32 { + if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&leadName)) { + return OP_Add + } + return OP_Subtract + }() + var tmpReg2 int32 = Xsqlite3GetTempReg(tls, pParse) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEph, (*Window)(unsafe.Pointer(pWin)).FiArgCol+1, tmpReg2) + Xsqlite3VdbeAddOp3(tls, v, op, tmpReg2, tmpReg, tmpReg) + Xsqlite3ReleaseTempReg(tls, pParse, tmpReg2) + } + + Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, csr, lbl, tmpReg) + + Xsqlite3VdbeAddOp3(tls, v, OP_Column, csr, (*Window)(unsafe.Pointer(pWin)).FiArgCol, (*Window)(unsafe.Pointer(pWin)).FregResult) + Xsqlite3VdbeResolveLabel(tls, v, lbl) + Xsqlite3ReleaseTempReg(tls, pParse, tmpReg) + } + } + } + Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*WindowCodeArg)(unsafe.Pointer(p)).FregGosub, (*WindowCodeArg)(unsafe.Pointer(p)).FaddrGosub) +} + +// Generate code to set the accumulator register for each window function +// in the linked list passed as the second argument to NULL. And perform +// any equivalent initialization required by any built-in window functions +// in the list. +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var regArg int32 + var nArg int32 = 0 + var pWin uintptr + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + var pFunc uintptr = (*Window)(unsafe.Pointer(pWin)).FpFunc + + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*Window)(unsafe.Pointer(pWin)).FregAccum) + nArg = func() int32 { + if nArg > windowArgCount(tls, pWin) { + return nArg + } + return windowArgCount(tls, pWin) + }() + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid == 0 { + if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&nth_valueName)) || (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&first_valueName)) { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Window)(unsafe.Pointer(pWin)).FregApp) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Window)(unsafe.Pointer(pWin)).FregApp+1) + } + + if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_MINMAX) != 0 && (*Window)(unsafe.Pointer(pWin)).FcsrApp != 0 { + + Xsqlite3VdbeAddOp1(tls, v, OP_ResetSorter, (*Window)(unsafe.Pointer(pWin)).FcsrApp) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Window)(unsafe.Pointer(pWin)).FregApp+1) + } + } + } + regArg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nArg + return regArg +} + +// Return true if the current frame should be cached in the ephemeral table, +// even if there are no xInverse() calls required. +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ + var pWin uintptr + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { + return 1 + } + for pWin = pMWin; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + var pFunc uintptr = (*Window)(unsafe.Pointer(pWin)).FpFunc + if (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&nth_valueName)) || + (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&first_valueName)) || + (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&leadName)) || + (*FuncDef)(unsafe.Pointer(pFunc)).FzName == uintptr(unsafe.Pointer(&lagName)) { + return 1 + } + } + return 0 +} + +// regOld and regNew are each the first register in an array of size +// pOrderBy->nExpr. This function generates code to compare the two +// arrays of registers using the collation sequences and other comparison +// parameters specified by pOrderBy. +// +// If the two arrays are not equal, the contents of regNew is copied to +// regOld and control falls through. Otherwise, if the contents of the arrays +// are equal, an OP_Goto is executed. The address of the OP_Goto is returned. +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + if pOrderBy != 0 { + var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr + var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, pOrderBy, 0, 0) + Xsqlite3VdbeAddOp3(tls, v, OP_Compare, regOld, regNew, nVal) + Xsqlite3VdbeAppendP4(tls, v, pKeyInfo, -9) + Xsqlite3VdbeAddOp3(tls, v, OP_Jump, + Xsqlite3VdbeCurrentAddr(tls, v)+1, addr, Xsqlite3VdbeCurrentAddr(tls, v)+1) + + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regNew, regOld, nVal-1) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addr) + } +} + +// This function is called as part of generating VM programs for RANGE +// offset PRECEDING/FOLLOWING frame boundaries. Assuming "ASC" order for +// the ORDER BY term in the window, and that argument op is OP_Ge, it generates +// code equivalent to: +// +// if( csr1.peerVal + regVal >= csr2.peerVal ) goto lbl; +// +// The value of parameter op may also be OP_Gt or OP_Le. In these cases the +// operator in the above pseudo-code is replaced with ">" or "<=", respectively. +// +// If the sort-order for the ORDER BY term in the window is DESC, then the +// comparison is reversed. Instead of adding regVal to csr1.peerVal, it is +// subtracted. And the comparison operator is inverted to - ">=" becomes "<=", +// ">" becomes "<", and so on. So, with DESC sort order, if the argument op +// is OP_Ge, the generated code is equivalent to: +// +// if( csr1.peerVal - regVal <= csr2.peerVal ) goto lbl; +// +// A special type of arithmetic is used such that if csr1.peerVal is not +// a numeric type (real or integer), then the result of the addition +// or subtraction is a a copy of csr1.peerVal. +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ + var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window + var reg1 int32 = Xsqlite3GetTempReg(tls, pParse) // Reg. for csr1.peerVal+regVal + var reg2 int32 = Xsqlite3GetTempReg(tls, pParse) // Reg. for csr2.peerVal + var regString int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) // Reg. for constant value '' + var arith int32 = OP_Add // OP_Add or OP_Subtract + var addrGe int32 // Jump destination + var addrDone int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Address past OP_Ge + var pColl uintptr + + // Read the peer-value from each cursor into a register + windowReadPeerValues(tls, p, csr1, reg1) + windowReadPeerValues(tls, p, csr2, reg2) + + if int32((*ExprList_item)(unsafe.Pointer(pOrderBy+8)).FsortFlags)&KEYINFO_ORDER_DESC != 0 { + switch op { + case OP_Ge: + op = OP_Le + break + fallthrough + case OP_Gt: + op = OP_Lt + break + fallthrough + default: + op = OP_Ge + break + } + arith = OP_Subtract + } + + // If the BIGNULL flag is set for the ORDER BY, then it is required to + // consider NULL values to be larger than all other values, instead of + // the usual smaller. The VDBE opcodes OP_Ge and so on do not handle this + // (and adding that capability causes a performance regression), so + // instead if the BIGNULL flag is set then cases where either reg1 or + // reg2 are NULL are handled separately in the following block. The code + // generated is equivalent to: + // + // if( reg1 IS NULL ){ + // if( op==OP_Ge ) goto lbl; + // if( op==OP_Gt && reg2 IS NOT NULL ) goto lbl; + // if( op==OP_Le && reg2 IS NULL ) goto lbl; + // }else if( reg2 IS NULL ){ + // if( op==OP_Le ) goto lbl; + // } + // + // Additionally, if either reg1 or reg2 are NULL but the jump to lbl is + // not taken, control jumps over the comparison operator coded below this + // block. + if int32((*ExprList_item)(unsafe.Pointer(pOrderBy+8)).FsortFlags)&KEYINFO_ORDER_BIGNULL != 0 { + // This block runs if reg1 contains a NULL. + var addr int32 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, reg1) + switch op { + case OP_Ge: + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, lbl) + break + fallthrough + case OP_Gt: + Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, reg2, lbl) + + break + fallthrough + case OP_Le: + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) + + break + fallthrough + default: /* no-op */ + break + } + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) + + // This block runs if reg1 is not NULL, but reg2 is. + Xsqlite3VdbeJumpHere(tls, v, addr) + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) + if op == OP_Gt || op == OP_Ge { + Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) + } + } + + // Register reg1 currently contains csr1.peerVal (the peer-value from csr1). + // This block adds (or subtracts for DESC) the numeric value in regVal + // from it. Or, if reg1 is not numeric (it is a NULL, a text value or a blob), + // then leave reg1 as it is. In pseudo-code, this is implemented as: + // + // if( reg1>='' ) goto addrGe; + // reg1 = reg1 +/- regVal + // addrGe: + // + // Since all strings and blobs are greater-than-or-equal-to an empty string, + // the add/subtract is skipped for these, as required. If reg1 is a NULL, + // then the arithmetic is performed, but since adding or subtracting from + // NULL is always NULL anyway, this case is handled as required too. + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1525, -1) + addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) + + if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { + Xsqlite3VdbeAddOp3(tls, v, op, reg2, lbl, reg1) + } + Xsqlite3VdbeAddOp3(tls, v, arith, regVal, reg1, reg1) + Xsqlite3VdbeJumpHere(tls, v, addrGe) + + // Compare registers reg2 and reg1, taking the jump if required. Note that + // control skips over this test if the BIGNULL flag is set and either + // reg1 or reg2 contain a NULL value. + Xsqlite3VdbeAddOp3(tls, v, op, reg2, lbl, reg1) + pColl = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pOrderBy+8)).FpExpr) + Xsqlite3VdbeAppendP4(tls, v, pColl, -2) + Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ)) + Xsqlite3VdbeResolveLabel(tls, v, addrDone) + + Xsqlite3ReleaseTempReg(tls, pParse, reg1) + Xsqlite3ReleaseTempReg(tls, pParse, reg2) + +} + +// Helper function for sqlite3WindowCodeStep(). Each call to this function +// generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE +// operation. Refer to the header comment for sqlite3WindowCodeStep() for +// details. +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ + var csr int32 + var reg int32 + var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse + var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin + var ret int32 = 0 + var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe + var addrContinue int32 = 0 + var bPeer int32 = libc.Bool32(int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) != TK_ROWS) + + var lblDone int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + var addrNextRange int32 = 0 + + // Special case - WINDOW_AGGINVERSE is always a no-op if the frame + // starts with UNBOUNDED PRECEDING. + if op == WINDOW_AGGINVERSE && int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_UNBOUNDED { + + return 0 + } + + if regCountdown > 0 { + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { + addrNextRange = Xsqlite3VdbeCurrentAddr(tls, v) + + if op == WINDOW_AGGINVERSE { + if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING { + windowCodeRangeTest(tls, + p, OP_Le, (*WindowCodeArg)(unsafe.Pointer(p)).Fcurrent.Fcsr, regCountdown, (*WindowCodeArg)(unsafe.Pointer(p)).Fstart.Fcsr, lblDone) + } else { + windowCodeRangeTest(tls, + p, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(p)).Fstart.Fcsr, regCountdown, (*WindowCodeArg)(unsafe.Pointer(p)).Fcurrent.Fcsr, lblDone) + } + } else { + windowCodeRangeTest(tls, + p, OP_Gt, (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Fcsr, regCountdown, (*WindowCodeArg)(unsafe.Pointer(p)).Fcurrent.Fcsr, lblDone) + } + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, regCountdown, lblDone, 1) + + } + } + + if op == WINDOW_RETURN_ROW && (*Window)(unsafe.Pointer(pMWin)).FregStartRowid == 0 { + windowAggFinal(tls, p, 0) + } + addrContinue = Xsqlite3VdbeCurrentAddr(tls, v) + + // If this is a (RANGE BETWEEN a FOLLOWING AND b FOLLOWING) or + // (RANGE BETWEEN b PRECEDING AND a PRECEDING) frame, ensure the + // start cursor does not advance past the end cursor within the + // temporary table. It otherwise might, if (a>b). Also ensure that, + // if the input cursor is still finding new rows, that the end + // cursor does not go past it to EOF. + if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) && regCountdown != 0 && + int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { + var regRowid1 int32 = Xsqlite3GetTempReg(tls, pParse) + var regRowid2 int32 = Xsqlite3GetTempReg(tls, pParse) + if op == WINDOW_AGGINVERSE { + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fstart.Fcsr, regRowid1) + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Fcsr, regRowid2) + Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regRowid2, lblDone, regRowid1) + + } else if (*WindowCodeArg)(unsafe.Pointer(p)).FregRowid != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Fcsr, regRowid1) + Xsqlite3VdbeAddOp3(tls, v, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(p)).FregRowid, lblDone, regRowid1) + + } + Xsqlite3ReleaseTempReg(tls, pParse, regRowid1) + Xsqlite3ReleaseTempReg(tls, pParse, regRowid2) + + } + + switch op { + case WINDOW_RETURN_ROW: + csr = (*WindowCodeArg)(unsafe.Pointer(p)).Fcurrent.Fcsr + reg = (*WindowCodeArg)(unsafe.Pointer(p)).Fcurrent.Freg + windowReturnOneRow(tls, p) + break + + case WINDOW_AGGINVERSE: + csr = (*WindowCodeArg)(unsafe.Pointer(p)).Fstart.Fcsr + reg = (*WindowCodeArg)(unsafe.Pointer(p)).Fstart.Freg + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { + + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, (*Window)(unsafe.Pointer(pMWin)).FregStartRowid, 1) + } else { + windowAggStep(tls, p, pMWin, csr, 1, (*WindowCodeArg)(unsafe.Pointer(p)).FregArg) + } + break + + default: + + csr = (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Fcsr + reg = (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Freg + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { + + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, (*Window)(unsafe.Pointer(pMWin)).FregEndRowid, 1) + } else { + windowAggStep(tls, p, pMWin, csr, 0, (*WindowCodeArg)(unsafe.Pointer(p)).FregArg) + } + break + } + + if op == (*WindowCodeArg)(unsafe.Pointer(p)).FeDelete { + Xsqlite3VdbeAddOp1(tls, v, OP_Delete, csr) + Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SAVEPOSITION)) + } + + if jumpOnEof != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Next, csr, Xsqlite3VdbeCurrentAddr(tls, v)+2) + + ret = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + } else { + Xsqlite3VdbeAddOp2(tls, v, OP_Next, csr, Xsqlite3VdbeCurrentAddr(tls, v)+1+bPeer) + + if bPeer != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, lblDone) + } + } + + if bPeer != 0 { + var nReg int32 = func() int32 { + if (*Window)(unsafe.Pointer(pMWin)).FpOrderBy != 0 { + return (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pMWin)).FpOrderBy)).FnExpr + } + return 0 + }() + var regTmp int32 = func() int32 { + if nReg != 0 { + return Xsqlite3GetTempRange(tls, pParse, nReg) + } + return 0 + }() + windowReadPeerValues(tls, p, csr, regTmp) + windowIfNewPeer(tls, pParse, (*Window)(unsafe.Pointer(pMWin)).FpOrderBy, regTmp, reg, addrContinue) + Xsqlite3ReleaseTempRange(tls, pParse, regTmp, nReg) + } + + if addrNextRange != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrNextRange) + } + Xsqlite3VdbeResolveLabel(tls, v, lblDone) + return ret +} + +// Allocate and return a duplicate of the Window object indicated by the +// third argument. Set the Window.pOwner field of the new object to +// pOwner. +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ + var pNew uintptr = uintptr(0) + if p != 0 { + pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) + if pNew != 0 { + (*Window)(unsafe.Pointer(pNew)).FzName = Xsqlite3DbStrDup(tls, db, (*Window)(unsafe.Pointer(p)).FzName) + (*Window)(unsafe.Pointer(pNew)).FzBase = Xsqlite3DbStrDup(tls, db, (*Window)(unsafe.Pointer(p)).FzBase) + (*Window)(unsafe.Pointer(pNew)).FpFilter = Xsqlite3ExprDup(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter, 0) + (*Window)(unsafe.Pointer(pNew)).FpFunc = (*Window)(unsafe.Pointer(p)).FpFunc + (*Window)(unsafe.Pointer(pNew)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(p)).FpPartition, 0) + (*Window)(unsafe.Pointer(pNew)).FpOrderBy = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(p)).FpOrderBy, 0) + (*Window)(unsafe.Pointer(pNew)).FeFrmType = (*Window)(unsafe.Pointer(p)).FeFrmType + (*Window)(unsafe.Pointer(pNew)).FeEnd = (*Window)(unsafe.Pointer(p)).FeEnd + (*Window)(unsafe.Pointer(pNew)).FeStart = (*Window)(unsafe.Pointer(p)).FeStart + (*Window)(unsafe.Pointer(pNew)).FeExclude = (*Window)(unsafe.Pointer(p)).FeExclude + (*Window)(unsafe.Pointer(pNew)).FregResult = (*Window)(unsafe.Pointer(p)).FregResult + (*Window)(unsafe.Pointer(pNew)).FregAccum = (*Window)(unsafe.Pointer(p)).FregAccum + (*Window)(unsafe.Pointer(pNew)).FiArgCol = (*Window)(unsafe.Pointer(p)).FiArgCol + (*Window)(unsafe.Pointer(pNew)).FiEphCsr = (*Window)(unsafe.Pointer(p)).FiEphCsr + (*Window)(unsafe.Pointer(pNew)).FbExprArgs = (*Window)(unsafe.Pointer(p)).FbExprArgs + (*Window)(unsafe.Pointer(pNew)).FpStart = Xsqlite3ExprDup(tls, db, (*Window)(unsafe.Pointer(p)).FpStart, 0) + (*Window)(unsafe.Pointer(pNew)).FpEnd = Xsqlite3ExprDup(tls, db, (*Window)(unsafe.Pointer(p)).FpEnd, 0) + (*Window)(unsafe.Pointer(pNew)).FpOwner = pOwner + (*Window)(unsafe.Pointer(pNew)).FbImplicitFrame = (*Window)(unsafe.Pointer(p)).FbImplicitFrame + } + } + return pNew +} + +// Return a copy of the linked list of Window objects passed as the +// second argument. +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pWin uintptr + *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(0) + var pp uintptr = bp /* &pRet */ + + for pWin = p; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { + *(*uintptr)(unsafe.Pointer(pp)) = Xsqlite3WindowDup(tls, db, uintptr(0), pWin) + if *(*uintptr)(unsafe.Pointer(pp)) == uintptr(0) { + break + } + pp = *(*uintptr)(unsafe.Pointer(pp)) + 64 + } + + return *(*uintptr)(unsafe.Pointer(bp /* pRet */)) +} + +// Return true if it can be determined at compile time that expression +// pExpr evaluates to a value that, when cast to an integer, is greater +// than zero. False otherwise. +// +// If an OOM error occurs, this function sets the Parse.db.mallocFailed +// flag and returns zero. +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var ret int32 = 0 + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, pExpr, (*Sqlite3)(unsafe.Pointer(db)).Fenc, uint8(SQLITE_AFF_NUMERIC), bp) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 && Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(bp))) > 0 { + ret = 1 + } + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + return ret +} + +// sqlite3WhereBegin() has already been called for the SELECT statement +// passed as the second argument when this function is invoked. It generates +// code to populate the Window.regResult register for each window function +// and invoke the sub-routine at instruction addrGosub once for each row. +// sqlite3WhereEnd() is always called before returning. +// +// This function handles several different types of window frames, which +// require slightly different processing. The following pseudo code is +// used to implement window frames of the form: +// +// ROWS BETWEEN PRECEDING AND FOLLOWING +// +// Other window frame types use variants of the following: +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// +// if( first row of partition ){ +// // Rewind three cursors, all open on the eph table. +// Rewind(csrEnd); +// Rewind(csrStart); +// Rewind(csrCurrent); +// +// regEnd = // FOLLOWING expression +// regStart = // PRECEDING expression +// }else{ +// // First time this branch is taken, the eph table contains two +// // rows. The first row in the partition, which all three cursors +// // currently point to, and the following row. +// AGGSTEP +// if( (regEnd--)<=0 ){ +// RETURN_ROW +// if( (regStart--)<=0 ){ +// AGGINVERSE +// } +// } +// } +// } +// flush: +// AGGSTEP +// while( 1 ){ +// RETURN ROW +// if( csrCurrent is EOF ) break; +// if( (regStart--)<=0 ){ +// AggInverse(csrStart) +// Next(csrStart) +// } +// } +// +// The pseudo-code above uses the following shorthand: +// +// AGGSTEP: invoke the aggregate xStep() function for each window function +// with arguments read from the current row of cursor csrEnd, then +// step cursor csrEnd forward one row (i.e. sqlite3BtreeNext()). +// +// RETURN_ROW: return a row to the caller based on the contents of the +// current row of csrCurrent and the current state of all +// aggregates. Then step cursor csrCurrent forward one row. +// +// AGGINVERSE: invoke the aggregate xInverse() function for each window +// functions with arguments read from the current row of cursor +// csrStart. Then step csrStart forward one row. +// +// There are two other ROWS window frames that are handled significantly +// differently from the above - "BETWEEN PRECEDING AND PRECEDING" +// and "BETWEEN FOLLOWING AND FOLLOWING". These are special +// cases because they change the order in which the three cursors (csrStart, +// csrCurrent and csrEnd) iterate through the ephemeral table. Cases that +// use UNBOUNDED or CURRENT ROW are much simpler variations on one of these +// three. +// +// ROWS BETWEEN PRECEDING AND PRECEDING +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regEnd = +// regStart = +// }else{ +// if( (regEnd--)<=0 ){ +// AGGSTEP +// } +// RETURN_ROW +// if( (regStart--)<=0 ){ +// AGGINVERSE +// } +// } +// } +// flush: +// if( (regEnd--)<=0 ){ +// AGGSTEP +// } +// RETURN_ROW +// +// +// ROWS BETWEEN FOLLOWING AND FOLLOWING +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regEnd = +// regStart = regEnd - +// }else{ +// AGGSTEP +// if( (regEnd--)<=0 ){ +// RETURN_ROW +// } +// if( (regStart--)<=0 ){ +// AGGINVERSE +// } +// } +// } +// flush: +// AGGSTEP +// while( 1 ){ +// if( (regEnd--)<=0 ){ +// RETURN_ROW +// if( eof ) break; +// } +// if( (regStart--)<=0 ){ +// AGGINVERSE +// if( eof ) break +// } +// } +// while( !eof csrCurrent ){ +// RETURN_ROW +// } +// +// For the most part, the patterns above are adapted to support UNBOUNDED by +// assuming that it is equivalent to "infinity PRECEDING/FOLLOWING" and +// CURRENT ROW by assuming that it is equivilent to "0 PRECEDING/FOLLOWING". +// This is optimized of course - branches that will never be taken and +// conditions that are always true are omitted from the VM code. The only +// exceptional case is: +// +// ROWS BETWEEN FOLLOWING AND UNBOUNDED FOLLOWING +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regStart = +// }else{ +// AGGSTEP +// } +// } +// flush: +// AGGSTEP +// while( 1 ){ +// if( (regStart--)<=0 ){ +// AGGINVERSE +// if( eof ) break +// } +// RETURN_ROW +// } +// while( !eof csrCurrent ){ +// RETURN_ROW +// } +// +// Also requiring special handling are the cases: +// +// ROWS BETWEEN PRECEDING AND PRECEDING +// ROWS BETWEEN FOLLOWING AND FOLLOWING +// +// when (expr1 < expr2). This is detected at runtime, not by this function. +// To handle this case, the pseudo-code programs depicted above are modified +// slightly to be: +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regEnd = +// regStart = +// if( regEnd < regStart ){ +// RETURN_ROW +// delete eph table contents +// continue +// } +// ... +// +// The new "continue" statement in the above jumps to the next iteration +// of the outer loop - the one started by sqlite3WhereBegin(). +// +// The various GROUPS cases are implemented using the same patterns as +// ROWS. The VM code is modified slightly so that: +// +// 1. The else branch in the main loop is only taken if the row just +// added to the ephemeral table is the start of a new group. In +// other words, it becomes: +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regEnd = +// regStart = +// }else if( new group ){ +// ... +// } +// } +// +// 2. Instead of processing a single row, each RETURN_ROW, AGGSTEP or +// AGGINVERSE step processes the current row of the relevant cursor and +// all subsequent rows belonging to the same group. +// +// RANGE window frames are a little different again. As for GROUPS, the +// main loop runs once per group only. And RETURN_ROW, AGGSTEP and AGGINVERSE +// deal in groups instead of rows. As for ROWS and GROUPS, there are three +// basic cases: +// +// RANGE BETWEEN PRECEDING AND FOLLOWING +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regEnd = +// regStart = +// }else{ +// AGGSTEP +// while( (csrCurrent.key + regEnd) < csrEnd.key ){ +// RETURN_ROW +// while( csrStart.key + regStart) < csrCurrent.key ){ +// AGGINVERSE +// } +// } +// } +// } +// flush: +// AGGSTEP +// while( 1 ){ +// RETURN ROW +// if( csrCurrent is EOF ) break; +// while( csrStart.key + regStart) < csrCurrent.key ){ +// AGGINVERSE +// } +// } +// } +// +// In the above notation, "csr.key" means the current value of the ORDER BY +// expression (there is only ever 1 for a RANGE that uses an FOLLOWING +// or PRECEDING AND PRECEDING +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regEnd = +// regStart = +// }else{ +// while( (csrEnd.key + regEnd) <= csrCurrent.key ){ +// AGGSTEP +// } +// while( (csrStart.key + regStart) < csrCurrent.key ){ +// AGGINVERSE +// } +// RETURN_ROW +// } +// } +// flush: +// while( (csrEnd.key + regEnd) <= csrCurrent.key ){ +// AGGSTEP +// } +// while( (csrStart.key + regStart) < csrCurrent.key ){ +// AGGINVERSE +// } +// RETURN_ROW +// +// RANGE BETWEEN FOLLOWING AND FOLLOWING +// +// ... loop started by sqlite3WhereBegin() ... +// if( new partition ){ +// Gosub flush +// } +// Insert new row into eph table. +// if( first row of partition ){ +// Rewind(csrEnd) ; Rewind(csrStart) ; Rewind(csrCurrent) +// regEnd = +// regStart = +// }else{ +// AGGSTEP +// while( (csrCurrent.key + regEnd) < csrEnd.key ){ +// while( (csrCurrent.key + regStart) > csrStart.key ){ +// AGGINVERSE +// } +// RETURN_ROW +// } +// } +// } +// flush: +// AGGSTEP +// while( 1 ){ +// while( (csrCurrent.key + regStart) > csrStart.key ){ +// AGGINVERSE +// if( eof ) break "while( 1 )" loop. +// } +// RETURN_ROW +// } +// while( !eof csrCurrent ){ +// RETURN_ROW +// } +// +// The text above leaves out many details. Refer to the code and comments +// below for a more complete picture. +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + var pMWin uintptr = (*Select)(unsafe.Pointer(p)).FpWin + var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy + var v uintptr = Xsqlite3GetVdbe(tls, pParse) + var csrWrite int32 // Cursor used to write to eph. table + var csrInput int32 = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FiCursor // Cursor of sub-select + var nInput int32 = int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpTab)).FnCol) // Number of cols returned by sub + var iInput int32 // To iterate through sub cols + var addrNe int32 // Address of OP_Ne + var addrGosubFlush int32 = 0 // Address of OP_Gosub to flush: + var addrInteger int32 = 0 // Address of OP_Integer + var addrEmpty int32 // Address of OP_Rewind in flush: + var regNew int32 // Array of registers holding new input row + var regRecord int32 // regNew array in record form + var regNewPeer int32 = 0 // Peer values for new row (part of regNew) + var regPeer int32 = 0 // Peer values for current row + var regFlushPart int32 = 0 // Register for "Gosub flush_partition" + // var s WindowCodeArg at bp, 72 + // Context object for sub-routines + var lblWhereEnd int32 // Label just before sqlite3WhereEnd() code + var regStart int32 = 0 // Value of PRECEDING + var regEnd int32 = 0 // Value of FOLLOWING + + lblWhereEnd = Xsqlite3VdbeMakeLabel(tls, pParse) + + // Fill in the context object + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(WindowCodeArg{}))) + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FpParse = pParse + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FpMWin = pMWin + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FpVdbe = v + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregGosub = regGosub + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FaddrGosub = addrGosub + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr = (*Window)(unsafe.Pointer(pMWin)).FiEphCsr + csrWrite = (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr + 1 + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fstart.Fcsr = (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr + 2 + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr = (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr + 3 + + // Figure out when rows may be deleted from the ephemeral table. There + // are four options - they may never be deleted (eDelete==0), they may + // be deleted as soon as they are no longer part of the window frame + // (eDelete==WINDOW_AGGINVERSE), they may be deleted as after the row + // has been returned to the caller (WINDOW_RETURN_ROW), or they may + // be deleted after they enter the frame (WINDOW_AGGSTEP). + switch int32((*Window)(unsafe.Pointer(pMWin)).FeStart) { + case TK_FOLLOWING: + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) != TK_RANGE && + windowExprGtZero(tls, pParse, (*Window)(unsafe.Pointer(pMWin)).FpStart) != 0 { + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FeDelete = WINDOW_RETURN_ROW + } + break + case TK_UNBOUNDED: + if windowCacheFrame(tls, pMWin) == 0 { + if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_PRECEDING { + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) != TK_RANGE && + windowExprGtZero(tls, pParse, (*Window)(unsafe.Pointer(pMWin)).FpEnd) != 0 { + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FeDelete = WINDOW_AGGSTEP + } + } else { + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FeDelete = WINDOW_RETURN_ROW + } + } + break + default: + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FeDelete = WINDOW_AGGINVERSE + break + } + + // Allocate registers for the array of values from the sub-query, the + // samve values in record form, and the rowid used to insert said record + // into the ephemeral table. + regNew = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nInput + regRecord = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + + // If the window frame contains an " PRECEDING" or " FOLLOWING" + // clause, allocate registers to store the results of evaluating each + // . + if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_PRECEDING || int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING { + regStart = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_PRECEDING || int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_FOLLOWING { + regEnd = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + } + + // If this is not a "ROWS BETWEEN ..." frame, then allocate arrays of + // registers to store copies of the ORDER BY expressions (peer values) + // for the main loop, and for each cursor (start, current and end). + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) != TK_ROWS { + var nPeer int32 = func() int32 { + if pOrderBy != 0 { + return (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr + } + return 0 + }() + regNewPeer = regNew + (*Window)(unsafe.Pointer(pMWin)).FnBufferCol + if (*Window)(unsafe.Pointer(pMWin)).FpPartition != 0 { + regNewPeer = regNewPeer + (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pMWin)).FpPartition)).FnExpr + } + regPeer = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nPeer + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fstart.Freg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nPeer + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Freg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nPeer + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Freg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += nPeer + } + + // Load the column values for the row returned by the sub-select + // into an array of registers starting at regNew. Assemble them into + // a record in register regRecord. + for iInput = 0; iInput < nInput; iInput++ { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, csrInput, iInput, regNew+iInput) + } + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regNew, nInput, regRecord) + + // An input row has just been read into an array of registers starting + // at regNew. If the window has a PARTITION clause, this block generates + // VM code to check if the input row is the start of a new partition. + // If so, it does an OP_Gosub to an address to be filled in later. The + // address of the OP_Gosub is stored in local variable addrGosubFlush. + if (*Window)(unsafe.Pointer(pMWin)).FpPartition != 0 { + var addr int32 + var pPart uintptr = (*Window)(unsafe.Pointer(pMWin)).FpPartition + var nPart int32 = (*ExprList)(unsafe.Pointer(pPart)).FnExpr + var regNewPart int32 = regNew + (*Window)(unsafe.Pointer(pMWin)).FnBufferCol + var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, pPart, 0, 0) + + regFlushPart = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) + addr = Xsqlite3VdbeAddOp3(tls, v, OP_Compare, regNewPart, (*Window)(unsafe.Pointer(pMWin)).FregPart, nPart) + Xsqlite3VdbeAppendP4(tls, v, pKeyInfo, -9) + Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addr+2, addr+4, addr+2) + + addrGosubFlush = Xsqlite3VdbeAddOp1(tls, v, OP_Gosub, regFlushPart) + + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regNewPart, (*Window)(unsafe.Pointer(pMWin)).FregPart, nPart-1) + } + + // Insert the new row into the ephemeral table + Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, csrWrite, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid) + Xsqlite3VdbeAddOp3(tls, v, OP_Insert, csrWrite, regRecord, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid) + addrNe = Xsqlite3VdbeAddOp3(tls, v, OP_Ne, (*Window)(unsafe.Pointer(pMWin)).FregOne, 0, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid) + + // This block is run for the first row of each partition + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregArg = windowInitAccum(tls, pParse, pMWin) + + if regStart != 0 { + Xsqlite3ExprCode(tls, pParse, (*Window)(unsafe.Pointer(pMWin)).FpStart, regStart) + windowCheckValue(tls, pParse, regStart, 0+func() int32 { + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { + return 3 + } + return 0 + }()) + } + if regEnd != 0 { + Xsqlite3ExprCode(tls, pParse, (*Window)(unsafe.Pointer(pMWin)).FpEnd, regEnd) + windowCheckValue(tls, pParse, regEnd, 1+func() int32 { + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { + return 3 + } + return 0 + }()) + } + + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) != TK_RANGE && int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) && regStart != 0 { + var op int32 = func() int32 { + if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING { + return OP_Ge + } + return OP_Le + }() + var addrGe int32 = Xsqlite3VdbeAddOp3(tls, v, op, regStart, 0, regEnd) + // NeverNull because bound + // values previously checked + windowAggFinal(tls, bp, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, 1) + + windowReturnOneRow(tls, bp) + Xsqlite3VdbeAddOp1(tls, v, OP_ResetSorter, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr) + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, lblWhereEnd) + Xsqlite3VdbeJumpHere(tls, v, addrGe) + } + if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING && int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) != TK_RANGE && regEnd != 0 { + + Xsqlite3VdbeAddOp3(tls, v, OP_Subtract, regStart, regEnd, regStart) + } + + if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) != TK_UNBOUNDED { + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fstart.Fcsr, 1) + + } + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, 1) + + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr, 1) + + if regPeer != 0 && pOrderBy != 0 { + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regNewPeer, regPeer, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr-1) + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regPeer, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fstart.Freg, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr-1) + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regPeer, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Freg, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr-1) + Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regPeer, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Freg, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr-1) + } + + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, lblWhereEnd) + + Xsqlite3VdbeJumpHere(tls, v, addrNe) + + // Beginning of the block executed for the second and subsequent rows. + if regPeer != 0 { + windowIfNewPeer(tls, pParse, pOrderBy, regNewPeer, regPeer, lblWhereEnd) + } + if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING { + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) + if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) != TK_UNBOUNDED { + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { + var lbl int32 = Xsqlite3VdbeMakeLabel(tls, pParse) + var addrNext int32 = Xsqlite3VdbeCurrentAddr(tls, v) + windowCodeRangeTest(tls, bp, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, regEnd, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr, lbl) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrNext) + Xsqlite3VdbeResolveLabel(tls, v, lbl) + } else { + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, regEnd, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + } + } + } else if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_PRECEDING { + var bRPS int32 = libc.Bool32(int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_PRECEDING && int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, regEnd, 0) + if bRPS != 0 { + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + } + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) + if !(bRPS != 0) { + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + } + } else { + var addr int32 = 0 + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) + if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) != TK_UNBOUNDED { + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { + var lbl int32 = 0 + addr = Xsqlite3VdbeCurrentAddr(tls, v) + if regEnd != 0 { + lbl = Xsqlite3VdbeMakeLabel(tls, pParse) + windowCodeRangeTest(tls, bp, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, regEnd, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr, lbl) + } + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + if regEnd != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addr) + Xsqlite3VdbeResolveLabel(tls, v, lbl) + } + } else { + if regEnd != 0 { + addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, regEnd, 0, 1) + + } + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + if regEnd != 0 { + Xsqlite3VdbeJumpHere(tls, v, addr) + } + } + } + } + + // End of the main input loop + Xsqlite3VdbeResolveLabel(tls, v, lblWhereEnd) + Xsqlite3WhereEnd(tls, pWInfo) + + // Fall through + if (*Window)(unsafe.Pointer(pMWin)).FpPartition != 0 { + addrInteger = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regFlushPart) + Xsqlite3VdbeJumpHere(tls, v, addrGosubFlush) + } + + (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid = 0 + addrEmpty = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, csrWrite) + + if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_PRECEDING { + var bRPS int32 = libc.Bool32(int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_PRECEDING && int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, regEnd, 0) + if bRPS != 0 { + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + } + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) + } else if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING { + var addrStart int32 + var addrBreak1 int32 + var addrBreak2 int32 + var addrBreak3 int32 + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) + if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { + addrStart = Xsqlite3VdbeCurrentAddr(tls, v) + addrBreak2 = windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 1) + addrBreak1 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 1) + } else if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_UNBOUNDED { + addrStart = Xsqlite3VdbeCurrentAddr(tls, v) + addrBreak1 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, regStart, 1) + addrBreak2 = windowCodeOp(tls, bp, WINDOW_AGGINVERSE, 0, 1) + } else { + + addrStart = Xsqlite3VdbeCurrentAddr(tls, v) + addrBreak1 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, regEnd, 1) + addrBreak2 = windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 1) + } + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrStart) + Xsqlite3VdbeJumpHere(tls, v, addrBreak2) + addrStart = Xsqlite3VdbeCurrentAddr(tls, v) + addrBreak3 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrStart) + Xsqlite3VdbeJumpHere(tls, v, addrBreak1) + Xsqlite3VdbeJumpHere(tls, v, addrBreak3) + } else { + var addrBreak int32 + var addrStart int32 + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) + addrStart = Xsqlite3VdbeCurrentAddr(tls, v) + addrBreak = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 1) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrStart) + Xsqlite3VdbeJumpHere(tls, v, addrBreak) + } + Xsqlite3VdbeJumpHere(tls, v, addrEmpty) + + Xsqlite3VdbeAddOp1(tls, v, OP_ResetSorter, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr) + if (*Window)(unsafe.Pointer(pMWin)).FpPartition != 0 { + if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*Window)(unsafe.Pointer(pMWin)).FregStartRowid) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Window)(unsafe.Pointer(pMWin)).FregEndRowid) + } + Xsqlite3VdbeChangeP1(tls, v, addrInteger, Xsqlite3VdbeCurrentAddr(tls, v)) + Xsqlite3VdbeAddOp1(tls, v, OP_Return, regFlushPart) + } +} + +//************* End of window.c ********************************************* +//************* Begin file parse.c ****************************************** +// This file is automatically generated by Lemon from input grammar +// source file "parse.y". +// 2001-09-15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file contains SQLite's SQL parser. +// +// The canonical source code to this file ("parse.y") is a Lemon grammar +// file that specifies the input grammar and actions to take while parsing. +// That input file is processed by Lemon to generate a C-language +// implementation of a parser for the given grammer. You might be reading +// this comment as part of the translated C-code. Edits should be made +// to the original parse.y sources. + +// #include "sqliteInt.h" + +// Disable all error recovery processing in the parser push-down +// automaton. + +// Make yytestcase() the same as testcase() + +// Indicate that sqlite3ParserFree() will never be called with a null +// pointer. + +// In the amalgamation, the parse.c file generated by lemon and the +// tokenize.c file are concatenated. In that case, sqlite3RunParser() +// has access to the the size of the yyParser object and so the parser +// engine can be allocated from stack. In that case, only the +// sqlite3ParserInit() and sqlite3ParserFinalize() routines are invoked +// and the sqlite3ParserAlloc() and sqlite3ParserFree() routines can be +// omitted. + +// Alternative datatype for the argument to the malloc() routine passed +// into sqlite3ParserAlloc(). The default is size_t. + +// An instance of the following structure describes the event of a +// TRIGGER. "a" is the event type, one of TK_UPDATE, TK_INSERT, +// TK_DELETE, or TK_INSTEAD. If the event is of the form +// +// UPDATE ON (a,b,c) +// +// Then the "b" IdList records the list "a,b,c". +type TrigEvent = struct { + Fa int32 + F__ccgo_pad1 [4]byte + Fb uintptr +} /* sqlite3.c:161363:1 */ + +type FrameBound = struct { + FeType int32 + F__ccgo_pad1 [4]byte + FpExpr uintptr +} /* sqlite3.c:161365:1 */ + +// Disable lookaside memory allocation for objects that might be +// shared across database connections. +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) +} + +// For a compound SELECT statement, make sure p->pPrior->pNext==p for +// all elements in the list. And make sure list length does not exceed +// SQLITE_LIMIT_COMPOUND_SELECT. +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { + var pNext uintptr = uintptr(0) + var pLoop uintptr = p + var mxSelect int32 + var cnt int32 = 1 + for 1 != 0 { + (*Select)(unsafe.Pointer(pLoop)).FpNext = pNext + *(*U32)(unsafe.Pointer(pLoop + 4)) |= U32(SF_Compound) + pNext = pLoop + pLoop = (*Select)(unsafe.Pointer(pLoop)).FpPrior + if pLoop == uintptr(0) { + break + } + cnt++ + if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+22639, + libc.VaList(bp, func() uintptr { + if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { + return ts + 19706 /* "ORDER BY" */ + } + return ts + 22681 /* "LIMIT" */ + }(), + Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) + break + } + } + if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { + Xsqlite3ErrorMsg(tls, pParse, ts+22687, 0) + } + } + +} + +// Attach a With object describing the WITH clause to a Select +// object describing the query for which the WITH clause is a prefix. +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ + if pSelect != 0 { + (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith + parserDoubleLinkSelect(tls, pParse, pSelect) + } else { + Xsqlite3WithDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWith) + } + return pSelect + +} + +// Construct a new Expr object from a single token +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ + bp := tls.Alloc(16) + defer tls.Free(16) + *(*Token)(unsafe.Pointer(bp)) = t + + var p uintptr = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(unsafe.Sizeof(Expr{}))+uint64((*Token)(unsafe.Pointer(bp)).Fn)+uint64(1))) + if p != 0 { + // memset(p, 0, sizeof(Expr)); + (*Expr)(unsafe.Pointer(p)).Fop = U8(op) + (*Expr)(unsafe.Pointer(p)).FaffExpr = uint8(0) + (*Expr)(unsafe.Pointer(p)).Fflags = U32(EP_Leaf) + + (*Expr)(unsafe.Pointer(p)).FiAgg = int16(-1) + (*Expr)(unsafe.Pointer(p)).FpLeft = libc.AssignPtrUintptr(p+24, uintptr(0)) + (*Expr)(unsafe.Pointer(p)).FpAggInfo = uintptr(0) + libc.Xmemset(tls, p+32, 0, uint64(unsafe.Sizeof(struct{ FpList uintptr }{}))) + libc.Xmemset(tls, p+64, 0, uint64(unsafe.Sizeof(struct{ FpTab uintptr }{}))) + (*Expr)(unsafe.Pointer(p)).Fop2 = U8(0) + (*Expr)(unsafe.Pointer(p)).FiTable = 0 + (*Expr)(unsafe.Pointer(p)).FiColumn = int16(0) + *(*uintptr)(unsafe.Pointer(p + 8)) = p + 1*72 + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p + 8)), (*Token)(unsafe.Pointer(bp /* &t */)).Fz, uint64((*Token)(unsafe.Pointer(bp /* &t */)).Fn)) + *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8)) + uintptr((*Token)(unsafe.Pointer(bp /* &t */)).Fn))) = uint8(0) + *(*int32)(unsafe.Pointer(p + 52)) = int32((int64((*Token)(unsafe.Pointer(bp)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FzTail)) / 1) + if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8)))))])&0x80 != 0 { + Xsqlite3DequoteExpr(tls, p) + } + (*Expr)(unsafe.Pointer(p)).FnHeight = 1 + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + return Xsqlite3RenameTokenMap(tls, pParse, p, bp) + } + } + return p + +} + +// A routine to convert a binary TK_IS or TK_ISNOT expression into a +// unary TK_ISNULL or TK_NOTNULL expression. +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) + Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pA)).FpRight) + (*Expr)(unsafe.Pointer(pA)).FpRight = uintptr(0) + } + +} + +// Add a single new term to an ExprList that is used to store a +// list of identifiers. Report an error if the ID list contains +// a COLLATE clause or an ASC or DESC keyword, except ignore the +// error while parsing a legacy schema. +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) + if (hasCollate != 0 || sortOrder != -1) && + int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+22721, + libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) + } + Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) + return p + +} + +//*************** End of %include directives ********************************* +// These constants specify the various numeric values for terminal symbols. +// Begin token definitions ************************************ +//*************** End token definitions ************************************** + +// The next sections is a series of control #defines. +// various aspects of the generated parser. +// YYCODETYPE is the data type used to store the integer codes +// that represent terminal and non-terminal symbols. +// "unsigned char" is used if there are fewer than +// 256 symbols. Larger types otherwise. +// YYNOCODE is a number of type YYCODETYPE that is not used for +// any terminal or nonterminal symbol. +// YYFALLBACK If defined, this indicates that one or more tokens +// (also known as: "terminal symbols") have fall-back +// values which should be used if the original symbol +// would not parse. This permits keywords to sometimes +// be used as identifiers, for example. +// YYACTIONTYPE is the data type used for "action codes" - numbers +// that indicate what to do in response to the next +// token. +// sqlite3ParserTOKENTYPE is the data type used for minor type for terminal +// symbols. Background: A "minor type" is a semantic +// value associated with a terminal or non-terminal +// symbols. For example, for an "ID" terminal symbol, +// the minor type might be the name of the identifier. +// Each non-terminal can have a different minor type. +// Terminal symbols all have the same minor type, though. +// This macros defines the minor type for terminal +// symbols. +// YYMINORTYPE is the data type used for all minor types. +// This is typically a union of many types, one of +// which is sqlite3ParserTOKENTYPE. The entry in the union +// for terminal symbols is called "yy0". +// YYSTACKDEPTH is the maximum depth of the parser's stack. If +// zero the stack is dynamically sized using realloc() +// sqlite3ParserARG_SDECL A static variable declaration for the %extra_argument +// sqlite3ParserARG_PDECL A parameter declaration for the %extra_argument +// sqlite3ParserARG_PARAM Code to pass %extra_argument as a subroutine parameter +// sqlite3ParserARG_STORE Code to store %extra_argument into yypParser +// sqlite3ParserARG_FETCH Code to extract %extra_argument from yypParser +// sqlite3ParserCTX_* As sqlite3ParserARG_ except for %extra_context +// YYERRORSYMBOL is the code number of the error symbol. If not +// defined, then do no error processing. +// YYNSTATE the combined number of states. +// YYNRULE the number of rules in the grammar +// YYNTOKEN Number of terminal symbols +// YY_MAX_SHIFT Maximum value for shift actions +// YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions +// YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions +// YY_ERROR_ACTION The yy_action[] code for syntax error +// YY_ACCEPT_ACTION The yy_action[] code for accept +// YY_NO_ACTION The yy_action[] code for no-op +// YY_MIN_REDUCE Minimum value for reduce actions +// YY_MAX_REDUCE Maximum value for reduce actions +//************ Begin control #defines **************************************** +type YYMINORTYPE = struct { + F__ccgo_pad1 [0]uint64 + Fyyinit int32 + F__ccgo_pad2 [12]byte +} /* sqlite3.c:161789:3 */ +//************ End control #defines ****************************************** + +// Define the yytestcase() macro to be a no-op if is not already defined +// otherwise. +// +// Applications can choose to define yytestcase() in the %include section +// to a macro that can assist in verifying code coverage. For production +// code the yytestcase() macro should be turned off. But it is useful +// for testing. + +// Next are the tables used to determine what action to take based on the +// current state and lookahead token. These tables are used to implement +// functions that take a state number and lookahead value and return an +// action integer. +// +// Suppose the action integer is N. Then the action is determined as +// follows +// +// 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead +// token onto the stack and goto state N. +// +// N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then +// and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE. +// +// N == YY_ERROR_ACTION A syntax error has occurred. +// +// N == YY_ACCEPT_ACTION The parser accepts its input. +// +// N == YY_NO_ACTION No such action. Denotes unused +// slots in the yy_action[] table. +// +// N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE +// and YY_MAX_REDUCE +// +// The action table is constructed as a single large table named yy_action[]. +// Given state S and lookahead X, the action is computed as either: +// +// (A) N = yy_action[ yy_shift_ofst[S] + X ] +// (B) N = yy_default[S] +// +// The (A) formula is preferred. The B formula is used instead if +// yy_lookahead[yy_shift_ofst[S]+X] is not equal to X. +// +// The formulas above are for computing the action when the lookahead is +// a terminal symbol. If the lookahead is a non-terminal (as occurs after +// a reduce action) then the yy_reduce_ofst[] array is used in place of +// the yy_shift_ofst[] array. +// +// The following are the tables generated in this section: +// +// yy_action[] A single table containing all actions. +// yy_lookahead[] A table containing the lookahead for each entry in +// yy_action. Used to detect hash collisions. +// yy_shift_ofst[] For each state, the offset into yy_action for +// shifting terminals. +// yy_reduce_ofst[] For each state, the offset into yy_action for +// shifting non-terminals after a reduce. +// yy_default[] Default action for each state. +// +// Begin parsing tables ********************************************* +var yy_action = [2070]uint16{ + /* 0 */ uint16(566), uint16(1307), uint16(566), uint16(1286), uint16(201), uint16(201), uint16(566), uint16(116), uint16(112), uint16(222), + /* 10 */ uint16(566), uint16(1307), uint16(377), uint16(566), uint16(116), uint16(112), uint16(222), uint16(397), uint16(408), uint16(409), + /* 20 */ uint16(1260), uint16(378), uint16(1269), uint16(41), uint16(41), uint16(41), uint16(41), uint16(1412), uint16(1517), uint16(71), + /* 30 */ uint16(71), uint16(967), uint16(1258), uint16(41), uint16(41), uint16(491), uint16(71), uint16(71), uint16(272), uint16(968), + /* 40 */ uint16(298), uint16(476), uint16(298), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), uint16(1044), uint16(1047), + /* 50 */ uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), uint16(543), uint16(409), + /* 60 */ uint16(1234), uint16(1), uint16(1), uint16(573), uint16(2), uint16(1238), uint16(548), uint16(116), uint16(112), uint16(222), + /* 70 */ uint16(309), uint16(480), uint16(142), uint16(548), uint16(1272), uint16(524), uint16(116), uint16(112), uint16(222), uint16(1320), + /* 80 */ uint16(417), uint16(523), uint16(547), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), uint16(1044), uint16(1047), + /* 90 */ uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), uint16(424), uint16(116), + /* 100 */ uint16(112), uint16(222), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), uint16(118), + /* 110 */ uint16(118), uint16(117), uint16(113), uint16(444), uint16(277), uint16(277), uint16(277), uint16(277), uint16(560), uint16(560), + /* 120 */ uint16(560), uint16(1558), uint16(376), uint16(1560), uint16(1186), uint16(375), uint16(1157), uint16(563), uint16(1157), uint16(563), + /* 130 */ uint16(409), uint16(1558), uint16(537), uint16(252), uint16(219), uint16(1553), uint16(99), uint16(141), uint16(449), uint16(6), + /* 140 */ uint16(365), uint16(233), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), uint16(118), + /* 150 */ uint16(118), uint16(117), uint16(113), uint16(444), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), uint16(1044), + /* 160 */ uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), uint16(138), + /* 170 */ uint16(289), uint16(1186), uint16(1546), uint16(448), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), + /* 180 */ uint16(125), uint16(1186), uint16(1187), uint16(1188), uint16(144), uint16(465), uint16(334), uint16(566), uint16(150), uint16(127), + /* 190 */ uint16(444), uint16(122), uint16(122), uint16(122), uint16(122), uint16(115), uint16(120), uint16(120), uint16(120), uint16(120), + /* 200 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(454), uint16(419), + /* 210 */ uint16(13), uint16(13), uint16(215), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), + /* 220 */ uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(422), uint16(308), uint16(557), uint16(1186), uint16(1187), + /* 230 */ uint16(1188), uint16(441), uint16(440), uint16(409), uint16(1271), uint16(122), uint16(122), uint16(122), uint16(122), uint16(120), + /* 240 */ uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), + /* 250 */ uint16(444), uint16(1543), uint16(98), uint16(1033), uint16(1033), uint16(1045), uint16(1048), uint16(123), uint16(124), uint16(114), + /* 260 */ uint16(1210), uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), + /* 270 */ uint16(122), uint16(122), uint16(566), uint16(406), uint16(405), uint16(1186), uint16(566), uint16(409), uint16(1217), uint16(319), + /* 280 */ uint16(1217), uint16(80), uint16(81), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), + /* 290 */ uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(70), uint16(70), uint16(1186), uint16(1604), uint16(71), + /* 300 */ uint16(71), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), + /* 310 */ uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), uint16(120), uint16(120), uint16(120), uint16(120), + /* 320 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(1037), uint16(210), + /* 330 */ uint16(1186), uint16(365), uint16(1186), uint16(1187), uint16(1188), uint16(245), uint16(548), uint16(399), uint16(504), uint16(501), + /* 340 */ uint16(500), uint16(108), uint16(558), uint16(138), uint16(4), uint16(516), uint16(933), uint16(433), uint16(499), uint16(217), + /* 350 */ uint16(514), uint16(522), uint16(352), uint16(879), uint16(1186), uint16(1187), uint16(1188), uint16(383), uint16(561), uint16(566), + /* 360 */ uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), + /* 370 */ uint16(113), uint16(444), uint16(277), uint16(277), uint16(16), uint16(16), uint16(1598), uint16(441), uint16(440), uint16(153), + /* 380 */ uint16(409), uint16(445), uint16(13), uint16(13), uint16(1279), uint16(563), uint16(1214), uint16(1186), uint16(1187), uint16(1188), + /* 390 */ uint16(1003), uint16(1216), uint16(264), uint16(555), uint16(1574), uint16(186), uint16(566), uint16(427), uint16(138), uint16(1215), + /* 400 */ uint16(308), uint16(557), uint16(472), uint16(138), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), uint16(1044), + /* 410 */ uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), uint16(55), + /* 420 */ uint16(55), uint16(413), uint16(1023), uint16(507), uint16(1217), uint16(1186), uint16(1217), uint16(474), uint16(106), uint16(106), + /* 430 */ uint16(1312), uint16(1312), uint16(1186), uint16(171), uint16(566), uint16(384), uint16(107), uint16(380), uint16(445), uint16(568), + /* 440 */ uint16(567), uint16(430), uint16(1543), uint16(1013), uint16(332), uint16(549), uint16(565), uint16(263), uint16(280), uint16(360), + /* 450 */ uint16(510), uint16(355), uint16(509), uint16(250), uint16(491), uint16(308), uint16(557), uint16(71), uint16(71), uint16(351), + /* 460 */ uint16(308), uint16(557), uint16(374), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), + /* 470 */ uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(1013), uint16(1013), uint16(1015), uint16(1016), uint16(27), + /* 480 */ uint16(277), uint16(277), uint16(1186), uint16(1187), uint16(1188), uint16(1152), uint16(566), uint16(528), uint16(409), uint16(1186), + /* 490 */ uint16(1187), uint16(1188), uint16(348), uint16(563), uint16(548), uint16(1260), uint16(533), uint16(517), uint16(1152), uint16(1516), + /* 500 */ uint16(317), uint16(1152), uint16(285), uint16(550), uint16(485), uint16(569), uint16(566), uint16(569), uint16(482), uint16(51), + /* 510 */ uint16(51), uint16(207), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), uint16(1044), uint16(1047), uint16(1036), + /* 520 */ uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), uint16(171), uint16(1412), uint16(13), + /* 530 */ uint16(13), uint16(409), uint16(277), uint16(277), uint16(1186), uint16(505), uint16(119), uint16(119), uint16(118), uint16(118), + /* 540 */ uint16(118), uint16(117), uint16(113), uint16(444), uint16(429), uint16(563), uint16(518), uint16(220), uint16(515), uint16(1552), + /* 550 */ uint16(365), uint16(546), uint16(1186), uint16(6), uint16(532), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), + /* 560 */ uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), + /* 570 */ uint16(145), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), uint16(118), uint16(118), + /* 580 */ uint16(117), uint16(113), uint16(444), uint16(245), uint16(566), uint16(474), uint16(504), uint16(501), uint16(500), uint16(566), + /* 590 */ uint16(1481), uint16(1186), uint16(1187), uint16(1188), uint16(1310), uint16(1310), uint16(499), uint16(1186), uint16(149), uint16(425), + /* 600 */ uint16(1186), uint16(480), uint16(409), uint16(274), uint16(365), uint16(952), uint16(872), uint16(56), uint16(56), uint16(1186), + /* 610 */ uint16(1187), uint16(1188), uint16(71), uint16(71), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), + /* 620 */ uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(123), uint16(124), uint16(114), uint16(1210), + /* 630 */ uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), + /* 640 */ uint16(122), uint16(409), uint16(541), uint16(1552), uint16(83), uint16(865), uint16(98), uint16(6), uint16(928), uint16(529), + /* 650 */ uint16(848), uint16(543), uint16(151), uint16(927), uint16(1186), uint16(1187), uint16(1188), uint16(1186), uint16(1187), uint16(1188), + /* 660 */ uint16(290), uint16(1543), uint16(187), uint16(1633), uint16(395), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), + /* 670 */ uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), + /* 680 */ uint16(566), uint16(954), uint16(566), uint16(453), uint16(953), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), + /* 690 */ uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(1152), uint16(221), uint16(1186), + /* 700 */ uint16(331), uint16(453), uint16(452), uint16(13), uint16(13), uint16(13), uint16(13), uint16(1003), uint16(365), uint16(463), + /* 710 */ uint16(1152), uint16(193), uint16(409), uint16(1152), uint16(382), uint16(1543), uint16(1170), uint16(32), uint16(297), uint16(474), + /* 720 */ uint16(195), uint16(1527), uint16(5), uint16(952), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), + /* 730 */ uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(123), uint16(124), uint16(114), uint16(1210), + /* 740 */ uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), + /* 750 */ uint16(122), uint16(409), uint16(1067), uint16(419), uint16(1186), uint16(1024), uint16(1186), uint16(1187), uint16(1188), uint16(1186), + /* 760 */ uint16(419), uint16(332), uint16(460), uint16(320), uint16(544), uint16(1545), uint16(442), uint16(442), uint16(442), uint16(566), + /* 770 */ uint16(3), uint16(117), uint16(113), uint16(444), uint16(453), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), + /* 780 */ uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), + /* 790 */ uint16(1473), uint16(566), uint16(15), uint16(15), uint16(293), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), + /* 800 */ uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(1186), uint16(566), uint16(1486), + /* 810 */ uint16(1412), uint16(1186), uint16(1187), uint16(1188), uint16(13), uint16(13), uint16(1186), uint16(1187), uint16(1188), uint16(1544), + /* 820 */ uint16(271), uint16(271), uint16(409), uint16(286), uint16(308), uint16(557), uint16(1008), uint16(1486), uint16(1488), uint16(196), + /* 830 */ uint16(288), uint16(71), uint16(71), uint16(563), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), + /* 840 */ uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(123), uint16(124), uint16(114), uint16(1210), + /* 850 */ uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), + /* 860 */ uint16(122), uint16(409), uint16(201), uint16(1087), uint16(1186), uint16(1187), uint16(1188), uint16(1324), uint16(304), uint16(1529), + /* 870 */ uint16(388), uint16(278), uint16(278), uint16(450), uint16(564), uint16(402), uint16(922), uint16(922), uint16(566), uint16(563), + /* 880 */ uint16(566), uint16(426), uint16(491), uint16(480), uint16(563), uint16(123), uint16(124), uint16(114), uint16(1210), uint16(1210), + /* 890 */ uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), + /* 900 */ uint16(1486), uint16(71), uint16(71), uint16(13), uint16(13), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), + /* 910 */ uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(566), uint16(545), uint16(566), + /* 920 */ uint16(1577), uint16(573), uint16(2), uint16(1238), uint16(1092), uint16(1092), uint16(488), uint16(1480), uint16(309), uint16(1525), + /* 930 */ uint16(142), uint16(324), uint16(409), uint16(836), uint16(837), uint16(838), uint16(312), uint16(1320), uint16(305), uint16(363), + /* 940 */ uint16(43), uint16(43), uint16(57), uint16(57), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), + /* 950 */ uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(123), uint16(124), uint16(114), uint16(1210), + /* 960 */ uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), + /* 970 */ uint16(122), uint16(12), uint16(277), uint16(277), uint16(566), uint16(1152), uint16(409), uint16(572), uint16(428), uint16(1238), + /* 980 */ uint16(465), uint16(334), uint16(296), uint16(474), uint16(309), uint16(563), uint16(142), uint16(249), uint16(1152), uint16(308), + /* 990 */ uint16(557), uint16(1152), uint16(321), uint16(1320), uint16(323), uint16(491), uint16(455), uint16(71), uint16(71), uint16(233), + /* 1000 */ uint16(283), uint16(101), uint16(114), uint16(1210), uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), + /* 1010 */ uint16(121), uint16(122), uint16(122), uint16(122), uint16(122), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), + /* 1020 */ uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(1108), uint16(277), uint16(277), + /* 1030 */ uint16(1412), uint16(448), uint16(394), uint16(1230), uint16(439), uint16(277), uint16(277), uint16(248), uint16(247), uint16(246), + /* 1040 */ uint16(1319), uint16(563), uint16(1109), uint16(313), uint16(198), uint16(294), uint16(491), uint16(1318), uint16(563), uint16(464), + /* 1050 */ uint16(566), uint16(1427), uint16(394), uint16(1130), uint16(1023), uint16(233), uint16(414), uint16(1110), uint16(295), uint16(120), + /* 1060 */ uint16(120), uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), + /* 1070 */ uint16(444), uint16(1014), uint16(104), uint16(71), uint16(71), uint16(1013), uint16(322), uint16(496), uint16(908), uint16(566), + /* 1080 */ uint16(277), uint16(277), uint16(277), uint16(277), uint16(1108), uint16(1261), uint16(415), uint16(448), uint16(909), uint16(361), + /* 1090 */ uint16(1571), uint16(1315), uint16(409), uint16(563), uint16(952), uint16(563), uint16(9), uint16(202), uint16(255), uint16(1109), + /* 1100 */ uint16(316), uint16(487), uint16(44), uint16(44), uint16(249), uint16(559), uint16(415), uint16(1013), uint16(1013), uint16(1015), + /* 1110 */ uint16(443), uint16(1231), uint16(409), uint16(1603), uint16(1110), uint16(897), uint16(123), uint16(124), uint16(114), uint16(1210), + /* 1120 */ uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), + /* 1130 */ uint16(122), uint16(1231), uint16(409), uint16(1207), uint16(215), uint16(554), uint16(123), uint16(124), uint16(114), uint16(1210), + /* 1140 */ uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), + /* 1150 */ uint16(122), uint16(1131), uint16(1631), uint16(470), uint16(1631), uint16(255), uint16(123), uint16(111), uint16(114), uint16(1210), + /* 1160 */ uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), uint16(122), uint16(122), uint16(122), + /* 1170 */ uint16(122), uint16(1131), uint16(1632), uint16(414), uint16(1632), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), + /* 1180 */ uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(221), uint16(209), uint16(351), + /* 1190 */ uint16(1207), uint16(1207), uint16(147), uint16(1426), uint16(491), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), + /* 1200 */ uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(1256), uint16(539), uint16(519), + /* 1210 */ uint16(888), uint16(551), uint16(952), uint16(12), uint16(566), uint16(120), uint16(120), uint16(120), uint16(120), uint16(119), + /* 1220 */ uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), uint16(538), uint16(566), uint16(860), + /* 1230 */ uint16(1129), uint16(361), uint16(1571), uint16(346), uint16(1356), uint16(409), uint16(1163), uint16(58), uint16(58), uint16(339), + /* 1240 */ uint16(1355), uint16(508), uint16(277), uint16(277), uint16(277), uint16(277), uint16(277), uint16(277), uint16(1207), uint16(889), + /* 1250 */ uint16(1129), uint16(59), uint16(59), uint16(459), uint16(363), uint16(563), uint16(566), uint16(563), uint16(96), uint16(563), + /* 1260 */ uint16(124), uint16(114), uint16(1210), uint16(1210), uint16(1044), uint16(1047), uint16(1036), uint16(1036), uint16(121), uint16(121), + /* 1270 */ uint16(122), uint16(122), uint16(122), uint16(122), uint16(566), uint16(1412), uint16(566), uint16(281), uint16(1186), uint16(60), + /* 1280 */ uint16(60), uint16(110), uint16(392), uint16(392), uint16(391), uint16(266), uint16(389), uint16(860), uint16(1163), uint16(845), + /* 1290 */ uint16(566), uint16(481), uint16(566), uint16(436), uint16(341), uint16(1152), uint16(344), uint16(61), uint16(61), uint16(62), + /* 1300 */ uint16(62), uint16(967), uint16(227), uint16(1550), uint16(315), uint16(431), uint16(540), uint16(6), uint16(1152), uint16(968), + /* 1310 */ uint16(566), uint16(1152), uint16(314), uint16(45), uint16(45), uint16(46), uint16(46), uint16(512), uint16(120), uint16(120), + /* 1320 */ uint16(120), uint16(120), uint16(119), uint16(119), uint16(118), uint16(118), uint16(118), uint16(117), uint16(113), uint16(444), + /* 1330 */ uint16(416), uint16(173), uint16(1532), uint16(47), uint16(47), uint16(1186), uint16(1187), uint16(1188), uint16(108), uint16(558), + /* 1340 */ uint16(325), uint16(4), uint16(229), uint16(1551), uint16(928), uint16(566), uint16(437), uint16(6), uint16(566), uint16(927), + /* 1350 */ uint16(164), uint16(566), uint16(1290), uint16(137), uint16(1190), uint16(561), uint16(566), uint16(1549), uint16(566), uint16(1089), + /* 1360 */ uint16(566), uint16(6), uint16(566), uint16(1089), uint16(531), uint16(566), uint16(868), uint16(8), uint16(49), uint16(49), + /* 1370 */ uint16(228), uint16(50), uint16(50), uint16(566), uint16(63), uint16(63), uint16(566), uint16(457), uint16(445), uint16(64), + /* 1380 */ uint16(64), uint16(65), uint16(65), uint16(14), uint16(14), uint16(66), uint16(66), uint16(407), uint16(129), uint16(129), + /* 1390 */ uint16(555), uint16(566), uint16(458), uint16(566), uint16(1505), uint16(486), uint16(67), uint16(67), uint16(566), uint16(52), + /* 1400 */ uint16(52), uint16(546), uint16(407), uint16(467), uint16(535), uint16(410), uint16(226), uint16(1023), uint16(566), uint16(534), + /* 1410 */ uint16(308), uint16(557), uint16(1190), uint16(407), uint16(68), uint16(68), uint16(69), uint16(69), uint16(566), uint16(1023), + /* 1420 */ uint16(566), uint16(53), uint16(53), uint16(868), uint16(1014), uint16(106), uint16(106), uint16(525), uint16(1013), uint16(566), + /* 1430 */ uint16(1504), uint16(159), uint16(159), uint16(107), uint16(451), uint16(445), uint16(568), uint16(567), uint16(471), uint16(307), + /* 1440 */ uint16(1013), uint16(160), uint16(160), uint16(76), uint16(76), uint16(566), uint16(1548), uint16(466), uint16(407), uint16(407), + /* 1450 */ uint16(6), uint16(1225), uint16(54), uint16(54), uint16(478), uint16(276), uint16(219), uint16(566), uint16(887), uint16(886), + /* 1460 */ uint16(1013), uint16(1013), uint16(1015), uint16(84), uint16(206), uint16(1206), uint16(230), uint16(282), uint16(72), uint16(72), + /* 1470 */ uint16(329), uint16(483), uint16(1013), uint16(1013), uint16(1015), uint16(1016), uint16(27), uint16(1576), uint16(1174), uint16(447), + /* 1480 */ uint16(130), uint16(130), uint16(281), uint16(148), uint16(105), uint16(38), uint16(103), uint16(392), uint16(392), uint16(391), + /* 1490 */ uint16(266), uint16(389), uint16(566), uint16(1126), uint16(845), uint16(396), uint16(566), uint16(108), uint16(558), uint16(566), + /* 1500 */ uint16(4), uint16(311), uint16(566), uint16(30), uint16(17), uint16(566), uint16(279), uint16(227), uint16(566), uint16(315), + /* 1510 */ uint16(108), uint16(558), uint16(468), uint16(4), uint16(561), uint16(73), uint16(73), uint16(314), uint16(566), uint16(157), + /* 1520 */ uint16(157), uint16(566), uint16(131), uint16(131), uint16(526), uint16(132), uint16(132), uint16(561), uint16(128), uint16(128), + /* 1530 */ uint16(566), uint16(158), uint16(158), uint16(566), uint16(31), uint16(291), uint16(566), uint16(445), uint16(330), uint16(521), + /* 1540 */ uint16(98), uint16(152), uint16(152), uint16(420), uint16(136), uint16(136), uint16(1005), uint16(229), uint16(254), uint16(555), + /* 1550 */ uint16(445), uint16(479), uint16(336), uint16(135), uint16(135), uint16(164), uint16(133), uint16(133), uint16(137), uint16(134), + /* 1560 */ uint16(134), uint16(875), uint16(555), uint16(535), uint16(566), uint16(473), uint16(566), uint16(254), uint16(536), uint16(475), + /* 1570 */ uint16(335), uint16(254), uint16(98), uint16(894), uint16(895), uint16(228), uint16(535), uint16(566), uint16(1023), uint16(566), + /* 1580 */ uint16(1074), uint16(534), uint16(210), uint16(232), uint16(106), uint16(106), uint16(1352), uint16(75), uint16(75), uint16(77), + /* 1590 */ uint16(77), uint16(1023), uint16(107), uint16(340), uint16(445), uint16(568), uint16(567), uint16(106), uint16(106), uint16(1013), + /* 1600 */ uint16(74), uint16(74), uint16(42), uint16(42), uint16(566), uint16(107), uint16(343), uint16(445), uint16(568), uint16(567), + /* 1610 */ uint16(410), uint16(497), uint16(1013), uint16(251), uint16(359), uint16(308), uint16(557), uint16(1135), uint16(349), uint16(875), + /* 1620 */ uint16(98), uint16(1070), uint16(345), uint16(251), uint16(358), uint16(1591), uint16(347), uint16(48), uint16(48), uint16(1017), + /* 1630 */ uint16(1303), uint16(1013), uint16(1013), uint16(1015), uint16(1016), uint16(27), uint16(1289), uint16(1287), uint16(1074), uint16(451), + /* 1640 */ uint16(961), uint16(925), uint16(254), uint16(110), uint16(1013), uint16(1013), uint16(1015), uint16(1016), uint16(27), uint16(1174), + /* 1650 */ uint16(447), uint16(970), uint16(971), uint16(281), uint16(108), uint16(558), uint16(1288), uint16(4), uint16(392), uint16(392), + /* 1660 */ uint16(391), uint16(266), uint16(389), uint16(1343), uint16(1086), uint16(845), uint16(1086), uint16(1085), uint16(858), uint16(1085), + /* 1670 */ uint16(146), uint16(561), uint16(926), uint16(354), uint16(110), uint16(303), uint16(364), uint16(553), uint16(227), uint16(1364), + /* 1680 */ uint16(315), uint16(108), uint16(558), uint16(1411), uint16(4), uint16(1339), uint16(492), uint16(1017), uint16(314), uint16(1350), + /* 1690 */ uint16(1565), uint16(552), uint16(1417), uint16(1268), uint16(445), uint16(204), uint16(1259), uint16(1247), uint16(561), uint16(1246), + /* 1700 */ uint16(1248), uint16(1584), uint16(269), uint16(1336), uint16(367), uint16(369), uint16(555), uint16(371), uint16(11), uint16(212), + /* 1710 */ uint16(393), uint16(225), uint16(1393), uint16(284), uint16(1398), uint16(456), uint16(287), uint16(327), uint16(229), uint16(328), + /* 1720 */ uint16(292), uint16(445), uint16(1386), uint16(216), uint16(333), uint16(1403), uint16(164), uint16(477), uint16(373), uint16(137), + /* 1730 */ uint16(1402), uint16(400), uint16(502), uint16(555), uint16(1286), uint16(1023), uint16(357), uint16(1477), uint16(199), uint16(1587), + /* 1740 */ uint16(211), uint16(106), uint16(106), uint16(932), uint16(1476), uint16(1225), uint16(228), uint16(556), uint16(175), uint16(107), + /* 1750 */ uint16(200), uint16(445), uint16(568), uint16(567), uint16(258), uint16(387), uint16(1013), uint16(1524), uint16(1522), uint16(223), + /* 1760 */ uint16(1222), uint16(418), uint16(1023), uint16(83), uint16(208), uint16(79), uint16(82), uint16(184), uint16(106), uint16(106), + /* 1770 */ uint16(1482), uint16(169), uint16(177), uint16(461), uint16(179), uint16(462), uint16(107), uint16(1399), uint16(445), uint16(568), + /* 1780 */ uint16(567), uint16(410), uint16(180), uint16(1013), uint16(495), uint16(181), uint16(308), uint16(557), uint16(1013), uint16(1013), + /* 1790 */ uint16(1015), uint16(1016), uint16(27), uint16(182), uint16(35), uint16(235), uint16(100), uint16(558), uint16(398), uint16(4), + /* 1800 */ uint16(96), uint16(1405), uint16(1404), uint16(36), uint16(484), uint16(469), uint16(1407), uint16(188), uint16(401), uint16(1471), + /* 1810 */ uint16(451), uint16(89), uint16(1493), uint16(561), uint16(239), uint16(1013), uint16(1013), uint16(1015), uint16(1016), uint16(27), + /* 1820 */ uint16(490), uint16(338), uint16(270), uint16(241), uint16(192), uint16(342), uint16(493), uint16(242), uint16(403), uint16(1249), + /* 1830 */ uint16(243), uint16(511), uint16(432), uint16(1297), uint16(1306), uint16(91), uint16(445), uint16(1305), uint16(1304), uint16(879), + /* 1840 */ uint16(217), uint16(434), uint16(435), uint16(1570), uint16(1276), uint16(1602), uint16(520), uint16(1601), uint16(555), uint16(301), + /* 1850 */ uint16(527), uint16(404), uint16(1275), uint16(302), uint16(356), uint16(1274), uint16(1600), uint16(95), uint16(1347), uint16(366), + /* 1860 */ uint16(1296), uint16(362), uint16(1348), uint16(368), uint16(256), uint16(257), uint16(1556), uint16(1555), uint16(438), uint16(1346), + /* 1870 */ uint16(370), uint16(126), uint16(1345), uint16(10), uint16(1371), uint16(546), uint16(381), uint16(1023), uint16(102), uint16(1457), + /* 1880 */ uint16(97), uint16(530), uint16(34), uint16(106), uint16(106), uint16(570), uint16(1180), uint16(372), uint16(265), uint16(1329), + /* 1890 */ uint16(379), uint16(107), uint16(203), uint16(445), uint16(568), uint16(567), uint16(1328), uint16(385), uint16(1013), uint16(1370), + /* 1900 */ uint16(386), uint16(267), uint16(268), uint16(571), uint16(1244), uint16(161), uint16(1239), uint16(162), uint16(1509), uint16(1510), + /* 1910 */ uint16(1508), uint16(143), uint16(1507), uint16(299), uint16(832), uint16(213), uint16(214), uint16(78), uint16(446), uint16(205), + /* 1920 */ uint16(310), uint16(306), uint16(163), uint16(224), uint16(1084), uint16(140), uint16(1082), uint16(318), uint16(165), uint16(176), + /* 1930 */ uint16(1013), uint16(1013), uint16(1015), uint16(1016), uint16(27), uint16(178), uint16(1206), uint16(231), uint16(911), uint16(234), + /* 1940 */ uint16(326), uint16(1098), uint16(183), uint16(421), uint16(166), uint16(167), uint16(411), uint16(185), uint16(85), uint16(423), + /* 1950 */ uint16(412), uint16(86), uint16(174), uint16(87), uint16(168), uint16(88), uint16(1101), uint16(236), uint16(1097), uint16(237), + /* 1960 */ uint16(154), uint16(18), uint16(238), uint16(254), uint16(337), uint16(1219), uint16(489), uint16(1090), uint16(240), uint16(190), + /* 1970 */ uint16(37), uint16(847), uint16(189), uint16(494), uint16(358), uint16(244), uint16(350), uint16(506), uint16(191), uint16(877), + /* 1980 */ uint16(90), uint16(498), uint16(19), uint16(20), uint16(503), uint16(92), uint16(353), uint16(890), uint16(300), uint16(170), + /* 1990 */ uint16(155), uint16(93), uint16(513), uint16(94), uint16(1168), uint16(156), uint16(1050), uint16(1137), uint16(39), uint16(218), + /* 2000 */ uint16(273), uint16(275), uint16(1136), uint16(960), uint16(194), uint16(955), uint16(110), uint16(1154), uint16(1158), uint16(253), + /* 2010 */ uint16(7), uint16(1162), uint16(1156), uint16(21), uint16(22), uint16(1161), uint16(1142), uint16(23), uint16(24), uint16(25), + /* 2020 */ uint16(33), uint16(542), uint16(26), uint16(260), uint16(197), uint16(98), uint16(1065), uint16(1051), uint16(1049), uint16(1053), + /* 2030 */ uint16(1107), uint16(1054), uint16(1106), uint16(259), uint16(28), uint16(40), uint16(562), uint16(1018), uint16(859), uint16(109), + /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), + /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), + /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), +} /* sqlite3.c:161883:27 */ +var yy_lookahead = [2255]uint16{ + /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), + /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), + /* 20 */ uint16(193), uint16(219), uint16(216), uint16(216), uint16(217), uint16(216), uint16(217), uint16(193), uint16(295), uint16(216), + /* 30 */ uint16(217), uint16(31), uint16(205), uint16(216), uint16(217), uint16(193), uint16(216), uint16(217), uint16(213), uint16(39), + /* 40 */ uint16(228), uint16(193), uint16(230), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), + /* 50 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(193), uint16(19), + /* 60 */ uint16(185), uint16(186), uint16(187), uint16(188), uint16(189), uint16(190), uint16(253), uint16(274), uint16(275), uint16(276), + /* 70 */ uint16(195), uint16(193), uint16(197), uint16(253), uint16(216), uint16(262), uint16(274), uint16(275), uint16(276), uint16(204), + /* 80 */ uint16(238), uint16(204), uint16(262), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), + /* 90 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(264), uint16(274), + /* 100 */ uint16(275), uint16(276), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), + /* 110 */ uint16(110), uint16(111), uint16(112), uint16(113), uint16(239), uint16(240), uint16(239), uint16(240), uint16(210), uint16(211), + /* 120 */ uint16(212), uint16(314), uint16(315), uint16(314), uint16(59), uint16(316), uint16(86), uint16(252), uint16(88), uint16(252), + /* 130 */ uint16(19), uint16(314), uint16(315), uint16(256), uint16(257), uint16(309), uint16(25), uint16(72), uint16(296), uint16(313), + /* 140 */ uint16(193), uint16(266), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), + /* 150 */ uint16(110), uint16(111), uint16(112), uint16(113), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), + /* 160 */ uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(81), + /* 170 */ uint16(292), uint16(59), uint16(307), uint16(298), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), + /* 180 */ uint16(69), uint16(116), uint16(117), uint16(118), uint16(72), uint16(128), uint16(129), uint16(193), uint16(241), uint16(22), + /* 190 */ uint16(113), uint16(54), uint16(55), uint16(56), uint16(57), uint16(58), uint16(102), uint16(103), uint16(104), uint16(105), + /* 200 */ uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(120), uint16(193), + /* 210 */ uint16(216), uint16(217), uint16(25), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), + /* 220 */ uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(231), uint16(138), uint16(139), uint16(116), uint16(117), + /* 230 */ uint16(118), uint16(106), uint16(107), uint16(19), uint16(216), uint16(54), uint16(55), uint16(56), uint16(57), uint16(102), + /* 240 */ uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), + /* 250 */ uint16(113), uint16(304), uint16(25), uint16(46), uint16(47), uint16(48), uint16(49), uint16(43), uint16(44), uint16(45), + /* 260 */ uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), + /* 270 */ uint16(56), uint16(57), uint16(193), uint16(106), uint16(107), uint16(59), uint16(193), uint16(19), uint16(153), uint16(263), + /* 280 */ uint16(155), uint16(67), uint16(24), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), + /* 290 */ uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(216), uint16(217), uint16(59), uint16(230), uint16(216), + /* 300 */ uint16(217), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), + /* 310 */ uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(102), uint16(103), uint16(104), uint16(105), + /* 320 */ uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(121), uint16(142), + /* 330 */ uint16(59), uint16(193), uint16(116), uint16(117), uint16(118), uint16(119), uint16(253), uint16(204), uint16(122), uint16(123), + /* 340 */ uint16(124), uint16(19), uint16(20), uint16(81), uint16(22), uint16(262), uint16(108), uint16(19), uint16(132), uint16(165), + /* 350 */ uint16(166), uint16(193), uint16(24), uint16(126), uint16(116), uint16(117), uint16(118), uint16(278), uint16(36), uint16(193), + /* 360 */ uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), + /* 370 */ uint16(112), uint16(113), uint16(239), uint16(240), uint16(216), uint16(217), uint16(215), uint16(106), uint16(107), uint16(241), + /* 380 */ uint16(19), uint16(59), uint16(216), uint16(217), uint16(223), uint16(252), uint16(115), uint16(116), uint16(117), uint16(118), + /* 390 */ uint16(73), uint16(120), uint16(26), uint16(71), uint16(193), uint16(22), uint16(193), uint16(231), uint16(81), uint16(128), + /* 400 */ uint16(138), uint16(139), uint16(269), uint16(81), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), + /* 410 */ uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(216), + /* 420 */ uint16(217), uint16(198), uint16(100), uint16(95), uint16(153), uint16(59), uint16(155), uint16(193), uint16(106), uint16(107), + /* 430 */ uint16(235), uint16(236), uint16(59), uint16(193), uint16(193), uint16(249), uint16(114), uint16(251), uint16(116), uint16(117), + /* 440 */ uint16(118), uint16(113), uint16(304), uint16(121), uint16(127), uint16(204), uint16(193), uint16(119), uint16(120), uint16(121), + /* 450 */ uint16(122), uint16(123), uint16(124), uint16(125), uint16(193), uint16(138), uint16(139), uint16(216), uint16(217), uint16(131), + /* 460 */ uint16(138), uint16(139), uint16(193), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), + /* 470 */ uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(153), uint16(154), uint16(155), uint16(156), uint16(157), + /* 480 */ uint16(239), uint16(240), uint16(116), uint16(117), uint16(118), uint16(76), uint16(193), uint16(193), uint16(19), uint16(116), + /* 490 */ uint16(117), uint16(118), uint16(23), uint16(252), uint16(253), uint16(193), uint16(87), uint16(204), uint16(89), uint16(238), + /* 500 */ uint16(193), uint16(92), uint16(268), uint16(262), uint16(281), uint16(203), uint16(193), uint16(205), uint16(285), uint16(216), + /* 510 */ uint16(217), uint16(150), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), + /* 520 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(193), uint16(193), uint16(216), + /* 530 */ uint16(217), uint16(19), uint16(239), uint16(240), uint16(59), uint16(23), uint16(106), uint16(107), uint16(108), uint16(109), + /* 540 */ uint16(110), uint16(111), uint16(112), uint16(113), uint16(231), uint16(252), uint16(253), uint16(193), uint16(308), uint16(309), + /* 550 */ uint16(193), uint16(145), uint16(59), uint16(313), uint16(145), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), + /* 560 */ uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), + /* 570 */ uint16(164), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), + /* 580 */ uint16(111), uint16(112), uint16(113), uint16(119), uint16(193), uint16(193), uint16(122), uint16(123), uint16(124), uint16(193), + /* 590 */ uint16(283), uint16(116), uint16(117), uint16(118), uint16(235), uint16(236), uint16(132), uint16(59), uint16(241), uint16(264), + /* 600 */ uint16(59), uint16(193), uint16(19), uint16(23), uint16(193), uint16(25), uint16(23), uint16(216), uint16(217), uint16(116), + /* 610 */ uint16(117), uint16(118), uint16(216), uint16(217), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), + /* 620 */ uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(43), uint16(44), uint16(45), uint16(46), + /* 630 */ uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), + /* 640 */ uint16(57), uint16(19), uint16(308), uint16(309), uint16(151), uint16(23), uint16(25), uint16(313), uint16(135), uint16(253), + /* 650 */ uint16(21), uint16(193), uint16(241), uint16(140), uint16(116), uint16(117), uint16(118), uint16(116), uint16(117), uint16(118), + /* 660 */ uint16(268), uint16(304), uint16(22), uint16(301), uint16(302), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), + /* 670 */ uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), + /* 680 */ uint16(193), uint16(143), uint16(193), uint16(193), uint16(143), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), + /* 690 */ uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(76), uint16(118), uint16(59), + /* 700 */ uint16(292), uint16(211), uint16(212), uint16(216), uint16(217), uint16(216), uint16(217), uint16(73), uint16(193), uint16(80), + /* 710 */ uint16(89), uint16(25), uint16(19), uint16(92), uint16(193), uint16(304), uint16(23), uint16(22), uint16(231), uint16(193), + /* 720 */ uint16(231), uint16(193), uint16(22), uint16(143), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), + /* 730 */ uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(43), uint16(44), uint16(45), uint16(46), + /* 740 */ uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), + /* 750 */ uint16(57), uint16(19), uint16(123), uint16(193), uint16(59), uint16(23), uint16(116), uint16(117), uint16(118), uint16(59), + /* 760 */ uint16(193), uint16(127), uint16(128), uint16(129), uint16(306), uint16(307), uint16(210), uint16(211), uint16(212), uint16(193), + /* 770 */ uint16(22), uint16(111), uint16(112), uint16(113), uint16(284), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), + /* 780 */ uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), + /* 790 */ uint16(161), uint16(193), uint16(216), uint16(217), uint16(268), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), + /* 800 */ uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(59), uint16(193), uint16(193), + /* 810 */ uint16(193), uint16(116), uint16(117), uint16(118), uint16(216), uint16(217), uint16(116), uint16(117), uint16(118), uint16(304), + /* 820 */ uint16(239), uint16(240), uint16(19), uint16(263), uint16(138), uint16(139), uint16(23), uint16(211), uint16(212), uint16(231), + /* 830 */ uint16(263), uint16(216), uint16(217), uint16(252), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), + /* 840 */ uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(43), uint16(44), uint16(45), uint16(46), + /* 850 */ uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), + /* 860 */ uint16(57), uint16(19), uint16(193), uint16(11), uint16(116), uint16(117), uint16(118), uint16(240), uint16(253), uint16(193), + /* 870 */ uint16(201), uint16(239), uint16(240), uint16(193), uint16(134), uint16(206), uint16(136), uint16(137), uint16(193), uint16(252), + /* 880 */ uint16(193), uint16(264), uint16(193), uint16(193), uint16(252), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), + /* 890 */ uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), + /* 900 */ uint16(284), uint16(216), uint16(217), uint16(216), uint16(217), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), + /* 910 */ uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(193), uint16(231), uint16(193), + /* 920 */ uint16(187), uint16(188), uint16(189), uint16(190), uint16(127), uint16(128), uint16(129), uint16(238), uint16(195), uint16(193), + /* 930 */ uint16(197), uint16(16), uint16(19), uint16(7), uint16(8), uint16(9), uint16(193), uint16(204), uint16(253), uint16(193), + /* 940 */ uint16(216), uint16(217), uint16(216), uint16(217), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), + /* 950 */ uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(43), uint16(44), uint16(45), uint16(46), + /* 960 */ uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), + /* 970 */ uint16(57), uint16(213), uint16(239), uint16(240), uint16(193), uint16(76), uint16(19), uint16(188), uint16(232), uint16(190), + /* 980 */ uint16(128), uint16(129), uint16(292), uint16(193), uint16(195), uint16(252), uint16(197), uint16(46), uint16(89), uint16(138), + /* 990 */ uint16(139), uint16(92), uint16(77), uint16(204), uint16(79), uint16(193), uint16(269), uint16(216), uint16(217), uint16(266), + /* 1000 */ uint16(204), uint16(159), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), + /* 1010 */ uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), + /* 1020 */ uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(12), uint16(239), uint16(240), + /* 1030 */ uint16(193), uint16(298), uint16(22), uint16(23), uint16(253), uint16(239), uint16(240), uint16(127), uint16(128), uint16(129), + /* 1040 */ uint16(238), uint16(252), uint16(27), uint16(193), uint16(286), uint16(204), uint16(193), uint16(204), uint16(252), uint16(291), + /* 1050 */ uint16(193), uint16(273), uint16(22), uint16(23), uint16(100), uint16(266), uint16(115), uint16(42), uint16(268), uint16(102), + /* 1060 */ uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), + /* 1070 */ uint16(113), uint16(117), uint16(159), uint16(216), uint16(217), uint16(121), uint16(161), uint16(19), uint16(63), uint16(193), + /* 1080 */ uint16(239), uint16(240), uint16(239), uint16(240), uint16(12), uint16(208), uint16(209), uint16(298), uint16(73), uint16(311), + /* 1090 */ uint16(312), uint16(238), uint16(19), uint16(252), uint16(25), uint16(252), uint16(22), uint16(24), uint16(24), uint16(27), + /* 1100 */ uint16(193), uint16(264), uint16(216), uint16(217), uint16(46), uint16(208), uint16(209), uint16(153), uint16(154), uint16(155), + /* 1110 */ uint16(253), uint16(101), uint16(19), uint16(23), uint16(42), uint16(25), uint16(43), uint16(44), uint16(45), uint16(46), + /* 1120 */ uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), + /* 1130 */ uint16(57), uint16(101), uint16(19), uint16(59), uint16(25), uint16(63), uint16(43), uint16(44), uint16(45), uint16(46), + /* 1140 */ uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), + /* 1150 */ uint16(57), uint16(22), uint16(23), uint16(115), uint16(25), uint16(24), uint16(43), uint16(44), uint16(45), uint16(46), + /* 1160 */ uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), + /* 1170 */ uint16(57), uint16(22), uint16(23), uint16(115), uint16(25), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), + /* 1180 */ uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(118), uint16(150), uint16(131), + /* 1190 */ uint16(59), uint16(117), uint16(22), uint16(273), uint16(193), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), + /* 1200 */ uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(204), uint16(66), uint16(204), + /* 1210 */ uint16(35), uint16(204), uint16(143), uint16(213), uint16(193), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), + /* 1220 */ uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), uint16(85), uint16(193), uint16(59), + /* 1230 */ uint16(101), uint16(311), uint16(312), uint16(16), uint16(193), uint16(19), uint16(94), uint16(216), uint16(217), uint16(238), + /* 1240 */ uint16(193), uint16(66), uint16(239), uint16(240), uint16(239), uint16(240), uint16(239), uint16(240), uint16(117), uint16(74), + /* 1250 */ uint16(101), uint16(216), uint16(217), uint16(193), uint16(193), uint16(252), uint16(193), uint16(252), uint16(149), uint16(252), + /* 1260 */ uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), + /* 1270 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(193), uint16(193), uint16(193), uint16(5), uint16(59), uint16(216), + /* 1280 */ uint16(217), uint16(25), uint16(10), uint16(11), uint16(12), uint16(13), uint16(14), uint16(117), uint16(146), uint16(17), + /* 1290 */ uint16(193), uint16(291), uint16(193), uint16(232), uint16(77), uint16(76), uint16(79), uint16(216), uint16(217), uint16(216), + /* 1300 */ uint16(217), uint16(31), uint16(30), uint16(309), uint16(32), uint16(130), uint16(87), uint16(313), uint16(89), uint16(39), + /* 1310 */ uint16(193), uint16(92), uint16(40), uint16(216), uint16(217), uint16(216), uint16(217), uint16(108), uint16(102), uint16(103), + /* 1320 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(113), + /* 1330 */ uint16(299), uint16(300), uint16(193), uint16(216), uint16(217), uint16(116), uint16(117), uint16(118), uint16(19), uint16(20), + /* 1340 */ uint16(193), uint16(22), uint16(70), uint16(309), uint16(135), uint16(193), uint16(264), uint16(313), uint16(193), uint16(140), + /* 1350 */ uint16(78), uint16(193), uint16(226), uint16(81), uint16(59), uint16(36), uint16(193), uint16(309), uint16(193), uint16(29), + /* 1360 */ uint16(193), uint16(313), uint16(193), uint16(33), uint16(145), uint16(193), uint16(59), uint16(48), uint16(216), uint16(217), + /* 1370 */ uint16(98), uint16(216), uint16(217), uint16(193), uint16(216), uint16(217), uint16(193), uint16(244), uint16(59), uint16(216), + /* 1380 */ uint16(217), uint16(216), uint16(217), uint16(216), uint16(217), uint16(216), uint16(217), uint16(254), uint16(216), uint16(217), + /* 1390 */ uint16(71), uint16(193), uint16(244), uint16(193), uint16(193), uint16(65), uint16(216), uint16(217), uint16(193), uint16(216), + /* 1400 */ uint16(217), uint16(145), uint16(254), uint16(244), uint16(85), uint16(133), uint16(15), uint16(100), uint16(193), uint16(90), + /* 1410 */ uint16(138), uint16(139), uint16(117), uint16(254), uint16(216), uint16(217), uint16(216), uint16(217), uint16(193), uint16(100), + /* 1420 */ uint16(193), uint16(216), uint16(217), uint16(116), uint16(117), uint16(106), uint16(107), uint16(19), uint16(121), uint16(193), + /* 1430 */ uint16(193), uint16(216), uint16(217), uint16(114), uint16(162), uint16(116), uint16(117), uint16(118), uint16(244), uint16(244), + /* 1440 */ uint16(121), uint16(216), uint16(217), uint16(216), uint16(217), uint16(193), uint16(309), uint16(129), uint16(254), uint16(254), + /* 1450 */ uint16(313), uint16(60), uint16(216), uint16(217), uint16(19), uint16(256), uint16(257), uint16(193), uint16(120), uint16(121), + /* 1460 */ uint16(153), uint16(154), uint16(155), uint16(149), uint16(150), uint16(25), uint16(24), uint16(99), uint16(216), uint16(217), + /* 1470 */ uint16(152), uint16(193), uint16(153), uint16(154), uint16(155), uint16(156), uint16(157), uint16(0), uint16(1), uint16(2), + /* 1480 */ uint16(216), uint16(217), uint16(5), uint16(22), uint16(158), uint16(24), uint16(160), uint16(10), uint16(11), uint16(12), + /* 1490 */ uint16(13), uint16(14), uint16(193), uint16(23), uint16(17), uint16(25), uint16(193), uint16(19), uint16(20), uint16(193), + /* 1500 */ uint16(22), uint16(133), uint16(193), uint16(22), uint16(22), uint16(193), uint16(22), uint16(30), uint16(193), uint16(32), + /* 1510 */ uint16(19), uint16(20), uint16(129), uint16(22), uint16(36), uint16(216), uint16(217), uint16(40), uint16(193), uint16(216), + /* 1520 */ uint16(217), uint16(193), uint16(216), uint16(217), uint16(116), uint16(216), uint16(217), uint16(36), uint16(216), uint16(217), + /* 1530 */ uint16(193), uint16(216), uint16(217), uint16(193), uint16(53), uint16(152), uint16(193), uint16(59), uint16(23), uint16(19), + /* 1540 */ uint16(25), uint16(216), uint16(217), uint16(61), uint16(216), uint16(217), uint16(23), uint16(70), uint16(25), uint16(71), + /* 1550 */ uint16(59), uint16(116), uint16(193), uint16(216), uint16(217), uint16(78), uint16(216), uint16(217), uint16(81), uint16(216), + /* 1560 */ uint16(217), uint16(59), uint16(71), uint16(85), uint16(193), uint16(23), uint16(193), uint16(25), uint16(90), uint16(23), + /* 1570 */ uint16(23), uint16(25), uint16(25), uint16(7), uint16(8), uint16(98), uint16(85), uint16(193), uint16(100), uint16(193), + /* 1580 */ uint16(59), uint16(90), uint16(142), uint16(141), uint16(106), uint16(107), uint16(193), uint16(216), uint16(217), uint16(216), + /* 1590 */ uint16(217), uint16(100), uint16(114), uint16(193), uint16(116), uint16(117), uint16(118), uint16(106), uint16(107), uint16(121), + /* 1600 */ uint16(216), uint16(217), uint16(216), uint16(217), uint16(193), uint16(114), uint16(193), uint16(116), uint16(117), uint16(118), + /* 1610 */ uint16(133), uint16(23), uint16(121), uint16(25), uint16(121), uint16(138), uint16(139), uint16(97), uint16(23), uint16(117), + /* 1620 */ uint16(25), uint16(23), uint16(193), uint16(25), uint16(131), uint16(141), uint16(193), uint16(216), uint16(217), uint16(59), + /* 1630 */ uint16(193), uint16(153), uint16(154), uint16(155), uint16(156), uint16(157), uint16(226), uint16(193), uint16(117), uint16(162), + /* 1640 */ uint16(23), uint16(23), uint16(25), uint16(25), uint16(153), uint16(154), uint16(155), uint16(156), uint16(157), uint16(1), + /* 1650 */ uint16(2), uint16(83), uint16(84), uint16(5), uint16(19), uint16(20), uint16(226), uint16(22), uint16(10), uint16(11), + /* 1660 */ uint16(12), uint16(13), uint16(14), uint16(258), uint16(153), uint16(17), uint16(155), uint16(153), uint16(23), uint16(155), + /* 1670 */ uint16(25), uint16(36), uint16(23), uint16(193), uint16(25), uint16(255), uint16(193), uint16(236), uint16(30), uint16(193), + /* 1680 */ uint16(32), uint16(19), uint16(20), uint16(193), uint16(22), uint16(193), uint16(288), uint16(117), uint16(40), uint16(193), + /* 1690 */ uint16(318), uint16(193), uint16(193), uint16(193), uint16(59), uint16(242), uint16(193), uint16(193), uint16(36), uint16(193), + /* 1700 */ uint16(193), uint16(193), uint16(287), uint16(255), uint16(255), uint16(255), uint16(71), uint16(255), uint16(243), uint16(214), + /* 1710 */ uint16(191), uint16(297), uint16(267), uint16(245), uint16(271), uint16(259), uint16(259), uint16(293), uint16(70), uint16(246), + /* 1720 */ uint16(246), uint16(59), uint16(267), uint16(229), uint16(245), uint16(271), uint16(78), uint16(293), uint16(259), uint16(81), + /* 1730 */ uint16(271), uint16(271), uint16(220), uint16(71), uint16(225), uint16(100), uint16(219), uint16(219), uint16(249), uint16(196), + /* 1740 */ uint16(243), uint16(106), uint16(107), uint16(108), uint16(219), uint16(60), uint16(98), uint16(280), uint16(297), uint16(114), + /* 1750 */ uint16(249), uint16(116), uint16(117), uint16(118), uint16(141), uint16(245), uint16(121), uint16(200), uint16(200), uint16(297), + /* 1760 */ uint16(38), uint16(200), uint16(100), uint16(151), uint16(150), uint16(294), uint16(294), uint16(22), uint16(106), uint16(107), + /* 1770 */ uint16(283), uint16(43), uint16(234), uint16(18), uint16(237), uint16(200), uint16(114), uint16(272), uint16(116), uint16(117), + /* 1780 */ uint16(118), uint16(133), uint16(237), uint16(121), uint16(18), uint16(237), uint16(138), uint16(139), uint16(153), uint16(154), + /* 1790 */ uint16(155), uint16(156), uint16(157), uint16(237), uint16(270), uint16(199), uint16(19), uint16(20), uint16(246), uint16(22), + /* 1800 */ uint16(149), uint16(272), uint16(272), uint16(270), uint16(200), uint16(246), uint16(234), uint16(234), uint16(246), uint16(246), + /* 1810 */ uint16(162), uint16(158), uint16(290), uint16(36), uint16(199), uint16(153), uint16(154), uint16(155), uint16(156), uint16(157), + /* 1820 */ uint16(62), uint16(289), uint16(200), uint16(199), uint16(22), uint16(200), uint16(221), uint16(199), uint16(221), uint16(200), + /* 1830 */ uint16(199), uint16(115), uint16(64), uint16(227), uint16(218), uint16(22), uint16(59), uint16(218), uint16(218), uint16(126), + /* 1840 */ uint16(165), uint16(24), uint16(113), uint16(312), uint16(218), uint16(224), uint16(305), uint16(224), uint16(71), uint16(282), + /* 1850 */ uint16(144), uint16(221), uint16(220), uint16(282), uint16(218), uint16(218), uint16(218), uint16(115), uint16(261), uint16(260), + /* 1860 */ uint16(227), uint16(221), uint16(261), uint16(260), uint16(200), uint16(91), uint16(317), uint16(317), uint16(82), uint16(261), + /* 1870 */ uint16(260), uint16(148), uint16(261), uint16(22), uint16(265), uint16(145), uint16(200), uint16(100), uint16(158), uint16(277), + /* 1880 */ uint16(147), uint16(146), uint16(25), uint16(106), uint16(107), uint16(202), uint16(13), uint16(260), uint16(194), uint16(250), + /* 1890 */ uint16(249), uint16(114), uint16(248), uint16(116), uint16(117), uint16(118), uint16(250), uint16(247), uint16(121), uint16(265), + /* 1900 */ uint16(246), uint16(194), uint16(6), uint16(192), uint16(192), uint16(207), uint16(192), uint16(207), uint16(213), uint16(213), + /* 1910 */ uint16(213), uint16(222), uint16(213), uint16(222), uint16(4), uint16(214), uint16(214), uint16(213), uint16(3), uint16(22), + /* 1920 */ uint16(163), uint16(279), uint16(207), uint16(15), uint16(23), uint16(16), uint16(23), uint16(139), uint16(130), uint16(151), + /* 1930 */ uint16(153), uint16(154), uint16(155), uint16(156), uint16(157), uint16(142), uint16(25), uint16(24), uint16(20), uint16(144), + /* 1940 */ uint16(16), uint16(1), uint16(142), uint16(61), uint16(130), uint16(130), uint16(303), uint16(151), uint16(53), uint16(37), + /* 1950 */ uint16(303), uint16(53), uint16(300), uint16(53), uint16(130), uint16(53), uint16(116), uint16(34), uint16(1), uint16(141), + /* 1960 */ uint16(5), uint16(22), uint16(115), uint16(25), uint16(161), uint16(75), uint16(41), uint16(68), uint16(141), uint16(115), + /* 1970 */ uint16(24), uint16(20), uint16(68), uint16(19), uint16(131), uint16(125), uint16(23), uint16(96), uint16(22), uint16(59), + /* 1980 */ uint16(22), uint16(67), uint16(22), uint16(22), uint16(67), uint16(22), uint16(24), uint16(28), uint16(67), uint16(37), + /* 1990 */ uint16(23), uint16(149), uint16(22), uint16(25), uint16(23), uint16(23), uint16(23), uint16(23), uint16(22), uint16(141), + /* 2000 */ uint16(23), uint16(23), uint16(97), uint16(116), uint16(22), uint16(143), uint16(25), uint16(88), uint16(75), uint16(34), + /* 2010 */ uint16(44), uint16(75), uint16(86), uint16(34), uint16(34), uint16(93), uint16(23), uint16(34), uint16(34), uint16(34), + /* 2020 */ uint16(22), uint16(24), uint16(34), uint16(22), uint16(25), uint16(25), uint16(23), uint16(23), uint16(23), uint16(23), + /* 2030 */ uint16(23), uint16(11), uint16(23), uint16(25), uint16(22), uint16(22), uint16(25), uint16(23), uint16(23), uint16(22), + /* 2040 */ uint16(22), uint16(135), uint16(15), uint16(1), uint16(25), uint16(23), uint16(1), uint16(319), uint16(141), uint16(319), + /* 2050 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(141), uint16(319), uint16(319), + /* 2060 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(141), uint16(141), + /* 2070 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2080 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2090 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2100 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2110 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2120 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2130 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2140 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2150 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2160 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2170 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2180 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2190 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2200 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2210 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2220 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), + /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), +} /* sqlite3.c:162092:25 */ +var yy_shift_ofst = [574]uint16{ + /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), + /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), + /* 20 */ uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), + /* 30 */ uint16(271), uint16(271), uint16(1219), uint16(1219), uint16(216), uint16(88), uint16(262), uint16(262), uint16(262), uint16(262), + /* 40 */ uint16(262), uint16(40), uint16(111), uint16(258), uint16(361), uint16(469), uint16(512), uint16(583), uint16(622), uint16(693), + /* 50 */ uint16(732), uint16(803), uint16(842), uint16(913), uint16(1073), uint16(1093), uint16(1093), uint16(1093), uint16(1093), uint16(1093), + /* 60 */ uint16(1093), uint16(1093), uint16(1093), uint16(1093), uint16(1093), uint16(1093), uint16(1093), uint16(1093), uint16(1093), uint16(1093), + /* 70 */ uint16(1093), uint16(1093), uint16(1093), uint16(1113), uint16(1093), uint16(1216), uint16(957), uint16(957), uint16(1635), uint16(1662), + /* 80 */ uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), + /* 90 */ uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), + /* 100 */ uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), + /* 110 */ uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1777), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), + /* 120 */ uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(1662), uint16(137), uint16(181), + /* 130 */ uint16(181), uint16(181), uint16(181), uint16(181), uint16(94), uint16(430), uint16(66), uint16(65), uint16(112), uint16(366), + /* 140 */ uint16(475), uint16(475), uint16(629), uint16(1058), uint16(475), uint16(475), uint16(125), uint16(125), uint16(475), uint16(686), + /* 150 */ uint16(686), uint16(686), uint16(660), uint16(686), uint16(57), uint16(184), uint16(184), uint16(77), uint16(77), uint16(2070), + /* 160 */ uint16(2070), uint16(328), uint16(328), uint16(328), uint16(493), uint16(373), uint16(373), uint16(373), uint16(373), uint16(1015), + /* 170 */ uint16(1015), uint16(409), uint16(366), uint16(1129), uint16(1149), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), + /* 180 */ uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), + /* 190 */ uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(621), uint16(621), uint16(475), uint16(852), uint16(899), + /* 200 */ uint16(899), uint16(1295), uint16(1295), uint16(406), uint16(851), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), + /* 210 */ uint16(2070), uint16(2070), uint16(1307), uint16(954), uint16(954), uint16(640), uint16(464), uint16(695), uint16(238), uint16(700), + /* 220 */ uint16(538), uint16(541), uint16(748), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), + /* 230 */ uint16(475), uint16(475), uint16(475), uint16(634), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), + /* 240 */ uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(1175), uint16(1175), uint16(1175), uint16(475), + /* 250 */ uint16(475), uint16(475), uint16(580), uint16(475), uint16(475), uint16(475), uint16(1074), uint16(1142), uint16(475), uint16(475), + /* 260 */ uint16(1072), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(475), uint16(797), + /* 270 */ uint16(1330), uint16(740), uint16(1131), uint16(1131), uint16(1131), uint16(1131), uint16(1069), uint16(740), uint16(740), uint16(1209), + /* 280 */ uint16(167), uint16(926), uint16(1391), uint16(1038), uint16(1314), uint16(187), uint16(1408), uint16(1314), uint16(1408), uint16(1435), + /* 290 */ uint16(1109), uint16(1038), uint16(1038), uint16(1109), uint16(1038), uint16(187), uint16(1435), uint16(227), uint16(1090), uint16(941), + /* 300 */ uint16(1270), uint16(1270), uint16(1270), uint16(1408), uint16(1256), uint16(1256), uint16(1326), uint16(1440), uint16(513), uint16(1461), + /* 310 */ uint16(1685), uint16(1685), uint16(1613), uint16(1613), uint16(1722), uint16(1722), uint16(1613), uint16(1612), uint16(1614), uint16(1745), + /* 320 */ uint16(1728), uint16(1755), uint16(1755), uint16(1755), uint16(1755), uint16(1613), uint16(1766), uint16(1651), uint16(1614), uint16(1614), + /* 330 */ uint16(1651), uint16(1745), uint16(1728), uint16(1651), uint16(1728), uint16(1651), uint16(1613), uint16(1766), uint16(1653), uint16(1758), + /* 340 */ uint16(1613), uint16(1766), uint16(1802), uint16(1613), uint16(1766), uint16(1613), uint16(1766), uint16(1802), uint16(1716), uint16(1716), + /* 350 */ uint16(1716), uint16(1768), uint16(1813), uint16(1813), uint16(1802), uint16(1716), uint16(1713), uint16(1716), uint16(1768), uint16(1716), + /* 360 */ uint16(1716), uint16(1675), uint16(1817), uint16(1729), uint16(1729), uint16(1802), uint16(1706), uint16(1742), uint16(1706), uint16(1742), + /* 370 */ uint16(1706), uint16(1742), uint16(1706), uint16(1742), uint16(1613), uint16(1774), uint16(1774), uint16(1786), uint16(1786), uint16(1723), + /* 380 */ uint16(1730), uint16(1851), uint16(1613), uint16(1720), uint16(1723), uint16(1733), uint16(1735), uint16(1651), uint16(1857), uint16(1873), + /* 390 */ uint16(1873), uint16(1896), uint16(1896), uint16(1896), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), + /* 400 */ uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(2070), uint16(207), + /* 410 */ uint16(915), uint16(1010), uint16(1030), uint16(1217), uint16(910), uint16(1170), uint16(1470), uint16(1368), uint16(1481), uint16(1442), + /* 420 */ uint16(1318), uint16(1383), uint16(1515), uint16(1482), uint16(1523), uint16(1542), uint16(1546), uint16(1547), uint16(1588), uint16(1595), + /* 430 */ uint16(1502), uint16(1338), uint16(1566), uint16(1493), uint16(1520), uint16(1521), uint16(1598), uint16(1617), uint16(1568), uint16(1618), + /* 440 */ uint16(1511), uint16(1514), uint16(1645), uint16(1649), uint16(1570), uint16(1484), uint16(1910), uint16(1915), uint16(1897), uint16(1757), + /* 450 */ uint16(1908), uint16(1909), uint16(1901), uint16(1903), uint16(1788), uint16(1778), uint16(1798), uint16(1911), uint16(1911), uint16(1913), + /* 460 */ uint16(1793), uint16(1918), uint16(1795), uint16(1924), uint16(1940), uint16(1800), uint16(1814), uint16(1911), uint16(1815), uint16(1882), + /* 470 */ uint16(1912), uint16(1911), uint16(1796), uint16(1895), uint16(1898), uint16(1900), uint16(1902), uint16(1824), uint16(1840), uint16(1923), + /* 480 */ uint16(1818), uint16(1957), uint16(1955), uint16(1939), uint16(1847), uint16(1803), uint16(1899), uint16(1938), uint16(1904), uint16(1890), + /* 490 */ uint16(1925), uint16(1827), uint16(1854), uint16(1946), uint16(1951), uint16(1954), uint16(1843), uint16(1850), uint16(1956), uint16(1914), + /* 500 */ uint16(1958), uint16(1960), uint16(1953), uint16(1961), uint16(1917), uint16(1920), uint16(1962), uint16(1881), uint16(1959), uint16(1963), + /* 510 */ uint16(1921), uint16(1952), uint16(1967), uint16(1842), uint16(1970), uint16(1971), uint16(1972), uint16(1973), uint16(1968), uint16(1974), + /* 520 */ uint16(1976), uint16(1905), uint16(1858), uint16(1977), uint16(1978), uint16(1887), uint16(1975), uint16(1982), uint16(1862), uint16(1981), + /* 530 */ uint16(1979), uint16(1980), uint16(1983), uint16(1984), uint16(1919), uint16(1933), uint16(1926), uint16(1966), uint16(1936), uint16(1922), + /* 540 */ uint16(1985), uint16(1993), uint16(1998), uint16(1997), uint16(1999), uint16(2000), uint16(1988), uint16(2003), uint16(1981), uint16(2004), + /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), + /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), + /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), +} /* sqlite3.c:162323:33 */ +var yy_reduce_ofst = [409]int16{ + /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), + /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), + /* 20 */ int16(487), int16(396), int16(489), int16(598), int16(615), int16(685), int16(687), int16(79), int16(781), int16(857), + /* 30 */ int16(490), int16(616), int16(240), int16(334), int16(-188), int16(796), int16(841), int16(843), int16(1003), int16(1005), + /* 40 */ int16(1007), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), + /* 50 */ int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), + /* 60 */ int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), + /* 70 */ int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(158), int16(203), + /* 80 */ int16(391), int16(576), int16(724), int16(726), int16(886), int16(1021), int16(1035), int16(1063), int16(1081), int16(1083), + /* 90 */ int16(1097), int16(1099), int16(1117), int16(1152), int16(1155), int16(1158), int16(1163), int16(1165), int16(1167), int16(1169), + /* 100 */ int16(1172), int16(1180), int16(1183), int16(1198), int16(1200), int16(1205), int16(1215), int16(1225), int16(1227), int16(1236), + /* 110 */ int16(1252), int16(1264), int16(1299), int16(1303), int16(1306), int16(1309), int16(1312), int16(1315), int16(1325), int16(1328), + /* 120 */ int16(1337), int16(1340), int16(1343), int16(1371), int16(1373), int16(1384), int16(1386), int16(1411), int16(-260), int16(-260), + /* 130 */ int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-260), int16(-53), int16(138), int16(302), + /* 140 */ int16(-158), int16(357), int16(223), int16(-222), int16(411), int16(458), int16(-92), int16(556), int16(669), int16(581), + /* 150 */ int16(632), int16(581), int16(-260), int16(632), int16(758), int16(778), int16(920), int16(-260), int16(-260), int16(-260), + /* 160 */ int16(-260), int16(161), int16(161), int16(161), int16(307), int16(234), int16(392), int16(526), int16(790), int16(195), + /* 170 */ int16(359), int16(-174), int16(-173), int16(362), int16(362), int16(-189), int16(16), int16(560), int16(567), int16(261), + /* 180 */ int16(689), int16(802), int16(853), int16(-122), int16(-166), int16(408), int16(335), int16(617), int16(690), int16(837), + /* 190 */ int16(1001), int16(746), int16(1061), int16(515), int16(1082), int16(994), int16(1034), int16(-135), int16(1000), int16(1048), + /* 200 */ int16(1137), int16(877), int16(897), int16(186), int16(627), int16(1031), int16(1133), int16(1148), int16(1159), int16(1194), + /* 210 */ int16(1199), int16(1195), int16(-194), int16(-142), int16(18), int16(-152), int16(68), int16(201), int16(253), int16(269), + /* 220 */ int16(294), int16(354), int16(521), int16(528), int16(676), int16(680), int16(736), int16(743), int16(850), int16(907), + /* 230 */ int16(1041), int16(1047), int16(1060), int16(727), int16(1139), int16(1147), int16(1201), int16(1237), int16(1278), int16(1359), + /* 240 */ int16(1393), int16(1400), int16(1413), int16(1429), int16(1433), int16(1437), int16(1126), int16(1410), int16(1430), int16(1444), + /* 250 */ int16(1480), int16(1483), int16(1405), int16(1486), int16(1490), int16(1492), int16(1420), int16(1372), int16(1496), int16(1498), + /* 260 */ int16(1441), int16(1499), int16(253), int16(1500), int16(1503), int16(1504), int16(1506), int16(1507), int16(1508), int16(1398), + /* 270 */ int16(1415), int16(1453), int16(1448), int16(1449), int16(1450), int16(1452), int16(1405), int16(1453), int16(1453), int16(1465), + /* 280 */ int16(1495), int16(1519), int16(1414), int16(1443), int16(1445), int16(1468), int16(1456), int16(1455), int16(1457), int16(1424), + /* 290 */ int16(1473), int16(1454), int16(1459), int16(1474), int16(1460), int16(1479), int16(1434), int16(1512), int16(1494), int16(1509), + /* 300 */ int16(1517), int16(1518), int16(1525), int16(1469), int16(1489), int16(1501), int16(1467), int16(1510), int16(1497), int16(1543), + /* 310 */ int16(1451), int16(1462), int16(1557), int16(1558), int16(1471), int16(1472), int16(1561), int16(1487), int16(1505), int16(1524), + /* 320 */ int16(1538), int16(1537), int16(1545), int16(1548), int16(1556), int16(1575), int16(1596), int16(1552), int16(1529), int16(1530), + /* 330 */ int16(1559), int16(1533), int16(1572), int16(1562), int16(1573), int16(1563), int16(1604), int16(1615), int16(1522), int16(1532), + /* 340 */ int16(1622), int16(1624), int16(1605), int16(1625), int16(1628), int16(1629), int16(1631), int16(1607), int16(1616), int16(1619), + /* 350 */ int16(1620), int16(1606), int16(1621), int16(1623), int16(1630), int16(1626), int16(1632), int16(1636), int16(1633), int16(1637), + /* 360 */ int16(1638), int16(1531), int16(1541), int16(1567), int16(1571), int16(1640), int16(1597), int16(1599), int16(1601), int16(1603), + /* 370 */ int16(1608), int16(1610), int16(1611), int16(1627), int16(1664), int16(1549), int16(1550), int16(1609), int16(1634), int16(1639), + /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), + /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), + /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), +} /* sqlite3.c:162386:20 */ +var yy_default = [574]uint16{ + /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), + /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), + /* 20 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1465), uint16(1233), uint16(1233), + /* 30 */ uint16(1233), uint16(1233), uint16(1554), uint16(1554), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 40 */ uint16(1233), uint16(1233), uint16(1383), uint16(1233), uint16(1390), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 50 */ uint16(1467), uint16(1468), uint16(1233), uint16(1233), uint16(1233), uint16(1518), uint16(1520), uint16(1483), uint16(1397), uint16(1396), + /* 60 */ uint16(1395), uint16(1394), uint16(1501), uint16(1361), uint16(1388), uint16(1381), uint16(1385), uint16(1461), uint16(1462), uint16(1460), + /* 70 */ uint16(1464), uint16(1468), uint16(1467), uint16(1233), uint16(1384), uint16(1431), uint16(1445), uint16(1430), uint16(1233), uint16(1233), + /* 80 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 90 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 100 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 110 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 120 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1439), uint16(1444), + /* 130 */ uint16(1451), uint16(1443), uint16(1440), uint16(1433), uint16(1432), uint16(1434), uint16(1435), uint16(1233), uint16(1233), uint16(1257), + /* 140 */ uint16(1233), uint16(1233), uint16(1254), uint16(1308), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1538), + /* 150 */ uint16(1537), uint16(1233), uint16(1436), uint16(1233), uint16(1266), uint16(1425), uint16(1424), uint16(1448), uint16(1437), uint16(1447), + /* 160 */ uint16(1446), uint16(1526), uint16(1590), uint16(1589), uint16(1484), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 170 */ uint16(1233), uint16(1554), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 180 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 190 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1554), uint16(1554), uint16(1233), uint16(1266), uint16(1554), + /* 200 */ uint16(1554), uint16(1262), uint16(1262), uint16(1368), uint16(1233), uint16(1533), uint16(1335), uint16(1335), uint16(1335), uint16(1335), + /* 210 */ uint16(1344), uint16(1335), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 220 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1523), uint16(1521), uint16(1233), + /* 230 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 240 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 250 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1340), uint16(1233), uint16(1233), uint16(1233), + /* 260 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1583), uint16(1233), + /* 270 */ uint16(1496), uint16(1322), uint16(1340), uint16(1340), uint16(1340), uint16(1340), uint16(1342), uint16(1323), uint16(1321), uint16(1334), + /* 280 */ uint16(1267), uint16(1240), uint16(1629), uint16(1400), uint16(1389), uint16(1341), uint16(1363), uint16(1389), uint16(1363), uint16(1626), + /* 290 */ uint16(1387), uint16(1400), uint16(1400), uint16(1387), uint16(1400), uint16(1341), uint16(1626), uint16(1283), uint16(1606), uint16(1278), + /* 300 */ uint16(1374), uint16(1374), uint16(1374), uint16(1363), uint16(1368), uint16(1368), uint16(1463), uint16(1341), uint16(1334), uint16(1233), + /* 310 */ uint16(1629), uint16(1629), uint16(1349), uint16(1349), uint16(1628), uint16(1628), uint16(1349), uint16(1484), uint16(1613), uint16(1409), + /* 320 */ uint16(1311), uint16(1317), uint16(1317), uint16(1317), uint16(1317), uint16(1349), uint16(1251), uint16(1387), uint16(1613), uint16(1613), + /* 330 */ uint16(1387), uint16(1409), uint16(1311), uint16(1387), uint16(1311), uint16(1387), uint16(1349), uint16(1251), uint16(1500), uint16(1623), + /* 340 */ uint16(1349), uint16(1251), uint16(1474), uint16(1349), uint16(1251), uint16(1349), uint16(1251), uint16(1474), uint16(1309), uint16(1309), + /* 350 */ uint16(1309), uint16(1298), uint16(1233), uint16(1233), uint16(1474), uint16(1309), uint16(1283), uint16(1309), uint16(1298), uint16(1309), + /* 360 */ uint16(1309), uint16(1572), uint16(1233), uint16(1478), uint16(1478), uint16(1474), uint16(1367), uint16(1362), uint16(1367), uint16(1362), + /* 370 */ uint16(1367), uint16(1362), uint16(1367), uint16(1362), uint16(1349), uint16(1564), uint16(1564), uint16(1377), uint16(1377), uint16(1382), + /* 380 */ uint16(1368), uint16(1469), uint16(1349), uint16(1233), uint16(1382), uint16(1380), uint16(1378), uint16(1387), uint16(1301), uint16(1586), + /* 390 */ uint16(1586), uint16(1582), uint16(1582), uint16(1582), uint16(1634), uint16(1634), uint16(1533), uint16(1599), uint16(1266), uint16(1266), + /* 400 */ uint16(1266), uint16(1266), uint16(1599), uint16(1285), uint16(1285), uint16(1267), uint16(1267), uint16(1266), uint16(1599), uint16(1233), + /* 410 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1594), uint16(1233), uint16(1528), uint16(1485), uint16(1353), + /* 420 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 430 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1539), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 440 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1414), uint16(1233), uint16(1236), uint16(1530), uint16(1233), + /* 450 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1391), uint16(1392), uint16(1354), + /* 460 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1406), uint16(1233), uint16(1233), + /* 470 */ uint16(1233), uint16(1401), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 480 */ uint16(1625), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1499), uint16(1498), uint16(1233), + /* 490 */ uint16(1233), uint16(1351), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 500 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1281), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 510 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 520 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1379), + /* 530 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 540 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1569), uint16(1369), uint16(1233), uint16(1233), uint16(1616), uint16(1233), + /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), + /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), + /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), +} /* sqlite3.c:162429:27 */ +//********* End of lemon-generated parsing tables **************************** + +// The next table maps tokens (terminal symbols) into fallback tokens. +// If a construct like the following: +// +// %fallback ID X Y Z. +// +// appears in the grammar, then ID becomes a fallback token for X, Y, +// and Z. Whenever one of the tokens X, Y, or Z is input to the parser +// but it does not parse, the type of the token is changed to ID and +// the parse is retried before an error is thrown. +// +// This feature can be used, for example, to cause some keywords in a language +// to revert to identifiers if they keyword does not apply in the context where +// it appears. +var yyFallback = [185]uint16{ + uint16(0), // $ => nothing + uint16(0), // SEMI => nothing + uint16(59), // EXPLAIN => ID + uint16(59), // QUERY => ID + uint16(59), // PLAN => ID + uint16(59), // BEGIN => ID + uint16(0), // TRANSACTION => nothing + uint16(59), // DEFERRED => ID + uint16(59), // IMMEDIATE => ID + uint16(59), // EXCLUSIVE => ID + uint16(0), // COMMIT => nothing + uint16(59), // END => ID + uint16(59), // ROLLBACK => ID + uint16(59), // SAVEPOINT => ID + uint16(59), // RELEASE => ID + uint16(0), // TO => nothing + uint16(0), // TABLE => nothing + uint16(0), // CREATE => nothing + uint16(59), // IF => ID + uint16(0), // NOT => nothing + uint16(0), // EXISTS => nothing + uint16(59), // TEMP => ID + uint16(0), // LP => nothing + uint16(0), // RP => nothing + uint16(0), // AS => nothing + uint16(0), // COMMA => nothing + uint16(59), // WITHOUT => ID + uint16(59), // ABORT => ID + uint16(59), // ACTION => ID + uint16(59), // AFTER => ID + uint16(59), // ANALYZE => ID + uint16(59), // ASC => ID + uint16(59), // ATTACH => ID + uint16(59), // BEFORE => ID + uint16(59), // BY => ID + uint16(59), // CASCADE => ID + uint16(59), // CAST => ID + uint16(59), // CONFLICT => ID + uint16(59), // DATABASE => ID + uint16(59), // DESC => ID + uint16(59), // DETACH => ID + uint16(59), // EACH => ID + uint16(59), // FAIL => ID + uint16(0), // OR => nothing + uint16(0), // AND => nothing + uint16(0), // IS => nothing + uint16(59), // MATCH => ID + uint16(59), // LIKE_KW => ID + uint16(0), // BETWEEN => nothing + uint16(0), // IN => nothing + uint16(0), // ISNULL => nothing + uint16(0), // NOTNULL => nothing + uint16(0), // NE => nothing + uint16(0), // EQ => nothing + uint16(0), // GT => nothing + uint16(0), // LE => nothing + uint16(0), // LT => nothing + uint16(0), // GE => nothing + uint16(0), // ESCAPE => nothing + uint16(0), // ID => nothing + uint16(59), // COLUMNKW => ID + uint16(59), // DO => ID + uint16(59), // FOR => ID + uint16(59), // IGNORE => ID + uint16(59), // INITIALLY => ID + uint16(59), // INSTEAD => ID + uint16(59), // NO => ID + uint16(59), // KEY => ID + uint16(59), // OF => ID + uint16(59), // OFFSET => ID + uint16(59), // PRAGMA => ID + uint16(59), // RAISE => ID + uint16(59), // RECURSIVE => ID + uint16(59), // REPLACE => ID + uint16(59), // RESTRICT => ID + uint16(59), // ROW => ID + uint16(59), // ROWS => ID + uint16(59), // TRIGGER => ID + uint16(59), // VACUUM => ID + uint16(59), // VIEW => ID + uint16(59), // VIRTUAL => ID + uint16(59), // WITH => ID + uint16(59), // NULLS => ID + uint16(59), // FIRST => ID + uint16(59), // LAST => ID + uint16(59), // CURRENT => ID + uint16(59), // FOLLOWING => ID + uint16(59), // PARTITION => ID + uint16(59), // PRECEDING => ID + uint16(59), // RANGE => ID + uint16(59), // UNBOUNDED => ID + uint16(59), // EXCLUDE => ID + uint16(59), // GROUPS => ID + uint16(59), // OTHERS => ID + uint16(59), // TIES => ID + uint16(59), // GENERATED => ID + uint16(59), // ALWAYS => ID + uint16(59), // MATERIALIZED => ID + uint16(59), // REINDEX => ID + uint16(59), // RENAME => ID + uint16(59), // CTIME_KW => ID + uint16(0), // ANY => nothing + uint16(0), // BITAND => nothing + uint16(0), // BITOR => nothing + uint16(0), // LSHIFT => nothing + uint16(0), // RSHIFT => nothing + uint16(0), // PLUS => nothing + uint16(0), // MINUS => nothing + uint16(0), // STAR => nothing + uint16(0), // SLASH => nothing + uint16(0), // REM => nothing + uint16(0), // CONCAT => nothing + uint16(0), // PTR => nothing + uint16(0), // COLLATE => nothing + uint16(0), // BITNOT => nothing + uint16(0), // ON => nothing + uint16(0), // INDEXED => nothing + uint16(0), // STRING => nothing + uint16(0), // JOIN_KW => nothing + uint16(0), // CONSTRAINT => nothing + uint16(0), // DEFAULT => nothing + uint16(0), // NULL => nothing + uint16(0), // PRIMARY => nothing + uint16(0), // UNIQUE => nothing + uint16(0), // CHECK => nothing + uint16(0), // REFERENCES => nothing + uint16(0), // AUTOINCR => nothing + uint16(0), // INSERT => nothing + uint16(0), // DELETE => nothing + uint16(0), // UPDATE => nothing + uint16(0), // SET => nothing + uint16(0), // DEFERRABLE => nothing + uint16(0), // FOREIGN => nothing + uint16(0), // DROP => nothing + uint16(0), // UNION => nothing + uint16(0), // ALL => nothing + uint16(0), // EXCEPT => nothing + uint16(0), // INTERSECT => nothing + uint16(0), // SELECT => nothing + uint16(0), // VALUES => nothing + uint16(0), // DISTINCT => nothing + uint16(0), // DOT => nothing + uint16(0), // FROM => nothing + uint16(0), // JOIN => nothing + uint16(0), // USING => nothing + uint16(0), // ORDER => nothing + uint16(0), // GROUP => nothing + uint16(0), // HAVING => nothing + uint16(0), // LIMIT => nothing + uint16(0), // WHERE => nothing + uint16(0), // RETURNING => nothing + uint16(0), // INTO => nothing + uint16(0), // NOTHING => nothing + uint16(0), // FLOAT => nothing + uint16(0), // BLOB => nothing + uint16(0), // INTEGER => nothing + uint16(0), // VARIABLE => nothing + uint16(0), // CASE => nothing + uint16(0), // WHEN => nothing + uint16(0), // THEN => nothing + uint16(0), // ELSE => nothing + uint16(0), // INDEX => nothing + uint16(0), // ALTER => nothing + uint16(0), // ADD => nothing + uint16(0), // WINDOW => nothing + uint16(0), // OVER => nothing + uint16(0), // FILTER => nothing + uint16(0), // COLUMN => nothing + uint16(0), // AGG_FUNCTION => nothing + uint16(0), // AGG_COLUMN => nothing + uint16(0), // TRUEFALSE => nothing + uint16(0), // ISNOT => nothing + uint16(0), // FUNCTION => nothing + uint16(0), // UMINUS => nothing + uint16(0), // UPLUS => nothing + uint16(0), // TRUTH => nothing + uint16(0), // REGISTER => nothing + uint16(0), // VECTOR => nothing + uint16(0), // SELECT_COLUMN => nothing + uint16(0), // IF_NULL_ROW => nothing + uint16(0), // ASTERISK => nothing + uint16(0), // SPAN => nothing + uint16(0), // ERROR => nothing + uint16(0), // SPACE => nothing + uint16(0), // ILLEGAL => nothing +} /* sqlite3.c:162506:25 */ + +// The following structure represents a single element of the +// parser's stack. Information stored includes: +// +// + The state number for the parser at this level of the stack. +// +// + The value of the token stored at this level of the stack. +// (In other words, the "major" token.) +// +// + The semantic value stored at this level of the stack. This is +// the information used by the action routines in the grammar. +// It is sometimes called the "minor" token. +// +// After the "shift" half of a SHIFTREDUCE action, the stateno field +// actually contains the reduce action for the second half of the +// SHIFTREDUCE. +type yyStackEntry = struct { + Fstateno uint16 + Fmajor uint16 + F__ccgo_pad1 [4]byte + Fminor YYMINORTYPE +} /* sqlite3.c:162711:1 */ + +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ + +// The state of the parser is completely contained in an instance of +// the following structure +type yyParser = struct { + Fyytos uintptr + FpParse uintptr + Fyystack [100]YyStackEntry + FyystackEnd uintptr +} /* sqlite3.c:162722:1 */ + +type YyParser = yyParser /* sqlite3.c:162741:25 */ + +// #include + +// Datatype of the argument to the memory allocated passed as the +// second argument to sqlite3ParserAlloc() below. This can be changed by +// putting an appropriate #define in the %include section of the input +// grammar. + +// Initialize a new parser that has already been allocated. +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ + var yypParser uintptr = yypRawParser + (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse + (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ + (*YyStackEntry)(unsafe.Pointer(yypParser + 16)).Fstateno = uint16(0) + (*YyStackEntry)(unsafe.Pointer(yypParser + 16)).Fmajor = uint16(0) + (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd = yypParser + 16 + 99*24 +} + +// The following function deletes the "minor type" or semantic value +// associated with a symbol. The symbol can be either a terminal +// or nonterminal. "yymajor" is the symbol code, and "yypminor" is +// a pointer to the value to be deleted. The code used to do the +// deletions is derived from the %destructor and/or %token_destructor +// directives of the input grammar. +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ + + var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse + switch int32(yymajor) { + // Here is inserted the actions which take place when a + // terminal or non-terminal is destroyed. This can happen + // when the symbol is popped from the stack during a + // reduce or during error processing or when a parser is + // being destroyed before it is finished parsing. + // + // Note: during a reduce, the only symbols destroyed are those + // which appear on the RHS of the rule, but which are *not* used + // inside the C code. + //******** Begin destructor definitions ************************************** + case 204: + fallthrough // select + case 239: + fallthrough // selectnowith + case 240: + fallthrough // oneselect + case 252: /* values */ + { + Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 216: + fallthrough // term + case 217: + fallthrough // expr + case 246: + fallthrough // where_opt + case 248: + fallthrough // having_opt + case 260: + fallthrough // on_opt + case 267: + fallthrough // where_opt_ret + case 278: + fallthrough // case_operand + case 280: + fallthrough // case_else + case 283: + fallthrough // vinto + case 290: + fallthrough // when_clause + case 295: + fallthrough // key_opt + case 311: /* filter_clause */ + { + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 221: + fallthrough // eidlist_opt + case 231: + fallthrough // sortlist + case 232: + fallthrough // eidlist + case 244: + fallthrough // selcollist + case 247: + fallthrough // groupby_opt + case 249: + fallthrough // orderby_opt + case 253: + fallthrough // nexprlist + case 254: + fallthrough // sclp + case 262: + fallthrough // exprlist + case 268: + fallthrough // setlist + case 277: + fallthrough // paren_exprlist + case 279: + fallthrough // case_exprlist + case 310: /* part_opt */ + { + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 238: + fallthrough // fullname + case 245: + fallthrough // from + case 256: + fallthrough // seltablist + case 257: + fallthrough // stl_prefix + case 263: /* xfullname */ + { + Xsqlite3SrcListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 241: /* wqlist */ + { + Xsqlite3WithDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 251: + fallthrough // window_clause + case 306: /* windowdefn_list */ + { + Xsqlite3WindowListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 261: + fallthrough // using_opt + case 264: + fallthrough // idlist + case 270: /* idlist_opt */ + { + Xsqlite3IdListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 273: + fallthrough // filter_over + case 307: + fallthrough // windowdefn + case 308: + fallthrough // window + case 309: + fallthrough // frame_opt + case 312: /* over_clause */ + { + Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 286: + fallthrough // trigger_cmd_list + case 291: /* trigger_cmd */ + { + Xsqlite3DeleteTriggerStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor))) + } + break + case 288: /* trigger_event */ + { + Xsqlite3IdListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*TrigEvent)(unsafe.Pointer(yypminor)).Fb) + } + break + case 314: + fallthrough // frame_bound + case 315: + fallthrough // frame_bound_s + case 316: /* frame_bound_e */ + { + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*FrameBound)(unsafe.Pointer(yypminor)).FpExpr) + } + break + //******** End destructor definitions **************************************** + default: + break // If no destructor action specified: do nothing + } +} + +// Pop the parser's stack once. +// +// If there is a destructor routine associated with the token which +// is popped from the stack, then call it. +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ + var yytos uintptr + + yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) + yy_destructor(tls, pParser, (*YyStackEntry)(unsafe.Pointer(yytos)).Fmajor, yytos+8) +} + +// Clear all secondary memory allocations from the parser +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ + var pParser uintptr = p + for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { + yy_pop_parser_stack(tls, pParser) + } +} + +// Return the peak depth of the stack for a parser. + +// This array of booleans keeps track of the parser statement +// coverage. The element yycoverage[X][Y] is set when the parser +// is in state X and has a lookahead token Y. In a well-tested +// systems, every element of this matrix should end up being set. + +// Write into out a description of every state/lookahead combination that +// +// (1) has not been used by the parser, and +// (2) is not a syntax error. +// +// Return the number of missed state/lookahead combinations. + +// Find the appropriate action for a parser given the terminal +// look-ahead token iLookAhead. +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ + var i int32 + + if int32(stateno) > YY_MAX_SHIFT { + return stateno + } + + for __ccgo := true; __ccgo; __ccgo = 1 != 0 { + i = int32(yy_shift_ofst[stateno]) + + i = i + int32(iLookAhead) + + if int32(yy_lookahead[i]) != int32(iLookAhead) { + var iFallback uint16 // Fallback token + + iFallback = yyFallback[iLookAhead] + if int32(iFallback) != 0 { + // Fallback loop must terminate + iLookAhead = iFallback + continue + } + { + var j int32 = i - int32(iLookAhead) + YYWILDCARD + + if int32(yy_lookahead[j]) == YYWILDCARD && int32(iLookAhead) > 0 { + return yy_action[j] + } + + } + return yy_default[stateno] + } else { + + return yy_action[i] + } + } + return uint16(0) +} + +// Find the appropriate action for a parser given the non-terminal +// look-ahead token iLookAhead. +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ + var i int32 + + i = int32(yy_reduce_ofst[stateno]) + + i = i + int32(iLookAhead) + + return yy_action[i] +} + +// The following routine is called if the stack overflows. +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ + + var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse + for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { + yy_pop_parser_stack(tls, yypParser) + } + // Here code is inserted which will execute if the parser + // stack every overflows + //******* Begin %stack_overflow code ***************************************** + + Xsqlite3ErrorMsg(tls, pParse, ts+22759, 0) + //******* End %stack_overflow code ******************************************* + + (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse +} + +// Print tracing information for a SHIFT action + +// Perform a shift action. +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ + var yytos uintptr + (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 + if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { + (*YyParser)(unsafe.Pointer(yypParser)).Fyytos -= 24 + yyStackOverflow(tls, yypParser) + return + } + if int32(yyNewState) > YY_MAX_SHIFT { + yyNewState = uint16(int32(yyNewState) + (YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE)) + } + yytos = (*YyParser)(unsafe.Pointer(yypParser)).Fyytos + (*YyStackEntry)(unsafe.Pointer(yytos)).Fstateno = yyNewState + (*YyStackEntry)(unsafe.Pointer(yytos)).Fmajor = yyMajor + *(*Token)(unsafe.Pointer(yytos + 8)) = yyMinor + +} + +// For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side +// of that rule +var yyRuleInfoLhs = [402]uint16{ + uint16(189), // (0) explain ::= EXPLAIN + uint16(189), // (1) explain ::= EXPLAIN QUERY PLAN + uint16(188), // (2) cmdx ::= cmd + uint16(190), // (3) cmd ::= BEGIN transtype trans_opt + uint16(191), // (4) transtype ::= + uint16(191), // (5) transtype ::= DEFERRED + uint16(191), // (6) transtype ::= IMMEDIATE + uint16(191), // (7) transtype ::= EXCLUSIVE + uint16(190), // (8) cmd ::= COMMIT|END trans_opt + uint16(190), // (9) cmd ::= ROLLBACK trans_opt + uint16(190), // (10) cmd ::= SAVEPOINT nm + uint16(190), // (11) cmd ::= RELEASE savepoint_opt nm + uint16(190), // (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm + uint16(195), // (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm + uint16(197), // (14) createkw ::= CREATE + uint16(199), // (15) ifnotexists ::= + uint16(199), // (16) ifnotexists ::= IF NOT EXISTS + uint16(198), // (17) temp ::= TEMP + uint16(198), // (18) temp ::= + uint16(196), // (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set + uint16(196), // (20) create_table_args ::= AS select + uint16(203), // (21) table_option_set ::= + uint16(203), // (22) table_option_set ::= table_option_set COMMA table_option + uint16(205), // (23) table_option ::= WITHOUT nm + uint16(205), // (24) table_option ::= nm + uint16(206), // (25) columnname ::= nm typetoken + uint16(208), // (26) typetoken ::= + uint16(208), // (27) typetoken ::= typename LP signed RP + uint16(208), // (28) typetoken ::= typename LP signed COMMA signed RP + uint16(209), // (29) typename ::= typename ID|STRING + uint16(213), // (30) scanpt ::= + uint16(214), // (31) scantok ::= + uint16(215), // (32) ccons ::= CONSTRAINT nm + uint16(215), // (33) ccons ::= DEFAULT scantok term + uint16(215), // (34) ccons ::= DEFAULT LP expr RP + uint16(215), // (35) ccons ::= DEFAULT PLUS scantok term + uint16(215), // (36) ccons ::= DEFAULT MINUS scantok term + uint16(215), // (37) ccons ::= DEFAULT scantok ID|INDEXED + uint16(215), // (38) ccons ::= NOT NULL onconf + uint16(215), // (39) ccons ::= PRIMARY KEY sortorder onconf autoinc + uint16(215), // (40) ccons ::= UNIQUE onconf + uint16(215), // (41) ccons ::= CHECK LP expr RP + uint16(215), // (42) ccons ::= REFERENCES nm eidlist_opt refargs + uint16(215), // (43) ccons ::= defer_subclause + uint16(215), // (44) ccons ::= COLLATE ID|STRING + uint16(224), // (45) generated ::= LP expr RP + uint16(224), // (46) generated ::= LP expr RP ID + uint16(220), // (47) autoinc ::= + uint16(220), // (48) autoinc ::= AUTOINCR + uint16(222), // (49) refargs ::= + uint16(222), // (50) refargs ::= refargs refarg + uint16(225), // (51) refarg ::= MATCH nm + uint16(225), // (52) refarg ::= ON INSERT refact + uint16(225), // (53) refarg ::= ON DELETE refact + uint16(225), // (54) refarg ::= ON UPDATE refact + uint16(226), // (55) refact ::= SET NULL + uint16(226), // (56) refact ::= SET DEFAULT + uint16(226), // (57) refact ::= CASCADE + uint16(226), // (58) refact ::= RESTRICT + uint16(226), // (59) refact ::= NO ACTION + uint16(223), // (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt + uint16(223), // (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt + uint16(227), // (62) init_deferred_pred_opt ::= + uint16(227), // (63) init_deferred_pred_opt ::= INITIALLY DEFERRED + uint16(227), // (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE + uint16(202), // (65) conslist_opt ::= + uint16(229), // (66) tconscomma ::= COMMA + uint16(230), // (67) tcons ::= CONSTRAINT nm + uint16(230), // (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf + uint16(230), // (69) tcons ::= UNIQUE LP sortlist RP onconf + uint16(230), // (70) tcons ::= CHECK LP expr RP onconf + uint16(230), // (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt + uint16(233), // (72) defer_subclause_opt ::= + uint16(218), // (73) onconf ::= + uint16(218), // (74) onconf ::= ON CONFLICT resolvetype + uint16(234), // (75) orconf ::= + uint16(234), // (76) orconf ::= OR resolvetype + uint16(235), // (77) resolvetype ::= IGNORE + uint16(235), // (78) resolvetype ::= REPLACE + uint16(190), // (79) cmd ::= DROP TABLE ifexists fullname + uint16(237), // (80) ifexists ::= IF EXISTS + uint16(237), // (81) ifexists ::= + uint16(190), // (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select + uint16(190), // (83) cmd ::= DROP VIEW ifexists fullname + uint16(190), // (84) cmd ::= select + uint16(204), // (85) select ::= WITH wqlist selectnowith + uint16(204), // (86) select ::= WITH RECURSIVE wqlist selectnowith + uint16(204), // (87) select ::= selectnowith + uint16(239), // (88) selectnowith ::= selectnowith multiselect_op oneselect + uint16(242), // (89) multiselect_op ::= UNION + uint16(242), // (90) multiselect_op ::= UNION ALL + uint16(242), // (91) multiselect_op ::= EXCEPT|INTERSECT + uint16(240), // (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt + uint16(240), // (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt + uint16(252), // (94) values ::= VALUES LP nexprlist RP + uint16(252), // (95) values ::= values COMMA LP nexprlist RP + uint16(243), // (96) distinct ::= DISTINCT + uint16(243), // (97) distinct ::= ALL + uint16(243), // (98) distinct ::= + uint16(254), // (99) sclp ::= + uint16(244), // (100) selcollist ::= sclp scanpt expr scanpt as + uint16(244), // (101) selcollist ::= sclp scanpt STAR + uint16(244), // (102) selcollist ::= sclp scanpt nm DOT STAR + uint16(255), // (103) as ::= AS nm + uint16(255), // (104) as ::= + uint16(245), // (105) from ::= + uint16(245), // (106) from ::= FROM seltablist + uint16(257), // (107) stl_prefix ::= seltablist joinop + uint16(257), // (108) stl_prefix ::= + uint16(256), // (109) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt + uint16(256), // (110) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt + uint16(256), // (111) seltablist ::= stl_prefix LP select RP as on_opt using_opt + uint16(256), // (112) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt + uint16(200), // (113) dbnm ::= + uint16(200), // (114) dbnm ::= DOT nm + uint16(238), // (115) fullname ::= nm + uint16(238), // (116) fullname ::= nm DOT nm + uint16(263), // (117) xfullname ::= nm + uint16(263), // (118) xfullname ::= nm DOT nm + uint16(263), // (119) xfullname ::= nm DOT nm AS nm + uint16(263), // (120) xfullname ::= nm AS nm + uint16(258), // (121) joinop ::= COMMA|JOIN + uint16(258), // (122) joinop ::= JOIN_KW JOIN + uint16(258), // (123) joinop ::= JOIN_KW nm JOIN + uint16(258), // (124) joinop ::= JOIN_KW nm nm JOIN + uint16(260), // (125) on_opt ::= ON expr + uint16(260), // (126) on_opt ::= + uint16(259), // (127) indexed_opt ::= + uint16(259), // (128) indexed_opt ::= INDEXED BY nm + uint16(259), // (129) indexed_opt ::= NOT INDEXED + uint16(261), // (130) using_opt ::= USING LP idlist RP + uint16(261), // (131) using_opt ::= + uint16(249), // (132) orderby_opt ::= + uint16(249), // (133) orderby_opt ::= ORDER BY sortlist + uint16(231), // (134) sortlist ::= sortlist COMMA expr sortorder nulls + uint16(231), // (135) sortlist ::= expr sortorder nulls + uint16(219), // (136) sortorder ::= ASC + uint16(219), // (137) sortorder ::= DESC + uint16(219), // (138) sortorder ::= + uint16(265), // (139) nulls ::= NULLS FIRST + uint16(265), // (140) nulls ::= NULLS LAST + uint16(265), // (141) nulls ::= + uint16(247), // (142) groupby_opt ::= + uint16(247), // (143) groupby_opt ::= GROUP BY nexprlist + uint16(248), // (144) having_opt ::= + uint16(248), // (145) having_opt ::= HAVING expr + uint16(250), // (146) limit_opt ::= + uint16(250), // (147) limit_opt ::= LIMIT expr + uint16(250), // (148) limit_opt ::= LIMIT expr OFFSET expr + uint16(250), // (149) limit_opt ::= LIMIT expr COMMA expr + uint16(190), // (150) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret + uint16(246), // (151) where_opt ::= + uint16(246), // (152) where_opt ::= WHERE expr + uint16(267), // (153) where_opt_ret ::= + uint16(267), // (154) where_opt_ret ::= WHERE expr + uint16(267), // (155) where_opt_ret ::= RETURNING selcollist + uint16(267), // (156) where_opt_ret ::= WHERE expr RETURNING selcollist + uint16(190), // (157) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret + uint16(268), // (158) setlist ::= setlist COMMA nm EQ expr + uint16(268), // (159) setlist ::= setlist COMMA LP idlist RP EQ expr + uint16(268), // (160) setlist ::= nm EQ expr + uint16(268), // (161) setlist ::= LP idlist RP EQ expr + uint16(190), // (162) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert + uint16(190), // (163) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning + uint16(271), // (164) upsert ::= + uint16(271), // (165) upsert ::= RETURNING selcollist + uint16(271), // (166) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert + uint16(271), // (167) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert + uint16(271), // (168) upsert ::= ON CONFLICT DO NOTHING returning + uint16(271), // (169) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning + uint16(272), // (170) returning ::= RETURNING selcollist + uint16(269), // (171) insert_cmd ::= INSERT orconf + uint16(269), // (172) insert_cmd ::= REPLACE + uint16(270), // (173) idlist_opt ::= + uint16(270), // (174) idlist_opt ::= LP idlist RP + uint16(264), // (175) idlist ::= idlist COMMA nm + uint16(264), // (176) idlist ::= nm + uint16(217), // (177) expr ::= LP expr RP + uint16(217), // (178) expr ::= ID|INDEXED + uint16(217), // (179) expr ::= JOIN_KW + uint16(217), // (180) expr ::= nm DOT nm + uint16(217), // (181) expr ::= nm DOT nm DOT nm + uint16(216), // (182) term ::= NULL|FLOAT|BLOB + uint16(216), // (183) term ::= STRING + uint16(216), // (184) term ::= INTEGER + uint16(217), // (185) expr ::= VARIABLE + uint16(217), // (186) expr ::= expr COLLATE ID|STRING + uint16(217), // (187) expr ::= CAST LP expr AS typetoken RP + uint16(217), // (188) expr ::= ID|INDEXED LP distinct exprlist RP + uint16(217), // (189) expr ::= ID|INDEXED LP STAR RP + uint16(217), // (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over + uint16(217), // (191) expr ::= ID|INDEXED LP STAR RP filter_over + uint16(216), // (192) term ::= CTIME_KW + uint16(217), // (193) expr ::= LP nexprlist COMMA expr RP + uint16(217), // (194) expr ::= expr AND expr + uint16(217), // (195) expr ::= expr OR expr + uint16(217), // (196) expr ::= expr LT|GT|GE|LE expr + uint16(217), // (197) expr ::= expr EQ|NE expr + uint16(217), // (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr + uint16(217), // (199) expr ::= expr PLUS|MINUS expr + uint16(217), // (200) expr ::= expr STAR|SLASH|REM expr + uint16(217), // (201) expr ::= expr CONCAT expr + uint16(274), // (202) likeop ::= NOT LIKE_KW|MATCH + uint16(217), // (203) expr ::= expr likeop expr + uint16(217), // (204) expr ::= expr likeop expr ESCAPE expr + uint16(217), // (205) expr ::= expr ISNULL|NOTNULL + uint16(217), // (206) expr ::= expr NOT NULL + uint16(217), // (207) expr ::= expr IS expr + uint16(217), // (208) expr ::= expr IS NOT expr + uint16(217), // (209) expr ::= NOT expr + uint16(217), // (210) expr ::= BITNOT expr + uint16(217), // (211) expr ::= PLUS|MINUS expr + uint16(217), // (212) expr ::= expr PTR expr + uint16(275), // (213) between_op ::= BETWEEN + uint16(275), // (214) between_op ::= NOT BETWEEN + uint16(217), // (215) expr ::= expr between_op expr AND expr + uint16(276), // (216) in_op ::= IN + uint16(276), // (217) in_op ::= NOT IN + uint16(217), // (218) expr ::= expr in_op LP exprlist RP + uint16(217), // (219) expr ::= LP select RP + uint16(217), // (220) expr ::= expr in_op LP select RP + uint16(217), // (221) expr ::= expr in_op nm dbnm paren_exprlist + uint16(217), // (222) expr ::= EXISTS LP select RP + uint16(217), // (223) expr ::= CASE case_operand case_exprlist case_else END + uint16(279), // (224) case_exprlist ::= case_exprlist WHEN expr THEN expr + uint16(279), // (225) case_exprlist ::= WHEN expr THEN expr + uint16(280), // (226) case_else ::= ELSE expr + uint16(280), // (227) case_else ::= + uint16(278), // (228) case_operand ::= expr + uint16(278), // (229) case_operand ::= + uint16(262), // (230) exprlist ::= + uint16(253), // (231) nexprlist ::= nexprlist COMMA expr + uint16(253), // (232) nexprlist ::= expr + uint16(277), // (233) paren_exprlist ::= + uint16(277), // (234) paren_exprlist ::= LP exprlist RP + uint16(190), // (235) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt + uint16(281), // (236) uniqueflag ::= UNIQUE + uint16(281), // (237) uniqueflag ::= + uint16(221), // (238) eidlist_opt ::= + uint16(221), // (239) eidlist_opt ::= LP eidlist RP + uint16(232), // (240) eidlist ::= eidlist COMMA nm collate sortorder + uint16(232), // (241) eidlist ::= nm collate sortorder + uint16(282), // (242) collate ::= + uint16(282), // (243) collate ::= COLLATE ID|STRING + uint16(190), // (244) cmd ::= DROP INDEX ifexists fullname + uint16(190), // (245) cmd ::= VACUUM vinto + uint16(190), // (246) cmd ::= VACUUM nm vinto + uint16(283), // (247) vinto ::= INTO expr + uint16(283), // (248) vinto ::= + uint16(190), // (249) cmd ::= PRAGMA nm dbnm + uint16(190), // (250) cmd ::= PRAGMA nm dbnm EQ nmnum + uint16(190), // (251) cmd ::= PRAGMA nm dbnm LP nmnum RP + uint16(190), // (252) cmd ::= PRAGMA nm dbnm EQ minus_num + uint16(190), // (253) cmd ::= PRAGMA nm dbnm LP minus_num RP + uint16(211), // (254) plus_num ::= PLUS INTEGER|FLOAT + uint16(212), // (255) minus_num ::= MINUS INTEGER|FLOAT + uint16(190), // (256) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END + uint16(285), // (257) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause + uint16(287), // (258) trigger_time ::= BEFORE|AFTER + uint16(287), // (259) trigger_time ::= INSTEAD OF + uint16(287), // (260) trigger_time ::= + uint16(288), // (261) trigger_event ::= DELETE|INSERT + uint16(288), // (262) trigger_event ::= UPDATE + uint16(288), // (263) trigger_event ::= UPDATE OF idlist + uint16(290), // (264) when_clause ::= + uint16(290), // (265) when_clause ::= WHEN expr + uint16(286), // (266) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI + uint16(286), // (267) trigger_cmd_list ::= trigger_cmd SEMI + uint16(292), // (268) trnm ::= nm DOT nm + uint16(293), // (269) tridxby ::= INDEXED BY nm + uint16(293), // (270) tridxby ::= NOT INDEXED + uint16(291), // (271) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt + uint16(291), // (272) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt + uint16(291), // (273) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt + uint16(291), // (274) trigger_cmd ::= scanpt select scanpt + uint16(217), // (275) expr ::= RAISE LP IGNORE RP + uint16(217), // (276) expr ::= RAISE LP raisetype COMMA nm RP + uint16(236), // (277) raisetype ::= ROLLBACK + uint16(236), // (278) raisetype ::= ABORT + uint16(236), // (279) raisetype ::= FAIL + uint16(190), // (280) cmd ::= DROP TRIGGER ifexists fullname + uint16(190), // (281) cmd ::= ATTACH database_kw_opt expr AS expr key_opt + uint16(190), // (282) cmd ::= DETACH database_kw_opt expr + uint16(295), // (283) key_opt ::= + uint16(295), // (284) key_opt ::= KEY expr + uint16(190), // (285) cmd ::= REINDEX + uint16(190), // (286) cmd ::= REINDEX nm dbnm + uint16(190), // (287) cmd ::= ANALYZE + uint16(190), // (288) cmd ::= ANALYZE nm dbnm + uint16(190), // (289) cmd ::= ALTER TABLE fullname RENAME TO nm + uint16(190), // (290) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist + uint16(190), // (291) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm + uint16(296), // (292) add_column_fullname ::= fullname + uint16(190), // (293) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm + uint16(190), // (294) cmd ::= create_vtab + uint16(190), // (295) cmd ::= create_vtab LP vtabarglist RP + uint16(298), // (296) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm + uint16(300), // (297) vtabarg ::= + uint16(301), // (298) vtabargtoken ::= ANY + uint16(301), // (299) vtabargtoken ::= lp anylist RP + uint16(302), // (300) lp ::= LP + uint16(266), // (301) with ::= WITH wqlist + uint16(266), // (302) with ::= WITH RECURSIVE wqlist + uint16(305), // (303) wqas ::= AS + uint16(305), // (304) wqas ::= AS MATERIALIZED + uint16(305), // (305) wqas ::= AS NOT MATERIALIZED + uint16(304), // (306) wqitem ::= nm eidlist_opt wqas LP select RP + uint16(241), // (307) wqlist ::= wqitem + uint16(241), // (308) wqlist ::= wqlist COMMA wqitem + uint16(306), // (309) windowdefn_list ::= windowdefn + uint16(306), // (310) windowdefn_list ::= windowdefn_list COMMA windowdefn + uint16(307), // (311) windowdefn ::= nm AS LP window RP + uint16(308), // (312) window ::= PARTITION BY nexprlist orderby_opt frame_opt + uint16(308), // (313) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt + uint16(308), // (314) window ::= ORDER BY sortlist frame_opt + uint16(308), // (315) window ::= nm ORDER BY sortlist frame_opt + uint16(308), // (316) window ::= frame_opt + uint16(308), // (317) window ::= nm frame_opt + uint16(309), // (318) frame_opt ::= + uint16(309), // (319) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt + uint16(309), // (320) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt + uint16(313), // (321) range_or_rows ::= RANGE|ROWS|GROUPS + uint16(315), // (322) frame_bound_s ::= frame_bound + uint16(315), // (323) frame_bound_s ::= UNBOUNDED PRECEDING + uint16(316), // (324) frame_bound_e ::= frame_bound + uint16(316), // (325) frame_bound_e ::= UNBOUNDED FOLLOWING + uint16(314), // (326) frame_bound ::= expr PRECEDING|FOLLOWING + uint16(314), // (327) frame_bound ::= CURRENT ROW + uint16(317), // (328) frame_exclude_opt ::= + uint16(317), // (329) frame_exclude_opt ::= EXCLUDE frame_exclude + uint16(318), // (330) frame_exclude ::= NO OTHERS + uint16(318), // (331) frame_exclude ::= CURRENT ROW + uint16(318), // (332) frame_exclude ::= GROUP|TIES + uint16(251), // (333) window_clause ::= WINDOW windowdefn_list + uint16(273), // (334) filter_over ::= filter_clause over_clause + uint16(273), // (335) filter_over ::= over_clause + uint16(273), // (336) filter_over ::= filter_clause + uint16(312), // (337) over_clause ::= OVER LP window RP + uint16(312), // (338) over_clause ::= OVER nm + uint16(311), // (339) filter_clause ::= FILTER LP WHERE expr RP + uint16(185), // (340) input ::= cmdlist + uint16(186), // (341) cmdlist ::= cmdlist ecmd + uint16(186), // (342) cmdlist ::= ecmd + uint16(187), // (343) ecmd ::= SEMI + uint16(187), // (344) ecmd ::= cmdx SEMI + uint16(187), // (345) ecmd ::= explain cmdx SEMI + uint16(192), // (346) trans_opt ::= + uint16(192), // (347) trans_opt ::= TRANSACTION + uint16(192), // (348) trans_opt ::= TRANSACTION nm + uint16(194), // (349) savepoint_opt ::= SAVEPOINT + uint16(194), // (350) savepoint_opt ::= + uint16(190), // (351) cmd ::= create_table create_table_args + uint16(203), // (352) table_option_set ::= table_option + uint16(201), // (353) columnlist ::= columnlist COMMA columnname carglist + uint16(201), // (354) columnlist ::= columnname carglist + uint16(193), // (355) nm ::= ID|INDEXED + uint16(193), // (356) nm ::= STRING + uint16(193), // (357) nm ::= JOIN_KW + uint16(208), // (358) typetoken ::= typename + uint16(209), // (359) typename ::= ID|STRING + uint16(210), // (360) signed ::= plus_num + uint16(210), // (361) signed ::= minus_num + uint16(207), // (362) carglist ::= carglist ccons + uint16(207), // (363) carglist ::= + uint16(215), // (364) ccons ::= NULL onconf + uint16(215), // (365) ccons ::= GENERATED ALWAYS AS generated + uint16(215), // (366) ccons ::= AS generated + uint16(202), // (367) conslist_opt ::= COMMA conslist + uint16(228), // (368) conslist ::= conslist tconscomma tcons + uint16(228), // (369) conslist ::= tcons + uint16(229), // (370) tconscomma ::= + uint16(233), // (371) defer_subclause_opt ::= defer_subclause + uint16(235), // (372) resolvetype ::= raisetype + uint16(239), // (373) selectnowith ::= oneselect + uint16(240), // (374) oneselect ::= values + uint16(254), // (375) sclp ::= selcollist COMMA + uint16(255), // (376) as ::= ID|STRING + uint16(272), // (377) returning ::= + uint16(217), // (378) expr ::= term + uint16(274), // (379) likeop ::= LIKE_KW|MATCH + uint16(262), // (380) exprlist ::= nexprlist + uint16(284), // (381) nmnum ::= plus_num + uint16(284), // (382) nmnum ::= nm + uint16(284), // (383) nmnum ::= ON + uint16(284), // (384) nmnum ::= DELETE + uint16(284), // (385) nmnum ::= DEFAULT + uint16(211), // (386) plus_num ::= INTEGER|FLOAT + uint16(289), // (387) foreach_clause ::= + uint16(289), // (388) foreach_clause ::= FOR EACH ROW + uint16(292), // (389) trnm ::= nm + uint16(293), // (390) tridxby ::= + uint16(294), // (391) database_kw_opt ::= DATABASE + uint16(294), // (392) database_kw_opt ::= + uint16(297), // (393) kwcolumn_opt ::= + uint16(297), // (394) kwcolumn_opt ::= COLUMNKW + uint16(299), // (395) vtabarglist ::= vtabarg + uint16(299), // (396) vtabarglist ::= vtabarglist COMMA vtabarg + uint16(300), // (397) vtabarg ::= vtabarg vtabargtoken + uint16(303), // (398) anylist ::= + uint16(303), // (399) anylist ::= anylist LP anylist RP + uint16(303), // (400) anylist ::= anylist ANY + uint16(266), // (401) with ::= +} /* sqlite3.c:164015:25 */ + +// For rule J, yyRuleInfoNRhs[J] contains the negative of the number +// of symbols on the right-hand side of that rule. +var yyRuleInfoNRhs = [402]int8{ + int8(-1), // (0) explain ::= EXPLAIN + int8(-3), // (1) explain ::= EXPLAIN QUERY PLAN + int8(-1), // (2) cmdx ::= cmd + int8(-3), // (3) cmd ::= BEGIN transtype trans_opt + int8(0), // (4) transtype ::= + int8(-1), // (5) transtype ::= DEFERRED + int8(-1), // (6) transtype ::= IMMEDIATE + int8(-1), // (7) transtype ::= EXCLUSIVE + int8(-2), // (8) cmd ::= COMMIT|END trans_opt + int8(-2), // (9) cmd ::= ROLLBACK trans_opt + int8(-2), // (10) cmd ::= SAVEPOINT nm + int8(-3), // (11) cmd ::= RELEASE savepoint_opt nm + int8(-5), // (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm + int8(-6), // (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm + int8(-1), // (14) createkw ::= CREATE + int8(0), // (15) ifnotexists ::= + int8(-3), // (16) ifnotexists ::= IF NOT EXISTS + int8(-1), // (17) temp ::= TEMP + int8(0), // (18) temp ::= + int8(-5), // (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set + int8(-2), // (20) create_table_args ::= AS select + int8(0), // (21) table_option_set ::= + int8(-3), // (22) table_option_set ::= table_option_set COMMA table_option + int8(-2), // (23) table_option ::= WITHOUT nm + int8(-1), // (24) table_option ::= nm + int8(-2), // (25) columnname ::= nm typetoken + int8(0), // (26) typetoken ::= + int8(-4), // (27) typetoken ::= typename LP signed RP + int8(-6), // (28) typetoken ::= typename LP signed COMMA signed RP + int8(-2), // (29) typename ::= typename ID|STRING + int8(0), // (30) scanpt ::= + int8(0), // (31) scantok ::= + int8(-2), // (32) ccons ::= CONSTRAINT nm + int8(-3), // (33) ccons ::= DEFAULT scantok term + int8(-4), // (34) ccons ::= DEFAULT LP expr RP + int8(-4), // (35) ccons ::= DEFAULT PLUS scantok term + int8(-4), // (36) ccons ::= DEFAULT MINUS scantok term + int8(-3), // (37) ccons ::= DEFAULT scantok ID|INDEXED + int8(-3), // (38) ccons ::= NOT NULL onconf + int8(-5), // (39) ccons ::= PRIMARY KEY sortorder onconf autoinc + int8(-2), // (40) ccons ::= UNIQUE onconf + int8(-4), // (41) ccons ::= CHECK LP expr RP + int8(-4), // (42) ccons ::= REFERENCES nm eidlist_opt refargs + int8(-1), // (43) ccons ::= defer_subclause + int8(-2), // (44) ccons ::= COLLATE ID|STRING + int8(-3), // (45) generated ::= LP expr RP + int8(-4), // (46) generated ::= LP expr RP ID + int8(0), // (47) autoinc ::= + int8(-1), // (48) autoinc ::= AUTOINCR + int8(0), // (49) refargs ::= + int8(-2), // (50) refargs ::= refargs refarg + int8(-2), // (51) refarg ::= MATCH nm + int8(-3), // (52) refarg ::= ON INSERT refact + int8(-3), // (53) refarg ::= ON DELETE refact + int8(-3), // (54) refarg ::= ON UPDATE refact + int8(-2), // (55) refact ::= SET NULL + int8(-2), // (56) refact ::= SET DEFAULT + int8(-1), // (57) refact ::= CASCADE + int8(-1), // (58) refact ::= RESTRICT + int8(-2), // (59) refact ::= NO ACTION + int8(-3), // (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt + int8(-2), // (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt + int8(0), // (62) init_deferred_pred_opt ::= + int8(-2), // (63) init_deferred_pred_opt ::= INITIALLY DEFERRED + int8(-2), // (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE + int8(0), // (65) conslist_opt ::= + int8(-1), // (66) tconscomma ::= COMMA + int8(-2), // (67) tcons ::= CONSTRAINT nm + int8(-7), // (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf + int8(-5), // (69) tcons ::= UNIQUE LP sortlist RP onconf + int8(-5), // (70) tcons ::= CHECK LP expr RP onconf + int8(-10), // (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt + int8(0), // (72) defer_subclause_opt ::= + int8(0), // (73) onconf ::= + int8(-3), // (74) onconf ::= ON CONFLICT resolvetype + int8(0), // (75) orconf ::= + int8(-2), // (76) orconf ::= OR resolvetype + int8(-1), // (77) resolvetype ::= IGNORE + int8(-1), // (78) resolvetype ::= REPLACE + int8(-4), // (79) cmd ::= DROP TABLE ifexists fullname + int8(-2), // (80) ifexists ::= IF EXISTS + int8(0), // (81) ifexists ::= + int8(-9), // (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select + int8(-4), // (83) cmd ::= DROP VIEW ifexists fullname + int8(-1), // (84) cmd ::= select + int8(-3), // (85) select ::= WITH wqlist selectnowith + int8(-4), // (86) select ::= WITH RECURSIVE wqlist selectnowith + int8(-1), // (87) select ::= selectnowith + int8(-3), // (88) selectnowith ::= selectnowith multiselect_op oneselect + int8(-1), // (89) multiselect_op ::= UNION + int8(-2), // (90) multiselect_op ::= UNION ALL + int8(-1), // (91) multiselect_op ::= EXCEPT|INTERSECT + int8(-9), // (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt + int8(-10), // (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt + int8(-4), // (94) values ::= VALUES LP nexprlist RP + int8(-5), // (95) values ::= values COMMA LP nexprlist RP + int8(-1), // (96) distinct ::= DISTINCT + int8(-1), // (97) distinct ::= ALL + int8(0), // (98) distinct ::= + int8(0), // (99) sclp ::= + int8(-5), // (100) selcollist ::= sclp scanpt expr scanpt as + int8(-3), // (101) selcollist ::= sclp scanpt STAR + int8(-5), // (102) selcollist ::= sclp scanpt nm DOT STAR + int8(-2), // (103) as ::= AS nm + int8(0), // (104) as ::= + int8(0), // (105) from ::= + int8(-2), // (106) from ::= FROM seltablist + int8(-2), // (107) stl_prefix ::= seltablist joinop + int8(0), // (108) stl_prefix ::= + int8(-7), // (109) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt + int8(-9), // (110) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt + int8(-7), // (111) seltablist ::= stl_prefix LP select RP as on_opt using_opt + int8(-7), // (112) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt + int8(0), // (113) dbnm ::= + int8(-2), // (114) dbnm ::= DOT nm + int8(-1), // (115) fullname ::= nm + int8(-3), // (116) fullname ::= nm DOT nm + int8(-1), // (117) xfullname ::= nm + int8(-3), // (118) xfullname ::= nm DOT nm + int8(-5), // (119) xfullname ::= nm DOT nm AS nm + int8(-3), // (120) xfullname ::= nm AS nm + int8(-1), // (121) joinop ::= COMMA|JOIN + int8(-2), // (122) joinop ::= JOIN_KW JOIN + int8(-3), // (123) joinop ::= JOIN_KW nm JOIN + int8(-4), // (124) joinop ::= JOIN_KW nm nm JOIN + int8(-2), // (125) on_opt ::= ON expr + int8(0), // (126) on_opt ::= + int8(0), // (127) indexed_opt ::= + int8(-3), // (128) indexed_opt ::= INDEXED BY nm + int8(-2), // (129) indexed_opt ::= NOT INDEXED + int8(-4), // (130) using_opt ::= USING LP idlist RP + int8(0), // (131) using_opt ::= + int8(0), // (132) orderby_opt ::= + int8(-3), // (133) orderby_opt ::= ORDER BY sortlist + int8(-5), // (134) sortlist ::= sortlist COMMA expr sortorder nulls + int8(-3), // (135) sortlist ::= expr sortorder nulls + int8(-1), // (136) sortorder ::= ASC + int8(-1), // (137) sortorder ::= DESC + int8(0), // (138) sortorder ::= + int8(-2), // (139) nulls ::= NULLS FIRST + int8(-2), // (140) nulls ::= NULLS LAST + int8(0), // (141) nulls ::= + int8(0), // (142) groupby_opt ::= + int8(-3), // (143) groupby_opt ::= GROUP BY nexprlist + int8(0), // (144) having_opt ::= + int8(-2), // (145) having_opt ::= HAVING expr + int8(0), // (146) limit_opt ::= + int8(-2), // (147) limit_opt ::= LIMIT expr + int8(-4), // (148) limit_opt ::= LIMIT expr OFFSET expr + int8(-4), // (149) limit_opt ::= LIMIT expr COMMA expr + int8(-6), // (150) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret + int8(0), // (151) where_opt ::= + int8(-2), // (152) where_opt ::= WHERE expr + int8(0), // (153) where_opt_ret ::= + int8(-2), // (154) where_opt_ret ::= WHERE expr + int8(-2), // (155) where_opt_ret ::= RETURNING selcollist + int8(-4), // (156) where_opt_ret ::= WHERE expr RETURNING selcollist + int8(-9), // (157) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret + int8(-5), // (158) setlist ::= setlist COMMA nm EQ expr + int8(-7), // (159) setlist ::= setlist COMMA LP idlist RP EQ expr + int8(-3), // (160) setlist ::= nm EQ expr + int8(-5), // (161) setlist ::= LP idlist RP EQ expr + int8(-7), // (162) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert + int8(-8), // (163) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning + int8(0), // (164) upsert ::= + int8(-2), // (165) upsert ::= RETURNING selcollist + int8(-12), // (166) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert + int8(-9), // (167) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert + int8(-5), // (168) upsert ::= ON CONFLICT DO NOTHING returning + int8(-8), // (169) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning + int8(-2), // (170) returning ::= RETURNING selcollist + int8(-2), // (171) insert_cmd ::= INSERT orconf + int8(-1), // (172) insert_cmd ::= REPLACE + int8(0), // (173) idlist_opt ::= + int8(-3), // (174) idlist_opt ::= LP idlist RP + int8(-3), // (175) idlist ::= idlist COMMA nm + int8(-1), // (176) idlist ::= nm + int8(-3), // (177) expr ::= LP expr RP + int8(-1), // (178) expr ::= ID|INDEXED + int8(-1), // (179) expr ::= JOIN_KW + int8(-3), // (180) expr ::= nm DOT nm + int8(-5), // (181) expr ::= nm DOT nm DOT nm + int8(-1), // (182) term ::= NULL|FLOAT|BLOB + int8(-1), // (183) term ::= STRING + int8(-1), // (184) term ::= INTEGER + int8(-1), // (185) expr ::= VARIABLE + int8(-3), // (186) expr ::= expr COLLATE ID|STRING + int8(-6), // (187) expr ::= CAST LP expr AS typetoken RP + int8(-5), // (188) expr ::= ID|INDEXED LP distinct exprlist RP + int8(-4), // (189) expr ::= ID|INDEXED LP STAR RP + int8(-6), // (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over + int8(-5), // (191) expr ::= ID|INDEXED LP STAR RP filter_over + int8(-1), // (192) term ::= CTIME_KW + int8(-5), // (193) expr ::= LP nexprlist COMMA expr RP + int8(-3), // (194) expr ::= expr AND expr + int8(-3), // (195) expr ::= expr OR expr + int8(-3), // (196) expr ::= expr LT|GT|GE|LE expr + int8(-3), // (197) expr ::= expr EQ|NE expr + int8(-3), // (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr + int8(-3), // (199) expr ::= expr PLUS|MINUS expr + int8(-3), // (200) expr ::= expr STAR|SLASH|REM expr + int8(-3), // (201) expr ::= expr CONCAT expr + int8(-2), // (202) likeop ::= NOT LIKE_KW|MATCH + int8(-3), // (203) expr ::= expr likeop expr + int8(-5), // (204) expr ::= expr likeop expr ESCAPE expr + int8(-2), // (205) expr ::= expr ISNULL|NOTNULL + int8(-3), // (206) expr ::= expr NOT NULL + int8(-3), // (207) expr ::= expr IS expr + int8(-4), // (208) expr ::= expr IS NOT expr + int8(-2), // (209) expr ::= NOT expr + int8(-2), // (210) expr ::= BITNOT expr + int8(-2), // (211) expr ::= PLUS|MINUS expr + int8(-3), // (212) expr ::= expr PTR expr + int8(-1), // (213) between_op ::= BETWEEN + int8(-2), // (214) between_op ::= NOT BETWEEN + int8(-5), // (215) expr ::= expr between_op expr AND expr + int8(-1), // (216) in_op ::= IN + int8(-2), // (217) in_op ::= NOT IN + int8(-5), // (218) expr ::= expr in_op LP exprlist RP + int8(-3), // (219) expr ::= LP select RP + int8(-5), // (220) expr ::= expr in_op LP select RP + int8(-5), // (221) expr ::= expr in_op nm dbnm paren_exprlist + int8(-4), // (222) expr ::= EXISTS LP select RP + int8(-5), // (223) expr ::= CASE case_operand case_exprlist case_else END + int8(-5), // (224) case_exprlist ::= case_exprlist WHEN expr THEN expr + int8(-4), // (225) case_exprlist ::= WHEN expr THEN expr + int8(-2), // (226) case_else ::= ELSE expr + int8(0), // (227) case_else ::= + int8(-1), // (228) case_operand ::= expr + int8(0), // (229) case_operand ::= + int8(0), // (230) exprlist ::= + int8(-3), // (231) nexprlist ::= nexprlist COMMA expr + int8(-1), // (232) nexprlist ::= expr + int8(0), // (233) paren_exprlist ::= + int8(-3), // (234) paren_exprlist ::= LP exprlist RP + int8(-12), // (235) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt + int8(-1), // (236) uniqueflag ::= UNIQUE + int8(0), // (237) uniqueflag ::= + int8(0), // (238) eidlist_opt ::= + int8(-3), // (239) eidlist_opt ::= LP eidlist RP + int8(-5), // (240) eidlist ::= eidlist COMMA nm collate sortorder + int8(-3), // (241) eidlist ::= nm collate sortorder + int8(0), // (242) collate ::= + int8(-2), // (243) collate ::= COLLATE ID|STRING + int8(-4), // (244) cmd ::= DROP INDEX ifexists fullname + int8(-2), // (245) cmd ::= VACUUM vinto + int8(-3), // (246) cmd ::= VACUUM nm vinto + int8(-2), // (247) vinto ::= INTO expr + int8(0), // (248) vinto ::= + int8(-3), // (249) cmd ::= PRAGMA nm dbnm + int8(-5), // (250) cmd ::= PRAGMA nm dbnm EQ nmnum + int8(-6), // (251) cmd ::= PRAGMA nm dbnm LP nmnum RP + int8(-5), // (252) cmd ::= PRAGMA nm dbnm EQ minus_num + int8(-6), // (253) cmd ::= PRAGMA nm dbnm LP minus_num RP + int8(-2), // (254) plus_num ::= PLUS INTEGER|FLOAT + int8(-2), // (255) minus_num ::= MINUS INTEGER|FLOAT + int8(-5), // (256) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END + int8(-11), // (257) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause + int8(-1), // (258) trigger_time ::= BEFORE|AFTER + int8(-2), // (259) trigger_time ::= INSTEAD OF + int8(0), // (260) trigger_time ::= + int8(-1), // (261) trigger_event ::= DELETE|INSERT + int8(-1), // (262) trigger_event ::= UPDATE + int8(-3), // (263) trigger_event ::= UPDATE OF idlist + int8(0), // (264) when_clause ::= + int8(-2), // (265) when_clause ::= WHEN expr + int8(-3), // (266) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI + int8(-2), // (267) trigger_cmd_list ::= trigger_cmd SEMI + int8(-3), // (268) trnm ::= nm DOT nm + int8(-3), // (269) tridxby ::= INDEXED BY nm + int8(-2), // (270) tridxby ::= NOT INDEXED + int8(-9), // (271) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt + int8(-8), // (272) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt + int8(-6), // (273) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt + int8(-3), // (274) trigger_cmd ::= scanpt select scanpt + int8(-4), // (275) expr ::= RAISE LP IGNORE RP + int8(-6), // (276) expr ::= RAISE LP raisetype COMMA nm RP + int8(-1), // (277) raisetype ::= ROLLBACK + int8(-1), // (278) raisetype ::= ABORT + int8(-1), // (279) raisetype ::= FAIL + int8(-4), // (280) cmd ::= DROP TRIGGER ifexists fullname + int8(-6), // (281) cmd ::= ATTACH database_kw_opt expr AS expr key_opt + int8(-3), // (282) cmd ::= DETACH database_kw_opt expr + int8(0), // (283) key_opt ::= + int8(-2), // (284) key_opt ::= KEY expr + int8(-1), // (285) cmd ::= REINDEX + int8(-3), // (286) cmd ::= REINDEX nm dbnm + int8(-1), // (287) cmd ::= ANALYZE + int8(-3), // (288) cmd ::= ANALYZE nm dbnm + int8(-6), // (289) cmd ::= ALTER TABLE fullname RENAME TO nm + int8(-7), // (290) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist + int8(-6), // (291) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm + int8(-1), // (292) add_column_fullname ::= fullname + int8(-8), // (293) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm + int8(-1), // (294) cmd ::= create_vtab + int8(-4), // (295) cmd ::= create_vtab LP vtabarglist RP + int8(-8), // (296) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm + int8(0), // (297) vtabarg ::= + int8(-1), // (298) vtabargtoken ::= ANY + int8(-3), // (299) vtabargtoken ::= lp anylist RP + int8(-1), // (300) lp ::= LP + int8(-2), // (301) with ::= WITH wqlist + int8(-3), // (302) with ::= WITH RECURSIVE wqlist + int8(-1), // (303) wqas ::= AS + int8(-2), // (304) wqas ::= AS MATERIALIZED + int8(-3), // (305) wqas ::= AS NOT MATERIALIZED + int8(-6), // (306) wqitem ::= nm eidlist_opt wqas LP select RP + int8(-1), // (307) wqlist ::= wqitem + int8(-3), // (308) wqlist ::= wqlist COMMA wqitem + int8(-1), // (309) windowdefn_list ::= windowdefn + int8(-3), // (310) windowdefn_list ::= windowdefn_list COMMA windowdefn + int8(-5), // (311) windowdefn ::= nm AS LP window RP + int8(-5), // (312) window ::= PARTITION BY nexprlist orderby_opt frame_opt + int8(-6), // (313) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt + int8(-4), // (314) window ::= ORDER BY sortlist frame_opt + int8(-5), // (315) window ::= nm ORDER BY sortlist frame_opt + int8(-1), // (316) window ::= frame_opt + int8(-2), // (317) window ::= nm frame_opt + int8(0), // (318) frame_opt ::= + int8(-3), // (319) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt + int8(-6), // (320) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt + int8(-1), // (321) range_or_rows ::= RANGE|ROWS|GROUPS + int8(-1), // (322) frame_bound_s ::= frame_bound + int8(-2), // (323) frame_bound_s ::= UNBOUNDED PRECEDING + int8(-1), // (324) frame_bound_e ::= frame_bound + int8(-2), // (325) frame_bound_e ::= UNBOUNDED FOLLOWING + int8(-2), // (326) frame_bound ::= expr PRECEDING|FOLLOWING + int8(-2), // (327) frame_bound ::= CURRENT ROW + int8(0), // (328) frame_exclude_opt ::= + int8(-2), // (329) frame_exclude_opt ::= EXCLUDE frame_exclude + int8(-2), // (330) frame_exclude ::= NO OTHERS + int8(-2), // (331) frame_exclude ::= CURRENT ROW + int8(-1), // (332) frame_exclude ::= GROUP|TIES + int8(-2), // (333) window_clause ::= WINDOW windowdefn_list + int8(-2), // (334) filter_over ::= filter_clause over_clause + int8(-1), // (335) filter_over ::= over_clause + int8(-1), // (336) filter_over ::= filter_clause + int8(-4), // (337) over_clause ::= OVER LP window RP + int8(-2), // (338) over_clause ::= OVER nm + int8(-5), // (339) filter_clause ::= FILTER LP WHERE expr RP + int8(-1), // (340) input ::= cmdlist + int8(-2), // (341) cmdlist ::= cmdlist ecmd + int8(-1), // (342) cmdlist ::= ecmd + int8(-1), // (343) ecmd ::= SEMI + int8(-2), // (344) ecmd ::= cmdx SEMI + int8(-3), // (345) ecmd ::= explain cmdx SEMI + int8(0), // (346) trans_opt ::= + int8(-1), // (347) trans_opt ::= TRANSACTION + int8(-2), // (348) trans_opt ::= TRANSACTION nm + int8(-1), // (349) savepoint_opt ::= SAVEPOINT + int8(0), // (350) savepoint_opt ::= + int8(-2), // (351) cmd ::= create_table create_table_args + int8(-1), // (352) table_option_set ::= table_option + int8(-4), // (353) columnlist ::= columnlist COMMA columnname carglist + int8(-2), // (354) columnlist ::= columnname carglist + int8(-1), // (355) nm ::= ID|INDEXED + int8(-1), // (356) nm ::= STRING + int8(-1), // (357) nm ::= JOIN_KW + int8(-1), // (358) typetoken ::= typename + int8(-1), // (359) typename ::= ID|STRING + int8(-1), // (360) signed ::= plus_num + int8(-1), // (361) signed ::= minus_num + int8(-2), // (362) carglist ::= carglist ccons + int8(0), // (363) carglist ::= + int8(-2), // (364) ccons ::= NULL onconf + int8(-4), // (365) ccons ::= GENERATED ALWAYS AS generated + int8(-2), // (366) ccons ::= AS generated + int8(-2), // (367) conslist_opt ::= COMMA conslist + int8(-3), // (368) conslist ::= conslist tconscomma tcons + int8(-1), // (369) conslist ::= tcons + int8(0), // (370) tconscomma ::= + int8(-1), // (371) defer_subclause_opt ::= defer_subclause + int8(-1), // (372) resolvetype ::= raisetype + int8(-1), // (373) selectnowith ::= oneselect + int8(-1), // (374) oneselect ::= values + int8(-2), // (375) sclp ::= selcollist COMMA + int8(-1), // (376) as ::= ID|STRING + int8(0), // (377) returning ::= + int8(-1), // (378) expr ::= term + int8(-1), // (379) likeop ::= LIKE_KW|MATCH + int8(-1), // (380) exprlist ::= nexprlist + int8(-1), // (381) nmnum ::= plus_num + int8(-1), // (382) nmnum ::= nm + int8(-1), // (383) nmnum ::= ON + int8(-1), // (384) nmnum ::= DELETE + int8(-1), // (385) nmnum ::= DEFAULT + int8(-1), // (386) plus_num ::= INTEGER|FLOAT + int8(0), // (387) foreach_clause ::= + int8(-3), // (388) foreach_clause ::= FOR EACH ROW + int8(-1), // (389) trnm ::= nm + int8(0), // (390) tridxby ::= + int8(-1), // (391) database_kw_opt ::= DATABASE + int8(0), // (392) database_kw_opt ::= + int8(0), // (393) kwcolumn_opt ::= + int8(-1), // (394) kwcolumn_opt ::= COLUMNKW + int8(-1), // (395) vtabarglist ::= vtabarg + int8(-3), // (396) vtabarglist ::= vtabarglist COMMA vtabarg + int8(-2), // (397) vtabarg ::= vtabarg vtabargtoken + int8(0), // (398) anylist ::= + int8(-4), // (399) anylist ::= anylist LP anylist RP + int8(-2), // (400) anylist ::= anylist ANY + int8(0), // (401) with ::= +} /* sqlite3.c:164422:26 */ + +// Forward Declaration + +// Perform a reduce action and the shift that must immediately +// follow the reduce. +// +// The yyLookahead and yyLookaheadToken parameters provide reduce actions +// access to the lookahead token (if any). The yyLookahead will be YYNOCODE +// if the lookahead token has already been consumed. As this procedure is +// only called from one place, optimizing compilers will in-line it, which +// means that the extra parameters have no performance impact. +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + var yygoto int32 // The next state + var yyact uint16 // The next action + var yymsp uintptr // The top of the parser's stack + var yysize int32 // Amount to pop the stack + + _ = yyLookahead + _ = yyLookaheadToken + yymsp = (*YyParser)(unsafe.Pointer(yypParser)).Fyytos + + switch yyruleno { + // Beginning here are the reduction cases. A typical example + // follows: + // case 0: + // #line + // { ... } // User supplied code + // #line + // break; + //********* Begin reduce actions ********************************************* + // var yylhsminor YYMINORTYPE at bp+40, 16 + + case uint32(0): /* explain ::= EXPLAIN */ + { + (*Parse)(unsafe.Pointer(pParse)).Fexplain = U8(1) + } + break + case uint32(1): /* explain ::= EXPLAIN QUERY PLAN */ + { + (*Parse)(unsafe.Pointer(pParse)).Fexplain = U8(2) + } + break + case uint32(2): /* cmdx ::= cmd */ + { + Xsqlite3FinishCoding(tls, pParse) + } + break + case uint32(3): /* cmd ::= BEGIN transtype trans_opt */ + { + Xsqlite3BeginTransaction(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(4): /* transtype ::= */ + { + *(*int32)(unsafe.Pointer(yymsp + 1*24 + 8)) = TK_DEFERRED + } + break + case uint32(5): + fallthrough // transtype ::= DEFERRED + case uint32(6): /* transtype ::= IMMEDIATE */ + fallthrough + case uint32(7): /* transtype ::= EXCLUSIVE */ + fallthrough + case uint32(321): /* range_or_rows ::= RANGE|ROWS|GROUPS */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) /*A-overwrites-X*/ + } + break + case uint32(8): + fallthrough // cmd ::= COMMIT|END trans_opt + case uint32(9): /* cmd ::= ROLLBACK trans_opt */ + { + Xsqlite3EndTransaction(tls, pParse, int32((*YyStackEntry)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24)).Fmajor)) + } + break + case uint32(10): /* cmd ::= SAVEPOINT nm */ + { + Xsqlite3Savepoint(tls, pParse, SAVEPOINT_BEGIN, yymsp+8) + } + break + case uint32(11): /* cmd ::= RELEASE savepoint_opt nm */ + { + Xsqlite3Savepoint(tls, pParse, SAVEPOINT_RELEASE, yymsp+8) + } + break + case uint32(12): /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ + { + Xsqlite3Savepoint(tls, pParse, SAVEPOINT_ROLLBACK, yymsp+8) + } + break + case uint32(13): /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */ + { + Xsqlite3StartTable(tls, pParse, yymsp+libc.UintptrFromInt32(-1)*24+8, yymsp+8, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), 0, 0, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + } + break + case uint32(14): /* createkw ::= CREATE */ + { + disableLookaside(tls, pParse) + } + break + case uint32(15): + fallthrough // ifnotexists ::= + case uint32(18): /* temp ::= */ + fallthrough + case uint32(47): /* autoinc ::= */ + fallthrough + case uint32(62): /* init_deferred_pred_opt ::= */ + fallthrough + case uint32(72): /* defer_subclause_opt ::= */ + fallthrough + case uint32(81): /* ifexists ::= */ + fallthrough + case uint32(98): /* distinct ::= */ + fallthrough + case uint32(242): /* collate ::= */ + { + *(*int32)(unsafe.Pointer(yymsp + 1*24 + 8)) = 0 + } + break + case uint32(16): /* ifnotexists ::= IF NOT EXISTS */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = 1 + } + break + case uint32(17): /* temp ::= TEMP */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = libc.Bool32(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0) + } + break + case uint32(19): /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */ + { + Xsqlite3EndTable(tls, pParse, yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+libc.UintptrFromInt32(-1)*24+8, *(*U32)(unsafe.Pointer(yymsp + 8)), uintptr(0)) + } + break + case uint32(20): /* create_table_args ::= AS select */ + { + Xsqlite3EndTable(tls, pParse, uintptr(0), uintptr(0), uint32(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(21): /* table_option_set ::= */ + { + *(*U32)(unsafe.Pointer(yymsp + 1*24 + 8)) = U32(0) + } + break + case uint32(22): /* table_option_set ::= table_option_set COMMA table_option */ + { + *(*U32)(unsafe.Pointer(bp + 40)) = *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) | *(*U32)(unsafe.Pointer(yymsp + 8)) + } + *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) + break + case uint32(23): /* table_option ::= WITHOUT nm */ + { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16165, 5) == 0 { + *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) + } else { + *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) + Xsqlite3ErrorMsg(tls, pParse, ts+22781, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + } + } + break + case uint32(24): /* table_option ::= nm */ + { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16078, 6) == 0 { + *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) + } else { + *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) + Xsqlite3ErrorMsg(tls, pParse, ts+22781, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + } + } + *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) + break + case uint32(25): /* columnname ::= nm typetoken */ + { + Xsqlite3AddColumn(tls, pParse, *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*Token)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(26): + fallthrough // typetoken ::= + case uint32(65): /* conslist_opt ::= */ + fallthrough + case uint32(104): /* as ::= */ + { + (*Token)(unsafe.Pointer(yymsp + 1*24 + 8)).Fn = uint32(0) + (*Token)(unsafe.Pointer(yymsp + 1*24 + 8)).Fz = uintptr(0) + } + break + case uint32(27): /* typetoken ::= typename LP signed RP */ + { + (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)).Fn = uint32(int32((int64((*Token)(unsafe.Pointer(yymsp+8)).Fz+uintptr((*Token)(unsafe.Pointer(yymsp+8)).Fn)) - int64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8)).Fz)) / 1)) + } + break + case uint32(28): /* typetoken ::= typename LP signed COMMA signed RP */ + { + (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)).Fn = uint32(int32((int64((*Token)(unsafe.Pointer(yymsp+8)).Fz+uintptr((*Token)(unsafe.Pointer(yymsp+8)).Fn)) - int64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-5)*24+8)).Fz)) / 1)) + } + break + case uint32(29): /* typename ::= typename ID|STRING */ + { + (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)).Fn = (*Token)(unsafe.Pointer(yymsp+8)).Fn + uint32(int32((int64((*Token)(unsafe.Pointer(yymsp+8)).Fz)-int64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fz))/1)) + } + break + case uint32(30): /* scanpt ::= */ + { + + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = yyLookaheadToken.Fz + } + break + case uint32(31): /* scantok ::= */ + { + + *(*Token)(unsafe.Pointer(yymsp + 1*24 + 8)) = yyLookaheadToken + } + break + case uint32(32): + fallthrough // ccons ::= CONSTRAINT nm + case uint32(67): /* tcons ::= CONSTRAINT nm */ + { + (*Parse)(unsafe.Pointer(pParse)).FconstraintName = *(*Token)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(33): /* ccons ::= DEFAULT scantok term */ + { + Xsqlite3AddDefaultValue(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fz, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fz+uintptr((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fn)) + } + break + case uint32(34): /* ccons ::= DEFAULT LP expr RP */ + { + Xsqlite3AddDefaultValue(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-2)*24+8)).Fz+uintptr(1), (*Token)(unsafe.Pointer(yymsp+8)).Fz) + } + break + case uint32(35): /* ccons ::= DEFAULT PLUS scantok term */ + { + Xsqlite3AddDefaultValue(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-2)*24+8)).Fz, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fz+uintptr((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fn)) + } + break + case uint32(36): /* ccons ::= DEFAULT MINUS scantok term */ + { + var p uintptr = Xsqlite3PExpr(tls, pParse, TK_UMINUS, *(*uintptr)(unsafe.Pointer(yymsp + 8)), uintptr(0)) + Xsqlite3AddDefaultValue(tls, pParse, p, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-2)*24+8)).Fz, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fz+uintptr((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fn)) + } + break + case uint32(37): /* ccons ::= DEFAULT scantok ID|INDEXED */ + { + var p uintptr = tokenExpr(tls, pParse, TK_STRING, *(*Token)(unsafe.Pointer(yymsp + 8))) + if p != 0 { + Xsqlite3ExprIdToTrueFalse(tls, p) + + } + Xsqlite3AddDefaultValue(tls, pParse, p, (*Token)(unsafe.Pointer(yymsp+8)).Fz, (*Token)(unsafe.Pointer(yymsp+8)).Fz+uintptr((*Token)(unsafe.Pointer(yymsp+8)).Fn)) + } + break + case uint32(38): /* ccons ::= NOT NULL onconf */ + { + Xsqlite3AddNotNull(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(39): /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ + { + Xsqlite3AddPrimaryKey(tls, pParse, uintptr(0), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + } + break + case uint32(40): /* ccons ::= UNIQUE onconf */ + { + Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), uintptr(0), *(*int32)(unsafe.Pointer(yymsp + 8)), uintptr(0), uintptr(0), 0, 0, + uint8(SQLITE_IDXTYPE_UNIQUE)) + } + break + case uint32(41): /* ccons ::= CHECK LP expr RP */ + { + Xsqlite3AddCheckConstraint(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-2)*24+8)).Fz, (*Token)(unsafe.Pointer(yymsp+8)).Fz) + } + break + case uint32(42): /* ccons ::= REFERENCES nm eidlist_opt refargs */ + { + Xsqlite3CreateForeignKey(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(43): /* ccons ::= defer_subclause */ + { + Xsqlite3DeferForeignKey(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(44): /* ccons ::= COLLATE ID|STRING */ + { + Xsqlite3AddCollateType(tls, pParse, yymsp+8) + } + break + case uint32(45): /* generated ::= LP expr RP */ + { + Xsqlite3AddGenerated(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uintptr(0)) + } + break + case uint32(46): /* generated ::= LP expr RP ID */ + { + Xsqlite3AddGenerated(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), yymsp+8) + } + break + case uint32(48): /* autoinc ::= AUTOINCR */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = 1 + } + break + case uint32(49): /* refargs ::= */ + { + *(*int32)(unsafe.Pointer(yymsp + 1*24 + 8)) = OE_None * 0x0101 /* EV: R-19803-45884 */ + } + break + case uint32(50): /* refargs ::= refargs refarg */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) & ^*(*int32)(unsafe.Pointer(yymsp + 8 + 4)) | *(*int32)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(51): /* refarg ::= MATCH nm */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = 0 + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 + 4 /* &.mask */)) = 0x000000 + } + break + case uint32(52): /* refarg ::= ON INSERT refact */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = 0 + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 + 4 /* &.mask */)) = 0x000000 + } + break + case uint32(53): /* refarg ::= ON DELETE refact */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*int32)(unsafe.Pointer(yymsp + 8)) + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 + 4 /* &.mask */)) = 0x0000ff + } + break + case uint32(54): /* refarg ::= ON UPDATE refact */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*int32)(unsafe.Pointer(yymsp + 8)) << 8 + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 + 4 /* &.mask */)) = 0x00ff00 + } + break + case uint32(55): /* refact ::= SET NULL */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = OE_SetNull /* EV: R-33326-45252 */ + } + break + case uint32(56): /* refact ::= SET DEFAULT */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = OE_SetDflt /* EV: R-33326-45252 */ + } + break + case uint32(57): /* refact ::= CASCADE */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = OE_Cascade /* EV: R-33326-45252 */ + } + break + case uint32(58): /* refact ::= RESTRICT */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = OE_Restrict /* EV: R-33326-45252 */ + } + break + case uint32(59): /* refact ::= NO ACTION */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = OE_None /* EV: R-33326-45252 */ + } + break + case uint32(60): /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = 0 + } + break + case uint32(61): + fallthrough // defer_subclause ::= DEFERRABLE init_deferred_pred_opt + case uint32(76): /* orconf ::= OR resolvetype */ + fallthrough + case uint32(171): /* insert_cmd ::= INSERT orconf */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*int32)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(63): + fallthrough // init_deferred_pred_opt ::= INITIALLY DEFERRED + case uint32(80): /* ifexists ::= IF EXISTS */ + fallthrough + case uint32(214): /* between_op ::= NOT BETWEEN */ + fallthrough + case uint32(217): /* in_op ::= NOT IN */ + fallthrough + case uint32(243): /* collate ::= COLLATE ID|STRING */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = 1 + } + break + case uint32(64): /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = 0 + } + break + case uint32(66): /* tconscomma ::= COMMA */ + { + (*Parse)(unsafe.Pointer(pParse)).FconstraintName.Fn = uint32(0) + } + break + case uint32(68): /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ + { + Xsqlite3AddPrimaryKey(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), 0) + } + break + case uint32(69): /* tcons ::= UNIQUE LP sortlist RP onconf */ + { + Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8)), uintptr(0), uintptr(0), 0, 0, + uint8(SQLITE_IDXTYPE_UNIQUE)) + } + break + case uint32(70): /* tcons ::= CHECK LP expr RP onconf */ + { + Xsqlite3AddCheckConstraint(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8)).Fz, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fz) + } + break + case uint32(71): /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */ + { + Xsqlite3CreateForeignKey(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), yymsp+libc.UintptrFromInt32(-3)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + Xsqlite3DeferForeignKey(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(73): + fallthrough // onconf ::= + case uint32(75): /* orconf ::= */ + { + *(*int32)(unsafe.Pointer(yymsp + 1*24 + 8)) = OE_Default + } + break + case uint32(74): /* onconf ::= ON CONFLICT resolvetype */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*int32)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(77): /* resolvetype ::= IGNORE */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = OE_Ignore + } + break + case uint32(78): + fallthrough // resolvetype ::= REPLACE + case uint32(172): /* insert_cmd ::= REPLACE */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = OE_Replace + } + break + case uint32(79): /* cmd ::= DROP TABLE ifexists fullname */ + { + Xsqlite3DropTable(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), 0, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(82): /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */ + { + Xsqlite3CreateView(tls, pParse, yymsp+libc.UintptrFromInt32(-8)*24+8, yymsp+libc.UintptrFromInt32(-4)*24+8, yymsp+libc.UintptrFromInt32(-3)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8))) + } + break + case uint32(83): /* cmd ::= DROP VIEW ifexists fullname */ + { + Xsqlite3DropTable(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), 1, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(84): /* cmd ::= select */ + { + *(*SelectDest)(unsafe.Pointer(bp + 56 /* dest */)) = SelectDest{FeDest: U8(SRT_Output)} + Xsqlite3Select(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), bp+56) + Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(85): /* select ::= WITH wqlist selectnowith */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = attachWithToSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(86): /* select ::= WITH RECURSIVE wqlist selectnowith */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = attachWithToSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(87): /* select ::= selectnowith */ + { + var p uintptr = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + if p != 0 { + parserDoubleLinkSelect(tls, pParse, p) + } + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = p //A-overwrites-X + } + break + case uint32(88): /* selectnowith ::= selectnowith multiselect_op oneselect */ + { + var pRhs uintptr = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + var pLhs uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + if pRhs != 0 && (*Select)(unsafe.Pointer(pRhs)).FpPrior != 0 { + var pFrom uintptr + // var x Token at bp+96, 16 + + (*Token)(unsafe.Pointer(bp + 96 /* &x */)).Fn = uint32(0) + parserDoubleLinkSelect(tls, pParse, pRhs) + pFrom = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp+96, pRhs, uintptr(0), uintptr(0)) + pRhs = Xsqlite3SelectNew(tls, pParse, uintptr(0), pFrom, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(0), uintptr(0)) + } + if pRhs != 0 { + (*Select)(unsafe.Pointer(pRhs)).Fop = U8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + (*Select)(unsafe.Pointer(pRhs)).FpPrior = pLhs + if pLhs != 0 { + *(*U32)(unsafe.Pointer(pLhs + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_MultiValue)) + } + *(*U32)(unsafe.Pointer(pRhs + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_MultiValue)) + if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != TK_ALL { + (*Parse)(unsafe.Pointer(pParse)).FhasCompound = U8(1) + } + } else { + Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pLhs) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = pRhs + } + break + case uint32(89): + fallthrough // multiselect_op ::= UNION + case uint32(91): /* multiselect_op ::= EXCEPT|INTERSECT */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) /*A-overwrites-OP*/ + } + break + case uint32(90): /* multiselect_op ::= UNION ALL */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = TK_ALL + } + break + case uint32(92): /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)) = Xsqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uint32(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8))), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(93): /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-9)*24 + 8)) = Xsqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uint32(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8))), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-9)*24 + 8)) != 0 { + (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-9)*24 + 8)))).FpWinDefn = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + } else { + Xsqlite3WindowListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + } + } + break + case uint32(94): /* values ::= VALUES LP nexprlist RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(SF_Values), uintptr(0)) + } + break + case uint32(95): /* values ::= values COMMA LP nexprlist RP */ + { + var pRight uintptr + var pLeft uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + pRight = Xsqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(SF_Values|SF_MultiValue), uintptr(0)) + if pLeft != 0 { + *(*U32)(unsafe.Pointer(pLeft + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_MultiValue)) + } + if pRight != 0 { + (*Select)(unsafe.Pointer(pRight)).Fop = U8(TK_ALL) + (*Select)(unsafe.Pointer(pRight)).FpPrior = pLeft + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = pRight + } else { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = pLeft + } + } + break + case uint32(96): /* distinct ::= DISTINCT */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = SF_Distinct + } + break + case uint32(97): /* distinct ::= ALL */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = SF_All + } + break + case uint32(99): + fallthrough // sclp ::= + case uint32(132): /* orderby_opt ::= */ + fallthrough + case uint32(142): /* groupby_opt ::= */ + fallthrough + case uint32(230): /* exprlist ::= */ + fallthrough + case uint32(233): /* paren_exprlist ::= */ + fallthrough + case uint32(238): /* eidlist_opt ::= */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = uintptr(0) + } + break + case uint32(100): /* selcollist ::= sclp scanpt expr scanpt as */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + if (*Token)(unsafe.Pointer(yymsp+8)).Fn > uint32(0) { + Xsqlite3ExprListSetName(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), yymsp+8, 1) + } + Xsqlite3ExprListSetSpan(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(101): /* selcollist ::= sclp scanpt STAR */ + { + var p uintptr = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_ASTERISK, uintptr(0)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), p) + } + break + case uint32(102): /* selcollist ::= sclp scanpt nm DOT STAR */ + { + var pRight uintptr = Xsqlite3PExpr(tls, pParse, TK_ASTERISK, uintptr(0), uintptr(0)) + var pLeft uintptr = tokenExpr(tls, pParse, TK_ID, *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + var pDot uintptr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pRight) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), pDot) + } + break + case uint32(103): + fallthrough // as ::= AS nm + case uint32(114): /* dbnm ::= DOT nm */ + fallthrough + case uint32(254): /* plus_num ::= PLUS INTEGER|FLOAT */ + fallthrough + case uint32(255): /* minus_num ::= MINUS INTEGER|FLOAT */ + { + *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(105): + fallthrough // from ::= + case uint32(108): /* stl_prefix ::= */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = uintptr(0) + } + break + case uint32(106): /* from ::= FROM seltablist */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + Xsqlite3SrcListShiftJoinType(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(107): /* stl_prefix ::= seltablist joinop */ + { + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 && (*SrcList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)))).FnSrc > 0 { + (*SrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + 8 + uintptr((*SrcList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)))).FnSrc-1)*112)).Ffg.Fjointype = U8(*(*int32)(unsafe.Pointer(yymsp + 8))) + } + } + break + case uint32(109): /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) = Xsqlite3SrcListAppendFromTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), yymsp+libc.UintptrFromInt32(-5)*24+8, yymsp+libc.UintptrFromInt32(-4)*24+8, yymsp+libc.UintptrFromInt32(-3)*24+8, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), yymsp+libc.UintptrFromInt32(-2)*24+8) + } + break + case uint32(110): /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)) = Xsqlite3SrcListAppendFromTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)), yymsp+libc.UintptrFromInt32(-7)*24+8, yymsp+libc.UintptrFromInt32(-6)*24+8, yymsp+libc.UintptrFromInt32(-2)*24+8, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + Xsqlite3SrcListFuncArgs(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + } + break + case uint32(111): /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) = Xsqlite3SrcListAppendFromTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + + } + break + case uint32(112): /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ + { + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) == uintptr(0) && (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-2)*24+8)).Fn == uint32(0) && *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) == uintptr(0) && *(*uintptr)(unsafe.Pointer(yymsp + 8)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + } else if (*SrcList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)))).FnSrc == 1 { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) = Xsqlite3SrcListAppendFromTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) != 0 { + var pNew uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) + 8 + uintptr((*SrcList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)))).FnSrc-1)*112 + var pOld uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 8 /* &.a */ + (*SrcItem)(unsafe.Pointer(pNew)).FzName = (*SrcItem)(unsafe.Pointer(pOld)).FzName + (*SrcItem)(unsafe.Pointer(pNew)).FzDatabase = (*SrcItem)(unsafe.Pointer(pOld)).FzDatabase + (*SrcItem)(unsafe.Pointer(pNew)).FpSelect = (*SrcItem)(unsafe.Pointer(pOld)).FpSelect + if uint32(int32(*(*uint16)(unsafe.Pointer(pOld + 60 + 4))&0x4>>2)) != 0 { + *(*uintptr)(unsafe.Pointer(pNew + 96)) = *(*uintptr)(unsafe.Pointer(pOld + 96)) + *(*uintptr)(unsafe.Pointer(pOld + 96)) = uintptr(0) + libc.SetBitFieldPtr16Uint32(pOld+60+4, uint32(0), 2, 0x4) + libc.SetBitFieldPtr16Uint32(pNew+60+4, uint32(1), 2, 0x4) + } + (*SrcItem)(unsafe.Pointer(pOld)).FzName = libc.AssignPtrUintptr(pOld+8, uintptr(0)) + (*SrcItem)(unsafe.Pointer(pOld)).FpSelect = uintptr(0) + } + Xsqlite3SrcListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + } else { + var pSubquery uintptr + Xsqlite3SrcListShiftJoinType(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + pSubquery = Xsqlite3SelectNew(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(SF_NestedFrom), uintptr(0)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) = Xsqlite3SrcListAppendFromTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, pSubquery, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + + } + break + case uint32(113): + fallthrough // dbnm ::= + case uint32(127): /* indexed_opt ::= */ + { + (*Token)(unsafe.Pointer(yymsp + 1*24 + 8)).Fz = uintptr(0) + (*Token)(unsafe.Pointer(yymsp + 1*24 + 8)).Fn = uint32(0) + } + break + case uint32(115): /* fullname ::= nm */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+8, uintptr(0)) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && *(*uintptr)(unsafe.Pointer(bp + 40)) != 0 { + Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40))+8)).FzName, yymsp+8) + } + } + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(116): /* fullname ::= nm DOT nm */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+8) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && *(*uintptr)(unsafe.Pointer(bp + 40)) != 0 { + Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40))+8)).FzName, yymsp+8) + } + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(117): /* xfullname ::= nm */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+8, uintptr(0)) /*A-overwrites-X*/ + } + break + case uint32(118): /* xfullname ::= nm DOT nm */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+8) /*A-overwrites-X*/ + } + break + case uint32(119): /* xfullname ::= nm DOT nm AS nm */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-4)*24+8, yymsp+libc.UintptrFromInt32(-2)*24+8) //A-overwrites-X + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { + (*SrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 8)).FzAlias = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, yymsp+8 /* &.minor */ /* &.yy0 */) + } + } + break + case uint32(120): /* xfullname ::= nm AS nm */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, uintptr(0)) //A-overwrites-X + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) != 0 { + (*SrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + 8)).FzAlias = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, yymsp+8 /* &.minor */ /* &.yy0 */) + } + } + break + case uint32(121): /* joinop ::= COMMA|JOIN */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = JT_INNER + } + break + case uint32(122): /* joinop ::= JOIN_KW JOIN */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = Xsqlite3JoinType(tls, pParse, yymsp+libc.UintptrFromInt32(-1)*24+8, uintptr(0), uintptr(0)) /*X-overwrites-A*/ + } + break + case uint32(123): /* joinop ::= JOIN_KW nm JOIN */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3JoinType(tls, pParse, yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+libc.UintptrFromInt32(-1)*24+8, uintptr(0)) /*X-overwrites-A*/ + } + break + case uint32(124): /* joinop ::= JOIN_KW nm nm JOIN */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3JoinType(tls, pParse, yymsp+libc.UintptrFromInt32(-3)*24+8, yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+libc.UintptrFromInt32(-1)*24+8) /*X-overwrites-A*/ + } + break + case uint32(125): + fallthrough // on_opt ::= ON expr + case uint32(145): /* having_opt ::= HAVING expr */ + fallthrough + case uint32(152): /* where_opt ::= WHERE expr */ + fallthrough + case uint32(154): /* where_opt_ret ::= WHERE expr */ + fallthrough + case uint32(226): /* case_else ::= ELSE expr */ + fallthrough + case uint32(247): /* vinto ::= INTO expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(126): + fallthrough // on_opt ::= + case uint32(144): /* having_opt ::= */ + fallthrough + case uint32(146): /* limit_opt ::= */ + fallthrough + case uint32(151): /* where_opt ::= */ + fallthrough + case uint32(153): /* where_opt_ret ::= */ + fallthrough + case uint32(227): /* case_else ::= */ + fallthrough + case uint32(229): /* case_operand ::= */ + fallthrough + case uint32(248): /* vinto ::= */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = uintptr(0) + } + break + case uint32(128): /* indexed_opt ::= INDEXED BY nm */ + { + *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(129): /* indexed_opt ::= NOT INDEXED */ + { + (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)).Fz = uintptr(0) + (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)).Fn = uint32(1) + } + break + case uint32(130): /* using_opt ::= USING LP idlist RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(131): + fallthrough // using_opt ::= + case uint32(173): /* idlist_opt ::= */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = uintptr(0) + } + break + case uint32(133): + fallthrough // orderby_opt ::= ORDER BY sortlist + case uint32(143): /* groupby_opt ::= GROUP BY nexprlist */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(134): /* sortlist ::= sortlist COMMA expr sortorder nulls */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + Xsqlite3ExprListSetSortOrder(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(135): /* sortlist ::= expr sortorder nulls */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) //A-overwrites-Y + Xsqlite3ExprListSetSortOrder(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + } + break + case uint32(136): /* sortorder ::= ASC */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = SQLITE_SO_ASC + } + break + case uint32(137): /* sortorder ::= DESC */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = SQLITE_SO_DESC + } + break + case uint32(138): + fallthrough // sortorder ::= + case uint32(141): /* nulls ::= */ + { + *(*int32)(unsafe.Pointer(yymsp + 1*24 + 8)) = -1 + } + break + case uint32(139): /* nulls ::= NULLS FIRST */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = SQLITE_SO_ASC + } + break + case uint32(140): /* nulls ::= NULLS LAST */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = SQLITE_SO_DESC + } + break + case uint32(147): /* limit_opt ::= LIMIT expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_LIMIT, *(*uintptr)(unsafe.Pointer(yymsp + 8)), uintptr(0)) + } + break + case uint32(148): /* limit_opt ::= LIMIT expr OFFSET expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_LIMIT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(149): /* limit_opt ::= LIMIT expr COMMA expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_LIMIT, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + } + break + case uint32(150): /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */ + { + Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), yymsp+libc.UintptrFromInt32(-1)*24+8) + Xsqlite3DeleteFrom(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), uintptr(0), uintptr(0)) + } + break + case uint32(155): /* where_opt_ret ::= RETURNING selcollist */ + { + Xsqlite3AddReturning(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = uintptr(0) + } + break + case uint32(156): /* where_opt_ret ::= WHERE expr RETURNING selcollist */ + { + Xsqlite3AddReturning(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + } + break + case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ + { + Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22808) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) + } + break + case uint32(158): /* setlist ::= setlist COMMA nm EQ expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + Xsqlite3ExprListSetName(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), yymsp+libc.UintptrFromInt32(-2)*24+8, 1) + } + break + case uint32(159): /* setlist ::= setlist COMMA LP idlist RP EQ expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) = Xsqlite3ExprListAppendVector(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(160): /* setlist ::= nm EQ expr */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + Xsqlite3ExprListSetName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40)), yymsp+libc.UintptrFromInt32(-2)*24+8, 1) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(161): /* setlist ::= LP idlist RP EQ expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprListAppendVector(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(162): /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */ + { + Xsqlite3Insert(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(163): /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */ + { + Xsqlite3Insert(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0)) + } + break + case uint32(164): /* upsert ::= */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = uintptr(0) + } + break + case uint32(165): /* upsert ::= RETURNING selcollist */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = uintptr(0) + Xsqlite3AddReturning(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(166): /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-11)*24 + 8)) = Xsqlite3UpsertNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(167): /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)) = Xsqlite3UpsertNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(168): /* upsert ::= ON CONFLICT DO NOTHING returning */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3UpsertNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + } + break + case uint32(169): /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8)) = Xsqlite3UpsertNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uintptr(0)) + } + break + case uint32(170): /* returning ::= RETURNING selcollist */ + { + Xsqlite3AddReturning(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(174): /* idlist_opt ::= LP idlist RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(175): /* idlist ::= idlist COMMA nm */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3IdListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), yymsp+8) + } + break + case uint32(176): /* idlist ::= nm */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3IdListAppend(tls, pParse, uintptr(0), yymsp+8) /*A-overwrites-Y*/ + } + break + case uint32(177): /* expr ::= LP expr RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(178): + fallthrough // expr ::= ID|INDEXED + case uint32(179): /* expr ::= JOIN_KW */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = tokenExpr(tls, pParse, TK_ID, *(*Token)(unsafe.Pointer(yymsp + 8))) /*A-overwrites-X*/ + } + break + case uint32(180): /* expr ::= nm DOT nm */ + { + var temp1 uintptr = tokenExpr(tls, pParse, TK_ID, *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + var temp2 uintptr = tokenExpr(tls, pParse, TK_ID, *(*Token)(unsafe.Pointer(yymsp + 8))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp2) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(181): /* expr ::= nm DOT nm DOT nm */ + { + var temp1 uintptr = tokenExpr(tls, pParse, TK_ID, *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + var temp2 uintptr = tokenExpr(tls, pParse, TK_ID, *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + var temp3 uintptr = tokenExpr(tls, pParse, TK_ID, *(*Token)(unsafe.Pointer(yymsp + 8))) + var temp4 uintptr = Xsqlite3PExpr(tls, pParse, TK_DOT, temp2, temp3) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { + Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), temp1) + } + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp4) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(182): + fallthrough // term ::= NULL|FLOAT|BLOB + case uint32(183): /* term ::= STRING */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = tokenExpr(tls, pParse, int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor), *(*Token)(unsafe.Pointer(yymsp + 8))) /*A-overwrites-X*/ + } + break + case uint32(184): /* term ::= INTEGER */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, yymsp+8, 1) + if *(*uintptr)(unsafe.Pointer(bp + 40)) != 0 { + *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + 52)) = int32((int64((*Token)(unsafe.Pointer(yymsp+8)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FzTail)) / 1) + } + } + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(185): /* expr ::= VARIABLE */ + { + if !(int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(yymsp + 8)).Fz))) == '#' && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(yymsp+8)).Fz + 1)))])&0x04 != 0) { + var n U32 = (*Token)(unsafe.Pointer(yymsp + 8)).Fn + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = tokenExpr(tls, pParse, TK_VARIABLE, *(*Token)(unsafe.Pointer(yymsp + 8))) + Xsqlite3ExprAssignVarNumber(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), n) + } else { + // When doing a nested parse, one can include terms in an expression + // that look like this: #1 #2 ... These terms refer to registers + // in the virtual machine. #N is the N-th register. + *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X + + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+22817, libc.VaList(bp+32, bp+112)) + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) + } else { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) + if *(*uintptr)(unsafe.Pointer(yymsp + 8)) != 0 { + Xsqlite3GetInt32(tls, (*Token)(unsafe.Pointer(bp+112)).Fz+1, *(*uintptr)(unsafe.Pointer(yymsp + 8))+44) + } + } + } + } + break + case uint32(186): /* expr ::= expr COLLATE ID|STRING */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3ExprAddCollateToken(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), yymsp+8, 1) + } + break + case uint32(187): /* expr ::= CAST LP expr AS typetoken RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_CAST, yymsp+libc.UintptrFromInt32(-1)*24+8, 1) + Xsqlite3ExprAttachSubtrees(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), uintptr(0)) + } + break + case uint32(188): /* expr ::= ID|INDEXED LP distinct exprlist RP */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(189): /* expr ::= ID|INDEXED LP STAR RP */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-3)*24+8, 0) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(190): /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), yymsp+libc.UintptrFromInt32(-5)*24+8, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8))) + Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(191): /* expr ::= ID|INDEXED LP STAR RP filter_over */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-4)*24+8, 0) + Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(192): /* term ::= CTIME_KW */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+8, 0) + } + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(193): /* expr ::= LP nexprlist COMMA expr RP */ + { + var pList uintptr = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_VECTOR, uintptr(0), uintptr(0)) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 32)) = pList + if (*ExprList)(unsafe.Pointer(pList)).FnExpr != 0 { + *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 4)) |= (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr)).Fflags & U32(EP_Collate|EP_Subquery|EP_HasFunc) + } + } else { + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList) + } + } + break + case uint32(194): /* expr ::= expr AND expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3ExprAnd(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(195): + fallthrough // expr ::= expr OR expr + case uint32(196): /* expr ::= expr LT|GT|GE|LE expr */ + fallthrough + case uint32(197): /* expr ::= expr EQ|NE expr */ + fallthrough + case uint32(198): /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ + fallthrough + case uint32(199): /* expr ::= expr PLUS|MINUS expr */ + fallthrough + case uint32(200): /* expr ::= expr STAR|SLASH|REM expr */ + fallthrough + case uint32(201): /* expr ::= expr CONCAT expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3PExpr(tls, pParse, int32((*YyStackEntry)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24)).Fmajor), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(202): /* likeop ::= NOT LIKE_KW|MATCH */ + { + *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) + *(*uint32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 + 8)) |= 0x80000000 /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/ + } + break + case uint32(203): /* expr ::= expr likeop expr */ + { + var pList uintptr + var bNot int32 = int32((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fn & 0x80000000) + *(*uint32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 + 8)) &= uint32(0x7fffffff) + pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + pList = Xsqlite3ExprListAppend(tls, pParse, pList, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3ExprFunction(tls, pParse, pList, yymsp+libc.UintptrFromInt32(-1)*24+8, 0) + if bNot != 0 { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_NOT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), uintptr(0)) + } + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) != 0 { + *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + 4)) |= U32(EP_InfixFunc) + } + } + break + case uint32(204): /* expr ::= expr likeop expr ESCAPE expr */ + { + var pList uintptr + var bNot int32 = int32((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8)).Fn & 0x80000000) + *(*uint32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 + 8)) &= uint32(0x7fffffff) + pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + pList = Xsqlite3ExprListAppend(tls, pParse, pList, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + pList = Xsqlite3ExprListAppend(tls, pParse, pList, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprFunction(tls, pParse, pList, yymsp+libc.UintptrFromInt32(-3)*24+8, 0) + if bNot != 0 { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_NOT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + } + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { + *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 4)) |= U32(EP_InfixFunc) + } + } + break + case uint32(205): /* expr ::= expr ISNULL|NOTNULL */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = Xsqlite3PExpr(tls, pParse, int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uintptr(0)) + } + break + case uint32(206): /* expr ::= expr NOT NULL */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_NOTNULL, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), uintptr(0)) + } + break + case uint32(207): /* expr ::= expr IS expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_IS, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + binaryToUnaryIfNull(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), TK_ISNULL) + } + break + case uint32(208): /* expr ::= expr IS NOT expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_ISNOT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + binaryToUnaryIfNull(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), TK_NOTNULL) + } + break + case uint32(209): + fallthrough // expr ::= NOT expr + case uint32(210): /* expr ::= BITNOT expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = Xsqlite3PExpr(tls, pParse, int32((*YyStackEntry)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24)).Fmajor), *(*uintptr)(unsafe.Pointer(yymsp + 8)), uintptr(0)) /*A-overwrites-B*/ + } + break + case uint32(211): /* expr ::= PLUS|MINUS expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = Xsqlite3PExpr(tls, pParse, func() int32 { + if int32((*YyStackEntry)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24)).Fmajor) == TK_PLUS { + return TK_UPLUS + } + return TK_UMINUS + }(), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), uintptr(0)) + //A-overwrites-B + } + break + case uint32(212): /* expr ::= expr PTR expr */ + { + var pList uintptr = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + pList = Xsqlite3ExprListAppend(tls, pParse, pList, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, pList, yymsp+libc.UintptrFromInt32(-1)*24+8, 0) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(213): + fallthrough // between_op ::= BETWEEN + case uint32(216): /* in_op ::= IN */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = 0 + } + break + case uint32(215): /* expr ::= expr between_op expr AND expr */ + { + var pList uintptr = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + pList = Xsqlite3ExprListAppend(tls, pParse, pList, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_BETWEEN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 32)) = pList + } else { + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList) + } + if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_NOT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + } + } + break + case uint32(218): /* expr ::= expr in_op LP exprlist RP */ + { + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) == uintptr(0) { + // Expressions of the form + // + // expr1 IN () + // expr1 NOT IN () + // + // simplify to constants 0 (false) and 1 (true), respectively, + // regardless of the value of expr1. + Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, func() uintptr { + if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { + return ts + 7816 /* "1" */ + } + return ts + 7408 /* "0" */ + }()) + } else { + var pRHS uintptr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + 8)).FpExpr + if (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)))).FnExpr == 1 && Xsqlite3ExprIsConstant(tls, pRHS) != 0 && int32((*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)))).Fop) != TK_VECTOR { + (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + 8)).FpExpr = uintptr(0) + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + pRHS = Xsqlite3PExpr(tls, pParse, TK_UPLUS, pRHS, uintptr(0)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_EQ, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), pRHS) + } else { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_IN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) == uintptr(0) { + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } else if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)))).FpLeft)).Fop) == TK_VECTOR { + var nExpr int32 = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)))).FpLeft + 32)))).FnExpr + var pSelectRHS uintptr = Xsqlite3ExprListToValues(tls, pParse, nExpr, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + if pSelectRHS != 0 { + parserDoubleLinkSelect(tls, pParse, pSelectRHS) + Xsqlite3PExprAddSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), pSelectRHS) + } + } else { + *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 32)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + Xsqlite3ExprSetHeightAndFlags(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + } + } + if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_NOT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + } + } + + } + break + case uint32(219): /* expr ::= LP select RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_SELECT, uintptr(0), uintptr(0)) + Xsqlite3PExprAddSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + + } + break + case uint32(220): /* expr ::= expr in_op LP select RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_IN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + Xsqlite3PExprAddSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_NOT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + } + + } + break + case uint32(221): /* expr ::= expr in_op nm dbnm paren_exprlist */ + { + var pSrc uintptr = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+libc.UintptrFromInt32(-1)*24+8) + var pSelect uintptr = Xsqlite3SelectNew(tls, pParse, uintptr(0), pSrc, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(0), uintptr(0)) + if *(*uintptr)(unsafe.Pointer(yymsp + 8)) != 0 { + Xsqlite3SrcListFuncArgs(tls, pParse, func() uintptr { + if pSelect != 0 { + return pSrc + } + return uintptr(0) + }(), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_IN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + Xsqlite3PExprAddSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), pSelect) + if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_NOT, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + } + + } + break + case uint32(222): /* expr ::= EXISTS LP select RP */ + { + var p uintptr + p = libc.AssignPtrUintptr(yymsp+libc.UintptrFromInt32(-3)*24+8, Xsqlite3PExpr(tls, pParse, TK_EXISTS, uintptr(0), uintptr(0))) + Xsqlite3PExprAddSelect(tls, pParse, p, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + + } + break + case uint32(223): /* expr ::= CASE case_operand case_exprlist case_else END */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_CASE, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), uintptr(0)) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) + 32)) = func() uintptr { + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { + return Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + return *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + }() + Xsqlite3ExprSetHeightAndFlags(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + } else { + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + } + break + case uint32(224): /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(225): /* case_exprlist ::= WHEN expr THEN expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(228): /* case_operand ::= expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) /*A-overwrites-X*/ + } + break + case uint32(231): /* nexprlist ::= nexprlist COMMA expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(232): /* nexprlist ::= expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) /*A-overwrites-Y*/ + } + break + case uint32(234): + fallthrough // paren_exprlist ::= LP exprlist RP + case uint32(239): /* eidlist_opt ::= LP eidlist RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(235): /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ + { + Xsqlite3CreateIndex(tls, pParse, yymsp+libc.UintptrFromInt32(-7)*24+8, yymsp+libc.UintptrFromInt32(-6)*24+8, + Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-4)*24+8, uintptr(0)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-10)*24 + 8)), + yymsp+libc.UintptrFromInt32(-11)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + 8)), SQLITE_SO_ASC, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)), uint8(SQLITE_IDXTYPE_APPDEF)) + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*Parse)(unsafe.Pointer(pParse)).FpNewIndex != 0 { + Xsqlite3RenameTokenMap(tls, pParse, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FpNewIndex)).FzName, yymsp+libc.UintptrFromInt32(-4)*24+8) + } + } + break + case uint32(236): + fallthrough // uniqueflag ::= UNIQUE + case uint32(278): /* raisetype ::= ABORT */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = OE_Abort + } + break + case uint32(237): /* uniqueflag ::= */ + { + *(*int32)(unsafe.Pointer(yymsp + 1*24 + 8)) = OE_None + } + break + case uint32(240): /* eidlist ::= eidlist COMMA nm collate sortorder */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = parserAddExprIdListTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), yymsp+libc.UintptrFromInt32(-2)*24+8, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(241): /* eidlist ::= nm collate sortorder */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = parserAddExprIdListTerm(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*24+8, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + 8))) //A-overwrites-Y + } + break + case uint32(244): /* cmd ::= DROP INDEX ifexists fullname */ + { + Xsqlite3DropIndex(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(245): /* cmd ::= VACUUM vinto */ + { + Xsqlite3Vacuum(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(246): /* cmd ::= VACUUM nm vinto */ + { + Xsqlite3Vacuum(tls, pParse, yymsp+libc.UintptrFromInt32(-1)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(249): /* cmd ::= PRAGMA nm dbnm */ + { + Xsqlite3Pragma(tls, pParse, yymsp+libc.UintptrFromInt32(-1)*24+8, yymsp+8, uintptr(0), 0) + } + break + case uint32(250): /* cmd ::= PRAGMA nm dbnm EQ nmnum */ + { + Xsqlite3Pragma(tls, pParse, yymsp+libc.UintptrFromInt32(-3)*24+8, yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+8, 0) + } + break + case uint32(251): /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ + { + Xsqlite3Pragma(tls, pParse, yymsp+libc.UintptrFromInt32(-4)*24+8, yymsp+libc.UintptrFromInt32(-3)*24+8, yymsp+libc.UintptrFromInt32(-1)*24+8, 0) + } + break + case uint32(252): /* cmd ::= PRAGMA nm dbnm EQ minus_num */ + { + Xsqlite3Pragma(tls, pParse, yymsp+libc.UintptrFromInt32(-3)*24+8, yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+8, 1) + } + break + case uint32(253): /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ + { + Xsqlite3Pragma(tls, pParse, yymsp+libc.UintptrFromInt32(-4)*24+8, yymsp+libc.UintptrFromInt32(-3)*24+8, yymsp+libc.UintptrFromInt32(-1)*24+8, 1) + } + break + case uint32(256): /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ + { + // var all Token at bp+128, 16 + + (*Token)(unsafe.Pointer(bp + 128 /* &all */)).Fz = (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)).Fz + (*Token)(unsafe.Pointer(bp + 128 /* &all */)).Fn = uint32(int32((int64((*Token)(unsafe.Pointer(yymsp+8)).Fz)-int64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8)).Fz))/1)) + (*Token)(unsafe.Pointer(yymsp+8)).Fn + Xsqlite3FinishTrigger(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), bp+128) + } + break + case uint32(257): /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ + { + Xsqlite3BeginTrigger(tls, pParse, yymsp+libc.UintptrFromInt32(-7)*24+8, yymsp+libc.UintptrFromInt32(-6)*24+8, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), (*TrigEvent)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*24+8)).Fa, (*TrigEvent)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*24+8)).Fb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-10)*24 + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8))) + *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-10)*24 + 8)) = func() Token1 { + if (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-6)*24+8)).Fn == uint32(0) { + return *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8)) + } + return *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)) + }() //A-overwrites-T + } + break + case uint32(258): /* trigger_time ::= BEFORE|AFTER */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) /*A-overwrites-X*/ + } + break + case uint32(259): /* trigger_time ::= INSTEAD OF */ + { + *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = TK_INSTEAD + } + break + case uint32(260): /* trigger_time ::= */ + { + *(*int32)(unsafe.Pointer(yymsp + 1*24 + 8)) = TK_BEFORE + } + break + case uint32(261): + fallthrough // trigger_event ::= DELETE|INSERT + case uint32(262): /* trigger_event ::= UPDATE */ + { + (*TrigEvent)(unsafe.Pointer(yymsp + 8)).Fa = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) /*A-overwrites-X*/ + (*TrigEvent)(unsafe.Pointer(yymsp + 8 /* &.minor */)).Fb = uintptr(0) + } + break + case uint32(263): /* trigger_event ::= UPDATE OF idlist */ + { + (*TrigEvent)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)).Fa = TK_UPDATE + (*TrigEvent)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)).Fb = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(264): + fallthrough // when_clause ::= + case uint32(283): /* key_opt ::= */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = uintptr(0) + } + break + case uint32(265): + fallthrough // when_clause ::= WHEN expr + case uint32(284): /* key_opt ::= KEY expr */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(266): /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ + { + + (*TriggerStep)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)))).FpLast)).FpNext = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + (*TriggerStep)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)))).FpLast = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(267): /* trigger_cmd_list ::= trigger_cmd SEMI */ + { + + (*TriggerStep)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)))).FpLast = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(268): /* trnm ::= nm DOT nm */ + { + *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) + Xsqlite3ErrorMsg(tls, pParse, + + ts+22841, 0) + } + break + case uint32(269): /* tridxby ::= INDEXED BY nm */ + { + Xsqlite3ErrorMsg(tls, pParse, + + ts+22936, 0) + } + break + case uint32(270): /* tridxby ::= NOT INDEXED */ + { + Xsqlite3ErrorMsg(tls, pParse, + + ts+23020, 0) + } + break + case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerUpdateStep(tls, pParse, yymsp+libc.UintptrFromInt32(-6)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8))), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-8)*24+8)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(272): /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerInsertStep(tls, pParse, yymsp+libc.UintptrFromInt32(-4)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8))), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) //yylhsminor.yy33-overwrites-yymsp[-6].minor.yy394 + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(273): /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerDeleteStep(tls, pParse, yymsp+libc.UintptrFromInt32(-3)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-5)*24+8)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(274): /* trigger_cmd ::= scanpt select scanpt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerSelectStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) /*yylhsminor.yy33-overwrites-yymsp[-1].minor.yy47*/ + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(275): /* expr ::= RAISE LP IGNORE RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_RAISE, uintptr(0), uintptr(0)) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { + (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)))).FaffExpr = uint8(OE_Ignore) + } + } + break + case uint32(276): /* expr ::= RAISE LP raisetype COMMA nm RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_RAISE, yymsp+libc.UintptrFromInt32(-1)*24+8, 1) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) != 0 { + (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)))).FaffExpr = uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8))) + } + } + break + case uint32(277): /* raisetype ::= ROLLBACK */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = OE_Rollback + } + break + case uint32(279): /* raisetype ::= FAIL */ + { + *(*int32)(unsafe.Pointer(yymsp + 8)) = OE_Fail + } + break + case uint32(280): /* cmd ::= DROP TRIGGER ifexists fullname */ + { + Xsqlite3DropTrigger(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(281): /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ + { + Xsqlite3Attach(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(282): /* cmd ::= DETACH database_kw_opt expr */ + { + Xsqlite3Detach(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(285): /* cmd ::= REINDEX */ + { + Xsqlite3Reindex(tls, pParse, uintptr(0), uintptr(0)) + } + break + case uint32(286): /* cmd ::= REINDEX nm dbnm */ + { + Xsqlite3Reindex(tls, pParse, yymsp+libc.UintptrFromInt32(-1)*24+8, yymsp+8) + } + break + case uint32(287): /* cmd ::= ANALYZE */ + { + Xsqlite3Analyze(tls, pParse, uintptr(0), uintptr(0)) + } + break + case uint32(288): /* cmd ::= ANALYZE nm dbnm */ + { + Xsqlite3Analyze(tls, pParse, yymsp+libc.UintptrFromInt32(-1)*24+8, yymsp+8) + } + break + case uint32(289): /* cmd ::= ALTER TABLE fullname RENAME TO nm */ + { + Xsqlite3AlterRenameTable(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), yymsp+8) + } + break + case uint32(290): /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ + { + (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)).Fn = uint32(int32((int64((*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz)-int64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).Fz))/1)) + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn + Xsqlite3AlterFinishAddColumn(tls, pParse, yymsp+libc.UintptrFromInt32(-1)*24+8) + } + break + case uint32(291): /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ + { + Xsqlite3AlterDropColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)), yymsp+8) + } + break + case uint32(292): /* add_column_fullname ::= fullname */ + { + disableLookaside(tls, pParse) + Xsqlite3AlterBeginAddColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(293): /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ + { + Xsqlite3AlterRenameColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+8) + } + break + case uint32(294): /* cmd ::= create_vtab */ + { + Xsqlite3VtabFinishParse(tls, pParse, uintptr(0)) + } + break + case uint32(295): /* cmd ::= create_vtab LP vtabarglist RP */ + { + Xsqlite3VtabFinishParse(tls, pParse, yymsp+8) + } + break + case uint32(296): /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ + { + Xsqlite3VtabBeginParse(tls, pParse, yymsp+libc.UintptrFromInt32(-3)*24+8, yymsp+libc.UintptrFromInt32(-2)*24+8, yymsp+8, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + } + break + case uint32(297): /* vtabarg ::= */ + { + Xsqlite3VtabArgInit(tls, pParse) + } + break + case uint32(298): + fallthrough // vtabargtoken ::= ANY + case uint32(299): /* vtabargtoken ::= lp anylist RP */ + fallthrough + case uint32(300): /* lp ::= LP */ + { + Xsqlite3VtabArgExtend(tls, pParse, yymsp+8) + } + break + case uint32(301): + fallthrough // with ::= WITH wqlist + case uint32(302): /* with ::= WITH RECURSIVE wqlist */ + { + Xsqlite3WithPush(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), uint8(1)) + } + break + case uint32(303): /* wqas ::= AS */ + { + *(*U8)(unsafe.Pointer(yymsp + 8)) = U8(M10d_Any) + } + break + case uint32(304): /* wqas ::= AS MATERIALIZED */ + { + *(*U8)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U8(M10d_Yes) + } + break + case uint32(305): /* wqas ::= AS NOT MATERIALIZED */ + { + *(*U8)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = U8(M10d_No) + } + break + case uint32(306): /* wqitem ::= nm eidlist_opt wqas LP select RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3CteNew(tls, pParse, yymsp+libc.UintptrFromInt32(-5)*24+8, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*U8)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8))) //A-overwrites-X + } + break + case uint32(307): /* wqlist ::= wqitem */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3WithAdd(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8))) //A-overwrites-X + } + break + case uint32(308): /* wqlist ::= wqlist COMMA wqitem */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = Xsqlite3WithAdd(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + break + case uint32(309): /* windowdefn_list ::= windowdefn */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(310): /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ + { + + Xsqlite3WindowChain(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + 8)))).FpNextWin = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(311): /* windowdefn ::= nm AS LP window RP */ + { + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)))).FzName = Xsqlite3DbStrNDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*24+8)).Fz, uint64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*24+8)).Fn)) + } + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(312): /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uintptr(0)) + } + break + case uint32(313): /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), yymsp+libc.UintptrFromInt32(-5)*24+8) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(314): /* window ::= ORDER BY sortlist frame_opt */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), uintptr(0)) + } + break + case uint32(315): /* window ::= nm ORDER BY sortlist frame_opt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(316): + fallthrough // window ::= frame_opt + case uint32(335): /* filter_over ::= over_clause */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(317): /* window ::= nm frame_opt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8)), uintptr(0), uintptr(0), yymsp+libc.UintptrFromInt32(-1)*24+8) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(318): /* frame_opt ::= */ + { + *(*uintptr)(unsafe.Pointer(yymsp + 1*24 + 8)) = Xsqlite3WindowAlloc(tls, pParse, 0, TK_UNBOUNDED, uintptr(0), TK_CURRENT, uintptr(0), uint8(0)) + } + break + case uint32(319): /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).FpExpr, TK_CURRENT, uintptr(0), *(*U8)(unsafe.Pointer(yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(320): /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8)).FpExpr, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8)).FpExpr, *(*U8)(unsafe.Pointer(yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(322): + fallthrough // frame_bound_s ::= frame_bound + case uint32(324): /* frame_bound_e ::= frame_bound */ + { + *(*FrameBound)(unsafe.Pointer(bp + 40)) = *(*FrameBound)(unsafe.Pointer(yymsp + 8)) + } + *(*FrameBound)(unsafe.Pointer(yymsp + 8)) = *(*FrameBound)(unsafe.Pointer(bp + 40)) + break + case uint32(323): + fallthrough // frame_bound_s ::= UNBOUNDED PRECEDING + case uint32(325): /* frame_bound_e ::= UNBOUNDED FOLLOWING */ + fallthrough + case uint32(327): /* frame_bound ::= CURRENT ROW */ + { + (*FrameBound)(unsafe.Pointer(bp + 40)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24)).Fmajor) + (*FrameBound)(unsafe.Pointer(bp + 40)).FpExpr = uintptr(0) + } + *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*FrameBound)(unsafe.Pointer(bp + 40)) + break + case uint32(326): /* frame_bound ::= expr PRECEDING|FOLLOWING */ + { + (*FrameBound)(unsafe.Pointer(bp + 40)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) + (*FrameBound)(unsafe.Pointer(bp + 40)).FpExpr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*FrameBound)(unsafe.Pointer(bp + 40)) + break + case uint32(328): /* frame_exclude_opt ::= */ + { + *(*U8)(unsafe.Pointer(yymsp + 1*24 + 8)) = U8(0) + } + break + case uint32(329): /* frame_exclude_opt ::= EXCLUDE frame_exclude */ + { + *(*U8)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*U8)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(330): + fallthrough // frame_exclude ::= NO OTHERS + case uint32(331): /* frame_exclude ::= CURRENT ROW */ + { + *(*U8)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U8((*YyStackEntry)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24)).Fmajor) /*A-overwrites-X*/ + } + break + case uint32(332): /* frame_exclude ::= GROUP|TIES */ + { + *(*U8)(unsafe.Pointer(yymsp + 8)) = U8((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) /*A-overwrites-X*/ + } + break + case uint32(333): /* window_clause ::= WINDOW windowdefn_list */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + break + case uint32(334): /* filter_over ::= filter_clause over_clause */ + { + if *(*uintptr)(unsafe.Pointer(yymsp + 8)) != 0 { + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + 8)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } else { + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(336): /* filter_over ::= filter_clause */ + { + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Window{}))) + if *(*uintptr)(unsafe.Pointer(bp + 40)) != 0 { + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FeFrmType = U8(TK_FILTER) + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + 8)) + } else { + Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + 8))) + } + } + *(*uintptr)(unsafe.Pointer(yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp + 40)) + break + case uint32(337): /* over_clause ::= OVER LP window RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + + } + break + case uint32(338): /* over_clause ::= OVER nm */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Window{}))) + if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)))).FzName = Xsqlite3DbStrNDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Token)(unsafe.Pointer(yymsp+8)).Fz, uint64((*Token)(unsafe.Pointer(yymsp+8)).Fn)) + } + } + break + case uint32(339): /* filter_clause ::= FILTER LP WHERE expr RP */ + { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + default: + /* (340) input ::= cmdlist */ + /* (341) cmdlist ::= cmdlist ecmd */ + /* (342) cmdlist ::= ecmd (OPTIMIZED OUT) */ + /* (343) ecmd ::= SEMI */ + /* (344) ecmd ::= cmdx SEMI */ + /* (345) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ + /* (346) trans_opt ::= */ + /* (347) trans_opt ::= TRANSACTION */ + /* (348) trans_opt ::= TRANSACTION nm */ + /* (349) savepoint_opt ::= SAVEPOINT */ + /* (350) savepoint_opt ::= */ + /* (351) cmd ::= create_table create_table_args */ + /* (352) table_option_set ::= table_option (OPTIMIZED OUT) */ + /* (353) columnlist ::= columnlist COMMA columnname carglist */ + /* (354) columnlist ::= columnname carglist */ + /* (355) nm ::= ID|INDEXED */ + /* (356) nm ::= STRING */ + /* (357) nm ::= JOIN_KW */ + /* (358) typetoken ::= typename */ + /* (359) typename ::= ID|STRING */ + /* (360) signed ::= plus_num (OPTIMIZED OUT) */ + /* (361) signed ::= minus_num (OPTIMIZED OUT) */ + /* (362) carglist ::= carglist ccons */ + /* (363) carglist ::= */ + /* (364) ccons ::= NULL onconf */ + /* (365) ccons ::= GENERATED ALWAYS AS generated */ + /* (366) ccons ::= AS generated */ + /* (367) conslist_opt ::= COMMA conslist */ + /* (368) conslist ::= conslist tconscomma tcons */ + /* (369) conslist ::= tcons (OPTIMIZED OUT) */ + /* (370) tconscomma ::= */ + /* (371) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ + /* (372) resolvetype ::= raisetype (OPTIMIZED OUT) */ + /* (373) selectnowith ::= oneselect (OPTIMIZED OUT) */ + /* (374) oneselect ::= values */ + /* (375) sclp ::= selcollist COMMA */ + /* (376) as ::= ID|STRING */ + /* (377) returning ::= */ + /* (378) expr ::= term (OPTIMIZED OUT) */ + /* (379) likeop ::= LIKE_KW|MATCH */ + /* (380) exprlist ::= nexprlist */ + /* (381) nmnum ::= plus_num (OPTIMIZED OUT) */ + /* (382) nmnum ::= nm (OPTIMIZED OUT) */ + /* (383) nmnum ::= ON */ + /* (384) nmnum ::= DELETE */ + /* (385) nmnum ::= DEFAULT */ + /* (386) plus_num ::= INTEGER|FLOAT */ + /* (387) foreach_clause ::= */ + /* (388) foreach_clause ::= FOR EACH ROW */ + /* (389) trnm ::= nm */ + /* (390) tridxby ::= */ + /* (391) database_kw_opt ::= DATABASE */ + /* (392) database_kw_opt ::= */ + /* (393) kwcolumn_opt ::= */ + /* (394) kwcolumn_opt ::= COLUMNKW */ + /* (395) vtabarglist ::= vtabarg */ + /* (396) vtabarglist ::= vtabarglist COMMA vtabarg */ + /* (397) vtabarg ::= vtabarg vtabargtoken */ + /* (398) anylist ::= */ + /* (399) anylist ::= anylist LP anylist RP */ + /* (400) anylist ::= anylist ANY */ + /* (401) with ::= */ + break + //********* End reduce actions *********************************************** + } + + yygoto = int32(yyRuleInfoLhs[yyruleno]) + yysize = int32(yyRuleInfoNRhs[yyruleno]) + yyact = yy_find_reduce_action(tls, (*YyStackEntry)(unsafe.Pointer(yymsp+uintptr(yysize)*24)).Fstateno, uint16(yygoto)) + + // There are no SHIFTREDUCE actions on nonterminals because the table + // generator has simplified them to pure REDUCE actions. + + // It is not possible for a REDUCE to be followed by an error + + yymsp += 24 * uintptr(yysize+1) + (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yymsp + (*YyStackEntry)(unsafe.Pointer(yymsp)).Fstateno = yyact + (*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor = uint16(yygoto) + + return yyact +} + +// The following code executes when the parse fails + +// The following code executes when a syntax error first occurs. +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + *(*Token)(unsafe.Pointer(bp + 8)) = yyminor + + var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse + //*********** Begin %syntax_error code *************************************** + + _ = yymajor // Silence some compiler warnings + if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+22817, libc.VaList(bp, bp+8)) + } else { + Xsqlite3ErrorMsg(tls, pParse, ts+23105, 0) + } + //*********** End %syntax_error code ***************************************** + + (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse +} + +// The following is executed when the parser accepts +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ + + var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse + + // Here code is inserted which will be executed whenever the + // parser accepts + //********** Begin %parse_accept code **************************************** + //********** End %parse_accept code ****************************************** + + (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse +} + +// The main parser program. +// The first argument is a pointer to a structure obtained from +// "sqlite3ParserAlloc" which describes the current state of the parser. +// The second argument is the major token number. The third is +// the minor token. The fourth optional argument is whatever the +// user wants (and specified in the grammar) and is available for +// use by the action routines. +// +// Inputs: +//
      +//
    • A pointer to the parser (an opaque structure.) +//
    • The major token number. +//
    • The minor token number. +//
    • An option argument of a grammar-specified type. +//
    +// +// Outputs: +// None. +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var yyminorunion YYMINORTYPE at bp, 16 + + var yyact uint16 // The parser action. + var yypParser uintptr = yyp // The parser + var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse + + yyact = (*YyStackEntry)(unsafe.Pointer((*YyParser)(unsafe.Pointer(yypParser)).Fyytos)).Fstateno + + for 1 != 0 { // Exit by "break" + + yyact = yy_find_shift_action(tls, uint16(yymajor), yyact) + if int32(yyact) >= YY_MIN_REDUCE { + var yyruleno uint32 = uint32(int32(yyact) - YY_MIN_REDUCE) // Reduce by this rule + + // Check that the stack is large enough to grow by a single entry + // if the RHS of the rule is empty. This ensures that there is room + // enough on the stack to push the LHS value + if int32(yyRuleInfoNRhs[yyruleno]) == 0 { + if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos >= (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { + yyStackOverflow(tls, yypParser) + break + } + } + yyact = yy_reduce(tls, yypParser, yyruleno, yymajor, yyminor, pParse) + } else if int32(yyact) <= YY_MAX_SHIFTREDUCE { + yy_shift(tls, yypParser, yyact, uint16(yymajor), yyminor) + break + } else if int32(yyact) == YY_ACCEPT_ACTION { + (*YyParser)(unsafe.Pointer(yypParser)).Fyytos -= 24 + yy_accept(tls, yypParser) + return + } else { + + *(*Token)(unsafe.Pointer(bp)) = yyminor + // If the YYNOERRORRECOVERY macro is defined, then do not attempt to + // do any kind of error recovery. Instead, simply invoke the syntax + // error routine and continue going as if nothing had happened. + // + // Applications can set this macro (for example inside %include) if + // they intend to abandon the parse upon the first syntax error seen. + yy_syntax_error(tls, yypParser, yymajor, yyminor) + yy_destructor(tls, yypParser, uint16(yymajor), bp) + break + } + } + return +} + +// Return the fallback token corresponding to canonical token iToken, or +// 0 if iToken has no fallback. +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ + + return int32(yyFallback[iToken]) +} + +//************* End of parse.c ********************************************** +//************* Begin file tokenize.c *************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// An tokenizer for SQL +// +// This file contains C code that splits an SQL input string up into +// individual tokens and sends those tokens one-by-one over to the +// parser for analysis. +// #include "sqliteInt.h" +// #include + +// Character classes for tokenizing +// +// In the sqlite3GetToken() function, a switch() on aiClass[c] is implemented +// using a lookup table, whereas a switch() directly on c uses a binary search. +// The lookup table is much faster. To maximize speed, and to ensure that +// a lookup table is used, all of the classes need to be small integers and +// all of them need to be used within the switch. + +var aiClass = [256]uint8{ + // x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf + /* 0x */ uint8(29), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(7), uint8(7), uint8(28), uint8(7), uint8(7), uint8(28), uint8(28), + /* 1x */ uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), uint8(28), + /* 2x */ uint8(7), uint8(15), uint8(8), uint8(5), uint8(4), uint8(22), uint8(24), uint8(8), uint8(17), uint8(18), uint8(21), uint8(20), uint8(23), uint8(11), uint8(26), uint8(16), + /* 3x */ uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(5), uint8(19), uint8(12), uint8(14), uint8(13), uint8(6), + /* 4x */ uint8(5), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), + /* 5x */ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(2), uint8(2), uint8(9), uint8(28), uint8(28), uint8(28), uint8(2), + /* 6x */ uint8(8), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), + /* 7x */ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(2), uint8(2), uint8(28), uint8(10), uint8(28), uint8(25), uint8(28), + /* 8x */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* 9x */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* Ax */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* Bx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* Cx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), + /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), +} /* sqlite3.c:166749:28 */ + +// The charMap() macro maps alphabetic characters (only) into their +// lower-case ASCII equivalent. On ASCII machines, this is just +// an upper-to-lower case map. On EBCDIC machines we also need +// to adjust the encoding. The mapping is only valid for alphabetics +// which are the only characters for which this feature is used. +// +// Used by keywordhash.h + +// The sqlite3KeywordCode function looks up an identifier to determine if +// it is a keyword. If it is a keyword, the token code of that keyword is +// returned. If the input is not a keyword, TK_ID is returned. +// +// The implementation of this routine was generated by a program, +// mkkeywordhash.c, located in the tool subdirectory of the distribution. +// The output of the mkkeywordhash.c program is written into a file +// named keywordhash.h and then included into this source file by +// the #include below. +//************* Include keywordhash.h in the middle of tokenize.c *********** +//************* Begin file keywordhash.h ************************************ +// **** This file contains automatically generated code ****** +// +// +// The code in this file has been automatically generated by +// +// sqlite/tool/mkkeywordhash.c +// +// The code in this file implements a function that determines whether +// or not a given identifier is really an SQL keyword. The same thing +// might be implemented more directly using a hand-written hash table. +// But by using this automatically generated code, the size of the code +// is substantially reduced. This is important for embedded applications +// on platforms with limited memory. +// Hash score: 231 +// zKWText[] encodes 1007 bytes of keyword text in 667 bytes +// REINDEXEDESCAPEACHECKEYBEFOREIGNOREGEXPLAINSTEADDATABASELECT +// ABLEFTHENDEFERRABLELSEXCLUDELETEMPORARYISNULLSAVEPOINTERSECT +// IESNOTNULLIKEXCEPTRANSACTIONATURALTERAISEXCLUSIVEXISTS +// CONSTRAINTOFFSETRIGGERANGENERATEDETACHAVINGLOBEGINNEREFERENCES +// UNIQUERYWITHOUTERELEASEATTACHBETWEENOTHINGROUPSCASCADEFAULT +// CASECOLLATECREATECURRENT_DATEIMMEDIATEJOINSERTMATCHPLANALYZE +// PRAGMATERIALIZEDEFERREDISTINCTUPDATEVALUESVIRTUALWAYSWHENWHERE +// CURSIVEABORTAFTERENAMEANDROPARTITIONAUTOINCREMENTCASTCOLUMN +// COMMITCONFLICTCROSSCURRENT_TIMESTAMPRECEDINGFAILASTFILTER +// EPLACEFIRSTFOLLOWINGFROMFULLIMITIFORDERESTRICTOTHERSOVER +// ETURNINGRIGHTROLLBACKROWSUNBOUNDEDUNIONUSINGVACUUMVIEWINDOWBY +// INITIALLYPRIMARY +var zKWText = [666]uint8{ + uint8('R'), uint8('E'), uint8('I'), uint8('N'), uint8('D'), uint8('E'), uint8('X'), uint8('E'), uint8('D'), uint8('E'), uint8('S'), uint8('C'), uint8('A'), uint8('P'), uint8('E'), uint8('A'), uint8('C'), uint8('H'), + uint8('E'), uint8('C'), uint8('K'), uint8('E'), uint8('Y'), uint8('B'), uint8('E'), uint8('F'), uint8('O'), uint8('R'), uint8('E'), uint8('I'), uint8('G'), uint8('N'), uint8('O'), uint8('R'), uint8('E'), uint8('G'), + uint8('E'), uint8('X'), uint8('P'), uint8('L'), uint8('A'), uint8('I'), uint8('N'), uint8('S'), uint8('T'), uint8('E'), uint8('A'), uint8('D'), uint8('D'), uint8('A'), uint8('T'), uint8('A'), uint8('B'), uint8('A'), + uint8('S'), uint8('E'), uint8('L'), uint8('E'), uint8('C'), uint8('T'), uint8('A'), uint8('B'), uint8('L'), uint8('E'), uint8('F'), uint8('T'), uint8('H'), uint8('E'), uint8('N'), uint8('D'), uint8('E'), uint8('F'), + uint8('E'), uint8('R'), uint8('R'), uint8('A'), uint8('B'), uint8('L'), uint8('E'), uint8('L'), uint8('S'), uint8('E'), uint8('X'), uint8('C'), uint8('L'), uint8('U'), uint8('D'), uint8('E'), uint8('L'), uint8('E'), + uint8('T'), uint8('E'), uint8('M'), uint8('P'), uint8('O'), uint8('R'), uint8('A'), uint8('R'), uint8('Y'), uint8('I'), uint8('S'), uint8('N'), uint8('U'), uint8('L'), uint8('L'), uint8('S'), uint8('A'), uint8('V'), + uint8('E'), uint8('P'), uint8('O'), uint8('I'), uint8('N'), uint8('T'), uint8('E'), uint8('R'), uint8('S'), uint8('E'), uint8('C'), uint8('T'), uint8('I'), uint8('E'), uint8('S'), uint8('N'), uint8('O'), uint8('T'), + uint8('N'), uint8('U'), uint8('L'), uint8('L'), uint8('I'), uint8('K'), uint8('E'), uint8('X'), uint8('C'), uint8('E'), uint8('P'), uint8('T'), uint8('R'), uint8('A'), uint8('N'), uint8('S'), uint8('A'), uint8('C'), + uint8('T'), uint8('I'), uint8('O'), uint8('N'), uint8('A'), uint8('T'), uint8('U'), uint8('R'), uint8('A'), uint8('L'), uint8('T'), uint8('E'), uint8('R'), uint8('A'), uint8('I'), uint8('S'), uint8('E'), uint8('X'), + uint8('C'), uint8('L'), uint8('U'), uint8('S'), uint8('I'), uint8('V'), uint8('E'), uint8('X'), uint8('I'), uint8('S'), uint8('T'), uint8('S'), uint8('C'), uint8('O'), uint8('N'), uint8('S'), uint8('T'), uint8('R'), + uint8('A'), uint8('I'), uint8('N'), uint8('T'), uint8('O'), uint8('F'), uint8('F'), uint8('S'), uint8('E'), uint8('T'), uint8('R'), uint8('I'), uint8('G'), uint8('G'), uint8('E'), uint8('R'), uint8('A'), uint8('N'), + uint8('G'), uint8('E'), uint8('N'), uint8('E'), uint8('R'), uint8('A'), uint8('T'), uint8('E'), uint8('D'), uint8('E'), uint8('T'), uint8('A'), uint8('C'), uint8('H'), uint8('A'), uint8('V'), uint8('I'), uint8('N'), + uint8('G'), uint8('L'), uint8('O'), uint8('B'), uint8('E'), uint8('G'), uint8('I'), uint8('N'), uint8('N'), uint8('E'), uint8('R'), uint8('E'), uint8('F'), uint8('E'), uint8('R'), uint8('E'), uint8('N'), uint8('C'), + uint8('E'), uint8('S'), uint8('U'), uint8('N'), uint8('I'), uint8('Q'), uint8('U'), uint8('E'), uint8('R'), uint8('Y'), uint8('W'), uint8('I'), uint8('T'), uint8('H'), uint8('O'), uint8('U'), uint8('T'), uint8('E'), + uint8('R'), uint8('E'), uint8('L'), uint8('E'), uint8('A'), uint8('S'), uint8('E'), uint8('A'), uint8('T'), uint8('T'), uint8('A'), uint8('C'), uint8('H'), uint8('B'), uint8('E'), uint8('T'), uint8('W'), uint8('E'), + uint8('E'), uint8('N'), uint8('O'), uint8('T'), uint8('H'), uint8('I'), uint8('N'), uint8('G'), uint8('R'), uint8('O'), uint8('U'), uint8('P'), uint8('S'), uint8('C'), uint8('A'), uint8('S'), uint8('C'), uint8('A'), + uint8('D'), uint8('E'), uint8('F'), uint8('A'), uint8('U'), uint8('L'), uint8('T'), uint8('C'), uint8('A'), uint8('S'), uint8('E'), uint8('C'), uint8('O'), uint8('L'), uint8('L'), uint8('A'), uint8('T'), uint8('E'), + uint8('C'), uint8('R'), uint8('E'), uint8('A'), uint8('T'), uint8('E'), uint8('C'), uint8('U'), uint8('R'), uint8('R'), uint8('E'), uint8('N'), uint8('T'), uint8('_'), uint8('D'), uint8('A'), uint8('T'), uint8('E'), + uint8('I'), uint8('M'), uint8('M'), uint8('E'), uint8('D'), uint8('I'), uint8('A'), uint8('T'), uint8('E'), uint8('J'), uint8('O'), uint8('I'), uint8('N'), uint8('S'), uint8('E'), uint8('R'), uint8('T'), uint8('M'), + uint8('A'), uint8('T'), uint8('C'), uint8('H'), uint8('P'), uint8('L'), uint8('A'), uint8('N'), uint8('A'), uint8('L'), uint8('Y'), uint8('Z'), uint8('E'), uint8('P'), uint8('R'), uint8('A'), uint8('G'), uint8('M'), + uint8('A'), uint8('T'), uint8('E'), uint8('R'), uint8('I'), uint8('A'), uint8('L'), uint8('I'), uint8('Z'), uint8('E'), uint8('D'), uint8('E'), uint8('F'), uint8('E'), uint8('R'), uint8('R'), uint8('E'), uint8('D'), + uint8('I'), uint8('S'), uint8('T'), uint8('I'), uint8('N'), uint8('C'), uint8('T'), uint8('U'), uint8('P'), uint8('D'), uint8('A'), uint8('T'), uint8('E'), uint8('V'), uint8('A'), uint8('L'), uint8('U'), uint8('E'), + uint8('S'), uint8('V'), uint8('I'), uint8('R'), uint8('T'), uint8('U'), uint8('A'), uint8('L'), uint8('W'), uint8('A'), uint8('Y'), uint8('S'), uint8('W'), uint8('H'), uint8('E'), uint8('N'), uint8('W'), uint8('H'), + uint8('E'), uint8('R'), uint8('E'), uint8('C'), uint8('U'), uint8('R'), uint8('S'), uint8('I'), uint8('V'), uint8('E'), uint8('A'), uint8('B'), uint8('O'), uint8('R'), uint8('T'), uint8('A'), uint8('F'), uint8('T'), + uint8('E'), uint8('R'), uint8('E'), uint8('N'), uint8('A'), uint8('M'), uint8('E'), uint8('A'), uint8('N'), uint8('D'), uint8('R'), uint8('O'), uint8('P'), uint8('A'), uint8('R'), uint8('T'), uint8('I'), uint8('T'), + uint8('I'), uint8('O'), uint8('N'), uint8('A'), uint8('U'), uint8('T'), uint8('O'), uint8('I'), uint8('N'), uint8('C'), uint8('R'), uint8('E'), uint8('M'), uint8('E'), uint8('N'), uint8('T'), uint8('C'), uint8('A'), + uint8('S'), uint8('T'), uint8('C'), uint8('O'), uint8('L'), uint8('U'), uint8('M'), uint8('N'), uint8('C'), uint8('O'), uint8('M'), uint8('M'), uint8('I'), uint8('T'), uint8('C'), uint8('O'), uint8('N'), uint8('F'), + uint8('L'), uint8('I'), uint8('C'), uint8('T'), uint8('C'), uint8('R'), uint8('O'), uint8('S'), uint8('S'), uint8('C'), uint8('U'), uint8('R'), uint8('R'), uint8('E'), uint8('N'), uint8('T'), uint8('_'), uint8('T'), + uint8('I'), uint8('M'), uint8('E'), uint8('S'), uint8('T'), uint8('A'), uint8('M'), uint8('P'), uint8('R'), uint8('E'), uint8('C'), uint8('E'), uint8('D'), uint8('I'), uint8('N'), uint8('G'), uint8('F'), uint8('A'), + uint8('I'), uint8('L'), uint8('A'), uint8('S'), uint8('T'), uint8('F'), uint8('I'), uint8('L'), uint8('T'), uint8('E'), uint8('R'), uint8('E'), uint8('P'), uint8('L'), uint8('A'), uint8('C'), uint8('E'), uint8('F'), + uint8('I'), uint8('R'), uint8('S'), uint8('T'), uint8('F'), uint8('O'), uint8('L'), uint8('L'), uint8('O'), uint8('W'), uint8('I'), uint8('N'), uint8('G'), uint8('F'), uint8('R'), uint8('O'), uint8('M'), uint8('F'), + uint8('U'), uint8('L'), uint8('L'), uint8('I'), uint8('M'), uint8('I'), uint8('T'), uint8('I'), uint8('F'), uint8('O'), uint8('R'), uint8('D'), uint8('E'), uint8('R'), uint8('E'), uint8('S'), uint8('T'), uint8('R'), + uint8('I'), uint8('C'), uint8('T'), uint8('O'), uint8('T'), uint8('H'), uint8('E'), uint8('R'), uint8('S'), uint8('O'), uint8('V'), uint8('E'), uint8('R'), uint8('E'), uint8('T'), uint8('U'), uint8('R'), uint8('N'), + uint8('I'), uint8('N'), uint8('G'), uint8('R'), uint8('I'), uint8('G'), uint8('H'), uint8('T'), uint8('R'), uint8('O'), uint8('L'), uint8('L'), uint8('B'), uint8('A'), uint8('C'), uint8('K'), uint8('R'), uint8('O'), + uint8('W'), uint8('S'), uint8('U'), uint8('N'), uint8('B'), uint8('O'), uint8('U'), uint8('N'), uint8('D'), uint8('E'), uint8('D'), uint8('U'), uint8('N'), uint8('I'), uint8('O'), uint8('N'), uint8('U'), uint8('S'), + uint8('I'), uint8('N'), uint8('G'), uint8('V'), uint8('A'), uint8('C'), uint8('U'), uint8('U'), uint8('M'), uint8('V'), uint8('I'), uint8('E'), uint8('W'), uint8('I'), uint8('N'), uint8('D'), uint8('O'), uint8('W'), + uint8('B'), uint8('Y'), uint8('I'), uint8('N'), uint8('I'), uint8('T'), uint8('I'), uint8('A'), uint8('L'), uint8('L'), uint8('Y'), uint8('P'), uint8('R'), uint8('I'), uint8('M'), uint8('A'), uint8('R'), uint8('Y'), +} /* sqlite3.c:166865:19 */ +// aKWHash[i] is the hash value for the i-th keyword +var aKWHash = [127]uint8{ + uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), + uint8(53), uint8(35), uint8(86), uint8(15), uint8(0), uint8(42), uint8(97), uint8(54), uint8(89), uint8(135), uint8(19), uint8(0), uint8(0), + uint8(140), uint8(0), uint8(40), uint8(129), uint8(0), uint8(22), uint8(107), uint8(0), uint8(9), uint8(0), uint8(0), uint8(123), uint8(80), + uint8(0), uint8(78), uint8(6), uint8(0), uint8(65), uint8(103), uint8(147), uint8(0), uint8(136), uint8(115), uint8(0), uint8(0), uint8(48), + uint8(0), uint8(90), uint8(24), uint8(0), uint8(17), uint8(0), uint8(27), uint8(70), uint8(23), uint8(26), uint8(5), uint8(60), uint8(142), + uint8(110), uint8(122), uint8(0), uint8(73), uint8(91), uint8(71), uint8(145), uint8(61), uint8(120), uint8(74), uint8(0), uint8(49), uint8(0), + uint8(11), uint8(41), uint8(0), uint8(113), uint8(0), uint8(0), uint8(0), uint8(109), uint8(10), uint8(111), uint8(116), uint8(125), uint8(14), + uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), + uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), + uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), +} /* sqlite3.c:166905:28 */ +// aKWNext[] forms the hash collision chain. If aKWHash[i]==0 +// then the i-th keyword has no more hash collisions. Otherwise, +// the next keyword with the same hash is aKWHash[i]-1. +var aKWNext = [147]uint8{ + uint8(0), uint8(0), uint8(0), uint8(0), uint8(4), uint8(0), uint8(43), uint8(0), uint8(0), uint8(106), uint8(114), uint8(0), uint8(0), + uint8(0), uint8(2), uint8(0), uint8(0), uint8(143), uint8(0), uint8(0), uint8(0), uint8(13), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(141), uint8(0), uint8(0), uint8(119), uint8(52), uint8(0), uint8(0), uint8(137), uint8(12), uint8(0), uint8(0), uint8(62), uint8(0), + uint8(138), uint8(0), uint8(133), uint8(0), uint8(0), uint8(36), uint8(0), uint8(0), uint8(28), uint8(77), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(59), uint8(0), uint8(47), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(69), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(146), uint8(3), uint8(0), uint8(58), uint8(0), uint8(1), + uint8(75), uint8(0), uint8(0), uint8(0), uint8(31), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(127), uint8(0), uint8(104), + uint8(0), uint8(64), uint8(66), uint8(63), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(46), uint8(0), uint8(16), uint8(8), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(81), uint8(101), uint8(0), + uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), + uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), + uint8(102), uint8(0), uint8(0), uint8(87), +} /* sqlite3.c:166920:28 */ +// aKWLen[i] is the length (in bytes) of the i-th keyword +var aKWLen = [147]uint8{ + uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), + uint8(7), uint8(7), uint8(3), uint8(8), uint8(2), uint8(6), uint8(5), uint8(4), uint8(4), uint8(3), uint8(10), uint8(4), uint8(7), + uint8(6), uint8(9), uint8(4), uint8(2), uint8(6), uint8(5), uint8(9), uint8(9), uint8(4), uint8(7), uint8(3), uint8(2), uint8(4), + uint8(4), uint8(6), uint8(11), uint8(6), uint8(2), uint8(7), uint8(5), uint8(5), uint8(9), uint8(6), uint8(10), uint8(4), uint8(6), + uint8(2), uint8(3), uint8(7), uint8(5), uint8(9), uint8(6), uint8(6), uint8(4), uint8(5), uint8(5), uint8(10), uint8(6), uint8(5), + uint8(7), uint8(4), uint8(5), uint8(7), uint8(6), uint8(7), uint8(7), uint8(6), uint8(5), uint8(7), uint8(3), uint8(7), uint8(4), + uint8(7), uint8(6), uint8(12), uint8(9), uint8(4), uint8(6), uint8(5), uint8(4), uint8(7), uint8(6), uint8(12), uint8(8), uint8(8), + uint8(2), uint8(6), uint8(6), uint8(7), uint8(6), uint8(4), uint8(5), uint8(9), uint8(5), uint8(5), uint8(6), uint8(3), uint8(4), + uint8(9), uint8(13), uint8(2), uint8(2), uint8(4), uint8(6), uint8(6), uint8(8), uint8(5), uint8(17), uint8(12), uint8(7), uint8(9), + uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), + uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), + uint8(2), uint8(9), uint8(3), uint8(7), +} /* sqlite3.c:166935:28 */ +// aKWOffset[i] is the index into zKWText[] of the start of +// the text for the i-th keyword. +var aKWOffset = [147]uint16{ + uint16(0), uint16(2), uint16(2), uint16(8), uint16(9), uint16(14), uint16(16), uint16(20), uint16(23), uint16(25), uint16(25), uint16(29), uint16(33), + uint16(36), uint16(41), uint16(46), uint16(48), uint16(53), uint16(54), uint16(59), uint16(62), uint16(65), uint16(67), uint16(69), uint16(78), uint16(81), + uint16(86), uint16(90), uint16(90), uint16(94), uint16(99), uint16(101), uint16(105), uint16(111), uint16(119), uint16(123), uint16(123), uint16(123), uint16(126), + uint16(129), uint16(132), uint16(137), uint16(142), uint16(146), uint16(147), uint16(152), uint16(156), uint16(160), uint16(168), uint16(174), uint16(181), uint16(184), + uint16(184), uint16(187), uint16(189), uint16(195), uint16(198), uint16(206), uint16(211), uint16(216), uint16(219), uint16(222), uint16(226), uint16(236), uint16(239), + uint16(244), uint16(244), uint16(248), uint16(252), uint16(259), uint16(265), uint16(271), uint16(277), uint16(277), uint16(283), uint16(284), uint16(288), uint16(295), + uint16(299), uint16(306), uint16(312), uint16(324), uint16(333), uint16(335), uint16(341), uint16(346), uint16(348), uint16(355), uint16(359), uint16(370), uint16(377), + uint16(378), uint16(385), uint16(391), uint16(397), uint16(402), uint16(408), uint16(412), uint16(415), uint16(424), uint16(429), uint16(433), uint16(439), uint16(441), + uint16(444), uint16(453), uint16(455), uint16(457), uint16(466), uint16(470), uint16(476), uint16(482), uint16(490), uint16(495), uint16(495), uint16(495), uint16(511), + uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), + uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), + uint16(648), uint16(650), uint16(655), uint16(659), +} /* sqlite3.c:166951:33 */ +// aKWCode[i] is the parser symbol code for the i-th keyword +var aKWCode = [147]uint8{ + uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), + uint8(TK_EACH), uint8(TK_CHECK), uint8(TK_KEY), uint8(TK_BEFORE), uint8(TK_FOREIGN), + uint8(TK_FOR), uint8(TK_IGNORE), uint8(TK_LIKE_KW), uint8(TK_EXPLAIN), uint8(TK_INSTEAD), + uint8(TK_ADD), uint8(TK_DATABASE), uint8(TK_AS), uint8(TK_SELECT), uint8(TK_TABLE), + uint8(TK_JOIN_KW), uint8(TK_THEN), uint8(TK_END), uint8(TK_DEFERRABLE), uint8(TK_ELSE), + uint8(TK_EXCLUDE), uint8(TK_DELETE), uint8(TK_TEMP), uint8(TK_TEMP), uint8(TK_OR), + uint8(TK_ISNULL), uint8(TK_NULLS), uint8(TK_SAVEPOINT), uint8(TK_INTERSECT), uint8(TK_TIES), + uint8(TK_NOTNULL), uint8(TK_NOT), uint8(TK_NO), uint8(TK_NULL), uint8(TK_LIKE_KW), + uint8(TK_EXCEPT), uint8(TK_TRANSACTION), uint8(TK_ACTION), uint8(TK_ON), uint8(TK_JOIN_KW), + uint8(TK_ALTER), uint8(TK_RAISE), uint8(TK_EXCLUSIVE), uint8(TK_EXISTS), uint8(TK_CONSTRAINT), + uint8(TK_INTO), uint8(TK_OFFSET), uint8(TK_OF), uint8(TK_SET), uint8(TK_TRIGGER), + uint8(TK_RANGE), uint8(TK_GENERATED), uint8(TK_DETACH), uint8(TK_HAVING), uint8(TK_LIKE_KW), + uint8(TK_BEGIN), uint8(TK_JOIN_KW), uint8(TK_REFERENCES), uint8(TK_UNIQUE), uint8(TK_QUERY), + uint8(TK_WITHOUT), uint8(TK_WITH), uint8(TK_JOIN_KW), uint8(TK_RELEASE), uint8(TK_ATTACH), + uint8(TK_BETWEEN), uint8(TK_NOTHING), uint8(TK_GROUPS), uint8(TK_GROUP), uint8(TK_CASCADE), + uint8(TK_ASC), uint8(TK_DEFAULT), uint8(TK_CASE), uint8(TK_COLLATE), uint8(TK_CREATE), + uint8(TK_CTIME_KW), uint8(TK_IMMEDIATE), uint8(TK_JOIN), uint8(TK_INSERT), uint8(TK_MATCH), + uint8(TK_PLAN), uint8(TK_ANALYZE), uint8(TK_PRAGMA), uint8(TK_MATERIALIZED), uint8(TK_DEFERRED), + uint8(TK_DISTINCT), uint8(TK_IS), uint8(TK_UPDATE), uint8(TK_VALUES), uint8(TK_VIRTUAL), + uint8(TK_ALWAYS), uint8(TK_WHEN), uint8(TK_WHERE), uint8(TK_RECURSIVE), uint8(TK_ABORT), + uint8(TK_AFTER), uint8(TK_RENAME), uint8(TK_AND), uint8(TK_DROP), uint8(TK_PARTITION), + uint8(TK_AUTOINCR), uint8(TK_TO), uint8(TK_IN), uint8(TK_CAST), uint8(TK_COLUMNKW), + uint8(TK_COMMIT), uint8(TK_CONFLICT), uint8(TK_JOIN_KW), uint8(TK_CTIME_KW), uint8(TK_CTIME_KW), + uint8(TK_CURRENT), uint8(TK_PRECEDING), uint8(TK_FAIL), uint8(TK_LAST), uint8(TK_FILTER), + uint8(TK_REPLACE), uint8(TK_FIRST), uint8(TK_FOLLOWING), uint8(TK_FROM), uint8(TK_JOIN_KW), + uint8(TK_LIMIT), uint8(TK_IF), uint8(TK_ORDER), uint8(TK_RESTRICT), uint8(TK_OTHERS), + uint8(TK_OVER), uint8(TK_RETURNING), uint8(TK_JOIN_KW), uint8(TK_ROLLBACK), uint8(TK_ROWS), + uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), + uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), + uint8(TK_ALL), uint8(TK_PRIMARY), +} /* sqlite3.c:166966:28 */ + +// Hash table decoded: +// 0: INSERT +// 1: IS +// 2: ROLLBACK TRIGGER +// 3: IMMEDIATE +// 4: PARTITION +// 5: TEMP +// 6: +// 7: +// 8: VALUES WITHOUT +// 9: +// 10: MATCH +// 11: NOTHING +// 12: +// 13: OF +// 14: TIES IGNORE +// 15: PLAN +// 16: INSTEAD INDEXED +// 17: +// 18: TRANSACTION RIGHT +// 19: WHEN +// 20: SET HAVING +// 21: MATERIALIZED IF +// 22: ROWS +// 23: SELECT +// 24: +// 25: +// 26: VACUUM SAVEPOINT +// 27: +// 28: LIKE UNION VIRTUAL REFERENCES +// 29: RESTRICT +// 30: +// 31: THEN REGEXP +// 32: TO +// 33: +// 34: BEFORE +// 35: +// 36: +// 37: FOLLOWING COLLATE CASCADE +// 38: CREATE +// 39: +// 40: CASE REINDEX +// 41: EACH +// 42: +// 43: QUERY +// 44: AND ADD +// 45: PRIMARY ANALYZE +// 46: +// 47: ROW ASC DETACH +// 48: CURRENT_TIME CURRENT_DATE +// 49: +// 50: +// 51: EXCLUSIVE TEMPORARY +// 52: +// 53: DEFERRED +// 54: DEFERRABLE +// 55: +// 56: DATABASE +// 57: +// 58: DELETE VIEW GENERATED +// 59: ATTACH +// 60: END +// 61: EXCLUDE +// 62: ESCAPE DESC +// 63: GLOB +// 64: WINDOW ELSE +// 65: COLUMN +// 66: FIRST +// 67: +// 68: GROUPS ALL +// 69: DISTINCT DROP KEY +// 70: BETWEEN +// 71: INITIALLY +// 72: BEGIN +// 73: FILTER CHECK ACTION +// 74: GROUP INDEX +// 75: +// 76: EXISTS DEFAULT +// 77: +// 78: FOR CURRENT_TIMESTAMP +// 79: EXCEPT +// 80: +// 81: CROSS +// 82: +// 83: +// 84: +// 85: CAST +// 86: FOREIGN AUTOINCREMENT +// 87: COMMIT +// 88: CURRENT AFTER ALTER +// 89: FULL FAIL CONFLICT +// 90: EXPLAIN +// 91: CONSTRAINT +// 92: FROM ALWAYS +// 93: +// 94: ABORT +// 95: +// 96: AS DO +// 97: REPLACE WITH RELEASE +// 98: BY RENAME +// 99: RANGE RAISE +// 100: OTHERS +// 101: USING NULLS +// 102: PRAGMA +// 103: JOIN ISNULL OFFSET +// 104: NOT +// 105: OR LAST LEFT +// 106: LIMIT +// 107: +// 108: +// 109: IN +// 110: INTO +// 111: OVER RECURSIVE +// 112: ORDER OUTER +// 113: +// 114: INTERSECT UNBOUNDED +// 115: +// 116: +// 117: RETURNING ON +// 118: +// 119: WHERE +// 120: NO INNER +// 121: NULL +// 122: +// 123: TABLE +// 124: NATURAL NOTNULL +// 125: PRECEDING +// 126: UPDATE UNIQUE +// Check to see if z[0..n-1] is a keyword. If it is, write the +// parser symbol code for that keyword into *pType. Always +// return the integer n (the length of the token). +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ + var i int32 + var j int32 + var zKW uintptr + if n >= 2 { + i = (int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z)))])*4 ^ int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(n-1))))])*3 ^ n*1) % 127 + for i = int32(aKWHash[i]) - 1; i >= 0; i = int32(aKWNext[i]) - 1 { + if int32(aKWLen[i]) != n { + continue + } + zKW = uintptr(unsafe.Pointer(&zKWText)) + uintptr(aKWOffset[i]) + if int32(*(*uint8)(unsafe.Pointer(z)))&libc.CplInt32(0x20) != int32(*(*uint8)(unsafe.Pointer(zKW))) { + continue + } + if int32(*(*uint8)(unsafe.Pointer(z + 1)))&libc.CplInt32(0x20) != int32(*(*uint8)(unsafe.Pointer(zKW + 1))) { + continue + } + j = 2 + for j < n && int32(*(*uint8)(unsafe.Pointer(z + uintptr(j))))&libc.CplInt32(0x20) == int32(*(*uint8)(unsafe.Pointer(zKW + uintptr(j)))) { + j++ + } + if j < n { + continue + } + // REINDEX + // INDEXED + // INDEX + // DESC + // ESCAPE + // EACH + // CHECK + // KEY + // BEFORE + // FOREIGN + // FOR + // IGNORE + // REGEXP + // EXPLAIN + // INSTEAD + // ADD + // DATABASE + // AS + // SELECT + // TABLE + // LEFT + // THEN + // END + // DEFERRABLE + // ELSE + // EXCLUDE + // DELETE + // TEMPORARY + // TEMP + // OR + // ISNULL + // NULLS + // SAVEPOINT + // INTERSECT + // TIES + // NOTNULL + // NOT + // NO + // NULL + // LIKE + // EXCEPT + // TRANSACTION + // ACTION + // ON + // NATURAL + // ALTER + // RAISE + // EXCLUSIVE + // EXISTS + // CONSTRAINT + // INTO + // OFFSET + // OF + // SET + // TRIGGER + // RANGE + // GENERATED + // DETACH + // HAVING + // GLOB + // BEGIN + // INNER + // REFERENCES + // UNIQUE + // QUERY + // WITHOUT + // WITH + // OUTER + // RELEASE + // ATTACH + // BETWEEN + // NOTHING + // GROUPS + // GROUP + // CASCADE + // ASC + // DEFAULT + // CASE + // COLLATE + // CREATE + // CURRENT_DATE + // IMMEDIATE + // JOIN + // INSERT + // MATCH + // PLAN + // ANALYZE + // PRAGMA + // MATERIALIZED + // DEFERRED + // DISTINCT + // IS + // UPDATE + // VALUES + // VIRTUAL + // ALWAYS + // WHEN + // WHERE + // RECURSIVE + // ABORT + // AFTER + // RENAME + // AND + // DROP + // PARTITION + // AUTOINCREMENT + // TO + // IN + // CAST + // COLUMN + // COMMIT + // CONFLICT + // CROSS + // CURRENT_TIMESTAMP + // CURRENT_TIME + // CURRENT + // PRECEDING + // FAIL + // LAST + // FILTER + // REPLACE + // FIRST + // FOLLOWING + // FROM + // FULL + // LIMIT + // IF + // ORDER + // RESTRICT + // OTHERS + // OVER + // RETURNING + // RIGHT + // ROLLBACK + // ROWS + // ROW + // UNBOUNDED + // UNION + // USING + // VACUUM + // VIEW + // WINDOW + // DO + // BY + // INITIALLY + // ALL + // PRIMARY + *(*int32)(unsafe.Pointer(pType)) = int32(aKWCode[i]) + break + } + } + return n +} + +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* id */)) = TK_ID + keywordCode(tls, z, n, bp) + return *(*int32)(unsafe.Pointer(bp /* id */)) +} + +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ + if i < 0 || i >= SQLITE_N_KEYWORD { + return SQLITE_ERROR + } + *(*uintptr)(unsafe.Pointer(pzName)) = uintptr(unsafe.Pointer(&zKWText)) + uintptr(aKWOffset[i]) + *(*int32)(unsafe.Pointer(pnName)) = int32(aKWLen[i]) + return SQLITE_OK +} + +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ + return SQLITE_N_KEYWORD +} + +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ + return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) +} + +//************* End of keywordhash.h **************************************** +//************* Continuing where we left off in tokenize.c ****************** + +// If X is a character that can be used in an identifier then +// IdChar(X) will be true. Otherwise it is false. +// +// For ASCII, any character with the high-order bit set is +// allowed in an identifier. For 7-bit characters, +// sqlite3IsIdChar[X] must be 1. +// +// For EBCDIC, the rules are more complex but have the same +// end result. +// +// Ticket #1066. the SQL standard does not allow '$' in the +// middle of identifiers. But many SQL implementations do. +// SQLite will allow '$' in identifiers for compatibility. +// But the feature is undocumented. + +// Make the IdChar function accessible from ctime.c and alter.c +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ + return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) +} + +// Return the id of the next token in string (*pz). Before returning, set +// (*pz) to point to the byte following the parsed token. +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) + // var t int32 at bp, 4 + // Token type to return + for __ccgo := true; __ccgo; __ccgo = *(*int32)(unsafe.Pointer(bp)) == TK_SPACE { + z += uintptr(Xsqlite3GetToken(tls, z, bp)) + } + if *(*int32)(unsafe.Pointer(bp)) == TK_ID || + *(*int32)(unsafe.Pointer(bp)) == TK_STRING || + *(*int32)(unsafe.Pointer(bp)) == TK_JOIN_KW || + *(*int32)(unsafe.Pointer(bp)) == TK_WINDOW || + *(*int32)(unsafe.Pointer(bp)) == TK_OVER || + Xsqlite3ParserFallback(tls, *(*int32)(unsafe.Pointer(bp))) == TK_ID { + *(*int32)(unsafe.Pointer(bp /* t */)) = TK_ID + } + *(*uintptr)(unsafe.Pointer(pz)) = z + return *(*int32)(unsafe.Pointer(bp /* t */)) +} + +// The following three functions are called immediately after the tokenizer +// reads the keywords WINDOW, OVER and FILTER, respectively, to determine +// whether the token should be treated as a keyword or an SQL identifier. +// This cannot be handled by the usual lemon %fallback method, due to +// the ambiguity in some constructions. e.g. +// +// SELECT sum(x) OVER ... +// +// In the above, "OVER" might be a keyword, or it might be an alias for the +// sum(x) expression. If a "%fallback ID OVER" directive were added to +// grammar, then SQLite would always treat "OVER" as an alias, making it +// impossible to call a window-function without a FILTER clause. +// +// WINDOW is treated as a keyword if: +// +// * the following token is an identifier, or a keyword that can fallback +// to being an identifier, and +// * the token after than one is TK_AS. +// +// OVER is a keyword if: +// +// * the previous token was TK_RP, and +// * the next token is either TK_LP or an identifier. +// +// FILTER is a keyword if: +// +// * the previous token was TK_RP, and +// * the next token is TK_LP. +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = z + + var t int32 + t = getToken(tls, bp) + if t != TK_ID { + return TK_ID + } + t = getToken(tls, bp) + if t != TK_AS { + return TK_ID + } + return TK_WINDOW +} + +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = z + + if lastToken == TK_RP { + var t int32 = getToken(tls, bp) + if t == TK_LP || t == TK_ID { + return TK_OVER + } + } + return TK_ID +} + +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = z + + if lastToken == TK_RP && getToken(tls, bp) == TK_LP { + return TK_FILTER + } + return TK_ID +} + +// Return the length (in bytes) of the token that begins at z[0]. +// Store the token type in *tokenType before returning. +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ + var i int32 + var c int32 + switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte + // of the token. See the comment on the CC_ defines + // above. + case CC_SPACE: + { + + for i = 1; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x01 != 0; i++ { + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE + return i + + } + case CC_MINUS: + { + if int32(*(*uint8)(unsafe.Pointer(z + 1))) == '-' { + for i = 2; libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) != 0 && c != '\n'; i++ { + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE // IMP: R-22934-25134 + return i + } else if int32(*(*uint8)(unsafe.Pointer(z + 1))) == '>' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_PTR + return 2 + libc.Bool32(int32(*(*uint8)(unsafe.Pointer(z + 2))) == '>') + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_MINUS + return 1 + + } + case CC_LP: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_LP + return 1 + + } + case CC_RP: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_RP + return 1 + + } + case CC_SEMI: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_SEMI + return 1 + + } + case CC_PLUS: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_PLUS + return 1 + + } + case CC_STAR: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_STAR + return 1 + + } + case CC_SLASH: + { + if int32(*(*uint8)(unsafe.Pointer(z + 1))) != '*' || int32(*(*uint8)(unsafe.Pointer(z + 2))) == 0 { + *(*int32)(unsafe.Pointer(tokenType)) = TK_SLASH + return 1 + } + i = 3 + c = int32(*(*uint8)(unsafe.Pointer(z + 2))) + for ; (c != '*' || int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != '/') && libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) != 0; i++ { + } + if c != 0 { + i++ + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE // IMP: R-22934-25134 + return i + + } + case CC_PERCENT: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_REM + return 1 + + } + case CC_EQ: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_EQ + return 1 + libc.Bool32(int32(*(*uint8)(unsafe.Pointer(z + 1))) == '=') + + } + case CC_LT: + { + if libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + 1)))) == '=' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_LE + return 2 + } else if c == '>' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_NE + return 2 + } else if c == '<' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_LSHIFT + return 2 + } else { + *(*int32)(unsafe.Pointer(tokenType)) = TK_LT + return 1 + } + + } + fallthrough + case CC_GT: + { + if libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + 1)))) == '=' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_GE + return 2 + } else if c == '>' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_RSHIFT + return 2 + } else { + *(*int32)(unsafe.Pointer(tokenType)) = TK_GT + return 1 + } + + } + fallthrough + case CC_BANG: + { + if int32(*(*uint8)(unsafe.Pointer(z + 1))) != '=' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + return 1 + } else { + *(*int32)(unsafe.Pointer(tokenType)) = TK_NE + return 2 + } + + } + fallthrough + case CC_PIPE: + { + if int32(*(*uint8)(unsafe.Pointer(z + 1))) != '|' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_BITOR + return 1 + } else { + *(*int32)(unsafe.Pointer(tokenType)) = TK_CONCAT + return 2 + } + + } + fallthrough + case CC_COMMA: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_COMMA + return 1 + + } + case CC_AND: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_BITAND + return 1 + + } + case CC_TILDA: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_BITNOT + return 1 + + } + case CC_QUOTE: + { + var delim int32 = int32(*(*uint8)(unsafe.Pointer(z))) + + for i = 1; libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) != 0; i++ { + if c == delim { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i+1)))) == delim { + i++ + } else { + break + } + } + } + if c == '\'' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_STRING + return i + 1 + } else if c != 0 { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ID + return i + 1 + } else { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + return i + } + + } + fallthrough + case CC_DOT: + { + if !(int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + 1))])&0x04 != 0) { + *(*int32)(unsafe.Pointer(tokenType)) = TK_DOT + return 1 + } + + } + fallthrough + case CC_DIGIT: + { + + *(*int32)(unsafe.Pointer(tokenType)) = TK_INTEGER + if int32(*(*uint8)(unsafe.Pointer(z))) == '0' && (int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'x' || int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'X') && int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + 2))])&0x08 != 0 { + for i = 3; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x08 != 0; i++ { + } + return i + } + for i = 0; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x04 != 0; i++ { + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == '.' { + i++ + for int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x04 != 0 { + i++ + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_FLOAT + } + if (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == 'e' || int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == 'E') && (int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i+1)))])&0x04 != 0 || + (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i+1)))) == '+' || int32(*(*uint8)(unsafe.Pointer(z + uintptr(i+1)))) == '-') && int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i+2)))])&0x04 != 0) { + i = i + 2 + for int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x04 != 0 { + i++ + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_FLOAT + } + for int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x46 != 0 { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + i++ + } + return i + + } + case CC_QUOTE2: + { + i = 1 + c = int32(*(*uint8)(unsafe.Pointer(z))) + for ; c != ']' && libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) != 0; i++ { + } + *(*int32)(unsafe.Pointer(tokenType)) = func() int32 { + if c == ']' { + return TK_ID + } + return TK_ILLEGAL + }() + return i + + } + case CC_VARNUM: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_VARIABLE + for i = 1; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x04 != 0; i++ { + } + return i + + } + case CC_DOLLAR: + fallthrough + case CC_VARALPHA: + { + var n int32 = 0 + + *(*int32)(unsafe.Pointer(tokenType)) = TK_VARIABLE + for i = 1; libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) != 0; i++ { + if int32(Xsqlite3CtypeMap[uint8(c)])&0x46 != 0 { + n++ + } else if c == '(' && n > 0 { + for __ccgo := true; __ccgo; __ccgo = libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) != 0 && !(int32(Xsqlite3CtypeMap[uint8(c)])&0x01 != 0) && c != ')' { + i++ + } + if c == ')' { + i++ + } else { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + } + break + } else if c == ':' && int32(*(*uint8)(unsafe.Pointer(z + uintptr(i+1)))) == ':' { + i++ + } else { + break + } + } + if n == 0 { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + } + return i + + } + case CC_KYWD0: + { + for i = 1; int32(aiClass[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) <= CC_KYWD; i++ { + } + if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x46 != 0 { + // This token started out using characters that can appear in keywords, + // but z[i] is a character not allowed within keywords, so this must + // be an identifier instead + i++ + break + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_ID + return keywordCode(tls, z, i, tokenType) + + } + case CC_X: + { + + if int32(*(*uint8)(unsafe.Pointer(z + 1))) == '\'' { + *(*int32)(unsafe.Pointer(tokenType)) = TK_BLOB + for i = 2; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x08 != 0; i++ { + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != '\'' || i%2 != 0 { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + for *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != '\'' { + i++ + } + } + if *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 { + i++ + } + return i + } + + } + fallthrough + case CC_KYWD: + fallthrough + case CC_ID: + { + i = 1 + break + + } + case CC_BOM: + { + if int32(*(*uint8)(unsafe.Pointer(z + 1))) == 0xbb && int32(*(*uint8)(unsafe.Pointer(z + 2))) == 0xbf { + *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE + return 3 + } + i = 1 + break + + } + case CC_NUL: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + return 0 + + } + default: + { + *(*int32)(unsafe.Pointer(tokenType)) = TK_ILLEGAL + return 1 + + } + } + for int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))])&0x46 != 0 { + i++ + } + *(*int32)(unsafe.Pointer(tokenType)) = TK_ID + return i +} + +// Run the parser on the given SQL string. +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ + bp := tls.Alloc(2480) + defer tls.Free(2480) + + var nErr int32 = 0 // Number of errors encountered + var pEngine uintptr // The LEMON-generated LALR(1) parser + var n int32 = 0 // Length of the next token token + // var tokenType int32 at bp+2456, 4 + // type of the next token + var lastTokenParsed int32 = -1 // type of the previous token + var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection + var mxSqlLen int32 // Max length of an SQL string + var pParentParse uintptr = uintptr(0) // Outer parse context, if any + // var sEngine YyParser at bp+32, 2424 + // Space to hold the Lemon-generated Parser object + + mxSqlLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) + if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive == 0 { + libc.AtomicStoreNInt32(db+432, int32(0), 0) + } + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_OK + (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql + pEngine = bp + 32 /* &sEngine */ + Xsqlite3ParserInit(tls, pEngine, pParse) + + pParentParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse + (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse + for 1 != 0 { + n = Xsqlite3GetToken(tls, zSql, bp+2456) + mxSqlLen = mxSqlLen - n + if mxSqlLen < 0 { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_TOOBIG + break + } + if *(*int32)(unsafe.Pointer(bp + 2456)) >= TK_WINDOW { + + if libc.AtomicLoadNInt32(db+432, 0) != 0 { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_INTERRUPT + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + break + } + if *(*int32)(unsafe.Pointer(bp + 2456)) == TK_SPACE { + zSql += uintptr(n) + continue + } + if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 { + // Upon reaching the end of input, call the parser two more times + // with tokens TK_SEMI and 0, in that order. + if lastTokenParsed == TK_SEMI { + *(*int32)(unsafe.Pointer(bp + 2456 /* tokenType */)) = 0 + } else if lastTokenParsed == 0 { + break + } else { + *(*int32)(unsafe.Pointer(bp + 2456 /* tokenType */)) = TK_SEMI + } + n = 0 + } else if *(*int32)(unsafe.Pointer(bp + 2456)) == TK_WINDOW { + + *(*int32)(unsafe.Pointer(bp + 2456 /* tokenType */)) = analyzeWindowKeyword(tls, zSql+6) + } else if *(*int32)(unsafe.Pointer(bp + 2456)) == TK_OVER { + + *(*int32)(unsafe.Pointer(bp + 2456 /* tokenType */)) = analyzeOverKeyword(tls, zSql+4, lastTokenParsed) + } else if *(*int32)(unsafe.Pointer(bp + 2456)) == TK_FILTER { + + *(*int32)(unsafe.Pointer(bp + 2456 /* tokenType */)) = analyzeFilterKeyword(tls, zSql+6, lastTokenParsed) + } else { + // var x Token at bp+2464, 16 + + (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql + (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) + Xsqlite3ErrorMsg(tls, pParse, ts+23122, libc.VaList(bp, bp+2464)) + break + } + } + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz = zSql + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn = uint32(n) + Xsqlite3Parser(tls, pEngine, *(*int32)(unsafe.Pointer(bp + 2456 /* tokenType */)), (*Parse)(unsafe.Pointer(pParse)).FsLastToken) + lastTokenParsed = *(*int32)(unsafe.Pointer(bp + 2456 /* tokenType */)) + zSql += uintptr(n) + + if (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK { + break + } + } + + Xsqlite3ParserFinalize(tls, pEngine) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + } + if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg != 0 || (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_DONE { + if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3605, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + } + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23147, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + nErr++ + } + (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql + Xsqlite3_free(tls, (*Parse)(unsafe.Pointer(pParse)).FapVtabLock) + + if (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) { + // If the pParse->declareVtab flag is set, do not delete any table + // structure built up in pParse->pNewTable. The calling code (see vtab.c) + // will take responsibility for freeing the Table structure. + Xsqlite3DeleteTable(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) + } + if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { + Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) + } + Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse + + return nErr +} + +//************* End of tokenize.c ******************************************* +//************* Begin file complete.c *************************************** +// 2001 September 15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// An tokenizer for SQL +// +// This file contains C code that implements the sqlite3_complete() API. +// This code used to be part of the tokenizer.c source file. But by +// separating it out, the code will be automatically omitted from +// static links that do not use it. +// #include "sqliteInt.h" + +// This is defined in tokenize.c. We just have to import the definition. + +// Token types used by the sqlite3_complete() routine. See the header +// comments on that procedure for additional information. + +// Return TRUE if the given SQL string ends in a semicolon. +// +// Special handling is require for CREATE TRIGGER statements. +// Whenever the CREATE TRIGGER keywords are seen, the statement +// must end with ";END;". +// +// This implementation uses a state machine with 8 states: +// +// (0) INVALID We have not yet seen a non-whitespace character. +// +// (1) START At the beginning or end of an SQL statement. This routine +// returns 1 if it ends in the START state and 0 if it ends +// in any other state. +// +// (2) NORMAL We are in the middle of statement which ends with a single +// semicolon. +// +// (3) EXPLAIN The keyword EXPLAIN has been seen at the beginning of +// a statement. +// +// (4) CREATE The keyword CREATE has been seen at the beginning of a +// statement, possibly preceded by EXPLAIN and/or followed by +// TEMP or TEMPORARY +// +// (5) TRIGGER We are in the middle of a trigger definition that must be +// ended by a semicolon, the keyword END, and another semicolon. +// +// (6) SEMI We've seen the first semicolon in the ";END;" that occurs at +// the end of a trigger definition. +// +// (7) END We've seen the ";END" of the ";END;" that occurs at the end +// of a trigger definition. +// +// Transitions between states above are determined by tokens extracted +// from the input. The following tokens are significant: +// +// (0) tkSEMI A semicolon. +// (1) tkWS Whitespace. +// (2) tkOTHER Any other SQL token. +// (3) tkEXPLAIN The "explain" keyword. +// (4) tkCREATE The "create" keyword. +// (5) tkTEMP The "temp" or "temporary" keyword. +// (6) tkTRIGGER The "trigger" keyword. +// (7) tkEND The "end" keyword. +// +// Whitespace never causes a state transition and is always ignored. +// This means that a SQL string of all whitespace is invalid. +// +// If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed +// to recognize the end of a trigger can be omitted. All we have to do +// is look for a semicolon that is not part of an string or comment. +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ + var state U8 = U8(0) // Current state, using numbers defined in header comment + var token U8 + + for *(*uint8)(unsafe.Pointer(zSql)) != 0 { + switch int32(*(*uint8)(unsafe.Pointer(zSql))) { + case ';': + { // A semicolon + token = U8(TkSEMI) + break + + } + case ' ': + fallthrough + case '\r': + fallthrough + case '\t': + fallthrough + case '\n': + fallthrough + case '\f': + { // White space is ignored + token = U8(TkWS) + break + + } + case '/': + { // C-style comments + if int32(*(*uint8)(unsafe.Pointer(zSql + 1))) != '*' { + token = U8(TkOTHER) + break + } + zSql += uintptr(2) + for *(*uint8)(unsafe.Pointer(zSql)) != 0 && (int32(*(*uint8)(unsafe.Pointer(zSql))) != '*' || int32(*(*uint8)(unsafe.Pointer(zSql + 1))) != '/') { + zSql++ + } + if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 { + return 0 + } + zSql++ + token = U8(TkWS) + break + + } + case '-': + { // SQL-style comments from "--" to end of line + if int32(*(*uint8)(unsafe.Pointer(zSql + 1))) != '-' { + token = U8(TkOTHER) + break + } + for *(*uint8)(unsafe.Pointer(zSql)) != 0 && int32(*(*uint8)(unsafe.Pointer(zSql))) != '\n' { + zSql++ + } + if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 { + return libc.Bool32(int32(state) == 1) + } + token = U8(TkWS) + break + + } + case '[': + { // Microsoft-style identifiers in [...] + zSql++ + for *(*uint8)(unsafe.Pointer(zSql)) != 0 && int32(*(*uint8)(unsafe.Pointer(zSql))) != ']' { + zSql++ + } + if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 { + return 0 + } + token = U8(TkOTHER) + break + + } + case '`': + fallthrough // Grave-accent quoted symbols used by MySQL + case '"': + fallthrough // single- and double-quoted strings + case '\'': + { + var c int32 = int32(*(*uint8)(unsafe.Pointer(zSql))) + zSql++ + for *(*uint8)(unsafe.Pointer(zSql)) != 0 && int32(*(*uint8)(unsafe.Pointer(zSql))) != c { + zSql++ + } + if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 { + return 0 + } + token = U8(TkOTHER) + break + + } + default: + { + if int32(Xsqlite3CtypeMap[U8(*(*uint8)(unsafe.Pointer(zSql)))])&0x46 != 0 { + // Keywords and unquoted identifiers + var nId int32 + for nId = 1; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zSql + uintptr(nId))))])&0x46 != 0; nId++ { + } + switch int32(*(*uint8)(unsafe.Pointer(zSql))) { + case 'c': + fallthrough + case 'C': + { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23158, 6) == 0 { + token = U8(TkCREATE) + } else { + token = U8(TkOTHER) + } + break + + } + fallthrough + case 't': + fallthrough + case 'T': + { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19826, 7) == 0 { + token = U8(TkTRIGGER) + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23165, 4) == 0 { + token = U8(TkTEMP) + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23170, 9) == 0 { + token = U8(TkTEMP) + } else { + token = U8(TkOTHER) + } + break + + } + fallthrough + case 'e': + fallthrough + case 'E': + { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 3) == 0 { + token = U8(TkEND) + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23184, 7) == 0 { + token = U8(TkEXPLAIN) + } else { + token = U8(TkOTHER) + } + break + + } + fallthrough + default: + { + token = U8(TkOTHER) + break + + } + } + zSql += uintptr(nId - 1) + } else { + // Operators and special symbols + token = U8(TkOTHER) + } + break + + } + } + state = *(*U8)(unsafe.Pointer(uintptr(unsafe.Pointer(&trans)) + uintptr(state)*8 + uintptr(token))) + zSql++ + } + return libc.Bool32(int32(state) == 1) +} + +var trans = [8][8]U8{ + // Token: + // State: ** SEMI WS OTHER EXPLAIN CREATE TEMP TRIGGER END + /* 0 INVALID: */ {U8(1), U8(0), U8(2), U8(3), U8(4), U8(2), U8(2), U8(2)}, + /* 1 START: */ {U8(1), U8(1), U8(2), U8(3), U8(4), U8(2), U8(2), U8(2)}, + /* 2 NORMAL: */ {U8(1), U8(2), U8(2), U8(2), U8(2), U8(2), U8(2), U8(2)}, + /* 3 EXPLAIN: */ {U8(1), U8(3), U8(3), U8(2), U8(4), U8(2), U8(2), U8(2)}, + /* 4 CREATE: */ {U8(1), U8(4), U8(2), U8(2), U8(2), U8(4), U8(5), U8(2)}, + /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, + /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, + /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, +} /* sqlite3.c:168141:19 */ + +// This routine is the same as the sqlite3_complete() routine described +// above, except that the parameter is required to be UTF-16 encoded, not +// UTF-8. +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ + var pVal uintptr + var zSql8 uintptr + var rc int32 + + rc = Xsqlite3_initialize(tls) + if rc != 0 { + return rc + } + pVal = Xsqlite3ValueNew(tls, uintptr(0)) + Xsqlite3ValueSetStr(tls, pVal, -1, zSql, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }(), uintptr(0)) + zSql8 = Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) + if zSql8 != 0 { + rc = Xsqlite3_complete(tls, zSql8) + } else { + rc = SQLITE_NOMEM + } + Xsqlite3ValueFree(tls, pVal) + return rc & 0xff +} + +//************* End of rtree.h ********************************************** +//************* Continuing where we left off in main.c ********************** + +// This is an extension initializer that is a no-op and always +// succeeds, except that it fails if the fault-simulation is set +// to 500. +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ + _ = db + return Xsqlite3FaultSim(tls, 500) +} + +// An array of pointers to extension initializer functions for +// built-in extensions. +var sqlite3BuiltinExtensions = [4]uintptr{ + 0, + 0, + 0, + 0, +} /* sqlite3.c:168477:12 */ + +// IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns +// a pointer to the to the sqlite3_version[] string constant. +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ + return uintptr(unsafe.Pointer(&Xsqlite3_version)) +} + +// IMPLEMENTATION-OF: R-25063-23286 The sqlite3_sourceid() function returns a +// pointer to a string constant whose value is the same as the +// SQLITE_SOURCE_ID C preprocessor macro. Except if SQLite is built using +// an edited copy of the amalgamation, then the last four characters of +// the hash might be different from SQLITE_SOURCE_ID. +// SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } + +// IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function +// returns an integer equal to SQLITE_VERSION_NUMBER. +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ + return SQLITE_VERSION_NUMBER +} + +// IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns +// zero if and only if SQLite was compiled with mutexing code omitted due to +// the SQLITE_THREADSAFE compile-time option being set to 0. +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ + return SQLITE_THREADSAFE +} + +// When compiling the test fixture or with debugging enabled (on Win32), +// this variable being set to non-zero will cause OSTRACE macros to emit +// extra diagnostic information. + +// If the following global variable points to a string which is the +// name of a directory, then that directory will be used to store +// temporary files. +// +// See also the "PRAGMA temp_store_directory" SQL command. +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ + +// If the following global variable points to a string which is the +// name of a directory, then that directory will be used to store +// all database files specified with a relative pathname. +// +// See also the "PRAGMA data_store_directory" SQL command. +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ + +// Initialize SQLite. +// +// This routine must be called to initialize the memory allocation, +// VFS, and mutex subsystems prior to doing any serious work with +// SQLite. But as long as you do not compile with SQLITE_OMIT_AUTOINIT +// this routine will be called automatically by key routines such as +// sqlite3_open(). +// +// This routine is a no-op except on its very first call for the process, +// or for the first call after a call to sqlite3_shutdown. +// +// The first thread to call this routine runs the initialization to +// completion. If subsequent threads call this routine before the first +// thread has finished the initialization process, then the subsequent +// threads must block until the first thread finishes with the initialization. +// +// The first thread might call this routine recursively. Recursive +// calls to this routine should not block, of course. Otherwise the +// initialization process would never complete. +// +// Let X be the first thread to enter this routine. Let Y be some other +// thread. Then while the initial invocation of this routine by X is +// incomplete, it is required that: +// +// * Calls to this routine from Y must block until the outer-most +// call by X completes. +// +// * Recursive calls to this routine from thread X return immediately +// without blocking. +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ + var pMainMtx uintptr // The main static mutex + var rc int32 // Result code + + // If the following assert() fails on some obscure processor/compiler + // combination, the work-around is to set the correct pointer + // size at compile-time using -DSQLITE_PTRSIZE=n compile-time option + + // If SQLite is already completely initialized, then this call + // to sqlite3_initialize() should be a no-op. But the initialization + // must be complete. So isInit must not be set until the very end + // of this routine. + if Xsqlite3Config.FisInit != 0 { + + return SQLITE_OK + } + + // Make sure the mutex subsystem is initialized. If unable to + // initialize the mutex subsystem, return early with the error. + // If the system is so sick that we are unable to allocate a mutex, + // there is not much SQLite is going to be able to do. + // + // The mutex subsystem must take care of serializing its own + // initialization. + rc = Xsqlite3MutexInit(tls) + if rc != 0 { + return rc + } + + // Initialize the malloc() system and the recursive pInitMutex mutex. + // This operation is protected by the STATIC_MAIN mutex. Note that + // MutexAlloc() is called for a static mutex prior to initializing the + // malloc subsystem - this implies that the allocation of a static + // mutex must not require support from the malloc subsystem. + pMainMtx = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) + Xsqlite3_mutex_enter(tls, pMainMtx) + Xsqlite3Config.FisMutexInit = 1 + if !(Xsqlite3Config.FisMallocInit != 0) { + rc = Xsqlite3MallocInit(tls) + } + if rc == SQLITE_OK { + Xsqlite3Config.FisMallocInit = 1 + if !(int32(Xsqlite3Config.FpInitMutex) != 0) { + Xsqlite3Config.FpInitMutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_RECURSIVE) + if Xsqlite3Config.FbCoreMutex != 0 && !(int32(Xsqlite3Config.FpInitMutex) != 0) { + rc = SQLITE_NOMEM + } + } + } + if rc == SQLITE_OK { + Xsqlite3Config.FnRefInitMutex++ + } + Xsqlite3_mutex_leave(tls, pMainMtx) + + // If rc is not SQLITE_OK at this point, then either the malloc + // subsystem could not be initialized or the system failed to allocate + // the pInitMutex mutex. Return an error in either case. + if rc != SQLITE_OK { + return rc + } + + // Do the rest of the initialization under the recursive mutex so + // that we will be able to handle recursive calls into + // sqlite3_initialize(). The recursive calls normally come through + // sqlite3_os_init() when it invokes sqlite3_vfs_register(), but other + // recursive calls might also be possible. + // + // IMPLEMENTATION-OF: R-00140-37445 SQLite automatically serializes calls + // to the xInit method, so the xInit method need not be threadsafe. + // + // The following mutex is what serializes access to the appdef pcache xInit + // methods. The sqlite3_pcache_methods.xInit() all is embedded in the + // call to sqlite3PcacheInitialize(). + Xsqlite3_mutex_enter(tls, Xsqlite3Config.FpInitMutex) + if Xsqlite3Config.FisInit == 0 && Xsqlite3Config.FinProgress == 0 { + Xsqlite3Config.FinProgress = 1 + libc.Xmemset(tls, uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)), 0, uint64(unsafe.Sizeof(Xsqlite3BuiltinFunctions))) + Xsqlite3RegisterBuiltinFunctions(tls) + if Xsqlite3Config.FisPCacheInit == 0 { + rc = Xsqlite3PcacheInitialize(tls) + } + if rc == SQLITE_OK { + Xsqlite3Config.FisPCacheInit = 1 + rc = Xsqlite3OsInit(tls) + } + if rc == SQLITE_OK { + rc = Xsqlite3MemdbInit(tls) + } + if rc == SQLITE_OK { + Xsqlite3PCacheBufferSetup(tls, Xsqlite3Config.FpPage, + Xsqlite3Config.FszPage, Xsqlite3Config.FnPage) + + Xsqlite3Config.FisInit = 1 + } + Xsqlite3Config.FinProgress = 0 + } + Xsqlite3_mutex_leave(tls, Xsqlite3Config.FpInitMutex) + + // Go back under the static mutex and clean up the recursive + // mutex to prevent a resource leak. + Xsqlite3_mutex_enter(tls, pMainMtx) + Xsqlite3Config.FnRefInitMutex-- + if Xsqlite3Config.FnRefInitMutex <= 0 { + + Xsqlite3_mutex_free(tls, Xsqlite3Config.FpInitMutex) + Xsqlite3Config.FpInitMutex = uintptr(0) + } + Xsqlite3_mutex_leave(tls, pMainMtx) + + // The following is just a sanity check to make sure SQLite has + // been compiled correctly. It is important to run this code, but + // we don't want to run it too often and soak up CPU cycles for no + // reason. So we run it once during initialization. + + // Do extra initialization steps requested by the SQLITE_EXTRA_INIT + // compile-time option. + + return rc +} + +// Undo the effects of sqlite3_initialize(). Must not be called while +// there are outstanding database connections or memory allocations or +// while any part of SQLite is otherwise in use in any thread. This +// routine is not threadsafe. But it is safe to invoke this routine +// on when SQLite is already shut down. If SQLite is already shut down +// when this routine is invoked, then this routine is a harmless no-op. +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ + + if Xsqlite3Config.FisInit != 0 { + Xsqlite3_os_end(tls) + Xsqlite3_reset_auto_extension(tls) + Xsqlite3Config.FisInit = 0 + } + if Xsqlite3Config.FisPCacheInit != 0 { + Xsqlite3PcacheShutdown(tls) + Xsqlite3Config.FisPCacheInit = 0 + } + if Xsqlite3Config.FisMallocInit != 0 { + Xsqlite3MallocEnd(tls) + Xsqlite3Config.FisMallocInit = 0 + + // The heap subsystem has now been shutdown and these values are supposed + // to be NULL or point to memory that was obtained from sqlite3_malloc(), + // which would rely on that heap subsystem; therefore, make sure these + // values cannot refer to heap memory that was just invalidated when the + // heap subsystem was shutdown. This is only done if the current call to + // this function resulted in the heap subsystem actually being shutdown. + Xsqlite3_data_directory = uintptr(0) + Xsqlite3_temp_directory = uintptr(0) + } + if Xsqlite3Config.FisMutexInit != 0 { + Xsqlite3MutexEnd(tls) + Xsqlite3Config.FisMutexInit = 0 + } + + return SQLITE_OK +} + +// This API allows applications to modify the global configuration of +// the SQLite library at run-time. +// +// This routine should only be called when there are no outstanding +// database connections or memory allocations. This routine is not +// threadsafe. Failure to heed these warnings can lead to unpredictable +// behavior. +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ + var ap Va_list + _ = ap + var rc int32 = SQLITE_OK + + // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while + // the SQLite library is in use. + if Xsqlite3Config.FisInit != 0 { + return Xsqlite3MisuseError(tls, 168851) + } + + ap = va + switch op { + + // Mutex configuration options are only available in a threadsafe + // compile. + case SQLITE_CONFIG_SINGLETHREAD: + { + // EVIDENCE-OF: R-02748-19096 This option sets the threading mode to + // Single-thread. + Xsqlite3Config.FbCoreMutex = U8(0) // Disable mutex on core + Xsqlite3Config.FbFullMutex = U8(0) // Disable mutex on connections + break + + } + case SQLITE_CONFIG_MULTITHREAD: + { + // EVIDENCE-OF: R-14374-42468 This option sets the threading mode to + // Multi-thread. + Xsqlite3Config.FbCoreMutex = U8(1) // Enable mutex on core + Xsqlite3Config.FbFullMutex = U8(0) // Disable mutex on connections + break + + } + case SQLITE_CONFIG_SERIALIZED: + { + // EVIDENCE-OF: R-41220-51800 This option sets the threading mode to + // Serialized. + Xsqlite3Config.FbCoreMutex = U8(1) // Enable mutex on core + Xsqlite3Config.FbFullMutex = U8(1) // Enable mutex on connections + break + + } + case SQLITE_CONFIG_MUTEX: + { + // Specify an alternative mutex implementation + Xsqlite3Config.Fmutex = *(*Sqlite3_mutex_methods)(unsafe.Pointer(libc.VaUintptr(&ap))) + break + + } + case SQLITE_CONFIG_GETMUTEX: + { + // Retrieve the current mutex implementation + *(*Sqlite3_mutex_methods)(unsafe.Pointer(libc.VaUintptr(&ap))) = Xsqlite3Config.Fmutex + break + + } + + case SQLITE_CONFIG_MALLOC: + { + // EVIDENCE-OF: R-55594-21030 The SQLITE_CONFIG_MALLOC option takes a + // single argument which is a pointer to an instance of the + // sqlite3_mem_methods structure. The argument specifies alternative + // low-level memory allocation routines to be used in place of the memory + // allocation routines built into SQLite. + Xsqlite3Config.Fm = *(*Sqlite3_mem_methods)(unsafe.Pointer(libc.VaUintptr(&ap))) + break + + } + case SQLITE_CONFIG_GETMALLOC: + { + // EVIDENCE-OF: R-51213-46414 The SQLITE_CONFIG_GETMALLOC option takes a + // single argument which is a pointer to an instance of the + // sqlite3_mem_methods structure. The sqlite3_mem_methods structure is + // filled with the currently defined memory allocation routines. + if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { + Xsqlite3MemSetDefault(tls) + } + *(*Sqlite3_mem_methods)(unsafe.Pointer(libc.VaUintptr(&ap))) = Xsqlite3Config.Fm + break + + } + case SQLITE_CONFIG_MEMSTATUS: + { + // EVIDENCE-OF: R-61275-35157 The SQLITE_CONFIG_MEMSTATUS option takes + // single argument of type int, interpreted as a boolean, which enables + // or disables the collection of memory allocation statistics. + Xsqlite3Config.FbMemstat = int32(libc.VaInt32(&ap)) + break + + } + case SQLITE_CONFIG_SMALL_MALLOC: + { + Xsqlite3Config.FbSmallMalloc = U8(libc.VaInt32(&ap)) + break + + } + case SQLITE_CONFIG_PAGECACHE: + { + // EVIDENCE-OF: R-18761-36601 There are three arguments to + // SQLITE_CONFIG_PAGECACHE: A pointer to 8-byte aligned memory (pMem), + // the size of each page cache line (sz), and the number of cache lines + // (N). + Xsqlite3Config.FpPage = libc.VaUintptr(&ap) + Xsqlite3Config.FszPage = int32(libc.VaInt32(&ap)) + Xsqlite3Config.FnPage = int32(libc.VaInt32(&ap)) + break + + } + case SQLITE_CONFIG_PCACHE_HDRSZ: + { + // EVIDENCE-OF: R-39100-27317 The SQLITE_CONFIG_PCACHE_HDRSZ option takes + // a single parameter which is a pointer to an integer and writes into + // that integer the number of extra bytes per page required for each page + // in SQLITE_CONFIG_PAGECACHE. + *(*int32)(unsafe.Pointer(libc.VaUintptr(&ap))) = Xsqlite3HeaderSizeBtree(tls) + Xsqlite3HeaderSizePcache(tls) + Xsqlite3HeaderSizePcache1(tls) + break + + } + + case SQLITE_CONFIG_PCACHE: + { + // no-op + break + + } + case SQLITE_CONFIG_GETPCACHE: + { + // now an error + rc = SQLITE_ERROR + break + + } + + case SQLITE_CONFIG_PCACHE2: + { + // EVIDENCE-OF: R-63325-48378 The SQLITE_CONFIG_PCACHE2 option takes a + // single argument which is a pointer to an sqlite3_pcache_methods2 + // object. This object specifies the interface to a custom page cache + // implementation. + Xsqlite3Config.Fpcache2 = *(*Sqlite3_pcache_methods2)(unsafe.Pointer(libc.VaUintptr(&ap))) + break + + } + case SQLITE_CONFIG_GETPCACHE2: + { + // EVIDENCE-OF: R-22035-46182 The SQLITE_CONFIG_GETPCACHE2 option takes a + // single argument which is a pointer to an sqlite3_pcache_methods2 + // object. SQLite copies of the current page cache implementation into + // that object. + if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { + Xsqlite3PCacheSetDefault(tls) + } + *(*Sqlite3_pcache_methods2)(unsafe.Pointer(libc.VaUintptr(&ap))) = Xsqlite3Config.Fpcache2 + break + + } + + // EVIDENCE-OF: R-06626-12911 The SQLITE_CONFIG_HEAP option is only + // available if SQLite is compiled with either SQLITE_ENABLE_MEMSYS3 or + // SQLITE_ENABLE_MEMSYS5 and returns SQLITE_ERROR if invoked otherwise. + + case SQLITE_CONFIG_LOOKASIDE: + { + Xsqlite3Config.FszLookaside = int32(libc.VaInt32(&ap)) + Xsqlite3Config.FnLookaside = int32(libc.VaInt32(&ap)) + break + + } + + // Record a pointer to the logger function and its first argument. + // The default is NULL. Logging is disabled if the function pointer is + // NULL. + case SQLITE_CONFIG_LOG: + { + Xsqlite3Config.FxLog = libc.VaUintptr(&ap) + Xsqlite3Config.FpLogArg = libc.VaUintptr(&ap) + break + + } + + // EVIDENCE-OF: R-55548-33817 The compile-time setting for URI filenames + // can be changed at start-time using the + // sqlite3_config(SQLITE_CONFIG_URI,1) or + // sqlite3_config(SQLITE_CONFIG_URI,0) configuration calls. + case SQLITE_CONFIG_URI: + { + // EVIDENCE-OF: R-25451-61125 The SQLITE_CONFIG_URI option takes a single + // argument of type int. If non-zero, then URI handling is globally + // enabled. If the parameter is zero, then URI handling is globally + // disabled. + Xsqlite3Config.FbOpenUri = U8(libc.VaInt32(&ap)) + break + + } + + case SQLITE_CONFIG_COVERING_INDEX_SCAN: + { + // EVIDENCE-OF: R-36592-02772 The SQLITE_CONFIG_COVERING_INDEX_SCAN + // option takes a single integer argument which is interpreted as a + // boolean in order to enable or disable the use of covering indices for + // full table scans in the query optimizer. + Xsqlite3Config.FbUseCis = U8(libc.VaInt32(&ap)) + break + + } + + case SQLITE_CONFIG_MMAP_SIZE: + { + // EVIDENCE-OF: R-58063-38258 SQLITE_CONFIG_MMAP_SIZE takes two 64-bit + // integer (sqlite3_int64) values that are the default mmap size limit + // (the default setting for PRAGMA mmap_size) and the maximum allowed + // mmap size limit. + var szMmap Sqlite3_int64 = Sqlite3_int64(libc.VaInt64(&ap)) + var mxMmap Sqlite3_int64 = Sqlite3_int64(libc.VaInt64(&ap)) + // EVIDENCE-OF: R-53367-43190 If either argument to this option is + // negative, then that argument is changed to its compile-time default. + // + // EVIDENCE-OF: R-34993-45031 The maximum allowed mmap size will be + // silently truncated if necessary so that it does not exceed the + // compile-time maximum mmap size set by the SQLITE_MAX_MMAP_SIZE + // compile-time option. + if mxMmap < int64(0) || mxMmap > int64(SQLITE_MAX_MMAP_SIZE) { + mxMmap = int64(SQLITE_MAX_MMAP_SIZE) + } + if szMmap < int64(0) { + szMmap = int64(SQLITE_DEFAULT_MMAP_SIZE) + } + if szMmap > mxMmap { + szMmap = mxMmap + } + Xsqlite3Config.FmxMmap = mxMmap + Xsqlite3Config.FszMmap = szMmap + break + + } + + case SQLITE_CONFIG_PMASZ: + { + Xsqlite3Config.FszPma = U32(libc.VaUint32(&ap)) + break + + } + + case SQLITE_CONFIG_STMTJRNL_SPILL: + { + Xsqlite3Config.FnStmtSpill = int32(libc.VaInt32(&ap)) + break + + } + + case SQLITE_CONFIG_MEMDB_MAXSIZE: + { + Xsqlite3Config.FmxMemdbSize = Sqlite3_int64(libc.VaInt64(&ap)) + break + + } + + default: + { + rc = SQLITE_ERROR + break + + } + } + _ = ap + return rc +} + +// Set up the lookaside buffers for a database connection. +// Return SQLITE_OK on success. +// If lookaside is already active, return SQLITE_BUSY. +// +// The sz parameter is the number of bytes in each lookaside slot. +// The cnt parameter is the number of slots. If pStart is NULL the +// space for the lookaside memory is obtained from sqlite3_malloc(). +// If pStart is not NULL then it is sz*cnt bytes of memory to use for +// the lookaside memory. +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ + var pStart uintptr + var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) + var nBig int32 // Number of full-size slots + var nSm int32 // Number smaller LOOKASIDE_SMALL-byte slots + + if Xsqlite3LookasideUsed(tls, db, uintptr(0)) > 0 { + return SQLITE_BUSY + } + // Free any existing lookaside buffer for this handle before + // allocating a new one so we don't have to have space for + // both at the same time. + if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbMalloced != 0 { + Xsqlite3_free(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) + } + // The size of a lookaside slot after ROUNDDOWN8 needs to be larger + // than a pointer to be useful. + sz = sz & libc.CplInt32(7) // IMP: R-33038-09382 + if sz <= int32(unsafe.Sizeof(uintptr(0))) { + sz = 0 + } + if cnt < 0 { + cnt = 0 + } + if sz == 0 || cnt == 0 { + sz = 0 + pStart = uintptr(0) + } else if pBuf == uintptr(0) { + Xsqlite3BeginBenignMalloc(tls) + pStart = Xsqlite3Malloc(tls, uint64(szAlloc)) // IMP: R-61949-35727 + Xsqlite3EndBenignMalloc(tls) + if pStart != 0 { + szAlloc = Sqlite3_int64(Xsqlite3MallocSize(tls, pStart)) + } + } else { + pStart = pBuf + } + if sz >= LOOKASIDE_SMALL*3 { + nBig = int32(szAlloc / Sqlite3_int64(3*LOOKASIDE_SMALL+sz)) + nSm = int32((szAlloc - Sqlite3_int64(sz*nBig)) / int64(LOOKASIDE_SMALL)) + } else if sz >= LOOKASIDE_SMALL*2 { + nBig = int32(szAlloc / Sqlite3_int64(LOOKASIDE_SMALL+sz)) + nSm = int32((szAlloc - Sqlite3_int64(sz*nBig)) / int64(LOOKASIDE_SMALL)) + } else if sz > 0 { + nBig = int32(szAlloc / Sqlite3_int64(sz)) + nSm = 0 + } else { + nBig = libc.AssignInt32(&nSm, 0) + } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = pStart + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(sz) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue = U16(sz) + if pStart != 0 { + var i int32 + var p uintptr + + p = pStart + for i = 0; i < nBig; i++ { + (*LookasideSlot)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit = p + p = p + uintptr(sz) + } + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle = p + for i = 0; i < nSm; i++ { + (*LookasideSlot)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit = p + p = p + 128 + } + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = p + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbMalloced = func() uint8 { + if pBuf == uintptr(0) { + return uint8(1) + } + return uint8(0) + }() + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(nBig + nSm) + } else { + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = db + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbMalloced = U8(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot = U32(0) + } + + return SQLITE_OK +} + +// Return the mutex associated with a database connection. +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ + return (*Sqlite3)(unsafe.Pointer(db)).Fmutex +} + +// Free up as much memory as we can from the given database +// connection. +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ + var i int32 + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + Xsqlite3BtreeEnterAll(tls, db) + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 { + var pPager uintptr = Xsqlite3BtreePager(tls, pBt) + Xsqlite3PagerShrink(tls, pPager) + } + } + Xsqlite3BtreeLeaveAll(tls, db) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// Flush any dirty pages in the pager-cache for any attached database +// to disk. +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ + var i int32 + var rc int32 = SQLITE_OK + var bSeenBusy int32 = 0 + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + Xsqlite3BtreeEnterAll(tls, db) + for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if pBt != 0 && Xsqlite3BtreeTxnState(tls, pBt) == SQLITE_TXN_WRITE { + var pPager uintptr = Xsqlite3BtreePager(tls, pBt) + rc = Xsqlite3PagerFlush(tls, pPager) + if rc == SQLITE_BUSY { + bSeenBusy = 1 + rc = SQLITE_OK + } + } + } + Xsqlite3BtreeLeaveAll(tls, db) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return func() int32 { + if rc == SQLITE_OK && bSeenBusy != 0 { + return SQLITE_BUSY + } + return rc + }() +} + +// Configuration settings for an individual database connection +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ + var ap Va_list + _ = ap + var rc int32 + ap = va + switch op { + case SQLITE_DBCONFIG_MAINDBNAME: + { + // IMP: R-06824-28531 + // IMP: R-36257-52125 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = libc.VaUintptr(&ap) + rc = SQLITE_OK + break + + } + case SQLITE_DBCONFIG_LOOKASIDE: + { + var pBuf uintptr = libc.VaUintptr(&ap) // IMP: R-26835-10964 + var sz int32 = int32(libc.VaInt32(&ap)) // IMP: R-47871-25994 + var cnt int32 = int32(libc.VaInt32(&ap)) // IMP: R-04460-53386 + rc = setupLookaside(tls, db, pBuf, sz, cnt) + break + + } + default: + { + var i uint32 + rc = SQLITE_ERROR // IMP: R-42790-23372 + for i = uint32(0); i < uint32(int32(uint64(unsafe.Sizeof(aFlagOp))/uint64(unsafe.Sizeof(struct { + Fop int32 + Fmask U32 + }{})))); i++ { + if aFlagOp[i].Fop == op { + var onoff int32 = int32(libc.VaInt32(&ap)) + var pRes uintptr = libc.VaUintptr(&ap) + var oldFlags U64 = (*Sqlite3)(unsafe.Pointer(db)).Fflags + if onoff > 0 { + *(*U64)(unsafe.Pointer(db + 48)) |= U64(aFlagOp[i].Fmask) + } else if onoff == 0 { + *(*U64)(unsafe.Pointer(db + 48)) &= ^U64(aFlagOp[i].Fmask) + } + if oldFlags != (*Sqlite3)(unsafe.Pointer(db)).Fflags { + Xsqlite3ExpirePreparedStatements(tls, db, 0) + } + if pRes != 0 { + *(*int32)(unsafe.Pointer(pRes)) = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&U64(aFlagOp[i].Fmask) != uint64(0)) + } + rc = SQLITE_OK + break + } + } + break + + } + } + _ = ap + return rc +} + +var aFlagOp = [16]struct { + Fop int32 + Fmask U32 +}{ + {Fop: SQLITE_DBCONFIG_ENABLE_FKEY, Fmask: U32(SQLITE_ForeignKeys)}, + {Fop: SQLITE_DBCONFIG_ENABLE_TRIGGER, Fmask: U32(SQLITE_EnableTrigger)}, + {Fop: SQLITE_DBCONFIG_ENABLE_VIEW, Fmask: SQLITE_EnableView}, + {Fop: SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, Fmask: U32(SQLITE_Fts3Tokenizer)}, + {Fop: SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, Fmask: U32(SQLITE_LoadExtension)}, + {Fop: SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, Fmask: U32(SQLITE_NoCkptOnClose)}, + {Fop: SQLITE_DBCONFIG_ENABLE_QPSG, Fmask: U32(SQLITE_EnableQPSG)}, + {Fop: SQLITE_DBCONFIG_TRIGGER_EQP, Fmask: U32(SQLITE_TriggerEQP)}, + {Fop: SQLITE_DBCONFIG_RESET_DATABASE, Fmask: U32(SQLITE_ResetDatabase)}, + {Fop: SQLITE_DBCONFIG_DEFENSIVE, Fmask: U32(SQLITE_Defensive)}, + {Fop: SQLITE_DBCONFIG_WRITABLE_SCHEMA, Fmask: U32(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, + {Fop: SQLITE_DBCONFIG_LEGACY_ALTER_TABLE, Fmask: U32(SQLITE_LegacyAlter)}, + {Fop: SQLITE_DBCONFIG_DQS_DDL, Fmask: U32(SQLITE_DqsDDL)}, + {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, + {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, + {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, +} /* sqlite3.c:169353:9 */ + +// This is the default collating function named "BINARY" which is always +// available. +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ + var rc int32 + var n int32 + _ = NotUsed + if nKey1 < nKey2 { + n = nKey1 + } else { + n = nKey2 + } + // EVIDENCE-OF: R-65033-28449 The built-in BINARY collation compares + // strings byte by byte using the memcmp() function from the standard C + // library. + + rc = libc.Xmemcmp(tls, pKey1, pKey2, uint64(n)) + if rc == 0 { + rc = nKey1 - nKey2 + } + return rc +} + +// This is the collating function named "RTRIM" which is always +// available. Ignore trailing spaces. +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ + var pK1 uintptr = pKey1 + var pK2 uintptr = pKey2 + for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { + nKey1-- + } + for nKey2 != 0 && int32(*(*U8)(unsafe.Pointer(pK2 + uintptr(nKey2-1)))) == ' ' { + nKey2-- + } + return binCollFunc(tls, pUser, nKey1, pKey1, nKey2, pKey2) +} + +// Return true if CollSeq is the default built-in BINARY. +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ + + return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{binCollFunc}))) +} + +// Another built-in collating sequence: NOCASE. +// +// This collating sequence is intended to be used for "case independent +// comparison". SQLite's knowledge of upper and lower case equivalents +// extends only to the 26 characters used in the English language. +// +// At the moment there is only a UTF-8 implementation. +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ + var r int32 = Xsqlite3_strnicmp(tls, + pKey1, pKey2, func() int32 { + if nKey1 < nKey2 { + return nKey1 + } + return nKey2 + }()) + _ = NotUsed + if 0 == r { + r = nKey1 - nKey2 + } + return r +} + +// Return the ROWID of the most recent insert +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ + return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid +} + +// Set the value returned by the sqlite3_last_insert_rowid() API function. +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) +} + +// Return the number of changes in the most recent call to sqlite3_exec(). +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ + return (*Sqlite3)(unsafe.Pointer(db)).FnChange +} + +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ + return int32(Xsqlite3_changes64(tls, db)) +} + +// Return the number of changes since the database handle was opened. +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ + return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange +} + +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ + return int32(Xsqlite3_total_changes64(tls, db)) +} + +// Close all open savepoints. This function only manipulates fields of the +// database handle object, it does not close any savepoints that may be open +// at the b-tree/pager level. +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ + for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { + var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext + Xsqlite3DbFree(tls, db, pTmp) + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint = 0 + (*Sqlite3)(unsafe.Pointer(db)).FnStatement = 0 + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +} + +// Invoke the destructor function associated with FuncDef p, if any. Except, +// if this is not the last copy of the function, do not invoke it. Multiple +// copies of a single function are created when create_function() is called +// with SQLITE_ANY as the encoding. +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ + var pDestructor uintptr + + pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) + if pDestructor != 0 { + (*FuncDestructor)(unsafe.Pointer(pDestructor)).FnRef-- + if (*FuncDestructor)(unsafe.Pointer(pDestructor)).FnRef == 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDestructor)(unsafe.Pointer(pDestructor)).FxDestroy})).f(tls, (*FuncDestructor)(unsafe.Pointer(pDestructor)).FpUserData) + Xsqlite3DbFree(tls, db, pDestructor) + } + } +} + +// Disconnect all sqlite3_vtab objects that belong to database connection +// db. This is called when db is being closed. +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ + var i int32 + var p uintptr + Xsqlite3BtreeEnterAll(tls, db) + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpSchema + if pSchema != 0 { + for p = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(p)).Fdata + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { + Xsqlite3VtabDisconnect(tls, db, pTab) + } + } + } + } + for p = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { + var pMod uintptr = (*HashElem)(unsafe.Pointer(p)).Fdata + if (*Module)(unsafe.Pointer(pMod)).FpEpoTab != 0 { + Xsqlite3VtabDisconnect(tls, db, (*Module)(unsafe.Pointer(pMod)).FpEpoTab) + } + } + Xsqlite3VtabUnlockList(tls, db) + Xsqlite3BtreeLeaveAll(tls, db) +} + +// Return TRUE if database connection db has unfinalized prepared +// statements or unfinished sqlite3_backup objects. +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ + var j int32 + + if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { + return 1 + } + for j = 0; j < (*Sqlite3)(unsafe.Pointer(db)).FnDb; j++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(j)*32)).FpBt + if pBt != 0 && Xsqlite3BtreeIsInBackup(tls, pBt) != 0 { + return 1 + } + } + return 0 +} + +// Close an existing SQLite database +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ + if !(db != 0) { + // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or + // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. + return SQLITE_OK + } + if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { + return Xsqlite3MisuseError(tls, 169622) + } + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { + (*struct { + f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_CLOSE), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, db, uintptr(0)) + } + + // Force xDisconnect calls on all virtual tables + disconnectAllVtab(tls, db) + + // If a transaction is open, the disconnectAllVtab() call above + // will not have called the xDisconnect() method on any virtual + // tables in the db->aVTrans[] array. The following sqlite3VtabRollback() + // call will do so. We need to do this before the check for active + // SQL statements below, as the v-table implementation may be storing + // some prepared statements internally. + Xsqlite3VtabRollback(tls, db) + + // Legacy behavior (sqlite3_close() behavior) is to return + // SQLITE_BUSY if the connection can not be closed immediately. + if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { + Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, + ts+23192, 0) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_BUSY + } + + // Convert the connection into a zombie and then close it. + (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_ZOMBIE) + Xsqlite3LeaveMutexAndCloseZombie(tls, db) + return SQLITE_OK +} + +// Return the transaction state for a single databse, or the maximum +// transaction state over all attached databases if zSchema is null. +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ + var iDb int32 + var nDb int32 + var iTxn int32 = -1 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if zSchema != 0 { + nDb = libc.AssignInt32(&iDb, Xsqlite3FindDbName(tls, db, zSchema)) + if iDb < 0 { + nDb-- + } + } else { + iDb = 0 + nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 + } + for ; iDb <= nDb; iDb++ { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt + var x int32 + if pBt != uintptr(0) { + x = Xsqlite3BtreeTxnState(tls, pBt) + } else { + x = SQLITE_TXN_NONE + } + if x > iTxn { + iTxn = x + } + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return iTxn +} + +// Two variations on the public interface for closing a database +// connection. The sqlite3_close() version returns SQLITE_BUSY and +// leaves the connection open if there are unfinalized prepared +// statements or unfinished sqlite3_backups. The sqlite3_close_v2() +// version forces the connection to become a zombie if there are +// unclosed resources, and arranges for deallocation when the last +// prepare statement or sqlite3_backup closes. +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ + return sqlite3Close(tls, db, 0) +} + +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ + return sqlite3Close(tls, db, 1) +} + +// Close the mutex on database connection db. +// +// Furthermore, if database connection db is a zombie (meaning that there +// has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and +// every sqlite3_stmt has now been finalized and every sqlite3_backup has +// finished, then free all resources. +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ + var i uintptr // Hash table iterator + var j int32 + + // If there are outstanding sqlite3_stmt or sqlite3_backup objects + // or if the connection has not yet been closed by sqlite3_close_v2(), + // then just leave the mutex and return. + if int32((*Sqlite3)(unsafe.Pointer(db)).FeOpenState) != SQLITE_STATE_ZOMBIE || connectionIsBusy(tls, db) != 0 { + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return + } + + // If we reach this point, it means that the database connection has + // closed all sqlite3_stmt and sqlite3_backup objects and has been + // passed to sqlite3_close (meaning that it is a zombie). Therefore, + // go ahead and free all resources. + + // If a transaction is open, roll it back. This also ensures that if + // any database schemas have been modified by an uncommitted transaction + // they are reset. And that the required b-tree mutex is held to make + // the pager rollback and schema reset an atomic operation. + Xsqlite3RollbackAll(tls, db, SQLITE_OK) + + // Free any outstanding Savepoint structures. + Xsqlite3CloseSavepoints(tls, db) + + // Close all database connections + for j = 0; j < (*Sqlite3)(unsafe.Pointer(db)).FnDb; j++ { + var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(j)*32 + if (*Db1)(unsafe.Pointer(pDb)).FpBt != 0 { + Xsqlite3BtreeClose(tls, (*Db1)(unsafe.Pointer(pDb)).FpBt) + (*Db1)(unsafe.Pointer(pDb)).FpBt = uintptr(0) + if j != 1 { + (*Db1)(unsafe.Pointer(pDb)).FpSchema = uintptr(0) + } + } + } + // Clear the TEMP schema separately and last + if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema != 0 { + Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema) + } + Xsqlite3VtabUnlockList(tls, db) + + // Free up the array of auxiliary databases + Xsqlite3CollapseDatabaseArray(tls, db) + + // Tell the code in notify.c that the connection no longer holds any + // locks and does not require any further unlock-notify callbacks. + Xsqlite3ConnectionClosed(tls, db) + + for i = (*Hash)(unsafe.Pointer(db + 616)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pNext uintptr + var p uintptr + p = (*HashElem)(unsafe.Pointer(i)).Fdata + for __ccgo := true; __ccgo; __ccgo = p != 0 { + functionDestroy(tls, db, p) + pNext = (*FuncDef)(unsafe.Pointer(p)).FpNext + Xsqlite3DbFree(tls, db, p) + p = pNext + } + } + Xsqlite3HashClear(tls, db+616) + for i = (*Hash)(unsafe.Pointer(db + 640)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pColl uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata + // Invoke any destructors registered for collation sequence user data. + for j = 0; j < 3; j++ { + if (*CollSeq)(unsafe.Pointer(pColl+uintptr(j)*40)).FxDel != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl + uintptr(j)*40)).FxDel})).f(tls, (*CollSeq)(unsafe.Pointer(pColl+uintptr(j)*40)).FpUser) + } + } + Xsqlite3DbFree(tls, db, pColl) + } + Xsqlite3HashClear(tls, db+640) + for i = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { + var pMod uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata + Xsqlite3VtabEponymousTableClear(tls, db, pMod) + Xsqlite3VtabModuleUnref(tls, db, pMod) + } + Xsqlite3HashClear(tls, db+568) + + Xsqlite3Error(tls, db, SQLITE_OK) // Deallocates any cached error strings. + Xsqlite3ValueFree(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + Xsqlite3CloseExtensions(tls, db) + + (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_ERROR) + + // The temp-database schema is allocated differently from the other schema + // objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()). + // So it needs to be freed here. Todo: Why not roll the temp schema into + // the same sqliteMalloc() as the one that allocates the database + // structure? + Xsqlite3DbFree(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema) + if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_CLOSED) + Xsqlite3_mutex_free(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbMalloced != 0 { + Xsqlite3_free(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) + } + Xsqlite3_free(tls, db) +} + +// Rollback all database files. If tripCode is not SQLITE_OK, then +// any write cursors are invalidated ("tripped" - as in "tripping a circuit +// breaker") and made to return tripCode if there are any further +// attempts to use that cursor. Read cursors remain open and valid +// but are "saved" in case the table pages are moved around. +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ + var i int32 + var inTrans int32 = 0 + var schemaChange int32 + + Xsqlite3BeginBenignMalloc(tls) + + // Obtain all b-tree mutexes before making any calls to BtreeRollback(). + // This is important in case the transaction being rolled back has + // modified the database schema. If the b-tree mutexes are not taken + // here, then another shared-cache connection might sneak in between + // the database rollback and schema reset, which can cause false + // corruption reports in some cases. + Xsqlite3BtreeEnterAll(tls, db) + schemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0) && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) + + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { + var p uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt + if p != 0 { + if Xsqlite3BtreeTxnState(tls, p) == SQLITE_TXN_WRITE { + inTrans = 1 + } + Xsqlite3BtreeRollback(tls, p, tripCode, libc.BoolInt32(!(schemaChange != 0))) + } + } + Xsqlite3VtabRollback(tls, db) + Xsqlite3EndBenignMalloc(tls) + + if schemaChange != 0 { + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + } + Xsqlite3BtreeLeaveAll(tls, db) + + // Any deferred constraint violations have now been resolved. + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = int64(0) + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = int64(0) + *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_DeferFKs) | U64(uint64(0x00002))<<32) + + // If one has been configured, invoke the rollback-hook callback + if (*Sqlite3)(unsafe.Pointer(db)).FxRollbackCallback != 0 && (inTrans != 0 || !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0)) { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxRollbackCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpRollbackArg) + } +} + +// Return a static string containing the name corresponding to the error code +// specified in the argument. + +// Return a static string that describes the kind of error specified in the +// argument. +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23260 /* "unknown error" */ + switch rc { + case SQLITE_ABORT | int32(2)<<8: + { + zErr = ts + 23274 /* "abort due to ROL..." */ + break + + } + case SQLITE_ROW: + { + zErr = ts + 23296 /* "another row avai..." */ + break + + } + case SQLITE_DONE: + { + zErr = ts + 23318 /* "no more rows ava..." */ + break + + } + default: + { + rc = rc & 0xff + if rc >= 0 && rc < int32(uint64(unsafe.Sizeof(aMsg))/uint64(unsafe.Sizeof(uintptr(0)))) && aMsg[rc] != uintptr(0) { + zErr = aMsg[rc] + } + break + + } + } + return zErr +} + +var aMsg = [29]uintptr{ + ts + 23341, + ts + 23354, + /* SQLITE_INTERNAL */ uintptr(0), + ts + 23370, + ts + 23395, + ts + 23409, + ts + 23428, + ts + 1461, + ts + 23453, + ts + 23490, + ts + 23502, + ts + 23517, + ts + 23550, + ts + 23568, + ts + 23593, + ts + 23622, + /* SQLITE_EMPTY */ uintptr(0), + ts + 5790, + ts + 5276, + ts + 23639, + ts + 23657, + ts + 23675, + /* SQLITE_NOLFS */ uintptr(0), + ts + 23709, + /* SQLITE_FORMAT */ uintptr(0), + ts + 23730, + ts + 23756, + ts + 23779, + ts + 23800, +} /* sqlite3.c:170001:20 */ + +// This routine implements a busy callback that sleeps and tries +// again until a timeout value is reached. The timeout value is +// an integer number of milliseconds passed in as the first +// argument. +// +// Return non-zero to retry the lock. Return zero to stop trying +// and cause SQLite to return SQLITE_BUSY. +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ + var db uintptr = ptr + var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout + var delay int32 + var prior int32 + + if count < int32(uint64(unsafe.Sizeof(delays))/uint64(unsafe.Sizeof(U8(0)))) { + delay = int32(delays[count]) + prior = int32(totals[count]) + } else { + delay = int32(delays[int32(uint64(unsafe.Sizeof(delays))/uint64(unsafe.Sizeof(U8(0))))-1]) + prior = int32(totals[int32(uint64(unsafe.Sizeof(delays))/uint64(unsafe.Sizeof(U8(0))))-1]) + delay*(count-(int32(uint64(unsafe.Sizeof(delays))/uint64(unsafe.Sizeof(U8(0))))-1)) + } + if prior+delay > tmout { + delay = tmout - prior + if delay <= 0 { + return 0 + } + } + Xsqlite3OsSleep(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, delay*1000) + return 1 +} + +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ + +// Invoke the given busy handler. +// +// This routine is called when an operation failed to acquire a +// lock on VFS file pFile. +// +// If this routine returns non-zero, the lock is retried. If it +// returns 0, the operation aborts with an SQLITE_BUSY error. +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ + var rc int32 + if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { + return 0 + } + rc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler})).f(tls, (*BusyHandler)(unsafe.Pointer(p)).FpBusyArg, (*BusyHandler)(unsafe.Pointer(p)).FnBusy) + if rc == 0 { + (*BusyHandler)(unsafe.Pointer(p)).FnBusy = -1 + } else { + (*BusyHandler)(unsafe.Pointer(p)).FnBusy++ + } + return rc +} + +// This routine sets the busy callback for an Sqlite database to the +// given callback function with the given argument. +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 + (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout = 0 + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// This routine sets the progress callback for an Sqlite database to the +// given callback function with the given argument. The progress callback will +// be invoked every nOps opcodes. +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if nOps > 0 { + (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress + (*Sqlite3)(unsafe.Pointer(db)).FnProgressOps = uint32(nOps) + (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg = pArg + } else { + (*Sqlite3)(unsafe.Pointer(db)).FxProgress = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FnProgressOps = uint32(0) + (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg = uintptr(0) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) +} + +// This routine installs a default busy handler that waits for the +// specified number of milliseconds before returning 0. +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ + if ms > 0 { + Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32) int32 + }{sqliteDefaultBusyCallback})), + db) + (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout = ms + } else { + Xsqlite3_busy_handler(tls, db, uintptr(0), uintptr(0)) + } + return SQLITE_OK +} + +// Cause any pending operation to stop at its earliest opportunity. +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ + libc.AtomicStoreNInt32(db+432, int32(1), 0) +} + +// This function is exactly the same as sqlite3_create_function(), except +// that it is designed to be called by internal code. The difference is +// that if a malloc() fails in sqlite3_create_function(), an error code +// is returned and the mallocFailed flag cleared. +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ + var p uintptr + var extraFlags int32 + + if zFunctionName == uintptr(0) || + xSFunc != uintptr(0) && xFinal != uintptr(0) || + libc.Bool32(xFinal == uintptr(0)) != libc.Bool32(xStep == uintptr(0)) || + libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || + (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || + 255 < Xsqlite3Strlen30(tls, zFunctionName) { + return Xsqlite3MisuseError(tls, 170251) + } + + extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) + enc = enc & (SQLITE_FUNC_ENCMASK | SQLITE_ANY) + + // The SQLITE_INNOCUOUS flag is the same bit as SQLITE_FUNC_UNSAFE. But + // the meaning is inverted. So flip the bit. + + extraFlags = extraFlags ^ SQLITE_FUNC_UNSAFE + + // If SQLITE_UTF16 is specified as the encoding type, transform this + // to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the + // SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally. + // + // If SQLITE_ANY is specified, add three versions of the function + // to the hash table. + switch enc { + case SQLITE_UTF16: + enc = func() int32 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return SQLITE_UTF16BE + } + return SQLITE_UTF16LE + }() + break + case SQLITE_ANY: + { + var rc int32 + rc = Xsqlite3CreateFunc(tls, db, zFunctionName, nArg, + SQLITE_UTF8|extraFlags^SQLITE_FUNC_UNSAFE, + pUserData, xSFunc, xStep, xFinal, xValue, xInverse, pDestructor) + if rc == SQLITE_OK { + rc = Xsqlite3CreateFunc(tls, db, zFunctionName, nArg, + SQLITE_UTF16LE|extraFlags^SQLITE_FUNC_UNSAFE, + pUserData, xSFunc, xStep, xFinal, xValue, xInverse, pDestructor) + } + if rc != SQLITE_OK { + return rc + } + enc = SQLITE_UTF16BE + break + + } + case SQLITE_UTF8: + fallthrough + case SQLITE_UTF16LE: + fallthrough + case SQLITE_UTF16BE: + break + default: + enc = SQLITE_UTF8 + break + } + + // Check if an existing function is being overridden or deleted. If so, + // and there are active VMs, then return SQLITE_BUSY. If a function + // is being overridden/deleted but there are no active VMs, allow the + // operation to continue but invalidate all precompiled statements. + p = Xsqlite3FindFunction(tls, db, zFunctionName, nArg, U8(enc), uint8(0)) + if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { + if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { + Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, + ts+23816, 0) + + return SQLITE_BUSY + } else { + Xsqlite3ExpirePreparedStatements(tls, db, 0) + } + } else if xSFunc == uintptr(0) && xFinal == uintptr(0) { + // Trying to delete a function that does not exist. This is a no-op. + // https://sqlite.org/forum/forumpost/726219164b + return SQLITE_OK + } + + p = Xsqlite3FindFunction(tls, db, zFunctionName, nArg, U8(enc), uint8(1)) + + if !(p != 0) { + return SQLITE_NOMEM + } + + // If an older version of the function with a configured destructor is + // being replaced invoke the destructor function here. + functionDestroy(tls, db, p) + + if pDestructor != 0 { + (*FuncDestructor)(unsafe.Pointer(pDestructor)).FnRef++ + } + *(*uintptr)(unsafe.Pointer(p + 64)) = pDestructor + (*FuncDef)(unsafe.Pointer(p)).FfuncFlags = (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) | U32(extraFlags) + + (*FuncDef)(unsafe.Pointer(p)).FxSFunc = func() uintptr { + if xSFunc != 0 { + return xSFunc + } + return xStep + }() + (*FuncDef)(unsafe.Pointer(p)).FxFinalize = xFinal + (*FuncDef)(unsafe.Pointer(p)).FxValue = xValue + (*FuncDef)(unsafe.Pointer(p)).FxInverse = xInverse + (*FuncDef)(unsafe.Pointer(p)).FpUserData = pUserData + (*FuncDef)(unsafe.Pointer(p)).FnArg = I8(U16(nArg)) + return SQLITE_OK +} + +// Worker function used by utf-8 APIs that create new functions: +// +// sqlite3_create_function() +// sqlite3_create_function_v2() +// sqlite3_create_window_function() +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ + var rc int32 + var pArg uintptr + rc = SQLITE_ERROR + pArg = uintptr(0) + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if !(xDestroy != 0) { + goto __1 + } + pArg = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(FuncDestructor{}))) + if !!(pArg != 0) { + goto __2 + } + Xsqlite3OomFault(tls, db) + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, p) + goto out +__2: + ; + (*FuncDestructor)(unsafe.Pointer(pArg)).FnRef = 0 + (*FuncDestructor)(unsafe.Pointer(pArg)).FxDestroy = xDestroy + (*FuncDestructor)(unsafe.Pointer(pArg)).FpUserData = p +__1: + ; + rc = Xsqlite3CreateFunc(tls, db, zFunc, nArg, enc, p, + xSFunc, xStep, xFinal, xValue, xInverse, pArg) + if !(pArg != 0 && (*FuncDestructor)(unsafe.Pointer(pArg)).FnRef == 0) { + goto __3 + } + + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, p) + Xsqlite3_free(tls, pArg) +__3: + ; + +out: + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Create new user functions. +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ + 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:170424: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:170438:16: */ + return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, + xFinal, xValue, xInverse, xDestroy) +} + +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ + var rc int32 + var zFunc8 uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + zFunc8 = Xsqlite3Utf16to8(tls, db, zFunctionName, -1, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) + rc = Xsqlite3CreateFunc(tls, db, zFunc8, nArg, eTextRep, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3DbFree(tls, db, zFunc8) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// The following is the implementation of an SQL function that always +// fails with an error message stating that the function is used in the +// wrong context. The sqlite3_overload_function() API might construct +// SQL function that use this routine so that the functions will exist +// for name resolution but are actually overloaded by the xFindFunction +// method of virtual tables. +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var zName uintptr = Xsqlite3_user_data(tls, context) + var zErr uintptr + _ = NotUsed + _ = NotUsed2 + zErr = Xsqlite3_mprintf(tls, + ts+23879, libc.VaList(bp, zName)) + Xsqlite3_result_error(tls, context, zErr, -1) + Xsqlite3_free(tls, zErr) +} + +// Declare that a function has been overloaded by a virtual table. +// +// If the function already exists as a regular global function, then +// this routine is a no-op. If the function does not exist, then create +// a new one that always throws a run-time error. +// +// When virtual tables intend to provide an overloaded function, they +// should call this routine to make sure the global function exists. +// A global function must exist in order for name resolution to work +// properly. +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ + var rc int32 + var zCopy uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + rc = libc.Bool32(Xsqlite3FindFunction(tls, db, zName, nArg, uint8(SQLITE_UTF8), uint8(0)) != uintptr(0)) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if rc != 0 { + return SQLITE_OK + } + zCopy = Xsqlite3_mprintf(tls, zName, 0) + if zCopy == uintptr(0) { + return SQLITE_NOMEM + } + return Xsqlite3_create_function_v2(tls, db, zName, nArg, SQLITE_UTF8, + zCopy, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{sqlite3InvalidFunction})), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) +} + +// Register a trace function. The pArg from the previously registered trace +// is returned. +// +// A NULL trace function means that no tracing is executes. A non-NULL +// trace is a pointer to a function that is invoked at the start of each +// SQL statement. +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ + var pOld uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pOld = (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg + (*Sqlite3)(unsafe.Pointer(db)).FmTrace = func() uint8 { + if xTrace != 0 { + return uint8(SQLITE_TRACE_LEGACY) + } + return uint8(0) + }() + *(*uintptr)(unsafe.Pointer(db + 248)) = xTrace + (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg = pArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return pOld +} + +// Register a trace callback using the version-2 interface. +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if mTrace == uint32(0) { + xTrace = uintptr(0) + } + if xTrace == uintptr(0) { + mTrace = uint32(0) + } + (*Sqlite3)(unsafe.Pointer(db)).FmTrace = U8(mTrace) + *(*uintptr)(unsafe.Pointer(db + 248)) = xTrace + (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg = pArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// Register a profile function. The pArg from the previously registered +// profile function is returned. +// +// A NULL profile function means that no profiling is executes. A non-NULL +// profile is a pointer to a function that is invoked at the conclusion of +// each SQL statement that is run. +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ + var pOld uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pOld = (*Sqlite3)(unsafe.Pointer(db)).FpProfileArg + (*Sqlite3)(unsafe.Pointer(db)).FxProfile = xProfile + (*Sqlite3)(unsafe.Pointer(db)).FpProfileArg = pArg + *(*U8)(unsafe.Pointer(db + 110)) &= U8(SQLITE_TRACE_NONLEGACY_MASK) + if (*Sqlite3)(unsafe.Pointer(db)).FxProfile != 0 { + *(*U8)(unsafe.Pointer(db + 110)) |= U8(SQLITE_TRACE_XPROFILE) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return pOld +} + +// Register a function to be invoked when a transaction commits. +// If the invoked function returns non-zero, then the commit becomes a +// rollback. +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ + var pOld uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pOld = (*Sqlite3)(unsafe.Pointer(db)).FpCommitArg + (*Sqlite3)(unsafe.Pointer(db)).FxCommitCallback = xCallback + (*Sqlite3)(unsafe.Pointer(db)).FpCommitArg = pArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return pOld +} + +// Register a callback to be invoked each time a row is updated, +// inserted or deleted using this database connection. +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ + var pRet uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pRet = (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg + (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback = xCallback + (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg = pArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return pRet +} + +// Register a callback to be invoked each time a transaction is rolled +// back by this database connection. +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ + var pRet uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pRet = (*Sqlite3)(unsafe.Pointer(db)).FpRollbackArg + (*Sqlite3)(unsafe.Pointer(db)).FxRollbackCallback = xCallback + (*Sqlite3)(unsafe.Pointer(db)).FpRollbackArg = pArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return pRet +} + +// Register a callback to be invoked each time a row is updated, +// inserted or deleted using this database connection. +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ + var pRet uintptr + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg + (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback = xCallback + (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg = pArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return pRet +} + +// Register a function to be invoked prior to each autovacuum that +// determines the number of pages to vacuum. +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) + } + (*Sqlite3)(unsafe.Pointer(db)).FxAutovacPages = xCallback + (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg = pArg + (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr = xDestructor + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// The sqlite3_wal_hook() callback registered by sqlite3_wal_autocheckpoint(). +// Invoke sqlite3_wal_checkpoint if the number of frames in the log file +// is greater than sqlite3.pWalArg cast to an integer (the value configured by +// wal_autocheckpoint()). +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ + if nFrame >= int32(pClientData) { + Xsqlite3BeginBenignMalloc(tls) + Xsqlite3_wal_checkpoint(tls, db, zDb) + Xsqlite3EndBenignMalloc(tls) + } + return SQLITE_OK +} + +// Configure an sqlite3_wal_hook() callback to automatically checkpoint +// a database after committing a transaction if there are nFrame or +// more frames in the log file. Passing zero or a negative value as the +// nFrame parameter disables automatic checkpoints entirely. +// +// The callback registered by this function replaces any existing callback +// registered using sqlite3_wal_hook(). Likewise, registering a callback +// using sqlite3_wal_hook() disables the automatic checkpoint mechanism +// configured by this function. +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ + if nFrame > 0 { + Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 + }{Xsqlite3WalDefaultHook})), uintptr(int64(nFrame))) + } else { + Xsqlite3_wal_hook(tls, db, uintptr(0), uintptr(0)) + } + return SQLITE_OK +} + +// Register a callback to be invoked each time a transaction is written +// into the write-ahead-log by this database connection. +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ + var pRet uintptr + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg + (*Sqlite3)(unsafe.Pointer(db)).FxWalCallback = xCallback + (*Sqlite3)(unsafe.Pointer(db)).FpWalArg = pArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return pRet +} + +// Checkpoint database zDb. +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 // Return code + var iDb int32 // Schema to checkpoint + + // Initialize the output variables to -1 in case an error occurs. + if pnLog != 0 { + *(*int32)(unsafe.Pointer(pnLog)) = -1 + } + if pnCkpt != 0 { + *(*int32)(unsafe.Pointer(pnCkpt)) = -1 + } + + if eMode < SQLITE_CHECKPOINT_PASSIVE || eMode > SQLITE_CHECKPOINT_TRUNCATE { + // EVIDENCE-OF: R-03996-12088 The M parameter must be a valid checkpoint + // mode: + return SQLITE_MISUSE + } + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if zDb != 0 && *(*uint8)(unsafe.Pointer(zDb)) != 0 { + iDb = Xsqlite3FindDbName(tls, db, zDb) + } else { + iDb = SQLITE_MAX_ATTACHED + 2 // This means process all schemas + } + if iDb < 0 { + rc = SQLITE_ERROR + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23930, libc.VaList(bp, zDb)) + } else { + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 + rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) + Xsqlite3Error(tls, db, rc) + } + rc = Xsqlite3ApiExit(tls, db, rc) + + // If there are no active statements, clear the interrupt flag at this + // point. + if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive == 0 { + libc.AtomicStoreNInt32(db+432, int32(0), 0) + } + + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points +// to contains a zero-length string, all attached databases are +// checkpointed. +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ + // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to + // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). + return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) +} + +// Run a checkpoint on database iDb. This is a no-op if database iDb is +// not currently open in WAL mode. +// +// If a transaction is open on the database being checkpointed, this +// function returns SQLITE_LOCKED and a checkpoint is not attempted. If +// an error occurs while running the checkpoint, an SQLite error code is +// returned (i.e. SQLITE_IOERR). Otherwise, SQLITE_OK. +// +// The mutex on database handle db should be held by the caller. The mutex +// associated with the specific b-tree being checkpointed is taken by +// this function while the checkpoint is running. +// +// If iDb is passed SQLITE_MAX_DB then all attached databases are +// checkpointed. If an error is encountered it is returned immediately - +// no attempt is made to checkpoint any remaining databases. +// +// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART +// or TRUNCATE. +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ + var rc int32 = SQLITE_OK // Return code + var i int32 // Used to iterate through attached dbs + var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered + + // See forum post a006d86f72 + + for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb && rc == SQLITE_OK; i++ { + if i == iDb || iDb == SQLITE_MAX_ATTACHED+2 { + rc = Xsqlite3BtreeCheckpoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpBt, eMode, pnLog, pnCkpt) + pnLog = uintptr(0) + pnCkpt = uintptr(0) + if rc == SQLITE_BUSY { + bBusy = 1 + rc = SQLITE_OK + } + } + } + + if rc == SQLITE_OK && bBusy != 0 { + return SQLITE_BUSY + } + return rc +} + +// This function returns true if main-memory should be used instead of +// a temporary file for transient pager files and statement journals. +// The value returned depends on the value of db->temp_store (runtime +// parameter) and the compile time value of SQLITE_TEMP_STORE. The +// following table describes the relationship between these two values +// and this functions return value. +// +// SQLITE_TEMP_STORE db->temp_store Location of temporary database +// ----------------- -------------- ------------------------------ +// 0 any file (return 0) +// 1 1 file (return 0) +// 1 2 memory (return 1) +// 1 0 file (return 0) +// 2 1 file (return 0) +// 2 2 memory (return 1) +// 2 0 memory (return 1) +// 3 any memory (return 1) +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ + return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) +} + +// Return UTF-8 encoded English language explanation of the most recent +// error. +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ + var z uintptr + if !(db != 0) { + return Xsqlite3ErrStr(tls, SQLITE_NOMEM) + } + if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) + } + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + z = Xsqlite3ErrStr(tls, SQLITE_NOMEM) + } else { + + if (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { + z = Xsqlite3_value_text(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + } else { + z = uintptr(0) + } + + if z == uintptr(0) { + z = Xsqlite3ErrStr(tls, (*Sqlite3)(unsafe.Pointer(db)).FerrCode) + } + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return z +} + +// Return the byte offset of the most recent error +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ + var iOffset int32 = -1 + if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + iOffset = (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + } + return iOffset +} + +// Return UTF-16 encoded English language explanation of the most recent +// error. +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ + var z uintptr + if !(db != 0) { + return uintptr(uintptr(unsafe.Pointer(&outOfMem))) + } + if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { + return uintptr(uintptr(unsafe.Pointer(&misuse))) + } + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + z = uintptr(uintptr(unsafe.Pointer(&outOfMem))) + } else { + z = Xsqlite3_value_text16(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + if z == uintptr(0) { + Xsqlite3ErrorWithMsg(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FerrCode, Xsqlite3ErrStr(tls, (*Sqlite3)(unsafe.Pointer(db)).FerrCode), 0) + z = Xsqlite3_value_text16(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) + } + // A malloc() may have failed within the call to sqlite3_value_text16() + // above. If this is the case, then the db->mallocFailed flag needs to + // be cleared before returning. Do this directly, instead of via + // sqlite3ApiExit(), to avoid setting the database handle error message. + Xsqlite3OomClear(tls, db) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return z +} + +var outOfMem = [14]U16{ + U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), +} /* sqlite3.c:171032:20 */ +var misuse = [34]U16{ + U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), + U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), + U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), +} /* sqlite3.c:171035:20 */ + +// Return the most recent error code generated by an SQLite routine. If NULL is +// passed to this function, we assume a malloc() failed during sqlite3_open(). +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ + if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { + return Xsqlite3MisuseError(tls, 171075) + } + if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return SQLITE_NOMEM + } + return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask +} + +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ + if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { + return Xsqlite3MisuseError(tls, 171084) + } + if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + return SQLITE_NOMEM + } + return (*Sqlite3)(unsafe.Pointer(db)).FerrCode +} + +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ + if db != 0 { + return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno + } + return 0 +} + +// Return a string that describes the kind of error specified in the +// argument. For now, this simply calls the internal sqlite3ErrStr() +// function. +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ + return Xsqlite3ErrStr(tls, rc) +} + +// Create a new collating function for database "db". The name is zName +// and the encoding is enc. +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ + var pColl uintptr + var enc2 int32 + + // If SQLITE_UTF16 is specified as the encoding type, transform this + // to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the + // SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally. + enc2 = int32(enc) + + if enc2 == SQLITE_UTF16 || enc2 == SQLITE_UTF16_ALIGNED { + enc2 = func() int32 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return SQLITE_UTF16BE + } + return SQLITE_UTF16LE + }() + } + if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { + return Xsqlite3MisuseError(tls, 171132) + } + + // Check if this call is removing or replacing an existing collation + // sequence. If so, and there are active VMs, return busy. If there + // are no active VMs, invalidate any pre-compiled statements. + pColl = Xsqlite3FindCollSeq(tls, db, U8(enc2), zName, 0) + if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { + if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { + Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, + ts+23951, 0) + return SQLITE_BUSY + } + Xsqlite3ExpirePreparedStatements(tls, db, 0) + + // If collation sequence pColl was created directly by a call to + // sqlite3_create_collation, and not generated by synthCollSeq(), + // then any copies made by synthCollSeq() need to be invalidated. + // Also, collation destructor - CollSeq.xDel() - function may need + // to be called. + if int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) == enc2 { + var aColl uintptr = Xsqlite3HashFind(tls, db+640, zName) + var j int32 + for j = 0; j < 3; j++ { + var p uintptr = aColl + uintptr(j)*40 + if int32((*CollSeq)(unsafe.Pointer(p)).Fenc) == int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc) { + if (*CollSeq)(unsafe.Pointer(p)).FxDel != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(p)).FxDel})).f(tls, (*CollSeq)(unsafe.Pointer(p)).FpUser) + } + (*CollSeq)(unsafe.Pointer(p)).FxCmp = uintptr(0) + } + } + } + } + + pColl = Xsqlite3FindCollSeq(tls, db, U8(enc2), zName, 1) + if pColl == uintptr(0) { + return SQLITE_NOMEM + } + (*CollSeq)(unsafe.Pointer(pColl)).FxCmp = xCompare + (*CollSeq)(unsafe.Pointer(pColl)).FpUser = pCtx + (*CollSeq)(unsafe.Pointer(pColl)).FxDel = xDel + (*CollSeq)(unsafe.Pointer(pColl)).Fenc = U8(enc2 | int32(enc)&SQLITE_UTF16_ALIGNED) + Xsqlite3Error(tls, db, SQLITE_OK) + return SQLITE_OK +} + +// This array defines hard upper bounds on limit values. The +// initializer must be kept in sync with the SQLITE_LIMIT_* +// #defines in sqlite3.h. +var aHardLimit = [12]int32{ + SQLITE_MAX_LENGTH, + SQLITE_MAX_SQL_LENGTH, + SQLITE_MAX_COLUMN, + SQLITE_MAX_EXPR_DEPTH, + SQLITE_MAX_COMPOUND_SELECT, + SQLITE_MAX_VDBE_OP, + SQLITE_MAX_FUNCTION_ARG, + SQLITE_MAX_ATTACHED, + SQLITE_MAX_LIKE_PATTERN_LENGTH, + SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 + SQLITE_MAX_TRIGGER_DEPTH, + SQLITE_MAX_WORKER_THREADS, +} /* sqlite3.c:171185:18 */ + +// Make sure the hard limits are set to reasonable values + +// Change the value of a limit. Report the old value. +// If an invalid limit index is supplied, report -1. +// Make no changes but still report the old value if the +// new limit is negative. +// +// A new lower limit does not shrink existing constructs. +// It merely prevents new constructs that exceed the limit +// from forming. +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ + var oldLimit int32 + + // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME + // there is a hard upper bound set at compile-time by a C preprocessor + // macro called SQLITE_MAX_NAME. (The "_LIMIT_" in the name is changed to + // "_MAX_".) + + if limitId < 0 || limitId >= SQLITE_LIMIT_WORKER_THREADS+1 { + return -1 + } + oldLimit = *(*int32)(unsafe.Pointer(db + 136 + uintptr(limitId)*4)) + if newLimit >= 0 { // IMP: R-52476-28732 + if newLimit > aHardLimit[limitId] { + newLimit = aHardLimit[limitId] // IMP: R-51463-25634 + } else if newLimit < 1 && limitId == SQLITE_LIMIT_LENGTH { + newLimit = 1 + } + *(*int32)(unsafe.Pointer(db + 136 + uintptr(limitId)*4)) = newLimit + } + return oldLimit // IMP: R-53341-35419 +} + +// This function is used to parse both URIs and non-URI filenames passed by the +// user to API functions sqlite3_open() or sqlite3_open_v2(), and for database +// URIs specified as part of ATTACH statements. +// +// The first argument to this function is the name of the VFS to use (or +// a NULL to signify the default VFS) if the URI does not contain a "vfs=xxx" +// query parameter. The second argument contains the URI (or non-URI filename) +// itself. When this function is called the *pFlags variable should contain +// the default flags to open the database handle with. The value stored in +// *pFlags may be updated before returning if the URI filename contains +// "cache=xxx" or "mode=xxx" query parameters. +// +// If successful, SQLITE_OK is returned. In this case *ppVfs is set to point to +// the VFS that should be used to open the database file. *pzFile is set to +// point to a buffer containing the name of the file to open. The value +// stored in *pzFile is a database name acceptable to sqlite3_uri_parameter() +// and is in the same format as names created using sqlite3_create_filename(). +// The caller must invoke sqlite3_free_filename() (not sqlite3_free()!) on +// the value returned in *pzFile to avoid a memory leak. +// +// If an error occurs, then an SQLite error code is returned and *pzErrMsg +// may be set to point to a buffer containing an English language error +// message. It is the responsibility of the caller to eventually release +// this buffer by calling sqlite3_free(). +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var rc int32 + var flags uint32 + var zVfs uintptr + var zFile uintptr + var c uint8 + var nUri int32 + var octet int32 + var z uintptr + var i int32 + var mode int32 + var aMode uintptr + var zModeType uintptr + var mask int32 + var limit int32 + var nOpt int32 + var zVal uintptr + var nVal int32 + var zOpt uintptr + var eState int32 // Parser state when parsing URI + var iIn int32 // Input character index + var iOut int32 // Output character index + var nByte U64 + rc = SQLITE_OK + flags = *(*uint32)(unsafe.Pointer(pFlags)) + zVfs = zDefaultVfs + nUri = Xsqlite3Strlen30(tls, zUri) + + if !((flags&uint32(SQLITE_OPEN_URI) != 0 || + Xsqlite3Config.FbOpenUri != 0) && + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24019, uint64(5)) == 0) { + goto __1 + } // Input character index + iOut = 0 // Output character index + nByte = U64(nUri + 8) // Bytes of space to allocate + + // Make sure the SQLITE_OPEN_URI flag is set to indicate to the VFS xOpen + // method that there may be extra parameters following the file-name. + flags = flags | uint32(SQLITE_OPEN_URI) + + iIn = 0 +__3: + if !(iIn < nUri) { + goto __5 + } + nByte = nByte + U64(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))) == '&')) + goto __4 +__4: + iIn++ + goto __3 + goto __5 +__5: + ; + zFile = Xsqlite3_malloc64(tls, nByte) + if !!(zFile != 0) { + goto __6 + } + return SQLITE_NOMEM +__6: + ; + + libc.Xmemset(tls, zFile, 0, uint64(4)) // 4-byte of 0x00 is the start of DB name marker + zFile += uintptr(4) + + iIn = 5 + // Discard the scheme and authority segments of the URI. + if !(int32(*(*uint8)(unsafe.Pointer(zUri + 5))) == '/' && int32(*(*uint8)(unsafe.Pointer(zUri + 6))) == '/') { + goto __7 + } + iIn = 7 +__8: + if !(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0 && int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))) != '/') { + goto __9 + } + iIn++ + goto __8 +__9: + ; + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24025, zUri+7, uint64(9)) != 0)) { + goto __10 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24035, + libc.VaList(bp, iIn-7, zUri+7)) + rc = SQLITE_ERROR + goto parse_uri_out +__10: + ; +__7: + ; + + // Copy the filename and any query parameters into the zFile buffer. + // Decode %HH escape codes along the way. + // + // Within this loop, variable eState may be set to 0, 1 or 2, depending + // on the parsing context. As follows: + // + // 0: Parsing file-name. + // 1: Parsing name section of a name=value query parameter. + // 2: Parsing value section of a name=value query parameter. + eState = 0 +__11: + if !(int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))))) != 0 && int32(c) != '#') { + goto __12 + } + iIn++ + if !(int32(c) == '%' && + int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))))])&0x08 != 0 && + int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn+1))))])&0x08 != 0) { + goto __13 + } + octet = int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(libc.PostIncInt32(&iIn, 1))))))) << 4 + octet = octet + int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(libc.PostIncInt32(&iIn, 1))))))) + + if !(octet == 0) { + goto __15 + } + // This branch is taken when "%00" appears within the URI. In this + // case we ignore all text in the remainder of the path, name or + // value currently being parsed. So ignore the current character + // and skip to the next "?", "=" or "&", as appropriate. +__16: + if !(int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))))) != 0 && int32(c) != '#' && + (eState != 0 || int32(c) != '?') && + (eState != 1 || int32(c) != '=' && int32(c) != '&') && + (eState != 2 || int32(c) != '&')) { + goto __17 + } + iIn++ + goto __16 +__17: + ; + goto __11 +__15: + ; + c = uint8(octet) + goto __14 +__13: + if !(eState == 1 && (int32(c) == '&' || int32(c) == '=')) { + goto __18 + } + if !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iOut-1)))) == 0) { + goto __20 + } + // An empty option name. Ignore this option altogether. +__21: + if !(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0 && int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))) != '#' && int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn-1)))) != '&') { + goto __22 + } + iIn++ + goto __21 +__22: + ; + goto __11 +__20: + ; + if !(int32(c) == '&') { + goto __23 + } + *(*uint8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8(0) + goto __24 +__23: + eState = 2 +__24: + ; + c = uint8(0) + goto __19 +__18: + if !(eState == 0 && int32(c) == '?' || eState == 2 && int32(c) == '&') { + goto __25 + } + c = uint8(0) + eState = 1 +__25: + ; +__19: + ; +__14: + ; + *(*uint8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = c + goto __11 +__12: + ; + if !(eState == 1) { + goto __26 + } + *(*uint8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8(0) +__26: + ; + libc.Xmemset(tls, zFile+uintptr(iOut), 0, uint64(4)) // end-of-options + empty journal filenames + + // Check if there were any options specified that should be interpreted + // here. Options that are interpreted here include "vfs" and those that + // correspond to flags that may be passed to the sqlite3_open_v2() + // method. + zOpt = zFile + uintptr(Xsqlite3Strlen30(tls, zFile)+1) +__27: + if !(*(*uint8)(unsafe.Pointer(zOpt)) != 0) { + goto __28 + } + nOpt = Xsqlite3Strlen30(tls, zOpt) + zVal = zOpt + uintptr(nOpt+1) + nVal = Xsqlite3Strlen30(tls, zVal) + + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24063, zOpt, uint64(3)) == 0) { + goto __29 + } + zVfs = zVal + goto __30 +__29: + aMode = uintptr(0) + zModeType = uintptr(0) + mask = 0 + limit = 0 + + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24067, zOpt, uint64(5)) == 0) { + goto __31 + } + + mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE + aMode = uintptr(unsafe.Pointer(&aCacheMode)) + limit = mask + zModeType = ts + 24067 /* "cache" */ +__31: + ; + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24073, zOpt, uint64(4)) == 0) { + goto __32 + } + + mask = SQLITE_OPEN_READONLY | SQLITE_OPEN_READWRITE | + SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY + aMode = uintptr(unsafe.Pointer(&aOpenMode)) + limit = int32(uint32(mask) & flags) + zModeType = ts + 3214 /* "access" */ +__32: + ; + + if !(aMode != 0) { + goto __33 + } + mode = 0 + i = 0 +__34: + if !((*OpenMode)(unsafe.Pointer(aMode+uintptr(i)*16)).Fz != 0) { + goto __36 + } + z = (*OpenMode)(unsafe.Pointer(aMode + uintptr(i)*16)).Fz + if !(nVal == Xsqlite3Strlen30(tls, z) && 0 == libc.Xmemcmp(tls, zVal, z, uint64(nVal))) { + goto __37 + } + mode = (*OpenMode)(unsafe.Pointer(aMode + uintptr(i)*16)).Fmode + goto __36 +__37: + ; + goto __35 +__35: + i++ + goto __34 + goto __36 +__36: + ; + if !(mode == 0) { + goto __38 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24078, libc.VaList(bp+16, zModeType, zVal)) + rc = SQLITE_ERROR + goto parse_uri_out +__38: + ; + if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { + goto __39 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24098, + libc.VaList(bp+32, zModeType, zVal)) + rc = SQLITE_PERM + goto parse_uri_out +__39: + ; + flags = flags&uint32(^mask) | uint32(mode) +__33: + ; +__30: + ; + + zOpt = zVal + uintptr(nVal+1) + goto __27 +__28: + ; + + goto __2 +__1: + zFile = Xsqlite3_malloc64(tls, uint64(nUri+8)) + if !!(zFile != 0) { + goto __40 + } + return SQLITE_NOMEM +__40: + ; + libc.Xmemset(tls, zFile, 0, uint64(4)) + zFile += uintptr(4) + if !(nUri != 0) { + goto __41 + } + libc.Xmemcpy(tls, zFile, zUri, uint64(nUri)) +__41: + ; + libc.Xmemset(tls, zFile+uintptr(nUri), 0, uint64(4)) + flags = flags & libc.Uint32FromInt32(libc.CplInt32(SQLITE_OPEN_URI)) +__2: + ; + + *(*uintptr)(unsafe.Pointer(ppVfs)) = Xsqlite3_vfs_find(tls, zVfs) + if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { + goto __42 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24122, libc.VaList(bp+48, zVfs)) + rc = SQLITE_ERROR +__42: + ; +parse_uri_out: + if !(rc != SQLITE_OK) { + goto __43 + } + Xsqlite3_free_filename(tls, zFile) + zFile = uintptr(0) +__43: + ; + *(*uint32)(unsafe.Pointer(pFlags)) = flags + *(*uintptr)(unsafe.Pointer(pzFile)) = zFile + return rc +} + +type OpenMode = struct { + Fz uintptr + Fmode int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:171462:9 */ + +var aCacheMode = [3]OpenMode{ + {Fz: ts + 24138, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24145, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {}, +} /* sqlite3.c:171471:34 */ +var aOpenMode = [5]OpenMode{ + {Fz: ts + 24153, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24156, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24159, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17260, Fmode: SQLITE_OPEN_MEMORY}, + {}, +} /* sqlite3.c:171483:34 */ + +// This routine does the core work of extracting URI parameters from a +// database filename for the sqlite3_uri_parameter() interface. +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + for zFilename != uintptr(0) && *(*uint8)(unsafe.Pointer(zFilename)) != 0 { + var x int32 = libc.Xstrcmp(tls, zFilename, zParam) + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + if x == 0 { + return zFilename + } + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + } + return uintptr(0) +} + +// This routine does the work of opening a database on behalf of +// sqlite3_open() and sqlite3_open16(). The database filename "zFilename" +// is UTF-8 encoded. +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + *(*uint32)(unsafe.Pointer(bp + 8)) = flags + + var db uintptr // Store allocated handle here + var rc int32 // Return code + var isThreadsafe int32 // True for threadsafe connections + // var zOpen uintptr at bp+16, 8 + // Filename argument to pass to BtreeOpen() + // var zErrMsg uintptr at bp+24, 8 + // Error message from sqlite3ParseUri() + var i int32 + *(*uintptr)(unsafe.Pointer(bp + 16 /* zOpen */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = uintptr(0) // Loop counter + + *(*uintptr)(unsafe.Pointer(ppDb)) = uintptr(0) + rc = Xsqlite3_initialize(tls) + if !(rc != 0) { + goto __1 + } + return rc +__1: + ; + + if !(int32(Xsqlite3Config.FbCoreMutex) == 0) { + goto __2 + } + isThreadsafe = 0 + goto __3 +__2: + if !(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(SQLITE_OPEN_NOMUTEX) != 0) { + goto __4 + } + isThreadsafe = 0 + goto __5 +__4: + if !(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(SQLITE_OPEN_FULLMUTEX) != 0) { + goto __6 + } + isThreadsafe = 1 + goto __7 +__6: + isThreadsafe = int32(Xsqlite3Config.FbFullMutex) +__7: + ; +__5: + ; +__3: + ; + + if !(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(SQLITE_OPEN_PRIVATECACHE) != 0) { + goto __8 + } + *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) &= libc.Uint32FromInt32(libc.CplInt32(SQLITE_OPEN_SHAREDCACHE)) + goto __9 +__8: + if !(Xsqlite3Config.FsharedCacheEnabled != 0) { + goto __10 + } + *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) |= uint32(SQLITE_OPEN_SHAREDCACHE) +__10: + ; +__9: + ; + + // Remove harmful bits from the flags parameter + // + // The SQLITE_OPEN_NOMUTEX and SQLITE_OPEN_FULLMUTEX flags were + // dealt with in the previous code block. Besides these, the only + // valid input flags for sqlite3_open_v2() are SQLITE_OPEN_READONLY, + // SQLITE_OPEN_READWRITE, SQLITE_OPEN_CREATE, SQLITE_OPEN_SHAREDCACHE, + // SQLITE_OPEN_PRIVATECACHE, SQLITE_OPEN_EXRESCODE, and some reserved + // bits. Silently mask off all other flags. + *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) &= libc.Uint32FromInt32(libc.CplInt32(SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_TRANSIENT_DB | SQLITE_OPEN_MAIN_JOURNAL | SQLITE_OPEN_TEMP_JOURNAL | SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_SUPER_JOURNAL | SQLITE_OPEN_NOMUTEX | SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_WAL)) + + // Allocate the sqlite data structure + db = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3{}))) + if !(db == uintptr(0)) { + goto __11 + } + goto opendb_out +__11: + ; + if !(isThreadsafe != 0) { + goto __12 + } + (*Sqlite3)(unsafe.Pointer(db)).Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_RECURSIVE) + if !((*Sqlite3)(unsafe.Pointer(db)).Fmutex == uintptr(0)) { + goto __13 + } + Xsqlite3_free(tls, db) + db = uintptr(0) + goto opendb_out +__13: + ; + if !(isThreadsafe == 0) { + goto __14 + } + +__14: + ; +__12: + ; + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { + if *(*uint32)(unsafe.Pointer(bp + 8))&uint32(SQLITE_OPEN_EXRESCODE) != uint32(0) { + return libc.Int32FromUint32(0xffffffff) + } + return 0xff + }() + (*Sqlite3)(unsafe.Pointer(db)).FnDb = 2 + (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_BUSY) + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 /* &.aDbStatic */ + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable = U32(1) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) + + libc.Xmemcpy(tls, db+136, uintptr(unsafe.Pointer(&aHardLimit)), uint64(unsafe.Sizeof([12]int32{}))) + *(*int32)(unsafe.Pointer(db + 136 + 11*4)) = SQLITE_DEFAULT_WORKER_THREADS + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) + (*Sqlite3)(unsafe.Pointer(db)).FnextAutovac = int8(-1) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = Xsqlite3Config.FszMmap + (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize = 0 + (*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = uintptr(unsafe.Pointer(&Xsqlite3StdType)) // Any array of string ptrs will do + *(*U64)(unsafe.Pointer(db + 48)) |= uint64(uint32(SQLITE_ShortColNames| + SQLITE_EnableTrigger) | + SQLITE_EnableView | + uint32(SQLITE_CacheSpill) | + uint32(SQLITE_TrustedSchema) | + + uint32(SQLITE_DqsDML) | + uint32(SQLITE_DqsDDL) | + + uint32(SQLITE_AutoIndex)) + Xsqlite3HashInit(tls, db+640) + Xsqlite3HashInit(tls, db+568) + + // Add the default collation sequence BINARY. BINARY works for both UTF-8 + // and UTF-16, so add a version for each to avoid any unnecessary + // conversions. The only error that can occur here is a malloc() failure. + // + // EVIDENCE-OF: R-52786-44878 SQLite defines three built-in collating + // functions: + createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{binCollFunc})), uintptr(0)) + createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16BE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{binCollFunc})), uintptr(0)) + createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{binCollFunc})), uintptr(0)) + createCollation(tls, db, ts+21685, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{nocaseCollatingFunc})), uintptr(0)) + createCollation(tls, db, ts+24163, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{rtrimCollFunc})), uintptr(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __15 + } + goto opendb_out +__15: + ; + + // Parse the filename/URI argument + // + // Only allow sensible combinations of bits in the flags argument. + // Throw an error if any non-sense combination is used. If we + // do not block illegal combinations here, it could trigger + // assert() statements in deeper layers. Sensible combinations + // are: + // + // 1: SQLITE_OPEN_READONLY + // 2: SQLITE_OPEN_READWRITE + // 6: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE + (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) + + // READONLY + // READWRITE + // READWRITE | CREATE + if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { + goto __16 + } + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 + goto __17 +__16: + rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) +__17: + ; + if !(rc != SQLITE_OK) { + goto __18 + } + if !(rc == SQLITE_NOMEM) { + goto __19 + } + Xsqlite3OomFault(tls, db) +__19: + ; + Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { + return ts + 3605 /* "%s" */ + } + return uintptr(0) + }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) + goto opendb_out +__18: + ; + + // Open the backend database driver + rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, *(*uintptr)(unsafe.Pointer(bp + 16 /* zOpen */)), db, (*Sqlite3)(unsafe.Pointer(db)).FaDb+8, 0, + int32(*(*uint32)(unsafe.Pointer(bp + 8))|uint32(SQLITE_OPEN_MAIN_DB))) + if !(rc != SQLITE_OK) { + goto __20 + } + if !(rc == SQLITE_IOERR|int32(12)<<8) { + goto __21 + } + rc = SQLITE_NOMEM +__21: + ; + Xsqlite3Error(tls, db, rc) + goto opendb_out +__20: + ; + Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema = Xsqlite3SchemaGet(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) + if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + goto __22 + } + Xsqlite3SetTextEncoding(tls, db, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc) +__22: + ; + Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpSchema = Xsqlite3SchemaGet(tls, db, uintptr(0)) + + // The default safety_level for the main database is FULL; for the temp + // database it is OFF. This matches the pager layer defaults. + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6323 /* "main" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23165 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) + + (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __23 + } + goto opendb_out +__23: + ; + + // Register all built-in functions, but do not attempt to read the + // database schema yet. This is delayed until the first time the database + // is accessed. + Xsqlite3Error(tls, db, SQLITE_OK) + Xsqlite3RegisterPerConnectionBuiltinFunctions(tls, db) + rc = Xsqlite3_errcode(tls, db) + + // Load compiled-in extensions + i = 0 +__24: + if !(rc == SQLITE_OK && i < int32(uint64(unsafe.Sizeof(sqlite3BuiltinExtensions))/uint64(unsafe.Sizeof(uintptr(0))))) { + goto __26 + } + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{sqlite3BuiltinExtensions[i]})).f(tls, db) + goto __25 +__25: + i++ + goto __24 + goto __26 +__26: + ; + + // Load automatic extensions - extensions that have been registered + // using the sqlite3_automatic_extension() API. + if !(rc == SQLITE_OK) { + goto __27 + } + Xsqlite3AutoLoadExtensions(tls, db) + rc = Xsqlite3_errcode(tls, db) + if !(rc != SQLITE_OK) { + goto __28 + } + goto opendb_out +__28: + ; +__27: + ; + + // -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking + // mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking + // mode. Doing nothing at all also makes NORMAL the default. + + if !(rc != 0) { + goto __29 + } + Xsqlite3Error(tls, db, rc) +__29: + ; + + // Enable the lookaside-malloc subsystem + setupLookaside(tls, db, uintptr(0), Xsqlite3Config.FszLookaside, + Xsqlite3Config.FnLookaside) + + Xsqlite3_wal_autocheckpoint(tls, db, SQLITE_DEFAULT_WAL_AUTOCHECKPOINT) + +opendb_out: + if !(db != 0) { + goto __30 + } + + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) +__30: + ; + rc = Xsqlite3_errcode(tls, db) + + if !(rc&0xff == SQLITE_NOMEM) { + goto __31 + } + Xsqlite3_close(tls, db) + db = uintptr(0) + goto __32 +__31: + if !(rc != SQLITE_OK) { + goto __33 + } + (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_SICK) +__33: + ; +__32: + ; + *(*uintptr)(unsafe.Pointer(ppDb)) = db + Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zOpen */))) + return rc +} + +// Open a new database handle. +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ + return openDatabase(tls, zFilename, ppDb, + uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) +} + +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ + return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) +} + +// Open a new database handle. +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ + var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 + var pVal uintptr + var rc int32 + + *(*uintptr)(unsafe.Pointer(ppDb)) = uintptr(0) + rc = Xsqlite3_initialize(tls) + if rc != 0 { + return rc + } + if zFilename == uintptr(0) { + zFilename = ts + 24169 /* "\x00\x00" */ + } + pVal = Xsqlite3ValueNew(tls, uintptr(0)) + Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }(), uintptr(0)) + zFilename8 = Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) + if zFilename8 != 0 { + rc = openDatabase(tls, zFilename8, ppDb, + uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) + + if rc == SQLITE_OK && !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppDb)))).FaDb)).FpSchema)).FschemaFlags)&DB_SchemaLoaded == DB_SchemaLoaded) { + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppDb)))).FaDb)).FpSchema)).Fenc = libc.AssignPtrUint8(*(*uintptr)(unsafe.Pointer(ppDb))+100, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) + } + } else { + rc = SQLITE_NOMEM + } + Xsqlite3ValueFree(tls, pVal) + + return rc & 0xff +} + +// Register a new collation sequence with the database handle db. +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ + return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) +} + +// Register a new collation sequence with the database handle db. +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ + var rc int32 + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + rc = createCollation(tls, db, zName, U8(enc), pCtx, xCompare, xDel) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Register a new collation sequence with the database handle db. +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ + var rc int32 = SQLITE_OK + var zName8 uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + zName8 = Xsqlite3Utf16to8(tls, db, zName, -1, func() uint8 { + if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { + return uint8(SQLITE_UTF16BE) + } + return uint8(SQLITE_UTF16LE) + }()) + if zName8 != 0 { + rc = createCollation(tls, db, zName8, U8(enc), pCtx, xCompare, uintptr(0)) + Xsqlite3DbFree(tls, db, zName8) + } + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Register a collation sequence factory callback with the database handle +// db. Replace any previously installed collation sequence factory. +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded + (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg = pCollNeededArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// Register a collation sequence factory callback with the database handle +// db. Replace any previously installed collation sequence factory. +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 + (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg = pCollNeededArg + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// This function is now an anachronism. It used to be used to recover from a +// malloc() failure, but SQLite now does this automatically. +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ + return SQLITE_OK +} + +// Test to see whether or not the database connection is in autocommit +// mode. Return TRUE if it is and FALSE if not. Autocommit mode is on +// by default. Autocommit is disabled by a BEGIN statement and reenabled +// by the next COMMIT or ROLLBACK. +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ + return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) +} + +// The following routines are substitutes for constants SQLITE_CORRUPT, +// SQLITE_MISUSE, SQLITE_CANTOPEN, SQLITE_NOMEM and possibly other error +// constants. They serve two purposes: +// +// 1. Serve as a convenient place to set a breakpoint in a debugger +// to detect when version error conditions occurs. +// +// 2. Invoke sqlite3_log() to provide the source code location where +// a low-level error is first detected. +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + Xsqlite3_log(tls, iErr, ts+24172, + libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) + return iErr +} + +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ + + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24197) +} + +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ + + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24217) +} + +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ + + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24224) +} + +// This is a convenience routine that makes sure that all thread-specific +// data for this thread has been deallocated. +// +// SQLite no longer uses thread-specific data so this routine is now a +// no-op. It is retained for historical compatibility. +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ +} + +// Return meta information about a specific column of a database table. +// See comment in sqlite3.h (sqlite.h.in) for details. +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var rc int32 + // var zErrMsg uintptr at bp+24, 8 + + var pTab uintptr + var pCol uintptr + var iCol int32 + var zDataType uintptr + var zCollSeq uintptr + var notnull int32 + var primarykey int32 + var autoinc int32 + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = uintptr(0) + pTab = uintptr(0) + pCol = uintptr(0) + iCol = 0 + zDataType = uintptr(0) + zCollSeq = uintptr(0) + notnull = 0 + primarykey = 0 + autoinc = 0 + + // Ensure the database schema has been loaded + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + Xsqlite3BtreeEnterAll(tls, db) + rc = Xsqlite3Init(tls, db, bp+24) + if !(SQLITE_OK != rc) { + goto __1 + } + goto error_out +__1: + ; + + // Locate the table in question + pTab = Xsqlite3FindTable(tls, db, zTableName, zDbName) + if !(!(pTab != 0) || int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + goto __2 + } + pTab = uintptr(0) + goto error_out +__2: + ; + + // Find the column for which info is requested + if !(zColumnName == uintptr(0)) { + goto __3 + } + // Query for existance of table only + goto __4 +__3: + iCol = 0 +__5: + if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __7 + } + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 + if !(0 == Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zColumnName)) { + goto __8 + } + goto __7 +__8: + ; + goto __6 +__6: + iCol++ + goto __5 + goto __7 +__7: + ; + if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { + goto __9 + } + if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) && Xsqlite3IsRowid(tls, zColumnName) != 0) { + goto __10 + } + iCol = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) + if iCol >= 0 { + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 + } else { + pCol = uintptr(0) + } + goto __11 +__10: + pTab = uintptr(0) + goto error_out +__11: + ; +__9: + ; +__4: + ; + + // The following block stores the meta information that will be returned + // to the caller in local variables zDataType, zCollSeq, notnull, primarykey + // and autoinc. At this point there are two possibilities: + // + // 1. The specified column name was rowid", "oid" or "_rowid_" + // and there is no explicitly declared IPK column. + // + // 2. The table is not a view and the column name identified an + // explicitly declared column. Copy meta information from *pCol. + if !(pCol != 0) { + goto __12 + } + zDataType = Xsqlite3ColumnType(tls, pCol, uintptr(0)) + zCollSeq = Xsqlite3ColumnColl(tls, pCol) + notnull = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0) != 0) + primarykey = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0) + autoinc = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FiPKey) == iCol && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0)) + goto __13 +__12: + zDataType = ts + 1090 /* "INTEGER" */ + primarykey = 1 +__13: + ; + if !!(zCollSeq != 0) { + goto __14 + } + zCollSeq = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) +__14: + ; + +error_out: + Xsqlite3BtreeLeaveAll(tls, db) + + // Whether the function call succeeded or failed, set the output parameters + // to whatever their local counterparts contain. If an error did occur, + // this has the effect of zeroing all output parameters. + if !(pzDataType != 0) { + goto __15 + } + *(*uintptr)(unsafe.Pointer(pzDataType)) = zDataType +__15: + ; + if !(pzCollSeq != 0) { + goto __16 + } + *(*uintptr)(unsafe.Pointer(pzCollSeq)) = zCollSeq +__16: + ; + if !(pNotNull != 0) { + goto __17 + } + *(*int32)(unsafe.Pointer(pNotNull)) = notnull +__17: + ; + if !(pPrimaryKey != 0) { + goto __18 + } + *(*int32)(unsafe.Pointer(pPrimaryKey)) = primarykey +__18: + ; + if !(pAutoinc != 0) { + goto __19 + } + *(*int32)(unsafe.Pointer(pAutoinc)) = autoinc +__19: + ; + + if !(SQLITE_OK == rc && !(pTab != 0)) { + goto __20 + } + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24241, libc.VaList(bp, zTableName, + zColumnName)) + rc = SQLITE_ERROR +__20: + ; + Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { + return ts + 3605 /* "%s" */ + } + return uintptr(0) + }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) + rc = Xsqlite3ApiExit(tls, db, rc) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Sleep for a little while. Return the amount of time slept. +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ + var pVfs uintptr + var rc int32 + pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) + if pVfs == uintptr(0) { + return 0 + } + + // This function works in milliseconds, but the underlying OsSleep() + // API uses microseconds. Hence the 1000's. + rc = Xsqlite3OsSleep(tls, pVfs, 1000*ms) / 1000 + return rc +} + +// Enable or disable the extended result codes. +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { + if onoff != 0 { + return libc.Int32FromUint32(0xffffffff) + } + return 0xff + }() + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return SQLITE_OK +} + +// Invoke the xFileControl method on a particular database. +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ + var rc int32 = SQLITE_ERROR + var pBtree uintptr + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + pBtree = Xsqlite3DbNameToBtree(tls, db, zDbName) + if pBtree != 0 { + var pPager uintptr + var fd uintptr + Xsqlite3BtreeEnter(tls, pBtree) + pPager = Xsqlite3BtreePager(tls, pBtree) + + fd = Xsqlite3PagerFile(tls, pPager) + + if op == SQLITE_FCNTL_FILE_POINTER { + *(*uintptr)(unsafe.Pointer(pArg)) = fd + rc = SQLITE_OK + } else if op == SQLITE_FCNTL_VFS_POINTER { + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3PagerVfs(tls, pPager) + rc = SQLITE_OK + } else if op == SQLITE_FCNTL_JOURNAL_POINTER { + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3PagerJrnlFile(tls, pPager) + rc = SQLITE_OK + } else if op == SQLITE_FCNTL_DATA_VERSION { + *(*uint32)(unsafe.Pointer(pArg)) = Xsqlite3PagerDataVersion(tls, pPager) + rc = SQLITE_OK + } else if op == SQLITE_FCNTL_RESERVE_BYTES { + var iNew int32 = *(*int32)(unsafe.Pointer(pArg)) + *(*int32)(unsafe.Pointer(pArg)) = Xsqlite3BtreeGetRequestedReserve(tls, pBtree) + if iNew >= 0 && iNew <= 255 { + Xsqlite3BtreeSetPageSize(tls, pBtree, 0, iNew, 0) + } + rc = SQLITE_OK + } else { + var nSave int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy + rc = Xsqlite3OsFileControl(tls, fd, op, pArg) + (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = nSave + } + Xsqlite3BtreeLeave(tls, pBtree) + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Interface to the testing logic. +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ + var rc int32 = 0 + var ap Va_list + _ = ap + ap = va + switch op { + + // Save the current state of the PRNG. + case SQLITE_TESTCTRL_PRNG_SAVE: + { + Xsqlite3PrngSaveState(tls) + break + + } + + // Restore the state of the PRNG to the last state saved using + // PRNG_SAVE. If PRNG_SAVE has never before been called, then + // this verb acts like PRNG_RESET. + case SQLITE_TESTCTRL_PRNG_RESTORE: + { + Xsqlite3PrngRestoreState(tls) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_PRNG_SEED, int x, sqlite3 *db); + // + // Control the seed for the pseudo-random number generator (PRNG) that + // is built into SQLite. Cases: + // + // x!=0 && db!=0 Seed the PRNG to the current value of the + // schema cookie in the main database for db, or + // x if the schema cookie is zero. This case + // is convenient to use with database fuzzers + // as it allows the fuzzer some control over the + // the PRNG seed. + // + // x!=0 && db==0 Seed the PRNG to the value of x. + // + // x==0 && db==0 Revert to default behavior of using the + // xRandomness method on the primary VFS. + // + // This test-control also resets the PRNG so that the new seed will + // be used for the next call to sqlite3_randomness(). + case SQLITE_TESTCTRL_PRNG_SEED: + { + var x int32 = int32(libc.VaInt32(&ap)) + var y int32 + var db uintptr = libc.VaUintptr(&ap) + + if db != 0 && libc.AssignInt32(&y, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fschema_cookie) != 0 { + x = y + } + Xsqlite3Config.FiPrngSeed = uint32(x) + Xsqlite3_randomness(tls, 0, uintptr(0)) + break + + } + + // sqlite3_test_control(BITVEC_TEST, size, program) + // + // Run a test against a Bitvec object of size. The program argument + // is an array of integers that defines the test. Return -1 on a + // memory allocation error, 0 on success, or non-zero for an error. + // See the sqlite3BitvecBuiltinTest() for additional information. + case SQLITE_TESTCTRL_BITVEC_TEST: + { + var sz int32 = int32(libc.VaInt32(&ap)) + var aProg uintptr = libc.VaUintptr(&ap) + rc = Xsqlite3BitvecBuiltinTest(tls, sz, aProg) + break + + } + + // sqlite3_test_control(FAULT_INSTALL, xCallback) + // + // Arrange to invoke xCallback() whenever sqlite3FaultSim() is called, + // if xCallback is not NULL. + // + // As a test of the fault simulator mechanism itself, sqlite3FaultSim(0) + // is called immediately after installing the new callback and the return + // value from sqlite3FaultSim(0) becomes the return from + // sqlite3_test_control(). + case SQLITE_TESTCTRL_FAULT_INSTALL: + { + Xsqlite3Config.FxTestCallback = libc.VaUintptr(&ap) + rc = Xsqlite3FaultSim(tls, 0) + break + + } + + // sqlite3_test_control(BENIGN_MALLOC_HOOKS, xBegin, xEnd) + // + // Register hooks to call to indicate which malloc() failures + // are benign. + case SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: + { + var xBenignBegin uintptr + var xBenignEnd uintptr + xBenignBegin = libc.VaUintptr(&ap) + xBenignEnd = libc.VaUintptr(&ap) + Xsqlite3BenignMallocHooks(tls, xBenignBegin, xBenignEnd) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_PENDING_BYTE, unsigned int X) + // + // Set the PENDING byte to the value in the argument, if X>0. + // Make no changes if X==0. Return the value of the pending byte + // as it existing before this routine was called. + // + // IMPORTANT: Changing the PENDING byte from 0x40000000 results in + // an incompatible database file format. Changing the PENDING byte + // while any database connection is open results in undefined and + // deleterious behavior. + case SQLITE_TESTCTRL_PENDING_BYTE: + { + rc = Xsqlite3PendingByte + { + var newVal uint32 = uint32(libc.VaUint32(&ap)) + if newVal != 0 { + Xsqlite3PendingByte = int32(newVal) + } + + } + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, int X) + // + // This action provides a run-time test to see whether or not + // assert() was enabled at compile-time. If X is true and assert() + // is enabled, then the return value is true. If X is true and + // assert() is disabled, then the return value is zero. If X is + // false and assert() is enabled, then the assertion fires and the + // process aborts. If X is false and assert() is disabled, then the + // return value is zero. + case SQLITE_TESTCTRL_ASSERT: + { + var x int32 = 0 + + rc = x + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, int X) + // + // This action provides a run-time test to see how the ALWAYS and + // NEVER macros were defined at compile-time. + // + // The return value is ALWAYS(X) if X is true, or 0 if X is false. + // + // The recommended test is X==2. If the return value is 2, that means + // ALWAYS() and NEVER() are both no-op pass-through macros, which is the + // default setting. If the return value is 1, then ALWAYS() is either + // hard-coded to true or else it asserts if its argument is false. + // The first behavior (hard-coded to true) is the case if + // SQLITE_TESTCTRL_ASSERT shows that assert() is disabled and the second + // behavior (assert if the argument to ALWAYS() is false) is the case if + // SQLITE_TESTCTRL_ASSERT shows that assert() is enabled. + // + // The run-time test procedure might look something like this: + // + // if( sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, 2)==2 ){ + // // ALWAYS() and NEVER() are no-op pass-through macros + // }else if( sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, 1) ){ + // // ALWAYS(x) asserts that x is true. NEVER(x) asserts x is false. + // }else{ + // // ALWAYS(x) is a constant 1. NEVER(x) is a constant 0. + // } + case SQLITE_TESTCTRL_ALWAYS: + { + var x int32 = int32(libc.VaInt32(&ap)) + if x != 0 { + rc = x + } else { + rc = 0 + } + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_BYTEORDER); + // + // The integer returned reveals the byte-order of the computer on which + // SQLite is running: + // + // 1 big-endian, determined at run-time + // 10 little-endian, determined at run-time + // 432101 big-endian, determined at compile-time + // 123410 little-endian, determined at compile-time + case SQLITE_TESTCTRL_BYTEORDER: + { + rc = SQLITE_BYTEORDER*100 + libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 1)*10 + libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N) + // + // Enable or disable various optimizations for testing purposes. The + // argument N is a bitmask of optimizations to be disabled. For normal + // operation N should be 0. The idea is that a test program (like the + // SQL Logic Test or SLT test module) can run the same SQL multiple times + // with various optimizations disabled to verify that the same answer + // is obtained in every case. + case SQLITE_TESTCTRL_OPTIMIZATIONS: + { + var db uintptr = libc.VaUintptr(&ap) + (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags = U32(libc.VaUint32(&ap)) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, onoff, xAlt); + // + // If parameter onoff is 1, subsequent calls to localtime() fail. + // If 2, then invoke xAlt() instead of localtime(). If 0, normal + // processing. + // + // xAlt arguments are void pointers, but they really want to be: + // + // int xAlt(const time_t*, struct tm*); + // + // xAlt should write results in to struct tm object of its 2nd argument + // and return zero on success, or return non-zero on failure. + case SQLITE_TESTCTRL_LOCALTIME_FAULT: + { + Xsqlite3Config.FbLocaltimeFault = int32(libc.VaInt32(&ap)) + if Xsqlite3Config.FbLocaltimeFault == 2 { + Xsqlite3Config.FxAltLocaltime = libc.VaUintptr(&ap) + } else { + Xsqlite3Config.FxAltLocaltime = uintptr(0) + } + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, sqlite3*); + // + // Toggle the ability to use internal functions on or off for + // the database connection given in the argument. + case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: + { + var db uintptr = libc.VaUintptr(&ap) + *(*U32)(unsafe.Pointer(db + 44)) ^= U32(DBFLAG_InternalFunc) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_NEVER_CORRUPT, int); + // + // Set or clear a flag that indicates that the database file is always well- + // formed and never corrupt. This flag is clear by default, indicating that + // database files might have arbitrary corruption. Setting the flag during + // testing causes certain assert() statements in the code to be activated + // that demonstrat invariants on well-formed database files. + case SQLITE_TESTCTRL_NEVER_CORRUPT: + { + Xsqlite3Config.FneverCorrupt = int32(libc.VaInt32(&ap)) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS, int); + // + // Set or clear a flag that causes SQLite to verify that type, name, + // and tbl_name fields of the sqlite_schema table. This is normally + // on, but it is sometimes useful to turn it off for testing. + // + // 2020-07-22: Disabling EXTRA_SCHEMA_CHECKS also disables the + // verification of rootpage numbers when parsing the schema. This + // is useful to make it easier to reach strange internal error states + // during testing. The EXTRA_SCHEMA_CHECKS setting is always enabled + // in production. + case SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: + { + Xsqlite3Config.FbExtraSchemaChecks = U8(libc.VaInt32(&ap)) + break + + } + + // Set the threshold at which OP_Once counters reset back to zero. + // By default this is 0x7ffffffe (over 2 billion), but that value is + // too big to test in a reasonable amount of time, so this control is + // provided to set a small and easily reachable reset value. + case SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD: + { + Xsqlite3Config.FiOnceResetThreshold = int32(libc.VaInt32(&ap)) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_VDBE_COVERAGE, xCallback, ptr); + // + // Set the VDBE coverage callback function to xCallback with context + // pointer ptr. + case SQLITE_TESTCTRL_VDBE_COVERAGE: + { + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_SORTER_MMAP, db, nMax); + case SQLITE_TESTCTRL_SORTER_MMAP: + { + var db uintptr = libc.VaUintptr(&ap) + (*Sqlite3)(unsafe.Pointer(db)).FnMaxSorterMmap = int32(libc.VaInt32(&ap)) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_ISINIT); + // + // Return SQLITE_OK if SQLite has been initialized and SQLITE_ERROR if + // not. + case SQLITE_TESTCTRL_ISINIT: + { + if Xsqlite3Config.FisInit == 0 { + rc = SQLITE_ERROR + } + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, db, dbName, onOff, tnum); + // + // This test control is used to create imposter tables. "db" is a pointer + // to the database connection. dbName is the database name (ex: "main" or + // "temp") which will receive the imposter. "onOff" turns imposter mode on + // or off. "tnum" is the root page of the b-tree to which the imposter + // table should connect. + // + // Enable imposter mode only when the schema has already been parsed. Then + // run a single CREATE TABLE statement to construct the imposter table in + // the parsed schema. Then turn imposter mode back off again. + // + // If onOff==0 and tnum>0 then reset the schema for all databases, causing + // the schema to be reparsed the next time it is needed. This has the + // effect of erasing all imposter tables. + case SQLITE_TESTCTRL_IMPOSTER: + { + var db uintptr = libc.VaUintptr(&ap) + var iDb int32 + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + iDb = Xsqlite3FindDbName(tls, db, libc.VaUintptr(&ap)) + if iDb >= 0 { + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb) + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(libc.AssignBitFieldPtr8Uint32(db+192+8, uint32(libc.VaInt32(&ap)), 1, 1, 0x2)) + (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum = Pgno(libc.VaInt32(&ap)) + if int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > Pgno(0) { + Xsqlite3ResetAllSchemasOfConnection(tls, db) + } + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_RESULT_INTREAL, sqlite3_context*); + // + // This test-control causes the most recent sqlite3_result_int64() value + // to be interpreted as a MEM_IntReal instead of as an MEM_Int. Normally, + // MEM_IntReal values only arise during an INSERT operation of integer + // values into a REAL column, so they can be challenging to test. This + // test-control enables us to write an intreal() SQL function that can + // inject an intreal() value at arbitrary places in an SQL statement, + // for testing purposes. + case SQLITE_TESTCTRL_RESULT_INTREAL: + { + var pCtx uintptr = libc.VaUintptr(&ap) + Xsqlite3ResultIntReal(tls, pCtx) + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_SEEK_COUNT, + // sqlite3 *db, // Database connection + // u64 *pnSeek // Write seek count here + // ); + // + // This test-control queries the seek-counter on the "main" database + // file. The seek-counter is written into *pnSeek and is then reset. + // The seek-count is only available if compiled with SQLITE_DEBUG. + case SQLITE_TESTCTRL_SEEK_COUNT: + { + var db uintptr = libc.VaUintptr(&ap) + _ = db + var pn uintptr = libc.VaUintptr(&ap) + *(*U64)(unsafe.Pointer(pn)) = uint64(0) + _ = db // Silence harmless unused variable warning + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_TRACEFLAGS, op, ptr) + // + // "ptr" is a pointer to a u32. + // + // op==0 Store the current sqlite3SelectTrace in *ptr + // op==1 Set sqlite3SelectTrace to the value *ptr + // op==3 Store the current sqlite3WhereTrace in *ptr + // op==3 Set sqlite3WhereTrace to the value *ptr + case SQLITE_TESTCTRL_TRACEFLAGS: + { + var opTrace int32 = int32(libc.VaInt32(&ap)) + var ptr uintptr = libc.VaUintptr(&ap) + switch opTrace { + case 0: + *(*U32)(unsafe.Pointer(ptr)) = Xsqlite3SelectTrace + break + case 1: + Xsqlite3SelectTrace = *(*U32)(unsafe.Pointer(ptr)) + break + case 2: + *(*U32)(unsafe.Pointer(ptr)) = Xsqlite3WhereTrace + break + case 3: + Xsqlite3WhereTrace = *(*U32)(unsafe.Pointer(ptr)) + break + } + break + + } + + // sqlite3_test_control(SQLITE_TESTCTRL_LOGEST, + // double fIn, // Input value + // int *pLogEst, // sqlite3LogEstFromDouble(fIn) + // u64 *pInt, // sqlite3LogEstToInt(*pLogEst) + // int *pLogEst2 // sqlite3LogEst(*pInt) + // ); + // + // Test access for the LogEst conversion routines. + case SQLITE_TESTCTRL_LOGEST: + { + var rIn float64 = float64(libc.VaFloat64(&ap)) + var rLogEst LogEst = Xsqlite3LogEstFromDouble(tls, rIn) + var iInt U64 = Xsqlite3LogEstToInt(tls, rLogEst) + *(*int32)(unsafe.Pointer(libc.VaUintptr(&ap))) = int32(rLogEst) + *(*U64)(unsafe.Pointer(libc.VaUintptr(&ap))) = iInt + *(*int32)(unsafe.Pointer(libc.VaUintptr(&ap))) = int32(Xsqlite3LogEst(tls, iInt)) + break + + } + + } + _ = ap + return rc +} + +// The Pager stores the Database filename, Journal filename, and WAL filename +// consecutively in memory, in that order. The database filename is prefixed +// by four zero bytes. Locate the start of the database filename by searching +// backwards for the first byte following four consecutive zero bytes. +// +// This only works if the filename passed in was obtained from the Pager. +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ + for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { + zName-- + } + return zName +} + +// Append text z[] to the end of p[]. Return a pointer to the first +// character after then zero terminator on the new text in p[]. +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ + var n Size_t = libc.Xstrlen(tls, z) + libc.Xmemcpy(tls, p, z, n+uint64(1)) + return p + uintptr(n) + uintptr(1) +} + +// Allocate memory to hold names for a database, journal file, WAL file, +// and query parameters. The pointer returned is valid for use by +// sqlite3_filename_database() and sqlite3_uri_parameter() and related +// functions. +// +// Memory layout must be compatible with that generated by the pager +// and expected by sqlite3_uri_parameter() and databaseName(). +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ + var nByte Sqlite3_int64 + var i int32 + var pResult uintptr + var p uintptr + nByte = Sqlite3_int64(libc.Xstrlen(tls, zDatabase) + libc.Xstrlen(tls, zJournal) + libc.Xstrlen(tls, zWal) + uint64(10)) + for i = 0; i < nParam*2; i++ { + nByte = Sqlite3_int64(uint64(nByte) + uint64(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(azParam + uintptr(i)*8)))+uint64(1))) + } + pResult = libc.AssignUintptr(&p, Xsqlite3_malloc64(tls, uint64(nByte))) + if p == uintptr(0) { + return uintptr(0) + } + libc.Xmemset(tls, p, 0, uint64(4)) + p += uintptr(4) + p = appendText(tls, p, zDatabase) + for i = 0; i < nParam*2; i++ { + p = appendText(tls, p, *(*uintptr)(unsafe.Pointer(azParam + uintptr(i)*8))) + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = uint8(0) + p = appendText(tls, p, zJournal) + p = appendText(tls, p, zWal) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = uint8(0) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = uint8(0) + + return pResult + uintptr(4) +} + +// Free memory obtained from sqlite3_create_filename(). It is a severe +// error to call this routine with any parameter other than a pointer +// previously obtained from sqlite3_create_filename() or a NULL pointer. +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ + if p == uintptr(0) { + return + } + p = databaseName(tls, p) + Xsqlite3_free(tls, p-uintptr(4)) +} + +// This is a utility routine, useful to VFS implementations, that checks +// to see if a database file was a URI that contained a specific query +// parameter, and if so obtains the value of the query parameter. +// +// The zFilename argument is the filename pointer passed into the xOpen() +// method of a VFS implementation. The zParam argument is the name of the +// query parameter we seek. This routine returns the value of the zParam +// parameter if it exists. If the parameter does not exist, this routine +// returns a NULL pointer. +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ + if zFilename == uintptr(0) || zParam == uintptr(0) { + return uintptr(0) + } + zFilename = databaseName(tls, zFilename) + return uriParameter(tls, zFilename, zParam) +} + +// Return a pointer to the name of Nth query parameter of the filename. +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ + if zFilename == uintptr(0) || N < 0 { + return uintptr(0) + } + zFilename = databaseName(tls, zFilename) + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + for zFilename != 0 && *(*uint8)(unsafe.Pointer(zFilename)) != 0 && libc.PostDecInt32(&N, 1) > 0 { + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + } + if *(*uint8)(unsafe.Pointer(zFilename)) != 0 { + return zFilename + } + return uintptr(0) +} + +// Return a boolean value for a query parameter. +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ + var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) + bDflt = libc.Bool32(bDflt != 0) + if z != 0 { + return int32(Xsqlite3GetBoolean(tls, z, uint8(bDflt))) + } + return bDflt +} + +// Return a 64-bit integer value for a query parameter. +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) + // var v Sqlite3_int64 at bp, 8 + + if z != 0 && Xsqlite3DecOrHexToI64(tls, z, bp) == 0 { + bDflt = *(*Sqlite3_int64)(unsafe.Pointer(bp /* v */)) + } + return bDflt +} + +// Translate a filename that was handed to a VFS routine into the corresponding +// database, journal, or WAL file. +// +// It is an error to pass this routine a filename string that was not +// passed into the VFS from the SQLite core. Doing so is similar to +// passing free() a pointer that was not obtained from malloc() - it is +// an error that we cannot easily detect but that will likely cause memory +// corruption. +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ + if zFilename == uintptr(0) { + return uintptr(0) + } + return databaseName(tls, zFilename) +} + +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ + if zFilename == uintptr(0) { + return uintptr(0) + } + zFilename = databaseName(tls, zFilename) + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + for zFilename != 0 && *(*uint8)(unsafe.Pointer(zFilename)) != 0 { + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + } + return zFilename + uintptr(1) +} + +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ + zFilename = Xsqlite3_filename_journal(tls, zFilename) + if zFilename != 0 { + zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) + } + return zFilename +} + +// Return the Btree pointer identified by zDbName. Return NULL if not found. +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ + var iDb int32 + if zDbName != 0 { + iDb = Xsqlite3FindDbName(tls, db, zDbName) + } else { + iDb = 0 + } + if iDb < 0 { + return uintptr(0) + } + return (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt +} + +// Return the filename of the database associated with a database +// connection. +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ + var pBt uintptr + pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) + if pBt != 0 { + return Xsqlite3BtreeGetFilename(tls, pBt) + } + return uintptr(0) +} + +// Return 1 if database is read-only or 0 if read/write. Return -1 if +// no such database exists. +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ + var pBt uintptr + pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) + if pBt != 0 { + return Xsqlite3BtreeIsReadonly(tls, pBt) + } + return -1 +} + +// Obtain a snapshot handle for the snapshot of database zDb currently +// being read by handle db. +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ + var rc int32 = SQLITE_ERROR + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + + if int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 { + var iDb int32 = Xsqlite3FindDbName(tls, db, zDb) + if iDb == 0 || iDb > 1 { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt + if SQLITE_TXN_WRITE != Xsqlite3BtreeTxnState(tls, pBt) { + rc = Xsqlite3BtreeBeginTrans(tls, pBt, 0, uintptr(0)) + if rc == SQLITE_OK { + rc = Xsqlite3PagerSnapshotGet(tls, Xsqlite3BtreePager(tls, pBt), ppSnapshot) + } + } + } + } + + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Open a read-transaction on the snapshot idendified by pSnapshot. +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ + var rc int32 = SQLITE_ERROR + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + if int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 { + var iDb int32 + iDb = Xsqlite3FindDbName(tls, db, zDb) + if iDb == 0 || iDb > 1 { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt + if Xsqlite3BtreeTxnState(tls, pBt) != SQLITE_TXN_WRITE { + var pPager uintptr = Xsqlite3BtreePager(tls, pBt) + var bUnlock int32 = 0 + if Xsqlite3BtreeTxnState(tls, pBt) != SQLITE_TXN_NONE { + if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive == 0 { + rc = Xsqlite3PagerSnapshotCheck(tls, pPager, pSnapshot) + if rc == SQLITE_OK { + bUnlock = 1 + rc = Xsqlite3BtreeCommit(tls, pBt) + } + } + } else { + rc = SQLITE_OK + } + if rc == SQLITE_OK { + rc = Xsqlite3PagerSnapshotOpen(tls, pPager, pSnapshot) + } + if rc == SQLITE_OK { + rc = Xsqlite3BtreeBeginTrans(tls, pBt, 0, uintptr(0)) + Xsqlite3PagerSnapshotOpen(tls, pPager, uintptr(0)) + } + if bUnlock != 0 { + Xsqlite3PagerSnapshotUnlock(tls, pPager) + } + } + } + } + + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Recover as many snapshots as possible from the wal file associated with +// schema zDb of database db. +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ + var rc int32 = SQLITE_ERROR + var iDb int32 + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + iDb = Xsqlite3FindDbName(tls, db, zDb) + if iDb == 0 || iDb > 1 { + var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt + if SQLITE_TXN_NONE == Xsqlite3BtreeTxnState(tls, pBt) { + rc = Xsqlite3BtreeBeginTrans(tls, pBt, 0, uintptr(0)) + if rc == SQLITE_OK { + rc = Xsqlite3PagerSnapshotRecover(tls, Xsqlite3BtreePager(tls, pBt)) + Xsqlite3BtreeCommit(tls, pBt) + } + } + } + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// Free a snapshot handle obtained from sqlite3_snapshot_get(). +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ + Xsqlite3_free(tls, pSnapshot) +} + +// Given the name of a compile-time option, return true if that option +// was used and false if not. +// +// The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix +// is not required for a match. +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i int32 + var n int32 + // var nOpt int32 at bp, 4 + + var azCompileOpt uintptr + + azCompileOpt = Xsqlite3CompileOptions(tls, bp) + + if Xsqlite3_strnicmp(tls, zOptName, ts+24269, 7) == 0 { + zOptName += uintptr(7) + } + n = Xsqlite3Strlen30(tls, zOptName) + + // Since nOpt is normally in single digits, a linear search is + // adequate. No need for a binary search. + for i = 0; i < *(*int32)(unsafe.Pointer(bp /* nOpt */)); i++ { + if Xsqlite3_strnicmp(tls, zOptName, *(*uintptr)(unsafe.Pointer(azCompileOpt + uintptr(i)*8)), n) == 0 && + Xsqlite3IsIdChar(tls, uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(azCompileOpt + uintptr(i)*8)) + uintptr(n))))) == 0 { + return 1 + } + } + return 0 +} + +// Return the N-th compile-time option string. If N is out of range, +// return a NULL pointer. +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var nOpt int32 at bp, 4 + + var azCompileOpt uintptr + azCompileOpt = Xsqlite3CompileOptions(tls, bp) + if N >= 0 && N < *(*int32)(unsafe.Pointer(bp)) { + return *(*uintptr)(unsafe.Pointer(azCompileOpt + uintptr(N)*8)) + } + return uintptr(0) +} + +//************* End of main.c *********************************************** +//************* Begin file notify.c ***************************************** +// 2009 March 3 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains the implementation of the sqlite3_unlock_notify() +// API method and its associated functionality. +// #include "sqliteInt.h" +// #include "btreeInt.h" + +// Omit this entire file if SQLITE_ENABLE_UNLOCK_NOTIFY is not defined. + +// Public interfaces: +// +// sqlite3ConnectionBlocked() +// sqlite3ConnectionUnlocked() +// sqlite3ConnectionClosed() +// sqlite3_unlock_notify() + +// Head of a linked list of all sqlite3 objects created by this process +// for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection +// is not NULL. This variable may only accessed while the STATIC_MAIN +// mutex is held. +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ + +// Remove connection db from the blocked connections list. If connection +// db is not currently a part of the list, this function is a no-op. +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ + var pp uintptr + + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + if *(*uintptr)(unsafe.Pointer(pp)) == db { + *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextBlocked + break + } + } +} + +// Add connection db to the blocked connections list. It is assumed +// that it is not already a part of the list. +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ + var pp uintptr + + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { + } + (*Sqlite3)(unsafe.Pointer(db)).FpNextBlocked = *(*uintptr)(unsafe.Pointer(pp)) + *(*uintptr)(unsafe.Pointer(pp)) = db +} + +// Obtain the STATIC_MAIN mutex. +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ + Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) + +} + +// Release the STATIC_MAIN mutex. +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ + + Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) +} + +// Register an unlock-notify callback. +// +// This is called after connection "db" has attempted some operation +// but has received an SQLITE_LOCKED error because another connection +// (call it pOther) in the same process was busy using the same shared +// cache. pOther is found by looking at db->pBlockingConnection. +// +// If there is no blocking connection, the callback is invoked immediately, +// before this routine returns. +// +// If pOther is already blocked on db, then report SQLITE_LOCKED, to indicate +// a deadlock. +// +// Otherwise, make arrangements to invoke xNotify when pOther drops +// its locks. +// +// Each call to this routine overrides any prior callbacks registered +// on the same "db". If xNotify==0 then any prior callbacks are immediately +// cancelled. +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + *(*uintptr)(unsafe.Pointer(bp)) = pArg + + var rc int32 = SQLITE_OK + + Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + enterMutex(tls) + + if xNotify == uintptr(0) { + removeFromBlockedList(tls, db) + (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).FpUnlockArg = uintptr(0) + } else if uintptr(0) == (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection { + // The blocking transaction has been concluded. Or there never was a + // blocking transaction. In either case, invoke the notify callback + // immediately. + (*struct { + f func(*libc.TLS, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{xNotify})).f(tls, bp /* &pArg */, 1) + } else { + var p uintptr + + for p = (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection; p != 0 && p != db; p = (*Sqlite3)(unsafe.Pointer(p)).FpUnlockConnection { + } + if p != 0 { + rc = SQLITE_LOCKED // Deadlock detected. + } else { + (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection = (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection + (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify = xNotify + (*Sqlite3)(unsafe.Pointer(db)).FpUnlockArg = *(*uintptr)(unsafe.Pointer(bp /* pArg */)) + removeFromBlockedList(tls, db) + addToBlockedList(tls, db) + } + } + + leaveMutex(tls) + + Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { + if rc != 0 { + return ts + 24277 /* "database is dead..." */ + } + return uintptr(0) + }(), 0) + Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) + return rc +} + +// This function is called while stepping or preparing a statement +// associated with connection db. The operation will return SQLITE_LOCKED +// to the user because it requires a lock that will not be available +// until connection pBlocker concludes its current transaction. +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ + enterMutex(tls) + if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { + addToBlockedList(tls, db) + } + (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection = pBlocker + leaveMutex(tls) +} + +// This function is called when +// the transaction opened by database db has just finished. Locks held +// by database connection db have been released. +// +// This function loops through each entry in the blocked connections +// list and does the following: +// +// 1) If the sqlite3.pBlockingConnection member of a list entry is +// set to db, then set pBlockingConnection=0. +// +// 2) If the sqlite3.pUnlockConnection member of a list entry is +// set to db, then invoke the configured unlock-notify callback and +// set pUnlockConnection=0. +// +// 3) If the two steps above mean that pBlockingConnection==0 and +// pUnlockConnection==0, remove the entry from the blocked connections +// list. +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + var xUnlockNotify uintptr = uintptr(0) // Unlock-notify cb to invoke + var nArg int32 = 0 // Number of entries in aArg[] + var pp uintptr // Iterator variable + var aArg uintptr // Arguments to the unlock callback + var aDyn uintptr = uintptr(0) // Dynamically allocated space for aArg[] + // var aStatic [16]uintptr at bp, 128 + // Starter space for aArg[]. No malloc required + + aArg = bp /* &aStatic[0] */ + enterMutex(tls) // Enter STATIC_MAIN mutex + + // This loop runs once for each entry in the blocked-connections list. + for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; { + var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) + + // Step 1. + if (*Sqlite3)(unsafe.Pointer(p)).FpBlockingConnection == db { + (*Sqlite3)(unsafe.Pointer(p)).FpBlockingConnection = uintptr(0) + } + + // Step 2. + if (*Sqlite3)(unsafe.Pointer(p)).FpUnlockConnection == db { + + if (*Sqlite3)(unsafe.Pointer(p)).FxUnlockNotify != xUnlockNotify && nArg != 0 { + (*struct { + f func(*libc.TLS, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{xUnlockNotify})).f(tls, aArg, nArg) + nArg = 0 + } + + Xsqlite3BeginBenignMalloc(tls) + + if !(aDyn != 0) && nArg == int32(uint64(unsafe.Sizeof([16]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))) || + aDyn != 0 && nArg == int32(uint64(Xsqlite3MallocSize(tls, aDyn))/uint64(unsafe.Sizeof(uintptr(0)))) { + // The aArg[] array needs to grow. + var pNew uintptr = Xsqlite3Malloc(tls, uint64(uint64(nArg)*uint64(unsafe.Sizeof(uintptr(0)))*uint64(2))) + if pNew != 0 { + libc.Xmemcpy(tls, pNew, aArg, uint64(nArg)*uint64(unsafe.Sizeof(uintptr(0)))) + Xsqlite3_free(tls, aDyn) + aDyn = libc.AssignUintptr(&aArg, pNew) + } else { + // This occurs when the array of context pointers that need to + // be passed to the unlock-notify callback is larger than the + // aStatic[] array allocated on the stack and the attempt to + // allocate a larger array from the heap has failed. + // + // This is a difficult situation to handle. Returning an error + // code to the caller is insufficient, as even if an error code + // is returned the transaction on connection db will still be + // closed and the unlock-notify callbacks on blocked connections + // will go unissued. This might cause the application to wait + // indefinitely for an unlock-notify callback that will never + // arrive. + // + // Instead, invoke the unlock-notify callback with the context + // array already accumulated. We can then clear the array and + // begin accumulating any further context pointers without + // requiring any dynamic allocation. This is sub-optimal because + // it means that instead of one callback with a large array of + // context pointers the application will receive two or more + // callbacks with smaller arrays of context pointers, which will + // reduce the applications ability to prioritize multiple + // connections. But it is the best that can be done under the + // circumstances. + (*struct { + f func(*libc.TLS, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{xUnlockNotify})).f(tls, aArg, nArg) + nArg = 0 + } + } + Xsqlite3EndBenignMalloc(tls) + + *(*uintptr)(unsafe.Pointer(aArg + uintptr(libc.PostIncInt32(&nArg, 1))*8)) = (*Sqlite3)(unsafe.Pointer(p)).FpUnlockArg + xUnlockNotify = (*Sqlite3)(unsafe.Pointer(p)).FxUnlockNotify + (*Sqlite3)(unsafe.Pointer(p)).FpUnlockConnection = uintptr(0) + (*Sqlite3)(unsafe.Pointer(p)).FxUnlockNotify = uintptr(0) + (*Sqlite3)(unsafe.Pointer(p)).FpUnlockArg = uintptr(0) + } + + // Step 3. + if (*Sqlite3)(unsafe.Pointer(p)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(p)).FpUnlockConnection == uintptr(0) { + // Remove connection p from the blocked connections list. + *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked + (*Sqlite3)(unsafe.Pointer(p)).FpNextBlocked = uintptr(0) + } else { + pp = p + 832 + } + } + + if nArg != 0 { + (*struct { + f func(*libc.TLS, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{xUnlockNotify})).f(tls, aArg, nArg) + } + Xsqlite3_free(tls, aDyn) + leaveMutex(tls) // Leave STATIC_MAIN mutex +} + +// This is called when the database connection passed as an argument is +// being closed. The connection is removed from the blocked list. +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ + Xsqlite3ConnectionUnlocked(tls, db) + enterMutex(tls) + removeFromBlockedList(tls, db) + + leaveMutex(tls) +} + +//************* End of notify.c ********************************************* +//************* Begin file fts3.c ******************************************* +// 2006 Oct 10 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This is an SQLite module implementing full-text search. + +// The code in this file is only compiled if: +// +// * The FTS3 module is being built as an extension +// (in which case SQLITE_CORE is not defined), or +// +// * The FTS3 module is being built into the core of +// SQLite (in which case SQLITE_ENABLE_FTS3 is defined). + +// The full-text index is stored in a series of b+tree (-like) +// structures called segments which map terms to doclists. The +// structures are like b+trees in layout, but are constructed from the +// bottom up in optimal fashion and are not updatable. Since trees +// are built from the bottom up, things will be described from the +// bottom up. +// +// +// Varints **** +// The basic unit of encoding is a variable-length integer called a +// varint. We encode variable-length integers in little-endian order +// using seven bits * per byte as follows: +// +// KEY: +// A = 0xxxxxxx 7 bits of data and one flag bit +// B = 1xxxxxxx 7 bits of data and one flag bit +// +// 7 bits - A +// 14 bits - BA +// 21 bits - BBA +// and so on. +// +// This is similar in concept to how sqlite encodes "varints" but +// the encoding is not the same. SQLite varints are big-endian +// are are limited to 9 bytes in length whereas FTS3 varints are +// little-endian and can be up to 10 bytes in length (in theory). +// +// Example encodings: +// +// 1: 0x01 +// 127: 0x7f +// 128: 0x81 0x00 +// +// +// Document lists **** +// A doclist (document list) holds a docid-sorted list of hits for a +// given term. Doclists hold docids and associated token positions. +// A docid is the unique integer identifier for a single document. +// A position is the index of a word within the document. The first +// word of the document has a position of 0. +// +// FTS3 used to optionally store character offsets using a compile-time +// option. But that functionality is no longer supported. +// +// A doclist is stored like this: +// +// array { +// varint docid; (delta from previous doclist) +// array { (position list for column 0) +// varint position; (2 more than the delta from previous position) +// } +// array { +// varint POS_COLUMN; (marks start of position list for new column) +// varint column; (index of new column) +// array { +// varint position; (2 more than the delta from previous position) +// } +// } +// varint POS_END; (marks end of positions for this document. +// } +// +// Here, array { X } means zero or more occurrences of X, adjacent in +// memory. A "position" is an index of a token in the token stream +// generated by the tokenizer. Note that POS_END and POS_COLUMN occur +// in the same logical place as the position element, and act as sentinals +// ending a position list array. POS_END is 0. POS_COLUMN is 1. +// The positions numbers are not stored literally but rather as two more +// than the difference from the prior position, or the just the position plus +// 2 for the first position. Example: +// +// label: A B C D E F G H I J K +// value: 123 5 9 1 1 14 35 0 234 72 0 +// +// The 123 value is the first docid. For column zero in this document +// there are two matches at positions 3 and 10 (5-2 and 9-2+3). The 1 +// at D signals the start of a new column; the 1 at E indicates that the +// new column is column number 1. There are two positions at 12 and 45 +// (14-2 and 35-2+12). The 0 at H indicate the end-of-document. The +// 234 at I is the delta to next docid (357). It has one position 70 +// (72-2) and then terminates with the 0 at K. +// +// A "position-list" is the list of positions for multiple columns for +// a single docid. A "column-list" is the set of positions for a single +// column. Hence, a position-list consists of one or more column-lists, +// a document record consists of a docid followed by a position-list and +// a doclist consists of one or more document records. +// +// A bare doclist omits the position information, becoming an +// array of varint-encoded docids. +// +// Segment leaf nodes **** +// Segment leaf nodes store terms and doclists, ordered by term. Leaf +// nodes are written using LeafWriter, and read using LeafReader (to +// iterate through a single leaf node's data) and LeavesReader (to +// iterate through a segment's entire leaf layer). Leaf nodes have +// the format: +// +// varint iHeight; (height from leaf level, always 0) +// varint nTerm; (length of first term) +// char pTerm[nTerm]; (content of first term) +// varint nDoclist; (length of term's associated doclist) +// char pDoclist[nDoclist]; (content of doclist) +// array { +// (further terms are delta-encoded) +// varint nPrefix; (length of prefix shared with previous term) +// varint nSuffix; (length of unshared suffix) +// char pTermSuffix[nSuffix];(unshared suffix of next term) +// varint nDoclist; (length of term's associated doclist) +// char pDoclist[nDoclist]; (content of doclist) +// } +// +// Here, array { X } means zero or more occurrences of X, adjacent in +// memory. +// +// Leaf nodes are broken into blocks which are stored contiguously in +// the %_segments table in sorted order. This means that when the end +// of a node is reached, the next term is in the node with the next +// greater node id. +// +// New data is spilled to a new leaf node when the current node +// exceeds LEAF_MAX bytes (default 2048). New data which itself is +// larger than STANDALONE_MIN (default 1024) is placed in a standalone +// node (a leaf node with a single term and doclist). The goal of +// these settings is to pack together groups of small doclists while +// making it efficient to directly access large doclists. The +// assumption is that large doclists represent terms which are more +// likely to be query targets. +// +// TODO(shess) It may be useful for blocking decisions to be more +// dynamic. For instance, it may make more sense to have a 2.5k leaf +// node rather than splitting into 2k and .5k nodes. My intuition is +// that this might extend through 2x or 4x the pagesize. +// +// +// Segment interior nodes **** +// Segment interior nodes store blockids for subtree nodes and terms +// to describe what data is stored by the each subtree. Interior +// nodes are written using InteriorWriter, and read using +// InteriorReader. InteriorWriters are created as needed when +// SegmentWriter creates new leaf nodes, or when an interior node +// itself grows too big and must be split. The format of interior +// nodes: +// +// varint iHeight; (height from leaf level, always >0) +// varint iBlockid; (block id of node's leftmost subtree) +// optional { +// varint nTerm; (length of first term) +// char pTerm[nTerm]; (content of first term) +// array { +// (further terms are delta-encoded) +// varint nPrefix; (length of shared prefix with previous term) +// varint nSuffix; (length of unshared suffix) +// char pTermSuffix[nSuffix]; (unshared suffix of next term) +// } +// } +// +// Here, optional { X } means an optional element, while array { X } +// means zero or more occurrences of X, adjacent in memory. +// +// An interior node encodes n terms separating n+1 subtrees. The +// subtree blocks are contiguous, so only the first subtree's blockid +// is encoded. The subtree at iBlockid will contain all terms less +// than the first term encoded (or all terms if no term is encoded). +// Otherwise, for terms greater than or equal to pTerm[i] but less +// than pTerm[i+1], the subtree for that term will be rooted at +// iBlockid+i. Interior nodes only store enough term data to +// distinguish adjacent children (if the rightmost term of the left +// child is "something", and the leftmost term of the right child is +// "wicked", only "w" is stored). +// +// New data is spilled to a new interior node at the same height when +// the current node exceeds INTERIOR_MAX bytes (default 2048). +// INTERIOR_MIN_TERMS (default 7) keeps large terms from monopolizing +// interior nodes and making the tree too skinny. The interior nodes +// at a given height are naturally tracked by interior nodes at +// height+1, and so on. +// +// +// Segment directory **** +// The segment directory in table %_segdir stores meta-information for +// merging and deleting segments, and also the root node of the +// segment's tree. +// +// The root node is the top node of the segment's tree after encoding +// the entire segment, restricted to ROOT_MAX bytes (default 1024). +// This could be either a leaf node or an interior node. If the top +// node requires more than ROOT_MAX bytes, it is flushed to %_segments +// and a new root interior node is generated (which should always fit +// within ROOT_MAX because it only needs space for 2 varints, the +// height and the blockid of the previous root). +// +// The meta-information in the segment directory is: +// level - segment level (see below) +// idx - index within level +// - (level,idx uniquely identify a segment) +// start_block - first leaf node +// leaves_end_block - last leaf node +// end_block - last block (including interior nodes) +// root - contents of root node +// +// If the root node is a leaf node, then start_block, +// leaves_end_block, and end_block are all 0. +// +// +// Segment merging **** +// To amortize update costs, segments are grouped into levels and +// merged in batches. Each increase in level represents exponentially +// more documents. +// +// New documents (actually, document updates) are tokenized and +// written individually (using LeafWriter) to a level 0 segment, with +// incrementing idx. When idx reaches MERGE_COUNT (default 16), all +// level 0 segments are merged into a single level 1 segment. Level 1 +// is populated like level 0, and eventually MERGE_COUNT level 1 +// segments are merged to a single level 2 segment (representing +// MERGE_COUNT^2 updates), and so on. +// +// A segment merge traverses all segments at a given level in +// parallel, performing a straightforward sorted merge. Since segment +// leaf nodes are written in to the %_segments table in order, this +// merge traverses the underlying sqlite disk structures efficiently. +// After the merge, all segment blocks from the merged level are +// deleted. +// +// MERGE_COUNT controls how often we merge segments. 16 seems to be +// somewhat of a sweet spot for insertion performance. 32 and 64 show +// very similar performance numbers to 16 on insertion, though they're +// a tiny bit slower (perhaps due to more overhead in merge-time +// sorting). 8 is about 20% slower than 16, 4 about 50% slower than +// 16, 2 about 66% slower than 16. +// +// At query time, high MERGE_COUNT increases the number of segments +// which need to be scanned and merged. For instance, with 100k docs +// inserted: +// +// MERGE_COUNT segments +// 16 25 +// 8 12 +// 4 10 +// 2 6 +// +// This appears to have only a moderate impact on queries for very +// frequent terms (which are somewhat dominated by segment merge +// costs), and infrequent and non-existent terms still seem to be fast +// even with many segments. +// +// TODO(shess) That said, it would be nice to have a better query-side +// argument for MERGE_COUNT of 16. Also, it is possible/likely that +// optimizations to things like doclist merging will swing the sweet +// spot around. +// +// +// +// Handling of deletions and updates **** +// Since we're using a segmented structure, with no docid-oriented +// index into the term index, we clearly cannot simply update the term +// index when a document is deleted or updated. For deletions, we +// write an empty doclist (varint(docid) varint(POS_END)), for updates +// we simply write the new doclist. Segment merges overwrite older +// data for a particular docid with newer data, so deletes or updates +// will eventually overtake the earlier data and knock it out. The +// query logic likewise merges doclists so that newer data knocks out +// older data. + +//************* Include fts3Int.h in the middle of fts3.c ******************* +//************* Begin file fts3Int.h **************************************** +// 2009 Nov 12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// + +// FTS3/FTS4 require virtual tables + +// FTS4 is really an extension for FTS3. It is enabled using the +// SQLITE_ENABLE_FTS3 macro. But to avoid confusion we also all +// the SQLITE_ENABLE_FTS4 macro to serve as an alisse for SQLITE_ENABLE_FTS3. + +//************* End of fts3Int.h ******************************************** +//************* Continuing where we left off in fts3.c ********************** + +//************* End of fts3.c *********************************************** +//************* Begin file fts3_aux.c *************************************** +// 2011 Jan 27 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// #include "fts3Int.h" + +//************* End of fts3_aux.c ******************************************* +//************* Begin file fts3_expr.c ************************************** +// 2008 Nov 28 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This module contains code that implements a parser for fts3 query strings +// (the right-hand argument to the MATCH operator). Because the supported +// syntax is relatively simple, the whole tokenizer/parser system is +// hand-coded. +// #include "fts3Int.h" + +//************* End of fts3_expr.c ****************************************** +//************* Begin file fts3_hash.c ************************************** +// 2001 September 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This is the implementation of generic hash-tables used in SQLite. +// We've modified it slightly to serve as a standalone hash table +// implementation for the full-text indexing module. + +// The code in this file is only compiled if: +// +// * The FTS3 module is being built as an extension +// (in which case SQLITE_CORE is not defined), or +// +// * The FTS3 module is being built into the core of +// SQLite (in which case SQLITE_ENABLE_FTS3 is defined). +// #include "fts3Int.h" + +//************* End of fts3_hash.c ****************************************** +//************* Begin file fts3_porter.c ************************************ +// 2006 September 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// Implementation of the full-text-search tokenizer that implements +// a Porter stemmer. + +// The code in this file is only compiled if: +// +// * The FTS3 module is being built as an extension +// (in which case SQLITE_CORE is not defined), or +// +// * The FTS3 module is being built into the core of +// SQLite (in which case SQLITE_ENABLE_FTS3 is defined). +// #include "fts3Int.h" + +//************* End of fts3_porter.c **************************************** +//************* Begin file fts3_tokenizer.c ********************************* +// 2007 June 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This is part of an SQLite module implementing full-text search. +// This particular file implements the generic tokenizer interface. + +// The code in this file is only compiled if: +// +// * The FTS3 module is being built as an extension +// (in which case SQLITE_CORE is not defined), or +// +// * The FTS3 module is being built into the core of +// SQLite (in which case SQLITE_ENABLE_FTS3 is defined). +// #include "fts3Int.h" + +//************* End of fts3_tokenizer.c ************************************* +//************* Begin file fts3_tokenizer1.c ******************************** +// 2006 Oct 10 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Implementation of the "simple" full-text-search tokenizer. + +// The code in this file is only compiled if: +// +// * The FTS3 module is being built as an extension +// (in which case SQLITE_CORE is not defined), or +// +// * The FTS3 module is being built into the core of +// SQLite (in which case SQLITE_ENABLE_FTS3 is defined). +// #include "fts3Int.h" + +//************* End of fts3_tokenizer1.c ************************************ +//************* Begin file fts3_tokenize_vtab.c ***************************** +// 2013 Apr 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains code for the "fts3tokenize" virtual table module. +// An fts3tokenize virtual table is created as follows: +// +// CREATE VIRTUAL TABLE USING fts3tokenize( +// , , ... +// ); +// +// The table created has the following schema: +// +// CREATE TABLE (input, token, start, end, position) +// +// When queried, the query must include a WHERE clause of type: +// +// input = +// +// The virtual table module tokenizes this , using the FTS3 +// tokenizer specified by the arguments to the CREATE VIRTUAL TABLE +// statement and returns one row for each token in the result. With +// fields set as follows: +// +// input: Always set to a copy of +// token: A token from the input. +// start: Byte offset of the token within the input . +// end: Byte offset of the byte immediately following the end of the +// token within the input string. +// pos: Token offset of token within input. +// +// #include "fts3Int.h" + +//************* End of fts3_tokenize_vtab.c ********************************* +//************* Begin file fts3_write.c ************************************* +// 2009 Oct 23 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file is part of the SQLite FTS3 extension module. Specifically, +// this file contains code to insert, update and delete rows from FTS3 +// tables. It also contains code to merge FTS3 b-tree segments. Some +// of the sub-routines used to merge segments are also used by the query +// code in fts3.c. + +// #include "fts3Int.h" + +//************* End of fts3_write.c ***************************************** +//************* Begin file fts3_snippet.c *********************************** +// 2009 Oct 23 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +// #include "fts3Int.h" + +//************* End of fts3_snippet.c *************************************** +//************* Begin file fts3_unicode.c *********************************** +// 2012 May 24 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Implementation of the "unicode" full-text-search tokenizer. + +// #include "fts3Int.h" + +//************* End of fts3_unicode.c *************************************** +//************* Begin file fts3_unicode2.c ********************************** +// 2012-05-25 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +// DO NOT EDIT THIS MACHINE GENERATED FILE. + +//************* End of fts3_unicode2.c ************************************** +//************* Begin file json.c ******************************************* +// 2015-08-12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This SQLite JSON functions. +// +// This file began as an extension in ext/misc/json1.c in 2015. That +// extension proved so useful that it has now been moved into the core. +// +// For the time being, all JSON is stored as pure text. (We might add +// a JSONB type in the future which stores a binary encoding of JSON in +// a BLOB, but there is no support for JSONB in the current implementation. +// This implementation parses JSON text at 250 MB/s, so it is hard to see +// how JSONB might improve on that.) +// #include "sqliteInt.h" + +// Growing our own isspace() routine this way is twice as fast as +// the library isspace() function, resulting in a 7% overall performance +// increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os). +var jsonIsSpace = [256]uint8{ + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), uint8(0), uint8(1), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), +} /* sqlite3.c:193144:19 */ + +// Objects +type JsonString1 = struct { + FpCtx uintptr + FzBuf uintptr + FnAlloc U64 + FnUsed U64 + FbStatic U8 + FbErr U8 + FzSpace [100]uint8 + F__ccgo_pad1 [2]byte +} /* sqlite3.c:193171:9 */ + +// Objects +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ +type JsonNode1 = struct { + FeType U8 + FjnFlags U8 + FeU U8 + F__ccgo_pad1 [1]byte + Fn U32 + Fu struct{ FzJContent uintptr } +} /* sqlite3.c:193172:9 */ + +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ +type JsonParse1 = struct { + FnNode U32 + FnAlloc U32 + FaNode uintptr + FzJson uintptr + FaUp uintptr + Foom U8 + FnErr U8 + FiDepth U16 + FnJson int32 + FiHold U32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:193173:9 */ + +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ + +// JSON type values + +// The "subtype" set for JSON values + +// Names of the various JSON types: +var jsonType = [8]uintptr{ + ts + 6123, ts + 6637, ts + 6642, ts + 6133, ts + 6128, ts + 7883, ts + 24300, ts + 24306, +} /* sqlite3.c:193206:19 */ + +// Maximum nesting depth of JSON for this implementation. +// +// This limit is needed to avoid a stack overflow in the recursive +// descent parser. A depth of 2000 is far deeper than any sane JSON +// should go. + +// ************************************************************************* +// +// Utility routines for dealing with JsonString objects +// + +// Set the JsonString object to an empty string +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ + (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ + (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]uint8{})) + (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) + (*JsonString)(unsafe.Pointer(p)).FbStatic = U8(1) +} + +// Initialize the JsonString object +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ + (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx + (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) + jsonZero(tls, p) +} + +// Free all allocated memory and reset the JsonString object back to its +// initial state. +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ + if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { + Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) + } + jsonZero(tls, p) +} + +// Report an out-of-memory (OOM) condition +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ + (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) + Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) + jsonReset(tls, p) +} + +// Enlarge pJson->zBuf so that it can hold at least N more bytes. +// Return zero on success. Return non-zero on an OOM error +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ + var nTotal U64 + if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { + nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) + } else { + nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc + U64(N) + uint64(10) + } + var zNew uintptr + if (*JsonString)(unsafe.Pointer(p)).FbStatic != 0 { + if (*JsonString)(unsafe.Pointer(p)).FbErr != 0 { + return 1 + } + zNew = Xsqlite3_malloc64(tls, nTotal) + if zNew == uintptr(0) { + jsonOom(tls, p) + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, zNew, (*JsonString)(unsafe.Pointer(p)).FzBuf, Size_t((*JsonString)(unsafe.Pointer(p)).FnUsed)) + (*JsonString)(unsafe.Pointer(p)).FzBuf = zNew + (*JsonString)(unsafe.Pointer(p)).FbStatic = U8(0) + } else { + zNew = Xsqlite3_realloc64(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf, nTotal) + if zNew == uintptr(0) { + jsonOom(tls, p) + return SQLITE_NOMEM + } + (*JsonString)(unsafe.Pointer(p)).FzBuf = zNew + } + (*JsonString)(unsafe.Pointer(p)).FnAlloc = nTotal + return SQLITE_OK +} + +// Append N bytes from zIn onto the end of the JsonString string. +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ + if N == U32(0) { + return + } + if U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N) != 0 { + return + } + libc.Xmemcpy(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf+uintptr((*JsonString)(unsafe.Pointer(p)).FnUsed), zIn, uint64(N)) + *(*U64)(unsafe.Pointer(p + 24)) += U64(N) +} + +// Append formatted text (not to exceed N bytes) to the JsonString. +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ + var ap Va_list + _ = ap + if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { + return + } + ap = va + Xsqlite3_vsnprintf(tls, N, (*JsonString)(unsafe.Pointer(p)).FzBuf+uintptr((*JsonString)(unsafe.Pointer(p)).FnUsed), zFormat, ap) + _ = ap + *(*U64)(unsafe.Pointer(p + 24)) += U64(int32(libc.Xstrlen(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf+uintptr((*JsonString)(unsafe.Pointer(p)).FnUsed)))) +} + +// Append a single character +func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193350:13: */ + if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { + return + } + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = c +} + +// Append a comma separator to the output buffer, if the previous +// character is not '[' or '{'. +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ + var c uint8 + if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { + return + } + c = *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*JsonString)(unsafe.Pointer(p)).FnUsed-uint64(1)))) + if int32(c) != '[' && int32(c) != '{' { + jsonAppendChar(tls, p, uint8(',')) + } +} + +// Append the N-byte string in zIn to the end of the JsonString string +// under construction. Enclose the string in "..." and escape +// any double-quotes or backslash characters contained within the +// string. +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ + var i U32 + var c uint8 + if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { + goto __1 + } + return +__1: + ; + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('"') + i = U32(0) +__2: + if !(i < N) { + goto __4 + } + c = *(*uint8)(unsafe.Pointer(zIn + uintptr(i))) + if !(int32(c) == '"' || int32(c) == '\\') { + goto __5 + } +json_simple_escape: + if !((*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N)+uint64(3)-U64(i) > (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(3)-i) != 0) { + goto __7 + } + return +__7: + ; + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('\\') + goto __6 +__5: + if !(int32(c) <= 0x1f) { + goto __8 + } + + if !(aSpecial[c] != 0) { + goto __9 + } + c = uint8(aSpecial[c]) + goto json_simple_escape +__9: + ; + if !((*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N)+uint64(7)+U64(i) > (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(7)-i) != 0) { + goto __10 + } + return +__10: + ; + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('\\') + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('u') + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0' + int32(c)>>4) + c = uint8(*(*uint8)(unsafe.Pointer(ts + 24313 + uintptr(int32(c)&0xf)))) +__8: + ; +__6: + ; + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8(c) + goto __3 +__3: + i++ + goto __2 + goto __4 +__4: + ; + *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('"') + +} + +var aSpecial = [32]uint8{ + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8('b'), uint8('t'), uint8('n'), uint8(0), uint8('f'), uint8('r'), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), +} /* sqlite3.c:193381:25 */ + +// Append a function parameter value to the JSON string under +// construction. +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ + switch Xsqlite3_value_type(tls, pValue) { + case SQLITE_NULL: + { + jsonAppendRaw(tls, p, ts+6123, uint32(4)) + break + + } + case SQLITE_INTEGER: + fallthrough + case SQLITE_FLOAT: + { + var z uintptr = Xsqlite3_value_text(tls, pValue) + var n U32 = U32(Xsqlite3_value_bytes(tls, pValue)) + jsonAppendRaw(tls, p, z, n) + break + + } + case SQLITE_TEXT: + { + var z uintptr = Xsqlite3_value_text(tls, pValue) + var n U32 = U32(Xsqlite3_value_bytes(tls, pValue)) + if Xsqlite3_value_subtype(tls, pValue) == uint32(JSON_SUBTYPE) { + jsonAppendRaw(tls, p, z, n) + } else { + jsonAppendString(tls, p, z, n) + } + break + + } + default: + { + if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24330, -1) + (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) + jsonReset(tls, p) + } + break + + } + } +} + +// Make the JSON in p the result of the SQL function. +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ + if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { + Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, + func() uintptr { + if (*JsonString)(unsafe.Pointer(p)).FbStatic != 0 { + return libc.UintptrFromInt32(-1) + } + return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})) + }(), + uint8(SQLITE_UTF8)) + jsonZero(tls, p) + } + +} + +// ************************************************************************* +// +// Utility routines for dealing with JsonNode and JsonParse objects +// + +// Return the number of consecutive JsonNode slots need to represent +// the parsed JSON at pNode. The minimum answer is 1. For ARRAY and +// OBJECT types, the number might be larger. +// +// Appended elements are not counted. The value returned is the number +// by which the JsonNode counter should increment in order to go to the +// next peer value. +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ + if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { + return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) + } + return uint32(1) +} + +// Reclaim all memory allocated by a JsonParse object. But do not +// delete the JsonParse object itself. +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ + Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) + (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) + (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) + (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc = U32(0) + Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaUp) + (*JsonParse)(unsafe.Pointer(pParse)).FaUp = uintptr(0) +} + +// Free a JsonParse object that was obtained from sqlite3_malloc(). +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ + jsonParseReset(tls, pParse) + Xsqlite3_free(tls, pParse) +} + +// Convert the JsonNode pNode into a pure JSON string and +// append to pOut. Subsubstructure is also included. Return +// the number of JsonNode objects that are encoded. +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ + + if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { + if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { + + jsonAppendValue(tls, pOut, *(*uintptr)(unsafe.Pointer(aReplace + uintptr(*(*U32)(unsafe.Pointer(pNode + 8)))*8))) + return + } + + pNode = *(*uintptr)(unsafe.Pointer(pNode + 8)) + } + switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { + default: + { + + jsonAppendRaw(tls, pOut, ts+6123, uint32(4)) + break + + } + case JSON_TRUE: + { + jsonAppendRaw(tls, pOut, ts+6637, uint32(4)) + break + + } + case JSON_FALSE: + { + jsonAppendRaw(tls, pOut, ts+6642, uint32(5)) + break + + } + case JSON_STRING: + { + if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { + + jsonAppendString(tls, pOut, *(*uintptr)(unsafe.Pointer(pNode + 8)), (*JsonNode)(unsafe.Pointer(pNode)).Fn) + break + } + + } + fallthrough + case JSON_REAL: + fallthrough + case JSON_INT: + { + + jsonAppendRaw(tls, pOut, *(*uintptr)(unsafe.Pointer(pNode + 8)), (*JsonNode)(unsafe.Pointer(pNode)).Fn) + break + + } + case JSON_ARRAY: + { + var j U32 = U32(1) + jsonAppendChar(tls, pOut, uint8('[')) + for { + for j <= (*JsonNode)(unsafe.Pointer(pNode)).Fn { + if int32((*JsonNode)(unsafe.Pointer(pNode+uintptr(j)*16)).FjnFlags)&JNODE_REMOVE == 0 { + jsonAppendSeparator(tls, pOut) + jsonRenderNode(tls, pNode+uintptr(j)*16, pOut, aReplace) + } + j = j + jsonNodeSize(tls, pNode+uintptr(j)*16) + } + if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_APPEND == 0 { + break + } + + pNode = pNode + uintptr(*(*U32)(unsafe.Pointer(pNode + 8)))*16 + j = U32(1) + } + jsonAppendChar(tls, pOut, uint8(']')) + break + + } + case JSON_OBJECT: + { + var j U32 = U32(1) + jsonAppendChar(tls, pOut, uint8('{')) + for { + for j <= (*JsonNode)(unsafe.Pointer(pNode)).Fn { + if int32((*JsonNode)(unsafe.Pointer(pNode+uintptr(j+U32(1))*16)).FjnFlags)&JNODE_REMOVE == 0 { + jsonAppendSeparator(tls, pOut) + jsonRenderNode(tls, pNode+uintptr(j)*16, pOut, aReplace) + jsonAppendChar(tls, pOut, uint8(':')) + jsonRenderNode(tls, pNode+uintptr(j+U32(1))*16, pOut, aReplace) + } + j = j + (U32(1) + jsonNodeSize(tls, pNode+uintptr(j+U32(1))*16)) + } + if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_APPEND == 0 { + break + } + + pNode = pNode + uintptr(*(*U32)(unsafe.Pointer(pNode + 8)))*16 + j = U32(1) + } + jsonAppendChar(tls, pOut, uint8('}')) + break + + } + } +} + +// Return a JsonNode and all its descendents as a JSON string. +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + // var s JsonString at bp, 136 + + jsonInit(tls, bp, pCtx) + jsonRenderNode(tls, pNode, bp, aReplace) + jsonResult(tls, bp) + Xsqlite3_result_subtype(tls, pCtx, uint32(JSON_SUBTYPE)) +} + +// Translate a single byte of Hex into an integer. +// This routine only works if h really is a valid hexadecimal +// character: 0..9a..fA..F +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ + + h = h + 9*(1&(h>>6)) + return U8(h & 0xf) +} + +// Convert a 4-byte hex string into an integer +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ + var v U32 + + v = U32(int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z)))))<<12 + + int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + 1)))))<<8 + + int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + 2)))))<<4 + + int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + 3)))))) + return v +} + +// Make the JsonNode the return value of the function. +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var v uint32 + var i Sqlite3_int64 + var z uintptr + // var r float64 at bp, 8 + + var z1 uintptr + var vlo U32 + var v1 U32 + var c uint8 + // Translate JSON formatted string into raw text + var i1 U32 + var n U32 + var z2 uintptr + var zOut uintptr + var j U32 + switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { + default: + goto __2 + case JSON_TRUE: + goto __3 + case JSON_FALSE: + goto __4 + case JSON_INT: + goto __5 + case JSON_REAL: + goto __6 + case JSON_STRING: + goto __7 + case JSON_ARRAY: + goto __8 + case JSON_OBJECT: + goto __9 + } + goto __1 +__2: + ; + Xsqlite3_result_null(tls, pCtx) + goto __1 + +__3: + Xsqlite3_result_int(tls, pCtx, 1) + goto __1 + +__4: + Xsqlite3_result_int(tls, pCtx, 0) + goto __1 + +__5: + i = int64(0) + + z = *(*uintptr)(unsafe.Pointer(pNode + 8)) + if !(int32(*(*uint8)(unsafe.Pointer(z))) == '-') { + goto __10 + } + z++ +__10: + ; +__11: + if !(int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '9') { + goto __12 + } + v = uint32(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) - '0') + if !(i >= (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/int64(10)) { + goto __13 + } + if !(i > (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/int64(10)) { + goto __14 + } + goto int_as_real +__14: + ; + if !(int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '9') { + goto __15 + } + goto int_as_real +__15: + ; + if !(v == uint32(9)) { + goto __16 + } + goto int_as_real +__16: + ; + if !(v == uint32(8)) { + goto __17 + } + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 8))))) == '-') { + goto __18 + } + Xsqlite3_result_int64(tls, pCtx, int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) + goto int_done + goto __19 +__18: + goto int_as_real +__19: + ; +__17: + ; +__13: + ; + i = i*int64(10) + Sqlite3_int64(v) + goto __11 +__12: + ; + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 8))))) == '-') { + goto __20 + } + i = -i +__20: + ; + Xsqlite3_result_int64(tls, pCtx, i) +int_done: + goto __1 +int_as_real: + ; + +__6: + ; + z1 = *(*uintptr)(unsafe.Pointer(pNode + 8)) + Xsqlite3AtoF(tls, z1, bp, Xsqlite3Strlen30(tls, z1), uint8(SQLITE_UTF8)) + Xsqlite3_result_double(tls, pCtx, *(*float64)(unsafe.Pointer(bp /* r */))) + goto __1 + +__7: + ; + if !(int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_ESCAPE == 0) { + goto __21 + } + // JSON formatted without any backslash-escapes + + Xsqlite3_result_text(tls, pCtx, *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1), int32((*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2)), + libc.UintptrFromInt32(-1)) + goto __22 +__21: + n = (*JsonNode)(unsafe.Pointer(pNode)).Fn + + z2 = *(*uintptr)(unsafe.Pointer(pNode + 8)) + zOut = Xsqlite3_malloc(tls, int32(n+U32(1))) + if !(zOut == uintptr(0)) { + goto __23 + } + Xsqlite3_result_error_nomem(tls, pCtx) + goto __1 +__23: + ; + i1 = U32(1) + j = U32(0) +__24: + if !(i1 < n-U32(1)) { + goto __26 + } + c = *(*uint8)(unsafe.Pointer(z2 + uintptr(i1))) + if !(int32(c) != '\\') { + goto __27 + } + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = c + goto __28 +__27: + c = *(*uint8)(unsafe.Pointer(z2 + uintptr(libc.PreIncUint32(&i1, 1)))) + if !(int32(c) == 'u') { + goto __29 + } + v1 = jsonHexToInt4(tls, z2+uintptr(i1)+uintptr(1)) + i1 = i1 + U32(4) + if !(v1 == U32(0)) { + goto __31 + } + goto __26 +__31: + ; + if !(v1 <= U32(0x7f)) { + goto __32 + } + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(v1) + goto __33 +__32: + if !(v1 <= U32(0x7ff)) { + goto __34 + } + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0xc0) | v1>>6) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0x80) | v1&U32(0x3f)) + goto __35 +__34: + if !(v1&U32(0xfc00) == U32(0xd800) && + i1 < n-U32(6) && + int32(*(*uint8)(unsafe.Pointer(z2 + uintptr(i1+U32(1))))) == '\\' && + int32(*(*uint8)(unsafe.Pointer(z2 + uintptr(i1+U32(2))))) == 'u' && + libc.AssignUint32(&vlo, jsonHexToInt4(tls, z2+uintptr(i1)+uintptr(3)))&U32(0xfc00) == U32(0xdc00)) { + goto __36 + } + // We have a surrogate pair + v1 = v1&U32(0x3ff)<<10 + vlo&U32(0x3ff) + U32(0x10000) + i1 = i1 + U32(6) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0xf0) | v1>>18) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0x80) | v1>>12&U32(0x3f)) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0x80) | v1>>6&U32(0x3f)) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0x80) | v1&U32(0x3f)) + goto __37 +__36: + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0xe0) | v1>>12) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0x80) | v1>>6&U32(0x3f)) + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(U32(0x80) | v1&U32(0x3f)) +__37: + ; +__35: + ; +__33: + ; + goto __30 +__29: + if !(int32(c) == 'b') { + goto __38 + } + c = uint8('\b') + goto __39 +__38: + if !(int32(c) == 'f') { + goto __40 + } + c = uint8('\f') + goto __41 +__40: + if !(int32(c) == 'n') { + goto __42 + } + c = uint8('\n') + goto __43 +__42: + if !(int32(c) == 'r') { + goto __44 + } + c = uint8('\r') + goto __45 +__44: + if !(int32(c) == 't') { + goto __46 + } + c = uint8('\t') +__46: + ; +__45: + ; +__43: + ; +__41: + ; +__39: + ; + *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = c +__30: + ; +__28: + ; + goto __25 +__25: + i1++ + goto __24 + goto __26 +__26: + ; + *(*uint8)(unsafe.Pointer(zOut + uintptr(j))) = uint8(0) + Xsqlite3_result_text(tls, pCtx, zOut, int32(j), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) +__22: + ; + goto __1 + +__8: +__9: + jsonReturnJson(tls, pNode, pCtx, aReplace) + goto __1 + +__1: +} + +// A macro to hint to the compiler that a function should not be +// inlined. + +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ + var nNew U32 + var pNew uintptr + + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + return -1 + } + nNew = (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc*U32(2) + U32(10) + pNew = Xsqlite3_realloc64(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode, uint64(uint64(unsafe.Sizeof(JsonNode{}))*uint64(nNew))) + if pNew == uintptr(0) { + (*JsonParse)(unsafe.Pointer(pParse)).Foom = U8(1) + return -1 + } + (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc = nNew + (*JsonParse)(unsafe.Pointer(pParse)).FaNode = pNew + + return jsonParseAddNode(tls, pParse, eType, n, zContent) +} + +// Create a new JsonNode instance based on the arguments and append that +// instance to the JsonParse. Return the index in pParse->aNode[] of the +// new node, or -1 if a memory allocation fails. +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ + var p uintptr + if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { + return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) + } + p = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr((*JsonParse)(unsafe.Pointer(pParse)).FnNode)*16 + (*JsonNode)(unsafe.Pointer(p)).FeType = U8(eType) + (*JsonNode)(unsafe.Pointer(p)).FjnFlags = U8(0) + + (*JsonNode)(unsafe.Pointer(p)).Fn = n + *(*uintptr)(unsafe.Pointer(p + 8)) = zContent + return int32(libc.PostIncUint32(&(*JsonParse)(unsafe.Pointer(pParse)).FnNode, 1)) +} + +// Return true if z[] begins with 4 (or more) hexadecimal digits +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ + var i int32 + for i = 0; i < 4; i++ { + if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { + return 0 + } + } + return 1 +} + +// Parse a single JSON value which begins at pParse->zJson[i]. Return the +// index of the first character past the end of the value parsed. +// +// Return negative for a syntax error. Special cases: return -2 if the +// first non-whitespace character is '}' and return -3 if the first +// non-whitespace character is ']'. +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ + var c uint8 + var j U32 + var iThis int32 + var x int32 + var pNode uintptr + var z uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FzJson + for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))] != 0 { + i++ + } + if int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(z + uintptr(i))))) == '{' { + // Parse object + iThis = jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) + if iThis < 0 { + return -1 + } + for j = i + U32(1); ; j++ { + for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 { + j++ + } + if int32(libc.PreIncUint16(&(*JsonParse)(unsafe.Pointer(pParse)).FiDepth, 1)) > JSON_MAX_DEPTH { + return -1 + } + x = jsonParseValue(tls, pParse, j) + if x < 0 { + (*JsonParse)(unsafe.Pointer(pParse)).FiDepth-- + if x == -2 && (*JsonParse)(unsafe.Pointer(pParse)).FnNode == U32(iThis)+U32(1) { + return int32(j + U32(1)) + } + return -1 + } + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + return -1 + } + pNode = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr((*JsonParse)(unsafe.Pointer(pParse)).FnNode-U32(1))*16 + if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) != JSON_STRING { + return -1 + } + *(*U8)(unsafe.Pointer(pNode + 1)) |= U8(JNODE_LABEL) + j = U32(x) + for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 { + j++ + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j)))) != ':' { + return -1 + } + j++ + x = jsonParseValue(tls, pParse, j) + (*JsonParse)(unsafe.Pointer(pParse)).FiDepth-- + if x < 0 { + return -1 + } + j = U32(x) + for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 { + j++ + } + c = *(*uint8)(unsafe.Pointer(z + uintptr(j))) + if int32(c) == ',' { + continue + } + if int32(c) != '}' { + return -1 + } + break + } + (*JsonNode)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iThis)*16)).Fn = (*JsonParse)(unsafe.Pointer(pParse)).FnNode - U32(iThis) - U32(1) + return int32(j + U32(1)) + } else if int32(c) == '[' { + // Parse array + iThis = jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) + if iThis < 0 { + return -1 + } + libc.Xmemset(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode+uintptr(iThis)*16+8, 0, uint64(unsafe.Sizeof(struct{ FzJContent uintptr }{}))) + for j = i + U32(1); ; j++ { + for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 { + j++ + } + if int32(libc.PreIncUint16(&(*JsonParse)(unsafe.Pointer(pParse)).FiDepth, 1)) > JSON_MAX_DEPTH { + return -1 + } + x = jsonParseValue(tls, pParse, j) + (*JsonParse)(unsafe.Pointer(pParse)).FiDepth-- + if x < 0 { + if x == -3 && (*JsonParse)(unsafe.Pointer(pParse)).FnNode == U32(iThis)+U32(1) { + return int32(j + U32(1)) + } + return -1 + } + j = U32(x) + for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 { + j++ + } + c = *(*uint8)(unsafe.Pointer(z + uintptr(j))) + if int32(c) == ',' { + continue + } + if int32(c) != ']' { + return -1 + } + break + } + (*JsonNode)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iThis)*16)).Fn = (*JsonParse)(unsafe.Pointer(pParse)).FnNode - U32(iThis) - U32(1) + return int32(j + U32(1)) + } else if int32(c) == '"' { + // Parse string + var jnFlags U8 = U8(0) + j = i + U32(1) + for { + c = *(*uint8)(unsafe.Pointer(z + uintptr(j))) + if int32(c)&libc.CplInt32(0x1f) == 0 { + // Control characters are not allowed in strings + return -1 + } + if int32(c) == '\\' { + c = *(*uint8)(unsafe.Pointer(z + uintptr(libc.PreIncUint32(&j, 1)))) + if int32(c) == '"' || int32(c) == '\\' || int32(c) == '/' || int32(c) == 'b' || int32(c) == 'f' || + int32(c) == 'n' || int32(c) == 'r' || int32(c) == 't' || + int32(c) == 'u' && jsonIs4Hex(tls, z+uintptr(j)+uintptr(1)) != 0 { + jnFlags = U8(JNODE_ESCAPE) + } else { + return -1 + } + } else if int32(c) == '"' { + break + } + j++ + } + jsonParseAddNode(tls, pParse, uint32(JSON_STRING), j+U32(1)-i, z+uintptr(i)) + if !(int32((*JsonParse)(unsafe.Pointer(pParse)).Foom) != 0) { + (*JsonNode)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr((*JsonParse)(unsafe.Pointer(pParse)).FnNode-U32(1))*16)).FjnFlags = jnFlags + } + return int32(j + U32(1)) + } else if int32(c) == 'n' && + libc.Xstrncmp(tls, z+uintptr(i), ts+6123, uint64(4)) == 0 && + !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i+U32(4)))))])&0x06 != 0) { + jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) + return int32(i + U32(4)) + } else if int32(c) == 't' && + libc.Xstrncmp(tls, z+uintptr(i), ts+6637, uint64(4)) == 0 && + !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i+U32(4)))))])&0x06 != 0) { + jsonParseAddNode(tls, pParse, uint32(JSON_TRUE), uint32(0), uintptr(0)) + return int32(i + U32(4)) + } else if int32(c) == 'f' && + libc.Xstrncmp(tls, z+uintptr(i), ts+6642, uint64(5)) == 0 && + !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { + jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) + return int32(i + U32(5)) + } else if int32(c) == '-' || int32(c) >= '0' && int32(c) <= '9' { + // Parse number + var seenDP U8 = U8(0) + var seenE U8 = U8(0) + + if int32(c) <= '0' { + if int32(c) == '-' { + j = i + U32(1) + } else { + j = i + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j)))) == '0' && int32(*(*uint8)(unsafe.Pointer(z + uintptr(j+U32(1))))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z + uintptr(j+U32(1))))) <= '9' { + return -1 + } + } + j = i + U32(1) + for ; ; j++ { + c = *(*uint8)(unsafe.Pointer(z + uintptr(j))) + if int32(c) >= '0' && int32(c) <= '9' { + continue + } + if int32(c) == '.' { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j-U32(1))))) == '-' { + return -1 + } + if seenDP != 0 { + return -1 + } + seenDP = U8(1) + continue + } + if int32(c) == 'e' || int32(c) == 'E' { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j-U32(1))))) < '0' { + return -1 + } + if seenE != 0 { + return -1 + } + seenDP = libc.AssignUint8(&seenE, U8(1)) + c = *(*uint8)(unsafe.Pointer(z + uintptr(j+U32(1)))) + if int32(c) == '+' || int32(c) == '-' { + j++ + c = *(*uint8)(unsafe.Pointer(z + uintptr(j+U32(1)))) + } + if int32(c) < '0' || int32(c) > '9' { + return -1 + } + continue + } + break + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j-U32(1))))) < '0' { + return -1 + } + jsonParseAddNode(tls, pParse, func() uint32 { + if seenDP != 0 { + return uint32(JSON_REAL) + } + return uint32(JSON_INT) + }(), + j-i, z+uintptr(i)) + return int32(j) + } else if int32(c) == '}' { + return -2 // End of {...} + } else if int32(c) == ']' { + return -3 // End of [...] + } else if int32(c) == 0 { + return 0 // End of file + } else { + return -1 // Syntax error + } + return int32(0) +} + +// Parse a complete JSON string. Return 0 on success or non-zero if there +// are any errors. If an error occurs, free all memory associated with +// pParse. +// +// pParse is uninitialized when this routine is called. +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ + var i int32 + libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{}))) + if zJson == uintptr(0) { + return 1 + } + (*JsonParse)(unsafe.Pointer(pParse)).FzJson = zJson + i = jsonParseValue(tls, pParse, uint32(0)) + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + i = -1 + } + if i > 0 { + + for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(zJson + uintptr(i))))] != 0 { + i++ + } + if *(*uint8)(unsafe.Pointer(zJson + uintptr(i))) != 0 { + i = -1 + } + } + if i <= 0 { + if pCtx != uintptr(0) { + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + Xsqlite3_result_error_nomem(tls, pCtx) + } else { + Xsqlite3_result_error(tls, pCtx, ts+24359, -1) + } + } + jsonParseReset(tls, pParse) + return 1 + } + return 0 +} + +// Mark node i of pParse as being a child of iParent. Call recursively +// to fill in all the descendants of node i. +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ + var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 + var j U32 + *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent + switch int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) { + case JSON_ARRAY: + { + for j = U32(1); j <= (*JsonNode)(unsafe.Pointer(pNode)).Fn; j = j + jsonNodeSize(tls, pNode+uintptr(j)*16) { + jsonParseFillInParentage(tls, pParse, i+j, i) + } + break + + } + case JSON_OBJECT: + { + for j = U32(1); j <= (*JsonNode)(unsafe.Pointer(pNode)).Fn; j = j + (jsonNodeSize(tls, pNode+uintptr(j)*16+uintptr(1)*16) + U32(1)) { + *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i+j)*4)) = i + jsonParseFillInParentage(tls, pParse, i+j+U32(1), i) + } + break + + } + default: + { + break + + } + } +} + +// Compute the parentage of all nodes in a completed parse. +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ + var aUp uintptr + + aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) + if aUp == uintptr(0) { + (*JsonParse)(unsafe.Pointer(pParse)).Foom = U8(1) + return SQLITE_NOMEM + } + jsonParseFillInParentage(tls, pParse, uint32(0), uint32(0)) + return SQLITE_OK +} + +// Magic number used for the JSON parse cache in sqlite3_get_auxdata() + +// Obtain a complete parse of the JSON found in the first argument +// of the argv array. Use the sqlite3_get_auxdata() cache for this +// parse if it is available. If the cache is not available or if it +// is no longer valid, parse the JSON again and return the new parse, +// and also register the new parse so that it will be available for +// future sqlite3_get_auxdata() calls. +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ + var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + var p uintptr + var pMatch uintptr = uintptr(0) + var iKey int32 + var iMinKey int32 = 0 + var iMinHold U32 = 0xffffffff + var iMaxHold U32 = U32(0) + if zJson == uintptr(0) { + return uintptr(0) + } + for iKey = 0; iKey < JSON_CACHE_SZ; iKey++ { + p = Xsqlite3_get_auxdata(tls, pCtx, -429938+iKey) + if p == uintptr(0) { + iMinKey = iKey + break + } + if pMatch == uintptr(0) && + (*JsonParse)(unsafe.Pointer(p)).FnJson == nJson && + libc.Xmemcmp(tls, (*JsonParse)(unsafe.Pointer(p)).FzJson, zJson, uint64(nJson)) == 0 { + (*JsonParse)(unsafe.Pointer(p)).FnErr = U8(0) + pMatch = p + } else if (*JsonParse)(unsafe.Pointer(p)).FiHold < iMinHold { + iMinHold = (*JsonParse)(unsafe.Pointer(p)).FiHold + iMinKey = iKey + } + if (*JsonParse)(unsafe.Pointer(p)).FiHold > iMaxHold { + iMaxHold = (*JsonParse)(unsafe.Pointer(p)).FiHold + } + } + if pMatch != 0 { + (*JsonParse)(unsafe.Pointer(pMatch)).FnErr = U8(0) + (*JsonParse)(unsafe.Pointer(pMatch)).FiHold = iMaxHold + U32(1) + return pMatch + } + p = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(JsonParse{}))+uint64(nJson)+uint64(1))) + if p == uintptr(0) { + Xsqlite3_result_error_nomem(tls, pCtx) + return uintptr(0) + } + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(JsonParse{}))) + (*JsonParse)(unsafe.Pointer(p)).FzJson = p + 1*48 + libc.Xmemcpy(tls, (*JsonParse)(unsafe.Pointer(p)).FzJson, zJson, uint64(nJson+1)) + if jsonParse(tls, p, pErrCtx, (*JsonParse)(unsafe.Pointer(p)).FzJson) != 0 { + Xsqlite3_free(tls, p) + return uintptr(0) + } + (*JsonParse)(unsafe.Pointer(p)).FnJson = nJson + (*JsonParse)(unsafe.Pointer(p)).FiHold = iMaxHold + U32(1) + Xsqlite3_set_auxdata(tls, pCtx, -429938+iMinKey, p, + *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{jsonParseFree}))) + return Xsqlite3_get_auxdata(tls, pCtx, -429938+iMinKey) +} + +// Compare the OBJECT label at pNode against zKey,nKey. Return true on +// a match. +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ + + if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { + if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { + return 0 + } + return libc.Bool32(libc.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(pNode + 8)), zKey, uint64(nKey)) == 0) + } else { + if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey+U32(2) { + return 0 + } + return libc.Bool32(libc.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1), zKey, uint64(nKey)) == 0) + } + return int32(0) +} + +// Search along zPath to find the node specified. Return a pointer +// to that node, or NULL if zPath is malformed or if there is no such +// node. +// +// If pApnd!=0, then try to append new nodes to complete zPath if it is +// possible to do so and if no existing node corresponds to zPath. If +// new nodes are appended *pApnd is set to 1. +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ + var i U32 + var j U32 + var nKey U32 + var zKey uintptr + var pRoot uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16 + if int32(*(*uint8)(unsafe.Pointer(zPath))) == 0 { + return pRoot + } + if int32((*JsonNode)(unsafe.Pointer(pRoot)).FjnFlags)&JNODE_REPLACE != 0 { + return uintptr(0) + } + if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' { + if int32((*JsonNode)(unsafe.Pointer(pRoot)).FeType) != JSON_OBJECT { + return uintptr(0) + } + zPath++ + if int32(*(*uint8)(unsafe.Pointer(zPath))) == '"' { + zKey = zPath + uintptr(1) + for i = U32(1); *(*uint8)(unsafe.Pointer(zPath + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(i)))) != '"'; i++ { + } + nKey = i - U32(1) + if *(*uint8)(unsafe.Pointer(zPath + uintptr(i))) != 0 { + i++ + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = zPath + return uintptr(0) + } + } else { + zKey = zPath + for i = U32(0); *(*uint8)(unsafe.Pointer(zPath + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(i)))) != '.' && int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(i)))) != '['; i++ { + } + nKey = i + } + if nKey == U32(0) { + *(*uintptr)(unsafe.Pointer(pzErr)) = zPath + return uintptr(0) + } + j = U32(1) + for { + for j <= (*JsonNode)(unsafe.Pointer(pRoot)).Fn { + if jsonLabelCompare(tls, pRoot+uintptr(j)*16, zKey, nKey) != 0 { + return jsonLookupStep(tls, pParse, iRoot+j+U32(1), zPath+uintptr(i), pApnd, pzErr) + } + j++ + j = j + jsonNodeSize(tls, pRoot+uintptr(j)*16) + } + if int32((*JsonNode)(unsafe.Pointer(pRoot)).FjnFlags)&JNODE_APPEND == 0 { + break + } + + iRoot = iRoot + *(*U32)(unsafe.Pointer(pRoot + 8)) + pRoot = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16 + j = U32(1) + } + if pApnd != 0 { + var iStart U32 + var iLabel U32 + var pNode uintptr + iStart = U32(jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(2), uintptr(0))) + iLabel = U32(jsonParseAddNode(tls, pParse, uint32(JSON_STRING), nKey, zKey)) + zPath += uintptr(i) + pNode = jsonLookupAppend(tls, pParse, zPath, pApnd, pzErr) + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + return uintptr(0) + } + if pNode != 0 { + pRoot = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16 + + *(*U32)(unsafe.Pointer(pRoot + 8)) = iStart - iRoot + *(*U8)(unsafe.Pointer(pRoot + 1)) |= U8(JNODE_APPEND) + + *(*U8)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iLabel)*16 + 1)) |= U8(JNODE_RAW) + } + return pNode + } + } else if int32(*(*uint8)(unsafe.Pointer(zPath))) == '[' { + i = U32(0) + j = U32(1) + for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath + uintptr(j))))])&0x04 != 0 { + i = i*U32(10) + U32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j)))) - U32('0') + j++ + } + if j < U32(2) || int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j)))) != ']' { + if int32(*(*uint8)(unsafe.Pointer(zPath + 1))) == '#' { + var pBase uintptr = pRoot + var iBase int32 = int32(iRoot) + if int32((*JsonNode)(unsafe.Pointer(pRoot)).FeType) != JSON_ARRAY { + return uintptr(0) + } + for { + for j <= (*JsonNode)(unsafe.Pointer(pBase)).Fn { + if int32((*JsonNode)(unsafe.Pointer(pBase+uintptr(j)*16)).FjnFlags)&JNODE_REMOVE == 0 { + i++ + } + j = j + jsonNodeSize(tls, pBase+uintptr(j)*16) + } + if int32((*JsonNode)(unsafe.Pointer(pBase)).FjnFlags)&JNODE_APPEND == 0 { + break + } + + iBase = int32(U32(iBase) + *(*U32)(unsafe.Pointer(pBase + 8))) + pBase = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iBase)*16 + j = U32(1) + } + j = U32(2) + if int32(*(*uint8)(unsafe.Pointer(zPath + 2))) == '-' && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath + 3)))])&0x04 != 0 { + var x uint32 = uint32(0) + j = U32(3) + for __ccgo := true; __ccgo; __ccgo = int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath + uintptr(j))))])&0x04 != 0 { + x = x*uint32(10) + uint32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j)))) - uint32('0') + j++ + } + if x > i { + return uintptr(0) + } + i = i - x + } + if int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j)))) != ']' { + *(*uintptr)(unsafe.Pointer(pzErr)) = zPath + return uintptr(0) + } + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = zPath + return uintptr(0) + } + } + if int32((*JsonNode)(unsafe.Pointer(pRoot)).FeType) != JSON_ARRAY { + return uintptr(0) + } + zPath += uintptr(j + U32(1)) + j = U32(1) + for { + for j <= (*JsonNode)(unsafe.Pointer(pRoot)).Fn && (i > U32(0) || int32((*JsonNode)(unsafe.Pointer(pRoot+uintptr(j)*16)).FjnFlags)&JNODE_REMOVE != 0) { + if int32((*JsonNode)(unsafe.Pointer(pRoot+uintptr(j)*16)).FjnFlags)&JNODE_REMOVE == 0 { + i-- + } + j = j + jsonNodeSize(tls, pRoot+uintptr(j)*16) + } + if int32((*JsonNode)(unsafe.Pointer(pRoot)).FjnFlags)&JNODE_APPEND == 0 { + break + } + + iRoot = iRoot + *(*U32)(unsafe.Pointer(pRoot + 8)) + pRoot = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16 + j = U32(1) + } + if j <= (*JsonNode)(unsafe.Pointer(pRoot)).Fn { + return jsonLookupStep(tls, pParse, iRoot+j, zPath, pApnd, pzErr) + } + if i == U32(0) && pApnd != 0 { + var iStart U32 + var pNode uintptr + iStart = U32(jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(1), uintptr(0))) + pNode = jsonLookupAppend(tls, pParse, zPath, pApnd, pzErr) + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + return uintptr(0) + } + if pNode != 0 { + pRoot = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16 + + *(*U32)(unsafe.Pointer(pRoot + 8)) = iStart - iRoot + *(*U8)(unsafe.Pointer(pRoot + 1)) |= U8(JNODE_APPEND) + + } + return pNode + } + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = zPath + } + return uintptr(0) +} + +// Append content to pParse that will complete zPath. Return a pointer +// to the inserted node, or return NULL if the append fails. +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ + *(*int32)(unsafe.Pointer(pApnd)) = 1 + if int32(*(*uint8)(unsafe.Pointer(zPath))) == 0 { + jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + return uintptr(0) + } + return (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr((*JsonParse)(unsafe.Pointer(pParse)).FnNode-U32(1))*16 + } + if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' { + jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) + } else if libc.Xstrncmp(tls, zPath, ts+24374, uint64(3)) == 0 { + jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) + } else { + return uintptr(0) + } + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + return uintptr(0) + } + return jsonLookupStep(tls, pParse, (*JsonParse)(unsafe.Pointer(pParse)).FnNode-U32(1), zPath, pApnd, pzErr) +} + +// Return the text of a syntax error message on a JSON path. Space is +// obtained from sqlite3_malloc(). +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + return Xsqlite3_mprintf(tls, ts+24378, libc.VaList(bp, zErr)) +} + +// Do a node lookup using zPath. Return a pointer to the node on success. +// Return NULL if not found or if there is an error. +// +// On an error, write an error message into pCtx and increment the +// pParse->nErr counter. +// +// If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if +// nodes are appended. +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var zErr uintptr at bp, 8 + + var pNode uintptr + var zMsg uintptr + *(*uintptr)(unsafe.Pointer(bp /* zErr */)) = uintptr(0) + pNode = uintptr(0) + + if !(zPath == uintptr(0)) { + goto __1 + } + return uintptr(0) +__1: + ; + if !(int32(*(*uint8)(unsafe.Pointer(zPath))) != '$') { + goto __2 + } + *(*uintptr)(unsafe.Pointer(bp /* zErr */)) = zPath + goto lookup_err +__2: + ; + zPath++ + pNode = jsonLookupStep(tls, pParse, uint32(0), zPath, pApnd, bp) + if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) { + goto __3 + } + return pNode +__3: + ; + +lookup_err: + (*JsonParse)(unsafe.Pointer(pParse)).FnErr++ + + zMsg = jsonPathSyntaxError(tls, *(*uintptr)(unsafe.Pointer(bp /* zErr */))) + if !(zMsg != 0) { + goto __4 + } + Xsqlite3_result_error(tls, pCtx, zMsg, -1) + Xsqlite3_free(tls, zMsg) + goto __5 +__4: + Xsqlite3_result_error_nomem(tls, pCtx) +__5: + ; + return uintptr(0) +} + +// Report the wrong number of arguments for json_insert(), json_replace() +// or json_set(). +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24404, + libc.VaList(bp, zFuncName)) + Xsqlite3_result_error(tls, pCtx, zMsg, -1) + Xsqlite3_free(tls, zMsg) +} + +// Mark all NULL entries in the Object passed in as JNODE_REMOVE. +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ + var i int32 + var n int32 + + n = int32((*JsonNode)(unsafe.Pointer(pNode)).Fn) + for i = 2; i <= n; i = int32(U32(i) + (jsonNodeSize(tls, pNode+uintptr(i)*16) + U32(1))) { + switch int32((*JsonNode)(unsafe.Pointer(pNode + uintptr(i)*16)).FeType) { + case JSON_NULL: + *(*U8)(unsafe.Pointer(pNode + uintptr(i)*16 + 1)) |= U8(JNODE_REMOVE) + break + case JSON_OBJECT: + jsonRemoveAllNulls(tls, pNode+uintptr(i)*16) + break + } + } +} + +// *************************************************************************** +// +// SQL functions used for testing and debugging +// + +// *************************************************************************** +// +// Scalar SQL function implementations +// + +// Implementation of the json_QUOTE(VALUE) function. Return a JSON value +// corresponding to the SQL value input. Mostly this means putting +// double-quotes around strings and returning the unquoted string "null" +// when given a NULL input. +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + // var jx JsonString at bp, 136 + + _ = argc + + jsonInit(tls, bp, ctx) + jsonAppendValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv))) + jsonResult(tls, bp) + Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) +} + +// Implementation of the json_array(VALUE,...) function. Return a JSON +// array that contains all values given in arguments. Or if any argument +// is a BLOB, throw an error. +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var i int32 + // var jx JsonString at bp, 136 + + jsonInit(tls, bp, ctx) + jsonAppendChar(tls, bp, uint8('[')) + for i = 0; i < argc; i++ { + jsonAppendSeparator(tls, bp) + jsonAppendValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + } + jsonAppendChar(tls, bp, uint8(']')) + jsonResult(tls, bp) + Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) +} + +// json_array_length(JSON) +// json_array_length(JSON, PATH) +// +// Return the number of elements in the top-level JSON array. +// Return 0 if the input is not a well-formed JSON array. +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ + var p uintptr // The parse + var n Sqlite3_int64 = int64(0) + var i U32 + var pNode uintptr + + p = jsonParseCached(tls, ctx, argv, ctx) + if p == uintptr(0) { + return + } + + if argc == 2 { + var zPath uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + pNode = jsonLookup(tls, p, zPath, uintptr(0), ctx) + } else { + pNode = (*JsonParse)(unsafe.Pointer(p)).FaNode + } + if pNode == uintptr(0) { + return + } + if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) == JSON_ARRAY { + + for i = U32(1); i <= (*JsonNode)(unsafe.Pointer(pNode)).Fn; n++ { + i = i + jsonNodeSize(tls, pNode+uintptr(i)*16) + } + } + Xsqlite3_result_int64(tls, ctx, n) +} + +// Bit values for the flags passed into jsonExtractFunc() or +// jsonSetFunc() via the user-data value. + +// json_extract(JSON, PATH, ...) +// "->"(JSON,PATH) +// "->>"(JSON,PATH) +// +// Return the element described by PATH. Return NULL if that PATH element +// is not found. +// +// If JSON_JSON is set or if more that one PATH argument is supplied then +// always return a JSON representation of the result. If JSON_SQL is set, +// then always return an SQL representation of the result. If neither flag +// is present and argc==2, then return JSON for objects and arrays and SQL +// for all other values. +// +// When multiple PATH arguments are supplied, the result is a JSON array +// containing the result of each PATH. +// +// Abbreviated JSON path expressions are allows if JSON_ABPATH, for +// compatibility with PG. +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var p uintptr // The parse + var pNode uintptr + var zPath uintptr + var flags int32 = int32(Xsqlite3_user_data(tls, ctx)) + // var jx JsonString at bp, 136 + + if argc < 2 { + return + } + p = jsonParseCached(tls, ctx, argv, ctx) + if p == uintptr(0) { + return + } + if argc == 2 { + // With a single PATH argument + zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if zPath == uintptr(0) { + return + } + if flags&JSON_ABPATH != 0 { + if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { + // The -> and ->> operators accept abbreviated PATH arguments. This + // is mostly for compatibility with PostgreSQL, but also for + // convenience. + // + // NUMBER ==> $[NUMBER] // PG compatible + // LABEL ==> $.LABEL // PG compatible + // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience + jsonInit(tls, bp, ctx) + if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath)))])&0x04 != 0 { + jsonAppendRaw(tls, bp, ts+24447, uint32(2)) + jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) + jsonAppendRaw(tls, bp, ts+4940, uint32(2)) + } else { + jsonAppendRaw(tls, bp, ts+24450, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) + jsonAppendChar(tls, bp, uint8(0)) + } + if (*JsonString)(unsafe.Pointer(bp)).FbErr != 0 { + pNode = uintptr(0) + } else { + pNode = jsonLookup(tls, p, (*JsonString)(unsafe.Pointer(bp /* &jx */)).FzBuf, uintptr(0), ctx) + } + jsonReset(tls, bp) + } else { + pNode = jsonLookup(tls, p, zPath, uintptr(0), ctx) + } + if pNode != 0 { + if flags&JSON_JSON != 0 { + jsonReturnJson(tls, pNode, ctx, uintptr(0)) + } else { + jsonReturn(tls, pNode, ctx, uintptr(0)) + Xsqlite3_result_subtype(tls, ctx, uint32(0)) + } + } + } else { + pNode = jsonLookup(tls, p, zPath, uintptr(0), ctx) + if int32((*JsonParse)(unsafe.Pointer(p)).FnErr) == 0 && pNode != 0 { + jsonReturn(tls, pNode, ctx, uintptr(0)) + } + } + } else { + // Two or more PATH arguments results in a JSON array with each + // element of the array being the value selected by one of the PATHs + var i int32 + jsonInit(tls, bp, ctx) + jsonAppendChar(tls, bp, uint8('[')) + for i = 1; i < argc; i++ { + zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + pNode = jsonLookup(tls, p, zPath, uintptr(0), ctx) + if (*JsonParse)(unsafe.Pointer(p)).FnErr != 0 { + break + } + jsonAppendSeparator(tls, bp) + if pNode != 0 { + jsonRenderNode(tls, pNode, bp, uintptr(0)) + } else { + jsonAppendRaw(tls, bp, ts+6123, uint32(4)) + } + } + if i == argc { + jsonAppendChar(tls, bp, uint8(']')) + jsonResult(tls, bp) + Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) + } + jsonReset(tls, bp) + } +} + +// This is the RFC 7396 MergePatch algorithm. +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ + var i U32 + var j U32 + var iRoot U32 + var pTarget uintptr + if int32((*JsonNode)(unsafe.Pointer(pPatch)).FeType) != JSON_OBJECT { + return pPatch + } + + pTarget = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iTarget)*16 + + if int32((*JsonNode)(unsafe.Pointer(pTarget)).FeType) != JSON_OBJECT { + jsonRemoveAllNulls(tls, pPatch) + return pPatch + } + iRoot = iTarget + for i = U32(1); i < (*JsonNode)(unsafe.Pointer(pPatch)).Fn; i = i + (jsonNodeSize(tls, pPatch+uintptr(i+U32(1))*16) + U32(1)) { + var nKey U32 + var zKey uintptr + + nKey = (*JsonNode)(unsafe.Pointer(pPatch + uintptr(i)*16)).Fn + zKey = *(*uintptr)(unsafe.Pointer(pPatch + uintptr(i)*16 + 8)) + + for j = U32(1); j < (*JsonNode)(unsafe.Pointer(pTarget)).Fn; j = j + (jsonNodeSize(tls, pTarget+uintptr(j+U32(1))*16) + U32(1)) { + + if (*JsonNode)(unsafe.Pointer(pTarget+uintptr(j)*16)).Fn == nKey && libc.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(pTarget + uintptr(j)*16 + 8)), zKey, uint64(nKey)) == 0 { + if int32((*JsonNode)(unsafe.Pointer(pTarget+uintptr(j+U32(1))*16)).FjnFlags)&(JNODE_REMOVE|JNODE_PATCH) != 0 { + break + } + if int32((*JsonNode)(unsafe.Pointer(pPatch+uintptr(i+U32(1))*16)).FeType) == JSON_NULL { + *(*U8)(unsafe.Pointer(pTarget + uintptr(j+U32(1))*16 + 1)) |= U8(JNODE_REMOVE) + } else { + var pNew uintptr = jsonMergePatch(tls, pParse, iTarget+j+U32(1), pPatch+uintptr(i+U32(1))*16) + if pNew == uintptr(0) { + return uintptr(0) + } + pTarget = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iTarget)*16 + if pNew != pTarget+uintptr(j+U32(1))*16 { + + *(*uintptr)(unsafe.Pointer(pTarget + uintptr(j+U32(1))*16 + 8)) = pNew + *(*U8)(unsafe.Pointer(pTarget + uintptr(j+U32(1))*16 + 1)) |= U8(JNODE_PATCH) + } + } + break + } + } + if j >= (*JsonNode)(unsafe.Pointer(pTarget)).Fn && int32((*JsonNode)(unsafe.Pointer(pPatch+uintptr(i+U32(1))*16)).FeType) != JSON_NULL { + var iStart int32 + var iPatch int32 + iStart = jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(2), uintptr(0)) + jsonParseAddNode(tls, pParse, uint32(JSON_STRING), nKey, zKey) + iPatch = jsonParseAddNode(tls, pParse, uint32(JSON_TRUE), uint32(0), uintptr(0)) + if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { + return uintptr(0) + } + jsonRemoveAllNulls(tls, pPatch) + pTarget = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iTarget)*16 + + *(*U8)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16 + 1)) |= U8(JNODE_APPEND) + + *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16 + 8)) = U32(iStart) - iRoot + iRoot = U32(iStart) + + *(*U8)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iPatch)*16 + 1)) |= U8(JNODE_PATCH) + *(*uintptr)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iPatch)*16 + 8)) = pPatch + uintptr(i+U32(1))*16 + } + } + return pTarget +} + +// Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON +// object that is the result of running the RFC 7396 MergePatch() algorithm +// on the two arguments. +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + // var x JsonParse at bp, 48 + // The JSON that is being patched + // var y JsonParse at bp+48, 48 + // The patch + var pResult uintptr // The result of the merge + + _ = argc + if jsonParse(tls, bp, ctx, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != 0 { + return + } + if jsonParse(tls, bp+48, ctx, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) != 0 { + jsonParseReset(tls, bp) + return + } + pResult = jsonMergePatch(tls, bp, uint32(0), (*JsonParse)(unsafe.Pointer(bp+48 /* &y */)).FaNode) + + if pResult != 0 { + jsonReturnJson(tls, pResult, ctx, uintptr(0)) + } else { + Xsqlite3_result_error_nomem(tls, ctx) + } + jsonParseReset(tls, bp) + jsonParseReset(tls, bp+48) +} + +// Implementation of the json_object(NAME,VALUE,...) function. Return a JSON +// object that contains all name/value given in arguments. Or if any name +// is not a string or if any value is a BLOB, throw an error. +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var i int32 + // var jx JsonString at bp, 136 + + var z uintptr + var n U32 + + if argc&1 != 0 { + Xsqlite3_result_error(tls, ctx, + ts+24453, -1) + return + } + jsonInit(tls, bp, ctx) + jsonAppendChar(tls, bp, uint8('{')) + for i = 0; i < argc; i = i + 2 { + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { + Xsqlite3_result_error(tls, ctx, ts+24504, -1) + jsonReset(tls, bp) + return + } + jsonAppendSeparator(tls, bp) + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + n = U32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) + jsonAppendString(tls, bp, z, n) + jsonAppendChar(tls, bp, uint8(':')) + jsonAppendValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i+1)*8))) + } + jsonAppendChar(tls, bp, uint8('}')) + jsonResult(tls, bp) + Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) +} + +// json_remove(JSON, PATH, ...) +// +// Remove the named elements from JSON and return the result. malformed +// JSON or PATH arguments result in an error. +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var x JsonParse at bp, 48 + // The parse + var pNode uintptr + var zPath uintptr + var i U32 + + if !(argc < 1) { + goto __1 + } + return +__1: + ; + if !(jsonParse(tls, bp, ctx, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != 0) { + goto __2 + } + return +__2: + ; + + i = U32(1) +__3: + if !(i < U32(argc)) { + goto __5 + } + zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + if !(zPath == uintptr(0)) { + goto __6 + } + goto remove_done +__6: + ; + pNode = jsonLookup(tls, bp, zPath, uintptr(0), ctx) + if !((*JsonParse)(unsafe.Pointer(bp)).FnErr != 0) { + goto __7 + } + goto remove_done +__7: + ; + if !(pNode != 0) { + goto __8 + } + *(*U8)(unsafe.Pointer(pNode + 1)) |= U8(JNODE_REMOVE) +__8: + ; + goto __4 +__4: + i++ + goto __3 + goto __5 +__5: + ; + if !(int32((*JsonNode)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(bp)).FaNode)).FjnFlags)&JNODE_REMOVE == 0) { + goto __9 + } + jsonReturnJson(tls, (*JsonParse)(unsafe.Pointer(bp /* &x */)).FaNode, ctx, uintptr(0)) +__9: + ; +remove_done: + jsonParseReset(tls, bp) +} + +// json_replace(JSON, PATH, VALUE, ...) +// +// Replace the value at PATH with VALUE. If PATH does not already exist, +// this routine is a no-op. If JSON or PATH is malformed, throw an error. +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var x JsonParse at bp, 48 + // The parse + var pNode uintptr + var zPath uintptr + var i U32 + + if !(argc < 1) { + goto __1 + } + return +__1: + ; + if !(argc&1 == 0) { + goto __2 + } + jsonWrongNumArgs(tls, ctx, ts+15269) + return +__2: + ; + if !(jsonParse(tls, bp, ctx, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != 0) { + goto __3 + } + return +__3: + ; + + i = U32(1) +__4: + if !(i < U32(argc)) { + goto __6 + } + zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + pNode = jsonLookup(tls, bp, zPath, uintptr(0), ctx) + if !((*JsonParse)(unsafe.Pointer(bp)).FnErr != 0) { + goto __7 + } + goto replace_err +__7: + ; + if !(pNode != 0) { + goto __8 + } + + *(*U8)(unsafe.Pointer(pNode + 1)) |= U8(int32(U8(JNODE_REPLACE))) + + *(*U32)(unsafe.Pointer(pNode + 8)) = i + U32(1) +__8: + ; + goto __5 +__5: + i = i + U32(2) + goto __4 + goto __6 +__6: + ; + if !(int32((*JsonNode)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(bp)).FaNode)).FjnFlags)&JNODE_REPLACE != 0) { + goto __9 + } + + Xsqlite3_result_value(tls, ctx, *(*uintptr)(unsafe.Pointer(argv + uintptr(*(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(bp)).FaNode + 8)))*8))) + goto __10 +__9: + jsonReturnJson(tls, (*JsonParse)(unsafe.Pointer(bp /* &x */)).FaNode, ctx, argv) +__10: + ; +replace_err: + jsonParseReset(tls, bp) +} + +// json_set(JSON, PATH, VALUE, ...) +// +// Set the value at PATH to VALUE. Create the PATH if it does not already +// exist. Overwrite existing values that do exist. +// If JSON or PATH is malformed, throw an error. +// +// json_insert(JSON, PATH, VALUE, ...) +// +// Create PATH and initialize it to VALUE. If PATH already exists, this +// routine is a no-op. If JSON or PATH is malformed, throw an error. +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + // var x JsonParse at bp, 48 + // The parse + var pNode uintptr + var zPath uintptr + var i U32 + // var bApnd int32 at bp+48, 4 + + var bIsSet int32 + bIsSet = libc.Bool32(Xsqlite3_user_data(tls, ctx) != uintptr(0)) + + if !(argc < 1) { + goto __1 + } + return +__1: + ; + if !(argc&1 == 0) { + goto __2 + } + jsonWrongNumArgs(tls, ctx, func() uintptr { + if bIsSet != 0 { + return ts + 24538 /* "set" */ + } + return ts + 24542 /* "insert" */ + }()) + return +__2: + ; + if !(jsonParse(tls, bp, ctx, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != 0) { + goto __3 + } + return +__3: + ; + + i = U32(1) +__4: + if !(i < U32(argc)) { + goto __6 + } + zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + *(*int32)(unsafe.Pointer(bp + 48 /* bApnd */)) = 0 + pNode = jsonLookup(tls, bp, zPath, bp+48, ctx) + if !((*JsonParse)(unsafe.Pointer(bp)).Foom != 0) { + goto __7 + } + Xsqlite3_result_error_nomem(tls, ctx) + goto jsonSetDone + goto __8 +__7: + if !((*JsonParse)(unsafe.Pointer(bp)).FnErr != 0) { + goto __9 + } + goto jsonSetDone + goto __10 +__9: + if !(pNode != 0 && (*(*int32)(unsafe.Pointer(bp + 48)) != 0 || bIsSet != 0)) { + goto __11 + } + + *(*U8)(unsafe.Pointer(pNode + 1)) |= U8(int32(U8(JNODE_REPLACE))) + *(*U32)(unsafe.Pointer(pNode + 8)) = i + U32(1) +__11: + ; +__10: + ; +__8: + ; + goto __5 +__5: + i = i + U32(2) + goto __4 + goto __6 +__6: + ; + if !(int32((*JsonNode)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(bp)).FaNode)).FjnFlags)&JNODE_REPLACE != 0) { + goto __12 + } + + Xsqlite3_result_value(tls, ctx, *(*uintptr)(unsafe.Pointer(argv + uintptr(*(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(bp)).FaNode + 8)))*8))) + goto __13 +__12: + jsonReturnJson(tls, (*JsonParse)(unsafe.Pointer(bp /* &x */)).FaNode, ctx, argv) +__13: + ; +jsonSetDone: + jsonParseReset(tls, bp) +} + +// json_type(JSON) +// json_type(JSON, PATH) +// +// Return the top-level "type" of a JSON string. json_type() raises an +// error if either the JSON or PATH inputs are not well-formed. +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ + var p uintptr // The parse + var zPath uintptr + var pNode uintptr + + p = jsonParseCached(tls, ctx, argv, ctx) + if p == uintptr(0) { + return + } + if argc == 2 { + zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + pNode = jsonLookup(tls, p, zPath, uintptr(0), ctx) + } else { + pNode = (*JsonParse)(unsafe.Pointer(p)).FaNode + } + if pNode != 0 { + Xsqlite3_result_text(tls, ctx, jsonType[(*JsonNode)(unsafe.Pointer(pNode)).FeType], -1, uintptr(0)) + } +} + +// json_valid(JSON) +// +// Return 1 if JSON is a well-formed JSON string according to RFC-7159. +// Return 0 otherwise. +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ + var p uintptr // The parse + _ = argc + p = jsonParseCached(tls, ctx, argv, uintptr(0)) + Xsqlite3_result_int(tls, ctx, libc.Bool32(p != uintptr(0))) +} + +// *************************************************************************** +// +// Aggregate SQL function implementations +// +// json_group_array(VALUE) +// +// Return a JSON array composed of all values in the aggregate. +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ + var pStr uintptr + _ = argc + pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) + if pStr != 0 { + if (*JsonString)(unsafe.Pointer(pStr)).FzBuf == uintptr(0) { + jsonInit(tls, pStr, ctx) + jsonAppendChar(tls, pStr, uint8('[')) + } else if (*JsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) { + jsonAppendChar(tls, pStr, uint8(',')) + } + (*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx + jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv))) + } +} + +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ + var pStr uintptr + pStr = Xsqlite3_aggregate_context(tls, ctx, 0) + if pStr != 0 { + (*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx + jsonAppendChar(tls, pStr, uint8(']')) + if (*JsonString)(unsafe.Pointer(pStr)).FbErr != 0 { + if int32((*JsonString)(unsafe.Pointer(pStr)).FbErr) == 1 { + Xsqlite3_result_error_nomem(tls, ctx) + } + + } else if isFinal != 0 { + Xsqlite3_result_text(tls, ctx, (*JsonString)(unsafe.Pointer(pStr)).FzBuf, int32((*JsonString)(unsafe.Pointer(pStr)).FnUsed), + func() uintptr { + if (*JsonString)(unsafe.Pointer(pStr)).FbStatic != 0 { + return libc.UintptrFromInt32(-1) + } + return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})) + }()) + (*JsonString)(unsafe.Pointer(pStr)).FbStatic = U8(1) + } else { + Xsqlite3_result_text(tls, ctx, (*JsonString)(unsafe.Pointer(pStr)).FzBuf, int32((*JsonString)(unsafe.Pointer(pStr)).FnUsed), libc.UintptrFromInt32(-1)) + (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- + } + } else { + Xsqlite3_result_text(tls, ctx, ts+24549, 2, uintptr(0)) + } + Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) +} + +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ + jsonArrayCompute(tls, ctx, 0) +} + +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ + jsonArrayCompute(tls, ctx, 1) +} + +// This method works for both json_group_array() and json_group_object(). +// It works by removing the first element of the group by searching forward +// to the first comma (",") that is not within a string and deleting all +// text through that comma. +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ + var i uint32 + var inStr int32 = 0 + var nNest int32 = 0 + var z uintptr + var c uint8 + var pStr uintptr + _ = argc + _ = argv + pStr = Xsqlite3_aggregate_context(tls, ctx, 0) + // pStr is always non-NULL since jsonArrayStep() or jsonObjectStep() will + // always have been called to initalize it + if !(pStr != 0) { + return + } + z = (*JsonString)(unsafe.Pointer(pStr)).FzBuf + for i = uint32(1); U64(i) < (*JsonString)(unsafe.Pointer(pStr)).FnUsed && (int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(z + uintptr(i))))) != ',' || inStr != 0 || nNest != 0); i++ { + if int32(c) == '"' { + inStr = libc.BoolInt32(!(inStr != 0)) + } else if int32(c) == '\\' { + i++ + } else if !(inStr != 0) { + if int32(c) == '{' || int32(c) == '[' { + nNest++ + } + if int32(c) == '}' || int32(c) == ']' { + nNest-- + } + } + } + if U64(i) < (*JsonString)(unsafe.Pointer(pStr)).FnUsed { + *(*U64)(unsafe.Pointer(pStr + 24)) -= U64(i) + libc.Xmemmove(tls, z+1, z+uintptr(i+uint32(1)), Size_t((*JsonString)(unsafe.Pointer(pStr)).FnUsed)-uint64(1)) + *(*uint8)(unsafe.Pointer(z + uintptr((*JsonString)(unsafe.Pointer(pStr)).FnUsed))) = uint8(0) + } else { + (*JsonString)(unsafe.Pointer(pStr)).FnUsed = uint64(1) + } +} + +// json_group_obj(NAME,VALUE) +// +// Return a JSON object composed of all names and values in the aggregate. +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ + var pStr uintptr + var z uintptr + var n U32 + _ = argc + pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) + if pStr != 0 { + if (*JsonString)(unsafe.Pointer(pStr)).FzBuf == uintptr(0) { + jsonInit(tls, pStr, ctx) + jsonAppendChar(tls, pStr, uint8('{')) + } else if (*JsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) { + jsonAppendChar(tls, pStr, uint8(',')) + } + (*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + n = U32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) + jsonAppendString(tls, pStr, z, n) + jsonAppendChar(tls, pStr, uint8(':')) + jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + } +} + +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ + var pStr uintptr + pStr = Xsqlite3_aggregate_context(tls, ctx, 0) + if pStr != 0 { + jsonAppendChar(tls, pStr, uint8('}')) + if (*JsonString)(unsafe.Pointer(pStr)).FbErr != 0 { + if int32((*JsonString)(unsafe.Pointer(pStr)).FbErr) == 1 { + Xsqlite3_result_error_nomem(tls, ctx) + } + + } else if isFinal != 0 { + Xsqlite3_result_text(tls, ctx, (*JsonString)(unsafe.Pointer(pStr)).FzBuf, int32((*JsonString)(unsafe.Pointer(pStr)).FnUsed), + func() uintptr { + if (*JsonString)(unsafe.Pointer(pStr)).FbStatic != 0 { + return libc.UintptrFromInt32(-1) + } + return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})) + }()) + (*JsonString)(unsafe.Pointer(pStr)).FbStatic = U8(1) + } else { + Xsqlite3_result_text(tls, ctx, (*JsonString)(unsafe.Pointer(pStr)).FzBuf, int32((*JsonString)(unsafe.Pointer(pStr)).FnUsed), libc.UintptrFromInt32(-1)) + (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- + } + } else { + Xsqlite3_result_text(tls, ctx, ts+24552, 2, uintptr(0)) + } + Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) +} + +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ + jsonObjectCompute(tls, ctx, 0) +} + +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ + jsonObjectCompute(tls, ctx, 1) +} + +// *************************************************************************** +// +// The json_each virtual table +// +type JsonEachCursor1 = struct { + Fbase Sqlite3_vtab_cursor + FiRowid U32 + FiBegin U32 + Fi U32 + FiEnd U32 + FeType U8 + FbRecursive U8 + F__ccgo_pad1 [6]byte + FzJson uintptr + FzRoot uintptr + FsParse JsonParse +} /* sqlite3.c:195233:9 */ + +// *************************************************************************** +// +// The json_each virtual table +// +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ + +// Constructor for the json_each virtual table +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ + var pNew uintptr + var rc int32 + + // Column numbers + // The xBestIndex method assumes that the JSON and ROOT columns are + // the last two columns in the table. Should this ever changes, be + // sure to update the xBestIndex method. + + _ = pzErr + _ = argv + _ = argc + _ = pAux + rc = Xsqlite3_declare_vtab(tls, db, + + ts+24555) + if rc == SQLITE_OK { + pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) + if pNew == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Sqlite3_vtab{}))) + Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_INNOCUOUS, 0) + } + return rc +} + +// destructor for json_each virtual table +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ + Xsqlite3_free(tls, pVtab) + return SQLITE_OK +} + +// constructor for a JsonEachCursor object for json_each(). +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ + var pCur uintptr + + _ = p + pCur = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(JsonEachCursor{}))) + if pCur == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(JsonEachCursor{}))) + *(*uintptr)(unsafe.Pointer(ppCursor)) = pCur + return SQLITE_OK +} + +// constructor for a JsonEachCursor object for json_tree(). +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ + var rc int32 = jsonEachOpenEach(tls, p, ppCursor) + if rc == SQLITE_OK { + var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) + (*JsonEachCursor)(unsafe.Pointer(pCur)).FbRecursive = U8(1) + } + return rc +} + +// Reset a JsonEachCursor back to its original state. Free any memory +// held. +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ + Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) + Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) + jsonParseReset(tls, p+48) + (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid = U32(0) + (*JsonEachCursor)(unsafe.Pointer(p)).Fi = U32(0) + (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd = U32(0) + (*JsonEachCursor)(unsafe.Pointer(p)).FeType = U8(0) + (*JsonEachCursor)(unsafe.Pointer(p)).FzJson = uintptr(0) + (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot = uintptr(0) +} + +// Destructor for a jsonEachCursor object +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ + var p uintptr = cur + jsonEachCursorReset(tls, p) + Xsqlite3_free(tls, cur) + return SQLITE_OK +} + +// Return TRUE if the jsonEachCursor object has been advanced off the end +// of the JSON object +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ + var p uintptr = cur + return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) +} + +// Advance the cursor to the next element for json_tree() +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ + var p uintptr = cur + if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { + if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { + (*JsonEachCursor)(unsafe.Pointer(p)).Fi++ + } + (*JsonEachCursor)(unsafe.Pointer(p)).Fi++ + (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid++ + if (*JsonEachCursor)(unsafe.Pointer(p)).Fi < (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd { + var iUp U32 = *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4)) + var pUp uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 + (*JsonEachCursor)(unsafe.Pointer(p)).FeType = (*JsonNode)(unsafe.Pointer(pUp)).FeType + if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { + + if iUp == (*JsonEachCursor)(unsafe.Pointer(p)).Fi-U32(1) { + *(*U32)(unsafe.Pointer(pUp + 8)) = U32(0) + } else { + *(*U32)(unsafe.Pointer(pUp + 8))++ + } + } + } + } else { + switch int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) { + case JSON_ARRAY: + { + *(*U32)(unsafe.Pointer(p + 16)) += jsonNodeSize(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16) + (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid++ + break + + } + fallthrough + case JSON_OBJECT: + { + *(*U32)(unsafe.Pointer(p + 16)) += U32(1) + jsonNodeSize(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi+U32(1))*16) + (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid++ + break + + } + fallthrough + default: + { + (*JsonEachCursor)(unsafe.Pointer(p)).Fi = (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd + break + + } + } + } + return SQLITE_OK +} + +// Append the name of the path for element i to pStr +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pNode uintptr + var pUp uintptr + var iUp U32 + if i == U32(0) { + jsonAppendChar(tls, pStr, uint8('$')) + return + } + iUp = *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr(i)*4)) + jsonEachComputePath(tls, p, pStr, iUp) + pNode = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(i)*16 + pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 + if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { + + jsonPrintf(tls, 30, pStr, ts+24638, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + } else { + + if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { + pNode -= 16 + } + + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24643, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + } +} + +// Return the value of a column +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ + bp := tls.Alloc(296) + defer tls.Free(296) + + var p uintptr = cur + var pThis uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16 + switch i { + case JEACH_KEY: + { + if (*JsonEachCursor)(unsafe.Pointer(p)).Fi == U32(0) { + break + } + if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { + jsonReturn(tls, pThis, ctx, uintptr(0)) + } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { + var iKey U32 + if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { + if (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid == U32(0) { + break + } + + iKey = *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(*(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4)))*16 + 8)) + } else { + iKey = (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid + } + Xsqlite3_result_int64(tls, ctx, Sqlite3_int64(iKey)) + } + break + + } + case JEACH_VALUE: + { + if int32((*JsonNode)(unsafe.Pointer(pThis)).FjnFlags)&JNODE_LABEL != 0 { + pThis += 16 + } + jsonReturn(tls, pThis, ctx, uintptr(0)) + break + + } + case JEACH_TYPE: + { + if int32((*JsonNode)(unsafe.Pointer(pThis)).FjnFlags)&JNODE_LABEL != 0 { + pThis += 16 + } + Xsqlite3_result_text(tls, ctx, jsonType[(*JsonNode)(unsafe.Pointer(pThis)).FeType], -1, uintptr(0)) + break + + } + case JEACH_ATOM: + { + if int32((*JsonNode)(unsafe.Pointer(pThis)).FjnFlags)&JNODE_LABEL != 0 { + pThis += 16 + } + if int32((*JsonNode)(unsafe.Pointer(pThis)).FeType) >= JSON_ARRAY { + break + } + jsonReturn(tls, pThis, ctx, uintptr(0)) + break + + } + case JEACH_ID: + { + Xsqlite3_result_int64(tls, ctx, + Sqlite3_int64((*JsonEachCursor)(unsafe.Pointer(p)).Fi)+Sqlite3_int64(libc.Bool32(int32((*JsonNode)(unsafe.Pointer(pThis)).FjnFlags)&JNODE_LABEL != 0))) + break + + } + case JEACH_PARENT: + { + if (*JsonEachCursor)(unsafe.Pointer(p)).Fi > (*JsonEachCursor)(unsafe.Pointer(p)).FiBegin && (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { + Xsqlite3_result_int64(tls, ctx, Sqlite3_int64(*(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4)))) + } + break + + } + case JEACH_FULLKEY: + { + // var x JsonString at bp+24, 136 + + jsonInit(tls, bp+24, ctx) + if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { + jsonEachComputePath(tls, p, bp+24, (*JsonEachCursor)(unsafe.Pointer(p)).Fi) + } else { + if (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot != 0 { + jsonAppendRaw(tls, bp+24, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, uint32(int32(libc.Xstrlen(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot)))) + } else { + jsonAppendChar(tls, bp+24, uint8('$')) + } + if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { + jsonPrintf(tls, 30, bp+24, ts+24638, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { + + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24643, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + } + } + jsonResult(tls, bp+24) + break + + } + case JEACH_PATH: + { + if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { + // var x JsonString at bp+160, 136 + + jsonInit(tls, bp+160, ctx) + jsonEachComputePath(tls, p, bp+160, *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4))) + jsonResult(tls, bp+160) + break + } + + } + fallthrough + default: + { + var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot + if zRoot == uintptr(0) { + zRoot = ts + 24649 /* "$" */ + } + Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) + break + + } + case JEACH_JSON: + { + + Xsqlite3_result_text(tls, ctx, (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FzJson, -1, uintptr(0)) + break + + } + } + return SQLITE_OK +} + +// Return the current rowid value +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ + var p uintptr = cur + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) + return SQLITE_OK +} + +// The query strategy is to look for an equality constraint on the json +// column. Without such a constraint, the table cannot operate. idxNum is +// 1 if the constraint is found, 3 if the constraint and zRoot are found, +// and 0 otherwise. +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var i int32 // Loop counter or computed array index + // var aIdx [2]int32 at bp, 8 + // Index of constraints for JSON and ROOT + var unusableMask int32 = 0 // Mask of unusable JSON and ROOT constraints + var idxMask int32 = 0 // Mask of usable == constraints JSON and ROOT + var pConstraint uintptr + + // This implementation assumes that JSON and ROOT are the last two + // columns in the table + + _ = tab + *(*int32)(unsafe.Pointer(bp)) = libc.AssignPtrInt32(bp+1*4, -1) + pConstraint = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + i = 0 +__1: + if !(i < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { + goto __3 + } + { + var iCol int32 + var iMask int32 + if (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn < JEACH_JSON { + goto __2 + } + iCol = (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn - JEACH_JSON + + iMask = int32(1) << iCol + if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { + unusableMask = unusableMask | iMask + } else if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { + *(*int32)(unsafe.Pointer(bp + uintptr(iCol)*4)) = i + idxMask = idxMask | iMask + } + + } + goto __2 +__2: + i++ + pConstraint += 12 + goto __1 + goto __3 +__3: + ; + if unusableMask & ^idxMask != 0 { + // If there are any unusable constraints on JSON or ROOT, then reject + // this entire plan + return SQLITE_CONSTRAINT + } + if *(*int32)(unsafe.Pointer(bp)) < 0 { + // No JSON input. Leave estimatedCost at the huge value that it was + // initialized to to discourage the query planner from selecting this + // plan. + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 0 + } else { + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1.0 + i = *(*int32)(unsafe.Pointer(bp)) + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) + if *(*int32)(unsafe.Pointer(bp + 1*4)) < 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 // Only JSON supplied. Plan 1 + } else { + i = *(*int32)(unsafe.Pointer(bp + 1*4)) + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 2 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 3 // Both JSON and ROOT are supplied. Plan 3 + } + } + return SQLITE_OK +} + +// Start a search on a new JSON string +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr = cur + var z uintptr + var zRoot uintptr = uintptr(0) + var n Sqlite3_int64 + + _ = idxStr + _ = argc + jsonEachCursorReset(tls, p) + if idxNum == 0 { + return SQLITE_OK + } + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if z == uintptr(0) { + return SQLITE_OK + } + n = Sqlite3_int64(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) + (*JsonEachCursor)(unsafe.Pointer(p)).FzJson = Xsqlite3_malloc64(tls, uint64(n+int64(1))) + if (*JsonEachCursor)(unsafe.Pointer(p)).FzJson == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson, z, Size_t(n)+uint64(1)) + if jsonParse(tls, p+48, uintptr(0), (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) != 0 { + var rc int32 = SQLITE_NOMEM + if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { + Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24359, 0) + if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { + rc = SQLITE_ERROR + } + } + jsonEachCursorReset(tls, p) + return rc + } else if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 && jsonParseFindParents(tls, p+48) != 0 { + jsonEachCursorReset(tls, p) + return SQLITE_NOMEM + } else { + var pNode uintptr = uintptr(0) + if idxNum == 3 { + *(*uintptr)(unsafe.Pointer(bp /* zErr */)) = uintptr(0) + zRoot = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if zRoot == uintptr(0) { + return SQLITE_OK + } + n = Sqlite3_int64(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) + (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot = Xsqlite3_malloc64(tls, uint64(n+int64(1))) + if (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, zRoot, Size_t(n)+uint64(1)) + if int32(*(*uint8)(unsafe.Pointer(zRoot))) != '$' { + *(*uintptr)(unsafe.Pointer(bp /* zErr */)) = zRoot + } else { + pNode = jsonLookupStep(tls, p+48, uint32(0), (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot+uintptr(1), uintptr(0), bp) + } + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = jsonPathSyntaxError(tls, *(*uintptr)(unsafe.Pointer(bp /* zErr */))) + jsonEachCursorReset(tls, p) + if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { + return SQLITE_ERROR + } + return SQLITE_NOMEM + } else if pNode == uintptr(0) { + return SQLITE_OK + } + } else { + pNode = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + } + (*JsonEachCursor)(unsafe.Pointer(p)).FiBegin = libc.AssignPtrUint32(p+16, U32(int32((int64(pNode)-int64((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode))/16))) + (*JsonEachCursor)(unsafe.Pointer(p)).FeType = (*JsonNode)(unsafe.Pointer(pNode)).FeType + if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) >= JSON_ARRAY { + + *(*U32)(unsafe.Pointer(pNode + 8)) = U32(0) + (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd = (*JsonEachCursor)(unsafe.Pointer(p)).Fi + (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) + if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { + (*JsonEachCursor)(unsafe.Pointer(p)).FeType = (*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(*(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4)))*16)).FeType + if (*JsonEachCursor)(unsafe.Pointer(p)).Fi > U32(0) && int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi-U32(1))*16)).FjnFlags)&JNODE_LABEL != 0 { + (*JsonEachCursor)(unsafe.Pointer(p)).Fi-- + } + } else { + (*JsonEachCursor)(unsafe.Pointer(p)).Fi++ + } + } else { + (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd = (*JsonEachCursor)(unsafe.Pointer(p)).Fi + U32(1) + } + } + return SQLITE_OK +} + +// The methods of the json_each virtual table +var jsonEachModule = Sqlite3_module{ // xCreate + FxConnect: 0, // xConnect + FxBestIndex: 0, // xBestIndex + FxDisconnect: 0, // xDestroy + FxOpen: 0, // xOpen - open a cursor + FxClose: 0, // xClose - close a cursor + FxFilter: 0, // xFilter - configure scan constraints + FxNext: 0, // xNext - advance a cursor + FxEof: 0, // xEof - check for end of scan + FxColumn: 0, // xColumn - read data + FxRowid: 0, // xShadowName +} /* sqlite3.c:195673:23 */ + +// The methods of the json_tree virtual table. +var jsonTreeModule = Sqlite3_module{ // xCreate + FxConnect: 0, // xConnect + FxBestIndex: 0, // xBestIndex + FxDisconnect: 0, // xDestroy + FxOpen: 0, // xOpen - open a cursor + FxClose: 0, // xClose - close a cursor + FxFilter: 0, // xFilter - configure scan constraints + FxNext: 0, // xNext - advance a cursor + FxEof: 0, // xEof - check for end of scan + FxColumn: 0, // xColumn - read data + FxRowid: 0, // xShadowName +} /* sqlite3.c:195701:23 */ + +// Register JSON functions. +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ + Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) +} + +var aJsonFunc = [19]FuncDef{ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24651}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24656}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24667}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24667}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24685}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24698}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24701}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24705}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24717}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24729}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24740}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24751}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24763}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24776}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24785}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24785}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24795}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24806}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24823}} /* sqlite3.c:195735:18 */ + +// Register the JSON table-valued functions +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ + var rc int32 = SQLITE_OK + var i uint32 + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { + FzName uintptr + FpModule uintptr + }{})) && rc == SQLITE_OK; i++ { + rc = Xsqlite3_create_module(tls, db, aMod[i].FzName, aMod[i].FpModule, uintptr(0)) + } + return rc +} + +var aMod = [2]struct { + FzName uintptr + FpModule uintptr +}{ + {FzName: ts + 24841 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24851 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core + +// If building separately, we will need some setup that is normally +// found in sqliteInt.h + +// #include +// #include +// #include +// #include + +// The following macro is used to suppress compiler warnings. + +type Rtree1 = struct { + Fbase Sqlite3_vtab + Fdb uintptr + FiNodeSize int32 + FnDim U8 + FnDim2 U8 + FeCoordType U8 + FnBytesPerCell U8 + FinWrTrans U8 + FnAux U8 + FnAuxNotNull U8 + F__ccgo_pad1 [1]byte + FiDepth int32 + FzDb uintptr + FzName uintptr + FnBusy U32 + F__ccgo_pad2 [4]byte + FnRowEst I64 + FnCursor U32 + FnNodeRef U32 + FzReadAuxSql uintptr + FpDeleted uintptr + FiReinsertHeight int32 + F__ccgo_pad3 [4]byte + FpNodeBlob uintptr + FpWriteNode uintptr + FpDeleteNode uintptr + FpReadRowid uintptr + FpWriteRowid uintptr + FpDeleteRowid uintptr + FpReadParent uintptr + FpWriteParent uintptr + FpDeleteParent uintptr + FpWriteAux uintptr + FaHash [97]uintptr +} /* sqlite3.c:195900:9 */ + +// In the SQLite core + +// If building separately, we will need some setup that is normally +// found in sqliteInt.h + +// #include +// #include +// #include +// #include + +// The following macro is used to suppress compiler warnings. + +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ +type RtreeCursor1 = struct { + Fbase Sqlite3_vtab_cursor + FatEOF U8 + FbPoint U8 + FbAuxValid U8 + F__ccgo_pad1 [1]byte + FiStrategy int32 + FnConstraint int32 + F__ccgo_pad2 [4]byte + FaConstraint uintptr + FnPointAlloc int32 + FnPoint int32 + FmxLevel int32 + F__ccgo_pad3 [4]byte + FaPoint uintptr + FpReadAux uintptr + FsPoint RtreeSearchPoint + FaNode [5]uintptr + FanQueue [41]U32 + F__ccgo_pad4 [4]byte +} /* sqlite3.c:195901:9 */ + +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ +type RtreeNode1 = struct { + FpParent uintptr + FiNode I64 + FnRef int32 + FisDirty int32 + FzData uintptr + FpNext uintptr +} /* sqlite3.c:195900:9 */ + +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ +type RtreeCell1 = struct { + FiRowid I64 + FaCoord [10]RtreeCoord +} /* sqlite3.c:195903:9 */ + +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ +type RtreeConstraint1 = struct { + FiCoord int32 + Fop int32 + Fu struct{ FrValue RtreeDValue } + FpInfo uintptr +} /* sqlite3.c:195901:9 */ + +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ +type RtreeMatchArg1 = struct { + FiSize U32 + F__ccgo_pad1 [4]byte + Fcb RtreeGeomCallback + FnParam int32 + F__ccgo_pad2 [4]byte + FapSqlParam uintptr + FaParam [1]RtreeDValue +} /* sqlite3.c:195905:9 */ + +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ +type RtreeGeomCallback1 = struct { + FxGeom uintptr + FxQueryFunc uintptr + FxDestructor uintptr + FpContext uintptr +} /* sqlite3.c:195905:9 */ + +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ + +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ +type RtreeSearchPoint1 = struct { + FrScore RtreeDValue + Fid Sqlite3_int64 + FiLevel U8 + FeWithin U8 + FiCell U8 + F__ccgo_pad1 [5]byte +} /* sqlite3.c:195901:9 */ + +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ + +// Possible values for Rtree.eCoordType: + +// If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will +// only deal with integer coordinates. No floating point operations +// will be done. +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ + +// What version of GCC is being used. 0 means GCC is not being used . +// Note that the GCC_VERSION macro will also be set correctly when using +// clang, since clang works hard to be gcc compatible. So the gcc +// optimizations will also work when compiling with clang. + +// The testcase() macro should already be defined in the amalgamation. If +// it is not, make it a no-op. + +// Make sure that the compiler intrinsics we desire are enabled when +// compiling with an appropriate version of MSVC unless prevented by +// the SQLITE_DISABLE_INTRINSIC define. + +// Macros to determine whether the machine is big or little endian, +// and whether or not that determination is run-time or compile-time. +// +// For best performance, an attempt is made to guess at the byte-order +// using C-preprocessor macros. If that is unsuccessful, or if +// -DSQLITE_RUNTIME_BYTEORDER=1 is set, then byte-order is determined +// at run-time. + +// What version of MSVC is being used. 0 means MSVC is not being used + +// Functions to deserialize a 16 bit integer, 32 bit real number and +// 64 bit integer. The deserialized value is returned. +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ + return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) +} + +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ + // p is always 4-byte aligned + *(*U32)(unsafe.Pointer(pCoord)) = U32(*(*U8)(unsafe.Pointer(p)))<<24 + U32(*(*U8)(unsafe.Pointer(p + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(p + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(p + 3)))<<0 +} + +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ + return I64(U64(*(*U8)(unsafe.Pointer(p)))<<56 + U64(*(*U8)(unsafe.Pointer(p + 1)))<<48 + U64(*(*U8)(unsafe.Pointer(p + 2)))<<40 + U64(*(*U8)(unsafe.Pointer(p + 3)))<<32 + U64(*(*U8)(unsafe.Pointer(p + 4)))<<24 + U64(*(*U8)(unsafe.Pointer(p + 5)))<<16 + U64(*(*U8)(unsafe.Pointer(p + 6)))<<8 + U64(*(*U8)(unsafe.Pointer(p + 7)))<<0) +} + +// Functions to serialize a 16 bit integer, 32 bit real number and +// 64 bit integer. The value returned is the number of bytes written +// to the argument buffer (always 2, 4 and 8 respectively). +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ + *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) + *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) +} + +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ + var i U32 + // p is always 4-byte aligned + + i = *(*U32)(unsafe.Pointer(pCoord /* .Fu */)) + *(*U8)(unsafe.Pointer(p)) = U8(i >> 24 & U32(0xFF)) + *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 16 & U32(0xFF)) + *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 8 & U32(0xFF)) + *(*U8)(unsafe.Pointer(p + 3)) = U8(i >> 0 & U32(0xFF)) + return 4 +} + +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ + *(*U8)(unsafe.Pointer(p)) = U8(i >> 56 & int64(0xFF)) + *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 48 & int64(0xFF)) + *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 40 & int64(0xFF)) + *(*U8)(unsafe.Pointer(p + 3)) = U8(i >> 32 & int64(0xFF)) + *(*U8)(unsafe.Pointer(p + 4)) = U8(i >> 24 & int64(0xFF)) + *(*U8)(unsafe.Pointer(p + 5)) = U8(i >> 16 & int64(0xFF)) + *(*U8)(unsafe.Pointer(p + 6)) = U8(i >> 8 & int64(0xFF)) + *(*U8)(unsafe.Pointer(p + 7)) = U8(i >> 0 & int64(0xFF)) + return 8 +} + +// Increment the reference count of node p. +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ + if p != 0 { + + (*RtreeNode)(unsafe.Pointer(p)).FnRef++ + } +} + +// Clear the content of node p (set all bytes to 0x00). +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ + libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) + (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 +} + +// Given a node number iNode, return the corresponding key to use +// in the Rtree.aHash table. +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ + return uint32(iNode) % uint32(HASHSIZE) +} + +// Search the node hash table for node iNode. If found, return a pointer +// to it. Otherwise, return 0. +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ + var p uintptr + for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { + } + return p +} + +// Add node pNode to the node hash table. +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ + var iHash int32 + + iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) + (*RtreeNode)(unsafe.Pointer(pNode)).FpNext = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(iHash)*8)) + *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(iHash)*8)) = pNode +} + +// Remove node pNode from the node hash table. +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ + var pp uintptr + if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { + pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 + for ; *(*uintptr)(unsafe.Pointer(pp)) != pNode; pp = *(*uintptr)(unsafe.Pointer(pp)) + 32 { + } + *(*uintptr)(unsafe.Pointer(pp)) = (*RtreeNode)(unsafe.Pointer(pNode)).FpNext + (*RtreeNode)(unsafe.Pointer(pNode)).FpNext = uintptr(0) + } +} + +// Allocate and return new r-tree node. Initially, (RtreeNode.iNode==0), +// indicating that node has not yet been assigned a node number. It is +// assigned a node number when nodeWrite() is called to write the +// node contents out to the database. +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ + var pNode uintptr + pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) + if pNode != 0 { + libc.Xmemset(tls, pNode, 0, uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) + (*RtreeNode)(unsafe.Pointer(pNode)).FzData = pNode + 1*40 + (*RtreeNode)(unsafe.Pointer(pNode)).FnRef = 1 + (*Rtree)(unsafe.Pointer(pRtree)).FnNodeRef++ + (*RtreeNode)(unsafe.Pointer(pNode)).FpParent = pParent + (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty = 1 + nodeReference(tls, pParent) + } + return pNode +} + +// Clear the Rtree.pNodeBlob object +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ + if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { + var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob + (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) + Xsqlite3_blob_close(tls, pBlob) + } +} + +// Obtain a reference to an r-tree node. +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var pNode uintptr = uintptr(0) + + // Check if the requested node is already in the hash table. If so, + // increase its reference count and return it. + if libc.AssignUintptr(&pNode, nodeHashLookup(tls, pRtree, iNode)) != uintptr(0) { + if pParent != 0 && pParent != (*RtreeNode)(unsafe.Pointer(pNode)).FpParent { + + return SQLITE_CORRUPT | int32(1)<<8 + } + (*RtreeNode)(unsafe.Pointer(pNode)).FnRef++ + *(*uintptr)(unsafe.Pointer(ppNode)) = pNode + return SQLITE_OK + } + + if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 { + var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob + (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) + rc = Xsqlite3_blob_reopen(tls, pBlob, iNode) + (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = pBlob + if rc != 0 { + nodeBlobReset(tls, pRtree) + if rc == SQLITE_NOMEM { + return SQLITE_NOMEM + } + } + } + if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24861, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + if zTab == uintptr(0) { + return SQLITE_NOMEM + } + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24869, iNode, 0, + pRtree+112) + Xsqlite3_free(tls, zTab) + } + if rc != 0 { + nodeBlobReset(tls, pRtree) + *(*uintptr)(unsafe.Pointer(ppNode)) = uintptr(0) + // If unable to open an sqlite3_blob on the desired row, that can only + // be because the shadow tables hold erroneous data. + if rc == SQLITE_ERROR { + rc = SQLITE_CORRUPT | int32(1)<<8 + + } + } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize == Xsqlite3_blob_bytes(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob) { + pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) + if !(pNode != 0) { + rc = SQLITE_NOMEM + } else { + (*RtreeNode)(unsafe.Pointer(pNode)).FpParent = pParent + (*RtreeNode)(unsafe.Pointer(pNode)).FzData = pNode + 1*40 + (*RtreeNode)(unsafe.Pointer(pNode)).FnRef = 1 + (*Rtree)(unsafe.Pointer(pRtree)).FnNodeRef++ + (*RtreeNode)(unsafe.Pointer(pNode)).FiNode = iNode + (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty = 0 + (*RtreeNode)(unsafe.Pointer(pNode)).FpNext = uintptr(0) + rc = Xsqlite3_blob_read(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob, (*RtreeNode)(unsafe.Pointer(pNode)).FzData, + (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize, 0) + } + } + + // If the root node was just loaded, set pRtree->iDepth to the height + // of the r-tree structure. A height of zero means all data is stored on + // the root node. A height of one means the children of the root node + // are the leaves, and so on. If the depth as specified on the root node + // is greater than RTREE_MAX_DEPTH, the r-tree structure must be corrupt. + if rc == SQLITE_OK && pNode != 0 && iNode == int64(1) { + (*Rtree)(unsafe.Pointer(pRtree)).FiDepth = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData) + if (*Rtree)(unsafe.Pointer(pRtree)).FiDepth > RTREE_MAX_DEPTH { + rc = SQLITE_CORRUPT | int32(1)<<8 + + } + } + + // If no error has occurred so far, check if the "number of entries" + // field on the node is too large. If so, set the return code to + // SQLITE_CORRUPT_VTAB. + if pNode != 0 && rc == SQLITE_OK { + if readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) > ((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-4)/int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) { + rc = SQLITE_CORRUPT | int32(1)<<8 + + } + } + + if rc == SQLITE_OK { + if pNode != uintptr(0) { + nodeReference(tls, pParent) + nodeHashInsert(tls, pRtree, pNode) + } else { + rc = SQLITE_CORRUPT | int32(1)<<8 + + } + *(*uintptr)(unsafe.Pointer(ppNode)) = pNode + } else { + if pNode != 0 { + (*Rtree)(unsafe.Pointer(pRtree)).FnNodeRef-- + Xsqlite3_free(tls, pNode) + } + *(*uintptr)(unsafe.Pointer(ppNode)) = uintptr(0) + } + + return rc +} + +// Overwrite cell iCell of node pNode with the contents of pCell. +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ + var ii int32 + var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) + p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) + for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii++ { + p += uintptr(writeCoord(tls, p, pCell+8+uintptr(ii)*4)) + } + (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty = 1 +} + +// Remove the cell with index iCell from node pNode. +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ + var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) + var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) + var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) + libc.Xmemmove(tls, pDst, pSrc, uint64(nByte)) + writeInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2, readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2)-1) + (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty = 1 +} + +// Insert the contents of cell pCell into node pNode. If the insert +// is successful, return SQLITE_OK. +// +// If there is not enough free space in pNode, return SQLITE_FULL. +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ + var nCell int32 // Current number of cells in pNode + var nMaxCell int32 // Maximum number of cells for pNode + + nMaxCell = ((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize - 4) / int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) + nCell = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + + if nCell < nMaxCell { + nodeOverwriteCell(tls, pRtree, pNode, pCell, nCell) + writeInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2, nCell+1) + (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty = 1 + } + + return libc.Bool32(nCell == nMaxCell) +} + +// If the node is dirty, write it out to the database. +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ + var rc int32 = SQLITE_OK + if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { + var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode + if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != 0 { + Xsqlite3_bind_int64(tls, p, 1, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) + } else { + Xsqlite3_bind_null(tls, p, 1) + } + Xsqlite3_bind_blob(tls, p, 2, (*RtreeNode)(unsafe.Pointer(pNode)).FzData, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize, uintptr(0)) + Xsqlite3_step(tls, p) + (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty = 0 + rc = Xsqlite3_reset(tls, p) + Xsqlite3_bind_null(tls, p, 2) + if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode == int64(0) && rc == SQLITE_OK { + (*RtreeNode)(unsafe.Pointer(pNode)).FiNode = Xsqlite3_last_insert_rowid(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb) + nodeHashInsert(tls, pRtree, pNode) + } + } + return rc +} + +// Release a reference to a node. If the node is dirty and the reference +// count drops to zero, the node data is written to the database. +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ + var rc int32 = SQLITE_OK + if pNode != 0 { + + (*RtreeNode)(unsafe.Pointer(pNode)).FnRef-- + if (*RtreeNode)(unsafe.Pointer(pNode)).FnRef == 0 { + (*Rtree)(unsafe.Pointer(pRtree)).FnNodeRef-- + if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode == int64(1) { + (*Rtree)(unsafe.Pointer(pRtree)).FiDepth = -1 + } + if (*RtreeNode)(unsafe.Pointer(pNode)).FpParent != 0 { + rc = nodeRelease(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pNode)).FpParent) + } + if rc == SQLITE_OK { + rc = nodeWrite(tls, pRtree, pNode) + } + nodeHashDelete(tls, pRtree, pNode) + Xsqlite3_free(tls, pNode) + } + } + return rc +} + +// Return the 64-bit integer value associated with cell iCell of +// node pNode. If pNode is a leaf node, this is a rowid. If it is +// an internal node, then the 64-bit integer is a child page number. +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ + + return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) +} + +// Return coordinate iCoord from cell iCell in node pNode. +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ + readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) +} + +// Deserialize cell iCell of node pNode. Populate the structure pointed +// to by pCell with the results. +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ + var pData uintptr + var pCoord uintptr + var ii int32 = 0 + (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid = nodeGetRowid(tls, pRtree, pNode, iCell) + pData = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) + pCoord = pCell + 8 /* &.aCoord */ + for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { + readCoord(tls, pData, pCoord+uintptr(ii)*4) + readCoord(tls, pData+uintptr(4), pCoord+uintptr(ii+1)*4) + pData += uintptr(8) + ii = ii + 2 + } +} + +// Rtree virtual table module xCreate method. +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ + return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) +} + +// Rtree virtual table module xConnect method. +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ + return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) +} + +// Increment the r-tree reference count. +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ + (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ +} + +// Decrement the r-tree reference count. When the reference count reaches +// zero the structure is deleted. +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ + (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- + if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { + (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) + + nodeBlobReset(tls, pRtree) + + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteNode) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteRowid) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadParent) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteParent) + Xsqlite3_finalize(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteAux) + Xsqlite3_free(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql) + Xsqlite3_free(tls, pRtree) + } +} + +// Rtree virtual table module xDisconnect method. +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ + rtreeRelease(tls, pVtab) + return SQLITE_OK +} + +// Rtree virtual table module xDestroy method. +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var pRtree uintptr = pVtab + var rc int32 + var zCreate uintptr = Xsqlite3_mprintf(tls, + + ts+24874, + libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, + (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, + (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + if !(zCreate != 0) { + rc = SQLITE_NOMEM + } else { + nodeBlobReset(tls, pRtree) + rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zCreate, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_free(tls, zCreate) + } + if rc == SQLITE_OK { + rtreeRelease(tls, pRtree) + } + + return rc +} + +// Rtree virtual table module xOpen method. +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ + var rc int32 = SQLITE_NOMEM + var pRtree uintptr = pVTab + var pCsr uintptr + + pCsr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(RtreeCursor{}))) + if pCsr != 0 { + libc.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(RtreeCursor{}))) + (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab = pVTab + rc = SQLITE_OK + (*Rtree)(unsafe.Pointer(pRtree)).FnCursor++ + } + *(*uintptr)(unsafe.Pointer(ppCursor)) = pCsr + + return rc +} + +// Reset a cursor back to its initial state. +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ + var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var ii int32 + var pStmt uintptr + if (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint != 0 { + var i int32 // Used to iterate through constraint array + for i = 0; i < (*RtreeCursor)(unsafe.Pointer(pCsr)).FnConstraint; i++ { + var pInfo uintptr = (*RtreeConstraint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint + uintptr(i)*24)).FpInfo + if pInfo != 0 { + if (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FxDelUser != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FxDelUser})).f(tls, (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FpUser) + } + Xsqlite3_free(tls, pInfo) + } + } + Xsqlite3_free(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint) + (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint = uintptr(0) + } + for ii = 0; ii < RTREE_CACHE_SZ; ii++ { + nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(pCsr + 88 + uintptr(ii)*8))) + } + Xsqlite3_free(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FaPoint) + pStmt = (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux + libc.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(RtreeCursor{}))) + (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab = pRtree + (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux = pStmt + +} + +// Rtree virtual table module xClose method. +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ + var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab + var pCsr uintptr = cur + + resetCursor(tls, pCsr) + Xsqlite3_finalize(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux) + Xsqlite3_free(tls, pCsr) + (*Rtree)(unsafe.Pointer(pRtree)).FnCursor-- + nodeBlobReset(tls, pRtree) + return SQLITE_OK +} + +// Rtree virtual table module xEof method. +// +// Return non-zero if the cursor does not currently point to a valid +// record (i.e if the scan has finished), or zero otherwise. +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ + var pCsr uintptr = cur + return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) +} + +// Convert raw bits from the on-disk RTree record into a coordinate value. +// The on-disk format is big-endian and needs to be converted for little- +// endian platforms. The on-disk record stores integer coordinates if +// eInt is true and it stores 32-bit floating point records if eInt is +// false. a[] is the four bytes of the on-disk record to be decoded. +// Store the results in "r". +// +// There are five versions of this macro. The last one is generic. The +// other four are various architectures-specific optimizations. + +// Check the RTree node or entry given by pCellData and p against the MATCH +// constraint pConstraint. +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var pInfo uintptr = (*RtreeConstraint)(unsafe.Pointer(pConstraint)).FpInfo // Callback info + var nCoord int32 = (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FnCoord // No. of coordinates + var rc int32 // Callback return code + // var c RtreeCoord at bp, 4 + // Translator union + // var aCoord [10]Sqlite3_rtree_dbl at bp+8, 80 + // Decoded coordinates + + if (*RtreeConstraint)(unsafe.Pointer(pConstraint)).Fop == RTREE_QUERY && int32((*RtreeSearchPoint)(unsafe.Pointer(pSearch)).FiLevel) == 1 { + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FiRowid = readInt64(tls, pCellData) + } + pCellData += uintptr(8) + if eInt == 0 { + switch nCoord { + case 10: + readCoord(tls, pCellData+uintptr(36), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 9*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(32), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 8*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + fallthrough + case 8: + readCoord(tls, pCellData+uintptr(28), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 7*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(24), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 6*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + fallthrough + case 6: + readCoord(tls, pCellData+uintptr(20), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 5*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(16), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 4*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + fallthrough + case 4: + readCoord(tls, pCellData+uintptr(12), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 3*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(8), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 2*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + fallthrough + default: + readCoord(tls, pCellData+uintptr(4), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 1*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData, bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + } + } else { + switch nCoord { + case 10: + readCoord(tls, pCellData+uintptr(36), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 9*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(32), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 8*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + fallthrough + case 8: + readCoord(tls, pCellData+uintptr(28), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 7*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(24), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 6*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + fallthrough + case 6: + readCoord(tls, pCellData+uintptr(20), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 5*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(16), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 4*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + fallthrough + case 4: + readCoord(tls, pCellData+uintptr(12), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 3*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(8), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 2*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + fallthrough + default: + readCoord(tls, pCellData+uintptr(4), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 + 1*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData, bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + } + } + if (*RtreeConstraint)(unsafe.Pointer(pConstraint)).Fop == RTREE_MATCH { + *(*int32)(unsafe.Pointer(bp + 88 /* eWithin */)) = 0 + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pConstraint + 8 /* &.u */))})).f(tls, pInfo, + nCoord, bp+8, bp+88) + if *(*int32)(unsafe.Pointer(bp + 88)) == 0 { + *(*int32)(unsafe.Pointer(peWithin)) = NOT_WITHIN + } + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(prScore)) = 0.0 + } else { + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FaCoord = bp + 8 /* &aCoord[0] */ + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FiLevel = int32((*RtreeSearchPoint)(unsafe.Pointer(pSearch)).FiLevel) - 1 + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FrScore = libc.AssignPtrFloat64(pInfo+80, (*RtreeSearchPoint)(unsafe.Pointer(pSearch)).FrScore) + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FeWithin = libc.AssignPtrInt32(pInfo+88, int32((*RtreeSearchPoint)(unsafe.Pointer(pSearch)).FeWithin)) + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pConstraint + 8 /* &.u */))})).f(tls, pInfo) + if (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FeWithin < *(*int32)(unsafe.Pointer(peWithin)) { + *(*int32)(unsafe.Pointer(peWithin)) = (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FeWithin + } + if (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FrScore < *(*Sqlite3_rtree_dbl)(unsafe.Pointer(prScore)) || *(*Sqlite3_rtree_dbl)(unsafe.Pointer(prScore)) < 0.0 { + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(prScore)) = (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FrScore + } + } + return rc +} + +// Check the internal RTree node given by pCellData against constraint p. +// If this constraint cannot be satisfied by any child within the node, +// set *peWithin to NOT_WITHIN. +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var val Sqlite3_rtree_dbl // Coordinate value convert to a double + + // p->iCoord might point to either a lower or upper bound coordinate + // in a coordinate pair. But make pCellData point to the lower bound. + pCellData += uintptr(8 + 4*((*RtreeConstraint)(unsafe.Pointer(p)).FiCoord&0xfe)) + + // 4-byte aligned + switch (*RtreeConstraint)(unsafe.Pointer(p)).Fop { + case RTREE_TRUE: + return // Always satisfied + case RTREE_FALSE: + break // Never satisfied + case RTREE_EQ: + { + // var c RtreeCoord at bp, 4 + /* Coordinate decoded */ + *(*U32)(unsafe.Pointer(bp)) = U32(*(*U8)(unsafe.Pointer(pCellData)))<<24 + U32(*(*U8)(unsafe.Pointer(pCellData + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(pCellData + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(pCellData + 3))) + if eInt != 0 { + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + } else { + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + } + } + + // val now holds the lower bound of the coordinate pair + if *(*RtreeDValue)(unsafe.Pointer(p + 8)) >= val { + pCellData += uintptr(4) + { + // var c RtreeCoord at bp+4, 4 + /* Coordinate decoded */ + *(*U32)(unsafe.Pointer(bp + 4)) = U32(*(*U8)(unsafe.Pointer(pCellData)))<<24 + U32(*(*U8)(unsafe.Pointer(pCellData + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(pCellData + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(pCellData + 3))) + if eInt != 0 { + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 4))) + } else { + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 4))) + } + } + + // val now holds the upper bound of the coordinate pair + if *(*RtreeDValue)(unsafe.Pointer(p + 8)) <= val { + return + } + } + break + case RTREE_LE: + fallthrough + case RTREE_LT: + { + // var c RtreeCoord at bp+8, 4 + /* Coordinate decoded */ + *(*U32)(unsafe.Pointer(bp + 8)) = U32(*(*U8)(unsafe.Pointer(pCellData)))<<24 + U32(*(*U8)(unsafe.Pointer(pCellData + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(pCellData + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(pCellData + 3))) + if eInt != 0 { + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 8))) + } else { + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 8))) + } + } + + // val now holds the lower bound of the coordinate pair + if *(*RtreeDValue)(unsafe.Pointer(p + 8)) >= val { + return + } + break + + default: + pCellData += uintptr(4) + { + // var c RtreeCoord at bp+12, 4 + /* Coordinate decoded */ + *(*U32)(unsafe.Pointer(bp + 12)) = U32(*(*U8)(unsafe.Pointer(pCellData)))<<24 + U32(*(*U8)(unsafe.Pointer(pCellData + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(pCellData + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(pCellData + 3))) + if eInt != 0 { + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 12))) + } else { + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 12))) + } + } + + // val now holds the upper bound of the coordinate pair + if *(*RtreeDValue)(unsafe.Pointer(p + 8)) <= val { + return + } + break + } + *(*int32)(unsafe.Pointer(peWithin)) = NOT_WITHIN +} + +// Check the leaf RTree cell given by pCellData against constraint p. +// If this constraint is not satisfied, set *peWithin to NOT_WITHIN. +// If the constraint is satisfied, leave *peWithin unchanged. +// +// The constraint is of the form: xN op $val +// +// The op is given by p->op. The xN is p->iCoord-th coordinate in +// pCellData. $val is given by p->u.rValue. +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var xN RtreeDValue // Coordinate value converted to a double + + pCellData += uintptr(8 + (*RtreeConstraint)(unsafe.Pointer(p)).FiCoord*4) + /* 4-byte aligned */ + { + // var c RtreeCoord at bp, 4 + /* Coordinate decoded */ + *(*U32)(unsafe.Pointer(bp)) = U32(*(*U8)(unsafe.Pointer(pCellData)))<<24 + U32(*(*U8)(unsafe.Pointer(pCellData + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(pCellData + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(pCellData + 3))) + if eInt != 0 { + xN = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + } else { + xN = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + } + } + + switch (*RtreeConstraint)(unsafe.Pointer(p)).Fop { + case RTREE_TRUE: + return // Always satisfied + case RTREE_FALSE: + break // Never satisfied + case RTREE_LE: + if xN <= *(*RtreeDValue)(unsafe.Pointer(p + 8)) { + return + } + break + case RTREE_LT: + if xN < *(*RtreeDValue)(unsafe.Pointer(p + 8)) { + return + } + break + case RTREE_GE: + if xN >= *(*RtreeDValue)(unsafe.Pointer(p + 8)) { + return + } + break + case RTREE_GT: + if xN > *(*RtreeDValue)(unsafe.Pointer(p + 8)) { + return + } + break + default: + if xN == *(*RtreeDValue)(unsafe.Pointer(p + 8)) { + return + } + break + } + *(*int32)(unsafe.Pointer(peWithin)) = NOT_WITHIN +} + +// One of the cells in node pNode is guaranteed to have a 64-bit +// integer value equal to iRowid. Return the index of this cell. +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ + var ii int32 + var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + + for ii = 0; ii < nCell; ii++ { + if nodeGetRowid(tls, pRtree, pNode, ii) == iRowid { + *(*int32)(unsafe.Pointer(piIndex)) = ii + return SQLITE_OK + } + } + + return SQLITE_CORRUPT | int32(1)<<8 +} + +// Return the index of the cell containing a pointer to node pNode +// in its parent. If pNode is the root node, return -1. +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ + var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent + if pParent != 0 { + return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) + } else { + *(*int32)(unsafe.Pointer(piIndex)) = -1 + return SQLITE_OK + } + return int32(0) +} + +// Compare two search points. Return negative, zero, or positive if the first +// is less than, equal to, or greater than the second. +// +// The rScore is the primary key. Smaller rScore values come first. +// If the rScore is a tie, then use iLevel as the tie breaker with smaller +// iLevel values coming first. In this way, if rScore is the same for all +// SearchPoints, then iLevel becomes the deciding factor and the result +// is a depth-first search, which is the desired default behavior. +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ + if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { + return -1 + } + if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore > (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { + return +1 + } + if int32((*RtreeSearchPoint)(unsafe.Pointer(pA)).FiLevel) < int32((*RtreeSearchPoint)(unsafe.Pointer(pB)).FiLevel) { + return -1 + } + if int32((*RtreeSearchPoint)(unsafe.Pointer(pA)).FiLevel) > int32((*RtreeSearchPoint)(unsafe.Pointer(pB)).FiLevel) { + return +1 + } + return 0 +} + +// Interchange two search points in a cursor. +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ + var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) + + *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) + *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) = t + i++ + j++ + if i < RTREE_CACHE_SZ { + if j >= RTREE_CACHE_SZ { + nodeRelease(tls, (*RtreeCursor)(unsafe.Pointer(p)).Fbase.FpVtab, *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(i)*8)) = uintptr(0) + } else { + var pTemp uintptr = *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(i)*8)) + *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(j)*8)) + *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(j)*8)) = pTemp + } + } +} + +// Return the search point with the lowest current score. +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ + if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { + return pCur + 64 + } + if (*RtreeCursor)(unsafe.Pointer(pCur)).FnPoint != 0 { + return (*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint + } + return uintptr(0) +} + +// Get the RtreeNode for the search point with the lowest score. +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ + var id Sqlite3_int64 + var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) + + if *(*uintptr)(unsafe.Pointer(pCur + 88 + uintptr(ii)*8)) == uintptr(0) { + + if ii != 0 { + id = (*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint)).Fid + } else { + id = (*RtreeCursor)(unsafe.Pointer(pCur)).FsPoint.Fid + } + *(*int32)(unsafe.Pointer(pRC)) = nodeAcquire(tls, (*RtreeCursor)(unsafe.Pointer(pCur)).Fbase.FpVtab, id, uintptr(0), pCur+88+uintptr(ii)*8) + } + return *(*uintptr)(unsafe.Pointer(pCur + 88 + uintptr(ii)*8)) +} + +// Push a new element onto the priority queue +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ + var i int32 + var j int32 + var pNew uintptr + if (*RtreeCursor)(unsafe.Pointer(pCur)).FnPoint >= (*RtreeCursor)(unsafe.Pointer(pCur)).FnPointAlloc { + var nNew int32 = (*RtreeCursor)(unsafe.Pointer(pCur)).FnPointAlloc*2 + 8 + pNew = Xsqlite3_realloc64(tls, (*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint, uint64(uint64(nNew)*uint64(unsafe.Sizeof(RtreeSearchPoint{})))) + if pNew == uintptr(0) { + return uintptr(0) + } + (*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint = pNew + (*RtreeCursor)(unsafe.Pointer(pCur)).FnPointAlloc = nNew + } + i = libc.PostIncInt32(&(*RtreeCursor)(unsafe.Pointer(pCur)).FnPoint, 1) + pNew = (*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint + uintptr(i)*24 + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).FrScore = rScore + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).FiLevel = iLevel + + for i > 0 { + var pParent uintptr + j = (i - 1) / 2 + pParent = (*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint + uintptr(j)*24 + if rtreeSearchPointCompare(tls, pNew, pParent) >= 0 { + break + } + rtreeSearchPointSwap(tls, pCur, j, i) + i = j + pNew = pParent + } + return pNew +} + +// Allocate a new RtreeSearchPoint and return a pointer to it. Return +// NULL if malloc fails. +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ + var pNew uintptr + var pFirst uintptr + pFirst = rtreeSearchPointFirst(tls, pCur) + *(*U32)(unsafe.Pointer(pCur + 128 + uintptr(iLevel)*4))++ + if pFirst == uintptr(0) || + (*RtreeSearchPoint)(unsafe.Pointer(pFirst)).FrScore > rScore || + (*RtreeSearchPoint)(unsafe.Pointer(pFirst)).FrScore == rScore && int32((*RtreeSearchPoint)(unsafe.Pointer(pFirst)).FiLevel) > int32(iLevel) { + if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { + var ii int32 + pNew = rtreeEnqueue(tls, pCur, rScore, iLevel) + if pNew == uintptr(0) { + return uintptr(0) + } + ii = int32((int64(pNew)-int64((*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint))/24) + 1 + + if ii < RTREE_CACHE_SZ { + + *(*uintptr)(unsafe.Pointer(pCur + 88 + uintptr(ii)*8)) = *(*uintptr)(unsafe.Pointer(pCur + 88)) + } else { + nodeRelease(tls, (*RtreeCursor)(unsafe.Pointer(pCur)).Fbase.FpVtab, *(*uintptr)(unsafe.Pointer(pCur + 88))) + } + *(*uintptr)(unsafe.Pointer(pCur + 88)) = uintptr(0) + *(*RtreeSearchPoint)(unsafe.Pointer(pNew)) = (*RtreeCursor)(unsafe.Pointer(pCur)).FsPoint + } + (*RtreeCursor)(unsafe.Pointer(pCur)).FsPoint.FrScore = rScore + (*RtreeCursor)(unsafe.Pointer(pCur)).FsPoint.FiLevel = iLevel + (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint = U8(1) + return pCur + 64 + } else { + return rtreeEnqueue(tls, pCur, rScore, iLevel) + } + return uintptr(0) +} + +// Remove the search point with the lowest current score. +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ + var i int32 + var j int32 + var k int32 + var n int32 + i = 1 - int32((*RtreeCursor)(unsafe.Pointer(p)).FbPoint) + + if *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(i)*8)) != 0 { + nodeRelease(tls, (*RtreeCursor)(unsafe.Pointer(p)).Fbase.FpVtab, *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(i)*8)) = uintptr(0) + } + if (*RtreeCursor)(unsafe.Pointer(p)).FbPoint != 0 { + *(*U32)(unsafe.Pointer(p + 128 + uintptr((*RtreeCursor)(unsafe.Pointer(p)).FsPoint.FiLevel)*4))-- + (*RtreeCursor)(unsafe.Pointer(p)).FbPoint = U8(0) + } else if (*RtreeCursor)(unsafe.Pointer(p)).FnPoint != 0 { + *(*U32)(unsafe.Pointer(p + 128 + uintptr((*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint)).FiLevel)*4))-- + n = libc.PreDecInt32(&(*RtreeCursor)(unsafe.Pointer(p)).FnPoint, 1) + *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(n)*24)) + if n < RTREE_CACHE_SZ-1 { + *(*uintptr)(unsafe.Pointer(p + 88 + 1*8)) = *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(n+1)*8)) + *(*uintptr)(unsafe.Pointer(p + 88 + uintptr(n+1)*8)) = uintptr(0) + } + i = 0 + for libc.AssignInt32(&j, i*2+1) < n { + k = j + 1 + if k < n && rtreeSearchPointCompare(tls, (*RtreeCursor)(unsafe.Pointer(p)).FaPoint+uintptr(k)*24, (*RtreeCursor)(unsafe.Pointer(p)).FaPoint+uintptr(j)*24) < 0 { + if rtreeSearchPointCompare(tls, (*RtreeCursor)(unsafe.Pointer(p)).FaPoint+uintptr(k)*24, (*RtreeCursor)(unsafe.Pointer(p)).FaPoint+uintptr(i)*24) < 0 { + rtreeSearchPointSwap(tls, p, i, k) + i = k + } else { + break + } + } else { + if rtreeSearchPointCompare(tls, (*RtreeCursor)(unsafe.Pointer(p)).FaPoint+uintptr(j)*24, (*RtreeCursor)(unsafe.Pointer(p)).FaPoint+uintptr(i)*24) < 0 { + rtreeSearchPointSwap(tls, p, i, j) + i = j + } else { + break + } + } + } + } +} + +// Continue the search on cursor pCur until the front of the queue +// contains an entry suitable for returning as a result-set row, +// or until the RtreeSearchPoint queue is empty, indicating that the +// query has completed. +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var p uintptr + var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCur)).Fbase.FpVtab + var pNode uintptr + // var eWithin int32 at bp+16, 4 + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + var nCell int32 + var nConstraint int32 = (*RtreeCursor)(unsafe.Pointer(pCur)).FnConstraint + var ii int32 + var eInt int32 + var x RtreeSearchPoint + + eInt = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) + for libc.AssignUintptr(&p, rtreeSearchPointFirst(tls, pCur)) != uintptr(0) && int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiLevel) > 0 { + var pCellData uintptr + pNode = rtreeNodeOfFirstSearchPoint(tls, pCur, bp) + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + nCell = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + + pCellData = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell)) + for int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell) < nCell { + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 /* rScore */)) = Sqlite3_rtree_dbl(-1) + *(*int32)(unsafe.Pointer(bp + 16 /* eWithin */)) = FULLY_WITHIN + for ii = 0; ii < nConstraint; ii++ { + var pConstraint uintptr = (*RtreeCursor)(unsafe.Pointer(pCur)).FaConstraint + uintptr(ii)*24 + if (*RtreeConstraint)(unsafe.Pointer(pConstraint)).Fop >= RTREE_MATCH { + *(*int32)(unsafe.Pointer(bp /* rc */)) = rtreeCallbackConstraint(tls, pConstraint, eInt, pCellData, p, + bp+8, bp+16) + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } else if int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiLevel) == 1 { + rtreeLeafConstraint(tls, pConstraint, eInt, pCellData, bp+16) + } else { + rtreeNonleafConstraint(tls, pConstraint, eInt, pCellData, bp+16) + } + if *(*int32)(unsafe.Pointer(bp + 16)) == NOT_WITHIN { + (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell++ + pCellData += uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) + break + } + } + if *(*int32)(unsafe.Pointer(bp + 16)) == NOT_WITHIN { + continue + } + (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell++ + x.FiLevel = U8(int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiLevel) - 1) + if x.FiLevel != 0 { + x.Fid = readInt64(tls, pCellData) + for ii = 0; ii < (*RtreeCursor)(unsafe.Pointer(pCur)).FnPoint; ii++ { + if (*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(pCur)).FaPoint+uintptr(ii)*24)).Fid == x.Fid { + + return SQLITE_CORRUPT | int32(1)<<8 + } + } + x.FiCell = U8(0) + } else { + x.Fid = (*RtreeSearchPoint)(unsafe.Pointer(p)).Fid + x.FiCell = U8(int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell) - 1) + } + if int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell) >= nCell { + + rtreeSearchPointPop(tls, pCur) + } + if *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8)) < 0.0 { + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 /* rScore */)) = 0.0 + } + p = rtreeSearchPointNew(tls, pCur, *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 8 /* rScore */)), x.FiLevel) + if p == uintptr(0) { + return SQLITE_NOMEM + } + (*RtreeSearchPoint)(unsafe.Pointer(p)).FeWithin = U8(*(*int32)(unsafe.Pointer(bp + 16 /* eWithin */))) + (*RtreeSearchPoint)(unsafe.Pointer(p)).Fid = x.Fid + (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell = x.FiCell + + break + } + if int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell) >= nCell { + + rtreeSearchPointPop(tls, pCur) + } + } + (*RtreeCursor)(unsafe.Pointer(pCur)).FatEOF = U8(libc.Bool32(p == uintptr(0))) + return SQLITE_OK +} + +// Rtree virtual table module xNext method. +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ + var pCsr uintptr = pVtabCursor + var rc int32 = SQLITE_OK + + // Move to the next entry that matches the configured constraints. + + if (*RtreeCursor)(unsafe.Pointer(pCsr)).FbAuxValid != 0 { + (*RtreeCursor)(unsafe.Pointer(pCsr)).FbAuxValid = U8(0) + Xsqlite3_reset(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux) + } + rtreeSearchPointPop(tls, pCsr) + rc = rtreeStepToLeaf(tls, pCsr) + return rc +} + +// Rtree virtual table module xRowid method. +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pCsr uintptr = pVtabCursor + var p uintptr = rtreeSearchPointFirst(tls, pCsr) + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && p != 0 { + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = nodeGetRowid(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell)) + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Rtree virtual table module xColumn method. +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab + var pCsr uintptr = cur + var p uintptr = rtreeSearchPointFirst(tls, pCsr) + // var c RtreeCoord at bp+4, 4 + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp) + + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + if p == uintptr(0) { + return SQLITE_OK + } + if i == 0 { + Xsqlite3_result_int64(tls, ctx, nodeGetRowid(tls, pRtree, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell))) + } else if i <= int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { + nodeGetCoord(tls, pRtree, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell), i-1, bp+4) + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + Xsqlite3_result_double(tls, ctx, float64(*(*RtreeValue)(unsafe.Pointer(bp + 4)))) + } else { + + Xsqlite3_result_int(tls, ctx, *(*int32)(unsafe.Pointer(bp + 4))) + } + } else { + if !(int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FbAuxValid) != 0) { + if (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux == uintptr(0) { + *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3_prepare_v3(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql, -1, uint32(0), + pCsr+56, uintptr(0)) + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } + Xsqlite3_bind_int64(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux, 1, + nodeGetRowid(tls, pRtree, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell))) + *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3_step(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_ROW { + (*RtreeCursor)(unsafe.Pointer(pCsr)).FbAuxValid = U8(1) + } else { + Xsqlite3_reset(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_DONE { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } + Xsqlite3_result_value(tls, ctx, + Xsqlite3_column_value(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux, i-int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2)+1)) + } + return SQLITE_OK +} + +// Use nodeAcquire() to obtain the leaf node containing the record with +// rowid iRowid. If successful, set *ppLeaf to point to the node and +// return SQLITE_OK. If there is no such record in the table, set +// *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf +// to zero and return an SQLite error code. +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ + var rc int32 + *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) + if Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) == SQLITE_ROW { + var iNode I64 = Xsqlite3_column_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 0) + if piNode != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(piNode)) = iNode + } + rc = nodeAcquire(tls, pRtree, iNode, uintptr(0), ppLeaf) + Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) + } else { + rc = Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) + } + return rc +} + +// This function is called to configure the RtreeConstraint object passed +// as the second argument for a MATCH constraint. The value passed as the +// first argument to this function is the right-hand operand to the MATCH +// operator. +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ + var pBlob uintptr + var pSrc uintptr // BLOB returned by geometry function + var pInfo uintptr // Callback information + + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24956) + if pSrc == uintptr(0) { + return SQLITE_ERROR + } + pInfo = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Sqlite3_rtree_query_info{}))+uint64((*RtreeMatchArg)(unsafe.Pointer(pSrc)).FiSize))) + if !(pInfo != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pInfo, 0, uint64(unsafe.Sizeof(Sqlite3_rtree_query_info{}))) + pBlob = pInfo + 1*112 + libc.Xmemcpy(tls, pBlob, pSrc, uint64((*RtreeMatchArg)(unsafe.Pointer(pSrc)).FiSize)) + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FpContext = (*RtreeMatchArg)(unsafe.Pointer(pBlob)).Fcb.FpContext + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FnParam = (*RtreeMatchArg)(unsafe.Pointer(pBlob)).FnParam + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FaParam = pBlob + 56 /* &.aParam */ + (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FapSqlParam = (*RtreeMatchArg)(unsafe.Pointer(pBlob)).FapSqlParam + + if (*RtreeMatchArg)(unsafe.Pointer(pBlob)).Fcb.FxGeom != 0 { + *(*uintptr)(unsafe.Pointer(pCons + 8)) = (*RtreeMatchArg)(unsafe.Pointer(pBlob)).Fcb.FxGeom + } else { + (*RtreeConstraint)(unsafe.Pointer(pCons)).Fop = RTREE_QUERY + *(*uintptr)(unsafe.Pointer(pCons + 8)) = (*RtreeMatchArg)(unsafe.Pointer(pBlob)).Fcb.FxQueryFunc + } + (*RtreeConstraint)(unsafe.Pointer(pCons)).FpInfo = pInfo + return SQLITE_OK +} + +// Rtree virtual table module xFilter method. +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab + var pCsr uintptr = pVtabCursor + *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) = uintptr(0) + var ii int32 + var rc int32 = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 16 /* iCell */)) = 0 + + rtreeReference(tls, pRtree) + + // Reset the cursor to the same state as rtreeOpen() leaves it in. + resetCursor(tls, pCsr) + + (*RtreeCursor)(unsafe.Pointer(pCsr)).FiStrategy = idxNum + if idxNum == 1 { + // Special case - lookup by rowid. + // var pLeaf uintptr at bp, 8 + // Leaf on which the required cell resides + var p uintptr // Search point for the leaf + var iRowid I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + *(*I64)(unsafe.Pointer(bp + 8 /* iNode */)) = int64(0) + var eType int32 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + if eType == SQLITE_INTEGER || + eType == SQLITE_FLOAT && Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) == float64(iRowid) { + rc = findLeafNode(tls, pRtree, iRowid, bp, bp+8) + } else { + rc = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)) = uintptr(0) + } + if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) { + p = rtreeSearchPointNew(tls, pCsr, 0.0, uint8(0)) + // Always returns pCsr->sPoint + *(*uintptr)(unsafe.Pointer(pCsr + 88)) = *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)) + (*RtreeSearchPoint)(unsafe.Pointer(p)).Fid = *(*I64)(unsafe.Pointer(bp + 8 /* iNode */)) + (*RtreeSearchPoint)(unsafe.Pointer(p)).FeWithin = U8(PARTLY_WITHIN) + rc = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)), iRowid, bp+16) + (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell = U8(*(*int32)(unsafe.Pointer(bp + 16 /* iCell */))) + + } else { + (*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF = U8(1) + } + } else { + // Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array + // with the configured constraints. + rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp+24) + if rc == SQLITE_OK && argc > 0 { + (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeConstraint{}))*uint64(argc))) + (*RtreeCursor)(unsafe.Pointer(pCsr)).FnConstraint = argc + if !(int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint) != 0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint, 0, uint64(unsafe.Sizeof(RtreeConstraint{}))*uint64(argc)) + libc.Xmemset(tls, pCsr+128, 0, uint64(unsafe.Sizeof(U32(0)))*uint64((*Rtree)(unsafe.Pointer(pRtree)).FiDepth+1)) + + for ii = 0; ii < argc; ii++ { + var p uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint + uintptr(ii)*24 + var eType int32 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8))) + (*RtreeConstraint)(unsafe.Pointer(p)).Fop = int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(ii*2)))) + (*RtreeConstraint)(unsafe.Pointer(p)).FiCoord = int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(ii*2+1)))) - '0' + if (*RtreeConstraint)(unsafe.Pointer(p)).Fop >= RTREE_MATCH { + // A MATCH operator. The right-hand-side must be a blob that + // can be cast into an RtreeMatchArg object. One created using + // an sqlite3_rtree_geometry_callback() SQL user function. + rc = deserializeGeometry(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)), p) + if rc != SQLITE_OK { + break + } + (*Sqlite3_rtree_query_info)(unsafe.Pointer((*RtreeConstraint)(unsafe.Pointer(p)).FpInfo)).FnCoord = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) + (*Sqlite3_rtree_query_info)(unsafe.Pointer((*RtreeConstraint)(unsafe.Pointer(p)).FpInfo)).FanQueue = pCsr + 128 /* &.anQueue */ + (*Sqlite3_rtree_query_info)(unsafe.Pointer((*RtreeConstraint)(unsafe.Pointer(p)).FpInfo)).FmxLevel = (*Rtree)(unsafe.Pointer(pRtree)).FiDepth + 1 + } else if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + *(*RtreeDValue)(unsafe.Pointer(p + 8)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8))) + } else { + *(*RtreeDValue)(unsafe.Pointer(p + 8)) = 0.0 + if eType == SQLITE_NULL { + (*RtreeConstraint)(unsafe.Pointer(p)).Fop = RTREE_FALSE + } else if (*RtreeConstraint)(unsafe.Pointer(p)).Fop == RTREE_LT || (*RtreeConstraint)(unsafe.Pointer(p)).Fop == RTREE_LE { + (*RtreeConstraint)(unsafe.Pointer(p)).Fop = RTREE_TRUE + } else { + (*RtreeConstraint)(unsafe.Pointer(p)).Fop = RTREE_FALSE + } + } + } + } + } + if rc == SQLITE_OK { + var pNew uintptr + // Due to the resetCursor() call above + pNew = rtreeSearchPointNew(tls, pCsr, 0.0, U8((*Rtree)(unsafe.Pointer(pRtree)).FiDepth+1)) + if pNew == uintptr(0) { // Because pCsr->bPoint was FALSE + return SQLITE_NOMEM + } + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).Fid = int64(1) + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).FiCell = U8(0) + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).FeWithin = U8(PARTLY_WITHIN) + + *(*uintptr)(unsafe.Pointer(pCsr + 88)) = *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) = uintptr(0) + + rc = rtreeStepToLeaf(tls, pCsr) + } + } + + nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) + rtreeRelease(tls, pRtree) + return rc +} + +// Rtree virtual table module xBestIndex method. There are three +// table scan strategies to choose from (in order from most to +// least desirable): +// +// idxNum idxStr Strategy +// ------------------------------------------------ +// 1 Unused Direct lookup by rowid. +// 2 See below R-tree query or full-table scan. +// ------------------------------------------------ +// +// If strategy 1 is used, then idxStr is not meaningful. If strategy +// 2 is used, idxStr is formatted to contain 2 bytes for each +// constraint used. The first two bytes of idxStr correspond to +// the constraint in sqlite3_index_info.aConstraintUsage[] with +// (argvIndex==1) etc. +// +// The first of each pair of bytes in idxStr identifies the constraint +// operator as follows: +// +// Operator Byte Value +// ---------------------- +// = 0x41 ('A') +// <= 0x42 ('B') +// < 0x43 ('C') +// >= 0x44 ('D') +// > 0x45 ('E') +// MATCH 0x46 ('F') +// ---------------------- +// +// The second of each pair of bytes identifies the coordinate column +// to which the constraint applies. The leftmost coordinate column +// is 'a', the second from the left 'b' etc. +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ + bp := tls.Alloc(49) + defer tls.Free(49) + + var pRtree uintptr = tab + var rc int32 = SQLITE_OK + var ii int32 + var bMatch int32 = 0 // True if there exists a MATCH constraint + var nRow I64 // Estimated rows returned by this scan + + var iIdx int32 = 0 + // var zIdxStr [41]uint8 at bp+8, 41 + + libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof([41]uint8{}))) + + // Check if there exists a MATCH constraint - even an unusable one. If there + // is, do not consider the lookup-by-rowid plan as using such a plan would + // require the VDBE to evaluate the MATCH constraint, which is not currently + // possible. + for ii = 0; ii < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { + if int32((*sqlite3_index_constraint)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint+uintptr(ii)*12)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH { + bMatch = 1 + } + } + + for ii = 0; ii < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint && iIdx < int32(uint64(unsafe.Sizeof([41]uint8{}))-uint64(1)); ii++ { + var p uintptr = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12 + + if bMatch == 0 && (*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0 && + (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn <= 0 && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { + // We have an equality constraint on the rowid. Use strategy 1. + var jj int32 + for jj = 0; jj < ii; jj++ { + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(jj)*8)).FargvIndex = 0 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(jj)*8)).Fomit = uint8(0) + } + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).FargvIndex = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(jj)*8)).Fomit = uint8(1) + + // This strategy involves a two rowid lookups on an B-Tree structures + // and then a linear search of an R-Tree node. This should be + // considered almost as quick as a direct rowid lookup (for which + // sqlite uses an internal cost of 0.0). It is expected to return + // a single row. + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(1) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxFlags = SQLITE_INDEX_SCAN_UNIQUE + return SQLITE_OK + } + + if (*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0 && + ((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn > 0 && (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn <= int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) || + int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH) { + var op U8 + switch int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) { + case SQLITE_INDEX_CONSTRAINT_EQ: + op = U8(RTREE_EQ) + break + fallthrough + case SQLITE_INDEX_CONSTRAINT_GT: + op = U8(RTREE_GT) + break + fallthrough + case SQLITE_INDEX_CONSTRAINT_LE: + op = U8(RTREE_LE) + break + fallthrough + case SQLITE_INDEX_CONSTRAINT_LT: + op = U8(RTREE_LT) + break + fallthrough + case SQLITE_INDEX_CONSTRAINT_GE: + op = U8(RTREE_GE) + break + fallthrough + case SQLITE_INDEX_CONSTRAINT_MATCH: + op = U8(RTREE_MATCH) + break + fallthrough + default: + op = U8(0) + break + } + if op != 0 { + *(*uint8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&iIdx, 1)))) = uint8(op) + *(*uint8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&iIdx, 1)))) = uint8((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn - 1 + '0') + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).FargvIndex = iIdx / 2 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).Fomit = uint8(1) + } + } + } + + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+48, Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, bp+8))) { + return SQLITE_NOMEM + } + + nRow = (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst >> (iIdx / 2) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 6.0 * float64(nRow) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = nRow + + return rc +} + +// Return the N-dimensional volumn of the cell stored in *p. +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ + var area RtreeDValue = RtreeDValue(1) + + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + switch int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim) { + case 5: + area = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(p + 8 + 9*4)) - *(*RtreeValue)(unsafe.Pointer(p + 8 + 8*4))) + fallthrough + case 4: + area = area * float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + 7*4))-*(*RtreeValue)(unsafe.Pointer(p + 8 + 6*4))) + fallthrough + case 3: + area = area * float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + 5*4))-*(*RtreeValue)(unsafe.Pointer(p + 8 + 4*4))) + fallthrough + case 2: + area = area * float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + 3*4))-*(*RtreeValue)(unsafe.Pointer(p + 8 + 2*4))) + fallthrough + default: + area = area * float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + 1*4))-*(*RtreeValue)(unsafe.Pointer(p + 8))) + } + } else { + switch int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim) { + case 5: + area = RtreeDValue(I64(*(*int32)(unsafe.Pointer(p + 8 + 9*4))) - I64(*(*int32)(unsafe.Pointer(p + 8 + 8*4)))) + fallthrough + case 4: + area = area * float64(I64(*(*int32)(unsafe.Pointer(p + 8 + 7*4)))-I64(*(*int32)(unsafe.Pointer(p + 8 + 6*4)))) + fallthrough + case 3: + area = area * float64(I64(*(*int32)(unsafe.Pointer(p + 8 + 5*4)))-I64(*(*int32)(unsafe.Pointer(p + 8 + 4*4)))) + fallthrough + case 2: + area = area * float64(I64(*(*int32)(unsafe.Pointer(p + 8 + 3*4)))-I64(*(*int32)(unsafe.Pointer(p + 8 + 2*4)))) + fallthrough + default: + area = area * float64(I64(*(*int32)(unsafe.Pointer(p + 8 + 1*4)))-I64(*(*int32)(unsafe.Pointer(p + 8)))) + } + } + return area +} + +// Return the margin length of cell p. The margin length is the sum +// of the objects size in each dimension. +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ + var margin RtreeDValue = RtreeDValue(0) + var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 + for __ccgo := true; __ccgo; __ccgo = ii >= 0 { + margin = margin + (func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + uintptr(ii+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(ii+1)*4))) + }() - func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + uintptr(ii)*4))) + } + return float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(ii)*4))) + }()) + ii = ii - 2 + } + return margin +} + +// Store the union of cells p1 and p2 in p1. +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ + var ii int32 = 0 + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { + *(*RtreeValue)(unsafe.Pointer(p1 + 8 + uintptr(ii)*4)) = func() float32 { + if *(*RtreeValue)(unsafe.Pointer(p1 + 8 + uintptr(ii)*4)) < *(*RtreeValue)(unsafe.Pointer(p2 + 8 + uintptr(ii)*4)) { + return *(*RtreeValue)(unsafe.Pointer(p1 + 8 + uintptr(ii)*4)) + } + return *(*RtreeValue)(unsafe.Pointer(p2 + 8 + uintptr(ii)*4)) + }() + *(*RtreeValue)(unsafe.Pointer(p1 + 8 + uintptr(ii+1)*4)) = func() float32 { + if *(*RtreeValue)(unsafe.Pointer(p1 + 8 + uintptr(ii+1)*4)) > *(*RtreeValue)(unsafe.Pointer(p2 + 8 + uintptr(ii+1)*4)) { + return *(*RtreeValue)(unsafe.Pointer(p1 + 8 + uintptr(ii+1)*4)) + } + return *(*RtreeValue)(unsafe.Pointer(p2 + 8 + uintptr(ii+1)*4)) + }() + ii = ii + 2 + } + } else { + for __ccgo1 := true; __ccgo1; __ccgo1 = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { + *(*int32)(unsafe.Pointer(p1 + 8 + uintptr(ii)*4)) = func() int32 { + if *(*int32)(unsafe.Pointer(p1 + 8 + uintptr(ii)*4)) < *(*int32)(unsafe.Pointer(p2 + 8 + uintptr(ii)*4)) { + return *(*int32)(unsafe.Pointer(p1 + 8 + uintptr(ii)*4)) + } + return *(*int32)(unsafe.Pointer(p2 + 8 + uintptr(ii)*4)) + }() + *(*int32)(unsafe.Pointer(p1 + 8 + uintptr(ii+1)*4)) = func() int32 { + if *(*int32)(unsafe.Pointer(p1 + 8 + uintptr(ii+1)*4)) > *(*int32)(unsafe.Pointer(p2 + 8 + uintptr(ii+1)*4)) { + return *(*int32)(unsafe.Pointer(p1 + 8 + uintptr(ii+1)*4)) + } + return *(*int32)(unsafe.Pointer(p2 + 8 + uintptr(ii+1)*4)) + }() + ii = ii + 2 + } + } +} + +// Return true if the area covered by p2 is a subset of the area covered +// by p1. False otherwise. +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ + var ii int32 + var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) + for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { + var a1 uintptr = p1 + 8 + uintptr(ii)*4 + var a2 uintptr = p2 + 8 + uintptr(ii)*4 + if !(isInt != 0) && (*(*RtreeValue)(unsafe.Pointer(a2)) < *(*RtreeValue)(unsafe.Pointer(a1)) || *(*RtreeValue)(unsafe.Pointer(a2 + 1*4)) > *(*RtreeValue)(unsafe.Pointer(a1 + 1*4))) || + isInt != 0 && (*(*int32)(unsafe.Pointer(a2)) < *(*int32)(unsafe.Pointer(a1)) || *(*int32)(unsafe.Pointer(a2 + 1*4)) > *(*int32)(unsafe.Pointer(a1 + 1*4))) { + return 0 + } + } + return 1 +} + +// Return the amount cell p would grow by if it were unioned with pCell. +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var area RtreeDValue + // var cell RtreeCell at bp, 48 + + libc.Xmemcpy(tls, bp, p, uint64(unsafe.Sizeof(RtreeCell{}))) + area = cellArea(tls, pRtree, bp) + cellUnion(tls, pRtree, bp, pCell) + return cellArea(tls, pRtree, bp) - area +} + +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ + var ii int32 + var overlap RtreeDValue = 0.0 + for ii = 0; ii < nCell; ii++ { + var jj int32 + var o RtreeDValue = RtreeDValue(1) + for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); jj = jj + 2 { + var x1 RtreeDValue + var x2 RtreeDValue + x1 = func() float64 { + if func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj)*4))) + } + return float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj)*4))) + }() > func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4))) + }() { + return func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj)*4))) + } + return float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj)*4))) + }() + } + return func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj)*4))) + }() + }() + x2 = func() float64 { + if func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj+1)*4))) + }() < func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+1)*4))) + }() { + return func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(p + 8 + uintptr(jj+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(p + 8 + uintptr(jj+1)*4))) + }() + } + return func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(jj+1)*4))) + }() + }() + if x2 < x1 { + o = RtreeDValue(0) + break + } else { + o = o * (x2 - x1) + } + } + overlap = overlap + o + } + return overlap +} + +// This function implements the ChooseLeaf algorithm from Gutman[84]. +// ChooseSubTree in r*tree terminology. +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var rc int32 + var ii int32 + *(*uintptr)(unsafe.Pointer(bp /* pNode */)) = uintptr(0) + rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp) + + for ii = 0; rc == SQLITE_OK && ii < (*Rtree)(unsafe.Pointer(pRtree)).FiDepth-iHeight; ii++ { + var iCell int32 + var iBest Sqlite3_int64 = int64(0) + + var fMinGrowth RtreeDValue = 0.0 + var fMinArea RtreeDValue = 0.0 + + var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzData+2) + // var cell RtreeCell at bp+8, 48 + + *(*uintptr)(unsafe.Pointer(bp + 56 /* pChild */)) = uintptr(0) + + var aCell uintptr = uintptr(0) + + // Select the child node which will be enlarged the least if pCell + // is inserted into it. Resolve ties by choosing the entry with + // the smallest area. + for iCell = 0; iCell < nCell; iCell++ { + var bBest int32 = 0 + var growth RtreeDValue + var area RtreeDValue + nodeGetCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pNode */)), iCell, bp+8) + growth = cellGrowth(tls, pRtree, bp+8, pCell) + area = cellArea(tls, pRtree, bp+8) + if iCell == 0 || growth < fMinGrowth || growth == fMinGrowth && area < fMinArea { + bBest = 1 + } + if bBest != 0 { + fMinGrowth = growth + fMinArea = area + iBest = (*RtreeCell)(unsafe.Pointer(bp + 8 /* &cell */)).FiRowid + } + } + + Xsqlite3_free(tls, aCell) + rc = nodeAcquire(tls, pRtree, iBest, *(*uintptr)(unsafe.Pointer(bp /* pNode */)), bp+56) + nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pNode */))) + *(*uintptr)(unsafe.Pointer(bp /* pNode */)) = *(*uintptr)(unsafe.Pointer(bp + 56 /* pChild */)) + } + + *(*uintptr)(unsafe.Pointer(ppLeaf)) = *(*uintptr)(unsafe.Pointer(bp /* pNode */)) + return rc +} + +// A cell with the same content as pCell has just been inserted into +// the node pNode. This function updates the bounding box cells in +// all ancestor elements. +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var p uintptr = pNode + var cnt int32 = 0 + var rc int32 + for (*RtreeNode)(unsafe.Pointer(p)).FpParent != 0 { + var pParent uintptr = (*RtreeNode)(unsafe.Pointer(p)).FpParent + // var cell RtreeCell at bp+8, 48 + + // var iCell int32 at bp, 4 + + cnt++ + if cnt > 100 { + + return SQLITE_CORRUPT | int32(1)<<8 + } + rc = nodeParentIndex(tls, pRtree, p, bp) + if rc != SQLITE_OK { + + return SQLITE_CORRUPT | int32(1)<<8 + } + + nodeGetCell(tls, pRtree, pParent, *(*int32)(unsafe.Pointer(bp /* iCell */)), bp+8) + if !(cellContains(tls, pRtree, bp+8, pCell) != 0) { + cellUnion(tls, pRtree, bp+8, pCell) + nodeOverwriteCell(tls, pRtree, pParent, bp+8, *(*int32)(unsafe.Pointer(bp /* iCell */))) + } + + p = pParent + } + return SQLITE_OK +} + +// Write mapping (iRowid->iNode) to the _rowid table. +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) + Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) + return Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) +} + +// Write mapping (iNode->iPar) to the _parent table. +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) + Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) + return Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) +} + +// Arguments aIdx, aDistance and aSpare all point to arrays of size +// nIdx. The aIdx array contains the set of integers from 0 to +// (nIdx-1) in no particular order. This function sorts the values +// in aIdx according to the indexed values in aDistance. For +// example, assuming the inputs: +// +// aIdx = { 0, 1, 2, 3 } +// aDistance = { 5.0, 2.0, 7.0, 6.0 } +// +// this function sets the aIdx array to contain: +// +// aIdx = { 0, 1, 2, 3 } +// +// The aSpare array is used as temporary working space by the +// sorting algorithm. +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ + if nIdx > 1 { + var iLeft int32 = 0 + var iRight int32 = 0 + + var nLeft int32 = nIdx / 2 + var nRight int32 = nIdx - nLeft + var aLeft uintptr = aIdx + var aRight uintptr = aIdx + uintptr(nLeft)*4 + + sSortByDistance(tls, aLeft, nLeft, aDistance, aSpare) + sSortByDistance(tls, aRight, nRight, aDistance, aSpare) + + libc.Xmemcpy(tls, aSpare, aLeft, uint64(unsafe.Sizeof(int32(0)))*uint64(nLeft)) + aLeft = aSpare + + for iLeft < nLeft || iRight < nRight { + if iLeft == nLeft { + *(*int32)(unsafe.Pointer(aIdx + uintptr(iLeft+iRight)*4)) = *(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)) + iRight++ + } else if iRight == nRight { + *(*int32)(unsafe.Pointer(aIdx + uintptr(iLeft+iRight)*4)) = *(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)) + iLeft++ + } else { + var fLeft RtreeDValue = *(*RtreeDValue)(unsafe.Pointer(aDistance + uintptr(*(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)))*8)) + var fRight RtreeDValue = *(*RtreeDValue)(unsafe.Pointer(aDistance + uintptr(*(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)))*8)) + if fLeft < fRight { + *(*int32)(unsafe.Pointer(aIdx + uintptr(iLeft+iRight)*4)) = *(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)) + iLeft++ + } else { + *(*int32)(unsafe.Pointer(aIdx + uintptr(iLeft+iRight)*4)) = *(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)) + iRight++ + } + } + } + + } +} + +// Arguments aIdx, aCell and aSpare all point to arrays of size +// nIdx. The aIdx array contains the set of integers from 0 to +// (nIdx-1) in no particular order. This function sorts the values +// in aIdx according to dimension iDim of the cells in aCell. The +// minimum value of dimension iDim is considered first, the +// maximum used to break ties. +// +// The aSpare array is used as temporary working space by the +// sorting algorithm. +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ + if nIdx > 1 { + + var iLeft int32 = 0 + var iRight int32 = 0 + + var nLeft int32 = nIdx / 2 + var nRight int32 = nIdx - nLeft + var aLeft uintptr = aIdx + var aRight uintptr = aIdx + uintptr(nLeft)*4 + + sSortByDimension(tls, pRtree, aLeft, nLeft, iDim, aCell, aSpare) + sSortByDimension(tls, pRtree, aRight, nRight, iDim, aCell, aSpare) + + libc.Xmemcpy(tls, aSpare, aLeft, uint64(unsafe.Sizeof(int32(0)))*uint64(nLeft)) + aLeft = aSpare + for iLeft < nLeft || iRight < nRight { + var xleft1 RtreeDValue = func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)))*48 + 8 + uintptr(iDim*2)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)))*48 + 8 + uintptr(iDim*2)*4))) + }() + var xleft2 RtreeDValue = func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)))*48 + 8 + uintptr(iDim*2+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)))*48 + 8 + uintptr(iDim*2+1)*4))) + }() + var xright1 RtreeDValue = func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)))*48 + 8 + uintptr(iDim*2)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)))*48 + 8 + uintptr(iDim*2)*4))) + }() + var xright2 RtreeDValue = func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)))*48 + 8 + uintptr(iDim*2+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(*(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)))*48 + 8 + uintptr(iDim*2+1)*4))) + }() + if iLeft != nLeft && (iRight == nRight || + xleft1 < xright1 || + xleft1 == xright1 && xleft2 < xright2) { + *(*int32)(unsafe.Pointer(aIdx + uintptr(iLeft+iRight)*4)) = *(*int32)(unsafe.Pointer(aLeft + uintptr(iLeft)*4)) + iLeft++ + } else { + *(*int32)(unsafe.Pointer(aIdx + uintptr(iLeft+iRight)*4)) = *(*int32)(unsafe.Pointer(aRight + uintptr(iRight)*4)) + iRight++ + } + } + + } +} + +// Implementation of the R*-tree variant of SplitNode from Beckman[1990]. +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + var aaSorted uintptr + var aSpare uintptr + var ii int32 + + var iBestDim int32 = 0 + var iBestSplit int32 = 0 + var fBestMargin RtreeDValue = 0.0 + + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim)+1) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(nCell)*uint64(unsafe.Sizeof(int32(0))))) + + aaSorted = Xsqlite3_malloc64(tls, uint64(nByte)) + if !(aaSorted != 0) { + return SQLITE_NOMEM + } + + aSpare = aaSorted + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnDim)*8 + uintptr(int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim)*nCell)*4 + libc.Xmemset(tls, aaSorted, 0, uint64(nByte)) + for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim); ii++ { + var jj int32 + *(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*8)) = aaSorted + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnDim)*8 + uintptr(ii*nCell)*4 + for jj = 0; jj < nCell; jj++ { + *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*8)) + uintptr(jj)*4)) = jj + } + sSortByDimension(tls, pRtree, *(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*8)), nCell, ii, aCell, aSpare) + } + + for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim); ii++ { + var margin RtreeDValue = 0.0 + var fBestOverlap RtreeDValue = 0.0 + var fBestArea RtreeDValue = 0.0 + var iBestLeft int32 = 0 + var nLeft int32 + + for nLeft = ((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize - 4) / int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) / 3; nLeft <= nCell-((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-4)/int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)/3; nLeft++ { + // var left RtreeCell at bp, 48 + + // var right RtreeCell at bp+48, 48 + + var kk int32 + var overlap RtreeDValue + var area RtreeDValue + + libc.Xmemcpy(tls, bp, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*8)))))*48, uint64(unsafe.Sizeof(RtreeCell{}))) + libc.Xmemcpy(tls, bp+48, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*8)) + uintptr(nCell-1)*4)))*48, uint64(unsafe.Sizeof(RtreeCell{}))) + for kk = 1; kk < nCell-1; kk++ { + if kk < nLeft { + cellUnion(tls, pRtree, bp, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*8)) + uintptr(kk)*4)))*48) + } else { + cellUnion(tls, pRtree, bp+48, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*8)) + uintptr(kk)*4)))*48) + } + } + margin = margin + cellMargin(tls, pRtree, bp) + margin = margin + cellMargin(tls, pRtree, bp+48) + overlap = cellOverlap(tls, pRtree, bp, bp+48, 1) + area = cellArea(tls, pRtree, bp) + cellArea(tls, pRtree, bp+48) + if nLeft == ((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-4)/int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)/3 || + overlap < fBestOverlap || + overlap == fBestOverlap && area < fBestArea { + iBestLeft = nLeft + fBestOverlap = overlap + fBestArea = area + } + } + + if ii == 0 || margin < fBestMargin { + iBestDim = ii + fBestMargin = margin + iBestSplit = iBestLeft + } + } + + libc.Xmemcpy(tls, pBboxLeft, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(iBestDim)*8)))))*48, uint64(unsafe.Sizeof(RtreeCell{}))) + libc.Xmemcpy(tls, pBboxRight, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(iBestDim)*8)) + uintptr(iBestSplit)*4)))*48, uint64(unsafe.Sizeof(RtreeCell{}))) + for ii = 0; ii < nCell; ii++ { + var pTarget uintptr + if ii < iBestSplit { + pTarget = pLeft + } else { + pTarget = pRight + } + var pBbox uintptr + if ii < iBestSplit { + pBbox = pBboxLeft + } else { + pBbox = pBboxRight + } + var pCell uintptr = aCell + uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(iBestDim)*8)) + uintptr(ii)*4)))*48 + nodeInsertCell(tls, pRtree, pTarget, pCell) + cellUnion(tls, pRtree, pBbox, pCell) + } + + Xsqlite3_free(tls, aaSorted) + return SQLITE_OK +} + +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ + var xSetMapping uintptr + xSetMapping = func() uintptr { + if iHeight == 0 { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Sqlite3_int64, Sqlite3_int64) int32 + }{rowidWrite})) + } + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Sqlite3_int64, Sqlite3_int64) int32 + }{parentWrite})) + }() + if iHeight > 0 { + var pChild uintptr = nodeHashLookup(tls, pRtree, iRowid) + var p uintptr + for p = pNode; p != 0; p = (*RtreeNode)(unsafe.Pointer(p)).FpParent { + if p == pChild { + return SQLITE_CORRUPT | int32(1)<<8 + } + } + if pChild != 0 { + nodeRelease(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pChild)).FpParent) + nodeReference(tls, pNode) + (*RtreeNode)(unsafe.Pointer(pChild)).FpParent = pNode + } + } + if pNode == uintptr(0) { + return SQLITE_ERROR + } + return (*struct { + f func(*libc.TLS, uintptr, Sqlite3_int64, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) +} + +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ + bp := tls.Alloc(100) + defer tls.Free(100) + + var i int32 + var newCellIsRight int32 + var rc int32 + var nCell int32 + var aCell uintptr + var aiUsed uintptr + var pLeft uintptr + var pRight uintptr + // var leftbbox RtreeCell at bp, 48 + + // var rightbbox RtreeCell at bp+48, 48 + + var pParent uintptr + // var iCell int32 at bp+96, 4 + + var iRowid I64 + var iRowid1 I64 + newCellIsRight = 0 + rc = SQLITE_OK + nCell = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + pLeft = uintptr(0) + pRight = uintptr(0) + + // Allocate an array and populate it with a copy of pCell and + // all cells from node pLeft. Then zero the original node. + aCell = Xsqlite3_malloc64(tls, uint64((uint64(unsafe.Sizeof(RtreeCell{}))+uint64(unsafe.Sizeof(int32(0))))*uint64(nCell+1))) + if !!(aCell != 0) { + goto __1 + } + rc = SQLITE_NOMEM + goto splitnode_out +__1: + ; + aiUsed = aCell + uintptr(nCell+1)*48 + libc.Xmemset(tls, aiUsed, 0, uint64(unsafe.Sizeof(int32(0)))*uint64(nCell+1)) + i = 0 +__2: + if !(i < nCell) { + goto __4 + } + nodeGetCell(tls, pRtree, pNode, i, aCell+uintptr(i)*48) + goto __3 +__3: + i++ + goto __2 + goto __4 +__4: + ; + nodeZero(tls, pRtree, pNode) + libc.Xmemcpy(tls, aCell+uintptr(nCell)*48, pCell, uint64(unsafe.Sizeof(RtreeCell{}))) + nCell++ + + if !((*RtreeNode)(unsafe.Pointer(pNode)).FiNode == int64(1)) { + goto __5 + } + pRight = nodeNew(tls, pRtree, pNode) + pLeft = nodeNew(tls, pRtree, pNode) + (*Rtree)(unsafe.Pointer(pRtree)).FiDepth++ + (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty = 1 + writeInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData, (*Rtree)(unsafe.Pointer(pRtree)).FiDepth) + goto __6 +__5: + pLeft = pNode + pRight = nodeNew(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pLeft)).FpParent) + (*RtreeNode)(unsafe.Pointer(pLeft)).FnRef++ +__6: + ; + + if !(!(pLeft != 0) || !(pRight != 0)) { + goto __7 + } + rc = SQLITE_NOMEM + goto splitnode_out +__7: + ; + + libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(pLeft)).FzData, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) + libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(pRight)).FzData, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) + + rc = splitNodeStartree(tls, pRtree, aCell, nCell, pLeft, pRight, + bp, bp+48) + if !(rc != SQLITE_OK) { + goto __8 + } + goto splitnode_out +__8: + ; + + // Ensure both child nodes have node numbers assigned to them by calling + // nodeWrite(). Node pRight always needs a node number, as it was created + // by nodeNew() above. But node pLeft sometimes already has a node number. + // In this case avoid the all to nodeWrite(). + if !(SQLITE_OK != libc.AssignInt32(&rc, nodeWrite(tls, pRtree, pRight)) || + int64(0) == (*RtreeNode)(unsafe.Pointer(pLeft)).FiNode && SQLITE_OK != libc.AssignInt32(&rc, nodeWrite(tls, pRtree, pLeft))) { + goto __9 + } + goto splitnode_out +__9: + ; + + (*RtreeCell)(unsafe.Pointer(bp + 48 /* &rightbbox */)).FiRowid = (*RtreeNode)(unsafe.Pointer(pRight)).FiNode + (*RtreeCell)(unsafe.Pointer(bp /* &leftbbox */)).FiRowid = (*RtreeNode)(unsafe.Pointer(pLeft)).FiNode + + if !((*RtreeNode)(unsafe.Pointer(pNode)).FiNode == int64(1)) { + goto __10 + } + rc = rtreeInsertCell(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pLeft)).FpParent, bp, iHeight+1) + if !(rc != SQLITE_OK) { + goto __12 + } + goto splitnode_out +__12: + ; + goto __11 +__10: + pParent = (*RtreeNode)(unsafe.Pointer(pLeft)).FpParent + rc = nodeParentIndex(tls, pRtree, pLeft, bp+96) + if !(rc == SQLITE_OK) { + goto __13 + } + nodeOverwriteCell(tls, pRtree, pParent, bp, *(*int32)(unsafe.Pointer(bp + 96 /* iCell */))) + rc = sAdjustTree(tls, pRtree, pParent, bp) + +__13: + ; + if !(rc != SQLITE_OK) { + goto __14 + } + goto splitnode_out +__14: + ; +__11: + ; + if !(libc.AssignInt32(&rc, rtreeInsertCell(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pRight)).FpParent, bp+48, iHeight+1)) != 0) { + goto __15 + } + goto splitnode_out +__15: + ; + + i = 0 +__16: + if !(i < readInt16(tls, (*RtreeNode)(unsafe.Pointer(pRight)).FzData+2)) { + goto __18 + } + iRowid = nodeGetRowid(tls, pRtree, pRight, i) + rc = updateMapping(tls, pRtree, iRowid, pRight, iHeight) + if !(iRowid == (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) { + goto __19 + } + newCellIsRight = 1 +__19: + ; + if !(rc != SQLITE_OK) { + goto __20 + } + goto splitnode_out +__20: + ; + goto __17 +__17: + i++ + goto __16 + goto __18 +__18: + ; + if !((*RtreeNode)(unsafe.Pointer(pNode)).FiNode == int64(1)) { + goto __21 + } + i = 0 +__23: + if !(i < readInt16(tls, (*RtreeNode)(unsafe.Pointer(pLeft)).FzData+2)) { + goto __25 + } + iRowid1 = nodeGetRowid(tls, pRtree, pLeft, i) + rc = updateMapping(tls, pRtree, iRowid1, pLeft, iHeight) + if !(rc != SQLITE_OK) { + goto __26 + } + goto splitnode_out +__26: + ; + goto __24 +__24: + i++ + goto __23 + goto __25 +__25: + ; + goto __22 +__21: + if !(newCellIsRight == 0) { + goto __27 + } + rc = updateMapping(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid, pLeft, iHeight) +__27: + ; +__22: + ; + + if !(rc == SQLITE_OK) { + goto __28 + } + rc = nodeRelease(tls, pRtree, pRight) + pRight = uintptr(0) +__28: + ; + if !(rc == SQLITE_OK) { + goto __29 + } + rc = nodeRelease(tls, pRtree, pLeft) + pLeft = uintptr(0) +__29: + ; + +splitnode_out: + nodeRelease(tls, pRtree, pRight) + nodeRelease(tls, pRtree, pLeft) + Xsqlite3_free(tls, aCell) + return rc +} + +// If node pLeaf is not the root of the r-tree and its pParent pointer is +// still NULL, load all ancestor nodes of pLeaf into memory and populate +// the pLeaf->pParent chain all the way up to the root node. +// +// This operation is required when a row is deleted (or updated - an update +// is implemented as a delete followed by an insert). SQLite provides the +// rowid of the row to delete, which can be used to find the leaf on which +// the entry resides (argument pLeaf). Once the leaf is located, this +// function is called to determine its ancestry. +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ + var rc int32 = SQLITE_OK + var pChild uintptr = pLeaf + for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { + var rc2 int32 = SQLITE_OK // sqlite3_reset() return code + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadParent, 1, (*RtreeNode)(unsafe.Pointer(pChild)).FiNode) + rc = Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadParent) + if rc == SQLITE_ROW { + var pTest uintptr // Used to test for reference loops + var iNode I64 // Node number of parent node + + // Before setting pChild->pParent, test that we are not creating a + // loop of references (as we would if, say, pChild==pParent). We don't + // want to do this as it leads to a memory leak when trying to delete + // the referenced counted node structures. + iNode = Xsqlite3_column_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadParent, 0) + for pTest = pLeaf; pTest != 0 && (*RtreeNode)(unsafe.Pointer(pTest)).FiNode != iNode; pTest = (*RtreeNode)(unsafe.Pointer(pTest)).FpParent { + } + if pTest == uintptr(0) { + rc2 = nodeAcquire(tls, pRtree, iNode, uintptr(0), pChild) + } + } + rc = Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadParent) + if rc == SQLITE_OK { + rc = rc2 + } + if rc == SQLITE_OK && !(int32((*RtreeNode)(unsafe.Pointer(pChild)).FpParent) != 0) { + + rc = SQLITE_CORRUPT | int32(1)<<8 + } + pChild = (*RtreeNode)(unsafe.Pointer(pChild)).FpParent + } + return rc +} + +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 + var rc2 int32 + var pParent uintptr = uintptr(0) + // var iCell int32 at bp, 4 + + // Remove the entry in the parent cell. + rc = nodeParentIndex(tls, pRtree, pNode, bp) + if rc == SQLITE_OK { + pParent = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent + (*RtreeNode)(unsafe.Pointer(pNode)).FpParent = uintptr(0) + rc = deleteCell(tls, pRtree, pParent, *(*int32)(unsafe.Pointer(bp /* iCell */)), iHeight+1) + + } + rc2 = nodeRelease(tls, pRtree, pParent) + if rc == SQLITE_OK { + rc = rc2 + } + if rc != SQLITE_OK { + return rc + } + + // Remove the xxx_node entry. + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteNode, 1, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) + Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteNode) + if SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteNode)) { + return rc + } + + // Remove the xxx_parent entry. + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteParent, 1, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) + Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteParent) + if SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteParent)) { + return rc + } + + // Remove the node from the in-memory hash table and link it into + // the Rtree.pDeleted list. Its contents will be re-inserted later on. + nodeHashDelete(tls, pRtree, pNode) + (*RtreeNode)(unsafe.Pointer(pNode)).FiNode = I64(iHeight) + (*RtreeNode)(unsafe.Pointer(pNode)).FpNext = (*Rtree)(unsafe.Pointer(pRtree)).FpDeleted + (*RtreeNode)(unsafe.Pointer(pNode)).FnRef++ + (*Rtree)(unsafe.Pointer(pRtree)).FpDeleted = pNode + + return SQLITE_OK +} + +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ + bp := tls.Alloc(100) + defer tls.Free(100) + + var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent + var rc int32 = SQLITE_OK + if pParent != 0 { + // var ii int32 at bp+96, 4 + + var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + // var box RtreeCell at bp, 48 + // Bounding box for pNode + nodeGetCell(tls, pRtree, pNode, 0, bp) + for *(*int32)(unsafe.Pointer(bp + 96 /* ii */)) = 1; *(*int32)(unsafe.Pointer(bp + 96 /* ii */)) < nCell; *(*int32)(unsafe.Pointer(bp + 96 /* ii */))++ { + // var cell RtreeCell at bp+48, 48 + + nodeGetCell(tls, pRtree, pNode, *(*int32)(unsafe.Pointer(bp + 96 /* ii */)), bp+48) + cellUnion(tls, pRtree, bp, bp+48) + } + (*RtreeCell)(unsafe.Pointer(bp /* &box */)).FiRowid = (*RtreeNode)(unsafe.Pointer(pNode)).FiNode + rc = nodeParentIndex(tls, pRtree, pNode, bp+96) + if rc == SQLITE_OK { + nodeOverwriteCell(tls, pRtree, pParent, bp, *(*int32)(unsafe.Pointer(bp + 96 /* ii */))) + rc = fixBoundingBox(tls, pRtree, pParent) + } + } + return rc +} + +// Delete the cell at index iCell of node pNode. After removing the +// cell, adjust the r-tree data structure if required. +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ + var pParent uintptr + var rc int32 + + if SQLITE_OK != libc.AssignInt32(&rc, fixLeafParent(tls, pRtree, pNode)) { + return rc + } + + // Remove the cell from the node. This call just moves bytes around + // the in-memory node image, so it cannot fail. + nodeDeleteCell(tls, pRtree, pNode, iCell) + + // If the node is not the tree root and now has less than the minimum + // number of cells, remove it from the tree. Otherwise, update the + // cell in the parent node so that it tightly contains the updated + // node. + pParent = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent + + if pParent != 0 { + if readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) < ((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-4)/int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)/3 { + rc = removeNode(tls, pRtree, pNode, iHeight) + } else { + rc = fixBoundingBox(tls, pRtree, pNode) + } + } + + return rc +} + +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var aOrder uintptr + var aSpare uintptr + var aCell uintptr + var aDistance uintptr + var nCell int32 + // var aCenterCoord [5]RtreeDValue at bp, 40 + + var iDim int32 + var ii int32 + var rc int32 = SQLITE_OK + var n int32 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RtreeDValue(0)))*uint64(RTREE_MAX_DIMENSIONS)) + + nCell = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + 1 + n = (nCell + 1) & libc.CplInt32(1) + + // Allocate the buffers used by this operation. The allocation is + // relinquished before this function returns. + aCell = Xsqlite3_malloc64(tls, uint64(uint64(n)*(uint64(unsafe.Sizeof(RtreeCell{}))+uint64(unsafe.Sizeof(int32(0)))+uint64(unsafe.Sizeof(int32(0)))+uint64(unsafe.Sizeof(RtreeDValue(0)))))) + if !(aCell != 0) { + return SQLITE_NOMEM + } + aOrder = aCell + uintptr(n)*48 + aSpare = aOrder + uintptr(n)*4 + aDistance = aSpare + uintptr(n)*4 + + for ii = 0; ii < nCell; ii++ { + if ii == nCell-1 { + libc.Xmemcpy(tls, aCell+uintptr(ii)*48, pCell, uint64(unsafe.Sizeof(RtreeCell{}))) + } else { + nodeGetCell(tls, pRtree, pNode, ii, aCell+uintptr(ii)*48) + } + *(*int32)(unsafe.Pointer(aOrder + uintptr(ii)*4)) = ii + for iDim = 0; iDim < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim); iDim++ { + *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8)) += func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2)*4))) + }() + *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8)) += func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2+1)*4))) + }() + } + } + for iDim = 0; iDim < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim); iDim++ { + *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8)) = *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8)) / (float64(nCell) * RtreeDValue(2)) + } + + for ii = 0; ii < nCell; ii++ { + *(*RtreeDValue)(unsafe.Pointer(aDistance + uintptr(ii)*8)) = 0.0 + for iDim = 0; iDim < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim); iDim++ { + var coord RtreeDValue = func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2+1)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2+1)*4))) + }() - func() float64 { + if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { + return float64(*(*RtreeValue)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2)*4))) + } + return float64(*(*int32)(unsafe.Pointer(aCell + uintptr(ii)*48 + 8 + uintptr(iDim*2)*4))) + }() + *(*RtreeDValue)(unsafe.Pointer(aDistance + uintptr(ii)*8)) += (coord - *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8))) * (coord - *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8))) + } + } + + sSortByDistance(tls, aOrder, nCell, aDistance, aSpare) + nodeZero(tls, pRtree, pNode) + + for ii = 0; rc == SQLITE_OK && ii < nCell-(((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-4)/int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)/3+1); ii++ { + var p uintptr = aCell + uintptr(*(*int32)(unsafe.Pointer(aOrder + uintptr(ii)*4)))*48 + nodeInsertCell(tls, pRtree, pNode, p) + if (*RtreeCell)(unsafe.Pointer(p)).FiRowid == (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid { + if iHeight == 0 { + rc = rowidWrite(tls, pRtree, (*RtreeCell)(unsafe.Pointer(p)).FiRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) + } else { + rc = parentWrite(tls, pRtree, (*RtreeCell)(unsafe.Pointer(p)).FiRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) + } + } + } + if rc == SQLITE_OK { + rc = fixBoundingBox(tls, pRtree, pNode) + } + for ; rc == SQLITE_OK && ii < nCell; ii++ { + // Find a node to store this cell in. pNode->iNode currently contains + // the height of the sub-tree headed by the cell. + // var pInsert uintptr at bp+40, 8 + + var p uintptr = aCell + uintptr(*(*int32)(unsafe.Pointer(aOrder + uintptr(ii)*4)))*48 + rc = sChooseLeaf(tls, pRtree, p, iHeight, bp+40) + if rc == SQLITE_OK { + var rc2 int32 + rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInsert */)), p, iHeight) + rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInsert */))) + if rc == SQLITE_OK { + rc = rc2 + } + } + } + + Xsqlite3_free(tls, aCell) + return rc +} + +// Insert cell pCell into node pNode. Node pNode is the head of a +// subtree iHeight high (leaf nodes have iHeight==0). +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ + var rc int32 = SQLITE_OK + if iHeight > 0 { + var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) + if pChild != 0 { + nodeRelease(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pChild)).FpParent) + nodeReference(tls, pNode) + (*RtreeNode)(unsafe.Pointer(pChild)).FpParent = pNode + } + } + if nodeInsertCell(tls, pRtree, pNode, pCell) != 0 { + if iHeight <= (*Rtree)(unsafe.Pointer(pRtree)).FiReinsertHeight || (*RtreeNode)(unsafe.Pointer(pNode)).FiNode == int64(1) { + rc = sSplitNode(tls, pRtree, pNode, pCell, iHeight) + } else { + (*Rtree)(unsafe.Pointer(pRtree)).FiReinsertHeight = iHeight + rc = sReinsert(tls, pRtree, pNode, pCell, iHeight) + } + } else { + rc = sAdjustTree(tls, pRtree, pNode, pCell) + if rc == SQLITE_OK { + if iHeight == 0 { + rc = rowidWrite(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) + } else { + rc = parentWrite(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) + } + } + } + return rc +} + +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var ii int32 + var rc int32 = SQLITE_OK + var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + + for ii = 0; rc == SQLITE_OK && ii < nCell; ii++ { + // var pInsert uintptr at bp+48, 8 + + // var cell RtreeCell at bp, 48 + + nodeGetCell(tls, pRtree, pNode, ii, bp) + + // Find a node to store this cell in. pNode->iNode currently contains + // the height of the sub-tree headed by the cell. + rc = sChooseLeaf(tls, pRtree, bp, int32((*RtreeNode)(unsafe.Pointer(pNode)).FiNode), bp+48) + if rc == SQLITE_OK { + var rc2 int32 + rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pInsert */)), bp, int32((*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) + rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pInsert */))) + if rc == SQLITE_OK { + rc = rc2 + } + } + } + return rc +} + +// Select a currently unused rowid for a new r-tree record. +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ + var rc int32 + Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) + Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) + Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) + rc = Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) + *(*I64)(unsafe.Pointer(piRowid)) = Xsqlite3_last_insert_rowid(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb) + return rc +} + +// Remove the entry with rowid=iDelete from the r-tree structure. +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var rc int32 // Return code + *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */)) = uintptr(0) // Leaf node containing record iDelete + // var iCell int32 at bp+16, 4 + // Index of iDelete cell in pLeaf + *(*uintptr)(unsafe.Pointer(bp /* pRoot */)) = uintptr(0) // Root node of rtree structure + + // Obtain a reference to the root node to initialize Rtree.iDepth + rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp) + + // Obtain a reference to the leaf node that contains the entry + // about to be deleted. + if rc == SQLITE_OK { + rc = findLeafNode(tls, pRtree, iDelete, bp+8, uintptr(0)) + } + + // Delete the cell in question from the leaf node. + if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + var rc2 int32 + rc = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */)), iDelete, bp+16) + if rc == SQLITE_OK { + rc = deleteCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */)), *(*int32)(unsafe.Pointer(bp + 16 /* iCell */)), 0) + } + rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */))) + if rc == SQLITE_OK { + rc = rc2 + } + } + + // Delete the corresponding entry in the _rowid table. + if rc == SQLITE_OK { + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteRowid, 1, iDelete) + Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteRowid) + rc = Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpDeleteRowid) + } + + // Check if the root node now has exactly one child. If so, remove + // it, schedule the contents of the child for reinsertion and + // reduce the tree height by one. + // + // This is equivalent to copying the contents of the child into + // the root node (the operation that Gutman's paper says to perform + // in this scenario). + if rc == SQLITE_OK && (*Rtree)(unsafe.Pointer(pRtree)).FiDepth > 0 && readInt16(tls, (*RtreeNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzData+2) == 1 { + var rc2 int32 + *(*uintptr)(unsafe.Pointer(bp + 24 /* pChild */)) = uintptr(0) + var iChild I64 = nodeGetRowid(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pRoot */)), 0) + rc = nodeAcquire(tls, pRtree, iChild, *(*uintptr)(unsafe.Pointer(bp /* pRoot */)), bp+24) // tag-20210916a + if rc == SQLITE_OK { + rc = removeNode(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 24 /* pChild */)), (*Rtree)(unsafe.Pointer(pRtree)).FiDepth-1) + } + rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 24 /* pChild */))) + if rc == SQLITE_OK { + rc = rc2 + } + if rc == SQLITE_OK { + (*Rtree)(unsafe.Pointer(pRtree)).FiDepth-- + writeInt16(tls, (*RtreeNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pRoot */)))).FzData, (*Rtree)(unsafe.Pointer(pRtree)).FiDepth) + (*RtreeNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pRoot */)))).FisDirty = 1 + } + } + + // Re-insert the contents of any underfull nodes removed from the tree. + for *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */)) = (*Rtree)(unsafe.Pointer(pRtree)).FpDeleted; *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */)) != 0; *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */)) = (*Rtree)(unsafe.Pointer(pRtree)).FpDeleted { + if rc == SQLITE_OK { + rc = reinsertNodeContent(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */))) + } + (*Rtree)(unsafe.Pointer(pRtree)).FpDeleted = (*RtreeNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */)))).FpNext + (*Rtree)(unsafe.Pointer(pRtree)).FnNodeRef-- + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pLeaf */))) + } + + // Release the reference to the root node. + if rc == SQLITE_OK { + rc = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pRoot */))) + } else { + nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pRoot */))) + } + + return rc +} + +// Rounding constants for float->double conversion. + +// Convert an sqlite3_value into an RtreeValue (presumably a float) +// while taking care to round toward negative or positive, respectively. +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ + var d float64 = Xsqlite3_value_double(tls, v) + var f float32 = float32(d) + if float64(f) > d { + f = float32(d * func() float64 { + if d < float64(0) { + return float64(1.0) + float64(1.0)/8388608.0 + } + return float64(1.0) - float64(1.0)/8388608.0 + }()) + } + return f +} + +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ + var d float64 = Xsqlite3_value_double(tls, v) + var f float32 = float32(d) + if float64(f) < d { + f = float32(d * func() float64 { + if d < float64(0) { + return float64(1.0) - float64(1.0)/8388608.0 + } + return float64(1.0) + float64(1.0)/8388608.0 + }()) + } + return f +} + +// A constraint has failed while inserting a row into an rtree table. +// Assuming no OOM error occurs, this function sets the error message +// (at pRtree->base.zErrMsg) to an appropriate value and returns +// SQLITE_CONSTRAINT. +// +// Parameter iCol is the index of the leftmost column involved in the +// constraint failure. If it is 0, then the constraint that failed is +// the unique constraint on the id column. Otherwise, it is the rtree +// (c1<=c2) constraint on columns iCol and iCol+1 that has failed. +// +// If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)) = uintptr(0) + var zSql uintptr + var rc int32 + + zSql = Xsqlite3_mprintf(tls, ts+24970, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + if zSql != 0 { + rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) + } else { + rc = SQLITE_NOMEM + } + Xsqlite3_free(tls, zSql) + + if rc == SQLITE_OK { + if iCol == 0 { + var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) + (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, + ts+24990, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + } else { + var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) + var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) + (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, + ts+25022, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + } + } + + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))) + return func() int32 { + if rc == SQLITE_OK { + return SQLITE_CONSTRAINT + } + return rc + }() +} + +// The xUpdate method for rtree module virtual tables. +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var pRtree uintptr + var rc int32 + // var cell RtreeCell at bp, 48 + // New cell to insert if nData>1 + var bHaveRowid int32 + var steprc int32 + var ii int32 + var nn int32 + var rc2 int32 + var pUp uintptr + var jj int32 + // Insert the new record into the r-tree + // var pLeaf uintptr at bp+48, 8 + pRtree = pVtab + rc = SQLITE_OK + bHaveRowid = 0 // Set to 1 after new rowid is determined + + if !((*Rtree)(unsafe.Pointer(pRtree)).FnNodeRef != 0) { + goto __1 + } + // Unable to write to the btree while another cursor is reading from it, + // since the write might do a rebalance which would disrupt the read + // cursor. + return SQLITE_LOCKED | int32(2)<<8 +__1: + ; + rtreeReference(tls, pRtree) + + (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid = int64(0) // Used only to suppress a compiler warning + + // Constraint handling. A write operation on an r-tree table may return + // SQLITE_CONSTRAINT for two reasons: + // + // 1. A duplicate rowid value, or + // 2. The supplied data violates the "x2>=x1" constraint. + // + // In the first case, if the conflict-handling mode is REPLACE, then + // the conflicting row can be removed before proceeding. In the second + // case, SQLITE_CONSTRAINT must be returned regardless of the + // conflict-handling mode specified by the user. + if !(nData > 1) { + goto __2 + } + nn = nData - 4 + + if !(nn > int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2)) { + goto __3 + } + nn = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) +__3: + ; + // Populate the cell.aCoord[] array. The first coordinate is aData[3]. + // + // NB: nData can only be less than nDim*2+3 if the rtree is mis-declared + // with "column" that are interpreted as table constraints. + // Example: CREATE VIRTUAL TABLE bad USING rtree(x,y,CHECK(y>5)); + // This problem was discovered after years of use, so we silently ignore + // these kinds of misdeclared tables to avoid breaking any legacy. + + if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32) { + goto __4 + } + ii = 0 +__6: + if !(ii < nn) { + goto __8 + } + *(*RtreeValue)(unsafe.Pointer(bp + 8 + uintptr(ii)*4)) = rtreeValueDown(tls, *(*uintptr)(unsafe.Pointer(aData + uintptr(ii+3)*8))) + *(*RtreeValue)(unsafe.Pointer(bp + 8 + uintptr(ii+1)*4)) = rtreeValueUp(tls, *(*uintptr)(unsafe.Pointer(aData + uintptr(ii+4)*8))) + if !(*(*RtreeValue)(unsafe.Pointer(bp + 8 + uintptr(ii)*4)) > *(*RtreeValue)(unsafe.Pointer(bp + 8 + uintptr(ii+1)*4))) { + goto __9 + } + rc = rtreeConstraintError(tls, pRtree, ii+1) + goto constraint +__9: + ; + goto __7 +__7: + ii = ii + 2 + goto __6 + goto __8 +__8: + ; + goto __5 +__4: + + ii = 0 +__10: + if !(ii < nn) { + goto __12 + } + *(*int32)(unsafe.Pointer(bp + 8 + uintptr(ii)*4)) = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(aData + uintptr(ii+3)*8))) + *(*int32)(unsafe.Pointer(bp + 8 + uintptr(ii+1)*4)) = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(aData + uintptr(ii+4)*8))) + if !(*(*int32)(unsafe.Pointer(bp + 8 + uintptr(ii)*4)) > *(*int32)(unsafe.Pointer(bp + 8 + uintptr(ii+1)*4))) { + goto __13 + } + rc = rtreeConstraintError(tls, pRtree, ii+1) + goto constraint +__13: + ; + goto __11 +__11: + ii = ii + 2 + goto __10 + goto __12 +__12: + ; +__5: + ; + + // If a rowid value was supplied, check if it is already present in + // the table. If so, the constraint has failed. + if !(Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(aData + 2*8))) != SQLITE_NULL) { + goto __14 + } + (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(aData + 2*8))) + if !(Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(aData))) == SQLITE_NULL || + Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(aData))) != (*RtreeCell)(unsafe.Pointer(bp)).FiRowid) { + goto __15 + } + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid) + steprc = Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) + rc = Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) + if !(SQLITE_ROW == steprc) { + goto __16 + } + if !(Xsqlite3_vtab_on_conflict(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb) == SQLITE_REPLACE) { + goto __17 + } + rc = rtreeDeleteRowid(tls, pRtree, (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid) + goto __18 +__17: + rc = rtreeConstraintError(tls, pRtree, 0) + goto constraint +__18: + ; +__16: + ; +__15: + ; + bHaveRowid = 1 +__14: + ; +__2: + ; + + // If aData[0] is not an SQL NULL value, it is the rowid of a + // record to delete from the r-tree table. The following block does + // just that. + if !(Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(aData))) != SQLITE_NULL) { + goto __19 + } + rc = rtreeDeleteRowid(tls, pRtree, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(aData)))) +__19: + ; + + // If the aData[] array contains more than one element, elements + // (aData[2]..aData[argc-1]) contain a new record to insert into + // the r-tree structure. + if !(rc == SQLITE_OK && nData > 1) { + goto __20 + } + // Insert the new record into the r-tree + *(*uintptr)(unsafe.Pointer(bp + 48 /* pLeaf */)) = uintptr(0) + + // Figure out the rowid of the new row. + if !(bHaveRowid == 0) { + goto __21 + } + rc = rtreeNewRowid(tls, pRtree, bp) +__21: + ; + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid + + if !(rc == SQLITE_OK) { + goto __22 + } + rc = sChooseLeaf(tls, pRtree, bp, 0, bp+48) +__22: + ; + if !(rc == SQLITE_OK) { + goto __23 + } + (*Rtree)(unsafe.Pointer(pRtree)).FiReinsertHeight = -1 + rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pLeaf */)), bp, 0) + rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pLeaf */))) + if !(rc == SQLITE_OK) { + goto __24 + } + rc = rc2 +__24: + ; +__23: + ; + if !(rc == SQLITE_OK && (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0) { + goto __25 + } + pUp = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteAux + Xsqlite3_bind_int64(tls, pUp, 1, *(*Sqlite_int64)(unsafe.Pointer(pRowid))) + jj = 0 +__26: + if !(jj < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux)) { + goto __28 + } + Xsqlite3_bind_value(tls, pUp, jj+2, *(*uintptr)(unsafe.Pointer(aData + uintptr(int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2)+3+jj)*8))) + goto __27 +__27: + jj++ + goto __26 + goto __28 +__28: + ; + Xsqlite3_step(tls, pUp) + rc = Xsqlite3_reset(tls, pUp) +__25: + ; +__20: + ; + +constraint: + rtreeRelease(tls, pRtree) + return rc +} + +// Called when a transaction starts. +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ + var pRtree uintptr = pVtab + + (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ + return SQLITE_OK +} + +// Called when a transaction completes (either by COMMIT or ROLLBACK). +// The sqlite3_blob object should be released at this point. +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ + var pRtree uintptr = pVtab + (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) + nodeBlobReset(tls, pRtree) + return SQLITE_OK +} + +// The xRename method for rtree module virtual tables. +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + var pRtree uintptr = pVtab + var rc int32 = SQLITE_NOMEM + var zSql uintptr = Xsqlite3_mprintf(tls, + + ts+25059, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + if zSql != 0 { + nodeBlobReset(tls, pRtree) + rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_free(tls, zSql) + } + return rc +} + +// The xSavepoint method. +// +// This module does not need to do anything to support savepoints. However, +// it uses this hook to close any open blob handle. This is done because a +// DROP TABLE command - which fortunately always opens a savepoint - cannot +// succeed if there are any open blob handles. i.e. if the blob handle were +// not closed here, the following would fail: +// +// BEGIN; +// INSERT INTO rtree... +// DROP TABLE ; -- Would fail with SQLITE_LOCKED +// COMMIT; +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ + var pRtree uintptr = pVtab + var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans + _ = iSavepoint + (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) + nodeBlobReset(tls, pRtree) + (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = iwt + return SQLITE_OK +} + +// This function populates the pRtree->nRowEst variable with an estimate +// of the number of rows in the virtual table. If possible, this is based +// on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var zFmt uintptr = ts + 25204 /* "SELECT stat FROM..." */ + var zSql uintptr + // var p uintptr at bp+16, 8 + + var rc int32 + var nRow I64 = int64(RTREE_MIN_ROWEST) + + rc = Xsqlite3_table_column_metadata(tls, + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11224, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + if rc != SQLITE_OK { + (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) + if rc == SQLITE_ERROR { + return SQLITE_OK + } + return rc + } + zSql = Xsqlite3_mprintf(tls, zFmt, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16, uintptr(0)) + if rc == SQLITE_OK { + if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) == SQLITE_ROW { + nRow = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)), 0) + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))) + } + Xsqlite3_free(tls, zSql) + } + (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = func() int64 { + if nRow > int64(RTREE_MIN_ROWEST) { + return nRow + } + return int64(RTREE_MIN_ROWEST) + }() + return rc +} + +// Return true if zName is the extension on one of the shadow tables used +// by this module. +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ + var i uint32 + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { + if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { + return 1 + } + } + return 0 +} + +var azName1 = [3]uintptr{ + ts + 25260, ts + 5002, ts + 16165, +} /* sqlite3.c:199260:21 */ + +var rtreeModule = Sqlite3_module{ + FiVersion: 3, // iVersion + FxCreate: 0, // xCreate - create a table + FxConnect: 0, // xConnect - connect to an existing table + FxBestIndex: 0, // xBestIndex - Determine search strategy + FxDisconnect: 0, // xDisconnect - Disconnect from a table + FxDestroy: 0, // xDestroy - Drop a table + FxOpen: 0, // xOpen - open a cursor + FxClose: 0, // xClose - close a cursor + FxFilter: 0, // xFilter - configure scan constraints + FxNext: 0, // xNext - advance a cursor + FxEof: 0, // xEof + FxColumn: 0, // xColumn - read data + FxRowid: 0, // xRowid - read data + FxUpdate: 0, // xUpdate - write data + FxBegin: 0, // xBegin - begin transaction + FxSync: 0, // xSync - sync transaction + FxCommit: 0, // xCommit - commit transaction + FxRollback: 0, // xFindFunction - function overloading + FxRename: 0, // xRename - rename the table + FxSavepoint: 0, // xRollbackTo + FxShadowName: 0, // xShadowName +} /* sqlite3.c:199270:23 */ + +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + var rc int32 = SQLITE_OK + // var appStmt [8]uintptr at bp+168, 64 + + var i int32 + var f int32 = SQLITE_PREPARE_PERSISTENT | SQLITE_PREPARE_NO_VTAB + + (*Rtree)(unsafe.Pointer(pRtree)).Fdb = db + + if isCreate != 0 { + var zCreate uintptr + var p uintptr = Xsqlite3_str_new(tls, db) + var ii int32 + Xsqlite3_str_appendf(tls, p, + ts+25265, + libc.VaList(bp, zDb, zPrefix)) + for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { + Xsqlite3_str_appendf(tls, p, ts+25327, libc.VaList(bp+16, ii)) + } + Xsqlite3_str_appendf(tls, p, + ts+25332, + libc.VaList(bp+24, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, + ts+25396, + libc.VaList(bp+40, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, + ts+25466, + libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) + zCreate = Xsqlite3_str_finish(tls, p) + if !(zCreate != 0) { + return SQLITE_NOMEM + } + rc = Xsqlite3_exec(tls, db, zCreate, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_free(tls, zCreate) + if rc != SQLITE_OK { + return rc + } + } + + *(*uintptr)(unsafe.Pointer(bp + 168)) = pRtree + 120 + *(*uintptr)(unsafe.Pointer(bp + 168 + 1*8)) = pRtree + 128 + *(*uintptr)(unsafe.Pointer(bp + 168 + 2*8)) = pRtree + 136 + *(*uintptr)(unsafe.Pointer(bp + 168 + 3*8)) = pRtree + 144 + *(*uintptr)(unsafe.Pointer(bp + 168 + 4*8)) = pRtree + 152 + *(*uintptr)(unsafe.Pointer(bp + 168 + 5*8)) = pRtree + 160 + *(*uintptr)(unsafe.Pointer(bp + 168 + 6*8)) = pRtree + 168 + *(*uintptr)(unsafe.Pointer(bp + 168 + 7*8)) = pRtree + 176 + + rc = rtreeQueryStat1(tls, db, pRtree) + for i = 0; i < N_STATEMENT && rc == SQLITE_OK; i++ { + var zSql uintptr + var zFormat uintptr + if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { + zFormat = azSql[i] + } else { + // An UPSERT is very slightly slower than REPLACE, but it is needed + // if there are auxiliary columns + zFormat = ts + 25515 /* "INSERT INTO\"%w\"...." */ + } + zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) + if zSql != 0 { + rc = Xsqlite3_prepare_v3(tls, db, zSql, -1, uint32(f), *(*uintptr)(unsafe.Pointer(bp + 168 + uintptr(i)*8)), uintptr(0)) + } else { + rc = SQLITE_NOMEM + } + Xsqlite3_free(tls, zSql) + } + if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { + (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, + ts+25623, + libc.VaList(bp+96, zDb, zPrefix)) + if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var p uintptr = Xsqlite3_str_new(tls, db) + var ii int32 + var zSql uintptr + Xsqlite3_str_appendf(tls, p, ts+25668, libc.VaList(bp+112, zDb, zPrefix)) + for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { + if ii != 0 { + Xsqlite3_str_append(tls, p, ts+12695, 1) + } + if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { + Xsqlite3_str_appendf(tls, p, ts+25695, libc.VaList(bp+128, ii, ii+2, ii)) + } else { + Xsqlite3_str_appendf(tls, p, ts+25717, libc.VaList(bp+152, ii, ii+2)) + } + } + Xsqlite3_str_appendf(tls, p, ts+25725, 0) + zSql = Xsqlite3_str_finish(tls, p) + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + rc = Xsqlite3_prepare_v3(tls, db, zSql, -1, uint32(f), pRtree+184, uintptr(0)) + Xsqlite3_free(tls, zSql) + } + } + } + + return rc +} + +var azSql = [8]uintptr{ + + ts + 25741, + ts + 25794, + + ts + 25839, + ts + 25891, + ts + 25945, + + ts + 25990, + ts + 26048, + ts + 26103, +} /* sqlite3.c:199307:21 */ + +// The second argument to this function contains the text of an SQL statement +// that returns a single integer value. The statement is compiled and executed +// using database connection db. If successful, the integer value returned +// is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error +// code is returned and the value of *piVal after returning is not defined. +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_NOMEM + if zSql != 0 { + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp, uintptr(0)) + if rc == SQLITE_OK { + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { + *(*int32)(unsafe.Pointer(piVal)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + } + } + return rc +} + +// This function is called from within the xConnect() or xCreate() method to +// determine the node-size used by the rtree table being created or connected +// to. If successful, pRtree->iNodeSize is populated and SQLITE_OK returned. +// Otherwise, an SQLite error code is returned. +// +// If this function is being called as part of an xConnect(), then the rtree +// table already exists. In this case the node-size is determined by inspecting +// the root node of the tree. +// +// Otherwise, for an xCreate(), use 64 bytes less than the database page-size. +// This ensures that each node is stored on a single database page. If the +// database page-size is so large that more than RTREE_MAXCELLS entries +// would fit in a single node, use a smaller node-size. +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + var rc int32 + var zSql uintptr + if isCreate != 0 { + *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 + zSql = Xsqlite3_mprintf(tls, ts+26150, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + rc = getIntFromStmt(tls, db, zSql, bp+48) + if rc == SQLITE_OK { + (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 + if 4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS < (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize { + (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS + } + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + } + } else { + zSql = Xsqlite3_mprintf(tls, + ts+26170, + libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + rc = getIntFromStmt(tls, db, zSql, pRtree+32) + if rc != SQLITE_OK { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { + rc = SQLITE_CORRUPT | int32(1)<<8 + + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26227, + libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + } + } + + Xsqlite3_free(tls, zSql) + return rc +} + +// Return the length of a token +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* dummy */)) = 0 + return Xsqlite3GetToken(tls, z, bp) +} + +// This function is the implementation of both the xConnect and xCreate +// methods of the r-tree virtual table. +// +// argv[0] -> module name +// argv[1] -> database name +// argv[2] -> table name +// argv[...] -> column names... +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + var rc int32 + var pRtree uintptr + var nDb int32 // Length of string argv[1] + var nName int32 // Length of string argv[2] + var eCoordType int32 + var pSql uintptr + var zSql uintptr + var ii int32 + var iErr int32 + // var aErrMsg [5]uintptr at bp+96, 40 + + var zArg uintptr + rc = SQLITE_OK + eCoordType = func() int32 { + if pAux != 0 { + return RTREE_COORD_INT32 + } + return RTREE_COORD_REAL32 + }() + ii = 4 + *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ + uintptr(0), // 0 + ts + 26262, + ts + 26305, + ts + 26340, + ts + 26376, + } + + // Aux columns counted by a u8 + if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { + goto __1 + } + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*8)))) + return SQLITE_ERROR +__1: + ; + + Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_CONSTRAINT_SUPPORT, libc.VaList(bp+8, 1)) + + // Allocate the sqlite3_vtab structure + nDb = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) + nName = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + pRtree = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Rtree{}))+uint64(nDb)+uint64(nName)+uint64(2))) + if !!(pRtree != 0) { + goto __2 + } + return SQLITE_NOMEM +__2: + ; + libc.Xmemset(tls, pRtree, 0, uint64(unsafe.Sizeof(Rtree{}))+uint64(nDb)+uint64(nName)+uint64(2)) + (*Rtree)(unsafe.Pointer(pRtree)).FnBusy = U32(1) + (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FpModule = uintptr(unsafe.Pointer(&rtreeModule)) + (*Rtree)(unsafe.Pointer(pRtree)).FzDb = pRtree + 1*968 + (*Rtree)(unsafe.Pointer(pRtree)).FzName = (*Rtree)(unsafe.Pointer(pRtree)).FzDb + uintptr(nDb+1) + (*Rtree)(unsafe.Pointer(pRtree)).FeCoordType = U8(eCoordType) + libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(nDb)) + libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) + + // Create/Connect to the underlying relational database schema. If + // that is successful, call sqlite3_declare_vtab() to configure + // the r-tree table schema. + pSql = Xsqlite3_str_new(tls, db) + Xsqlite3_str_appendf(tls, pSql, ts+26413, + libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) + ii = 4 +__3: + if !(ii < argc) { + goto __5 + } + zArg = *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)) + if !(int32(*(*uint8)(unsafe.Pointer(zArg))) == '+') { + goto __6 + } + (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ + Xsqlite3_str_appendf(tls, pSql, ts+26437, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + goto __7 +__6: + if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { + goto __8 + } + goto __5 + goto __9 +__8: + (*Rtree)(unsafe.Pointer(pRtree)).FnDim2++ + Xsqlite3_str_appendf(tls, pSql, azFormat[eCoordType], + libc.VaList(bp+48, rtreeTokenLength(tls, zArg), zArg)) +__9: + ; +__7: + ; + goto __4 +__4: + ii++ + goto __3 + goto __5 +__5: + ; + Xsqlite3_str_appendf(tls, pSql, ts+26443, 0) + zSql = Xsqlite3_str_finish(tls, pSql) + if !!(zSql != 0) { + goto __10 + } + rc = SQLITE_NOMEM + goto __11 +__10: + if !(ii < argc) { + goto __12 + } + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*8)))) + rc = SQLITE_ERROR + goto __13 +__12: + if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { + goto __14 + } + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) +__14: + ; +__13: + ; +__11: + ; + Xsqlite3_free(tls, zSql) + if !(rc != 0) { + goto __15 + } + goto rtreeInit_fail +__15: + ; + (*Rtree)(unsafe.Pointer(pRtree)).FnDim = U8(int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) / 2) + if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim) < 1) { + goto __16 + } + iErr = 2 + goto __17 +__16: + if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) > RTREE_MAX_DIMENSIONS*2) { + goto __18 + } + iErr = 3 + goto __19 +__18: + if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2)%2 != 0) { + goto __20 + } + iErr = 1 + goto __21 +__20: + iErr = 0 +__21: + ; +__19: + ; +__17: + ; + if !(iErr != 0) { + goto __22 + } + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*8)))) + goto rtreeInit_fail +__22: + ; + (*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell = U8(8 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2)*4) + + // Figure out the node size to use. + rc = getNodeSize(tls, db, pRtree, isCreate, pzErr) + if !(rc != 0) { + goto __23 + } + goto rtreeInit_fail +__23: + ; + rc = rtreeSqlInit(tls, pRtree, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), isCreate) + if !(rc != 0) { + goto __24 + } + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + goto rtreeInit_fail +__24: + ; + + *(*uintptr)(unsafe.Pointer(ppVtab)) = pRtree + return SQLITE_OK + +rtreeInit_fail: + if !(rc == SQLITE_OK) { + goto __25 + } + rc = SQLITE_ERROR +__25: + ; + + rtreeRelease(tls, pRtree) + return rc +} + +var azFormat = [2]uintptr{ts + 26446, ts + 26457} /* sqlite3.c:199583:25 */ + +// Implementation of a scalar function that decodes r-tree nodes to +// human readable strings. This can be used for debugging and analysis. +// +// The scalar function takes two arguments: (1) the number of dimensions +// to the rtree (between 1 and 5, inclusive) and (2) a blob of data containing +// an r-tree node. For a two-dimensional r-tree structure called "rt", to +// deserialize all nodes, a statement like: +// +// SELECT rtreenode(2, data) FROM rt_node; +// +// The human readable string takes the form of a Tcl list with one +// entry for each cell in the r-tree node. Each entry is itself a +// list, containing the 8-byte rowid/pageno followed by the +// *2 coordinates. +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ + bp := tls.Alloc(1072) + defer tls.Free(1072) + + // var node RtreeNode at bp+16, 40 + + // var tree Rtree at bp+56, 968 + + var ii int32 + var nData int32 + var errCode int32 + var pOut uintptr + + _ = nArg + libc.Xmemset(tls, bp+16, 0, uint64(unsafe.Sizeof(RtreeNode{}))) + libc.Xmemset(tls, bp+56, 0, uint64(unsafe.Sizeof(Rtree{}))) + (*Rtree)(unsafe.Pointer(bp + 56 /* &tree */)).FnDim = U8(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apArg)))) + if int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim) < 1 || int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim) > 5 { + return + } + (*Rtree)(unsafe.Pointer(bp + 56 /* &tree */)).FnDim2 = U8(int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim) * 2) + (*Rtree)(unsafe.Pointer(bp + 56 /* &tree */)).FnBytesPerCell = U8(8 + 8*int32((*Rtree)(unsafe.Pointer(bp+56)).FnDim)) + (*RtreeNode)(unsafe.Pointer(bp + 16 /* &node */)).FzData = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) + if (*RtreeNode)(unsafe.Pointer(bp+16)).FzData == uintptr(0) { + return + } + nData = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) + if nData < 4 { + return + } + if nData < readInt16(tls, (*RtreeNode)(unsafe.Pointer(bp+16)).FzData+2)*int32((*Rtree)(unsafe.Pointer(bp+56)).FnBytesPerCell) { + return + } + + pOut = Xsqlite3_str_new(tls, uintptr(0)) + for ii = 0; ii < readInt16(tls, (*RtreeNode)(unsafe.Pointer(bp+16 /* &node */)).FzData+2); ii++ { + // var cell RtreeCell at bp+1024, 48 + + var jj int32 + + nodeGetCell(tls, bp+56, bp+16, ii, bp+1024) + if ii > 0 { + Xsqlite3_str_append(tls, pOut, ts+10796, 1) + } + Xsqlite3_str_appendf(tls, pOut, ts+26467, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { + Xsqlite3_str_appendf(tls, pOut, ts+26473, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + } + Xsqlite3_str_append(tls, pOut, ts+26477, 1) + } + errCode = Xsqlite3_str_errcode(tls, pOut) + Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3_result_error_code(tls, ctx, errCode) +} + +// This routine implements an SQL function that returns the "depth" parameter +// from the front of a blob that is an r-tree node. For example: +// +// SELECT rtreedepth(data) FROM rt_node WHERE nodeno=1; +// +// The depth value is 0 for all nodes other than the root node, and the root +// node always has nodeno=1, so the example above is the primary use for this +// routine. This routine is intended for testing and analysis only. +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ + _ = nArg + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || + Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { + Xsqlite3_result_error(tls, ctx, ts+26479, -1) + } else { + var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) + if zBlob != 0 { + Xsqlite3_result_int(tls, ctx, readInt16(tls, zBlob)) + } else { + Xsqlite3_result_error_nomem(tls, ctx) + } + } +} + +// Context object passed between the various routines that make up the +// implementation of integrity-check function rtreecheck(). +type RtreeCheck1 = struct { + Fdb uintptr + FzDb uintptr + FzTab uintptr + FbInt int32 + FnDim int32 + FpGetNode uintptr + FaCheckMapping [2]uintptr + FnLeaf int32 + FnNonLeaf int32 + Frc int32 + F__ccgo_pad1 [4]byte + FzReport uintptr + FnErr int32 + F__ccgo_pad2 [4]byte +} /* sqlite3.c:199727:9 */ + +// Context object passed between the various routines that make up the +// implementation of integrity-check function rtreecheck(). +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ + +// Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, +// and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ + var rc int32 = Xsqlite3_reset(tls, pStmt) + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc + } +} + +// The second and subsequent arguments to this function are a format string +// and printf style arguments. This function formats the string and attempts +// to compile it as an SQL statement. +// +// If successful, a pointer to the new SQL statement is returned. Otherwise, +// NULL is returned and an error code left in RtreeCheck.rc. +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var ap Va_list + _ = ap + var z uintptr + *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(0) + + ap = va + z = Xsqlite3_vmprintf(tls, zFmt, ap) + + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { + if z == uintptr(0) { + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM + } else { + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_prepare_v2(tls, (*RtreeCheck)(unsafe.Pointer(pCheck)).Fdb, z, -1, bp, uintptr(0)) + } + } + + Xsqlite3_free(tls, z) + _ = ap + return *(*uintptr)(unsafe.Pointer(bp /* pRet */)) +} + +// The second and subsequent arguments to this function are a printf() +// style format string and arguments. This function formats the string and +// appends it to the report being accumuated in pCheck. +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var ap Va_list + _ = ap + ap = va + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FnErr < RTREE_CHECK_MAX_ERROR { + var z uintptr = Xsqlite3_vmprintf(tls, zFmt, ap) + if z == uintptr(0) { + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM + } else { + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26512, + libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { + if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { + return ts + 4004 /* "\n" */ + } + return ts + 1525 /* "" */ + }(), z)) + if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM + } + } + (*RtreeCheck)(unsafe.Pointer(pCheck)).FnErr++ + } + _ = ap +} + +// This function is a no-op if there is already an error code stored +// in the RtreeCheck object indicated by the first argument. NULL is +// returned in this case. +// +// Otherwise, the contents of rtree table node iNode are loaded from +// the database and copied into a buffer obtained from sqlite3_malloc(). +// If no error occurs, a pointer to the buffer is returned and (*pnNode) +// is set to the size of the buffer in bytes. +// +// Or, if an error does occur, NULL is returned and an error code left +// in the RtreeCheck object. The final value of *pnNode is undefined in +// this case. +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pRet uintptr = uintptr(0) // Return value + + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { + (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, + ts+26519, + libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) + } + + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { + Xsqlite3_bind_int64(tls, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode, 1, iNode) + if Xsqlite3_step(tls, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) == SQLITE_ROW { + var nNode int32 = Xsqlite3_column_bytes(tls, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode, 0) + var pNode uintptr = Xsqlite3_column_blob(tls, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode, 0) + pRet = Xsqlite3_malloc64(tls, uint64(nNode)) + if pRet == uintptr(0) { + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM + } else { + libc.Xmemcpy(tls, pRet, pNode, uint64(nNode)) + *(*int32)(unsafe.Pointer(pnNode)) = nNode + } + } + rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { + rtreeCheckAppendMsg(tls, pCheck, ts+26564, libc.VaList(bp+16, iNode)) + } + } + + return pRet +} + +// This function is used to check that the %_parent (if bLeaf==0) or %_rowid +// (if bLeaf==1) table contains a specified entry. The schemas of the +// two tables are: +// +// CREATE TABLE %_parent(nodeno INTEGER PRIMARY KEY, parentnode INTEGER) +// CREATE TABLE %_rowid(rowid INTEGER PRIMARY KEY, nodeno INTEGER, ...) +// +// In both cases, this function checks that there exists an entry with +// IPK value iKey and the second column set to iVal. +// +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + var rc int32 + var pStmt uintptr + *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ + ts + 26596, + ts + 26650, + } + + if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) = rtreeCheckPrepare(tls, pCheck, + *(*uintptr)(unsafe.Pointer(bp + 80 + uintptr(bLeaf)*8)), libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) + } + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc != SQLITE_OK { + return + } + + pStmt = *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) + Xsqlite3_bind_int64(tls, pStmt, 1, iKey) + rc = Xsqlite3_step(tls, pStmt) + if rc == SQLITE_DONE { + rtreeCheckAppendMsg(tls, pCheck, ts+26698, + libc.VaList(bp+16, iKey, iVal, func() uintptr { + if bLeaf != 0 { + return ts + 26743 /* "%_rowid" */ + } + return ts + 26751 /* "%_parent" */ + }())) + } else if rc == SQLITE_ROW { + var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) + if ii != iVal { + rtreeCheckAppendMsg(tls, pCheck, + ts+26760, + libc.VaList(bp+40, iKey, ii, func() uintptr { + if bLeaf != 0 { + return ts + 26743 /* "%_rowid" */ + } + return ts + 26751 /* "%_parent" */ + }(), iKey, iVal)) + } + } + rtreeCheckReset(tls, pCheck, pStmt) +} + +// Argument pCell points to an array of coordinates stored on an rtree page. +// This function checks that the coordinates are internally consistent (no +// x1>x2 conditions) and adds an error message to the RtreeCheck object +// if they are not. +// +// Additionally, if pParent is not NULL, then it is assumed to point to +// the array of coordinates on the parent page that bound the page +// containing pCell. In this case it is also verified that the two +// sets of coordinates are mutually consistent and an error message added +// to the RtreeCheck object if they are not. +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // var c1 RtreeCoord at bp+48, 4 + + // var c2 RtreeCoord at bp+52, 4 + + // var p1 RtreeCoord at bp+56, 4 + + // var p2 RtreeCoord at bp+60, 4 + + var i int32 + + for i = 0; i < (*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim; i++ { + readCoord(tls, pCell+uintptr(4*2*i), bp+48) + readCoord(tls, pCell+uintptr(4*(2*i+1)), bp+52) + + // printf("%e, %e\n", c1.u.f, c2.u.f); + if func() int32 { + if (*RtreeCheck)(unsafe.Pointer(pCheck)).FbInt != 0 { + return libc.Bool32(*(*int32)(unsafe.Pointer(bp + 48)) > *(*int32)(unsafe.Pointer(bp + 52))) + } + return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) + }() != 0 { + rtreeCheckAppendMsg(tls, pCheck, + ts+26818, libc.VaList(bp, i, iCell, iNode)) + } + + if pParent != 0 { + readCoord(tls, pParent+uintptr(4*2*i), bp+56) + readCoord(tls, pParent+uintptr(4*(2*i+1)), bp+60) + + if func() int32 { + if (*RtreeCheck)(unsafe.Pointer(pCheck)).FbInt != 0 { + return libc.Bool32(*(*int32)(unsafe.Pointer(bp + 48)) < *(*int32)(unsafe.Pointer(bp + 56))) + } + return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) < *(*RtreeValue)(unsafe.Pointer(bp + 56))) + }() != 0 || + func() int32 { + if (*RtreeCheck)(unsafe.Pointer(pCheck)).FbInt != 0 { + return libc.Bool32(*(*int32)(unsafe.Pointer(bp + 52)) > *(*int32)(unsafe.Pointer(bp + 60))) + } + return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) + }() != 0 { + rtreeCheckAppendMsg(tls, pCheck, + ts+26866, libc.VaList(bp+24, i, iCell, iNode)) + } + } + } +} + +// Run rtreecheck() checks on node iNode, which is at depth iDepth within +// the r-tree structure. Argument aParent points to the array of coordinates +// that bound node iNode on the parent node. +// +// If any problems are discovered, an error message is appended to the +// report accumulated in the RtreeCheck object. +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + var aNode uintptr = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)) = 0 + + aNode = rtreeCheckGetNode(tls, pCheck, iNode, bp+48) + if aNode != 0 { + if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { + rtreeCheckAppendMsg(tls, pCheck, + ts+26933, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + } else { + var nCell int32 // Number of cells on page + var i int32 // Used to iterate through cells + if aParent == uintptr(0) { + iDepth = readInt16(tls, aNode) + if iDepth > RTREE_MAX_DEPTH { + rtreeCheckAppendMsg(tls, pCheck, ts+26967, libc.VaList(bp+16, iDepth)) + Xsqlite3_free(tls, aNode) + return + } + } + nCell = readInt16(tls, aNode+2) + if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { + rtreeCheckAppendMsg(tls, pCheck, + ts+26997, + libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + } else { + for i = 0; i < nCell; i++ { + var pCell uintptr = aNode + uintptr(4+i*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4)) + var iVal I64 = readInt64(tls, pCell) + rtreeCheckCellCoord(tls, pCheck, iNode, i, pCell+8, aParent) + + if iDepth > 0 { + rtreeCheckMapping(tls, pCheck, 0, iVal, iNode) + rtreeCheckNode(tls, pCheck, iDepth-1, pCell+8, iVal) + (*RtreeCheck)(unsafe.Pointer(pCheck)).FnNonLeaf++ + } else { + rtreeCheckMapping(tls, pCheck, 1, iVal, iNode) + (*RtreeCheck)(unsafe.Pointer(pCheck)).FnLeaf++ + } + } + } + } + Xsqlite3_free(tls, aNode) + } +} + +// The second argument to this function must be either "_rowid" or +// "_parent". This function checks that the number of entries in the +// %_rowid or %_parent table is exactly nExpect. If not, it adds +// an error message to the report in the RtreeCheck object indicated +// by the first argument. +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { + var pCount uintptr + pCount = rtreeCheckPrepare(tls, pCheck, ts+27052, + libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) + if pCount != 0 { + if Xsqlite3_step(tls, pCount) == SQLITE_ROW { + var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) + if nActual != nExpect { + rtreeCheckAppendMsg(tls, pCheck, + ts+27083, libc.VaList(bp+24, zTbl, nExpect, nActual)) + } + } + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) + } + } +} + +// This function does the bulk of the work for the rtree integrity-check. +// It is called by rtreecheck(), which is the SQL function implementation. +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ + bp := tls.Alloc(120) + defer tls.Free(120) + + // var check RtreeCheck at bp+32, 88 + // Common context for various routines + var pStmt uintptr = uintptr(0) // Used to find column count of rtree table + var bEnd int32 = 0 // True if transaction should be closed + var nAux int32 = 0 // Number of extra columns. + + // Initialize the context object + libc.Xmemset(tls, bp+32, 0, uint64(unsafe.Sizeof(RtreeCheck{}))) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Fdb = db + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzDb = zDb + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzTab = zTab + + // If there is not already an open transaction, open one now. This is + // to ensure that the queries run as part of this integrity-check operate + // on a consistent snapshot. + if Xsqlite3_get_autocommit(tls, db) != 0 { + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14431, uintptr(0), uintptr(0), uintptr(0)) + bEnd = 1 + } + + // Find the number of auxiliary columns + if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27150, libc.VaList(bp, zDb, zTab)) + if pStmt != 0 { + nAux = Xsqlite3_column_count(tls, pStmt) - 2 + Xsqlite3_finalize(tls, pStmt) + } else if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc != SQLITE_NOMEM { + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = SQLITE_OK + } + } + + // Find number of dimensions in the rtree table. + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24970, libc.VaList(bp+16, zDb, zTab)) + if pStmt != 0 { + var rc int32 + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 + if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { + rtreeCheckAppendMsg(tls, bp+32, ts+27178, 0) + } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) + } + rc = Xsqlite3_finalize(tls, pStmt) + if rc != SQLITE_CORRUPT { + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc + } + } + + // Do the actual integrity-check + if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim >= 1 { + if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { + rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) + } + rtreeCheckCount(tls, bp+32, ts+27209, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27216, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + } + + // Finalize SQL statements used by the integrity-check + Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FpGetNode) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 40 + 1*8))) + + // If one was opened, close the transaction + if bEnd != 0 { + var rc int32 = Xsqlite3_exec(tls, db, ts+27224, uintptr(0), uintptr(0), uintptr(0)) + if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc + } + } + *(*uintptr)(unsafe.Pointer(pzReport)) = (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzReport + return (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc +} + +// Usage: +// +// rtreecheck(); +// rtreecheck(, ); +// +// Invoking this SQL function runs an integrity-check on the named rtree +// table. The integrity-check verifies the following: +// +// 1. For each cell in the r-tree structure (%_node table), that: +// +// a) for each dimension, (coord1 <= coord2). +// +// b) unless the cell is on the root node, that the cell is bounded +// by the parent cell on the parent node. +// +// c) for leaf nodes, that there is an entry in the %_rowid +// table corresponding to the cell's rowid value that +// points to the correct node. +// +// d) for cells on non-leaf nodes, that there is an entry in the +// %_parent table mapping from the cell's child node to the +// node that it resides on. +// +// 2. That there are the same number of entries in the %_rowid table +// as there are leaf cells in the r-tree structure, and that there +// is a leaf cell that corresponds to each entry in the %_rowid table. +// +// 3. That there are the same number of entries in the %_parent table +// as there are non-leaf cells in the r-tree structure, and that +// there is a non-leaf cell that corresponds to each entry in the +// %_parent table. +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if nArg != 1 && nArg != 2 { + Xsqlite3_result_error(tls, ctx, + ts+27228, -1) + } else { + var rc int32 + *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) + var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg))) + var zTab uintptr + if nArg == 1 { + zTab = zDb + zDb = ts + 6323 /* "main" */ + } else { + zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) + } + rc = rtreeCheckTable(tls, Xsqlite3_context_db_handle(tls, ctx), zDb, zTab, bp) + if rc == SQLITE_OK { + Xsqlite3_result_text(tls, ctx, func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) + } + return ts + 17802 /* "ok" */ + }(), -1, libc.UintptrFromInt32(-1)) + } else { + Xsqlite3_result_error_code(tls, ctx, rc) + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* zReport */))) + } +} + +// Conditionally include the geopoly code +//************* Include geopoly.c in the middle of rtree.c ****************** +//************* Begin file geopoly.c **************************************** +// 2018-05-25 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file implements an alternative R-Tree virtual table that +// uses polygons to express the boundaries of 2-dimensional objects. +// +// This file is #include-ed onto the end of "rtree.c" so that it has +// access to all of the R-Tree internals. +// #include + +// Enable -DGEOPOLY_ENABLE_DEBUG for debugging facilities + +// Character class routines +// Use the SQLite core versions if this routine is part of the +// SQLite amalgamation + +// Compiler and version + +// Datatype for coordinates +type GeoCoord = float32 /* sqlite3.c:200282:15 */ + +// Internal representation of a polygon. +// +// The polygon consists of a sequence of vertexes. There is a line +// segment between each pair of vertexes, and one final segment from +// the last vertex back to the first. (This differs from the GeoJSON +// standard in which the final vertex is a repeat of the first.) +// +// The polygon follows the right-hand rule. The area to the right of +// each segment is "outside" and the area to the left is "inside". +// +// The on-disk representation consists of a 4-byte header followed by +// the values. The 4-byte header is: +// +// encoding (1 byte) 0=big-endian, 1=little-endian +// nvertex (3 bytes) Number of vertexes as a big-endian integer +// +// Enough space is allocated for 4 coordinates, to work around over-zealous +// warnings coming from some compiler (notably, clang). In reality, the size +// of each GeoPoly memory allocate is adjusted as necessary so that the +// GeoPoly.a[] array at the end is the appropriate size. +type GeoPoly1 = struct { + FnVertex int32 + Fhdr [4]uint8 + Fa [8]GeoCoord +} /* sqlite3.c:200306:9 */ + +// Internal representation of a polygon. +// +// The polygon consists of a sequence of vertexes. There is a line +// segment between each pair of vertexes, and one final segment from +// the last vertex back to the first. (This differs from the GeoJSON +// standard in which the final vertex is a repeat of the first.) +// +// The polygon follows the right-hand rule. The area to the right of +// each segment is "outside" and the area to the left is "inside". +// +// The on-disk representation consists of a 4-byte header followed by +// the values. The 4-byte header is: +// +// encoding (1 byte) 0=big-endian, 1=little-endian +// nvertex (3 bytes) Number of vertexes as a big-endian integer +// +// Enough space is allocated for 4 coordinates, to work around over-zealous +// warnings coming from some compiler (notably, clang). In reality, the size +// of each GeoPoly memory allocate is adjusted as necessary so that the +// GeoPoly.a[] array at the end is the appropriate size. +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ + +// The size of a memory allocation needed for a GeoPoly object sufficient +// to hold N coordinate pairs. + +// Macros to access coordinates of a GeoPoly. +// We have to use these macros, rather than just say p->a[i] in order +// to silence (incorrect) UBSAN warnings if the array index is too large. + +// State of a parse of a GeoJSON input. +type GeoParse1 = struct { + Fz uintptr + FnVertex int32 + FnAlloc int32 + FnErr int32 + F__ccgo_pad1 [4]byte + Fa uintptr +} /* sqlite3.c:200329:9 */ + +// The size of a memory allocation needed for a GeoPoly object sufficient +// to hold N coordinate pairs. + +// Macros to access coordinates of a GeoPoly. +// We have to use these macros, rather than just say p->a[i] in order +// to silence (incorrect) UBSAN warnings if the array index is too large. + +// State of a parse of a GeoJSON input. +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ + +// Do a 4-byte byte swap +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ + var t uint8 = *(*uint8)(unsafe.Pointer(a)) + *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) + *(*uint8)(unsafe.Pointer(a + 3)) = t + t = *(*uint8)(unsafe.Pointer(a + 1)) + *(*uint8)(unsafe.Pointer(a + 1)) = *(*uint8)(unsafe.Pointer(a + 2)) + *(*uint8)(unsafe.Pointer(a + 2)) = t +} + +// Skip whitespace. Return the next non-whitespace character. +func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200349:13: */ + for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { + (*GeoParse)(unsafe.Pointer(p)).Fz++ + } + return uint8(*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))) +} + +// Parse out a number. Write the value into *pVal if pVal!=0. +// return non-zero on success and zero if the next token is not a number. +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var c uint8 = geopolySkipSpace(tls, p) + var z uintptr = (*GeoParse)(unsafe.Pointer(p)).Fz + var j int32 = 0 + var seenDP int32 = 0 + var seenE int32 = 0 + if int32(c) == '-' { + j = 1 + c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j)))) + } + if int32(c) == '0' && int32(*(*uint8)(unsafe.Pointer(z + uintptr(j+1)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z + uintptr(j+1)))) <= '9' { + return 0 + } + for ; ; j++ { + c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j)))) + if int32(Xsqlite3CtypeMap[uint8(c)])&0x04 != 0 { + continue + } + if int32(c) == '.' { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j-1)))) == '-' { + return 0 + } + if seenDP != 0 { + return 0 + } + seenDP = 1 + continue + } + if int32(c) == 'e' || int32(c) == 'E' { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j-1)))) < '0' { + return 0 + } + if seenE != 0 { + return -1 + } + seenDP = libc.AssignInt32(&seenE, 1) + c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j+1)))) + if int32(c) == '+' || int32(c) == '-' { + j++ + c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j+1)))) + } + if int32(c) < '0' || int32(c) > '9' { + return 0 + } + continue + } + break + } + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j-1)))) < '0' { + return 0 + } + if pVal != 0 { + // The sqlite3AtoF() routine is much much faster than atof(), if it + // is available + // var r float64 at bp, 8 + + Xsqlite3AtoF(tls, (*GeoParse)(unsafe.Pointer(p)).Fz, bp, j, uint8(SQLITE_UTF8)) + *(*GeoCoord)(unsafe.Pointer(pVal)) = GeoCoord(*(*float64)(unsafe.Pointer(bp /* r */))) + } + *(*uintptr)(unsafe.Pointer(p)) += uintptr(j) + return 1 +} + +// If the input is a well-formed JSON array of coordinates with at least +// four coordinates and where each coordinate is itself a two-value array, +// then convert the JSON into a GeoPoly object and return a pointer to +// that object. +// +// If any error occurs, return NULL. +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + // var s GeoParse at bp, 32 + + var rc int32 + var aNew uintptr + var ii int32 + var c uint8 + var pOut uintptr + // var x int32 at bp+32, 4 + rc = SQLITE_OK + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(GeoParse{}))) + (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fz = z + if !(int32(geopolySkipSpace(tls, bp)) == '[') { + goto __1 + } + (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fz++ +__2: + if !(int32(geopolySkipSpace(tls, bp)) == '[') { + goto __3 + } + ii = 0 + (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fz++ + if !((*GeoParse)(unsafe.Pointer(bp)).FnVertex >= (*GeoParse)(unsafe.Pointer(bp)).FnAlloc) { + goto __4 + } + (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnAlloc = (*GeoParse)(unsafe.Pointer(bp)).FnAlloc*2 + 16 + aNew = Xsqlite3_realloc64(tls, (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fa, uint64(uint64((*GeoParse)(unsafe.Pointer(bp)).FnAlloc)*uint64(unsafe.Sizeof(GeoCoord(0)))*uint64(2))) + if !(aNew == uintptr(0)) { + goto __5 + } + rc = SQLITE_NOMEM + (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnErr++ + goto __3 +__5: + ; + (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fa = aNew +__4: + ; +__6: + if !(geopolyParseNumber(tls, bp, func() uintptr { + if ii <= 1 { + return (*GeoParse)(unsafe.Pointer(bp)).Fa + uintptr((*GeoParse)(unsafe.Pointer(bp)).FnVertex*2+ii)*4 + } + return uintptr(0) + }()) != 0) { + goto __7 + } + ii++ + if !(ii == 2) { + goto __8 + } + (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnVertex++ +__8: + ; + c = geopolySkipSpace(tls, bp) + (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fz++ + if !(int32(c) == ',') { + goto __9 + } + goto __6 +__9: + ; + if !(int32(c) == ']' && ii >= 2) { + goto __10 + } + goto __7 +__10: + ; + (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnErr++ + rc = SQLITE_ERROR + goto parse_json_err + goto __6 +__7: + ; + if !(int32(geopolySkipSpace(tls, bp)) == ',') { + goto __11 + } + (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fz++ + goto __2 +__11: + ; + goto __3 + goto __2 +__3: + ; + if !(int32(geopolySkipSpace(tls, bp)) == ']' && + (*GeoParse)(unsafe.Pointer(bp)).FnVertex >= 4 && + *(*GeoCoord)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(bp)).Fa)) == *(*GeoCoord)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(bp)).Fa + uintptr((*GeoParse)(unsafe.Pointer(bp)).FnVertex*2-2)*4)) && + *(*GeoCoord)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(bp)).Fa + 1*4)) == *(*GeoCoord)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(bp)).Fa + uintptr((*GeoParse)(unsafe.Pointer(bp)).FnVertex*2-1)*4)) && + func() bool { (*GeoParse)(unsafe.Pointer(bp)).Fz++; return int32(geopolySkipSpace(tls, bp)) == 0 }()) { + goto __12 + } + *(*int32)(unsafe.Pointer(bp + 32 /* x */)) = 1 + (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnVertex-- // Remove the redundant vertex at the end + pOut = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(GeoPoly{}))+uint64(unsafe.Sizeof(GeoCoord(0)))*uint64(2)*uint64(Sqlite3_int64((*GeoParse)(unsafe.Pointer(bp)).FnVertex)-int64(4))) + *(*int32)(unsafe.Pointer(bp + 32 /* x */)) = 1 + if !(pOut == uintptr(0)) { + goto __14 + } + goto parse_json_err +__14: + ; + (*GeoPoly)(unsafe.Pointer(pOut)).FnVertex = (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnVertex + libc.Xmemcpy(tls, pOut+8, (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fa, uint64((*GeoParse)(unsafe.Pointer(bp)).FnVertex*2)*uint64(unsafe.Sizeof(GeoCoord(0)))) + *(*uint8)(unsafe.Pointer(pOut + 4)) = *(*uint8)(unsafe.Pointer(bp + 32)) + *(*uint8)(unsafe.Pointer(pOut + 4 + 1)) = uint8((*GeoParse)(unsafe.Pointer(bp)).FnVertex >> 16 & 0xff) + *(*uint8)(unsafe.Pointer(pOut + 4 + 2)) = uint8((*GeoParse)(unsafe.Pointer(bp)).FnVertex >> 8 & 0xff) + *(*uint8)(unsafe.Pointer(pOut + 4 + 3)) = uint8((*GeoParse)(unsafe.Pointer(bp)).FnVertex & 0xff) + Xsqlite3_free(tls, (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fa) + if !(pRc != 0) { + goto __15 + } + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_OK +__15: + ; + return pOut + goto __13 +__12: + (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnErr++ + rc = SQLITE_ERROR +__13: + ; +__1: + ; +parse_json_err: + if !(pRc != 0) { + goto __16 + } + *(*int32)(unsafe.Pointer(pRc)) = rc +__16: + ; + Xsqlite3_free(tls, (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fa) + return uintptr(0) +} + +// Given a function parameter, try to interpret it as a polygon, either +// in the binary format or JSON text. Compute a GeoPoly object and +// return a pointer to that object. Or if the input is not a well-formed +// polygon, put an error message in sqlite3_context and return NULL. +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var p uintptr = uintptr(0) + var nByte int32 + + if Xsqlite3_value_type(tls, pVal) == SQLITE_BLOB && + uint64(libc.AssignInt32(&nByte, Xsqlite3_value_bytes(tls, pVal))) >= uint64(4)+uint64(6)*uint64(unsafe.Sizeof(GeoCoord(0))) { + var a uintptr = Xsqlite3_value_blob(tls, pVal) + var nVertex int32 + if a == uintptr(0) { + if pCtx != 0 { + Xsqlite3_result_error_nomem(tls, pCtx) + } + return uintptr(0) + } + nVertex = int32(*(*uint8)(unsafe.Pointer(a + 1)))<<16 + int32(*(*uint8)(unsafe.Pointer(a + 2)))<<8 + int32(*(*uint8)(unsafe.Pointer(a + 3))) + if (int32(*(*uint8)(unsafe.Pointer(a))) == 0 || int32(*(*uint8)(unsafe.Pointer(a))) == 1) && + uint64(nVertex*2)*uint64(unsafe.Sizeof(GeoCoord(0)))+uint64(4) == uint64(uint32(nByte)) { + p = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(GeoPoly{}))+uint64((nVertex-1)*2)*uint64(unsafe.Sizeof(GeoCoord(0))))) + if p == uintptr(0) { + if pRc != 0 { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + if pCtx != 0 { + Xsqlite3_result_error_nomem(tls, pCtx) + } + } else { + *(*int32)(unsafe.Pointer(bp /* x */)) = 1 + (*GeoPoly)(unsafe.Pointer(p)).FnVertex = nVertex + libc.Xmemcpy(tls, p+4, a, uint64(nByte)) + if int32(*(*uint8)(unsafe.Pointer(a))) != int32(*(*uint8)(unsafe.Pointer(bp))) { + var ii int32 + for ii = 0; ii < nVertex; ii++ { + geopolySwab32(tls, p+8+uintptr(ii*2)*4) + geopolySwab32(tls, p+8+uintptr(ii*2+1)*4) + } + *(*uint8)(unsafe.Pointer(p + 4)) ^= uint8(1) + } + } + } + if pRc != 0 { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_OK + } + return p + } else if Xsqlite3_value_type(tls, pVal) == SQLITE_TEXT { + var zJson uintptr = Xsqlite3_value_text(tls, pVal) + if zJson == uintptr(0) { + if pRc != 0 { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + return uintptr(0) + } + return geopolyParseJson(tls, zJson, pRc) + } else { + if pRc != 0 { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_ERROR + } + return uintptr(0) + } + return uintptr(0) +} + +// Implementation of the geopoly_blob(X) function. +// +// If the input is a well-formed Geopoly BLOB or JSON string +// then return the BLOB representation of the polygon. Otherwise +// return NULL. +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ + var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + if p != 0 { + Xsqlite3_result_blob(tls, context, p+4, + 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) + Xsqlite3_free(tls, p) + } +} + +// SQL function: geopoly_json(X) +// +// Interpret X as a polygon and render it as a JSON array +// of coordinates. Or, if X is not a valid polygon, return NULL. +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + if p != 0 { + var db uintptr = Xsqlite3_context_db_handle(tls, context) + var x uintptr = Xsqlite3_str_new(tls, db) + var i int32 + Xsqlite3_str_append(tls, x, ts+27279, 1) + for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { + Xsqlite3_str_appendf(tls, x, ts+27281, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + } + Xsqlite3_str_appendf(tls, x, ts+27292, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3_free(tls, p) + } +} + +// SQL function: geopoly_svg(X, ....) +// +// Interpret X as a polygon and render it as a SVG . +// Additional arguments are added as attributes to the . +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var p uintptr + if argc < 1 { + return + } + p = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + if p != 0 { + var db uintptr = Xsqlite3_context_db_handle(tls, context) + var x uintptr = Xsqlite3_str_new(tls, db) + var i int32 + var cSep uint8 = uint8('\'') + Xsqlite3_str_appendf(tls, x, ts+27303, 0) + for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { + Xsqlite3_str_appendf(tls, x, ts+27321, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + cSep = uint8(' ') + } + Xsqlite3_str_appendf(tls, x, ts+27329, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + for i = 1; i < argc; i++ { + var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + if z != 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { + Xsqlite3_str_appendf(tls, x, ts+27337, libc.VaList(bp+40, z)) + } + } + Xsqlite3_str_appendf(tls, x, ts+27341, 0) + Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3_free(tls, p) + } +} + +// SQL Function: geopoly_xform(poly, A, B, C, D, E, F) +// +// Transform and/or translate a polygon as follows: +// +// x1 = A*x0 + B*y0 + E +// y1 = C*x0 + D*y0 + F +// +// For a translation: +// +// geopoly_xform(poly, 1, 0, 0, 1, x-offset, y-offset) +// +// Rotate by R around the point (0,0): +// +// geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ + var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + var C float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) + var D float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) + var E float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) + var F float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8))) + var x1 GeoCoord + var y1 GeoCoord + var x0 GeoCoord + var y0 GeoCoord + var ii int32 + if p != 0 { + for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; ii++ { + x0 = *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2)*4)) + y0 = *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2+1)*4)) + x1 = GeoCoord(A*float64(x0) + B*float64(y0) + E) + y1 = GeoCoord(C*float64(x0) + D*float64(y0) + F) + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2)*4)) = x1 + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2+1)*4)) = y1 + } + Xsqlite3_result_blob(tls, context, p+4, + 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) + Xsqlite3_free(tls, p) + } +} + +// Compute the area enclosed by the polygon. +// +// This routine can also be used to detect polygons that rotate in +// the wrong direction. Polygons are suppose to be counter-clockwise (CCW). +// This routine returns a negative value for clockwise (CW) polygons. +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ + var rArea float64 = 0.0 + var ii int32 + for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { + rArea = rArea + float64((*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2)*4))-*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr((ii+1)*2)*4)))* + (*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2+1)*4))+*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr((ii+1)*2+1)*4))))* + 0.5 + } + rArea = rArea + float64((*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2)*4))-*(*GeoCoord)(unsafe.Pointer(p + 8)))* + (*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2+1)*4))+*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))* + 0.5 + return rArea +} + +// Implementation of the geopoly_area(X) function. +// +// If the input is a well-formed Geopoly BLOB then return the area +// enclosed by the polygon. If the polygon circulates clockwise instead +// of counterclockwise (as it should) then return the negative of the +// enclosed area. Otherwise return NULL. +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ + var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + if p != 0 { + Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) + Xsqlite3_free(tls, p) + } +} + +// Implementation of the geopoly_ccw(X) function. +// +// If the rotation of polygon X is clockwise (incorrect) instead of +// counter-clockwise (the correct winding order according to RFC7946) +// then reverse the order of the vertexes in polygon X. +// +// In other words, this routine returns a CCW polygon regardless of the +// winding order of its input. +// +// Use this routine to sanitize historical inputs that that sometimes +// contain polygons that wind in the wrong direction. +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ + var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + if p != 0 { + if geopolyArea(tls, p) < 0.0 { + var ii int32 + var jj int32 + ii = 1 + jj = (*GeoPoly)(unsafe.Pointer(p)).FnVertex - 1 + __1: + if !(ii < jj) { + goto __3 + } + { + var t GeoCoord = *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2)*4)) + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2)*4)) = *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(jj*2)*4)) + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(jj*2)*4)) = t + t = *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2+1)*4)) + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2+1)*4)) = *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(jj*2+1)*4)) + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(jj*2+1)*4)) = t + + } + goto __2 + __2: + ii++ + jj-- + goto __1 + goto __3 + __3: + } + Xsqlite3_result_blob(tls, context, p+4, + 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) + Xsqlite3_free(tls, p) + } +} + +// Fast approximation for sine(X) for X between -0.5*pi and 2*pi +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ + + if r >= float64(1.5)*3.1415926535897932385 { + r = r - float64(2.0)*3.1415926535897932385 + } + if r >= float64(0.5)*3.1415926535897932385 { + return -geopolySine(tls, r-3.1415926535897932385) + } else { + var r2 float64 = r * r + var r3 float64 = r2 * r + var r5 float64 = r3 * r2 + return 0.9996949*r - 0.1656700*r3 + 0.0075134*r5 + } + return float64(0) +} + +// Function: geopoly_regular(X,Y,R,N) +// +// Construct a simple, convex, regular polygon centered at X, Y +// with circumradius R and with N sides. +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var x float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + var y float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + var r float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + var n int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) + // var i int32 at bp, 4 + + var p uintptr + + if n < 3 || r <= 0.0 { + return + } + if n > 1000 { + n = 1000 + } + p = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(GeoPoly{}))+uint64((n-1)*2)*uint64(unsafe.Sizeof(GeoCoord(0))))) + if p == uintptr(0) { + Xsqlite3_result_error_nomem(tls, context) + return + } + *(*int32)(unsafe.Pointer(bp /* i */)) = 1 + *(*uint8)(unsafe.Pointer(p + 4)) = *(*uint8)(unsafe.Pointer(bp)) + *(*uint8)(unsafe.Pointer(p + 4 + 1)) = uint8(0) + *(*uint8)(unsafe.Pointer(p + 4 + 2)) = uint8(n >> 8 & 0xff) + *(*uint8)(unsafe.Pointer(p + 4 + 3)) = uint8(n & 0xff) + for *(*int32)(unsafe.Pointer(bp /* i */)) = 0; *(*int32)(unsafe.Pointer(bp /* i */)) < n; *(*int32)(unsafe.Pointer(bp /* i */))++ { + var rAngle float64 = float64(2.0) * 3.1415926535897932385 * float64(*(*int32)(unsafe.Pointer(bp))) / float64(n) + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(*(*int32)(unsafe.Pointer(bp))*2)*4)) = GeoCoord(x - r*geopolySine(tls, rAngle-float64(0.5)*3.1415926535897932385)) + *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(*(*int32)(unsafe.Pointer(bp))*2+1)*4)) = GeoCoord(y + r*geopolySine(tls, rAngle)) + } + Xsqlite3_result_blob(tls, context, p+4, 4+8*n, libc.UintptrFromInt32(-1)) + Xsqlite3_free(tls, p) +} + +// If pPoly is a polygon, compute its bounding box. Then: +// +// (1) if aCoord!=0 store the bounding box in aCoord, returning NULL +// (2) otherwise, compute a GeoPoly for the bounding box and return the +// new GeoPoly +// +// If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from +// the bounding box in aCoord and return a pointer to that GeoPoly. +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pOut uintptr + var p uintptr + var mnX float32 + var mxX float32 + var mnY float32 + var mxY float32 + var r float64 + // var ii int32 at bp, 4 + pOut = uintptr(0) + if !(pPoly == uintptr(0) && aCoord != uintptr(0)) { + goto __1 + } + p = uintptr(0) + mnX = *(*RtreeValue)(unsafe.Pointer(aCoord)) + mxX = *(*RtreeValue)(unsafe.Pointer(aCoord + 1*4)) + mnY = *(*RtreeValue)(unsafe.Pointer(aCoord + 2*4)) + mxY = *(*RtreeValue)(unsafe.Pointer(aCoord + 3*4)) + goto geopolyBboxFill + goto __2 +__1: + p = geopolyFuncParam(tls, context, pPoly, pRc) +__2: + ; + if !(p != 0) { + goto __3 + } + mnX = libc.AssignFloat32(&mxX, *(*GeoCoord)(unsafe.Pointer(p + 8))) + mnY = libc.AssignFloat32(&mxY, *(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))) + *(*int32)(unsafe.Pointer(bp /* ii */)) = 1 +__5: + if !(*(*int32)(unsafe.Pointer(bp)) < (*GeoPoly)(unsafe.Pointer(p)).FnVertex) { + goto __7 + } + r = float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(*(*int32)(unsafe.Pointer(bp))*2)*4))) + if !(r < float64(mnX)) { + goto __8 + } + mnX = float32(r) + goto __9 +__8: + if !(r > float64(mxX)) { + goto __10 + } + mxX = float32(r) +__10: + ; +__9: + ; + r = float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(*(*int32)(unsafe.Pointer(bp))*2+1)*4))) + if !(r < float64(mnY)) { + goto __11 + } + mnY = float32(r) + goto __12 +__11: + if !(r > float64(mxY)) { + goto __13 + } + mxY = float32(r) +__13: + ; +__12: + ; + goto __6 +__6: + *(*int32)(unsafe.Pointer(bp /* ii */))++ + goto __5 + goto __7 +__7: + ; + if !(pRc != 0) { + goto __14 + } + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_OK +__14: + ; + if !(aCoord == uintptr(0)) { + goto __15 + } +geopolyBboxFill: + pOut = Xsqlite3_realloc64(tls, p, uint64(unsafe.Sizeof(GeoPoly{}))+uint64(unsafe.Sizeof(GeoCoord(0)))*uint64(2)*uint64(4-4)) + if !(pOut == uintptr(0)) { + goto __17 + } + Xsqlite3_free(tls, p) + if !(context != 0) { + goto __18 + } + Xsqlite3_result_error_nomem(tls, context) +__18: + ; + if !(pRc != 0) { + goto __19 + } + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM +__19: + ; + return uintptr(0) +__17: + ; + (*GeoPoly)(unsafe.Pointer(pOut)).FnVertex = 4 + *(*int32)(unsafe.Pointer(bp /* ii */)) = 1 + *(*uint8)(unsafe.Pointer(pOut + 4)) = *(*uint8)(unsafe.Pointer(bp)) + *(*uint8)(unsafe.Pointer(pOut + 4 + 1)) = uint8(0) + *(*uint8)(unsafe.Pointer(pOut + 4 + 2)) = uint8(0) + *(*uint8)(unsafe.Pointer(pOut + 4 + 3)) = uint8(4) + *(*GeoCoord)(unsafe.Pointer(pOut + 8)) = mnX + *(*GeoCoord)(unsafe.Pointer(pOut + 8 + 1*4)) = mnY + *(*GeoCoord)(unsafe.Pointer(pOut + 8 + 2*4)) = mxX + *(*GeoCoord)(unsafe.Pointer(pOut + 8 + 3*4)) = mnY + *(*GeoCoord)(unsafe.Pointer(pOut + 8 + 4*4)) = mxX + *(*GeoCoord)(unsafe.Pointer(pOut + 8 + 5*4)) = mxY + *(*GeoCoord)(unsafe.Pointer(pOut + 8 + 6*4)) = mnX + *(*GeoCoord)(unsafe.Pointer(pOut + 8 + 7*4)) = mxY + goto __16 +__15: + Xsqlite3_free(tls, p) + *(*RtreeValue)(unsafe.Pointer(aCoord)) = mnX + *(*RtreeValue)(unsafe.Pointer(aCoord + 1*4)) = mxX + *(*RtreeValue)(unsafe.Pointer(aCoord + 2*4)) = mnY + *(*RtreeValue)(unsafe.Pointer(aCoord + 3*4)) = mxY +__16: + ; + goto __4 +__3: + if !(aCoord != 0) { + goto __20 + } + libc.Xmemset(tls, aCoord, 0, uint64(unsafe.Sizeof(RtreeCoord{}))*uint64(4)) +__20: + ; +__4: + ; + return pOut +} + +// Implementation of the geopoly_bbox(X) SQL function. +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ + var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) + if p != 0 { + Xsqlite3_result_blob(tls, context, p+4, + 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) + Xsqlite3_free(tls, p) + } +} + +// State vector for the geopoly_group_bbox() aggregate function. +type GeoBBox1 = struct { + FisInit int32 + Fa [4]RtreeCoord +} /* sqlite3.c:200907:9 */ + +// State vector for the geopoly_group_bbox() aggregate function. +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ + +// Implementation of the geopoly_group_bbox(X) aggregate SQL function. +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + // var a [4]RtreeCoord at bp, 16 + + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), bp, bp+16) + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + var pBBox uintptr + pBBox = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(GeoBBox{}))) + if pBBox == uintptr(0) { + return + } + if (*GeoBBox)(unsafe.Pointer(pBBox)).FisInit == 0 { + (*GeoBBox)(unsafe.Pointer(pBBox)).FisInit = 1 + libc.Xmemcpy(tls, pBBox+4, bp, uint64(unsafe.Sizeof(RtreeCoord{}))*uint64(4)) + } else { + if *(*RtreeValue)(unsafe.Pointer(bp)) < *(*RtreeValue)(unsafe.Pointer(pBBox + 4)) { + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4)) = *(*RtreeCoord)(unsafe.Pointer(bp)) + } + if *(*RtreeValue)(unsafe.Pointer(bp + 1*4)) > *(*RtreeValue)(unsafe.Pointer(pBBox + 4 + 1*4)) { + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 1*4)) = *(*RtreeCoord)(unsafe.Pointer(bp + 1*4)) + } + if *(*RtreeValue)(unsafe.Pointer(bp + 2*4)) < *(*RtreeValue)(unsafe.Pointer(pBBox + 4 + 2*4)) { + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 2*4)) = *(*RtreeCoord)(unsafe.Pointer(bp + 2*4)) + } + if *(*RtreeValue)(unsafe.Pointer(bp + 3*4)) > *(*RtreeValue)(unsafe.Pointer(pBBox + 4 + 3*4)) { + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 3*4)) = *(*RtreeCoord)(unsafe.Pointer(bp + 3*4)) + } + } + } +} + +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ + var p uintptr + var pBBox uintptr + pBBox = Xsqlite3_aggregate_context(tls, context, 0) + if pBBox == uintptr(0) { + return + } + p = geopolyBBox(tls, context, uintptr(0), pBBox+4, uintptr(0)) + if p != 0 { + Xsqlite3_result_blob(tls, context, p+4, + 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) + Xsqlite3_free(tls, p) + } +} + +// Determine if point (x0,y0) is beneath line segment (x1,y1)->(x2,y2). +// Returns: +// +// +2 x0,y0 is on the line segement +// +// +1 x0,y0 is beneath line segment +// +// 0 x0,y0 is not on or beneath the line segment or the line segment +// is vertical and x0,y0 is not on the line segment +// +// The left-most coordinate min(x1,x2) is not considered to be part of +// the line segment for the purposes of this analysis. +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ + var y float64 + if x0 == x1 && y0 == y1 { + return 2 + } + if x1 < x2 { + if x0 <= x1 || x0 > x2 { + return 0 + } + } else if x1 > x2 { + if x0 <= x2 || x0 > x1 { + return 0 + } + } else { + // Vertical line segment + if x0 != x1 { + return 0 + } + if y0 < y1 && y0 < y2 { + return 0 + } + if y0 > y1 && y0 > y2 { + return 0 + } + return 2 + } + y = y1 + (y2-y1)*(x0-x1)/(x2-x1) + if y0 == y { + return 2 + } + if y0 < y { + return 1 + } + return 0 +} + +// SQL function: geopoly_contains_point(P,X,Y) +// +// Return +2 if point X,Y is within polygon P. +// Return +1 if point X,Y is on the polygon boundary. +// Return 0 if point X,Y is outside the polygon +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ + var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + var v int32 = 0 + var cnt int32 = 0 + var ii int32 + if p1 == uintptr(0) { + return + } + for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p1)).FnVertex-1; ii++ { + v = pointBeneathLine(tls, x0, y0, float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8 + uintptr(ii*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8 + uintptr(ii*2+1)*4))), + float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8 + uintptr((ii+1)*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8 + uintptr((ii+1)*2+1)*4)))) + if v == 2 { + break + } + cnt = cnt + v + } + if v != 2 { + v = pointBeneathLine(tls, x0, y0, float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8 + uintptr(ii*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8 + uintptr(ii*2+1)*4))), + float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p1 + 8 + 1*4)))) + } + if v == 2 { + Xsqlite3_result_int(tls, context, 1) + } else if (v+cnt)&1 == 0 { + Xsqlite3_result_int(tls, context, 0) + } else { + Xsqlite3_result_int(tls, context, 2) + } + Xsqlite3_free(tls, p1) +} + +// SQL function: geopoly_within(P1,P2) +// +// Return +2 if P1 and P2 are the same polygon +// Return +1 if P2 is contained within P1 +// Return 0 if any part of P2 is on the outside of P1 +// +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ + var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) + if p1 != 0 && p2 != 0 { + var x int32 = geopolyOverlap(tls, p1, p2) + if x < 0 { + Xsqlite3_result_error_nomem(tls, context) + } else { + Xsqlite3_result_int(tls, context, func() int32 { + if x == 2 { + return 1 + } + return func() int32 { + if x == 4 { + return 2 + } + return 0 + }() + }()) + } + } + Xsqlite3_free(tls, p1) + Xsqlite3_free(tls, p2) +} + +// Objects used by the overlap algorihm. +type GeoEvent1 = struct { + Fx float64 + FeType int32 + F__ccgo_pad1 [4]byte + FpSeg uintptr + FpNext uintptr +} /* sqlite3.c:201064:9 */ + +// Objects used by the overlap algorihm. +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ +type GeoSegment1 = struct { + FC float64 + FB float64 + Fy float64 + Fy0 float32 + Fside uint8 + F__ccgo_pad1 [3]byte + Fidx uint32 + F__ccgo_pad2 [4]byte + FpNext uintptr +} /* sqlite3.c:201064:9 */ + +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ +type GeoOverlap1 = struct { + FaEvent uintptr + FaSegment uintptr + FnEvent int32 + FnSegment int32 +} /* sqlite3.c:201066:9 */ + +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ + +// Add a single segment and its associated events. +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ + var pSeg uintptr + var pEvent uintptr + if x0 == x1 { + return + } // Ignore vertical segments + if x0 > x1 { + var t GeoCoord = x0 + x0 = x1 + x1 = t + t = y0 + y0 = y1 + y1 = t + } + pSeg = (*GeoOverlap)(unsafe.Pointer(p)).FaSegment + uintptr((*GeoOverlap)(unsafe.Pointer(p)).FnSegment)*48 + (*GeoOverlap)(unsafe.Pointer(p)).FnSegment++ + (*GeoSegment)(unsafe.Pointer(pSeg)).FC = float64((y1 - y0) / (x1 - x0)) + (*GeoSegment)(unsafe.Pointer(pSeg)).FB = float64(y1) - float64(x1)*(*GeoSegment)(unsafe.Pointer(pSeg)).FC + (*GeoSegment)(unsafe.Pointer(pSeg)).Fy0 = y0 + (*GeoSegment)(unsafe.Pointer(pSeg)).Fside = side + (*GeoSegment)(unsafe.Pointer(pSeg)).Fidx = idx + pEvent = (*GeoOverlap)(unsafe.Pointer(p)).FaEvent + uintptr((*GeoOverlap)(unsafe.Pointer(p)).FnEvent)*32 + (*GeoOverlap)(unsafe.Pointer(p)).FnEvent++ + (*GeoEvent)(unsafe.Pointer(pEvent)).Fx = float64(x0) + (*GeoEvent)(unsafe.Pointer(pEvent)).FeType = 0 + (*GeoEvent)(unsafe.Pointer(pEvent)).FpSeg = pSeg + pEvent = (*GeoOverlap)(unsafe.Pointer(p)).FaEvent + uintptr((*GeoOverlap)(unsafe.Pointer(p)).FnEvent)*32 + (*GeoOverlap)(unsafe.Pointer(p)).FnEvent++ + (*GeoEvent)(unsafe.Pointer(pEvent)).Fx = float64(x1) + (*GeoEvent)(unsafe.Pointer(pEvent)).FeType = 1 + (*GeoEvent)(unsafe.Pointer(pEvent)).FpSeg = pSeg +} + +// Insert all segments and events for polygon pPoly. +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ + var i uint32 + var x uintptr + for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { + x = pPoly + 8 + uintptr(i*uint32(2))*4 + geopolyAddOneSegment(tls, p, *(*GeoCoord)(unsafe.Pointer(x)), *(*GeoCoord)(unsafe.Pointer(x + 1*4)), *(*GeoCoord)(unsafe.Pointer(x + 2*4)), *(*GeoCoord)(unsafe.Pointer(x + 3*4)), side, i) + } + x = pPoly + 8 + uintptr(i*uint32(2))*4 + geopolyAddOneSegment(tls, p, *(*GeoCoord)(unsafe.Pointer(x)), *(*GeoCoord)(unsafe.Pointer(x + 1*4)), *(*GeoCoord)(unsafe.Pointer(pPoly + 8)), *(*GeoCoord)(unsafe.Pointer(pPoly + 8 + 1*4)), side, i) +} + +// Merge two lists of sorted events by X coordinate +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + // var head GeoEvent at bp, 32 + + var pLast uintptr + (*GeoEvent)(unsafe.Pointer(bp /* &head */)).FpNext = uintptr(0) + pLast = bp /* &head */ + for pRight != 0 && pLeft != 0 { + if (*GeoEvent)(unsafe.Pointer(pRight)).Fx <= (*GeoEvent)(unsafe.Pointer(pLeft)).Fx { + (*GeoEvent)(unsafe.Pointer(pLast)).FpNext = pRight + pLast = pRight + pRight = (*GeoEvent)(unsafe.Pointer(pRight)).FpNext + } else { + (*GeoEvent)(unsafe.Pointer(pLast)).FpNext = pLeft + pLast = pLeft + pLeft = (*GeoEvent)(unsafe.Pointer(pLeft)).FpNext + } + } + (*GeoEvent)(unsafe.Pointer(pLast)).FpNext = func() uintptr { + if pRight != 0 { + return pRight + } + return pLeft + }() + return (*GeoEvent)(unsafe.Pointer(bp /* &head */)).FpNext +} + +// Sort an array of nEvent event objects into a list. +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ + bp := tls.Alloc(400) + defer tls.Free(400) + + var mx int32 = 0 + var i int32 + var j int32 + var p uintptr + // var a [50]uintptr at bp, 400 + + for i = 0; i < nEvent; i++ { + p = aEvent + uintptr(i)*32 + (*GeoEvent)(unsafe.Pointer(p)).FpNext = uintptr(0) + for j = 0; j < mx && *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(j)*8)) != 0; j++ { + p = geopolyEventMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(j)*8)), p) + *(*uintptr)(unsafe.Pointer(bp + uintptr(j)*8)) = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(bp + uintptr(j)*8)) = p + if j >= mx { + mx = j + 1 + } + } + p = uintptr(0) + for i = 0; i < mx; i++ { + p = geopolyEventMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), p) + } + return p +} + +// Merge two lists of sorted segments by Y, and then by C. +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var head GeoSegment at bp, 48 + + var pLast uintptr + (*GeoSegment)(unsafe.Pointer(bp /* &head */)).FpNext = uintptr(0) + pLast = bp /* &head */ + for pRight != 0 && pLeft != 0 { + var r float64 = (*GeoSegment)(unsafe.Pointer(pRight)).Fy - (*GeoSegment)(unsafe.Pointer(pLeft)).Fy + if r == 0.0 { + r = (*GeoSegment)(unsafe.Pointer(pRight)).FC - (*GeoSegment)(unsafe.Pointer(pLeft)).FC + } + if r < 0.0 { + (*GeoSegment)(unsafe.Pointer(pLast)).FpNext = pRight + pLast = pRight + pRight = (*GeoSegment)(unsafe.Pointer(pRight)).FpNext + } else { + (*GeoSegment)(unsafe.Pointer(pLast)).FpNext = pLeft + pLast = pLeft + pLeft = (*GeoSegment)(unsafe.Pointer(pLeft)).FpNext + } + } + (*GeoSegment)(unsafe.Pointer(pLast)).FpNext = func() uintptr { + if pRight != 0 { + return pRight + } + return pLeft + }() + return (*GeoSegment)(unsafe.Pointer(bp /* &head */)).FpNext +} + +// Sort a list of GeoSegments in order of increasing Y and in the event of +// a tie, increasing C (slope). +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ + bp := tls.Alloc(400) + defer tls.Free(400) + + var mx int32 = 0 + var i int32 + var p uintptr + // var a [50]uintptr at bp, 400 + + for pList != 0 { + p = pList + pList = (*GeoSegment)(unsafe.Pointer(pList)).FpNext + (*GeoSegment)(unsafe.Pointer(p)).FpNext = uintptr(0) + for i = 0; i < mx && *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*8)) != 0; i++ { + p = geopolySegmentMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), p) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = p + if i >= mx { + mx = i + 1 + } + } + p = uintptr(0) + for i = 0; i < mx; i++ { + p = geopolySegmentMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), p) + } + return p +} + +// Determine the overlap between two polygons +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var nVertex Sqlite3_int64 + var p uintptr + var nByte Sqlite3_int64 + var pThisEvent uintptr + var rX float64 + var rc int32 + var needSort int32 + var pActive uintptr + var pSeg uintptr + // var aOverlap [4]uint8 at bp, 4 + + var y float64 + var pPrev uintptr + var iMask int32 + nVertex = Sqlite3_int64((*GeoPoly)(unsafe.Pointer(p1)).FnVertex + (*GeoPoly)(unsafe.Pointer(p2)).FnVertex + 2) + rc = 0 + needSort = 0 + pActive = uintptr(0) + + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(GeoEvent{}))*uint64(nVertex)*uint64(2) + + uint64(unsafe.Sizeof(GeoSegment{}))*uint64(nVertex) + + uint64(unsafe.Sizeof(GeoOverlap{}))) + p = Xsqlite3_malloc64(tls, uint64(nByte)) + if !(p == uintptr(0)) { + goto __1 + } + return -1 +__1: + ; + (*GeoOverlap)(unsafe.Pointer(p)).FaEvent = p + 1*24 + (*GeoOverlap)(unsafe.Pointer(p)).FaSegment = (*GeoOverlap)(unsafe.Pointer(p)).FaEvent + uintptr(nVertex*int64(2))*32 + (*GeoOverlap)(unsafe.Pointer(p)).FnEvent = libc.AssignPtrInt32(p+20, 0) + geopolyAddSegments(tls, p, p1, uint8(1)) + geopolyAddSegments(tls, p, p2, uint8(2)) + pThisEvent = geopolySortEventsByX(tls, (*GeoOverlap)(unsafe.Pointer(p)).FaEvent, (*GeoOverlap)(unsafe.Pointer(p)).FnEvent) + if pThisEvent != 0 && (*GeoEvent)(unsafe.Pointer(pThisEvent)).Fx == 0.0 { + rX = -1.0 + } else { + rX = 0.0 + } + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([4]uint8{}))) +__2: + if !(pThisEvent != 0) { + goto __3 + } + if !((*GeoEvent)(unsafe.Pointer(pThisEvent)).Fx != rX) { + goto __4 + } + pPrev = uintptr(0) + iMask = 0 + + rX = (*GeoEvent)(unsafe.Pointer(pThisEvent)).Fx + if !(needSort != 0) { + goto __5 + } + + pActive = geopolySortSegmentsByYAndC(tls, pActive) + needSort = 0 +__5: + ; + pSeg = pActive +__6: + if !(pSeg != 0) { + goto __8 + } + if !(pPrev != 0) { + goto __9 + } + if !((*GeoSegment)(unsafe.Pointer(pPrev)).Fy != (*GeoSegment)(unsafe.Pointer(pSeg)).Fy) { + goto __10 + } + + *(*uint8)(unsafe.Pointer(bp + uintptr(iMask))) = uint8(1) +__10: + ; +__9: + ; + iMask = iMask ^ int32((*GeoSegment)(unsafe.Pointer(pSeg)).Fside) + pPrev = pSeg + goto __7 +__7: + pSeg = (*GeoSegment)(unsafe.Pointer(pSeg)).FpNext + goto __6 + goto __8 +__8: + ; + pPrev = uintptr(0) + pSeg = pActive +__11: + if !(pSeg != 0) { + goto __13 + } + y = (*GeoSegment)(unsafe.Pointer(pSeg)).FC*rX + (*GeoSegment)(unsafe.Pointer(pSeg)).FB + + (*GeoSegment)(unsafe.Pointer(pSeg)).Fy = y + if !(pPrev != 0) { + goto __14 + } + if !((*GeoSegment)(unsafe.Pointer(pPrev)).Fy > (*GeoSegment)(unsafe.Pointer(pSeg)).Fy && int32((*GeoSegment)(unsafe.Pointer(pPrev)).Fside) != int32((*GeoSegment)(unsafe.Pointer(pSeg)).Fside)) { + goto __15 + } + rc = 1 + + goto geopolyOverlapDone + goto __16 +__15: + if !((*GeoSegment)(unsafe.Pointer(pPrev)).Fy != (*GeoSegment)(unsafe.Pointer(pSeg)).Fy) { + goto __17 + } + + *(*uint8)(unsafe.Pointer(bp + uintptr(iMask))) = uint8(1) +__17: + ; +__16: + ; +__14: + ; + iMask = iMask ^ int32((*GeoSegment)(unsafe.Pointer(pSeg)).Fside) + pPrev = pSeg + goto __12 +__12: + pSeg = (*GeoSegment)(unsafe.Pointer(pSeg)).FpNext + goto __11 + goto __13 +__13: + ; +__4: + ; + + if !((*GeoEvent)(unsafe.Pointer(pThisEvent)).FeType == 0) { + goto __18 + } + // Add a segment + pSeg = (*GeoEvent)(unsafe.Pointer(pThisEvent)).FpSeg + (*GeoSegment)(unsafe.Pointer(pSeg)).Fy = float64((*GeoSegment)(unsafe.Pointer(pSeg)).Fy0) + (*GeoSegment)(unsafe.Pointer(pSeg)).FpNext = pActive + pActive = pSeg + needSort = 1 + goto __19 +__18: + // Remove a segment + if !(pActive == (*GeoEvent)(unsafe.Pointer(pThisEvent)).FpSeg) { + goto __20 + } + if pActive != 0 { + pActive = (*GeoSegment)(unsafe.Pointer(pActive)).FpNext + } else { + pActive = uintptr(0) + } + goto __21 +__20: + pSeg = pActive +__22: + if !(pSeg != 0) { + goto __24 + } + if !((*GeoSegment)(unsafe.Pointer(pSeg)).FpNext == (*GeoEvent)(unsafe.Pointer(pThisEvent)).FpSeg) { + goto __25 + } + (*GeoSegment)(unsafe.Pointer(pSeg)).FpNext = func() uintptr { + if (*GeoSegment)(unsafe.Pointer(pSeg)).FpNext != 0 { + return (*GeoSegment)(unsafe.Pointer((*GeoSegment)(unsafe.Pointer(pSeg)).FpNext)).FpNext + } + return uintptr(0) + }() + goto __24 +__25: + ; + goto __23 +__23: + pSeg = (*GeoSegment)(unsafe.Pointer(pSeg)).FpNext + goto __22 + goto __24 +__24: + ; +__21: + ; +__19: + ; + pThisEvent = (*GeoEvent)(unsafe.Pointer(pThisEvent)).FpNext + goto __2 +__3: + ; + if !(int32(*(*uint8)(unsafe.Pointer(bp + 3))) == 0) { + goto __26 + } + rc = 0 + goto __27 +__26: + if !(int32(*(*uint8)(unsafe.Pointer(bp + 1))) != 0 && int32(*(*uint8)(unsafe.Pointer(bp + 2))) == 0) { + goto __28 + } + rc = 3 + goto __29 +__28: + if !(int32(*(*uint8)(unsafe.Pointer(bp + 1))) == 0 && int32(*(*uint8)(unsafe.Pointer(bp + 2))) != 0) { + goto __30 + } + rc = 2 + goto __31 +__30: + if !(int32(*(*uint8)(unsafe.Pointer(bp + 1))) == 0 && int32(*(*uint8)(unsafe.Pointer(bp + 2))) == 0) { + goto __32 + } + rc = 4 + goto __33 +__32: + rc = 1 +__33: + ; +__31: + ; +__29: + ; +__27: + ; + +geopolyOverlapDone: + Xsqlite3_free(tls, p) + return rc +} + +// SQL function: geopoly_overlap(P1,P2) +// +// Determine whether or not P1 and P2 overlap. Return value: +// +// 0 The two polygons are disjoint +// 1 They overlap +// 2 P1 is completely contained within P2 +// 3 P2 is completely contained within P1 +// 4 P1 and P2 are the same polygon +// NULL Either P1 or P2 or both are not valid polygons +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ + var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) + if p1 != 0 && p2 != 0 { + var x int32 = geopolyOverlap(tls, p1, p2) + if x < 0 { + Xsqlite3_result_error_nomem(tls, context) + } else { + Xsqlite3_result_int(tls, context, x) + } + } + Xsqlite3_free(tls, p1) + Xsqlite3_free(tls, p2) +} + +// Enable or disable debugging output +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ +} + +// This function is the implementation of both the xConnect and xCreate +// methods of the geopoly virtual table. +// +// argv[0] -> module name +// argv[1] -> database name +// argv[2] -> table name +// argv[...] -> column names... +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var rc int32 + var pRtree uintptr + var nDb Sqlite3_int64 // Length of string argv[1] + var nName Sqlite3_int64 // Length of string argv[2] + var pSql uintptr + var zSql uintptr + var ii int32 + rc = SQLITE_OK + + Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_CONSTRAINT_SUPPORT, libc.VaList(bp, 1)) + + // Allocate the sqlite3_vtab structure + nDb = Sqlite3_int64(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) + nName = Sqlite3_int64(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + pRtree = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Rtree{}))+uint64(nDb)+uint64(nName)+uint64(2)) + if !!(pRtree != 0) { + goto __1 + } + return SQLITE_NOMEM +__1: + ; + libc.Xmemset(tls, pRtree, 0, uint64(uint64(unsafe.Sizeof(Rtree{}))+uint64(nDb)+uint64(nName)+uint64(2))) + (*Rtree)(unsafe.Pointer(pRtree)).FnBusy = U32(1) + (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FpModule = uintptr(unsafe.Pointer(&rtreeModule)) + (*Rtree)(unsafe.Pointer(pRtree)).FzDb = pRtree + 1*968 + (*Rtree)(unsafe.Pointer(pRtree)).FzName = (*Rtree)(unsafe.Pointer(pRtree)).FzDb + uintptr(nDb+int64(1)) + (*Rtree)(unsafe.Pointer(pRtree)).FeCoordType = U8(RTREE_COORD_REAL32) + (*Rtree)(unsafe.Pointer(pRtree)).FnDim = U8(2) + (*Rtree)(unsafe.Pointer(pRtree)).FnDim2 = U8(4) + libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(nDb)) + libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), uint64(nName)) + + // Create/Connect to the underlying relational database schema. If + // that is successful, call sqlite3_declare_vtab() to configure + // the r-tree table schema. + pSql = Xsqlite3_str_new(tls, db) + Xsqlite3_str_appendf(tls, pSql, ts+27354, 0) + (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape + (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null + ii = 3 +__2: + if !(ii < argc) { + goto __4 + } + (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ + Xsqlite3_str_appendf(tls, pSql, ts+27376, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + goto __3 +__3: + ii++ + goto __2 + goto __4 +__4: + ; + Xsqlite3_str_appendf(tls, pSql, ts+26443, 0) + zSql = Xsqlite3_str_finish(tls, pSql) + if !!(zSql != 0) { + goto __5 + } + rc = SQLITE_NOMEM + goto __6 +__5: + if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { + goto __7 + } + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) +__7: + ; +__6: + ; + Xsqlite3_free(tls, zSql) + if !(rc != 0) { + goto __8 + } + goto geopolyInit_fail +__8: + ; + (*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell = U8(8 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2)*4) + + // Figure out the node size to use. + rc = getNodeSize(tls, db, pRtree, isCreate, pzErr) + if !(rc != 0) { + goto __9 + } + goto geopolyInit_fail +__9: + ; + rc = rtreeSqlInit(tls, pRtree, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), isCreate) + if !(rc != 0) { + goto __10 + } + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + goto geopolyInit_fail +__10: + ; + + *(*uintptr)(unsafe.Pointer(ppVtab)) = pRtree + return SQLITE_OK + +geopolyInit_fail: + if !(rc == SQLITE_OK) { + goto __11 + } + rc = SQLITE_ERROR +__11: + ; + + rtreeRelease(tls, pRtree) + return rc +} + +// GEOPOLY virtual table module xCreate method. +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ + return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) +} + +// GEOPOLY virtual table module xConnect method. +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ + return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) +} + +// GEOPOLY virtual table module xFilter method. +// +// Query plans: +// +// 1 rowid lookup +// 2 search for objects overlapping the same bounding box +// that contains polygon argv[0] +// 3 search for objects overlapping the same bounding box +// that contains polygon argv[0] +// 4 full table scan +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + var pRtree uintptr + var pCsr uintptr + // var pRoot uintptr at bp+24, 8 + + // var rc int32 at bp+48, 4 + + // var iCell int32 at bp+16, 4 + + // Special case - lookup by rowid. + // var pLeaf uintptr at bp, 8 + // Leaf on which the required cell resides + var p uintptr // Search point for the leaf + var iRowid I64 + // var iNode I64 at bp+8, 8 + + // var bbox [4]RtreeCoord at bp+32, 16 + + var p1 uintptr + var pNew uintptr + pRtree = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab + pCsr = pVtabCursor + *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 16 /* iCell */)) = 0 + + rtreeReference(tls, pRtree) + + // Reset the cursor to the same state as rtreeOpen() leaves it in. + resetCursor(tls, pCsr) + + (*RtreeCursor)(unsafe.Pointer(pCsr)).FiStrategy = idxNum + if !(idxNum == 1) { + goto __1 + } // Search point for the leaf + iRowid = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + *(*I64)(unsafe.Pointer(bp + 8 /* iNode */)) = int64(0) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = findLeafNode(tls, pRtree, iRowid, bp, bp+8) + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0)) { + goto __3 + } + p = rtreeSearchPointNew(tls, pCsr, 0.0, uint8(0)) + // Always returns pCsr->sPoint + *(*uintptr)(unsafe.Pointer(pCsr + 88)) = *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)) + (*RtreeSearchPoint)(unsafe.Pointer(p)).Fid = *(*I64)(unsafe.Pointer(bp + 8 /* iNode */)) + (*RtreeSearchPoint)(unsafe.Pointer(p)).FeWithin = U8(PARTLY_WITHIN) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)), iRowid, bp+16) + (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell = U8(*(*int32)(unsafe.Pointer(bp + 16 /* iCell */))) + + goto __4 +__3: + (*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF = U8(1) +__4: + ; + goto __2 +__1: + // Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array + // with the configured constraints. + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp+24) + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK && idxNum <= 3) { + goto __5 + } + + geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(argv)), bp+32, bp+48) + if !(*(*int32)(unsafe.Pointer(bp + 48)) != 0) { + goto __6 + } + goto geopoly_filter_end +__6: + ; + (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint = libc.AssignUintptr(&p1, Xsqlite3_malloc(tls, int32(uint64(unsafe.Sizeof(RtreeConstraint{}))*uint64(4)))) + (*RtreeCursor)(unsafe.Pointer(pCsr)).FnConstraint = 4 + if !(p1 == uintptr(0)) { + goto __7 + } + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_NOMEM + goto __8 +__7: + libc.Xmemset(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint, 0, uint64(unsafe.Sizeof(RtreeConstraint{}))*uint64(4)) + libc.Xmemset(tls, pCsr+128, 0, uint64(unsafe.Sizeof(U32(0)))*uint64((*Rtree)(unsafe.Pointer(pRtree)).FiDepth+1)) + if !(idxNum == 2) { + goto __9 + } + // Overlap query + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'B' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 0 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32 + 1*4))) + p1 += 24 + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'D' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 1 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32))) + p1 += 24 + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'B' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 2 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32 + 3*4))) + p1 += 24 + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'D' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 3 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32 + 2*4))) + goto __10 +__9: + // Within query + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'D' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 0 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32))) + p1 += 24 + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'B' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 1 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32 + 1*4))) + p1 += 24 + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'D' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 2 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32 + 2*4))) + p1 += 24 + (*RtreeConstraint)(unsafe.Pointer(p1)).Fop = 'B' + (*RtreeConstraint)(unsafe.Pointer(p1)).FiCoord = 3 + *(*RtreeDValue)(unsafe.Pointer(p1 + 8)) = RtreeDValue(*(*RtreeValue)(unsafe.Pointer(bp + 32 + 3*4))) +__10: + ; +__8: + ; +__5: + ; + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { + goto __11 + } + pNew = rtreeSearchPointNew(tls, pCsr, 0.0, U8((*Rtree)(unsafe.Pointer(pRtree)).FiDepth+1)) + if !(pNew == uintptr(0)) { + goto __12 + } + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_NOMEM + goto geopoly_filter_end +__12: + ; + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).Fid = int64(1) + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).FiCell = U8(0) + (*RtreeSearchPoint)(unsafe.Pointer(pNew)).FeWithin = U8(PARTLY_WITHIN) + + *(*uintptr)(unsafe.Pointer(pCsr + 88)) = *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) = uintptr(0) + + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeStepToLeaf(tls, pCsr) +__11: + ; +__2: + ; + +geopoly_filter_end: + nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) + rtreeRelease(tls, pRtree) + return *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) +} + +// Rtree virtual table module xBestIndex method. There are three +// table scan strategies to choose from (in order from most to +// least desirable): +// +// idxNum idxStr Strategy +// ------------------------------------------------ +// 1 "rowid" Direct lookup by rowid. +// 2 "rtree" R-tree overlap query using geopoly_overlap() +// 3 "rtree" R-tree within query using geopoly_within() +// 4 "fullscan" full-table scan. +// ------------------------------------------------ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ + var ii int32 + var iRowidTerm int32 = -1 + var iFuncTerm int32 = -1 + var idxNum int32 = 0 + + for ii = 0; ii < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { + var p uintptr = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12 + if !(int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable) != 0) { + continue + } + if (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn < 0 && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { + iRowidTerm = ii + break + } + if (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn == 0 && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) >= SQLITE_INDEX_CONSTRAINT_FUNCTION { + // p->op==SQLITE_INDEX_CONSTRAINT_FUNCTION for geopoly_overlap() + // p->op==(SQLITE_INDEX_CONTRAINT_FUNCTION+1) for geopoly_within(). + // See geopolyFindFunction() + iFuncTerm = ii + idxNum = int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) - SQLITE_INDEX_CONSTRAINT_FUNCTION + 2 + } + } + + if iRowidTerm >= 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16165 /* "rowid" */ + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(1) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxFlags = SQLITE_INDEX_SCAN_UNIQUE + return SQLITE_OK + } + if iFuncTerm >= 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27380 /* "rtree" */ + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(10) + return SQLITE_OK + } + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27386 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) + return SQLITE_OK +} + +// GEOPOLY virtual table module xColumn method. +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab + var pCsr uintptr = cur + var p uintptr = rtreeSearchPointFirst(tls, pCsr) + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp) + + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + if p == uintptr(0) { + return SQLITE_OK + } + if i == 0 && Xsqlite3_vtab_nochange(tls, ctx) != 0 { + return SQLITE_OK + } + if i <= int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) { + if !(int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FbAuxValid) != 0) { + if (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux == uintptr(0) { + *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3_prepare_v3(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql, -1, uint32(0), + pCsr+56, uintptr(0)) + if *(*int32)(unsafe.Pointer(bp)) != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } + Xsqlite3_bind_int64(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux, 1, + nodeGetRowid(tls, pRtree, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell))) + *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3_step(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_ROW { + (*RtreeCursor)(unsafe.Pointer(pCsr)).FbAuxValid = U8(1) + } else { + Xsqlite3_reset(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_DONE { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + } + Xsqlite3_result_value(tls, ctx, Xsqlite3_column_value(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).FpReadAux, i+2)) + } + return SQLITE_OK +} + +// The xUpdate method for GEOPOLY module virtual tables. +// +// For DELETE: +// +// argv[0] = the rowid to be deleted +// +// For INSERT: +// +// argv[0] = SQL NULL +// argv[1] = rowid to insert, or an SQL NULL to select automatically +// argv[2] = _shape column +// argv[3] = first application-defined column.... +// +// For UPDATE: +// +// argv[0] = rowid to modify. Never NULL +// argv[1] = rowid after the change. Never NULL +// argv[2] = new value for _shape +// argv[3] = new value for first application-defined column.... +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var pRtree uintptr + // var rc int32 at bp+48, 4 + + // var cell RtreeCell at bp, 48 + // New cell to insert if nData>1 + var oldRowid I64 // The old rowid + var oldRowidValid int32 // True if oldRowid is valid + var newRowid I64 // The new rowid + var newRowidValid int32 // True if newRowid is valid + var coordChange int32 + var steprc int32 + var rc2 int32 + // Insert the new record into the r-tree + // var pLeaf uintptr at bp+56, 8 + + var p uintptr + var pUp uintptr + var jj int32 + var nChange int32 + pRtree = pVtab + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK + coordChange = 0 // Change in coordinates + + if !((*Rtree)(unsafe.Pointer(pRtree)).FnNodeRef != 0) { + goto __1 + } + // Unable to write to the btree while another cursor is reading from it, + // since the write might do a rebalance which would disrupt the read + // cursor. + return SQLITE_LOCKED | int32(2)<<8 +__1: + ; + rtreeReference(tls, pRtree) + + oldRowidValid = libc.Bool32(Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(aData))) != SQLITE_NULL) + + if oldRowidValid != 0 { + oldRowid = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(aData))) + } else { + oldRowid = int64(0) + } + newRowidValid = libc.Bool32(nData > 1 && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(aData + 1*8))) != SQLITE_NULL) + if newRowidValid != 0 { + newRowid = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(aData + 1*8))) + } else { + newRowid = int64(0) + } + (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid = newRowid + + if !(nData > 1 && + (!(oldRowidValid != 0) || + !(Xsqlite3_value_nochange(tls, *(*uintptr)(unsafe.Pointer(aData + 2*8))) != 0) || + oldRowid != newRowid)) { + goto __2 + } + + geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(aData + 2*8)), bp+8, bp+48) + if !(*(*int32)(unsafe.Pointer(bp + 48)) != 0) { + goto __3 + } + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { + goto __4 + } + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27395, 0) +__4: + ; + goto geopoly_update_end +__3: + ; + coordChange = 1 + + // If a rowid value was supplied, check if it is already present in + // the table. If so, the constraint has failed. + if !(newRowidValid != 0 && (!(oldRowidValid != 0) || oldRowid != newRowid)) { + goto __5 + } + Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid) + steprc = Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_reset(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid) + if !(SQLITE_ROW == steprc) { + goto __6 + } + if !(Xsqlite3_vtab_on_conflict(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb) == SQLITE_REPLACE) { + goto __7 + } + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeDeleteRowid(tls, pRtree, (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid) + goto __8 +__7: + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeConstraintError(tls, pRtree, 0) +__8: + ; +__6: + ; +__5: + ; +__2: + ; + + // If aData[0] is not an SQL NULL value, it is the rowid of a + // record to delete from the r-tree table. The following block does + // just that. + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK && (nData == 1 || coordChange != 0 && oldRowidValid != 0)) { + goto __9 + } + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeDeleteRowid(tls, pRtree, oldRowid) +__9: + ; + + // If the aData[] array contains more than one element, elements + // (aData[2]..aData[argc-1]) contain a new record to insert into + // the r-tree structure. + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK && nData > 1 && coordChange != 0) { + goto __10 + } + // Insert the new record into the r-tree + *(*uintptr)(unsafe.Pointer(bp + 56 /* pLeaf */)) = uintptr(0) + if !!(newRowidValid != 0) { + goto __11 + } + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeNewRowid(tls, pRtree, bp) +__11: + ; + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { + goto __12 + } + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = sChooseLeaf(tls, pRtree, bp, 0, bp+56) +__12: + ; + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { + goto __13 + } + (*Rtree)(unsafe.Pointer(pRtree)).FiReinsertHeight = -1 + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 56 /* pLeaf */)), bp, 0) + rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 56 /* pLeaf */))) + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { + goto __14 + } + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rc2 +__14: + ; +__13: + ; +__10: + ; + + // Change the data + if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK && nData > 1) { + goto __15 + } + pUp = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteAux + nChange = 0 + Xsqlite3_bind_int64(tls, pUp, 1, (*RtreeCell)(unsafe.Pointer(bp /* &cell */)).FiRowid) + + if !(Xsqlite3_value_nochange(tls, *(*uintptr)(unsafe.Pointer(aData + 2*8))) != 0) { + goto __16 + } + Xsqlite3_bind_null(tls, pUp, 2) + goto __17 +__16: + p = uintptr(0) + if !(Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(aData + 2*8))) == SQLITE_TEXT && + libc.AssignUintptr(&p, geopolyFuncParam(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(aData + 2*8)), bp+48)) != uintptr(0) && + *(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { + goto __18 + } + Xsqlite3_bind_blob(tls, pUp, 2, p+4, 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) + goto __19 +__18: + Xsqlite3_bind_value(tls, pUp, 2, *(*uintptr)(unsafe.Pointer(aData + 2*8))) +__19: + ; + Xsqlite3_free(tls, p) + nChange = 1 +__17: + ; + jj = 1 +__20: + if !(jj < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux)) { + goto __22 + } + nChange++ + Xsqlite3_bind_value(tls, pUp, jj+2, *(*uintptr)(unsafe.Pointer(aData + uintptr(jj+2)*8))) + goto __21 +__21: + jj++ + goto __20 + goto __22 +__22: + ; + if !(nChange != 0) { + goto __23 + } + Xsqlite3_step(tls, pUp) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_reset(tls, pUp) +__23: + ; +__15: + ; + +geopoly_update_end: + rtreeRelease(tls, pRtree) + return *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) +} + +// Report that geopoly_overlap() is an overloaded function suitable +// for use in xBestIndex. +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27435) == 0 { + *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{geopolyOverlapFunc})) + *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) + return SQLITE_INDEX_CONSTRAINT_FUNCTION + } + if Xsqlite3_stricmp(tls, zName, ts+27451) == 0 { + *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{geopolyWithinFunc})) + *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) + return SQLITE_INDEX_CONSTRAINT_FUNCTION + 1 + } + return 0 +} + +var geopolyModule = Sqlite3_module{ + FiVersion: 3, // iVersion + FxCreate: 0, // xCreate - create a table + FxConnect: 0, // xConnect - connect to an existing table + FxBestIndex: 0, // xBestIndex - Determine search strategy + FxDisconnect: 0, // xDisconnect - Disconnect from a table + FxDestroy: 0, // xDestroy - Drop a table + FxOpen: 0, // xOpen - open a cursor + FxClose: 0, // xClose - close a cursor + FxFilter: 0, // xFilter - configure scan constraints + FxNext: 0, // xNext - advance a cursor + FxEof: 0, // xEof + FxColumn: 0, // xColumn - read data + FxRowid: 0, // xRowid - read data + FxUpdate: 0, // xUpdate - write data + FxBegin: 0, // xBegin - begin transaction + FxSync: 0, // xSync - sync transaction + FxCommit: 0, // xCommit - commit transaction + FxRollback: 0, // xRollback - rollback transaction + FxFindFunction: 0, // xFindFunction - function overloading + FxRename: 0, // xRename - rename the table + FxSavepoint: 0, // xRollbackTo + FxShadowName: 0, // xShadowName +} /* sqlite3.c:201932:23 */ + +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ + var rc int32 = SQLITE_OK + var i int32 + for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { + FxFunc uintptr + FnArg int8 + FbPure uint8 + F__ccgo_pad1 [6]byte + FzName uintptr + }{})) && rc == SQLITE_OK; i++ { + var enc int32 + if aFunc[i].FbPure != 0 { + enc = SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS + } else { + enc = SQLITE_UTF8 | SQLITE_DIRECTONLY + } + rc = Xsqlite3_create_function(tls, db, aFunc[i].FzName, int32(aFunc[i].FnArg), + enc, uintptr(0), + aFunc[i].FxFunc, uintptr(0), uintptr(0)) + } + for i = 0; uint64(i) < uint64(unsafe.Sizeof(aAgg))/uint64(unsafe.Sizeof(struct { + FxStep uintptr + FxFinal uintptr + FzName uintptr + }{})) && rc == SQLITE_OK; i++ { + rc = Xsqlite3_create_function(tls, db, aAgg[i].FzName, 1, + SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS, uintptr(0), + uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) + } + if rc == SQLITE_OK { + rc = Xsqlite3_create_module_v2(tls, db, ts+27466, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + } + return rc +} + +var aFunc = [12]struct { + FxFunc uintptr + FnArg int8 + FbPure uint8 + F__ccgo_pad1 [6]byte + FzName uintptr +}{ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27474 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27487 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27500 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27513 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27451 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27525 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27435 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27548 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27562 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27575 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27589 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27605 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ +var aAgg = [1]struct { + FxStep uintptr + FxFinal uintptr + FzName uintptr +}{ + {FxStep: 0, FxFinal: 0, FzName: ts + 27617 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ + +//************* End of geopoly.c ******************************************** +//************* Continuing where we left off in rtree.c ********************* + +// Register the r-tree module with database handle db. This creates the +// virtual table module "rtree" and the debugging/analysis scalar +// function "rtreenode". +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ + var utf8 int32 = SQLITE_UTF8 + var rc int32 + + rc = Xsqlite3_create_function(tls, db, ts+27636, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{rtreenode})), uintptr(0), uintptr(0)) + if rc == SQLITE_OK { + rc = Xsqlite3_create_function(tls, db, ts+27646, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{rtreedepth})), uintptr(0), uintptr(0)) + } + if rc == SQLITE_OK { + rc = Xsqlite3_create_function(tls, db, ts+27657, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{rtreecheck})), uintptr(0), uintptr(0)) + } + if rc == SQLITE_OK { + var c uintptr = uintptr(RTREE_COORD_REAL32) + rc = Xsqlite3_create_module_v2(tls, db, ts+27380, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + } + if rc == SQLITE_OK { + var c uintptr = uintptr(RTREE_COORD_INT32) + rc = Xsqlite3_create_module_v2(tls, db, ts+27668, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + } + if rc == SQLITE_OK { + rc = sqlite3_geopoly_init(tls, db) + } + + return rc +} + +// This routine deletes the RtreeGeomCallback object that was attached +// one of the SQL functions create by sqlite3_rtree_geometry_callback() +// or sqlite3_rtree_query_callback(). In other words, this routine is the +// destructor for an RtreeGeomCallback objecct. This routine is called when +// the corresponding SQL function is deleted. +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ + var pInfo uintptr = p + if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) + } + Xsqlite3_free(tls, p) +} + +// This routine frees the BLOB that is returned by geomCallback(). +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ + var i int32 + var p uintptr = pArg + for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { + Xsqlite3_value_free(tls, *(*uintptr)(unsafe.Pointer((*RtreeMatchArg)(unsafe.Pointer(p)).FapSqlParam + uintptr(i)*8))) + } + Xsqlite3_free(tls, p) +} + +// Each call to sqlite3_rtree_geometry_callback() or +// sqlite3_rtree_query_callback() creates an ordinary SQLite +// scalar function that is implemented by this routine. +// +// All this function does is construct an RtreeMatchArg object that +// contains the geometry-checking callback routines and a list of +// parameters to this function, then return that RtreeMatchArg object +// as a BLOB. +// +// The R-Tree MATCH operator will read the returned BLOB, deserialize +// the RtreeMatchArg object, and use the RtreeMatchArg object to figure +// out which elements of the R-Tree should be returned by the query. +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ + var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) + var pBlob uintptr + var nBlob Sqlite3_int64 + var memErr int32 = 0 + + nBlob = Sqlite3_int64(uint64(unsafe.Sizeof(RtreeMatchArg{})) + uint64(nArg-1)*uint64(unsafe.Sizeof(RtreeDValue(0))) + + uint64(nArg)*uint64(unsafe.Sizeof(uintptr(0)))) + pBlob = Xsqlite3_malloc64(tls, uint64(nBlob)) + if !(pBlob != 0) { + Xsqlite3_result_error_nomem(tls, ctx) + } else { + var i int32 + (*RtreeMatchArg)(unsafe.Pointer(pBlob)).FiSize = U32(nBlob) + (*RtreeMatchArg)(unsafe.Pointer(pBlob)).Fcb = *(*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)) + (*RtreeMatchArg)(unsafe.Pointer(pBlob)).FapSqlParam = pBlob + 56 + uintptr(nArg)*8 + (*RtreeMatchArg)(unsafe.Pointer(pBlob)).FnParam = nArg + for i = 0; i < nArg; i++ { + *(*uintptr)(unsafe.Pointer((*RtreeMatchArg)(unsafe.Pointer(pBlob)).FapSqlParam + uintptr(i)*8)) = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(aArg + uintptr(i)*8))) + if *(*uintptr)(unsafe.Pointer((*RtreeMatchArg)(unsafe.Pointer(pBlob)).FapSqlParam + uintptr(i)*8)) == uintptr(0) { + memErr = 1 + } + *(*RtreeDValue)(unsafe.Pointer(pBlob + 56 + uintptr(i)*8)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(aArg + uintptr(i)*8))) + } + if memErr != 0 { + Xsqlite3_result_error_nomem(tls, ctx) + rtreeMatchArgFree(tls, pBlob) + } else { + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24956, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + } + } +} + +// Register a new geometry function for use with the r-tree MATCH operator. +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ + var pGeomCtx uintptr // Context object for new user-function + + // Allocate and populate the context object. + pGeomCtx = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(RtreeGeomCallback{}))) + if !(pGeomCtx != 0) { + return SQLITE_NOMEM + } + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FxGeom = xGeom + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FxQueryFunc = uintptr(0) + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FxDestructor = uintptr(0) + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FpContext = pContext + return Xsqlite3_create_function_v2(tls, db, zGeom, -1, SQLITE_ANY, + pGeomCtx, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{geomCallback})), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeFreeCallback}))) +} + +// Register a new 2nd-generation geometry function for use with the +// r-tree MATCH operator. +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ + var pGeomCtx uintptr // Context object for new user-function + + // Allocate and populate the context object. + pGeomCtx = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(RtreeGeomCallback{}))) + if !(pGeomCtx != 0) { + if xDestructor != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestructor})).f(tls, pContext) + } + return SQLITE_NOMEM + } + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FxGeom = uintptr(0) + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FxQueryFunc = xQueryFunc + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FxDestructor = xDestructor + (*RtreeGeomCallback)(unsafe.Pointer(pGeomCtx)).FpContext = pContext + return Xsqlite3_create_function_v2(tls, db, zQueryFunc, -1, SQLITE_ANY, + pGeomCtx, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{geomCallback})), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeFreeCallback}))) +} + +//************* End of rtree.c ********************************************** +//************* Begin file icu.c ******************************************** +// 2007 May 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// $Id: icu.c,v 1.7 2007/12/13 21:54:11 drh Exp $ +// +// This file implements an integration between the ICU library +// ("International Components for Unicode", an open-source library +// for handling unicode data) and SQLite. The integration uses +// ICU to provide the following to SQLite: +// +// * An implementation of the SQL regexp() function (and hence REGEXP +// operator) using the ICU uregex_XX() APIs. +// +// * Implementations of the SQL scalar upper() and lower() functions +// for case mapping. +// +// * Integration of ICU and SQLite collation sequences. +// +// * An implementation of the LIKE operator that uses ICU to +// provide case-independent matching. + +//************* End of icu.c ************************************************ +//************* Begin file fts3_icu.c *************************************** +// 2007 June 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file implements a tokenizer for fts3 based on the ICU library. +// #include "fts3Int.h" + +//************* End of fts3_icu.c ******************************************* +//************* Begin file sqlite3rbu.c ************************************* +// 2014 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// +// OVERVIEW +// +// The RBU extension requires that the RBU update be packaged as an +// SQLite database. The tables it expects to find are described in +// sqlite3rbu.h. Essentially, for each table xyz in the target database +// that the user wishes to write to, a corresponding data_xyz table is +// created in the RBU database and populated with one row for each row to +// update, insert or delete from the target table. +// +// The update proceeds in three stages: +// +// 1) The database is updated. The modified database pages are written +// to a *-oal file. A *-oal file is just like a *-wal file, except +// that it is named "-oal" instead of "-wal". +// Because regular SQLite clients do not look for file named +// "-oal", they go on using the original database in +// rollback mode while the *-oal file is being generated. +// +// During this stage RBU does not update the database by writing +// directly to the target tables. Instead it creates "imposter" +// tables using the SQLITE_TESTCTRL_IMPOSTER interface that it uses +// to update each b-tree individually. All updates required by each +// b-tree are completed before moving on to the next, and all +// updates are done in sorted key order. +// +// 2) The "-oal" file is moved to the equivalent "-wal" +// location using a call to rename(2). Before doing this the RBU +// module takes an EXCLUSIVE lock on the database file, ensuring +// that there are no other active readers. +// +// Once the EXCLUSIVE lock is released, any other database readers +// detect the new *-wal file and read the database in wal mode. At +// this point they see the new version of the database - including +// the updates made as part of the RBU update. +// +// 3) The new *-wal file is checkpointed. This proceeds in the same way +// as a regular database checkpoint, except that a single frame is +// checkpointed each time sqlite3rbu_step() is called. If the RBU +// handle is closed before the entire *-wal file is checkpointed, +// the checkpoint progress is saved in the RBU database and the +// checkpoint can be resumed by another RBU client at some point in +// the future. +// +// POTENTIAL PROBLEMS +// +// The rename() call might not be portable. And RBU is not currently +// syncing the directory after renaming the file. +// +// When state is saved, any commit to the *-oal file and the commit to +// the RBU update database are not atomic. So if the power fails at the +// wrong moment they might get out of sync. As the main database will be +// committed before the RBU update database this will likely either just +// pass unnoticed, or result in SQLITE_CONSTRAINT errors (due to UNIQUE +// constraint violations). +// +// If some client does modify the target database mid RBU update, or some +// other error occurs, the RBU extension will keep throwing errors. It's +// not really clear how to get out of this state. The system could just +// by delete the RBU update database and *-oal file and have the device +// download the update again and start over. +// +// At present, for an UPDATE, both the new.* and old.* records are +// collected in the rbu_xyz table. And for both UPDATEs and DELETEs all +// fields are collected. This means we're probably writing a lot more +// data to disk when saving the state of an ongoing update to the RBU +// update database than is strictly necessary. +// + +// #include +// #include +// #include + +// #include "sqlite3.h" + +//************* Include sqlite3rbu.h in the middle of sqlite3rbu.c ********** +//************* Begin file sqlite3rbu.h ************************************* +// 2014 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains the public interface for the RBU extension. + +// SUMMARY +// +// Writing a transaction containing a large number of operations on +// b-tree indexes that are collectively larger than the available cache +// memory can be very inefficient. +// +// The problem is that in order to update a b-tree, the leaf page (at least) +// containing the entry being inserted or deleted must be modified. If the +// working set of leaves is larger than the available cache memory, then a +// single leaf that is modified more than once as part of the transaction +// may be loaded from or written to the persistent media multiple times. +// Additionally, because the index updates are likely to be applied in +// random order, access to pages within the database is also likely to be in +// random order, which is itself quite inefficient. +// +// One way to improve the situation is to sort the operations on each index +// by index key before applying them to the b-tree. This leads to an IO +// pattern that resembles a single linear scan through the index b-tree, +// and all but guarantees each modified leaf page is loaded and stored +// exactly once. SQLite uses this trick to improve the performance of +// CREATE INDEX commands. This extension allows it to be used to improve +// the performance of large transactions on existing databases. +// +// Additionally, this extension allows the work involved in writing the +// large transaction to be broken down into sub-transactions performed +// sequentially by separate processes. This is useful if the system cannot +// guarantee that a single update process will run for long enough to apply +// the entire update, for example because the update is being applied on a +// mobile device that is frequently rebooted. Even after the writer process +// has committed one or more sub-transactions, other database clients continue +// to read from the original database snapshot. In other words, partially +// applied transactions are not visible to other clients. +// +// "RBU" stands for "Resumable Bulk Update". As in a large database update +// transmitted via a wireless network to a mobile device. A transaction +// applied using this extension is hence refered to as an "RBU update". +// +// +// LIMITATIONS +// +// An "RBU update" transaction is subject to the following limitations: +// +// * The transaction must consist of INSERT, UPDATE and DELETE operations +// only. +// +// * INSERT statements may not use any default values. +// +// * UPDATE and DELETE statements must identify their target rows by +// non-NULL PRIMARY KEY values. Rows with NULL values stored in PRIMARY +// KEY fields may not be updated or deleted. If the table being written +// has no PRIMARY KEY, affected rows must be identified by rowid. +// +// * UPDATE statements may not modify PRIMARY KEY columns. +// +// * No triggers will be fired. +// +// * No foreign key violations are detected or reported. +// +// * CHECK constraints are not enforced. +// +// * No constraint handling mode except for "OR ROLLBACK" is supported. +// +// +// PREPARATION +// +// An "RBU update" is stored as a separate SQLite database. A database +// containing an RBU update is an "RBU database". For each table in the +// target database to be updated, the RBU database should contain a table +// named "data_" containing the same set of columns as the +// target table, and one more - "rbu_control". The data_% table should +// have no PRIMARY KEY or UNIQUE constraints, but each column should have +// the same type as the corresponding column in the target database. +// The "rbu_control" column should have no type at all. For example, if +// the target database contains: +// +// CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c UNIQUE); +// +// Then the RBU database should contain: +// +// CREATE TABLE data_t1(a INTEGER, b TEXT, c, rbu_control); +// +// The order of the columns in the data_% table does not matter. +// +// Instead of a regular table, the RBU database may also contain virtual +// tables or view named using the data_ naming scheme. +// +// Instead of the plain data_ naming scheme, RBU database tables +// may also be named data_, where is any sequence +// of zero or more numeric characters (0-9). This can be significant because +// tables within the RBU database are always processed in order sorted by +// name. By judicious selection of the portion of the names +// of the RBU tables the user can therefore control the order in which they +// are processed. This can be useful, for example, to ensure that "external +// content" FTS4 tables are updated before their underlying content tables. +// +// If the target database table is a virtual table or a table that has no +// PRIMARY KEY declaration, the data_% table must also contain a column +// named "rbu_rowid". This column is mapped to the tables implicit primary +// key column - "rowid". Virtual tables for which the "rowid" column does +// not function like a primary key value cannot be updated using RBU. For +// example, if the target db contains either of the following: +// +// CREATE VIRTUAL TABLE x1 USING fts3(a, b); +// CREATE TABLE x1(a, b) +// +// then the RBU database should contain: +// +// CREATE TABLE data_x1(a, b, rbu_rowid, rbu_control); +// +// All non-hidden columns (i.e. all columns matched by "SELECT *") of the +// target table must be present in the input table. For virtual tables, +// hidden columns are optional - they are updated by RBU if present in +// the input table, or not otherwise. For example, to write to an fts4 +// table with a hidden languageid column such as: +// +// CREATE VIRTUAL TABLE ft1 USING fts4(a, b, languageid='langid'); +// +// Either of the following input table schemas may be used: +// +// CREATE TABLE data_ft1(a, b, langid, rbu_rowid, rbu_control); +// CREATE TABLE data_ft1(a, b, rbu_rowid, rbu_control); +// +// For each row to INSERT into the target database as part of the RBU +// update, the corresponding data_% table should contain a single record +// with the "rbu_control" column set to contain integer value 0. The +// other columns should be set to the values that make up the new record +// to insert. +// +// If the target database table has an INTEGER PRIMARY KEY, it is not +// possible to insert a NULL value into the IPK column. Attempting to +// do so results in an SQLITE_MISMATCH error. +// +// For each row to DELETE from the target database as part of the RBU +// update, the corresponding data_% table should contain a single record +// with the "rbu_control" column set to contain integer value 1. The +// real primary key values of the row to delete should be stored in the +// corresponding columns of the data_% table. The values stored in the +// other columns are not used. +// +// For each row to UPDATE from the target database as part of the RBU +// update, the corresponding data_% table should contain a single record +// with the "rbu_control" column set to contain a value of type text. +// The real primary key values identifying the row to update should be +// stored in the corresponding columns of the data_% table row, as should +// the new values of all columns being update. The text value in the +// "rbu_control" column must contain the same number of characters as +// there are columns in the target database table, and must consist entirely +// of 'x' and '.' characters (or in some special cases 'd' - see below). For +// each column that is being updated, the corresponding character is set to +// 'x'. For those that remain as they are, the corresponding character of the +// rbu_control value should be set to '.'. For example, given the tables +// above, the update statement: +// +// UPDATE t1 SET c = 'usa' WHERE a = 4; +// +// is represented by the data_t1 row created by: +// +// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x'); +// +// Instead of an 'x' character, characters of the rbu_control value specified +// for UPDATEs may also be set to 'd'. In this case, instead of updating the +// target table with the value stored in the corresponding data_% column, the +// user-defined SQL function "rbu_delta()" is invoked and the result stored in +// the target table column. rbu_delta() is invoked with two arguments - the +// original value currently stored in the target table column and the +// value specified in the data_xxx table. +// +// For example, this row: +// +// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..d'); +// +// is similar to an UPDATE statement such as: +// +// UPDATE t1 SET c = rbu_delta(c, 'usa') WHERE a = 4; +// +// Finally, if an 'f' character appears in place of a 'd' or 's' in an +// ota_control string, the contents of the data_xxx table column is assumed +// to be a "fossil delta" - a patch to be applied to a blob value in the +// format used by the fossil source-code management system. In this case +// the existing value within the target database table must be of type BLOB. +// It is replaced by the result of applying the specified fossil delta to +// itself. +// +// If the target database table is a virtual table or a table with no PRIMARY +// KEY, the rbu_control value should not include a character corresponding +// to the rbu_rowid value. For example, this: +// +// INSERT INTO data_ft1(a, b, rbu_rowid, rbu_control) +// VALUES(NULL, 'usa', 12, '.x'); +// +// causes a result similar to: +// +// UPDATE ft1 SET b = 'usa' WHERE rowid = 12; +// +// The data_xxx tables themselves should have no PRIMARY KEY declarations. +// However, RBU is more efficient if reading the rows in from each data_xxx +// table in "rowid" order is roughly the same as reading them sorted by +// the PRIMARY KEY of the corresponding target database table. In other +// words, rows should be sorted using the destination table PRIMARY KEY +// fields before they are inserted into the data_xxx tables. +// +// USAGE +// +// The API declared below allows an application to apply an RBU update +// stored on disk to an existing target database. Essentially, the +// application: +// +// 1) Opens an RBU handle using the sqlite3rbu_open() function. +// +// 2) Registers any required virtual table modules with the database +// handle returned by sqlite3rbu_db(). Also, if required, register +// the rbu_delta() implementation. +// +// 3) Calls the sqlite3rbu_step() function one or more times on +// the new handle. Each call to sqlite3rbu_step() performs a single +// b-tree operation, so thousands of calls may be required to apply +// a complete update. +// +// 4) Calls sqlite3rbu_close() to close the RBU update handle. If +// sqlite3rbu_step() has been called enough times to completely +// apply the update to the target database, then the RBU database +// is marked as fully applied. Otherwise, the state of the RBU +// update application is saved in the RBU database for later +// resumption. +// +// See comments below for more detail on APIs. +// +// If an update is only partially applied to the target database by the +// time sqlite3rbu_close() is called, various state information is saved +// within the RBU database. This allows subsequent processes to automatically +// resume the RBU update from where it left off. +// +// To remove all RBU extension state information, returning an RBU database +// to its original contents, it is sufficient to drop all tables that begin +// with the prefix "rbu_" +// +// DATABASE LOCKING +// +// An RBU update may not be applied to a database in WAL mode. Attempting +// to do so is an error (SQLITE_ERROR). +// +// While an RBU handle is open, a SHARED lock may be held on the target +// database file. This means it is possible for other clients to read the +// database, but not to write it. +// +// If an RBU update is started and then suspended before it is completed, +// then an external client writes to the database, then attempting to resume +// the suspended RBU update is also an error (SQLITE_BUSY). + +// #include "sqlite3.h" ** Required for error code definitions ** + +type sqlite3rbu = struct { + FeStage int32 + F__ccgo_pad1 [4]byte + FdbMain uintptr + FdbRbu uintptr + FzTarget uintptr + FzRbu uintptr + FzState uintptr + FzStateDb [5]uint8 + F__ccgo_pad2 [3]byte + Frc int32 + F__ccgo_pad3 [4]byte + FzErrmsg uintptr + FnStep int32 + FnProgress int32 + Fobjiter RbuObjIter + FzVfsName uintptr + FpTargetFd uintptr + FnPagePerSector int32 + F__ccgo_pad4 [4]byte + FiOalSz I64 + FnPhaseOneStep I64 + FiMaxFrame U32 + FmLock U32 + FnFrame int32 + FnFrameAlloc int32 + FaFrame uintptr + Fpgsz int32 + F__ccgo_pad5 [4]byte + FaBuf uintptr + FiWalCksum I64 + FszTemp I64 + FszTempLimit I64 + FnRbu int32 + F__ccgo_pad6 [4]byte + FpRbuFd uintptr +} /* sqlite3.c:203382:9 */ + +//************* End of rtree.c ********************************************** +//************* Begin file icu.c ******************************************** +// 2007 May 6 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// $Id: icu.c,v 1.7 2007/12/13 21:54:11 drh Exp $ +// +// This file implements an integration between the ICU library +// ("International Components for Unicode", an open-source library +// for handling unicode data) and SQLite. The integration uses +// ICU to provide the following to SQLite: +// +// * An implementation of the SQL regexp() function (and hence REGEXP +// operator) using the ICU uregex_XX() APIs. +// +// * Implementations of the SQL scalar upper() and lower() functions +// for case mapping. +// +// * Integration of ICU and SQLite collation sequences. +// +// * An implementation of the LIKE operator that uses ICU to +// provide case-independent matching. + +//************* End of icu.c ************************************************ +//************* Begin file fts3_icu.c *************************************** +// 2007 June 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This file implements a tokenizer for fts3 based on the ICU library. +// #include "fts3Int.h" + +//************* End of fts3_icu.c ******************************************* +//************* Begin file sqlite3rbu.c ************************************* +// 2014 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// +// OVERVIEW +// +// The RBU extension requires that the RBU update be packaged as an +// SQLite database. The tables it expects to find are described in +// sqlite3rbu.h. Essentially, for each table xyz in the target database +// that the user wishes to write to, a corresponding data_xyz table is +// created in the RBU database and populated with one row for each row to +// update, insert or delete from the target table. +// +// The update proceeds in three stages: +// +// 1) The database is updated. The modified database pages are written +// to a *-oal file. A *-oal file is just like a *-wal file, except +// that it is named "-oal" instead of "-wal". +// Because regular SQLite clients do not look for file named +// "-oal", they go on using the original database in +// rollback mode while the *-oal file is being generated. +// +// During this stage RBU does not update the database by writing +// directly to the target tables. Instead it creates "imposter" +// tables using the SQLITE_TESTCTRL_IMPOSTER interface that it uses +// to update each b-tree individually. All updates required by each +// b-tree are completed before moving on to the next, and all +// updates are done in sorted key order. +// +// 2) The "-oal" file is moved to the equivalent "-wal" +// location using a call to rename(2). Before doing this the RBU +// module takes an EXCLUSIVE lock on the database file, ensuring +// that there are no other active readers. +// +// Once the EXCLUSIVE lock is released, any other database readers +// detect the new *-wal file and read the database in wal mode. At +// this point they see the new version of the database - including +// the updates made as part of the RBU update. +// +// 3) The new *-wal file is checkpointed. This proceeds in the same way +// as a regular database checkpoint, except that a single frame is +// checkpointed each time sqlite3rbu_step() is called. If the RBU +// handle is closed before the entire *-wal file is checkpointed, +// the checkpoint progress is saved in the RBU database and the +// checkpoint can be resumed by another RBU client at some point in +// the future. +// +// POTENTIAL PROBLEMS +// +// The rename() call might not be portable. And RBU is not currently +// syncing the directory after renaming the file. +// +// When state is saved, any commit to the *-oal file and the commit to +// the RBU update database are not atomic. So if the power fails at the +// wrong moment they might get out of sync. As the main database will be +// committed before the RBU update database this will likely either just +// pass unnoticed, or result in SQLITE_CONSTRAINT errors (due to UNIQUE +// constraint violations). +// +// If some client does modify the target database mid RBU update, or some +// other error occurs, the RBU extension will keep throwing errors. It's +// not really clear how to get out of this state. The system could just +// by delete the RBU update database and *-oal file and have the device +// download the update again and start over. +// +// At present, for an UPDATE, both the new.* and old.* records are +// collected in the rbu_xyz table. And for both UPDATEs and DELETEs all +// fields are collected. This means we're probably writing a lot more +// data to disk when saving the state of an ongoing update to the RBU +// update database than is strictly necessary. +// + +// #include +// #include +// #include + +// #include "sqlite3.h" + +//************* Include sqlite3rbu.h in the middle of sqlite3rbu.c ********** +//************* Begin file sqlite3rbu.h ************************************* +// 2014 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains the public interface for the RBU extension. + +// SUMMARY +// +// Writing a transaction containing a large number of operations on +// b-tree indexes that are collectively larger than the available cache +// memory can be very inefficient. +// +// The problem is that in order to update a b-tree, the leaf page (at least) +// containing the entry being inserted or deleted must be modified. If the +// working set of leaves is larger than the available cache memory, then a +// single leaf that is modified more than once as part of the transaction +// may be loaded from or written to the persistent media multiple times. +// Additionally, because the index updates are likely to be applied in +// random order, access to pages within the database is also likely to be in +// random order, which is itself quite inefficient. +// +// One way to improve the situation is to sort the operations on each index +// by index key before applying them to the b-tree. This leads to an IO +// pattern that resembles a single linear scan through the index b-tree, +// and all but guarantees each modified leaf page is loaded and stored +// exactly once. SQLite uses this trick to improve the performance of +// CREATE INDEX commands. This extension allows it to be used to improve +// the performance of large transactions on existing databases. +// +// Additionally, this extension allows the work involved in writing the +// large transaction to be broken down into sub-transactions performed +// sequentially by separate processes. This is useful if the system cannot +// guarantee that a single update process will run for long enough to apply +// the entire update, for example because the update is being applied on a +// mobile device that is frequently rebooted. Even after the writer process +// has committed one or more sub-transactions, other database clients continue +// to read from the original database snapshot. In other words, partially +// applied transactions are not visible to other clients. +// +// "RBU" stands for "Resumable Bulk Update". As in a large database update +// transmitted via a wireless network to a mobile device. A transaction +// applied using this extension is hence refered to as an "RBU update". +// +// +// LIMITATIONS +// +// An "RBU update" transaction is subject to the following limitations: +// +// * The transaction must consist of INSERT, UPDATE and DELETE operations +// only. +// +// * INSERT statements may not use any default values. +// +// * UPDATE and DELETE statements must identify their target rows by +// non-NULL PRIMARY KEY values. Rows with NULL values stored in PRIMARY +// KEY fields may not be updated or deleted. If the table being written +// has no PRIMARY KEY, affected rows must be identified by rowid. +// +// * UPDATE statements may not modify PRIMARY KEY columns. +// +// * No triggers will be fired. +// +// * No foreign key violations are detected or reported. +// +// * CHECK constraints are not enforced. +// +// * No constraint handling mode except for "OR ROLLBACK" is supported. +// +// +// PREPARATION +// +// An "RBU update" is stored as a separate SQLite database. A database +// containing an RBU update is an "RBU database". For each table in the +// target database to be updated, the RBU database should contain a table +// named "data_" containing the same set of columns as the +// target table, and one more - "rbu_control". The data_% table should +// have no PRIMARY KEY or UNIQUE constraints, but each column should have +// the same type as the corresponding column in the target database. +// The "rbu_control" column should have no type at all. For example, if +// the target database contains: +// +// CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c UNIQUE); +// +// Then the RBU database should contain: +// +// CREATE TABLE data_t1(a INTEGER, b TEXT, c, rbu_control); +// +// The order of the columns in the data_% table does not matter. +// +// Instead of a regular table, the RBU database may also contain virtual +// tables or view named using the data_ naming scheme. +// +// Instead of the plain data_ naming scheme, RBU database tables +// may also be named data_, where is any sequence +// of zero or more numeric characters (0-9). This can be significant because +// tables within the RBU database are always processed in order sorted by +// name. By judicious selection of the portion of the names +// of the RBU tables the user can therefore control the order in which they +// are processed. This can be useful, for example, to ensure that "external +// content" FTS4 tables are updated before their underlying content tables. +// +// If the target database table is a virtual table or a table that has no +// PRIMARY KEY declaration, the data_% table must also contain a column +// named "rbu_rowid". This column is mapped to the tables implicit primary +// key column - "rowid". Virtual tables for which the "rowid" column does +// not function like a primary key value cannot be updated using RBU. For +// example, if the target db contains either of the following: +// +// CREATE VIRTUAL TABLE x1 USING fts3(a, b); +// CREATE TABLE x1(a, b) +// +// then the RBU database should contain: +// +// CREATE TABLE data_x1(a, b, rbu_rowid, rbu_control); +// +// All non-hidden columns (i.e. all columns matched by "SELECT *") of the +// target table must be present in the input table. For virtual tables, +// hidden columns are optional - they are updated by RBU if present in +// the input table, or not otherwise. For example, to write to an fts4 +// table with a hidden languageid column such as: +// +// CREATE VIRTUAL TABLE ft1 USING fts4(a, b, languageid='langid'); +// +// Either of the following input table schemas may be used: +// +// CREATE TABLE data_ft1(a, b, langid, rbu_rowid, rbu_control); +// CREATE TABLE data_ft1(a, b, rbu_rowid, rbu_control); +// +// For each row to INSERT into the target database as part of the RBU +// update, the corresponding data_% table should contain a single record +// with the "rbu_control" column set to contain integer value 0. The +// other columns should be set to the values that make up the new record +// to insert. +// +// If the target database table has an INTEGER PRIMARY KEY, it is not +// possible to insert a NULL value into the IPK column. Attempting to +// do so results in an SQLITE_MISMATCH error. +// +// For each row to DELETE from the target database as part of the RBU +// update, the corresponding data_% table should contain a single record +// with the "rbu_control" column set to contain integer value 1. The +// real primary key values of the row to delete should be stored in the +// corresponding columns of the data_% table. The values stored in the +// other columns are not used. +// +// For each row to UPDATE from the target database as part of the RBU +// update, the corresponding data_% table should contain a single record +// with the "rbu_control" column set to contain a value of type text. +// The real primary key values identifying the row to update should be +// stored in the corresponding columns of the data_% table row, as should +// the new values of all columns being update. The text value in the +// "rbu_control" column must contain the same number of characters as +// there are columns in the target database table, and must consist entirely +// of 'x' and '.' characters (or in some special cases 'd' - see below). For +// each column that is being updated, the corresponding character is set to +// 'x'. For those that remain as they are, the corresponding character of the +// rbu_control value should be set to '.'. For example, given the tables +// above, the update statement: +// +// UPDATE t1 SET c = 'usa' WHERE a = 4; +// +// is represented by the data_t1 row created by: +// +// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x'); +// +// Instead of an 'x' character, characters of the rbu_control value specified +// for UPDATEs may also be set to 'd'. In this case, instead of updating the +// target table with the value stored in the corresponding data_% column, the +// user-defined SQL function "rbu_delta()" is invoked and the result stored in +// the target table column. rbu_delta() is invoked with two arguments - the +// original value currently stored in the target table column and the +// value specified in the data_xxx table. +// +// For example, this row: +// +// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..d'); +// +// is similar to an UPDATE statement such as: +// +// UPDATE t1 SET c = rbu_delta(c, 'usa') WHERE a = 4; +// +// Finally, if an 'f' character appears in place of a 'd' or 's' in an +// ota_control string, the contents of the data_xxx table column is assumed +// to be a "fossil delta" - a patch to be applied to a blob value in the +// format used by the fossil source-code management system. In this case +// the existing value within the target database table must be of type BLOB. +// It is replaced by the result of applying the specified fossil delta to +// itself. +// +// If the target database table is a virtual table or a table with no PRIMARY +// KEY, the rbu_control value should not include a character corresponding +// to the rbu_rowid value. For example, this: +// +// INSERT INTO data_ft1(a, b, rbu_rowid, rbu_control) +// VALUES(NULL, 'usa', 12, '.x'); +// +// causes a result similar to: +// +// UPDATE ft1 SET b = 'usa' WHERE rowid = 12; +// +// The data_xxx tables themselves should have no PRIMARY KEY declarations. +// However, RBU is more efficient if reading the rows in from each data_xxx +// table in "rowid" order is roughly the same as reading them sorted by +// the PRIMARY KEY of the corresponding target database table. In other +// words, rows should be sorted using the destination table PRIMARY KEY +// fields before they are inserted into the data_xxx tables. +// +// USAGE +// +// The API declared below allows an application to apply an RBU update +// stored on disk to an existing target database. Essentially, the +// application: +// +// 1) Opens an RBU handle using the sqlite3rbu_open() function. +// +// 2) Registers any required virtual table modules with the database +// handle returned by sqlite3rbu_db(). Also, if required, register +// the rbu_delta() implementation. +// +// 3) Calls the sqlite3rbu_step() function one or more times on +// the new handle. Each call to sqlite3rbu_step() performs a single +// b-tree operation, so thousands of calls may be required to apply +// a complete update. +// +// 4) Calls sqlite3rbu_close() to close the RBU update handle. If +// sqlite3rbu_step() has been called enough times to completely +// apply the update to the target database, then the RBU database +// is marked as fully applied. Otherwise, the state of the RBU +// update application is saved in the RBU database for later +// resumption. +// +// See comments below for more detail on APIs. +// +// If an update is only partially applied to the target database by the +// time sqlite3rbu_close() is called, various state information is saved +// within the RBU database. This allows subsequent processes to automatically +// resume the RBU update from where it left off. +// +// To remove all RBU extension state information, returning an RBU database +// to its original contents, it is sufficient to drop all tables that begin +// with the prefix "rbu_" +// +// DATABASE LOCKING +// +// An RBU update may not be applied to a database in WAL mode. Attempting +// to do so is an error (SQLITE_ERROR). +// +// While an RBU handle is open, a SHARED lock may be held on the target +// database file. This means it is possible for other clients to read the +// database, but not to write it. +// +// If an RBU update is started and then suspended before it is completed, +// then an external client writes to the database, then attempting to resume +// the suspended RBU update is also an error (SQLITE_BUSY). + +// #include "sqlite3.h" ** Required for error code definitions ** + +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ + +//************* End of sqlite3rbu.h ***************************************** +//************* Continuing where we left off in sqlite3rbu.c **************** + +// Maximum number of prepared UPDATE statements held by this module + +// Delta checksums disabled by default. Compile with -DRBU_ENABLE_DELTA_CKSUM +// to enable checksum verification. + +// Swap two objects of type TYPE. + +// Name of the URI option that causes RBU to take an exclusive lock as +// part of the incremental checkpoint operation. + +// The rbu_state table is used to save the state of a partially applied +// update so that it can be resumed later. The table consists of integer +// keys mapped to values as follows: +// +// RBU_STATE_STAGE: +// May be set to integer values 1, 2, 4 or 5. As follows: +// 1: the *-rbu file is currently under construction. +// 2: the *-rbu file has been constructed, but not yet moved +// to the *-wal path. +// 4: the checkpoint is underway. +// 5: the rbu update has been checkpointed. +// +// RBU_STATE_TBL: +// Only valid if STAGE==1. The target database name of the table +// currently being written. +// +// RBU_STATE_IDX: +// Only valid if STAGE==1. The target database name of the index +// currently being written, or NULL if the main table is currently being +// updated. +// +// RBU_STATE_ROW: +// Only valid if STAGE==1. Number of rows already processed for the current +// table/index. +// +// RBU_STATE_PROGRESS: +// Trbul number of sqlite3rbu_step() calls made so far as part of this +// rbu update. +// +// RBU_STATE_CKPT: +// Valid if STAGE==4. The 64-bit checksum associated with the wal-index +// header created by recovering the *-wal file. This is used to detect +// cases when another client appends frames to the *-wal file in the +// middle of an incremental checkpoint (an incremental checkpoint cannot +// be continued if this happens). +// +// RBU_STATE_COOKIE: +// Valid if STAGE==1. The current change-counter cookie value in the +// target db file. +// +// RBU_STATE_OALSZ: +// Valid if STAGE==1. The size in bytes of the *-oal file. +// +// RBU_STATE_DATATBL: +// Only valid if STAGE==1. The RBU database name of the table +// currently being read. + +type RbuFrame1 = struct { + FiDbPage U32 + FiWalFrame U32 +} /* sqlite3.c:203382:9 */ + +//************* End of sqlite3rbu.h ***************************************** +//************* Continuing where we left off in sqlite3rbu.c **************** + +// Maximum number of prepared UPDATE statements held by this module + +// Delta checksums disabled by default. Compile with -DRBU_ENABLE_DELTA_CKSUM +// to enable checksum verification. + +// Swap two objects of type TYPE. + +// Name of the URI option that causes RBU to take an exclusive lock as +// part of the incremental checkpoint operation. + +// The rbu_state table is used to save the state of a partially applied +// update so that it can be resumed later. The table consists of integer +// keys mapped to values as follows: +// +// RBU_STATE_STAGE: +// May be set to integer values 1, 2, 4 or 5. As follows: +// 1: the *-rbu file is currently under construction. +// 2: the *-rbu file has been constructed, but not yet moved +// to the *-wal path. +// 4: the checkpoint is underway. +// 5: the rbu update has been checkpointed. +// +// RBU_STATE_TBL: +// Only valid if STAGE==1. The target database name of the table +// currently being written. +// +// RBU_STATE_IDX: +// Only valid if STAGE==1. The target database name of the index +// currently being written, or NULL if the main table is currently being +// updated. +// +// RBU_STATE_ROW: +// Only valid if STAGE==1. Number of rows already processed for the current +// table/index. +// +// RBU_STATE_PROGRESS: +// Trbul number of sqlite3rbu_step() calls made so far as part of this +// rbu update. +// +// RBU_STATE_CKPT: +// Valid if STAGE==4. The 64-bit checksum associated with the wal-index +// header created by recovering the *-wal file. This is used to detect +// cases when another client appends frames to the *-wal file in the +// middle of an incremental checkpoint (an incremental checkpoint cannot +// be continued if this happens). +// +// RBU_STATE_COOKIE: +// Valid if STAGE==1. The current change-counter cookie value in the +// target db file. +// +// RBU_STATE_OALSZ: +// Valid if STAGE==1. The size in bytes of the *-oal file. +// +// RBU_STATE_DATATBL: +// Only valid if STAGE==1. The RBU database name of the table +// currently being read. + +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ +type RbuObjIter1 = struct { + FpTblIter uintptr + FpIdxIter uintptr + FnTblCol int32 + F__ccgo_pad1 [4]byte + FazTblCol uintptr + FazTblType uintptr + FaiSrcOrder uintptr + FabTblPk uintptr + FabNotNull uintptr + FabIndexed uintptr + FeType int32 + FbCleanup int32 + FzTbl uintptr + FzDataTbl uintptr + FzIdx uintptr + FiTnum int32 + FiPkTnum int32 + FbUnique int32 + FnIndex int32 + FnCol int32 + F__ccgo_pad2 [4]byte + FpSelect uintptr + FpInsert uintptr + FpDelete uintptr + FpTmpInsert uintptr + FnIdxCol int32 + F__ccgo_pad3 [4]byte + FaIdxCol uintptr + FzIdxSql uintptr + FpRbuUpdate uintptr +} /* sqlite3.c:203382:9 */ + +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ +type RbuState1 = struct { + FeStage int32 + F__ccgo_pad1 [4]byte + FzTbl uintptr + FzDataTbl uintptr + FzIdx uintptr + FiWalCksum I64 + FnRow int32 + F__ccgo_pad2 [4]byte + FnProgress I64 + FiCookie U32 + F__ccgo_pad3 [4]byte + FiOalSz I64 + FnPhaseOneStep I64 +} /* sqlite3.c:203815:9 */ + +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ +type RbuSpan1 = struct { + FzSpan uintptr + FnSpan int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:203382:9 */ + +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ +type rbu_vfs = struct { + Fbase Sqlite3_vfs + FpRealVfs uintptr + Fmutex uintptr + FpRbu uintptr + FpMain uintptr + FpMainRbu uintptr +} /* sqlite3.c:203382:9 */ + +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ +type rbu_file = struct { + Fbase Sqlite3_file + FpReal uintptr + FpRbuVfs uintptr + FpRbu uintptr + Fsz I64 + FopenFlags int32 + FiCookie U32 + FiWriteVer U8 + FbNolock U8 + F__ccgo_pad1 [2]byte + FnShm int32 + FapShm uintptr + FzDel uintptr + FzWal uintptr + FpWalFd uintptr + FpMainNext uintptr + FpMainRbuNext uintptr +} /* sqlite3.c:203382:9 */ + +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ +type RbuUpdateStmt1 = struct { + FzMask uintptr + FpUpdate uintptr + FpNext uintptr +} /* sqlite3.c:203382:9 */ + +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ + +// True for an RBU vacuum handle, or false otherwise. + +// ************************************************************************ +// +// The following three functions, found below: +// +// rbuDeltaGetInt() +// rbuDeltaChecksum() +// rbuDeltaApply() +// +// are lifted from the fossil source code (http://fossil-scm.org). They +// are used to implement the scalar SQL function rbu_fossil_delta(). + +// Read bytes from *pz and convert them into a positive integer. When +// finished, leave *pz pointing to the first character past the end of +// the integer. The *pLen parameter holds the length of the string +// in *pz and is decremented once for each character in the integer. +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ + var v uint32 = uint32(0) + var c int32 + var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) + var zStart uintptr = z + for libc.AssignInt32(&c, int32(zValue[0x7f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))])) >= 0 { + v = v<<6 + uint32(c) + } + z-- + *(*int32)(unsafe.Pointer(pLen)) -= int32((int64(z) - int64(zStart)) / 1) + *(*uintptr)(unsafe.Pointer(pz)) = z + return v +} + +var zValue = [128]int8{ + int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), + int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), + int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), + int8(0), int8(1), int8(2), int8(3), int8(4), int8(5), int8(6), int8(7), int8(8), int8(9), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), + int8(-1), int8(10), int8(11), int8(12), int8(13), int8(14), int8(15), int8(16), int8(17), int8(18), int8(19), int8(20), int8(21), int8(22), int8(23), int8(24), + int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), + int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), + int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), +} /* sqlite3.c:204110:28 */ + +// Apply a delta. +// +// The output buffer should be big enough to hold the whole output +// file and a NUL terminator at the end. The delta_output_size() +// routine will determine this size for you. +// +// The delta string should be null-terminated. But the delta string +// may contain embedded NUL characters (if the input and output are +// binary files) so we also have to pass in the length of the delta in +// the lenDelta parameter. +// +// This function returns the size of the output file in bytes (excluding +// the final NUL terminator character). Except, if the delta string is +// malformed or intended for use with a source file other than zSrc, +// then this routine returns -1. +// +// Refer to the delta_create() documentation above for a description +// of the delta file format. +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + *(*uintptr)(unsafe.Pointer(bp)) = zDelta + *(*int32)(unsafe.Pointer(bp + 8)) = lenDelta + + var limit uint32 + var total uint32 = uint32(0) + + limit = rbuDeltaGetInt(tls, bp, bp+8) + if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != '\n' { + // ERROR: size integer not terminated by "\n" + return -1 + } + *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ + *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- + for *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && *(*int32)(unsafe.Pointer(bp + 8)) > 0 { + var cnt uint32 + var ofst uint32 + cnt = rbuDeltaGetInt(tls, bp, bp+8) + switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) { + case '@': + { + *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ + *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- + ofst = rbuDeltaGetInt(tls, bp, bp+8) + if *(*int32)(unsafe.Pointer(bp + 8)) > 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != ',' { + // ERROR: copy command not terminated by ',' + return -1 + } + *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ + *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- + total = total + cnt + if total > limit { + // ERROR: copy exceeds output file size + return -1 + } + if int32(ofst+cnt) > lenSrc { + // ERROR: copy extends past end of input + return -1 + } + libc.Xmemcpy(tls, zOut, zSrc+uintptr(ofst), uint64(cnt)) + zOut += uintptr(cnt) + break + + } + case ':': + { + *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ + *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- + total = total + cnt + if total > limit { + // ERROR: insert command gives an output larger than predicted + return -1 + } + if int32(cnt) > *(*int32)(unsafe.Pointer(bp + 8)) { + // ERROR: insert count exceeds size of delta + return -1 + } + libc.Xmemcpy(tls, zOut, *(*uintptr)(unsafe.Pointer(bp /* zDelta */)), uint64(cnt)) + zOut += uintptr(cnt) + *(*uintptr)(unsafe.Pointer(bp /* zDelta */)) += uintptr(cnt) + *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) -= int32(cnt) + break + + } + case ';': + { + *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ + *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- + *(*uint8)(unsafe.Pointer(zOut)) = uint8(0) + if total != limit { + // ERROR: generated size does not match predicted size + return -1 + } + return int32(total) + + } + default: + { + // ERROR: unknown delta operator + return -1 + + } + } + } + // ERROR: unterminated delta + return -1 +} + +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + *(*uintptr)(unsafe.Pointer(bp)) = zDelta + *(*int32)(unsafe.Pointer(bp + 8)) = lenDelta + + var size int32 + size = int32(rbuDeltaGetInt(tls, bp, bp+8)) + if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != '\n' { + // ERROR: size integer not terminated by "\n" + return -1 + } + return size +} + +// +// End of code taken from fossil. +// + +// Implementation of SQL scalar function rbu_fossil_delta(). +// +// This function applies a fossil delta patch to a blob. Exactly two +// arguments must be passed to this function. The first is the blob to +// patch and the second the patch to apply. If no error occurs, this +// function returns the patched blob. +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ + var aDelta uintptr + var nDelta int32 + var aOrig uintptr + var nOrig int32 + var nOut int32 + var nOut2 int32 + var aOut uintptr + + nOrig = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + aOrig = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) + nDelta = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + aDelta = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + + // Figure out the size of the output + nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) + if nOut < 0 { + Xsqlite3_result_error(tls, context, ts+27678, -1) + return + } + + aOut = Xsqlite3_malloc(tls, nOut+1) + if aOut == uintptr(0) { + Xsqlite3_result_error_nomem(tls, context) + } else { + nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) + if nOut2 != nOut { + Xsqlite3_free(tls, aOut) + Xsqlite3_result_error(tls, context, ts+27678, -1) + } else { + Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + } + } +} + +// Prepare the SQL statement in buffer zSql against database handle db. +// If successful, set *ppStmt to point to the new statement and return +// SQLITE_OK. +// +// Otherwise, if an error does occur, set *ppStmt to NULL and return +// an SQLite error code. Additionally, set output variable *pzErrmsg to +// point to a buffer containing an error message. It is the responsibility +// of the caller to (eventually) free this buffer using sqlite3_free(). +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = Xsqlite3_prepare_v2(tls, db, zSql, -1, ppStmt, uintptr(0)) + if rc != SQLITE_OK { + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) + } + return rc +} + +// Reset the SQL statement passed as the first argument. Return a copy +// of the value returned by sqlite3_reset(). +// +// If an error has occurred, then set *pzErrmsg to point to a buffer +// containing an error message. It is the responsibility of the caller +// to eventually free this buffer using sqlite3_free(). +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = Xsqlite3_reset(tls, pStmt) + if rc != SQLITE_OK { + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + } + return rc +} + +// Unless it is NULL, argument zSql points to a buffer allocated using +// sqlite3_malloc containing an SQL statement. This function prepares the SQL +// statement against database db and frees the buffer. If statement +// compilation is successful, *ppStmt is set to point to the new statement +// handle and SQLITE_OK is returned. +// +// Otherwise, if an error occurs, *ppStmt is set to NULL and an error code +// returned. In this case, *pzErrmsg may also be set to point to an error +// message. It is the responsibility of the caller to free this error message +// buffer using sqlite3_free(). +// +// If argument zSql is NULL, this function assumes that an OOM has occurred. +// In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ + var rc int32 + + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) + } else { + rc = prepareAndCollectError(tls, db, ppStmt, pzErrmsg, zSql) + Xsqlite3_free(tls, zSql) + } + return rc +} + +// Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated +// by an earlier call to rbuObjIterCacheTableInfo(). +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ + var i int32 + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(i)*8))) + } + Xsqlite3_free(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol) + (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol = 0 + (*RbuObjIter)(unsafe.Pointer(pIter)).FeType = 0 // Invalid value +} + +// Finalize all statements and free all allocations that are specific to +// the current object (table/index pair). +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ + var pUp uintptr + + Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) + Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpInsert) + Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpDelete) + Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTmpInsert) + pUp = (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate + for pUp != 0 { + var pTmp uintptr = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext + Xsqlite3_finalize(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate) + Xsqlite3_free(tls, pUp) + pUp = pTmp + } + Xsqlite3_free(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol) + Xsqlite3_free(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql) + + (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FpInsert = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FpDelete = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FpTmpInsert = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = 0 + (*RbuObjIter)(unsafe.Pointer(pIter)).FnIdxCol = 0 + (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol = uintptr(0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql = uintptr(0) +} + +// Clean up any resources allocated as part of the iterator object passed +// as the only argument. +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ + rbuObjIterClearStatements(tls, pIter) + Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) + Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) + rbuObjIterFreeCols(tls, pIter) + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(RbuObjIter{}))) +} + +// Advance the iterator to the next position. +// +// If no error occurs, SQLITE_OK is returned and the iterator is left +// pointing to the next entry. Otherwise, an error code and message is +// left in the RBU handle passed as the first argument. A copy of the +// error code is returned. +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ + var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc + if rc == SQLITE_OK { + + // Free any SQLite statements used while processing the previous object + rbuObjIterClearStatements(tls, pIter) + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, + + ts+27699, uintptr(0), uintptr(0), p+64) + } + + if rc == SQLITE_OK { + if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { + rbuObjIterFreeCols(tls, pIter) + (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 0 + rc = Xsqlite3_step(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) + if rc != SQLITE_ROW { + rc = resetAndCollectError(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter, p+64) + (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl = uintptr(0) + } else { + (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl = Xsqlite3_column_text(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter, 0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl = Xsqlite3_column_text(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter, 1) + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl != 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { + rc = SQLITE_OK + } else { + rc = SQLITE_NOMEM + } + } + } else { + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { + var pIdx uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter + rc = Xsqlite3_bind_text(tls, pIdx, 1, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, -1, uintptr(0)) + } + if rc == SQLITE_OK { + rc = Xsqlite3_step(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) + if rc != SQLITE_ROW { + rc = resetAndCollectError(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, p+64) + (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 + (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx = uintptr(0) + } else { + (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx = Xsqlite3_column_text(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, 0) + (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum = Xsqlite3_column_int(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, 1) + (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique = Xsqlite3_column_int(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, 2) + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx != 0 { + rc = SQLITE_OK + } else { + rc = SQLITE_NOMEM + } + } + } + } + } + } + + if rc != SQLITE_OK { + rbuObjIterFinalize(tls, pIter) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + } + return rc +} + +// The implementation of the rbu_target_name() SQL function. This function +// accepts one or two arguments. The first argument is the name of a table - +// the name of a table in the RBU database. The second, if it is present, is 1 +// for a view or 0 for a table. +// +// For a non-vacuum RBU handle, if the table name matches the pattern: +// +// data[0-9]_ +// +// where is any sequence of 1 or more characters, is returned. +// Otherwise, if the only argument does not match the above pattern, an SQL +// NULL is returned. +// +// "data_t1" -> "t1" +// "data0123_t2" -> "t2" +// "dataAB_t3" -> NULL +// +// For an rbu vacuum handle, a copy of the first argument is returned if +// the second argument is either missing or 0 (not a view). +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ + var p uintptr = Xsqlite3_user_data(tls, pCtx) + var zIn uintptr + + zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if zIn != 0 { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + + if argc == 1 || 0 == Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) { + Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) + } + } else { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24869, zIn, uint64(4)) == 0 { + var i int32 + for i = 4; int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { + } + if int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) == '_' && *(*uint8)(unsafe.Pointer(zIn + uintptr(i+1))) != 0 { + Xsqlite3_result_text(tls, pCtx, zIn+uintptr(i+1), -1, uintptr(0)) + } + } + } + } +} + +// Initialize the iterator structure passed as the second argument. +// +// If no error occurs, SQLITE_OK is returned and the iterator is left +// pointing to the first entry. Otherwise, an error code and message is +// left in the RBU handle passed as the first argument. A copy of the +// error code is returned. +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(RbuObjIter{}))) + + rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, + Xsqlite3_mprintf(tls, + + ts+27870, libc.VaList(bp, func() uintptr { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + return ts + 28020 /* "AND rootpage!=0 ..." */ + } + return ts + 1525 /* "" */ + }()))) + + if rc == SQLITE_OK { + rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, + + ts+28061) + } + + (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + return rbuObjIterNext(tls, p, pIter) +} + +// This is a wrapper around "sqlite3_mprintf(zFmt, ...)". If an OOM occurs, +// an error code is stored in the RBU handle passed as the first argument. +// +// If an error has already occurred (p->rc is already set to something other +// than SQLITE_OK), then this function returns NULL without modifying the +// stored error code. In this case it still calls sqlite3_free() on any +// printf() parameters associated with %z conversions. +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ + var zSql uintptr = uintptr(0) + var ap Va_list + _ = ap + ap = va + zSql = Xsqlite3_vmprintf(tls, zFmt, ap) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if zSql == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } + } else { + Xsqlite3_free(tls, zSql) + zSql = uintptr(0) + } + _ = ap + return zSql +} + +// Argument zFmt is a sqlite3_mprintf() style format string. The trailing +// arguments are the usual subsitution values. This function performs +// the printf() style substitutions and executes the result as an SQL +// statement on the RBU handles database. +// +// If an error occurs, an error code and error message is stored in the +// RBU handle. If an error has already occurred when this function is +// called, it is a no-op. +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ + var ap Va_list + _ = ap + var zSql uintptr + ap = va + zSql = Xsqlite3_vmprintf(tls, zFmt, ap) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if zSql == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } else { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), p+64) + } + } + Xsqlite3_free(tls, zSql) + _ = ap + return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc +} + +// Attempt to allocate and return a pointer to a zeroed block of nByte +// bytes. +// +// If an error (i.e. an OOM condition) occurs, return NULL and leave an +// error code in the rbu handle passed as the first argument. Or, if an +// error has already occurred when this function is called, return NULL +// immediately without attempting the allocation or modifying the stored +// error code. +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ + var pRet uintptr = uintptr(0) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + + pRet = Xsqlite3_malloc64(tls, uint64(nByte)) + if pRet == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, pRet, 0, uint64(nByte)) + } + } + return pRet +} + +// Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that +// there is room for at least nCol elements. If an OOM occurs, store an +// error code in the RBU handle passed as the first argument. +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ + var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) + var azNew uintptr + + azNew = rbuMalloc(tls, p, nByte) + if azNew != 0 { + (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol = azNew + (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType = azNew + uintptr(nCol)*8 + (*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder = (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(nCol)*8 + (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk = (*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(nCol)*4 + (*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull = (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(nCol) + (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed = (*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(nCol) + } +} + +// The first argument must be a nul-terminated string. This function +// returns a copy of the string in memory obtained from sqlite3_malloc(). +// It is the responsibility of the caller to eventually free this memory +// using sqlite3_free(). +// +// If an OOM condition is encountered when attempting to allocate memory, +// output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, +// if the allocation succeeds, (*pRc) is left unchanged. +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ + var zRet uintptr = uintptr(0) + + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + if zStr != 0 { + var nCopy Size_t = libc.Xstrlen(tls, zStr) + uint64(1) + zRet = Xsqlite3_malloc64(tls, uint64(nCopy)) + if zRet != 0 { + libc.Xmemcpy(tls, zRet, zStr, nCopy) + } else { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } + } + + return zRet +} + +// Finalize the statement passed as the second argument. +// +// If the sqlite3_finalize() call indicates that an error occurs, and the +// rbu handle error code is not already set, set the error code and error +// message accordingly. +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var db uintptr = Xsqlite3_db_handle(tls, pStmt) + var rc int32 = Xsqlite3_finalize(tls, pStmt) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && rc != SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + } +} + +// Determine the type of a table. +// +// peType is of type (int*), a pointer to an output parameter of type +// (int). This call sets the output parameter as follows, depending +// on the type of the table specified by parameters dbName and zTbl. +// +// RBU_PK_NOTABLE: No such table. +// RBU_PK_NONE: Table has an implicit rowid. +// RBU_PK_IPK: Table has an explicit IPK column. +// RBU_PK_EXTERNAL: Table has an external PK index. +// RBU_PK_WITHOUT_ROWID: Table is WITHOUT ROWID. +// RBU_PK_VTAB: Table is a virtual table. +// +// Argument *piPk is also of type (int*), and also points to an output +// parameter. Unless the table has an external primary key index +// (i.e. unless *peType is set to 3), then *piPk is set to zero. Or, +// if the table does have an external primary key index, then *piPk +// is set to the root page number of the primary key index before +// returning. +// +// ALGORITHM: +// +// if( no entry exists in sqlite_schema ){ +// return RBU_PK_NOTABLE +// }else if( sql for the entry starts with "CREATE VIRTUAL" ){ +// return RBU_PK_VTAB +// }else if( "PRAGMA index_list()" for the table contains a "pk" index ){ +// if( the index that is the pk exists in sqlite_schema ){ +// *piPK = rootpage of that index. +// return RBU_PK_EXTERNAL +// }else{ +// return RBU_PK_WITHOUT_ROWID +// } +// }else if( "PRAGMA table_info()" lists one or more "pk" columns ){ +// return RBU_PK_IPK +// }else{ +// return RBU_PK_NONE +// } +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // 0) SELECT count(*) FROM sqlite_schema where name=%Q AND IsVirtual(%Q) + // 1) PRAGMA index_list = ? + // 2) SELECT count(*) FROM sqlite_schema where name=%Q + // 3) PRAGMA table_info = ? + // var aStmt [4]uintptr at bp+32, 32 + + var zOrig uintptr + var zIdx uintptr + var i uint32 + *(*[4]uintptr)(unsafe.Pointer(bp + 32 /* aStmt */)) = [4]uintptr{uintptr(0), uintptr(0), uintptr(0), uintptr(0)} + + *(*int32)(unsafe.Pointer(peType)) = RBU_PK_NOTABLE + *(*int32)(unsafe.Pointer(piPk)) = 0 + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, + Xsqlite3_mprintf(tls, + + ts+28186, libc.VaList(bp, zTab))) + if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { + goto __1 + } + // Either an error, or no such table. + goto rbuTableType_end +__1: + ; + if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 0) != 0) { + goto __2 + } + *(*int32)(unsafe.Pointer(peType)) = RBU_PK_VTAB // virtual table + goto rbuTableType_end +__2: + ; + *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, + Xsqlite3_mprintf(tls, ts+28305, libc.VaList(bp+8, zTab))) + if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { + goto __3 + } + goto rbuTableType_end +__3: + ; +__4: + if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 1*8))) == SQLITE_ROW) { + goto __5 + } + zOrig = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 1*8)), 3) + zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 1*8)), 1) + if !(zOrig != 0 && zIdx != 0 && int32(*(*U8)(unsafe.Pointer(zOrig))) == 'p') { + goto __6 + } + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, + Xsqlite3_mprintf(tls, + ts+28326, libc.VaList(bp+16, zIdx))) + if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __7 + } + if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 2*8))) == SQLITE_ROW) { + goto __8 + } + *(*int32)(unsafe.Pointer(piPk)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 2*8)), 0) + *(*int32)(unsafe.Pointer(peType)) = RBU_PK_EXTERNAL + goto __9 +__8: + *(*int32)(unsafe.Pointer(peType)) = RBU_PK_WITHOUT_ROWID +__9: + ; +__7: + ; + goto rbuTableType_end +__6: + ; + goto __4 +__5: + ; + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, + Xsqlite3_mprintf(tls, ts+28377, libc.VaList(bp+24, zTab))) + if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __10 + } +__11: + if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 3*8))) == SQLITE_ROW) { + goto __12 + } + if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 3*8)), 5) > 0) { + goto __13 + } + *(*int32)(unsafe.Pointer(peType)) = RBU_PK_IPK // explicit IPK column + goto rbuTableType_end +__13: + ; + goto __11 +__12: + ; + *(*int32)(unsafe.Pointer(peType)) = RBU_PK_NONE +__10: + ; + +rbuTableType_end: + i = uint32(0) +__14: + if !(uint64(i) < uint64(unsafe.Sizeof([4]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))) { + goto __16 + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 32 + uintptr(i)*8))) + goto __15 +__15: + i++ + goto __14 + goto __16 +__16: + +} + +// This is a helper function for rbuObjIterCacheTableInfo(). It populates +// the pIter->abIndexed[] array. +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)) = uintptr(0) + var bIndex int32 = 0 + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, + Xsqlite3_mprintf(tls, ts+28398, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + } + + (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) { + var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)), 1) + var bPartial int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)), 4) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)) = uintptr(0) + if zIdx == uintptr(0) { + break + } + if bPartial != 0 { + libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) + } + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, + Xsqlite3_mprintf(tls, ts+28426, libc.VaList(bp+8, zIdx))) + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { + var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) + if iCid >= 0 { + *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(iCid))) = U8(1) + } + if iCid == -2 { + libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) + } + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */))) + bIndex = 1 + (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex++ + } + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { + // "PRAGMA index_list" includes the main PK b-tree + (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex-- + } + + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */))) + if bIndex == 0 { + (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed = uintptr(0) + } +} + +// If they are not already populated, populate the pIter->azTblCol[], +// pIter->abTblPk[], pIter->nTblCol and pIter->bRowid variables according to +// the table (not index) that the iterator currently points to. +// +// Return SQLITE_OK if successful, or an SQLite error code otherwise. If +// an error does occur, an error code and error message are also left in +// the RBU handle. +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol == uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) + var nCol int32 = 0 + var i int32 // for() loop iterator variable + var bRbuRowid int32 = 0 // If input table has column "rbu_rowid" + var iOrder int32 = 0 + *(*int32)(unsafe.Pointer(bp + 56 /* iTnum */)) = 0 + + // Figure out the type of table this step will deal with. + + rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19352, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { + return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc + } + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { + (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum = *(*int32)(unsafe.Pointer(bp + 56 /* iTnum */)) + } + + // Populate the azTblCol[] and nTblCol variables based on the columns + // of the input table. Ignore any input table columns that begin with + // "rbu_". + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, + Xsqlite3_mprintf(tls, ts+28455, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) + rbuAllocateIterArrays(tls, p, pIter, nCol) + } + for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { + var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) + if Xsqlite3_strnicmp(tls, ts+28474, zName, 4) != 0 { + var zCopy uintptr = rbuStrndup(tls, zName, p+56) + *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol + *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy + } else if 0 == Xsqlite3_stricmp(tls, ts+28479, zName) { + bRbuRowid = 1 + } + } + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && + libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && + bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, + ts+28489, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + func() uintptr { + if bRbuRowid != 0 { + return ts + 28518 /* "may not have" */ + } + return ts + 28531 /* "requires" */ + }())) + } + + // Check that all non-HIDDEN columns in the destination table are also + // present in the input table. Populate the abTblPk[], azTblType[] and + // aiTblOrder[] arrays at the same time. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, + Xsqlite3_mprintf(tls, ts+28540, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + } + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { + var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) + if zName == uintptr(0) { + break + } // An OOM - finalize() below returns S_NOMEM + for i = iOrder; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + if 0 == libc.Xstrcmp(tls, zName, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) { + break + } + } + if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28562, + libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) + } else { + var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) + var bNotNull int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 3) + var zType uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 2) + + if i != iOrder { + { + var t int32 = *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)) + *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)) = *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(iOrder)*4)) + *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(iOrder)*4)) = t + } + + { + var t uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) + *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iOrder)*8)) + *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iOrder)*8)) = t + } + + } + + *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iOrder)*8)) = rbuStrndup(tls, zType, p+56) + + *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iOrder))) = U8(iPk) + *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iOrder))) = U8(libc.Bool32(U8(bNotNull) != 0 || iPk != 0)) + iOrder++ + } + } + + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) + rbuObjIterCacheIndexedCols(tls, p, pIter) + + } + + return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc +} + +// This function constructs and returns a pointer to a nul-terminated +// string containing some SQL clause or list based on one or more of the +// column names currently stored in the pIter->azTblCol[] array. +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var zList uintptr = uintptr(0) + var zSep uintptr = ts + 1525 /* "" */ + var i int32 + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) + zList = rbuMPrintf(tls, p, ts+28589, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14542 /* ", " */ + } + return zList +} + +// Return a comma separated list of the quoted PRIMARY KEY column names, +// in order, for the current table. Before each column name, add the text +// zPre. After each column name, add the zPost text. Use zSeparator as +// the separator text (usually ", "). +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var iPk int32 = 1 + var zRet uintptr = uintptr(0) + var zSep uintptr = ts + 1525 /* "" */ + for 1 != 0 { + var i int32 + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { + var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) + zRet = rbuMPrintf(tls, p, ts+28598, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zSep = zSeparator + break + } + } + if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { + break + } + iPk++ + } + return zRet +} + +// This function is called as part of restarting an RBU vacuum within +// stage 1 of the process (while the *-oal file is being built) while +// updating a table (not an index). The table may be a rowid table or +// a WITHOUT ROWID table. It queries the target database to find the +// largest key that has already been written to the target table and +// constructs a WHERE clause that can be used to extract the remaining +// rows from the source table. For a rowid table, the WHERE clause +// is of the form: +// +// "WHERE _rowid_ > ?" +// +// and for WITHOUT ROWID tables: +// +// "WHERE (key1, key2) > (?, ?)" +// +// Instead of "?" placeholders, the actual WHERE clauses created by +// this function contain literal SQL values. +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)) = uintptr(0) + var zRet uintptr = uintptr(0) + if bRowid != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, + Xsqlite3_mprintf(tls, + ts+28611, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { + var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) + zRet = rbuMPrintf(tls, p, ts+28643, libc.VaList(bp+16, iMax)) + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) + } else { + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1525, ts+14542, ts+28666) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28672, ts+28679, ts+4899) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1525, ts+14542, ts+1525) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, + Xsqlite3_mprintf(tls, + ts+28687, + libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { + var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) + zRet = rbuMPrintf(tls, p, ts+28729, libc.VaList(bp+56, zList, zVal)) + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) + } + + Xsqlite3_free(tls, zOrder) + Xsqlite3_free(tls, zSelect) + Xsqlite3_free(tls, zList) + } + return zRet +} + +// This function is called as part of restating an RBU vacuum when the +// current operation is writing content to an index. If possible, it +// queries the target index b-tree for the largest key already written to +// it, then composes and returns an expression that can be used in a WHERE +// clause to select the remaining required rows from the source table. +// It is only possible to return such an expression if: +// +// * The index contains no DESC columns, and +// * The last key written to the index before the operation was +// suspended does not contain any NULL values. +// +// The expression is of the form: +// +// (index-field1, index-field2, ...) > (?, ?, ...) +// +// except that the "?" placeholders are replaced with literal values. +// +// If the expression cannot be created, NULL is returned. In this case, +// the caller has to use an OFFSET clause to extract only the required +// rows from the sourct table, just as it does for an RBU update operation. +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ + bp := tls.Alloc(192) + defer tls.Free(192) + + var zOrder uintptr + var zLhs uintptr + var zSelect uintptr + var zVector uintptr + var zRet uintptr + var bFailed int32 + var zSep uintptr + var iCol int32 + // var pXInfo uintptr at bp+176, 8 + + var i int32 + var iCid int32 + var zCollate uintptr + var zCol uintptr + var zQuoted uintptr + // var pSel uintptr at bp+184, 8 + zOrder = uintptr(0) + zLhs = uintptr(0) + zSelect = uintptr(0) + zVector = uintptr(0) + zRet = uintptr(0) + bFailed = 0 + zSep = ts + 1525 /* "" */ + iCol = 0 + *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, + Xsqlite3_mprintf(tls, ts+28426, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) +__1: + if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { + goto __2 + } + iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) + zCollate = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) + if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), 3) != 0) { + goto __3 + } + bFailed = 1 + goto __2 +__3: + ; + + if !(iCid < 0) { + goto __4 + } + if !((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK) { + goto __6 + } + i = 0 +__8: + if !(int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0) { + goto __10 + } + goto __9 +__9: + i++ + goto __8 + goto __10 +__10: + ; + + zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) + goto __7 +__6: + zCol = ts + 28749 /* "_rowid_" */ +__7: + ; + goto __5 +__4: + zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) +__5: + ; + + zLhs = rbuMPrintf(tls, p, ts+28757, + libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) + zOrder = rbuMPrintf(tls, p, ts+28778, + libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) + zSelect = rbuMPrintf(tls, p, ts+28814, + libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) + zSep = ts + 14542 /* ", " */ + iCol++ + goto __1 +__2: + ; + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) + if !(bFailed != 0) { + goto __11 + } + goto index_start_out +__11: + ; + + if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __12 + } + *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, + Xsqlite3_mprintf(tls, ts+28841, + libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) + if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { + goto __13 + } + zSep = ts + 1525 /* "" */ + iCol = 0 +__14: + if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { + goto __16 + } + zQuoted = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)), iCol) + if !(zQuoted == uintptr(0)) { + goto __17 + } + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + goto __18 +__17: + if !(int32(*(*uint8)(unsafe.Pointer(zQuoted))) == 'N') { + goto __19 + } + bFailed = 1 + goto __16 +__19: + ; +__18: + ; + zVector = rbuMPrintf(tls, p, ts+28889, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14542 /* ", " */ + goto __15 +__15: + iCol++ + goto __14 + goto __16 +__16: + ; + + if !!(bFailed != 0) { + goto __20 + } + zRet = rbuMPrintf(tls, p, ts+28896, libc.VaList(bp+160, zLhs, zVector)) +__20: + ; +__13: + ; + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */))) +__12: + ; + +index_start_out: + Xsqlite3_free(tls, zOrder) + Xsqlite3_free(tls, zSelect) + Xsqlite3_free(tls, zVector) + Xsqlite3_free(tls, zLhs) + return zRet +} + +// This function is used to create a SELECT list (the list of SQL +// expressions that follows a SELECT keyword) for a SELECT statement +// used to read from an data_xxx or rbu_tmp_xxx table while updating the +// index object currently indicated by the iterator object passed as the +// second argument. A "PRAGMA index_xinfo = " statement is used +// to obtain the required information. +// +// If the index is of the following form: +// +// CREATE INDEX i1 ON t1(c, b COLLATE nocase); +// +// and "t1" is a table with an explicit INTEGER PRIMARY KEY column +// "ipk", the returned string is: +// +// "`c` COLLATE 'BINARY', `b` COLLATE 'NOCASE', `ipk` COLLATE 'BINARY'" +// +// As well as the returned string, three other malloc'd strings are +// returned via output parameters. As follows: +// +// pzImposterCols: ... +// pzImposterPk: ... +// pzWhere: ... +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ + bp := tls.Alloc(208) + defer tls.Free(208) + + var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc // Error code + var rc2 int32 // sqlite3_finalize() return code + var zRet uintptr = uintptr(0) // String to return + var zImpCols uintptr = uintptr(0) // String to return via *pzImposterCols + var zImpPK uintptr = uintptr(0) // String to return via *pzImposterPK + var zWhere uintptr = uintptr(0) // String to return via *pzWhere + var nBind int32 = 0 // Value to return via *pnBind + var zCom uintptr = ts + 1525 /* "" */ // Set to ", " later on + var zAnd uintptr = ts + 1525 /* "" */ // Set to " AND " later on + *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = ? + + if rc == SQLITE_OK { + + rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, + Xsqlite3_mprintf(tls, ts+28426, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + } + + for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { + var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 1) + var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 3) + var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 4) + var zCol uintptr = uintptr(0) + var zType uintptr + + if iCid == -2 { + var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) + zRet = Xsqlite3_mprintf(tls, ts+28908, libc.VaList(bp+8, zRet, zCom, + (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) + zType = ts + 1525 /* "" */ + } else { + if iCid < 0 { + // An integer primary key. If the table has an explicit IPK, use + // its name. Otherwise, use "rbu_rowid". + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK { + var i int32 + for i = 0; int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0; i++ { + } + + zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) + } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + zCol = ts + 28749 /* "_rowid_" */ + } else { + zCol = ts + 28479 /* "rbu_rowid" */ + } + zType = ts + 1090 /* "INTEGER" */ + } else { + zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) + zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) + } + zRet = Xsqlite3_mprintf(tls, ts+28930, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + } + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { + var zOrder uintptr = func() uintptr { + if bDesc != 0 { + return ts + 28666 + } + return ts + 1525 + }() + zImpPK = Xsqlite3_mprintf(tls, ts+28950, + libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) + } + zImpCols = Xsqlite3_mprintf(tls, ts+28971, + libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) + zWhere = Xsqlite3_mprintf(tls, + ts+29004, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { + rc = SQLITE_NOMEM + } + zCom = ts + 14542 /* ", " */ + zAnd = ts + 21372 /* " AND " */ + nBind++ + } + + rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */))) + if rc == SQLITE_OK { + rc = rc2 + } + + if rc != SQLITE_OK { + Xsqlite3_free(tls, zRet) + Xsqlite3_free(tls, zImpCols) + Xsqlite3_free(tls, zImpPK) + Xsqlite3_free(tls, zWhere) + zRet = uintptr(0) + zImpCols = uintptr(0) + zImpPK = uintptr(0) + zWhere = uintptr(0) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + } + + *(*uintptr)(unsafe.Pointer(pzImposterCols)) = zImpCols + *(*uintptr)(unsafe.Pointer(pzImposterPk)) = zImpPK + *(*uintptr)(unsafe.Pointer(pzWhere)) = zWhere + *(*int32)(unsafe.Pointer(pnBind)) = nBind + return zRet +} + +// Assuming the current table columns are "a", "b" and "c", and the zObj +// paramter is passed "old", return a string of the form: +// +// "old.a, old.b, old.b" +// +// With the column names escaped. +// +// For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append +// the text ", old._rowid_" to the returned value. +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var zList uintptr = uintptr(0) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { + var zS uintptr = ts + 1525 /* "" */ + var i int32 + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { + var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) + zList = Xsqlite3_mprintf(tls, ts+29028, libc.VaList(bp, zList, zS, zObj, zCol)) + } else { + zList = Xsqlite3_mprintf(tls, ts+29040, libc.VaList(bp+32, zList, zS)) + } + zS = ts + 14542 /* ", " */ + if zList == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + break + } + } + + // For a table with implicit rowids, append "old._rowid_" to the list. + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { + zList = rbuMPrintf(tls, p, ts+29049, libc.VaList(bp+48, zList, zObj)) + } + } + return zList +} + +// Return an expression that can be used in a WHERE clause to match the +// primary key of the current table. For example, if the table is: +// +// CREATE TABLE t1(a, b, c, PRIMARY KEY(b, c)); +// +// Return the string: +// +// "b = ?1 AND c = ?2" +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var zList uintptr = uintptr(0) + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { + zList = rbuMPrintf(tls, p, ts+29064, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { + var zSep uintptr = ts + 1525 /* "" */ + var i int32 + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { + zList = rbuMPrintf(tls, p, ts+29078, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21372 /* " AND " */ + } + } + zList = rbuMPrintf(tls, p, + ts+29090, libc.VaList(bp+40, zList)) + + } else { + var zSep uintptr = ts + 1525 /* "" */ + var i int32 + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { + var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) + zList = rbuMPrintf(tls, p, ts+29140, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21372 /* " AND " */ + } + } + } + return zList +} + +// The SELECT statement iterating through the keys for the current object +// (p->objiter.pSelect) currently points to a valid row. However, there +// is something wrong with the rbu_control value in the rbu_control value +// stored in the (p->nCol+1)'th column. Set the error code and error message +// of the RBU handle to something reflecting this. +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29153, 0) +} + +// Return a nul-terminated string containing the comma separated list of +// assignments that should be included following the "SET" keyword of +// an UPDATE statement used to update the table object that the iterator +// passed as the second argument currently points to if the rbu_control +// column of the data_xxx table entry is set to zMask. +// +// The memory for the returned string is obtained from sqlite3_malloc(). +// It is the responsibility of the caller to eventually free it using +// sqlite3_free(). +// +// If an OOM error is encountered when allocating space for the new +// string, an error code is left in the rbu handle passed as the first +// argument and NULL is returned. Or, if an error has already occurred +// when this function is called, NULL is returned immediately, without +// attempting the allocation or modifying the stored error code. +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + var zList uintptr = uintptr(0) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var i int32 + + if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { + rbuBadControlError(tls, p) + } else { + var zSep uintptr = ts + 1525 /* "" */ + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { + var c uint8 = *(*uint8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) + if int32(c) == 'x' { + zList = rbuMPrintf(tls, p, ts+29140, + libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) + zSep = ts + 14542 /* ", " */ + } else if int32(c) == 'd' { + zList = rbuMPrintf(tls, p, ts+29179, + libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) + zSep = ts + 14542 /* ", " */ + } else if int32(c) == 'f' { + zList = rbuMPrintf(tls, p, ts+29209, + libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) + zSep = ts + 14542 /* ", " */ + } + } + } + } + return zList +} + +// Return a nul-terminated string consisting of nByte comma separated +// "?" expressions. For example, if nByte is 3, return a pointer to +// a buffer containing the string "?,?,?". +// +// The memory for the returned string is obtained from sqlite3_malloc(). +// It is the responsibility of the caller to eventually free it using +// sqlite3_free(). +// +// If an OOM error is encountered when allocating space for the new +// string, an error code is left in the rbu handle passed as the first +// argument and NULL is returned. Or, if an error has already occurred +// when this function is called, NULL is returned immediately, without +// attempting the allocation or modifying the stored error code. +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ + var zRet uintptr = uintptr(0) + var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) + + zRet = rbuMalloc(tls, p, nByte) + if zRet != 0 { + var i int32 + for i = 0; i < nBind; i++ { + *(*uint8)(unsafe.Pointer(zRet + uintptr(i*2))) = uint8('?') + *(*uint8)(unsafe.Pointer(zRet + uintptr(i*2+1))) = func() uint8 { + if i+1 == nBind { + return uint8(0) + } + return uint8(',') + }() + } + } + return zRet +} + +// The iterator currently points to a table (not index) of type +// RBU_PK_WITHOUT_ROWID. This function creates the PRIMARY KEY +// declaration for the corresponding imposter table. For example, +// if the iterator points to a table created as: +// +// CREATE TABLE t1(a, b, c, PRIMARY KEY(b, a DESC)) WITHOUT ROWID +// +// this function returns: +// +// PRIMARY KEY("b", "a" DESC) +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + var z uintptr = uintptr(0) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var zSep uintptr = ts + 29246 /* "PRIMARY KEY(" */ + *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, + Xsqlite3_mprintf(tls, ts+28398, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { + var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16053) == 0 { + var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) + if zIdx != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, + Xsqlite3_mprintf(tls, ts+28426, libc.VaList(bp+8, zIdx))) + } + break + } + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */))) + + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { + if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) != 0 { + // int iCid = sqlite3_column_int(pXInfo, 0); + var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) + var zDesc uintptr + if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { + zDesc = ts + 28666 /* " DESC" */ + } else { + zDesc = ts + 1525 /* "" */ + } + z = rbuMPrintf(tls, p, ts+29259, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14542 /* ", " */ + } + } + z = rbuMPrintf(tls, p, ts+29270, libc.VaList(bp+48, z)) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) + } + return z +} + +// This function creates the second imposter table used when writing to +// a table b-tree where the table has an external primary key. If the +// iterator passed as the second argument does not currently point to +// a table (not index) with an external primary key, this function is a +// no-op. +// +// Assuming the iterator does point to a table with an external PK, this +// function creates a WITHOUT ROWID imposter table named "rbu_imposter2" +// used to access that PK index. For example, if the target table is +// declared as follows: +// +// CREATE TABLE t1(a, b TEXT, c REAL, PRIMARY KEY(b, c)); +// +// then the imposter table schema is: +// +// CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; +// +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ + bp := tls.Alloc(184) + defer tls.Free(184) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { + var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiPkTnum // Root page of PK index + *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)) = uintptr(0) // SELECT name ... WHERE rootpage = $tnum + var zIdx uintptr = uintptr(0) // Name of PK index + *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) // PRAGMA main.index_xinfo = $zIdx + var zComma uintptr = ts + 1525 /* "" */ + var zCols uintptr = uintptr(0) // Used to build up list of table cols + var zPk uintptr = uintptr(0) // Used to build up table PK declaration + + // Figure out the name of the primary key index for the current table. + // This is needed for the argument to "PRAGMA index_xinfo". Set + // zIdx to point to a nul-terminated string containing this name. + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, + ts+29274) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { + zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 0) + } + } + if zIdx != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, + Xsqlite3_mprintf(tls, ts+28426, libc.VaList(bp, zIdx))) + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) + + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176))) { + var bKey int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 5) + if bKey != 0 { + var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) + var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) + var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) + zCols = rbuMPrintf(tls, p, ts+29324, libc.VaList(bp+8, zCols, zComma, + iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) + zPk = rbuMPrintf(tls, p, ts+29346, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + if bDesc != 0 { + return ts + 28666 /* " DESC" */ + } + return ts + 1525 /* "" */ + }())) + zComma = ts + 14542 /* ", " */ + } + } + zCols = rbuMPrintf(tls, p, ts+29356, libc.VaList(bp+80, zCols)) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) + + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, + ts+29371, + libc.VaList(bp+120, zCols, zPk)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 0, 0)) + } +} + +// If an error has already occurred when this function is called, it +// immediately returns zero (without doing any work). Or, if an error +// occurs during the execution of this function, it sets the error code +// in the sqlite3rbu object indicated by the first argument and returns +// zero. +// +// The iterator passed as the second argument is guaranteed to point to +// a table (not an index) when this function is called. This function +// attempts to create any imposter table required to write to the main +// table b-tree of the table before returning. Non-zero is returned if +// an imposter table are created, or zero otherwise. +// +// An imposter table is required in all cases except RBU_PK_VTAB. Only +// virtual tables are written to directly. The imposter table has the +// same schema as the actual target table (less any UNIQUE constraints). +// More precisely, the "same schema" means the same columns, types, +// collation sequences. For tables that do not have an external PRIMARY +// KEY, it also means the same PRIMARY KEY declaration. +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ + bp := tls.Alloc(200) + defer tls.Free(200) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { + var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum + var zComma uintptr = ts + 1525 /* "" */ + var zSql uintptr = uintptr(0) + var iCol int32 + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 0, 1)) + + for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { + var zPk uintptr = ts + 1525 /* "" */ + var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) + *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)) = uintptr(0) + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { + // If the target table column is an "INTEGER PRIMARY KEY", add + // "PRIMARY KEY" to the imposter table column declaration. + zPk = ts + 29433 /* "PRIMARY KEY " */ + } + zSql = rbuMPrintf(tls, p, ts+29446, + libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), + func() uintptr { + if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { + return ts + 29473 /* " NOT NULL" */ + } + return ts + 1525 /* "" */ + }())) + zComma = ts + 14542 /* ", " */ + } + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { + var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) + if zPk != 0 { + zSql = rbuMPrintf(tls, p, ts+29483, libc.VaList(bp+88, zSql, zPk)) + } + } + + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29490, + libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, + func() uintptr { + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { + return ts + 29522 /* " WITHOUT ROWID" */ + } + return ts + 1525 /* "" */ + }())) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 0, 0)) + } +} + +// Prepare a statement used to insert rows into the "rbu_tmp_xxx" table. +// Specifically a statement of the form: +// +// INSERT INTO rbu_tmp_xxx VALUES(?, ?, ? ...); +// +// The number of bound variables is equal to the number of columns in +// the target table, plus one (for the rbu_control column), plus one more +// (for the rbu_rowid column) if the target table is an implicit IPK or +// virtual table. +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var bRbuRowid int32 = libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) + var zBind uintptr = rbuObjIterGetBindlist(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1+bRbuRowid) + if zBind != 0 { + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, + ts+29537, + libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) + } +} + +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ + var p uintptr = Xsqlite3_user_data(tls, pCtx) + var rc int32 = SQLITE_OK + var i int32 + + if Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal))) != 0 { + *(*I64)(unsafe.Pointer(p + 304)) += I64((*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex) + } + + for i = 0; rc == SQLITE_OK && i < nVal; i++ { + rc = Xsqlite3_bind_value(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpTmpInsert, i+1, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) + } + if rc == SQLITE_OK { + Xsqlite3_step(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpTmpInsert) + rc = Xsqlite3_reset(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpTmpInsert) + } + + if rc != SQLITE_OK { + Xsqlite3_result_error_code(tls, pCtx, rc) + } +} + +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc + var zRet uintptr = uintptr(0) + + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, + ts+29594) + } + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + var rc2 int32 + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 1, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx, -1, uintptr(0)) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { + var zSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) + if zSql != 0 { + (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql = libc.AssignUintptr(&zSql, rbuStrndup(tls, zSql, bp+8)) + } + if zSql != 0 { + var nParen int32 = 0 // Number of open parenthesis + var i int32 + var iIdxCol int32 = 0 + var nIdxAlloc int32 = 0 + for i = 0; *(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0; i++ { + var c uint8 = *(*uint8)(unsafe.Pointer(zSql + uintptr(i))) + + // If necessary, grow the pIter->aIdxCol[] array + if iIdxCol == nIdxAlloc { + var aIdxCol uintptr = Xsqlite3_realloc(tls, + (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol, int32(uint64(nIdxAlloc+16)*uint64(unsafe.Sizeof(RbuSpan{})))) + if aIdxCol == uintptr(0) { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_NOMEM + break + } + (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol = aIdxCol + nIdxAlloc = nIdxAlloc + 16 + } + + if int32(c) == '(' { + if nParen == 0 { + + (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol)).FzSpan = zSql + uintptr(i+1) + } + nParen++ + } else if int32(c) == ')' { + nParen-- + if nParen == 0 { + var nSpan int32 = int32((int64(zSql+uintptr(i)) - int64((*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iIdxCol)*16)).FzSpan)) / 1) + (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(libc.PostIncInt32(&iIdxCol, 1))*16)).FnSpan = nSpan + i++ + break + } + } else if int32(c) == ',' && nParen == 1 { + var nSpan int32 = int32((int64(zSql+uintptr(i)) - int64((*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iIdxCol)*16)).FzSpan)) / 1) + (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(libc.PostIncInt32(&iIdxCol, 1))*16)).FnSpan = nSpan + (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iIdxCol)*16)).FzSpan = zSql + uintptr(i+1) + } else if int32(c) == '"' || int32(c) == '\'' || int32(c) == '`' { + for i++; 1 != 0; i++ { + if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == int32(c) { + if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i+1)))) != int32(c) { + break + } + i++ + } + } + } else if int32(c) == '[' { + for i++; 1 != 0; i++ { + if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == ']' { + break + } + } + } else if int32(c) == '-' && int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i+1)))) == '-' { + for i = i + 2; *(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0 && int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) != '\n'; i++ { + } + if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 { + break + } + } else if int32(c) == '/' && int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i+1)))) == '*' { + for i = i + 2; *(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0 && (int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) != '*' || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i+1)))) != '/'); i++ { + } + if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 { + break + } + i++ + } + } + if *(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0 { + zRet = rbuStrndup(tls, zSql+uintptr(i), bp+8) + } + (*RbuObjIter)(unsafe.Pointer(pIter)).FnIdxCol = iIdxCol + } + } + + rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = rc2 + } + } + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) + return zRet +} + +// Ensure that the SQLite statement handles required to update the +// target database object currently indicated by the iterator passed +// as the second argument are available. +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ + bp := tls.Alloc(628) + defer tls.Free(628) + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect == uintptr(0) && rbuObjIterCacheTableInfo(tls, p, pIter) == SQLITE_OK { + var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum + var zCollist uintptr = uintptr(0) // List of indexed columns + var pz uintptr = p + 64 + var zIdx uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx + var zLimit uintptr = uintptr(0) + + if nOffset != 0 { + zLimit = Xsqlite3_mprintf(tls, ts+29660, libc.VaList(bp, nOffset)) + if !(zLimit != 0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } + } + + if zIdx != 0 { + var zTbl uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl + *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)) = uintptr(0) // Columns for imposter table + *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)) = uintptr(0) // Primary key declaration for imposter + *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */)) = uintptr(0) // WHERE clause on PK columns + var zBind uintptr = uintptr(0) + var zPart uintptr = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 624 /* nBind */)) = 0 + + zPart = rbuObjIterGetIndexWhere(tls, p, pIter) + zCollist = rbuObjIterGetIndexCols(tls, + p, pIter, bp+600, bp+608, bp+616, bp+624) + zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624 /* nBind */))) + + // Create the imposter table used to write to this index. + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, + ts+29680, + libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, 0, 0)) + + // Create the statement to insert index entries + (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624 /* nBind */)) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, + Xsqlite3_mprintf(tls, ts+29745, libc.VaList(bp+128, zTbl, zBind))) + } + + // And to delete index entries + if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, + Xsqlite3_mprintf(tls, ts+29781, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + } + + // Create the SELECT statement to read keys in sorted order + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var zSql uintptr + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + var zStart uintptr = uintptr(0) + if nOffset != 0 { + zStart = rbuVacuumIndexStart(tls, p, pIter) + if zStart != 0 { + Xsqlite3_free(tls, zLimit) + zLimit = uintptr(0) + } + } + + zSql = Xsqlite3_mprintf(tls, + ts+29815, + libc.VaList(bp+160, zCollist, + (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + zPart, + func() uintptr { + if zStart != 0 { + return func() uintptr { + if zPart != 0 { + return ts + 29876 /* "AND" */ + } + return ts + 29880 /* "WHERE" */ + }() + } + return ts + 1525 /* "" */ + }(), zStart, + zCollist, zLimit)) + Xsqlite3_free(tls, zStart) + } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { + zSql = Xsqlite3_mprintf(tls, + ts+29886, + libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + zPart, zCollist, zLimit)) + } else { + zSql = Xsqlite3_mprintf(tls, + + ts+29947, + libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, + zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + zPart, + func() uintptr { + if zPart != 0 { + return ts + 29876 /* "AND" */ + } + return ts + 29880 /* "WHERE" */ + }(), + zCollist, zLimit)) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, zSql) + } else { + Xsqlite3_free(tls, zSql) + } + } + + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))) + Xsqlite3_free(tls, zBind) + Xsqlite3_free(tls, zPart) + } else { + var bRbuRowid int32 = libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || + (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE || + (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) + var zTbl uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl // Table this step applies to + var zWrite uintptr // Imposter table name + + var zBindings uintptr = rbuObjIterGetBindlist(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+bRbuRowid) + var zWhere uintptr = rbuObjIterGetWhere(tls, p, pIter) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6334) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6330) + + zCollist = rbuObjIterGetCollist(tls, p, pIter) + (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol + + // Create the imposter table or tables (if required). + rbuCreateImposterTable(tls, p, pIter) + rbuCreateImposterTable2(tls, p, pIter) + zWrite = func() uintptr { + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { + return ts + 1525 + } + return ts + 30106 + }() + + // Create the INSERT statement to write to the target PK b-tree + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, + Xsqlite3_mprintf(tls, + ts+30115, + libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { + if bRbuRowid != 0 { + return ts + 30151 /* ", _rowid_" */ + } + return ts + 1525 /* "" */ + }(), zBindings))) + } + + // Create the DELETE statement to write to the target PK b-tree. + // Because it only performs INSERT operations, this is not required for + // an rbu vacuum handle. + if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, + Xsqlite3_mprintf(tls, + ts+30161, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + } + + if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { + var zRbuRowid uintptr = ts + 1525 /* "" */ + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { + zRbuRowid = ts + 30189 /* ", rbu_rowid" */ + } + + // Create the rbu_tmp_xxx table and the triggers to populate it. + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, + + ts+30201, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { + return ts + 30277 /* ", 0 AS rbu_rowid" */ + } + return ts + 1525 /* "" */ + }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, + + ts+30294, + libc.VaList(bp+440, zWrite, zTbl, zOldlist, + zWrite, zTbl, zOldlist, + zWrite, zTbl, zNewlist)) + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, + + ts+30593, + libc.VaList(bp+512, zWrite, zTbl, zNewlist)) + } + + rbuObjIterPrepareTmpInsert(tls, p, pIter, zCollist, zRbuRowid) + } + + // Create the SELECT statement to read keys from data_xxx + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var zRbuRowid uintptr = ts + 1525 /* "" */ + var zStart uintptr = uintptr(0) + var zOrder uintptr = uintptr(0) + if bRbuRowid != 0 { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + zRbuRowid = ts + 30692 /* ",_rowid_ " */ + } else { + zRbuRowid = ts + 30702 /* ",rbu_rowid" */ + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + if nOffset != 0 { + zStart = rbuVacuumTableStart(tls, p, pIter, bRbuRowid, zWrite) + if zStart != 0 { + Xsqlite3_free(tls, zLimit) + zLimit = uintptr(0) + } + } + if bRbuRowid != 0 { + zOrder = rbuMPrintf(tls, p, ts+28749, 0) + } else { + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1525, ts+14542, ts+1525) + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, + Xsqlite3_mprintf(tls, + ts+30713, + libc.VaList(bp+536, zCollist, + func() uintptr { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + return ts + 30761 /* "0 AS " */ + } + return ts + 1525 /* "" */ + }(), + zRbuRowid, + (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + if zStart != 0 { + return zStart + } + return ts + 1525 + }(), + func() uintptr { + if zOrder != 0 { + return ts + 19706 /* "ORDER BY" */ + } + return ts + 1525 /* "" */ + }(), zOrder, + zLimit))) + } + Xsqlite3_free(tls, zStart) + Xsqlite3_free(tls, zOrder) + } + + Xsqlite3_free(tls, zWhere) + Xsqlite3_free(tls, zOldlist) + Xsqlite3_free(tls, zNewlist) + Xsqlite3_free(tls, zBindings) + } + Xsqlite3_free(tls, zCollist) + Xsqlite3_free(tls, zLimit) + } + + return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc +} + +// Set output variable *ppStmt to point to an UPDATE statement that may +// be used to update the imposter table for the main table b-tree of the +// table object that pIter currently points to, assuming that the +// rbu_control column of the data_xyz table contains zMask. +// +// If the zMask string does not specify any columns to update, then this +// is not an error. Output variable *ppStmt is set to NULL in this case. +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pp uintptr + var pUp uintptr = uintptr(0) + var nUp int32 = 0 + + // In case an error occurs + *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) + + // Search for an existing statement. If one is found, shift it to the front + // of the LRU queue and return immediately. Otherwise, leave nUp pointing + // to the number of statements currently in the cache and pUp to the + // last object in the list. + for pp = pIter + 184; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 16 { + pUp = *(*uintptr)(unsafe.Pointer(pp)) + if libc.Xstrcmp(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FzMask, zMask) == 0 { + *(*uintptr)(unsafe.Pointer(pp)) = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext + (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext = (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate + (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp + *(*uintptr)(unsafe.Pointer(ppStmt)) = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate + return SQLITE_OK + } + nUp++ + } + + if nUp >= SQLITE_RBU_UPDATE_CACHESIZE { + for pp = pIter + 184; *(*uintptr)(unsafe.Pointer(pp)) != pUp; pp = *(*uintptr)(unsafe.Pointer(pp)) + 16 { + } + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + Xsqlite3_finalize(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate) + (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate = uintptr(0) + } else { + pUp = rbuMalloc(tls, p, int64(uint64(unsafe.Sizeof(RbuUpdateStmt{}))+uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)+uint64(1))) + } + + if pUp != 0 { + var zWhere uintptr = rbuObjIterGetWhere(tls, p, pIter) + var zSet uintptr = rbuObjIterGetSetlist(tls, p, pIter, zMask) + var zUpdate uintptr = uintptr(0) + + (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FzMask = pUp + 1*24 + libc.Xmemcpy(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FzMask, zMask, uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) + (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext = (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate + (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp + + if zSet != 0 { + var zPrefix uintptr = ts + 1525 /* "" */ + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { + zPrefix = ts + 30106 /* "rbu_imp_" */ + } + zUpdate = Xsqlite3_mprintf(tls, ts+30767, + libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) + *(*uintptr)(unsafe.Pointer(ppStmt)) = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate + } + Xsqlite3_free(tls, zWhere) + Xsqlite3_free(tls, zSet) + } + + return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc +} + +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_URI + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_open_v2(tls, zName, bp+8, flags, func() uintptr { + if bUseVfs != 0 { + return (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName + } + return uintptr(0) + }()) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))))) + Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))) + *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) + } + } + return *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) +} + +// Free an RbuState object allocated by rbuLoadState(). +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ + if p != 0 { + Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) + Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) + Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzIdx) + Xsqlite3_free(tls, p) + } +} + +// Allocate an RbuState object and load the contents of the rbu_state +// table into it. Return a pointer to the new object. It is the +// responsibility of the caller to eventually free the object using +// sqlite3_free(). +// +// If an error occurs, leave an error code and message in the rbu handle +// and return NULL. +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var pRet uintptr = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) + // var rc int32 at bp+16, 4 + + var rc2 int32 + + pRet = rbuMalloc(tls, p, int64(unsafe.Sizeof(RbuState{}))) + if pRet == uintptr(0) { + return uintptr(0) + } + + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, + Xsqlite3_mprintf(tls, ts+30797, libc.VaList(bp, p+48))) + for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { + switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { + case RBU_STATE_STAGE: + (*RbuState)(unsafe.Pointer(pRet)).FeStage = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) + if (*RbuState)(unsafe.Pointer(pRet)).FeStage != RBU_STAGE_OAL && + (*RbuState)(unsafe.Pointer(pRet)).FeStage != RBU_STAGE_MOVE && + (*RbuState)(unsafe.Pointer(pRet)).FeStage != RBU_STAGE_CKPT { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT + } + break + + case RBU_STATE_TBL: + (*RbuState)(unsafe.Pointer(pRet)).FzTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16) + break + + case RBU_STATE_IDX: + (*RbuState)(unsafe.Pointer(pRet)).FzIdx = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16) + break + + case RBU_STATE_ROW: + (*RbuState)(unsafe.Pointer(pRet)).FnRow = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) + break + + case RBU_STATE_PROGRESS: + (*RbuState)(unsafe.Pointer(pRet)).FnProgress = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) + break + + case RBU_STATE_CKPT: + (*RbuState)(unsafe.Pointer(pRet)).FiWalCksum = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) + break + + case RBU_STATE_COOKIE: + (*RbuState)(unsafe.Pointer(pRet)).FiCookie = U32(Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1)) + break + + case RBU_STATE_OALSZ: + (*RbuState)(unsafe.Pointer(pRet)).FiOalSz = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) + break + + case RBU_STATE_PHASEONESTEP: + (*RbuState)(unsafe.Pointer(pRet)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) + break + + case RBU_STATE_DATATBL: + (*RbuState)(unsafe.Pointer(pRet)).FzDataTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16) + break + + default: + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_CORRUPT + break + } + } + rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = rc2 + } + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) + return pRet +} + +// Open the database handle and attach the RBU database as "rbu". If an +// error occurs, leave an error code and message in the RBU handle. +// +// If argument dbMain is not NULL, then it is a database handle already +// open on the target database. Use this handle instead of opening a new +// one. +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + // Open the RBU database + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = rbuOpenDbhandle(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, 1) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain = dbMain + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6323, SQLITE_FCNTL_RBUCNT, p) + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6323) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30827, libc.VaList(bp, zFile, zFile)) + } + } + + // If using separate RBU and state databases, attach the state database to + // the RBU db handle now. + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30854, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+3228, uint64(4)) + } else { + libc.Xmemcpy(tls, p+48, ts+6323, uint64(4)) + } + + // If it has not already been created, create the rbu_state table + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30872, libc.VaList(bp+24, p+48)) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + var bOpen int32 = 0 + var rc int32 + (*Sqlite3rbu)(unsafe.Pointer(p)).FnRbu = 0 + (*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd = uintptr(0) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6323, SQLITE_FCNTL_RBUCNT, p) + if rc != SQLITE_NOTFOUND { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage >= RBU_STAGE_MOVE { + bOpen = 1 + } else { + var pState uintptr = rbuLoadState(tls, p) + if pState != 0 { + bOpen = libc.Bool32((*RbuState)(unsafe.Pointer(pState)).FeStage >= RBU_STAGE_MOVE) + rbuFreeState(tls, pState) + } + } + if bOpen != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain = rbuOpenDbhandle(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FnRbu <= 1)) + } + } + + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain == uintptr(0) { + if !((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) { + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain = rbuOpenDbhandle(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget, 1) + } else if (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd)).FpWalFd != 0 { + if pbRetry != 0 { + (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd)).FbNolock = U8(0) + Xsqlite3_close(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu) + Xsqlite3_close(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain = uintptr(0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = uintptr(0) + *(*int32)(unsafe.Pointer(pbRetry)) = 1 + return + } + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30938, 0) + } else { + var zTarget uintptr + var zExtra uintptr = uintptr(0) + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24019, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 + for *(*uint8)(unsafe.Pointer(zExtra)) != 0 { + if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { + break + } + } + if int32(*(*uint8)(unsafe.Pointer(zExtra))) == 0 { + zExtra = uintptr(0) + } + } + + zTarget = Xsqlite3_mprintf(tls, ts+30970, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6323), + func() uintptr { + if zExtra == uintptr(0) { + return ts + 1525 /* "" */ + } + return ts + 31002 /* "&" */ + }(), func() uintptr { + if zExtra == uintptr(0) { + return ts + 1525 /* "" */ + } + return zExtra + }())) + + if zTarget == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + return + } + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain = rbuOpenDbhandle(tls, p, zTarget, libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FnRbu <= 1)) + Xsqlite3_free(tls, zTarget) + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, + ts+31004, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, + ts+31019, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, + ts+31036, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, SQLITE_FCNTL_RBU, p) + } + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31052, 0) + + // Mark the database file just opened as an RBU target database. If + // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. + // This is an error. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6323, SQLITE_FCNTL_RBU, p) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31080, 0) + } +} + +// This routine is a copy of the sqlite3FileSuffix3() routine from the core. +// It is a no-op unless SQLITE_ENABLE_8_3_NAMES is defined. +// +// If SQLITE_ENABLE_8_3_NAMES is set at compile-time and if the database +// filename in zBaseFilename is a URI with the "8_3_names=1" parameter and +// if filename in z[] has a suffix (a.k.a. "extension") that is longer than +// three characters, then shorten the suffix on z[] to be the last three +// characters of the original suffix. +// +// If SQLITE_ENABLE_8_3_NAMES is set to 2 at compile-time, then always +// do the suffix shortening regardless of URI parameter. +// +// Examples: +// +// test.db-journal => test.nal +// test.db-wal => test.wal +// test.db-shm => test.shm +// test.db-mj7f3319fa => test.9fa +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ +} + +// Return the current wal-index header checksum for the target database +// as a 64-bit integer. +// +// The checksum is store in the first page of xShmMap memory as an 8-byte +// blob starting at byte offset 40. +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var iRet I64 = int64(0) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal + // var ptr uintptr at bp, 8 + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxShmMap})).f(tls, pDb, 0, 32*1024, 0, bp /* &ptr */) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + iRet = I64(*(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 10*4)))<<32 + I64(*(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 11*4))) + } + } + return iRet +} + +// This function is called as part of initializing or reinitializing an +// incremental checkpoint. +// +// It populates the sqlite3rbu.aFrame[] array with the set of +// (wal frame -> db page) copy operations required to checkpoint the +// current wal file, and obtains the set of shm locks required to safely +// perform the copy operations directly on the file-system. +// +// If argument pState is not NULL, then the incremental checkpoint is +// being resumed. In this case, if the checksum of the wal-index-header +// following recovery is not the same as the checksum saved in the RbuState +// object, then the rbu handle is set to DONE state. This occurs if some +// other client appends a transaction to the wal file in the middle of +// an incremental checkpoint. +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ + + // If pState is NULL, then the wal file may not have been opened and + // recovered. Running a read-statement here to ensure that doing so + // does not interfere with the "capture" process below. + if pState == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31052, uintptr(0), uintptr(0), uintptr(0)) + } + } + + // Assuming no error has occurred, run a "restart" checkpoint with the + // sqlite3rbu.eStage variable set to CAPTURE. This turns on the following + // special behaviour in the rbu VFS: + // + // * If the exclusive shm WRITER or READ0 lock cannot be obtained, + // the checkpoint fails with SQLITE_BUSY (normally SQLite would + // proceed with running a passive checkpoint instead of failing). + // + // * Attempts to read from the *-wal file or write to the database file + // do not perform any IO. Instead, the frame/page combinations that + // would be read/written are recorded in the sqlite3rbu.aFrame[] + // array. + // + // * Calls to xShmLock(UNLOCK) to release the exclusive shm WRITER, + // READ0 and CHECKPOINT locks taken as part of the checkpoint are + // no-ops. These locks will not be released until the connection + // is closed. + // + // * Attempting to xSync() the database file causes an SQLITE_INTERNAL + // error. + // + // As a result, unless an error (i.e. OOM or SQLITE_BUSY) occurs, the + // checkpoint below fails with SQLITE_INTERNAL, and leaves the aFrame[] + // array populated with a set of (frame -> page) mappings. Because the + // WRITER, CHECKPOINT and READ0 locks are still held, it is safe to copy + // data from the wal file into the database file according to the + // contents of aFrame[]. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var rc2 int32 + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31098, uintptr(0), uintptr(0), uintptr(0)) + if rc2 != SQLITE_INTERNAL { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FnFrame > 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT + (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = func() int32 { + if pState != 0 { + return (*RbuState)(unsafe.Pointer(pState)).FnRow + } + return 0 + }() + (*Sqlite3rbu)(unsafe.Pointer(p)).FaBuf = rbuMalloc(tls, p, int64((*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FiWalCksum = rbuShmChecksum(tls, p) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FnFrame == 0 || pState != 0 && (*RbuState)(unsafe.Pointer(pState)).FiWalCksum != (*Sqlite3rbu)(unsafe.Pointer(p)).FiWalCksum { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_DONE + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE + } else { + var nSectorSize int32 + var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal + var pWal uintptr = (*Rbu_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd)).FpReal + + nSectorSize = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSectorSize})).f(tls, pDb) + if nSectorSize > (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz { + (*Sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector = nSectorSize / (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz + } else { + (*Sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector = 1 + } + + // Call xSync() on the wal file. This causes SQLite to sync the + // directory in which the target database and the wal file reside, in + // case it has not been synced since the rename() call in + // rbuMoveOalFile(). + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pWal)).FpMethods)).FxSync})).f(tls, pWal, SQLITE_SYNC_NORMAL) + } + } +} + +// Called when iAmt bytes are read from offset iOff of the wal file while +// the rbu object is in capture mode. Record the frame number of the frame +// being read in the aFrame[] array. +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ + var mReq U32 = U32(int32(1)<db is + // holding a SHARED lock on the target database file (because it is + // in WAL mode). So no other connection may be writing the db. + // + // In order to ensure that there are no database readers, an EXCLUSIVE + // lock is obtained here before the *-oal is moved to *-wal. + var dbMain uintptr = uintptr(0) + rbuFileSuffix3(tls, zBase, zWal) + rbuFileSuffix3(tls, zBase, zOal) + + // Re-open the databases. + rbuObjIterFinalize(tls, p+80) + Xsqlite3_close(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu) + Xsqlite3_close(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain = uintptr(0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = uintptr(0) + + dbMain = rbuOpenDbhandle(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget, 1) + if dbMain != 0 { + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuLockDatabase(tls, dbMain) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = func() int32 { + if libc.Xrename(tls, zOal, zWal) != 0 { + return SQLITE_IOERR + } + return SQLITE_OK + }() + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || + (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) || + rbuExclusiveCheckpoint(tls, dbMain) == 0 { + Xsqlite3_close(tls, dbMain) + dbMain = uintptr(0) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + rbuOpenDatabase(tls, p, dbMain, uintptr(0)) + rbuSetupCheckpoint(tls, p, uintptr(0)) + } + } + + Xsqlite3_free(tls, zWal) + Xsqlite3_free(tls, zOal) +} + +// The SELECT statement iterating through the keys for the current object +// (p->objiter.pSelect) currently points to a valid row. This function +// determines the type of operation requested by this row and returns +// one of the following values to indicate the result: +// +// * RBU_INSERT +// * RBU_DELETE +// * RBU_IDX_DELETE +// * RBU_UPDATE +// +// If RBU_UPDATE is returned, then output variable *pzMask is set to +// point to the text value indicating the columns to update. +// +// If the rbu_control field contains an invalid value, an error code and +// message are left in the RBU handle and zero returned. +func rbuStepType(tls *libc.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3.c:206931:12: */ + var iCol int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnCol // Index of rbu_control column + var res int32 = 0 // Return value + + switch Xsqlite3_column_type(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpSelect, iCol) { + case SQLITE_INTEGER: + { + var iVal int32 = Xsqlite3_column_int(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpSelect, iCol) + switch iVal { + case 0: + res = RBU_INSERT + break + case 1: + res = RBU_DELETE + break + case 2: + res = RBU_REPLACE + break + case 3: + res = RBU_IDX_DELETE + break + case 4: + res = RBU_IDX_INSERT + break + } + break + + } + + case SQLITE_TEXT: + { + var z uintptr = Xsqlite3_column_text(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpSelect, iCol) + if z == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } else { + *(*uintptr)(unsafe.Pointer(pzMask)) = z + } + res = RBU_UPDATE + + break + + } + + default: + break + } + + if res == 0 { + rbuBadControlError(tls, p) + } + return res +} + +// Argument eType must be one of RBU_INSERT, RBU_DELETE, RBU_IDX_INSERT or +// RBU_IDX_DELETE. This function performs the work of a single +// sqlite3rbu_step() call for the type of operation specified by eType. +func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:206987:13: */ + var pIter uintptr = p + 80 + var pVal uintptr + var pWriter uintptr + var i int32 + + // If this is a delete, decrement nPhaseOneStep by nIndex. If the DELETE + // statement below does actually delete a row, nPhaseOneStep will be + // incremented by the same amount when SQL function rbu_tmp_insert() + // is invoked by the trigger. + if eType == RBU_DELETE { + *(*I64)(unsafe.Pointer(p + 304)) -= I64((*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex) + } + + if eType == RBU_IDX_DELETE || eType == RBU_DELETE { + pWriter = (*RbuObjIter)(unsafe.Pointer(pIter)).FpDelete + } else { + pWriter = (*RbuObjIter)(unsafe.Pointer(pIter)).FpInsert + } + + for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol; i++ { + // If this is an INSERT into a table b-tree and the table has an + // explicit INTEGER PRIMARY KEY, check that this is not an attempt + // to write a NULL into the IPK column. That is not permitted. + if eType == RBU_INSERT && + (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 && + Xsqlite3_column_type(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) == SQLITE_NULL { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_MISMATCH + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23657, 0) + return + } + + if eType == RBU_DELETE && int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0 { + continue + } + + pVal = Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_bind_value(tls, pWriter, i+1, pVal) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { + return + } + } + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { + if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || + (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE || + (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + // For a virtual table, or a table with no primary key, the + // SELECT statement is: + // + // SELECT , rbu_control, rbu_rowid FROM .... + // + // Hence column_value(pIter->nCol+1). + + pVal = Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol+1) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_bind_value(tls, pWriter, (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol+1, pVal) + } + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + Xsqlite3_step(tls, pWriter) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = resetAndCollectError(tls, pWriter, p+64) + } +} + +// This function does the work for an sqlite3rbu_step() call. +// +// The object-iterator (p->objiter) currently points to a valid object, +// and the input cursor (p->objiter.pSelect) currently points to a valid +// input row. Perform whatever processing is required and return. +// +// If no error occurs, SQLITE_OK is returned. Otherwise, an error code +// and message is left in the RBU handle and a copy of the error code +// returned. +func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207070:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pIter uintptr = p + 80 + *(*uintptr)(unsafe.Pointer(bp /* zMask */)) = uintptr(0) + var eType int32 = rbuStepType(tls, p, bp) + + if eType != 0 { + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) && (eType == RBU_IDX_DELETE || eType == RBU_IDX_INSERT) { + rbuBadControlError(tls, p) + } else if eType == RBU_REPLACE { + if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { + *(*I64)(unsafe.Pointer(p + 304)) += I64((*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex) + rbuStepOneOp(tls, p, RBU_DELETE) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + rbuStepOneOp(tls, p, RBU_INSERT) + } + } else if eType != RBU_UPDATE { + rbuStepOneOp(tls, p, eType) + } else { + var pVal uintptr + *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)) = uintptr(0) + + *(*I64)(unsafe.Pointer(p + 304)) -= I64((*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex) + rbuGetUpdateStmt(tls, p, pIter, *(*uintptr)(unsafe.Pointer(bp /* zMask */)), bp+8) + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + var i int32 + for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol; i++ { + var c uint8 = *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zMask */)) + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) + pVal = Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) + if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 || int32(c) != '.' { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)), i+1, pVal) + } + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && + ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { + // Bind the rbu_rowid value to column _rowid_ + + pVal = Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol+1) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)), (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol+1, pVal) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = resetAndCollectError(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)), p+64) + } + } + } + } + return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc +} + +// Increment the schema cookie of the main database opened by p->dbMain. +// +// Or, if this is an RBU vacuum, set the schema cookie of the main db +// opened by p->dbMain to one more than the schema cookie of the main +// db opened by p->dbRbu. +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var dbread uintptr = func() uintptr { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + return (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu + } + return (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain + }() + var iCookie int32 = 1000000 + // var pStmt uintptr at bp+8, 8 + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, + ts+31172) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + // Coverage: it may be that this sqlite3_step() cannot fail. There + // is already a transaction open, so the prepared statement cannot + // throw an SQLITE_SCHEMA exception. The only database page the + // statement reads is page 1, which is guaranteed to be in the cache. + // And no memory allocations are required. + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { + iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31194, libc.VaList(bp, iCookie+1)) + } + } +} + +// Update the contents of the rbu_state table within the rbu database. The +// value stored in the RBU_STATE_STAGE column is eStage. All other values +// are determined by inspecting the rbu handle passed as the first argument. +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ + bp := tls.Alloc(176) + defer tls.Free(176) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK || (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE { + *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */)) = uintptr(0) + var pFd uintptr = func() uintptr { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + return (*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd + } + return (*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd + }() + var rc int32 + + rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, + Xsqlite3_mprintf(tls, + + ts+31221, + libc.VaList(bp, p+48, + RBU_STATE_STAGE, eStage, + RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, + RBU_STATE_IDX, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzIdx, + RBU_STATE_ROW, (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep, + RBU_STATE_PROGRESS, (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress, + RBU_STATE_CKPT, (*Sqlite3rbu)(unsafe.Pointer(p)).FiWalCksum, + RBU_STATE_COOKIE, I64((*Rbu_file)(unsafe.Pointer(pFd)).FiCookie), + RBU_STATE_OALSZ, (*Sqlite3rbu)(unsafe.Pointer(p)).FiOalSz, + RBU_STATE_PHASEONESTEP, (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep, + RBU_STATE_DATATBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzDataTbl))) + + if rc == SQLITE_OK { + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */))) + } + if rc != SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + } + } +} + +// The second argument passed to this function is the name of a PRAGMA +// setting - "page_size", "auto_vacuum", "user_version" or "application_id". +// This function executes the following on sqlite3rbu.dbRbu: +// +// "PRAGMA main.$zPragma" +// +// where $zPragma is the string passed as the second argument, then +// on sqlite3rbu.dbMain: +// +// "PRAGMA main.$zPragma = $val" +// +// where $val is the value returned by the first PRAGMA invocation. +// +// In short, it copies the value of the specified PRAGMA setting from +// dbRbu to dbMain. +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, + Xsqlite3_mprintf(tls, ts+31379, libc.VaList(bp, zPragma))) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31394, + libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) + } +} + +// The RBU handle passed as the only argument has just been opened and +// the state database is empty. If this RBU handle was opened for an +// RBU vacuum operation, create the schema in the target db. +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31414, uintptr(0), uintptr(0), p+64) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, + + ts+31439) + } + + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { + var zSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */)), 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, zSql, uintptr(0), uintptr(0), p+64) + } + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, + ts+31547) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, + ts+31612) + } + + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { + var i int32 + for i = 0; i < 5; i++ { + Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)), i+1, Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */)), i)) + } + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31656, uintptr(0), uintptr(0), p+64) + } + + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) +} + +// Step the RBU object. +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + if p != 0 { + switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { + case RBU_STAGE_OAL: + { + var pIter uintptr = p + 80 + + // If this is an RBU vacuum operation and the state table was empty + // when this handle was opened, create the target database schema. + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + rbuCreateTargetSchema(tls, p) + rbuCopyPragma(tls, p, ts+17138) + rbuCopyPragma(tls, p, ts+16249) + } + + for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { + + if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { + // Clean up the rbu_tmp_xxx table for the previous table. It + // cannot be dropped as there are currently active SQL statements. + // But the contents can be deleted. + if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, + ts+31681, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + } + } else { + rbuObjIterPrepareAll(tls, p, pIter, 0) + + // Advance to the next row to process. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var rc int32 = Xsqlite3_step(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) + if rc == SQLITE_ROW { + (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress++ + (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep++ + return rbuStep(tls, p) + } + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) + (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 + } + } + + rbuObjIterNext(tls, p, pIter) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + + rbuSaveState(tls, p, RBU_STAGE_MOVE) + rbuIncrSchemaCookie(tls, p) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14446, uintptr(0), uintptr(0), p+64) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14446, uintptr(0), uintptr(0), p+64) + } + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE + } + break + + } + fallthrough + + case RBU_STAGE_MOVE: + { + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + rbuMoveOalFile(tls, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress++ + } + break + + } + fallthrough + + case RBU_STAGE_CKPT: + { + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep >= (*Sqlite3rbu)(unsafe.Pointer(p)).FnFrame { + var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal + + // Sync the db file + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSync})).f(tls, pDb, SQLITE_SYNC_NORMAL) + + // Update nBackfill + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + // var ptr uintptr at bp+16, 8 + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxShmMap})).f(tls, pDb, 0, 32*1024, 0, bp+16 /* &ptr */) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 24*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_DONE + } + } else { + // At one point the following block copied a single frame from the + // wal file to the database file. So that one call to sqlite3rbu_step() + // checkpointed a single frame. + // + // However, if the sector-size is larger than the page-size, and the + // application calls sqlite3rbu_savestate() or close() immediately + // after this step, then rbu_step() again, then a power failure occurs, + // then the database page written here may be damaged. Work around + // this by checkpointing frames until the next page in the aFrame[] + // lies on a different disk sector to the current one. + var iSector U32 + for __ccgo := true; __ccgo; __ccgo = (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep < (*Sqlite3rbu)(unsafe.Pointer(p)).FnFrame && + iSector == ((*RbuFrame)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FaFrame+uintptr((*Sqlite3rbu)(unsafe.Pointer(p)).FnStep)*8)).FiDbPage-U32(1))/U32((*Sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector) && + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var pFrame uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FaFrame + uintptr((*Sqlite3rbu)(unsafe.Pointer(p)).FnStep)*8 + iSector = ((*RbuFrame)(unsafe.Pointer(pFrame)).FiDbPage - U32(1)) / U32((*Sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector) + rbuCheckpointFrame(tls, p, pFrame) + (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep++ + } + } + (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress++ + } + break + + } + fallthrough + + default: + break + } + return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc + } else { + return SQLITE_NOMEM + } + return int32(0) +} + +// Compare strings z1 and z2, returning 0 if they are identical, or non-zero +// otherwise. Either or both argument may be NULL. Two NULL values are +// considered equal, and NULL is considered distinct from all other values. +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ + if z1 == uintptr(0) && z2 == uintptr(0) { + return 0 + } + if z1 == uintptr(0) || z2 == uintptr(0) { + return 1 + } + return libc.Bool32(Xsqlite3_stricmp(tls, z1, z2) != 0) +} + +// This function is called as part of sqlite3rbu_open() when initializing +// an rbu handle in OAL stage. If the rbu update has not started (i.e. +// the rbu_state table was empty) it is a no-op. Otherwise, it arranges +// things so that the next call to sqlite3rbu_step() continues on from +// where the previous rbu handle left off. +// +// If an error occurs, an error code and error message are left in the +// rbu handle passed as the first argument. +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ + + if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { + var pIter uintptr = p + 80 + var rc int32 = SQLITE_OK + + for rc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 && ((*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 || + rbuStrCompare(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx, (*RbuState)(unsafe.Pointer(pState)).FzIdx) != 0 || + (*RbuState)(unsafe.Pointer(pState)).FzDataTbl == uintptr(0) && rbuStrCompare(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, (*RbuState)(unsafe.Pointer(pState)).FzTbl) != 0 || + (*RbuState)(unsafe.Pointer(pState)).FzDataTbl != 0 && rbuStrCompare(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, (*RbuState)(unsafe.Pointer(pState)).FzDataTbl) != 0) { + rc = rbuObjIterNext(tls, p, pIter) + } + + if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { + rc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31709, 0) + } + + if rc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = (*RbuState)(unsafe.Pointer(pState)).FnRow + rc = rbuObjIterPrepareAll(tls, p, p+80, (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep) + } + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + } +} + +// If there is a "*-oal" file in the file-system corresponding to the +// target database in the file-system, delete it. If an error occurs, +// leave an error code and error message in the rbu handle. +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var zOal uintptr = rbuMPrintf(tls, p, ts+31158, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + if zOal != 0 { + var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) + + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete})).f(tls, pVfs, zOal, 0) + Xsqlite3_free(tls, zOal) + } +} + +// Allocate a private rbu VFS for the rbu handle passed as the only +// argument. This VFS will be used unless the call to sqlite3rbu_open() +// specified a URI with a vfs=? option in place of a target database +// file name. +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ + bp := tls.Alloc(76) + defer tls.Free(76) + + // var rnd int32 at bp+8, 4 + + // var zRnd [64]uint8 at bp+12, 64 + + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31734, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) + + (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName + (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRbu = p + } +} + +// Destroy the private VFS created for the rbu handle passed as the only +// argument by an earlier call to rbuCreateVfs(). +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { + Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) + } +} + +// This user-defined SQL function is invoked with a single argument - the +// name of a table expected to appear in the target database. It returns +// the number of auxilliary indexes on the table. +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var p uintptr = Xsqlite3_user_data(tls, pCtx) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)) = uintptr(0) + var rc int32 + var db uintptr = func() uintptr { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + return (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu + } + return (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain + }() + + rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, + Xsqlite3_mprintf(tls, + ts+31745, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + if rc != SQLITE_OK { + Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) + } else { + var nIndex int32 = 0 + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { + nIndex = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + if rc == SQLITE_OK { + Xsqlite3_result_int(tls, pCtx, nIndex) + } else { + Xsqlite3_result_error(tls, pCtx, Xsqlite3_errmsg(tls, db), -1) + } + } + + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */))) +} + +// If the RBU database contains the rbu_count table, use it to initialize +// the sqlite3rbu.nPhaseOneStep variable. The schema of the rbu_count table +// is assumed to contain the same columns as: +// +// CREATE TABLE rbu_count(tbl TEXT PRIMARY KEY, cnt INTEGER) WITHOUT ROWID; +// +// There should be one row in the table for each data_xxx table in the +// database. The 'tbl' column should contain the name of a data_xxx table, +// and the cnt column the number of rows it contains. +// +// sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt +// for all rows in the rbu_count table, where nIndex is the number of +// indexes on the corresponding target database table. +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) + var bExists int32 = 0 // True if rbu_count exists + + (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, + ts+31817, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) + + // Check for the rbu_count table. If it does not exist, or if an error + // occurs, nPhaseOneStep will be left set to -1. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, + ts+31831) + } + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { + bExists = 1 + } + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, + + ts+31888) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { + (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) + } + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + } + } + } +} + +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var p uintptr + var nTarget Size_t + if zTarget != 0 { + nTarget = libc.Xstrlen(tls, zTarget) + } else { + nTarget = uint64(0) + } + var nRbu Size_t = libc.Xstrlen(tls, zRbu) + var nByte Size_t = uint64(unsafe.Sizeof(Sqlite3rbu{})) + nTarget + uint64(1) + nRbu + uint64(1) + + p = Xsqlite3_malloc64(tls, uint64(nByte)) + if p != 0 { + var pState uintptr = uintptr(0) + + // Create the custom VFS. + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + rbuCreateVfs(tls, p) + + // Open the target, RBU and state databases + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var pCsr uintptr = p + 1*392 + *(*int32)(unsafe.Pointer(bp + 16 /* bRetry */)) = 0 + if zTarget != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr + libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget, zTarget, nTarget+uint64(1)) + pCsr += uintptr(nTarget + uint64(1)) + } + (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu = pCsr + libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+uint64(1)) + pCsr += uintptr(nRbu + uint64(1)) + if zState != 0 { + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3605, libc.VaList(bp, zState)) + } + + // If the first attempt to open the database file fails and the bRetry + // flag it set, this means that the db was not opened because it seemed + // to be a wal-mode db. But, this may have happened due to an earlier + // RBU vacuum operation leaving an old wal file in the directory. + // If this is the case, it will have been checkpointed and deleted + // when the handle was closed and a second attempt to open the + // database may succeed. + rbuOpenDatabase(tls, p, uintptr(0), bp+16) + if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { + rbuOpenDatabase(tls, p, uintptr(0), uintptr(0)) + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + pState = rbuLoadState(tls, p) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + + if (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 { + rbuDeleteOalFile(tls, p) + rbuInitPhaseOneSteps(tls, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_OAL + } else { + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = (*RbuState)(unsafe.Pointer(pState)).FeStage + (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = (*RbuState)(unsafe.Pointer(pState)).FnPhaseOneStep + } + (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress = int32((*RbuState)(unsafe.Pointer(pState)).FnProgress) + (*Sqlite3rbu)(unsafe.Pointer(p)).FiOalSz = (*RbuState)(unsafe.Pointer(pState)).FiOalSz + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31962, 0) + } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT + (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && + ((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL || (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE) && + (*RbuState)(unsafe.Pointer(pState)).FeStage != 0 { + var pFd uintptr = func() uintptr { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + return (*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd + } + return (*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd + }() + if (*Rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { + // At this point (pTargetFd->iCookie) contains the value of the + // change-counter cookie (the thing that gets incremented when a + // transaction is committed in rollback mode) currently stored on + // page 1 of the database file. + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31994, + libc.VaList(bp+8, func() uintptr { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + return ts + 32026 /* "vacuum" */ + } + return ts + 32033 /* "update" */ + }())) + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { + var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14431, uintptr(0), uintptr(0), p+64) + + // Point the object iterator at the first object + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) + } + + // If the RBU database contains no data_xxx tables, declare the RBU + // update finished. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl == uintptr(0) { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_DONE + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE + } else { + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + rbuCopyPragma(tls, p, ts+16852) + rbuCopyPragma(tls, p, ts+16264) + } + + // Open transactions both databases. The *-oal file is opened or + // created at this point. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32040, uintptr(0), uintptr(0), p+64) + } + + // Check if the main database is a zipvfs db. If it is, set the upper + // level pager to use "journal_mode=off". This prevents it from + // generating a large journal using a temp file. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var frc int32 = Xsqlite3_file_control(tls, db, ts+6323, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + if frc == SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, + db, ts+32056, uintptr(0), uintptr(0), p+64) + } + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { + rbuSetupOal(tls, p, pState) + } + } + } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { + // no-op + } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { + if !((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) && rbuExclusiveCheckpoint(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain) != 0 { + // If the rbu_exclusive_checkpoint=1 URI parameter was specified + // and an incremental checkpoint is being resumed, attempt an + // exclusive lock on the db file. If this fails, so be it. + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE + rbuLockDatabase(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain) + (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT + } + rbuSetupCheckpoint(tls, p, pState) + } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_DONE { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_DONE + } else { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT + } + } + + rbuFreeState(tls, pState) + } + + return p +} + +// Allocate and return an RBU handle with all fields zeroed except for the +// error code, which is set to SQLITE_MISUSE. +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ + var pRet uintptr + pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + if pRet != 0 { + libc.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(Sqlite3rbu{}))) + (*Sqlite3rbu)(unsafe.Pointer(pRet)).Frc = SQLITE_MISUSE + } + return pRet +} + +// Open and return a new RBU handle. +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ + if zTarget == uintptr(0) || zRbu == uintptr(0) { + return rbuMisuseError(tls) + } + return openRbuHandle(tls, zTarget, zRbu, zState) +} + +// Open a handle to begin or resume an RBU VACUUM operation. +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ + if zTarget == uintptr(0) { + return rbuMisuseError(tls) + } + if zState != 0 { + var n int32 = int32(libc.Xstrlen(tls, zState)) + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32080, zState+uintptr(n-7), uint64(7)) { + return rbuMisuseError(tls) + } + } + // TODO: Check that both arguments are non-NULL + return openRbuHandle(tls, uintptr(0), zTarget, zState) +} + +// Return the database handle used by pRbu. +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ + var db uintptr = uintptr(0) + if pRbu != 0 { + db = func() uintptr { + if bRbu != 0 { + return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FdbRbu + } + return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FdbMain + }() + } + return db +} + +// If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, +// then edit any error message string so as to remove all occurrences of +// the pattern "rbu_imp_[0-9]*". +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { + var i uint32 + var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) + for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30106, uint64(8)) == 0 { + var nDel int32 = 8 + for int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { + nDel++ + } + libc.Xmemmove(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i+uint32(nDel)), nErrmsg+uint64(1)-Size_t(i)-Size_t(nDel)) + nErrmsg = nErrmsg - Size_t(nDel) + } + } + } +} + +// Close the RBU handle. +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ + var rc int32 + if p != 0 { + + // Commit the transaction to the *-oal file. + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14446, uintptr(0), uintptr(0), p+64) + } + + // Sync the db file if currently doing an incremental checkpoint + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { + var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSync})).f(tls, pDb, SQLITE_SYNC_NORMAL) + } + + rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14446, uintptr(0), uintptr(0), p+64) + } + + // Close any open statement handles. + rbuObjIterFinalize(tls, p+80) + + // If this is an RBU vacuum handle and the vacuum has either finished + // successfully or encountered an error, delete the contents of the + // state table. This causes the next call to sqlite3rbu_vacuum() + // specifying the current target and state databases to start a new + // vacuum from scratch. + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32088, uintptr(0), uintptr(0), uintptr(0)) + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 + } + } + + // Close the open database handle and VFS object. + Xsqlite3_close(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu) + Xsqlite3_close(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain) + + rbuDeleteVfs(tls, p) + Xsqlite3_free(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FaBuf) + Xsqlite3_free(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FaFrame) + + rbuEditErrmsg(tls, p) + rc = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc + if pzErrmsg != 0 { + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + } else { + Xsqlite3_free(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) + } + Xsqlite3_free(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState) + Xsqlite3_free(tls, p) + } else { + rc = SQLITE_NOMEM + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = uintptr(0) + } + return rc +} + +// Return the total number of key-value operations (inserts, deletes or +// updates) that have been performed on the target database since the +// current RBU update was started. +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ + return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) +} + +// Return permyriadage progress indications for the two main stages of +// an RBU update. +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ + var MAX_PROGRESS int32 = 10000 + switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { + case RBU_STAGE_OAL: + if (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep > int64(0) { + *(*int32)(unsafe.Pointer(pnOne)) = int32(I64(MAX_PROGRESS) * I64((*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress) / (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep) + } else { + *(*int32)(unsafe.Pointer(pnOne)) = -1 + } + *(*int32)(unsafe.Pointer(pnTwo)) = 0 + break + + case RBU_STAGE_MOVE: + *(*int32)(unsafe.Pointer(pnOne)) = MAX_PROGRESS + *(*int32)(unsafe.Pointer(pnTwo)) = 0 + break + + case RBU_STAGE_CKPT: + *(*int32)(unsafe.Pointer(pnOne)) = MAX_PROGRESS + *(*int32)(unsafe.Pointer(pnTwo)) = int32(I64(MAX_PROGRESS) * I64((*Sqlite3rbu)(unsafe.Pointer(p)).FnStep) / I64((*Sqlite3rbu)(unsafe.Pointer(p)).FnFrame)) + break + + case RBU_STAGE_DONE: + *(*int32)(unsafe.Pointer(pnOne)) = MAX_PROGRESS + *(*int32)(unsafe.Pointer(pnTwo)) = MAX_PROGRESS + break + + default: + + } +} + +// Return the current state of the RBU vacuum or update operation. +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + *(*[6]int32)(unsafe.Pointer(bp /* aRes */)) = [6]int32{ + 0, SQLITE_RBU_STATE_OAL, SQLITE_RBU_STATE_MOVE, + 0, SQLITE_RBU_STATE_CHECKPOINT, SQLITE_RBU_STATE_DONE, + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_DONE { + return SQLITE_RBU_STATE_ERROR + } else { + + return *(*int32)(unsafe.Pointer(bp + uintptr((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage)*4)) + } + return int32(0) +} + +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ + var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc + if rc == SQLITE_DONE { + return SQLITE_OK + } + + if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { + + if rc == SQLITE_OK { + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14446, uintptr(0), uintptr(0), uintptr(0)) + } + } + + // Sync the db file + if rc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { + var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal + rc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSync})).f(tls, pDb, SQLITE_SYNC_NORMAL) + } + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) + rc = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc + + if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { + + if rc == SQLITE_OK { + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14446, uintptr(0), uintptr(0), uintptr(0)) + } + if rc == SQLITE_OK { + var zBegin uintptr + if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { + zBegin = ts + 14431 /* "BEGIN" */ + } else { + zBegin = ts + 32040 /* "BEGIN IMMEDIATE" */ + } + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) + } + if rc == SQLITE_OK { + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32040, uintptr(0), uintptr(0), uintptr(0)) + } + } + + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + return rc +} + +// ************************************************************************* +// +// Beginning of RBU VFS shim methods. The VFS shim modifies the behaviour +// of a standard VFS in the following ways: +// +// 1. Whenever the first page of a main database file is read or +// written, the value of the change-counter cookie is stored in +// rbu_file.iCookie. Similarly, the value of the "write-version" +// database header field is stored in rbu_file.iWriteVer. This ensures +// that the values are always trustworthy within an open transaction. +// +// 2. Whenever an SQLITE_OPEN_WAL file is opened, the (rbu_file.pWalFd) +// member variable of the associated database file descriptor is set +// to point to the new file. A mutex protected linked list of all main +// db fds opened using a particular RBU VFS is maintained at +// rbu_vfs.pMain to facilitate this. +// +// 3. Using a new file-control "SQLITE_FCNTL_RBU", a main db rbu_file +// object can be marked as the target database of an RBU update. This +// turns on the following extra special behaviour: +// +// 3a. If xAccess() is called to check if there exists a *-wal file +// associated with an RBU target database currently in RBU_STAGE_OAL +// stage (preparing the *-oal file), the following special handling +// applies: +// +// * if the *-wal file does exist, return SQLITE_CANTOPEN. An RBU +// target database may not be in wal mode already. +// +// * if the *-wal file does not exist, set the output parameter to +// non-zero (to tell SQLite that it does exist) anyway. +// +// Then, when xOpen() is called to open the *-wal file associated with +// the RBU target in RBU_STAGE_OAL stage, instead of opening the *-wal +// file, the rbu vfs opens the corresponding *-oal file instead. +// +// 3b. The *-shm pages returned by xShmMap() for a target db file in +// RBU_STAGE_OAL mode are actually stored in heap memory. This is to +// avoid creating a *-shm file on disk. Additionally, xShmLock() calls +// are no-ops on target database files in RBU_STAGE_OAL mode. This is +// because assert() statements in some VFS implementations fail if +// xShmLock() is called before xShmMap(). +// +// 3c. If an EXCLUSIVE lock is attempted on a target database file in any +// mode except RBU_STAGE_DONE (all work completed and checkpointed), it +// fails with an SQLITE_BUSY error. This is to stop RBU connections +// from automatically checkpointing a *-wal (or *-oal) file from within +// sqlite3_close(). +// +// 3d. In RBU_STAGE_CAPTURE mode, all xRead() calls on the wal file, and +// all xWrite() calls on the target database file perform no IO. +// Instead the frame and page numbers that would be read and written +// are recorded. Additionally, successful attempts to obtain exclusive +// xShmLock() WRITER, CHECKPOINTER and READ0 locks on the target +// database file are recorded. xShmLock() calls to unlock the same +// locks are no-ops (so that once obtained, these locks are never +// relinquished). Finally, calls to xSync() on the target database +// file fail with SQLITE_INTERNAL errors. + +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ + + if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { + var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock + var i int32 + for i = 0; i < SQLITE_SHM_NLOCK; i++ { + if U32(int32(1)< (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit { + return SQLITE_FULL + } + return SQLITE_OK +} + +// Add an item to the main-db lists, if it is not already present. +// +// There are two main-db lists. One for all file descriptors, and one +// for all file descriptors with rbu_file.pDb!=0. If the argument has +// rbu_file.pDb!=0, then it is assumed to already be present on the +// main list and is only added to the pDb!=0 list. +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ + var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + var pIter uintptr + + Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) + if (*Rbu_file)(unsafe.Pointer(p)).FpRbu == uintptr(0) { + for pIter = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain; pIter != 0; pIter = (*Rbu_file)(unsafe.Pointer(pIter)).FpMainNext { + } + (*Rbu_file)(unsafe.Pointer(p)).FpMainNext = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain + (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain = p + } else { + for pIter = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu; pIter != 0 && pIter != p; pIter = (*Rbu_file)(unsafe.Pointer(pIter)).FpMainRbuNext { + } + if pIter == uintptr(0) { + (*Rbu_file)(unsafe.Pointer(p)).FpMainRbuNext = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu + (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu = p + } + } + Xsqlite3_mutex_leave(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) +} + +// Remove an item from the main-db lists. +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ + var pp uintptr + Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) + for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { + } + if *(*uintptr)(unsafe.Pointer(pp)) != 0 { + *(*uintptr)(unsafe.Pointer(pp)) = (*Rbu_file)(unsafe.Pointer(p)).FpMainNext + } + (*Rbu_file)(unsafe.Pointer(p)).FpMainNext = uintptr(0) + for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 200; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 96 { + } + if *(*uintptr)(unsafe.Pointer(pp)) != 0 { + *(*uintptr)(unsafe.Pointer(pp)) = (*Rbu_file)(unsafe.Pointer(p)).FpMainRbuNext + } + (*Rbu_file)(unsafe.Pointer(p)).FpMainRbuNext = uintptr(0) + Xsqlite3_mutex_leave(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) +} + +// Given that zWal points to a buffer containing a wal file name passed to +// either the xOpen() or xAccess() VFS method, search the main-db list for +// a file-handle opened by the same database connection on the corresponding +// database file. +// +// If parameter bRbu is true, only search for file-descriptors with +// rbu_file.pDb!=0. +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ + var pDb uintptr + Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) + if bRbu != 0 { + for pDb = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu; pDb != 0 && (*Rbu_file)(unsafe.Pointer(pDb)).FzWal != zWal; pDb = (*Rbu_file)(unsafe.Pointer(pDb)).FpMainRbuNext { + } + } else { + for pDb = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain; pDb != 0 && (*Rbu_file)(unsafe.Pointer(pDb)).FzWal != zWal; pDb = (*Rbu_file)(unsafe.Pointer(pDb)).FpMainNext { + } + } + Xsqlite3_mutex_leave(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) + return pDb +} + +// Close an rbu file. +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ + var p uintptr = pFile + var rc int32 + var i int32 + + // Free the contents of the apShm[] array. And the array itself. + for i = 0; i < (*Rbu_file)(unsafe.Pointer(p)).FnShm; i++ { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(i)*8))) + } + Xsqlite3_free(tls, (*Rbu_file)(unsafe.Pointer(p)).FapShm) + (*Rbu_file)(unsafe.Pointer(p)).FapShm = uintptr(0) + Xsqlite3_free(tls, (*Rbu_file)(unsafe.Pointer(p)).FzDel) + + if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { + rbuMainlistRemove(tls, p) + rbuUnlockShm(tls, p) + (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmUnmap})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, 0) + } else if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { + rbuUpdateTempSize(tls, p, int64(0)) + } + + // Close the underlying file handle + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxClose})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) + return rc +} + +// Read and return an unsigned 32-bit big-endian integer from the buffer +// passed as the only argument. +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ + return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + + U32(*(*U8)(unsafe.Pointer(aBuf + 3))) +} + +// Write an unsigned 32-bit value in big-endian format to the supplied +// buffer. +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ + *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) +} + +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ + *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) + *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) +} + +// Read data from an rbuVfs-file. +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ + var p uintptr = pFile + var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu + var rc int32 + + if pRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_CAPTURE { + + rc = rbuCaptureWalRead(tls, (*Rbu_file)(unsafe.Pointer(p)).FpRbu, iOfst, iAmt) + } else { + if pRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_OAL && + (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_WAL != 0 && + iOfst >= (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FiOalSz { + rc = SQLITE_OK + libc.Xmemset(tls, zBuf, 0, uint64(iAmt)) + } else { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxRead})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) + // If this is being called to read the first page of the target + // database as part of an rbu vacuum operation, synthesize the + // contents of the first page if it does not yet exist. Otherwise, + // SQLite will not check for a *-wal file. + if pRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzTarget == uintptr(0) && + rc == SQLITE_IOERR|int32(2)<<8 && iOfst == int64(0) && + (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 && + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).Frc == SQLITE_OK { + var pFd uintptr = (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRbuFd + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods)).FxRead})).f(tls, pFd, zBuf, iAmt, iOfst) + if rc == SQLITE_OK { + var aBuf uintptr = zBuf + var iRoot U32 + if rbuGetU32(tls, aBuf+52) != 0 { + iRoot = uint32(1) + } else { + iRoot = uint32(0) + } + rbuPutU32(tls, aBuf+52, iRoot) // largest root page number + rbuPutU32(tls, aBuf+36, uint32(0)) // number of free pages + rbuPutU32(tls, aBuf+32, uint32(0)) // first page on free list trunk + rbuPutU32(tls, aBuf+28, uint32(1)) // size of db file in pages + rbuPutU32(tls, aBuf+24, (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRbuFd)).FiCookie+U32(1)) // Change counter + + if iAmt > 100 { + libc.Xmemset(tls, aBuf+100, 0, uint64(iAmt-100)) + rbuPutU16(tls, aBuf+105, uint16(iAmt&0xFFFF)) + *(*U8)(unsafe.Pointer(aBuf + 100)) = U8(0x0D) + } + } + } + } + if rc == SQLITE_OK && iOfst == int64(0) && (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { + // These look like magic numbers. But they are stable, as they are part + // of the definition of the SQLite file format, which may not change. + var pBuf uintptr = zBuf + (*Rbu_file)(unsafe.Pointer(p)).FiCookie = rbuGetU32(tls, pBuf+24) + (*Rbu_file)(unsafe.Pointer(p)).FiWriteVer = *(*U8)(unsafe.Pointer(pBuf + 19)) + } + } + return rc +} + +// Write data to an rbuVfs-file. +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ + var p uintptr = pFile + var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu + var rc int32 + + if pRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_CAPTURE { + + rc = rbuCaptureDbWrite(tls, (*Rbu_file)(unsafe.Pointer(p)).FpRbu, iOfst) + } else { + if pRbu != 0 { + if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_OAL && + (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_WAL != 0 && + iOfst >= (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FiOalSz { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FiOalSz = Sqlite_int64(iAmt) + iOfst + } else if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 { + var szNew I64 = Sqlite_int64(iAmt) + iOfst + if szNew > (*Rbu_file)(unsafe.Pointer(p)).Fsz { + rc = rbuUpdateTempSize(tls, p, szNew) + if rc != SQLITE_OK { + return rc + } + } + } + } + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxWrite})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) + if rc == SQLITE_OK && iOfst == int64(0) && (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { + // These look like magic numbers. But they are stable, as they are part + // of the definition of the SQLite file format, which may not change. + var pBuf uintptr = zBuf + (*Rbu_file)(unsafe.Pointer(p)).FiCookie = rbuGetU32(tls, pBuf+24) + (*Rbu_file)(unsafe.Pointer(p)).FiWriteVer = *(*U8)(unsafe.Pointer(pBuf + 19)) + } + } + return rc +} + +// Truncate an rbuVfs-file. +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ + var p uintptr = pFile + if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { + var rc int32 = rbuUpdateTempSize(tls, p, size) + if rc != SQLITE_OK { + return rc + } + } + return (*struct { + f func(*libc.TLS, uintptr, Sqlite3_int64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxTruncate})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, size) +} + +// Sync an rbuVfs-file. +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ + var p uintptr = pFile + if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { + if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { + return SQLITE_INTERNAL + } + return SQLITE_OK + } + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxSync})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, flags) +} + +// Return the current file-size of an rbuVfs-file. +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ + var p uintptr = pFile + var rc int32 + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxFileSize})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, pSize) + + // If this is an RBU vacuum operation and this is the target database, + // pretend that it has at least one page. Otherwise, SQLite will not + // check for the existance of a *-wal file. rbuVfsRead() contains + // similar logic. + if rc == SQLITE_OK && *(*Sqlite_int64)(unsafe.Pointer(pSize)) == int64(0) && + (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FzTarget == uintptr(0) && + (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { + *(*Sqlite_int64)(unsafe.Pointer(pSize)) = int64(1024) + } + return rc +} + +// Lock an rbuVfs-file. +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ + var p uintptr = pFile + var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu + var rc int32 = SQLITE_OK + + if eLock == SQLITE_LOCK_EXCLUSIVE && + ((*Rbu_file)(unsafe.Pointer(p)).FbNolock != 0 || pRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage != RBU_STAGE_DONE) { + // Do not allow EXCLUSIVE locks. Preventing SQLite from taking this + // prevents it from checkpointing the database from sqlite3_close(). + rc = SQLITE_BUSY + } else { + rc = (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxLock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, eLock) + } + + return rc +} + +// Unlock an rbuVfs-file. +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ + var p uintptr = pFile + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxUnlock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, eLock) +} + +// Check if another file-handle holds a RESERVED lock on an rbuVfs-file. +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ + var p uintptr = pFile + return (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxCheckReservedLock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, pResOut) +} + +// File control method. For custom operations on an rbuVfs-file. +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var p uintptr = pFile + var xControl uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxFileControl + var rc int32 + + if op == SQLITE_FCNTL_RBU { + var pRbu uintptr = pArg + + // First try to find another RBU vfs lower down in the vfs stack. If + // one is found, this vfs will operate in pass-through mode. The lower + // level vfs will do the special RBU handling. + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg) + + if rc == SQLITE_NOTFOUND { + // Now search for a zipvfs instance lower down in the VFS stack. If + // one is found, this is an error. + *(*uintptr)(unsafe.Pointer(bp + 16 /* dummy */)) = uintptr(0) + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) + if rc == SQLITE_OK { + rc = SQLITE_ERROR + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32115, 0) + } else if rc == SQLITE_NOTFOUND { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p + (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu + rbuMainlistAdd(tls, p) + if (*Rbu_file)(unsafe.Pointer(p)).FpWalFd != 0 { + (*Rbu_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpWalFd)).FpRbu = pRbu + } + rc = SQLITE_OK + } + } + return rc + } else if op == SQLITE_FCNTL_RBUCNT { + var pRbu uintptr = pArg + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnRbu++ + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRbuFd = p + (*Rbu_file)(unsafe.Pointer(p)).FbNolock = U8(1) + } + + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg) + if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { + var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32138, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + *(*uintptr)(unsafe.Pointer(pArg)) = zOut + if zOut == uintptr(0) { + rc = SQLITE_NOMEM + } + } + + return rc +} + +// Return the sector-size in bytes for an rbuVfs-file. +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ + var p uintptr = pFile + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxSectorSize})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) +} + +// Return the device characteristic flags supported by an rbuVfs-file. +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ + var p uintptr = pFile + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxDeviceCharacteristics})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) +} + +// Take or release a shared-memory lock. +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ + var p uintptr = pFile + var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu + var rc int32 = SQLITE_OK + + if pRbu != 0 && ((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_OAL || + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_MOVE || + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_DONE) { + // Prevent SQLite from taking a shm-lock on the target file when it + // is supplying heap memory to the upper layer in place of *-shm + // segments. + if ofst == WAL_LOCK_CKPT && n == 1 { + rc = SQLITE_BUSY + } + } else { + var bCapture int32 = 0 + if pRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_CAPTURE { + bCapture = 1 + } + if bCapture == 0 || 0 == flags&SQLITE_SHM_UNLOCK { + rc = (*struct { + f func(*libc.TLS, uintptr, int32, int32, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) + if bCapture != 0 && rc == SQLITE_OK { + *(*U32)(unsafe.Pointer(pRbu + 316)) |= U32((int32(1)<zWal) to point to a buffer owned by SQLite that contains + // the name of the *-wal file this db connection will use. SQLite + // happens to pass a pointer to this buffer when using xAccess() + // or xOpen() to operate on the *-wal file. + (*Rbu_file)(unsafe.Pointer(pFd)).FzWal = Xsqlite3_filename_wal(tls, zName) + } else if flags&SQLITE_OPEN_WAL != 0 { + var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zName, 0) + if pDb != 0 { + if (*Rbu_file)(unsafe.Pointer(pDb)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == RBU_STAGE_OAL { + // This call is to open a *-wal file. Intead, open the *-oal. + var nOpen Size_t + if (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FzTarget == uintptr(0) { + zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+6323) + zOpen = Xsqlite3_filename_wal(tls, zOpen) + } + nOpen = libc.Xstrlen(tls, zOpen) + *(*uint8)(unsafe.Pointer(zOpen + uintptr(nOpen-uint64(3)))) = uint8('o') + (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Rbu_file)(unsafe.Pointer(pDb)).FpRbu + } + (*Rbu_file)(unsafe.Pointer(pDb)).FpWalFd = pFd + } + } + } else { + (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRbu + } + + if oflags&SQLITE_OPEN_MAIN_DB != 0 && + Xsqlite3_uri_boolean(tls, zName, ts+32149, 0) != 0 { + + oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE + zOpen = uintptr(0) + } + + if rc == SQLITE_OK { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxOpen})).f(tls, pRealVfs, zOpen, (*Rbu_file)(unsafe.Pointer(pFd)).FpReal, oflags, pOutFlags) + } + if (*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pFd)).FpReal)).FpMethods != 0 { + // The xOpen() operation has succeeded. Set the sqlite3_file.pMethods + // pointer and, if the file is a main database file, link it into the + // mutex protected linked list of all such files. + (*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + if flags&SQLITE_OPEN_MAIN_DB != 0 { + rbuMainlistAdd(tls, pFd) + } + } else { + Xsqlite3_free(tls, (*Rbu_file)(unsafe.Pointer(pFd)).FzDel) + } + + return rc +} + +var rbuvfs_io_methods = Sqlite3_io_methods{ + FiVersion: 2, // iVersion + FxClose: 0, // xClose + FxRead: 0, // xRead + FxWrite: 0, // xWrite + FxTruncate: 0, // xTruncate + FxSync: 0, // xSync + FxFileSize: 0, // xFileSize + FxLock: 0, // xLock + FxUnlock: 0, // xUnlock + FxCheckReservedLock: 0, // xCheckReservedLock + FxFileControl: 0, // xFileControl + FxSectorSize: 0, // xSectorSize + FxDeviceCharacteristics: 0, // xDeviceCharacteristics + FxShmMap: 0, // xShmMap + FxShmLock: 0, // xShmLock + FxShmBarrier: 0, // xShmBarrier + FxShmUnmap: 0, // xFetch, xUnfetch +} /* sqlite3.c:208629:29 */ + +// Delete the file located at zPath. +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDelete})).f(tls, pRealVfs, zPath, dirSync) +} + +// Test for access permissions. Return true if the requested permission +// is available, or false otherwise. +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pRbuVfs uintptr = pVfs + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs + var rc int32 + + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxAccess})).f(tls, pRealVfs, zPath, flags, pResOut) + + // If this call is to check if a *-wal file associated with an RBU target + // database connection exists, and the RBU update is in RBU_STAGE_OAL, + // the following special handling is activated: + // + // a) if the *-wal file does exist, return SQLITE_CANTOPEN. This + // ensures that the RBU extension never tries to update a database + // in wal mode, even if the first page of the database file has + // been damaged. + // + // b) if the *-wal file does not exist, claim that it does anyway, + // causing SQLite to call xOpen() to open it. This call will also + // be intercepted (see the rbuVfsOpen() function) and the *-oal + // file opened instead. + if rc == SQLITE_OK && flags == SQLITE_ACCESS_EXISTS { + var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zPath, 1) + if pDb != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == RBU_STAGE_OAL { + + if *(*int32)(unsafe.Pointer(pResOut)) != 0 { + rc = SQLITE_CANTOPEN + } else { + *(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = int64(0) + rc = rbuVfsFileSize(tls, pDb, bp) + *(*int32)(unsafe.Pointer(pResOut)) = libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp)) > int64(0)) + } + } + } + + return rc +} + +// Populate buffer zOut with the full canonical pathname corresponding +// to the pathname in zPath. zOut is guaranteed to point to a buffer +// of at least (DEVSYM_MAX_PATHNAME+1) bytes. +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxFullPathname})).f(tls, pRealVfs, zPath, nOut, zOut) +} + +// Open the dynamic library located at zPath and return a handle. +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + return (*struct { + f func(*libc.TLS, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlOpen})).f(tls, pRealVfs, zPath) +} + +// Populate the buffer zErrMsg (size nByte bytes) with a human readable +// utf-8 string describing the most recent error encountered associated +// with dynamic libraries. +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlError})).f(tls, pRealVfs, nByte, zErrMsg) +} + +// Return a pointer to the symbol zSymbol in the dynamic library pHandle. +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + return (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlSym})).f(tls, pRealVfs, pArg, zSym) +} + +// Close the dynamic library handle pHandle. +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlClose})).f(tls, pRealVfs, pHandle) +} + +// Populate the buffer pointed to by zBufOut with nByte bytes of +// random data. +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxRandomness})).f(tls, pRealVfs, nByte, zBufOut) +} + +// Sleep for nMicro microseconds. Return the number of microseconds +// actually slept. +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + return (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxSleep})).f(tls, pRealVfs, nMicro) +} + +// Return the current time as a Julian Day number in *pTimeOut. +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ + var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs + return (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxCurrentTime})).f(tls, pRealVfs, pTimeOut) +} + +// No-op. +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ + return 0 +} + +// Deregister and destroy an RBU vfs created by an earlier call to +// sqlite3rbu_create_vfs(). +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ + var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) + if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + }{rbuVfsOpen})) { + Xsqlite3_mutex_free(tls, (*Rbu_vfs)(unsafe.Pointer(pVfs)).Fmutex) + Xsqlite3_vfs_unregister(tls, pVfs) + Xsqlite3_free(tls, pVfs) + } +} + +// Create an RBU VFS named zName that accesses the underlying file-system +// via existing VFS zParent. The new object is registered as a non-default +// VFS with SQLite before returning. +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ + + var pNew uintptr = uintptr(0) // Newly allocated VFS + var rc int32 = SQLITE_OK + var nName Size_t + var nByte Size_t + + nName = libc.Xstrlen(tls, zName) + nByte = uint64(unsafe.Sizeof(Rbu_vfs{})) + nName + uint64(1) + pNew = Xsqlite3_malloc64(tls, uint64(nByte)) + if pNew == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var pParent uintptr // Parent VFS + libc.Xmemset(tls, pNew, 0, nByte) + pParent = Xsqlite3_vfs_find(tls, zParent) + if pParent == uintptr(0) { + rc = SQLITE_NOTFOUND + } else { + var zSpace uintptr + libc.Xmemcpy(tls, pNew, uintptr(unsafe.Pointer(&vfs_template)), uint64(unsafe.Sizeof(Sqlite3_vfs{}))) + (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FmxPathname = (*Sqlite3_vfs)(unsafe.Pointer(pParent)).FmxPathname + (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FszOsFile = int32(uint64(unsafe.Sizeof(Rbu_file{})) + uint64((*Sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile)) + (*Rbu_vfs)(unsafe.Pointer(pNew)).FpRealVfs = pParent + (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FzName = libc.AssignUintptr(&zSpace, pNew+1*208) + libc.Xmemcpy(tls, zSpace, zName, nName) + + // Allocate the mutex and register the new VFS (not as the default) + (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_RECURSIVE) + if (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex == uintptr(0) { + rc = SQLITE_NOMEM + } else { + rc = Xsqlite3_vfs_register(tls, pNew, 0) + } + } + + if rc != SQLITE_OK { + Xsqlite3_mutex_free(tls, (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex) + Xsqlite3_free(tls, pNew) + } + } + + return rc +} + +var vfs_template = Sqlite3_vfs{ + FiVersion: 1, // pAppData + FxOpen: 0, // xOpen + FxDelete: 0, // xDelete + FxAccess: 0, // xAccess + FxFullPathname: 0, // xFullPathname + + FxDlOpen: 0, // xDlOpen + FxDlError: 0, // xDlError + FxDlSym: 0, // xDlSym + FxDlClose: 0, // xDlClose + + FxRandomness: 0, // xRandomness + FxSleep: 0, // xSleep + FxCurrentTime: 0, // xCurrentTime + FxGetLastError: 0, // Unimplemented version 3 methods +} /* sqlite3.c:208881:22 */ + +// Configure the aggregate temp file size limit for this RBU handle. +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ + if n >= int64(0) { + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n + } + return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit +} + +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ + return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp +} + +//************************************************************************ + +//************* End of sqlite3rbu.c ***************************************** +//************* Begin file dbstat.c ***************************************** +// 2010 July 12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains an implementation of the "dbstat" virtual table. +// +// The dbstat virtual table is used to extract low-level storage +// information from an SQLite database in order to implement the +// "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script +// for an example implementation. +// +// Additional information is available on the "dbstat.html" page of the +// official SQLite documentation. + +// #include "sqliteInt.h" ** Requires access to internal data structures ** + +//************* End of dbstat.c ********************************************* +//************* Begin file dbpage.c ***************************************** +// 2017-10-11 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains an implementation of the "sqlite_dbpage" virtual table. +// +// The sqlite_dbpage virtual table is used to read or write whole raw +// pages of the database file. The pager interface is used so that +// uncommitted changes and changes recorded in the WAL file are correctly +// retrieved. +// +// Usage example: +// +// SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123; +// +// This is an eponymous virtual table so it does not need to be created before +// use. The optional argument to the sqlite_dbpage() table name is the +// schema for the database file that is to be read. The default schema is +// "main". +// +// The data field of sqlite_dbpage table can be updated. The new +// value must be a BLOB which is the correct page size, otherwise the +// update fails. Rows may not be deleted or inserted. + +// #include "sqliteInt.h" ** Requires access to internal data structures ** + +//************* End of dbpage.c ********************************************* +//************* Begin file sqlite3session.c ********************************* + +// #include "sqlite3session.h" +// #include +// #include + +type SessionTable1 = struct { + FpNext uintptr + FzName uintptr + FnCol int32 + FbStat1 int32 + FazCol uintptr + FabPK uintptr + FnEntry int32 + FnChange int32 + FapChange uintptr +} /* sqlite3.c:10832:9 */ + +//************************************************************************ + +//************* End of sqlite3rbu.c ***************************************** +//************* Begin file dbstat.c ***************************************** +// 2010 July 12 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains an implementation of the "dbstat" virtual table. +// +// The dbstat virtual table is used to extract low-level storage +// information from an SQLite database in order to implement the +// "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script +// for an example implementation. +// +// Additional information is available on the "dbstat.html" page of the +// official SQLite documentation. + +// #include "sqliteInt.h" ** Requires access to internal data structures ** + +//************* End of dbstat.c ********************************************* +//************* Begin file dbpage.c ***************************************** +// 2017-10-11 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains an implementation of the "sqlite_dbpage" virtual table. +// +// The sqlite_dbpage virtual table is used to read or write whole raw +// pages of the database file. The pager interface is used so that +// uncommitted changes and changes recorded in the WAL file are correctly +// retrieved. +// +// Usage example: +// +// SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123; +// +// This is an eponymous virtual table so it does not need to be created before +// use. The optional argument to the sqlite_dbpage() table name is the +// schema for the database file that is to be read. The default schema is +// "main". +// +// The data field of sqlite_dbpage table can be updated. The new +// value must be a BLOB which is the correct page size, otherwise the +// update fails. Rows may not be deleted or inserted. + +// #include "sqliteInt.h" ** Requires access to internal data structures ** + +//************* End of dbpage.c ********************************************* +//************* Begin file sqlite3session.c ********************************* + +// #include "sqlite3session.h" +// #include +// #include + +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ +type SessionChange1 = struct { + Fop U8 + FbIndirect U8 + F__ccgo_pad1 [2]byte + FnMaxSize int32 + FnRecord int32 + F__ccgo_pad2 [4]byte + FaRecord uintptr + FpNext uintptr +} /* sqlite3.c:10832:9 */ + +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ +type SessionBuffer1 = struct { + FaBuf uintptr + FnBuf int32 + FnAlloc int32 +} /* sqlite3.c:10840:9 */ + +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ +type SessionInput1 = struct { + FbNoDiscard int32 + FiCurrent int32 + FiNext int32 + F__ccgo_pad1 [4]byte + FaData uintptr + FnData int32 + F__ccgo_pad2 [4]byte + Fbuf SessionBuffer + FxInput uintptr + FpIn uintptr + FbEof int32 + F__ccgo_pad3 [4]byte +} /* sqlite3.c:10840:9 */ + +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ + +// Minimum chunk size used by streaming versions of functions. + +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ + +type SessionHook1 = struct { + FpCtx uintptr + FxOld uintptr + FxNew uintptr + FxCount uintptr + FxDepth uintptr +} /* sqlite3.c:10832:9 */ + +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ + +// Write a varint with value iVal into the buffer at aBuf. Return the +// number of bytes written. +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ + return int32(func() uint8 { + if U32(iVal) < U32(0x80) { + return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) + } + return uint8(Xsqlite3PutVarint(tls, aBuf, uint64(iVal))) + }()) +} + +// Return the number of bytes required to store value iVal as a varint. +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ + return Xsqlite3VarintLen(tls, uint64(iVal)) +} + +// Read a varint value from aBuf[] into *piVal. Return the number of +// bytes read. +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ + return int32(func() uint8 { + if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { + return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) + } + return Xsqlite3GetVarint32(tls, aBuf, piVal) + }()) +} + +// Load an unaligned and unsigned 32-bit integer + +// Read a 64-bit big-endian integer value from buffer aRec[]. Return +// the value read. +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ + var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) + var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) + x = x<<32 + U64(y) + return Sqlite3_int64(x) +} + +// Write a 64-bit big-endian integer value to the buffer aBuf[]. +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ + *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(i >> 32 & int64(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 4)) = U8(i >> 24 & int64(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 5)) = U8(i >> 16 & int64(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 6)) = U8(i >> 8 & int64(0xFF)) + *(*U8)(unsafe.Pointer(aBuf + 7)) = U8(i >> 0 & int64(0xFF)) +} + +// This function is used to serialize the contents of value pValue (see +// comment titled "RECORD FORMAT" above). +// +// If it is non-NULL, the serialized form of the value is written to +// buffer aBuf. *pnWrite is set to the number of bytes written before +// returning. Or, if aBuf is NULL, the only thing this function does is +// set *pnWrite. +// +// If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs +// within a call to sqlite3_value_text() (may fail if the db is utf-16)) +// SQLITE_NOMEM is returned. +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var nByte int32 // Size of serialized value in bytes + + if pValue != 0 { + var eType int32 // Value type (SQLITE_NULL, TEXT etc.) + + eType = Xsqlite3_value_type(tls, pValue) + if aBuf != 0 { + *(*U8)(unsafe.Pointer(aBuf)) = U8(eType) + } + + switch eType { + case SQLITE_NULL: + nByte = 1 + break + fallthrough + + case SQLITE_INTEGER: + fallthrough + case SQLITE_FLOAT: + if aBuf != 0 { + // TODO: SQLite does something special to deal with mixed-endian + // floating point values (e.g. ARM7). This code probably should + // too. + // var i U64 at bp, 8 + + if eType == SQLITE_INTEGER { + *(*U64)(unsafe.Pointer(bp /* i */)) = U64(Xsqlite3_value_int64(tls, pValue)) + } else { + // var r float64 at bp+8, 8 + + *(*float64)(unsafe.Pointer(bp + 8 /* r */)) = Xsqlite3_value_double(tls, pValue) + libc.Xmemcpy(tls, bp, bp+8, uint64(8)) + } + sessionPutI64(tls, aBuf+1, int64(*(*U64)(unsafe.Pointer(bp /* i */)))) + } + nByte = 9 + break + fallthrough + + default: + { + var z uintptr + var n int32 + var nVarint int32 + + if eType == SQLITE_TEXT { + z = Xsqlite3_value_text(tls, pValue) + } else { + z = Xsqlite3_value_blob(tls, pValue) + } + n = Xsqlite3_value_bytes(tls, pValue) + if z == uintptr(0) && (eType != SQLITE_BLOB || n > 0) { + return SQLITE_NOMEM + } + nVarint = sessionVarintLen(tls, n) + + if aBuf != 0 { + sessionVarintPut(tls, aBuf+1, n) + if n > 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nVarint+1), z, uint64(n)) + } + } + + nByte = 1 + nVarint + n + break + + } + } + } else { + nByte = 1 + if aBuf != 0 { + *(*U8)(unsafe.Pointer(aBuf)) = U8(0) + } + } + + if pnWrite != 0 { + *(*Sqlite3_int64)(unsafe.Pointer(pnWrite)) += Sqlite3_int64(nByte) + } + return SQLITE_OK +} + +// Allocate and return a pointer to a buffer nByte bytes in size. If +// pSession is not NULL, increase the sqlite3_session.nMalloc variable +// by the number of bytes allocated. +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ + var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) + if pSession != 0 { + *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) + } + return pRet +} + +// Free buffer pFree, which must have been allocated by an earlier +// call to sessionMalloc64(). If pSession is not NULL, decrease the +// sqlite3_session.nMalloc counter by the number of bytes freed. +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ + if pSession != 0 { + *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) + } + Xsqlite3_free(tls, pFree) +} + +// This macro is used to calculate hash key values for data structures. In +// order to use this macro, the entire data structure must be represented +// as a series of unsigned integers. In order to calculate a hash-key value +// for a data structure represented as three such integers, the macro may +// then be used as follows: +// +// int hash_key_value; +// hash_key_value = HASH_APPEND(0, ); +// hash_key_value = HASH_APPEND(hash_key_value, ); +// hash_key_value = HASH_APPEND(hash_key_value, ); +// +// In practice, the data structures this macro is used for are the primary +// key values of modified rows. + +// Append the hash of the 64-bit integer passed as the second argument to the +// hash-key value passed as the first. Return the new hash-key value. +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ + h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) + return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) +} + +// Append the hash of the blob passed via the second and third arguments to +// the hash-key value passed as the first. Return the new hash-key value. +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ + var i int32 + for i = 0; i < n; i++ { + h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) + } + return h +} + +// Append the hash of the data type passed as the second argument to the +// hash-key value passed as the first. Return the new hash-key value. +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ + return h<<3 ^ h ^ uint32(eType) +} + +// This function may only be called from within a pre-update callback. +// It calculates a hash based on the primary key values of the old.* or +// new.* row currently available and, assuming no error occurs, writes it to +// *piHash before returning. If the primary key contains one or more NULL +// values, *pbNullPK is set to true before returning. +// +// If an error occurs, an SQLite error code is returned and the final values +// of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned +// and the output variables are set as described above. +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var h uint32 = uint32(0) // Hash value to return + var i int32 // Used to iterate through columns + + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { + if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0 { + var rc int32 + var eType int32 + // var pVal uintptr at bp, 8 + + if bNew != 0 { + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp /* &pVal */) + } else { + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp /* &pVal */) + } + if rc != SQLITE_OK { + return rc + } + + eType = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + h = sessionHashAppendType(tls, h, eType) + if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + // var iVal I64 at bp+8, 8 + + if eType == SQLITE_INTEGER { + *(*I64)(unsafe.Pointer(bp + 8 /* iVal */)) = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + } else { + *(*float64)(unsafe.Pointer(bp + 16 /* rVal */)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + + libc.Xmemcpy(tls, bp+8, bp+16, uint64(8)) + } + h = sessionHashAppendI64(tls, h, *(*I64)(unsafe.Pointer(bp + 8 /* iVal */))) + } else if eType == SQLITE_TEXT || eType == SQLITE_BLOB { + var z uintptr + var n int32 + if eType == SQLITE_TEXT { + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + } else { + z = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + } + n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + if !(z != 0) && (eType != SQLITE_BLOB || n > 0) { + return SQLITE_NOMEM + } + h = sessionHashAppendBlob(tls, h, n, z) + } else { + + *(*int32)(unsafe.Pointer(pbNullPK)) = 1 + } + } + } + + *(*int32)(unsafe.Pointer(piHash)) = int32(h % uint32((*SessionTable)(unsafe.Pointer(pTab)).FnChange)) + return SQLITE_OK +} + +// The buffer that the argument points to contains a serialized SQL value. +// Return the number of bytes of space occupied by the value (including +// the type byte). +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var e int32 = int32(*(*U8)(unsafe.Pointer(a))) + // var n int32 at bp, 4 + + if e == 0 || e == 0xFF { + return 1 + } + if e == SQLITE_NULL { + return 1 + } + if e == SQLITE_INTEGER || e == SQLITE_FLOAT { + return 9 + } + return sessionVarintGet(tls, a+1, bp) + 1 + *(*int32)(unsafe.Pointer(bp)) +} + +// Based on the primary key values stored in change aRecord, calculate a +// hash key. Assume the has table has nBucket buckets. The hash keys +// calculated by this function are compatible with those calculated by +// sessionPreupdateHash(). +// +// The bPkOnly argument is non-zero if the record at aRecord[] is from +// a patchset DELETE. In this case the non-PK fields are omitted entirely. +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var h uint32 = uint32(0) // Value to return + var i int32 // Used to iterate through columns + var a uintptr = aRecord // Used to iterate through change record + + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { + var eType int32 = int32(*(*U8)(unsafe.Pointer(a))) + var isPK int32 = int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) + if bPkOnly != 0 && isPK == 0 { + continue + } + + // It is not possible for eType to be SQLITE_NULL here. The session + // module does not record changes for rows with NULL values stored in + // primary key columns. + + if isPK != 0 { + a++ + h = sessionHashAppendType(tls, h, eType) + if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + h = sessionHashAppendI64(tls, h, sessionGetI64(tls, a)) + a += uintptr(8) + } else { + // var n int32 at bp, 4 + + a += uintptr(sessionVarintGet(tls, a, bp)) + h = sessionHashAppendBlob(tls, h, *(*int32)(unsafe.Pointer(bp /* n */)), a) + a += uintptr(*(*int32)(unsafe.Pointer(bp /* n */))) + } + } else { + a += uintptr(sessionSerialLen(tls, a)) + } + } + return h % uint32(nBucket) +} + +// Arguments aLeft and aRight are pointers to change records for table pTab. +// This function returns true if the two records apply to the same row (i.e. +// have the same values stored in the primary key columns), or false +// otherwise. +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ + var a1 uintptr = aLeft // Cursor to iterate through aLeft + var a2 uintptr = aRight // Cursor to iterate through aRight + var iCol int32 // Used to iterate through table columns + + for iCol = 0; iCol < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; iCol++ { + if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(iCol))) != 0 { + var n1 int32 = sessionSerialLen(tls, a1) + var n2 int32 = sessionSerialLen(tls, a2) + + if n1 != n2 || libc.Xmemcmp(tls, a1, a2, uint64(n1)) != 0 { + return 0 + } + a1 += uintptr(n1) + a2 += uintptr(n2) + } else { + if bLeftPkOnly == 0 { + a1 += uintptr(sessionSerialLen(tls, a1)) + } + if bRightPkOnly == 0 { + a2 += uintptr(sessionSerialLen(tls, a2)) + } + } + } + + return 1 +} + +// Arguments aLeft and aRight both point to buffers containing change +// records with nCol columns. This function "merges" the two records into +// a single records which is written to the buffer at *paOut. *paOut is +// then set to point to one byte after the last byte written before +// returning. +// +// The merging of records is done as follows: For each column, if the +// aRight record contains a value for the column, copy the value from +// their. Otherwise, if aLeft contains a value, copy it. If neither +// record contains a value for a given column, then neither does the +// output record. +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ + var a1 uintptr = aLeft // Cursor used to iterate through aLeft + var a2 uintptr = aRight // Cursor used to iterate through aRight + var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor + var iCol int32 // Used to iterate from 0 to nCol + + for iCol = 0; iCol < nCol; iCol++ { + var n1 int32 = sessionSerialLen(tls, a1) + var n2 int32 = sessionSerialLen(tls, a2) + if *(*U8)(unsafe.Pointer(a2)) != 0 { + libc.Xmemcpy(tls, aOut, a2, uint64(n2)) + aOut += uintptr(n2) + } else { + libc.Xmemcpy(tls, aOut, a1, uint64(n1)) + aOut += uintptr(n1) + } + a1 += uintptr(n1) + a2 += uintptr(n2) + } + + *(*uintptr)(unsafe.Pointer(paOut)) = aOut +} + +// This is a helper function used by sessionMergeUpdate(). +// +// When this function is called, both *paOne and *paTwo point to a value +// within a change record. Before it returns, both have been advanced so +// as to point to the next value in the record. +// +// If, when this function is called, *paTwo points to a valid value (i.e. +// *paTwo[0] is not 0x00 - the "no value" placeholder), a copy of the *paTwo +// pointer is returned and *pnVal is set to the number of bytes in the +// serialized value. Otherwise, a copy of *paOne is returned and *pnVal +// set to the number of bytes in the value at *paOne. If *paOne points +// to the "no value" placeholder, *pnVal is set to 1. In other words: +// +// if( *paTwo is valid ) return *paTwo; +// return *paOne; +// +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ + var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) + var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) + var pRet uintptr = uintptr(0) + var n1 int32 + + if a2 != 0 { + var n2 int32 = sessionSerialLen(tls, a2) + if *(*U8)(unsafe.Pointer(a2)) != 0 { + *(*int32)(unsafe.Pointer(pnVal)) = n2 + pRet = a2 + } + *(*uintptr)(unsafe.Pointer(paTwo)) = a2 + uintptr(n2) + } + + n1 = sessionSerialLen(tls, a1) + if pRet == uintptr(0) { + *(*int32)(unsafe.Pointer(pnVal)) = n1 + pRet = a1 + } + *(*uintptr)(unsafe.Pointer(paOne)) = a1 + uintptr(n1) + + return pRet +} + +// This function is used by changeset_concat() to merge two UPDATE changes +// on the same row. +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + *(*uintptr)(unsafe.Pointer(bp /* aOld1 */)) = aOldRecord1 + *(*uintptr)(unsafe.Pointer(bp + 8 /* aOld2 */)) = aOldRecord2 + *(*uintptr)(unsafe.Pointer(bp + 24 /* aNew1 */)) = aNewRecord1 + *(*uintptr)(unsafe.Pointer(bp + 32 /* aNew2 */)) = aNewRecord2 + + var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) + var i int32 + + if bPatchset == 0 { + var bRequired int32 = 0 + + // Write the old.* vector first. + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { + // var nOld int32 at bp+16, 4 + + var aOld uintptr + // var nNew int32 at bp+40, 4 + + var aNew uintptr + + aOld = sessionMergeValue(tls, bp, bp+8, bp+16) + aNew = sessionMergeValue(tls, bp+24, bp+32, bp+40) + if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0 || *(*int32)(unsafe.Pointer(bp + 16)) != *(*int32)(unsafe.Pointer(bp + 40)) || libc.Xmemcmp(tls, aOld, aNew, uint64(*(*int32)(unsafe.Pointer(bp + 40)))) != 0 { + if int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) == 0 { + bRequired = 1 + } + libc.Xmemcpy(tls, aOut, aOld, uint64(*(*int32)(unsafe.Pointer(bp + 16 /* nOld */)))) + aOut += uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* nOld */))) + } else { + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aOut, 1))) = U8(0) + } + } + + if !(bRequired != 0) { + return 0 + } + } + + // Write the new.* vector + *(*uintptr)(unsafe.Pointer(bp /* aOld1 */)) = aOldRecord1 + *(*uintptr)(unsafe.Pointer(bp + 8 /* aOld2 */)) = aOldRecord2 + *(*uintptr)(unsafe.Pointer(bp + 24 /* aNew1 */)) = aNewRecord1 + *(*uintptr)(unsafe.Pointer(bp + 32 /* aNew2 */)) = aNewRecord2 + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { + // var nOld int32 at bp+44, 4 + + var aOld uintptr + // var nNew int32 at bp+48, 4 + + var aNew uintptr + + aOld = sessionMergeValue(tls, bp, bp+8, bp+44) + aNew = sessionMergeValue(tls, bp+24, bp+32, bp+48) + if bPatchset == 0 && + (*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0 || *(*int32)(unsafe.Pointer(bp + 44)) == *(*int32)(unsafe.Pointer(bp + 48)) && 0 == libc.Xmemcmp(tls, aOld, aNew, uint64(*(*int32)(unsafe.Pointer(bp + 48))))) { + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aOut, 1))) = U8(0) + } else { + libc.Xmemcpy(tls, aOut, aNew, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* nNew */)))) + aOut += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* nNew */))) + } + } + + *(*uintptr)(unsafe.Pointer(paOut)) = aOut + return 1 +} + +// This function is only called from within a pre-update-hook callback. +// It determines if the current pre-update-hook change affects the same row +// as the change stored in argument pChange. If so, it returns true. Otherwise +// if the pre-update-hook does not affect the same row as pChange, it returns +// false. +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + var iCol int32 // Used to iterate through columns + var a uintptr = (*SessionChange)(unsafe.Pointer(pChange)).FaRecord // Cursor used to scan change record + + for iCol = 0; iCol < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; iCol++ { + if !(int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(iCol)))) != 0) { + a += uintptr(sessionSerialLen(tls, a)) + } else { + // var pVal uintptr at bp, 8 + // Value returned by preupdate_new/old + var rc int32 + _ = rc // Error code from preupdate_new/old + var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1)))) // Type of value from change record + + // The following calls to preupdate_new() and preupdate_old() can not + // fail. This is because they cache their return values, and by the + // time control flows to here they have already been called once from + // within sessionPreupdateHash(). The first two asserts below verify + // this (that the method has already been called). + if op == SQLITE_INSERT { + // assert( db->pPreUpdate->pNewUnpacked || db->pPreUpdate->aNew ); + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, iCol, bp /* &pVal */) + } else { + // assert( db->pPreUpdate->pUnpacked ); + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, iCol, bp /* &pVal */) + } + + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp))) != eType { + return 0 + } + + // A SessionChange object never has a NULL value in a PK column + + if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + *(*I64)(unsafe.Pointer(bp + 16 /* iVal */)) = sessionGetI64(tls, a) + a += uintptr(8) + if eType == SQLITE_INTEGER { + if Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(bp))) != *(*I64)(unsafe.Pointer(bp + 16)) { + return 0 + } + } else { + // var rVal float64 at bp+8, 8 + + libc.Xmemcpy(tls, bp+8, bp+16, uint64(8)) + if Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp))) != *(*float64)(unsafe.Pointer(bp + 8)) { + return 0 + } + } + } else { + // var n int32 at bp+24, 4 + + var z uintptr + a += uintptr(sessionVarintGet(tls, a, bp+24)) + if Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(bp))) != *(*int32)(unsafe.Pointer(bp + 24)) { + return 0 + } + if eType == SQLITE_TEXT { + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + } else { + z = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + } + if *(*int32)(unsafe.Pointer(bp + 24)) > 0 && libc.Xmemcmp(tls, a, z, uint64(*(*int32)(unsafe.Pointer(bp + 24)))) != 0 { + return 0 + } + a += uintptr(*(*int32)(unsafe.Pointer(bp + 24 /* n */))) + } + } + } + + return 1 +} + +// If required, grow the hash table used to store changes on table pTab +// (part of the session pSession). If a fatal OOM error occurs, set the +// session object to failed and return SQLITE_ERROR. Otherwise, return +// SQLITE_OK. +// +// It is possible that a non-fatal OOM error occurs in this function. In +// that case the hash-table does not grow, but SQLITE_OK is returned anyway. +// Growing the hash table in this case is a performance optimization only, +// it is not required for correct operation. +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ + if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { + var i int32 + var apNew uintptr + var nNew Sqlite3_int64 = int64(2) * func() int64 { + if (*SessionTable)(unsafe.Pointer(pTab)).FnChange != 0 { + return int64((*SessionTable)(unsafe.Pointer(pTab)).FnChange) + } + return int64(128) + }() + + apNew = sessionMalloc64(tls, + pSession, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nNew))) + if apNew == uintptr(0) { + if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 { + return SQLITE_ERROR + } + return SQLITE_OK + } + libc.Xmemset(tls, apNew, 0, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nNew))) + + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange; i++ { + var p uintptr + var pNext uintptr + for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); p != 0; p = pNext { + var bPkOnly int32 = libc.Bool32(int32((*SessionChange)(unsafe.Pointer(p)).Fop) == SQLITE_DELETE && bPatchset != 0) + var iHash int32 = int32(sessionChangeHash(tls, pTab, bPkOnly, (*SessionChange)(unsafe.Pointer(p)).FaRecord, int32(nNew))) + pNext = (*SessionChange)(unsafe.Pointer(p)).FpNext + (*SessionChange)(unsafe.Pointer(p)).FpNext = *(*uintptr)(unsafe.Pointer(apNew + uintptr(iHash)*8)) + *(*uintptr)(unsafe.Pointer(apNew + uintptr(iHash)*8)) = p + } + } + + sessionFree(tls, pSession, (*SessionTable)(unsafe.Pointer(pTab)).FapChange) + (*SessionTable)(unsafe.Pointer(pTab)).FnChange = int32(nNew) + (*SessionTable)(unsafe.Pointer(pTab)).FapChange = apNew + } + + return SQLITE_OK +} + +// This function queries the database for the names of the columns of table +// zThis, in schema zDb. +// +// Otherwise, if they are not NULL, variable *pnCol is set to the number +// of columns in the database table and variable *pzTab is set to point to a +// nul-terminated copy of the table name. *pazCol (if not NULL) is set to +// point to an array of pointers to column names. And *pabPK (again, if not +// NULL) is set to point to an array of booleans - true if the corresponding +// column is part of the primary key. +// +// For example, if the table is declared as: +// +// CREATE TABLE tbl1(w, x, y, z, PRIMARY KEY(w, z)); +// +// Then the four output variables are populated as follows: +// +// *pnCol = 4 +// *pzTab = "tbl1" +// *pazCol = {"w", "x", "y", "z"} +// *pabPK = {1, 0, 0, 1} +// +// All returned buffers are part of the same single allocation, which must +// be freed using sqlite3_free() by the caller +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var zPragma uintptr + // var pStmt uintptr at bp+16, 8 + + var rc int32 + var nByte Sqlite3_int64 + var nDbCol int32 = 0 + var nThis int32 + var i int32 + var pAlloc uintptr = uintptr(0) + var azCol uintptr = uintptr(0) + var abPK uintptr = uintptr(0) + + nThis = Xsqlite3Strlen30(tls, zThis) + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11224, zThis) { + rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + if rc == SQLITE_OK { + // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. + zPragma = Xsqlite3_mprintf(tls, + + ts+32160, 0) + } else if rc == SQLITE_ERROR { + zPragma = Xsqlite3_mprintf(tls, ts+1525, 0) + } else { + *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(pabPK)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnCol)) = 0 + if pzTab != 0 { + *(*uintptr)(unsafe.Pointer(pzTab)) = uintptr(0) + } + return rc + } + } else { + zPragma = Xsqlite3_mprintf(tls, ts+32281, libc.VaList(bp, zDb, zThis)) + } + if !(zPragma != 0) { + *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(pabPK)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnCol)) = 0 + if pzTab != 0 { + *(*uintptr)(unsafe.Pointer(pzTab)) = uintptr(0) + } + return SQLITE_NOMEM + } + + rc = Xsqlite3_prepare_v2(tls, db, zPragma, -1, bp+16, uintptr(0)) + Xsqlite3_free(tls, zPragma) + if rc != SQLITE_OK { + *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(pabPK)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnCol)) = 0 + if pzTab != 0 { + *(*uintptr)(unsafe.Pointer(pzTab)) = uintptr(0) + } + return rc + } + + nByte = Sqlite3_int64(nThis + 1) + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) { + nByte = nByte + Sqlite3_int64(Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), 1)) + nDbCol++ + } + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + + if rc == SQLITE_OK { + nByte = Sqlite3_int64(uint64(nByte) + uint64(uint64(nDbCol)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(unsafe.Sizeof(U8(0)))+uint64(1)))) + pAlloc = sessionMalloc64(tls, pSession, nByte) + if pAlloc == uintptr(0) { + rc = SQLITE_NOMEM + } + } + if rc == SQLITE_OK { + azCol = pAlloc + pAlloc = azCol + uintptr(nDbCol)*8 + abPK = pAlloc + pAlloc = abPK + uintptr(nDbCol) + if pzTab != 0 { + libc.Xmemcpy(tls, pAlloc, zThis, uint64(nThis+1)) + *(*uintptr)(unsafe.Pointer(pzTab)) = pAlloc + pAlloc += uintptr(nThis + 1) + } + + i = 0 + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) { + var nName int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + if zName == uintptr(0) { + break + } + libc.Xmemcpy(tls, pAlloc, zName, uint64(nName+1)) + *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)) = pAlloc + pAlloc += uintptr(nName + 1) + *(*U8)(unsafe.Pointer(abPK + uintptr(i))) = U8(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 5)) + i++ + } + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + + } + + // If successful, populate the output variables. Otherwise, zero them and + // free any allocation made. An error code will be returned in this case. + if rc == SQLITE_OK { + *(*uintptr)(unsafe.Pointer(pazCol)) = azCol + *(*uintptr)(unsafe.Pointer(pabPK)) = abPK + *(*int32)(unsafe.Pointer(pnCol)) = nDbCol + } else { + *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(pabPK)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnCol)) = 0 + if pzTab != 0 { + *(*uintptr)(unsafe.Pointer(pzTab)) = uintptr(0) + } + sessionFree(tls, pSession, azCol) + } + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + return rc +} + +// This function is only called from within a pre-update handler for a +// write to table pTab, part of session pSession. If this is the first +// write to this table, initalize the SessionTable.nCol, azCol[] and +// abPK[] arrays accordingly. +// +// If an error occurs, an error code is stored in sqlite3_session.rc and +// non-zero returned. Or, if no error occurs but the table has no primary +// key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to +// indicate that updates on this table should be ignored. SessionTable.abPK +// is set to NULL in this case. +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*SessionTable)(unsafe.Pointer(pTab)).FnCol == 0 { + // var abPK uintptr at bp, 8 + + (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = sessionTableInfo(tls, pSession, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, + (*SessionTable)(unsafe.Pointer(pTab)).FzName, pTab+16, uintptr(0), pTab+24, bp) + if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc == SQLITE_OK { + var i int32 + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { + if *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(i))) != 0 { + (*SessionTable)(unsafe.Pointer(pTab)).FabPK = *(*uintptr)(unsafe.Pointer(bp /* abPK */)) + break + } + } + if 0 == Xsqlite3_stricmp(tls, ts+11224, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 + } + + if (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize != 0 { + *(*I64)(unsafe.Pointer(pSession + 64)) += I64(uint64(Size_t(1+sessionVarintLen(tls, (*SessionTable)(unsafe.Pointer(pTab)).FnCol)+(*SessionTable)(unsafe.Pointer(pTab)).FnCol) + libc.Xstrlen(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName) + uint64(1))) + } + } + } + return libc.Bool32((*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 || (*SessionTable)(unsafe.Pointer(pTab)).FabPK == uintptr(0)) +} + +// Versions of the four methods in object SessionHook for use with the +// sqlite_stat1 table. The purpose of this is to substitute a zero-length +// blob each time a NULL value is read from the "idx" column of the +// sqlite_stat1 table. +type SessionStat1Ctx1 = struct { + Fhook SessionHook + FpSession uintptr +} /* sqlite3.c:211456:9 */ + +// Versions of the four methods in object SessionHook for use with the +// sqlite_stat1 table. The purpose of this is to substitute a zero-length +// blob each time a NULL value is read from the "idx" column of the +// sqlite_stat1 table. +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ + +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr = pCtx + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0) + var rc int32 = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxOld})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx, iCol, bp /* &pVal */) + if rc == SQLITE_OK && iCol == 1 && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_NULL { + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = (*Sqlite3_session)(unsafe.Pointer((*SessionStat1Ctx)(unsafe.Pointer(p)).FpSession)).FpZeroBlob + } + *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp /* pVal */)) + return rc +} + +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr = pCtx + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0) + var rc int32 = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxNew})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx, iCol, bp /* &pVal */) + if rc == SQLITE_OK && iCol == 1 && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_NULL { + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = (*Sqlite3_session)(unsafe.Pointer((*SessionStat1Ctx)(unsafe.Pointer(p)).FpSession)).FpZeroBlob + } + *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp /* pVal */)) + return rc +} + +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ + var p uintptr = pCtx + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) +} + +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ + var p uintptr = pCtx + return (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) +} + +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ + bp := tls.Alloc(44) + defer tls.Free(44) + + *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) = int64(2) + if int32((*SessionChange)(unsafe.Pointer(pC)).Fop) == SQLITE_INSERT { + if op != SQLITE_DELETE { + var ii int32 + for ii = 0; ii < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; ii++ { + *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, ii, bp /* &p */) + sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* p */)), bp+8 /* &nNew */) + } + } + } else if op == SQLITE_DELETE { + *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += I64((*SessionChange)(unsafe.Pointer(pC)).FnRecord) + if Xsqlite3_preupdate_blobwrite(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb) >= 0 { + *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += I64((*SessionChange)(unsafe.Pointer(pC)).FnRecord) + } + } else { + var ii int32 + var pCsr uintptr = (*SessionChange)(unsafe.Pointer(pC)).FaRecord + for ii = 0; ii < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; ii++ { + var bChanged int32 = 1 + var nOld int32 = 0 + var eType int32 + *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)) = uintptr(0) + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, ii, bp+16 /* &p */) + if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) { + return SQLITE_NOMEM + } + + eType = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pCsr, 1)))) + switch eType { + case SQLITE_NULL: + bChanged = libc.Bool32(Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) != SQLITE_NULL) + break + fallthrough + + case SQLITE_FLOAT: + fallthrough + case SQLITE_INTEGER: + { + if eType == Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) { + *(*Sqlite3_int64)(unsafe.Pointer(bp + 32 /* iVal */)) = sessionGetI64(tls, pCsr) + if eType == SQLITE_INTEGER { + bChanged = libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 32)) != Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))) + } else { + // var dVal float64 at bp+24, 8 + + libc.Xmemcpy(tls, bp+24, bp+32, uint64(8)) + bChanged = libc.Bool32(*(*float64)(unsafe.Pointer(bp + 24)) != Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))) + } + } + nOld = 8 + pCsr += uintptr(8) + break + + } + fallthrough + + default: + { + // var nByte int32 at bp+40, 4 + + nOld = sessionVarintGet(tls, pCsr, bp+40) + pCsr += uintptr(nOld) + nOld = nOld + *(*int32)(unsafe.Pointer(bp + 40)) + + if eType == Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) && + *(*int32)(unsafe.Pointer(bp + 40)) == Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) && + (*(*int32)(unsafe.Pointer(bp + 40)) == 0 || 0 == libc.Xmemcmp(tls, pCsr, Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 16))), uint64(*(*int32)(unsafe.Pointer(bp + 40))))) { + bChanged = 0 + } + pCsr += uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* nByte */))) + break + + } + } + + if bChanged != 0 && *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(ii))) != 0 { + *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) = I64((*SessionChange)(unsafe.Pointer(pC)).FnRecord + 2) + break + } + + if bChanged != 0 { + *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += I64(1 + nOld) + sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)), bp+8) + } else if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(ii))) != 0 { + *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += I64(2 + nOld) + } else { + *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += int64(2) + } + } + } + + if *(*I64)(unsafe.Pointer(bp + 8)) > I64((*SessionChange)(unsafe.Pointer(pC)).FnMaxSize) { + var nIncr int32 = int32(*(*I64)(unsafe.Pointer(bp + 8)) - I64((*SessionChange)(unsafe.Pointer(pC)).FnMaxSize)) + (*SessionChange)(unsafe.Pointer(pC)).FnMaxSize = int32(*(*I64)(unsafe.Pointer(bp + 8 /* nNew */))) + *(*I64)(unsafe.Pointer(pSession + 64)) += I64(nIncr) + } + return SQLITE_OK +} + +// This function is only called from with a pre-update-hook reporting a +// change on table pTab (attached to session pSession). The type of change +// (UPDATE, INSERT, DELETE) is specified by the first argument. +// +// Unless one is already present or an error occurs, an entry is added +// to the changed-rows hash table associated with table pTab. +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + // var iHash int32 at bp+48, 4 + + // var bNull int32 at bp+52, 4 + + var rc int32 + // var stat1 SessionStat1Ctx at bp, 48 + + var p uintptr + // var p1 uintptr at bp+56, 8 + + // var p2 uintptr at bp+72, 8 + + // Create a new change object containing all the old values (if + // this is an SQLITE_UPDATE or SQLITE_DELETE), or just the PK + // values (if this is an INSERT). + // var nByte Sqlite3_int64 at bp+64, 8 + // Number of bytes to allocate + var i int32 + // Search the hash table for an existing record for this row. + var pC uintptr + *(*int32)(unsafe.Pointer(bp + 52 /* bNull */)) = 0 + rc = SQLITE_OK + *(*SessionStat1Ctx)(unsafe.Pointer(bp /* stat1 */)) = SessionStat1Ctx{} + + if !((*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0) { + goto __1 + } + return +__1: + ; + + // Load table details if required + if !(sessionInitTable(tls, pSession, pTab) != 0) { + goto __2 + } + return +__2: + ; + + // Check the number of columns in this xPreUpdate call matches the + // number of columns in the table. + if !((*SessionTable)(unsafe.Pointer(pTab)).FnCol != (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx)) { + goto __3 + } + (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = SQLITE_SCHEMA + return +__3: + ; + + // Grow the hash table if required + if !(sessionGrowHash(tls, pSession, 0, pTab) != 0) { + goto __4 + } + (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = SQLITE_NOMEM + return +__4: + ; + + if !((*SessionTable)(unsafe.Pointer(pTab)).FbStat1 != 0) { + goto __5 + } + (*SessionStat1Ctx)(unsafe.Pointer(bp /* &stat1 */)).Fhook = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook + (*SessionStat1Ctx)(unsafe.Pointer(bp /* &stat1 */)).FpSession = pSession + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = bp /* &stat1 */ + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{sessionStat1New})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{sessionStat1Old})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{sessionStat1Count})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{sessionStat1Depth})) + if !((*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob == uintptr(0)) { + goto __6 + } + p = Xsqlite3ValueNew(tls, uintptr(0)) + if !(p == uintptr(0)) { + goto __7 + } + rc = SQLITE_NOMEM + goto error_out +__7: + ; + Xsqlite3ValueSetStr(tls, p, 0, ts+1525, uint8(0), uintptr(0)) + (*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob = p +__6: + ; +__5: + ; + + // Calculate the hash-key for this change. If the primary key of the row + // includes a NULL value, exit early. Such changes are ignored by the + // session module. + rc = sessionPreupdateHash(tls, pSession, pTab, libc.Bool32(op == SQLITE_INSERT), bp+48, bp+52) + if !(rc != SQLITE_OK) { + goto __8 + } + goto error_out +__8: + ; + + if !(*(*int32)(unsafe.Pointer(bp + 52)) == 0) { + goto __9 + } + pC = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* iHash */)))*8)) +__10: + if !(pC != 0) { + goto __12 + } + if !(sessionPreupdateEqual(tls, pSession, pTab, pC, op) != 0) { + goto __13 + } + goto __12 +__13: + ; + goto __11 +__11: + pC = (*SessionChange)(unsafe.Pointer(pC)).FpNext + goto __10 + goto __12 +__12: + ; + + if !(pC == uintptr(0)) { + goto __14 + } // Used to iterate through columns + + (*SessionTable)(unsafe.Pointer(pTab)).FnEntry++ + + // Figure out how large an allocation is required + *(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */)) = Sqlite3_int64(unsafe.Sizeof(SessionChange{})) + i = 0 +__16: + if !(i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol) { + goto __18 + } + *(*uintptr)(unsafe.Pointer(bp + 56 /* p1 */)) = uintptr(0) + if !(op != SQLITE_INSERT) { + goto __19 + } + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+56 /* &p1 */) + + goto __20 +__19: + if !(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0) { + goto __21 + } + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+56 /* &p1 */) + +__21: + ; +__20: + ; + + // This may fail if SQLite value p contains a utf-16 string that must + // be converted to utf-8 and an OOM error occurs while doing so. + rc = sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 56 /* p1 */)), bp+64) + if !(rc != SQLITE_OK) { + goto __22 + } + goto error_out +__22: + ; + goto __17 +__17: + i++ + goto __16 + goto __18 +__18: + ; + + // Allocate the change object + pC = sessionMalloc64(tls, pSession, *(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */))) + if !!(pC != 0) { + goto __23 + } + rc = SQLITE_NOMEM + goto error_out + goto __24 +__23: + libc.Xmemset(tls, pC, 0, uint64(unsafe.Sizeof(SessionChange{}))) + (*SessionChange)(unsafe.Pointer(pC)).FaRecord = pC + 1*32 +__24: + ; + + // Populate the change object. None of the preupdate_old(), + // preupdate_new() or SerializeValue() calls below may fail as all + // required values and encodings have already been cached in memory. + // It is not possible for an OOM to occur in this block. + *(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */)) = int64(0) + i = 0 +__25: + if !(i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol) { + goto __27 + } + *(*uintptr)(unsafe.Pointer(bp + 72 /* p2 */)) = uintptr(0) + if !(op != SQLITE_INSERT) { + goto __28 + } + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+72 /* &p2 */) + goto __29 +__28: + if !(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0) { + goto __30 + } + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+72 /* &p2 */) +__30: + ; +__29: + ; + sessionSerializeValue(tls, (*SessionChange)(unsafe.Pointer(pC)).FaRecord+uintptr(*(*Sqlite3_int64)(unsafe.Pointer(bp + 64))), *(*uintptr)(unsafe.Pointer(bp + 72 /* p2 */)), bp+64) + goto __26 +__26: + i++ + goto __25 + goto __27 +__27: + ; + + // Add the change to the hash-table + if !((*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect != 0 || (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx) != 0) { + goto __31 + } + (*SessionChange)(unsafe.Pointer(pC)).FbIndirect = U8(1) +__31: + ; + (*SessionChange)(unsafe.Pointer(pC)).FnRecord = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */))) + (*SessionChange)(unsafe.Pointer(pC)).Fop = U8(op) + (*SessionChange)(unsafe.Pointer(pC)).FpNext = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* iHash */)))*8)) + *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* iHash */)))*8)) = pC + + goto __15 +__14: + if !((*SessionChange)(unsafe.Pointer(pC)).FbIndirect != 0) { + goto __32 + } + // If the existing change is considered "indirect", but this current + // change is "direct", mark the change object as direct. + if !((*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx) == 0 && + (*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect == 0) { + goto __33 + } + (*SessionChange)(unsafe.Pointer(pC)).FbIndirect = U8(0) +__33: + ; +__32: + ; +__15: + ; + + if !((*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize != 0) { + goto __34 + } + rc = sessionUpdateMaxSize(tls, op, pSession, pTab, pC) +__34: + ; +__9: + ; + + // If an error has occurred, mark the session object as failed. +error_out: + if !((*SessionTable)(unsafe.Pointer(pTab)).FbStat1 != 0) { + goto __35 + } + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook = (*SessionStat1Ctx)(unsafe.Pointer(bp /* &stat1 */)).Fhook +__35: + ; + if !(rc != SQLITE_OK) { + goto __36 + } + (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = rc +__36: +} + +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ + var rc int32 = SQLITE_OK + var nName int32 = Xsqlite3Strlen30(tls, zName) + var pRet uintptr + + // Search for an existing table + for pRet = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; pRet != 0; pRet = (*SessionTable)(unsafe.Pointer(pRet)).FpNext { + if 0 == Xsqlite3_strnicmp(tls, (*SessionTable)(unsafe.Pointer(pRet)).FzName, zName, nName+1) { + break + } + } + + if pRet == uintptr(0) && (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach != 0 { + // If there is a table-filter configured, invoke it. If it returns 0, + // do not automatically add the new table. + if (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter == uintptr(0) || + (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx, zName) != 0 { + rc = Xsqlite3session_attach(tls, pSession, zName) + if rc == SQLITE_OK { + pRet = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable + for pRet != 0 && (*SessionTable)(unsafe.Pointer(pRet)).FpNext != 0 { + pRet = (*SessionTable)(unsafe.Pointer(pRet)).FpNext + } + + } + } + } + + *(*uintptr)(unsafe.Pointer(ppTab)) = pRet + return rc +} + +// The 'pre-update' hook registered by this module with SQLite databases. +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pSession uintptr + var nDb int32 = Xsqlite3Strlen30(tls, zDb) + + for pSession = pCtx; pSession != 0; pSession = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpNext { + // var pTab uintptr at bp, 8 + + // If this session is attached to a different database ("main", "temp" + // etc.), or if it is not currently enabled, there is nothing to do. Skip + // to the next session object attached to this database. + if (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnable == 0 { + continue + } + if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { + continue + } + if Xsqlite3_strnicmp(tls, zDb, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, nDb+1) != 0 { + continue + } + + (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = sessionFindTable(tls, pSession, zName, bp) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + + sessionPreupdateOneChange(tls, op, pSession, *(*uintptr)(unsafe.Pointer(bp /* pTab */))) + if op == SQLITE_UPDATE { + sessionPreupdateOneChange(tls, SQLITE_INSERT, pSession, *(*uintptr)(unsafe.Pointer(bp /* pTab */))) + } + } + } +} + +// The pre-update hook implementations. +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ + return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) +} + +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ + return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) +} + +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ + return Xsqlite3_preupdate_count(tls, pCtx) +} + +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ + return Xsqlite3_preupdate_depth(tls, pCtx) +} + +// Install the pre-update hooks on the session object passed as the only +// argument. +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{sessionPreupdateOld})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{sessionPreupdateNew})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{sessionPreupdateCount})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{sessionPreupdateDepth})) +} + +type SessionDiffCtx1 = struct { + FpStmt uintptr + FnOldOff int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:211850:9 */ + +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ + +// The diff hook implementations. +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ + var p uintptr = pCtx + *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) + return SQLITE_OK +} + +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ + var p uintptr = pCtx + *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) + return SQLITE_OK +} + +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ + var p uintptr = pCtx + if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { + return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff + } + return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) +} + +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ + return 0 +} + +// Install the diff hooks on the session object passed as the only +// argument. +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{sessionDiffOld})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{sessionDiffNew})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{sessionDiffCount})) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{sessionDiffDepth})) +} + +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + var zSep uintptr = ts + 1525 /* "" */ + var zRet uintptr = uintptr(0) + + for i = 0; i < nCol; i++ { + if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + zRet = Xsqlite3_mprintf(tls, ts+32310, + libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) + zSep = ts + 21372 /* " AND " */ + if zRet == uintptr(0) { + break + } + } + } + + return zRet +} + +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + var zSep uintptr = ts + 1525 /* "" */ + var zRet uintptr = uintptr(0) + var bHave int32 = 0 + + for i = 0; i < nCol; i++ { + if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { + bHave = 1 + zRet = Xsqlite3_mprintf(tls, + ts+32344, + libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) + zSep = ts + 32385 /* " OR " */ + if zRet == uintptr(0) { + break + } + } + } + + if bHave == 0 { + + zRet = Xsqlite3_mprintf(tls, ts+7408, 0) + } + + return zRet +} + +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var zRet uintptr = Xsqlite3_mprintf(tls, + + ts+32390, + libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) + return zRet +} + +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var zStmt uintptr = sessionSelectFindNew(tls, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, zDb1, zDb2, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr) + + if zStmt == uintptr(0) { + rc = SQLITE_NOMEM + } else { + // var pStmt uintptr at bp, 8 + + rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp, uintptr(0)) + if rc == SQLITE_OK { + var pDiffCtx uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx + (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FpStmt = *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) + (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FnOldOff = 0 + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { + sessionPreupdateOneChange(tls, op, pSession, pTab) + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) + } + Xsqlite3_free(tls, zStmt) + } + + return rc +} + +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var rc int32 = SQLITE_OK + + var zExpr2 uintptr = sessionExprCompareOther(tls, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, + (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, (*SessionTable)(unsafe.Pointer(pTab)).FazCol, (*SessionTable)(unsafe.Pointer(pTab)).FabPK) + if zExpr2 == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var zStmt uintptr = Xsqlite3_mprintf(tls, + ts+32468, + libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) + if zStmt == uintptr(0) { + rc = SQLITE_NOMEM + } else { + // var pStmt uintptr at bp+48, 8 + + rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp+48, uintptr(0)) + + if rc == SQLITE_OK { + var pDiffCtx uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx + (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */)) + (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FnOldOff = (*SessionTable)(unsafe.Pointer(pTab)).FnCol + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) { + sessionPreupdateOneChange(tls, SQLITE_UPDATE, pSession, pTab) + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */))) + } + Xsqlite3_free(tls, zStmt) + } + } + + return rc +} + +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var zDb uintptr + var rc int32 + // var d SessionDiffCtx at bp, 16 + + var i int32 + var bHasPk int32 + var bMismatch int32 + // var nCol int32 at bp+24, 4 + // Columns in zFrom.zTbl + // var abPK uintptr at bp+40, 8 + + // var azCol uintptr at bp+32, 8 + + var zExpr uintptr + var db uintptr + // var pTo uintptr at bp+16, 8 + zDb = (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb + rc = (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(SessionDiffCtx{}))) + sessionDiffHooks(tls, pSession, bp) + + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + if !(pzErrMsg != 0) { + goto __1 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0) +__1: + ; + if !(rc == SQLITE_OK) { + goto __2 + } + zExpr = uintptr(0) + db = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb // Table zTbl + + // Locate and if necessary initialize the target table object + rc = sessionFindTable(tls, pSession, zTbl, bp+16) + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0)) { + goto __3 + } + goto diff_out +__3: + ; + if !(sessionInitTable(tls, pSession, *(*uintptr)(unsafe.Pointer(bp + 16))) != 0) { + goto __4 + } + rc = (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc + goto diff_out +__4: + ; + + // Check the table schemas match + if !(rc == SQLITE_OK) { + goto __5 + } + bHasPk = 0 + bMismatch = 0 + *(*uintptr)(unsafe.Pointer(bp + 32 /* azCol */)) = uintptr(0) + rc = sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+24, uintptr(0), bp+32, bp+40) + if !(rc == SQLITE_OK) { + goto __6 + } + if !((*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FnCol != *(*int32)(unsafe.Pointer(bp + 24))) { + goto __7 + } + bMismatch = 1 + goto __8 +__7: + i = 0 +__9: + if !(i < *(*int32)(unsafe.Pointer(bp + 24))) { + goto __11 + } + if !(int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FabPK + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i))))) { + goto __12 + } + bMismatch = 1 +__12: + ; + if !(Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FazCol + uintptr(i)*8))) != 0) { + goto __13 + } + bMismatch = 1 +__13: + ; + if !(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i))) != 0) { + goto __14 + } + bHasPk = 1 +__14: + ; + goto __10 +__10: + i++ + goto __9 + goto __11 +__11: + ; +__8: + ; +__6: + ; + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* azCol */))) + if !(bMismatch != 0) { + goto __15 + } + if !(pzErrMsg != 0) { + goto __16 + } + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32521, 0) +__16: + ; + rc = SQLITE_SCHEMA +__15: + ; + if !(bHasPk == 0) { + goto __17 + } + // Ignore tables with no primary keys + goto diff_out +__17: + ; +__5: + ; + + if !(rc == SQLITE_OK) { + goto __18 + } + zExpr = sessionExprComparePK(tls, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FnCol, + zDb, zFrom, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FzName, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FazCol, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FabPK) +__18: + ; + + // Find new rows + if !(rc == SQLITE_OK) { + goto __19 + } + rc = sessionDiffFindNew(tls, SQLITE_INSERT, pSession, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)), zDb, zFrom, zExpr) +__19: + ; + + // Find old rows + if !(rc == SQLITE_OK) { + goto __20 + } + rc = sessionDiffFindNew(tls, SQLITE_DELETE, pSession, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)), zFrom, zDb, zExpr) +__20: + ; + + // Find modified rows + if !(rc == SQLITE_OK) { + goto __21 + } + rc = sessionDiffFindModified(tls, pSession, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)), zFrom, zExpr) +__21: + ; + + Xsqlite3_free(tls, zExpr) +__2: + ; + +diff_out: + sessionPreupdateHooks(tls, pSession) + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + return rc +} + +// Create a session object. This session object will record changes to +// database zDb attached to connection db. +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ + var pNew uintptr // Newly allocated session object + var pOld uintptr // Session object already attached to db + var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes + + // Zero the output value in case an error occurs. + *(*uintptr)(unsafe.Pointer(ppSession)) = uintptr(0) + + // Allocate and populate the new session object. + pNew = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Sqlite3_session{}))+uint64(nDb)+uint64(1))) + if !(pNew != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Sqlite3_session{}))) + (*Sqlite3_session)(unsafe.Pointer(pNew)).Fdb = db + (*Sqlite3_session)(unsafe.Pointer(pNew)).FzDb = pNew + 1*136 + (*Sqlite3_session)(unsafe.Pointer(pNew)).FbEnable = 1 + libc.Xmemcpy(tls, (*Sqlite3_session)(unsafe.Pointer(pNew)).FzDb, zDb, uint64(nDb+1)) + sessionPreupdateHooks(tls, pNew) + + // Add the new session object to the linked list of session objects + // attached to database handle $db. Do this under the cover of the db + // handle mutex. + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) + pOld = Xsqlite3_preupdate_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64) + }{xPreUpdate})), pNew) + (*Sqlite3_session)(unsafe.Pointer(pNew)).FpNext = pOld + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) + + *(*uintptr)(unsafe.Pointer(ppSession)) = pNew + return SQLITE_OK +} + +// Free the list of table objects passed as the first argument. The contents +// of the changed-rows hash tables are also deleted. +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ + var pNext uintptr + var pTab uintptr + + for pTab = pList; pTab != 0; pTab = pNext { + var i int32 + pNext = (*SessionTable)(unsafe.Pointer(pTab)).FpNext + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange; i++ { + var p uintptr + var pNextChange uintptr + for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); p != 0; p = pNextChange { + pNextChange = (*SessionChange)(unsafe.Pointer(p)).FpNext + sessionFree(tls, pSession, p) + } + } + sessionFree(tls, pSession, (*SessionTable)(unsafe.Pointer(pTab)).FazCol) // cast works around VC++ bug + sessionFree(tls, pSession, (*SessionTable)(unsafe.Pointer(pTab)).FapChange) + sessionFree(tls, pSession, pTab) + } +} + +// Delete a session object previously allocated using sqlite3session_create(). +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var db uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb + // var pHead uintptr at bp, 8 + + var pp uintptr + + // Unlink the session from the linked list of sessions attached to the + // database handle. Hold the db mutex while doing so. + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) + *(*uintptr)(unsafe.Pointer(bp /* pHead */)) = Xsqlite3_preupdate_hook(tls, db, uintptr(0), uintptr(0)) + for pp = bp; /* &pHead */ *(*uintptr)(unsafe.Pointer(pp)) != uintptr(0); pp = *(*uintptr)(unsafe.Pointer(pp)) + 80 /* &.pNext */ { + if *(*uintptr)(unsafe.Pointer(pp)) == pSession { + *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3_session)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + Xsqlite3_preupdate_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64) + }{xPreUpdate})), *(*uintptr)(unsafe.Pointer(bp /* pHead */))) + } + break + } + } + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) + Xsqlite3ValueFree(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob) + + // Delete all attached table objects. And the contents of their + // associated hash-tables. + sessionDeleteTable(tls, pSession, (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable) + + // Assert that all allocations have been freed and then free the + // session object itself. + + Xsqlite3_free(tls, pSession) +} + +// Set a table filter on a Session Object. +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ + (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 + (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx + (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter +} + +// Attach a table to a session. All subsequent changes made to the table +// while the session object is enabled will be recorded. +// +// Only tables that have a PRIMARY KEY defined may be attached. It does +// not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) +// or not. +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ + var rc int32 = SQLITE_OK + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + + if !(zName != 0) { + (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 + } else { + var pTab uintptr // New table object (if required) + var nName int32 // Number of bytes in string zName + + // First search for an existing entry. If one is found, this call is + // a no-op. Return early. + nName = Xsqlite3Strlen30(tls, zName) + for pTab = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext { + if 0 == Xsqlite3_strnicmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zName, nName+1) { + break + } + } + + if !(pTab != 0) { + // Allocate new SessionTable object. + var nByte int32 = int32(uint64(unsafe.Sizeof(SessionTable{})) + uint64(nName) + uint64(1)) + pTab = sessionMalloc64(tls, pSession, int64(nByte)) + if !(pTab != 0) { + rc = SQLITE_NOMEM + } else { + // Populate the new SessionTable object and link it into the list. + // The new object must be linked onto the end of the list, not + // simply added to the start of it in order to ensure that tables + // appear in the correct order when a changeset or patchset is + // eventually generated. + var ppTab uintptr + libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(SessionTable{}))) + (*SessionTable)(unsafe.Pointer(pTab)).FzName = pTab + 1*56 + libc.Xmemcpy(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zName, uint64(nName+1)) + for ppTab = pSession + 88; *(*uintptr)(unsafe.Pointer(ppTab)) != 0; ppTab = *(*uintptr)(unsafe.Pointer(ppTab)) { + } + *(*uintptr)(unsafe.Pointer(ppTab)) = pTab + } + } + } + + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + return rc +} + +// Ensure that there is room in the buffer to append nByte bytes of data. +// If not, use sqlite3_realloc() to grow the buffer so that there is. +// +// If successful, return zero. Otherwise, if an OOM condition is encountered, +// set *pRc to SQLITE_NOMEM and return non-zero. +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ + var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { + var aNew uintptr + var nNew I64 + if (*SessionBuffer)(unsafe.Pointer(p)).FnAlloc != 0 { + nNew = int64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) + } else { + nNew = int64(128) + } + + for __ccgo := true; __ccgo; __ccgo = nNew < nReq { + nNew = nNew * int64(2) + } + + // The value of SESSION_MAX_BUFFER_SZ is copied from the implementation + // of sqlite3_realloc64(). Allocations greater than this size in bytes + // always fail. It is used here to ensure that this routine can always + // allocate up to this limit - instead of up to the largest power of + // two smaller than the limit. + if nNew > int64(0x7FFFFF00-1) { + nNew = int64(0x7FFFFF00 - 1) + if nNew < nReq { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + return 1 + } + } + + aNew = Xsqlite3_realloc64(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf, uint64(nNew)) + if uintptr(0) == aNew { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } else { + (*SessionBuffer)(unsafe.Pointer(p)).FaBuf = aNew + (*SessionBuffer)(unsafe.Pointer(p)).FnAlloc = int32(nNew) + } + } + return libc.Bool32(*(*int32)(unsafe.Pointer(pRc)) != SQLITE_OK) +} + +// Append the value passed as the second argument to the buffer passed +// as the first. +// +// This function is a no-op if *pRc is non-zero when it is called. +// Otherwise, if an error occurs, *pRc is set to an SQLite error code +// before returning. +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = *(*int32)(unsafe.Pointer(pRc)) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */)) = int64(0) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionSerializeValue(tls, uintptr(0), pVal, bp) + sessionBufferGrow(tls, p, *(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */)), bp+8) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionSerializeValue(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), pVal, uintptr(0)) + *(*int32)(unsafe.Pointer(p + 8)) += int32(*(*Sqlite3_int64)(unsafe.Pointer(bp))) + } else { + *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) + } + } +} + +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. Otherwise, append a single byte to the buffer. +// +// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before +// returning. +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ + if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { + *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v + } +} + +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. Otherwise, append a single varint to the buffer. +// +// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before +// returning. +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ + if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { + *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) + } +} + +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. Otherwise, append a blob of data to the buffer. +// +// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before +// returning. +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ + if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { + libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob)) + *(*int32)(unsafe.Pointer(p + 8)) += nBlob + } +} + +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. Otherwise, append a string to the buffer. All bytes in the string +// up to (but not including) the nul-terminator are written to the buffer. +// +// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before +// returning. +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ + var nStr int32 = Xsqlite3Strlen30(tls, zStr) + if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { + libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr)) + *(*int32)(unsafe.Pointer(p + 8)) += nStr + } +} + +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. Otherwise, append the string representation of integer iVal +// to the buffer. No nul-terminator is written. +// +// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before +// returning. +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + // var aBuf [24]uint8 at bp+8, 24 + + Xsqlite3_snprintf(tls, int32(uint64(unsafe.Sizeof([24]uint8{}))-uint64(1)), bp+8, ts+4917, libc.VaList(bp, iVal)) + sessionAppendStr(tls, p, bp+8, pRc) +} + +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. Otherwise, append the string zStr enclosed in quotes (") and +// with any embedded quote characters escaped to the buffer. No +// nul-terminator byte is written. +// +// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before +// returning. +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ + var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 + if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { + var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + var zIn uintptr = zStr + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8('"') + for *(*uint8)(unsafe.Pointer(zIn)) != 0 { + if int32(*(*uint8)(unsafe.Pointer(zIn))) == '"' { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8('"') + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))) + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8('"') + (*SessionBuffer)(unsafe.Pointer(p)).FnBuf = int32((int64(zOut) - int64((*SessionBuffer)(unsafe.Pointer(p)).FaBuf)) / 1) + } +} + +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. Otherwse, it appends the serialized version of the value stored +// in column iCol of the row that SQL statement pStmt currently points +// to to the buffer. +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var eType int32 = Xsqlite3_column_type(tls, pStmt, iCol) + sessionAppendByte(tls, p, U8(eType), pRc) + if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + // var i Sqlite3_int64 at bp, 8 + + // var aBuf [8]U8 at bp+16, 8 + + if eType == SQLITE_INTEGER { + *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */)) = Xsqlite3_column_int64(tls, pStmt, iCol) + } else { + *(*float64)(unsafe.Pointer(bp + 8 /* r */)) = Xsqlite3_column_double(tls, pStmt, iCol) + libc.Xmemcpy(tls, bp, bp+8, uint64(8)) + } + sessionPutI64(tls, bp+16, *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */))) + sessionAppendBlob(tls, p, bp+16, 8, pRc) + } + if eType == SQLITE_BLOB || eType == SQLITE_TEXT { + var z uintptr + var nByte int32 + if eType == SQLITE_BLOB { + z = Xsqlite3_column_blob(tls, pStmt, iCol) + } else { + z = Xsqlite3_column_text(tls, pStmt, iCol) + } + nByte = Xsqlite3_column_bytes(tls, pStmt, iCol) + if z != 0 || eType == SQLITE_BLOB && nByte == 0 { + sessionAppendVarint(tls, p, nByte, pRc) + sessionAppendBlob(tls, p, z, nByte, pRc) + } else { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } + } +} + +// +// This function appends an update change to the buffer (see the comments +// under "CHANGESET FORMAT" at the top of the file). An update change +// consists of: +// +// 1 byte: SQLITE_UPDATE (0x17) +// n bytes: old.* record (see RECORD FORMAT) +// m bytes: new.* record (see RECORD FORMAT) +// +// The SessionChange object passed as the third argument contains the +// values that were stored in the row when the session began (the old.* +// values). The statement handle passed as the second argument points +// at the current version of the row (the new.* values). +// +// If all of the old.* values are equal to their corresponding new.* value +// (i.e. nothing has changed), then no data at all is appended to the buffer. +// +// Otherwise, the old.* record contains all primary key values and the +// original values of any fields that have been modified. The new.* record +// contains the new values of only those fields that have been modified. +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + *(*SessionBuffer)(unsafe.Pointer(bp + 32 /* buf2 */)) = SessionBuffer{} // Buffer to accumulate new.* record in + var bNoop int32 = 1 // Set to zero if any values are modified + var nRewind int32 = (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf // Set to zero if any values are modified + var i int32 // Used to iterate through columns + var pCsr uintptr = (*SessionChange)(unsafe.Pointer(p)).FaRecord // Used to iterate through old.* values + + sessionAppendByte(tls, pBuf, uint8(SQLITE_UPDATE), bp) + sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp) + for i = 0; i < Xsqlite3_column_count(tls, pStmt); i++ { + var bChanged int32 = 0 + var nAdvance int32 + var eType int32 = int32(*(*U8)(unsafe.Pointer(pCsr))) + switch eType { + case SQLITE_NULL: + nAdvance = 1 + if Xsqlite3_column_type(tls, pStmt, i) != SQLITE_NULL { + bChanged = 1 + } + break + + case SQLITE_FLOAT: + fallthrough + case SQLITE_INTEGER: + { + nAdvance = 9 + if eType == Xsqlite3_column_type(tls, pStmt, i) { + *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* iVal */)) = sessionGetI64(tls, pCsr+1) + if eType == SQLITE_INTEGER { + if *(*Sqlite3_int64)(unsafe.Pointer(bp + 16)) == Xsqlite3_column_int64(tls, pStmt, i) { + break + } + } else { + // var dVal float64 at bp+8, 8 + + libc.Xmemcpy(tls, bp+8, bp+16, uint64(8)) + if *(*float64)(unsafe.Pointer(bp + 8)) == Xsqlite3_column_double(tls, pStmt, i) { + break + } + } + } + bChanged = 1 + break + + } + + default: + { + // var n int32 at bp+24, 4 + + var nHdr int32 = 1 + sessionVarintGet(tls, pCsr+1, bp+24) + + nAdvance = nHdr + *(*int32)(unsafe.Pointer(bp + 24)) + if eType == Xsqlite3_column_type(tls, pStmt, i) && + *(*int32)(unsafe.Pointer(bp + 24)) == Xsqlite3_column_bytes(tls, pStmt, i) && + (*(*int32)(unsafe.Pointer(bp + 24)) == 0 || 0 == libc.Xmemcmp(tls, pCsr+uintptr(nHdr), Xsqlite3_column_blob(tls, pStmt, i), uint64(*(*int32)(unsafe.Pointer(bp + 24))))) { + break + } + bChanged = 1 + + } + } + + // If at least one field has been modified, this is not a no-op. + if bChanged != 0 { + bNoop = 0 + } + + // Add a field to the old.* record. This is omitted if this modules is + // currently generating a patchset. + if bPatchset == 0 { + if bChanged != 0 || *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + sessionAppendBlob(tls, pBuf, pCsr, nAdvance, bp) + } else { + sessionAppendByte(tls, pBuf, uint8(0), bp) + } + } + + // Add a field to the new.* record. Or the only record if currently + // generating a patchset. + if bChanged != 0 || bPatchset != 0 && *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + sessionAppendCol(tls, bp+32, pStmt, i, bp) + } else { + sessionAppendByte(tls, bp+32, uint8(0), bp) + } + + pCsr += uintptr(nAdvance) + } + + if bNoop != 0 { + (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf = nRewind + } else { + sessionAppendBlob(tls, pBuf, (*SessionBuffer)(unsafe.Pointer(bp+32 /* &buf2 */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+32 /* &buf2 */)).FnBuf, bp) + } + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+32 /* &buf2 */)).FaBuf) + + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Append a DELETE change to the buffer passed as the first argument. Use +// the changeset format if argument bPatchset is zero, or the patchset +// format otherwise. +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + + sessionAppendByte(tls, pBuf, uint8(SQLITE_DELETE), bp) + sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp) + + if bPatchset == 0 { + sessionAppendBlob(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp) + } else { + var i int32 + var a uintptr = (*SessionChange)(unsafe.Pointer(p)).FaRecord + for i = 0; i < nCol; i++ { + var pStart uintptr = a + var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1)))) + + switch eType { + case 0: + fallthrough + case SQLITE_NULL: + + break + fallthrough + + case SQLITE_FLOAT: + fallthrough + case SQLITE_INTEGER: + a += uintptr(8) + break + fallthrough + + default: + { + // var n int32 at bp+4, 4 + + a += uintptr(sessionVarintGet(tls, a, bp+4)) + a += uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* n */))) + break + + } + } + if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + sessionAppendBlob(tls, pBuf, pStart, int32((int64(a)-int64(pStart))/1), bp) + } + } + + } + + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Formulate and prepare a SELECT statement to retrieve a row from table +// zTab in database zDb based on its primary key. i.e. +// +// SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK + var zSql uintptr = uintptr(0) + var nSql int32 = -1 + + if 0 == Xsqlite3_stricmp(tls, ts+11224, zTab) { + zSql = Xsqlite3_mprintf(tls, + + ts+32548, libc.VaList(bp, zDb)) + if zSql == uintptr(0) { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM + } + } else { + var i int32 + var zSep uintptr = ts + 1525 /* "" */ + *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} + + sessionAppendStr(tls, bp+8, ts+32658, bp+24) + sessionAppendIdent(tls, bp+8, zDb, bp+24) + sessionAppendStr(tls, bp+8, ts+1538, bp+24) + sessionAppendIdent(tls, bp+8, zTab, bp+24) + sessionAppendStr(tls, bp+8, ts+32673, bp+24) + for i = 0; i < nCol; i++ { + if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + sessionAppendStr(tls, bp+8, zSep, bp+24) + sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) + sessionAppendStr(tls, bp+8, ts+32681, bp+24) + sessionAppendInteger(tls, bp+8, i+1, bp+24) + zSep = ts + 21372 /* " AND " */ + } + } + zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf + nSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FnBuf + } + + if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_prepare_v2(tls, db, zSql, nSql, ppStmt, uintptr(0)) + } + Xsqlite3_free(tls, zSql) + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) +} + +// Bind the PRIMARY KEY values from the change passed in argument pChange +// to the SELECT statement passed as the first argument. The SELECT statement +// is as prepared by function sessionSelectStmt(). +// +// Return SQLITE_OK if all PK values are successfully bound, or an SQLite +// error code (e.g. SQLITE_NOMEM) otherwise. +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var i int32 + var rc int32 = SQLITE_OK + var a uintptr = (*SessionChange)(unsafe.Pointer(pChange)).FaRecord + + for i = 0; i < nCol && rc == SQLITE_OK; i++ { + var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1)))) + + switch eType { + case 0: + fallthrough + case SQLITE_NULL: + + break + + case SQLITE_INTEGER: + { + if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + var iVal I64 = sessionGetI64(tls, a) + rc = Xsqlite3_bind_int64(tls, pSelect, i+1, iVal) + } + a += uintptr(8) + break + + } + + case SQLITE_FLOAT: + { + if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + // var rVal float64 at bp, 8 + + *(*I64)(unsafe.Pointer(bp + 8 /* iVal */)) = sessionGetI64(tls, a) + libc.Xmemcpy(tls, bp, bp+8, uint64(8)) + rc = Xsqlite3_bind_double(tls, pSelect, i+1, *(*float64)(unsafe.Pointer(bp /* rVal */))) + } + a += uintptr(8) + break + + } + + case SQLITE_TEXT: + { + // var n int32 at bp+16, 4 + + a += uintptr(sessionVarintGet(tls, a, bp+16)) + if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + rc = Xsqlite3_bind_text(tls, pSelect, i+1, a, *(*int32)(unsafe.Pointer(bp + 16 /* n */)), libc.UintptrFromInt32(-1)) + } + a += uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* n */))) + break + + } + + default: + { + // var n int32 at bp+20, 4 + + a += uintptr(sessionVarintGet(tls, a, bp+20)) + if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + rc = Xsqlite3_bind_blob(tls, pSelect, i+1, a, *(*int32)(unsafe.Pointer(bp + 20 /* n */)), libc.UintptrFromInt32(-1)) + } + a += uintptr(*(*int32)(unsafe.Pointer(bp + 20 /* n */))) + break + + } + } + } + + return rc +} + +// This function is a no-op if *pRc is set to other than SQLITE_OK when it +// is called. Otherwise, append a serialized table header (part of the binary +// changeset format) to buffer *pBuf. If an error occurs, set *pRc to an +// SQLite error code before returning. +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ + // Write a table header + sessionAppendByte(tls, pBuf, func() uint8 { + if bPatchset != 0 { + return uint8('P') + } + return uint8('T') + }(), pRc) + sessionAppendVarint(tls, pBuf, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, pRc) + sessionAppendBlob(tls, pBuf, (*SessionTable)(unsafe.Pointer(pTab)).FabPK, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, pRc) + sessionAppendBlob(tls, pBuf, (*SessionTable)(unsafe.Pointer(pTab)).FzName, int32(libc.Xstrlen(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName))+1, pRc) +} + +// Generate either a changeset (if argument bPatchset is zero) or a patchset +// (if it is non-zero) based on the current contents of the session object +// passed as the first argument. +// +// If no error occurs, SQLITE_OK is returned and the new changeset/patchset +// stored in output variables *pnChangeset and *ppChangeset. Or, if an error +// occurs, an SQLite error code is returned and both output variables set +// to 0. +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var db uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb // Source database handle + var pTab uintptr // Used to iterate through attached tables + *(*SessionBuffer)(unsafe.Pointer(bp + 24 /* buf */)) = SessionBuffer{} // Buffer in which to accumlate changeset + // var rc int32 at bp+40, 4 + // Return code + + // Zero the output variables in case an error occurs. If this session + // object is already in the error state (sqlite3_session.rc != SQLITE_OK), + // this call will be a no-op. + if xOutput == uintptr(0) { + + *(*int32)(unsafe.Pointer(pnChangeset)) = 0 + *(*uintptr)(unsafe.Pointer(ppChangeset)) = uintptr(0) + } + + if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { + return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32687, uintptr(0), uintptr(0), uintptr(0)) + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) + + for pTab = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK && pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext { + if (*SessionTable)(unsafe.Pointer(pTab)).FnEntry != 0 { + var zName uintptr = (*SessionTable)(unsafe.Pointer(pTab)).FzName + *(*int32)(unsafe.Pointer(bp /* nCol */)) = 0 // Number of columns in table + *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)) = uintptr(0) // Primary key array + *(*uintptr)(unsafe.Pointer(bp + 8 /* azCol */)) = uintptr(0) // Table columns + var i int32 // Used to iterate through hash buckets + *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)) = uintptr(0) // SELECT statement to query table pTab + var nRewind int32 = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf // Initial size of write buffer + var nNoop int32 // Size of buffer after writing tbl header + + // Check the table schema is still Ok. + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionTableInfo(tls, uintptr(0), db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, bp, uintptr(0), bp+8, bp+16) + if !(*(*int32)(unsafe.Pointer(bp + 40)) != 0) && ((*SessionTable)(unsafe.Pointer(pTab)).FnCol != *(*int32)(unsafe.Pointer(bp)) || libc.Xmemcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), (*SessionTable)(unsafe.Pointer(pTab)).FabPK, uint64(*(*int32)(unsafe.Pointer(bp)))) != 0) { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_SCHEMA + } + + // Write a table header + sessionAppendTableHdr(tls, bp+24, bPatchset, pTab, bp+40) + + // Build and compile a statement to execute: + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionSelectStmt(tls, + db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* azCol */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)), bp+48) + } + + nNoop = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange && *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK; i++ { + var p uintptr // Used to iterate through changes + + for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK && p != 0; p = (*SessionChange)(unsafe.Pointer(p)).FpNext { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionSelectBind(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)), *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)), p) + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + continue + } + if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) == SQLITE_ROW { + if int32((*SessionChange)(unsafe.Pointer(p)).Fop) == SQLITE_INSERT { + var iCol int32 + sessionAppendByte(tls, bp+24, uint8(SQLITE_INSERT), bp+40) + sessionAppendByte(tls, bp+24, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+40) + for iCol = 0; iCol < *(*int32)(unsafe.Pointer(bp /* nCol */)); iCol++ { + sessionAppendCol(tls, bp+24, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)), iCol, bp+40 /* &rc */) + } + } else { + // Because sessionSelectStmt() returned ok + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionAppendUpdate(tls, bp+24, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)), p, *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */))) + } + } else if int32((*SessionChange)(unsafe.Pointer(p)).Fop) != SQLITE_INSERT { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionAppendDelete(tls, bp+24, bPatchset, p, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */))) + } + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */))) + } + + // If the buffer is now larger than sessions_strm_chunk_size, pass + // its contents to the xOutput() callback. + if xOutput != 0 && + *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && + (*SessionBuffer)(unsafe.Pointer(bp+24)).FnBuf > nNoop && + (*SessionBuffer)(unsafe.Pointer(bp+24)).FnBuf > sessions_strm_chunk_size { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf) + nNoop = -1 + (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf = 0 + } + + } + } + + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */))) + if (*SessionBuffer)(unsafe.Pointer(bp+24)).FnBuf == nNoop { + (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf = nRewind + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* azCol */))) // cast works around VC++ bug + } + } + + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + if xOutput == uintptr(0) { + *(*int32)(unsafe.Pointer(pnChangeset)) = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf + *(*uintptr)(unsafe.Pointer(ppChangeset)) = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FaBuf + (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FaBuf = uintptr(0) + } else if (*SessionBuffer)(unsafe.Pointer(bp+24)).FnBuf > 0 { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf) + } + } + + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) + Xsqlite3_exec(tls, db, ts+32707, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) +} + +// Obtain a changeset object containing all changes recorded by the +// session object passed as the first argument. +// +// It is the responsibility of the caller to eventually free the buffer +// using sqlite3_free(). +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ + var rc int32 + + if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { + return SQLITE_MISUSE + } + rc = sessionGenerateChangeset(tls, pSession, 0, uintptr(0), uintptr(0), pnChangeset, ppChangeset) + + return rc +} + +// Streaming version of sqlite3session_changeset(). +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ + if xOutput == uintptr(0) { + return SQLITE_MISUSE + } + return sessionGenerateChangeset(tls, pSession, 0, xOutput, pOut, uintptr(0), uintptr(0)) +} + +// Streaming version of sqlite3session_patchset(). +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ + if xOutput == uintptr(0) { + return SQLITE_MISUSE + } + return sessionGenerateChangeset(tls, pSession, 1, xOutput, pOut, uintptr(0), uintptr(0)) +} + +// Obtain a patchset object containing all changes recorded by the +// session object passed as the first argument. +// +// It is the responsibility of the caller to eventually free the buffer +// using sqlite3_free(). +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ + if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { + return SQLITE_MISUSE + } + return sessionGenerateChangeset(tls, pSession, 1, uintptr(0), uintptr(0), pnPatchset, ppPatchset) +} + +// Enable or disable the session object passed as the first argument. +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ + var ret int32 + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + if bEnable >= 0 { + (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnable = bEnable + } + ret = (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnable + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + return ret +} + +// Enable or disable the session object passed as the first argument. +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ + var ret int32 + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + if bIndirect >= 0 { + (*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect = bIndirect + } + ret = (*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + return ret +} + +// Return true if there have been no changes to monitored tables recorded +// by the session object passed as the only argument. +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ + var ret int32 = 0 + var pTab uintptr + + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + for pTab = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; pTab != 0 && ret == 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext { + ret = libc.Bool32((*SessionTable)(unsafe.Pointer(pTab)).FnEntry > 0) + } + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) + + return libc.Bool32(ret == 0) +} + +// Return the amount of heap memory in use. +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ + return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc +} + +// Configure the session object passed as the first argument. +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ + var rc int32 = SQLITE_OK + switch op { + case SQLITE_SESSION_OBJCONFIG_SIZE: + { + var iArg int32 = *(*int32)(unsafe.Pointer(pArg)) + if iArg >= 0 { + if (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable != 0 { + rc = SQLITE_MISUSE + } else { + (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize = libc.Bool32(iArg != 0) + } + } + *(*int32)(unsafe.Pointer(pArg)) = (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize + break + + } + + default: + rc = SQLITE_MISUSE + } + + return rc +} + +// Return the maximum size of sqlite3session_changeset() output. +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ + return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize +} + +// Do the work for either sqlite3changeset_start() or start_strm(). +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ + var pRet uintptr // Iterator to return + var nByte int32 // Number of bytes to allocate for iterator + + // Zero the output variable in case an error occurs. + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + + // Allocate and initialize the iterator structure. + nByte = int32(unsafe.Sizeof(Sqlite3_changeset_iter{})) + pRet = Xsqlite3_malloc(tls, nByte) + if !(pRet != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(Sqlite3_changeset_iter{}))) + (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FaData = pChangeset + (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FnData = nChangeset + (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FxInput = xInput + (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FpIn = pIn + (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FbEof = func() int32 { + if xInput != 0 { + return 0 + } + return 1 + }() + (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).FbInvert = bInvert + (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).FbSkipEmpty = bSkipEmpty + + // Populate the output variable and return success. + *(*uintptr)(unsafe.Pointer(pp)) = pRet + return SQLITE_OK +} + +// Create an iterator used to iterate through the contents of a changeset. +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ + return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) +} + +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ + var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) + return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) +} + +// Streaming version of sqlite3changeset_start(). +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ + return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) +} + +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ + var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) + return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) +} + +// If the SessionInput object passed as the only argument is a streaming +// object and the buffer is full, discard some data to free up space. +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ + if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { + var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext + + if nMove > 0 { + libc.Xmemmove(tls, (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf, (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext), uint64(nMove)) + } + *(*int32)(unsafe.Pointer(pIn + 32 + 8)) -= (*SessionInput)(unsafe.Pointer(pIn)).FiNext + (*SessionInput)(unsafe.Pointer(pIn)).FiNext = 0 + (*SessionInput)(unsafe.Pointer(pIn)).FnData = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf + } +} + +// Ensure that there are at least nByte bytes available in the buffer. Or, +// if there are not nByte bytes remaining in the input, that all available +// data is in the buffer. +// +// Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 { + for !((*SessionInput)(unsafe.Pointer(pIn)).FbEof != 0) && (*SessionInput)(unsafe.Pointer(pIn)).FiNext+nByte >= (*SessionInput)(unsafe.Pointer(pIn)).FnData && *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 4 /* nNew */)) = sessions_strm_chunk_size + + if (*SessionInput)(unsafe.Pointer(pIn)).FbNoDiscard == 0 { + sessionDiscardData(tls, pIn) + } + if SQLITE_OK == sessionBufferGrow(tls, pIn+32, int64(*(*int32)(unsafe.Pointer(bp + 4))), bp) { + *(*int32)(unsafe.Pointer(bp /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*SessionInput)(unsafe.Pointer(pIn)).FxInput})).f(tls, (*SessionInput)(unsafe.Pointer(pIn)).FpIn, (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf+uintptr((*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf), bp+4 /* &nNew */) + if *(*int32)(unsafe.Pointer(bp + 4)) == 0 { + (*SessionInput)(unsafe.Pointer(pIn)).FbEof = 1 + } else { + *(*int32)(unsafe.Pointer(pIn + 32 + 8)) += *(*int32)(unsafe.Pointer(bp + 4)) + } + } + + (*SessionInput)(unsafe.Pointer(pIn)).FaData = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf + (*SessionInput)(unsafe.Pointer(pIn)).FnData = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf + } + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// When this function is called, *ppRec points to the start of a record +// that contains nCol values. This function advances the pointer *ppRec +// until it points to the byte immediately following that record. +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var aRec uintptr = *(*uintptr)(unsafe.Pointer(ppRec)) + var i int32 + for i = 0; i < nCol; i++ { + var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aRec, 1)))) + if eType == SQLITE_TEXT || eType == SQLITE_BLOB { + // var nByte int32 at bp, 4 + + aRec += uintptr(sessionVarintGet(tls, aRec, bp)) + aRec += uintptr(*(*int32)(unsafe.Pointer(bp /* nByte */))) + } else if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + aRec += uintptr(8) + } + } + + *(*uintptr)(unsafe.Pointer(ppRec)) = aRec +} + +// This function sets the value of the sqlite3_value object passed as the +// first argument to a copy of the string or blob held in the aData[] +// buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM +// error occurs. +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ + // In theory this code could just pass SQLITE_TRANSIENT as the final + // argument to sqlite3ValueSetStr() and have the copy created + // automatically. But doing so makes it difficult to detect any OOM + // error. Hence the code to create the copy externally. + var aCopy uintptr = Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(nData)+int64(1))) + if aCopy == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemcpy(tls, aCopy, aData, uint64(nData)) + Xsqlite3ValueSetStr(tls, pVal, nData, aCopy, enc, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + return SQLITE_OK +} + +// Deserialize a single record from a buffer in memory. See "RECORD FORMAT" +// for details. +// +// When this function is called, *paChange points to the start of the record +// to deserialize. Assuming no error occurs, *paChange is set to point to +// one byte after the end of the same record before this function returns. +// If the argument abPK is NULL, then the record contains nCol values. Or, +// if abPK is other than NULL, then the record contains only the PK fields +// (in other words, it is a patchset DELETE record). +// +// If successful, each element of the apOut[] array (allocated by the caller) +// is set to point to an sqlite3_value object containing the value read +// from the corresponding position in the record. If that value is not +// included in the record (i.e. because the record is part of an UPDATE change +// and the field was not modified), the corresponding element of apOut[] is +// set to NULL. +// +// It is the responsibility of the caller to free all sqlite_value structures +// using sqlite3_free(). +// +// If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. +// The apOut[] array may have been partially populated in this case. +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var i int32 // Used to iterate through columns + var rc int32 = SQLITE_OK + + if pbEmpty != 0 { + *(*int32)(unsafe.Pointer(pbEmpty)) = 1 + } + for i = 0; i < nCol && rc == SQLITE_OK; i++ { + var eType int32 = 0 // Type of value (SQLITE_NULL, TEXT etc.) + if abPK != 0 && int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { + continue + } + rc = sessionInputBuffer(tls, pIn, 9) + if rc == SQLITE_OK { + if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { + rc = Xsqlite3CorruptError(tls, 213320) + } else { + eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) + + if eType != 0 { + if pbEmpty != 0 { + *(*int32)(unsafe.Pointer(pbEmpty)) = 0 + } + *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)) = Xsqlite3ValueNew(tls, uintptr(0)) + if !(int32(*(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8))) != 0) { + rc = SQLITE_NOMEM + } + } + } + } + + if rc == SQLITE_OK { + var aVal uintptr = (*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext) + if eType == SQLITE_TEXT || eType == SQLITE_BLOB { + // var nByte int32 at bp, 4 + + *(*int32)(unsafe.Pointer(pIn + 8)) += sessionVarintGet(tls, aVal, bp) + rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) + if rc == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { + rc = Xsqlite3CorruptError(tls, 213340) + } else { + var enc U8 = func() uint8 { + if eType == SQLITE_TEXT { + return uint8(SQLITE_UTF8) + } + return uint8(0) + }() + rc = sessionValueSetStr(tls, *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)), (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext), *(*int32)(unsafe.Pointer(bp /* nByte */)), enc) + *(*int32)(unsafe.Pointer(pIn + 8)) += *(*int32)(unsafe.Pointer(bp)) + } + } + } + if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* v */)) = sessionGetI64(tls, aVal) + if eType == SQLITE_INTEGER { + Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)), *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* v */))) + } else { + // var d float64 at bp+8, 8 + + libc.Xmemcpy(tls, bp+8, bp+16, uint64(8)) + Xsqlite3VdbeMemSetDouble(tls, *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)), *(*float64)(unsafe.Pointer(bp + 8 /* d */))) + } + *(*int32)(unsafe.Pointer(pIn + 8)) += 8 + } + } + } + + return rc +} + +// The input pointer currently points to the second byte of a table-header. +// Specifically, to the following: +// +// + number of columns in table (varint) +// + array of PK flags (1 byte per column), +// + table name (nul terminated). +// +// This function ensures that all of the above is present in the input +// buffer (i.e. that it can be accessed without any calls to xInput()). +// If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. +// The input pointer is not moved. +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 = SQLITE_OK + *(*int32)(unsafe.Pointer(bp /* nCol */)) = 0 + var nRead int32 = 0 + + rc = sessionInputBuffer(tls, pIn, 9) + if rc == SQLITE_OK { + nRead = nRead + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead), bp) + // The hard upper limit for the number of columns in an SQLite + // database table is, according to sqliteLimit.h, 32676. So + // consider any table-header that purports to have more than 65536 + // columns to be corrupt. This is convenient because otherwise, + // if the (nCol>65536) condition below were omitted, a sufficiently + // large value for nCol may cause nRead to wrap around and become + // negative. Leading to a crash. + if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { + rc = Xsqlite3CorruptError(tls, 213394) + } else { + rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) + nRead = nRead + *(*int32)(unsafe.Pointer(bp)) + } + } + + for rc == SQLITE_OK { + for (*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead < (*SessionInput)(unsafe.Pointer(pIn)).FnData && *(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead))) != 0 { + nRead++ + } + if (*SessionInput)(unsafe.Pointer(pIn)).FiNext+nRead < (*SessionInput)(unsafe.Pointer(pIn)).FnData { + break + } + rc = sessionInputBuffer(tls, pIn, nRead+100) + } + *(*int32)(unsafe.Pointer(pnByte)) = nRead + 1 + return rc +} + +// The input pointer currently points to the first byte of the first field +// of a record consisting of nCol columns. This function ensures the entire +// record is buffered. It does not move the input pointer. +// +// If successful, SQLITE_OK is returned and *pnByte is set to the size of +// the record in bytes. Otherwise, an SQLite error code is returned. The +// final value of *pnByte is undefined in this case. +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 = SQLITE_OK + var nByte int32 = 0 + var i int32 + for i = 0; rc == SQLITE_OK && i < nCol; i++ { + var eType int32 + rc = sessionInputBuffer(tls, pIn, nByte+10) + if rc == SQLITE_OK { + eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+libc.PostIncInt32(&nByte, 1))))) + if eType == SQLITE_TEXT || eType == SQLITE_BLOB { + // var n int32 at bp, 4 + + nByte = nByte + sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pIn)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext+nByte), bp) + nByte = nByte + *(*int32)(unsafe.Pointer(bp)) + rc = sessionInputBuffer(tls, pIn, nByte) + } else if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { + nByte = nByte + 8 + } + } + } + *(*int32)(unsafe.Pointer(pnByte)) = nByte + return rc +} + +// The input pointer currently points to the second byte of a table-header. +// Specifically, to the following: +// +// + number of columns in table (varint) +// + array of PK flags (1 byte per column), +// + table name (nul terminated). +// +// This function decodes the table-header and populates the p->nCol, +// p->zTab and p->abPK[] variables accordingly. The p->apValue[] array is +// also allocated or resized according to the new value of p->nCol. The +// input pointer is left pointing to the byte following the table header. +// +// If successful, SQLITE_OK is returned. Otherwise, an SQLite error code +// is returned and the final values of the various fields enumerated above +// are undefined. +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var rc int32 at bp+4, 4 + + // var nCopy int32 at bp, 4 + + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sessionChangesetBufferTblhdr(tls, p, bp) + if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { + var nByte int32 + var nVarint int32 + nVarint = sessionVarintGet(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData+uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext), p+120) + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol > 0 { + *(*int32)(unsafe.Pointer(bp /* nCopy */)) -= nVarint + *(*int32)(unsafe.Pointer(p + 8)) += nVarint + nByte = int32(uint64((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*uint64(unsafe.Sizeof(uintptr(0)))*uint64(2) + uint64(*(*int32)(unsafe.Pointer(bp)))) + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 + sessionBufferGrow(tls, p+72, int64(nByte), bp+4) + } else { + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) + } + } + + if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { + var iPK Size_t = uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol) * uint64(2) + libc.Xmemset(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf, 0, iPK) + libc.Xmemcpy(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf+uintptr(iPK), (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData+uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext), uint64(*(*int32)(unsafe.Pointer(bp /* nCopy */)))) + *(*int32)(unsafe.Pointer(p + 8)) += *(*int32)(unsafe.Pointer(bp)) + } + + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue == uintptr(0) { + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK = uintptr(0) + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab = uintptr(0) + } else { + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol*2)*8 + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab = func() uintptr { + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK != 0 { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol) + } + return uintptr(0) + }() + } + return libc.AssignPtrInt32(p+100, *(*int32)(unsafe.Pointer(bp + 4))) +} + +// Advance the changeset iterator to the next change. The differences between +// this function and sessionChangesetNext() are that +// +// * If pbEmpty is not NULL and the change is a no-op UPDATE (an UPDATE +// that modifies no columns), this function sets (*pbEmpty) to 1. +// +// * If the iterator is configured to skip no-op UPDATEs, +// sessionChangesetNext() does that. This function does not. +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ + var i int32 + var op U8 + + // If the iterator is in the error-state, return immediately. + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + } + + // Free the current contents of p->apValue[], if any. + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue != 0 { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol*2; i++ { + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8))) + } + libc.Xmemset(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*uint64(2)) + } + + // Make sure the buffer contains at least 10 bytes of input data, or all + // remaining data if there are less than 10 bytes available. This is + // sufficient either for the 'T' or 'P' byte and the varint that follows + // it, or for the two single byte values otherwise. + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionInputBuffer(tls, p, 2) + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + } + + // If the iterator is already at the end of the changeset, return DONE. + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext >= (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FnData { + return SQLITE_DONE + } + + sessionDiscardData(tls, p) + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiCurrent = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext + + op = *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1)))) + for int32(op) == 'T' || int32(op) == 'P' { + if pbNew != 0 { + *(*int32)(unsafe.Pointer(pbNew)) = 1 + } + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset = libc.Bool32(int32(op) == 'P') + if sessionChangesetReadTblhdr(tls, p) != 0 { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + } + if libc.AssignPtrInt32(p+100, sessionInputBuffer(tls, p, 2)) != 0 { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + } + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiCurrent = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext >= (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FnData { + return SQLITE_DONE + } + op = *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1)))) + } + + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab == uintptr(0) || (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 { + // The first record in the changeset is not a table header. Must be a + // corrupt changeset. + + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) + } + + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) + } + + if paRec != 0 { + var nVal int32 // Number of values to buffer + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 && int32(op) == SQLITE_UPDATE { + nVal = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol * 2 + } else if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 && int32(op) == SQLITE_DELETE { + nVal = 0 + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + if *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { + nVal++ + } + } + } else { + nVal = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol + } + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionChangesetBufferRecord(tls, p, nVal, pnRec) + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + } + *(*uintptr)(unsafe.Pointer(paRec)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext) + *(*int32)(unsafe.Pointer(p + 8)) += *(*int32)(unsafe.Pointer(pnRec)) + } else { + var apOld uintptr = func() uintptr { + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8 + } + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + }() + var apNew uintptr = func() uintptr { + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + } + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8 + }() + + // If this is an UPDATE or DELETE, read the old.* record. + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT && ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { + var abPK uintptr + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 { + abPK = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + } else { + abPK = uintptr(0) + } + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionReadRecord(tls, p, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol, abPK, apOld, uintptr(0)) + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + } + } + + // If this is an INSERT or UPDATE, read the new.* record. + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE { + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionReadRecord(tls, p, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol, uintptr(0), apNew, pbEmpty) + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + } + } + + if ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0) && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE { + // If this is an UPDATE that is part of a patchset, then all PK and + // modified fields are present in the new.* record. The old.* record + // is currently completely empty. This block shifts the PK fields from + // new.* to old.*, to accommodate the code that reads these arrays. + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ { + + if *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { + + *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) + if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) + } + *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) + } + } + } else if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 { + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_INSERT { + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_DELETE + } else if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_DELETE { + (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT + } + } + } + + return SQLITE_ROW +} + +// Advance the changeset iterator to the next change. +// +// If both paRec and pnRec are NULL, then this function works like the public +// API sqlite3changeset_next(). If SQLITE_ROW is returned, then the +// sqlite3changeset_new() and old() APIs may be used to query for values. +// +// Otherwise, if paRec and pnRec are not NULL, then a pointer to the change +// record is written to *paRec before returning and the number of bytes in +// the record to *pnRec. +// +// Either way, this function returns SQLITE_ROW if the iterator is +// successfully advanced to the next change in the changeset, an SQLite +// error code if an error occurs, or SQLITE_DONE if there are no further +// changes in the changeset. +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var bEmpty int32 at bp, 4 + + var rc int32 + for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_ROW && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbSkipEmpty != 0 && *(*int32)(unsafe.Pointer(bp)) != 0 { + *(*int32)(unsafe.Pointer(bp /* bEmpty */)) = 0 + rc = sessionChangesetNextOne(tls, p, paRec, pnRec, pbNew, bp) + } + return rc +} + +// Advance an iterator created by sqlite3changeset_start() to the next +// change in the changeset. This function may return SQLITE_ROW, SQLITE_DONE +// or SQLITE_CORRUPT. +// +// This function may not be called on iterators passed to a conflict handler +// callback by changeset_apply(). +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ + return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) +} + +// The following function extracts information on the current change +// from a changeset iterator. It may only be called after changeset_next() +// has returned SQLITE_ROW. +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ + *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop + *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol + *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab + if pbIndirect != 0 { + *(*int32)(unsafe.Pointer(pbIndirect)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect + } + return SQLITE_OK +} + +// Return information regarding the PRIMARY KEY and number of columns in +// the database table affected by the change that pIter currently points +// to. This function may only be called after changeset_next() returns +// SQLITE_ROW. +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ + *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK + if pnCol != 0 { + *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol + } + return SQLITE_OK +} + +// This function may only be called while the iterator is pointing to an +// SQLITE_UPDATE or SQLITE_DELETE change (see sqlite3changeset_op()). +// Otherwise, SQLITE_MISUSE is returned. +// +// It sets *ppValue to point to an sqlite3_value structure containing the +// iVal'th value in the old.* record. Or, if that particular value is not +// included in the record (because the change is an UPDATE and the field +// was not modified and is not a PK column), set *ppValue to NULL. +// +// If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is +// not modified. Otherwise, SQLITE_OK. +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ + if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { + return SQLITE_MISUSE + } + if iVal < 0 || iVal >= (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol { + return SQLITE_RANGE + } + *(*uintptr)(unsafe.Pointer(ppValue)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(iVal)*8)) + return SQLITE_OK +} + +// This function may only be called while the iterator is pointing to an +// SQLITE_UPDATE or SQLITE_INSERT change (see sqlite3changeset_op()). +// Otherwise, SQLITE_MISUSE is returned. +// +// It sets *ppValue to point to an sqlite3_value structure containing the +// iVal'th value in the new.* record. Or, if that particular value is not +// included in the record (because the change is an UPDATE and the field +// was not modified), set *ppValue to NULL. +// +// If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is +// not modified. Otherwise, SQLITE_OK. +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ + if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { + return SQLITE_MISUSE + } + if iVal < 0 || iVal >= (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol { + return SQLITE_RANGE + } + *(*uintptr)(unsafe.Pointer(ppValue)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+iVal)*8)) + return SQLITE_OK +} + +// The following two macros are used internally. They are similar to the +// sqlite3changeset_new() and sqlite3changeset_old() functions, except that +// they omit all error checking and return a pointer to the requested value. + +// This function may only be called with a changeset iterator that has been +// passed to an SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT +// conflict-handler function. Otherwise, SQLITE_MISUSE is returned. +// +// If successful, *ppValue is set to point to an sqlite3_value structure +// containing the iVal'th value of the conflicting record. +// +// If value iVal is out-of-range or some other error occurs, an SQLite error +// code is returned. Otherwise, SQLITE_OK. +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ + if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { + return SQLITE_MISUSE + } + if iVal < 0 || iVal >= (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol { + return SQLITE_RANGE + } + *(*uintptr)(unsafe.Pointer(ppValue)) = Xsqlite3_column_value(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict, iVal) + return SQLITE_OK +} + +// This function may only be called with an iterator passed to an +// SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case +// it sets the output variable to the total number of known foreign key +// violations in the destination database and returns SQLITE_OK. +// +// In all other cases this function returns SQLITE_MISUSE. +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ + if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { + return SQLITE_MISUSE + } + *(*int32)(unsafe.Pointer(pnOut)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol + return SQLITE_OK +} + +// Finalize an iterator allocated with sqlite3changeset_start(). +// +// This function may not be called on iterators passed to a conflict handler +// callback by changeset_apply(). +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ + var rc int32 = SQLITE_OK + if p != 0 { + var i int32 // Used to iterate through p->apValue[] + rc = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc + if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue != 0 { + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol*2; i++ { + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8))) + } + } + Xsqlite3_free(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf) + Xsqlite3_free(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.Fbuf.FaBuf) + Xsqlite3_free(tls, p) + } + return rc +} + +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var rc int32 at bp+40, 4 + // Return value + // var sOut SessionBuffer at bp, 16 + // Output buffer + // var nCol int32 at bp+20, 4 + // Number of cols in current table + var abPK uintptr // PK array for current table + var apVal uintptr // Space for values for UPDATE inversion + // var sPK SessionBuffer at bp+24, 16 + + // A 'table' record consists of: + // + // * A constant 'T' character, + // * Number of columns in said table (a varint), + // * An array of nCol bytes (sPK), + // * A nul-terminated table name. + // var nByte int32 at bp+16, 4 + + var nVar int32 + // var nByte1 int32 at bp+44, 4 + + var bIndirect int32 + var eType2 int32 + var pVal uintptr + var pVal1 uintptr + var iCol int32 + var eType U8 + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)) = 0 + abPK = uintptr(0) + apVal = uintptr(0) + *(*SessionBuffer)(unsafe.Pointer(bp + 24 /* sPK */)) = SessionBuffer{} // PK array for current table + + // Initialize the output buffer + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(SessionBuffer{}))) + + // Zero the output variables in case an error occurs. + if !(ppInverted != 0) { + goto __1 + } + *(*uintptr)(unsafe.Pointer(ppInverted)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnInverted)) = 0 +__1: + ; + +__2: + if !(1 != 0) { + goto __3 + } + + // Test for EOF. + if !(libc.AssignPtrInt32(bp+40, sessionInputBuffer(tls, pInput, 2)) != 0) { + goto __4 + } + goto finished_invert +__4: + ; + if !((*SessionInput)(unsafe.Pointer(pInput)).FiNext >= (*SessionInput)(unsafe.Pointer(pInput)).FnData) { + goto __5 + } + goto __3 +__5: + ; + eType = *(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext))) + + switch int32(eType) { + case 'T': + goto __7 + + case SQLITE_INSERT: + goto __8 + case SQLITE_DELETE: + goto __9 + + case SQLITE_UPDATE: + goto __10 + + default: + goto __11 + } + goto __6 +__7: + (*SessionInput)(unsafe.Pointer(pInput)).FiNext++ + if !(libc.AssignPtrInt32(bp+40, sessionChangesetBufferTblhdr(tls, pInput, bp+16)) != 0) { + goto __12 + } + goto finished_invert +__12: + ; + nVar = sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), bp+20) + (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &sPK */)).FnBuf = 0 + sessionAppendBlob(tls, bp+24, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext+nVar), *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), bp+40) + sessionAppendByte(tls, bp, eType, bp+40) + sessionAppendBlob(tls, bp, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), *(*int32)(unsafe.Pointer(bp + 16 /* nByte */)), bp+40) + if !(*(*int32)(unsafe.Pointer(bp + 40)) != 0) { + goto __13 + } + goto finished_invert +__13: + ; + + *(*int32)(unsafe.Pointer(pInput + 8)) += *(*int32)(unsafe.Pointer(bp + 16)) + Xsqlite3_free(tls, apVal) + apVal = uintptr(0) + abPK = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &sPK */)).FaBuf + goto __6 + +__8: +__9: + bIndirect = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext+1)))) + eType2 = func() int32 { + if int32(eType) == SQLITE_DELETE { + return SQLITE_INSERT + } + return SQLITE_DELETE + }() + *(*int32)(unsafe.Pointer(pInput + 8)) += 2 + + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionChangesetBufferRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), bp+44) + sessionAppendByte(tls, bp, uint8(eType2), bp+40) + sessionAppendByte(tls, bp, uint8(bIndirect), bp+40) + sessionAppendBlob(tls, bp, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), *(*int32)(unsafe.Pointer(bp + 44 /* nByte1 */)), bp+40) + *(*int32)(unsafe.Pointer(pInput + 8)) += *(*int32)(unsafe.Pointer(bp + 44)) + if !(*(*int32)(unsafe.Pointer(bp + 40)) != 0) { + goto __14 + } + goto finished_invert +__14: + ; + goto __6 + +__10: + + if !(uintptr(0) == apVal) { + goto __15 + } + apVal = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 20)))*uint64(2))) + if !(uintptr(0) == apVal) { + goto __16 + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_NOMEM + goto finished_invert +__16: + ; + libc.Xmemset(tls, apVal, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 20)))*uint64(2)) +__15: + ; + + // Write the header for the new UPDATE change. Same as the original. + sessionAppendByte(tls, bp, eType, bp+40) + sessionAppendByte(tls, bp, *(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext+1))), bp+40) + + // Read the old.* and new.* records for the update change. + *(*int32)(unsafe.Pointer(pInput + 8)) += 2 + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionReadRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), uintptr(0), apVal, uintptr(0)) + if !(*(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK) { + goto __17 + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionReadRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), uintptr(0), apVal+uintptr(*(*int32)(unsafe.Pointer(bp + 20)))*8, uintptr(0)) +__17: + ; + + // Write the new old.* record. Consists of the PK columns from the + // original old.* record, and the other values from the original + // new.* record. + iCol = 0 +__18: + if !(iCol < *(*int32)(unsafe.Pointer(bp + 20))) { + goto __20 + } + pVal = *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol+func() int32 { + if *(*U8)(unsafe.Pointer(abPK + uintptr(iCol))) != 0 { + return 0 + } + return *(*int32)(unsafe.Pointer(bp + 20)) + }())*8)) + sessionAppendValue(tls, bp, pVal, bp+40) + goto __19 +__19: + iCol++ + goto __18 + goto __20 +__20: + ; + + // Write the new new.* record. Consists of a copy of all values + // from the original old.* record, except for the PK columns, which + // are set to "undefined". + iCol = 0 +__21: + if !(iCol < *(*int32)(unsafe.Pointer(bp + 20))) { + goto __23 + } + pVal1 = func() uintptr { + if *(*U8)(unsafe.Pointer(abPK + uintptr(iCol))) != 0 { + return uintptr(0) + } + return *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol)*8)) + }() + sessionAppendValue(tls, bp, pVal1, bp+40) + goto __22 +__22: + iCol++ + goto __21 + goto __23 +__23: + ; + + iCol = 0 +__24: + if !(iCol < *(*int32)(unsafe.Pointer(bp + 20))*2) { + goto __26 + } + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol)*8))) + goto __25 +__25: + iCol++ + goto __24 + goto __26 +__26: + ; + libc.Xmemset(tls, apVal, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 20)))*uint64(2)) + if !(*(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK) { + goto __27 + } + goto finished_invert +__27: + ; + + goto __6 + +__11: + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) + goto finished_invert +__6: + ; + + if !(xOutput != 0 && (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf >= sessions_strm_chunk_size) { + goto __28 + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf) + (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf = 0 + if !(*(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK) { + goto __29 + } + goto finished_invert +__29: + ; +__28: + ; + goto __2 +__3: + ; + + if !(pnInverted != 0 && ppInverted != 0) { + goto __30 + } + *(*int32)(unsafe.Pointer(pnInverted)) = (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf + *(*uintptr)(unsafe.Pointer(ppInverted)) = (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf + (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf = uintptr(0) + goto __31 +__30: + if !((*SessionBuffer)(unsafe.Pointer(bp)).FnBuf > 0 && xOutput != uintptr(0)) { + goto __32 + } + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf) +__32: + ; +__31: + ; + +finished_invert: + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf) + Xsqlite3_free(tls, apVal) + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &sPK */)).FaBuf) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) +} + +// Invert a changeset object. +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + // var sInput SessionInput at bp, 72 + + // Set up the input stream + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(SessionInput{}))) + (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FnData = nChangeset + (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FaData = pChangeset + + return sessionChangesetInvert(tls, bp, uintptr(0), uintptr(0), pnInverted, ppInverted) +} + +// Streaming version of sqlite3changeset_invert(). +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + // var sInput SessionInput at bp, 72 + + var rc int32 + + // Set up the input stream + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(SessionInput{}))) + (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FxInput = xInput + (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FpIn = pIn + + rc = sessionChangesetInvert(tls, bp, xOutput, pOut, uintptr(0), uintptr(0)) + Xsqlite3_free(tls, (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).Fbuf.FaBuf) + return rc +} + +type SessionUpdate1 = struct { + FpStmt uintptr + FaMask uintptr + FpNext uintptr +} /* sqlite3.c:214038:9 */ + +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ + +type SessionApplyCtx1 = struct { + Fdb uintptr + FpDelete uintptr + FpInsert uintptr + FpSelect uintptr + FnCol int32 + F__ccgo_pad1 [4]byte + FazCol uintptr + FabPK uintptr + FaUpdateMask uintptr + FpUp uintptr + FbStat1 int32 + FbDeferConstraints int32 + FbInvertConstraints int32 + F__ccgo_pad2 [4]byte + Fconstraints SessionBuffer + Frebase SessionBuffer + FbRebaseStarted U8 + FbRebase U8 + F__ccgo_pad3 [6]byte +} /* sqlite3.c:214045:9 */ + +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ + +// Number of prepared UPDATE statements to cache. + +// Find a prepared UPDATE statement suitable for the UPDATE step currently +// being visited by the iterator. The UPDATE is of the form: +// +// UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + var pUp uintptr = uintptr(0) + var nCol int32 = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol + var nU32 int32 = ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol + 33) / 32 + var ii int32 + + if (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask == uintptr(0) { + (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask = Xsqlite3_malloc(tls, int32(uint64(nU32)*uint64(unsafe.Sizeof(U32(0))))) + if (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask == uintptr(0) { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM + } + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + libc.Xmemset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, 0, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_CORRUPT + for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { + if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { + *(*U32)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask + uintptr(ii/32)*4)) |= U32(int32(1) << (ii % 32)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + if bPatchset != 0 { + *(*U32)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask + uintptr(nCol/32)*4)) |= U32(int32(1) << (nCol % 32)) + } + + if (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp != 0 { + var nUp int32 = 0 + var pp uintptr = p + 64 + for 1 != 0 { + nUp++ + if 0 == libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, (*SessionUpdate)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FaMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) { + pUp = *(*uintptr)(unsafe.Pointer(pp)) + *(*uintptr)(unsafe.Pointer(pp)) = (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext + (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp + (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp = pUp + break + } + + if (*SessionUpdate)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext != 0 { + pp = *(*uintptr)(unsafe.Pointer(pp)) + 16 + } else { + if nUp >= SESSION_UPDATE_CACHE_SZ { + Xsqlite3_finalize(tls, (*SessionUpdate)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpStmt) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pp))) + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + } + break + } + } + } + + if pUp == uintptr(0) { + var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11224) == 0) + pUp = Xsqlite3_malloc(tls, nByte) + if pUp == uintptr(0) { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM + } else { + var zSep uintptr = ts + 1525 /* "" */ + // var buf SessionBuffer at bp, 16 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(SessionBuffer{}))) + (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 + libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) + + sessionAppendStr(tls, bp, ts+32725, bp+16) + sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) + sessionAppendStr(tls, bp, ts+32738, bp+16) + + // Create the assignments part of the UPDATE + for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { + if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { + sessionAppendStr(tls, bp, zSep, bp+16) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) + sessionAppendStr(tls, bp, ts+32744, bp+16) + sessionAppendInteger(tls, bp, ii*2+1, bp+16) + zSep = ts + 14542 /* ", " */ + } + } + + // Create the WHERE clause part of the UPDATE + zSep = ts + 1525 /* "" */ + sessionAppendStr(tls, bp, ts+32673, bp+16) + for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { + if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { + sessionAppendStr(tls, bp, zSep, bp+16) + if bStat1 != 0 && ii == 1 { + + sessionAppendStr(tls, bp, + + ts+32749, bp+16) + } else { + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) + sessionAppendStr(tls, bp, ts+32681, bp+16) + sessionAppendInteger(tls, bp, ii*2+2, bp+16) + } + zSep = ts + 21372 /* " AND " */ + } + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + var zSql uintptr = (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v2(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, zSql, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf, pUp, uintptr(0)) + } + + if *(*int32)(unsafe.Pointer(bp + 16)) != SQLITE_OK { + Xsqlite3_free(tls, pUp) + pUp = uintptr(0) + } else { + (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp + (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp = pUp + } + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf) + } + } + } + + if pUp != 0 { + *(*uintptr)(unsafe.Pointer(ppStmt)) = (*SessionUpdate)(unsafe.Pointer(pUp)).FpStmt + } else { + *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) + } + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +// Free all cached UPDATE statements. +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ + var pUp uintptr + var pNext uintptr + for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { + pNext = (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext + Xsqlite3_finalize(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FpStmt) + Xsqlite3_free(tls, pUp) + } + (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp = uintptr(0) + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask) + (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask = uintptr(0) +} + +// Formulate a statement to DELETE a row from database db. Assuming a table +// structure like this: +// +// CREATE TABLE x(a, b, c, d, PRIMARY KEY(a, c)); +// +// The DELETE statement looks like this: +// +// DELETE FROM x WHERE a = :1 AND c = :3 AND (:5 OR b IS :2 AND d IS :4) +// +// Variable :5 (nCol+1) is a boolean. It should be set to 0 if we require +// matching b and d values, or 1 otherwise. The second case comes up if the +// conflict handler is invoked with NOTFOUND and returns CHANGESET_REPLACE. +// +// If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left +// pointing to the prepared version of the SQL statement. +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var i int32 + var zSep uintptr = ts + 1525 /* "" */ + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} + var nPk int32 = 0 + + sessionAppendStr(tls, bp, ts+32824, bp+16) + sessionAppendIdent(tls, bp, zTab, bp+16) + sessionAppendStr(tls, bp, ts+32673, bp+16) + + for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { + if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { + nPk++ + sessionAppendStr(tls, bp, zSep, bp+16) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) + sessionAppendStr(tls, bp, ts+32744, bp+16) + sessionAppendInteger(tls, bp, i+1, bp+16) + zSep = ts + 21372 /* " AND " */ + } + } + + if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { + sessionAppendStr(tls, bp, ts+32842, bp+16) + sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) + sessionAppendStr(tls, bp, ts+32385, bp+16) + + zSep = ts + 1525 /* "" */ + for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { + if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { + sessionAppendStr(tls, bp, zSep, bp+16) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) + sessionAppendStr(tls, bp, ts+32681, bp+16) + sessionAppendInteger(tls, bp, i+1, bp+16) + zSep = ts + 32850 /* "AND " */ + } + } + sessionAppendStr(tls, bp, ts+4899, bp+16) + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf, p+8, uintptr(0)) + } + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf) + + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +// Formulate and prepare an SQL statement to query table zTab by primary +// key. Assuming the following table structure: +// +// CREATE TABLE x(a, b, c, d, PRIMARY KEY(a, c)); +// +// The SELECT statement looks like this: +// +// SELECT * FROM x WHERE a = ?1 AND c = ?3 +// +// If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left +// pointing to the prepared version of the SQL statement. +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ + return sessionSelectStmt(tls, + db, ts+6323, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) +} + +// Formulate and prepare an INSERT statement to add a record to table zTab. +// For example: +// +// INSERT INTO main."zTab" VALUES(?1, ?2, ?3 ...); +// +// If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left +// pointing to the prepared version of the SQL statement. +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + var i int32 + *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} + + sessionAppendStr(tls, bp, ts+32855, bp+16) + sessionAppendIdent(tls, bp, zTab, bp+16) + sessionAppendStr(tls, bp, ts+21378, bp+16) + for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { + if i != 0 { + sessionAppendStr(tls, bp, ts+14542, bp+16) + } + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) + } + + sessionAppendStr(tls, bp, ts+32873, bp+16) + for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { + sessionAppendStr(tls, bp, ts+32884, bp+16) + } + sessionAppendStr(tls, bp, ts+4899, bp+16) + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf, p+16, uintptr(0)) + } + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf) + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ + return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) +} + +// Prepare statements for applying changes to the sqlite_stat1 table. +// These are similar to those created by sessionSelectRow(), +// sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for +// other tables. +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11224, p) + if rc == SQLITE_OK { + rc = sessionPrepare(tls, db, p+16, + + ts+32888) + } + if rc == SQLITE_OK { + rc = sessionPrepare(tls, db, p+8, + + ts+33001) + } + return rc +} + +// A wrapper around sqlite3_bind_value() that detects an extra problem. +// See comments in the body of this function for details. +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ + var eType int32 = Xsqlite3_value_type(tls, pVal) + // COVERAGE: The (pVal->z==0) branch is never true using current versions + // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either + // the (pVal->z) variable remains as it was or the type of the value is + // set to SQLITE_NULL. + if (eType == SQLITE_TEXT || eType == SQLITE_BLOB) && (*Sqlite3_value)(unsafe.Pointer(pVal)).Fz == uintptr(0) { + // This condition occurs when an earlier OOM in a call to + // sqlite3_value_text() or sqlite3_value_blob() (perhaps from within + // a conflict-handler) has zeroed the pVal->z pointer. Return NOMEM. + return SQLITE_NOMEM + } + return Xsqlite3_bind_value(tls, pStmt, i, pVal) +} + +// Iterator pIter must point to an SQLITE_INSERT entry. This function +// transfers new.* values from the current iterator entry to statement +// pStmt. The table being inserted into has nCol columns. +// +// New.* value $i from the iterator is bound to variable ($i+1) of +// statement pStmt. If parameter abPK is NULL, all values from 0 to (nCol-1) +// are transfered to the statement. Otherwise, if abPK is not NULL, it points +// to an array nCol elements in size. In this case only those values for +// which abPK[$i] is true are read from the iterator and bound to the +// statement. +// +// An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var i int32 + var rc int32 = SQLITE_OK + + // Neither sqlite3changeset_old or sqlite3changeset_new can fail if the + // argument iterator points to a suitable entry. Make sure that xValue + // is one of these to guarantee that it is safe to ignore the return + // in the code below. + + for i = 0; rc == SQLITE_OK && i < nCol; i++ { + if !(abPK != 0) || *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { + *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0) + (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp /* &pVal */) + if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { + // The value in the changeset was "undefined". This indicates a + // corrupt changeset blob. + rc = Xsqlite3CorruptError(tls, 214445) + } else { + rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) + } + } + } + return rc +} + +// SQL statement pSelect is as generated by the sessionSelectRow() function. +// This function binds the primary key values from the change that changeset +// iterator pIter points to to the SELECT and attempts to seek to the table +// entry. If a row is found, the SELECT statement left pointing at the row +// and SQLITE_ROW is returned. Otherwise, if no row is found and no error +// has occured, the statement is reset and SQLITE_OK is returned. If an +// error occurs, the statement is reset and an SQLite error code is returned. +// +// If this function returns SQLITE_ROW, the caller must eventually reset() +// statement pSelect. If any other value is returned, the statement does +// not require a reset(). +// +// If the iterator currently points to an INSERT record, bind values from the +// new.* record to the SELECT statement. Or, if it points to a DELETE or +// UPDATE, bind values from the old.* record. +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 // Return code + // var nCol int32 at bp+8, 4 + // Number of columns in table + // var op int32 at bp+12, 4 + // Changset operation (SQLITE_UPDATE etc.) + // var zDummy uintptr at bp, 8 + // Unused + + Xsqlite3changeset_op(tls, pIter, bp, bp+8, bp+12, uintptr(0)) + rc = sessionBindRow(tls, pIter, + func() uintptr { + if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_INSERT { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{Xsqlite3changeset_new})) + } + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{Xsqlite3changeset_old})) + }(), + *(*int32)(unsafe.Pointer(bp + 8 /* nCol */)), abPK, pSelect) + + if rc == SQLITE_OK { + rc = Xsqlite3_step(tls, pSelect) + if rc != SQLITE_ROW { + rc = Xsqlite3_reset(tls, pSelect) + } + } + + return rc +} + +// This function is called from within sqlite3changeset_apply_v2() when +// a conflict is encountered and resolved using conflict resolution +// mode eType (either SQLITE_CHANGESET_OMIT or SQLITE_CHANGESET_REPLACE).. +// It adds a conflict resolution record to the buffer in +// SessionApplyCtx.rebase, which will eventually be returned to the caller +// of apply_v2() as the "rebase" buffer. +// +// Return SQLITE_OK if successful, or an SQLite error code otherwise. +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + if (*SessionApplyCtx)(unsafe.Pointer(p)).FbRebase != 0 { + var i int32 + var eOp int32 = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop + if int32((*SessionApplyCtx)(unsafe.Pointer(p)).FbRebaseStarted) == 0 { + // Append a table-header to the rebase buffer + var zTab uintptr = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab + sessionAppendByte(tls, p+104, uint8('T'), bp) + sessionAppendVarint(tls, p+104, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp) + sessionAppendBlob(tls, p+104, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp) + sessionAppendBlob(tls, p+104, zTab, int32(libc.Xstrlen(tls, zTab))+1, bp) + (*SessionApplyCtx)(unsafe.Pointer(p)).FbRebaseStarted = U8(1) + } + + sessionAppendByte(tls, p+104, + func() uint8 { + if eOp == SQLITE_DELETE { + return uint8(SQLITE_DELETE) + } + return uint8(SQLITE_INSERT) + }(), bp) + sessionAppendByte(tls, p+104, uint8(libc.Bool32(eType == SQLITE_CHANGESET_REPLACE)), bp) + for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { + *(*uintptr)(unsafe.Pointer(bp + 8 /* pVal */)) = uintptr(0) + if eOp == SQLITE_DELETE || eOp == SQLITE_UPDATE && *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { + Xsqlite3changeset_old(tls, pIter, i, bp+8) + } else { + Xsqlite3changeset_new(tls, pIter, i, bp+8) + } + sessionAppendValue(tls, p+104, *(*uintptr)(unsafe.Pointer(bp + 8 /* pVal */)), bp) + } + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Invoke the conflict handler for the change that the changeset iterator +// currently points to. +// +// Argument eType must be either CHANGESET_DATA or CHANGESET_CONFLICT. +// If argument pbReplace is NULL, then the type of conflict handler invoked +// depends solely on eType, as follows: +// +// eType value Value passed to xConflict +// ------------------------------------------------- +// CHANGESET_DATA CHANGESET_NOTFOUND +// CHANGESET_CONFLICT CHANGESET_CONSTRAINT +// +// Or, if pbReplace is not NULL, then an attempt is made to find an existing +// record with the same primary key as the record about to be deleted, updated +// or inserted. If such a record can be found, it is available to the conflict +// handler as the "conflicting" record. In this case the type of conflict +// handler invoked is as follows: +// +// eType value PK Record found? Value passed to xConflict +// ---------------------------------------------------------------- +// CHANGESET_DATA Yes CHANGESET_DATA +// CHANGESET_DATA No CHANGESET_NOTFOUND +// CHANGESET_CONFLICT Yes CHANGESET_CONFLICT +// CHANGESET_CONFLICT No CHANGESET_CONSTRAINT +// +// If pbReplace is not NULL, and a record with a matching PK is found, and +// the conflict handler function returns SQLITE_CHANGESET_REPLACE, *pbReplace +// is set to non-zero before returning SQLITE_OK. +// +// If the conflict handler returns SQLITE_CHANGESET_ABORT, SQLITE_ABORT is +// returned. Or, if the conflict handler returns an invalid value, +// SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, +// this function returns SQLITE_OK. +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var res int32 = 0 // Value returned by conflict handler + // var rc int32 at bp+16, 4 + + // var nCol int32 at bp+8, 4 + + // var op int32 at bp+12, 4 + + // var zDummy uintptr at bp, 8 + + Xsqlite3changeset_op(tls, pIter, bp, bp+8, bp+12, uintptr(0)) + + // Bind the new.* PRIMARY KEY values to the SELECT statement. + if pbReplace != 0 { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sessionSeekToRow(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) + } else { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_ROW { + // There exists another row with the new.* primary key. + (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict = (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect + res = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xConflict})).f(tls, pCtx, eType, pIter) + (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) + } else if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + if (*SessionApplyCtx)(unsafe.Pointer(p)).FbDeferConstraints != 0 && eType == SQLITE_CHANGESET_CONFLICT { + // Instead of invoking the conflict handler, append the change blob + // to the SessionApplyCtx.constraints buffer. + var aBlob uintptr = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FaData + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent) + var nBlob int32 = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiNext - (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent + sessionAppendBlob(tls, p+88, aBlob, nBlob, bp+16) + return SQLITE_OK + } else { + // No other row with the new.* primary key. + res = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xConflict})).f(tls, pCtx, eType+1, pIter) + if res == SQLITE_CHANGESET_REPLACE { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_MISUSE + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + switch res { + case SQLITE_CHANGESET_REPLACE: + + *(*int32)(unsafe.Pointer(pbReplace)) = 1 + break + fallthrough + + case SQLITE_CHANGESET_OMIT: + break + fallthrough + + case SQLITE_CHANGESET_ABORT: + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ABORT + break + fallthrough + + default: + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_MISUSE + break + } + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sessionRebaseAdd(tls, p, res, pIter) + } + } + + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +// Attempt to apply the change that the iterator passed as the first argument +// currently points to to the database. If a conflict is encountered, invoke +// the conflict handler callback. +// +// If argument pbRetry is NULL, then ignore any CHANGESET_DATA conflict. If +// one is encountered, update or delete the row with the matching primary key +// instead. Or, if pbRetry is not NULL and a CHANGESET_DATA conflict occurs, +// invoke the conflict handler. If it returns CHANGESET_REPLACE, set *pbRetry +// to true before returning. In this case the caller will invoke this function +// again, this time with pbRetry set to NULL. +// +// If argument pbReplace is NULL and a CHANGESET_CONFLICT conflict is +// encountered invoke the conflict handler with CHANGESET_CONSTRAINT instead. +// Or, if pbReplace is not NULL, invoke it with CHANGESET_CONFLICT. If such +// an invocation returns SQLITE_CHANGESET_REPLACE, set *pbReplace to true +// before retrying. In this case the caller attempts to remove the conflicting +// row before invoking this function again, this time with pbReplace set +// to NULL. +// +// If any conflict handler returns SQLITE_CHANGESET_ABORT, this function +// returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is +// returned. +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + // var zDummy uintptr at bp, 8 + + // var op int32 at bp+12, 4 + + // var nCol int32 at bp+8, 4 + + var rc int32 = SQLITE_OK + + Xsqlite3changeset_op(tls, pIter, bp, bp+8, bp+12, uintptr(0)) + + if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_DELETE { + + // Bind values to the DELETE statement. If conflict handling is required, + // bind values for all columns and set bound variable (nCol+1) to true. + // Or, if conflict handling is not required, bind just the PK column + // values and, if it exists, set (nCol+1) to false. Conflict handling + // is not required if: + // + // * this is a patchset, or + // * (pbRetry==0), or + // * all columns of the table are PK columns (in this case there is + // no (nCol+1) variable to bind to). + var abPK uintptr = func() uintptr { + if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 { + return (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + } + return uintptr(0) + }() + rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{Xsqlite3changeset_old})), *(*int32)(unsafe.Pointer(bp + 8 /* nCol */)), abPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete) + if rc == SQLITE_OK && Xsqlite3_bind_parameter_count(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete) > *(*int32)(unsafe.Pointer(bp + 8)) { + rc = Xsqlite3_bind_int(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete, *(*int32)(unsafe.Pointer(bp + 8))+1, libc.Bool32(pbRetry == uintptr(0) || abPK != 0)) + } + if rc != SQLITE_OK { + return rc + } + + Xsqlite3_step(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete) + rc = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete) + if rc == SQLITE_OK && Xsqlite3_changes(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb) == 0 { + rc = sessionConflictHandler(tls, + SQLITE_CHANGESET_DATA, p, pIter, xConflict, pCtx, pbRetry) + } else if rc&0xff == SQLITE_CONSTRAINT { + rc = sessionConflictHandler(tls, + SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, uintptr(0)) + } + + } else if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_UPDATE { + var i int32 + *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)) = uintptr(0) + var bPatchset int32 = libc.Bool32(pbRetry == uintptr(0) || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0) + + rc = sessionUpdateFind(tls, pIter, p, bPatchset, bp+16) + + // Bind values to the UPDATE statement. + for i = 0; rc == SQLITE_OK && i < *(*int32)(unsafe.Pointer(bp + 8 /* nCol */)); i++ { + var pOld uintptr = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(i)*8)) + var pNew uintptr = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+i)*8)) + if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 || bPatchset == 0 && pOld != 0 { + rc = sessionBindValue(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)), i*2+2, pOld) + } + if rc == SQLITE_OK && pNew != 0 { + rc = sessionBindValue(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)), i*2+1, pNew) + } + } + if rc != SQLITE_OK { + return rc + } + + // Attempt the UPDATE. In the case of a NOTFOUND or DATA conflict, + // the result will be SQLITE_OK with 0 rows modified. + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */))) + + if rc == SQLITE_OK && Xsqlite3_changes(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb) == 0 { + // A NOTFOUND or DATA error. Search the table to see if it contains + // a row with a matching primary key. If so, this is a DATA conflict. + // Otherwise, if there is no primary key match, it is a NOTFOUND. + + rc = sessionConflictHandler(tls, + SQLITE_CHANGESET_DATA, p, pIter, xConflict, pCtx, pbRetry) + + } else if rc&0xff == SQLITE_CONSTRAINT { + // This is always a CONSTRAINT conflict. + rc = sessionConflictHandler(tls, + SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, uintptr(0)) + } + + } else { + + if (*SessionApplyCtx)(unsafe.Pointer(p)).FbStat1 != 0 { + // Check if there is a conflicting row. For sqlite_stat1, this needs + // to be done using a SELECT, as there is no PRIMARY KEY in the + // database schema to throw an exception if a duplicate is inserted. + rc = sessionSeekToRow(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) + if rc == SQLITE_ROW { + rc = SQLITE_CONSTRAINT + Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) + } + } + + if rc == SQLITE_OK { + rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{Xsqlite3changeset_new})), *(*int32)(unsafe.Pointer(bp + 8 /* nCol */)), uintptr(0), (*SessionApplyCtx)(unsafe.Pointer(p)).FpInsert) + if rc != SQLITE_OK { + return rc + } + + Xsqlite3_step(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpInsert) + rc = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpInsert) + } + + if rc&0xff == SQLITE_CONSTRAINT { + rc = sessionConflictHandler(tls, + SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, pbReplace) + } + } + + return rc +} + +// Attempt to apply the change that the iterator passed as the first argument +// currently points to to the database. If a conflict is encountered, invoke +// the conflict handler callback. +// +// The difference between this function and sessionApplyOne() is that this +// function handles the case where the conflict-handler is invoked and +// returns SQLITE_CHANGESET_REPLACE - indicating that the change should be +// retried in some manner. +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*int32)(unsafe.Pointer(bp /* bReplace */)) = 0 + *(*int32)(unsafe.Pointer(bp + 4 /* bRetry */)) = 0 + var rc int32 + + rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, bp, bp+4) + if rc == SQLITE_OK { + // If the bRetry flag is set, the change has not been applied due to an + // SQLITE_CHANGESET_DATA problem (i.e. this is an UPDATE or DELETE and + // a row with the correct PK is present in the db, but one or more other + // fields do not contain the expected values) and the conflict handler + // returned SQLITE_CHANGESET_REPLACE. In this case retry the operation, + // but pass NULL as the final argument so that sessionApplyOneOp() ignores + // the SQLITE_CHANGESET_DATA problem. + if *(*int32)(unsafe.Pointer(bp + 4)) != 0 { + + rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) + } else if *(*int32)(unsafe.Pointer(bp)) != 0 { + + rc = Xsqlite3_exec(tls, db, ts+33145, uintptr(0), uintptr(0), uintptr(0)) + if rc == SQLITE_OK { + rc = sessionBindRow(tls, pIter, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + }{Xsqlite3changeset_new})), (*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete) + Xsqlite3_bind_int(tls, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol+1, 1) + } + if rc == SQLITE_OK { + Xsqlite3_step(tls, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete) + rc = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete) + } + if rc == SQLITE_OK { + rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) + } + if rc == SQLITE_OK { + rc = Xsqlite3_exec(tls, db, ts+33166, uintptr(0), uintptr(0), uintptr(0)) + } + } + } + + return rc +} + +// Retry the changes accumulated in the pApply->constraints buffer. +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK + + for (*SessionApplyCtx)(unsafe.Pointer(pApply)).Fconstraints.FnBuf != 0 { + *(*uintptr)(unsafe.Pointer(bp /* pIter2 */)) = uintptr(0) + var cons = (*SessionApplyCtx)(unsafe.Pointer(pApply)).Fconstraints + libc.Xmemset(tls, pApply+88, 0, uint64(unsafe.Sizeof(SessionBuffer{}))) + + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionChangesetStart(tls, + bp, uintptr(0), uintptr(0), cons.FnBuf, cons.FaBuf, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FbInvertConstraints, 1) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + var nByte Size_t = uint64(2*(*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol) * uint64(unsafe.Sizeof(uintptr(0))) + var rc2 int32 + (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FbPatchset = bPatchset + (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FzTab = zTab + (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FnCol = (*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol + (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FabPK = (*SessionApplyCtx)(unsafe.Pointer(pApply)).FabPK + sessionBufferGrow(tls, *(*uintptr)(unsafe.Pointer(bp))+72, int64(nByte), bp+8) + (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FapValue = (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).Ftblhdr.FaBuf + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + libc.Xmemset(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FapValue, 0, nByte) + } + + for *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, *(*uintptr)(unsafe.Pointer(bp))) { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionApplyOneWithRetry(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pIter2 */)), pApply, xConflict, pCtx) + } + + rc2 = Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter2 */))) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = rc2 + } + } + + Xsqlite3_free(tls, cons.FaBuf) + if *(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK { + break + } + if (*SessionApplyCtx)(unsafe.Pointer(pApply)).Fconstraints.FnBuf >= cons.FnBuf { + // No progress was made on the last round. + (*SessionApplyCtx)(unsafe.Pointer(pApply)).FbDeferConstraints = 0 + } + } + + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) +} + +// Argument pIter is a changeset iterator that has been initialized, but +// not yet passed to sqlite3changeset_next(). This function applies the +// changeset to the main database attached to handle "db". The supplied +// conflict handler callback is invoked to resolve any conflicts encountered +// while applying the change. +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ + bp := tls.Alloc(368) + defer tls.Free(368) + + var schemaMismatch int32 = 0 + var rc int32 = SQLITE_OK // Return code + *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) = uintptr(0) // Name of current table + var nTab int32 = 0 // Result of sqlite3Strlen30(zTab) + // var sApply SessionApplyCtx at bp+48, 128 + // changeset_apply() context object + var bPatchset int32 + + (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FbNoDiscard = 1 + libc.Xmemset(tls, bp+48, 0, uint64(unsafe.Sizeof(SessionApplyCtx{}))) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbRebase = U8(libc.Bool32(ppRebase != 0 && pnRebase != 0)) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) + Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) + if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { + rc = Xsqlite3_exec(tls, db, ts+33185, uintptr(0), uintptr(0), uintptr(0)) + } + if rc == SQLITE_OK { + rc = Xsqlite3_exec(tls, db, ts+33211, uintptr(0), uintptr(0), uintptr(0)) + } + for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { + // var nCol int32 at bp+184, 4 + + // var op int32 at bp+188, 4 + + // var zNew uintptr at bp+176, 8 + + Xsqlite3changeset_op(tls, pIter, bp+176, bp+184, bp+188, uintptr(0)) + + if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) || Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(bp + 176)), *(*uintptr)(unsafe.Pointer(bp + 200)), nTab+1) != 0 { + // var abPK uintptr at bp+192, 8 + + rc = sessionRetryConstraints(tls, + db, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48, xConflict, pCtx) + if rc != SQLITE_OK { + break + } + + sessionUpdateFree(tls, bp+48) + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FazCol) // cast works around VC++ bug + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpSelect) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Fdb = db + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpDelete = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpInsert = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpSelect = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = 0 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FazCol = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FabPK = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 0 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbDeferConstraints = 1 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbRebaseStarted = U8(0) + libc.Xmemset(tls, bp+48+88, 0, uint64(unsafe.Sizeof(SessionBuffer{}))) + + // If an xFilter() callback was specified, invoke it now. If the + // xFilter callback returns zero, skip this table. If it returns + // non-zero, proceed. + schemaMismatch = libc.Bool32(xFilter != 0 && 0 == (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xFilter})).f(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 176)))) + if schemaMismatch != 0 { + *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)))) + if *(*uintptr)(unsafe.Pointer(bp + 200)) == uintptr(0) { + rc = SQLITE_NOMEM + break + } + nTab = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FazCol = *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) + } else { + var nMinCol int32 = 0 + var i int32 + + Xsqlite3changeset_pk(tls, pIter, bp+192, uintptr(0)) + rc = sessionTableInfo(tls, uintptr(0), + db, ts+6323, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)), bp+48+32, bp+200, bp+48+40, bp+48+48) + if rc != SQLITE_OK { + break + } + for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol; i++ { + if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK + uintptr(i))) != 0 { + nMinCol = i + 1 + } + } + + if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { + schemaMismatch = 1 + Xsqlite3_log(tls, SQLITE_SCHEMA, + ts+33241, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { + schemaMismatch = 1 + Xsqlite3_log(tls, SQLITE_SCHEMA, + + ts+33285, + libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) + } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { + schemaMismatch = 1 + Xsqlite3_log(tls, SQLITE_SCHEMA, + ts+33356, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + } else { + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11224) { + if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { + break + } + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 1 + } else { + if libc.AssignInt32(&rc, sessionSelectRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200)), bp+48)) != 0 || + libc.AssignInt32(&rc, sessionDeleteRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200)), bp+48)) != 0 || + libc.AssignInt32(&rc, sessionInsertRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200)), bp+48)) != 0 { + break + } + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 0 + } + } + nTab = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */))) + } + } + + // If there is a schema mismatch on the current table, proceed to the + // next change. A log message has already been issued. + if schemaMismatch != 0 { + continue + } + + rc = sessionApplyOneWithRetry(tls, db, pIter, bp+48, xConflict, pCtx) + } + + bPatchset = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset + if rc == SQLITE_OK { + rc = Xsqlite3changeset_finalize(tls, pIter) + } else { + Xsqlite3changeset_finalize(tls, pIter) + } + + if rc == SQLITE_OK { + rc = sessionRetryConstraints(tls, db, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48, xConflict, pCtx) + } + + if rc == SQLITE_OK { + // var nFk int32 at bp+208, 4 + + // var notUsed int32 at bp+212, 4 + + Xsqlite3_db_status(tls, db, SQLITE_DBSTATUS_DEFERRED_FKS, bp+208, bp+212, 0) + if *(*int32)(unsafe.Pointer(bp + 208)) != 0 { + var res int32 = SQLITE_CHANGESET_ABORT + // var sIter Sqlite3_changeset_iter at bp+216, 152 + + libc.Xmemset(tls, bp+216, 0, uint64(unsafe.Sizeof(Sqlite3_changeset_iter{}))) + (*Sqlite3_changeset_iter)(unsafe.Pointer(bp + 216 /* &sIter */)).FnCol = *(*int32)(unsafe.Pointer(bp + 208 /* nFk */)) + res = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xConflict})).f(tls, pCtx, SQLITE_CHANGESET_FOREIGN_KEY, bp+216 /* &sIter */) + if res != SQLITE_CHANGESET_OMIT { + rc = SQLITE_CONSTRAINT + } + } + } + Xsqlite3_exec(tls, db, ts+33416, uintptr(0), uintptr(0), uintptr(0)) + + if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { + if rc == SQLITE_OK { + rc = Xsqlite3_exec(tls, db, ts+33446, uintptr(0), uintptr(0), uintptr(0)) + } else { + Xsqlite3_exec(tls, db, ts+33470, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33446, uintptr(0), uintptr(0), uintptr(0)) + } + } + + if rc == SQLITE_OK && bPatchset == 0 && (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FbRebase != 0 { + *(*uintptr)(unsafe.Pointer(ppRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FaBuf + *(*int32)(unsafe.Pointer(pnRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FnBuf + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FaBuf = uintptr(0) + } + sessionUpdateFree(tls, bp+48) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpSelect) + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FazCol) // cast works around VC++ bug + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).Fconstraints.FaBuf) + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).Frebase.FaBuf) + Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) + return rc +} + +// Apply the changeset passed via pChangeset/nChangeset to the main +// database attached to handle "db". +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pIter uintptr at bp, 8 + // Iterator to skip through changeset + var bInv int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) + var rc int32 = sessionChangesetStart(tls, bp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInv, 1) + if rc == SQLITE_OK { + rc = sessionChangesetApply(tls, + db, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xFilter, xConflict, pCtx, ppRebase, pnRebase, flags) + } + return rc +} + +// Apply the changeset passed via pChangeset/nChangeset to the main database +// attached to handle "db". Invoke the supplied conflict handler callback +// to resolve any conflicts encountered while applying the change. +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ + return Xsqlite3changeset_apply_v2(tls, + db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) +} + +// Apply the changeset passed via xInput/pIn to the main database +// attached to handle "db". Invoke the supplied conflict handler callback +// to resolve any conflicts encountered while applying the change. +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pIter uintptr at bp, 8 + // Iterator to skip through changeset + var bInverse int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) + var rc int32 = sessionChangesetStart(tls, bp, xInput, pIn, 0, uintptr(0), bInverse, 1) + if rc == SQLITE_OK { + rc = sessionChangesetApply(tls, + db, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xFilter, xConflict, pCtx, ppRebase, pnRebase, flags) + } + return rc +} + +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ + return Xsqlite3changeset_apply_v2_strm(tls, + db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) +} + +// This function is called to merge two changes to the same row together as +// part of an sqlite3changeset_concat() operation. A new change object is +// allocated and a pointer to it stored in *ppNew. +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pNew uintptr = uintptr(0) + var rc int32 = SQLITE_OK + + if !(pExist != 0) { + pNew = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(SessionChange{}))+uint64(nRec))) + if !(pNew != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(SessionChange{}))) + (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(op2) + (*SessionChange)(unsafe.Pointer(pNew)).FbIndirect = U8(bIndirect) + (*SessionChange)(unsafe.Pointer(pNew)).FaRecord = pNew + 1*32 + if bIndirect == 0 || bRebase == 0 { + (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = nRec + libc.Xmemcpy(tls, (*SessionChange)(unsafe.Pointer(pNew)).FaRecord, aRec, uint64(nRec)) + } else { + var i int32 + var pIn uintptr = aRec + var pOut uintptr = (*SessionChange)(unsafe.Pointer(pNew)).FaRecord + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { + var nIn int32 = sessionSerialLen(tls, pIn) + if int32(*(*U8)(unsafe.Pointer(pIn))) == 0 { + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0) + } else if int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) == 0 { + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0xFF) + } else { + libc.Xmemcpy(tls, pOut, pIn, uint64(nIn)) + pOut += uintptr(nIn) + } + pIn += uintptr(nIn) + } + (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = int32((int64(pOut) - int64((*SessionChange)(unsafe.Pointer(pNew)).FaRecord)) / 1) + } + } else if bRebase != 0 { + if int32((*SessionChange)(unsafe.Pointer(pExist)).Fop) == SQLITE_DELETE && (*SessionChange)(unsafe.Pointer(pExist)).FbIndirect != 0 { + *(*uintptr)(unsafe.Pointer(ppNew)) = pExist + } else { + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(nRec+(*SessionChange)(unsafe.Pointer(pExist)).FnRecord) + uint64(unsafe.Sizeof(SessionChange{}))) + pNew = Xsqlite3_malloc64(tls, uint64(nByte)) + if pNew == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var i int32 + var a1 uintptr = (*SessionChange)(unsafe.Pointer(pExist)).FaRecord + var a2 uintptr = aRec + var pOut uintptr + + libc.Xmemset(tls, pNew, 0, uint64(nByte)) + (*SessionChange)(unsafe.Pointer(pNew)).FbIndirect = U8(libc.Bool32(bIndirect != 0 || (*SessionChange)(unsafe.Pointer(pExist)).FbIndirect != 0)) + (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(op2) + pOut = libc.AssignPtrUintptr(pNew+16, pNew+1*32) + + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { + var n1 int32 = sessionSerialLen(tls, a1) + var n2 int32 = sessionSerialLen(tls, a2) + if int32(*(*U8)(unsafe.Pointer(a1))) == 0xFF || int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) == 0 && bIndirect != 0 { + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0xFF) + } else if int32(*(*U8)(unsafe.Pointer(a2))) == 0 { + libc.Xmemcpy(tls, pOut, a1, uint64(n1)) + pOut += uintptr(n1) + } else { + libc.Xmemcpy(tls, pOut, a2, uint64(n2)) + pOut += uintptr(n2) + } + a1 += uintptr(n1) + a2 += uintptr(n2) + } + (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = int32((int64(pOut) - int64((*SessionChange)(unsafe.Pointer(pNew)).FaRecord)) / 1) + } + Xsqlite3_free(tls, pExist) + } + } else { + var op1 int32 = int32((*SessionChange)(unsafe.Pointer(pExist)).Fop) + + // op1=INSERT, op2=INSERT -> Unsupported. Discard op2. + // op1=INSERT, op2=UPDATE -> INSERT. + // op1=INSERT, op2=DELETE -> (none) + // + // op1=UPDATE, op2=INSERT -> Unsupported. Discard op2. + // op1=UPDATE, op2=UPDATE -> UPDATE. + // op1=UPDATE, op2=DELETE -> DELETE. + // + // op1=DELETE, op2=INSERT -> UPDATE. + // op1=DELETE, op2=UPDATE -> Unsupported. Discard op2. + // op1=DELETE, op2=DELETE -> Unsupported. Discard op2. + if op1 == SQLITE_INSERT && op2 == SQLITE_INSERT || + op1 == SQLITE_UPDATE && op2 == SQLITE_INSERT || + op1 == SQLITE_DELETE && op2 == SQLITE_UPDATE || + op1 == SQLITE_DELETE && op2 == SQLITE_DELETE { + pNew = pExist + } else if op1 == SQLITE_INSERT && op2 == SQLITE_DELETE { + Xsqlite3_free(tls, pExist) + + } else { + var aExist uintptr = (*SessionChange)(unsafe.Pointer(pExist)).FaRecord + var nByte Sqlite3_int64 + // var aCsr uintptr at bp+8, 8 + + // Allocate a new SessionChange object. Ensure that the aRecord[] + // buffer of the new object is large enough to hold any record that + // may be generated by combining the input records. + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(SessionChange{})) + uint64((*SessionChange)(unsafe.Pointer(pExist)).FnRecord) + uint64(nRec)) + pNew = Xsqlite3_malloc64(tls, uint64(nByte)) + if !(pNew != 0) { + Xsqlite3_free(tls, pExist) + return SQLITE_NOMEM + } + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(SessionChange{}))) + (*SessionChange)(unsafe.Pointer(pNew)).FbIndirect = U8(libc.Bool32(bIndirect != 0 && (*SessionChange)(unsafe.Pointer(pExist)).FbIndirect != 0)) + *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)) = libc.AssignPtrUintptr(pNew+16, pNew+1*32) + + if op1 == SQLITE_INSERT { // INSERT + UPDATE + *(*uintptr)(unsafe.Pointer(bp /* a1 */)) = aRec + + (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_INSERT) + if bPatchset == 0 { + sessionSkipRecord(tls, bp, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) + } + sessionMergeRecord(tls, bp+8, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aExist, *(*uintptr)(unsafe.Pointer(bp /* a1 */))) + } else if op1 == SQLITE_DELETE { // DELETE + INSERT + + (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_UPDATE) + if bPatchset != 0 { + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)), aRec, uint64(nRec)) + *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)) += uintptr(nRec) + } else { + if 0 == sessionMergeUpdate(tls, bp+8, pTab, bPatchset, aExist, uintptr(0), aRec, uintptr(0)) { + Xsqlite3_free(tls, pNew) + pNew = uintptr(0) + } + } + } else if op2 == SQLITE_UPDATE { // UPDATE + UPDATE + *(*uintptr)(unsafe.Pointer(bp + 16 /* a1 */)) = aExist + *(*uintptr)(unsafe.Pointer(bp + 24 /* a2 */)) = aRec + + if bPatchset == 0 { + sessionSkipRecord(tls, bp+16, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) + sessionSkipRecord(tls, bp+24, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) + } + (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_UPDATE) + if 0 == sessionMergeUpdate(tls, bp+8, pTab, bPatchset, aRec, aExist, *(*uintptr)(unsafe.Pointer(bp + 16)), *(*uintptr)(unsafe.Pointer(bp + 24))) { + Xsqlite3_free(tls, pNew) + pNew = uintptr(0) + } + } else { // UPDATE + DELETE + + (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_DELETE) + if bPatchset != 0 { + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)), aRec, uint64(nRec)) + *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)) += uintptr(nRec) + } else { + sessionMergeRecord(tls, bp+8, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aRec, aExist) + } + } + + if pNew != 0 { + (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 8))) - int64((*SessionChange)(unsafe.Pointer(pNew)).FaRecord)) / 1) + } + Xsqlite3_free(tls, pExist) + } + } + + *(*uintptr)(unsafe.Pointer(ppNew)) = pNew + return rc +} + +// Add all changes in the changeset traversed by the iterator passed as +// the first argument to the changegroup hash tables. +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + // var aRec uintptr at bp, 8 + + // var nRec int32 at bp+8, 4 + + var rc int32 = SQLITE_OK + var pTab uintptr = uintptr(0) + + for SQLITE_ROW == sessionChangesetNext(tls, pIter, bp, bp+8, uintptr(0)) { + // var zNew uintptr at bp+16, 8 + + // var nCol int32 at bp+24, 4 + + // var op int32 at bp+28, 4 + + var iHash int32 + // var bIndirect int32 at bp+32, 4 + + // var pChange uintptr at bp+48, 8 + + var pExist uintptr = uintptr(0) + var pp uintptr + + if (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList == uintptr(0) { + (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset + } else if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch { + rc = SQLITE_ERROR + break + } + + Xsqlite3changeset_op(tls, pIter, bp+16, bp+24, bp+28, bp+32) + if !(pTab != 0) || Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), (*SessionTable)(unsafe.Pointer(pTab)).FzName) != 0 { + // Search the list for a matching table + var nNew int32 = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zNew */)))) + // var abPK uintptr at bp+40, 8 + + Xsqlite3changeset_pk(tls, pIter, bp+40, uintptr(0)) + for pTab = (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList; pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext { + if 0 == Xsqlite3_strnicmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer(bp + 16)), nNew+1) { + break + } + } + if !(pTab != 0) { + var ppTab uintptr + + pTab = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(SessionTable{}))+uint64(*(*int32)(unsafe.Pointer(bp + 24)))+uint64(nNew)+uint64(1))) + if !(pTab != 0) { + rc = SQLITE_NOMEM + break + } + libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(SessionTable{}))) + (*SessionTable)(unsafe.Pointer(pTab)).FnCol = *(*int32)(unsafe.Pointer(bp + 24 /* nCol */)) + (*SessionTable)(unsafe.Pointer(pTab)).FabPK = pTab + 1*56 + libc.Xmemcpy(tls, (*SessionTable)(unsafe.Pointer(pTab)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 40 /* abPK */)), uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nCol */)))) + (*SessionTable)(unsafe.Pointer(pTab)).FzName = (*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(*(*int32)(unsafe.Pointer(bp + 24))) + libc.Xmemcpy(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer(bp + 16 /* zNew */)), uint64(nNew+1)) + + // The new object must be linked on to the end of the list, not + // simply added to the start of it. This is to ensure that the + // tables within the output of sqlite3changegroup_output() are in + // the right order. + for ppTab = pGrp + 8; *(*uintptr)(unsafe.Pointer(ppTab)) != 0; ppTab = *(*uintptr)(unsafe.Pointer(ppTab)) { + } + *(*uintptr)(unsafe.Pointer(ppTab)) = pTab + } else if (*SessionTable)(unsafe.Pointer(pTab)).FnCol != *(*int32)(unsafe.Pointer(bp + 24)) || libc.Xmemcmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 40)), uint64(*(*int32)(unsafe.Pointer(bp + 24)))) != 0 { + rc = SQLITE_SCHEMA + break + } + } + + if sessionGrowHash(tls, uintptr(0), (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, pTab) != 0 { + rc = SQLITE_NOMEM + break + } + iHash = int32(sessionChangeHash(tls, + pTab, libc.Bool32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 && *(*int32)(unsafe.Pointer(bp + 28)) == SQLITE_DELETE), *(*uintptr)(unsafe.Pointer(bp /* aRec */)), (*SessionTable)(unsafe.Pointer(pTab)).FnChange)) + + // Search for existing entry. If found, remove it from the hash table. + // Code below may link it back in. + for pp = (*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + var bPkOnly1 int32 = 0 + var bPkOnly2 int32 = 0 + if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 { + bPkOnly1 = libc.Bool32(int32((*SessionChange)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fop) == SQLITE_DELETE) + bPkOnly2 = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 28)) == SQLITE_DELETE) + } + if sessionChangeEqual(tls, pTab, bPkOnly1, (*SessionChange)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FaRecord, bPkOnly2, *(*uintptr)(unsafe.Pointer(bp))) != 0 { + pExist = *(*uintptr)(unsafe.Pointer(pp)) + *(*uintptr)(unsafe.Pointer(pp)) = (*SessionChange)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext + (*SessionTable)(unsafe.Pointer(pTab)).FnEntry-- + break + } + } + + rc = sessionChangeMerge(tls, pTab, bRebase, + (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, pExist, *(*int32)(unsafe.Pointer(bp + 28 /* op */)), *(*int32)(unsafe.Pointer(bp + 32 /* bIndirect */)), *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+48) + if rc != 0 { + break + } + if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { + (*SessionChange)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* pChange */)))).FpNext = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8)) + *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8)) = *(*uintptr)(unsafe.Pointer(bp + 48 /* pChange */)) + (*SessionTable)(unsafe.Pointer(pTab)).FnEntry++ + } + } + + if rc == SQLITE_OK { + rc = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Frc + } + return rc +} + +// Serialize a changeset (or patchset) based on all changesets (or patchsets) +// added to the changegroup object passed as the first argument. +// +// If xOutput is not NULL, then the changeset/patchset is returned to the +// user via one or more calls to xOutput, as with the other streaming +// interfaces. +// +// Or, if xOutput is NULL, then (*ppOut) is populated with a pointer to a +// buffer containing the output changeset before this function returns. In +// this case (*pnOut) is set to the size of the output buffer in bytes. It +// is the responsibility of the caller to free the output buffer using +// sqlite3_free() when it is no longer required. +// +// If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite +// error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) +// are both set to 0 before returning. +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} + var pTab uintptr + + // Create the serialized output changeset based on the contents of the + // hash tables attached to the SessionTable objects in list p->pList. + for pTab = (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList; *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK && pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext { + var i int32 + if (*SessionTable)(unsafe.Pointer(pTab)).FnEntry == 0 { + continue + } + + sessionAppendTableHdr(tls, bp, (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch, pTab, bp+16) + for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange; i++ { + var p uintptr + for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); p != 0; p = (*SessionChange)(unsafe.Pointer(p)).FpNext { + sessionAppendByte(tls, bp, (*SessionChange)(unsafe.Pointer(p)).Fop, bp+16) + sessionAppendByte(tls, bp, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+16) + sessionAppendBlob(tls, bp, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp+16) + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && xOutput != 0 && (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf >= sessions_strm_chunk_size { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf) + (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf = 0 + } + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + if xOutput != 0 { + if (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf > 0 { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf) + } + } else if ppOut != 0 { + *(*uintptr)(unsafe.Pointer(ppOut)) = (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf + if pnOut != 0 { + *(*int32)(unsafe.Pointer(pnOut)) = (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf + } + (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf = uintptr(0) + } + } + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf) + + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +// Allocate a new, empty, sqlite3_changegroup. +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ + var rc int32 = SQLITE_OK // Return code + var p uintptr // New object + p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) + if p == uintptr(0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3_changegroup{}))) + } + *(*uintptr)(unsafe.Pointer(pp)) = p + return rc +} + +// Add the changeset currently stored in buffer pData, size nData bytes, +// to changeset-group p. +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pIter uintptr at bp, 8 + // Iterator opened on pData/nData + var rc int32 // Return code + + rc = Xsqlite3changeset_start(tls, bp, nData, pData) + if rc == SQLITE_OK { + rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), pGrp, 0) + } + Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + return rc +} + +// Obtain a buffer containing a changeset representing the concatenation +// of all changesets added to the group so far. +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ + return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) +} + +// Streaming versions of changegroup_add(). +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pIter uintptr at bp, 8 + // Iterator opened on pData/nData + var rc int32 // Return code + + rc = Xsqlite3changeset_start_strm(tls, bp, xInput, pIn) + if rc == SQLITE_OK { + rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), pGrp, 0) + } + Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + return rc +} + +// Streaming versions of changegroup_output(). +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ + return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) +} + +// Delete a changegroup object. +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ + if pGrp != 0 { + sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) + Xsqlite3_free(tls, pGrp) + } +} + +// Combine two changesets together. +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pGrp uintptr at bp, 8 + + var rc int32 + + rc = Xsqlite3changegroup_new(tls, bp) + if rc == SQLITE_OK { + rc = Xsqlite3changegroup_add(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), nLeft, pLeft) + } + if rc == SQLITE_OK { + rc = Xsqlite3changegroup_add(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), nRight, pRight) + } + if rc == SQLITE_OK { + rc = Xsqlite3changegroup_output(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), pnOut, ppOut) + } + Xsqlite3changegroup_delete(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */))) + + return rc +} + +// Streaming version of sqlite3changeset_concat(). +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var pGrp uintptr at bp, 8 + + var rc int32 + + rc = Xsqlite3changegroup_new(tls, bp) + if rc == SQLITE_OK { + rc = Xsqlite3changegroup_add_strm(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), xInputA, pInA) + } + if rc == SQLITE_OK { + rc = Xsqlite3changegroup_add_strm(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), xInputB, pInB) + } + if rc == SQLITE_OK { + rc = Xsqlite3changegroup_output_strm(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), xOutput, pOut) + } + Xsqlite3changegroup_delete(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */))) + + return rc +} + +// Buffers a1 and a2 must both contain a sessions module record nCol +// fields in size. This function appends an nCol sessions module +// record to buffer pBuf that is a copy of a1, except that for +// each field that is undefined in a1[], swap in the field from a2[]. +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ + sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var i int32 + var pOut uintptr = (*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf) + for i = 0; i < nCol; i++ { + var nn1 int32 = sessionSerialLen(tls, a1) + var nn2 int32 = sessionSerialLen(tls, a2) + if int32(*(*U8)(unsafe.Pointer(a1))) == 0 || int32(*(*U8)(unsafe.Pointer(a1))) == 0xFF { + libc.Xmemcpy(tls, pOut, a2, uint64(nn2)) + pOut += uintptr(nn2) + } else { + libc.Xmemcpy(tls, pOut, a1, uint64(nn1)) + pOut += uintptr(nn1) + } + a1 += uintptr(nn1) + a2 += uintptr(nn2) + } + + (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf = int32((int64(pOut) - int64((*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf)) / 1) + + } +} + +// This function is called when rebasing a local UPDATE change against one +// or more remote UPDATE changes. The aRec/nRec buffer contains the current +// old.* and new.* records for the change. The rebase buffer (a single +// record) is in aChange/nChange. The rebased change is appended to buffer +// pBuf. +// +// Rebasing the UPDATE involves: +// +// * Removing any changes to fields for which the corresponding field +// in the rebase buffer is set to "replaced" (type 0xFF). If this +// means the UPDATE change updates no fields, nothing is appended +// to the output buffer. +// +// * For each field modified by the local change for which the +// corresponding field in the rebase buffer is not "undefined" (0x00) +// or "replaced" (0xFF), the old.* value is replaced by the value +// in the rebase buffer. +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ + sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var bData int32 = 0 + var pOut uintptr = (*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf) + var i int32 + var a1 uintptr = aRec + var a2 uintptr = aChange + + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(SQLITE_UPDATE) + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect) + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; i++ { + var n1 int32 = sessionSerialLen(tls, a1) + var n2 int32 = sessionSerialLen(tls, a2) + if *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK + uintptr(i))) != 0 || int32(*(*U8)(unsafe.Pointer(a2))) == 0 { + if !(int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK + uintptr(i)))) != 0) && *(*U8)(unsafe.Pointer(a1)) != 0 { + bData = 1 + } + libc.Xmemcpy(tls, pOut, a1, uint64(n1)) + pOut += uintptr(n1) + } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + bData = 1 + libc.Xmemcpy(tls, pOut, a2, uint64(n2)) + pOut += uintptr(n2) + } else { + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0) + } + a1 += uintptr(n1) + a2 += uintptr(n2) + } + if bData != 0 { + a2 = aChange + for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; i++ { + var n1 int32 = sessionSerialLen(tls, a1) + var n2 int32 = sessionSerialLen(tls, a2) + if *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK + uintptr(i))) != 0 || int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF { + libc.Xmemcpy(tls, pOut, a1, uint64(n1)) + pOut += uintptr(n1) + } else { + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0) + } + a1 += uintptr(n1) + a2 += uintptr(n2) + } + (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf = int32((int64(pOut) - int64((*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf)) / 1) + } + } +} + +// pIter is configured to iterate through a changeset. This function rebases +// that changeset according to the current configuration of the rebaser +// object passed as the first argument. If no error occurs and argument xOutput +// is not NULL, then the changeset is returned to the caller by invoking +// xOutput zero or more times and SQLITE_OK returned. Or, if xOutput is NULL, +// then (*ppOut) is set to point to a buffer containing the rebased changeset +// before this function returns. In this case (*pnOut) is set to the size of +// the buffer in bytes. It is the responsibility of the caller to eventually +// free the (*ppOut) buffer using sqlite3_free(). +// +// If an error occurs, an SQLite error code is returned. If ppOut and +// pnOut are not NULL, then the two output parameters are set to 0 before +// returning. +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp /* aRec */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)) = 0 + *(*int32)(unsafe.Pointer(bp + 12 /* bNew */)) = 0 + var pTab uintptr = uintptr(0) + *(*SessionBuffer)(unsafe.Pointer(bp + 16 /* sOut */)) = SessionBuffer{} + + for SQLITE_ROW == sessionChangesetNext(tls, pIter, bp, bp+8, bp+12) { + var pChange uintptr = uintptr(0) + var bDone int32 = 0 + + if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { + var zTab uintptr = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab + for pTab = (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList; pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext { + if 0 == Xsqlite3_stricmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zTab) { + break + } + } + *(*int32)(unsafe.Pointer(bp + 12 /* bNew */)) = 0 + + // A patchset may not be rebased + if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR + } + + // Append a table header to the output for this new table + sessionAppendByte(tls, bp+16, func() uint8 { + if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 { + return uint8('P') + } + return uint8('T') + }(), bp+32 /* &rc */) + sessionAppendVarint(tls, bp+16, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+32) + sessionAppendBlob(tls, bp+16, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+32) + sessionAppendBlob(tls, bp+16, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, int32(libc.Xstrlen(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab))+1, bp+32) + } + + if pTab != 0 && *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK { + var iHash int32 = int32(sessionChangeHash(tls, pTab, 0, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), (*SessionTable)(unsafe.Pointer(pTab)).FnChange)) + + for pChange = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8)); pChange != 0; pChange = (*SessionChange)(unsafe.Pointer(pChange)).FpNext { + if sessionChangeEqual(tls, pTab, 0, *(*uintptr)(unsafe.Pointer(bp)), 0, (*SessionChange)(unsafe.Pointer(pChange)).FaRecord) != 0 { + break + } + } + } + + if pChange != 0 { + + switch (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop { + case SQLITE_INSERT: + if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_INSERT { + bDone = 1 + if int32((*SessionChange)(unsafe.Pointer(pChange)).FbIndirect) == 0 { + sessionAppendByte(tls, bp+16, uint8(SQLITE_UPDATE), bp+32) + sessionAppendByte(tls, bp+16, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32) + sessionAppendBlob(tls, bp+16, (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+32) + sessionAppendBlob(tls, bp+16, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+32) + } + } + break + fallthrough + + case SQLITE_UPDATE: + bDone = 1 + if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_DELETE { + if int32((*SessionChange)(unsafe.Pointer(pChange)).FbIndirect) == 0 { + *(*uintptr)(unsafe.Pointer(bp + 40 /* pCsr */)) = *(*uintptr)(unsafe.Pointer(bp /* aRec */)) + sessionSkipRecord(tls, bp+40, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) + sessionAppendByte(tls, bp+16, uint8(SQLITE_INSERT), bp+32) + sessionAppendByte(tls, bp+16, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32) + sessionAppendRecordMerge(tls, bp+16, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, + *(*uintptr)(unsafe.Pointer(bp + 40 /* pCsr */)), int32(int64(*(*int32)(unsafe.Pointer(bp + 8)))-(int64(*(*uintptr)(unsafe.Pointer(bp + 40)))-int64(*(*uintptr)(unsafe.Pointer(bp))))/1), + (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+32) + } + } else { + sessionAppendPartialUpdate(tls, bp+16, pIter, + *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+32) + } + break + fallthrough + + default: + + bDone = 1 + if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_INSERT { + sessionAppendByte(tls, bp+16, uint8(SQLITE_DELETE), bp+32) + sessionAppendByte(tls, bp+16, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32) + sessionAppendRecordMerge(tls, bp+16, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, + (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+32) + } + break + } + } + + if bDone == 0 { + sessionAppendByte(tls, bp+16, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop), bp+32) + sessionAppendByte(tls, bp+16, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32) + sessionAppendBlob(tls, bp+16, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+32) + } + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK && xOutput != 0 && (*SessionBuffer)(unsafe.Pointer(bp+16)).FnBuf > sessions_strm_chunk_size { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FnBuf) + (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FnBuf = 0 + } + if *(*int32)(unsafe.Pointer(bp + 32)) != 0 { + break + } + } + + if *(*int32)(unsafe.Pointer(bp + 32)) != SQLITE_OK { + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf) + libc.Xmemset(tls, bp+16, 0, uint64(unsafe.Sizeof(SessionBuffer{}))) + } + + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK { + if xOutput != 0 { + if (*SessionBuffer)(unsafe.Pointer(bp+16)).FnBuf > 0 { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FnBuf) + } + } else if ppOut != 0 { + *(*uintptr)(unsafe.Pointer(ppOut)) = (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FaBuf + *(*int32)(unsafe.Pointer(pnOut)) = (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FnBuf + (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FaBuf = uintptr(0) + } + } + Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf) + return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) +} + +// Create a new rebaser object. +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ + var rc int32 = SQLITE_OK + var pNew uintptr + + pNew = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_rebaser{}))) + if pNew == uintptr(0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Sqlite3_rebaser{}))) + } + *(*uintptr)(unsafe.Pointer(ppNew)) = pNew + return rc +} + +// Call this one or more times to configure a rebaser. +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator opened on pData/nData + var rc int32 // Return code + rc = Xsqlite3changeset_start(tls, bp, nRebase, pRebase) + if rc == SQLITE_OK { + rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), p, 1) + } + Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + return rc +} + +// Rebase a changeset according to current rebaser configuration +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator to skip through input + var rc int32 = Xsqlite3changeset_start(tls, bp, nIn, pIn) + + if rc == SQLITE_OK { + rc = sessionRebase(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), uintptr(0), uintptr(0), pnOut, ppOut) + Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + } + + return rc +} + +// Rebase a changeset according to current rebaser configuration +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator to skip through input + var rc int32 = Xsqlite3changeset_start_strm(tls, bp, xInput, pIn) + + if rc == SQLITE_OK { + rc = sessionRebase(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xOutput, pOut, uintptr(0), uintptr(0)) + Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + } + + return rc +} + +// Destroy a rebaser object +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ + if p != 0 { + sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) + Xsqlite3_free(tls, p) + } +} + +// Global configuration +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ + var rc int32 = SQLITE_OK + switch op { + case SQLITE_SESSION_CONFIG_STRMSIZE: + { + var pInt uintptr = pArg + if *(*int32)(unsafe.Pointer(pInt)) > 0 { + sessions_strm_chunk_size = *(*int32)(unsafe.Pointer(pInt)) + } + *(*int32)(unsafe.Pointer(pInt)) = sessions_strm_chunk_size + break + + } + default: + rc = SQLITE_MISUSE + break + } + return rc +} + +//************* End of sqlite3session.c ************************************* +//************* Begin file fts5.c ******************************************* + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Interfaces to extend FTS5. Using the interfaces defined in this file, +// FTS5 may be extended with: +// +// * custom tokenizers, and +// * custom auxiliary functions. + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// + +// #include "fts5.h" +// #include "sqlite3ext.h" + +// #include +// #include + +// Truncate very long tokens to this many bytes. Hard limit is +// (65536-1-1-4-9)==65521 bytes. The limiting factor is the 16-bit offset +// field that occurs at the start of each leaf page (see fts5_index.c). + +// Maximum number of prefix indexes on single FTS5 table. This must be +// less than 32. If it is set to anything large than that, an #error +// directive in fts5_index.c will cause the build to fail. + +// Maximum segments permitted in a single index + +// Name of rank and rowid columns + +// The assert_nc() macro is similar to the assert() macro, except that it +// is used for assert() conditions that are true only if it can be +// guranteed that the database is not corrupt. + +// A version of memcmp() that does not cause asan errors if one of the pointer +// parameters is NULL and the number of bytes to compare is zero. + +// Mark a function parameter as unused, to suppress nuisance compiler +// warnings. + +type Fts5Global1 = struct { + Fapi Fts5_api + Fdb uintptr + FiNextId I64 + FpAux uintptr + FpTok uintptr + FpDfltTok uintptr + FpCsr uintptr +} /* sqlite3.c:216813:9 */ + +//************* End of sqlite3session.c ************************************* +//************* Begin file fts5.c ******************************************* + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Interfaces to extend FTS5. Using the interfaces defined in this file, +// FTS5 may be extended with: +// +// * custom tokenizers, and +// * custom auxiliary functions. + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// + +// #include "fts5.h" +// #include "sqlite3ext.h" + +// #include +// #include + +// Truncate very long tokens to this many bytes. Hard limit is +// (65536-1-1-4-9)==65521 bytes. The limiting factor is the 16-bit offset +// field that occurs at the start of each leaf page (see fts5_index.c). + +// Maximum number of prefix indexes on single FTS5 table. This must be +// less than 32. If it is set to anything large than that, an #error +// directive in fts5_index.c will cause the build to fail. + +// Maximum segments permitted in a single index + +// Name of rank and rowid columns + +// The assert_nc() macro is similar to the assert() macro, except that it +// is used for assert() conditions that are true only if it can be +// guranteed that the database is not corrupt. + +// A version of memcmp() that does not cause asan errors if one of the pointer +// parameters is NULL and the number of bytes to compare is zero. + +// Mark a function parameter as unused, to suppress nuisance compiler +// warnings. + +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ +type Fts5Colset1 = struct { + FnCol int32 + FaiCol [1]int32 +} /* sqlite3.c:216813:9 */ + +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ + +// ************************************************************************* +// +// Interface to code in fts5_config.c. fts5_config.c contains contains code +// to parse the arguments passed to the CREATE VIRTUAL TABLE statement. + +type Fts5Config1 = struct { + Fdb uintptr + FzDb uintptr + FzName uintptr + FnCol int32 + F__ccgo_pad1 [4]byte + FazCol uintptr + FabUnindexed uintptr + FnPrefix int32 + F__ccgo_pad2 [4]byte + FaPrefix uintptr + FeContent int32 + F__ccgo_pad3 [4]byte + FzContent uintptr + FzContentRowid uintptr + FbColumnsize int32 + FeDetail int32 + FzContentExprlist uintptr + FpTok uintptr + FpTokApi uintptr + FbLock int32 + FePattern int32 + FiCookie int32 + Fpgsz int32 + FnAutomerge int32 + FnCrisisMerge int32 + FnUsermerge int32 + FnHashSize int32 + FzRank uintptr + FzRankArgs uintptr + FpzErrmsg uintptr +} /* sqlite3.c:216813:9 */ + +// ************************************************************************* +// +// Interface to code in fts5_config.c. fts5_config.c contains contains code +// to parse the arguments passed to the CREATE VIRTUAL TABLE statement. + +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ + +// +// End of interface to code in fts5_config.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_buffer.c. + +// Buffer object for the incremental building of string data. +type Fts5Buffer1 = struct { + Fp uintptr + Fn int32 + FnSpace int32 +} /* sqlite3.c:216813:9 */ + +// +// End of interface to code in fts5_config.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_buffer.c. + +// Buffer object for the incremental building of string data. +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ + +type Fts5PoslistReader1 = struct { + Fa uintptr + Fn int32 + Fi int32 + FbFlag U8 + FbEof U8 + F__ccgo_pad1 [6]byte + FiPos I64 +} /* sqlite3.c:216813:9 */ + +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ + +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ + +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ + +// Bucket of terms object used by the integrity-check in offsets=0 mode. +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ + +// Bucket of terms object used by the integrity-check in offsets=0 mode. +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ + +// +// End of interface to code in fts5_buffer.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_index.c. fts5_index.c contains contains code +// to access the data stored in the %_data table. + +type Fts5Index1 = struct { + FpConfig uintptr + FzDataTbl uintptr + FnWorkUnit int32 + F__ccgo_pad1 [4]byte + FpHash uintptr + FnPendingData int32 + F__ccgo_pad2 [4]byte + FiWriteRowid I64 + FbDelete int32 + Frc int32 + FpReader uintptr + FpWriter uintptr + FpDeleter uintptr + FpIdxWriter uintptr + FpIdxDeleter uintptr + FpIdxSelect uintptr + FnRead int32 + F__ccgo_pad3 [4]byte + FpDataVersion uintptr + FiStructVersion I64 + FpStruct uintptr +} /* sqlite3.c:216813:9 */ + +// +// End of interface to code in fts5_buffer.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_index.c. fts5_index.c contains contains code +// to access the data stored in the %_data table. + +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ +type Fts5IndexIter1 = struct { + FiRowid I64 + FpData uintptr + FnData int32 + FbEof U8 + F__ccgo_pad1 [3]byte +} /* sqlite3.c:216813:9 */ + +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ + +// +// End of interface to code in fts5_varint.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_main.c. + +// Virtual-table object. +type Fts5Table1 = struct { + Fbase Sqlite3_vtab + FpConfig uintptr + FpIndex uintptr +} /* sqlite3.c:217254:9 */ + +// +// End of interface to code in fts5_varint.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_main.c. + +// Virtual-table object. +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ + +// +// End of interface to code in fts5.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_hash.c. +type Fts5Hash1 = struct { + FeDetail int32 + F__ccgo_pad1 [4]byte + FpnByte uintptr + FnEntry int32 + FnSlot int32 + FpScan uintptr + FaSlot uintptr +} /* sqlite3.c:216813:9 */ + +// +// End of interface to code in fts5.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_hash.c. +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ + +// +// End of interface to code in fts5_hash.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_storage.c. fts5_storage.c contains contains +// code to access the data stored in the %_content and %_docsize tables. + +type Fts5Storage1 = struct { + FpConfig uintptr + FpIndex uintptr + FbTotalsValid int32 + F__ccgo_pad1 [4]byte + FnTotalRow I64 + FaTotalSize uintptr + FaStmt [11]uintptr +} /* sqlite3.c:217336:9 */ + +// +// End of interface to code in fts5_hash.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_storage.c. fts5_storage.c contains contains +// code to access the data stored in the %_content and %_docsize tables. + +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ + +// +// End of interface to code in fts5_storage.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_expr.c. +type Fts5Expr1 = struct { + FpIndex uintptr + FpConfig uintptr + FpRoot uintptr + FbDesc int32 + FnPhrase int32 + FapExprPhrase uintptr +} /* sqlite3.c:216813:9 */ + +// +// End of interface to code in fts5_storage.c. +// + +// ************************************************************************* +// +// Interface to code in fts5_expr.c. +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ +type Fts5ExprNode1 = struct { + FeType int32 + FbEof int32 + FbNomatch int32 + F__ccgo_pad1 [4]byte + FxNext uintptr + FiRowid I64 + FpNear uintptr + FnChild int32 + F__ccgo_pad2 [4]byte + FapChild [1]uintptr +} /* sqlite3.c:216813:9 */ + +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ +type Fts5Parse1 = struct { + FpConfig uintptr + FzErr uintptr + Frc int32 + FnPhrase int32 + FapPhrase uintptr + FpExpr uintptr + FbPhraseToAnd int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:217381:9 */ + +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ +type Fts5Token1 = struct { + Fp uintptr + Fn int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:217382:9 */ + +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ +type Fts5ExprPhrase1 = struct { + FpNode uintptr + Fposlist Fts5Buffer + FnTerm int32 + F__ccgo_pad1 [4]byte + FaTerm [1]Fts5ExprTerm +} /* sqlite3.c:216813:9 */ + +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ +type Fts5ExprNearset1 = struct { + FnNear int32 + F__ccgo_pad1 [4]byte + FpColset uintptr + FnPhrase int32 + F__ccgo_pad2 [4]byte + FapPhrase [1]uintptr +} /* sqlite3.c:216813:9 */ + +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ + +type Fts5PoslistPopulator1 = struct { + Fwriter Fts5PoslistWriter + FbOk int32 + FbMiss int32 +} /* sqlite3.c:217432:9 */ + +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ +// +// End of interface to code in fts5_unicode2.c. +// + +// This file is automatically generated by Lemon from input grammar +// source file "fts5parse.y". +// 2000-05-29 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// Driver template for the LEMON parser generator. +// +// The "lemon" program processes an LALR(1) input grammar file, then uses +// this template to construct a parser. The "lemon" program inserts text +// at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the +// interstitial "-" characters) contained in this template is changed into +// the value of the %name directive from the grammar. Otherwise, the content +// of this template is copied straight through into the generate parser +// source file. +// +// The following is the concatenation of all %include directives from the +// input grammar file: +//*********** Begin %include sections from the grammar *********************** + +// #include "fts5Int.h" +// #include "fts5parse.h" + +// Disable all error recovery processing in the parser push-down +// automaton. + +// Make fts5yytestcase() the same as testcase() + +// Indicate that sqlite3ParserFree() will never be called with a null +// pointer. + +// Alternative datatype for the argument to the malloc() routine passed +// into sqlite3ParserAlloc(). The default is size_t. + +//*************** End of %include directives ********************************* +// These constants specify the various numeric values for terminal symbols. +// Begin token definitions ************************************ +//*************** End token definitions ************************************** + +// The next sections is a series of control #defines. +// various aspects of the generated parser. +// fts5YYCODETYPE is the data type used to store the integer codes +// that represent terminal and non-terminal symbols. +// "unsigned char" is used if there are fewer than +// 256 symbols. Larger types otherwise. +// fts5YYNOCODE is a number of type fts5YYCODETYPE that is not used for +// any terminal or nonterminal symbol. +// fts5YYFALLBACK If defined, this indicates that one or more tokens +// (also known as: "terminal symbols") have fall-back +// values which should be used if the original symbol +// would not parse. This permits keywords to sometimes +// be used as identifiers, for example. +// fts5YYACTIONTYPE is the data type used for "action codes" - numbers +// that indicate what to do in response to the next +// token. +// sqlite3Fts5ParserFTS5TOKENTYPE is the data type used for minor type for terminal +// symbols. Background: A "minor type" is a semantic +// value associated with a terminal or non-terminal +// symbols. For example, for an "ID" terminal symbol, +// the minor type might be the name of the identifier. +// Each non-terminal can have a different minor type. +// Terminal symbols all have the same minor type, though. +// This macros defines the minor type for terminal +// symbols. +// fts5YYMINORTYPE is the data type used for all minor types. +// This is typically a union of many types, one of +// which is sqlite3Fts5ParserFTS5TOKENTYPE. The entry in the union +// for terminal symbols is called "fts5yy0". +// fts5YYSTACKDEPTH is the maximum depth of the parser's stack. If +// zero the stack is dynamically sized using realloc() +// sqlite3Fts5ParserARG_SDECL A static variable declaration for the %extra_argument +// sqlite3Fts5ParserARG_PDECL A parameter declaration for the %extra_argument +// sqlite3Fts5ParserARG_PARAM Code to pass %extra_argument as a subroutine parameter +// sqlite3Fts5ParserARG_STORE Code to store %extra_argument into fts5yypParser +// sqlite3Fts5ParserARG_FETCH Code to extract %extra_argument from fts5yypParser +// sqlite3Fts5ParserCTX_* As sqlite3Fts5ParserARG_ except for %extra_context +// fts5YYERRORSYMBOL is the code number of the error symbol. If not +// defined, then do no error processing. +// fts5YYNSTATE the combined number of states. +// fts5YYNRULE the number of rules in the grammar +// fts5YYNFTS5TOKEN Number of terminal symbols +// fts5YY_MAX_SHIFT Maximum value for shift actions +// fts5YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions +// fts5YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions +// fts5YY_ERROR_ACTION The fts5yy_action[] code for syntax error +// fts5YY_ACCEPT_ACTION The fts5yy_action[] code for accept +// fts5YY_NO_ACTION The fts5yy_action[] code for no-op +// fts5YY_MIN_REDUCE Minimum value for reduce actions +// fts5YY_MAX_REDUCE Maximum value for reduce actions +//************ Begin control #defines **************************************** +type Fts5YYMINORTYPE = struct { + F__ccgo_pad1 [0]uint64 + Ffts5yyinit int32 + F__ccgo_pad2 [12]byte +} /* sqlite3.c:217708:3 */ +//************ End control #defines ****************************************** + +// Define the fts5yytestcase() macro to be a no-op if is not already defined +// otherwise. +// +// Applications can choose to define fts5yytestcase() in the %include section +// to a macro that can assist in verifying code coverage. For production +// code the fts5yytestcase() macro should be turned off. But it is useful +// for testing. + +// Next are the tables used to determine what action to take based on the +// current state and lookahead token. These tables are used to implement +// functions that take a state number and lookahead value and return an +// action integer. +// +// Suppose the action integer is N. Then the action is determined as +// follows +// +// 0 <= N <= fts5YY_MAX_SHIFT Shift N. That is, push the lookahead +// token onto the stack and goto state N. +// +// N between fts5YY_MIN_SHIFTREDUCE Shift to an arbitrary state then +// and fts5YY_MAX_SHIFTREDUCE reduce by rule N-fts5YY_MIN_SHIFTREDUCE. +// +// N == fts5YY_ERROR_ACTION A syntax error has occurred. +// +// N == fts5YY_ACCEPT_ACTION The parser accepts its input. +// +// N == fts5YY_NO_ACTION No such action. Denotes unused +// slots in the fts5yy_action[] table. +// +// N between fts5YY_MIN_REDUCE Reduce by rule N-fts5YY_MIN_REDUCE +// and fts5YY_MAX_REDUCE +// +// The action table is constructed as a single large table named fts5yy_action[]. +// Given state S and lookahead X, the action is computed as either: +// +// (A) N = fts5yy_action[ fts5yy_shift_ofst[S] + X ] +// (B) N = fts5yy_default[S] +// +// The (A) formula is preferred. The B formula is used instead if +// fts5yy_lookahead[fts5yy_shift_ofst[S]+X] is not equal to X. +// +// The formulas above are for computing the action when the lookahead is +// a terminal symbol. If the lookahead is a non-terminal (as occurs after +// a reduce action) then the fts5yy_reduce_ofst[] array is used in place of +// the fts5yy_shift_ofst[] array. +// +// The following are the tables generated in this section: +// +// fts5yy_action[] A single table containing all actions. +// fts5yy_lookahead[] A table containing the lookahead for each entry in +// fts5yy_action. Used to detect hash collisions. +// fts5yy_shift_ofst[] For each state, the offset into fts5yy_action for +// shifting terminals. +// fts5yy_reduce_ofst[] For each state, the offset into fts5yy_action for +// shifting non-terminals after a reduce. +// fts5yy_default[] Default action for each state. +// +// Begin parsing tables ********************************************* +var fts5yy_action = [105]uint8{ + /* 0 */ uint8(81), uint8(20), uint8(96), uint8(6), uint8(28), uint8(99), uint8(98), uint8(26), uint8(26), uint8(18), + /* 10 */ uint8(96), uint8(6), uint8(28), uint8(17), uint8(98), uint8(56), uint8(26), uint8(19), uint8(96), uint8(6), + /* 20 */ uint8(28), uint8(14), uint8(98), uint8(14), uint8(26), uint8(31), uint8(92), uint8(96), uint8(6), uint8(28), + /* 30 */ uint8(108), uint8(98), uint8(25), uint8(26), uint8(21), uint8(96), uint8(6), uint8(28), uint8(78), uint8(98), + /* 40 */ uint8(58), uint8(26), uint8(29), uint8(96), uint8(6), uint8(28), uint8(107), uint8(98), uint8(22), uint8(26), + /* 50 */ uint8(24), uint8(16), uint8(12), uint8(11), uint8(1), uint8(13), uint8(13), uint8(24), uint8(16), uint8(23), + /* 60 */ uint8(11), uint8(33), uint8(34), uint8(13), uint8(97), uint8(8), uint8(27), uint8(32), uint8(98), uint8(7), + /* 70 */ uint8(26), uint8(3), uint8(4), uint8(5), uint8(3), uint8(4), uint8(5), uint8(3), uint8(83), uint8(4), + /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), + /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), + /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), +} /* sqlite3.c:217801:31 */ +var fts5yy_lookahead = [121]uint8{ + /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), + /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), + /* 20 */ uint8(20), uint8(9), uint8(22), uint8(9), uint8(24), uint8(13), uint8(17), uint8(18), uint8(19), uint8(20), + /* 30 */ uint8(26), uint8(22), uint8(24), uint8(24), uint8(17), uint8(18), uint8(19), uint8(20), uint8(15), uint8(22), + /* 40 */ uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), uint8(20), uint8(26), uint8(22), uint8(21), uint8(24), + /* 50 */ uint8(6), uint8(7), uint8(9), uint8(9), uint8(10), uint8(12), uint8(12), uint8(6), uint8(7), uint8(21), + /* 60 */ uint8(9), uint8(24), uint8(25), uint8(12), uint8(18), uint8(5), uint8(20), uint8(14), uint8(22), uint8(5), + /* 70 */ uint8(24), uint8(3), uint8(1), uint8(2), uint8(3), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), + /* 80 */ uint8(2), uint8(3), uint8(11), uint8(2), uint8(3), uint8(11), uint8(9), uint8(10), uint8(5), uint8(12), + /* 90 */ uint8(23), uint8(24), uint8(10), uint8(10), uint8(8), uint8(9), uint8(9), uint8(15), uint8(15), uint8(8), + /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), + /* 120 */ uint8(27), +} /* sqlite3.c:217814:29 */ +var fts5yy_shift_ofst = [35]uint8{ + /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), + /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), + /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), + /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), +} /* sqlite3.c:217832:28 */ +var fts5yy_reduce_ofst = [18]int8{ + /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), + /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), +} /* sqlite3.c:217841:26 */ +var fts5yy_default = [35]uint8{ + /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), + /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), + /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), + /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), +} /* sqlite3.c:217845:31 */ +//********* End of lemon-generated parsing tables **************************** + +// The next table maps tokens (terminal symbols) into fallback tokens. +// If a construct like the following: +// +// %fallback ID X Y Z. +// +// appears in the grammar, then ID becomes a fallback token for X, Y, +// and Z. Whenever one of the tokens X, Y, or Z is input to the parser +// but it does not parse, the type of the token is changed to ID and +// the parse is retried before an error is thrown. +// +// This feature can be used, for example, to cause some keywords in a language +// to revert to identifiers if they keyword does not apply in the context where +// it appears. + +// The following structure represents a single element of the +// parser's stack. Information stored includes: +// +// + The state number for the parser at this level of the stack. +// +// + The value of the token stored at this level of the stack. +// (In other words, the "major" token.) +// +// + The semantic value stored at this level of the stack. This is +// the information used by the action routines in the grammar. +// It is sometimes called the "minor" token. +// +// After the "shift" half of a SHIFTREDUCE action, the stateno field +// actually contains the reduce action for the second half of the +// SHIFTREDUCE. +type fts5yyStackEntry = struct { + Fstateno uint8 + Fmajor uint8 + F__ccgo_pad1 [6]byte + Fminor Fts5YYMINORTYPE +} /* sqlite3.c:217888:1 */ + +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ + +// The state of the parser is completely contained in an instance of +// the following structure +type fts5yyParser = struct { + Ffts5yytos uintptr + FpParse uintptr + Ffts5yystack [100]Fts5yyStackEntry + Ffts5yystackEnd uintptr +} /* sqlite3.c:217899:1 */ + +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ + +// #include + +// Datatype of the argument to the memory allocated passed as the +// second argument to sqlite3Fts5ParserAlloc() below. This can be changed by +// putting an appropriate #define in the %include section of the input +// grammar. + +// Initialize a new parser that has already been allocated. +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ + var fts5yypParser uintptr = fts5yypRawParser + + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ + (*Fts5yyStackEntry)(unsafe.Pointer(fts5yypParser + 16)).Fstateno = uint8(0) + (*Fts5yyStackEntry)(unsafe.Pointer(fts5yypParser + 16)).Fmajor = uint8(0) + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd = fts5yypParser + 16 + 99*24 +} + +// This function allocates a new parser. +// The only argument is a pointer to a function which works like +// malloc. +// +// Inputs: +// A pointer to the function used to allocate memory. +// +// Outputs: +// A pointer to a parser. This pointer is used in subsequent calls +// to sqlite3Fts5Parser and sqlite3Fts5ParserFree. +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ + var fts5yypParser uintptr + fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) + if fts5yypParser != 0 { + + sqlite3Fts5ParserInit(tls, fts5yypParser) + } + return fts5yypParser +} + +// The following function deletes the "minor type" or semantic value +// associated with a symbol. The symbol can be either a terminal +// or nonterminal. "fts5yymajor" is the symbol code, and "fts5yypminor" is +// a pointer to the value to be deleted. The code used to do the +// deletions is derived from the %destructor and/or %token_destructor +// directives of the input grammar. +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ + var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse + _ = pParse + + switch int32(fts5yymajor) { + // Here is inserted the actions which take place when a + // terminal or non-terminal is destroyed. This can happen + // when the symbol is popped from the stack during a + // reduce or during error processing or when a parser is + // being destroyed before it is finished parsing. + // + // Note: during a reduce, the only symbols destroyed are those + // which appear on the RHS of the rule, but which are *not* used + // inside the C code. + //******** Begin destructor definitions ************************************** + case 16: /* input */ + { + _ = pParse + } + break + case 17: + fallthrough // expr + case 18: + fallthrough // cnearset + case 19: /* exprlist */ + { + sqlite3Fts5ParseNodeFree(tls, *(*uintptr)(unsafe.Pointer(fts5yypminor))) + } + break + case 20: + fallthrough // colset + case 21: /* colsetlist */ + { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(fts5yypminor))) + } + break + case 22: + fallthrough // nearset + case 23: /* nearphrases */ + { + sqlite3Fts5ParseNearsetFree(tls, *(*uintptr)(unsafe.Pointer(fts5yypminor))) + } + break + case 24: /* phrase */ + { + sqlite3Fts5ParsePhraseFree(tls, *(*uintptr)(unsafe.Pointer(fts5yypminor))) + } + break + //******** End destructor definitions **************************************** + default: + break // If no destructor action specified: do nothing + } +} + +// Pop the parser's stack once. +// +// If there is a destructor routine associated with the token which +// is popped from the stack, then call it. +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ + var fts5yytos uintptr + + fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) + fts5yy_destructor(tls, pParser, (*Fts5yyStackEntry)(unsafe.Pointer(fts5yytos)).Fmajor, fts5yytos+8) +} + +// Clear all secondary memory allocations from the parser +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ + var pParser uintptr = p + for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { + fts5yy_pop_parser_stack(tls, pParser) + } +} + +// Deallocate and destroy a parser. Destructors are called for +// all stack elements before shutting the parser down. +// +// If the fts5YYPARSEFREENEVERNULL macro exists (for example because it +// is defined in a %include section of the input grammar) then it is +// assumed that the input pointer is never NULL. +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ + if p == uintptr(0) { + return + } + sqlite3Fts5ParserFinalize(tls, p) + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{freeProc})).f(tls, p) +} + +// Return the peak depth of the stack for a parser. + +// This array of booleans keeps track of the parser statement +// coverage. The element fts5yycoverage[X][Y] is set when the parser +// is in state X and has a lookahead token Y. In a well-tested +// systems, every element of this matrix should end up being set. + +// Write into out a description of every state/lookahead combination that +// +// (1) has not been used by the parser, and +// (2) is not a syntax error. +// +// Return the number of missed state/lookahead combinations. + +// Find the appropriate action for a parser given the terminal +// look-ahead token iLookAhead. +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ + var i int32 + + if int32(stateno) > Fts5YY_MAX_SHIFT { + return stateno + } + + for __ccgo := true; __ccgo; __ccgo = 1 != 0 { + i = int32(fts5yy_shift_ofst[stateno]) + + i = i + int32(iLookAhead) + + if int32(fts5yy_lookahead[i]) != int32(iLookAhead) { + return fts5yy_default[stateno] + } else { + + return fts5yy_action[i] + } + } + return uint8(0) +} + +// Find the appropriate action for a parser given the non-terminal +// look-ahead token iLookAhead. +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ + var i int32 + + i = int32(fts5yy_reduce_ofst[stateno]) + + i = i + int32(iLookAhead) + + return fts5yy_action[i] +} + +// The following routine is called if the stack overflows. +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ + var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse + + for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { + fts5yy_pop_parser_stack(tls, fts5yypParser) + } + // Here code is inserted which will execute if the parser + // stack every overflows + //******* Begin %stack_overflow code ***************************************** + + sqlite3Fts5ParseError(tls, pParse, ts+33498, 0) + //******* End %stack_overflow code ******************************************* + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var + +} + +// Print tracing information for a SHIFT action + +// Perform a shift action. +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ + var fts5yytos uintptr + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 + if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos -= 24 + fts5yyStackOverflow(tls, fts5yypParser) + return + } + if int32(fts5yyNewState) > Fts5YY_MAX_SHIFT { + fts5yyNewState = uint8(int32(fts5yyNewState) + (Fts5YY_MIN_REDUCE - Fts5YY_MIN_SHIFTREDUCE)) + } + fts5yytos = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos + (*Fts5yyStackEntry)(unsafe.Pointer(fts5yytos)).Fstateno = fts5yyNewState + (*Fts5yyStackEntry)(unsafe.Pointer(fts5yytos)).Fmajor = fts5yyMajor + *(*Fts5Token)(unsafe.Pointer(fts5yytos + 8)) = fts5yyMinor + +} + +// For rule J, fts5yyRuleInfoLhs[J] contains the symbol on the left-hand side +// of that rule +var fts5yyRuleInfoLhs = [28]uint8{ + uint8(16), // (0) input ::= expr + uint8(20), // (1) colset ::= MINUS LCP colsetlist RCP + uint8(20), // (2) colset ::= LCP colsetlist RCP + uint8(20), // (3) colset ::= STRING + uint8(20), // (4) colset ::= MINUS STRING + uint8(21), // (5) colsetlist ::= colsetlist STRING + uint8(21), // (6) colsetlist ::= STRING + uint8(17), // (7) expr ::= expr AND expr + uint8(17), // (8) expr ::= expr OR expr + uint8(17), // (9) expr ::= expr NOT expr + uint8(17), // (10) expr ::= colset COLON LP expr RP + uint8(17), // (11) expr ::= LP expr RP + uint8(17), // (12) expr ::= exprlist + uint8(19), // (13) exprlist ::= cnearset + uint8(19), // (14) exprlist ::= exprlist cnearset + uint8(18), // (15) cnearset ::= nearset + uint8(18), // (16) cnearset ::= colset COLON nearset + uint8(22), // (17) nearset ::= phrase + uint8(22), // (18) nearset ::= CARET phrase + uint8(22), // (19) nearset ::= STRING LP nearphrases neardist_opt RP + uint8(23), // (20) nearphrases ::= phrase + uint8(23), // (21) nearphrases ::= nearphrases phrase + uint8(25), // (22) neardist_opt ::= + uint8(25), // (23) neardist_opt ::= COMMA STRING + uint8(24), // (24) phrase ::= phrase PLUS STRING star_opt + uint8(24), // (25) phrase ::= STRING star_opt + uint8(26), // (26) star_opt ::= STAR + uint8(26), // (27) star_opt ::= +} /* sqlite3.c:218460:29 */ + +// For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number +// of symbols on the right-hand side of that rule. +var fts5yyRuleInfoNRhs = [28]int8{ + int8(-1), // (0) input ::= expr + int8(-4), // (1) colset ::= MINUS LCP colsetlist RCP + int8(-3), // (2) colset ::= LCP colsetlist RCP + int8(-1), // (3) colset ::= STRING + int8(-2), // (4) colset ::= MINUS STRING + int8(-2), // (5) colsetlist ::= colsetlist STRING + int8(-1), // (6) colsetlist ::= STRING + int8(-3), // (7) expr ::= expr AND expr + int8(-3), // (8) expr ::= expr OR expr + int8(-3), // (9) expr ::= expr NOT expr + int8(-5), // (10) expr ::= colset COLON LP expr RP + int8(-3), // (11) expr ::= LP expr RP + int8(-1), // (12) expr ::= exprlist + int8(-1), // (13) exprlist ::= cnearset + int8(-2), // (14) exprlist ::= exprlist cnearset + int8(-1), // (15) cnearset ::= nearset + int8(-3), // (16) cnearset ::= colset COLON nearset + int8(-1), // (17) nearset ::= phrase + int8(-2), // (18) nearset ::= CARET phrase + int8(-5), // (19) nearset ::= STRING LP nearphrases neardist_opt RP + int8(-1), // (20) nearphrases ::= phrase + int8(-2), // (21) nearphrases ::= nearphrases phrase + int8(0), // (22) neardist_opt ::= + int8(-2), // (23) neardist_opt ::= COMMA STRING + int8(-4), // (24) phrase ::= phrase PLUS STRING star_opt + int8(-2), // (25) phrase ::= STRING star_opt + int8(-1), // (26) star_opt ::= STAR + int8(0), // (27) star_opt ::= +} /* sqlite3.c:218493:26 */ + +// Forward Declaration + +// Perform a reduce action and the shift that must immediately +// follow the reduce. +// +// The fts5yyLookahead and fts5yyLookaheadToken parameters provide reduce actions +// access to the lookahead token (if any). The fts5yyLookahead will be fts5YYNOCODE +// if the lookahead token has already been consumed. As this procedure is +// only called from one place, optimizing compilers will in-line it, which +// means that the extra parameters have no performance impact. +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var fts5yygoto int32 // The next state + var fts5yyact uint8 // The next action + var fts5yymsp uintptr // The top of the parser's stack + var fts5yysize int32 // Amount to pop the stack + var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse + _ = fts5yyLookahead + _ = fts5yyLookaheadToken + fts5yymsp = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos + + switch fts5yyruleno { + // Beginning here are the reduction cases. A typical example + // follows: + // case 0: + // #line + // { ... } // User supplied code + // #line + // break; + //********* Begin reduce actions ********************************************* + // var fts5yylhsminor Fts5YYMINORTYPE at bp, 16 + + case uint32(0): /* input ::= expr */ + { + sqlite3Fts5ParseFinished(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + } + break + case uint32(1): /* colset ::= MINUS LCP colsetlist RCP */ + { + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = sqlite3Fts5ParseColsetInvert(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(2): /* colset ::= LCP colsetlist RCP */ + { + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(3): /* colset ::= STRING */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseColset(tls, pParse, uintptr(0), fts5yymsp+8) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(4): /* colset ::= MINUS STRING */ + { + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = sqlite3Fts5ParseColset(tls, pParse, uintptr(0), fts5yymsp+8) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = sqlite3Fts5ParseColsetInvert(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8))) + } + break + case uint32(5): /* colsetlist ::= colsetlist STRING */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseColset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)), fts5yymsp+8) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(6): /* colsetlist ::= STRING */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseColset(tls, pParse, uintptr(0), fts5yymsp+8) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(7): /* expr ::= expr AND expr */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_AND, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)), uintptr(0)) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(8): /* expr ::= expr OR expr */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_OR, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)), uintptr(0)) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(9): /* expr ::= expr NOT expr */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_NOT, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)), uintptr(0)) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(10): /* expr ::= colset COLON LP expr RP */ + { + sqlite3Fts5ParseSetColset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*24 + 8))) + *(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(11): /* expr ::= LP expr RP */ + { + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) + } + break + case uint32(12): + fallthrough // expr ::= exprlist + case uint32(13): /* exprlist ::= cnearset */ + { + *(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(14): /* exprlist ::= exprlist cnearset */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseImplicitAnd(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(15): /* cnearset ::= nearset */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_STRING, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(16): /* cnearset ::= colset COLON nearset */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_STRING, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + sqlite3Fts5ParseSetColset(tls, pParse, *(*uintptr)(unsafe.Pointer(bp)), *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(17): /* nearset ::= phrase */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(18): /* nearset ::= CARET phrase */ + { + sqlite3Fts5ParseSetCaret(tls, *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + } + break + case uint32(19): /* nearset ::= STRING LP nearphrases neardist_opt RP */ + { + sqlite3Fts5ParseNear(tls, pParse, fts5yymsp+libc.UintptrFromInt32(-4)*24+8) + sqlite3Fts5ParseSetDistance(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)), fts5yymsp+libc.UintptrFromInt32(-1)*24+8) + *(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*24 + 8)) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(20): /* nearphrases ::= phrase */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(21): /* nearphrases ::= nearphrases phrase */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNearset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(22): /* neardist_opt ::= */ + { + (*Fts5Token)(unsafe.Pointer(fts5yymsp + 1*24 + 8)).Fp = uintptr(0) + (*Fts5Token)(unsafe.Pointer(fts5yymsp + 1*24 + 8)).Fn = 0 + } + break + case uint32(23): /* neardist_opt ::= COMMA STRING */ + { + *(*Fts5Token)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*Fts5Token)(unsafe.Pointer(fts5yymsp + 8)) + } + break + case uint32(24): /* phrase ::= phrase PLUS STRING star_opt */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-3)*24 + 8)), fts5yymsp+libc.UintptrFromInt32(-1)*24+8, *(*int32)(unsafe.Pointer(fts5yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-3)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(25): /* phrase ::= STRING star_opt */ + { + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseTerm(tls, pParse, uintptr(0), fts5yymsp+libc.UintptrFromInt32(-1)*24+8, *(*int32)(unsafe.Pointer(fts5yymsp + 8))) + } + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = *(*uintptr)(unsafe.Pointer(bp)) + break + case uint32(26): /* star_opt ::= STAR */ + { + *(*int32)(unsafe.Pointer(fts5yymsp + 8)) = 1 + } + break + case uint32(27): /* star_opt ::= */ + { + *(*int32)(unsafe.Pointer(fts5yymsp + 1*24 + 8)) = 0 + } + break + default: + break + //********* End reduce actions *********************************************** + } + + fts5yygoto = int32(fts5yyRuleInfoLhs[fts5yyruleno]) + fts5yysize = int32(fts5yyRuleInfoNRhs[fts5yyruleno]) + fts5yyact = fts5yy_find_reduce_action(tls, (*Fts5yyStackEntry)(unsafe.Pointer(fts5yymsp+uintptr(fts5yysize)*24)).Fstateno, uint8(fts5yygoto)) + + // There are no SHIFTREDUCE actions on nonterminals because the table + // generator has simplified them to pure REDUCE actions. + + // It is not possible for a REDUCE to be followed by an error + + fts5yymsp += 24 * uintptr(fts5yysize+1) + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yymsp + (*Fts5yyStackEntry)(unsafe.Pointer(fts5yymsp)).Fstateno = fts5yyact + (*Fts5yyStackEntry)(unsafe.Pointer(fts5yymsp)).Fmajor = uint8(fts5yygoto) + + return fts5yyact +} + +// The following code executes when the parse fails + +// The following code executes when a syntax error first occurs. +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse + + //*********** Begin %syntax_error code *************************************** + + _ = fts5yymajor // Silence a compiler warning + sqlite3Fts5ParseError(tls, + pParse, ts+33526, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + //*********** End %syntax_error code ***************************************** + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable + +} + +// The following is executed when the parser accepts +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ + var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse + + // Here code is inserted which will be executed whenever the + // parser accepts + //********** Begin %parse_accept code **************************************** + //********** End %parse_accept code ****************************************** + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable + +} + +// The main parser program. +// The first argument is a pointer to a structure obtained from +// "sqlite3Fts5ParserAlloc" which describes the current state of the parser. +// The second argument is the major token number. The third is +// the minor token. The fourth optional argument is whatever the +// user wants (and specified in the grammar) and is available for +// use by the action routines. +// +// Inputs: +//
      +//
    • A pointer to the parser (an opaque structure.) +//
    • The major token number. +//
    • The minor token number. +//
    • An option argument of a grammar-specified type. +//
    +// +// Outputs: +// None. +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var fts5yyminorunion Fts5YYMINORTYPE at bp, 16 + + var fts5yyact uint8 // The parser action. + var fts5yypParser uintptr = fts5yyp // The parser + + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse + + fts5yyact = (*Fts5yyStackEntry)(unsafe.Pointer((*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos)).Fstateno + + for 1 != 0 { // Exit by "break" + + fts5yyact = fts5yy_find_shift_action(tls, uint8(fts5yymajor), fts5yyact) + if int32(fts5yyact) >= Fts5YY_MIN_REDUCE { + var fts5yyruleno uint32 = uint32(int32(fts5yyact) - Fts5YY_MIN_REDUCE) // Reduce by this rule + + // Check that the stack is large enough to grow by a single entry + // if the RHS of the rule is empty. This ensures that there is room + // enough on the stack to push the LHS value + if int32(fts5yyRuleInfoNRhs[fts5yyruleno]) == 0 { + if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos >= (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { + fts5yyStackOverflow(tls, fts5yypParser) + break + } + } + fts5yyact = fts5yy_reduce(tls, fts5yypParser, fts5yyruleno, fts5yymajor, fts5yyminor) + } else if int32(fts5yyact) <= Fts5YY_MAX_SHIFTREDUCE { + fts5yy_shift(tls, fts5yypParser, fts5yyact, uint8(fts5yymajor), fts5yyminor) + break + } else if int32(fts5yyact) == Fts5YY_ACCEPT_ACTION { + (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos -= 24 + fts5yy_accept(tls, fts5yypParser) + return + } else { + + *(*Fts5Token)(unsafe.Pointer(bp)) = fts5yyminor + // If the fts5YYNOERRORRECOVERY macro is defined, then do not attempt to + // do any kind of error recovery. Instead, simply invoke the syntax + // error routine and continue going as if nothing had happened. + // + // Applications can set this macro (for example inside %include) if + // they intend to abandon the parse upon the first syntax error seen. + fts5yy_syntax_error(tls, fts5yypParser, fts5yymajor, fts5yyminor) + fts5yy_destructor(tls, fts5yypParser, uint8(fts5yymajor), bp) + break + } + } + return +} + +// Return the fallback token corresponding to canonical token iToken, or +// 0 if iToken has no fallback. +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ + _ = iToken + return 0 +} + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +// #include "fts5Int.h" +// Declarations for math functions. +// Copyright (C) 1991-2021 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 +// . + +// ISO C99 Standard: 7.12 Mathematics + +// Object used to iterate through all "coalesced phrase instances" in +// a single column of the current row. If the phrase instances in the +// column being considered do not overlap, this object simply iterates +// through them. Or, if they do overlap (share one or more tokens in +// common), each set of overlapping instances is treated as a single +// match. See documentation for the highlight() auxiliary function for +// details. +// +// Usage is: +// +// for(rc = fts5CInstIterNext(pApi, pFts, iCol, &iter); +// (rc==SQLITE_OK && 0==fts5CInstIterEof(&iter); +// rc = fts5CInstIterNext(&iter) +// ){ +// printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); +// } +// +type CInstIter1 = struct { + FpApi uintptr + FpFts uintptr + FiCol int32 + FiInst int32 + FnInst int32 + FiStart int32 + FiEnd int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:219080:9 */ + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +// #include "fts5Int.h" +// Declarations for math functions. +// Copyright (C) 1991-2021 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 +// . + +// ISO C99 Standard: 7.12 Mathematics + +// Object used to iterate through all "coalesced phrase instances" in +// a single column of the current row. If the phrase instances in the +// column being considered do not overlap, this object simply iterates +// through them. Or, if they do overlap (share one or more tokens in +// common), each set of overlapping instances is treated as a single +// match. See documentation for the highlight() auxiliary function for +// details. +// +// Usage is: +// +// for(rc = fts5CInstIterNext(pApi, pFts, iCol, &iter); +// (rc==SQLITE_OK && 0==fts5CInstIterEof(&iter); +// rc = fts5CInstIterNext(&iter) +// ){ +// printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); +// } +// +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ + +// Advance the iterator to the next coalesced phrase instance. Return +// an SQLite error code if an error occurs, or SQLITE_OK otherwise. +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var rc int32 = SQLITE_OK + (*CInstIter)(unsafe.Pointer(pIter)).FiStart = -1 + (*CInstIter)(unsafe.Pointer(pIter)).FiEnd = -1 + + for rc == SQLITE_OK && (*CInstIter)(unsafe.Pointer(pIter)).FiInst < (*CInstIter)(unsafe.Pointer(pIter)).FnInst { + // var ip int32 at bp, 4 + + // var ic int32 at bp+4, 4 + + // var io int32 at bp+8, 4 + + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer((*CInstIter)(unsafe.Pointer(pIter)).FpApi)).FxInst})).f(tls, (*CInstIter)(unsafe.Pointer(pIter)).FpFts, (*CInstIter)(unsafe.Pointer(pIter)).FiInst, bp /* &ip */, bp+4 /* &ic */, bp+8 /* &io */) + if rc == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp + 4)) == (*CInstIter)(unsafe.Pointer(pIter)).FiCol { + var iEnd int32 = *(*int32)(unsafe.Pointer(bp + 8)) - 1 + (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer((*CInstIter)(unsafe.Pointer(pIter)).FpApi)).FxPhraseSize})).f(tls, (*CInstIter)(unsafe.Pointer(pIter)).FpFts, *(*int32)(unsafe.Pointer(bp))) + if (*CInstIter)(unsafe.Pointer(pIter)).FiStart < 0 { + (*CInstIter)(unsafe.Pointer(pIter)).FiStart = *(*int32)(unsafe.Pointer(bp + 8 /* io */)) + (*CInstIter)(unsafe.Pointer(pIter)).FiEnd = iEnd + } else if *(*int32)(unsafe.Pointer(bp + 8)) <= (*CInstIter)(unsafe.Pointer(pIter)).FiEnd { + if iEnd > (*CInstIter)(unsafe.Pointer(pIter)).FiEnd { + (*CInstIter)(unsafe.Pointer(pIter)).FiEnd = iEnd + } + } else { + break + } + } + (*CInstIter)(unsafe.Pointer(pIter)).FiInst++ + } + } + + return rc +} + +// Initialize the iterator object indicated by the final parameter to +// iterate through coalesced phrase instances in column iCol. +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ + var rc int32 + + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{}))) + (*CInstIter)(unsafe.Pointer(pIter)).FpApi = pApi + (*CInstIter)(unsafe.Pointer(pIter)).FpFts = pFts + (*CInstIter)(unsafe.Pointer(pIter)).FiCol = iCol + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, pIter+24 /* &.nInst */) + + if rc == SQLITE_OK { + rc = fts5CInstIterNext(tls, pIter) + } + + return rc +} + +// ************************************************************************ +// +// Start of highlight() implementation. +type HighlightContext1 = struct { + Fiter CInstIter + FiPos int32 + FiRangeStart int32 + FiRangeEnd int32 + F__ccgo_pad1 [4]byte + FzOpen uintptr + FzClose uintptr + FzIn uintptr + FnIn int32 + FiOff int32 + FzOut uintptr +} /* sqlite3.c:219154:9 */ + +// ************************************************************************ +// +// Start of highlight() implementation. +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ + +// Append text to the HighlightContext output string - p->zOut. Argument +// z points to a buffer containing n bytes of text to append. If n is +// negative, everything up until the first '\0' is appended to the output. +// +// If *pRc is set to any value other than SQLITE_OK when this function is +// called, it is a no-op. If an error (i.e. an OOM condition) is encountered, +// *pRc is set to an error code before returning. +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && z != 0 { + if n < 0 { + n = int32(libc.Xstrlen(tls, z)) + } + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33557, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } +} + +// Tokenizer callback used by implementation of highlight() function. +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var p uintptr = pContext + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + var iPos int32 + + _ = pToken + _ = nToken + + if tflags&FTS5_TOKEN_COLOCATED != 0 { + return SQLITE_OK + } + iPos = libc.PostIncInt32(&(*HighlightContext)(unsafe.Pointer(p)).FiPos, 1) + + if (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd > 0 { + if iPos < (*HighlightContext)(unsafe.Pointer(p)).FiRangeStart || iPos > (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd { + return SQLITE_OK + } + if (*HighlightContext)(unsafe.Pointer(p)).FiRangeStart != 0 && iPos == (*HighlightContext)(unsafe.Pointer(p)).FiRangeStart { + (*HighlightContext)(unsafe.Pointer(p)).FiOff = iStartOff + } + } + + if iPos == (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiStart { + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iStartOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzOpen, -1) + (*HighlightContext)(unsafe.Pointer(p)).FiOff = iStartOff + } + + if iPos == (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiEnd { + if (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd != 0 && (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiStart < (*HighlightContext)(unsafe.Pointer(p)).FiRangeStart { + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzOpen, -1) + } + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iEndOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzClose, -1) + (*HighlightContext)(unsafe.Pointer(p)).FiOff = iEndOff + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5CInstIterNext(tls, p) + } + } + + if (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd > 0 && iPos == (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd { + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iEndOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) + (*HighlightContext)(unsafe.Pointer(p)).FiOff = iEndOff + if iPos >= (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiStart && iPos < (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiEnd { + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzClose, -1) + } + } + + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Implementation of highlight() function. +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ + bp := tls.Alloc(100) + defer tls.Free(100) + + // var ctx HighlightContext at bp, 96 + + // var rc int32 at bp+96, 4 + + var iCol int32 + + if nVal != 3 { + var zErr uintptr = ts + 33564 /* "wrong number of ..." */ + Xsqlite3_result_error(tls, pCtx, zErr, -1) + return + } + + iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal))) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(HighlightContext{}))) + (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOpen = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) + (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzClose = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 2*8))) + *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnText})).f(tls, pFts, iCol, bp /* &ctx */ +72 /* &.zIn */, bp /* &ctx */ +80 /* &.nIn */) + + if (*HighlightContext)(unsafe.Pointer(bp)).FzIn != 0 { + if *(*int32)(unsafe.Pointer(bp + 96)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) = fts5CInstIterInit(tls, pApi, pFts, iCol, bp) + } + + if *(*int32)(unsafe.Pointer(bp + 96)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxTokenize})).f(tls, pFts, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FnIn, bp /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5HighlightCb}))) + } + fts5HighlightAppend(tls, bp+96, bp, (*HighlightContext)(unsafe.Pointer(bp)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(bp)).FiOff), (*HighlightContext)(unsafe.Pointer(bp)).FnIn-(*HighlightContext)(unsafe.Pointer(bp)).FiOff) + + if *(*int32)(unsafe.Pointer(bp + 96)) == SQLITE_OK { + Xsqlite3_result_text(tls, pCtx, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOut, -1, libc.UintptrFromInt32(-1)) + } + Xsqlite3_free(tls, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOut) + } + if *(*int32)(unsafe.Pointer(bp + 96)) != SQLITE_OK { + Xsqlite3_result_error_code(tls, pCtx, *(*int32)(unsafe.Pointer(bp + 96 /* rc */))) + } +} + +// +// End of highlight() implementation. +// + +// Context object passed to the fts5SentenceFinderCb() function. +type Fts5SFinder1 = struct { + FiPos int32 + FnFirstAlloc int32 + FnFirst int32 + F__ccgo_pad1 [4]byte + FaFirst uintptr + FzDoc uintptr +} /* sqlite3.c:219295:9 */ + +// +// End of highlight() implementation. +// + +// Context object passed to the fts5SentenceFinderCb() function. +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ + +// Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if +// necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an +// error occurs. +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ + if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { + var nNew int32 + if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { + nNew = (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc * 2 + } else { + nNew = 64 + } + var aNew uintptr + + aNew = Xsqlite3_realloc64(tls, (*Fts5SFinder)(unsafe.Pointer(p)).FaFirst, uint64(uint64(nNew)*uint64(unsafe.Sizeof(int32(0))))) + if aNew == uintptr(0) { + return SQLITE_NOMEM + } + (*Fts5SFinder)(unsafe.Pointer(p)).FaFirst = aNew + (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc = nNew + } + *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(p)).FaFirst + uintptr(libc.PostIncInt32(&(*Fts5SFinder)(unsafe.Pointer(p)).FnFirst, 1))*4)) = iAdd + return SQLITE_OK +} + +// This function is an xTokenize() callback used by the auxiliary snippet() +// function. Its job is to identify tokens that are the first in a sentence. +// For each such token, an entry is added to the SFinder.aFirst[] array. +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ + var rc int32 = SQLITE_OK + + _ = pToken + _ = nToken + _ = iEndOff + + if tflags&FTS5_TOKEN_COLOCATED == 0 { + var p uintptr = pContext + if (*Fts5SFinder)(unsafe.Pointer(p)).FiPos > 0 { + var i int32 + var c uint8 = uint8(0) + for i = iStartOff - 1; i >= 0; i-- { + c = *(*uint8)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(p)).FzDoc + uintptr(i))) + if int32(c) != ' ' && int32(c) != '\t' && int32(c) != '\n' && int32(c) != '\r' { + break + } + } + if i != iStartOff-1 && (int32(c) == '.' || int32(c) == ':') { + rc = fts5SentenceFinderAdd(tls, p, (*Fts5SFinder)(unsafe.Pointer(p)).FiPos) + } + } else { + rc = fts5SentenceFinderAdd(tls, p, 0) + } + (*Fts5SFinder)(unsafe.Pointer(p)).FiPos++ + } + return rc +} + +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 + var i int32 + *(*int32)(unsafe.Pointer(bp + 4 /* ip */)) = 0 + *(*int32)(unsafe.Pointer(bp + 8 /* ic */)) = 0 + *(*int32)(unsafe.Pointer(bp + 12 /* iOff */)) = 0 + var iFirst int32 = -1 + // var nInst int32 at bp, 4 + + var nScore int32 = 0 + var iLast int32 = 0 + var iEnd Sqlite3_int64 = Sqlite3_int64(iPos) + Sqlite3_int64(nToken) + + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, bp /* &nInst */) + for i = 0; i < *(*int32)(unsafe.Pointer(bp /* nInst */)) && rc == SQLITE_OK; i++ { + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInst})).f(tls, pFts, i, bp+4 /* &ip */, bp+8 /* &ic */, bp+12 /* &iOff */) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8)) == iCol && *(*int32)(unsafe.Pointer(bp + 12)) >= iPos && Sqlite3_int64(*(*int32)(unsafe.Pointer(bp + 12))) < iEnd { + nScore = nScore + func() int32 { + if *(*uint8)(unsafe.Pointer(aSeen + uintptr(*(*int32)(unsafe.Pointer(bp + 4))))) != 0 { + return 1 + } + return 1000 + }() + *(*uint8)(unsafe.Pointer(aSeen + uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* ip */))))) = uint8(1) + if iFirst < 0 { + iFirst = *(*int32)(unsafe.Pointer(bp + 12 /* iOff */)) + } + iLast = *(*int32)(unsafe.Pointer(bp + 12)) + (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxPhraseSize})).f(tls, pFts, *(*int32)(unsafe.Pointer(bp + 4))) + } + } + + *(*int32)(unsafe.Pointer(pnScore)) = nScore + if piPos != 0 { + var iAdj Sqlite3_int64 = Sqlite3_int64(iFirst - (nToken-(iLast-iFirst))/2) + if iAdj+Sqlite3_int64(nToken) > Sqlite3_int64(nDocsize) { + iAdj = Sqlite3_int64(nDocsize - nToken) + } + if iAdj < int64(0) { + iAdj = int64(0) + } + *(*int32)(unsafe.Pointer(piPos)) = int32(iAdj) + } + + return rc +} + +// Return the value in pVal interpreted as utf-8 text. Except, if pVal +// contains a NULL value, return a pointer to a static string zero +// bytes in length instead of a NULL pointer. +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ + var zRet uintptr = Xsqlite3_value_text(tls, pVal) + if zRet != 0 { + return zRet + } + return ts + 1525 /* "" */ +} + +// Implementation of snippet() function. +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ + bp := tls.Alloc(172) + defer tls.Free(172) + + // var ctx HighlightContext at bp, 96 + + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_OK // Return code + var iCol int32 // 1st argument to snippet() + var zEllips uintptr // 4th argument to snippet() + var nToken int32 // 5th argument to snippet() + *(*int32)(unsafe.Pointer(bp + 96 /* nInst */)) = 0 // Number of instance matches this row + var i int32 // Used to iterate through instances + var nPhrase int32 // Number of phrases in query + var aSeen uintptr // Array of "seen instance" flags + var iBestCol int32 // Column containing best snippet + var iBestStart int32 = 0 // First token of best snippet + var nBestScore int32 = 0 // Score of best snippet + *(*int32)(unsafe.Pointer(bp + 164 /* nColSize */)) = 0 // Total size of iBestCol in tokens + // var sFinder Fts5SFinder at bp+104, 32 + // Used to find the beginnings of sentences + var nCol int32 + + if nVal != 5 { + var zErr uintptr = ts + 33614 /* "wrong number of ..." */ + Xsqlite3_result_error(tls, pCtx, zErr, -1) + return + } + + nCol = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnCount})).f(tls, pFts) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(HighlightContext{}))) + iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal))) + (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOpen = fts5ValueToText(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) + (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzClose = fts5ValueToText(tls, *(*uintptr)(unsafe.Pointer(apVal + 2*8))) + zEllips = fts5ValueToText(tls, *(*uintptr)(unsafe.Pointer(apVal + 3*8))) + nToken = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + 4*8))) + + iBestCol = func() int32 { + if iCol >= 0 { + return iCol + } + return 0 + }() + nPhrase = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxPhraseCount})).f(tls, pFts) + aSeen = Xsqlite3_malloc(tls, nPhrase) + if aSeen == uintptr(0) { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_NOMEM + } + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, bp+96 /* &nInst */) + } + + libc.Xmemset(tls, bp+104, 0, uint64(unsafe.Sizeof(Fts5SFinder{}))) + for i = 0; i < nCol; i++ { + if iCol < 0 || iCol == i { + // var nDoc int32 at bp+136, 4 + + // var nDocsize int32 at bp+140, 4 + + var ii int32 + (*Fts5SFinder)(unsafe.Pointer(bp + 104 /* &sFinder */)).FiPos = 0 + (*Fts5SFinder)(unsafe.Pointer(bp + 104 /* &sFinder */)).FnFirst = 0 + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnText})).f(tls, pFts, i, bp+104 /* &sFinder */ +24 /* &.zDoc */, bp+136 /* &nDoc */) + if *(*int32)(unsafe.Pointer(bp + 168)) != SQLITE_OK { + break + } + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxTokenize})).f(tls, pFts, + (*Fts5SFinder)(unsafe.Pointer(bp+104 /* &sFinder */)).FzDoc, *(*int32)(unsafe.Pointer(bp + 136 /* nDoc */)), bp+104, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5SentenceFinderCb}))) + if *(*int32)(unsafe.Pointer(bp + 168)) != SQLITE_OK { + break + } + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnSize})).f(tls, pFts, i, bp+140 /* &nDocsize */) + if *(*int32)(unsafe.Pointer(bp + 168)) != SQLITE_OK { + break + } + + for ii = 0; *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK && ii < *(*int32)(unsafe.Pointer(bp + 96 /* nInst */)); ii++ { + // var ip int32 at bp+144, 4 + + // var ic int32 at bp+148, 4 + + // var io int32 at bp+152, 4 + + // var iAdj int32 at bp+160, 4 + + // var nScore int32 at bp+156, 4 + + var jj int32 + + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInst})).f(tls, pFts, ii, bp+144 /* &ip */, bp+148 /* &ic */, bp+152 /* &io */) + if *(*int32)(unsafe.Pointer(bp + 148)) != i { + continue + } + if *(*int32)(unsafe.Pointer(bp + 152)) > *(*int32)(unsafe.Pointer(bp + 140)) { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + } + if *(*int32)(unsafe.Pointer(bp + 168)) != SQLITE_OK { + continue + } + libc.Xmemset(tls, aSeen, 0, uint64(nPhrase)) + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = fts5SnippetScore(tls, pApi, pFts, *(*int32)(unsafe.Pointer(bp + 140 /* nDocsize */)), aSeen, i, + *(*int32)(unsafe.Pointer(bp + 152 /* io */)), nToken, bp+156, bp+160) + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 156)) > nBestScore { + nBestScore = *(*int32)(unsafe.Pointer(bp + 156 /* nScore */)) + iBestCol = i + iBestStart = *(*int32)(unsafe.Pointer(bp + 160 /* iAdj */)) + *(*int32)(unsafe.Pointer(bp + 164 /* nColSize */)) = *(*int32)(unsafe.Pointer(bp + 140 /* nDocsize */)) + } + + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK && (*Fts5SFinder)(unsafe.Pointer(bp+104)).FnFirst != 0 && *(*int32)(unsafe.Pointer(bp + 140)) > nToken { + for jj = 0; jj < (*Fts5SFinder)(unsafe.Pointer(bp+104 /* &sFinder */)).FnFirst-1; jj++ { + if *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+104)).FaFirst + uintptr(jj+1)*4)) > *(*int32)(unsafe.Pointer(bp + 152)) { + break + } + } + + if *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+104)).FaFirst + uintptr(jj)*4)) < *(*int32)(unsafe.Pointer(bp + 152)) { + libc.Xmemset(tls, aSeen, 0, uint64(nPhrase)) + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = fts5SnippetScore(tls, pApi, pFts, *(*int32)(unsafe.Pointer(bp + 140 /* nDocsize */)), aSeen, i, + *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+104 /* &sFinder */)).FaFirst + uintptr(jj)*4)), nToken, bp+156, uintptr(0)) + + *(*int32)(unsafe.Pointer(bp + 156 /* nScore */)) += func() int32 { + if *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+104)).FaFirst + uintptr(jj)*4)) == 0 { + return 120 + } + return 100 + }() + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 156)) > nBestScore { + nBestScore = *(*int32)(unsafe.Pointer(bp + 156 /* nScore */)) + iBestCol = i + iBestStart = *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+104 /* &sFinder */)).FaFirst + uintptr(jj)*4)) + *(*int32)(unsafe.Pointer(bp + 164 /* nColSize */)) = *(*int32)(unsafe.Pointer(bp + 140 /* nDocsize */)) + } + } + } + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnText})).f(tls, pFts, iBestCol, bp /* &ctx */ +72 /* &.zIn */, bp /* &ctx */ +80 /* &.nIn */) + } + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 164)) == 0 { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnSize})).f(tls, pFts, iBestCol, bp+164 /* &nColSize */) + } + if (*HighlightContext)(unsafe.Pointer(bp)).FzIn != 0 { + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = fts5CInstIterInit(tls, pApi, pFts, iBestCol, bp) + } + + (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FiRangeStart = iBestStart + (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FiRangeEnd = iBestStart + nToken - 1 + + if iBestStart > 0 { + fts5HighlightAppend(tls, bp+168, bp, zEllips, -1) + } + + // Advance iterator ctx.iter so that it points to the first coalesced + // phrase instance at or following position iBestStart. + for (*HighlightContext)(unsafe.Pointer(bp)).Fiter.FiStart >= 0 && (*HighlightContext)(unsafe.Pointer(bp)).Fiter.FiStart < iBestStart && *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = fts5CInstIterNext(tls, bp) + } + + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxTokenize})).f(tls, pFts, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FnIn, bp /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5HighlightCb}))) + } + if (*HighlightContext)(unsafe.Pointer(bp)).FiRangeEnd >= *(*int32)(unsafe.Pointer(bp + 164))-1 { + fts5HighlightAppend(tls, bp+168, bp, (*HighlightContext)(unsafe.Pointer(bp)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(bp)).FiOff), (*HighlightContext)(unsafe.Pointer(bp)).FnIn-(*HighlightContext)(unsafe.Pointer(bp)).FiOff) + } else { + fts5HighlightAppend(tls, bp+168, bp, zEllips, -1) + } + } + if *(*int32)(unsafe.Pointer(bp + 168)) == SQLITE_OK { + Xsqlite3_result_text(tls, pCtx, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOut, -1, libc.UintptrFromInt32(-1)) + } else { + Xsqlite3_result_error_code(tls, pCtx, *(*int32)(unsafe.Pointer(bp + 168 /* rc */))) + } + Xsqlite3_free(tls, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOut) + Xsqlite3_free(tls, aSeen) + Xsqlite3_free(tls, (*Fts5SFinder)(unsafe.Pointer(bp+104 /* &sFinder */)).FaFirst) +} + +//********************************************************************** + +// The first time the bm25() function is called for a query, an instance +// of the following structure is allocated and populated. +type Fts5Bm25Data1 = struct { + FnPhrase int32 + F__ccgo_pad1 [4]byte + Favgdl float64 + FaIDF uintptr + FaFreq uintptr +} /* sqlite3.c:219576:9 */ + +//********************************************************************** + +// The first time the bm25() function is called for a query, an instance +// of the following structure is allocated and populated. +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ + +// Callback used by fts5Bm25GetData() to count the number of rows in the +// table matched by each individual phrase within the query. +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ + var pn uintptr = pUserData + _ = pApi + _ = pFts + *(*Sqlite3_int64)(unsafe.Pointer(pn))++ + return SQLITE_OK +} + +// Set *ppData to point to the Fts5Bm25Data object for the current query. +// If the object has not already been allocated, allocate and populate it +// now. +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 = SQLITE_OK // Return code + var p uintptr // Object to return + + p = (*struct { + f func(*libc.TLS, uintptr, int32) uintptr + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxGetAuxdata})).f(tls, pFts, 0) + if p == uintptr(0) { + var nPhrase int32 // Number of phrases in query + *(*Sqlite3_int64)(unsafe.Pointer(bp /* nRow */)) = int64(0) // Number of rows in table + *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* nToken */)) = int64(0) // Number of tokens in table + var nByte Sqlite3_int64 // Bytes of space to allocate + var i int32 + + // Allocate the Fts5Bm25Data object + nPhrase = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxPhraseCount})).f(tls, pFts) + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Bm25Data{})) + uint64(nPhrase*2)*uint64(unsafe.Sizeof(float64(0)))) + p = Xsqlite3_malloc64(tls, uint64(nByte)) + if p == uintptr(0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, p, 0, Size_t(nByte)) + (*Fts5Bm25Data)(unsafe.Pointer(p)).FnPhrase = nPhrase + (*Fts5Bm25Data)(unsafe.Pointer(p)).FaIDF = p + 1*32 + (*Fts5Bm25Data)(unsafe.Pointer(p)).FaFreq = (*Fts5Bm25Data)(unsafe.Pointer(p)).FaIDF + uintptr(nPhrase)*8 + } + + // Calculate the average document length for this FTS5 table + if rc == SQLITE_OK { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxRowCount})).f(tls, pFts, bp /* &nRow */) + } + + if rc == SQLITE_OK { + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnTotalSize})).f(tls, pFts, -1, bp+8 /* &nToken */) + } + if rc == SQLITE_OK { + (*Fts5Bm25Data)(unsafe.Pointer(p)).Favgdl = float64(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8))) / float64(*(*Sqlite3_int64)(unsafe.Pointer(bp /* nRow */))) + } + + // Calculate an IDF for each phrase in the query + for i = 0; rc == SQLITE_OK && i < nPhrase; i++ { + *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* nHit */)) = int64(0) + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxQueryPhrase})).f(tls, pFts, i, bp+16 /* &nHit */, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + }{fts5CountCb}))) + if rc == SQLITE_OK { + // Calculate the IDF (Inverse Document Frequency) for phrase i. + // This is done using the standard BM25 formula as found on wikipedia: + // + // IDF = log( (N - nHit + 0.5) / (nHit + 0.5) ) + // + // where "N" is the total number of documents in the set and nHit + // is the number that contain at least one instance of the phrase + // under consideration. + // + // The problem with this is that if (N < 2*nHit), the IDF is + // negative. Which is undesirable. So the mimimum allowable IDF is + // (1e-6) - roughly the same as a term that appears in just over + // half of set of 5,000,000 documents. + var idf float64 = libc.Xlog(tls, (float64(*(*Sqlite3_int64)(unsafe.Pointer(bp))-*(*Sqlite3_int64)(unsafe.Pointer(bp + 16)))+0.5)/(float64(*(*Sqlite3_int64)(unsafe.Pointer(bp + 16)))+0.5)) + if idf <= 0.0 { + idf = 1e-6 + } + *(*float64)(unsafe.Pointer((*Fts5Bm25Data)(unsafe.Pointer(p)).FaIDF + uintptr(i)*8)) = idf + } + } + + if rc != SQLITE_OK { + Xsqlite3_free(tls, p) + } else { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxSetAuxdata})).f(tls, pFts, p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + } + if rc != SQLITE_OK { + p = uintptr(0) + } + } + *(*uintptr)(unsafe.Pointer(ppData)) = p + return rc +} + +// Implementation of bm25() function. +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + var k1 float64 = 1.2 // Constant "k1" from BM25 formula + var b float64 = 0.75 // Constant "b" from BM25 formula + var rc int32 // Error code + var score float64 = 0.0 // SQL function return value + // var pData uintptr at bp, 8 + // Values allocated/calculated once only + var i int32 // Iterator variable + *(*int32)(unsafe.Pointer(bp + 8 /* nInst */)) = 0 // Value returned by xInstCount() + var D float64 = 0.0 // Total number of tokens in row + var aFreq uintptr = uintptr(0) // Array of phrase freq. for current row + + // Calculate the phrase frequency (symbol "f(qi,D)" in the documentation) + // for each phrase in the query for the current row. + rc = fts5Bm25GetData(tls, pApi, pFts, bp) + if rc == SQLITE_OK { + aFreq = (*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pData */)))).FaFreq + libc.Xmemset(tls, aFreq, 0, uint64(unsafe.Sizeof(float64(0)))*uint64((*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnPhrase)) + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, bp+8 /* &nInst */) + } + for i = 0; rc == SQLITE_OK && i < *(*int32)(unsafe.Pointer(bp + 8 /* nInst */)); i++ { + // var ip int32 at bp+12, 4 + + // var ic int32 at bp+16, 4 + + // var io int32 at bp+20, 4 + + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInst})).f(tls, pFts, i, bp+12 /* &ip */, bp+16 /* &ic */, bp+20 /* &io */) + if rc == SQLITE_OK { + var w float64 + if nVal > *(*int32)(unsafe.Pointer(bp + 16)) { + w = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* ic */)))*8))) + } else { + w = 1.0 + } + *(*float64)(unsafe.Pointer(aFreq + uintptr(*(*int32)(unsafe.Pointer(bp + 12)))*8)) += w + } + } + + // Figure out the total size of the current row in tokens. + if rc == SQLITE_OK { + // var nTok int32 at bp+24, 4 + + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnSize})).f(tls, pFts, -1, bp+24 /* &nTok */) + D = float64(*(*int32)(unsafe.Pointer(bp + 24 /* nTok */))) + } + + // Determine and return the BM25 score for the current row. Or, if an + // error has occurred, throw an exception. + if rc == SQLITE_OK { + for i = 0; i < (*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pData */)))).FnPhrase; i++ { + score = score + *(*float64)(unsafe.Pointer((*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaIDF + uintptr(i)*8))*(*(*float64)(unsafe.Pointer(aFreq + uintptr(i)*8))*(k1+1.0)/(*(*float64)(unsafe.Pointer(aFreq + uintptr(i)*8))+k1*(float64(1)-b+b*D/(*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Favgdl))) + } + Xsqlite3_result_double(tls, pCtx, -1.0*score) + } else { + Xsqlite3_result_error_code(tls, pCtx, rc) + } +} + +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ + {FzFunc: ts + 33662, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33670, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5HighlightFunction}))}, + {FzFunc: ts + 33680, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5Bm25Function}))}, + } + var rc int32 = SQLITE_OK // Return code + var i int32 // To iterate through builtin functions + + for i = 0; rc == SQLITE_OK && i < int32(uint64(unsafe.Sizeof([3]Builtin{}))/uint64(unsafe.Sizeof(Builtin{}))); i++ { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, Fts5_extension_function, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxCreateFunction})).f(tls, pApi, + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*32)).FzFunc, + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*32)).FpUserData, + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*32)).FxFunc, + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*32)).FxDestroy) + } + + return rc +} + +type Builtin = struct { + FzFunc uintptr + FpUserData uintptr + FxFunc Fts5_extension_function + FxDestroy uintptr +} /* sqlite3.c:219734:3 */ + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +// #include "fts5Int.h" + +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ + if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { + var nNew U64 + if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { + nNew = uint64((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) + } else { + nNew = uint64(64) + } + var pNew uintptr + for nNew < U64(nByte) { + nNew = nNew * uint64(2) + } + pNew = Xsqlite3_realloc64(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp, nNew) + if pNew == uintptr(0) { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + return 1 + } else { + (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace = int32(nNew) + (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp = pNew + } + } + return 0 +} + +// Encode value iVal as an SQLite varint and append it to the buffer object +// pBuf. If an OOM error occurs, set the error code in p. +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ + if func() int32 { + if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { + return 0 + } + return sqlite3Fts5BufferSize(tls, pRc, pBuf, uint32(9+(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) + }() != 0 { + return + } + *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) +} + +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ + *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) + *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) + *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) + *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) +} + +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ + return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) +} + +// Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set +// the error code in p. If an error has already occurred when this function +// is called, it is a no-op. +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ + if nData != 0 { + if func() int32 { + if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { + return 0 + } + return sqlite3Fts5BufferSize(tls, pRc, pBuf, nData+U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) + }() != 0 { + return + } + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), pData, uint64(nData)) + *(*int32)(unsafe.Pointer(pBuf + 8)) += int32(nData) + } +} + +// Append the nul-terminated string zStr to the buffer pBuf. This function +// ensures that the byte following the buffer data is set to 0x00, even +// though this byte is not included in the pBuf->n count. +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ + var nStr int32 = int32(libc.Xstrlen(tls, zStr)) + sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) + (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- +} + +// Argument zFmt is a printf() style format string. This function performs +// the printf() style processing, then appends the results to buffer pBuf. +// +// Like sqlite3Fts5BufferAppendString(), this function ensures that the byte +// following the buffer data is set to 0x00, even though this byte is not +// included in the pBuf->n count. +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var zTmp uintptr + var ap Va_list + _ = ap + ap = va + zTmp = Xsqlite3_vmprintf(tls, zFmt, ap) + _ = ap + + if zTmp == uintptr(0) { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } else { + sqlite3Fts5BufferAppendString(tls, pRc, pBuf, zTmp) + Xsqlite3_free(tls, zTmp) + } + } +} + +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ + var zRet uintptr = uintptr(0) + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var ap Va_list + _ = ap + ap = va + zRet = Xsqlite3_vmprintf(tls, zFmt, ap) + _ = ap + if zRet == uintptr(0) { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } + return zRet +} + +// Free any buffer allocated by pBuf. Zero the structure before returning. +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ + Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) + libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) +} + +// Zero the contents of the buffer object. But do not free the associated +// memory allocation. +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ + (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 +} + +// Set the buffer to contain nData/pData. If an OOM error occurs, leave an +// the error code in p. If an error has already occurred when this function +// is called, it is a no-op. +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ + (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 + sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) +} + +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i int32 = *(*int32)(unsafe.Pointer(pi)) + if i >= n { + // EOF + *(*I64)(unsafe.Pointer(piOff)) = int64(-1) + return 1 + } else { + var iOff I64 = *(*I64)(unsafe.Pointer(piOff)) + // var iVal U32 at bp, 4 + + { + *(*U32)(unsafe.Pointer(bp /* iVal */)) = U32(*(*U8)(unsafe.Pointer(a + uintptr(libc.PostIncInt32(&i, 1))))) + if *(*U32)(unsafe.Pointer(bp))&U32(0x80) != 0 { + i-- + i = i + sqlite3Fts5GetVarint32(tls, a+uintptr(i), bp) + } + } + + if *(*U32)(unsafe.Pointer(bp)) <= U32(1) { + if *(*U32)(unsafe.Pointer(bp)) == U32(0) { + *(*int32)(unsafe.Pointer(pi)) = i + return 0 + } + { + *(*U32)(unsafe.Pointer(bp /* iVal */)) = U32(*(*U8)(unsafe.Pointer(a + uintptr(libc.PostIncInt32(&i, 1))))) + if *(*U32)(unsafe.Pointer(bp))&U32(0x80) != 0 { + i-- + i = i + sqlite3Fts5GetVarint32(tls, a+uintptr(i), bp) + } + } + + iOff = I64(*(*U32)(unsafe.Pointer(bp))) << 32 + + { + *(*U32)(unsafe.Pointer(bp /* iVal */)) = U32(*(*U8)(unsafe.Pointer(a + uintptr(libc.PostIncInt32(&i, 1))))) + if *(*U32)(unsafe.Pointer(bp))&U32(0x80) != 0 { + i-- + i = i + sqlite3Fts5GetVarint32(tls, a+uintptr(i), bp) + } + } + + if *(*U32)(unsafe.Pointer(bp)) < U32(2) { + // This is a corrupt record. So stop parsing it here. + *(*I64)(unsafe.Pointer(piOff)) = int64(-1) + return 1 + } + *(*I64)(unsafe.Pointer(piOff)) = iOff + I64((*(*U32)(unsafe.Pointer(bp))-U32(2))&U32(0x7FFFFFFF)) + } else { + *(*I64)(unsafe.Pointer(piOff)) = iOff&(I64(int64(0x7FFFFFFF))<<32) + (iOff+I64(*(*U32)(unsafe.Pointer(bp))-U32(2)))&int64(0x7FFFFFFF) + } + *(*int32)(unsafe.Pointer(pi)) = i + + return 0 + } + return int32(0) +} + +// Advance the iterator object passed as the only argument. Return true +// if the iterator reaches EOF, or false otherwise. +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ + if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { + (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) + } + return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) +} + +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))) + (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a + (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n + sqlite3Fts5PoslistReaderNext(tls, pIter) + return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) +} + +// Append position iPos to the position list being accumulated in buffer +// pBuf, which must be already be large enough to hold the new data. +// The previous position written to this list is *piPrev. *piPrev is set +// to iPos before returning. +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ + if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { + if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { + *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) + *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iPos>>32)) + *(*I64)(unsafe.Pointer(piPrev)) = iPos & colmask + } + *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iPos-*(*I64)(unsafe.Pointer(piPrev))+int64(2))) + *(*I64)(unsafe.Pointer(piPrev)) = iPos + } +} + +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ + +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = 0 // Initialized only to suppress erroneous warning from Clang + if func() int32 { + if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(5+5+5) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { + return 0 + } + return sqlite3Fts5BufferSize(tls, bp, pBuf, uint32(5+5+5+(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) + }() != 0 { + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + sqlite3Fts5PoslistSafeAppend(tls, pBuf, pWriter, iPos) + return SQLITE_OK +} + +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ + var pRet uintptr = uintptr(0) + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + pRet = Xsqlite3_malloc64(tls, uint64(nByte)) + if pRet == uintptr(0) { + if nByte > int64(0) { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } else { + libc.Xmemset(tls, pRet, 0, Size_t(nByte)) + } + } + return pRet +} + +// Return a nul-terminated copy of the string indicated by pIn. If nIn +// is non-negative, then it is the length of the string in bytes. Otherwise, +// the length of the string is determined using strlen(). +// +// It is the responsibility of the caller to eventually free the returned +// buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ + var zRet uintptr = uintptr(0) + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + if nIn < 0 { + nIn = int32(libc.Xstrlen(tls, pIn)) + } + zRet = Xsqlite3_malloc(tls, nIn+1) + if zRet != 0 { + libc.Xmemcpy(tls, zRet, pIn, uint64(nIn)) + *(*uint8)(unsafe.Pointer(zRet + uintptr(nIn))) = uint8(0) + } else { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } + return zRet +} + +// Return true if character 't' may be part of an FTS5 bareword, or false +// otherwise. Characters that may be part of barewords: +// +// * All non-ASCII characters, +// * The 52 upper and lower case ASCII characters, and +// * The 10 integer ASCII characters. +// * The underscore character "_" (0x5F). +// * The unicode "subsitute" character (0x1A). +func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:220068:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + *(*[128]U8)(unsafe.Pointer(bp /* aBareword */)) = [128]U8{ + U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), // 0x00 .. 0x0F + U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(1), U8(0), U8(0), U8(0), U8(0), U8(0), // 0x10 .. 0x1F + U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), // 0x20 .. 0x2F + U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(0), U8(0), U8(0), U8(0), U8(0), U8(0), // 0x30 .. 0x3F + U8(0), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), // 0x40 .. 0x4F + U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(0), U8(0), U8(0), U8(0), U8(1), // 0x50 .. 0x5F + U8(0), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), // 0x60 .. 0x6F + U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(1), U8(0), U8(0), U8(0), U8(0), U8(0), // 0x70 .. 0x7F + } + + return libc.Bool32(int32(t)&0x80 != 0 || *(*U8)(unsafe.Pointer(bp + uintptr(int32(t)))) != 0) +} + +// ************************************************************************ +// +type Fts5TermsetEntry1 = struct { + FpTerm uintptr + FnTerm int32 + FiIdx int32 + FpNext uintptr +} /* sqlite3.c:217037:9 */ + +// ************************************************************************ +// +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ + +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + *(*uintptr)(unsafe.Pointer(pp)) = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5Termset{}))) + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(pbPresent)) = 0 + if p != 0 { + var i int32 + var hash U32 = U32(13) + var pEntry uintptr + + // Calculate a hash value for this term. This is the same hash checksum + // used by the fts5_hash.c module. This is not important for correct + // operation of the module, but is necessary to ensure that some tests + // designed to produce hash table collisions really do work. + for i = nTerm - 1; i >= 0; i-- { + hash = hash<<3 ^ hash ^ U32(*(*uint8)(unsafe.Pointer(pTerm + uintptr(i)))) + } + hash = hash<<3 ^ hash ^ U32(iIdx) + hash = hash % U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))) + + for pEntry = *(*uintptr)(unsafe.Pointer(p + uintptr(hash)*8)); pEntry != 0; pEntry = (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FpNext { + if (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FiIdx == iIdx && + (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FnTerm == nTerm && + libc.Xmemcmp(tls, (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FpTerm, pTerm, uint64(nTerm)) == 0 { + *(*int32)(unsafe.Pointer(pbPresent)) = 1 + break + } + } + + if pEntry == uintptr(0) { + pEntry = sqlite3Fts5MallocZero(tls, bp, int64(uint64(unsafe.Sizeof(Fts5TermsetEntry{}))+uint64(nTerm))) + if pEntry != 0 { + (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FpTerm = pEntry + 1*24 + (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FnTerm = nTerm + (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FiIdx = iIdx + libc.Xmemcpy(tls, (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FpTerm, pTerm, uint64(nTerm)) + (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FpNext = *(*uintptr)(unsafe.Pointer(p + uintptr(hash)*8)) + *(*uintptr)(unsafe.Pointer(p + uintptr(hash)*8)) = pEntry + } + } + } + + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ + if p != 0 { + var i U32 + for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { + var pEntry uintptr = *(*uintptr)(unsafe.Pointer(p + uintptr(i)*8)) + for pEntry != 0 { + var pDel uintptr = pEntry + pEntry = (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FpNext + Xsqlite3_free(tls, pDel) + } + } + Xsqlite3_free(tls, p) + } +} + +// 2014 Jun 09 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This is an SQLite module implementing full-text search. + +// #include "fts5Int.h" + +// Maximum allowed page size + +func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220195:12: */ + return libc.Bool32(int32(x) == ' ') +} + +func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220199:12: */ + return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') +} + +// Argument pIn points to a character that is part of a nul-terminated +// string. Return a pointer to the first character following *pIn in +// the string that is not a white-space character. +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ + var p uintptr = pIn + if p != 0 { + for fts5_iswhitespace(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { + p++ + } + } + return p +} + +// Argument pIn points to a character that is part of a nul-terminated +// string. Return a pointer to the first character following *pIn in +// the string that is not a "bareword" character. +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ + var p uintptr = pIn + for sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { + p++ + } + if p == pIn { + p = uintptr(0) + } + return p +} + +func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:220228:12: */ + return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') +} + +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ + var p uintptr = pIn + switch int32(*(*uint8)(unsafe.Pointer(p))) { + case 'n': + fallthrough + case 'N': + if Xsqlite3_strnicmp(tls, ts+6123, p, 4) == 0 { + p = p + 4 + } else { + p = uintptr(0) + } + break + + case 'x': + fallthrough + case 'X': + p++ + if int32(*(*uint8)(unsafe.Pointer(p))) == '\'' { + p++ + for int32(*(*uint8)(unsafe.Pointer(p))) >= 'a' && int32(*(*uint8)(unsafe.Pointer(p))) <= 'f' || + int32(*(*uint8)(unsafe.Pointer(p))) >= 'A' && int32(*(*uint8)(unsafe.Pointer(p))) <= 'F' || + int32(*(*uint8)(unsafe.Pointer(p))) >= '0' && int32(*(*uint8)(unsafe.Pointer(p))) <= '9' { + p++ + } + if int32(*(*uint8)(unsafe.Pointer(p))) == '\'' && int64(0) == (int64(p)-int64(pIn))/1%int64(2) { + p++ + } else { + p = uintptr(0) + } + } else { + p = uintptr(0) + } + break + + case '\'': + p++ + for p != 0 { + if int32(*(*uint8)(unsafe.Pointer(p))) == '\'' { + p++ + if int32(*(*uint8)(unsafe.Pointer(p))) != '\'' { + break + } + } + p++ + if int32(*(*uint8)(unsafe.Pointer(p))) == 0 { + p = uintptr(0) + } + } + break + + default: + // maybe a number + if int32(*(*uint8)(unsafe.Pointer(p))) == '+' || int32(*(*uint8)(unsafe.Pointer(p))) == '-' { + p++ + } + for fts5_isdigit(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { + p++ + } + + // At this point, if the literal was an integer, the parse is + // finished. Or, if it is a floating point value, it may continue + // with either a decimal point or an 'E' character. + if int32(*(*uint8)(unsafe.Pointer(p))) == '.' && fts5_isdigit(tls, *(*uint8)(unsafe.Pointer(p + 1))) != 0 { + p += uintptr(2) + for fts5_isdigit(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { + p++ + } + } + if p == pIn { + p = uintptr(0) + } + + break + } + + return p +} + +// The first character of the string pointed to by argument z is guaranteed +// to be an open-quote character (see function fts5_isopenquote()). +// +// This function searches for the corresponding close-quote character within +// the string and, if found, dequotes the string in place and adds a new +// nul-terminator byte. +// +// If the close-quote is found, the value returned is the byte offset of +// the character immediately following it. Or, if the close-quote is not +// found, -1 is returned. If -1 is returned, the buffer is left in an +// undefined state. +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ + var q uint8 + var iIn int32 = 1 + var iOut int32 = 0 + q = *(*uint8)(unsafe.Pointer(z)) + + // Set stack variable q to the close-quote character + + if int32(q) == '[' { + q = uint8(']') + } + + for *(*uint8)(unsafe.Pointer(z + uintptr(iIn))) != 0 { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(q) { + if int32(*(*uint8)(unsafe.Pointer(z + uintptr(iIn+1)))) != int32(q) { + // Character iIn was the close quote. + iIn++ + break + } else { + // Character iIn and iIn+1 form an escaped quote character. Skip + // the input cursor past both and copy a single quote character + // to the output buffer. + iIn = iIn + 2 + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = q + } + } else { + *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iIn, 1)))) + } + } + + *(*uint8)(unsafe.Pointer(z + uintptr(iOut))) = uint8(0) + return iIn +} + +// Convert an SQL-style quoted string into a normal string by removing +// the quote characters. The conversion is done in-place. If the +// input does not begin with a quote character, then this routine +// is a no-op. +// +// Examples: +// +// "abc" becomes abc +// 'xyz' becomes xyz +// [pqr] becomes pqr +// `mno` becomes mno +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ + var quote uint8 // Quote character (if any ) + + quote = *(*uint8)(unsafe.Pointer(z)) + if int32(quote) == '[' || int32(quote) == '\'' || int32(quote) == '"' || int32(quote) == '`' { + fts5Dequote(tls, z) + } +} + +type Fts5Enum1 = struct { + FzName uintptr + FeVal int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:220366:1 */ + +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ + +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ + var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) + var i int32 + var iVal int32 = -1 + + for i = 0; (*Fts5Enum)(unsafe.Pointer(aEnum+uintptr(i)*16)).FzName != 0; i++ { + if Xsqlite3_strnicmp(tls, (*Fts5Enum)(unsafe.Pointer(aEnum+uintptr(i)*16)).FzName, zEnum, nEnum) == 0 { + if iVal >= 0 { + return SQLITE_ERROR + } + iVal = (*Fts5Enum)(unsafe.Pointer(aEnum + uintptr(i)*16)).FeVal + } + } + + *(*int32)(unsafe.Pointer(peVal)) = iVal + if iVal < 0 { + return SQLITE_ERROR + } + return SQLITE_OK +} + +// Parse a "special" CREATE VIRTUAL TABLE directive and update +// configuration object pConfig as appropriate. +// +// If successful, object pConfig is updated and SQLITE_OK returned. If +// an error occurs, an SQLite error code is returned and an error message +// may be left in *pzErr. It is the responsibility of the caller to +// eventually free any such error message using sqlite3_free(). +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ + bp := tls.Alloc(112) + defer tls.Free(112) + + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK + var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) + if Xsqlite3_strnicmp(tls, ts+33685, zCmd, nCmd) == 0 { + var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) + var p uintptr + var bFirst int32 = 1 + if (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix == uintptr(0) { + (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix = sqlite3Fts5MallocZero(tls, bp+40, int64(nByte)) + if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + } + + p = zArg + for 1 != 0 { + var nPre int32 = 0 + + for int32(*(*uint8)(unsafe.Pointer(p))) == ' ' { + p++ + } + if bFirst == 0 && int32(*(*uint8)(unsafe.Pointer(p))) == ',' { + p++ + for int32(*(*uint8)(unsafe.Pointer(p))) == ' ' { + p++ + } + } else if int32(*(*uint8)(unsafe.Pointer(p))) == 0 { + break + } + if int32(*(*uint8)(unsafe.Pointer(p))) < '0' || int32(*(*uint8)(unsafe.Pointer(p))) > '9' { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33692, 0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + break + } + + if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, + ts+33723, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + break + } + + for int32(*(*uint8)(unsafe.Pointer(p))) >= '0' && int32(*(*uint8)(unsafe.Pointer(p))) <= '9' && nPre < 1000 { + nPre = nPre*10 + (int32(*(*uint8)(unsafe.Pointer(p))) - '0') + p++ + } + + if nPre <= 0 || nPre >= 1000 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33756, 0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + break + } + + *(*int32)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix + uintptr((*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix)*4)) = nPre + (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix++ + bFirst = 0 + } + + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + if Xsqlite3_strnicmp(tls, ts+33793, zCmd, nCmd) == 0 { + var p uintptr = zArg + var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) + var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) + var pDel uintptr = sqlite3Fts5MallocZero(tls, bp+40, nArg*int64(2)) + var pSpace uintptr = pDel + + if azArg != 0 && pSpace != 0 { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33802, 0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + } else { + for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { + var p2 uintptr = fts5ConfigSkipWhitespace(tls, p) + if int32(*(*uint8)(unsafe.Pointer(p2))) == '\'' { + p = fts5ConfigSkipLiteral(tls, p2) + } else { + p = fts5ConfigSkipBareword(tls, p2) + } + if p != 0 { + libc.Xmemcpy(tls, pSpace, p2, uint64((int64(p)-int64(p2))/1)) + *(*uintptr)(unsafe.Pointer(azArg + uintptr(nArg)*8)) = pSpace + sqlite3Fts5Dequote(tls, pSpace) + pSpace += uintptr((int64(p)-int64(p2))/1 + int64(1)) + p = fts5ConfigSkipWhitespace(tls, p) + } + } + if p == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33835, 0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + } else { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, + azArg, int32(nArg), pConfig, + pzErr) + } + } + } + + Xsqlite3_free(tls, azArg) + Xsqlite3_free(tls, pDel) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + if Xsqlite3_strnicmp(tls, ts+33869, zCmd, nCmd) == 0 { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33877, 0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + } else { + if *(*uint8)(unsafe.Pointer(zArg)) != 0 { + (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33909, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + } else { + (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE + } + } + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + if Xsqlite3_strnicmp(tls, ts+33915, zCmd, nCmd) == 0 { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33929, 0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + } else { + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) + } + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + if Xsqlite3_strnicmp(tls, ts+33967, zCmd, nCmd) == 0 { + if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || int32(*(*uint8)(unsafe.Pointer(zArg + 1))) != 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33978, 0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + } else { + (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') + } + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + if Xsqlite3_strnicmp(tls, ts+5017, zCmd, nCmd) == 0 { + *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ + {FzName: ts + 7896, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17243}, + {FzName: ts + 34013, FeVal: FTS5_DETAIL_COLUMNS}, + {}, + } + + if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34021, 0) + } + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) + } + + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34052, libc.VaList(bp+24, nCmd, zCmd)) + return SQLITE_ERROR +} + +// Allocate an instance of the default tokenizer ("simple") at +// Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error +// code if an error occurs. +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ + + return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) +} + +// Gobble up the first bareword or quoted word from the input buffer zIn. +// Return a pointer to the character immediately following the last in +// the gobbled word if successful, or a NULL pointer otherwise (failed +// to find close-quote character). +// +// Before returning, set pzOut to point to a new buffer containing a +// nul-terminated, dequoted copy of the gobbled word. If the word was +// quoted, *pbQuoted is also set to 1 before returning. +// +// If *pRc is other than SQLITE_OK when this function is called, it is +// a no-op (NULL is returned). Otherwise, if an OOM occurs within this +// function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* +// set if a parse error (failed to find close quote) occurs. +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ + var zRet uintptr = uintptr(0) + + var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) + var zOut uintptr = Xsqlite3_malloc64(tls, uint64(nIn+int64(1))) + + *(*int32)(unsafe.Pointer(pbQuoted)) = 0 + *(*uintptr)(unsafe.Pointer(pzOut)) = uintptr(0) + + if zOut == uintptr(0) { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } else { + libc.Xmemcpy(tls, zOut, zIn, Size_t(nIn+int64(1))) + if fts5_isopenquote(tls, *(*uint8)(unsafe.Pointer(zOut))) != 0 { + var ii int32 = fts5Dequote(tls, zOut) + zRet = zIn + uintptr(ii) + *(*int32)(unsafe.Pointer(pbQuoted)) = 1 + } else { + zRet = fts5ConfigSkipBareword(tls, zIn) + if zRet != 0 { + *(*uint8)(unsafe.Pointer(zOut + uintptr((int64(zRet)-int64(zIn))/1))) = uint8(0) + } + } + } + + if zRet == uintptr(0) { + Xsqlite3_free(tls, zOut) + } else { + *(*uintptr)(unsafe.Pointer(pzOut)) = zOut + } + + return zRet +} + +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 = SQLITE_OK + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22013) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16165) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34080, libc.VaList(bp, zCol)) + rc = SQLITE_ERROR + } else if zArg != 0 { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34110) { + *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34120, libc.VaList(bp+8, zArg)) + rc = SQLITE_ERROR + } + } + + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(libc.PostIncInt32(&(*Fts5Config)(unsafe.Pointer(p)).FnCol, 1))*8)) = zCol + return rc +} + +// Populate the Fts5Config.zContentExprlist string. +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK + *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} + + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34151, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { + for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { + if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34156, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + } else { + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34163, libc.VaList(bp+16, i)) + } + } + } + + (*Fts5Config)(unsafe.Pointer(p)).FzContentExprlist = (*Fts5Buffer)(unsafe.Pointer(bp + 32 /* &buf */)).Fp + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) +} + +// Arguments nArg/azArg contain the string arguments passed to the xCreate +// or xConnect method of the virtual table. This function attempts to +// allocate an instance of Fts5Config containing the results of parsing +// those arguments. +// +// If successful, SQLITE_OK is returned and *ppOut is set to point to the +// new Fts5Config object. If an error occurs, an SQLite error code is +// returned, *ppOut is set to NULL and an error message may be left in +// *pzErr. It is the responsibility of the caller to eventually free any +// such error message using sqlite3_free(). +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ + bp := tls.Alloc(76) + defer tls.Free(76) + + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK // Return code + var pRet uintptr // New object to return + var i int32 + var nByte Sqlite3_int64 + + *(*uintptr)(unsafe.Pointer(ppOut)) = libc.AssignUintptr(&pRet, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Fts5Config{})))) + if pRet == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(Fts5Config{}))) + (*Fts5Config)(unsafe.Pointer(pRet)).Fdb = db + (*Fts5Config)(unsafe.Pointer(pRet)).FiCookie = -1 + + nByte = Sqlite3_int64(uint64(nArg) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(U8(0))))) + (*Fts5Config)(unsafe.Pointer(pRet)).FazCol = sqlite3Fts5MallocZero(tls, bp+40, nByte) + (*Fts5Config)(unsafe.Pointer(pRet)).FabUnindexed = func() uintptr { + if (*Fts5Config)(unsafe.Pointer(pRet)).FazCol != 0 { + return (*Fts5Config)(unsafe.Pointer(pRet)).FazCol + uintptr(nArg)*8 + } + return uintptr(0) + }() + (*Fts5Config)(unsafe.Pointer(pRet)).FzDb = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 1*8)), -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 + (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22013) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34171, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + } + + for i = 3; *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK && i < nArg; i++ { + var zOrig uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)) + var z uintptr + *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)) = uintptr(0) + var bOption int32 = 0 + *(*int32)(unsafe.Pointer(bp + 56 /* bMustBeCol */)) = 0 + + z = fts5ConfigGobbleWord(tls, bp+40, zOrig, bp+48, bp+56) + z = fts5ConfigSkipWhitespace(tls, z) + if z != 0 && int32(*(*uint8)(unsafe.Pointer(z))) == '=' { + bOption = 1 + + z++ + if *(*int32)(unsafe.Pointer(bp + 56)) != 0 { + z = uintptr(0) + } + } + z = fts5ConfigSkipWhitespace(tls, z) + if z != 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { + // var bDummy int32 at bp+72, 4 + + z = fts5ConfigGobbleWord(tls, bp+40, z, bp+64, bp+72) + if z != 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { + z = uintptr(0) + } + } + + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + if z == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34200, libc.VaList(bp+8, zOrig)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR + } else { + if bOption != 0 { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigParseSpecial(tls, pGlobal, pRet, + func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp + 48)) != 0 { + return *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)) + } + return ts + 1525 /* "" */ + }(), + func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { + return *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)) + } + return ts + 1525 /* "" */ + }(), + pzErr) + } else { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigParseColumn(tls, pRet, *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)), *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)), pzErr) + *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)) = uintptr(0) + } + } + } + + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */))) + } + + // If a tokenizer= option was successfully parsed, the tokenizer has + // already been allocated. Otherwise, allocate an instance of the default + // tokenizer (unicode61) now. + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FpTok == uintptr(0) { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigDefaultTokenizer(tls, pGlobal, pRet) + } + + // If no zContent option was specified, fill in the default values. + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContent == uintptr(0) { + var zTail uintptr = uintptr(0) + + if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { + zTail = ts + 33869 /* "content" */ + } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { + zTail = ts + 34220 /* "docsize" */ + } + + if zTail != 0 { + (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, + bp+40, ts+34228, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + } + } + + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16165, -1) + } + + // Formulate the zContentExprlist text + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigMakeExprlist(tls, pRet) + } + + if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { + sqlite3Fts5ConfigFree(tls, pRet) + *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) + } + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) +} + +// Free the configuration object passed as the only argument. +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ + if pConfig != 0 { + var i int32 + if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_tokenizer)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi)).FxDelete})).f(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok) + } + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName) + for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8))) + } + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FazCol) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentExprlist) + Xsqlite3_free(tls, pConfig) + } +} + +// Call sqlite3_declare_vtab() based on the contents of the configuration +// object passed as the only argument. Return SQLITE_OK if successful, or +// an SQLite error code if an error occurs. +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + var i int32 + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK + var zSql uintptr + + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34239, 0) + for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + var zSep uintptr = func() uintptr { + if i == 0 { + return ts + 1525 + } + return ts + 14542 + }() + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34255, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + } + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34262, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22013)) + + if zSql != 0 { + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) + Xsqlite3_free(tls, zSql) + } + + return *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) +} + +// Tokenize the text passed via the second and third arguments. +// +// The callback is invoked once for each token in the input text. The +// arguments passed to it are, in order: +// +// void *pCtx // Copy of 4th argument to sqlite3Fts5Tokenize() +// const char *pToken // Pointer to buffer containing token +// int nToken // Size of token in bytes +// int iStart // Byte offset of start of token within input text +// int iEnd // Byte offset of end of token within input text +// int iPos // Position of token in input (first token is 0) +// +// If the callback returns a non-zero value the tokenization is abandoned +// and no further callbacks are issued. +// +// This function returns SQLITE_OK if successful or an SQLite error code +// if an error occurs. If the tokenization was abandoned early because +// the callback returned SQLITE_DONE, this is not an error and this function +// still returns SQLITE_OK. Or, if the tokenization was abandoned early +// because the callback returned another non-zero value, it is assumed +// to be an SQLite error code and returned to the caller. +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ + if pText == uintptr(0) { + return SQLITE_OK + } + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_tokenizer)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi)).FxTokenize})).f(tls, + (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok, pCtx, flags, pText, nText, xToken) +} + +// Argument pIn points to the first character in what is expected to be +// a comma-separated list of SQL literals followed by a ')' character. +// If it actually is this, return a pointer to the ')'. Otherwise, return +// NULL to indicate a parse error. +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ + var p uintptr = pIn + + for 1 != 0 { + p = fts5ConfigSkipWhitespace(tls, p) + p = fts5ConfigSkipLiteral(tls, p) + p = fts5ConfigSkipWhitespace(tls, p) + if p == uintptr(0) || int32(*(*uint8)(unsafe.Pointer(p))) == ')' { + break + } + if int32(*(*uint8)(unsafe.Pointer(p))) != ',' { + p = uintptr(0) + break + } + p++ + } + + return p +} + +// Parameter zIn contains a rank() function specification. The format of +// this is: +// +// + Bareword (function name) +// + Open parenthesis - "(" +// + Zero or more SQL literals in a comma separated list +// + Close parenthesis - ")" +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var p uintptr = zIn + var pRank uintptr + var zRank uintptr = uintptr(0) + var zRankArgs uintptr = uintptr(0) + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + + *(*uintptr)(unsafe.Pointer(pzRank)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(pzRankArgs)) = uintptr(0) + + if p == uintptr(0) { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR + } else { + p = fts5ConfigSkipWhitespace(tls, p) + pRank = p + p = fts5ConfigSkipBareword(tls, p) + + if p != 0 { + zRank = sqlite3Fts5MallocZero(tls, bp, int64((int64(uintptr(1)+p)-int64(pRank))/1)) + if zRank != 0 { + libc.Xmemcpy(tls, zRank, pRank, uint64((int64(p)-int64(pRank))/1)) + } + } else { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR + } + + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + p = fts5ConfigSkipWhitespace(tls, p) + if int32(*(*uint8)(unsafe.Pointer(p))) != '(' { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR + } + p++ + } + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + var pArgs uintptr + p = fts5ConfigSkipWhitespace(tls, p) + pArgs = p + if int32(*(*uint8)(unsafe.Pointer(p))) != ')' { + p = fts5ConfigSkipArgs(tls, p) + if p == uintptr(0) { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR + } else { + zRankArgs = sqlite3Fts5MallocZero(tls, bp, int64((int64(uintptr(1)+p)-int64(pArgs))/1)) + if zRankArgs != 0 { + libc.Xmemcpy(tls, zRankArgs, pArgs, uint64((int64(p)-int64(pArgs))/1)) + } + } + } + } + } + + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + Xsqlite3_free(tls, zRank) + + } else { + *(*uintptr)(unsafe.Pointer(pzRank)) = zRank + *(*uintptr)(unsafe.Pointer(pzRankArgs)) = zRankArgs + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 = SQLITE_OK + + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34288) { + var pgsz int32 = 0 + if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { + pgsz = Xsqlite3_value_int(tls, pVal) + } + if pgsz < 32 || pgsz > 64*1024 { + *(*int32)(unsafe.Pointer(pbBadkey)) = 1 + } else { + (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz + } + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34293) { + var nHashSize int32 = -1 + if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { + nHashSize = Xsqlite3_value_int(tls, pVal) + } + if nHashSize <= 0 { + *(*int32)(unsafe.Pointer(pbBadkey)) = 1 + } else { + (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize + } + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34302) { + var nAutomerge int32 = -1 + if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { + nAutomerge = Xsqlite3_value_int(tls, pVal) + } + if nAutomerge < 0 || nAutomerge > 64 { + *(*int32)(unsafe.Pointer(pbBadkey)) = 1 + } else { + if nAutomerge == 1 { + nAutomerge = FTS5_DEFAULT_AUTOMERGE + } + (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge + } + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34312) { + var nUsermerge int32 = -1 + if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { + nUsermerge = Xsqlite3_value_int(tls, pVal) + } + if nUsermerge < 2 || nUsermerge > 16 { + *(*int32)(unsafe.Pointer(pbBadkey)) = 1 + } else { + (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge + } + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34322) { + var nCrisisMerge int32 = -1 + if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { + nCrisisMerge = Xsqlite3_value_int(tls, pVal) + } + if nCrisisMerge < 0 { + *(*int32)(unsafe.Pointer(pbBadkey)) = 1 + } else { + if nCrisisMerge <= 1 { + nCrisisMerge = FTS5_DEFAULT_CRISISMERGE + } + if nCrisisMerge >= FTS5_MAX_SEGMENT { + nCrisisMerge = FTS5_MAX_SEGMENT - 1 + } + (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge + } + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22013) { + var zIn uintptr = Xsqlite3_value_text(tls, pVal) + // var zRank uintptr at bp, 8 + + // var zRankArgs uintptr at bp+8, 8 + + rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) + if rc == SQLITE_OK { + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank) + Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank = *(*uintptr)(unsafe.Pointer(bp /* zRank */)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs = *(*uintptr)(unsafe.Pointer(bp + 8 /* zRankArgs */)) + } else if rc == SQLITE_ERROR { + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(pbBadkey)) = 1 + } + } else { + *(*int32)(unsafe.Pointer(pbBadkey)) = 1 + } + return rc +} + +// Load the contents of the %_config table into memory. +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ + bp := tls.Alloc(52) + defer tls.Free(52) + + var zSelect uintptr = ts + 34334 /* "SELECT k, v FROM..." */ + var zSql uintptr + *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK + var iVersion int32 = 0 + + // Set default values + (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = FTS5_DEFAULT_PAGE_SIZE + (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = FTS5_DEFAULT_AUTOMERGE + (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = FTS5_DEFAULT_USERMERGE + (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = FTS5_DEFAULT_CRISISMERGE + (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = 1024 * 1024 + + zSql = sqlite3Fts5Mprintf(tls, bp+32, zSelect, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + if zSql != 0 { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+40, uintptr(0)) + Xsqlite3_free(tls, zSql) + } + + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK { + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { + var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) + var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) + if 0 == Xsqlite3_stricmp(tls, zK, ts+34366) { + iVersion = Xsqlite3_value_int(tls, pVal) + } else { + *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 + sqlite3Fts5ConfigSetValue(tls, pConfig, zK, pVal, bp+48) + } + } + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */))) + } + + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK && iVersion != FTS5_CURRENT_VERSION { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR + if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { + + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, + ts+34374, + libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) + } + } + + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK { + (*Fts5Config)(unsafe.Pointer(pConfig)).FiCookie = iCookie + } + return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) +} + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// + +// #include "fts5Int.h" +// #include "fts5parse.h" + +// All token types in the generated fts5parse.h file are greater than 0. + +type Fts5ExprTerm1 = struct { + FbPrefix U8 + FbFirst U8 + F__ccgo_pad1 [6]byte + FzTerm uintptr + FpIter uintptr + FpSynonym uintptr +} /* sqlite3.c:216813:9 */ + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// + +// #include "fts5Int.h" +// #include "fts5parse.h" + +// All token types in the generated fts5parse.h file are greater than 0. + +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ + +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ + var ap Va_list + _ = ap + ap = va + if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { + + (*Fts5Parse)(unsafe.Pointer(pParse)).FzErr = Xsqlite3_vmprintf(tls, zFmt, ap) + (*Fts5Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + } + _ = ap +} + +func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:221278:12: */ + return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') +} + +// Read the first token from the nul-terminated string at *pz. +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) + var tok int32 + + // Skip past any whitespace + for fts5ExprIsspace(tls, *(*uint8)(unsafe.Pointer(z))) != 0 { + z++ + } + + (*Fts5Token)(unsafe.Pointer(pToken)).Fp = z + (*Fts5Token)(unsafe.Pointer(pToken)).Fn = 1 + switch int32(*(*uint8)(unsafe.Pointer(z))) { + case '(': + tok = FTS5_LP + break + case ')': + tok = FTS5_RP + break + case '{': + tok = FTS5_LCP + break + case '}': + tok = FTS5_RCP + break + case ':': + tok = FTS5_COLON + break + case ',': + tok = FTS5_COMMA + break + case '+': + tok = FTS5_PLUS + break + case '*': + tok = FTS5_STAR + break + case '-': + tok = FTS5_MINUS + break + case '^': + tok = FTS5_CARET + break + case 0: + tok = FTS5_EOF + break + + case '"': + { + var z2 uintptr + tok = FTS5_STRING + + for z2 = z + 1; 1 != 0; z2++ { + if int32(*(*uint8)(unsafe.Pointer(z2))) == '"' { + z2++ + if int32(*(*uint8)(unsafe.Pointer(z2))) != '"' { + break + } + } + if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { + sqlite3Fts5ParseError(tls, pParse, ts+34439, 0) + return FTS5_EOF + } + } + (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) + break + + } + + default: + { + var z2 uintptr + if sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z))) == 0 { + sqlite3Fts5ParseError(tls, pParse, ts+34459, libc.VaList(bp, z)) + return FTS5_EOF + } + tok = FTS5_STRING + for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z2))) != 0; z2++ { + } + (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34490, uint64(2)) == 0 { + tok = FTS5_OR + } + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34493, uint64(3)) == 0 { + tok = FTS5_NOT + } + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29876, uint64(3)) == 0 { + tok = FTS5_AND + } + break + + } + } + + *(*uintptr)(unsafe.Pointer(pz)) = (*Fts5Token)(unsafe.Pointer(pToken)).Fp + uintptr((*Fts5Token)(unsafe.Pointer(pToken)).Fn) + return tok +} + +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ + return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) +} + +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ + Xsqlite3_free(tls, p) +} + +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + // var sParse Fts5Parse at bp, 48 + + // var token Fts5Token at bp+56, 16 + + *(*uintptr)(unsafe.Pointer(bp + 48 /* z */)) = zExpr + var t int32 // Next token type + var pEngine uintptr + var pNew uintptr + + *(*uintptr)(unsafe.Pointer(ppNew)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(pzErr)) = uintptr(0) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Parse{}))) + (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FbPhraseToAnd = bPhraseToAnd + pEngine = sqlite3Fts5ParserAlloc(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, U64) uintptr }{fts5ParseAlloc}))) + if pEngine == uintptr(0) { + return SQLITE_NOMEM + } + (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpConfig = pConfig + + for __ccgo := true; __ccgo; __ccgo = (*Fts5Parse)(unsafe.Pointer(bp)).Frc == SQLITE_OK && t != FTS5_EOF { + t = fts5ExprGetToken(tls, bp, bp+48, bp+56) + sqlite3Fts5Parser(tls, pEngine, t, *(*Fts5Token)(unsafe.Pointer(bp + 56 /* token */)), bp) + } + sqlite3Fts5ParserFree(tls, pEngine, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ParseFree}))) + + // If the LHS of the MATCH expression was a user column, apply the + // implicit column-filter. + if iCol < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol && (*Fts5Parse)(unsafe.Pointer(bp)).FpExpr != 0 && (*Fts5Parse)(unsafe.Pointer(bp)).Frc == SQLITE_OK { + var n int32 = int32(unsafe.Sizeof(Fts5Colset{})) + var pColset uintptr = sqlite3Fts5MallocZero(tls, bp+16, int64(n)) + if pColset != 0 { + (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol = 1 + *(*int32)(unsafe.Pointer(pColset + 4)) = iCol + sqlite3Fts5ParseSetColset(tls, bp, (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpExpr, pColset) + } + } + + if (*Fts5Parse)(unsafe.Pointer(bp)).Frc == SQLITE_OK { + *(*uintptr)(unsafe.Pointer(ppNew)) = libc.AssignUintptr(&pNew, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Fts5Expr{})))) + if pNew == uintptr(0) { + (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).Frc = SQLITE_NOMEM + sqlite3Fts5ParseNodeFree(tls, (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpExpr) + } else { + if !(int32((*Fts5Parse)(unsafe.Pointer(bp)).FpExpr) != 0) { + var nByte int32 = int32(unsafe.Sizeof(Fts5ExprNode{})) + (*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot = sqlite3Fts5MallocZero(tls, bp+16, int64(nByte)) + if (*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot != 0 { + (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FbEof = 1 + } + } else { + (*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot = (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpExpr + } + (*Fts5Expr)(unsafe.Pointer(pNew)).FpIndex = uintptr(0) + (*Fts5Expr)(unsafe.Pointer(pNew)).FpConfig = pConfig + (*Fts5Expr)(unsafe.Pointer(pNew)).FapExprPhrase = (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FapPhrase + (*Fts5Expr)(unsafe.Pointer(pNew)).FnPhrase = (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FnPhrase + (*Fts5Expr)(unsafe.Pointer(pNew)).FbDesc = 0 + (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FapPhrase = uintptr(0) + } + } else { + sqlite3Fts5ParseNodeFree(tls, (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpExpr) + } + + Xsqlite3_free(tls, (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FapPhrase) + *(*uintptr)(unsafe.Pointer(pzErr)) = (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FzErr + return (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).Frc +} + +// This function is only called when using the special 'trigram' tokenizer. +// Argument zText contains the text of a LIKE or GLOB pattern matched +// against column iCol. This function creates and compiles an FTS5 MATCH +// expression that will match a superset of the rows matched by the LIKE or +// GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error +// code. +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ + bp := tls.Alloc(3) + defer tls.Free(3) + + var nText I64 = I64(libc.Xstrlen(tls, zText)) + var zExpr uintptr = Xsqlite3_malloc64(tls, uint64(nText*int64(4)+int64(1))) + var rc int32 = SQLITE_OK + + if zExpr == uintptr(0) { + rc = SQLITE_NOMEM + } else { + // var aSpec [3]uint8 at bp, 3 + + var iOut int32 = 0 + var i int32 = 0 + var iFirst int32 = 0 + + if bGlob == 0 { + *(*uint8)(unsafe.Pointer(bp)) = uint8('_') + *(*uint8)(unsafe.Pointer(bp + 1)) = uint8('%') + *(*uint8)(unsafe.Pointer(bp + 2)) = uint8(0) + } else { + *(*uint8)(unsafe.Pointer(bp)) = uint8('*') + *(*uint8)(unsafe.Pointer(bp + 1)) = uint8('?') + *(*uint8)(unsafe.Pointer(bp + 2)) = uint8('[') + } + + for I64(i) <= nText { + if I64(i) == nText || + int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp))) || int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp + 1))) || int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp + 2))) { + if i-iFirst >= 3 { + var jj int32 + *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8('"') + for jj = iFirst; jj < i; jj++ { + *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*uint8)(unsafe.Pointer(zText + uintptr(jj))) + if int32(*(*uint8)(unsafe.Pointer(zText + uintptr(jj)))) == '"' { + *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8('"') + } + } + *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8('"') + *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8(' ') + } + if int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp + 2))) { + i = i + 2 + if int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i-1)))) == '^' { + i++ + } + for I64(i) < nText && int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) != ']' { + i++ + } + } + iFirst = i + 1 + } + i++ + } + if iOut > 0 { + var bAnd int32 = 0 + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail != FTS5_DETAIL_FULL { + bAnd = 1 + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_NONE { + iCol = (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol + } + } + *(*uint8)(unsafe.Pointer(zExpr + uintptr(iOut))) = uint8(0) + rc = sqlite3Fts5ExprNew(tls, pConfig, bAnd, iCol, zExpr, pp, (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg) + } else { + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + } + Xsqlite3_free(tls, zExpr) + } + + return rc +} + +// Free the expression node object passed as the only argument. +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ + if p != 0 { + var i int32 + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { + sqlite3Fts5ParseNodeFree(tls, *(*uintptr)(unsafe.Pointer(p + 48 + uintptr(i)*8))) + } + sqlite3Fts5ParseNearsetFree(tls, (*Fts5ExprNode)(unsafe.Pointer(p)).FpNear) + Xsqlite3_free(tls, p) + } +} + +// Free the expression object passed as the only argument. +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ + if p != 0 { + sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) + Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) + Xsqlite3_free(tls, p) + } +} + +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + // var sParse Fts5Parse at bp, 48 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Parse{}))) + + if *(*uintptr)(unsafe.Pointer(pp1)) != 0 { + var p1 uintptr = *(*uintptr)(unsafe.Pointer(pp1)) + var nPhrase int32 = (*Fts5Expr)(unsafe.Pointer(p1)).FnPhrase + (*Fts5Expr)(unsafe.Pointer(p2)).FnPhrase + + (*Fts5Expr)(unsafe.Pointer(p1)).FpRoot = sqlite3Fts5ParseNode(tls, bp, FTS5_AND, (*Fts5Expr)(unsafe.Pointer(p1)).FpRoot, (*Fts5Expr)(unsafe.Pointer(p2)).FpRoot, uintptr(0)) + (*Fts5Expr)(unsafe.Pointer(p2)).FpRoot = uintptr(0) + + if (*Fts5Parse)(unsafe.Pointer(bp)).Frc == SQLITE_OK { + var ap uintptr = Xsqlite3_realloc(tls, + (*Fts5Expr)(unsafe.Pointer(p1)).FapExprPhrase, int32(uint64(nPhrase)*uint64(unsafe.Sizeof(uintptr(0))))) + if ap == uintptr(0) { + (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).Frc = SQLITE_NOMEM + } else { + var i int32 + libc.Xmemmove(tls, ap+uintptr((*Fts5Expr)(unsafe.Pointer(p2)).FnPhrase)*8, ap, uint64((*Fts5Expr)(unsafe.Pointer(p1)).FnPhrase)*uint64(unsafe.Sizeof(uintptr(0)))) + for i = 0; i < (*Fts5Expr)(unsafe.Pointer(p2)).FnPhrase; i++ { + *(*uintptr)(unsafe.Pointer(ap + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p2)).FapExprPhrase + uintptr(i)*8)) + } + (*Fts5Expr)(unsafe.Pointer(p1)).FnPhrase = nPhrase + (*Fts5Expr)(unsafe.Pointer(p1)).FapExprPhrase = ap + } + } + Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p2)).FapExprPhrase) + Xsqlite3_free(tls, p2) + } else { + *(*uintptr)(unsafe.Pointer(pp1)) = p2 + } + + return (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).Frc +} + +// Argument pTerm must be a synonym iterator. Return the current rowid +// that it points to. +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ + var iRet I64 = int64(0) + var bRetValid int32 = 0 + var p uintptr + + for p = pTerm; p != 0; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym { + if 0 == int32((*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FbEof) { + var iRowid I64 = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FiRowid + if bRetValid == 0 || bDesc != libc.Bool32(iRowid < iRet) { + iRet = iRowid + bRetValid = 1 + } + } + } + + if pbEof != 0 && bRetValid == 0 { + *(*int32)(unsafe.Pointer(pbEof)) = 1 + } + return iRet +} + +// Argument pTerm must be a synonym iterator. +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + // var aStatic [4]Fts5PoslistReader at bp, 128 + + var aIter uintptr + var nIter int32 + var nAlloc int32 + var rc int32 + var p uintptr + var nByte Sqlite3_int64 + var aNew uintptr + var pIter uintptr + var i int32 + var iMin I64 + // var writer Fts5PoslistWriter at bp+128, 8 + + var iPrev I64 + aIter = bp /* aStatic */ + nIter = 0 + nAlloc = 4 + rc = SQLITE_OK + + p = pTerm +__1: + if !(p != 0) { + goto __3 + } + pIter = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter + if !(int32((*Fts5IndexIter)(unsafe.Pointer(pIter)).FbEof) == 0 && (*Fts5IndexIter)(unsafe.Pointer(pIter)).FiRowid == iRowid) { + goto __4 + } + if !((*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData == 0) { + goto __5 + } + goto __2 +__5: + ; + if !(nIter == nAlloc) { + goto __6 + } + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5PoslistReader{})) * uint64(nAlloc) * uint64(2)) + aNew = Xsqlite3_malloc64(tls, uint64(nByte)) + if !(aNew == uintptr(0)) { + goto __7 + } + rc = SQLITE_NOMEM + goto synonym_poslist_out +__7: + ; + libc.Xmemcpy(tls, aNew, aIter, uint64(unsafe.Sizeof(Fts5PoslistReader{}))*uint64(nIter)) + nAlloc = nAlloc * 2 + if !(aIter != bp) { + goto __8 + } + Xsqlite3_free(tls, aIter) +__8: + ; + aIter = aNew +__6: + ; + sqlite3Fts5PoslistReaderInit(tls, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FpData, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData, aIter+uintptr(nIter)*32) + + nIter++ +__4: + ; + goto __2 +__2: + p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym + goto __1 + goto __3 +__3: + ; + + if !(nIter == 1) { + goto __9 + } + *(*uintptr)(unsafe.Pointer(pa)) = (*Fts5PoslistReader)(unsafe.Pointer(aIter)).Fa + *(*int32)(unsafe.Pointer(pn)) = (*Fts5PoslistReader)(unsafe.Pointer(aIter)).Fn + goto __10 +__9: + *(*Fts5PoslistWriter)(unsafe.Pointer(bp + 128 /* writer */)) = Fts5PoslistWriter{} + iPrev = int64(-1) + sqlite3Fts5BufferZero(tls, pBuf) +__11: + if !(1 != 0) { + goto __12 + } + iMin = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 + i = 0 +__13: + if !(i < nIter) { + goto __15 + } + if !(int32((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).FbEof) == 0) { + goto __16 + } + if !((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).FiPos == iPrev) { + goto __17 + } + if !(sqlite3Fts5PoslistReaderNext(tls, aIter+uintptr(i)*32) != 0) { + goto __18 + } + goto __14 +__18: + ; +__17: + ; + if !((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).FiPos < iMin) { + goto __19 + } + iMin = (*Fts5PoslistReader)(unsafe.Pointer(aIter + uintptr(i)*32)).FiPos +__19: + ; +__16: + ; + goto __14 +__14: + i++ + goto __13 + goto __15 +__15: + ; + if !(iMin == int64(0xffffffff)|I64(int64(0x7fffffff))<<32 || rc != SQLITE_OK) { + goto __20 + } + goto __12 +__20: + ; + rc = sqlite3Fts5PoslistWriterAppend(tls, pBuf, bp+128, iMin) + iPrev = iMin + goto __11 +__12: + ; + if !(rc == SQLITE_OK) { + goto __21 + } + *(*uintptr)(unsafe.Pointer(pa)) = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + *(*int32)(unsafe.Pointer(pn)) = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn +__21: + ; +__10: + ; + +synonym_poslist_out: + if !(aIter != bp) { + goto __22 + } + Xsqlite3_free(tls, aIter) +__22: + ; + return rc +} + +// All individual term iterators in pPhrase are guaranteed to be valid and +// pointing to the same rowid when this function is called. This function +// checks if the current rowid really is a match, and if so populates +// the pPhrase->poslist buffer accordingly. Output parameter *pbMatch +// is set to true if this is really a match, or false otherwise. +// +// SQLITE_OK is returned if an error occurs, or an SQLite error code +// otherwise. It is not considered an error code if the current rowid is +// not a match. +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ + bp := tls.Alloc(168) + defer tls.Free(168) + + // var writer Fts5PoslistWriter at bp+160, 8 + + // var aStatic [4]Fts5PoslistReader at bp, 128 + + var aIter uintptr + var i int32 + var rc int32 + var bFirst int32 + var nByte Sqlite3_int64 + // var buf Fts5Buffer at bp+128, 16 + + var pTerm uintptr + // var n int32 at bp+152, 4 + + var bFlag int32 + // var a uintptr at bp+144, 8 + + var pPos uintptr + var iAdj I64 + var bMatch int32 + var iPos I64 + *(*Fts5PoslistWriter)(unsafe.Pointer(bp + 160 /* writer */)) = Fts5PoslistWriter{} + aIter = bp /* aStatic */ + rc = SQLITE_OK + bFirst = int32((*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32 /* &.aTerm */)).FbFirst) + + sqlite3Fts5BufferZero(tls, pPhrase+8) + + // If the aStatic[] array is not large enough, allocate a large array + // using sqlite3_malloc(). This approach could be improved upon. + if !((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > int32(uint64(unsafe.Sizeof([4]Fts5PoslistReader{}))/uint64(unsafe.Sizeof(Fts5PoslistReader{})))) { + goto __1 + } + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5PoslistReader{})) * uint64((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm)) + aIter = Xsqlite3_malloc64(tls, uint64(nByte)) + if !!(aIter != 0) { + goto __2 + } + return SQLITE_NOMEM +__2: + ; +__1: + ; + libc.Xmemset(tls, aIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))*uint64((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm)) + + // Initialize a term iterator for each term in the phrase + i = 0 +__3: + if !(i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm) { + goto __5 + } + pTerm = pPhrase + 32 + uintptr(i)*32 + *(*int32)(unsafe.Pointer(bp + 152 /* n */)) = 0 + bFlag = 0 + *(*uintptr)(unsafe.Pointer(bp + 144 /* a */)) = uintptr(0) + if !((*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym != 0) { + goto __6 + } + *(*Fts5Buffer)(unsafe.Pointer(bp + 128 /* buf */)) = Fts5Buffer{} + rc = fts5ExprSynonymList(tls, pTerm, (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid, bp+128, bp+144, bp+152) + if !(rc != 0) { + goto __8 + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 144 /* a */))) + goto ismatch_out +__8: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 144)) == (*Fts5Buffer)(unsafe.Pointer(bp+128)).Fp) { + goto __9 + } + bFlag = 1 +__9: + ; + goto __7 +__6: + *(*uintptr)(unsafe.Pointer(bp + 144 /* a */)) = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpIter)).FpData + *(*int32)(unsafe.Pointer(bp + 152 /* n */)) = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpIter)).FnData +__7: + ; + sqlite3Fts5PoslistReaderInit(tls, *(*uintptr)(unsafe.Pointer(bp + 144 /* a */)), *(*int32)(unsafe.Pointer(bp + 152 /* n */)), aIter+uintptr(i)*32) + (*Fts5PoslistReader)(unsafe.Pointer(aIter + uintptr(i)*32)).FbFlag = U8(bFlag) + if !((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).FbEof != 0) { + goto __10 + } + goto ismatch_out +__10: + ; + goto __4 +__4: + i++ + goto __3 + goto __5 +__5: + ; + +__11: + if !(1 != 0) { + goto __12 + } + iPos = (*Fts5PoslistReader)(unsafe.Pointer(aIter)).FiPos +__13: + bMatch = 1 + i = 0 +__16: + if !(i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm) { + goto __18 + } + pPos = aIter + uintptr(i)*32 + iAdj = iPos + I64(i) + if !((*Fts5PoslistReader)(unsafe.Pointer(pPos)).FiPos != iAdj) { + goto __19 + } + bMatch = 0 +__20: + if !((*Fts5PoslistReader)(unsafe.Pointer(pPos)).FiPos < iAdj) { + goto __21 + } + if !(sqlite3Fts5PoslistReaderNext(tls, pPos) != 0) { + goto __22 + } + goto ismatch_out +__22: + ; + goto __20 +__21: + ; + if !((*Fts5PoslistReader)(unsafe.Pointer(pPos)).FiPos > iAdj) { + goto __23 + } + iPos = (*Fts5PoslistReader)(unsafe.Pointer(pPos)).FiPos - I64(i) +__23: + ; +__19: + ; + goto __17 +__17: + i++ + goto __16 + goto __18 +__18: + ; + goto __14 +__14: + if bMatch == 0 { + goto __13 + } + goto __15 +__15: + ; + + // Append position iPos to the output + if !(bFirst == 0 || int32(iPos&int64(0x7FFFFFFF)) == 0) { + goto __24 + } + rc = sqlite3Fts5PoslistWriterAppend(tls, pPhrase+8, bp+160, iPos) + if !(rc != SQLITE_OK) { + goto __25 + } + goto ismatch_out +__25: + ; +__24: + ; + + i = 0 +__26: + if !(i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm) { + goto __28 + } + if !(sqlite3Fts5PoslistReaderNext(tls, aIter+uintptr(i)*32) != 0) { + goto __29 + } + goto ismatch_out +__29: + ; + goto __27 +__27: + i++ + goto __26 + goto __28 +__28: + ; + goto __11 +__12: + ; + +ismatch_out: + *(*int32)(unsafe.Pointer(pbMatch)) = libc.Bool32((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn > 0) + i = 0 +__30: + if !(i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm) { + goto __32 + } + if !((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).FbFlag != 0) { + goto __33 + } + Xsqlite3_free(tls, (*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).Fa) +__33: + ; + goto __31 +__31: + i++ + goto __30 + goto __32 +__32: + ; + if !(aIter != bp) { + goto __34 + } + Xsqlite3_free(tls, aIter) +__34: + ; + return rc +} + +type Fts5LookaheadReader1 = struct { + Fa uintptr + Fn int32 + Fi int32 + FiPos I64 + FiLookahead I64 +} /* sqlite3.c:221757:9 */ + +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ + +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ + (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead + if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { + (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 + } + return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) +} + +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{}))) + (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a + (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n + fts5LookaheadReaderNext(tls, p) + return fts5LookaheadReaderNext(tls, p) +} + +type Fts5NearTrimmer1 = struct { + Freader Fts5LookaheadReader + Fwriter Fts5PoslistWriter + FpOut uintptr +} /* sqlite3.c:221787:9 */ + +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ + +// The near-set object passed as the first argument contains more than +// one phrase. All phrases currently point to the same row. The +// Fts5ExprPhrase.poslist buffers are populated accordingly. This function +// tests if the current row contains instances of each phrase sufficiently +// close together to meet the NEAR constraint. Non-zero is returned if it +// does, or zero otherwise. +// +// If in/out parameter (*pRc) is set to other than SQLITE_OK when this +// function is called, it is a no-op. Or, if an error (e.g. SQLITE_NOMEM) +// occurs within this function (*pRc) is set accordingly before returning. +// The return value is undefined in both these cases. +// +// If no error occurs and non-zero (a match) is returned, the position-list +// of each phrase object is edited to contain only those entries that +// meet the constraint before returning. +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ + bp := tls.Alloc(196) + defer tls.Free(196) + + // var aStatic [4]Fts5NearTrimmer at bp, 192 + + var a uintptr + var apPhrase uintptr + var i int32 + // var rc int32 at bp+192, 4 + + var bMatch int32 + var nByte Sqlite3_int64 + var pPoslist uintptr + var pPos uintptr + var iPos I64 + var pWriter uintptr + var iAdv int32 + var iMin I64 + var iMax I64 + var bRet int32 + a = bp /* aStatic */ + apPhrase = pNear + 24 /* &.apPhrase */ + *(*int32)(unsafe.Pointer(bp + 192 /* rc */)) = *(*int32)(unsafe.Pointer(pRc)) + + // If the aStatic[] array is not large enough, allocate a large array + // using sqlite3_malloc(). This approach could be improved upon. + if !((*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase > int32(uint64(unsafe.Sizeof([4]Fts5NearTrimmer{}))/uint64(unsafe.Sizeof(Fts5NearTrimmer{})))) { + goto __1 + } + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5NearTrimmer{})) * uint64((*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase)) + a = sqlite3Fts5MallocZero(tls, bp+192, nByte) + goto __2 +__1: + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([4]Fts5NearTrimmer{}))) +__2: + ; + if !(*(*int32)(unsafe.Pointer(bp + 192)) != SQLITE_OK) { + goto __3 + } + *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp + 192 /* rc */)) + return 0 +__3: + ; + + // Initialize a lookahead iterator for each phrase. After passing the + // buffer and buffer size to the lookaside-reader init function, zero + // the phrase poslist buffer. The new poslist for the phrase (containing + // the same entries as the original with some entries removed on account + // of the NEAR constraint) is written over the original even as it is + // being read. This is safe as the entries for the new poslist are a + // subset of the old, so it is not possible for data yet to be read to + // be overwritten. + i = 0 +__4: + if !(i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase) { + goto __6 + } + pPoslist = *(*uintptr)(unsafe.Pointer(apPhrase + uintptr(i)*8)) + 8 + fts5LookaheadReaderInit(tls, (*Fts5Buffer)(unsafe.Pointer(pPoslist)).Fp, (*Fts5Buffer)(unsafe.Pointer(pPoslist)).Fn, a+uintptr(i)*48) + (*Fts5Buffer)(unsafe.Pointer(pPoslist)).Fn = 0 + (*Fts5NearTrimmer)(unsafe.Pointer(a + uintptr(i)*48)).FpOut = pPoslist + goto __5 +__5: + i++ + goto __4 + goto __6 +__6: + ; + +__7: + if !(1 != 0) { + goto __8 + } + + // This block advances the phrase iterators until they point to a set of + // entries that together comprise a match. + iMax = (*Fts5NearTrimmer)(unsafe.Pointer(a)).Freader.FiPos +__9: + bMatch = 1 + i = 0 +__12: + if !(i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase) { + goto __14 + } + pPos = a + uintptr(i)*48 + iMin = iMax - I64((*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(i)*8)))).FnTerm) - I64((*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnNear) + if !((*Fts5LookaheadReader)(unsafe.Pointer(pPos)).FiPos < iMin || (*Fts5LookaheadReader)(unsafe.Pointer(pPos)).FiPos > iMax) { + goto __15 + } + bMatch = 0 +__16: + if !((*Fts5LookaheadReader)(unsafe.Pointer(pPos)).FiPos < iMin) { + goto __17 + } + if !(fts5LookaheadReaderNext(tls, pPos) != 0) { + goto __18 + } + goto ismatch_out +__18: + ; + goto __16 +__17: + ; + if !((*Fts5LookaheadReader)(unsafe.Pointer(pPos)).FiPos > iMax) { + goto __19 + } + iMax = (*Fts5LookaheadReader)(unsafe.Pointer(pPos)).FiPos +__19: + ; +__15: + ; + goto __13 +__13: + i++ + goto __12 + goto __14 +__14: + ; + goto __10 +__10: + if bMatch == 0 { + goto __9 + } + goto __11 +__11: + ; + + // Add an entry to each output position list + i = 0 +__20: + if !(i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase) { + goto __22 + } + iPos = (*Fts5NearTrimmer)(unsafe.Pointer(a + uintptr(i)*48)).Freader.FiPos + pWriter = a + uintptr(i)*48 + 32 + if !((*Fts5Buffer)(unsafe.Pointer((*Fts5NearTrimmer)(unsafe.Pointer(a+uintptr(i)*48)).FpOut)).Fn == 0 || iPos != (*Fts5PoslistWriter)(unsafe.Pointer(pWriter)).FiPrev) { + goto __23 + } + sqlite3Fts5PoslistWriterAppend(tls, (*Fts5NearTrimmer)(unsafe.Pointer(a+uintptr(i)*48)).FpOut, pWriter, iPos) +__23: + ; + goto __21 +__21: + i++ + goto __20 + goto __22 +__22: + ; + + iAdv = 0 + iMin = (*Fts5NearTrimmer)(unsafe.Pointer(a)).Freader.FiLookahead + i = 0 +__24: + if !(i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase) { + goto __26 + } + if !((*Fts5NearTrimmer)(unsafe.Pointer(a+uintptr(i)*48)).Freader.FiLookahead < iMin) { + goto __27 + } + iMin = (*Fts5NearTrimmer)(unsafe.Pointer(a + uintptr(i)*48)).Freader.FiLookahead + iAdv = i +__27: + ; + goto __25 +__25: + i++ + goto __24 + goto __26 +__26: + ; + if !(fts5LookaheadReaderNext(tls, a+uintptr(iAdv)*48) != 0) { + goto __28 + } + goto ismatch_out +__28: + ; + goto __7 +__8: + ; + +ismatch_out: + bRet = libc.Bool32((*Fts5Buffer)(unsafe.Pointer((*Fts5NearTrimmer)(unsafe.Pointer(a)).FpOut)).Fn > 0) + *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp + 192 /* rc */)) + if !(a != bp) { + goto __29 + } + Xsqlite3_free(tls, a) +__29: + ; + return bRet + + return int32(0) +} + +// Advance iterator pIter until it points to a value equal to or laster +// than the initial value of *piLast. If this means the iterator points +// to a value laster than *piLast, update *piLast to the new lastest value. +// +// If the iterator reaches EOF, set *pbEof to true before returning. If +// an error occurs, set *pRc to an error code. If either *pbEof or *pRc +// are set, return a non-zero value. Otherwise, return zero. +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ + var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) + var iRowid I64 + + iRowid = (*Fts5IndexIter)(unsafe.Pointer(pIter)).FiRowid + if bDesc == 0 && iLast > iRowid || bDesc != 0 && iLast < iRowid { + var rc int32 = sqlite3Fts5IterNextFrom(tls, pIter, iLast) + if rc != 0 || (*Fts5IndexIter)(unsafe.Pointer(pIter)).FbEof != 0 { + *(*int32)(unsafe.Pointer(pRc)) = rc + *(*int32)(unsafe.Pointer(pbEof)) = 1 + return 1 + } + iRowid = (*Fts5IndexIter)(unsafe.Pointer(pIter)).FiRowid + + } + *(*I64)(unsafe.Pointer(piLast)) = iRowid + + return 0 +} + +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var rc int32 = SQLITE_OK + var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) + var p uintptr + *(*int32)(unsafe.Pointer(bp /* bEof */)) = 0 + + for p = pTerm; rc == SQLITE_OK && p != 0; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym { + if int32((*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FbEof) == 0 { + var iRowid I64 = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FiRowid + if bDesc == 0 && iLast > iRowid || bDesc != 0 && iLast < iRowid { + rc = sqlite3Fts5IterNextFrom(tls, (*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter, iLast) + } + } + } + + if rc != SQLITE_OK { + *(*int32)(unsafe.Pointer(pRc)) = rc + *(*int32)(unsafe.Pointer(bp /* bEof */)) = 1 + } else { + *(*I64)(unsafe.Pointer(piLast)) = fts5ExprSynonymRowid(tls, pTerm, bDesc, bp) + } + return *(*int32)(unsafe.Pointer(bp /* bEof */)) +} + +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = *(*int32)(unsafe.Pointer(pRc)) + + if (*Fts5Config)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FpConfig)).FeDetail != FTS5_DETAIL_FULL { + var pTerm uintptr + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer(pNear + 24)) + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn = 0 + for pTerm = pPhrase + 32; pTerm != 0; pTerm = (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym { + var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpIter + if int32((*Fts5IndexIter)(unsafe.Pointer(pIter)).FbEof) == 0 { + if (*Fts5IndexIter)(unsafe.Pointer(pIter)).FiRowid == (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid && (*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData > 0 { + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn = 1 + } + } + } + return (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn + } else { + var i int32 + + // Check that each phrase in the nearset matches the current row. + // Populate the pPhrase->poslist buffers at the same time. If any + // phrase is not a match, break out of the loop early. + for i = 0; *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK && i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(i)*8)) + if (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FpSynonym != 0 || + (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset != 0 || (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { + *(*int32)(unsafe.Pointer(bp /* bMatch */)) = 0 + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = fts5ExprPhraseIsMatch(tls, pNode, pPhrase, bp) + if *(*int32)(unsafe.Pointer(bp)) == 0 { + break + } + } else { + var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FpIter + sqlite3Fts5BufferSet(tls, bp+4, pPhrase+8, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FpData) + } + } + + *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) + if i == (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase && (i == 1 || fts5ExprNearIsMatch(tls, pRc, pNear) != 0) { + return 1 + } + return 0 + } + return int32(0) +} + +// Initialize all term iterators in the pNear object. If any term is found +// to match no documents at all, return immediately without initializing any +// further iterators. +// +// If an error occurs, return an SQLite error code. Otherwise, return +// SQLITE_OK. It is not considered an error if some term matches zero +// documents. +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ + var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + var i int32 + + for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(i)*8)) + if (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm == 0 { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 + return SQLITE_OK + } else { + var j int32 + for j = 0; j < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; j++ { + var pTerm uintptr = pPhrase + 32 + uintptr(j)*32 + var p uintptr + var bHit int32 = 0 + + for p = pTerm; p != 0; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym { + var rc int32 + if (*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter != 0 { + sqlite3Fts5IterClose(tls, (*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter) + (*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter = uintptr(0) + } + rc = sqlite3Fts5IndexQuery(tls, + (*Fts5Expr)(unsafe.Pointer(pExpr)).FpIndex, (*Fts5ExprTerm)(unsafe.Pointer(p)).FzTerm, int32(libc.Xstrlen(tls, (*Fts5ExprTerm)(unsafe.Pointer(p)).FzTerm)), + func() int32 { + if (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FbPrefix != 0 { + return FTS5INDEX_QUERY_PREFIX + } + return 0 + }()|func() int32 { + if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc != 0 { + return FTS5INDEX_QUERY_DESC + } + return 0 + }(), + (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset, + p+16) + + if rc != SQLITE_OK { + return rc + } + if 0 == int32((*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FbEof) { + bHit = 1 + } + } + + if bHit == 0 { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 + return SQLITE_OK + } + } + } + } + + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 + return SQLITE_OK +} + +// If pExpr is an ASC iterator, this function returns a value with the +// same sign as: +// +// (iLhs - iRhs) +// +// Otherwise, if this is a DESC iterator, the opposite is returned: +// +// (iRhs - iLhs) +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ + + if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { + if iLhs < iRhs { + return -1 + } + return libc.Bool32(iLhs > iRhs) + } else { + if iLhs > iRhs { + return -1 + } + return libc.Bool32(iLhs < iRhs) + } + return int32(0) +} + +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ + var i int32 + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + fts5ExprSetEof(tls, *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8))) + } +} + +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { + var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + var i int32 + for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(i)*8)) + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn = 0 + } + } else { + var i int32 + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + fts5ExprNodeZeroPoslist(tls, *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8))) + } + } +} + +// Compare the values currently indicated by the two nodes as follows: +// +// res = (*p1) - (*p2) +// +// Nodes that point to values that come later in the iteration order are +// considered to be larger. Nodes at EOF are the largest of all. +// +// This means that if the iteration order is ASC, then numerically larger +// rowids are considered larger. Or if it is the default DESC, numerically +// smaller rowids are larger. +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ + if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { + return -1 + } + if (*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof != 0 { + return +1 + } + return fts5RowidCmp(tls, pExpr, (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid, (*Fts5ExprNode)(unsafe.Pointer(p2)).FiRowid) +} + +// All individual term iterators in pNear are guaranteed to be valid when +// this function is called. This function checks if all term iterators +// point to the same rowid, and if not, advances them until they do. +// If an EOF is reached before this happens, *pbEof is set to true before +// returning. +// +// SQLITE_OK is returned if an error occurs, or an SQLite error code +// otherwise. It is not considered an error code if an iterator reaches +// EOF. +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + var pLeft uintptr = *(*uintptr)(unsafe.Pointer(pNear + 24)) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK + // var iLast I64 at bp, 8 + // Lastest rowid any iterator points to + var i int32 + var j int32 // Phrase and token index, respectively + var bMatch int32 // True if all terms are at the same rowid + var bDesc int32 = (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc + + // Check that this node should not be FTS5_TERM + + // Initialize iLast, the "lastest" rowid any iterator points to. If the + // iterator skips through rowids in the default ascending order, this means + // the maximum rowid. Or, if the iterator is "ORDER BY rowid DESC", then it + // means the minimum rowid. + if (*Fts5ExprTerm)(unsafe.Pointer(pLeft+32)).FpSynonym != 0 { + *(*I64)(unsafe.Pointer(bp /* iLast */)) = fts5ExprSynonymRowid(tls, pLeft+32, bDesc, uintptr(0)) + } else { + *(*I64)(unsafe.Pointer(bp /* iLast */)) = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(pLeft + 32)).FpIter)).FiRowid + } + + for __ccgo := true; __ccgo; __ccgo = bMatch == 0 { + bMatch = 1 + for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(i)*8)) + for j = 0; j < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; j++ { + var pTerm uintptr = pPhrase + 32 + uintptr(j)*32 + if (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym != 0 { + var iRowid I64 = fts5ExprSynonymRowid(tls, pTerm, bDesc, uintptr(0)) + if iRowid == *(*I64)(unsafe.Pointer(bp)) { + continue + } + bMatch = 0 + if fts5ExprSynonymAdvanceto(tls, pTerm, bDesc, bp, bp+8) != 0 { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) + } + } else { + var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32 + uintptr(j)*32)).FpIter + if (*Fts5IndexIter)(unsafe.Pointer(pIter)).FiRowid == *(*I64)(unsafe.Pointer(bp)) || (*Fts5IndexIter)(unsafe.Pointer(pIter)).FbEof != 0 { + continue + } + bMatch = 0 + if fts5ExprAdvanceto(tls, pIter, bDesc, bp, bp+8, pNode+4) != 0 { + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) + } + } + } + } + } + + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = *(*I64)(unsafe.Pointer(bp /* iLast */)) + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = libc.Bool32(0 == fts5ExprNearTest(tls, bp+8, pExpr, pNode) && *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK) + + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) +} + +// Advance the first term iterator in the first phrase of pNear. Set output +// variable *pbEof to true if it reaches EOF or if an error occurs. +// +// Return SQLITE_OK if successful, or an SQLite error code if an error +// occurs. +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ + var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 + var rc int32 = SQLITE_OK + + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + if (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym != 0 { + var bEof int32 = 1 + var p uintptr + + // Find the firstest rowid any synonym points to. + var iRowid I64 = fts5ExprSynonymRowid(tls, pTerm, (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc, uintptr(0)) + + // Advance each iterator that currently points to iRowid. Or, if iFrom + // is valid - each iterator that points to a rowid before iFrom. + for p = pTerm; p != 0; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym { + if int32((*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FbEof) == 0 { + var ii I64 = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FiRowid + if ii == iRowid || + bFromValid != 0 && ii != iFrom && libc.Bool32(ii > iFrom) == (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc { + if bFromValid != 0 { + rc = sqlite3Fts5IterNextFrom(tls, (*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter, iFrom) + } else { + rc = sqlite3Fts5IterNext(tls, (*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter) + } + if rc != SQLITE_OK { + break + } + if int32((*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(p)).FpIter)).FbEof) == 0 { + bEof = 0 + } + } else { + bEof = 0 + } + } + } + + // Set the EOF flag if either all synonym iterators are at EOF or an + // error has occurred. + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = libc.Bool32(rc != 0 || bEof != 0) + } else { + var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpIter + + if bFromValid != 0 { + rc = sqlite3Fts5IterNextFrom(tls, pIter, iFrom) + } else { + rc = sqlite3Fts5IterNext(tls, pIter) + } + + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = libc.Bool32(rc != 0 || (*Fts5IndexIter)(unsafe.Pointer(pIter)).FbEof != 0) + } + + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { + + rc = fts5ExprNodeTest_STRING(tls, pExpr, pNode) + } + + return rc +} + +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ + // As this "NEAR" object is actually a single phrase that consists + // of a single term only, grab pointers into the poslist managed by the + // fts5_index.c iterator object. This is much faster than synthesizing + // a new poslist the way we have to for more complicated phrase or NEAR + // expressions. + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FpIter + + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn = (*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData + if (*Fts5Config)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FpConfig)).FeDetail == FTS5_DETAIL_FULL { + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fp = (*Fts5IndexIter)(unsafe.Pointer(pIter)).FpData + } + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = (*Fts5IndexIter)(unsafe.Pointer(pIter)).FiRowid + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = libc.Bool32((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn == 0) + return SQLITE_OK +} + +// xNext() method for a node of type FTS5_TERM. +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ + var rc int32 + var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter + + if bFromValid != 0 { + rc = sqlite3Fts5IterNextFrom(tls, pIter, iFrom) + } else { + rc = sqlite3Fts5IterNext(tls, pIter) + } + if rc == SQLITE_OK && int32((*Fts5IndexIter)(unsafe.Pointer(pIter)).FbEof) == 0 { + rc = fts5ExprNodeTest_TERM(tls, pExpr, pNode) + } else { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + } + return rc +} + +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ + var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) + var i int32 + + for i = 1; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + var pChild uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8)) + var cmp int32 = fts5NodeCompare(tls, pExpr, pNext, pChild) + if cmp > 0 || cmp == 0 && (*Fts5ExprNode)(unsafe.Pointer(pChild)).FbNomatch == 0 { + pNext = pChild + } + } + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FiRowid + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbEof + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch +} + +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ + var i int32 + var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid + + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8)) + + if (*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof == 0 { + if (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid == iLast || + bFromValid != 0 && fts5RowidCmp(tls, pExpr, (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid, iFrom) < 0 { + var rc int32 = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(p1)).FxNext})).f(tls, pExpr, p1, bFromValid, iFrom) + if rc != SQLITE_OK { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + return rc + } + } + } + } + + fts5ExprNodeTest_OR(tls, pExpr, pNode) + return SQLITE_OK +} + +// Argument pNode is an FTS5_AND node. +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ + var iChild int32 + var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid + var rc int32 = SQLITE_OK + var bMatch int32 + + for __ccgo := true; __ccgo; __ccgo = bMatch == 0 { + (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FbNomatch = 0 + bMatch = 1 + for iChild = 0; iChild < (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FnChild; iChild++ { + var pChild uintptr = *(*uintptr)(unsafe.Pointer(pAnd + 48 + uintptr(iChild)*8)) + var cmp int32 = fts5RowidCmp(tls, pExpr, iLast, (*Fts5ExprNode)(unsafe.Pointer(pChild)).FiRowid) + if cmp > 0 { + // Advance pChild until it points to iLast or laster + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(pChild)).FxNext})).f(tls, pExpr, pChild, 1, iLast) + if rc != SQLITE_OK { + (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FbNomatch = 0 + return rc + } + } + + // If the child node is now at EOF, so is the parent AND node. Otherwise, + // the child node is guaranteed to have advanced at least as far as + // rowid iLast. So if it is not at exactly iLast, pChild->iRowid is the + // new lastest rowid seen so far. + + if (*Fts5ExprNode)(unsafe.Pointer(pChild)).FbEof != 0 { + fts5ExprSetEof(tls, pAnd) + bMatch = 1 + break + } else if iLast != (*Fts5ExprNode)(unsafe.Pointer(pChild)).FiRowid { + bMatch = 0 + iLast = (*Fts5ExprNode)(unsafe.Pointer(pChild)).FiRowid + } + + if (*Fts5ExprNode)(unsafe.Pointer(pChild)).FbNomatch != 0 { + (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FbNomatch = 1 + } + } + } + + if (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FbNomatch != 0 && pAnd != (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot { + fts5ExprNodeZeroPoslist(tls, pAnd) + } + (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid = iLast + return SQLITE_OK +} + +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ + var rc int32 = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) + if rc == SQLITE_OK { + rc = fts5ExprNodeTest_AND(tls, pExpr, pNode) + } else { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + } + return rc +} + +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ + var rc int32 = SQLITE_OK + var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) + var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) + + for rc == SQLITE_OK && (*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof == 0 { + var cmp int32 = fts5NodeCompare(tls, pExpr, p1, p2) + if cmp > 0 { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(p2)).FxNext})).f(tls, pExpr, p2, 1, (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid) + cmp = fts5NodeCompare(tls, pExpr, p1, p2) + } + + if cmp != 0 || (*Fts5ExprNode)(unsafe.Pointer(p2)).FbNomatch != 0 { + break + } + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(p1)).FxNext})).f(tls, pExpr, p1, 0, int64(0)) + } + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = (*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(p1)).FbNomatch + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid + if (*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof != 0 { + fts5ExprNodeZeroPoslist(tls, p2) + } + return rc +} + +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ + var rc int32 = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) + if rc == SQLITE_OK { + rc = fts5ExprNodeTest_NOT(tls, pExpr, pNode) + } + if rc != SQLITE_OK { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + } + return rc +} + +// If pNode currently points to a match, this function returns SQLITE_OK +// without modifying it. Otherwise, pNode is advanced until it does point +// to a match or EOF is reached. +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ + var rc int32 = SQLITE_OK + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { + switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { + + case FTS5_STRING: + { + rc = fts5ExprNodeTest_STRING(tls, pExpr, pNode) + break + + } + fallthrough + + case FTS5_TERM: + { + rc = fts5ExprNodeTest_TERM(tls, pExpr, pNode) + break + + } + fallthrough + + case FTS5_AND: + { + rc = fts5ExprNodeTest_AND(tls, pExpr, pNode) + break + + } + fallthrough + + case FTS5_OR: + { + fts5ExprNodeTest_OR(tls, pExpr, pNode) + break + + } + fallthrough + + default: + { + rc = fts5ExprNodeTest_NOT(tls, pExpr, pNode) + break + + } + } + } + return rc +} + +// Set node pNode, which is part of expression pExpr, to point to the first +// match. If there are no matches, set the Node.bEof flag to indicate EOF. +// +// Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. +// It is not an error if there are no matches. +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ + var rc int32 = SQLITE_OK + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 + + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { + // Initialize all term iterators in the NEAR object. + rc = fts5ExprNearInitAll(tls, pExpr, pNode) + } else if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FxNext == uintptr(0) { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 + } else { + var i int32 + var nEof int32 = 0 + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild && rc == SQLITE_OK; i++ { + var pChild uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8)) + rc = fts5ExprNodeFirst(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8))) + + nEof = nEof + (*Fts5ExprNode)(unsafe.Pointer(pChild)).FbEof + } + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = (*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48)))).FiRowid + + switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { + case FTS5_AND: + if nEof > 0 { + fts5ExprSetEof(tls, pNode) + } + break + fallthrough + + case FTS5_OR: + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild == nEof { + fts5ExprSetEof(tls, pNode) + } + break + fallthrough + + default: + + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = (*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48)))).FbEof + break + } + } + + if rc == SQLITE_OK { + rc = fts5ExprNodeTest(tls, pExpr, pNode) + } + return rc +} + +// Begin iterating through the set of documents in index pIdx matched by +// the MATCH expression passed as the first argument. If the "bDesc" +// parameter is passed a non-zero value, iteration is in descending rowid +// order. Or, if it is zero, in ascending order. +// +// If iterating in ascending rowid order (bDesc==0), the first document +// visited is that with the smallest rowid that is larger than or equal +// to parameter iFirst. Or, if iterating in ascending order (bDesc==1), +// then the first document visited must have a rowid smaller than or +// equal to iFirst. +// +// Return SQLITE_OK if successful, or an SQLite error code otherwise. It +// is not considered an error if the query does not match any documents. +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ + var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot + var rc int32 // Return code + + (*Fts5Expr)(unsafe.Pointer(p)).FpIndex = pIdx + (*Fts5Expr)(unsafe.Pointer(p)).FbDesc = bDesc + rc = fts5ExprNodeFirst(tls, p, pRoot) + + // If not at EOF but the current rowid occurs earlier than iFirst in + // the iteration order, move to document iFirst or later. + if rc == SQLITE_OK && + 0 == (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FbEof && + fts5RowidCmp(tls, p, (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FiRowid, iFirst) < 0 { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(pRoot)).FxNext})).f(tls, p, pRoot, 1, iFirst) + } + + // If the iterator is not at a real match, skip forward until it is. + for (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FbNomatch != 0 && rc == SQLITE_OK { + + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(pRoot)).FxNext})).f(tls, p, pRoot, 0, int64(0)) + } + return rc +} + +// Move to the next document +// +// Return SQLITE_OK if successful, or an SQLite error code otherwise. It +// is not considered an error if the query does not match any documents. +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ + var rc int32 + var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot + + for __ccgo := true; __ccgo; __ccgo = (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FbNomatch != 0 { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(pRoot)).FxNext})).f(tls, p, pRoot, 0, int64(0)) + + } + if fts5RowidCmp(tls, p, (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FiRowid, iLast) > 0 { + (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FbEof = 1 + } + return rc +} + +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ + return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof +} + +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ + return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid +} + +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + *(*uintptr)(unsafe.Pointer(pz)) = sqlite3Fts5Strndup(tls, bp, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, (*Fts5Token)(unsafe.Pointer(pToken)).Fn) + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Free the phrase object passed as the only argument. +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ + if pPhrase != 0 { + var i int32 + for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { + var pSyn uintptr + var pNext uintptr + var pTerm uintptr = pPhrase + 32 + uintptr(i)*32 + Xsqlite3_free(tls, (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FzTerm) + sqlite3Fts5IterClose(tls, (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpIter) + for pSyn = (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym; pSyn != 0; pSyn = pNext { + pNext = (*Fts5ExprTerm)(unsafe.Pointer(pSyn)).FpSynonym + sqlite3Fts5IterClose(tls, (*Fts5ExprTerm)(unsafe.Pointer(pSyn)).FpIter) + sqlite3Fts5BufferFree(tls, pSyn+1*32) + Xsqlite3_free(tls, pSyn) + } + } + if (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.FnSpace > 0 { + sqlite3Fts5BufferFree(tls, pPhrase+8) + } + Xsqlite3_free(tls, pPhrase) + } +} + +// Set the "bFirst" flag on the first token of the phrase passed as the +// only argument. +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ + if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { + (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) + } +} + +// If argument pNear is NULL, then a new Fts5ExprNearset object is allocated +// and populated with pPhrase. Or, if pNear is not NULL, phrase pPhrase is +// appended to it and the results returned. +// +// If an OOM error occurs, both the pNear and pPhrase objects are freed and +// NULL returned. +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ + var SZALLOC int32 = 8 + var pRet uintptr = uintptr(0) + + if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { + if pPhrase == uintptr(0) { + return pNear + } + if pNear == uintptr(0) { + var nByte Sqlite3_int64 + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5ExprNearset{})) + uint64(SZALLOC)*uint64(unsafe.Sizeof(uintptr(0)))) + pRet = Xsqlite3_malloc64(tls, uint64(nByte)) + if pRet == uintptr(0) { + (*Fts5Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, pRet, 0, Size_t(nByte)) + } + } else if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase%SZALLOC == 0 { + var nNew int32 = (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase + SZALLOC + var nByte Sqlite3_int64 + + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5ExprNearset{})) + uint64(nNew)*uint64(unsafe.Sizeof(uintptr(0)))) + pRet = Xsqlite3_realloc64(tls, pNear, uint64(nByte)) + if pRet == uintptr(0) { + (*Fts5Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + } + } else { + pRet = pNear + } + } + + if pRet == uintptr(0) { + + sqlite3Fts5ParseNearsetFree(tls, pNear) + sqlite3Fts5ParsePhraseFree(tls, pPhrase) + } else { + if (*Fts5ExprNearset)(unsafe.Pointer(pRet)).FnPhrase > 0 { + var pLast uintptr = *(*uintptr)(unsafe.Pointer(pRet + 24 + uintptr((*Fts5ExprNearset)(unsafe.Pointer(pRet)).FnPhrase-1)*8)) + + if (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm == 0 { + fts5ExprPhraseFree(tls, pPhrase) + (*Fts5ExprNearset)(unsafe.Pointer(pRet)).FnPhrase-- + (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-- + pPhrase = pLast + } else if (*Fts5ExprPhrase)(unsafe.Pointer(pLast)).FnTerm == 0 { + fts5ExprPhraseFree(tls, pLast) + *(*uintptr)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FapPhrase + uintptr((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-2)*8)) = pPhrase + (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-- + (*Fts5ExprNearset)(unsafe.Pointer(pRet)).FnPhrase-- + } + } + *(*uintptr)(unsafe.Pointer(pRet + 24 + uintptr(libc.PostIncInt32(&(*Fts5ExprNearset)(unsafe.Pointer(pRet)).FnPhrase, 1))*8)) = pPhrase + } + return pRet +} + +type TokenCtx1 = struct { + FpPhrase uintptr + Frc int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:222781:9 */ + +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ + +// Callback for tokenizing terms used by ParseTerm(). +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + var SZALLOC int32 = 8 + var pCtx uintptr = pContext + var pPhrase uintptr = (*TokenCtx)(unsafe.Pointer(pCtx)).FpPhrase + + _ = iUnused1 + _ = iUnused2 + + // If an error has already occurred, this is a no-op + if (*TokenCtx)(unsafe.Pointer(pCtx)).Frc != SQLITE_OK { + return (*TokenCtx)(unsafe.Pointer(pCtx)).Frc + } + if nToken > FTS5_MAX_TOKEN_SIZE { + nToken = FTS5_MAX_TOKEN_SIZE + } + + if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && tflags&FTS5_TOKEN_COLOCATED != 0 { + var pSyn uintptr + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5ExprTerm{})) + uint64(unsafe.Sizeof(Fts5Buffer{})) + uint64(nToken) + uint64(1)) + pSyn = Xsqlite3_malloc64(tls, uint64(nByte)) + if pSyn == uintptr(0) { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_NOMEM + } else { + libc.Xmemset(tls, pSyn, 0, Size_t(nByte)) + (*Fts5ExprTerm)(unsafe.Pointer(pSyn)).FzTerm = pSyn + uintptr(uint64(unsafe.Sizeof(Fts5ExprTerm{}))) + uintptr(uint64(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemcpy(tls, (*Fts5ExprTerm)(unsafe.Pointer(pSyn)).FzTerm, pToken, uint64(nToken)) + (*Fts5ExprTerm)(unsafe.Pointer(pSyn)).FpSynonym = (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32 + uintptr((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm-1)*32)).FpSynonym + (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32 + uintptr((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm-1)*32)).FpSynonym = pSyn + } + } else { + var pTerm uintptr + if pPhrase == uintptr(0) || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm%SZALLOC == 0 { + var pNew uintptr + var nNew int32 = SZALLOC + func() int32 { + if pPhrase != 0 { + return (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm + } + return 0 + }() + + pNew = Xsqlite3_realloc64(tls, pPhrase, + uint64(uint64(unsafe.Sizeof(Fts5ExprPhrase{}))+uint64(unsafe.Sizeof(Fts5ExprTerm{}))*uint64(nNew))) + if pNew == uintptr(0) { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_NOMEM + } else { + if pPhrase == uintptr(0) { + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Fts5ExprPhrase{}))) + } + (*TokenCtx)(unsafe.Pointer(pCtx)).FpPhrase = libc.AssignUintptr(&pPhrase, pNew) + (*Fts5ExprPhrase)(unsafe.Pointer(pNew)).FnTerm = nNew - SZALLOC + } + } + + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + pTerm = pPhrase + 32 + uintptr(libc.PostIncInt32(&(*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm, 1))*32 + libc.Xmemset(tls, pTerm, 0, uint64(unsafe.Sizeof(Fts5ExprTerm{}))) + (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FzTerm = sqlite3Fts5Strndup(tls, bp, pToken, nToken) + } + } + + (*TokenCtx)(unsafe.Pointer(pCtx)).Frc = *(*int32)(unsafe.Pointer(bp /* rc */)) + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Free the phrase object passed as the only argument. +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ + fts5ExprPhraseFree(tls, pPhrase) +} + +// Free the phrase object passed as the second argument. +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ + if pNear != 0 { + var i int32 + for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { + fts5ExprPhraseFree(tls, *(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(i)*8))) + } + Xsqlite3_free(tls, (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset) + Xsqlite3_free(tls, pNear) + } +} + +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ + + (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p +} + +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ + if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) + var apNew uintptr + apNew = Xsqlite3_realloc64(tls, (*Fts5Parse)(unsafe.Pointer(pParse)).FapPhrase, uint64(nByte)) + if apNew == uintptr(0) { + (*Fts5Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + return SQLITE_NOMEM + } + (*Fts5Parse)(unsafe.Pointer(pParse)).FapPhrase = apNew + } + return SQLITE_OK +} + +// This function is called by the parser to process a string token. The +// string may or may not be quoted. In any case it is tokenized and a +// phrase object consisting of all tokens returned. +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pConfig uintptr = (*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig + // var sCtx TokenCtx at bp, 16 + // Context object passed to callback + var rc int32 // Tokenize return code + *(*uintptr)(unsafe.Pointer(bp + 16 /* z */)) = uintptr(0) + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(TokenCtx{}))) + (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase = pAppend + + rc = fts5ParseStringFromToken(tls, pToken, bp+16) + if rc == SQLITE_OK { + var flags int32 = FTS5_TOKENIZE_QUERY | func() int32 { + if bPrefix != 0 { + return FTS5_TOKENIZE_PREFIX + } + return 0 + }() + var n int32 + sqlite3Fts5Dequote(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* z */))) + n = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* z */)))) + rc = sqlite3Fts5Tokenize(tls, pConfig, flags, *(*uintptr)(unsafe.Pointer(bp + 16 /* z */)), n, bp, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5ParseTokenize}))) + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* z */))) + if rc != 0 || libc.AssignInt32(&rc, (*TokenCtx)(unsafe.Pointer(bp)).Frc) != 0 { + (*Fts5Parse)(unsafe.Pointer(pParse)).Frc = rc + fts5ExprPhraseFree(tls, (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase) + (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase = uintptr(0) + } else { + + if pAppend == uintptr(0) { + if parseGrowPhraseArray(tls, pParse) != 0 { + fts5ExprPhraseFree(tls, (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase) + return uintptr(0) + } + (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase++ + } + + if (*TokenCtx)(unsafe.Pointer(bp)).FpPhrase == uintptr(0) { + // This happens when parsing a token or quoted phrase that contains + // no token characters at all. (e.g ... MATCH '""'). + (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase = sqlite3Fts5MallocZero(tls, pParse+16, int64(unsafe.Sizeof(Fts5ExprPhrase{}))) + } else if (*Fts5ExprPhrase)(unsafe.Pointer((*TokenCtx)(unsafe.Pointer(bp)).FpPhrase)).FnTerm != 0 { + (*Fts5ExprTerm)(unsafe.Pointer((*TokenCtx)(unsafe.Pointer(bp)).FpPhrase + 32 + uintptr((*Fts5ExprPhrase)(unsafe.Pointer((*TokenCtx)(unsafe.Pointer(bp)).FpPhrase)).FnTerm-1)*32)).FbPrefix = U8(bPrefix) + } + *(*uintptr)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FapPhrase + uintptr((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-1)*8)) = (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase + } + + return (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase +} + +// Create a new FTS5 expression by cloning phrase iPhrase of the +// expression passed as the second argument. +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK // Return code + var pOrig uintptr // The phrase extracted from pExpr + var pNew uintptr = uintptr(0) // Expression to return via *ppNew + *(*TokenCtx)(unsafe.Pointer(bp + 8 /* sCtx */)) = TokenCtx{} // Context object for fts5ParseTokenize + + pOrig = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) + pNew = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5Expr{}))) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + (*Fts5Expr)(unsafe.Pointer(pNew)).FapExprPhrase = sqlite3Fts5MallocZero(tls, bp, + int64(unsafe.Sizeof(uintptr(0)))) + } + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + (*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot = sqlite3Fts5MallocZero(tls, bp, + int64(unsafe.Sizeof(Fts5ExprNode{}))) + } + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear = sqlite3Fts5MallocZero(tls, bp, + int64(uint64(unsafe.Sizeof(Fts5ExprNearset{}))+uint64(unsafe.Sizeof(uintptr(0))))) + } + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + var pColsetOrig uintptr = (*Fts5ExprNearset)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer((*Fts5ExprPhrase)(unsafe.Pointer(pOrig)).FpNode)).FpNear)).FpColset + if pColsetOrig != 0 { + var nByte Sqlite3_int64 + var pColset uintptr + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pColsetOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) + pColset = sqlite3Fts5MallocZero(tls, bp, nByte) + if pColset != 0 { + libc.Xmemcpy(tls, pColset, pColsetOrig, Size_t(nByte)) + } + (*Fts5ExprNearset)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear)).FpColset = pColset + } + } + + if (*Fts5ExprPhrase)(unsafe.Pointer(pOrig)).FnTerm != 0 { + var i int32 // Used to iterate through phrase terms + for i = 0; *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK && i < (*Fts5ExprPhrase)(unsafe.Pointer(pOrig)).FnTerm; i++ { + var tflags int32 = 0 + var p uintptr + for p = pOrig + 32 + uintptr(i)*32; p != 0 && *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym { + var zTerm uintptr = (*Fts5ExprTerm)(unsafe.Pointer(p)).FzTerm + *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5ParseTokenize(tls, bp+8, tflags, zTerm, int32(libc.Xstrlen(tls, zTerm)), + 0, 0) + tflags = FTS5_TOKEN_COLOCATED + } + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + (*Fts5ExprTerm)(unsafe.Pointer((*TokenCtx)(unsafe.Pointer(bp+8)).FpPhrase + 32 + uintptr(i)*32)).FbPrefix = (*Fts5ExprTerm)(unsafe.Pointer(pOrig + 32 + uintptr(i)*32)).FbPrefix + (*Fts5ExprTerm)(unsafe.Pointer((*TokenCtx)(unsafe.Pointer(bp+8)).FpPhrase + 32 + uintptr(i)*32)).FbFirst = (*Fts5ExprTerm)(unsafe.Pointer(pOrig + 32 + uintptr(i)*32)).FbFirst + } + } + } else { + // This happens when parsing a token or quoted phrase that contains + // no token characters at all. (e.g ... MATCH '""'). + (*TokenCtx)(unsafe.Pointer(bp + 8 /* &sCtx */)).FpPhrase = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5ExprPhrase{}))) + } + + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TokenCtx)(unsafe.Pointer(bp+8)).FpPhrase != 0 { + // All the allocations succeeded. Put the expression object together. + (*Fts5Expr)(unsafe.Pointer(pNew)).FpIndex = (*Fts5Expr)(unsafe.Pointer(pExpr)).FpIndex + (*Fts5Expr)(unsafe.Pointer(pNew)).FpConfig = (*Fts5Expr)(unsafe.Pointer(pExpr)).FpConfig + (*Fts5Expr)(unsafe.Pointer(pNew)).FnPhrase = 1 + *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FapExprPhrase)) = (*TokenCtx)(unsafe.Pointer(bp + 8 /* &sCtx */)).FpPhrase + *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear + 24)) = (*TokenCtx)(unsafe.Pointer(bp + 8 /* &sCtx */)).FpPhrase + (*Fts5ExprNearset)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear)).FnPhrase = 1 + (*Fts5ExprPhrase)(unsafe.Pointer((*TokenCtx)(unsafe.Pointer(bp + 8 /* &sCtx */)).FpPhrase)).FpNode = (*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot + + if (*Fts5ExprPhrase)(unsafe.Pointer(pOrig)).FnTerm == 1 && + (*Fts5ExprTerm)(unsafe.Pointer(pOrig+32)).FpSynonym == uintptr(0) && + int32((*Fts5ExprTerm)(unsafe.Pointer(pOrig+32)).FbFirst) == 0 { + (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FeType = FTS5_TERM + (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + }{fts5ExprNodeNext_TERM})) + } else { + (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FeType = FTS5_STRING + (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + }{fts5ExprNodeNext_STRING})) + } + } else { + sqlite3Fts5ExprFree(tls, pNew) + fts5ExprPhraseFree(tls, (*TokenCtx)(unsafe.Pointer(bp+8 /* &sCtx */)).FpPhrase) + pNew = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer(ppNew)) = pNew + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Token pTok has appeared in a MATCH expression where the NEAR operator +// is expected. If token pTok does not contain "NEAR", store an error +// in the pParse object. +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34497, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + sqlite3Fts5ParseError(tls, + pParse, ts+33526, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + } +} + +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if pNear != 0 { + var nNear int32 = 0 + var i int32 + if (*Fts5Token)(unsafe.Pointer(p)).Fn != 0 { + for i = 0; i < (*Fts5Token)(unsafe.Pointer(p)).Fn; i++ { + var c uint8 = *(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) + if int32(c) < '0' || int32(c) > '9' { + sqlite3Fts5ParseError(tls, + pParse, ts+34502, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + return + } + nNear = nNear*10 + (int32(*(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') + } + } else { + nNear = FTS5_DEFAULT_NEARDIST + } + (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnNear = nNear + } +} + +// The second argument passed to this function may be NULL, or it may be +// an existing Fts5Colset object. This function returns a pointer to +// a new colset object containing the contents of (p) with new value column +// number iCol appended. +// +// If an OOM error occurs, store an error code in pParse and return NULL. +// The old colset object (if any) is not freed in this case. +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ + var nCol int32 + if p != 0 { + nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol + } else { + nCol = 0 + } // Num. columns already in colset object + var pNew uintptr // New colset object to return + + pNew = Xsqlite3_realloc64(tls, p, uint64(uint64(unsafe.Sizeof(Fts5Colset{}))+uint64(unsafe.Sizeof(int32(0)))*uint64(nCol))) + if pNew == uintptr(0) { + (*Fts5Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM + } else { + var aiCol uintptr = pNew + 4 /* &.aiCol */ + var i int32 + var j int32 + for i = 0; i < nCol; i++ { + if *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) == iCol { + return pNew + } + if *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) > iCol { + break + } + } + for j = nCol; j > i; j-- { + *(*int32)(unsafe.Pointer(aiCol + uintptr(j)*4)) = *(*int32)(unsafe.Pointer(aiCol + uintptr(j-1)*4)) + } + *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) = iCol + (*Fts5Colset)(unsafe.Pointer(pNew)).FnCol = nCol + 1 + + } + + return pNew +} + +// Allocate and return an Fts5Colset object specifying the inverse of +// the colset passed as the second argument. Free the colset passed +// as the second argument before returning. +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ + var pRet uintptr + var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol + + pRet = sqlite3Fts5MallocZero(tls, pParse+16, + int64(uint64(unsafe.Sizeof(Fts5Colset{}))+uint64(unsafe.Sizeof(int32(0)))*uint64(nCol))) + if pRet != 0 { + var i int32 + var iOld int32 = 0 + for i = 0; i < nCol; i++ { + if iOld >= (*Fts5Colset)(unsafe.Pointer(p)).FnCol || *(*int32)(unsafe.Pointer(p + 4 + uintptr(iOld)*4)) != i { + *(*int32)(unsafe.Pointer(pRet + 4 + uintptr(libc.PostIncInt32(&(*Fts5Colset)(unsafe.Pointer(pRet)).FnCol, 1))*4)) = i + } else { + iOld++ + } + } + } + + Xsqlite3_free(tls, p) + return pRet +} + +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pRet uintptr = uintptr(0) + var iCol int32 + var z uintptr // Dequoted copy of token p + + z = sqlite3Fts5Strndup(tls, pParse+16, (*Fts5Token)(unsafe.Pointer(p)).Fp, (*Fts5Token)(unsafe.Pointer(p)).Fn) + if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { + var pConfig uintptr = (*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig + sqlite3Fts5Dequote(tls, z) + for iCol = 0; iCol < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; iCol++ { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(iCol)*8)), z) { + break + } + } + if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { + sqlite3Fts5ParseError(tls, pParse, ts+20375, libc.VaList(bp, z)) + } else { + pRet = fts5ParseColset(tls, pParse, pColset, iCol) + } + Xsqlite3_free(tls, z) + } + + if pRet == uintptr(0) { + + Xsqlite3_free(tls, pColset) + } + + return pRet +} + +// If argument pOrig is NULL, or if (*pRc) is set to anything other than +// SQLITE_OK when this function is called, NULL is returned. +// +// Otherwise, a copy of (*pOrig) is made into memory obtained from +// sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation +// fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ + var pRet uintptr + if pOrig != 0 { + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) + pRet = sqlite3Fts5MallocZero(tls, pRc, nByte) + if pRet != 0 { + libc.Xmemcpy(tls, pRet, pOrig, Size_t(nByte)) + } + } else { + pRet = uintptr(0) + } + return pRet +} + +// Remove from colset pColset any columns that are not also in colset pMerge. +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ + var iIn int32 = 0 // Next input in pColset + var iMerge int32 = 0 // Next input in pMerge + var iOut int32 = 0 // Next output slot in pColset + + for iIn < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol && iMerge < (*Fts5Colset)(unsafe.Pointer(pMerge)).FnCol { + var iDiff int32 = *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(iIn)*4)) - *(*int32)(unsafe.Pointer(pMerge + 4 + uintptr(iMerge)*4)) + if iDiff == 0 { + *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(libc.PostIncInt32(&iOut, 1))*4)) = *(*int32)(unsafe.Pointer(pMerge + 4 + uintptr(iMerge)*4)) + iMerge++ + iIn++ + } else if iDiff > 0 { + iMerge++ + } else { + iIn++ + } + } + (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol = iOut +} + +// Recursively apply colset pColset to expression node pNode and all of +// its decendents. If (*ppFree) is not NULL, it contains a spare copy +// of pColset. This function may use the spare copy and set (*ppFree) to +// zero, or it may create copies of pColset using fts5CloneColset(). +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ + if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { + + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { + var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset != 0 { + fts5MergeColset(tls, (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset, pColset) + if (*Fts5Colset)(unsafe.Pointer((*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset)).FnCol == 0 { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType = FTS5_EOF + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FxNext = uintptr(0) + } + } else if *(*uintptr)(unsafe.Pointer(ppFree)) != 0 { + (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset = pColset + *(*uintptr)(unsafe.Pointer(ppFree)) = uintptr(0) + } else { + (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset = fts5CloneColset(tls, pParse+16, pColset) + } + } else { + var i int32 + + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + fts5ParseSetColset(tls, pParse, *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8)), pColset, ppFree) + } + } + } +} + +// Apply colset pColset to expression node pExpr and all of its descendents. +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset + if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { + sqlite3Fts5ParseError(tls, pParse, + ts+34531, 0) + } else { + fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) +} + +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ + switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { + case FTS5_STRING: + { + var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 && (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm == 1 && + (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24))+32)).FpSynonym == uintptr(0) && + int32((*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24))+32)).FbFirst) == 0 { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType = FTS5_TERM + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + }{fts5ExprNodeNext_TERM})) + } else { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + }{fts5ExprNodeNext_STRING})) + } + break + + } + + case FTS5_OR: + { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + }{fts5ExprNodeNext_OR})) + break + + } + + case FTS5_AND: + { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + }{fts5ExprNodeNext_AND})) + break + + } + + default: + { + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 + }{fts5ExprNodeNext_NOT})) + break + + } + + } +} + +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ + if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { + var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) + libc.Xmemcpy(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte)) + *(*int32)(unsafe.Pointer(p + 40)) += (*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild + Xsqlite3_free(tls, pSub) + } else { + *(*uintptr)(unsafe.Pointer(p + 48 + uintptr(libc.PostIncInt32(&(*Fts5ExprNode)(unsafe.Pointer(p)).FnChild, 1))*8)) = pSub + } +} + +// This function is used when parsing LIKE or GLOB patterns against +// trigram indexes that specify either detail=column or detail=none. +// It converts a phrase: +// +// abc + def + ghi +// +// into an AND tree: +// +// abc AND def AND ghi +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ + var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm + var ii int32 + var nByte int32 + var pRet uintptr + + nByte = int32(uint64(unsafe.Sizeof(Fts5ExprNode{})) + uint64(nTerm)*uint64(unsafe.Sizeof(uintptr(0)))) + pRet = sqlite3Fts5MallocZero(tls, pParse+16, int64(nByte)) + if pRet != 0 { + (*Fts5ExprNode)(unsafe.Pointer(pRet)).FeType = FTS5_AND + (*Fts5ExprNode)(unsafe.Pointer(pRet)).FnChild = nTerm + fts5ExprAssignXNext(tls, pRet) + (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-- + for ii = 0; ii < nTerm; ii++ { + var pPhrase uintptr = sqlite3Fts5MallocZero(tls, + pParse+16, int64(unsafe.Sizeof(Fts5ExprPhrase{}))) + if pPhrase != 0 { + if parseGrowPhraseArray(tls, pParse) != 0 { + fts5ExprPhraseFree(tls, pPhrase) + } else { + *(*uintptr)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FapPhrase + uintptr(libc.PostIncInt32(&(*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase, 1))*8)) = pPhrase + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm = 1 + (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FzTerm = sqlite3Fts5Strndup(tls, + pParse+16, (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24))+32+uintptr(ii)*32)).FzTerm, -1) + *(*uintptr)(unsafe.Pointer(pRet + 48 + uintptr(ii)*8)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_STRING, + uintptr(0), uintptr(0), sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), pPhrase)) + } + } + } + + if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc != 0 { + sqlite3Fts5ParseNodeFree(tls, pRet) + pRet = uintptr(0) + } else { + sqlite3Fts5ParseNearsetFree(tls, pNear) + } + } + + return pRet +} + +// Allocate and return a new expression object. If anything goes wrong (i.e. +// OOM error), leave an error code in pParse and return NULL. +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pRet uintptr = uintptr(0) + + if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { + var nChild int32 = 0 // Number of children of returned node + var nByte Sqlite3_int64 // Bytes of space to allocate for this node + + if eType == FTS5_STRING && pNear == uintptr(0) { + return uintptr(0) + } + if eType != FTS5_STRING && pLeft == uintptr(0) { + return pRight + } + if eType != FTS5_STRING && pRight == uintptr(0) { + return pLeft + } + + if eType == FTS5_STRING && + (*Fts5Parse)(unsafe.Pointer(pParse)).FbPhraseToAnd != 0 && + (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm > 1 { + pRet = fts5ParsePhraseToAnd(tls, pParse, pNear) + } else { + if eType == FTS5_NOT { + nChild = 2 + } else if eType == FTS5_AND || eType == FTS5_OR { + nChild = 2 + if (*Fts5ExprNode)(unsafe.Pointer(pLeft)).FeType == eType { + nChild = nChild + ((*Fts5ExprNode)(unsafe.Pointer(pLeft)).FnChild - 1) + } + if (*Fts5ExprNode)(unsafe.Pointer(pRight)).FeType == eType { + nChild = nChild + ((*Fts5ExprNode)(unsafe.Pointer(pRight)).FnChild - 1) + } + } + + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5ExprNode{})) + uint64(unsafe.Sizeof(uintptr(0)))*uint64(nChild-1)) + pRet = sqlite3Fts5MallocZero(tls, pParse+16, nByte) + + if pRet != 0 { + (*Fts5ExprNode)(unsafe.Pointer(pRet)).FeType = eType + (*Fts5ExprNode)(unsafe.Pointer(pRet)).FpNear = pNear + fts5ExprAssignXNext(tls, pRet) + if eType == FTS5_STRING { + var iPhrase int32 + for iPhrase = 0; iPhrase < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; iPhrase++ { + (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(iPhrase)*8)))).FpNode = pRet + if (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24 + uintptr(iPhrase)*8)))).FnTerm == 0 { + (*Fts5ExprNode)(unsafe.Pointer(pRet)).FxNext = uintptr(0) + (*Fts5ExprNode)(unsafe.Pointer(pRet)).FeType = FTS5_EOF + } + } + + if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail != FTS5_DETAIL_FULL { + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer(pNear + 24)) + if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase != 1 || + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { + sqlite3Fts5ParseError(tls, pParse, + ts+34584, + libc.VaList(bp, func() uintptr { + if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { + return ts + 34634 /* "phrase" */ + } + return ts + 34497 /* "NEAR" */ + }())) + Xsqlite3_free(tls, pRet) + pRet = uintptr(0) + } + } + } else { + fts5ExprAddChildren(tls, pRet, pLeft) + fts5ExprAddChildren(tls, pRet, pRight) + } + } + } + } + + if pRet == uintptr(0) { + + sqlite3Fts5ParseNodeFree(tls, pLeft) + sqlite3Fts5ParseNodeFree(tls, pRight) + sqlite3Fts5ParseNearsetFree(tls, pNear) + } + return pRet +} + +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ + var pRet uintptr = uintptr(0) + var pPrev uintptr + + if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc != 0 { + sqlite3Fts5ParseNodeFree(tls, pLeft) + sqlite3Fts5ParseNodeFree(tls, pRight) + } else { + + if (*Fts5ExprNode)(unsafe.Pointer(pLeft)).FeType == FTS5_AND { + pPrev = *(*uintptr)(unsafe.Pointer(pLeft + 48 + uintptr((*Fts5ExprNode)(unsafe.Pointer(pLeft)).FnChild-1)*8)) + } else { + pPrev = pLeft + } + + if (*Fts5ExprNode)(unsafe.Pointer(pRight)).FeType == FTS5_EOF { + + sqlite3Fts5ParseNodeFree(tls, pRight) + pRet = pLeft + (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-- + } else if (*Fts5ExprNode)(unsafe.Pointer(pPrev)).FeType == FTS5_EOF { + var ap uintptr + + if pPrev == pLeft { + pRet = pRight + } else { + *(*uintptr)(unsafe.Pointer(pLeft + 48 + uintptr((*Fts5ExprNode)(unsafe.Pointer(pLeft)).FnChild-1)*8)) = pRight + pRet = pLeft + } + + ap = (*Fts5Parse)(unsafe.Pointer(pParse)).FapPhrase + uintptr((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-1-(*Fts5ExprNearset)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pRight)).FpNear)).FnPhrase)*8 + + libc.Xmemmove(tls, ap, ap+1*8, uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Fts5ExprNearset)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pRight)).FpNear)).FnPhrase)) + (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase-- + + sqlite3Fts5ParseNodeFree(tls, pPrev) + } else { + pRet = sqlite3Fts5ParseNode(tls, pParse, FTS5_AND, pLeft, pRight, uintptr(0)) + } + } + + return pRet +} + +// This is called during initialization to register the fts5_expr() scalar +// UDF with the SQLite handle passed as the only argument. +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ + var rc int32 = SQLITE_OK + _ = pGlobal + _ = db + + // Avoid warnings indicating that sqlite3Fts5ParserTrace() and + // sqlite3Fts5ParserFallback() are unused + _ = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{sqlite3Fts5ParserFallback})) + + return rc +} + +// Return the number of phrases in expression pExpr. +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ + return func() int32 { + if pExpr != 0 { + return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase + } + return 0 + }() +} + +// Return the number of terms in the iPhrase'th phrase in pExpr. +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ + if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { + return 0 + } + return (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)))).FnTerm +} + +// This function is used to access the current position list for phrase +// iPhrase. +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ + var nRet int32 + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) + var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 && (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid == (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot)).FiRowid { + *(*uintptr)(unsafe.Pointer(pa)) = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fp + nRet = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn + } else { + *(*uintptr)(unsafe.Pointer(pa)) = uintptr(0) + nRet = 0 + } + return nRet +} + +// Clear the position lists associated with all phrases in the expression +// passed as the first argument. Argument bLive is true if the expression +// might be pointing to a real entry, otherwise it has just been reset. +// +// At present this function is only used for detail=col and detail=none +// fts5 tables. This implies that all phrases must be at most 1 token +// in size, as phrase matches are not supported without detail=full. +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ + var pRet uintptr + pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) + if pRet != 0 { + var i int32 + libc.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase)) + for i = 0; i < (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase; i++ { + var pBuf uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(i)*8)) + 8 + var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(i)*8)))).FpNode + + if bLive != 0 && ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn == 0 || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid != (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot)).FiRowid || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof != 0) { + (*Fts5PoslistPopulator)(unsafe.Pointer(pRet + uintptr(i)*16)).FbMiss = 1 + } else { + (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 + } + } + } + return pRet +} + +type Fts5ExprCtx1 = struct { + FpExpr uintptr + FaPopulator uintptr + FiOff I64 +} /* sqlite3.c:224023:1 */ + +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ + +// TODO: Make this more efficient! +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ + var i int32 + for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { + if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { + return 1 + } + } + return 0 +} + +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ + var p uintptr = pCtx + var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr + var i int32 + + _ = iUnused1 + _ = iUnused2 + + if nToken > FTS5_MAX_TOKEN_SIZE { + nToken = FTS5_MAX_TOKEN_SIZE + } + if tflags&FTS5_TOKEN_COLOCATED == 0 { + (*Fts5ExprCtx)(unsafe.Pointer(p)).FiOff++ + } + for i = 0; i < (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase; i++ { + var pTerm uintptr + if (*Fts5PoslistPopulator)(unsafe.Pointer((*Fts5ExprCtx)(unsafe.Pointer(p)).FaPopulator+uintptr(i)*16)).FbOk == 0 { + continue + } + for pTerm = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(i)*8)) + 32; pTerm != 0; pTerm = (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym { + var nTerm int32 = int32(libc.Xstrlen(tls, (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FzTerm)) + if (nTerm == nToken || nTerm < nToken && (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FbPrefix != 0) && + libc.Xmemcmp(tls, (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FzTerm, pToken, uint64(nTerm)) == 0 { + var rc int32 = sqlite3Fts5PoslistWriterAppend(tls, + *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(i)*8))+8, (*Fts5ExprCtx)(unsafe.Pointer(p)).FaPopulator+uintptr(i)*16, (*Fts5ExprCtx)(unsafe.Pointer(p)).FiOff) + if rc != 0 { + return rc + } + break + } + } + } + return SQLITE_OK +} + +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var i int32 + // var sCtx Fts5ExprCtx at bp, 24 + + (*Fts5ExprCtx)(unsafe.Pointer(bp /* &sCtx */)).FpExpr = pExpr + (*Fts5ExprCtx)(unsafe.Pointer(bp /* &sCtx */)).FaPopulator = aPopulator + (*Fts5ExprCtx)(unsafe.Pointer(bp /* &sCtx */)).FiOff = I64(iCol)<<32 - int64(1) + + for i = 0; i < (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase; i++ { + var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(i)*8)))).FpNode + var pColset uintptr = (*Fts5ExprNearset)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear)).FpColset + if pColset != 0 && 0 == fts5ExprColsetTest(tls, pColset, iCol) || + (*Fts5PoslistPopulator)(unsafe.Pointer(aPopulator+uintptr(i)*16)).FbMiss != 0 { + (*Fts5PoslistPopulator)(unsafe.Pointer(aPopulator + uintptr(i)*16)).FbOk = 0 + } else { + (*Fts5PoslistPopulator)(unsafe.Pointer(aPopulator + uintptr(i)*16)).FbOk = 1 + } + } + + return sqlite3Fts5Tokenize(tls, pConfig, + FTS5_TOKENIZE_DOCUMENT, z, n, bp, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5ExprPopulatePoslistsCb}))) +} + +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { + (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 + } else { + var i int32 + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + fts5ExprClearPoslists(tls, *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8))) + } + } +} + +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 + switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { + case FTS5_TERM: + fallthrough + case FTS5_STRING: + return libc.Bool32((*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn > 0) + + case FTS5_AND: + { + var i int32 + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + if fts5ExprCheckPoslists(tls, *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8)), iRowid) == 0 { + fts5ExprClearPoslists(tls, pNode) + return 0 + } + } + break + + } + + case FTS5_OR: + { + var i int32 + var bRet int32 = 0 + for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pNode)).FnChild; i++ { + if fts5ExprCheckPoslists(tls, *(*uintptr)(unsafe.Pointer(pNode + 48 + uintptr(i)*8)), iRowid) != 0 { + bRet = 1 + } + } + return bRet + + } + + default: + { + + if 0 == fts5ExprCheckPoslists(tls, *(*uintptr)(unsafe.Pointer(pNode + 48)), iRowid) || + 0 != fts5ExprCheckPoslists(tls, *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)), iRowid) { + fts5ExprClearPoslists(tls, pNode) + return 0 + } + break + + } + } + return 1 +} + +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ + fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) +} + +// This function is only called for detail=columns tables. +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ + var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) + var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode + var rc int32 = SQLITE_OK + + if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 && + (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid == (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot)).FiRowid && + (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).Fposlist.Fn > 0 { + var pTerm uintptr = pPhrase + 32 + if (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym != 0 { + var pBuf uintptr = (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FpSynonym + 1*32 + rc = fts5ExprSynonymList(tls, + pTerm, (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid, pBuf, ppCollist, pnCollist) + } else { + *(*uintptr)(unsafe.Pointer(ppCollist)) = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FpIter)).FpData + *(*int32)(unsafe.Pointer(pnCollist)) = (*Fts5IndexIter)(unsafe.Pointer((*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FpIter)).FnData + } + } else { + *(*uintptr)(unsafe.Pointer(ppCollist)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnCollist)) = 0 + } + + return rc +} + +// 2014 August 11 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// + +// #include "fts5Int.h" + +type Fts5HashEntry1 = struct { + FpHashNext uintptr + FpScanNext uintptr + FnAlloc int32 + FiSzPoslist int32 + FnData int32 + FnKey int32 + FbDel U8 + FbContent U8 + FiCol I16 + FiPos int32 + FiRowid I64 +} /* sqlite3.c:216813:9 */ + +// 2014 August 11 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// + +// #include "fts5Int.h" + +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ + +// Eqivalent to: +// +// char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } + +// Allocate a new hash table. +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ + var rc int32 = SQLITE_OK + var pNew uintptr + + *(*uintptr)(unsafe.Pointer(ppNew)) = libc.AssignUintptr(&pNew, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Fts5Hash{})))) + if pNew == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var nByte Sqlite3_int64 + libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Fts5Hash{}))) + (*Fts5Hash)(unsafe.Pointer(pNew)).FpnByte = pnByte + (*Fts5Hash)(unsafe.Pointer(pNew)).FeDetail = (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail + + (*Fts5Hash)(unsafe.Pointer(pNew)).FnSlot = 1024 + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Hash)(unsafe.Pointer(pNew)).FnSlot)) + (*Fts5Hash)(unsafe.Pointer(pNew)).FaSlot = Xsqlite3_malloc64(tls, uint64(nByte)) + if (*Fts5Hash)(unsafe.Pointer(pNew)).FaSlot == uintptr(0) { + Xsqlite3_free(tls, pNew) + *(*uintptr)(unsafe.Pointer(ppNew)) = uintptr(0) + rc = SQLITE_NOMEM + } else { + libc.Xmemset(tls, (*Fts5Hash)(unsafe.Pointer(pNew)).FaSlot, 0, Size_t(nByte)) + } + } + return rc +} + +// Free a hash table object. +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ + if pHash != 0 { + sqlite3Fts5HashClear(tls, pHash) + Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) + Xsqlite3_free(tls, pHash) + } +} + +// Empty (but do not delete) a hash table. +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ + var i int32 + for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { + var pNext uintptr + var pSlot uintptr + for pSlot = *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(i)*8)); pSlot != 0; pSlot = pNext { + pNext = (*Fts5HashEntry)(unsafe.Pointer(pSlot)).FpHashNext + Xsqlite3_free(tls, pSlot) + } + } + libc.Xmemset(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot, 0, uint64((*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot)*uint64(unsafe.Sizeof(uintptr(0)))) + (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 +} + +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ + var i int32 + var h uint32 = uint32(13) + for i = n - 1; i >= 0; i-- { + h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(p + uintptr(i)))) + } + return h % uint32(nSlot) +} + +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ + var i int32 + var h uint32 = uint32(13) + for i = n - 1; i >= 0; i-- { + h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(p + uintptr(i)))) + } + h = h<<3 ^ h ^ uint32(b) + return h % uint32(nSlot) +} + +// Resize the hash table by doubling the number of slots. +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ + var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 + var i int32 + var apNew uintptr + var apOld uintptr = (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + + apNew = Xsqlite3_malloc64(tls, uint64(uint64(nNew)*uint64(unsafe.Sizeof(uintptr(0))))) + if !(apNew != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, apNew, 0, uint64(nNew)*uint64(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { + for *(*uintptr)(unsafe.Pointer(apOld + uintptr(i)*8)) != 0 { + var iHash uint32 + var p uintptr = *(*uintptr)(unsafe.Pointer(apOld + uintptr(i)*8)) + *(*uintptr)(unsafe.Pointer(apOld + uintptr(i)*8)) = (*Fts5HashEntry)(unsafe.Pointer(p)).FpHashNext + iHash = fts5HashKey(tls, nNew, p+1*48, + int32(libc.Xstrlen(tls, p+1*48))) + (*Fts5HashEntry)(unsafe.Pointer(p)).FpHashNext = *(*uintptr)(unsafe.Pointer(apNew + uintptr(iHash)*8)) + *(*uintptr)(unsafe.Pointer(apNew + uintptr(iHash)*8)) = p + } + } + + Xsqlite3_free(tls, apOld) + (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot = nNew + (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot = apNew + return SQLITE_OK +} + +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ + var nRet int32 = 0 + if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { + var pPtr uintptr + if p2 != 0 { + pPtr = p2 + } else { + pPtr = p + } + var nData int32 = (*Fts5HashEntry)(unsafe.Pointer(p)).FnData + if (*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail == FTS5_DETAIL_NONE { + + if (*Fts5HashEntry)(unsafe.Pointer(p)).FbDel != 0 { + *(*U8)(unsafe.Pointer(pPtr + uintptr(libc.PostIncInt32(&nData, 1)))) = U8(0x00) + if (*Fts5HashEntry)(unsafe.Pointer(p)).FbContent != 0 { + *(*U8)(unsafe.Pointer(pPtr + uintptr(libc.PostIncInt32(&nData, 1)))) = U8(0x00) + } + } + } else { + var nSz int32 = nData - (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist - 1 // Size in bytes + var nPos int32 = nSz*2 + int32((*Fts5HashEntry)(unsafe.Pointer(p)).FbDel) // Value of nPos field + + if nPos <= 127 { + *(*U8)(unsafe.Pointer(pPtr + uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist))) = U8(nPos) + } else { + var nByte int32 = sqlite3Fts5GetVarintLen(tls, U32(nPos)) + libc.Xmemmove(tls, pPtr+uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist+nByte), pPtr+uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist+1), uint64(nSz)) + sqlite3Fts5PutVarint(tls, pPtr+uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist), uint64(nPos)) + nData = nData + (nByte - 1) + } + } + + nRet = nData - (*Fts5HashEntry)(unsafe.Pointer(p)).FnData + if p2 == uintptr(0) { + (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist = 0 + (*Fts5HashEntry)(unsafe.Pointer(p)).FbDel = U8(0) + (*Fts5HashEntry)(unsafe.Pointer(p)).FbContent = U8(0) + (*Fts5HashEntry)(unsafe.Pointer(p)).FnData = nData + } + } + return nRet +} + +// Add an entry to the in-memory hash table. The key is the concatenation +// of bByte and (pToken/nToken). The value is (iRowid/iCol/iPos). +// +// (bByte || pToken) -> (iRowid,iCol,iPos) +// +// Or, if iCol is negative, then the value is a delete marker. +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ + var iHash uint32 + var p uintptr + var pPtr uintptr + var nIncr int32 = 0 // Amount to increment (*pHash->pnByte) by + var bNew int32 // If non-delete entry should be written + + bNew = libc.Bool32((*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail == FTS5_DETAIL_FULL) + + // Attempt to locate an existing hash entry + iHash = fts5HashKey2(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, U8(bByte), pToken, nToken) + for p = *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8)); p != 0; p = (*Fts5HashEntry)(unsafe.Pointer(p)).FpHashNext { + var zKey uintptr = p + 1*48 + if int32(*(*uint8)(unsafe.Pointer(zKey))) == int32(bByte) && + (*Fts5HashEntry)(unsafe.Pointer(p)).FnKey == nToken && + libc.Xmemcmp(tls, zKey+1, pToken, uint64(nToken)) == 0 { + break + } + } + + // If an existing hash entry cannot be found, create a new one. + if p == uintptr(0) { + // Figure out how much space to allocate + var zKey uintptr + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5HashEntry{})) + uint64(nToken+1) + uint64(1) + uint64(64)) + if nByte < int64(128) { + nByte = int64(128) + } + + // Grow the Fts5Hash.aSlot[] array if necessary. + if (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry*2 >= (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot { + var rc int32 = fts5HashResize(tls, pHash) + if rc != SQLITE_OK { + return rc + } + iHash = fts5HashKey2(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, U8(bByte), pToken, nToken) + } + + // Allocate new Fts5HashEntry and add it to the hash table. + p = Xsqlite3_malloc64(tls, uint64(nByte)) + if !(p != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5HashEntry{}))) + (*Fts5HashEntry)(unsafe.Pointer(p)).FnAlloc = int32(nByte) + zKey = p + 1*48 + *(*uint8)(unsafe.Pointer(zKey)) = bByte + libc.Xmemcpy(tls, zKey+1, pToken, uint64(nToken)) + + (*Fts5HashEntry)(unsafe.Pointer(p)).FnKey = nToken + *(*uint8)(unsafe.Pointer(zKey + uintptr(nToken+1))) = uint8(0) + (*Fts5HashEntry)(unsafe.Pointer(p)).FnData = int32(uint64(nToken+1+1) + uint64(unsafe.Sizeof(Fts5HashEntry{}))) + (*Fts5HashEntry)(unsafe.Pointer(p)).FpHashNext = *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8)) + *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8)) = p + (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry++ + + // Add the first rowid field to the hash-entry + *(*int32)(unsafe.Pointer(p + 24)) += sqlite3Fts5PutVarint(tls, p+uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FnData), uint64(iRowid)) + (*Fts5HashEntry)(unsafe.Pointer(p)).FiRowid = iRowid + + (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist = (*Fts5HashEntry)(unsafe.Pointer(p)).FnData + if (*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail != FTS5_DETAIL_NONE { + *(*int32)(unsafe.Pointer(p + 24)) += 1 + (*Fts5HashEntry)(unsafe.Pointer(p)).FiCol = func() int16 { + if (*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail == FTS5_DETAIL_FULL { + return int16(0) + } + return int16(-1) + }() + } + + } else { + + // Appending to an existing hash-entry. Check that there is enough + // space to append the largest possible new entry. Worst case scenario + // is: + // + // + 9 bytes for a new rowid, + // + 4 byte reserved for the "poslist size" varint. + // + 1 byte for a "new column" byte, + // + 3 bytes for a new column number (16-bit max) as a varint, + // + 5 bytes for the new position offset (32-bit max). + if (*Fts5HashEntry)(unsafe.Pointer(p)).FnAlloc-(*Fts5HashEntry)(unsafe.Pointer(p)).FnData < 9+4+1+3+5 { + var nNew Sqlite3_int64 = Sqlite3_int64((*Fts5HashEntry)(unsafe.Pointer(p)).FnAlloc * 2) + var pNew uintptr + var pp uintptr + pNew = Xsqlite3_realloc64(tls, p, uint64(nNew)) + if pNew == uintptr(0) { + return SQLITE_NOMEM + } + (*Fts5HashEntry)(unsafe.Pointer(pNew)).FnAlloc = int32(nNew) + for pp = (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8; *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) { + } + *(*uintptr)(unsafe.Pointer(pp)) = pNew + p = pNew + } + nIncr = nIncr - (*Fts5HashEntry)(unsafe.Pointer(p)).FnData + } + + pPtr = p + + // If this is a new rowid, append the 4-byte size field for the previous + // entry, and the new rowid for this entry. + if iRowid != (*Fts5HashEntry)(unsafe.Pointer(p)).FiRowid { + var iDiff U64 = U64(iRowid) - U64((*Fts5HashEntry)(unsafe.Pointer(p)).FiRowid) + fts5HashAddPoslistSize(tls, pHash, p, uintptr(0)) + *(*int32)(unsafe.Pointer(p + 24)) += sqlite3Fts5PutVarint(tls, pPtr+uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FnData), iDiff) + (*Fts5HashEntry)(unsafe.Pointer(p)).FiRowid = iRowid + bNew = 1 + (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist = (*Fts5HashEntry)(unsafe.Pointer(p)).FnData + if (*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail != FTS5_DETAIL_NONE { + *(*int32)(unsafe.Pointer(p + 24)) += 1 + (*Fts5HashEntry)(unsafe.Pointer(p)).FiCol = func() int16 { + if (*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail == FTS5_DETAIL_FULL { + return int16(0) + } + return int16(-1) + }() + (*Fts5HashEntry)(unsafe.Pointer(p)).FiPos = 0 + } + } + + if iCol >= 0 { + if (*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail == FTS5_DETAIL_NONE { + (*Fts5HashEntry)(unsafe.Pointer(p)).FbContent = U8(1) + } else { + // Append a new column value, if necessary + + if iCol != int32((*Fts5HashEntry)(unsafe.Pointer(p)).FiCol) { + if (*Fts5Hash)(unsafe.Pointer(pHash)).FeDetail == FTS5_DETAIL_FULL { + *(*U8)(unsafe.Pointer(pPtr + uintptr(libc.PostIncInt32(&(*Fts5HashEntry)(unsafe.Pointer(p)).FnData, 1)))) = U8(0x01) + *(*int32)(unsafe.Pointer(p + 24)) += sqlite3Fts5PutVarint(tls, pPtr+uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FnData), uint64(iCol)) + (*Fts5HashEntry)(unsafe.Pointer(p)).FiCol = I16(iCol) + (*Fts5HashEntry)(unsafe.Pointer(p)).FiPos = 0 + } else { + bNew = 1 + (*Fts5HashEntry)(unsafe.Pointer(p)).FiCol = I16(libc.AssignInt32(&iPos, iCol)) + } + } + + // Append the new position offset, if necessary + if bNew != 0 { + *(*int32)(unsafe.Pointer(p + 24)) += sqlite3Fts5PutVarint(tls, pPtr+uintptr((*Fts5HashEntry)(unsafe.Pointer(p)).FnData), uint64(iPos-(*Fts5HashEntry)(unsafe.Pointer(p)).FiPos+2)) + (*Fts5HashEntry)(unsafe.Pointer(p)).FiPos = iPos + } + } + } else { + // This is a delete. Set the delete flag. + (*Fts5HashEntry)(unsafe.Pointer(p)).FbDel = U8(1) + } + + nIncr = nIncr + (*Fts5HashEntry)(unsafe.Pointer(p)).FnData + *(*int32)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FpnByte)) += nIncr + return SQLITE_OK +} + +// Arguments pLeft and pRight point to linked-lists of hash-entry objects, +// each sorted in key order. This function merges the two lists into a +// single list and returns a pointer to its first element. +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p1 uintptr = pLeft + var p2 uintptr = pRight + *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(0) + var ppOut uintptr = bp /* &pRet */ + + for p1 != 0 || p2 != 0 { + if p1 == uintptr(0) { + *(*uintptr)(unsafe.Pointer(ppOut)) = p2 + p2 = uintptr(0) + } else if p2 == uintptr(0) { + *(*uintptr)(unsafe.Pointer(ppOut)) = p1 + p1 = uintptr(0) + } else { + var i int32 = 0 + var zKey1 uintptr = p1 + 1*48 + var zKey2 uintptr = p2 + 1*48 + for int32(*(*uint8)(unsafe.Pointer(zKey1 + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(zKey2 + uintptr(i)))) { + i++ + } + + if int32(U8(*(*uint8)(unsafe.Pointer(zKey1 + uintptr(i))))) > int32(U8(*(*uint8)(unsafe.Pointer(zKey2 + uintptr(i))))) { + // p2 is smaller + *(*uintptr)(unsafe.Pointer(ppOut)) = p2 + ppOut = p2 + 8 + p2 = (*Fts5HashEntry)(unsafe.Pointer(p2)).FpScanNext + } else { + // p1 is smaller + *(*uintptr)(unsafe.Pointer(ppOut)) = p1 + ppOut = p1 + 8 + p1 = (*Fts5HashEntry)(unsafe.Pointer(p1)).FpScanNext + } + *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) + } + } + + return *(*uintptr)(unsafe.Pointer(bp /* pRet */)) +} + +// Extract all tokens from hash table iHash and link them into a list +// in sorted order. The hash table is cleared before returning. It is +// the responsibility of the caller to free the elements of the returned +// list. +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ + var nMergeSlot int32 = 32 + var ap uintptr + var pList uintptr + var iSlot int32 + var i int32 + + *(*uintptr)(unsafe.Pointer(ppSorted)) = uintptr(0) + ap = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nMergeSlot))) + if !(ap != 0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, ap, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64(nMergeSlot)) + + for iSlot = 0; iSlot < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; iSlot++ { + var pIter uintptr + for pIter = *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iSlot)*8)); pIter != 0; pIter = (*Fts5HashEntry)(unsafe.Pointer(pIter)).FpHashNext { + if pTerm == uintptr(0) || + (*Fts5HashEntry)(unsafe.Pointer(pIter)).FnKey+1 >= nTerm && 0 == libc.Xmemcmp(tls, pIter+1*48, pTerm, uint64(nTerm)) { + var pEntry uintptr = pIter + (*Fts5HashEntry)(unsafe.Pointer(pEntry)).FpScanNext = uintptr(0) + for i = 0; *(*uintptr)(unsafe.Pointer(ap + uintptr(i)*8)) != 0; i++ { + pEntry = fts5HashEntryMerge(tls, pEntry, *(*uintptr)(unsafe.Pointer(ap + uintptr(i)*8))) + *(*uintptr)(unsafe.Pointer(ap + uintptr(i)*8)) = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(ap + uintptr(i)*8)) = pEntry + } + } + } + + pList = uintptr(0) + for i = 0; i < nMergeSlot; i++ { + pList = fts5HashEntryMerge(tls, pList, *(*uintptr)(unsafe.Pointer(ap + uintptr(i)*8))) + } + + (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 + Xsqlite3_free(tls, ap) + *(*uintptr)(unsafe.Pointer(ppSorted)) = pList + return SQLITE_OK +} + +// Query the hash table for a doclist associated with term pTerm/nTerm. +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ + var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) + var zKey uintptr = uintptr(0) + var p uintptr + + for p = *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8)); p != 0; p = (*Fts5HashEntry)(unsafe.Pointer(p)).FpHashNext { + zKey = p + 1*48 + + if nTerm == (*Fts5HashEntry)(unsafe.Pointer(p)).FnKey+1 && libc.Xmemcmp(tls, zKey, pTerm, uint64(nTerm)) == 0 { + break + } + } + + if p != 0 { + var nHashPre int32 = int32(uint64(unsafe.Sizeof(Fts5HashEntry{})) + uint64(nTerm) + uint64(1)) + var nList int32 = (*Fts5HashEntry)(unsafe.Pointer(p)).FnData - nHashPre + var pRet uintptr = libc.AssignPtrUintptr(ppOut, Xsqlite3_malloc64(tls, uint64(nPre+nList+10))) + if pRet != 0 { + var pFaux uintptr = pRet + uintptr(nPre-nHashPre) + libc.Xmemcpy(tls, pRet+uintptr(nPre), p+uintptr(nHashPre), uint64(nList)) + nList = nList + fts5HashAddPoslistSize(tls, pHash, p, pFaux) + *(*int32)(unsafe.Pointer(pnDoclist)) = nList + } else { + *(*int32)(unsafe.Pointer(pnDoclist)) = 0 + return SQLITE_NOMEM + } + } else { + *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnDoclist)) = 0 + } + + return SQLITE_OK +} + +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ + return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) +} + +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ + + (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext +} + +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ + return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) +} + +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ + var p uintptr + if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { + var zKey uintptr = p + 1*48 + var nTerm int32 = int32(libc.Xstrlen(tls, zKey)) + fts5HashAddPoslistSize(tls, pHash, p, uintptr(0)) + *(*uintptr)(unsafe.Pointer(pzTerm)) = zKey + *(*uintptr)(unsafe.Pointer(ppDoclist)) = zKey + uintptr(nTerm+1) + *(*int32)(unsafe.Pointer(pnDoclist)) = int32(uint64((*Fts5HashEntry)(unsafe.Pointer(p)).FnData) - (uint64(unsafe.Sizeof(Fts5HashEntry{})) + uint64(nTerm) + uint64(1))) + } else { + *(*uintptr)(unsafe.Pointer(pzTerm)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(ppDoclist)) = uintptr(0) + *(*int32)(unsafe.Pointer(pnDoclist)) = 0 + } +} + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Low level access to the FTS index stored in the database file. The +// routines in this file file implement all read and write access to the +// %_data table. Other parts of the system access this functionality via +// the interface defined in fts5Int.h. + +// #include "fts5Int.h" + +// Overview: +// +// The %_data table contains all the FTS indexes for an FTS5 virtual table. +// As well as the main term index, there may be up to 31 prefix indexes. +// The format is similar to FTS3/4, except that: +// +// * all segment b-tree leaf data is stored in fixed size page records +// (e.g. 1000 bytes). A single doclist may span multiple pages. Care is +// taken to ensure it is possible to iterate in either direction through +// the entries in a doclist, or to seek to a specific entry within a +// doclist, without loading it into memory. +// +// * large doclists that span many pages have associated "doclist index" +// records that contain a copy of the first rowid on each page spanned by +// the doclist. This is used to speed up seek operations, and merges of +// large doclists with very small doclists. +// +// * extra fields in the "structure record" record the state of ongoing +// incremental merge operations. +// + +// Details: +// +// The %_data table managed by this module, +// +// CREATE TABLE %_data(id INTEGER PRIMARY KEY, block BLOB); +// +// , contains the following 5 types of records. See the comments surrounding +// the FTS5_*_ROWID macros below for a description of how %_data rowids are +// assigned to each fo them. +// +// 1. Structure Records: +// +// The set of segments that make up an index - the index structure - are +// recorded in a single record within the %_data table. The record consists +// of a single 32-bit configuration cookie value followed by a list of +// SQLite varints. If the FTS table features more than one index (because +// there are one or more prefix indexes), it is guaranteed that all share +// the same cookie value. +// +// Immediately following the configuration cookie, the record begins with +// three varints: +// +// + number of levels, +// + total number of segments on all levels, +// + value of write counter. +// +// Then, for each level from 0 to nMax: +// +// + number of input segments in ongoing merge. +// + total number of segments in level. +// + for each segment from oldest to newest: +// + segment id (always > 0) +// + first leaf page number (often 1, always greater than 0) +// + final leaf page number +// +// 2. The Averages Record: +// +// A single record within the %_data table. The data is a list of varints. +// The first value is the number of rows in the index. Then, for each column +// from left to right, the total number of tokens in the column for all +// rows of the table. +// +// 3. Segment leaves: +// +// TERM/DOCLIST FORMAT: +// +// Most of each segment leaf is taken up by term/doclist data. The +// general format of term/doclist, starting with the first term +// on the leaf page, is: +// +// varint : size of first term +// blob: first term data +// doclist: first doclist +// zero-or-more { +// varint: number of bytes in common with previous term +// varint: number of bytes of new term data (nNew) +// blob: nNew bytes of new term data +// doclist: next doclist +// } +// +// doclist format: +// +// varint: first rowid +// poslist: first poslist +// zero-or-more { +// varint: rowid delta (always > 0) +// poslist: next poslist +// } +// +// poslist format: +// +// varint: size of poslist in bytes multiplied by 2, not including +// this field. Plus 1 if this entry carries the "delete" flag. +// collist: collist for column 0 +// zero-or-more { +// 0x01 byte +// varint: column number (I) +// collist: collist for column I +// } +// +// collist format: +// +// varint: first offset + 2 +// zero-or-more { +// varint: offset delta + 2 +// } +// +// PAGE FORMAT +// +// Each leaf page begins with a 4-byte header containing 2 16-bit +// unsigned integer fields in big-endian format. They are: +// +// * The byte offset of the first rowid on the page, if it exists +// and occurs before the first term (otherwise 0). +// +// * The byte offset of the start of the page footer. If the page +// footer is 0 bytes in size, then this field is the same as the +// size of the leaf page in bytes. +// +// The page footer consists of a single varint for each term located +// on the page. Each varint is the byte offset of the current term +// within the page, delta-compressed against the previous value. In +// other words, the first varint in the footer is the byte offset of +// the first term, the second is the byte offset of the second less that +// of the first, and so on. +// +// The term/doclist format described above is accurate if the entire +// term/doclist data fits on a single leaf page. If this is not the case, +// the format is changed in two ways: +// +// + if the first rowid on a page occurs before the first term, it +// is stored as a literal value: +// +// varint: first rowid +// +// + the first term on each page is stored in the same way as the +// very first term of the segment: +// +// varint : size of first term +// blob: first term data +// +// 5. Segment doclist indexes: +// +// Doclist indexes are themselves b-trees, however they usually consist of +// a single leaf record only. The format of each doclist index leaf page +// is: +// +// * Flags byte. Bits are: +// 0x01: Clear if leaf is also the root page, otherwise set. +// +// * Page number of fts index leaf page. As a varint. +// +// * First rowid on page indicated by previous field. As a varint. +// +// * A list of varints, one for each subsequent termless page. A +// positive delta if the termless page contains at least one rowid, +// or an 0x00 byte otherwise. +// +// Internal doclist index nodes are: +// +// * Flags byte. Bits are: +// 0x01: Clear for root page, otherwise set. +// +// * Page number of first child page. As a varint. +// +// * Copy of first rowid on page indicated by previous field. As a varint. +// +// * A list of delta-encoded varints - the first rowid on each subsequent +// child page. +// + +// Rowids for the averages and structure records in the %_data table. + +// Macros determining the rowids used by segment leaves and dlidx leaves +// and nodes. All nodes and leaves are stored in the %_data table with large +// positive rowids. +// +// Each segment has a unique non-zero 16-bit id. +// +// The rowid for each segment leaf is found by passing the segment id and +// the leaf page number to the FTS5_SEGMENT_ROWID macro. Leaves are numbered +// sequentially starting from 1. + +// Each time a blob is read from the %_data table, it is padded with this +// many zero bytes. This makes it easier to decode the various record formats +// without overreading if the records are corrupt. + +type Fts5Data1 = struct { + Fp uintptr + Fnn int32 + FszLeaf int32 +} /* sqlite3.c:225018:9 */ + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Low level access to the FTS index stored in the database file. The +// routines in this file file implement all read and write access to the +// %_data table. Other parts of the system access this functionality via +// the interface defined in fts5Int.h. + +// #include "fts5Int.h" + +// Overview: +// +// The %_data table contains all the FTS indexes for an FTS5 virtual table. +// As well as the main term index, there may be up to 31 prefix indexes. +// The format is similar to FTS3/4, except that: +// +// * all segment b-tree leaf data is stored in fixed size page records +// (e.g. 1000 bytes). A single doclist may span multiple pages. Care is +// taken to ensure it is possible to iterate in either direction through +// the entries in a doclist, or to seek to a specific entry within a +// doclist, without loading it into memory. +// +// * large doclists that span many pages have associated "doclist index" +// records that contain a copy of the first rowid on each page spanned by +// the doclist. This is used to speed up seek operations, and merges of +// large doclists with very small doclists. +// +// * extra fields in the "structure record" record the state of ongoing +// incremental merge operations. +// + +// Details: +// +// The %_data table managed by this module, +// +// CREATE TABLE %_data(id INTEGER PRIMARY KEY, block BLOB); +// +// , contains the following 5 types of records. See the comments surrounding +// the FTS5_*_ROWID macros below for a description of how %_data rowids are +// assigned to each fo them. +// +// 1. Structure Records: +// +// The set of segments that make up an index - the index structure - are +// recorded in a single record within the %_data table. The record consists +// of a single 32-bit configuration cookie value followed by a list of +// SQLite varints. If the FTS table features more than one index (because +// there are one or more prefix indexes), it is guaranteed that all share +// the same cookie value. +// +// Immediately following the configuration cookie, the record begins with +// three varints: +// +// + number of levels, +// + total number of segments on all levels, +// + value of write counter. +// +// Then, for each level from 0 to nMax: +// +// + number of input segments in ongoing merge. +// + total number of segments in level. +// + for each segment from oldest to newest: +// + segment id (always > 0) +// + first leaf page number (often 1, always greater than 0) +// + final leaf page number +// +// 2. The Averages Record: +// +// A single record within the %_data table. The data is a list of varints. +// The first value is the number of rows in the index. Then, for each column +// from left to right, the total number of tokens in the column for all +// rows of the table. +// +// 3. Segment leaves: +// +// TERM/DOCLIST FORMAT: +// +// Most of each segment leaf is taken up by term/doclist data. The +// general format of term/doclist, starting with the first term +// on the leaf page, is: +// +// varint : size of first term +// blob: first term data +// doclist: first doclist +// zero-or-more { +// varint: number of bytes in common with previous term +// varint: number of bytes of new term data (nNew) +// blob: nNew bytes of new term data +// doclist: next doclist +// } +// +// doclist format: +// +// varint: first rowid +// poslist: first poslist +// zero-or-more { +// varint: rowid delta (always > 0) +// poslist: next poslist +// } +// +// poslist format: +// +// varint: size of poslist in bytes multiplied by 2, not including +// this field. Plus 1 if this entry carries the "delete" flag. +// collist: collist for column 0 +// zero-or-more { +// 0x01 byte +// varint: column number (I) +// collist: collist for column I +// } +// +// collist format: +// +// varint: first offset + 2 +// zero-or-more { +// varint: offset delta + 2 +// } +// +// PAGE FORMAT +// +// Each leaf page begins with a 4-byte header containing 2 16-bit +// unsigned integer fields in big-endian format. They are: +// +// * The byte offset of the first rowid on the page, if it exists +// and occurs before the first term (otherwise 0). +// +// * The byte offset of the start of the page footer. If the page +// footer is 0 bytes in size, then this field is the same as the +// size of the leaf page in bytes. +// +// The page footer consists of a single varint for each term located +// on the page. Each varint is the byte offset of the current term +// within the page, delta-compressed against the previous value. In +// other words, the first varint in the footer is the byte offset of +// the first term, the second is the byte offset of the second less that +// of the first, and so on. +// +// The term/doclist format described above is accurate if the entire +// term/doclist data fits on a single leaf page. If this is not the case, +// the format is changed in two ways: +// +// + if the first rowid on a page occurs before the first term, it +// is stored as a literal value: +// +// varint: first rowid +// +// + the first term on each page is stored in the same way as the +// very first term of the segment: +// +// varint : size of first term +// blob: first term data +// +// 5. Segment doclist indexes: +// +// Doclist indexes are themselves b-trees, however they usually consist of +// a single leaf record only. The format of each doclist index leaf page +// is: +// +// * Flags byte. Bits are: +// 0x01: Clear if leaf is also the root page, otherwise set. +// +// * Page number of fts index leaf page. As a varint. +// +// * First rowid on page indicated by previous field. As a varint. +// +// * A list of varints, one for each subsequent termless page. A +// positive delta if the termless page contains at least one rowid, +// or an 0x00 byte otherwise. +// +// Internal doclist index nodes are: +// +// * Flags byte. Bits are: +// 0x01: Clear for root page, otherwise set. +// +// * Page number of first child page. As a varint. +// +// * Copy of first rowid on page indicated by previous field. As a varint. +// +// * A list of delta-encoded varints - the first rowid on each subsequent +// child page. +// + +// Rowids for the averages and structure records in the %_data table. + +// Macros determining the rowids used by segment leaves and dlidx leaves +// and nodes. All nodes and leaves are stored in the %_data table with large +// positive rowids. +// +// Each segment has a unique non-zero 16-bit id. +// +// The rowid for each segment leaf is found by passing the segment id and +// the leaf page number to the FTS5_SEGMENT_ROWID macro. Leaves are numbered +// sequentially starting from 1. + +// Each time a blob is read from the %_data table, it is padded with this +// many zero bytes. This makes it easier to decode the various record formats +// without overreading if the records are corrupt. + +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ +type Fts5DlidxIter1 = struct { + FnLvl int32 + FiSegid int32 + FaLvl [1]Fts5DlidxLvl +} /* sqlite3.c:225019:9 */ + +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ +type Fts5DlidxLvl1 = struct { + FpData uintptr + FiOff int32 + FbEof int32 + FiFirstOff int32 + FiLeafPgno int32 + FiRowid I64 +} /* sqlite3.c:225019:9 */ + +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ +type Fts5DlidxWriter1 = struct { + Fpgno int32 + FbPrevValid int32 + FiPrev I64 + Fbuf Fts5Buffer +} /* sqlite3.c:225021:9 */ + +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ +type Fts5Iter1 = struct { + Fbase Fts5IndexIter + FpIndex uintptr + Fposlist Fts5Buffer + FpColset uintptr + FxSetOutputs uintptr + FnSeg int32 + FbRev int32 + FbSkipEmpty U8 + F__ccgo_pad1 [7]byte + FiSwitchRowid I64 + FaFirst uintptr + FaSeg [1]Fts5SegIter +} /* sqlite3.c:225022:9 */ + +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ +type Fts5PageWriter1 = struct { + Fpgno int32 + FiPrevPgidx int32 + Fbuf Fts5Buffer + Fpgidx Fts5Buffer + Fterm Fts5Buffer +} /* sqlite3.c:225023:9 */ + +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ +type Fts5SegIter1 = struct { + FpSeg uintptr + Fflags int32 + FiLeafPgno int32 + FpLeaf uintptr + FpNextLeaf uintptr + FiLeafOffset I64 + FxNext uintptr + FiTermLeafPgno int32 + FiTermLeafOffset int32 + FiPgidxOff int32 + FiEndofDoclist int32 + FiRowidOffset int32 + FnRowidOffset int32 + FaRowidOffset uintptr + FpDlidx uintptr + Fterm Fts5Buffer + FiRowid I64 + FnPos int32 + FbDel U8 + F__ccgo_pad1 [3]byte +} /* sqlite3.c:225022:9 */ + +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ +type Fts5DoclistIter1 = struct { + FaEof uintptr + FiRowid I64 + FaPoslist uintptr + FnPoslist int32 + FnSize int32 +} /* sqlite3.c:225025:9 */ + +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ +type Fts5SegWriter1 = struct { + FiSegid int32 + F__ccgo_pad1 [4]byte + Fwriter Fts5PageWriter + FiPrevRowid I64 + FbFirstRowidInDoclist U8 + FbFirstRowidInPage U8 + FbFirstTermInPage U8 + F__ccgo_pad2 [1]byte + FnLeafWritten int32 + FnEmpty int32 + FnDlidx int32 + FaDlidx uintptr + Fbtterm Fts5Buffer + FiBtPage int32 + F__ccgo_pad3 [4]byte +} /* sqlite3.c:225026:9 */ + +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ +type Fts5Structure1 = struct { + FnRef int32 + F__ccgo_pad1 [4]byte + FnWriteCounter U64 + FnSegment int32 + FnLevel int32 + FaLevel [1]Fts5StructureLevel +} /* sqlite3.c:216813:9 */ + +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ +type Fts5StructureLevel1 = struct { + FnMerge int32 + FnSeg int32 + FaSeg uintptr +} /* sqlite3.c:216813:9 */ + +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ +type Fts5StructureSegment1 = struct { + FiSegid int32 + FpgnoFirst int32 + FpgnoLast int32 +} /* sqlite3.c:216813:9 */ + +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ + +type Fts5CResult1 = struct { + FiFirst U16 + FbTermEq U8 + F__ccgo_pad1 [1]byte +} /* sqlite3.c:225022:9 */ + +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ + +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ + *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) + *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) +} + +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ + return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) +} + +// Allocate and return a buffer at least nByte bytes in size. +// +// If an OOM error is encountered, return NULL and set the error code in +// the Fts5Index handle passed as the first argument. +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ + return sqlite3Fts5MallocZero(tls, p+52, nByte) +} + +// Compare the contents of the pLeft buffer with the pRight/nRight blob. +// +// Return -ve if pLeft is smaller than pRight, 0 if they are equal or +// +ve if pRight is smaller than pLeft. In other words: +// +// res = *pLeft - *pRight + +// Compare the contents of the two buffers using memcmp(). If one buffer +// is a prefix of the other, it is considered the lesser. +// +// Return -ve if pLeft is smaller than pRight, 0 if they are equal or +// +ve if pRight is smaller than pLeft. In other words: +// +// res = *pLeft - *pRight +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ + var nCmp int32 + var res int32 + nCmp = func() int32 { + if (*Fts5Buffer)(unsafe.Pointer(pLeft)).Fn < (*Fts5Buffer)(unsafe.Pointer(pRight)).Fn { + return (*Fts5Buffer)(unsafe.Pointer(pLeft)).Fn + } + return (*Fts5Buffer)(unsafe.Pointer(pRight)).Fn + }() + + res = func() int32 { + if nCmp <= 0 { + return 0 + } + return libc.Xmemcmp(tls, (*Fts5Buffer)(unsafe.Pointer(pLeft)).Fp, (*Fts5Buffer)(unsafe.Pointer(pRight)).Fp, uint64(nCmp)) + }() + return func() int32 { + if res == 0 { + return (*Fts5Buffer)(unsafe.Pointer(pLeft)).Fn - (*Fts5Buffer)(unsafe.Pointer(pRight)).Fn + } + return res + }() +} + +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var ret int32 at bp, 4 + + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf), bp) + return *(*int32)(unsafe.Pointer(bp /* ret */)) +} + +// Close the read-only blob handle, if it is open. +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ + if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { + var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader + (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) + Xsqlite3_blob_close(tls, pReader) + } +} + +// Retrieve a record from the %_data table. +// +// If an error occurs, NULL is returned and an error left in the +// Fts5Index object. +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ + var pRet uintptr = uintptr(0) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var rc int32 = SQLITE_OK + + if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { + // This call may return SQLITE_ABORT if there has been a savepoint + // rollback since it was last used. In this case a new blob handle + // is required. + var pBlob uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader + (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) + rc = Xsqlite3_blob_reopen(tls, pBlob, iRowid) + + (*Fts5Index)(unsafe.Pointer(p)).FpReader = pBlob + if rc != SQLITE_OK { + sqlite3Fts5IndexCloseReader(tls, p) + } + if rc == SQLITE_ABORT { + rc = SQLITE_OK + } + } + + // If the blob handle is not open at this point, open it and seek + // to the requested entry. + if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34641, iRowid, 0, p+56) + } + + // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls + // above returned SQLITE_ERROR, return SQLITE_CORRUPT_VTAB instead. + // All the reasons those functions might return SQLITE_ERROR - missing + // table, missing row, non-blob/text in block column - indicate + // backing store corruption. + if rc == SQLITE_ERROR { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + + if rc == SQLITE_OK { + var aOut uintptr = uintptr(0) // Read blob data into this buffer + var nByte int32 = Xsqlite3_blob_bytes(tls, (*Fts5Index)(unsafe.Pointer(p)).FpReader) + var nAlloc Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Data{})) + uint64(nByte) + uint64(FTS5_DATA_PADDING)) + pRet = Xsqlite3_malloc64(tls, uint64(nAlloc)) + if pRet != 0 { + (*Fts5Data)(unsafe.Pointer(pRet)).Fnn = nByte + aOut = libc.AssignPtrUintptr(pRet, pRet+1*16) + } else { + rc = SQLITE_NOMEM + } + + if rc == SQLITE_OK { + rc = Xsqlite3_blob_read(tls, (*Fts5Index)(unsafe.Pointer(p)).FpReader, aOut, nByte, 0) + } + if rc != SQLITE_OK { + Xsqlite3_free(tls, pRet) + pRet = uintptr(0) + } else { + // TODO1: Fix this + *(*U8)(unsafe.Pointer((*Fts5Data)(unsafe.Pointer(pRet)).Fp + uintptr(nByte))) = U8(0x00) + *(*U8)(unsafe.Pointer((*Fts5Data)(unsafe.Pointer(pRet)).Fp + uintptr(nByte+1))) = U8(0x00) + (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pRet)).Fp+2)) + } + } + (*Fts5Index)(unsafe.Pointer(p)).Frc = rc + (*Fts5Index)(unsafe.Pointer(p)).FnRead++ + } + + return pRet +} + +// Release a reference to data record returned by an earlier call to +// fts5DataRead(). +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ + Xsqlite3_free(tls, pData) +} + +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ + var pRet uintptr = fts5DataRead(tls, p, iRowid) + if pRet != 0 { + if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + fts5DataRelease(tls, pRet) + pRet = uintptr(0) + } + } + return pRet +} + +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if zSql != 0 { + (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, + uint32(SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_NO_VTAB), + ppStmt, uintptr(0)) + } else { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } + } + Xsqlite3_free(tls, zSql) + return (*Fts5Index)(unsafe.Pointer(p)).Frc +} + +// INSERT OR REPLACE a record into the %_data table. +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return + } + + if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, + ts+34647, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + return + } + } + + Xsqlite3_bind_int64(tls, (*Fts5Index)(unsafe.Pointer(p)).FpWriter, 1, iRowid) + Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpWriter, 2, pData, nData, uintptr(0)) + Xsqlite3_step(tls, (*Fts5Index)(unsafe.Pointer(p)).FpWriter) + (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, (*Fts5Index)(unsafe.Pointer(p)).FpWriter) + Xsqlite3_bind_null(tls, (*Fts5Index)(unsafe.Pointer(p)).FpWriter, 2) +} + +// Execute the following SQL: +// +// DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return + } + + if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + var zSql uintptr = Xsqlite3_mprintf(tls, + ts+34698, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { + return + } + } + + Xsqlite3_bind_int64(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDeleter, 1, iFirst) + Xsqlite3_bind_int64(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDeleter, 2, iLast) + Xsqlite3_step(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDeleter) + (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDeleter) +} + +// Remove all records associated with segment iSegid. +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var iFirst I64 = I64(iSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B) + I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B) + I64(int64(0))<= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { + var i int32 + + for i = 0; i < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; i++ { + Xsqlite3_free(tls, (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(i)*16)).FaSeg) + } + Xsqlite3_free(tls, pStruct) + } +} + +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ + (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ +} + +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ + fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) + return (*Fts5Index)(unsafe.Pointer(p)).FpStruct +} + +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ + if p != 0 { + fts5StructureRelease(tls, p) + } +} + +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ + if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { + return SQLITE_ABORT + } + return SQLITE_OK +} + +// Ensure that structure object (*pp) is writable. +// +// This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If +// an error occurs, (*pRc) is set to an SQLite error code before returning. +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ + var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { + var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) + var pNew uintptr + pNew = sqlite3Fts5MallocZero(tls, pRc, nByte) + if pNew != 0 { + var i int32 + libc.Xmemcpy(tls, pNew, p, uint64(nByte)) + for i = 0; i < (*Fts5Structure)(unsafe.Pointer(p)).FnLevel; i++ { + (*Fts5StructureLevel)(unsafe.Pointer(pNew + 24 + uintptr(i)*16)).FaSeg = uintptr(0) + } + for i = 0; i < (*Fts5Structure)(unsafe.Pointer(p)).FnLevel; i++ { + var pLvl uintptr = pNew + 24 + uintptr(i)*16 + nByte = I64(uint64(unsafe.Sizeof(Fts5StructureSegment{})) * uint64((*Fts5StructureLevel)(unsafe.Pointer(pNew+24+uintptr(i)*16)).FnSeg)) + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = sqlite3Fts5MallocZero(tls, pRc, nByte) + if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg == uintptr(0) { + for i = 0; i < (*Fts5Structure)(unsafe.Pointer(p)).FnLevel; i++ { + Xsqlite3_free(tls, (*Fts5StructureLevel)(unsafe.Pointer(pNew+24+uintptr(i)*16)).FaSeg) + } + Xsqlite3_free(tls, pNew) + return + } + libc.Xmemcpy(tls, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg, (*Fts5StructureLevel)(unsafe.Pointer(p+24+uintptr(i)*16)).FaSeg, uint64(nByte)) + } + (*Fts5Structure)(unsafe.Pointer(p)).FnRef-- + (*Fts5Structure)(unsafe.Pointer(pNew)).FnRef = 1 + } + *(*uintptr)(unsafe.Pointer(pp)) = pNew + } +} + +// Deserialize and return the structure record currently stored in serialized +// form within buffer pData/nData. +// +// The Fts5Structure.aLevel[] and each Fts5StructureLevel.aSeg[] array +// are over-allocated by one slot. This allows the structure contents +// to be more easily edited. +// +// If an error occurs, *ppOut is set to NULL and an SQLite error code +// returned. Otherwise, *ppOut is set to point to the new object and +// SQLITE_OK returned. +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK + var i int32 = 0 + var iLvl int32 + *(*int32)(unsafe.Pointer(bp /* nLevel */)) = 0 + *(*int32)(unsafe.Pointer(bp + 4 /* nSegment */)) = 0 + var nByte Sqlite3_int64 // Bytes of space to allocate at pRet + var pRet uintptr = uintptr(0) // Structure object to return + + // Grab the cookie value + if piCookie != 0 { + *(*int32)(unsafe.Pointer(piCookie)) = sqlite3Fts5Get32(tls, pData) + } + i = 4 + + // Read the total number of levels and segments from the start of the + // structure record. + i = i + sqlite3Fts5GetVarint32(tls, pData+uintptr(i), bp) + i = i + sqlite3Fts5GetVarint32(tls, pData+uintptr(i), bp+4) + if *(*int32)(unsafe.Pointer(bp)) > FTS5_MAX_SEGMENT || *(*int32)(unsafe.Pointer(bp)) < 0 || + *(*int32)(unsafe.Pointer(bp + 4)) > FTS5_MAX_SEGMENT || *(*int32)(unsafe.Pointer(bp + 4)) < 0 { + return SQLITE_CORRUPT | int32(1)<<8 + } + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64(unsafe.Sizeof(Fts5StructureLevel{}))*uint64(*(*int32)(unsafe.Pointer(bp))-1)) + pRet = sqlite3Fts5MallocZero(tls, bp+8, nByte) + + if pRet != 0 { + (*Fts5Structure)(unsafe.Pointer(pRet)).FnRef = 1 + (*Fts5Structure)(unsafe.Pointer(pRet)).FnLevel = *(*int32)(unsafe.Pointer(bp /* nLevel */)) + (*Fts5Structure)(unsafe.Pointer(pRet)).FnSegment = *(*int32)(unsafe.Pointer(bp + 4 /* nSegment */)) + i = i + int32(sqlite3Fts5GetVarint(tls, pData+uintptr(i), pRet+8)) + + for iLvl = 0; *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK && iLvl < *(*int32)(unsafe.Pointer(bp /* nLevel */)); iLvl++ { + var pLvl uintptr = pRet + 24 + uintptr(iLvl)*16 + *(*int32)(unsafe.Pointer(bp + 12 /* nTotal */)) = 0 + var iSeg int32 + + if i >= nData { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + } else { + i = i + sqlite3Fts5GetVarint32(tls, pData+uintptr(i), pLvl) + i = i + sqlite3Fts5GetVarint32(tls, pData+uintptr(i), bp+12) + if *(*int32)(unsafe.Pointer(bp + 12)) < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + } + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = sqlite3Fts5MallocZero(tls, bp+8, + int64(uint64(*(*int32)(unsafe.Pointer(bp + 12)))*uint64(unsafe.Sizeof(Fts5StructureSegment{})))) + *(*int32)(unsafe.Pointer(bp + 4 /* nSegment */)) -= *(*int32)(unsafe.Pointer(bp + 12 /* nTotal */)) + } + + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg = *(*int32)(unsafe.Pointer(bp + 12 /* nTotal */)) + for iSeg = 0; iSeg < *(*int32)(unsafe.Pointer(bp + 12 /* nTotal */)); iSeg++ { + var pSeg uintptr = (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg + uintptr(iSeg)*12 + if i >= nData { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + break + } + i = i + sqlite3Fts5GetVarint32(tls, pData+uintptr(i), pSeg) + i = i + sqlite3Fts5GetVarint32(tls, pData+uintptr(i), pSeg+4) + i = i + sqlite3Fts5GetVarint32(tls, pData+uintptr(i), pSeg+8) + if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast < (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + break + } + } + if iLvl > 0 && (*Fts5StructureLevel)(unsafe.Pointer(pLvl+libc.UintptrFromInt32(-1)*16)).FnMerge != 0 && *(*int32)(unsafe.Pointer(bp + 12)) == 0 { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + } + if iLvl == *(*int32)(unsafe.Pointer(bp))-1 && (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge != 0 { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + } + } + } + if *(*int32)(unsafe.Pointer(bp + 4)) != 0 && *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + } + + if *(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK { + fts5StructureRelease(tls, pRet) + pRet = uintptr(0) + } + } + + *(*uintptr)(unsafe.Pointer(ppOut)) = pRet + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) +} + +// Add a level to the Fts5Structure.aLevel[] array of structure object +// (*ppStruct). +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ + fts5StructureMakeWritable(tls, pRc, ppStruct) + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) + var nLevel int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64(unsafe.Sizeof(Fts5StructureLevel{}))*uint64(nLevel+1)) + + pStruct = Xsqlite3_realloc64(tls, pStruct, uint64(nByte)) + if pStruct != 0 { + libc.Xmemset(tls, pStruct+24+uintptr(nLevel)*16, 0, uint64(unsafe.Sizeof(Fts5StructureLevel{}))) + (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel++ + *(*uintptr)(unsafe.Pointer(ppStruct)) = pStruct + } else { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } +} + +// Extend level iLvl so that there is room for at least nExtra more +// segments. +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 + var aNew uintptr + var nByte Sqlite3_int64 + + nByte = Sqlite3_int64(uint64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg+nExtra) * uint64(unsafe.Sizeof(Fts5StructureSegment{}))) + aNew = Xsqlite3_realloc64(tls, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg, uint64(nByte)) + if aNew != 0 { + if bInsert == 0 { + libc.Xmemset(tls, aNew+uintptr((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)*12, 0, uint64(unsafe.Sizeof(Fts5StructureSegment{}))*uint64(nExtra)) + } else { + var nMove int32 = int32(uint64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg) * uint64(unsafe.Sizeof(Fts5StructureSegment{}))) + libc.Xmemmove(tls, aNew+uintptr(nExtra)*12, aNew, uint64(nMove)) + libc.Xmemset(tls, aNew, 0, uint64(unsafe.Sizeof(Fts5StructureSegment{}))*uint64(nExtra)) + } + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = aNew + } else { + *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM + } + } +} + +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) = uintptr(0) + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + // var iCookie int32 at bp, 4 + // Configuration cookie + var pData uintptr + + pData = fts5DataRead(tls, p, int64(FTS5_STRUCTURE_ROWID)) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + // TODO: Do we need this if the leaf-index is appended? Probably... + libc.Xmemset(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pData)).Fnn), 0, uint64(FTS5_DATA_PADDING)) + (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5StructureDecode(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp, (*Fts5Data)(unsafe.Pointer(pData)).Fnn, bp, bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && ((*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz == 0 || (*Fts5Config)(unsafe.Pointer(pConfig)).FiCookie != *(*int32)(unsafe.Pointer(bp))) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5ConfigLoad(tls, pConfig, *(*int32)(unsafe.Pointer(bp /* iCookie */))) + } + fts5DataRelease(tls, pData) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + fts5StructureRelease(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */))) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) = uintptr(0) + } + } + + return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) +} + +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var iVersion I64 = int64(0) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, + Xsqlite3_mprintf(tls, ts+34787, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + return int64(0) + } + } + + if SQLITE_ROW == Xsqlite3_step(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion) { + iVersion = Xsqlite3_column_int64(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion, 0) + } + (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion) + } + + return iVersion +} + +// Read, deserialize and return the structure record. +// +// The Fts5Structure.aLevel[] and each Fts5StructureLevel.aSeg[] array +// are over-allocated as described for function fts5StructureDecode() +// above. +// +// If an error occurs, NULL is returned and an error code left in the +// Fts5Index handle. If an error has already occurred when this function +// is called, it is a no-op. +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ + + if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { + (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Fts5Index)(unsafe.Pointer(p)).FpStruct = fts5StructureReadUncached(tls, p) + } + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return uintptr(0) + } + + fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) + return (*Fts5Index)(unsafe.Pointer(p)).FpStruct +} + +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ + if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { + fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) + (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) + } +} + +// Return the total number of segments in index structure pStruct. This +// function is only ever used as part of assert() conditions. + +// Serialize and store the "structure" record. +// +// If an error occurs, leave an error code in the Fts5Index object. If an +// error has already occurred, this function is a no-op. +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + // var buf Fts5Buffer at bp, 16 + // Buffer to serialize record into + var iLvl int32 // Used to iterate through levels + var iCookie int32 // Cookie value to store + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) + + // Append the current configuration cookie + iCookie = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FiCookie + if iCookie < 0 { + iCookie = 0 + } + + if 0 == sqlite3Fts5BufferSize(tls, p+52, bp, uint32(4+9+9+9)) { + sqlite3Fts5Put32(tls, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, iCookie) + (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fn = 4 + { + *(*int32)(unsafe.Pointer(bp + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp)).Fn), uint64((*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel)) + } + + { + *(*int32)(unsafe.Pointer(bp + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp)).Fn), uint64((*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment)) + } + + { + *(*int32)(unsafe.Pointer(bp + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp)).Fn), uint64(I64((*Fts5Structure)(unsafe.Pointer(pStruct)).FnWriteCounter))) + } + + } + + for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { + var iSeg int32 // Used to iterate through segments + var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) + + for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg; iSeg++ { + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) + } + } + + fts5DataWrite(tls, p, int64(FTS5_STRUCTURE_ROWID), (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fn) + sqlite3Fts5BufferFree(tls, bp) + } +} + +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ + return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst +} + +// Return a copy of index structure pStruct. Except, promote as many +// segments as possible to level iPromote. If an OOM occurs, NULL is +// returned. +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ + var il int32 + var is int32 + var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 + + if (*Fts5StructureLevel)(unsafe.Pointer(pOut)).FnMerge == 0 { + for il = iPromote + 1; il < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; il++ { + var pLvl uintptr = pStruct + 24 + uintptr(il)*16 + if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge != 0 { + return + } + for is = (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg - 1; is >= 0; is-- { + var sz int32 = fts5SegmentSize(tls, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(is)*12) + if sz > szPromote { + return + } + fts5StructureExtendLevel(tls, p+52, pStruct, iPromote, 1, 1) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + return + } + libc.Xmemcpy(tls, (*Fts5StructureLevel)(unsafe.Pointer(pOut)).FaSeg, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(is)*12, uint64(unsafe.Sizeof(Fts5StructureSegment{}))) + (*Fts5StructureLevel)(unsafe.Pointer(pOut)).FnSeg++ + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg-- + } + } + } +} + +// A new segment has just been written to level iLvl of index structure +// pStruct. This function determines if any segments should be promoted +// as a result. Segments are promoted in two scenarios: +// +// a) If the segment just written is smaller than one or more segments +// within the previous populated level, it is promoted to the previous +// populated level. +// +// b) If the segment just written is larger than the newest segment on +// the next populated level, then that segment, and any other adjacent +// segments that are also smaller than the one just written, are +// promoted. +// +// If one or more segments are promoted, the structure object is updated +// to reflect this. +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var iTst int32 + var iPromote int32 = -1 + var szPromote int32 = 0 // Promote anything this size or smaller + var pSeg uintptr // Segment just written + var szSeg int32 // Size of segment just written + var nSeg int32 = (*Fts5StructureLevel)(unsafe.Pointer(pStruct + 24 + uintptr(iLvl)*16)).FnSeg + + if nSeg == 0 { + return + } + pSeg = (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(iLvl)*16)).FaSeg + uintptr((*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(iLvl)*16)).FnSeg-1)*12 + szSeg = 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst + + // Check for condition (a) + for iTst = iLvl - 1; iTst >= 0 && (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24 /* &.aLevel */ +uintptr(iTst)*16)).FnSeg == 0; iTst-- { + } + if iTst >= 0 { + var i int32 + var szMax int32 = 0 + var pTst uintptr = pStruct + 24 + uintptr(iTst)*16 + + for i = 0; i < (*Fts5StructureLevel)(unsafe.Pointer(pTst)).FnSeg; i++ { + var sz int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pTst)).FaSeg+uintptr(i)*12)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pTst)).FaSeg+uintptr(i)*12)).FpgnoFirst + 1 + if sz > szMax { + szMax = sz + } + } + if szMax >= szSeg { + // Condition (a) is true. Promote the newest segment on level + // iLvl to level iTst. + iPromote = iTst + szPromote = szMax + } + } + + // If condition (a) is not met, assume (b) is true. StructurePromoteTo() + // is a no-op if it is not. + if iPromote < 0 { + iPromote = iLvl + szPromote = szSeg + } + fts5StructurePromoteTo(tls, p, iPromote, szPromote, pStruct) + } +} + +// Advance the iterator passed as the only argument. If the end of the +// doclist-index page is reached, return non-zero. +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pData uintptr = (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FpData + + if (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff == 0 { + + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff = 1 + *(*int32)(unsafe.Pointer(pLvl + 8)) += sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp+1, pLvl+20) + *(*int32)(unsafe.Pointer(pLvl + 8)) += int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff), pLvl+24)) + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiFirstOff = (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff + } else { + var iOff int32 + for iOff = (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff; iOff < (*Fts5Data)(unsafe.Pointer(pData)).Fnn; iOff++ { + if *(*U8)(unsafe.Pointer((*Fts5Data)(unsafe.Pointer(pData)).Fp + uintptr(iOff))) != 0 { + break + } + } + + if iOff < (*Fts5Data)(unsafe.Pointer(pData)).Fnn { + // var iVal I64 at bp, 8 + + *(*int32)(unsafe.Pointer(pLvl + 20)) += iOff - (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff + 1 + iOff = iOff + int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff), bp)) + *(*I64)(unsafe.Pointer(pLvl + 24)) += *(*I64)(unsafe.Pointer(bp)) + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff = iOff + } else { + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof = 1 + } + } + + return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof +} + +// Advance the iterator passed as the only argument. +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ + var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 + + if fts5DlidxLvlNext(tls, pLvl) != 0 { + if iLvl+1 < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl { + fts5DlidxIterNextR(tls, p, pIter, iLvl+1) + if (*Fts5DlidxLvl)(unsafe.Pointer(pLvl+1*32)).FbEof == 0 { + fts5DataRelease(tls, (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FpData) + libc.Xmemset(tls, pLvl, 0, uint64(unsafe.Sizeof(Fts5DlidxLvl{}))) + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FpData = fts5DataRead(tls, p, + I64((*Fts5DlidxIter)(unsafe.Pointer(pIter)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(1))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(iLvl)<iLeafPgno is the page number the +// doclist is associated with (the one featuring the term). +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ + var i int32 + for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { + fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) + } + return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof +} + +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ + return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) +} + +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ + var i int32 + + // Advance each level to the last entry on the last page + for i = (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl - 1; (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && i >= 0; i-- { + var pLvl uintptr = pIter + 8 + uintptr(i)*32 + for fts5DlidxLvlNext(tls, pLvl) == 0 { + } + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof = 0 + + if i > 0 { + var pChild uintptr = pLvl + libc.UintptrFromInt32(-1)*32 + fts5DataRelease(tls, (*Fts5DlidxLvl)(unsafe.Pointer(pChild)).FpData) + libc.Xmemset(tls, pChild, 0, uint64(unsafe.Sizeof(Fts5DlidxLvl{}))) + (*Fts5DlidxLvl)(unsafe.Pointer(pChild)).FpData = fts5DataRead(tls, p, + I64((*Fts5DlidxIter)(unsafe.Pointer(pIter)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(1))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(i-1)< 9 { + return iOff - 9 + } + return 0 + }() + for iOff--; iOff > iLimit; iOff-- { + if int32(*(*U8)(unsafe.Pointer(a + uintptr(iOff-1))))&0x80 == 0 { + break + } + } + + sqlite3Fts5GetVarint(tls, a+uintptr(iOff), bp) + *(*I64)(unsafe.Pointer(pLvl + 24)) -= *(*I64)(unsafe.Pointer(bp)) + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiLeafPgno-- + + // Skip backwards past any 0x00 varints. + for ii = iOff - 1; ii >= (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiFirstOff && int32(*(*U8)(unsafe.Pointer(a + uintptr(ii)))) == 0x00; ii-- { + nZero++ + } + if ii >= (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiFirstOff && int32(*(*U8)(unsafe.Pointer(a + uintptr(ii))))&0x80 != 0 { + // The byte immediately before the last 0x00 byte has the 0x80 bit + // set. So the last 0x00 is only a varint 0 if there are 8 more 0x80 + // bytes before a[ii]. + var bZero int32 = 0 // True if last 0x00 counts + if ii-8 >= (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiFirstOff { + var j int32 + for j = 1; j <= 8 && int32(*(*U8)(unsafe.Pointer(a + uintptr(ii-j))))&0x80 != 0; j++ { + } + bZero = libc.Bool32(j > 8) + } + if bZero == 0 { + nZero-- + } + } + *(*int32)(unsafe.Pointer(pLvl + 20)) -= nZero + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiOff = iOff - nZero + } + + return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof +} + +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ + var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 + + if fts5DlidxLvlPrev(tls, pLvl) != 0 { + if iLvl+1 < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl { + fts5DlidxIterPrevR(tls, p, pIter, iLvl+1) + if (*Fts5DlidxLvl)(unsafe.Pointer(pLvl+1*32)).FbEof == 0 { + fts5DataRelease(tls, (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FpData) + libc.Xmemset(tls, pLvl, 0, uint64(unsafe.Sizeof(Fts5DlidxLvl{}))) + (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FpData = fts5DataRead(tls, p, + I64((*Fts5DlidxIter)(unsafe.Pointer(pIter)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(1))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(iLvl)<= (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn + 1 + } else { + *(*int32)(unsafe.Pointer(pIter + 56)) += sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff), pIter+60) + } + } +} + +// Argument p points to a buffer containing a varint to be interpreted as a +// position list size field. Read the varint and return the number of bytes +// read. Before returning, set *pnSz to the number of bytes in the position +// list, and *pbDel to true if the delete flag is set, or false otherwise. +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var nSz int32 at bp, 4 + + var n int32 = 0 + { + *(*int32)(unsafe.Pointer(bp /* nSz */)) = int32(*(*U8)(unsafe.Pointer(p + uintptr(libc.PostIncInt32(&n, 1))))) + if *(*int32)(unsafe.Pointer(bp))&0x80 != 0 { + n-- + n = n + sqlite3Fts5GetVarint32(tls, p+uintptr(n), bp) + } + } + + *(*int32)(unsafe.Pointer(pnSz)) = *(*int32)(unsafe.Pointer(bp)) / 2 + *(*int32)(unsafe.Pointer(pbDel)) = *(*int32)(unsafe.Pointer(bp)) & 0x0001 + return n +} + +// Fts5SegIter.iLeafOffset currently points to the first byte of a +// position-list size field. Read the value of the field and store it +// in the following variables: +// +// Fts5SegIter.nPos +// Fts5SegIter.bDel +// +// Leave Fts5SegIter.iLeafOffset pointing to the first byte of the +// position list content (if any). +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var iOff int32 = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) // Offset to read at + + if (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { + var iEod int32 = func() int32 { + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist < (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf { + return (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist + } + return (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf + }() + (*Fts5SegIter)(unsafe.Pointer(pIter)).FbDel = U8(0) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos = 1 + if iOff < iEod && int32(*(*U8)(unsafe.Pointer((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr(iOff)))) == 0 { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FbDel = U8(1) + iOff++ + if iOff < iEod && int32(*(*U8)(unsafe.Pointer((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr(iOff)))) == 0 { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos = 1 + iOff++ + } else { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos = 0 + } + } + } else { + // var nSz int32 at bp, 4 + + { + *(*int32)(unsafe.Pointer(bp /* nSz */)) = int32(*(*U8)(unsafe.Pointer((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr(libc.PostIncInt32(&iOff, 1))))) + if *(*int32)(unsafe.Pointer(bp))&0x80 != 0 { + iOff-- + iOff = iOff + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp+uintptr(iOff), bp) + } + } + + (*Fts5SegIter)(unsafe.Pointer(pIter)).FbDel = U8(*(*int32)(unsafe.Pointer(bp)) & 0x0001) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos = *(*int32)(unsafe.Pointer(bp)) >> 1 + + } + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff) + } +} + +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ + var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from + var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset + + if iOff >= I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf) { + fts5SegIterNextPage(tls, p, pIter) + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf == uintptr(0) { + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + return + } + iOff = int64(4) + a = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + } + iOff = iOff + I64(sqlite3Fts5GetVarint(tls, a+uintptr(iOff), pIter+104)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff +} + +// Fts5SegIter.iLeafOffset currently points to the first byte of the +// "nSuffix" field of a term. Function parameter nKeep contains the value +// of the "nPrefix" field (if there was one - it is passed 0 if this is +// the first term in the segment). +// +// This function populates: +// +// Fts5SegIter.term +// Fts5SegIter.rowid +// +// accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of +// the first position list. The position list belonging to document +// (Fts5SegIter.iRowid). +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from + var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset // Offset to read at + // var nNew int32 at bp, 4 + // Bytes of new data + + iOff = iOff + I64(sqlite3Fts5GetVarint32(tls, a+uintptr(iOff), bp)) + if iOff+I64(*(*int32)(unsafe.Pointer(bp))) > I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf) || nKeep > (*Fts5SegIter)(unsafe.Pointer(pIter)).Fterm.Fn || *(*int32)(unsafe.Pointer(bp)) == 0 { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return + } + (*Fts5SegIter)(unsafe.Pointer(pIter)).Fterm.Fn = nKeep + sqlite3Fts5BufferAppendBlob(tls, p+52, pIter+88, uint32(*(*int32)(unsafe.Pointer(bp /* nNew */))), a+uintptr(iOff)) + + iOff = iOff + I64(*(*int32)(unsafe.Pointer(bp))) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset = int32(iOff) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff + + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff >= (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn + 1 + } else { + // var nExtra int32 at bp+4, 4 + + *(*int32)(unsafe.Pointer(pIter + 56)) += sqlite3Fts5GetVarint32(tls, a+uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff), bp+4) + *(*int32)(unsafe.Pointer(pIter + 60)) += *(*int32)(unsafe.Pointer(bp + 4)) + } + + fts5SegIterLoadRowid(tls, p, pIter) +} + +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ + if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{fts5SegIterNext_Reverse})) + } else if (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{fts5SegIterNext_None})) + } else { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{fts5SegIterNext})) + } +} + +// Initialize the iterator object pIter to iterate through the entries in +// segment pSeg. The iterator is left pointing to the first entry when +// this function returns. +// +// If an error occurs, Fts5Index.rc is set to an appropriate error code. If +// an error has already occurred when this function is called, it is a no-op. +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ + if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { + // This happens if the segment is being used as an input to an incremental + // merge and all data has already been "trimmed". See function + // fts5TrimSegments() for details. In this case leave the iterator empty. + // The caller will see the (pIter->pLeaf==0) and assume the iterator is + // at EOF already. + + return + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5SegIter{}))) + fts5SegIterSetNext(tls, p, pIter) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg = pSeg + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst - 1 + fts5SegIterNextPage(tls, p, pIter) + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = int64(4) + + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf + 1 + fts5SegIterLoadTerm(tls, p, pIter, 0) + fts5SegIterLoadNPos(tls, p, pIter) + } +} + +// This function is only ever called on iterators created by calls to +// Fts5IndexQuery() with the FTS5INDEX_QUERY_DESC flag set. +// +// The iterator is in an unusual state when this function is called: the +// Fts5SegIter.iLeafOffset variable is set to the offset of the start of +// the position-list size field for the first relevant rowid on the page. +// Fts5SegIter.rowid is set, but nPos and bDel are not. +// +// This function advances the iterator so that it points to the last +// relevant rowid on the page and, if necessary, initializes the +// aRowidOffset[] and iRowidOffset variables. At this point the iterator +// is in its regular state - Fts5SegIter.iLeafOffset points to the first +// byte of the position list content associated with said rowid. +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail + var n int32 = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf + var i int32 = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) + var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + var iRowidOffset int32 = 0 + + if n > (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist { + n = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist + } + + for 1 != 0 { + *(*U64)(unsafe.Pointer(bp + 8 /* iDelta */)) = uint64(0) + + if eDetail == FTS5_DETAIL_NONE { + // todo + if i < n && int32(*(*U8)(unsafe.Pointer(a + uintptr(i)))) == 0 { + i++ + if i < n && int32(*(*U8)(unsafe.Pointer(a + uintptr(i)))) == 0 { + i++ + } + } + } else { + // var nPos int32 at bp, 4 + + // var bDummy int32 at bp+4, 4 + + i = i + fts5GetPoslistSize(tls, a+uintptr(i), bp, bp+4) + i = i + *(*int32)(unsafe.Pointer(bp)) + } + if i >= n { + break + } + i = i + int32(sqlite3Fts5GetVarint(tls, a+uintptr(i), bp+8)) + *(*I64)(unsafe.Pointer(pIter + 104)) += I64(*(*U64)(unsafe.Pointer(bp + 8))) + + // If necessary, grow the pIter->aRowidOffset[] array. + if iRowidOffset >= (*Fts5SegIter)(unsafe.Pointer(pIter)).FnRowidOffset { + var nNew int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FnRowidOffset + 8 + var aNew uintptr = Xsqlite3_realloc64(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset, uint64(uint64(nNew)*uint64(unsafe.Sizeof(int32(0))))) + if aNew == uintptr(0) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + break + } + (*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset = aNew + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnRowidOffset = nNew + } + + *(*int32)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset + uintptr(libc.PostIncInt32(&iRowidOffset, 1))*4)) = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(i) + } + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset = iRowidOffset + fts5SegIterLoadNPos(tls, p, pIter) +} + +// +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ + + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno > (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno { + var pNew uintptr + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno-- + pNew = fts5DataRead(tls, p, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(int64(0))<pLeaf==0, this iterator is at EOF. + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno == (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno { + + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset < (*Fts5Data)(unsafe.Pointer(pNew)).FszLeaf { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pNew + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64((*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset) + } + } else { + var iRowidOff int32 + iRowidOff = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pNew)).Fp)) + if iRowidOff != 0 { + if iRowidOff >= (*Fts5Data)(unsafe.Pointer(pNew)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pNew + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iRowidOff) + } + } + } + + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf != 0 { + var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) + *(*I64)(unsafe.Pointer(pIter + 32)) += I64(sqlite3Fts5GetVarint(tls, a, pIter+104)) + break + } else { + fts5DataRelease(tls, pNew) + } + } + } + + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf != 0 { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn + 1 + fts5SegIterReverseInitPage(tls, p, pIter) + } +} + +// Return true if the iterator passed as the second argument currently +// points to a delete marker. A delete marker is an entry with a 0 byte +// position-list. +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ + var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 + return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) +} + +// Advance iterator pIter to the next entry. +// +// This version of fts5SegIterNext() is only used by reverse iterators. +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + _ = pbUnused + + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset > 0 { + var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + var iOff int32 + // var iDelta U64 at bp, 8 + + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset-- + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset + uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset)*4))) + fts5SegIterLoadNPos(tls, p, pIter) + iOff = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) + if (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail != FTS5_DETAIL_NONE { + iOff = iOff + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos + } + sqlite3Fts5GetVarint(tls, a+uintptr(iOff), bp) + *(*I64)(unsafe.Pointer(pIter + 104)) -= I64(*(*U64)(unsafe.Pointer(bp))) + } else { + fts5SegIterReverseNewPage(tls, p, pIter) + } +} + +// Advance iterator pIter to the next entry. +// +// This version of fts5SegIterNext() is only used if detail=none and the +// iterator is not a reverse direction iterator. +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + var iOff int32 + // Next entry is on the current page + // var iDelta I64 at bp, 8 + + // var nKeep int32 at bp+8, 4 + + // var pList uintptr at bp+24, 8 + + // var zTerm uintptr at bp+16, 8 + + // var nList int32 at bp+32, 4 + + iOff = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) + + // Next entry is on the next page + if !((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg != 0 && iOff >= (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf) { + goto __1 + } + fts5SegIterNextPage(tls, p, pIter) + if !((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf == uintptr(0)) { + goto __2 + } + return +__2: + ; + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowid = int64(0) + iOff = 4 +__1: + ; + + if !(iOff < (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist) { + goto __3 + } + iOff = iOff + int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp+uintptr(iOff), bp)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff) + *(*I64)(unsafe.Pointer(pIter + 104)) += *(*I64)(unsafe.Pointer(bp)) + goto __4 +__3: + if !((*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_ONETERM == 0) { + goto __5 + } + if !((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg != 0) { + goto __7 + } + *(*int32)(unsafe.Pointer(bp + 8 /* nKeep */)) = 0 + if !(iOff != fts5LeafFirstTermOff(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)) { + goto __9 + } + iOff = iOff + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp+uintptr(iOff), bp+8) +__9: + ; + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff) + fts5SegIterLoadTerm(tls, p, pIter, *(*int32)(unsafe.Pointer(bp + 8 /* nKeep */))) + goto __8 +__7: + *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)) = uintptr(0) + sqlite3Fts5HashScanNext(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) + sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp+16, bp+24, bp+32) + if !(*(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0)) { + goto __10 + } + goto next_none_eof +__10: + ; + (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp = *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)) + (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn = *(*int32)(unsafe.Pointer(bp + 32 /* nList */)) + (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf = *(*int32)(unsafe.Pointer(bp + 32 /* nList */)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = *(*int32)(unsafe.Pointer(bp + 32 /* nList */)) + sqlite3Fts5BufferSet(tls, p+52, pIter+88, int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)))), *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */))) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)), pIter+104)) +__8: + ; + + if !(pbNewTerm != 0) { + goto __11 + } + *(*int32)(unsafe.Pointer(pbNewTerm)) = 1 +__11: + ; + goto __6 +__5: + goto next_none_eof +__6: + ; +__4: + ; + + fts5SegIterLoadNPos(tls, p, pIter) + + return +next_none_eof: + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) +} + +// Advance iterator pIter to the next entry. +// +// If an error occurs, Fts5Index.rc is set to an appropriate error code. It +// is not considered an error if the iterator reaches EOF. If an error has +// already occurred when this function is called, it is a no-op. +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ + bp := tls.Alloc(44) + defer tls.Free(44) + + var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf + // var iOff int32 at bp+36, 4 + + var bNewTerm int32 = 0 + *(*int32)(unsafe.Pointer(bp /* nKeep */)) = 0 + var a uintptr + var n int32 + + // Search for the end of the position list within the current page. + a = (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp + n = (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf + + *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset + I64((*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos)) + + if *(*int32)(unsafe.Pointer(bp + 36)) < n { + // The next entry is on the current page. + + if *(*int32)(unsafe.Pointer(bp + 36)) >= (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist { + bNewTerm = 1 + if *(*int32)(unsafe.Pointer(bp + 36)) != fts5LeafFirstTermOff(tls, pLeaf) { + *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) += sqlite3Fts5GetVarint32(tls, a+uintptr(*(*int32)(unsafe.Pointer(bp + 36))), bp) + } + } else { + // var iDelta U64 at bp+8, 8 + + *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) += int32(sqlite3Fts5GetVarint(tls, a+uintptr(*(*int32)(unsafe.Pointer(bp + 36))), bp+8)) + *(*I64)(unsafe.Pointer(pIter + 104)) += I64(*(*U64)(unsafe.Pointer(bp + 8))) + + } + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer(bp + 36 /* iOff */))) + + } else if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg == uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 32 /* nList */)) = 0 + + if 0 == (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_ONETERM { + sqlite3Fts5HashScanNext(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) + sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp+16, bp+24, bp+32) + } + if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) { + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) + } else { + (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp = *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)) + (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn = *(*int32)(unsafe.Pointer(bp + 32 /* nList */)) + (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf = *(*int32)(unsafe.Pointer(bp + 32 /* nList */)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = *(*int32)(unsafe.Pointer(bp + 32)) + 1 + sqlite3Fts5BufferSet(tls, p+52, pIter+88, int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)))), + *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */))) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)), pIter+104)) + *(*int32)(unsafe.Pointer(pbNewTerm)) = 1 + } + } else { + *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) = 0 + // Next entry is not on the current page + for *(*int32)(unsafe.Pointer(bp + 36)) == 0 { + fts5SegIterNextPage(tls, p, pIter) + pLeaf = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf + if pLeaf == uintptr(0) { + break + } + + if libc.AssignPtrInt32(bp+36, int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp))) != 0 && *(*int32)(unsafe.Pointer(bp + 36)) < (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) += int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(*(*int32)(unsafe.Pointer(bp + 36))), pIter+104)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer(bp + 36 /* iOff */))) + + if (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff = (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf), pIter+60) + } + } else if (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff = (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf), bp+36) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer(bp + 36 /* iOff */))) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) + bNewTerm = 1 + } + + if *(*int32)(unsafe.Pointer(bp + 36)) > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return + } + } + } + + // Check if the iterator is now at EOF. If so, return early. + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf != 0 { + if bNewTerm != 0 { + if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_ONETERM != 0 { + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) + } else { + fts5SegIterLoadTerm(tls, p, pIter, *(*int32)(unsafe.Pointer(bp /* nKeep */))) + fts5SegIterLoadNPos(tls, p, pIter) + if pbNewTerm != 0 { + *(*int32)(unsafe.Pointer(pbNewTerm)) = 1 + } + } + } else { + // The following could be done by calling fts5SegIterLoadNPos(). But + // this block is particularly performance critical, so equivalent + // code is inlined. + // var nSz int32 at bp+40, 4 + + { + *(*int32)(unsafe.Pointer(bp + 40 /* nSz */)) = int32(*(*U8)(unsafe.Pointer((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr(libc.PostIncInt64(&(*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset, 1))))) + if *(*int32)(unsafe.Pointer(bp + 40))&0x80 != 0 { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset-- + *(*I64)(unsafe.Pointer(pIter + 32)) += I64(sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset), bp+40)) + } + } + + (*Fts5SegIter)(unsafe.Pointer(pIter)).FbDel = U8(*(*int32)(unsafe.Pointer(bp + 40)) & 0x0001) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos = *(*int32)(unsafe.Pointer(bp + 40)) >> 1 + + } + } +} + +// Iterator pIter currently points to the first rowid in a doclist. This +// function sets the iterator up so that iterates in reverse order through +// the doclist. +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ + var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx + var pLast uintptr = uintptr(0) + var pgnoLast int32 = 0 + + if pDlidx != 0 { + var iSegid int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid + pgnoLast = fts5DlidxIterPgno(tls, pDlidx) + pLast = fts5LeafRead(tls, p, I64(iSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(int64(0))<= (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + var pgno int32 + var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg + + // The last rowid in the doclist may not be on the current page. Search + // forward to find the page containing the last rowid. + for pgno = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno + 1; !((*Fts5Index)(unsafe.Pointer(p)).Frc != 0) && pgno <= (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast; pgno++ { + var iAbs I64 = I64((*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B) + I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B) + I64(int64(0))<= (*Fts5Data)(unsafe.Pointer(pNew)).Fnn) + if iRowid != 0 { + { + var tmp uintptr + tmp = pNew + pNew = pLast + pLast = tmp + } + + pgnoLast = pgno + } + fts5DataRelease(tls, pNew) + if bTermless == 0 { + break + } + } + } + } + } + + // If pLast is NULL at this point, then the last rowid for this doclist + // lies on the page currently indicated by the iterator. In this case + // pIter->iLeafOffset is already set to point to the position-list size + // field associated with the first relevant rowid on the page. + // + // Or, if pLast is non-NULL, then it is the page that contains the last + // rowid. In this case configure the iterator so that it points to the + // first rowid on this page. + if pLast != 0 { + var iOff int32 + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pLast + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno = pgnoLast + iOff = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pLast)).Fp)) + if iOff > (*Fts5Data)(unsafe.Pointer(pLast)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return + } + iOff = iOff + int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pLast)).Fp+uintptr(iOff), pIter+104)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff) + + if (*Fts5Data)(unsafe.Pointer(pLast)).FszLeaf >= (*Fts5Data)(unsafe.Pointer(pLast)).Fnn { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer(pLast)).Fnn + 1 + } else { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = fts5LeafFirstTermOff(tls, pLast) + } + } + + fts5SegIterReverseInitPage(tls, p, pIter) +} + +// Iterator pIter currently points to the first rowid of a doclist. +// There is a doclist-index associated with the final term on the current +// page. If the current term is the last term on the page, load the +// doclist-index from disk and initialize an iterator at (pIter->pDlidx). +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ + var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid + var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE + var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data + + // Check if the current doclist ends on this page. If it does, return + // early without loading the doclist-index (as it belongs to a different + // term. + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno == (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno && + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist < (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + return + } + + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx = fts5DlidxIterInit(tls, p, bRev, iSeg, (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno) +} + +// The iterator object passed as the second argument currently contains +// no valid values except for the Fts5SegIter.pLeaf member variable. This +// function searches the leaf page for a term matching (pTerm/nTerm). +// +// If the specified term is found on the page, then the iterator is left +// pointing to it. If argument bGe is zero and the term is not found, +// the iterator is left pointing at EOF. +// +// If bGe is non-zero and the specified term is not found, then the +// iterator is left pointing to the smallest term in the segment that +// is larger than the specified term, even if this term is not on the +// current page. +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + // var iOff U32 at bp+12, 4 + + var a uintptr + var n U32 + var nMatch U32 + // var nKeep U32 at bp+8, 4 + + // var nNew U32 at bp+4, 4 + + // var iTermOff U32 at bp, 4 + + var iPgidx U32 // Current offset in pgidx + var bEndOfPage int32 + var nCmp U32 + var i U32 + // var nExtra int32 at bp+16, 4 + a = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + n = U32((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn) + nMatch = U32(0) + *(*U32)(unsafe.Pointer(bp + 8 /* nKeep */)) = U32(0) + *(*U32)(unsafe.Pointer(bp + 4 /* nNew */)) = U32(0) + bEndOfPage = 0 + + iPgidx = U32((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf) + iPgidx = iPgidx + U32(sqlite3Fts5GetVarint32(tls, a+uintptr(iPgidx), bp)) + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) = *(*U32)(unsafe.Pointer(bp /* iTermOff */)) + if !(*(*U32)(unsafe.Pointer(bp + 12)) > n) { + goto __1 + } + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return +__1: + ; + +__2: + if !(1 != 0) { + goto __3 + } + + /* Figure out how many new bytes are in this term */ + *(*U32)(unsafe.Pointer(bp + 4 /* nNew */)) = U32(*(*U8)(unsafe.Pointer(a + uintptr(libc.PostIncUint32(&*(*U32)(unsafe.Pointer(bp + 12 /* iOff */)), 1))))) + if !(*(*U32)(unsafe.Pointer(bp + 4))&U32(0x80) != 0) { + goto __4 + } + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */))-- + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+4)) +__4: + ; + + if !(*(*U32)(unsafe.Pointer(bp + 8)) < nMatch) { + goto __5 + } + goto search_failed +__5: + ; + + if !(*(*U32)(unsafe.Pointer(bp + 8)) == nMatch) { + goto __6 + } + nCmp = func() uint32 { + if *(*U32)(unsafe.Pointer(bp + 4)) < U32(nTerm)-nMatch { + return *(*U32)(unsafe.Pointer(bp + 4)) + } + return U32(nTerm) - nMatch + }() + i = U32(0) +__7: + if !(i < nCmp) { + goto __9 + } + if !(int32(*(*U8)(unsafe.Pointer(a + uintptr(*(*U32)(unsafe.Pointer(bp + 12))+i)))) != int32(*(*U8)(unsafe.Pointer(pTerm + uintptr(nMatch+i))))) { + goto __10 + } + goto __9 +__10: + ; + goto __8 +__8: + i++ + goto __7 + goto __9 +__9: + ; + nMatch = nMatch + i + + if !(U32(nTerm) == nMatch) { + goto __11 + } + if !(i == *(*U32)(unsafe.Pointer(bp + 4))) { + goto __13 + } + goto search_success + goto __14 +__13: + goto search_failed +__14: + ; + goto __12 +__11: + if !(i < *(*U32)(unsafe.Pointer(bp + 4)) && int32(*(*U8)(unsafe.Pointer(a + uintptr(*(*U32)(unsafe.Pointer(bp + 12))+i)))) > int32(*(*U8)(unsafe.Pointer(pTerm + uintptr(nMatch))))) { + goto __15 + } + goto search_failed +__15: + ; +__12: + ; +__6: + ; + + if !(iPgidx >= n) { + goto __16 + } + bEndOfPage = 1 + goto __3 +__16: + ; + + iPgidx = iPgidx + U32(sqlite3Fts5GetVarint32(tls, a+uintptr(iPgidx), bp+8)) + *(*U32)(unsafe.Pointer(bp /* iTermOff */)) += *(*U32)(unsafe.Pointer(bp + 8 /* nKeep */)) + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) = *(*U32)(unsafe.Pointer(bp /* iTermOff */)) + + if !(*(*U32)(unsafe.Pointer(bp + 12)) >= n) { + goto __17 + } + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return +__17: + ; + + /* Read the nKeep field of the next term. */ + *(*U32)(unsafe.Pointer(bp + 8 /* nKeep */)) = U32(*(*U8)(unsafe.Pointer(a + uintptr(libc.PostIncUint32(&*(*U32)(unsafe.Pointer(bp + 12 /* iOff */)), 1))))) + if !(*(*U32)(unsafe.Pointer(bp + 8))&U32(0x80) != 0) { + goto __18 + } + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */))-- + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+8)) +__18: + ; + + goto __2 +__3: + ; + +search_failed: + if !(bGe == 0) { + goto __19 + } + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) + return + goto __20 +__19: + if !(bEndOfPage != 0) { + goto __21 + } +__22: + fts5SegIterNextPage(tls, p, pIter) + if !((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf == uintptr(0)) { + goto __25 + } + return +__25: + ; + a = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + if !(libc.Bool32((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf >= (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn) == 0) { + goto __26 + } + iPgidx = U32((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf) + iPgidx = iPgidx + U32(sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp+uintptr(iPgidx), bp+12)) + if !(*(*U32)(unsafe.Pointer(bp + 12)) < U32(4) || I64(*(*U32)(unsafe.Pointer(bp + 12))) >= I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf)) { + goto __27 + } + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return + goto __28 +__27: + *(*U32)(unsafe.Pointer(bp + 8 /* nKeep */)) = U32(0) + *(*U32)(unsafe.Pointer(bp /* iTermOff */)) = *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) + n = U32((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn) + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+4)) + goto __24 +__28: + ; +__26: + ; + goto __23 +__23: + if 1 != 0 { + goto __22 + } + goto __24 +__24: + ; +__21: + ; +__20: + ; + +search_success: + if !(I64(*(*U32)(unsafe.Pointer(bp + 12)))+I64(*(*U32)(unsafe.Pointer(bp + 4))) > I64(n) || *(*U32)(unsafe.Pointer(bp + 4)) < U32(1)) { + goto __29 + } + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return +__29: + ; + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*U32)(unsafe.Pointer(bp + 12)) + *(*U32)(unsafe.Pointer(bp + 4))) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno + + sqlite3Fts5BufferSet(tls, p+52, pIter+88, int32(*(*U32)(unsafe.Pointer(bp + 8 /* nKeep */))), pTerm) + sqlite3Fts5BufferAppendBlob(tls, p+52, pIter+88, *(*U32)(unsafe.Pointer(bp + 4 /* nNew */)), a+uintptr(*(*U32)(unsafe.Pointer(bp + 12)))) + + if !(iPgidx >= n) { + goto __30 + } + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn + 1 + goto __31 +__30: + iPgidx = iPgidx + U32(sqlite3Fts5GetVarint32(tls, a+uintptr(iPgidx), bp+16)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = int32(*(*U32)(unsafe.Pointer(bp)) + U32(*(*int32)(unsafe.Pointer(bp + 16)))) +__31: + ; + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff = int32(iPgidx) + + fts5SegIterLoadRowid(tls, p, pIter) + fts5SegIterLoadNPos(tls, p, pIter) +} + +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, + + ts+34810, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) + } + return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect +} + +// Initialize the object pIter to point to term pTerm/nTerm within segment +// pSeg. If there is no such term in the index, the iterator is set to EOF. +// +// If an error occurs, Fts5Index.rc is set to an appropriate error code. If +// an error has already occurred when this function is called, it is a no-op. +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ + var iPg int32 = 1 + var bGe int32 = flags & FTS5INDEX_QUERY_SCAN + var bDlidx int32 = 0 // True if there is a doclist-index + var pIdxSelect uintptr = uintptr(0) + + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5SegIter{}))) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg = pSeg + + // This block sets stack variable iPg to the leaf page number that may + // contain term (pTerm/nTerm), if it is present in the segment. + pIdxSelect = fts5IdxSelectStmt(tls, p) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + return + } + Xsqlite3_bind_int(tls, pIdxSelect, 1, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid) + Xsqlite3_bind_blob(tls, pIdxSelect, 2, pTerm, nTerm, uintptr(0)) + if SQLITE_ROW == Xsqlite3_step(tls, pIdxSelect) { + var val I64 = I64(Xsqlite3_column_int(tls, pIdxSelect, 0)) + iPg = int32(val >> 1) + bDlidx = int32(val & int64(0x0001)) + } + (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, pIdxSelect) + Xsqlite3_bind_null(tls, pIdxSelect, 2) + + if iPg < (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst { + iPg = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst + bDlidx = 0 + } + + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno = iPg - 1 + fts5SegIterNextPage(tls, p, pIter) + + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf != 0 { + fts5LeafSeek(tls, p, bGe, pIter, pTerm, nTerm) + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && bGe == 0 { + *(*int32)(unsafe.Pointer(pIter + 8)) |= FTS5_SEGITER_ONETERM + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf != 0 { + if flags&FTS5INDEX_QUERY_DESC != 0 { + *(*int32)(unsafe.Pointer(pIter + 8)) |= FTS5_SEGITER_REVERSE + } + if bDlidx != 0 { + fts5SegIterLoadDlidx(tls, p, pIter) + } + if flags&FTS5INDEX_QUERY_DESC != 0 { + fts5SegIterReverse(tls, p, pIter) + } + } + } + + fts5SegIterSetNext(tls, p, pIter) + + // Either: + // + // 1) an error has occurred, or + // 2) the iterator points to EOF, or + // 3) the iterator points to an entry with term (pTerm/nTerm), or + // 4) the FTS5INDEX_QUERY_SCAN flag was set and the iterator points + // to an entry with a term greater than or equal to (pTerm/nTerm). + +} + +// Initialize the object pIter to point to term pTerm/nTerm within the +// in-memory hash table. If there is no such term in the hash-table, the +// iterator is set to EOF. +// +// If an error occurs, Fts5Index.rc is set to an appropriate error code. If +// an error has already occurred when this function is called, it is a no-op. +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + *(*int32)(unsafe.Pointer(bp + 16 /* nList */)) = 0 + *(*uintptr)(unsafe.Pointer(bp /* z */)) = uintptr(0) + var n int32 = 0 + *(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)) = uintptr(0) + + if pTerm == uintptr(0) || flags&FTS5INDEX_QUERY_SCAN != 0 { + *(*uintptr)(unsafe.Pointer(bp + 8 /* pList */)) = uintptr(0) + + (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5HashScanInit(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, pTerm, nTerm) + sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp, bp+8, bp+16) + n = func() int32 { + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + return int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp)))) + } + return 0 + }() + if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)) = fts5IdxMalloc(tls, p, int64(unsafe.Sizeof(Fts5Data{}))) + if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { + (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fp = *(*uintptr)(unsafe.Pointer(bp + 8 /* pList */)) + } + } + } else { + (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5HashQuery(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, int32(unsafe.Sizeof(Fts5Data{})), + pTerm, nTerm, bp+24, bp+16) + if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { + (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fp = *(*uintptr)(unsafe.Pointer(bp + 24)) + 1*16 + } + *(*uintptr)(unsafe.Pointer(bp /* z */)) = pTerm + n = nTerm + *(*int32)(unsafe.Pointer(pIter + 8)) |= FTS5_SEGITER_ONETERM + } + + if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { + sqlite3Fts5BufferSet(tls, p+52, pIter+88, n, *(*uintptr)(unsafe.Pointer(bp /* z */))) + (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fnn = libc.AssignPtrInt32(*(*uintptr)(unsafe.Pointer(bp + 24))+12, *(*int32)(unsafe.Pointer(bp + 16 /* nList */))) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = *(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fp, pIter+104)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fnn + + if flags&FTS5INDEX_QUERY_DESC != 0 { + *(*int32)(unsafe.Pointer(pIter + 8)) |= FTS5_SEGITER_REVERSE + fts5SegIterReverseInitPage(tls, p, pIter) + } else { + fts5SegIterLoadNPos(tls, p, pIter) + } + } + + fts5SegIterSetNext(tls, p, pIter) +} + +// Zero the iterator passed as the only argument. +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ + sqlite3Fts5BufferFree(tls, pIter+88) + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) + fts5DlidxIterFree(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx) + Xsqlite3_free(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset) + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5SegIter{}))) +} + +// Do the comparison necessary to populate pIter->aFirst[iOut]. +// +// If the returned value is non-zero, then it is the index of an entry +// in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing +// to a key that is a duplicate of another, higher priority, +// segment-iterator in the pSeg->aSeg[] array. +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ + var i1 int32 // Index of left-hand Fts5SegIter + var i2 int32 // Index of right-hand Fts5SegIter + var iRes int32 + var p1 uintptr // Left-hand Fts5SegIter + var p2 uintptr // Right-hand Fts5SegIter + var pRes uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst + uintptr(iOut)*4 + + if iOut >= (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg/2 { + i1 = (iOut - (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg/2) * 2 + i2 = i1 + 1 + } else { + i1 = int32((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst + uintptr(iOut*2)*4)).FiFirst) + i2 = int32((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst + uintptr(iOut*2+1)*4)).FiFirst) + } + p1 = pIter + 96 + uintptr(i1)*120 + p2 = pIter + 96 + uintptr(i2)*120 + + (*Fts5CResult)(unsafe.Pointer(pRes)).FbTermEq = U8(0) + if (*Fts5SegIter)(unsafe.Pointer(p1)).FpLeaf == uintptr(0) { // If p1 is at EOF + iRes = i2 + } else if (*Fts5SegIter)(unsafe.Pointer(p2)).FpLeaf == uintptr(0) { // If p2 is at EOF + iRes = i1 + } else { + var res int32 = fts5BufferCompare(tls, p1+88, p2+88) + if res == 0 { + + (*Fts5CResult)(unsafe.Pointer(pRes)).FbTermEq = U8(1) + if (*Fts5SegIter)(unsafe.Pointer(p1)).FiRowid == (*Fts5SegIter)(unsafe.Pointer(p2)).FiRowid { + (*Fts5SegIter)(unsafe.Pointer(p1)).FbDel = (*Fts5SegIter)(unsafe.Pointer(p2)).FbDel + return i2 + } + if libc.Bool32((*Fts5SegIter)(unsafe.Pointer(p1)).FiRowid > (*Fts5SegIter)(unsafe.Pointer(p2)).FiRowid) == (*Fts5Iter)(unsafe.Pointer(pIter)).FbRev { + res = -1 + } else { + res = +1 + } + } + + if res < 0 { + iRes = i1 + } else { + iRes = i2 + } + } + + (*Fts5CResult)(unsafe.Pointer(pRes)).FiFirst = U16(iRes) + return 0 +} + +// Move the seg-iter so that it points to the first rowid on page iLeafPgno. +// It is an error if leaf iLeafPgno does not exist or contains no rowids. +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ + + if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf = uintptr(0) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno = iLeafPgno - 1 + fts5SegIterNextPage(tls, p, pIter) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf != uintptr(0) { + var iOff int32 + var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + var n int32 = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf + + iOff = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp)) + if iOff < 4 || iOff >= n { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + iOff = iOff + int32(sqlite3Fts5GetVarint(tls, a+uintptr(iOff), pIter+104)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff) + fts5SegIterLoadNPos(tls, p, pIter) + } + } + } +} + +// Advance the iterator passed as the second argument until it is at or +// past rowid iFrom. Regardless of the value of iFrom, the iterator is +// always advanced at least once. +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ + var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE + var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx + var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno + var bMove int32 = 1 + + if bRev == 0 { + for !(fts5DlidxIterEof(tls, p, pDlidx) != 0) && iMatch > fts5DlidxIterRowid(tls, pDlidx) { + iLeafPgno = fts5DlidxIterPgno(tls, pDlidx) + fts5DlidxIterNext(tls, p, pDlidx) + } + + if iLeafPgno > (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno { + fts5SegIterGotoPage(tls, p, pIter, iLeafPgno) + bMove = 0 + } + } else { + + for !(fts5DlidxIterEof(tls, p, pDlidx) != 0) && iMatch < fts5DlidxIterRowid(tls, pDlidx) { + fts5DlidxIterPrev(tls, p, pDlidx) + } + iLeafPgno = fts5DlidxIterPgno(tls, pDlidx) + + if iLeafPgno < (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno = iLeafPgno + 1 + fts5SegIterReverseNewPage(tls, p, pIter) + bMove = 0 + } + } + + for __ccgo := true; __ccgo; __ccgo = (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if bMove != 0 && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext})).f(tls, p, pIter, uintptr(0)) + } + if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf == uintptr(0) { + break + } + if bRev == 0 && (*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowid >= iMatch { + break + } + if bRev != 0 && (*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowid <= iMatch { + break + } + bMove = 1 + } +} + +// Free the iterator object passed as the second argument. +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ + if pIter != 0 { + var i int32 + for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { + fts5SegIterClear(tls, pIter+96+uintptr(i)*120) + } + sqlite3Fts5BufferFree(tls, pIter+32) + Xsqlite3_free(tls, pIter) + } +} + +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ + var i int32 + for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { + var iEq int32 + if libc.AssignInt32(&iEq, fts5MultiIterDoCompare(tls, pIter, i)) != 0 { + var pSeg uintptr = pIter + 96 + uintptr(iEq)*120 + + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(pSeg)).FxNext})).f(tls, p, pSeg, uintptr(0)) + i = (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iEq + } + } +} + +// Sub-iterator iChanged of iterator pIter has just been advanced. It still +// points to the same term though - just a different rowid. This function +// attempts to update the contents of the pIter->aFirst[] accordingly. +// If it does so successfully, 0 is returned. Otherwise 1. +// +// If non-zero is returned, the caller should call fts5MultiIterAdvanced() +// on the iterator instead. That function does the same as this one, except +// that it deals with more complicated cases as well. +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ + var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 + + if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || + libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid < (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid) == (*Fts5Iter)(unsafe.Pointer(pIter)).FbRev { + var i int32 + var pOther uintptr = pIter + 96 + uintptr(iChanged^0x0001)*120 + (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = func() int64 { + if (*Fts5Iter)(unsafe.Pointer(pIter)).FbRev != 0 { + return int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) + } + return int64(0xffffffff) | I64(int64(0x7fffffff))<<32 + }() + for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; 1 != 0; i = i / 2 { + var pRes uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst + uintptr(i)*4 + + if (*Fts5CResult)(unsafe.Pointer(pRes)).FbTermEq != 0 { + if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5SegIter)(unsafe.Pointer(pOther)).FiRowid { + return 1 + } else if libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pOther)).FiRowid > (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid) == (*Fts5Iter)(unsafe.Pointer(pIter)).FbRev { + (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pOther)).FiRowid + pNew = pOther + } else if libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pOther)).FiRowid > (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid) == (*Fts5Iter)(unsafe.Pointer(pIter)).FbRev { + (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pOther)).FiRowid + } + } + (*Fts5CResult)(unsafe.Pointer(pRes)).FiFirst = U16(int64((pNew - (pIter + 96)) / 120)) + if i == 1 { + break + } + + pOther = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+uintptr(i^0x0001)*4)).FiFirst)*120 + } + } + + *(*uintptr)(unsafe.Pointer(ppFirst)) = pNew + return 0 +} + +// Set the pIter->bEof variable based on the state of the sub-iterators. +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ + var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) + (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid +} + +// Move the iterator to the next entry. +// +// If an error occurs, an error code is left in Fts5Index.rc. It is not +// considered an error if the iterator reaches EOF, or if it is already at +// EOF when this function is called. +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var bUseFrom int32 = bFrom + + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var iFirst int32 = int32((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst + 1*4)).FiFirst) + *(*int32)(unsafe.Pointer(bp /* bNewTerm */)) = 0 + *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)) = pIter + 96 + uintptr(iFirst)*120 + + if bUseFrom != 0 && (*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FpDlidx != 0 { + fts5SegIterNextFrom(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), iFrom) + } else { + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FxNext})).f(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), bp /* &bNewTerm */) + } + + if (*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FpLeaf == uintptr(0) || *(*int32)(unsafe.Pointer(bp)) != 0 || + fts5MultiIterAdvanceRowid(tls, pIter, iFirst, bp+8) != 0 { + fts5MultiIterAdvanced(tls, p, pIter, iFirst, 1) + fts5MultiIterSetEof(tls, pIter) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)) = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 + if (*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FpLeaf == uintptr(0) { + return + } + } + + if int32((*Fts5Iter)(unsafe.Pointer(pIter)).FbSkipEmpty) == 0 || (*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FnPos != 0 { + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs})).f(tls, pIter, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */))) + return + } + bUseFrom = 0 + } +} + +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + *(*int32)(unsafe.Pointer(pbNewTerm)) = 0 + for __ccgo := true; __ccgo; __ccgo = fts5MultiIterIsEmpty(tls, p, pIter) != 0 { + var iFirst int32 = int32((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst + 1*4)).FiFirst) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)) = pIter + 96 + uintptr(iFirst)*120 + *(*int32)(unsafe.Pointer(bp /* bNewTerm */)) = 0 + + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FxNext})).f(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), bp /* &bNewTerm */) + if (*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FpLeaf == uintptr(0) || *(*int32)(unsafe.Pointer(bp)) != 0 || + fts5MultiIterAdvanceRowid(tls, pIter, iFirst, bp+8) != 0 { + fts5MultiIterAdvanced(tls, p, pIter, iFirst, 1) + fts5MultiIterSetEof(tls, pIter) + *(*int32)(unsafe.Pointer(pbNewTerm)) = 1 + } + + } + } +} + +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ + _ = pUnused1 + _ = pUnused2 +} + +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ + var pNew uintptr + var nSlot int32 // Power of two >= nSeg + + for nSlot = 2; nSlot < nSeg; nSlot = nSlot * 2 { + } + pNew = fts5IdxMalloc(tls, p, + int64(uint64(unsafe.Sizeof(Fts5Iter{}))+uint64(unsafe.Sizeof(Fts5SegIter{}))*uint64(nSlot-1)+uint64(unsafe.Sizeof(Fts5CResult{}))*uint64(nSlot))) + if pNew != 0 { + (*Fts5Iter)(unsafe.Pointer(pNew)).FnSeg = nSlot + (*Fts5Iter)(unsafe.Pointer(pNew)).FaFirst = pNew + 96 + uintptr(nSlot)*120 + (*Fts5Iter)(unsafe.Pointer(pNew)).FpIndex = p + (*Fts5Iter)(unsafe.Pointer(pNew)).FxSetOutputs = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{fts5IterSetOutputs_Noop})) + } + return pNew +} + +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ + _ = pUnused + + if nChunk > 0 { + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(pContext)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pContext)).Fn), pChunk, uint64(nChunk)) + *(*int32)(unsafe.Pointer(pContext + 8)) += nChunk + } + + } +} + +type PoslistCallbackCtx1 = struct { + FpBuf uintptr + FpColset uintptr + FeState int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:227781:9 */ + +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ + +type PoslistOffsetsCtx1 = struct { + FpBuf uintptr + FpColset uintptr + FiRead int32 + FiWrite int32 +} /* sqlite3.c:227788:9 */ + +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ + +// TODO: Make this more efficient! +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ + var i int32 + for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { + if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { + return 1 + } + } + return 0 +} + +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pCtx uintptr = pContext + _ = pUnused + + if nChunk > 0 { + var i int32 = 0 + for i < nChunk { + // var iVal int32 at bp, 4 + + i = i + sqlite3Fts5GetVarint32(tls, pChunk+uintptr(i), bp) + *(*int32)(unsafe.Pointer(bp /* iVal */)) += (*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FiRead - 2 + (*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FiRead = *(*int32)(unsafe.Pointer(bp /* iVal */)) + if fts5IndexColsetTest(tls, (*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FpColset, *(*int32)(unsafe.Pointer(bp))) != 0 { + { + *(*int32)(unsafe.Pointer((*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FpBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer((*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer((*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fn), uint64(*(*int32)(unsafe.Pointer(bp))+2-(*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FiWrite)) + } + + (*PoslistOffsetsCtx)(unsafe.Pointer(pCtx)).FiWrite = *(*int32)(unsafe.Pointer(bp /* iVal */)) + } + } + } +} + +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pCtx uintptr = pContext + _ = pUnused + + if nChunk > 0 { + // Search through to find the first varint with value 1. This is the + // start of the next columns hits. + var i int32 = 0 + var iStart int32 = 0 + + if (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FeState == 2 { + // var iCol int32 at bp, 4 + + { + *(*int32)(unsafe.Pointer(bp /* iCol */)) = int32(*(*U8)(unsafe.Pointer(pChunk + uintptr(libc.PostIncInt32(&i, 1))))) + if *(*int32)(unsafe.Pointer(bp))&0x80 != 0 { + i-- + i = i + sqlite3Fts5GetVarint32(tls, pChunk+uintptr(i), bp) + } + } + + if fts5IndexColsetTest(tls, (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpColset, *(*int32)(unsafe.Pointer(bp))) != 0 { + (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FeState = 1 + { + *(*int32)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fn), uint64(1)) + } + + } else { + (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FeState = 0 + } + } + + for __ccgo := true; __ccgo; __ccgo = i < nChunk { + for i < nChunk && int32(*(*U8)(unsafe.Pointer(pChunk + uintptr(i)))) != 0x01 { + for int32(*(*U8)(unsafe.Pointer(pChunk + uintptr(i))))&0x80 != 0 { + i++ + } + i++ + } + if (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FeState != 0 { + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fn), pChunk+uintptr(iStart), uint64(i-iStart)) + *(*int32)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf + 8)) += i - iStart + } + + } + if i < nChunk { + // var iCol int32 at bp+4, 4 + + iStart = i + i++ + if i >= nChunk { + (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FeState = 2 + } else { + { + *(*int32)(unsafe.Pointer(bp + 4 /* iCol */)) = int32(*(*U8)(unsafe.Pointer(pChunk + uintptr(libc.PostIncInt32(&i, 1))))) + if *(*int32)(unsafe.Pointer(bp + 4))&0x80 != 0 { + i-- + i = i + sqlite3Fts5GetVarint32(tls, pChunk+uintptr(i), bp+4) + } + } + + (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FeState = fts5IndexColsetTest(tls, (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpColset, *(*int32)(unsafe.Pointer(bp + 4 /* iCol */))) + if (*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FeState != 0 { + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf)).Fn), pChunk+uintptr(iStart), uint64(i-iStart)) + *(*int32)(unsafe.Pointer((*PoslistCallbackCtx)(unsafe.Pointer(pCtx)).FpBuf + 8)) += i - iStart + } + + iStart = i + } + } + } + } + } +} + +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ + var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come + var pData uintptr = uintptr(0) + var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) + var nChunk int32 = func() int32 { + if I64(nRem) < I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf)-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset { + return nRem + } + return int32(I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) - (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) + }() + var pgno int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafPgno + var pgnoSave int32 = 0 + + // This function does not work with detail=none databases. + + if (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fflags&FTS5_SEGITER_REVERSE == 0 { + pgnoSave = pgno + 1 + } + + for 1 != 0 { + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32) + })(unsafe.Pointer(&struct{ uintptr }{xChunk})).f(tls, p, pCtx, pChunk, nChunk) + nRem = nRem - nChunk + fts5DataRelease(tls, pData) + if nRem <= 0 { + break + } else if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg == uintptr(0) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + return + } else { + pgno++ + pData = fts5LeafRead(tls, p, I64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(int64(0))<base.pData/nData to point to the new position list. +// If memory is required for the new position list, use buffer pIter->poslist. +// Or, if the new position list is a contiguous subset of the input, set +// pIter->base.pData/nData to point directly to it. +// +// This function is a no-op if *pRc is other than SQLITE_OK when it is +// called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM +// before returning. +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var p uintptr = pPos + var aCopy uintptr = p + var pEnd uintptr = p + uintptr(nPos) // One byte past end of position list + var i int32 = 0 + *(*int32)(unsafe.Pointer(bp /* iCurrent */)) = 0 + + if (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol > 1 && sqlite3Fts5BufferSize(tls, pRc, pIter+32, uint32(nPos)) != 0 { + return + } + + for 1 != 0 { + for *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) < *(*int32)(unsafe.Pointer(bp)) { + i++ + if i == (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol { + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fn + return + } + } + + // Advance pointer p until it points to pEnd or an 0x01 byte that is + // not part of a varint + for p < pEnd && int32(*(*U8)(unsafe.Pointer(p))) != 0x01 { + for int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))))&0x80 != 0 { + } + } + + if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == *(*int32)(unsafe.Pointer(bp)) { + if (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol == 1 { + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = aCopy + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = int32((int64(p) - int64(aCopy)) / 1) + return + } + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(pIter+32)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pIter+32)).Fn), aCopy, uint64((int64(p)-int64(aCopy))/1)) + *(*int32)(unsafe.Pointer(pIter + 32 + 8)) += int32((int64(p) - int64(aCopy)) / 1) + } + + } + if p >= pEnd { + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fn + return + } + aCopy = libc.PostIncUintptr(&p, 1) + *(*int32)(unsafe.Pointer(bp /* iCurrent */)) = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))) + if *(*int32)(unsafe.Pointer(bp))&0x80 != 0 { + p-- + p += uintptr(sqlite3Fts5GetVarint32(tls, p, bp)) + } + } + } + +} + +// xSetOutputs callback used by detail=none tables. +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ + + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos +} + +// xSetOutputs callback used by detail=full and detail=col tables when no +// column filters are specified. +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos + + if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset+I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos) <= I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) { + // All data is stored on the current page. Populate the output + // variables to point into the body of the page object. + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) + } else { + // The data is distributed over two or more pages. Copy it into the + // Fts5Iter.poslist buffer and then set the output pointer to point + // to this buffer. + sqlite3Fts5BufferZero(tls, pIter+32) + fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, uintptr(0), pIter+32) + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp + } +} + +// xSetOutputs callback used when the Fts5Colset object has nCol==0 (match +// against no columns at all). +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ + _ = pSeg + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 +} + +// xSetOutputs callback used by detail=col when there is a column filter +// and there are 100 or more columns. Also called as a fallback from +// fts5IterSetOutputs_Col100 if the column-list spans more than one page. +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ + sqlite3Fts5BufferZero(tls, pIter+32) + fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fn +} + +// xSetOutputs callback used when: +// +// * detail=col, +// * there is a column filter, and +// * the table contains 100 or fewer columns. +// +// The last point is to ensure all column numbers are stored as +// single-byte varints. +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ + var a uintptr + var pEnd uintptr + var iPrev int32 + var aiCol uintptr + var aiColEnd uintptr + var aOut uintptr + var iPrevOut int32 + + if !((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset+I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos) > I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf)) { + goto __1 + } + fts5IterSetOutputs_Col(tls, pIter, pSeg) + goto __2 +__1: + a = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) + pEnd = a + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos) + iPrev = 0 + aiCol = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset + 4 /* &.aiCol */ + aiColEnd = aiCol + uintptr((*Fts5Colset)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpColset)).FnCol)*4 + aOut = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp + iPrevOut = 0 + + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid + +__3: + if !(a < pEnd) { + goto __4 + } + iPrev = iPrev + (int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1)))) - 2) +__5: + if !(*(*int32)(unsafe.Pointer(aiCol)) < iPrev) { + goto __6 + } + aiCol += 4 + if !(aiCol == aiColEnd) { + goto __7 + } + goto setoutputs_col_out +__7: + ; + goto __5 +__6: + ; + if !(*(*int32)(unsafe.Pointer(aiCol)) == iPrev) { + goto __8 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aOut, 1))) = U8(iPrev - iPrevOut + 2) + iPrevOut = iPrev +__8: + ; + goto __3 +__4: + ; + +setoutputs_col_out: + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = int32((int64(aOut) - int64((*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp)) / 1) +__2: +} + +// xSetOutputs callback used by detail=full when there is a column filter. +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ + var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid + + if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset+I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos) <= I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) { + // All data is stored on the current page. Populate the output + // variables to point into the body of the page object. + var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) + var pRc uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex + 52 + sqlite3Fts5BufferZero(tls, pIter+32) + fts5IndexExtractColset(tls, pRc, pColset, a, (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos, pIter) + } else { + // The data is distributed over two or more pages. Copy it into the + // Fts5Iter.poslist buffer and then set the output pointer to point + // to this buffer. + sqlite3Fts5BufferZero(tls, pIter+32) + fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, pColset, pIter+32) + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fn + } +} + +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ + + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_NONE { + (*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{fts5IterSetOutputs_None})) + } else if (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset == uintptr(0) { + (*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{fts5IterSetOutputs_Nocolset})) + } else if (*Fts5Colset)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpColset)).FnCol == 0 { + (*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{fts5IterSetOutputs_ZeroColset})) + } else if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_FULL { + (*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{fts5IterSetOutputs_Full})) + } else { + + if (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol <= 100 { + (*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{fts5IterSetOutputs_Col100})) + sqlite3Fts5BufferSize(tls, pRc, pIter+32, uint32((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)) + } else { + (*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{fts5IterSetOutputs_Col})) + } + } + } +} + +// Allocate a new Fts5Iter object. +// +// The new object will be used to iterate through data in structure pStruct. +// If iLevel is -ve, then all data in all segments is merged. Or, if iLevel +// is zero or greater, data from the first nSegment segments on level iLevel +// is merged. +// +// The iterator initially points to the first term/rowid entry in the +// iterated data. +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ + var nSeg int32 // Number of segment-iters in use + var iIter int32 // + var iSeg int32 // Used to iterate through segments + var pLvl uintptr + var pNew uintptr + // Add a segment iterator for the current contents of the hash table. + var pIter uintptr + var pSeg uintptr + var pIter1 uintptr + var pEnd uintptr + var pSeg1 uintptr + var iEq int32 + var pSeg2 uintptr + nSeg = 0 + iIter = 0 + + // Allocate space for the new multi-seg-iterator. + if !((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __1 + } + if !(iLevel < 0) { + goto __2 + } + + nSeg = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment + nSeg = nSeg + func() int32 { + if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { + return 1 + } + return 0 + }() + goto __3 +__2: + nSeg = func() int32 { + if (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(iLevel)*16)).FnSeg < nSegment { + return (*Fts5StructureLevel)(unsafe.Pointer(pStruct + 24 + uintptr(iLevel)*16)).FnSeg + } + return nSegment + }() +__3: + ; +__1: + ; + *(*uintptr)(unsafe.Pointer(ppOut)) = libc.AssignUintptr(&pNew, fts5MultiIterAlloc(tls, p, nSeg)) + if !(pNew == uintptr(0)) { + goto __4 + } + + goto fts5MultiIterNew_post_check +__4: + ; + (*Fts5Iter)(unsafe.Pointer(pNew)).FbRev = libc.Bool32(0 != flags&FTS5INDEX_QUERY_DESC) + (*Fts5Iter)(unsafe.Pointer(pNew)).FbSkipEmpty = U8(libc.Bool32(0 != flags&FTS5INDEX_QUERY_SKIPEMPTY)) + (*Fts5Iter)(unsafe.Pointer(pNew)).FpColset = pColset + if !(flags&FTS5INDEX_QUERY_NOOUTPUT == 0) { + goto __5 + } + fts5IterSetOutputCb(tls, p+52, pNew) +__5: + ; + + // Initialize each of the component segment iterators. + if !((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __6 + } + if !(iLevel < 0) { + goto __7 + } + pEnd = pStruct + 24 + uintptr((*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel)*16 + if !((*Fts5Index)(unsafe.Pointer(p)).FpHash != 0) { + goto __9 + } + // Add a segment iterator for the current contents of the hash table. + pIter = pNew + 96 + uintptr(libc.PostIncInt32(&iIter, 1))*120 + fts5SegIterHashInit(tls, p, pTerm, nTerm, flags, pIter) +__9: + ; + pLvl = pStruct + 24 +__10: + if !(pLvl < pEnd) { + goto __12 + } + iSeg = (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg - 1 +__13: + if !(iSeg >= 0) { + goto __15 + } + pSeg = (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg + uintptr(iSeg)*12 + pIter1 = pNew + 96 + uintptr(libc.PostIncInt32(&iIter, 1))*120 + if !(pTerm == uintptr(0)) { + goto __16 + } + fts5SegIterInit(tls, p, pSeg, pIter1) + goto __17 +__16: + fts5SegIterSeekInit(tls, p, pTerm, nTerm, flags, pSeg, pIter1) +__17: + ; + goto __14 +__14: + iSeg-- + goto __13 + goto __15 +__15: + ; + goto __11 +__11: + pLvl += 16 + goto __10 + goto __12 +__12: + ; + goto __8 +__7: + pLvl = pStruct + 24 + uintptr(iLevel)*16 + iSeg = nSeg - 1 +__18: + if !(iSeg >= 0) { + goto __20 + } + fts5SegIterInit(tls, p, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12, pNew+96+uintptr(libc.PostIncInt32(&iIter, 1))*120) + goto __19 +__19: + iSeg-- + goto __18 + goto __20 +__20: + ; +__8: + ; + +__6: + ; + + // If the above was successful, each component iterators now points + // to the first entry in its segment. In this case initialize the + // aFirst[] array. Or, if an error has occurred, free the iterator + // object and set the output variable to NULL. + if !((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __21 + } + iIter = (*Fts5Iter)(unsafe.Pointer(pNew)).FnSeg - 1 +__23: + if !(iIter > 0) { + goto __25 + } + if !(libc.AssignInt32(&iEq, fts5MultiIterDoCompare(tls, pNew, iIter)) != 0) { + goto __26 + } + pSeg1 = pNew + 96 + uintptr(iEq)*120 + if !((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) { + goto __27 + } + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(pSeg1)).FxNext})).f(tls, p, pSeg1, uintptr(0)) +__27: + ; + fts5MultiIterAdvanced(tls, p, pNew, iEq, iIter) +__26: + ; + goto __24 +__24: + iIter-- + goto __23 + goto __25 +__25: + ; + fts5MultiIterSetEof(tls, pNew) + + if !((*Fts5Iter)(unsafe.Pointer(pNew)).FbSkipEmpty != 0 && fts5MultiIterIsEmpty(tls, p, pNew) != 0) { + goto __28 + } + fts5MultiIterNext(tls, p, pNew, 0, int64(0)) + goto __29 +__28: + if !(int32((*Fts5Iter)(unsafe.Pointer(pNew)).Fbase.FbEof) == 0) { + goto __30 + } + pSeg2 = pNew + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pNew)).FaFirst+1*4)).FiFirst)*120 + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(pNew)).FxSetOutputs})).f(tls, pNew, pSeg2) +__30: + ; +__29: + ; + + goto __22 +__21: + fts5MultiIterFree(tls, pNew) + *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) +__22: + ; + +fts5MultiIterNew_post_check: + ; + return +} + +// Create an Fts5Iter that iterates through the doclist provided +// as the second argument. +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ + var pNew uintptr + pNew = fts5MultiIterAlloc(tls, p, 2) + if pNew != 0 { + var pIter uintptr = pNew + 96 + 1*120 + + (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags = FTS5_SEGITER_ONETERM + if (*Fts5Data)(unsafe.Pointer(pData)).FszLeaf > 0 { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pData + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp, pIter+104)) + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer(pData)).Fnn + (*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pNew)).FaFirst + 1*4)).FiFirst = U16(1) + if bDesc != 0 { + (*Fts5Iter)(unsafe.Pointer(pNew)).FbRev = 1 + *(*int32)(unsafe.Pointer(pIter + 8)) |= FTS5_SEGITER_REVERSE + fts5SegIterReverseInitPage(tls, p, pIter) + } else { + fts5SegIterLoadNPos(tls, p, pIter) + } + pData = uintptr(0) + } else { + (*Fts5Iter)(unsafe.Pointer(pNew)).Fbase.FbEof = U8(1) + } + fts5SegIterSetNext(tls, p, pIter) + + *(*uintptr)(unsafe.Pointer(ppOut)) = pNew + } + + fts5DataRelease(tls, pData) +} + +// Return true if the iterator is at EOF or if an error has occurred. +// False otherwise. +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ + + return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) +} + +// Return the rowid of the entry that the iterator currently points +// to. If the iterator points to EOF when this function is called the +// results are undefined. +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ + + return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid +} + +// Move the iterator to the next entry at or following iMatch. +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ + for 1 != 0 { + var iRowid I64 + fts5MultiIterNext(tls, p, pIter, 1, iMatch) + if fts5MultiIterEof(tls, p, pIter) != 0 { + break + } + iRowid = fts5MultiIterRowid(tls, pIter) + if (*Fts5Iter)(unsafe.Pointer(pIter)).FbRev == 0 && iRowid >= iMatch { + break + } + if (*Fts5Iter)(unsafe.Pointer(pIter)).FbRev != 0 && iRowid <= iMatch { + break + } + } +} + +// Return a pointer to a buffer containing the term associated with the +// entry that the iterator currently points to. +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ + var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 + *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn + return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp +} + +// Allocate a new segment-id for the structure pStruct. The new segment +// id must be between 1 and 65335 inclusive, and must not be used by +// any currently existing segment. If a free segment id cannot be found, +// SQLITE_FULL is returned. +// +// If an error has already occurred, this function is a no-op. 0 is +// returned in this case. +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ + bp := tls.Alloc(252) + defer tls.Free(252) + + var iSegid int32 = 0 + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + if (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment >= FTS5_MAX_SEGMENT { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_FULL + } else { + // FTS5_MAX_SEGMENT is currently defined as 2000. So the following + // array is 63 elements, or 252 bytes, in size. + // var aUsed [63]U32 at bp, 252 + + var iLvl int32 + var iSeg int32 + var i int32 + var mask U32 + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([63]U32{}))) + for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { + for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24 /* &.aLevel */ +uintptr(iLvl)*16)).FnSeg; iSeg++ { + var iId int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(iLvl)*16)).FaSeg + uintptr(iSeg)*12)).FiSegid + if iId <= FTS5_MAX_SEGMENT && iId > 0 { + *(*U32)(unsafe.Pointer(bp + uintptr((iId-1)/32)*4)) |= U32(U32(1)) << ((iId - 1) % 32) + } + } + } + + for i = 0; *(*U32)(unsafe.Pointer(bp /* &aUsed[0] */ + uintptr(i)*4)) == 0xFFFFFFFF; i++ { + } + mask = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) + for iSegid = 0; mask&(U32(U32(1))<) shares with buffer (pOld/nOld). +// +// Buffer (pNew/) is guaranteed to be greater +// than buffer (pOld/nOld). +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ + var i int32 + for i = 0; i < nOld; i++ { + if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { + break + } + } + return i +} + +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ + var i int32 + + for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { + var pDlidx uintptr = (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx + uintptr(i)*32 + if (*Fts5DlidxWriter)(unsafe.Pointer(pDlidx)).Fbuf.Fn == 0 { + break + } + if bFlush != 0 { + + fts5DataWrite(tls, p, + I64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(1))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(i)<aDlidx[] array to at least nLvl elements in size. +// Any new array elements are zeroed before returning. +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { + var aDlidx uintptr = Xsqlite3_realloc64(tls, + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) + if aDlidx == uintptr(0) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM + } else { + var nByte Size_t = uint64(unsafe.Sizeof(Fts5DlidxWriter{})) * uint64(nLvl-(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx) + libc.Xmemset(tls, aDlidx+uintptr((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx)*32, 0, nByte) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx = aDlidx + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx = nLvl + } + } + return (*Fts5Index)(unsafe.Pointer(p)).Frc +} + +// If the current doclist-index accumulating in pWriter->aDlidx[] is large +// enough, flush it to disk and return 1. Otherwise discard it and return +// zero. +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ + var bFlag int32 = 0 + + // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written + // to the database, also write the doclist-index to disk. + if (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 && (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty >= FTS5_MIN_DLIDX_SIZE { + bFlag = 1 + } + fts5WriteDlidxClear(tls, p, pWriter, bFlag) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty = 0 + return bFlag +} + +// This function is called whenever processing of the doclist for the +// last term on leaf page (pWriter->iBtPage) is completed. +// +// The doclist-index for that term is currently stored in-memory within the +// Fts5SegWriter.aDlidx[] array. If it is large enough, this function +// writes it out to disk. Or, if it is too small to bother with, discards +// it. +// +// Fts5SegWriter.btterm currently contains the first term on page iBtPage. +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ + var bFlag int32 + + if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { + return + } + bFlag = fts5WriteFlushDlidx(tls, p, pWriter) + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var z uintptr = func() uintptr { + if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { + return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp + } + return ts + 1525 + }() + // The following was already done in fts5WriteInit(): + // sqlite3_bind_int(p->pIdxWriter, 1, pWriter->iSegid); + Xsqlite3_bind_blob(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2, z, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn, uintptr(0)) + Xsqlite3_bind_int64(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 3, I64(bFlag)+I64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage)<<1) + Xsqlite3_step(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter) + (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter) + Xsqlite3_bind_null(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 2) + } + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage = 0 +} + +// This is called once for each leaf page except the first that contains +// at least one term. Argument (nTerm/pTerm) is the split-key - a term that +// is larger than all terms written to earlier leaves, and equal to or +// smaller than the first term on the new leaf. +// +// If an error occurs, an error code is left in Fts5Index.rc. If an error +// has already occurred when this function is called, it is a no-op. +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ + fts5WriteFlushBtree(tls, p, pWriter) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage = (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fwriter.Fpgno + } +} + +// This function is called when flushing a leaf page that contains no +// terms at all to disk. +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ + // If there were no rowids on the leaf page either and the doclist-index + // has already been started, append an 0x00 byte to it. + if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { + var pDlidx uintptr = (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx + + sqlite3Fts5BufferAppendVarint(tls, p+52, pDlidx+16, int64(0)) + } + + // Increment the "number of sequential leaves without a term" counter. + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ +} + +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var iRowid I64 at bp, 8 + + var iOff int32 + + iOff = 1 + int32(sqlite3Fts5GetVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+1, bp)) + sqlite3Fts5GetVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr(iOff), bp) + return *(*I64)(unsafe.Pointer(bp /* iRowid */)) +} + +// Rowid iRowid has just been appended to the current leaf page. It is the +// first on the page. This function appends an appropriate entry to the current +// doclist-index. +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ + var i int32 + var bDone int32 = 0 + + for i = 0; (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && bDone == 0; i++ { + var iVal I64 + var pDlidx uintptr = (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx + uintptr(i)*32 + + if (*Fts5DlidxWriter)(unsafe.Pointer(pDlidx)).Fbuf.Fn >= (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz { + // The current doclist-index page is full. Write it to disk and push + // a copy of iRowid (which will become the first rowid on the next + // doclist-index leaf page) up into the next level of the b-tree + // hierarchy. If the node being flushed is currently the root node, + // also push its first rowid upwards. + *(*U8)(unsafe.Pointer((*Fts5DlidxWriter)(unsafe.Pointer(pDlidx)).Fbuf.Fp)) = U8(0x01) // Not the root node + fts5DataWrite(tls, p, + I64((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(1))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(i)<= (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz { + if (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fn > 4 { + fts5WriteFlushLeaf(tls, p, pWriter) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return + } + } + if !(U32((*Fts5Buffer)(unsafe.Pointer(pPage+8)).Fn)+U32(nTerm+FTS5_DATA_PADDING) <= U32((*Fts5Buffer)(unsafe.Pointer(pPage+8)).FnSpace)) { + sqlite3Fts5BufferSize(tls, p+52, pPage+8, uint32(nTerm+FTS5_DATA_PADDING+(*Fts5Buffer)(unsafe.Pointer(pPage+8)).Fn)) + } + } + + // TODO1: Updating pgidx here. + *(*int32)(unsafe.Pointer(pPgidx + 8)) += sqlite3Fts5PutVarint(tls, + (*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn), uint64((*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fn-(*Fts5PageWriter)(unsafe.Pointer(pPage)).FiPrevPgidx)) + (*Fts5PageWriter)(unsafe.Pointer(pPage)).FiPrevPgidx = (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fn + + if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstTermInPage != 0 { + nPrefix = 0 + if (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fpgno != 1 { + // This is the first term on a leaf that is not the leftmost leaf in + // the segment b-tree. In this case it is necessary to add a term to + // the b-tree hierarchy that is (a) larger than the largest term + // already written to the segment and (b) smaller than or equal to + // this term. In other words, a prefix of (pTerm/nTerm) that is one + // byte longer than the longest prefix (pTerm/nTerm) shares with the + // previous term. + // + // Usually, the previous term is available in pPage->term. The exception + // is if this is the first term written in an incremental-merge step. + // In this case the previous term is not available, so just write a + // copy of (pTerm/nTerm) into the parent node. This is slightly + // inefficient, but still correct. + var n int32 = nTerm + if (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fn != 0 { + n = 1 + fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) + } + fts5WriteBtreeTerm(tls, p, pWriter, n, pTerm) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + return + } + pPage = pWriter + 8 + } + } else { + nPrefix = fts5PrefixCompress(tls, nMin, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fterm.Fp, pTerm) + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nPrefix)) + } + + // Append the number of bytes of new data, then the term data itself + // to the page. + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, int64(nTerm-nPrefix)) + sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nTerm-nPrefix), pTerm+uintptr(nPrefix)) + + // Update the Fts5PageWriter.term field. + sqlite3Fts5BufferSet(tls, p+52, pPage+40, nTerm, pTerm) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstTermInPage = U8(0) + + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(0) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(1) + + (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fpgno = (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fpgno +} + +// Append a rowid and position-list size field to the writers output. +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var pPage uintptr = pWriter + 8 + + if (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fn+(*Fts5PageWriter)(unsafe.Pointer(pPage)).Fpgidx.Fn >= (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz { + fts5WriteFlushLeaf(tls, p, pWriter) + } + + // If this is to be the first rowid written to the page, set the + // rowid-pointer in the page-header. Also append a value to the dlidx + // buffer, in case a doclist-index is required. + if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 { + fts5PutU16(tls, (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fp, U16((*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fn)) + fts5WriteDlidxAppend(tls, p, pWriter, iRowid) + } + + // Write the rowid. + if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist != 0 || (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 { + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, iRowid) + } else { + + sqlite3Fts5BufferAppendVarint(tls, p+52, pPage+8, iRowid-(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid) + } + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiPrevRowid = iRowid + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInDoclist = U8(0) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(0) + } +} + +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pPage uintptr = pWriter + 8 + var a uintptr = aData + var n int32 = nData + + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && + (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fn+(*Fts5PageWriter)(unsafe.Pointer(pPage)).Fpgidx.Fn+n >= (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz { + var nReq int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz - (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fbuf.Fn - (*Fts5PageWriter)(unsafe.Pointer(pPage)).Fpgidx.Fn + var nCopy int32 = 0 + for nCopy < nReq { + // var dummy I64 at bp, 8 + + nCopy = nCopy + int32(sqlite3Fts5GetVarint(tls, a+uintptr(nCopy), bp)) + } + sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(nCopy), a) + a += uintptr(nCopy) + n = n - nCopy + fts5WriteFlushLeaf(tls, p, pWriter) + } + if n > 0 { + sqlite3Fts5BufferAppendBlob(tls, p+52, pPage+8, uint32(n), a) + } +} + +// Flush any data cached by the writer object to the database. Free any +// allocations associated with the writer. +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ + var i int32 + var pLeaf uintptr = pWriter + 8 + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + + if (*Fts5PageWriter)(unsafe.Pointer(pLeaf)).Fbuf.Fn > 4 { + fts5WriteFlushLeaf(tls, p, pWriter) + } + *(*int32)(unsafe.Pointer(pnLeaf)) = (*Fts5PageWriter)(unsafe.Pointer(pLeaf)).Fpgno - 1 + if (*Fts5PageWriter)(unsafe.Pointer(pLeaf)).Fpgno > 1 { + fts5WriteFlushBtree(tls, p, pWriter) + } + } + sqlite3Fts5BufferFree(tls, pLeaf+40) + sqlite3Fts5BufferFree(tls, pLeaf+8) + sqlite3Fts5BufferFree(tls, pLeaf+24) + sqlite3Fts5BufferFree(tls, pWriter+96) + + for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { + sqlite3Fts5BufferFree(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx+uintptr(i)*32+16) + } + Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) +} + +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var nBuffer int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz + FTS5_DATA_PADDING + + libc.Xmemset(tls, pWriter, 0, uint64(unsafe.Sizeof(Fts5SegWriter{}))) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiSegid = iSegid + + fts5WriteDlidxGrow(tls, p, pWriter, 1) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fwriter.Fpgno = 1 + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstTermInPage = U8(1) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage = 1 + + // Grow the two buffers to pgsz + padding bytes in size. + sqlite3Fts5BufferSize(tls, p+52, pWriter+8+24, uint32(nBuffer)) + sqlite3Fts5BufferSize(tls, p+52, pWriter+8+8, uint32(nBuffer)) + + if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, + ts+34894, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + // Initialize the 4-byte leaf-page header to 0x00. + libc.Xmemset(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fwriter.Fbuf.Fp, 0, uint64(4)) + (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fwriter.Fbuf.Fn = 4 + + // Bind the current output segment id to the index-writer. This is an + // optimization over binding the same value over and over as rows are + // inserted into %_idx by the current writer. + Xsqlite3_bind_int(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter, 1, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiSegid) + } +} + +// Iterator pIter was used to iterate through the input segments of on an +// incremental merge operation. This function is called if the incremental +// merge step has finished but the input has not been completely exhausted. +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var i int32 + // var buf Fts5Buffer at bp, 16 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) + for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i++ { + var pSeg uintptr = pIter + 96 + uintptr(i)*120 + if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg == uintptr(0) { + // no-op + } else if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0) { + // All keys from this input segment have been transfered to the output. + // Set both the first and last page-numbers to 0 to indicate that the + // segment is now empty. + (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg)).FpgnoLast = 0 + (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg)).FpgnoFirst = 0 + } else { + var iOff int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiTermLeafOffset // Offset on new first leaf page + var iLeafRowid I64 + var pData uintptr + var iId int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg)).FiSegid + *(*[4]U8)(unsafe.Pointer(bp + 16 /* aHdr */)) = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} + + iLeafRowid = I64(iId)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B) + I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B) + I64(int64(0))< (*Fts5Data)(unsafe.Pointer(pData)).FszLeaf { + // This can occur if the pages that the segments occupy overlap - if + // a single page has been assigned to more than one segment. In + // this case a prior iteration of this loop may have corrupted the + // segment currently being trimmed. + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + sqlite3Fts5BufferZero(tls, bp) + if !(U32((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)+U32((*Fts5Data)(unsafe.Pointer(pData)).Fnn) <= U32((*Fts5Buffer)(unsafe.Pointer(bp)).FnSpace)) { + sqlite3Fts5BufferSize(tls, p+52, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn+(*Fts5Buffer)(unsafe.Pointer(bp)).Fn)) + } + sqlite3Fts5BufferAppendBlob(tls, p+52, bp, uint32(unsafe.Sizeof([4]U8{})), bp+16) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp, uint32((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn), (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).FszLeaf-iOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff)) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + // Set the szLeaf field + fts5PutU16(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+2, U16((*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fn)) + } + + // Set up the new page-index array + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64(4)) + if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafPgno == (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiTermLeafPgno && + (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiEndofDoclist < (*Fts5Data)(unsafe.Pointer(pData)).FszLeaf && + (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff <= (*Fts5Data)(unsafe.Pointer(pData)).Fnn { + var nDiff int32 = (*Fts5Data)(unsafe.Pointer(pData)).FszLeaf - (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiEndofDoclist + sqlite3Fts5BufferAppendVarint(tls, p+52, bp, int64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn-1-nDiff-4)) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff)) + } + + (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg)).FpgnoFirst = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiTermLeafPgno + fts5DataDelete(tls, p, I64(iId)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(int64(0))< nRem { + break + } + sqlite3Fts5BufferSet(tls, p+52, bp+120, *(*int32)(unsafe.Pointer(bp + 144 /* nTerm */)), pTerm) + bTermWritten = 0 + } + + // Check for key annihilation. + if (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos == 0 && (bOldest != 0 || int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) == 0) { + continue + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && bTermWritten == 0 { + // This is a new term. Append a term to the output segment. + fts5WriteAppendTerm(tls, p, bp, *(*int32)(unsafe.Pointer(bp + 144 /* nTerm */)), pTerm) + bTermWritten = 1 + } + + // Append the rowid to the output + // WRITEPOSLISTSIZE + fts5WriteAppendRowid(tls, p, bp, fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* pIter */)))) + + if eDetail == FTS5_DETAIL_NONE { + if (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel != 0 { + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(0)) + if (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos > 0 { + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(0)) + } + } + } else { + // Append the position-list data to the output + nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) + sqlite3Fts5BufferAppendVarint(tls, p+52, bp+8+8, int64(nPos)) + fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32) + }{fts5MergeChunkCallback}))) + } + } + + // Flush the last leaf page to disk. Set the output segment b-tree height + // and last leaf page number at the same time. + fts5WriteFinish(tls, p, bp, pSeg+8) + + if fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 136))) != 0 { + var i int32 + + // Remove the redundant segments from the %_data table + for i = 0; i < nInput; i++ { + fts5DataRemoveSegment(tls, p, (*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(i)*12)).FiSegid) + } + + // Remove the redundant segments from the input level + if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg != nInput { + var nMove int32 = int32(uint64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg-nInput) * uint64(unsafe.Sizeof(Fts5StructureSegment{}))) + libc.Xmemmove(tls, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(nInput)*12, uint64(nMove)) + } + *(*int32)(unsafe.Pointer(pStruct + 16)) -= nInput + *(*int32)(unsafe.Pointer(pLvl + 4)) -= nInput + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge = 0 + if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast == 0 { + (*Fts5StructureLevel)(unsafe.Pointer(pLvlOut)).FnSeg-- + (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment-- + } + } else { + + fts5TrimSegments(tls, p, *(*uintptr)(unsafe.Pointer(bp + 136 /* pIter */))) + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge = nInput + } + + fts5MultiIterFree(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* pIter */))) + sqlite3Fts5BufferFree(tls, bp+120) + if pnRem != 0 { + *(*int32)(unsafe.Pointer(pnRem)) -= (*Fts5SegWriter)(unsafe.Pointer(bp)).FnLeafWritten + } +} + +// Do up to nPg pages of automerge work on the index. +// +// Return true if any changes were actually made, or false otherwise. +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + *(*int32)(unsafe.Pointer(bp + 8 /* nRem */)) = nPg + var bRet int32 = 0 + *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) = *(*uintptr)(unsafe.Pointer(ppStruct)) + for *(*int32)(unsafe.Pointer(bp + 8)) > 0 && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var iLvl int32 // To iterate through levels + var iBestLvl int32 = 0 // Level offering the most input segments + var nBest int32 = 0 // Number of input segments on best level + + // Set iBestLvl to the level to read input segments from. + + for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pStruct */)))).FnLevel; iLvl++ { + var pLvl uintptr = *(*uintptr)(unsafe.Pointer(bp)) + 24 + uintptr(iLvl)*16 + if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge != 0 { + if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge > nBest { + iBestLvl = iLvl + nBest = (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge + } + break + } + if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg > nBest { + nBest = (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg + iBestLvl = iLvl + } + } + + // If nBest is still 0, then the index must be empty. + + if nBest < nMin && (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+24+uintptr(iBestLvl)*16)).FnMerge == 0 { + break + } + bRet = 1 + fts5IndexMergeLevel(tls, p, bp, iBestLvl, bp+8) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+24+uintptr(iBestLvl)*16)).FnMerge == 0 { + fts5StructurePromote(tls, p, iBestLvl+1, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) + } + } + *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) + return bRet +} + +// A total of nLeaf leaf pages of data has just been flushed to a level-0 +// segment. This function updates the write-counter accordingly and, if +// necessary, performs incremental merge work. +// +// If an error occurs, set the Fts5Index.rc error code. If an error has +// already occurred, this function is a no-op. +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { + var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) + var nWrite U64 // Initial value of write-counter + var nWork int32 // Number of work-quanta to perform + var nRem int32 // Number of leaf pages left to write + + // Update the write-counter. While doing so, set nWork. + nWrite = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnWriteCounter + nWork = int32((nWrite+U64(nLeaf))/U64((*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit) - nWrite/U64((*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit)) + *(*U64)(unsafe.Pointer(pStruct + 8)) += U64(nLeaf) + nRem = (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit * nWork * (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel + + fts5IndexMerge(tls, p, ppStruct, nRem, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge) + } +} + +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var nCrisis int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCrisisMerge + *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) = *(*uintptr)(unsafe.Pointer(ppStruct)) + var iLvl int32 = 0 + + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+24+uintptr(iLvl)*16)).FnSeg >= nCrisis { + fts5IndexMergeLevel(tls, p, bp, iLvl, uintptr(0)) + + fts5StructurePromote(tls, p, iLvl+1, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) + iLvl++ + } + *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) +} + +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ + var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK + return rc +} + +type Fts5FlushCtx1 = struct { + FpIdx uintptr + Fwriter Fts5SegWriter +} /* sqlite3.c:229302:9 */ + +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ + +// Buffer aBuf[] contains a list of varints, all small enough to fit +// in a 32-bit integer. Return the size of the largest prefix of this +// list nMax bytes or less in size. +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var ret int32 + // var dummy U32 at bp, 4 + + ret = sqlite3Fts5GetVarint32(tls, aBuf, bp) + if ret < nMax { + for 1 != 0 { + var i int32 = sqlite3Fts5GetVarint32(tls, aBuf+uintptr(ret), bp) + if ret+i > nMax { + break + } + ret = ret + i + } + } + return ret +} + +// Flush the contents of in-memory hash table iHash to a new level-0 +// segment on disk. Also update the corresponding structure record. +// +// If an error occurs, set the Fts5Index.rc error code. If an error has +// already occurred, this function is a no-op. +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ + bp := tls.Alloc(176) + defer tls.Free(176) + + var pHash uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpHash + // var pStruct uintptr at bp+168, 8 + + var iSegid int32 + *(*int32)(unsafe.Pointer(bp + 160 /* pgnoLast */)) = 0 // Last leaf page number in segment + + // Obtain a reference to the index structure and allocate a new segment-id + // for the new level-0 segment. + *(*uintptr)(unsafe.Pointer(bp + 168 /* pStruct */)) = fts5StructureRead(tls, p) + iSegid = fts5AllocateSegid(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pStruct */))) + fts5StructureInvalidate(tls, p) + + if iSegid != 0 { + var pgsz int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz + var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail + var pSeg uintptr // New segment within pStruct + var pBuf uintptr // Buffer in which to assemble leaf page + var pPgidx uintptr // Buffer in which to assemble pgidx + + // var writer Fts5SegWriter at bp, 120 + + fts5WriteInit(tls, p, bp, iSegid) + + pBuf = bp + 8 + 8 + pPgidx = bp + 8 + 24 + + // fts5WriteInit() should have initialized the buffers to (most likely) + // the maximum space required. + + // Begin scanning through hash table entries. This loop runs once for each + // term/doclist currently stored within the hash table. + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5HashScanInit(tls, pHash, uintptr(0), 0) + } + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && 0 == sqlite3Fts5HashScanEof(tls, pHash) { + // var zTerm uintptr at bp+120, 8 + // Buffer containing term + // var pDoclist uintptr at bp+128, 8 + // Pointer to doclist for this term + // var nDoclist int32 at bp+136, 4 + // Size of doclist in bytes + + // Write the term for this entry to disk. + sqlite3Fts5HashScanEntry(tls, pHash, bp+120, bp+128, bp+136) + fts5WriteAppendTerm(tls, p, bp, int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 120 /* zTerm */)))), *(*uintptr)(unsafe.Pointer(bp + 120 /* zTerm */))) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + break + } + + if pgsz >= (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn+(*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn+*(*int32)(unsafe.Pointer(bp + 136))+1 { + /* The entire doclist will fit on the current leaf. */ + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), *(*uintptr)(unsafe.Pointer(bp + 128 /* pDoclist */)), uint64(*(*int32)(unsafe.Pointer(bp + 136 /* nDoclist */)))) + *(*int32)(unsafe.Pointer(pBuf + 8)) += *(*int32)(unsafe.Pointer(bp + 136)) + } + + } else { + var iRowid I64 = int64(0) + *(*U64)(unsafe.Pointer(bp + 144 /* iDelta */)) = uint64(0) + var iOff int32 = 0 + + // The entire doclist will not fit on this leaf. The following + // loop iterates through the poslists that make up the current + // doclist. + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && iOff < *(*int32)(unsafe.Pointer(bp + 136)) { + iOff = iOff + int32(sqlite3Fts5GetVarint(tls, *(*uintptr)(unsafe.Pointer(bp + 128))+uintptr(iOff), bp+144)) + iRowid = I64(U64(iRowid) + *(*U64)(unsafe.Pointer(bp + 144))) + + if (*Fts5SegWriter)(unsafe.Pointer(bp)).FbFirstRowidInPage != 0 { + fts5PutU16(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp, U16((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) // first rowid on page + *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iRowid)) + (*Fts5SegWriter)(unsafe.Pointer(bp /* &writer */)).FbFirstRowidInPage = U8(0) + fts5WriteDlidxAppend(tls, p, bp, iRowid) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { + break + } + } else { + *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), *(*U64)(unsafe.Pointer(bp + 144))) + } + + if eDetail == FTS5_DETAIL_NONE { + if iOff < *(*int32)(unsafe.Pointer(bp + 136)) && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)) + uintptr(iOff)))) == 0 { + *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(0) + iOff++ + if iOff < *(*int32)(unsafe.Pointer(bp + 136)) && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)) + uintptr(iOff)))) == 0 { + *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(0) + iOff++ + } + } + if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn+(*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn >= pgsz { + fts5WriteFlushLeaf(tls, p, bp) + } + } else { + // var bDummy int32 at bp+156, 4 + + // var nPos int32 at bp+152, 4 + + var nCopy int32 = fts5GetPoslistSize(tls, *(*uintptr)(unsafe.Pointer(bp + 128))+uintptr(iOff), bp+152, bp+156) + nCopy = nCopy + *(*int32)(unsafe.Pointer(bp + 152)) + if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn+(*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn+nCopy <= pgsz { + /* The entire poslist will fit on the current leaf. So copy + ** it in one go. */ + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), *(*uintptr)(unsafe.Pointer(bp + 128))+uintptr(iOff), uint64(nCopy)) + *(*int32)(unsafe.Pointer(pBuf + 8)) += nCopy + } + + } else { + // The entire poslist will not fit on this leaf. So it needs + // to be broken into sections. The only qualification being + // that each varint must be stored contiguously. + var pPoslist uintptr = *(*uintptr)(unsafe.Pointer(bp + 128)) + uintptr(iOff) + var iPos int32 = 0 + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var nSpace int32 = pgsz - (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn - (*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn + var n int32 = 0 + if nCopy-iPos <= nSpace { + n = nCopy - iPos + } else { + n = fts5PoslistPrefix(tls, pPoslist+uintptr(iPos), nSpace) + } + + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), pPoslist+uintptr(iPos), uint64(n)) + *(*int32)(unsafe.Pointer(pBuf + 8)) += n + } + + iPos = iPos + n + if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn+(*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn >= pgsz { + fts5WriteFlushLeaf(tls, p, bp) + } + if iPos >= nCopy { + break + } + } + } + iOff = iOff + nCopy + } + } + } + + // TODO2: Doclist terminator written here. + // pBuf->p[pBuf->n++] = '\0'; + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + sqlite3Fts5HashScanNext(tls, pHash) + } + } + sqlite3Fts5HashClear(tls, pHash) + fts5WriteFinish(tls, p, bp, bp+160) + + // Update the Fts5Structure. It is written back to the database by the + // fts5StructureRelease() call below. + if (*Fts5Structure)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).FnLevel == 0 { + fts5StructureAddLevel(tls, p+52, bp+168) + } + fts5StructureExtendLevel(tls, p+52, *(*uintptr)(unsafe.Pointer(bp + 168 /* pStruct */)), 0, 1, 0) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + pSeg = (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168))+24)).FaSeg + uintptr(libc.PostIncInt32(&(*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168))+24)).FnSeg, 1))*12 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid = iSegid + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst = 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast = *(*int32)(unsafe.Pointer(bp + 160 /* pgnoLast */)) + (*Fts5Structure)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168 /* pStruct */)))).FnSegment++ + } + fts5StructurePromote(tls, p, 0, *(*uintptr)(unsafe.Pointer(bp + 168 /* pStruct */))) + } + + fts5IndexAutomerge(tls, p, bp+168, *(*int32)(unsafe.Pointer(bp + 160 /* pgnoLast */))) + fts5IndexCrisismerge(tls, p, bp+168) + fts5StructureWrite(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pStruct */))) + fts5StructureRelease(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pStruct */))) +} + +// Flush any data stored in the in-memory hash tables to the database. +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ + // Unless it is empty, flush the hash table to disk + if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { + + (*Fts5Index)(unsafe.Pointer(p)).FnPendingData = 0 + fts5FlushOneHash(tls, p) + } +} + +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ + var pNew uintptr = uintptr(0) + var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) + var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment + var i int32 + + // Figure out if this structure requires optimization. A structure does + // not require optimization if either: + // + // + it consists of fewer than two segments, or + // + all segments are on the same level, or + // + all segments except one are currently inputs to a merge operation. + // + // In the first case, return NULL. In the second, increment the ref-count + // on *pStruct and return a copy of the pointer to it. + if nSeg < 2 { + return uintptr(0) + } + for i = 0; i < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; i++ { + var nThis int32 = (*Fts5StructureLevel)(unsafe.Pointer(pStruct + 24 + uintptr(i)*16)).FnSeg + if nThis == nSeg || nThis == nSeg-1 && (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(i)*16)).FnMerge == nThis { + fts5StructureRef(tls, pStruct) + return pStruct + } + + } + + nByte = Sqlite3_int64(uint64(nByte) + uint64(uint64((*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel+1)*uint64(unsafe.Sizeof(Fts5StructureLevel{})))) + pNew = sqlite3Fts5MallocZero(tls, p+52, nByte) + + if pNew != 0 { + var pLvl uintptr + nByte = Sqlite3_int64(uint64(nSeg) * uint64(unsafe.Sizeof(Fts5StructureSegment{}))) + (*Fts5Structure)(unsafe.Pointer(pNew)).FnLevel = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel + 1 + (*Fts5Structure)(unsafe.Pointer(pNew)).FnRef = 1 + (*Fts5Structure)(unsafe.Pointer(pNew)).FnWriteCounter = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnWriteCounter + pLvl = pNew + 24 + uintptr((*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel)*16 + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = sqlite3Fts5MallocZero(tls, p+52, nByte) + if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg != 0 { + var iLvl int32 + var iSeg int32 + var iSegOut int32 = 0 + // Iterate through all segments, from oldest to newest. Add them to + // the new Fts5Level object so that pLvl->aSeg[0] is the oldest + // segment in the data structure. + for iLvl = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel - 1; iLvl >= 0; iLvl-- { + for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24 /* &.aLevel */ +uintptr(iLvl)*16)).FnSeg; iSeg++ { + *(*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg + uintptr(iSegOut)*12)) = *(*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(iLvl)*16)).FaSeg + uintptr(iSeg)*12)) + iSegOut++ + } + } + (*Fts5Structure)(unsafe.Pointer(pNew)).FnSegment = libc.AssignPtrInt32(pLvl+4, nSeg) + } else { + Xsqlite3_free(tls, pNew) + pNew = uintptr(0) + } + } + + return pNew +} + +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var pStruct uintptr + *(*uintptr)(unsafe.Pointer(bp /* pNew */)) = uintptr(0) + + fts5IndexFlush(tls, p) + pStruct = fts5StructureRead(tls, p) + fts5StructureInvalidate(tls, p) + + if pStruct != 0 { + *(*uintptr)(unsafe.Pointer(bp /* pNew */)) = fts5IndexOptimizeStruct(tls, p, pStruct) + } + fts5StructureRelease(tls, pStruct) + + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + var iLvl int32 + for iLvl = 0; (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */))+24 /* &.aLevel */ +uintptr(iLvl)*16)).FnSeg == 0; iLvl++ { + } + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+24+uintptr(iLvl)*16)).FnSeg > 0 { + *(*int32)(unsafe.Pointer(bp + 8 /* nRem */)) = FTS5_OPT_WORK_UNIT + fts5IndexMergeLevel(tls, p, bp, iLvl, bp+8) + } + + fts5StructureWrite(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + fts5StructureRelease(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + } + + return fts5IndexReturn(tls, p) +} + +// This is called to implement the special "VALUES('merge', $nMerge)" +// INSERT command. +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) = fts5StructureRead(tls, p) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + var nMin int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnUsermerge + fts5StructureInvalidate(tls, p) + if nMerge < 0 { + var pNew uintptr = fts5IndexOptimizeStruct(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) + fts5StructureRelease(tls, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) + *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) = pNew + nMin = 2 + nMerge = nMerge * -1 + } + if *(*uintptr)(unsafe.Pointer(bp)) != 0 && (*Fts5Structure)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnLevel != 0 { + if fts5IndexMerge(tls, p, bp, nMerge, nMin) != 0 { + fts5StructureWrite(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) + } + } + fts5StructureRelease(tls, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) + } + return fts5IndexReturn(tls, p) +} + +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ + _ = pUnused + sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) +} + +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ + var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData + var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && 0 == func() int32 { + if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(nByte) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { + return 0 + } + return sqlite3Fts5BufferSize(tls, p+52, pBuf, uint32(nByte+(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) + }() { + { + *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iDelta)) + } + + { + *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(nData*2)) + } + + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FpData, uint64(nData)) + *(*int32)(unsafe.Pointer(pBuf + 8)) += nData + } + + libc.Xmemset(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), 0, uint64(FTS5_DATA_ZERO_PADDING)) + } +} + +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var p uintptr = (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist + uintptr((*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnSize) + uintptr((*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnPoslist) + + if p >= (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaEof { + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = uintptr(0) + } else { + // var iDelta I64 at bp, 8 + + p += uintptr(sqlite3Fts5GetVarint(tls, p, bp)) + *(*I64)(unsafe.Pointer(pIter + 8)) += *(*I64)(unsafe.Pointer(bp)) + + // Read position list size + if int32(*(*U8)(unsafe.Pointer(p)))&0x80 != 0 { + // var nPos int32 at bp+8, 4 + + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnSize = sqlite3Fts5GetVarint32(tls, p, bp+8) + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnPoslist = *(*int32)(unsafe.Pointer(bp + 8)) >> 1 + } else { + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnPoslist = int32(*(*U8)(unsafe.Pointer(p))) >> 1 + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnSize = 1 + } + + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = p + if (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist+uintptr((*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnPoslist) > (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaEof { + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = uintptr(0) + } + } +} + +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ + libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{}))) + if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaEof = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn) + fts5DoclistIterNext(tls, pIter) + } +} + +// Swap the contents of buffer *p1 with that of *p2. +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ + var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) + *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) + *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp +} + +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var i int32 = *(*int32)(unsafe.Pointer(piOff)) + if i >= (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn { + *(*int32)(unsafe.Pointer(piOff)) = -1 + } else { + // var iVal U64 at bp, 8 + + *(*int32)(unsafe.Pointer(piOff)) = i + int32(sqlite3Fts5GetVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr(i), bp)) + *(*I64)(unsafe.Pointer(piRowid)) += I64(*(*U64)(unsafe.Pointer(bp))) + } +} + +// This is the equivalent of fts5MergePrefixLists() for detail=none mode. +// In this case the buffers consist of a delta-encoded list of rowids only. +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + *(*int32)(unsafe.Pointer(bp + 16 /* i1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 32 /* i2 */)) = 0 + *(*I64)(unsafe.Pointer(bp + 24 /* iRowid1 */)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 40 /* iRowid2 */)) = int64(0) + var iOut I64 = int64(0) + var p2 uintptr = aBuf + // var out Fts5Buffer at bp, 16 + + _ = nBuf + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) + + sqlite3Fts5BufferSize(tls, p+52, bp, uint32((*Fts5Buffer)(unsafe.Pointer(p1)).Fn+(*Fts5Buffer)(unsafe.Pointer(p2)).Fn)) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + return + } + + fts5NextRowid(tls, p1, bp+16, bp+24) + fts5NextRowid(tls, p2, bp+32, bp+40) + for *(*int32)(unsafe.Pointer(bp + 16)) >= 0 || *(*int32)(unsafe.Pointer(bp + 32)) >= 0 { + if *(*int32)(unsafe.Pointer(bp + 16)) >= 0 && (*(*int32)(unsafe.Pointer(bp + 32)) < 0 || *(*I64)(unsafe.Pointer(bp + 24)) < *(*I64)(unsafe.Pointer(bp + 40))) { + + { + *(*int32)(unsafe.Pointer(bp + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp)).Fn), uint64(*(*I64)(unsafe.Pointer(bp + 24))-iOut)) + } + + iOut = *(*I64)(unsafe.Pointer(bp + 24 /* iRowid1 */)) + fts5NextRowid(tls, p1, bp+16, bp+24) + } else { + + { + *(*int32)(unsafe.Pointer(bp + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp)).Fn), uint64(*(*I64)(unsafe.Pointer(bp + 40))-iOut)) + } + + iOut = *(*I64)(unsafe.Pointer(bp + 40 /* iRowid2 */)) + if *(*int32)(unsafe.Pointer(bp + 16)) >= 0 && *(*I64)(unsafe.Pointer(bp + 24)) == *(*I64)(unsafe.Pointer(bp + 40)) { + fts5NextRowid(tls, p1, bp+16, bp+24) + } + fts5NextRowid(tls, p2, bp+32, bp+40) + } + } + + fts5BufferSwap(tls, bp, p1) + sqlite3Fts5BufferFree(tls, bp) +} + +type PrefixMerger1 = struct { + Fiter Fts5DoclistIter + FiPos I64 + FiOff int32 + F__ccgo_pad1 [4]byte + FaPos uintptr + FpNext uintptr +} /* sqlite3.c:229775:9 */ + +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ + +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ + if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { + var pp uintptr = ppHead + for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { + pp = *(*uintptr)(unsafe.Pointer(pp)) + 56 + } + (*PrefixMerger)(unsafe.Pointer(p)).FpNext = *(*uintptr)(unsafe.Pointer(pp)) + *(*uintptr)(unsafe.Pointer(pp)) = p + } +} + +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ + if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { + var pp uintptr = ppHead + for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { + pp = *(*uintptr)(unsafe.Pointer(pp)) + 56 + } + (*PrefixMerger)(unsafe.Pointer(p)).FpNext = *(*uintptr)(unsafe.Pointer(pp)) + *(*uintptr)(unsafe.Pointer(pp)) = p + } +} + +// Array aBuf[] contains nBuf doclists. These are all merged in with the +// doclist in buffer p1. +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ + bp := tls.Alloc(1072) + defer tls.Free(1072) + + // var aMerger [16]PrefixMerger at bp, 1024 + + *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = uintptr(0) + var i int32 + var nOut int32 = 0 + *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) = Fts5Buffer{} + *(*Fts5Buffer)(unsafe.Pointer(bp + 1048 /* tmp */)) = Fts5Buffer{} + var iLastRowid I64 = int64(0) + + // Initialize a doclist-iterator for each input buffer. Arrange them in + // a linked-list starting at pHead in ascending order of rowid. Avoid + // linking any iterators already at EOF into the linked list at all. + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(PrefixMerger{}))*uint64(nBuf+1)) + *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = bp + uintptr(nBuf)*64 + fts5DoclistIterInit(tls, p1, *(*uintptr)(unsafe.Pointer(bp + 1024))) + for i = 0; i < nBuf; i++ { + fts5DoclistIterInit(tls, aBuf+uintptr(i)*16, bp+uintptr(i)*64) + fts5PrefixMergerInsertByRowid(tls, bp+1024, bp+uintptr(i)*64) + nOut = nOut + (*Fts5Buffer)(unsafe.Pointer(aBuf+uintptr(i)*16)).Fn + } + if nOut == 0 { + return + } + nOut = nOut + ((*Fts5Buffer)(unsafe.Pointer(p1)).Fn + 9 + 10*nBuf) + + // The maximum size of the output is equal to the sum of the + // input sizes + 1 varint (9 bytes). The extra varint is because if the + // first rowid in one input is a large negative number, and the first in + // the other a non-negative number, the delta for the non-negative + // number will be larger on disk than the literal integer value + // was. + // + // Or, if the input position-lists are corrupt, then the output might + // include up to (nBuf+1) extra 10-byte positions created by interpreting -1 + // (the value PoslistNext64() uses for EOF) as a position and appending + // it to the output. This can happen at most once for each input + // position-list, hence (nBuf+1) 10 byte paddings. + if sqlite3Fts5BufferSize(tls, p+52, bp+1032, uint32(nOut)) != 0 { + return + } + + for *(*uintptr)(unsafe.Pointer(bp + 1024)) != 0 { + { + { + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), uint64((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid-iLastRowid)) + } + iLastRowid = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FiRowid + } + + if (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FpNext != 0 && iLastRowid == (*PrefixMerger)(unsafe.Pointer((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FpNext)).Fiter.FiRowid { + // Merge data from two or more poslists + *(*I64)(unsafe.Pointer(bp + 1064 /* iPrev */)) = int64(0) + var nTmp int32 = FTS5_DATA_ZERO_PADDING + var nMerge int32 = 0 + var pSave uintptr = *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) + var pThis uintptr = uintptr(0) + var nTail int32 = 0 + + *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = uintptr(0) + for pSave != 0 && (*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FiRowid == iLastRowid { + var pNext uintptr = (*PrefixMerger)(unsafe.Pointer(pSave)).FpNext + (*PrefixMerger)(unsafe.Pointer(pSave)).FiOff = 0 + (*PrefixMerger)(unsafe.Pointer(pSave)).FiPos = int64(0) + (*PrefixMerger)(unsafe.Pointer(pSave)).FaPos = (*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FaPoslist + uintptr((*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FnSize) + sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pSave)).FaPos, (*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FnPoslist, pSave+40, pSave+32) + nTmp = nTmp + ((*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FnPoslist + 10) + nMerge++ + fts5PrefixMergerInsertByPosition(tls, bp+1024, pSave) + pSave = pNext + } + + if *(*uintptr)(unsafe.Pointer(bp + 1024)) == uintptr(0) || (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FpNext == uintptr(0) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + break + } + + // See the earlier comment in this function for an explanation of why + // corrupt input position lists might cause the output to consume + // at most nMerge*10 bytes of unexpected space. + if sqlite3Fts5BufferSize(tls, p+52, bp+1048, uint32(nTmp+nMerge*10)) != 0 { + break + } + sqlite3Fts5BufferZero(tls, bp+1048) + + pThis = *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) + *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext + sqlite3Fts5PoslistSafeAppend(tls, bp+1048, bp+1064, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos) + sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pThis)).FaPos, (*PrefixMerger)(unsafe.Pointer(pThis)).Fiter.FnPoslist, pThis+40, pThis+32) + fts5PrefixMergerInsertByPosition(tls, bp+1024, pThis) + + for (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FpNext != 0 { + pThis = *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) + if (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos != *(*I64)(unsafe.Pointer(bp + 1064)) { + sqlite3Fts5PoslistSafeAppend(tls, bp+1048, bp+1064, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos) + } + sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pThis)).FaPos, (*PrefixMerger)(unsafe.Pointer(pThis)).Fiter.FnPoslist, pThis+40, pThis+32) + *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext + fts5PrefixMergerInsertByPosition(tls, bp+1024, pThis) + } + + if (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FiPos != *(*I64)(unsafe.Pointer(bp + 1064)) { + sqlite3Fts5PoslistSafeAppend(tls, bp+1048, bp+1064, (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)))).FiPos) + } + nTail = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).Fiter.FnPoslist - (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FiOff + + // WRITEPOSLISTSIZE + + if (*Fts5Buffer)(unsafe.Pointer(bp+1048)).Fn+nTail > nTmp-FTS5_DATA_ZERO_PADDING { + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + break + } + { + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), uint64(((*Fts5Buffer)(unsafe.Pointer(bp+1048)).Fn+nTail)*2)) + } + + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), (*Fts5Buffer)(unsafe.Pointer(bp+1048 /* &tmp */)).Fp, uint64((*Fts5Buffer)(unsafe.Pointer(bp+1048 /* &tmp */)).Fn)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += (*Fts5Buffer)(unsafe.Pointer(bp + 1048)).Fn + } + + if nTail > 0 { + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FaPos+uintptr((*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024)))).FiOff), uint64(nTail)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += nTail + } + + } + + *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = pSave + for i = 0; i < nBuf+1; i++ { + var pX uintptr = bp + uintptr(i)*64 + if (*PrefixMerger)(unsafe.Pointer(pX)).Fiter.FaPoslist != 0 && (*PrefixMerger)(unsafe.Pointer(pX)).Fiter.FiRowid == iLastRowid { + fts5DoclistIterNext(tls, pX) + fts5PrefixMergerInsertByRowid(tls, bp+1024, pX) + } + } + + } else { + // Copy poslist from pHead to output + var pThis uintptr = *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) + var pI uintptr = pThis + { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), (*Fts5DoclistIter)(unsafe.Pointer(pI)).FaPoslist, uint64((*Fts5DoclistIter)(unsafe.Pointer(pI)).FnPoslist+(*Fts5DoclistIter)(unsafe.Pointer(pI)).FnSize)) + *(*int32)(unsafe.Pointer(bp + 1032 + 8)) += (*Fts5DoclistIter)(unsafe.Pointer(pI)).FnPoslist + (*Fts5DoclistIter)(unsafe.Pointer(pI)).FnSize + } + + fts5DoclistIterNext(tls, pI) + *(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext + fts5PrefixMergerInsertByRowid(tls, bp+1024, pThis) + } + } + + sqlite3Fts5BufferFree(tls, p1) + sqlite3Fts5BufferFree(tls, bp+1048) + libc.Xmemset(tls, (*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+1032)).Fn), 0, uint64(FTS5_DATA_ZERO_PADDING)) + *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) +} + +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pStruct uintptr + var aBuf uintptr + var nBuf int32 = 32 + var nMerge int32 = 1 + var xMerge uintptr + var xAppend uintptr + if (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { + xMerge = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) + }{fts5MergeRowidLists})) + xAppend = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + }{fts5AppendRowid})) + } else { + nMerge = FTS5_MERGE_NLIST - 1 + nBuf = nMerge * 8 // Sufficient to merge (16^8)==(2^32) lists + xMerge = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) + }{fts5MergePrefixLists})) + xAppend = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + }{fts5AppendPoslist})) + } + + aBuf = fts5IdxMalloc(tls, p, int64(uint64(unsafe.Sizeof(Fts5Buffer{}))*uint64(nBuf))) + pStruct = fts5StructureRead(tls, p) + + if aBuf != 0 && pStruct != 0 { + var flags int32 = FTS5INDEX_QUERY_SCAN | + FTS5INDEX_QUERY_SKIPEMPTY | + FTS5INDEX_QUERY_NOOUTPUT + var i int32 + var iLastRowid I64 = int64(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)) = uintptr(0) // Iterator used to gather data from index + var pData uintptr + // var doclist Fts5Buffer at bp, 16 + + *(*int32)(unsafe.Pointer(bp + 28 /* bNewTerm */)) = 1 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) + if iIdx != 0 { + *(*int32)(unsafe.Pointer(bp + 24 /* dummy */)) = 0 + var f2 int32 = FTS5INDEX_QUERY_SKIPEMPTY | FTS5INDEX_QUERY_NOOUTPUT + *(*U8)(unsafe.Pointer(pToken)) = U8('0') + fts5MultiIterNew(tls, p, pStruct, f2, pColset, pToken, nToken, -1, 0, bp+16) + fts5IterSetOutputCb(tls, p+52, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */))) + for ; fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16))) == 0; fts5MultiIterNext2(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp+24) { + var pSeg uintptr = *(*uintptr)(unsafe.Pointer(bp + 16)) + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaFirst+1*4)).FiFirst)*120 + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), pSeg) + if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FnData != 0 { + (*struct { + f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp /* &doclist */) + iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid + } + } + fts5MultiIterFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */))) + } + + *(*U8)(unsafe.Pointer(pToken)) = U8('0' + iIdx) + fts5MultiIterNew(tls, p, pStruct, flags, pColset, pToken, nToken, -1, 0, bp+16) + fts5IterSetOutputCb(tls, p+52, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */))) + for ; fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16))) == 0; fts5MultiIterNext2(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp+28) { + var pSeg uintptr = *(*uintptr)(unsafe.Pointer(bp + 16)) + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaFirst+1*4)).FiFirst)*120 + var nTerm int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn + var pTerm uintptr = (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), pSeg) + + if *(*int32)(unsafe.Pointer(bp + 28)) != 0 { + if nTerm < nToken || libc.Xmemcmp(tls, pToken, pTerm, uint64(nToken)) != 0 { + break + } + } + + if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FnData == 0 { + continue + } + + if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbase.FiRowid <= iLastRowid && (*Fts5Buffer)(unsafe.Pointer(bp)).Fn > 0 { + for i = 0; (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Buffer)(unsafe.Pointer(bp /* &doclist */)).Fn != 0; i++ { + var i1 int32 = i * nMerge + var iStore int32 + + for iStore = i1; iStore < i1+nMerge; iStore++ { + if (*Fts5Buffer)(unsafe.Pointer(aBuf+uintptr(iStore)*16)).Fn == 0 { + fts5BufferSwap(tls, bp, aBuf+uintptr(iStore)*16) + sqlite3Fts5BufferZero(tls, bp) + break + } + } + if iStore == i1+nMerge { + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xMerge})).f(tls, p, bp /* &doclist */, nMerge, aBuf+uintptr(i1)*16) + for iStore = i1; iStore < i1+nMerge; iStore++ { + sqlite3Fts5BufferZero(tls, aBuf+uintptr(iStore)*16) + } + } + } + iLastRowid = int64(0) + } + + (*struct { + f func(*libc.TLS, uintptr, I64, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid-iLastRowid, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp /* &doclist */) + iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid + } + + for i = 0; i < nBuf; i = i + nMerge { + var iFree int32 + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{xMerge})).f(tls, p, bp /* &doclist */, nMerge, aBuf+uintptr(i)*16) + } + for iFree = i; iFree < i+nMerge; iFree++ { + sqlite3Fts5BufferFree(tls, aBuf+uintptr(iFree)*16) + } + } + fts5MultiIterFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */))) + + pData = fts5IdxMalloc(tls, p, int64(uint64(unsafe.Sizeof(Fts5Data{}))+uint64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)+uint64(FTS5_DATA_ZERO_PADDING))) + if pData != 0 { + (*Fts5Data)(unsafe.Pointer(pData)).Fp = pData + 1*16 + (*Fts5Data)(unsafe.Pointer(pData)).Fnn = libc.AssignPtrInt32(pData+12, (*Fts5Buffer)(unsafe.Pointer(bp /* &doclist */)).Fn) + if (*Fts5Buffer)(unsafe.Pointer(bp)).Fn != 0 { + libc.Xmemcpy(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp /* &doclist */)).Fp, uint64((*Fts5Buffer)(unsafe.Pointer(bp /* &doclist */)).Fn)) + } + fts5MultiIterNew2(tls, p, pData, bDesc, ppIter) + } + sqlite3Fts5BufferFree(tls, bp) + } + + fts5StructureRelease(tls, pStruct) + Xsqlite3_free(tls, aBuf) +} + +// Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain +// to the document with rowid iRowid. +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ + + // Allocate the hash table if it has not already been allocated + if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5HashNew(tls, (*Fts5Index)(unsafe.Pointer(p)).FpConfig, p+24, p+32) + } + + // Flush the hash table to disk if required + if iRowid < (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid || + iRowid == (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid && (*Fts5Index)(unsafe.Pointer(p)).FbDelete == 0 || + (*Fts5Index)(unsafe.Pointer(p)).FnPendingData > (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnHashSize { + fts5IndexFlush(tls, p) + } + + (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid = iRowid + (*Fts5Index)(unsafe.Pointer(p)).FbDelete = bDelete + return fts5IndexReturn(tls, p) +} + +// Commit data to disk. +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ + + fts5IndexFlush(tls, p) + sqlite3Fts5IndexCloseReader(tls, p) + return fts5IndexReturn(tls, p) +} + +// Discard any data stored in the in-memory hash tables. Do not write it +// to the database. Additionally, assume that the contents of the %_data +// table may have changed on disk. So any in-memory caches of %_data +// records must be invalidated. +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ + sqlite3Fts5IndexCloseReader(tls, p) + fts5IndexDiscardData(tls, p) + fts5StructureInvalidate(tls, p) + // assert( p->rc==SQLITE_OK ); + return SQLITE_OK +} + +// The %_data table is completely empty when this function is called. This +// function populates it with the initial structure objects for each index, +// and the initial version of the "averages" record (a zero-byte blob). +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + // var s Fts5Structure at bp, 40 + + fts5StructureInvalidate(tls, p) + fts5IndexDiscardData(tls, p) + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Structure{}))) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1525, 0) + fts5StructureWrite(tls, p, bp) + return fts5IndexReturn(tls, p) +} + +// Open a new Fts5Index handle. If the bCreate argument is true, create +// and initialize the underlying %_data table. +// +// If successful, set *pp to point to the new object and return SQLITE_OK. +// Otherwise, set *pp to NULL and return an SQLite error code. +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK + var p uintptr // New object + + *(*uintptr)(unsafe.Pointer(pp)) = libc.AssignUintptr(&p, sqlite3Fts5MallocZero(tls, bp+8, int64(unsafe.Sizeof(Fts5Index{})))) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig + (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34951, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, + pConfig, ts+24869, ts+34959, 0, pzErr) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11364, + ts+34994, + 1, pzErr) + } + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5IndexReinit(tls, p) + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 8)) != 0 { + sqlite3Fts5IndexClose(tls, p) + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + } + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) +} + +// Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ + var rc int32 = SQLITE_OK + if p != 0 { + + fts5StructureInvalidate(tls, p) + Xsqlite3_finalize(tls, (*Fts5Index)(unsafe.Pointer(p)).FpWriter) + Xsqlite3_finalize(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDeleter) + Xsqlite3_finalize(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter) + Xsqlite3_finalize(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter) + Xsqlite3_finalize(tls, (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect) + Xsqlite3_finalize(tls, (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion) + sqlite3Fts5HashFree(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) + Xsqlite3_free(tls, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl) + Xsqlite3_free(tls, p) + } + return rc +} + +// Argument p points to a buffer containing utf-8 text that is n bytes in +// size. Return the number of bytes in the nChar character prefix of the +// buffer, or 0 if there are less than nChar characters in total. +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ + var n int32 = 0 + var i int32 + for i = 0; i < nChar; i++ { + if n >= nByte { + return 0 + } // Input contains fewer than nChar chars + if int32(uint8(*(*uint8)(unsafe.Pointer(p + uintptr(libc.PostIncInt32(&n, 1)))))) >= 0xc0 { + if n >= nByte { + return 0 + } + for int32(*(*uint8)(unsafe.Pointer(p + uintptr(n))))&0xc0 == 0x80 { + n++ + if n >= nByte { + if i+1 == nChar { + break + } + return 0 + } + } + } + } + return n +} + +// pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of +// unicode characters in the string. +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ + var nChar int32 = 0 + var i int32 = 0 + for i < nIn { + if int32(uint8(*(*uint8)(unsafe.Pointer(pIn + uintptr(libc.PostIncInt32(&i, 1)))))) >= 0xc0 { + for i < nIn && int32(*(*uint8)(unsafe.Pointer(pIn + uintptr(i))))&0xc0 == 0x80 { + i++ + } + } + nChar++ + } + return nChar +} + +// Insert or remove data to or from the index. Each time a document is +// added to or removed from the index, this function is called one or more +// times. +// +// For an insert, it must be called once for each token in the new document. +// If the operation is a delete, it must be called (at least) once for each +// unique token in the document with an iCol value less than zero. The iPos +// argument is ignored for a delete. +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ + var i int32 // Used to iterate through indexes + var rc int32 = SQLITE_OK // Return code + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + + // Add the entry to the main terms index. + rc = sqlite3Fts5HashWrite(tls, + (*Fts5Index)(unsafe.Pointer(p)).FpHash, (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid, iCol, iPos, uint8('0'), pToken, nToken) + + for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix && rc == SQLITE_OK; i++ { + var nChar int32 = *(*int32)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix + uintptr(i)*4)) + var nByte int32 = sqlite3Fts5IndexCharlenToBytelen(tls, pToken, nToken, nChar) + if nByte != 0 { + rc = sqlite3Fts5HashWrite(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, + (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid, iCol, iPos, uint8('0'+i+1), pToken, + nByte) + } + } + + return rc +} + +// Open a new iterator to iterate though all rowid that match the +// specified token or token prefix. +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) = uintptr(0) + *(*Fts5Buffer)(unsafe.Pointer(bp /* buf */)) = Fts5Buffer{} + + // If the QUERY_SCAN flag is set, all other flags must be clear. + + if sqlite3Fts5BufferSize(tls, p+52, bp, uint32(nToken+1)) == 0 { + var iIdx int32 = 0 // Index to search + var iPrefixIdx int32 = 0 // +1 prefix index + if nToken > 0 { + libc.Xmemcpy(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+1, pToken, uint64(nToken)) + } + + // Figure out which index to search and set iIdx accordingly. If this + // is a prefix query for which there is no prefix index, set iIdx to + // greater than pConfig->nPrefix to indicate that the query will be + // satisfied by scanning multiple terms in the main index. + // + // If the QUERY_TEST_NOIDX flag was specified, then this must be a + // prefix-query. Instead of using a prefix-index (if one exists), + // evaluate the prefix query using the main FTS index. This is used + // for internal sanity checking by the integrity-check in debug + // mode only. + if flags&FTS5INDEX_QUERY_PREFIX != 0 { + var nChar int32 = fts5IndexCharlen(tls, pToken, nToken) + for iIdx = 1; iIdx <= (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix; iIdx++ { + var nIdxChar int32 = *(*int32)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix + uintptr(iIdx-1)*4)) + if nIdxChar == nChar { + break + } + if nIdxChar == nChar+1 { + iPrefixIdx = iIdx + } + } + } + + if iIdx <= (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix { + // Straight index lookup + var pStruct uintptr = fts5StructureRead(tls, p) + *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp)) = U8('0' + iIdx) + if pStruct != 0 { + fts5MultiIterNew(tls, p, pStruct, flags|FTS5INDEX_QUERY_SKIPEMPTY, + pColset, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, nToken+1, -1, 0, bp+16) + fts5StructureRelease(tls, pStruct) + } + } else { + // Scan multiple terms in the main index + var bDesc int32 = libc.Bool32(flags&FTS5INDEX_QUERY_DESC != 0) + fts5SetupPrefixIter(tls, p, bDesc, iPrefixIdx, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, nToken+1, pColset, bp+16) + if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) { + + } else { + + fts5IterSetOutputCb(tls, p+52, *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */))) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var pSeg uintptr = *(*uintptr)(unsafe.Pointer(bp + 16)) + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaFirst+1*4)).FiFirst)*120 + if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 { + (*struct { + f func(*libc.TLS, uintptr, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)), pSeg) + } + } + } + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + sqlite3Fts5IterClose(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */))) + *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) = uintptr(0) + sqlite3Fts5IndexCloseReader(tls, p) + } + + *(*uintptr)(unsafe.Pointer(ppIter)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) + sqlite3Fts5BufferFree(tls, bp) + } + return fts5IndexReturn(tls, p) +} + +// Return true if the iterator passed as the only argument is at EOF. +// Move to the next matching rowid. +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ + var pIter uintptr = pIndexIter + + fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) + return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) +} + +// Move to the next matching term/rowid. Used by the fts5vocab module. +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ + var pIter uintptr = pIndexIter + var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex + + fts5MultiIterNext(tls, p, pIter, 0, int64(0)) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 + if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && int32(*(*U8)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp))) != '0' { + fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf) + (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf = uintptr(0) + (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(1) + } + } + + return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) +} + +// Move to the next matching rowid that occurs at or after iMatch. The +// definition of "at or after" depends on whether this iterator iterates +// in ascending or descending rowid order. +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ + var pIter uintptr = pIndexIter + fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) + return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) +} + +// Return the current term. +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var n int32 at bp, 4 + + var z uintptr = fts5MultiIterTerm(tls, pIndexIter, bp) + + *(*int32)(unsafe.Pointer(pn)) = *(*int32)(unsafe.Pointer(bp)) - 1 + return func() uintptr { + if z != 0 { + return z + 1 + } + return uintptr(0) + }() +} + +// Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ + if pIndexIter != 0 { + var pIter uintptr = pIndexIter + var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex + fts5MultiIterFree(tls, pIter) + sqlite3Fts5IndexCloseReader(tls, pIndex) + } +} + +// Read and decode the "averages" record from the database. +// +// Parameter anSize must point to an array of size nCol, where nCol is +// the number of user defined columns in the FTS table. +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ + var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol + var pData uintptr + + *(*I64)(unsafe.Pointer(pnRow)) = int64(0) + libc.Xmemset(tls, anSize, 0, uint64(unsafe.Sizeof(I64(0)))*uint64(nCol)) + pData = fts5DataRead(tls, p, int64(FTS5_AVERAGES_ROWID)) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Data)(unsafe.Pointer(pData)).Fnn != 0 { + var i int32 = 0 + var iCol int32 + i = i + int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(i), pnRow)) + for iCol = 0; i < (*Fts5Data)(unsafe.Pointer(pData)).Fnn && iCol < nCol; iCol++ { + i = i + int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(i), anSize+uintptr(iCol)*8)) + } + } + + fts5DataRelease(tls, pData) + return fts5IndexReturn(tls, p) +} + +// Replace the current "averages" record with the contents of the buffer +// supplied as the second argument. +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ + + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) + return fts5IndexReturn(tls, p) +} + +// Return the total number of blocks this module has read from the %_data +// table since it was created. +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ + return (*Fts5Index)(unsafe.Pointer(p)).FnRead +} + +// Set the 32-bit cookie value stored at the start of all structure +// records to the value passed as the second argument. +// +// Return SQLITE_OK if successful, or an SQLite error code if an error +// occurs. +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 // Return code + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig // Configuration object + // var aCookie [4]U8 at bp, 4 + // Binary representation of iNew + *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)) = uintptr(0) + + sqlite3Fts5Put32(tls, bp, iNew) + + rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, + ts+34641, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + if rc == SQLITE_OK { + Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) + rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) + } + + return rc +} + +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ + var pStruct uintptr + pStruct = fts5StructureRead(tls, p) + fts5StructureRelease(tls, pStruct) + return fts5IndexReturn(tls, p) +} + +// ************************************************************************ +// +// +// Below this point is the implementation of the integrity-check +// functionality. + +// Return a simple checksum value based on the arguments. +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ + var i int32 + var ret U64 = U64(iRowid) + ret = ret + (ret<<3 + U64(iCol)) + ret = ret + (ret<<3 + U64(iPos)) + if iIdx >= 0 { + ret = ret + (ret<<3 + U64('0'+iIdx)) + } + for i = 0; i < nTerm; i++ { + ret = ret + (ret<<3 + U64(*(*uint8)(unsafe.Pointer(pTerm + uintptr(i))))) + } + return ret +} + +// Check that: +// +// 1) All leaves of pSeg between iFirst and iLast (inclusive) exist and +// contain zero terms. +// 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and +// contain zero rowids. +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ + var i int32 + + // Now check that the iter.nEmpty leaves following the current leaf + // (a) exist and (b) contain no terms. + for i = iFirst; (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && i <= iLast; i++ { + var pLeaf uintptr = fts5DataRead(tls, p, I64((*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)+I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B)+I64(int64(0))<= (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + if i >= iNoRowid && 0 != int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp)) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + } + fts5DataRelease(tls, pLeaf) + } +} + +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var iTermOff int32 = 0 + var ii int32 + + *(*Fts5Buffer)(unsafe.Pointer(bp + 8 /* buf1 */)) = Fts5Buffer{} + *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf2 */)) = Fts5Buffer{} + + ii = (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf + for ii < (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + var res int32 + var iOff int32 + // var nIncr int32 at bp, 4 + + ii = ii + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(ii), bp) + iTermOff = iTermOff + *(*int32)(unsafe.Pointer(bp)) + iOff = iTermOff + + if iOff >= (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else if iTermOff == *(*int32)(unsafe.Pointer(bp)) { + // var nByte int32 at bp+4, 4 + + iOff = iOff + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff), bp+4) + if iOff+*(*int32)(unsafe.Pointer(bp + 4)) > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + sqlite3Fts5BufferSet(tls, p+52, bp+8, *(*int32)(unsafe.Pointer(bp + 4 /* nByte */)), (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff)) + } + } else { + // var nKeep int32 at bp+24, 4 + + // var nByte int32 at bp+28, 4 + + iOff = iOff + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff), bp+24) + iOff = iOff + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff), bp+28) + if *(*int32)(unsafe.Pointer(bp + 24)) > (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fn || iOff+*(*int32)(unsafe.Pointer(bp + 28)) > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + (*Fts5Buffer)(unsafe.Pointer(bp + 8 /* &buf1 */)).Fn = *(*int32)(unsafe.Pointer(bp + 24 /* nKeep */)) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+8, uint32(*(*int32)(unsafe.Pointer(bp + 28 /* nByte */))), (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff)) + } + + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + res = fts5BufferCompare(tls, bp+8, bp+32) + if res <= 0 { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + } + } + sqlite3Fts5BufferSet(tls, p+52, bp+32, (*Fts5Buffer)(unsafe.Pointer(bp+8 /* &buf1 */)).Fn, (*Fts5Buffer)(unsafe.Pointer(bp+8 /* &buf1 */)).Fp) + } + + sqlite3Fts5BufferFree(tls, bp+8) + sqlite3Fts5BufferFree(tls, bp+32) +} + +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig + *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) + var rc2 int32 + var iIdxPrevLeaf int32 = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst - 1 + var iDlidxPrevLeaf int32 = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast + + if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { + return + } + + fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, + + ts+35038, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) + + // Iterate through the b-tree hierarchy. + for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { + var iRow I64 // Rowid for this leaf + var pLeaf uintptr // Data for this leaf + + var zIdxTerm uintptr = Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 1) + var nIdxTerm int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 1) + var iIdxLeaf int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 2) + var bIdxDlidx int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 3) + + // If the leaf in question has already been trimmed from the segment, + // ignore this b-tree entry. Otherwise, load it into memory. + if iIdxLeaf < (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst { + continue + } + iRow = I64((*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B) + I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B) + I64(int64(0))<= iOff || iOff >= (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + iOff = iOff + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff), bp+32) + res = func() int32 { + if func() int32 { + if *(*int32)(unsafe.Pointer(bp + 32)) < nIdxTerm { + return *(*int32)(unsafe.Pointer(bp + 32)) + } + return nIdxTerm + }() <= 0 { + return 0 + } + return libc.Xmemcmp(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff), zIdxTerm, func() uint64 { + if *(*int32)(unsafe.Pointer(bp + 32)) < nIdxTerm { + return uint64(*(*int32)(unsafe.Pointer(bp + 32))) + } + return uint64(nIdxTerm) + }()) + }() + if res == 0 { + res = *(*int32)(unsafe.Pointer(bp + 32)) - nIdxTerm + } + if res < 0 { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + } + + fts5IntegrityCheckPgidx(tls, p, pLeaf) + } + fts5DataRelease(tls, pLeaf) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + + // Now check that the iter.nEmpty leaves following the current leaf + // (a) exist and (b) contain no terms. + fts5IndexIntegrityCheckEmpty(tls, + p, pSeg, iIdxPrevLeaf+1, iDlidxPrevLeaf+1, iIdxLeaf-1) + if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { + break + } + + // If there is a doclist-index, check that it looks right. + if bIdxDlidx != 0 { + var pDlidx uintptr = uintptr(0) // For iterating through doclist index + var iPrevLeaf int32 = iIdxLeaf + var iSegid int32 = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid + var iPg int32 = 0 + var iKey I64 + + for pDlidx = fts5DlidxIterInit(tls, p, 0, iSegid, iIdxLeaf); fts5DlidxIterEof(tls, p, pDlidx) == 0; fts5DlidxIterNext(tls, p, pDlidx) { + + // Check any rowid-less pages that occur before the current leaf. + for iPg = iPrevLeaf + 1; iPg < fts5DlidxIterPgno(tls, pDlidx); iPg++ { + iKey = I64(iSegid)<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B) + I64(int64(0))<<(FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B) + I64(int64(0))<= (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iRowidOff), bp+40) + if *(*I64)(unsafe.Pointer(bp + 40)) != fts5DlidxIterRowid(tls, pDlidx) { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + } + fts5DataRelease(tls, pLeaf) + } + } + + iDlidxPrevLeaf = iPg + fts5DlidxIterFree(tls, pDlidx) + + } else { + iDlidxPrevLeaf = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast + // TODO: Check there is no doclist index + } + + iIdxPrevLeaf = iIdxLeaf + } + + rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { + (*Fts5Index)(unsafe.Pointer(p)).Frc = rc2 + } + + // Page iter.iLeaf must now be the rightmost leaf-page in the segment +} + +// Run internal checks to ensure that the FTS index (a) is internally +// consistent and (b) contains entries for which the XOR of the checksums +// as calculated by sqlite3Fts5IndexEntryCksum() is cksum. +// +// Return SQLITE_CORRUPT if any of the internal checks fail, or if the +// checksum does not match. Return SQLITE_OK if all checks pass without +// error, or some other SQLite error code if another error (e.g. OOM) +// occurs. +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail + var cksum2 U64 = uint64(0) // Checksum based on contents of indexes + *(*Fts5Buffer)(unsafe.Pointer(bp + 16 /* poslist */)) = Fts5Buffer{} // Buffer used to hold a poslist + // var pIter uintptr at bp, 8 + // Used to iterate through entire index + var pStruct uintptr // Index structure + var iLvl int32 + var iSeg int32 + + var flags int32 = FTS5INDEX_QUERY_NOOUTPUT + + // Load the FTS index structure + pStruct = fts5StructureRead(tls, p) + if pStruct == uintptr(0) { + + return fts5IndexReturn(tls, p) + } + + // Check that the internal nodes of each segment match the leaves + for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { + for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24 /* &.aLevel */ +uintptr(iLvl)*16)).FnSeg; iSeg++ { + var pSeg uintptr = (*Fts5StructureLevel)(unsafe.Pointer(pStruct+24+uintptr(iLvl)*16)).FaSeg + uintptr(iSeg)*12 + fts5IndexIntegrityCheckSegment(tls, p, pSeg) + } + } + + // The cksum argument passed to this function is a checksum calculated + // based on all expected entries in the FTS index (including prefix index + // entries). This block checks that a checksum calculated based on the + // actual contents of FTS index is identical. + // + // Two versions of the same checksum are calculated. The first (stack + // variable cksum2) based on entries extracted from the full-text index + // while doing a linear scan of each individual index in turn. + // + // As each term visited by the linear scans, a separate query for the + // same term is performed. cksum3 is calculated based on the entries + // extracted by these queries. + for fts5MultiIterNew(tls, p, pStruct, flags, uintptr(0), uintptr(0), 0, -1, 0, bp); fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) == 0; fts5MultiIterNext(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), 0, int64(0)) { + // var n int32 at bp+8, 4 + // Size of term in bytes + *(*I64)(unsafe.Pointer(bp + 40 /* iPos */)) = int64(0) // Position read from poslist + *(*int32)(unsafe.Pointer(bp + 32 /* iOff */)) = 0 // Offset within poslist + var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), bp+8) + + // If this is a new term, query for it. Update cksum3 with the results. + + if eDetail == FTS5_DETAIL_NONE { + if 0 == fts5MultiIterIsEmpty(tls, p, *(*uintptr)(unsafe.Pointer(bp))) { + cksum2 = cksum2 ^ sqlite3Fts5IndexEntryCksum(tls, iRowid, 0, 0, -1, z, *(*int32)(unsafe.Pointer(bp + 8))) + } + } else { + (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 + fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35124) + for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { + var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) + var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) + cksum2 = cksum2 ^ sqlite3Fts5IndexEntryCksum(tls, iRowid, iCol, iTokOff, -1, z, *(*int32)(unsafe.Pointer(bp + 8))) + } + } + } + + fts5MultiIterFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) + if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && bUseCksum != 0 && cksum != cksum2 { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } + + fts5StructureRelease(tls, pStruct) + sqlite3Fts5BufferFree(tls, bp+16) + return fts5IndexReturn(tls, p) +} + +// ************************************************************************ +// +// +// Below this point is the implementation of the fts5_decode() scalar +// function only. + +// This is called as part of registering the FTS5 module with database +// connection db. It registers several user-defined scalar functions useful +// with FTS5. +// +// If successful, SQLITE_OK is returned. If an error occurs, some other +// SQLite error code is returned instead. +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ + return SQLITE_OK + _ = db + return int32(0) +} + +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ + + if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { + fts5StructureInvalidate(tls, p) + } + return fts5IndexReturn(tls, p) +} + +// 2014 Jun 09 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This is an SQLite module implementing full-text search. + +// #include "fts5Int.h" + +// This variable is set to false when running tests for which the on disk +// structures should not be corrupt. Otherwise, true. If it is false, extra +// assert() conditions in the fts5 code are activated - conditions that are +// only true if it is guaranteed that the fts5 database is not corrupt. + +type Fts5Auxdata1 = struct { + FpAux uintptr + FpPtr uintptr + FxDelete uintptr + FpNext uintptr +} /* sqlite3.c:216813:9 */ + +// 2014 Jun 09 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This is an SQLite module implementing full-text search. + +// #include "fts5Int.h" + +// This variable is set to false when running tests for which the on disk +// structures should not be corrupt. Otherwise, true. If it is false, extra +// assert() conditions in the fts5 code are activated - conditions that are +// only true if it is guaranteed that the fts5 database is not corrupt. + +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ +type Fts5Auxiliary1 = struct { + FpGlobal uintptr + FzFunc uintptr + FpUserData uintptr + FxFunc Fts5_extension_function + FxDestroy uintptr + FpNext uintptr +} /* sqlite3.c:216813:9 */ + +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ +type Fts5Cursor1 = struct { + Fbase Sqlite3_vtab_cursor + FpNext uintptr + FaColumnSize uintptr + FiCsrId I64 + FePlan int32 + FbDesc int32 + FiFirstRowid I64 + FiLastRowid I64 + FpStmt uintptr + FpExpr uintptr + FpSorter uintptr + Fcsrflags int32 + F__ccgo_pad1 [4]byte + FiSpecial I64 + FzRank uintptr + FzRankArgs uintptr + FpRank uintptr + FnRankArg int32 + F__ccgo_pad2 [4]byte + FapRankArg uintptr + FpRankArgStmt uintptr + FpAux uintptr + FpAuxdata uintptr + FaInstIter uintptr + FnInstAlloc int32 + FnInstCount int32 + FaInst uintptr +} /* sqlite3.c:216813:9 */ + +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ +type Fts5FullTable1 = struct { + Fp Fts5Table + FpStorage uintptr + FpGlobal uintptr + FpSortCsr uintptr +} /* sqlite3.c:231616:9 */ + +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ +type Fts5Sorter1 = struct { + FpStmt uintptr + FiRowid I64 + FaPoslist uintptr + FnIdx int32 + FaIdx [1]int32 +} /* sqlite3.c:216813:9 */ + +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ +type Fts5TokenizerModule1 = struct { + FzName uintptr + FpUserData uintptr + Fx Fts5_tokenizer + FxDestroy uintptr + FpNext uintptr +} /* sqlite3.c:216813:9 */ + +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ + +// NOTES ON TRANSACTIONS: +// +// SQLite invokes the following virtual table methods as transactions are +// opened and closed by the user: +// +// xBegin(): Start of a new transaction. +// xSync(): Initial part of two-phase commit. +// xCommit(): Final part of two-phase commit. +// xRollback(): Rollback the transaction. +// +// Anything that is required as part of a commit that may fail is performed +// in the xSync() callback. Current versions of SQLite ignore any errors +// returned by xCommit(). +// +// And as sub-transactions are opened/closed: +// +// xSavepoint(int S): Open savepoint S. +// xRelease(int S): Commit and close savepoint S. +// xRollbackTo(int S): Rollback to start of savepoint S. +// +// During a write-transaction the fts5_index.c module may cache some data +// in-memory. It is flushed to disk whenever xSync(), xRelease() or +// xSavepoint() is called. And discarded whenever xRollback() or xRollbackTo() +// is called. +// +// Additionally, if SQLITE_DEBUG is defined, an instance of the following +// structure is used to record the current transaction state. This information +// is not required, but it is used in the assert() statements executed by +// function fts5CheckTransactionState() (see below). +type Fts5TransactionState = struct { + FeState int32 + FiSavepoint int32 +} /* sqlite3.c:231651:1 */ + +type Fts5MatchPhrase = struct { + FpPoslist uintptr + FnTerm int32 + F__ccgo_pad1 [4]byte +} /* sqlite3.c:231708:1 */ + +// Return true if pTab is a contentless table. +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ + return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) +} + +// Delete a virtual table handle allocated by fts5InitVtab(). +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ + if pTab != 0 { + sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) + sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) + sqlite3Fts5ConfigFree(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig) + Xsqlite3_free(tls, pTab) + } +} + +// The xDisconnect() virtual table method. +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ + fts5FreeVtab(tls, pVtab) + return SQLITE_OK +} + +// The xDestroy() virtual table method. +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ + var pTab uintptr = pVtab + var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) + if rc == SQLITE_OK { + fts5FreeVtab(tls, pVtab) + } + return rc +} + +// This function is the implementation of both the xConnect and xCreate +// methods of the FTS3 virtual table. +// +// The argv[] array contains the following: +// +// argv[0] -> module name ("fts5") +// argv[1] -> database name +// argv[2] -> table name +// argv[...] -> "column name" and other module argument fields. +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pGlobal uintptr = pAux + var azConfig uintptr = argv + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK // Return code + *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)) = uintptr(0) // Results of parsing argc/argv + var pTab uintptr = uintptr(0) // New virtual table object + + // Allocate the new vtab object and parse the configuration + pTab = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5FullTable{}))) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5ConfigParse(tls, pGlobal, db, argc, azConfig, bp+8, pzErr) + + } + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig = *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal = pGlobal + } + + // Open the index sub-system + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5IndexOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)), bCreate, pTab+32, pzErr) + } + + // Open the storage sub-system + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageOpen(tls, + *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)), (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, bCreate, pTab+40, pzErr) + } + + // Call sqlite3_declare_vtab() + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5ConfigDeclareVtab(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */))) + } + + // Load the initial configuration + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + + (*Fts5Config)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)))).FpzErrmsg = pzErr + *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5IndexLoadConfig(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) + sqlite3Fts5IndexRollback(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) + (*Fts5Config)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)))).FpzErrmsg = uintptr(0) + } + + if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { + fts5FreeVtab(tls, pTab) + pTab = uintptr(0) + } else if bCreate != 0 { + + } + *(*uintptr)(unsafe.Pointer(ppVTab)) = pTab + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// The xConnect() and xCreate() methods for the virtual table. All the +// work is done in function fts5InitVtab(). +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:232015:12: */ + return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) +} + +// The different query plans. + +// Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this +// extension is currently being used by a version of SQLite too old to +// support index-info flags. In that case this function is a no-op. +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ + { + *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE + + } +} + +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ + + if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { + return 1 + } + if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_LIKE && + (int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_LIKE || int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB) { + return 1 + } + return 0 +} + +// Implementation of the xBestIndex method for FTS5 tables. Within the +// WHERE constraint, it searches for the following: +// +// 1. A MATCH constraint against the table column. +// 2. A MATCH constraint against the "rank" column. +// 3. A MATCH constraint against some other column. +// 4. An == constraint against the rowid column. +// 5. A < or <= constraint against the rowid column. +// 6. A > or >= constraint against the rowid column. +// +// Within the ORDER BY, the following are supported: +// +// 5. ORDER BY rank [ASC|DESC] +// 6. ORDER BY rowid [ASC|DESC] +// +// Information for the xFilter call is passed via both the idxNum and +// idxStr variables. Specifically, idxNum is a bitmask of the following +// flags used to encode the ORDER BY clause: +// +// FTS5_BI_ORDER_RANK +// FTS5_BI_ORDER_ROWID +// FTS5_BI_ORDER_DESC +// +// idxStr is used to encode data from the WHERE clause. For each argument +// passed to the xFilter method, the following is appended to idxStr: +// +// Match against table column: "m" +// Match against rank column: "r" +// Match against other column: "M" +// LIKE against other column: "L" +// GLOB against other column: "G" +// Equality constraint against the rowid: "=" +// A < or <= against the rowid: "<" +// A > or >= against the rowid: ">" +// +// This function ensures that there is at most one "r" or "=". And that if +// there exists an "=" then there is no "<" or ">". +// +// Costs are assigned as follows: +// +// a) If an unusable MATCH operator is present in the WHERE clause, the +// cost is unconditionally set to 1e50 (a really big number). +// +// a) If a MATCH operator is present, the cost depends on the other +// constraints also present. As follows: +// +// * No other constraints: cost=1000.0 +// * One rowid range constraint: cost=750.0 +// * Both rowid range constraints: cost=500.0 +// * An == rowid constraint: cost=100.0 +// +// b) Otherwise, if there is no MATCH: +// +// * No other constraints: cost=1000000.0 +// * One rowid range constraint: cost=750000.0 +// * Both rowid range constraints: cost=250000.0 +// * An == rowid constraint: cost=10.0 +// +// Costs are not modified by the ORDER BY clause. +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pTab uintptr = pVTab + var pConfig uintptr = (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig + var nCol int32 = (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol + var idxFlags int32 = 0 // Parameter passed through to xFilter() + var i int32 + var idxStr uintptr + var iIdxStr int32 = 0 + var iCons int32 = 0 + + var bSeenEq int32 = 0 + var bSeenGt int32 = 0 + var bSeenLt int32 = 0 + var bSeenMatch int32 = 0 + var bSeenRank int32 = 0 + + if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { + (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, + ts+35129, 0) + return SQLITE_ERROR + } + + idxStr = Xsqlite3_malloc(tls, (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FnConstraint*8+1) + if idxStr == uintptr(0) { + return SQLITE_NOMEM + } + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FidxStr = idxStr + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FneedToFreeIdxStr = 1 + + for i = 0; i < (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FnConstraint; i++ { + var p uintptr = (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraint + uintptr(i)*12 + var iCol int32 = (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH || + int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ && iCol >= nCol { + // A MATCH operator or equivalent + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable) == 0 || iCol < 0 { + // As there exists an unusable MATCH constraint this is an + // unusable plan. Set a prohibitively high cost. + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = 1e50 + + *(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr))) = uint8(0) + return SQLITE_OK + } else { + if iCol == nCol+1 { + if bSeenRank != 0 { + continue + } + *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('r') + bSeenRank = 1 + } else if iCol >= 0 { + bSeenMatch = 1 + *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('M') + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4917, libc.VaList(bp, iCol)) + idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) + + } + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1) + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) + } + } else if (*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0 { + if iCol >= 0 && iCol < nCol && fts5UsePatternMatch(tls, pConfig, p) != 0 { + + *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = func() uint8 { + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_LIKE { + return uint8('L') + } + return uint8('G') + }() + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4917, libc.VaList(bp+8, iCol)) + idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1) + + } else if bSeenEq == 0 && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ && iCol < 0 { + *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('=') + bSeenEq = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1) + } + } + } + + if bSeenEq == 0 { + for i = 0; i < (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FnConstraint; i++ { + var p uintptr = (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraint + uintptr(i)*12 + if (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn < 0 && (*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0 { + var op int32 = int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) + if op == SQLITE_INDEX_CONSTRAINT_LT || op == SQLITE_INDEX_CONSTRAINT_LE { + if bSeenLt != 0 { + continue + } + *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('<') + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1) + bSeenLt = 1 + } else if op == SQLITE_INDEX_CONSTRAINT_GT || op == SQLITE_INDEX_CONSTRAINT_GE { + if bSeenGt != 0 { + continue + } + *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('>') + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1) + bSeenGt = 1 + } + } + } + } + *(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr))) = uint8(0) + + // Set idxFlags flags for the ORDER BY clause + if (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FnOrderBy == 1 { + var iSort int32 = (*sqlite3_index_orderby)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaOrderBy)).FiColumn + if iSort == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1 && bSeenMatch != 0 { + idxFlags = idxFlags | FTS5_BI_ORDER_RANK + } else if iSort == -1 { + idxFlags = idxFlags | FTS5_BI_ORDER_ROWID + } + if idxFlags&(FTS5_BI_ORDER_RANK|FTS5_BI_ORDER_ROWID) != 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).ForderByConsumed = 1 + if (*sqlite3_index_orderby)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaOrderBy)).Fdesc != 0 { + idxFlags = idxFlags | FTS5_BI_ORDER_DESC + } + } + } + + // Calculate the estimated cost based on the flags set in idxFlags. + if bSeenEq != 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = func() float64 { + if bSeenMatch != 0 { + return 100.0 + } + return 10.0 + }() + if bSeenMatch == 0 { + fts5SetUniqueFlag(tls, pInfo) + } + } else if bSeenLt != 0 && bSeenGt != 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = func() float64 { + if bSeenMatch != 0 { + return 500.0 + } + return 250000.0 + }() + } else if bSeenLt != 0 || bSeenGt != 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = func() float64 { + if bSeenMatch != 0 { + return 750.0 + } + return 750000.0 + }() + } else { + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = func() float64 { + if bSeenMatch != 0 { + return 1000.0 + } + return 1000000.0 + }() + } + + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FidxNum = idxFlags + return SQLITE_OK +} + +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ + var pCsr uintptr + for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { + return SQLITE_OK + } + } + return sqlite3Fts5StorageReset(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) +} + +// Implementation of xOpen method. +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ + var pTab uintptr = pVTab + var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + var pCsr uintptr = uintptr(0) // New cursor object + var nByte Sqlite3_int64 // Bytes of space to allocate + var rc int32 // Return code + + rc = fts5NewTransaction(tls, pTab) + if rc == SQLITE_OK { + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Cursor{})) + uint64((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*uint64(unsafe.Sizeof(int32(0)))) + pCsr = Xsqlite3_malloc64(tls, uint64(nByte)) + if pCsr != 0 { + var pGlobal uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal + libc.Xmemset(tls, pCsr, 0, Size_t(nByte)) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize = pCsr + 1*184 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr + (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr = pCsr + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId = libc.PreIncInt64(&(*Fts5Global)(unsafe.Pointer(pGlobal)).FiNextId, 1) + } else { + rc = SQLITE_NOMEM + } + } + *(*uintptr)(unsafe.Pointer(ppCsr)) = pCsr + return rc +} + +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { + return FTS5_STMT_SCAN_DESC + } + return FTS5_STMT_SCAN_ASC + } + return FTS5_STMT_LOOKUP +} + +// This function is called after the cursor passed as the only argument +// is moved to point at a different row. It clears all cached data +// specific to the previous row stored by the cursor object. +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST +} + +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var pData uintptr + var pNext uintptr + + Xsqlite3_free(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter) + Xsqlite3_free(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst) + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt != 0 { + var eStmt int32 = fts5StmtType(tls, pCsr) + sqlite3Fts5StorageStmtRelease(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, eStmt, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) + } + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { + var pSorter uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter + Xsqlite3_finalize(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) + Xsqlite3_free(tls, pSorter) + } + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan != FTS5_PLAN_SOURCE { + sqlite3Fts5ExprFree(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) + } + + for pData = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAuxdata; pData != 0; pData = pNext { + pNext = (*Fts5Auxdata)(unsafe.Pointer(pData)).FpNext + if (*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete})).f(tls, (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr) + } + Xsqlite3_free(tls, pData) + } + + Xsqlite3_finalize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRankArgStmt) + Xsqlite3_free(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg) + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_FREE_ZRANK != 0 { + Xsqlite3_free(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank) + Xsqlite3_free(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs) + } + + sqlite3Fts5IndexCloseReader(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) + libc.Xmemset(tls, pCsr+32, 0, uint64(unsafe.Sizeof(Fts5Cursor{}))-uint64((int64(pCsr+32)-int64(pCsr))/1)) +} + +// Close the cursor. For additional information see the documentation +// on the xClose method of the virtual table interface. +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ + if pCursor != 0 { + var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab + var pCsr uintptr = pCursor + var pp uintptr + + fts5FreeCursorComponents(tls, pCsr) + // Remove the cursor from the Fts5Global.pCsr list + for pp = (*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal + 72; *(*uintptr)(unsafe.Pointer(pp)) != pCsr; pp = *(*uintptr)(unsafe.Pointer(pp)) + 8 { + } + *(*uintptr)(unsafe.Pointer(pp)) = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext + + Xsqlite3_free(tls, pCsr) + } + return SQLITE_OK +} + +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pSorter uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter + var rc int32 + + rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) + if rc == SQLITE_DONE { + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT + } else if rc == SQLITE_ROW { + var a uintptr + var aBlob uintptr + var nBlob int32 + var i int32 + var iOff int32 = 0 + rc = SQLITE_OK + + (*Fts5Sorter)(unsafe.Pointer(pSorter)).FiRowid = Xsqlite3_column_int64(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt, 0) + nBlob = Xsqlite3_column_bytes(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt, 1) + aBlob = libc.AssignUintptr(&a, Xsqlite3_column_blob(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt, 1)) + + // nBlob==0 in detail=none mode. + if nBlob > 0 { + for i = 0; i < (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx-1; i++ { + // var iVal int32 at bp, 4 + + a += uintptr(sqlite3Fts5GetVarint32(tls, a, bp)) + iOff = iOff + *(*int32)(unsafe.Pointer(bp)) + *(*int32)(unsafe.Pointer(pSorter + 28 + uintptr(i)*4)) = iOff + } + *(*int32)(unsafe.Pointer(pSorter + 28 + uintptr(i)*4)) = int32((int64(aBlob+uintptr(nBlob)) - int64(a)) / 1) + (*Fts5Sorter)(unsafe.Pointer(pSorter)).FaPoslist = a + } + + fts5CsrNewrow(tls, pCsr) + } + + return rc +} + +// Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors +// open on table pTab. +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ + var pCsr uintptr + for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && + (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_RESEEK + } + } +} + +// If the REQUIRE_RESEEK flag is set on the cursor passed as the first +// argument, close and reopen all Fts5IndexIter iterators that the cursor +// is using. Then attempt to move the cursor to a rowid equal to or laster +// (in the cursors sort order - ASC or DESC) than the current rowid. +// +// If the new rowid is not equal to the old, set output parameter *pbSkip +// to 1 before returning. Otherwise, leave it unchanged. +// +// Return SQLITE_OK if successful or if no reseek was required, or an +// error code if an error occurred. +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ + var rc int32 = SQLITE_OK + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var bDesc int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc + var iRowid I64 = sqlite3Fts5ExprRowid(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) + + rc = sqlite3Fts5ExprFirst(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, iRowid, bDesc) + if rc == SQLITE_OK && iRowid != sqlite3Fts5ExprRowid(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) { + *(*int32)(unsafe.Pointer(pbSkip)) = 1 + } + + *(*int32)(unsafe.Pointer(pCsr + 80)) &= libc.CplInt32(FTS5CSR_REQUIRE_RESEEK) + fts5CsrNewrow(tls, pCsr) + if sqlite3Fts5ExprEof(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) != 0 { + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pbSkip)) = 1 + } + } + return rc +} + +// Advance the cursor to the next row in the table that matches the +// search criteria. +// +// Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned +// even if we reach end-of-file. The fts5EofMethod() will be called +// subsequently to determine whether or not an EOF was hit. +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var pCsr uintptr = pCursor + var rc int32 + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan < 3 { + *(*int32)(unsafe.Pointer(bp + 8 /* bSkip */)) = 0 + if libc.AssignInt32(&rc, fts5CursorReseek(tls, pCsr, bp+8)) != 0 || *(*int32)(unsafe.Pointer(bp + 8)) != 0 { + return rc + } + rc = sqlite3Fts5ExprNext(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiLastRowid) + *(*int32)(unsafe.Pointer(pCsr + 80)) |= sqlite3Fts5ExprEof(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) + fts5CsrNewrow(tls, pCsr) + } else { + switch (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan { + case FTS5_PLAN_SPECIAL: + { + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + rc = SQLITE_OK + break + + } + fallthrough + + case FTS5_PLAN_SORTED_MATCH: + { + rc = fts5SorterNext(tls, pCsr) + break + + } + fallthrough + + default: + { + var pConfig uintptr = (*Fts5Table)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FpConfig + (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock++ + rc = Xsqlite3_step(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) + (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock-- + if rc != SQLITE_ROW { + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + rc = Xsqlite3_reset(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) + if rc != SQLITE_OK { + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, + ts+3605, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + } + } else { + rc = SQLITE_OK + } + break + + } + } + } + + return rc +} + +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) = uintptr(0) + var rc int32 + var zSql uintptr + var ap Va_list + _ = ap + + ap = va + zSql = Xsqlite3_vmprintf(tls, zFmt, ap) + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + rc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, + uint32(SQLITE_PREPARE_PERSISTENT), bp+8, uintptr(0)) + if rc != SQLITE_OK { + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + } + Xsqlite3_free(tls, zSql) + } + + _ = ap + *(*uintptr)(unsafe.Pointer(ppStmt)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) + return rc +} + +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + var pSorter uintptr + var nPhrase int32 + var nByte Sqlite3_int64 + var rc int32 + var zRank uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank + var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs + + nPhrase = sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Sorter{})) + uint64(unsafe.Sizeof(int32(0)))*uint64(nPhrase-1)) + pSorter = Xsqlite3_malloc64(tls, uint64(nByte)) + if pSorter == uintptr(0) { + return SQLITE_NOMEM + } + libc.Xmemset(tls, pSorter, 0, Size_t(nByte)) + (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase + + // TODO: It would be better to have some system for reusing statement + // handles here, rather than preparing a new one for each query. But that + // is not possible as SQLite reference counts the virtual table objects. + // And since the statement required here reads from this very virtual + // table, saving it creates a circular reference. + // + // If SQLite a built-in statement cache, this wouldn't be a problem. + rc = fts5PrepareStatement(tls, pSorter, pConfig, + ts+35168, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, + func() uintptr { + if zRankArgs != 0 { + return ts + 14542 /* ", " */ + } + return ts + 1525 /* "" */ + }(), + func() uintptr { + if zRankArgs != 0 { + return zRankArgs + } + return ts + 1525 + }(), + func() uintptr { + if bDesc != 0 { + return ts + 35223 /* "DESC" */ + } + return ts + 35228 /* "ASC" */ + }())) + + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter + if rc == SQLITE_OK { + + (*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr = pCsr + rc = fts5SorterNext(tls, pCsr) + (*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr = uintptr(0) + } + + if rc != SQLITE_OK { + Xsqlite3_finalize(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) + Xsqlite3_free(tls, pSorter) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = uintptr(0) + } + + return rc +} + +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ + var rc int32 + var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr + rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) + if sqlite3Fts5ExprEof(tls, pExpr) != 0 { + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + } + fts5CsrNewrow(tls, pCsr) + return rc +} + +// Process a "special" query. A special query is identified as one with a +// MATCH expression that begins with a '*' character. The remainder of +// the text passed to the MATCH operator are used as the special query +// parameters. +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var rc int32 = SQLITE_OK // Return code + var z uintptr = zQuery // Special query text + var n int32 // Number of bytes in text at z + + for int32(*(*uint8)(unsafe.Pointer(z))) == ' ' { + z++ + } + for n = 0; *(*uint8)(unsafe.Pointer(z + uintptr(n))) != 0 && int32(*(*uint8)(unsafe.Pointer(z + uintptr(n)))) != ' '; n++ { + } + + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL + + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35232, z, n) { + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+4999, z, n) { + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId + } else { + // An unrecognized directive. Return an error message. + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35238, libc.VaList(bp, n, z)) + rc = SQLITE_ERROR + } + + return rc +} + +// Search for an auxiliary function named zName that can be used with table +// pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary +// structure. Otherwise, if no such function exists, return NULL. +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ + var pAux uintptr + + for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { + if Xsqlite3_stricmp(tls, zName, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FzFunc) == 0 { + return pAux + } + } + + // No function of the specified name was found. Return 0. + return uintptr(0) +} + +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + var pAux uintptr = uintptr(0) + var zRank uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank + var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs + + if zRankArgs != 0 { + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35266, libc.VaList(bp, zRankArgs)) + if zSql != 0 { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, + uint32(SQLITE_PREPARE_PERSISTENT), bp+24, uintptr(0)) + Xsqlite3_free(tls, zSql) + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { + var nByte Sqlite3_int64 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg)) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg = sqlite3Fts5MallocZero(tls, bp+16, nByte) + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + var i int32 + for i = 0; i < (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg; i++ { + *(*uintptr)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg + uintptr(i)*8)) = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), i) + } + } + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRankArgStmt = *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) + } else { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) + + } + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + pAux = fts5FindAuxiliary(tls, pTab, zRank) + if pAux == uintptr(0) { + + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35276, libc.VaList(bp+8, zRank)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR + } + } + + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRank = pAux + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var rc int32 = SQLITE_OK + if pRank != 0 { + var z uintptr = Xsqlite3_value_text(tls, pRank) + *(*uintptr)(unsafe.Pointer(bp + 8 /* zRank */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zRankArgs */)) = uintptr(0) + + if z == uintptr(0) { + if Xsqlite3_value_type(tls, pRank) == SQLITE_NULL { + rc = SQLITE_ERROR + } + } else { + rc = sqlite3Fts5ConfigParseRank(tls, z, bp+8, bp+16) + } + if rc == SQLITE_OK { + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = *(*uintptr)(unsafe.Pointer(bp + 8 /* zRank */)) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = *(*uintptr)(unsafe.Pointer(bp + 16 /* zRankArgs */)) + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK + } else if rc == SQLITE_ERROR { + (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, + ts+35297, libc.VaList(bp, z)) + } + } else { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs + } else { + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33680 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) + } + } + return rc +} + +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ + if pVal != 0 { + var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) + if eType == SQLITE_INTEGER { + return Xsqlite3_value_int64(tls, pVal) + } + } + return iDefault +} + +// This is the xFilter interface for the virtual table. See +// the virtual table xFilter method documentation for additional +// information. +// +// There are three possible query strategies: +// +// 1. Full-text search using a MATCH operator. +// 2. A by-rowid lookup. +// 3. A full-table scan. +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + var pTab uintptr + var pConfig uintptr + var pCsr uintptr + var rc int32 // Error code + var bDesc int32 // True if ORDER BY [rank|rowid] DESC + var bOrderByRank int32 // True if ORDER BY rank + var pRank uintptr // rank MATCH ? expression (or NULL) + var pRowidEq uintptr // rowid = ? expression (or NULL) + var pRowidLe uintptr // rowid <= ? expression (or NULL) + var pRowidGe uintptr // rowid >= ? expression (or NULL) + var iCol int32 // Column on LHS of MATCH operator + var pzErrmsg uintptr + var i int32 + var iIdxStr int32 + // var pExpr uintptr at bp+8, 8 + + var pzErr uintptr + var zText uintptr + var bGlob int32 + var zText1 uintptr + pTab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab + pConfig = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + pCsr = pCursor + rc = SQLITE_OK + pRank = uintptr(0) + pRowidEq = uintptr(0) + pRowidLe = uintptr(0) + pRowidGe = uintptr(0) + pzErrmsg = (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg + iIdxStr = 0 + *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */)) = uintptr(0) + + if !((*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0) { + goto __1 + } + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, + ts+35129, 0) + return SQLITE_ERROR +__1: + ; + + if !((*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan != 0) { + goto __2 + } + fts5FreeCursorComponents(tls, pCsr) + libc.Xmemset(tls, pCsr+32, 0, uint64(unsafe.Sizeof(Fts5Cursor{}))-uint64((int64(pCsr+32)-int64(pCsr))/1)) +__2: + ; + + (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg = pTab + 16 + + // Decode the arguments passed through to this function. + i = 0 +__3: + if !(i < nVal) { + goto __5 + } + switch int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1))))) { + case 'r': + goto __7 + case 'M': + goto __8 + case 'L': + goto __9 + case 'G': + goto __10 + case '=': + goto __11 + case '<': + goto __12 + default: + goto __13 + } + goto __6 +__7: + pRank = *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) + goto __6 +__8: + zText = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) + if !(zText == uintptr(0)) { + goto __14 + } + zText = ts + 1525 /* "" */ +__14: + ; + iCol = 0 +__15: + iCol = iCol*10 + (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) - '0') + iIdxStr++ + goto __16 +__16: + if int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) <= '9' { + goto __15 + } + goto __17 +__17: + ; + + if !(int32(*(*uint8)(unsafe.Pointer(zText))) == '*') { + goto __18 + } + // The user has issued a query of the form "MATCH '*...'". This + // indicates that the MATCH expression is not a full text query, + // but a request for an internal parameter. + rc = fts5SpecialMatch(tls, pTab, pCsr, zText+1) + goto filter_out + goto __19 +__18: + pzErr = pTab + 16 + rc = sqlite3Fts5ExprNew(tls, pConfig, 0, iCol, zText, bp+8, pzErr) + if !(rc == SQLITE_OK) { + goto __20 + } + rc = sqlite3Fts5ExprAnd(tls, pCsr+64, *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */))) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */)) = uintptr(0) +__20: + ; + if !(rc != SQLITE_OK) { + goto __21 + } + goto filter_out +__21: + ; +__19: + ; + + goto __6 + +__9: +__10: + bGlob = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr-1)))) == 'G') + zText1 = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) + iCol = 0 +__22: + iCol = iCol*10 + (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) - '0') + iIdxStr++ + goto __23 +__23: + if int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) <= '9' { + goto __22 + } + goto __24 +__24: + ; + if !(zText1 != 0) { + goto __25 + } + rc = sqlite3Fts5ExprPattern(tls, pConfig, bGlob, iCol, zText1, bp+8) +__25: + ; + if !(rc == SQLITE_OK) { + goto __26 + } + rc = sqlite3Fts5ExprAnd(tls, pCsr+64, *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */))) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */)) = uintptr(0) +__26: + ; + if !(rc != SQLITE_OK) { + goto __27 + } + goto filter_out +__27: + ; + goto __6 + +__11: + pRowidEq = *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) + goto __6 +__12: + pRowidLe = *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) + goto __6 +__13: + ; + pRowidGe = *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) + goto __6 +__6: + ; + goto __4 +__4: + i++ + goto __3 + goto __5 +__5: + ; + bOrderByRank = func() int32 { + if idxNum&FTS5_BI_ORDER_RANK != 0 { + return 1 + } + return 0 + }() + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc = libc.AssignInt32(&bDesc, func() int32 { + if idxNum&FTS5_BI_ORDER_DESC != 0 { + return 1 + } + return 0 + }()) + + // Set the cursor upper and lower rowid limits. Only some strategies + // actually use them. This is ok, as the xBestIndex() method leaves the + // sqlite3_index_constraint.omit flag clear for range constraints + // on the rowid field. + if !(pRowidEq != 0) { + goto __28 + } + pRowidLe = libc.AssignUintptr(&pRowidGe, pRowidEq) +__28: + ; + if !(bDesc != 0) { + goto __29 + } + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid = fts5GetRowidLimit(tls, pRowidLe, int64(0xffffffff)|I64(int64(0x7fffffff))<<32) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiLastRowid = fts5GetRowidLimit(tls, pRowidGe, int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) + goto __30 +__29: + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiLastRowid = fts5GetRowidLimit(tls, pRowidLe, int64(0xffffffff)|I64(int64(0x7fffffff))<<32) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid = fts5GetRowidLimit(tls, pRowidGe, int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) +__30: + ; + + if !((*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr != 0) { + goto __31 + } + // If pSortCsr is non-NULL, then this call is being made as part of + // processing for a "... MATCH ORDER BY rank" query (ePlan is + // set to FTS5_PLAN_SORTED_MATCH). pSortCsr is the cursor that will + // return results to the user for this query. The current cursor + // (pCursor) is used to execute the query issued by function + // fts5CursorFirstSorted() above. + + if !((*Fts5Cursor)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr)).FbDesc != 0) { + goto __33 + } + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiLastRowid = (*Fts5Cursor)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr)).FiFirstRowid + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid = (*Fts5Cursor)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr)).FiLastRowid + goto __34 +__33: + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiLastRowid = (*Fts5Cursor)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr)).FiLastRowid + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid = (*Fts5Cursor)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr)).FiFirstRowid +__34: + ; + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SOURCE + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr = (*Fts5Cursor)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr)).FpExpr + rc = fts5CursorFirst(tls, pTab, pCsr, bDesc) + goto __32 +__31: + if !((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr != 0) { + goto __35 + } + rc = fts5CursorParseRank(tls, pConfig, pCsr, pRank) + if !(rc == SQLITE_OK) { + goto __37 + } + if !(bOrderByRank != 0) { + goto __38 + } + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SORTED_MATCH + rc = fts5CursorFirstSorted(tls, pTab, pCsr, bDesc) + goto __39 +__38: + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_MATCH + rc = fts5CursorFirst(tls, pTab, pCsr, bDesc) +__39: + ; +__37: + ; + goto __36 +__35: + if !((*Fts5Config)(unsafe.Pointer(pConfig)).FzContent == uintptr(0)) { + goto __40 + } + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, + ts+35330, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + rc = SQLITE_ERROR + goto __41 +__40: + // This is either a full-table scan (ePlan==FTS5_PLAN_SCAN) or a lookup + // by rowid (ePlan==FTS5_PLAN_ROWID). + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = func() int32 { + if pRowidEq != 0 { + return FTS5_PLAN_ROWID + } + return FTS5_PLAN_SCAN + }() + rc = sqlite3Fts5StorageStmt(tls, + (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, fts5StmtType(tls, pCsr), pCsr+56, pTab+16) + if !(rc == SQLITE_OK) { + goto __42 + } + if !(pRowidEq != uintptr(0)) { + goto __43 + } + + Xsqlite3_bind_value(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, 1, pRowidEq) + goto __44 +__43: + Xsqlite3_bind_int64(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, 1, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid) + Xsqlite3_bind_int64(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, 2, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiLastRowid) +__44: + ; + rc = fts5NextMethod(tls, pCursor) +__42: + ; +__41: + ; +__36: + ; +__32: + ; + +filter_out: + sqlite3Fts5ExprFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */))) + (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg = pzErrmsg + return rc +} + +// This is the xEof method of the virtual table. SQLite calls this +// routine to find out if it has reached the end of a result set. +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ + var pCsr uintptr = pCursor + return func() int32 { + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { + return 1 + } + return 0 + }() +} + +// Return the rowid that the cursor currently points to. +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { + return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid + } else { + return sqlite3Fts5ExprRowid(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) + } + return I64(0) +} + +// This is the xRowid method. The SQLite core calls this routine to +// retrieve the rowid for the current row of the result set. fts5 +// exposes %_content.rowid as the rowid for the virtual table. The +// rowid should be written to *pRowid. +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ + var pCsr uintptr = pCursor + var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan + + switch ePlan { + case FTS5_PLAN_SPECIAL: + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = int64(0) + break + + case FTS5_PLAN_SOURCE: + fallthrough + case FTS5_PLAN_MATCH: + fallthrough + case FTS5_PLAN_SORTED_MATCH: + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = fts5CursorRowid(tls, pCsr) + break + + default: + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Xsqlite3_column_int64(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, 0) + break + } + + return SQLITE_OK +} + +// If the cursor requires seeking (bSeekRequired flag is set), seek it. +// Return SQLITE_OK if no error occurs, or an SQLite error code otherwise. +// +// If argument bErrormsg is true and an error occurs, an error message may +// be left in sqlite3_vtab.zErrMsg. +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + + // If the cursor does not yet have a statement handle, obtain one now. + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt == uintptr(0) { + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var eStmt int32 = fts5StmtType(tls, pCsr) + rc = sqlite3Fts5StorageStmt(tls, + (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, eStmt, pCsr+56, func() uintptr { + if bErrormsg != 0 { + return pTab + 16 + } + return uintptr(0) + }()) + + } + + if rc == SQLITE_OK && (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_CONTENT != 0 { + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + + Xsqlite3_reset(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) + Xsqlite3_bind_int64(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, 1, fts5CursorRowid(tls, pCsr)) + (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FbLock++ + rc = Xsqlite3_step(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) + (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FbLock-- + if rc == SQLITE_ROW { + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(pCsr + 80)) &= libc.CplInt32(FTS5CSR_REQUIRE_CONTENT) + } else { + rc = Xsqlite3_reset(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) + if rc == SQLITE_OK { + rc = SQLITE_CORRUPT | int32(1)<<8 + } else if (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FpzErrmsg != 0 { + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, + ts+3605, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + } + } + } + return rc +} + +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ + var ap Va_list + _ = ap // ... printf arguments + ap = va + + (*Fts5FullTable)(unsafe.Pointer(p)).Fp.Fbase.FzErrMsg = Xsqlite3_vmprintf(tls, zFormat, ap) + _ = ap +} + +// This function is called to handle an FTS INSERT command. In other words, +// an INSERT statement of the form: +// +// INSERT INTO fts(fts) VALUES($pCmd) +// INSERT INTO fts(fts, rank) VALUES($pCmd, $pVal) +// +// Argument pVal is the value assigned to column "fts" by the INSERT +// statement. This function returns SQLITE_OK if successful, or an SQLite +// error code if an error occurs. +// +// The commands implemented by this function are documented in the "Special +// INSERT Directives" section of the documentation. It should be updated if +// more commands are added to this function. +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + var rc int32 = SQLITE_OK + *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 + + if 0 == Xsqlite3_stricmp(tls, ts+35366, zCmd) { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { + fts5SetVtabError(tls, pTab, + + ts+35377, 0) + rc = SQLITE_ERROR + } else { + rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) + } + } else if 0 == Xsqlite3_stricmp(tls, ts+35457, zCmd) { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { + fts5SetVtabError(tls, pTab, + ts+35465, 0) + rc = SQLITE_ERROR + } else { + rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) + } + } else if 0 == Xsqlite3_stricmp(tls, ts+16832, zCmd) { + rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) + } else if 0 == Xsqlite3_stricmp(tls, ts+35521, zCmd) { + var nMerge int32 = Xsqlite3_value_int(tls, pVal) + rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) + } else if 0 == Xsqlite3_stricmp(tls, ts+35527, zCmd) { + var iArg int32 = Xsqlite3_value_int(tls, pVal) + rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) + } else { + rc = sqlite3Fts5IndexLoadConfig(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) + if rc == SQLITE_OK { + rc = sqlite3Fts5ConfigSetValue(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig, zCmd, pVal, bp) + } + if rc == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp)) != 0 { + rc = SQLITE_ERROR + } else { + rc = sqlite3Fts5StorageConfigValue(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zCmd, pVal, 0) + } + } + } + return rc +} + +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ + var rc int32 = SQLITE_OK + var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) + if eType1 == SQLITE_INTEGER { + var iDel Sqlite3_int64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) + rc = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iDel, apVal+2*8) + } + return rc +} + +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ + var rc int32 = *(*int32)(unsafe.Pointer(pRc)) + if rc == SQLITE_OK { + rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5StorageIndexInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, *(*I64)(unsafe.Pointer(piRowid))) + } + *(*int32)(unsafe.Pointer(pRc)) = rc +} + +// This function is the implementation of the xUpdate callback used by +// FTS3 virtual tables. It is invoked by SQLite each time a row is to be +// inserted, updated or deleted. +// +// A delete specifies a single argument - the rowid of the row to remove. +// +// Update and insert operations pass: +// +// 1. The "old" rowid, or NULL. +// 2. The "new" rowid. +// 3. Values for each of the nCol matchable columns. +// 4. Values for the two hidden columns ( and "rank"). +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var pTab uintptr = pVtab + var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + var eType0 int32 // value_type() of apVal[0] + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK // Return code + + // A transaction must be open when this is called. + + (*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FpzErrmsg = pTab + 16 + + // Put any active cursors into REQUIRE_SEEK state. + fts5TripCursors(tls, pTab) + + eType0 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal))) + if eType0 == SQLITE_NULL && + Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != SQLITE_NULL { + // A "special" INSERT op. These are handled separately. + var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && + 0 == Xsqlite3_stricmp(tls, ts+17377, z) { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) + } else { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) + } + } else { + // A regular INSERT, UPDATE or DELETE statement. The trick here is that + // any conflict on the rowid value must be detected before any + // modifications are made to the database file. There are 4 cases: + // + // 1) DELETE + // 2) UPDATE (rowid not modified) + // 3) UPDATE (rowid modified) + // 4) INSERT + // + // Cases 3 and 4 may violate the rowid constraint. + var eConflict int32 = SQLITE_ABORT + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { + eConflict = Xsqlite3_vtab_on_conflict(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb) + } + + // Filter out attempts to run UPDATE or DELETE on contentless tables. + // This is not suported. + if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, + ts+35543, + libc.VaList(bp, func() uintptr { + if nArg > 1 { + return ts + 20276 /* "UPDATE" */ + } + return ts + 35580 /* "DELETE from" */ + }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR + } else if nArg == 1 { + var iDel I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal))) // Rowid to delete + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iDel, uintptr(0)) + } else { + var eType1 int32 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) + + if eType1 != SQLITE_INTEGER && eType1 != SQLITE_NULL { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_MISMATCH + } else if eType0 != SQLITE_INTEGER { + // If this is a REPLACE, first remove the current entry (if any) + if eConflict == SQLITE_REPLACE && eType1 == SQLITE_INTEGER { + var iNew I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) // Rowid to delete + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) + } + fts5StorageInsert(tls, bp+16, pTab, apVal, pRowid) + } else { + var iOld I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal))) // Old rowid + var iNew I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) // New rowid + if eType1 == SQLITE_INTEGER && iOld != iNew { + if eConflict == SQLITE_REPLACE { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) + } + fts5StorageInsert(tls, bp+16, pTab, apVal, pRowid) + } else { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, pRowid) + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) + } + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageIndexInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, *(*Sqlite_int64)(unsafe.Pointer(pRowid))) + } + } + } else { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) + fts5StorageInsert(tls, bp+16, pTab, apVal, pRowid) + } + } + } + } + + (*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FpzErrmsg = uintptr(0) + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +// Implementation of xSync() method. +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ + var rc int32 + var pTab uintptr = pVtab + + (*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FpzErrmsg = pTab + 16 + fts5TripCursors(tls, pTab) + rc = sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) + (*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FpzErrmsg = uintptr(0) + return rc +} + +// Implementation of xBegin() method. +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ + + fts5NewTransaction(tls, pVtab) + return SQLITE_OK +} + +// Implementation of xCommit() method. This is a no-op. The contents of +// the pending-terms hash-table have already been flushed into the database +// by fts5SyncMethod(). +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ + _ = pVtab // Call below is a no-op for NDEBUG builds + + return SQLITE_OK +} + +// Implementation of xRollback(). Discard the contents of the pending-terms +// hash-table. Any changes made to the database are reverted by SQLite. +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ + var rc int32 + var pTab uintptr = pVtab + + rc = sqlite3Fts5StorageRollback(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) + return rc +} + +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ + var pCsr uintptr = pCtx + return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData +} + +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ + var pCsr uintptr = pCtx + return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol +} + +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ + var pCsr uintptr = pCtx + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) +} + +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ + var pCsr uintptr = pCtx + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) +} + +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ + var pCsr uintptr = pCtx + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + return sqlite3Fts5Tokenize(tls, + (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) +} + +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ + var pCsr uintptr = pCtx + return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) +} + +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ + var pCsr uintptr = pCtx + return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) +} + +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ + var rc int32 = SQLITE_OK + var pCsr uintptr = pCtx + if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SPECIAL { + *(*uintptr)(unsafe.Pointer(pz)) = uintptr(0) + *(*int32)(unsafe.Pointer(pn)) = 0 + } else { + rc = fts5SeekCursor(tls, pCsr, 0) + if rc == SQLITE_OK { + *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3_column_text(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, iCol+1) + *(*int32)(unsafe.Pointer(pn)) = Xsqlite3_column_bytes(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, iCol+1) + } + } + return rc +} + +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var pConfig uintptr = (*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig + var rc int32 = SQLITE_OK + var bLive int32 = libc.Bool32((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter == uintptr(0)) + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_POSLIST != 0 { + + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail != FTS5_DETAIL_FULL { + var aPopulator uintptr + var i int32 + aPopulator = sqlite3Fts5ExprClearPoslists(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, bLive) + if aPopulator == uintptr(0) { + rc = SQLITE_NOMEM + } + for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol && rc == SQLITE_OK; i++ { + // var n int32 at bp+8, 4 + + // var z uintptr at bp, 8 + + rc = fts5ApiColumnText(tls, pCsr, i, bp, bp+8) + if rc == SQLITE_OK { + rc = sqlite3Fts5ExprPopulatePoslists(tls, + pConfig, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, aPopulator, i, *(*uintptr)(unsafe.Pointer(bp /* z */)), *(*int32)(unsafe.Pointer(bp + 8 /* n */))) + } + } + Xsqlite3_free(tls, aPopulator) + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { + sqlite3Fts5ExprCheckPoslists(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid) + } + } + *(*int32)(unsafe.Pointer(pCsr + 80)) &= libc.CplInt32(FTS5CSR_REQUIRE_POSLIST) + } + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 && (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_FULL { + var pSorter uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter + var i1 int32 = func() int32 { + if iPhrase == 0 { + return 0 + } + return *(*int32)(unsafe.Pointer(pSorter + 28 + uintptr(iPhrase-1)*4)) + }() + *(*int32)(unsafe.Pointer(pn)) = *(*int32)(unsafe.Pointer(pSorter + 28 + uintptr(iPhrase)*4)) - i1 + *(*uintptr)(unsafe.Pointer(pa)) = (*Fts5Sorter)(unsafe.Pointer(pSorter)).FaPoslist + uintptr(i1) + } else { + *(*int32)(unsafe.Pointer(pn)) = sqlite3Fts5ExprPoslist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase, pa) + } + + return rc +} + +// Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated +// correctly for the current view. Return SQLITE_OK if successful, or an +// SQLite error code otherwise. +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + var aIter uintptr // One iterator for each phrase + var nIter int32 // Number of iterators/phrases + var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol + + nIter = sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter == uintptr(0) { + var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5PoslistReader{})) * uint64(nIter)) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter = sqlite3Fts5MallocZero(tls, bp, nByte) + } + aIter = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter + + if aIter != 0 { + var nInst int32 = 0 // Number instances seen so far + var i int32 + + // Initialize all iterators + for i = 0; i < nIter && *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK; i++ { + // var a uintptr at bp+8, 8 + + // var n int32 at bp+16, 4 + + *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5CsrPoslist(tls, pCsr, i, bp+8, bp+16) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + sqlite3Fts5PoslistReaderInit(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* a */)), *(*int32)(unsafe.Pointer(bp + 16 /* n */)), aIter+uintptr(i)*32) + } + } + + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { + for 1 != 0 { + var aInst uintptr + var iBest int32 = -1 + for i = 0; i < nIter; i++ { + if int32((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).FbEof) == 0 && + (iBest < 0 || (*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(i)*32)).FiPos < (*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(iBest)*32)).FiPos) { + iBest = i + } + } + if iBest < 0 { + break + } + + nInst++ + if nInst >= (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc { + var nNewSize int32 + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc != 0 { + nNewSize = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc * 2 + } else { + nNewSize = 32 + } + aInst = Xsqlite3_realloc64(tls, + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0)))*uint64(3))) + if aInst != 0 { + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst = aInst + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc = nNewSize + } else { + nInst-- + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_NOMEM + break + } + } + + aInst = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst + uintptr(3*(nInst-1))*4 + *(*int32)(unsafe.Pointer(aInst)) = iBest + *(*int32)(unsafe.Pointer(aInst + 1*4)) = int32((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(iBest)*32)).FiPos >> 32) + *(*int32)(unsafe.Pointer(aInst + 2*4)) = int32((*Fts5PoslistReader)(unsafe.Pointer(aIter+uintptr(iBest)*32)).FiPos & int64(0x7FFFFFFF)) + if *(*int32)(unsafe.Pointer(aInst + 1*4)) < 0 || *(*int32)(unsafe.Pointer(aInst + 1*4)) >= nCol { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + break + } + sqlite3Fts5PoslistReaderNext(tls, aIter+uintptr(iBest)*32) + } + } + + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstCount = nInst + *(*int32)(unsafe.Pointer(pCsr + 80)) &= libc.CplInt32(FTS5CSR_REQUIRE_INST) + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ + var pCsr uintptr = pCtx + var rc int32 = SQLITE_OK + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || + SQLITE_OK == libc.AssignInt32(&rc, fts5CacheInstArray(tls, pCsr)) { + *(*int32)(unsafe.Pointer(pnInst)) = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstCount + } + return rc +} + +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ + var pCsr uintptr = pCtx + var rc int32 = SQLITE_OK + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || + SQLITE_OK == libc.AssignInt32(&rc, fts5CacheInstArray(tls, pCsr)) { + if iIdx < 0 || iIdx >= (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstCount { + rc = SQLITE_RANGE + } else { + *(*int32)(unsafe.Pointer(piPhrase)) = *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst + uintptr(iIdx*3)*4)) + *(*int32)(unsafe.Pointer(piCol)) = *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst + uintptr(iIdx*3+1)*4)) + *(*int32)(unsafe.Pointer(piOff)) = *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst + uintptr(iIdx*3+2)*4)) + } + } + return rc +} + +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ + return fts5CursorRowid(tls, pCtx) +} + +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ + var pCnt uintptr = pContext + _ = pUnused + _ = nUnused + _ = iUnused1 + _ = iUnused2 + if tflags&FTS5_TOKEN_COLOCATED == 0 { + *(*int32)(unsafe.Pointer(pCnt))++ + } + return SQLITE_OK +} + +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + var pCsr uintptr = pCtx + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + var rc int32 = SQLITE_OK + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_DOCSIZE != 0 { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + var iRowid I64 = fts5CursorRowid(tls, pCsr) + rc = sqlite3Fts5StorageDocsize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iRowid, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize) + } else if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent == uintptr(0) { + var i int32 + for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + if int32(*(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(i)))) == 0 { + *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize + uintptr(i)*4)) = -1 + } + } + } else { + var i int32 + for i = 0; rc == SQLITE_OK && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + if int32(*(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(i)))) == 0 { + // var z uintptr at bp, 8 + + // var n int32 at bp+8, 4 + + var p uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize + uintptr(i)*4 + *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize + uintptr(i)*4)) = 0 + rc = fts5ApiColumnText(tls, pCtx, i, bp, bp+8) + if rc == SQLITE_OK { + rc = sqlite3Fts5Tokenize(tls, + pConfig, FTS5_TOKENIZE_AUX, *(*uintptr)(unsafe.Pointer(bp /* z */)), *(*int32)(unsafe.Pointer(bp + 8 /* n */)), p, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5ColumnSizeCb}))) + } + } + } + } + *(*int32)(unsafe.Pointer(pCsr + 80)) &= libc.CplInt32(FTS5CSR_REQUIRE_DOCSIZE) + } + if iCol < 0 { + var i int32 + *(*int32)(unsafe.Pointer(pnToken)) = 0 + for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + *(*int32)(unsafe.Pointer(pnToken)) += *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize + uintptr(i)*4)) + } + } else if iCol < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { + *(*int32)(unsafe.Pointer(pnToken)) = *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize + uintptr(iCol)*4)) + } else { + *(*int32)(unsafe.Pointer(pnToken)) = 0 + rc = SQLITE_RANGE + } + return rc +} + +// Implementation of the xSetAuxdata() method. +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pCsr uintptr = pCtx + var pData uintptr + + // Search through the cursors list of Fts5Auxdata objects for one that + // corresponds to the currently executing auxiliary function. + for pData = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAuxdata; pData != 0; pData = (*Fts5Auxdata)(unsafe.Pointer(pData)).FpNext { + if (*Fts5Auxdata)(unsafe.Pointer(pData)).FpAux == (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux { + break + } + } + + if pData != 0 { + if (*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete})).f(tls, (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr) + } + } else { + *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK + pData = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5Auxdata{}))) + if pData == uintptr(0) { + if xDelete != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDelete})).f(tls, pPtr) + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) + } + (*Fts5Auxdata)(unsafe.Pointer(pData)).FpAux = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux + (*Fts5Auxdata)(unsafe.Pointer(pData)).FpNext = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAuxdata + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAuxdata = pData + } + + (*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete = xDelete + (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr = pPtr + return SQLITE_OK +} + +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ + var pCsr uintptr = pCtx + var pData uintptr + var pRet uintptr = uintptr(0) + + for pData = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAuxdata; pData != 0; pData = (*Fts5Auxdata)(unsafe.Pointer(pData)).FpNext { + if (*Fts5Auxdata)(unsafe.Pointer(pData)).FpAux == (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux { + break + } + } + + if pData != 0 { + pRet = (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr + if bClear != 0 { + (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr = uintptr(0) + (*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete = uintptr(0) + } + } + + return pRet +} + +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + _ = pUnused + if (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa >= (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb { + *(*int32)(unsafe.Pointer(piCol)) = -1 + *(*int32)(unsafe.Pointer(piOff)) = -1 + } else { + // var iVal int32 at bp, 4 + + *(*uintptr)(unsafe.Pointer(pIter)) += uintptr(sqlite3Fts5GetVarint32(tls, (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa, bp)) + if *(*int32)(unsafe.Pointer(bp)) == 1 { + *(*uintptr)(unsafe.Pointer(pIter)) += uintptr(sqlite3Fts5GetVarint32(tls, (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa, bp)) + *(*int32)(unsafe.Pointer(piCol)) = *(*int32)(unsafe.Pointer(bp /* iVal */)) + *(*int32)(unsafe.Pointer(piOff)) = 0 + *(*uintptr)(unsafe.Pointer(pIter)) += uintptr(sqlite3Fts5GetVarint32(tls, (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa, bp)) + } + *(*int32)(unsafe.Pointer(piOff)) += *(*int32)(unsafe.Pointer(bp)) - 2 + } +} + +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pCsr uintptr = pCtx + // var n int32 at bp, 4 + + var rc int32 = fts5CsrPoslist(tls, pCsr, iPhrase, pIter, bp) + if rc == SQLITE_OK { + + (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb = func() uintptr { + if (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa != 0 { + return (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa + uintptr(*(*int32)(unsafe.Pointer(bp))) + } + return uintptr(0) + }() + *(*int32)(unsafe.Pointer(piCol)) = 0 + *(*int32)(unsafe.Pointer(piOff)) = 0 + fts5ApiPhraseNext(tls, pCtx, pIter, piCol, piOff) + } + return rc +} + +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pCsr uintptr = pCtx + var pConfig uintptr = (*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig + + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_COLUMNS { + if (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa >= (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb { + *(*int32)(unsafe.Pointer(piCol)) = -1 + } else { + // var iIncr int32 at bp, 4 + + *(*uintptr)(unsafe.Pointer(pIter)) += uintptr(sqlite3Fts5GetVarint32(tls, (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa, bp)) + *(*int32)(unsafe.Pointer(piCol)) += *(*int32)(unsafe.Pointer(bp)) - 2 + } + } else { + for 1 != 0 { + // var dummy int32 at bp+4, 4 + + if (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa >= (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb { + *(*int32)(unsafe.Pointer(piCol)) = -1 + return + } + if int32(*(*uint8)(unsafe.Pointer((*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa))) == 0x01 { + break + } + *(*uintptr)(unsafe.Pointer(pIter)) += uintptr(sqlite3Fts5GetVarint32(tls, (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa, bp+4)) + } + *(*uintptr)(unsafe.Pointer(pIter)) += uintptr(1 + sqlite3Fts5GetVarint32(tls, (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa+1, piCol)) + } +} + +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var pCsr uintptr = pCtx + var pConfig uintptr = (*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig + + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_COLUMNS { + var pSorter uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter + // var n int32 at bp, 4 + + if pSorter != 0 { + var i1 int32 = func() int32 { + if iPhrase == 0 { + return 0 + } + return *(*int32)(unsafe.Pointer(pSorter + 28 + uintptr(iPhrase-1)*4)) + }() + *(*int32)(unsafe.Pointer(bp /* n */)) = *(*int32)(unsafe.Pointer(pSorter + 28 + uintptr(iPhrase)*4)) - i1 + (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa = (*Fts5Sorter)(unsafe.Pointer(pSorter)).FaPoslist + uintptr(i1) + } else { + rc = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase, pIter, bp) + } + if rc == SQLITE_OK { + + (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb = func() uintptr { + if (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa != 0 { + return (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa + uintptr(*(*int32)(unsafe.Pointer(bp))) + } + return uintptr(0) + }() + *(*int32)(unsafe.Pointer(piCol)) = 0 + fts5ApiPhraseNextColumn(tls, pCtx, pIter, piCol) + } + } else { + // var n int32 at bp+4, 4 + + rc = fts5CsrPoslist(tls, pCsr, iPhrase, pIter, bp+4) + if rc == SQLITE_OK { + + (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb = func() uintptr { + if (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa != 0 { + return (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa + uintptr(*(*int32)(unsafe.Pointer(bp + 4))) + } + return uintptr(0) + }() + if *(*int32)(unsafe.Pointer(bp + 4)) <= 0 { + *(*int32)(unsafe.Pointer(piCol)) = -1 + } else if int32(*(*uint8)(unsafe.Pointer((*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa))) == 0x01 { + *(*uintptr)(unsafe.Pointer(pIter)) += uintptr(1 + sqlite3Fts5GetVarint32(tls, (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa+1, piCol)) + } else { + *(*int32)(unsafe.Pointer(piCol)) = 0 + } + } + } + + return rc +} + +var sFts5Api = Fts5ExtensionApi{ + FiVersion: 2, // iVersion + FxUserData: 0, + FxColumnCount: 0, + FxRowCount: 0, + FxColumnTotalSize: 0, + FxTokenize: 0, + FxPhraseCount: 0, + FxPhraseSize: 0, + FxInstCount: 0, + FxInst: 0, + FxRowid: 0, + FxColumnText: 0, + FxColumnSize: 0, + FxQueryPhrase: 0, + FxSetAuxdata: 0, + FxGetAuxdata: 0, + FxPhraseFirst: 0, + FxPhraseNext: 0, + FxPhraseFirstColumn: 0, + FxPhraseNextColumn: 0, +} /* sqlite3.c:233857:31 */ + +// Implementation of API function xQueryPhrase(). +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pCsr uintptr = pCtx + var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var rc int32 + *(*uintptr)(unsafe.Pointer(bp /* pNew */)) = uintptr(0) + + rc = fts5OpenMethod(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab, bp) + if rc == SQLITE_OK { + (*Fts5Cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).FePlan = FTS5_PLAN_MATCH + (*Fts5Cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).FiFirstRowid = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) + (*Fts5Cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).FiLastRowid = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 + (*Fts5Cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).Fbase.FpVtab = pTab + rc = sqlite3Fts5ExprClonePhrase(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase, *(*uintptr)(unsafe.Pointer(bp))+64) + } + + if rc == SQLITE_OK { + for rc = fts5CursorFirst(tls, pTab, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), 0); rc == SQLITE_OK && (*Fts5Cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).Fcsrflags&FTS5CSR_EOF == 0; rc = fts5NextMethod(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, uintptr(unsafe.Pointer(&sFts5Api)), *(*uintptr)(unsafe.Pointer(bp /* pNew */)), pUserData) + if rc != SQLITE_OK { + if rc == SQLITE_DONE { + rc = SQLITE_OK + } + break + } + } + } + + fts5CloseMethod(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + return rc +} + +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ + + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux + (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxFunc})).f(tls, uintptr(unsafe.Pointer(&sFts5Api)), pCsr, context, argc, argv) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) +} + +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ + var pCsr uintptr + for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { + break + } + } + return pCsr +} + +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pAux uintptr + var pCsr uintptr + var iCsrId I64 + + pAux = Xsqlite3_user_data(tls, context) + iCsrId = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + + pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) + if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35592, libc.VaList(bp, iCsrId)) + Xsqlite3_result_error(tls, context, zErr, -1) + Xsqlite3_free(tls, zErr) + } else { + fts5ApiInvoke(tls, pAux, pCsr, context, argc-1, argv+1*8) + } +} + +// Given cursor id iId, return a pointer to the corresponding Fts5Table +// object. Or NULL If the cursor id does not exist. +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ + var pCsr uintptr + pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) + if pCsr != 0 { + return (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab + } + return uintptr(0) +} + +// Return a "position-list blob" corresponding to the current position of +// cursor pCsr via sqlite3_result_blob(). A position-list blob contains +// the current position-list for each phrase in the query associated with +// cursor pCsr. +// +// A position-list blob begins with (nPhrase-1) varints, where nPhrase is +// the number of phrases in the query. Following the varints are the +// concatenated position lists for each phrase, in order. +// +// The first varint (if it exists) contains the size of the position list +// for phrase 0. The second (same disclaimer) contains the size of position +// list 1. And so on. There is no size field for the final position list, +// as it can be derived from the total size of the blob. +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ + bp := tls.Alloc(68) + defer tls.Free(68) + + var i int32 + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK + var nPhrase int32 = sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) + // var val Fts5Buffer at bp, 16 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) + switch (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FeDetail { + case FTS5_DETAIL_FULL: + + // Append the varints + for i = 0; i < nPhrase-1; i++ { + // var dummy uintptr at bp+16, 8 + + var nByte int32 = sqlite3Fts5ExprPoslist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+16) + sqlite3Fts5BufferAppendVarint(tls, bp+24, bp, int64(nByte)) + } + + // Append the position lists + for i = 0; i < nPhrase; i++ { + // var pPoslist uintptr at bp+32, 8 + + var nPoslist int32 + nPoslist = sqlite3Fts5ExprPoslist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+32) + sqlite3Fts5BufferAppendBlob(tls, bp+24, bp, uint32(nPoslist), *(*uintptr)(unsafe.Pointer(bp + 32 /* pPoslist */))) + } + break + + case FTS5_DETAIL_COLUMNS: + + // Append the varints + for i = 0; *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK && i < nPhrase-1; i++ { + // var dummy uintptr at bp+40, 8 + + // var nByte int32 at bp+48, 4 + + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+40, bp+48) + sqlite3Fts5BufferAppendVarint(tls, bp+24, bp, int64(*(*int32)(unsafe.Pointer(bp + 48 /* nByte */)))) + } + + // Append the position lists + for i = 0; *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK && i < nPhrase; i++ { + // var pPoslist uintptr at bp+56, 8 + + // var nPoslist int32 at bp+64, 4 + + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+56, bp+64) + sqlite3Fts5BufferAppendBlob(tls, bp+24, bp, uint32(*(*int32)(unsafe.Pointer(bp + 64 /* nPoslist */))), *(*uintptr)(unsafe.Pointer(bp + 56 /* pPoslist */))) + } + break + + default: + break + } + + Xsqlite3_result_blob(tls, pCtx, (*Fts5Buffer)(unsafe.Pointer(bp /* &val */)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp /* &val */)).Fn, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) +} + +// This is the xColumn method, called by SQLite to request a value from +// the row that the supplied cursor currently points to. +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ + var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab + var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig + var pCsr uintptr = pCursor + var rc int32 = SQLITE_OK + + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SPECIAL { + if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { + Xsqlite3_result_int64(tls, pCtx, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial) + } + } else if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { + // User is requesting the value of the special column with the same name + // as the table. Return the cursor integer id number. This value is only + // useful in that it may be passed as the first argument to an FTS5 + // auxiliary function. + Xsqlite3_result_int64(tls, pCtx, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId) + } else if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1 { + + // The value of the "rank" column. + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SOURCE { + fts5PoslistBlob(tls, pCtx, pCsr) + } else if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH || + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SORTED_MATCH { + if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRank != 0 || SQLITE_OK == libc.AssignInt32(&rc, fts5FindRankFunction(tls, pCsr)) { + fts5ApiInvoke(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRank, pCsr, pCtx, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg) + } + } + } else if !(fts5IsContentless(tls, pTab) != 0) { + (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg = pTab + 16 + rc = fts5SeekCursor(tls, pCsr, 1) + if rc == SQLITE_OK { + Xsqlite3_result_value(tls, pCtx, Xsqlite3_column_value(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt, iCol+1)) + } + (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg = uintptr(0) + } + return rc +} + +// This routine implements the xFindFunction method for the FTS3 +// virtual table. +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ + var pTab uintptr = pVtab + var pAux uintptr + + _ = nUnused + pAux = fts5FindAuxiliary(tls, pTab, zName) + if pAux != 0 { + *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{fts5ApiCallback})) + *(*uintptr)(unsafe.Pointer(ppArg)) = pAux + return 1 + } + + // No function of the specified name was found. Return 0. + return 0 +} + +// Implementation of FTS5 xRename method. Rename an fts5 table. +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ + var pTab uintptr = pVtab + return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) +} + +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ + fts5TripCursors(tls, pTab) + return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) +} + +// The xSavepoint() method. +// +// Flush the contents of the pending-terms table to disk. +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ + _ = iSavepoint // Call below is a no-op for NDEBUG builds + + return sqlite3Fts5FlushToDisk(tls, pVtab) +} + +// The xRelease() method. +// +// This is a no-op. +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ + _ = iSavepoint // Call below is a no-op for NDEBUG builds + + return sqlite3Fts5FlushToDisk(tls, pVtab) +} + +// The xRollbackTo() method. +// +// Discard the contents of the pending terms table. +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ + var pTab uintptr = pVtab + _ = iSavepoint // Call below is a no-op for NDEBUG builds + + fts5TripCursors(tls, pTab) + return sqlite3Fts5StorageRollback(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) +} + +// Register a new auxiliary function with global context pGlobal. +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ + var pGlobal uintptr = pApi + var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) + if rc == SQLITE_OK { + var pAux uintptr + var nName Sqlite3_int64 // Size of zName in bytes, including \0 + var nByte Sqlite3_int64 // Bytes of space to allocate + + nName = Sqlite3_int64(libc.Xstrlen(tls, zName) + uint64(1)) + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Auxiliary{})) + uint64(nName)) + pAux = Xsqlite3_malloc64(tls, uint64(nByte)) + if pAux != 0 { + libc.Xmemset(tls, pAux, 0, Size_t(nByte)) + (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FzFunc = pAux + 1*48 + libc.Xmemcpy(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FzFunc, zName, uint64(nName)) + (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal = pGlobal + (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpUserData = pUserData + (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxFunc = xFunc + (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxDestroy = xDestroy + (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpAux + (*Fts5Global)(unsafe.Pointer(pGlobal)).FpAux = pAux + } else { + rc = SQLITE_NOMEM + } + } + + return rc +} + +// Register a new tokenizer. This is the implementation of the +// fts5_api.xCreateTokenizer() method. +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ + var pGlobal uintptr = pApi + var pNew uintptr + var nName Sqlite3_int64 // Size of zName and its \0 terminator + var nByte Sqlite3_int64 // Bytes of space to allocate + var rc int32 = SQLITE_OK + + nName = Sqlite3_int64(libc.Xstrlen(tls, zName) + uint64(1)) + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5TokenizerModule{})) + uint64(nName)) + pNew = Xsqlite3_malloc64(tls, uint64(nByte)) + if pNew != 0 { + libc.Xmemset(tls, pNew, 0, Size_t(nByte)) + (*Fts5TokenizerModule)(unsafe.Pointer(pNew)).FzName = pNew + 1*56 + libc.Xmemcpy(tls, (*Fts5TokenizerModule)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName)) + (*Fts5TokenizerModule)(unsafe.Pointer(pNew)).FpUserData = pUserData + (*Fts5TokenizerModule)(unsafe.Pointer(pNew)).Fx = *(*Fts5_tokenizer)(unsafe.Pointer(pTokenizer)) + (*Fts5TokenizerModule)(unsafe.Pointer(pNew)).FxDestroy = xDestroy + (*Fts5TokenizerModule)(unsafe.Pointer(pNew)).FpNext = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpTok + (*Fts5Global)(unsafe.Pointer(pGlobal)).FpTok = pNew + if (*Fts5TokenizerModule)(unsafe.Pointer(pNew)).FpNext == uintptr(0) { + (*Fts5Global)(unsafe.Pointer(pGlobal)).FpDfltTok = pNew + } + } else { + rc = SQLITE_NOMEM + } + + return rc +} + +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ + var pMod uintptr = uintptr(0) + + if zName == uintptr(0) { + pMod = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpDfltTok + } else { + for pMod = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpTok; pMod != 0; pMod = (*Fts5TokenizerModule)(unsafe.Pointer(pMod)).FpNext { + if Xsqlite3_stricmp(tls, zName, (*Fts5TokenizerModule)(unsafe.Pointer(pMod)).FzName) == 0 { + break + } + } + } + + return pMod +} + +// Find a tokenizer. This is the implementation of the +// fts5_api.xFindTokenizer() method. +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ + var rc int32 = SQLITE_OK + var pMod uintptr + + pMod = fts5LocateTokenizer(tls, pApi, zName) + if pMod != 0 { + *(*Fts5_tokenizer)(unsafe.Pointer(pTokenizer)) = (*Fts5TokenizerModule)(unsafe.Pointer(pMod)).Fx + *(*uintptr)(unsafe.Pointer(ppUserData)) = (*Fts5TokenizerModule)(unsafe.Pointer(pMod)).FpUserData + } else { + libc.Xmemset(tls, pTokenizer, 0, uint64(unsafe.Sizeof(Fts5_tokenizer{}))) + rc = SQLITE_ERROR + } + + return rc +} + +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pMod uintptr + var rc int32 = SQLITE_OK + + pMod = fts5LocateTokenizer(tls, pGlobal, func() uintptr { + if nArg == 0 { + return uintptr(0) + } + return *(*uintptr)(unsafe.Pointer(azArg)) + }()) + if pMod == uintptr(0) { + + rc = SQLITE_ERROR + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35613, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + } else { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5TokenizerModule)(unsafe.Pointer(pMod)).Fx.FxCreate})).f(tls, + (*Fts5TokenizerModule)(unsafe.Pointer(pMod)).FpUserData, func() uintptr { + if azArg != 0 { + return azArg + 1*8 + } + return uintptr(0) + }(), func() int32 { + if nArg != 0 { + return nArg - 1 + } + return 0 + }(), pConfig+104) + (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 + if rc != SQLITE_OK { + if pzErr != 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35635, 0) + } + } else { + (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, + (*Fts5TokenizerModule)(unsafe.Pointer(pMod)).Fx.FxCreate, (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok) + } + } + + if rc != SQLITE_OK { + (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = uintptr(0) + (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok = uintptr(0) + } + + return rc +} + +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ + var pTok uintptr + var pNextTok uintptr + var pAux uintptr + var pNextAux uintptr + var pGlobal uintptr = pCtx + + for pAux = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpAux; pAux != 0; pAux = pNextAux { + pNextAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext + if (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxDestroy != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxDestroy})).f(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpUserData) + } + Xsqlite3_free(tls, pAux) + } + + for pTok = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpTok; pTok != 0; pTok = pNextTok { + pNextTok = (*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FpNext + if (*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FxDestroy != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FxDestroy})).f(tls, (*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FpUserData) + } + Xsqlite3_free(tls, pTok) + } + + Xsqlite3_free(tls, pGlobal) +} + +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ + var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) + var ppApi uintptr + _ = nArg + + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35666) + if ppApi != 0 { + *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal + } +} + +// Implementation of fts5_source_id() function. +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ + + _ = nArg + _ = apUnused + Xsqlite3_result_text(tls, pCtx, ts+35679, -1, libc.UintptrFromInt32(-1)) +} + +// Return true if zName is the extension on one of the shadow tables used +// by this module. +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ + var i uint32 + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { + if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { + return 1 + } + } + return 0 +} + +var azName2 = [5]uintptr{ + ts + 35770, ts + 33869, ts + 24869, ts + 34220, ts + 11364, +} /* sqlite3.c:234387:21 */ + +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ + var rc int32 + var pGlobal uintptr = uintptr(0) + + pGlobal = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Fts5Global{}))) + if pGlobal == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var p uintptr = pGlobal + libc.Xmemset(tls, pGlobal, 0, uint64(unsafe.Sizeof(Fts5Global{}))) + (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb = db + (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FiVersion = 2 + (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxCreateFunction = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, Fts5_extension_function, uintptr) int32 + }{fts5CreateAux})) + (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxCreateTokenizer = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32 + }{fts5CreateTokenizer})) + (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 + }{fts5FindTokenizer})) + rc = Xsqlite3_create_module_v2(tls, db, ts+35777, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + if rc == SQLITE_OK { + rc = sqlite3Fts5IndexInit(tls, db) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5ExprInit(tls, pGlobal, db) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5AuxInit(tls, pGlobal) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5TokenizerInit(tls, pGlobal) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5VocabInit(tls, pGlobal, db) + } + if rc == SQLITE_OK { + rc = Xsqlite3_create_function(tls, + db, ts+35777, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{fts5Fts5Func})), uintptr(0), uintptr(0)) + } + if rc == SQLITE_OK { + rc = Xsqlite3_create_function(tls, + db, ts+35782, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr) + }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) + } + } + + // If SQLITE_FTS5_ENABLE_TEST_MI is defined, assume that the file + // fts5_test_mi.c is compiled and linked into the executable. And call + // its entry point to enable the matchinfo() demo. + + return rc +} + +var fts5Mod = Sqlite3_module{ + /* iVersion */ FiVersion: 3, + /* xCreate */ FxCreate: 0, + /* xConnect */ FxConnect: 0, + /* xBestIndex */ FxBestIndex: 0, + /* xDisconnect */ FxDisconnect: 0, + /* xDestroy */ FxDestroy: 0, + /* xOpen */ FxOpen: 0, + /* xClose */ FxClose: 0, + /* xFilter */ FxFilter: 0, + /* xNext */ FxNext: 0, + /* xEof */ FxEof: 0, + /* xColumn */ FxColumn: 0, + /* xRowid */ FxRowid: 0, + /* xUpdate */ FxUpdate: 0, + /* xBegin */ FxBegin: 0, + /* xSync */ FxSync: 0, + /* xCommit */ FxCommit: 0, + /* xRollback */ FxRollback: 0, + /* xFindFunction */ FxFindFunction: 0, + /* xRename */ FxRename: 0, + /* xSavepoint */ FxSavepoint: 0, + /* xRelease */ FxRelease: 0, + /* xRollbackTo */ FxRollbackTo: 0, + /* xShadowName */ FxShadowName: 0, +} /* sqlite3.c:234398:31 */ + +// The following functions are used to register the module with SQLite. If +// this module is being built as part of the SQLite core (SQLITE_CORE is +// defined), then sqlite3_open() will call sqlite3Fts5Init() directly. +// +// Or, if this module is being built as a loadable extension, +// sqlite3Fts5Init() is omitted and the two standard entry points +// sqlite3_fts_init() and sqlite3_fts5_init() defined instead. +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ + return fts5Init(tls, db) +} + +// Prepare the two insert statements - Fts5Storage.pInsertContent and +// Fts5Storage.pInsertDocsize - if they have not already been prepared. +// Return SQLITE_OK if successful, or an SQLite error code if an error +// occurs. +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ + bp := tls.Alloc(216) + defer tls.Free(216) + + var rc int32 = SQLITE_OK + + // If there is no %_docsize table, there should be no requests for + // statements to operate on it. + + if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { + *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ + ts + 35797, + ts + 35865, + ts + 35934, + + ts + 35967, + ts + 36006, + ts + 36046, + ts + 36085, + ts + 36126, + + ts + 36165, + + ts + 36207, + ts + 36247, + } + var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + var zSql uintptr = uintptr(0) + + switch eStmt { + case FTS5_STMT_SCAN: + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*8)), + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent)) + break + fallthrough + + case FTS5_STMT_SCAN_ASC: + fallthrough + case FTS5_STMT_SCAN_DESC: + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*8)), libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, + (*Fts5Config)(unsafe.Pointer(pC)).FzContent, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid, + (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid)) + break + fallthrough + + case FTS5_STMT_LOOKUP: + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*8)), + libc.VaList(bp+56, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid)) + break + fallthrough + + case FTS5_STMT_INSERT_CONTENT: + fallthrough + case FTS5_STMT_REPLACE_CONTENT: + { + var nCol int32 = (*Fts5Config)(unsafe.Pointer(pC)).FnCol + 1 + var zBind uintptr + var i int32 + + zBind = Xsqlite3_malloc64(tls, uint64(1+nCol*2)) + if zBind != 0 { + for i = 0; i < nCol; i++ { + *(*uint8)(unsafe.Pointer(zBind + uintptr(i*2))) = uint8('?') + *(*uint8)(unsafe.Pointer(zBind + uintptr(i*2+1))) = uint8(',') + } + *(*uint8)(unsafe.Pointer(zBind + uintptr(i*2-1))) = uint8(0) + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*8)), libc.VaList(bp+80, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName, zBind)) + Xsqlite3_free(tls, zBind) + } + break + + } + fallthrough + + default: + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*8)), libc.VaList(bp+104, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName)) + break + } + + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var f int32 = SQLITE_PREPARE_PERSISTENT + if eStmt > FTS5_STMT_LOOKUP { + f = f | SQLITE_PREPARE_NO_VTAB + } + (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbLock++ + rc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb, zSql, -1, uint32(f), p+40+uintptr(eStmt)*8, uintptr(0)) + (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbLock-- + Xsqlite3_free(tls, zSql) + if rc != SQLITE_OK && pzErrMsg != 0 { + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3605, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + } + } + } + + *(*uintptr)(unsafe.Pointer(ppStmt)) = *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) + Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(ppStmt))) + return rc +} + +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ + var rc int32 + var ap Va_list + _ = ap // ... printf arguments + var zSql uintptr + + ap = va + zSql = Xsqlite3_vmprintf(tls, zFormat, ap) + + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + rc = Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), pzErr) + Xsqlite3_free(tls, zSql) + } + + _ = ap + return rc +} + +// Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error +// code otherwise. +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), + + ts+36270, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), + ts+36374, + libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + } + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), + ts+36412, + libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + } + return rc +} + +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), + ts+36450, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) + } +} + +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig + *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) + + fts5StorageRenameOne(tls, pConfig, bp, ts+24869, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11364, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35770, zName) + if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + fts5StorageRenameOne(tls, pConfig, bp, ts+34220, zName) + } + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { + fts5StorageRenameOne(tls, pConfig, bp, ts+33869, zName) + } + return *(*int32)(unsafe.Pointer(bp /* rc */)) +} + +// Create the shadow table named zPost, with definition zDefn. Return +// SQLITE_OK if successful, or an SQLite error code otherwise. +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ + bp := tls.Alloc(72) + defer tls.Free(72) + + var rc int32 + *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) + + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36492, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, + func() uintptr { + if bWithout != 0 { + return ts + 29522 /* " WITHOUT ROWID" */ + } + return ts + 1525 /* "" */ + }())) + if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, + ts+36522, + libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) + } + + return rc +} + +// Open a new Fts5Index handle. If the bCreate argument is true, create +// and initialize the underlying tables +// +// If successful, set *pp to point to the new object and return SQLITE_OK. +// Otherwise, set *pp to NULL and return an SQLite error code. +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + var p uintptr // New object + var nByte Sqlite3_int64 // Bytes of space to allocate + + nByte = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Storage{})) + + uint64((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*uint64(unsafe.Sizeof(I64(0)))) // Fts5Storage.aTotalSize[] + *(*uintptr)(unsafe.Pointer(pp)) = libc.AssignUintptr(&p, Xsqlite3_malloc64(tls, uint64(nByte))) + if !(p != 0) { + return SQLITE_NOMEM + } + + libc.Xmemset(tls, p, 0, Size_t(nByte)) + (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize = p + 1*128 + (*Fts5Storage)(unsafe.Pointer(p)).FpConfig = pConfig + (*Fts5Storage)(unsafe.Pointer(p)).FpIndex = pIndex + + if bCreate != 0 { + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { + var nDefn int32 = 32 + (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol*10 + var zDefn uintptr = Xsqlite3_malloc64(tls, uint64(int64(32)+Sqlite3_int64((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*int64(10))) + if zDefn == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var i int32 + var iOff int32 + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36566, 0) + iOff = int32(libc.Xstrlen(tls, zDefn)) + for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36589, libc.VaList(bp, i)) + iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) + } + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33869, zDefn, 0, pzErr) + } + Xsqlite3_free(tls, zDefn) + } + + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + rc = sqlite3Fts5CreateTable(tls, + pConfig, ts+34220, ts+36595, 0, pzErr) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5CreateTable(tls, + pConfig, ts+35770, ts+36627, 1, pzErr) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34366, uintptr(0), FTS5_CURRENT_VERSION) + } + } + + if rc != 0 { + sqlite3Fts5StorageClose(tls, p) + *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) + } + return rc +} + +// Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ + var rc int32 = SQLITE_OK + if p != 0 { + var i int32 + + // Finalize all SQL statements + for i = 0; i < int32(uint64(unsafe.Sizeof([11]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))); i++ { + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(i)*8))) + } + + Xsqlite3_free(tls, p) + } + return rc +} + +type Fts5InsertCtx1 = struct { + FpStorage uintptr + FiCol int32 + FszCol int32 +} /* sqlite3.c:234869:9 */ + +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ + +// Tokenization callback used when inserting tokens into the FTS index. +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ + var pCtx uintptr = pContext + var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex + _ = iUnused1 + _ = iUnused2 + if nToken > FTS5_MAX_TOKEN_SIZE { + nToken = FTS5_MAX_TOKEN_SIZE + } + if tflags&FTS5_TOKEN_COLOCATED == 0 || (*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FszCol == 0 { + (*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FszCol++ + } + return sqlite3Fts5IndexWrite(tls, pIdx, (*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FiCol, (*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FszCol-1, pToken, nToken) +} + +// If a row with rowid iDel is present in the %_content table, add the +// delete-markers to the FTS index necessary to delete it. Do not actually +// remove the %_content row at this time though. +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + *(*uintptr)(unsafe.Pointer(bp /* pSeek */)) = uintptr(0) // SELECT to read row iDel from %_data + var rc int32 // Return code + var rc2 int32 // sqlite3_reset() return code + var iCol int32 + // var ctx Fts5InsertCtx at bp+8, 16 + + if apVal == uintptr(0) { + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_LOOKUP, bp, uintptr(0)) + if rc != SQLITE_OK { + return rc + } + Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pSeek */)), 1, iDel) + if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) != SQLITE_ROW { + return Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pSeek */))) + } + } + + (*Fts5InsertCtx)(unsafe.Pointer(bp + 8 /* &ctx */)).FpStorage = p + (*Fts5InsertCtx)(unsafe.Pointer(bp + 8 /* &ctx */)).FiCol = -1 + rc = sqlite3Fts5IndexBeginWrite(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, 1, iDel) + for iCol = 1; rc == SQLITE_OK && iCol <= (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; iCol++ { + if int32(*(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(iCol-1)))) == 0 { + var zText uintptr + var nText int32 + + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + zText = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pSeek */)), iCol) + nText = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp /* pSeek */)), iCol) + } else if apVal != 0 { + zText = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol-1)*8))) + nText = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol-1)*8))) + } else { + continue + } + (*Fts5InsertCtx)(unsafe.Pointer(bp + 8 /* &ctx */)).FszCol = 0 + rc = sqlite3Fts5Tokenize(tls, pConfig, FTS5_TOKENIZE_DOCUMENT, + zText, nText, bp+8, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5StorageInsertCallback}))) + *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(iCol-1)*8)) -= I64((*Fts5InsertCtx)(unsafe.Pointer(bp + 8)).FszCol) + if *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(iCol-1)*8)) < int64(0) { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + } + } + if rc == SQLITE_OK && (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow < int64(1) { + rc = SQLITE_CORRUPT | int32(1)<<8 + } else { + (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow-- + } + + rc2 = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pSeek */))) + if rc == SQLITE_OK { + rc = rc2 + } + return rc +} + +// Insert a record into the %_docsize table. Specifically, do: +// +// INSERT OR REPLACE INTO %_docsize(id, sz) VALUES(iRowid, pBuf); +// +// If there is no %_docsize table (as happens if the columnsize=0 option +// is specified when the FTS5 table is created), this function is a no-op. +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_OK + if (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbColumnsize != 0 { + *(*uintptr)(unsafe.Pointer(bp /* pReplace */)) = uintptr(0) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_DOCSIZE, bp, uintptr(0)) + if rc == SQLITE_OK { + Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 1, iRowid) + Xsqlite3_bind_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 2, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, uintptr(0)) + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */))) + Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 2) + } + } + return rc +} + +// Load the contents of the "averages" record from disk into the +// p->nTotalRow and p->aTotalSize[] variables. If successful, and if +// argument bCache is true, set the p->bTotalsValid flag to indicate +// that the contents of aTotalSize[] and nTotalRow are valid until +// further notice. +// +// Return SQLITE_OK if successful, or an SQLite error code if an error +// occurs. +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ + var rc int32 = SQLITE_OK + if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { + rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) + (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = bCache + } + return rc +} + +// Store the current contents of the p->nTotalRow and p->aTotalSize[] +// variables in the "averages" record on disk. +// +// Return SQLITE_OK if successful, or an SQLite error code if an error +// occurs. +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FnCol + var i int32 + // var buf Fts5Buffer at bp, 16 + + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) + + sqlite3Fts5BufferAppendVarint(tls, bp+16, bp, (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow) + for i = 0; i < nCol; i++ { + sqlite3Fts5BufferAppendVarint(tls, bp+16, bp, *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(i)*8))) + } + if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5IndexSetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fn) + } + Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp) + + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) +} + +// Remove a row from the FTS table. +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + var rc int32 + *(*uintptr)(unsafe.Pointer(bp /* pDel */)) = uintptr(0) + + rc = fts5StorageLoadTotals(tls, p, 1) + + // Delete the index records + if rc == SQLITE_OK { + rc = fts5StorageDeleteFromIndex(tls, p, iDel, apVal) + } + + // Delete the %_docsize record + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_DELETE_DOCSIZE, bp, uintptr(0)) + if rc == SQLITE_OK { + Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */)), 1, iDel) + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */))) + } + } + + // Delete the %_content record + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { + if rc == SQLITE_OK { + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_DELETE_CONTENT, bp, uintptr(0)) + } + if rc == SQLITE_OK { + Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */)), 1, iDel) + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */))) + } + } + + return rc +} + +// Delete all entries in the FTS5 index. +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + var rc int32 + + (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 + + // Delete the contents of the %_data and %_docsize tables. + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), + + ts+36644, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), + ts+36694, + libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + } + + // Reinitialize the %_data table. This call creates the initial structure + // and averages records. + if rc == SQLITE_OK { + rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) + } + if rc == SQLITE_OK { + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34366, uintptr(0), FTS5_CURRENT_VERSION) + } + return rc +} + +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ + bp := tls.Alloc(44) + defer tls.Free(44) + + *(*Fts5Buffer)(unsafe.Pointer(bp + 24 /* buf */)) = Fts5Buffer{} + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + *(*uintptr)(unsafe.Pointer(bp + 16 /* pScan */)) = uintptr(0) + // var ctx Fts5InsertCtx at bp, 16 + + // var rc int32 at bp+40, 4 + + var rc2 int32 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5InsertCtx{}))) + (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FpStorage = p + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5StorageDeleteAll(tls, p) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5StorageLoadTotals(tls, p, 1) + } + + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5StorageGetStmt(tls, p, FTS5_STMT_SCAN, bp+16, uintptr(0)) + } + + for *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) { + var iRowid I64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pScan */)), 0) + + sqlite3Fts5BufferZero(tls, bp+24) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5IndexBeginWrite(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, 0, iRowid) + for (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FiCol = 0; *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK && (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FiCol < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FiCol++ { + (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FszCol = 0 + if int32(*(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp)).FiCol)))) == 0 { + var zText uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pScan */)), (*Fts5InsertCtx)(unsafe.Pointer(bp)).FiCol+1) + var nText int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pScan */)), (*Fts5InsertCtx)(unsafe.Pointer(bp)).FiCol+1) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5Tokenize(tls, pConfig, + FTS5_TOKENIZE_DOCUMENT, + zText, nText, + bp, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5StorageInsertCallback}))) + } + sqlite3Fts5BufferAppendVarint(tls, bp+40, bp+24, int64((*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FszCol)) + *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp)).FiCol)*8)) += I64((*Fts5InsertCtx)(unsafe.Pointer(bp)).FszCol) + } + (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow++ + + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5StorageInsertDocsize(tls, p, iRowid, bp+24) + } + } + Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(bp+24 /* &buf */)).Fp) + rc2 = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pScan */))) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = rc2 + } + + // Write the averages record + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5StorageSaveTotals(tls, p) + } + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) +} + +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ + return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) +} + +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ + return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) +} + +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ + return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) +} + +// Allocate a new rowid. This is used for "external content" tables when +// a NULL value is inserted into the rowid column. The new rowid is allocated +// by inserting a dummy row into the %_docsize table. The dummy will be +// overwritten later. +// +// If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In +// this case the user is required to provide a rowid explicitly. +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var rc int32 = SQLITE_MISMATCH + if (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbColumnsize != 0 { + *(*uintptr)(unsafe.Pointer(bp /* pReplace */)) = uintptr(0) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_DOCSIZE, bp, uintptr(0)) + if rc == SQLITE_OK { + Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 1) + Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 2) + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */))) + } + if rc == SQLITE_OK { + *(*I64)(unsafe.Pointer(piRowid)) = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) + } + } + return rc +} + +// Insert a new row into the FTS content table. +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + var rc int32 = SQLITE_OK + + // Insert the new row into the %_content table. + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) == SQLITE_INTEGER { + *(*I64)(unsafe.Pointer(piRowid)) = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) + } else { + rc = fts5StorageNewRowid(tls, p, piRowid) + } + } else { + *(*uintptr)(unsafe.Pointer(bp /* pInsert */)) = uintptr(0) // Statement to write %_content table + var i int32 // Counter variable + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_INSERT_CONTENT, bp, uintptr(0)) + for i = 1; rc == SQLITE_OK && i <= (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1; i++ { + rc = Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp /* pInsert */)), i, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) + } + if rc == SQLITE_OK { + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pInsert */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pInsert */))) + } + *(*I64)(unsafe.Pointer(piRowid)) = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb) + } + + return rc +} + +// Insert new entries into the FTS index and %_docsize table. +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code + // var ctx Fts5InsertCtx at bp+16, 16 + // Tokenization callback context object + // var buf Fts5Buffer at bp, 16 + // Buffer used to build up %_docsize blob + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) + (*Fts5InsertCtx)(unsafe.Pointer(bp + 16 /* &ctx */)).FpStorage = p + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = fts5StorageLoadTotals(tls, p, 1) + + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = sqlite3Fts5IndexBeginWrite(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, 0, iRowid) + } + for (*Fts5InsertCtx)(unsafe.Pointer(bp + 16 /* &ctx */)).FiCol = 0; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK && (*Fts5InsertCtx)(unsafe.Pointer(bp+16 /* &ctx */)).FiCol < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; (*Fts5InsertCtx)(unsafe.Pointer(bp+16 /* &ctx */)).FiCol++ { + (*Fts5InsertCtx)(unsafe.Pointer(bp + 16 /* &ctx */)).FszCol = 0 + if int32(*(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp+16)).FiCol)))) == 0 { + var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp+16)).FiCol+2)*8))) + var nText int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp+16)).FiCol+2)*8))) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = sqlite3Fts5Tokenize(tls, pConfig, + FTS5_TOKENIZE_DOCUMENT, + zText, nText, + bp+16, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5StorageInsertCallback}))) + } + sqlite3Fts5BufferAppendVarint(tls, bp+32, bp, int64((*Fts5InsertCtx)(unsafe.Pointer(bp+16 /* &ctx */)).FszCol)) + *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp+16)).FiCol)*8)) += I64((*Fts5InsertCtx)(unsafe.Pointer(bp + 16)).FszCol) + } + (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow++ + + // Write the %_docsize record + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = fts5StorageInsertDocsize(tls, p, iRowid, bp) + } + Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp) + + return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) +} + +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + var zSql uintptr + var rc int32 + + zSql = Xsqlite3_mprintf(tls, ts+36723, + libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) + if zSql == uintptr(0) { + rc = SQLITE_NOMEM + } else { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */)) = uintptr(0) + rc = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+24, uintptr(0)) + if rc == SQLITE_OK { + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { + *(*I64)(unsafe.Pointer(pnRow)) = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */)), 0) + } + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */))) + } + } + + Xsqlite3_free(tls, zSql) + return rc +} + +// Context object used by sqlite3Fts5StorageIntegrity(). +type Fts5IntegrityCtx1 = struct { + FiRowid I64 + FiCol int32 + FszCol int32 + Fcksum U64 + FpTermset uintptr + FpConfig uintptr +} /* sqlite3.c:235314:9 */ + +// Context object used by sqlite3Fts5StorageIntegrity(). +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ + +// Tokenization callback used by integrity check. +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var pCtx uintptr = pContext + var pTermset uintptr = (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FpTermset + // var bPresent int32 at bp, 4 + + var ii int32 + var rc int32 = SQLITE_OK + var iPos int32 + var iCol int32 + + _ = iUnused1 + _ = iUnused2 + if nToken > FTS5_MAX_TOKEN_SIZE { + nToken = FTS5_MAX_TOKEN_SIZE + } + + if tflags&FTS5_TOKEN_COLOCATED == 0 || (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FszCol == 0 { + (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FszCol++ + } + + switch (*Fts5Config)(unsafe.Pointer((*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FpConfig)).FeDetail { + case FTS5_DETAIL_FULL: + iPos = (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FszCol - 1 + iCol = (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FiCol + break + + case FTS5_DETAIL_COLUMNS: + iPos = (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FiCol + iCol = 0 + break + + default: + + iPos = 0 + iCol = 0 + break + } + + rc = sqlite3Fts5TermsetAdd(tls, pTermset, 0, pToken, nToken, bp) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) == 0 { + *(*U64)(unsafe.Pointer(pCtx + 16)) ^= sqlite3Fts5IndexEntryCksum(tls, + (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FiRowid, iCol, iPos, 0, pToken, nToken) + } + + for ii = 0; rc == SQLITE_OK && ii < (*Fts5Config)(unsafe.Pointer((*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FpConfig)).FnPrefix; ii++ { + var nChar int32 = *(*int32)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer((*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FpConfig)).FaPrefix + uintptr(ii)*4)) + var nByte int32 = sqlite3Fts5IndexCharlenToBytelen(tls, pToken, nToken, nChar) + if nByte != 0 { + rc = sqlite3Fts5TermsetAdd(tls, pTermset, ii+1, pToken, nByte, bp) + if *(*int32)(unsafe.Pointer(bp)) == 0 { + *(*U64)(unsafe.Pointer(pCtx + 16)) ^= sqlite3Fts5IndexEntryCksum(tls, + (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FiRowid, iCol, iPos, ii+1, pToken, nByte) + } + } + } + + return rc +} + +// Check that the contents of the FTS index match that of the %_content +// table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return +// some other SQLite error code if an error occurs while attempting to +// determine this. +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + var rc int32 = SQLITE_OK // Return code + var aColSize uintptr // Array of size pConfig->nCol + var aTotalSize uintptr // Array of size pConfig->nCol + // var ctx Fts5IntegrityCtx at bp, 40 + + // var pScan uintptr at bp+40, 8 + + var bUseCksum int32 + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Fts5IntegrityCtx{}))) + (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FpConfig = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig + aTotalSize = Xsqlite3_malloc64(tls, uint64(uint64((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*(uint64(unsafe.Sizeof(int32(0)))+uint64(unsafe.Sizeof(I64(0)))))) + if !(aTotalSize != 0) { + return SQLITE_NOMEM + } + aColSize = aTotalSize + uintptr((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8 + libc.Xmemset(tls, aTotalSize, 0, uint64(unsafe.Sizeof(I64(0)))*uint64((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)) + + bUseCksum = libc.Bool32((*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL || + (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_EXTERNAL && iArg != 0) + if bUseCksum != 0 { + // Generate the expected index checksum based on the contents of the + // %_content table. This block stores the checksum in ctx.cksum. + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_SCAN, bp+40, uintptr(0)) + if rc == SQLITE_OK { + var rc2 int32 + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { + var i int32 + (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FiRowid = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pScan */)), 0) + (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FszCol = 0 + if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + rc = sqlite3Fts5StorageDocsize(tls, p, (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FiRowid, aColSize) + } + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_NONE { + rc = sqlite3Fts5TermsetNew(tls, bp+24) + } + for i = 0; rc == SQLITE_OK && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + if *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(i))) != 0 { + continue + } + (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FiCol = i + (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FszCol = 0 + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_COLUMNS { + rc = sqlite3Fts5TermsetNew(tls, bp+24) + } + if rc == SQLITE_OK { + var zText uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pScan */)), i+1) + var nText int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pScan */)), i+1) + rc = sqlite3Fts5Tokenize(tls, pConfig, + FTS5_TOKENIZE_DOCUMENT, + zText, nText, + bp, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5StorageIntegrityCallback}))) + } + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 && (*Fts5IntegrityCtx)(unsafe.Pointer(bp)).FszCol != *(*int32)(unsafe.Pointer(aColSize + uintptr(i)*4)) { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + *(*I64)(unsafe.Pointer(aTotalSize + uintptr(i)*8)) += I64((*Fts5IntegrityCtx)(unsafe.Pointer(bp)).FszCol) + if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_COLUMNS { + sqlite3Fts5TermsetFree(tls, (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FpTermset) + (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FpTermset = uintptr(0) + } + } + sqlite3Fts5TermsetFree(tls, (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FpTermset) + (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FpTermset = uintptr(0) + + if rc != SQLITE_OK { + break + } + } + rc2 = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pScan */))) + if rc == SQLITE_OK { + rc = rc2 + } + } + + // Test that the "totals" (sometimes called "averages") record looks Ok + if rc == SQLITE_OK { + var i int32 + rc = fts5StorageLoadTotals(tls, p, 0) + for i = 0; rc == SQLITE_OK && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { + if *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(i)*8)) != *(*I64)(unsafe.Pointer(aTotalSize + uintptr(i)*8)) { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + } + } + + // Check that the %_docsize and %_content tables contain the expected + // number of rows. + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { + *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) + rc = fts5StorageCount(tls, p, ts+33869, bp+48) + if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + } + if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { + *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) + rc = fts5StorageCount(tls, p, ts+34220, bp+56) + if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + } + } + + // Pass the expected checksum down to the FTS index module. It will + // verify, amongst other things, that it matches the checksum generated by + // inspecting the index itself. + if rc == SQLITE_OK { + rc = sqlite3Fts5IndexIntegrityCheck(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).Fcksum, bUseCksum) + } + + Xsqlite3_free(tls, aTotalSize) + return rc +} + +// Obtain an SQLite statement handle that may be used to read data from the +// %_content table. +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ + var rc int32 + + rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) + if rc == SQLITE_OK { + + *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) = uintptr(0) + } + return rc +} + +// Release an SQLite statement handle obtained via an earlier call to +// sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function +// must match that passed to the sqlite3Fts5StorageStmt() call. +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ + + if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { + Xsqlite3_reset(tls, pStmt) + *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) = pStmt + } else { + Xsqlite3_finalize(tls, pStmt) + } +} + +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ + var i int32 + var iOff int32 = 0 + for i = 0; i < nCol; i++ { + if iOff >= nBlob { + return 1 + } + iOff = iOff + sqlite3Fts5GetVarint32(tls, aBlob+uintptr(iOff), aCol+uintptr(i)*4) + } + return libc.Bool32(iOff != nBlob) +} + +// Argument aCol points to an array of integers containing one entry for +// each table column. This function reads the %_docsize record for the +// specified rowid and populates aCol[] with the results. +// +// An SQLite error code is returned if an error occurs, or SQLITE_OK +// otherwise. +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FnCol // Number of user columns in table + *(*uintptr)(unsafe.Pointer(bp /* pLookup */)) = uintptr(0) // Statement to query %_docsize + var rc int32 // Return Code + + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_LOOKUP_DOCSIZE, bp, uintptr(0)) + if *(*uintptr)(unsafe.Pointer(bp)) != 0 { + var bCorrupt int32 = 1 + + Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pLookup */)), 1, iRowid) + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { + var aBlob uintptr = Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pLookup */)), 0) + var nBlob int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp /* pLookup */)), 0) + if 0 == fts5StorageDecodeSizeArray(tls, aCol, nCol, aBlob, nBlob) { + bCorrupt = 0 + } + } + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pLookup */))) + if bCorrupt != 0 && rc == SQLITE_OK { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + } else { + + } + + return rc +} + +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ + var rc int32 = fts5StorageLoadTotals(tls, p, 0) + if rc == SQLITE_OK { + *(*I64)(unsafe.Pointer(pnToken)) = int64(0) + if iCol < 0 { + var i int32 + for i = 0; i < (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FnCol; i++ { + *(*I64)(unsafe.Pointer(pnToken)) += *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(i)*8)) + } + } else if iCol < (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FnCol { + *(*I64)(unsafe.Pointer(pnToken)) = *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(iCol)*8)) + } else { + rc = SQLITE_RANGE + } + } + return rc +} + +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ + var rc int32 = fts5StorageLoadTotals(tls, p, 0) + if rc == SQLITE_OK { + // nTotalRow being zero does not necessarily indicate a corrupt + // database - it might be that the FTS5 table really does contain zero + // rows. However this function is only called from the xRowCount() API, + // and there is no way for that API to be invoked if the table contains + // no rows. Hence the FTS5_CORRUPT return. + *(*I64)(unsafe.Pointer(pnRow)) = (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow + if (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow <= int64(0) { + rc = SQLITE_CORRUPT | int32(1)<<8 + } + } + return rc +} + +// Flush any data currently held in-memory to disk. +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ + var rc int32 = SQLITE_OK + var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) + if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { + rc = fts5StorageSaveTotals(tls, p) + (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 + } + if rc == SQLITE_OK { + rc = sqlite3Fts5IndexSync(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) + } + Xsqlite3_set_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb, iLastRowid) + return rc +} + +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ + (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 + return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) +} + +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*uintptr)(unsafe.Pointer(bp /* pReplace */)) = uintptr(0) + var rc int32 = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_CONFIG, bp, uintptr(0)) + if rc == SQLITE_OK { + Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 1, z, -1, uintptr(0)) + if pVal != 0 { + Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 2, pVal) + } else { + Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 2, iVal) + } + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */))) + Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 1) + } + if rc == SQLITE_OK && pVal != 0 { + var iNew int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FiCookie + 1 + rc = sqlite3Fts5IndexSetCookie(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, iNew) + if rc == SQLITE_OK { + (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FiCookie = iNew + } + } + return rc +} + +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +// #include "fts5Int.h" + +// ************************************************************************* +// +// Start of ascii tokenizer implementation. + +// For tokenizers with no "unicode" modifier, the set of token characters +// is the same as the set of ASCII range alphanumeric characters. +var aAsciiTokenChar = [128]uint8{ + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x00..0x0F + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x10..0x1F + uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x20..0x2F + uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x30..0x3F + uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x40..0x4F + uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F + uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F + uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F +} /* sqlite3.c:235704:22 */ + +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ + +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ + +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ + var i int32 + for i = 0; *(*uint8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { + if int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { + *(*uint8)(unsafe.Pointer(p + uintptr(int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))))) = uint8(bTokenChars) + } + } +} + +// Delete a "ascii" tokenizer. +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ + Xsqlite3_free(tls, p) +} + +// Create an "ascii" tokenizer. +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ + var rc int32 = SQLITE_OK + var p uintptr = uintptr(0) + _ = pUnused + if nArg%2 != 0 { + rc = SQLITE_ERROR + } else { + p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(AsciiTokenizer{}))) + if p == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var i int32 + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(AsciiTokenizer{}))) + libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar))) + for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { + var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36755) { + fts5AsciiAddExceptions(tls, p, zArg, 1) + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36766) { + fts5AsciiAddExceptions(tls, p, zArg, 0) + } else { + rc = SQLITE_ERROR + } + } + if rc != SQLITE_OK { + fts5AsciiDelete(tls, p) + p = uintptr(0) + } + } + } + + *(*uintptr)(unsafe.Pointer(ppOut)) = p + return rc +} + +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ + var i int32 + for i = 0; i < nByte; i++ { + var c uint8 = *(*uint8)(unsafe.Pointer(aIn + uintptr(i))) + if int32(c) >= 'A' && int32(c) <= 'Z' { + c = uint8(int32(c) + 32) + } + *(*uint8)(unsafe.Pointer(aOut + uintptr(i))) = c + } +} + +// Tokenize some text using the ascii tokenizer. +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var p uintptr = pTokenizer + var rc int32 = SQLITE_OK + var ie int32 + var is int32 = 0 + // var aFold [64]uint8 at bp, 64 + + var nFold int32 = int32(unsafe.Sizeof([64]uint8{})) + var pFold uintptr = bp /* aFold */ + var a uintptr = p /* &.aTokenChar */ + + _ = iUnused + + for is < nText && rc == SQLITE_OK { + var nByte int32 + + // Skip any leading divider characters. + for is < nText && (int32(*(*uint8)(unsafe.Pointer(pText + uintptr(is))))&0x80 == 0 && int32(*(*uint8)(unsafe.Pointer(a + uintptr(int32(*(*uint8)(unsafe.Pointer(pText + uintptr(is)))))))) == 0) { + is++ + } + if is == nText { + break + } + + // Count the token characters + ie = is + 1 + for ie < nText && (int32(*(*uint8)(unsafe.Pointer(pText + uintptr(ie))))&0x80 != 0 || *(*uint8)(unsafe.Pointer(a + uintptr(int32(*(*uint8)(unsafe.Pointer(pText + uintptr(ie))))))) != 0) { + ie++ + } + + // Fold to lower case + nByte = ie - is + if nByte > nFold { + if pFold != bp { + Xsqlite3_free(tls, pFold) + } + pFold = Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(nByte)*int64(2))) + if pFold == uintptr(0) { + rc = SQLITE_NOMEM + break + } + nFold = nByte * 2 + } + asciiFold(tls, pFold, pText+uintptr(is), nByte) + + // Invoke the token callback + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xToken})).f(tls, pCtx, 0, pFold, nByte, is, ie) + is = ie + 1 + } + + if pFold != bp { + Xsqlite3_free(tls, pFold) + } + if rc == SQLITE_DONE { + rc = SQLITE_OK + } + return rc +} + +// ************************************************************************* +// +// Start of unicode61 tokenizer implementation. + +// The following two macros - READ_UTF8 and WRITE_UTF8 - have been copied +// from the sqlite3 source file utf.c. If this file is compiled as part +// of the amalgamation, they are not required. + +type Unicode61Tokenizer1 = struct { + FaTokenChar [128]uint8 + FaFold uintptr + FnFold int32 + FeRemoveDiacritic int32 + FnException int32 + F__ccgo_pad1 [4]byte + FaiException uintptr + FaCategory [32]uint8 +} /* sqlite3.c:235911:9 */ + +// ************************************************************************* +// +// Start of unicode61 tokenizer implementation. + +// The following two macros - READ_UTF8 and WRITE_UTF8 - have been copied +// from the sqlite3 source file utf.c. If this file is compiled as part +// of the amalgamation, they are not required. + +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ + +// Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) + +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ + var rc int32 = SQLITE_OK + var n int32 = int32(libc.Xstrlen(tls, z)) + var aNew uintptr + + if n > 0 { + aNew = Xsqlite3_realloc64(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException, + uint64(uint64(n+(*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException)*uint64(unsafe.Sizeof(int32(0))))) + if aNew != 0 { + var nNew int32 = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException + var zCsr uintptr = z + var zTerm uintptr = z + uintptr(n) + for zCsr < zTerm { + var iCode U32 + var bToken int32 + iCode = U32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zCsr, 1)))) + if iCode >= U32(0xc0) { + iCode = U32(sqlite3Utf8Trans1[iCode-U32(0xc0)]) + for zCsr != zTerm && int32(*(*uint8)(unsafe.Pointer(zCsr)))&0xc0 == 0x80 { + iCode = iCode<<6 + U32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zCsr, 1))))) + } + if iCode < U32(0x80) || iCode&0xFFFFF800 == U32(0xD800) || iCode&0xFFFFFFFE == U32(0xFFFE) { + iCode = U32(0xFFFD) + } + } + + if iCode < U32(128) { + *(*uint8)(unsafe.Pointer(p + uintptr(iCode))) = uint8(bTokenChars) + } else { + bToken = int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, iCode))))) + + if bToken != bTokenChars && sqlite3Fts5UnicodeIsdiacritic(tls, int32(iCode)) == 0 { + var i int32 + for i = 0; i < nNew; i++ { + if U32(*(*int32)(unsafe.Pointer(aNew + uintptr(i)*4))) > iCode { + break + } + } + libc.Xmemmove(tls, aNew+uintptr(i+1)*4, aNew+uintptr(i)*4, uint64(nNew-i)*uint64(unsafe.Sizeof(int32(0)))) + *(*int32)(unsafe.Pointer(aNew + uintptr(i)*4)) = int32(iCode) + nNew++ + } + } + } + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException = aNew + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException = nNew + } else { + rc = SQLITE_NOMEM + } + } + + return rc +} + +// Return true if the p->aiException[] array contains the value iCode. +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ + if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { + var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException + var iLo int32 = 0 + var iHi int32 = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException - 1 + + for iHi >= iLo { + var iTest int32 = (iHi + iLo) / 2 + if iCode == *(*int32)(unsafe.Pointer(a + uintptr(iTest)*4)) { + return 1 + } else if iCode > *(*int32)(unsafe.Pointer(a + uintptr(iTest)*4)) { + iLo = iTest + 1 + } else { + iHi = iTest - 1 + } + } + } + + return 0 +} + +// Delete a "unicode61" tokenizer. +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ + if pTok != 0 { + var p uintptr = pTok + Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) + Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold) + Xsqlite3_free(tls, p) + } + return +} + +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ + var z uintptr = zCat + + for *(*uint8)(unsafe.Pointer(z)) != 0 { + for int32(*(*uint8)(unsafe.Pointer(z))) == ' ' || int32(*(*uint8)(unsafe.Pointer(z))) == '\t' { + z++ + } + if *(*uint8)(unsafe.Pointer(z)) != 0 && sqlite3Fts5UnicodeCatParse(tls, z, p+160) != 0 { + return SQLITE_ERROR + } + for int32(*(*uint8)(unsafe.Pointer(z))) != ' ' && int32(*(*uint8)(unsafe.Pointer(z))) != '\t' && int32(*(*uint8)(unsafe.Pointer(z))) != 0 { + z++ + } + } + + sqlite3Fts5UnicodeAscii(tls, p+160, p) + return SQLITE_OK +} + +// Create a "unicode61" tokenizer. +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ + var rc int32 = SQLITE_OK // Return code + var p uintptr = uintptr(0) // New tokenizer object + + _ = pUnused + + if nArg%2 != 0 { + rc = SQLITE_ERROR + } else { + p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) + if p != 0 { + var zCat uintptr = ts + 36777 /* "L* N* Co" */ + var i int32 + libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) + + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = FTS5_REMOVE_DIACRITICS_SIMPLE + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnFold = 64 + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold = Xsqlite3_malloc64(tls, uint64(uint64((*Unicode61Tokenizer)(unsafe.Pointer(p)).FnFold)*uint64(unsafe.Sizeof(uint8(0))))) + if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold == uintptr(0) { + rc = SQLITE_NOMEM + } + + // Search for a "categories" argument + for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36786) { + zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) + } + } + + if rc == SQLITE_OK { + rc = unicodeSetCategories(tls, p, zCat) + } + + for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { + var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36797) { + if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '2' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { + rc = SQLITE_ERROR + } else { + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*uint8)(unsafe.Pointer(zArg))) - '0' + + } + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36755) { + rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36766) { + rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36786) { + // no-op + } else { + rc = SQLITE_ERROR + } + } + + } else { + rc = SQLITE_NOMEM + } + if rc != SQLITE_OK { + fts5UnicodeDelete(tls, p) + p = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(ppOut)) = p + } + return rc +} + +// Return true if, for the purposes of tokenizing with the tokenizer +// passed as the first argument, codepoint iCode is considered a token +// character (not a separator). +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ + return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ + fts5UnicodeIsException(tls, p, iCode) +} + +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ + var p uintptr + var rc int32 + var a uintptr + var zTerm uintptr + var zCsr uintptr + + // Output buffer + var aFold uintptr + var nFold int32 + var pEnd uintptr + var iCode U32 // non-ASCII codepoint read from input + var zOut uintptr + var is int32 + var ie int32 + p = pTokenizer + rc = SQLITE_OK + a = p /* &.aTokenChar */ + zTerm = pText + uintptr(nText) + zCsr = pText + aFold = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold + nFold = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnFold + pEnd = aFold + uintptr(nFold-6) + + _ = iUnused + + // Each iteration of this loop gobbles up a contiguous run of separators, + // then the next token. +__1: + if !(rc == SQLITE_OK) { + goto __2 + } + zOut = aFold + + // Skip any separator characters. +__3: + if !(1 != 0) { + goto __4 + } + if !(zCsr >= zTerm) { + goto __5 + } + goto tokenize_done +__5: + ; + if !(int32(*(*uint8)(unsafe.Pointer(zCsr)))&0x80 != 0) { + goto __6 + } + // A character outside of the ascii range. Skip past it if it is + // a separator character. Or break out of the loop if it is not. + is = int32((int64(zCsr) - int64(pText)) / 1) + iCode = U32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zCsr, 1)))) + if !(iCode >= U32(0xc0)) { + goto __8 + } + iCode = U32(sqlite3Utf8Trans1[iCode-U32(0xc0)]) +__9: + if !(zCsr != zTerm && int32(*(*uint8)(unsafe.Pointer(zCsr)))&0xc0 == 0x80) { + goto __10 + } + iCode = iCode<<6 + U32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zCsr, 1))))) + goto __9 +__10: + ; + if !(iCode < U32(0x80) || iCode&0xFFFFF800 == U32(0xD800) || iCode&0xFFFFFFFE == U32(0xFFFE)) { + goto __11 + } + iCode = U32(0xFFFD) +__11: + ; +__8: + ; + + if !(fts5UnicodeIsAlnum(tls, p, int32(iCode)) != 0) { + goto __12 + } + goto non_ascii_tokenchar +__12: + ; + goto __7 +__6: + if !(*(*uint8)(unsafe.Pointer(a + uintptr(*(*uint8)(unsafe.Pointer(zCsr))))) != 0) { + goto __13 + } + is = int32((int64(zCsr) - int64(pText)) / 1) + goto ascii_tokenchar +__13: + ; + zCsr++ +__7: + ; + goto __3 +__4: + ; + + // Run through the tokenchars. Fold them into the output buffer along + // the way. +__14: + if !(zCsr < zTerm) { + goto __15 + } + + // Grow the output buffer so that there is sufficient space to fit the + // largest possible utf-8 character. + if !(zOut > pEnd) { + goto __16 + } + aFold = Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(nFold)*int64(2))) + if !(aFold == uintptr(0)) { + goto __17 + } + rc = SQLITE_NOMEM + goto tokenize_done +__17: + ; + zOut = aFold + uintptr((int64(zOut)-int64((*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold))/1) + libc.Xmemcpy(tls, aFold, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold, uint64(nFold)) + Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold) + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold = aFold + (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnFold = libc.AssignInt32(&nFold, nFold*2) + pEnd = aFold + uintptr(nFold-6) +__16: + ; + + if !(int32(*(*uint8)(unsafe.Pointer(zCsr)))&0x80 != 0) { + goto __18 + } + // An non-ascii-range character. Fold it into the output buffer if + // it is a token character, or break out of the loop if it is not. + iCode = U32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zCsr, 1)))) + if !(iCode >= U32(0xc0)) { + goto __20 + } + iCode = U32(sqlite3Utf8Trans1[iCode-U32(0xc0)]) +__21: + if !(zCsr != zTerm && int32(*(*uint8)(unsafe.Pointer(zCsr)))&0xc0 == 0x80) { + goto __22 + } + iCode = iCode<<6 + U32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zCsr, 1))))) + goto __21 +__22: + ; + if !(iCode < U32(0x80) || iCode&0xFFFFF800 == U32(0xD800) || iCode&0xFFFFFFFE == U32(0xFFFE)) { + goto __23 + } + iCode = U32(0xFFFD) +__23: + ; +__20: + ; + + if !(fts5UnicodeIsAlnum(tls, p, int32(iCode)) != 0 || sqlite3Fts5UnicodeIsdiacritic(tls, int32(iCode)) != 0) { + goto __24 + } +non_ascii_tokenchar: + iCode = U32(sqlite3Fts5UnicodeFold(tls, int32(iCode), (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic)) + if !(iCode != 0) { + goto __26 + } + if !(iCode < U32(0x00080)) { + goto __27 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(U8(iCode & U32(0xFF))) + goto __28 +__27: + if !(iCode < U32(0x00800)) { + goto __29 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xC0 + int32(U8(iCode>>6&U32(0x1F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + goto __30 +__29: + if !(iCode < U32(0x10000)) { + goto __31 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xE0 + int32(U8(iCode>>12&U32(0x0F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + goto __32 +__31: + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xF0 + int32(U8(iCode>>18&U32(0x07)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>12&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) +__32: + ; +__30: + ; +__28: + ; +__26: + ; + + goto __25 +__24: + goto __15 +__25: + ; + goto __19 +__18: + if !(int32(*(*uint8)(unsafe.Pointer(a + uintptr(*(*uint8)(unsafe.Pointer(zCsr)))))) == 0) { + goto __33 + } + // An ascii-range separator character. End of token. + goto __15 + goto __34 +__33: +ascii_tokenchar: + if !(int32(*(*uint8)(unsafe.Pointer(zCsr))) >= 'A' && int32(*(*uint8)(unsafe.Pointer(zCsr))) <= 'Z') { + goto __35 + } + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(int32(*(*uint8)(unsafe.Pointer(zCsr))) + 32) + goto __36 +__35: + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(*(*uint8)(unsafe.Pointer(zCsr))) +__36: + ; + zCsr++ +__34: + ; +__19: + ; + ie = int32((int64(zCsr) - int64(pText)) / 1) + goto __14 +__15: + ; + + // Invoke the token callback + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xToken})).f(tls, pCtx, 0, aFold, int32((int64(zOut)-int64(aFold))/1), is, ie) + goto __1 +__2: + ; + +tokenize_done: + if !(rc == SQLITE_DONE) { + goto __37 + } + rc = SQLITE_OK +__37: + ; + return rc +} + +// ************************************************************************* +// +// Start of porter stemmer implementation. + +// Any tokens larger than this (in bytes) are passed through without +// stemming. + +type PorterTokenizer1 = struct { + Ftokenizer Fts5_tokenizer + FpTokenizer uintptr + FaBuf [128]uint8 +} /* sqlite3.c:236229:9 */ + +// ************************************************************************* +// +// Start of porter stemmer implementation. + +// Any tokens larger than this (in bytes) are passed through without +// stemming. + +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ + +// Delete a "porter" tokenizer. +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ + if pTok != 0 { + var p uintptr = pTok + if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { + (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*PorterTokenizer)(unsafe.Pointer(p)).Ftokenizer.FxDelete})).f(tls, (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer) + } + Xsqlite3_free(tls, p) + } +} + +// Create a "porter" tokenizer. +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pApi uintptr = pCtx + var rc int32 = SQLITE_OK + var pRet uintptr + *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) + var zBase uintptr = ts + 36815 /* "unicode61" */ + + if nArg > 0 { + zBase = *(*uintptr)(unsafe.Pointer(azArg)) + } + + pRet = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PorterTokenizer{}))) + if pRet != 0 { + libc.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(PorterTokenizer{}))) + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxFindTokenizer})).f(tls, pApi, zBase, bp /* &pUserdata */, pRet /* &.tokenizer */) + } else { + rc = SQLITE_NOMEM + } + if rc == SQLITE_OK { + var nArg2 int32 = func() int32 { + if nArg > 0 { + return nArg - 1 + } + return 0 + }() + var azArg2 uintptr = func() uintptr { + if nArg2 != 0 { + return azArg + 1*8 + } + return uintptr(0) + }() + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*PorterTokenizer)(unsafe.Pointer(pRet)).Ftokenizer.FxCreate})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)), azArg2, nArg2, pRet+24 /* &.pTokenizer */) + } + + if rc != SQLITE_OK { + fts5PorterDelete(tls, pRet) + pRet = uintptr(0) + } + *(*uintptr)(unsafe.Pointer(ppOut)) = pRet + return rc +} + +type PorterContext1 = struct { + FpCtx uintptr + FxToken uintptr + FaBuf uintptr +} /* sqlite3.c:236288:9 */ + +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ + +type PorterRule1 = struct { + FzSuffix uintptr + FnSuffix int32 + F__ccgo_pad1 [4]byte + FxCond uintptr + FzOutput uintptr + FnOutput int32 + F__ccgo_pad2 [4]byte +} /* sqlite3.c:236295:9 */ + +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ + +func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ + return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') +} + +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ + var i int32 + var bCons int32 = bPrevCons + + // Scan for a vowel + for i = 0; i < nStem; i++ { + if 0 == libc.AssignInt32(&bCons, libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0))) { + break + } + } + + // Scan for a consonent + for i++; i < nStem; i++ { + if libc.AssignInt32(&bCons, libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0))) != 0 { + return i + 1 + } + } + return 0 +} + +// porter rule condition: (m > 0) +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ + return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) +} + +// porter rule condition: (m > 1) +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ + var n int32 + n = fts5PorterGobbleVC(tls, zStem, nStem, 0) + if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { + return 1 + } + return 0 +} + +// porter rule condition: (m = 1) +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ + var n int32 + n = fts5PorterGobbleVC(tls, zStem, nStem, 0) + if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { + return 1 + } + return 0 +} + +// porter rule condition: (*o) +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ + if int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { + return 0 + } else { + var i int32 + var mask int32 = 0 + var bCons int32 = 0 + for i = 0; i < nStem; i++ { + bCons = libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0)) + + mask = mask<<1 + bCons + } + return libc.Bool32(mask&0x0007 == 0x0005) + } + return int32(0) +} + +// porter rule condition: (m > 1 and (*S or *T)) +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ + + return libc.Bool32((int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && + fts5Porter_MGt1(tls, zStem, nStem) != 0) +} + +// porter rule condition: (*v*) +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ + var i int32 + for i = 0; i < nStem; i++ { + if fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { + return 1 + } + } + return 0 +} + +// ************************************************************************* +// +// +// GENERATED CODE STARTS HERE (mkportersteps.tcl) + +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ + var ret int32 = 0 + var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) + switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { + + case 'a': + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36825, aBuf+uintptr(nBuf-2), uint64(2)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + } + } + break + + case 'c': + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36828, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + } + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36833, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + } + } + break + + case 'e': + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36838, aBuf+uintptr(nBuf-2), uint64(2)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + } + } + break + + case 'i': + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36841, aBuf+uintptr(nBuf-2), uint64(2)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + } + } + break + + case 'l': + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36844, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + } + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36849, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + } + } + break + + case 'n': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36854, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + } + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36864, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + } + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36869, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'o': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36877, aBuf+uintptr(nBuf-2), uint64(2)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + } + } + break + + case 's': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36880, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 't': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36884, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36888, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'u': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36892, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36896, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36900, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + } + return ret +} + +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ + var ret int32 = 0 + var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) + switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { + + case 'a': + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36904, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36884, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 + ret = 1 + } + break + + case 'b': + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36907, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36910, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 + ret = 1 + } + break + + case 'i': + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36914, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36900, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 + ret = 1 + } + break + + } + return ret +} + +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ + var ret int32 = 0 + var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) + switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { + + case 'a': + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36917, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36884, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36925, aBuf+uintptr(nBuf-6), uint64(6)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36932, uint64(4)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 + } + } + break + + case 'c': + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36937, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36833, uint64(4)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 + } + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36942, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36828, uint64(4)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 + } + } + break + + case 'e': + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36947, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36900, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 + } + } + break + + case 'g': + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15378, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 + } + } + break + + case 'l': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36957, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36910, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 + } + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36961, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36825, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 + } + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36869, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 + } + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36972, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36976, uint64(1)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 + } + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36978, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36892, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 + } + } + break + + case 'o': + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36984, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36900, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36992, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36884, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 + } + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36884, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 + } + } + break + + case 's': + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36825, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37009, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36896, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37017, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37025, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37029, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36892, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } + break + + case 't': + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37037, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36825, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 + } + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37043, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36896, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 + } + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37049, aBuf+uintptr(nBuf-6), uint64(6)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36910, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 + } + } + break + + } + return ret +} + +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ + var ret int32 = 0 + var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) + switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { + + case 'a': + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37056, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36841, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 + } + } + break + + case 's': + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37061, aBuf+uintptr(nBuf-4), uint64(4)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + } + } + break + + case 't': + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37066, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36841, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 + } + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36841, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 + } + } + break + + case 'u': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'v': + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37078, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + } + } + break + + case 'z': + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37084, aBuf+uintptr(nBuf-5), uint64(5)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36825, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 + } + } + break + + } + return ret +} + +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ + var ret int32 = 0 + var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) + switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { + + case 'e': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37090, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37094, uint64(2)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 + } + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37097, aBuf+uintptr(nBuf-2), uint64(2)) { + if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + ret = 1 + } + } + break + + case 'n': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + ret = 1 + } + } + break + + } + return ret +} + +// +// GENERATED CODE ENDS HERE (mkportersteps.tcl) +// +// + +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ + var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) + if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { + if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { + if nBuf > 4 && int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-4)))) == 's' && int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-3)))) == 's' || + nBuf > 3 && int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-3)))) == 'i' { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + } else { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 1 + } + } else if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) != 's' { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 1 + } + } +} + +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var p uintptr + var aBuf uintptr + // var nBuf int32 at bp, 4 + + var c uint8 + p = pCtx + + if !(nToken > FTS5_PORTER_MAX_TOKEN || nToken < 3) { + goto __1 + } + goto pass_through +__1: + ; + aBuf = (*PorterContext)(unsafe.Pointer(p)).FaBuf + *(*int32)(unsafe.Pointer(bp /* nBuf */)) = nToken + libc.Xmemcpy(tls, aBuf, pToken, uint64(*(*int32)(unsafe.Pointer(bp /* nBuf */)))) + + // Step 1. + fts5PorterStep1A(tls, aBuf, bp) + if !(fts5PorterStep1B(tls, aBuf, bp) != 0) { + goto __2 + } + if !(fts5PorterStep1B2(tls, aBuf, bp) == 0) { + goto __3 + } + c = *(*uint8)(unsafe.Pointer(aBuf + uintptr(*(*int32)(unsafe.Pointer(bp))-1))) + if !(fts5PorterIsVowel(tls, c, 0) == 0 && + int32(c) != 'l' && int32(c) != 's' && int32(c) != 'z' && int32(c) == int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(*(*int32)(unsafe.Pointer(bp))-2))))) { + goto __4 + } + *(*int32)(unsafe.Pointer(bp /* nBuf */))-- + goto __5 +__4: + if !(fts5Porter_MEq1(tls, aBuf, *(*int32)(unsafe.Pointer(bp))) != 0 && fts5Porter_Ostar(tls, aBuf, *(*int32)(unsafe.Pointer(bp))) != 0) { + goto __6 + } + *(*uint8)(unsafe.Pointer(aBuf + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp /* nBuf */)), 1)))) = uint8('e') +__6: + ; +__5: + ; +__3: + ; +__2: + ; + + // Step 1C. + if !(int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) == 'y' && fts5Porter_Vowel(tls, aBuf, *(*int32)(unsafe.Pointer(bp))-1) != 0) { + goto __7 + } + *(*uint8)(unsafe.Pointer(aBuf + uintptr(*(*int32)(unsafe.Pointer(bp))-1))) = uint8('i') +__7: + ; + + // Steps 2 through 4. + fts5PorterStep2(tls, aBuf, bp) + fts5PorterStep3(tls, aBuf, bp) + fts5PorterStep4(tls, aBuf, bp) + + // Step 5a. + + if !(int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) == 'e') { + goto __8 + } + if !(fts5Porter_MGt1(tls, aBuf, *(*int32)(unsafe.Pointer(bp))-1) != 0 || + fts5Porter_MEq1(tls, aBuf, *(*int32)(unsafe.Pointer(bp))-1) != 0 && !(fts5Porter_Ostar(tls, aBuf, *(*int32)(unsafe.Pointer(bp))-1) != 0)) { + goto __9 + } + *(*int32)(unsafe.Pointer(bp /* nBuf */))-- +__9: + ; +__8: + ; + + // Step 5b. + if !(*(*int32)(unsafe.Pointer(bp)) > 1 && int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) == 'l' && + int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(*(*int32)(unsafe.Pointer(bp))-2)))) == 'l' && fts5Porter_MGt1(tls, aBuf, *(*int32)(unsafe.Pointer(bp))-1) != 0) { + goto __10 + } + *(*int32)(unsafe.Pointer(bp /* nBuf */))-- +__10: + ; + + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*PorterContext)(unsafe.Pointer(p)).FxToken})).f(tls, (*PorterContext)(unsafe.Pointer(p)).FpCtx, tflags, aBuf, *(*int32)(unsafe.Pointer(bp /* nBuf */)), iStart, iEnd) + +pass_through: + return (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*PorterContext)(unsafe.Pointer(p)).FxToken})).f(tls, (*PorterContext)(unsafe.Pointer(p)).FpCtx, tflags, pToken, nToken, iStart, iEnd) +} + +// Tokenize using the porter tokenizer. +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var p uintptr = pTokenizer + // var sCtx PorterContext at bp, 24 + + (*PorterContext)(unsafe.Pointer(bp /* &sCtx */)).FxToken = xToken + (*PorterContext)(unsafe.Pointer(bp /* &sCtx */)).FpCtx = pCtx + (*PorterContext)(unsafe.Pointer(bp /* &sCtx */)).FaBuf = p + 32 /* &.aBuf */ + return (*struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*PorterTokenizer)(unsafe.Pointer(p)).Ftokenizer.FxTokenize})).f(tls, + (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer, bp, flags, pText, nText, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + }{fts5PorterCb}))) +} + +// ************************************************************************* +// +// Start of trigram implementation. +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ + +// ************************************************************************* +// +// Start of trigram implementation. +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ + +// Free a trigram tokenizer. +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ + Xsqlite3_free(tls, p) +} + +// Allocate a trigram tokenizer. +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ + var rc int32 = SQLITE_OK + var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) + _ = pUnused + if pNew == uintptr(0) { + rc = SQLITE_NOMEM + } else { + var i int32 + (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 + for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { + var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37104) { + if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { + rc = SQLITE_ERROR + } else { + (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '0') + } + } else { + rc = SQLITE_ERROR + } + } + if rc != SQLITE_OK { + fts5TriDelete(tls, pNew) + pNew = uintptr(0) + } + } + *(*uintptr)(unsafe.Pointer(ppOut)) = pNew + return rc +} + +// Trigram tokenizer tokenize routine. +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var p uintptr = pTok + var rc int32 = SQLITE_OK + // var aBuf [32]uint8 at bp, 32 + + var zIn uintptr = pText + var zEof uintptr = zIn + uintptr(nText) + var iCode U32 + + _ = unusedFlags + for 1 != 0 { + var zOut uintptr = bp /* aBuf */ + var iStart int32 = int32((int64(zIn) - int64(pText)) / 1) + var zNext uintptr + + iCode = U32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + if iCode >= U32(0xc0) { + iCode = U32(sqlite3Utf8Trans1[iCode-U32(0xc0)]) + for zIn != zEof && int32(*(*uint8)(unsafe.Pointer(zIn)))&0xc0 == 0x80 { + iCode = iCode<<6 + U32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))) + } + if iCode < U32(0x80) || iCode&0xFFFFF800 == U32(0xD800) || iCode&0xFFFFFFFE == U32(0xFFFE) { + iCode = U32(0xFFFD) + } + } + + if iCode == U32(0) { + break + } + zNext = zIn + if zIn < zEof { + if (*TrigramTokenizer)(unsafe.Pointer(p)).FbFold != 0 { + iCode = U32(sqlite3Fts5UnicodeFold(tls, int32(iCode), 0)) + } + { + if iCode < U32(0x00080) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(U8(iCode & U32(0xFF))) + } else if iCode < U32(0x00800) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xC0 + int32(U8(iCode>>6&U32(0x1F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } else if iCode < U32(0x10000) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xE0 + int32(U8(iCode>>12&U32(0x0F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } else { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xF0 + int32(U8(iCode>>18&U32(0x07)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>12&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } + } + + iCode = U32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + if iCode >= U32(0xc0) { + iCode = U32(sqlite3Utf8Trans1[iCode-U32(0xc0)]) + for zIn != zEof && int32(*(*uint8)(unsafe.Pointer(zIn)))&0xc0 == 0x80 { + iCode = iCode<<6 + U32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))) + } + if iCode < U32(0x80) || iCode&0xFFFFF800 == U32(0xD800) || iCode&0xFFFFFFFE == U32(0xFFFE) { + iCode = U32(0xFFFD) + } + } + + if iCode == U32(0) { + break + } + } else { + break + } + if zIn < zEof { + if (*TrigramTokenizer)(unsafe.Pointer(p)).FbFold != 0 { + iCode = U32(sqlite3Fts5UnicodeFold(tls, int32(iCode), 0)) + } + { + if iCode < U32(0x00080) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(U8(iCode & U32(0xFF))) + } else if iCode < U32(0x00800) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xC0 + int32(U8(iCode>>6&U32(0x1F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } else if iCode < U32(0x10000) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xE0 + int32(U8(iCode>>12&U32(0x0F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } else { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xF0 + int32(U8(iCode>>18&U32(0x07)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>12&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } + } + + iCode = U32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) + if iCode >= U32(0xc0) { + iCode = U32(sqlite3Utf8Trans1[iCode-U32(0xc0)]) + for zIn != zEof && int32(*(*uint8)(unsafe.Pointer(zIn)))&0xc0 == 0x80 { + iCode = iCode<<6 + U32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))) + } + if iCode < U32(0x80) || iCode&0xFFFFF800 == U32(0xD800) || iCode&0xFFFFFFFE == U32(0xFFFE) { + iCode = U32(0xFFFD) + } + } + + if iCode == U32(0) { + break + } + if (*TrigramTokenizer)(unsafe.Pointer(p)).FbFold != 0 { + iCode = U32(sqlite3Fts5UnicodeFold(tls, int32(iCode), 0)) + } + { + if iCode < U32(0x00080) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(U8(iCode & U32(0xFF))) + } else if iCode < U32(0x00800) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xC0 + int32(U8(iCode>>6&U32(0x1F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } else if iCode < U32(0x10000) { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xE0 + int32(U8(iCode>>12&U32(0x0F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } else { + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xF0 + int32(U8(iCode>>18&U32(0x07)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>12&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode>>6&U32(0x3F)))) + *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(iCode&U32(0x3F)))) + } + } + + } else { + break + } + rc = (*struct { + f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{xToken})).f(tls, pCtx, 0, bp /* &aBuf[0] */, int32(int64((zOut-bp) /* &aBuf[0] */ /1)), iStart, int32(int64((uintptr(iStart)+zOut-bp) /* &aBuf[0] */ /1))) + if rc != SQLITE_OK { + break + } + zIn = zNext + } + + return rc +} + +// Argument xCreate is a pointer to a constructor function for a tokenizer. +// pTok is a tokenizer previously created using the same method. This function +// returns one of FTS5_PATTERN_NONE, FTS5_PATTERN_LIKE or FTS5_PATTERN_GLOB +// indicating the style of pattern matching that the tokenizer can support. +// In practice, this is: +// +// "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB +// "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE +// all other tokenizers - FTS5_PATTERN_NONE +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ + if xCreate == *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + }{fts5TriCreate})) { + var p uintptr = pTok + if (*TrigramTokenizer)(unsafe.Pointer(p)).FbFold != 0 { + return FTS5_PATTERN_LIKE + } + return FTS5_PATTERN_GLOB + } + return FTS5_PATTERN_NONE +} + +// Register all built-in tokenizers with FTS5. +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ + bp := tls.Alloc(128) + defer tls.Free(128) + + *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ + {FzName: ts + 36815, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 + }{fts5UnicodeTokenize}))}}, + {FzName: ts + 37119, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 + }{fts5AsciiTokenize}))}}, + {FzName: ts + 37125, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 + }{fts5PorterTokenize}))}}, + {FzName: ts + 37132, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 + }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 + }{fts5TriTokenize}))}}, + } + + var rc int32 = SQLITE_OK // Return code + var i int32 // To iterate through builtin functions + + for i = 0; rc == SQLITE_OK && i < int32(uint64(unsafe.Sizeof([4]BuiltinTokenizer{}))/uint64(unsafe.Sizeof(BuiltinTokenizer{}))); i++ { + rc = (*struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxCreateTokenizer})).f(tls, pApi, + (*BuiltinTokenizer)(unsafe.Pointer(bp+uintptr(i)*32)).FzName, + pApi, + bp+uintptr(i)*32+8, + uintptr(0)) + } + + return rc +} + +type BuiltinTokenizer = struct { + FzName uintptr + Fx Fts5_tokenizer +} /* sqlite3.c:237071:3 */ + +// 2012-05-25 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +// DO NOT EDIT THIS MACHINE GENERATED FILE. + +// #include + +// If the argument is a codepoint corresponding to a lowercase letter +// in the ASCII range with a diacritic added, return the codepoint +// of the ASCII letter only. For example, if passed 235 - "LATIN +// SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER +// E"). The resuls of passing a codepoint that corresponds to an +// uppercase letter are undefined. +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ + bp := tls.Alloc(378) + defer tls.Free(378) + + *(*[126]uint16)(unsafe.Pointer(bp /* aDia */)) = [126]uint16{ + uint16(0), uint16(1797), uint16(1848), uint16(1859), uint16(1891), uint16(1928), uint16(1940), uint16(1995), + uint16(2024), uint16(2040), uint16(2060), uint16(2110), uint16(2168), uint16(2206), uint16(2264), uint16(2286), + uint16(2344), uint16(2383), uint16(2472), uint16(2488), uint16(2516), uint16(2596), uint16(2668), uint16(2732), + uint16(2782), uint16(2842), uint16(2894), uint16(2954), uint16(2984), uint16(3000), uint16(3028), uint16(3336), + uint16(3456), uint16(3696), uint16(3712), uint16(3728), uint16(3744), uint16(3766), uint16(3832), uint16(3896), + uint16(3912), uint16(3928), uint16(3944), uint16(3968), uint16(4008), uint16(4040), uint16(4056), uint16(4106), + uint16(4138), uint16(4170), uint16(4202), uint16(4234), uint16(4266), uint16(4296), uint16(4312), uint16(4344), + uint16(4408), uint16(4424), uint16(4442), uint16(4472), uint16(4488), uint16(4504), uint16(6148), uint16(6198), + uint16(6264), uint16(6280), uint16(6360), uint16(6429), uint16(6505), uint16(6529), uint16(61448), uint16(61468), + uint16(61512), uint16(61534), uint16(61592), uint16(61610), uint16(61642), uint16(61672), uint16(61688), uint16(61704), + uint16(61726), uint16(61784), uint16(61800), uint16(61816), uint16(61836), uint16(61880), uint16(61896), uint16(61914), + uint16(61948), uint16(61998), uint16(62062), uint16(62122), uint16(62154), uint16(62184), uint16(62200), uint16(62218), + uint16(62252), uint16(62302), uint16(62364), uint16(62410), uint16(62442), uint16(62478), uint16(62536), uint16(62554), + uint16(62584), uint16(62604), uint16(62640), uint16(62648), uint16(62656), uint16(62664), uint16(62730), uint16(62766), + uint16(62830), uint16(62890), uint16(62924), uint16(62974), uint16(63032), uint16(63050), uint16(63082), uint16(63118), + uint16(63182), uint16(63242), uint16(63274), uint16(63310), uint16(63368), uint16(63390), + } + *(*[126]uint8)(unsafe.Pointer(bp + 252 /* aChar */)) = [126]uint8{ + uint8(0), uint8('a'), uint8('c'), uint8('e'), uint8('i'), uint8('n'), + uint8('o'), uint8('u'), uint8('y'), uint8('y'), uint8('a'), uint8('c'), + uint8('d'), uint8('e'), uint8('e'), uint8('g'), uint8('h'), uint8('i'), + uint8('j'), uint8('k'), uint8('l'), uint8('n'), uint8('o'), uint8('r'), + uint8('s'), uint8('t'), uint8('u'), uint8('u'), uint8('w'), uint8('y'), + uint8('z'), uint8('o'), uint8('u'), uint8('a'), uint8('i'), uint8('o'), + uint8('u'), uint8('u' | int32(uint8(0x80))), uint8('a' | int32(uint8(0x80))), uint8('g'), uint8('k'), uint8('o'), + uint8('o' | int32(uint8(0x80))), uint8('j'), uint8('g'), uint8('n'), uint8('a' | int32(uint8(0x80))), uint8('a'), + uint8('e'), uint8('i'), uint8('o'), uint8('r'), uint8('u'), uint8('s'), + uint8('t'), uint8('h'), uint8('a'), uint8('e'), uint8('o' | int32(uint8(0x80))), uint8('o'), + uint8('o' | int32(uint8(0x80))), uint8('y'), uint8(0), uint8(0), uint8(0), uint8(0), + uint8(0), uint8(0), uint8(0), uint8(0), uint8('a'), uint8('b'), + uint8('c' | int32(uint8(0x80))), uint8('d'), uint8('d'), uint8('e' | int32(uint8(0x80))), uint8('e'), uint8('e' | int32(uint8(0x80))), + uint8('f'), uint8('g'), uint8('h'), uint8('h'), uint8('i'), uint8('i' | int32(uint8(0x80))), + uint8('k'), uint8('l'), uint8('l' | int32(uint8(0x80))), uint8('l'), uint8('m'), uint8('n'), + uint8('o' | int32(uint8(0x80))), uint8('p'), uint8('r'), uint8('r' | int32(uint8(0x80))), uint8('r'), uint8('s'), + uint8('s' | int32(uint8(0x80))), uint8('t'), uint8('u'), uint8('u' | int32(uint8(0x80))), uint8('v'), uint8('w'), + uint8('w'), uint8('x'), uint8('y'), uint8('z'), uint8('h'), uint8('t'), + uint8('w'), uint8('y'), uint8('a'), uint8('a' | int32(uint8(0x80))), uint8('a' | int32(uint8(0x80))), uint8('a' | int32(uint8(0x80))), + uint8('e'), uint8('e' | int32(uint8(0x80))), uint8('e' | int32(uint8(0x80))), uint8('i'), uint8('o'), uint8('o' | int32(uint8(0x80))), + uint8('o' | int32(uint8(0x80))), uint8('o' | int32(uint8(0x80))), uint8('u'), uint8('u' | int32(uint8(0x80))), uint8('u' | int32(uint8(0x80))), uint8('y'), + } + + var key uint32 = uint32(c)<<3 | uint32(0x00000007) + var iRes int32 = 0 + var iHi int32 = int32(uint64(unsafe.Sizeof([126]uint16{}))/uint64(unsafe.Sizeof(uint16(0))) - uint64(1)) + var iLo int32 = 0 + for iHi >= iLo { + var iTest int32 = (iHi + iLo) / 2 + if key >= uint32(*(*uint16)(unsafe.Pointer(bp + uintptr(iTest)*2))) { + iRes = iTest + iLo = iTest + 1 + } else { + iHi = iTest - 1 + } + } + + if bComplex == 0 && int32(*(*uint8)(unsafe.Pointer(bp + 252 + uintptr(iRes))))&0x80 != 0 { + return c + } + if c > int32(*(*uint16)(unsafe.Pointer(bp + uintptr(iRes)*2)))>>3+int32(*(*uint16)(unsafe.Pointer(bp + uintptr(iRes)*2)))&0x07 { + return c + } + return int32(*(*uint8)(unsafe.Pointer(bp + 252 + uintptr(iRes)))) & 0x7F +} + +// Return true if the argument interpreted as a unicode codepoint +// is a diacritical modifier character. +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ + var mask0 uint32 = uint32(0x08029FDF) + var mask1 uint32 = uint32(0x000361F8) + if c < 768 || c > 817 { + return 0 + } + if c < 768+32 { + return int32(mask0 & (uint32(uint32(1)) << (c - 768))) + } + return int32(mask1 & (uint32(uint32(1)) << (c - 768 - 32))) +} + +// Interpret the argument as a unicode codepoint. If the codepoint +// is an upper case character that has a lower case equivalent, +// return the codepoint corresponding to the lower case version. +// Otherwise, return a copy of the argument. +// +// The results are undefined if the value passed to this function +// is less than zero. +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ + + var ret int32 = c + + if c < 128 { + if c >= 'A' && c <= 'Z' { + ret = c + ('a' - 'A') + } + } else if c < 65536 { + var p uintptr + var iHi int32 = int32(uint64(unsafe.Sizeof(aEntry))/uint64(unsafe.Sizeof(TableEntry{})) - uint64(1)) + var iLo int32 = 0 + var iRes int32 = -1 + + for iHi >= iLo { + var iTest int32 = (iHi + iLo) / 2 + var cmp int32 = c - int32(aEntry[iTest].FiCode) + if cmp >= 0 { + iRes = iTest + iLo = iTest + 1 + } else { + iHi = iTest - 1 + } + } + + p = uintptr(unsafe.Pointer(&aEntry)) + uintptr(iRes)*4 + if c < int32((*TableEntry)(unsafe.Pointer(p)).FiCode)+int32((*TableEntry)(unsafe.Pointer(p)).FnRange) && 0 == 0x01&int32((*TableEntry)(unsafe.Pointer(p)).Fflags)&(int32((*TableEntry)(unsafe.Pointer(p)).FiCode)^c) { + ret = (c + int32(aiOff[int32((*TableEntry)(unsafe.Pointer(p)).Fflags)>>1])) & 0x0000FFFF + + } + + if eRemoveDiacritic != 0 { + ret = fts5_remove_diacritic(tls, ret, libc.Bool32(eRemoveDiacritic == 2)) + } + } else if c >= 66560 && c < 66600 { + ret = c + 40 + } + + return ret +} + +// Each entry in the following array defines a rule for folding a range +// of codepoints to lower case. The rule applies to a range of nRange +// codepoints starting at codepoint iCode. +// +// If the least significant bit in flags is clear, then the rule applies +// to all nRange codepoints (i.e. all nRange codepoints are upper case and +// need to be folded). Or, if it is set, then the rule only applies to +// every second codepoint in the range, starting with codepoint C. +// +// The 7 most significant bits in flags are an index into the aiOff[] +// array. If a specific codepoint C does require folding, then its lower +// case equivalent is ((C + aiOff[flags>>1]) & 0xFFFF). +// +// The contents of this array are generated by parsing the CaseFolding.txt +// file distributed as part of the "Unicode Character Database". See +// http://www.unicode.org for details. +type TableEntry = struct { + FiCode uint16 + Fflags uint8 + FnRange uint8 +} /* sqlite3.c:237230:16 */ + +var aEntry = [163]TableEntry{ + {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, + {FiCode: uint16(216), Fflags: uint8(14), FnRange: uint8(7)}, {FiCode: uint16(256), Fflags: uint8(1), FnRange: uint8(48)}, {FiCode: uint16(306), Fflags: uint8(1), FnRange: uint8(6)}, + {FiCode: uint16(313), Fflags: uint8(1), FnRange: uint8(16)}, {FiCode: uint16(330), Fflags: uint8(1), FnRange: uint8(46)}, {FiCode: uint16(376), Fflags: uint8(116), FnRange: uint8(1)}, + {FiCode: uint16(377), Fflags: uint8(1), FnRange: uint8(6)}, {FiCode: uint16(383), Fflags: uint8(104), FnRange: uint8(1)}, {FiCode: uint16(385), Fflags: uint8(50), FnRange: uint8(1)}, + {FiCode: uint16(386), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(390), Fflags: uint8(44), FnRange: uint8(1)}, {FiCode: uint16(391), FnRange: uint8(1)}, + {FiCode: uint16(393), Fflags: uint8(42), FnRange: uint8(2)}, {FiCode: uint16(395), FnRange: uint8(1)}, {FiCode: uint16(398), Fflags: uint8(32), FnRange: uint8(1)}, + {FiCode: uint16(399), Fflags: uint8(38), FnRange: uint8(1)}, {FiCode: uint16(400), Fflags: uint8(40), FnRange: uint8(1)}, {FiCode: uint16(401), FnRange: uint8(1)}, + {FiCode: uint16(403), Fflags: uint8(42), FnRange: uint8(1)}, {FiCode: uint16(404), Fflags: uint8(46), FnRange: uint8(1)}, {FiCode: uint16(406), Fflags: uint8(52), FnRange: uint8(1)}, + {FiCode: uint16(407), Fflags: uint8(48), FnRange: uint8(1)}, {FiCode: uint16(408), FnRange: uint8(1)}, {FiCode: uint16(412), Fflags: uint8(52), FnRange: uint8(1)}, + {FiCode: uint16(413), Fflags: uint8(54), FnRange: uint8(1)}, {FiCode: uint16(415), Fflags: uint8(56), FnRange: uint8(1)}, {FiCode: uint16(416), Fflags: uint8(1), FnRange: uint8(6)}, + {FiCode: uint16(422), Fflags: uint8(60), FnRange: uint8(1)}, {FiCode: uint16(423), FnRange: uint8(1)}, {FiCode: uint16(425), Fflags: uint8(60), FnRange: uint8(1)}, + {FiCode: uint16(428), FnRange: uint8(1)}, {FiCode: uint16(430), Fflags: uint8(60), FnRange: uint8(1)}, {FiCode: uint16(431), FnRange: uint8(1)}, + {FiCode: uint16(433), Fflags: uint8(58), FnRange: uint8(2)}, {FiCode: uint16(435), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(439), Fflags: uint8(62), FnRange: uint8(1)}, + {FiCode: uint16(440), FnRange: uint8(1)}, {FiCode: uint16(444), FnRange: uint8(1)}, {FiCode: uint16(452), Fflags: uint8(2), FnRange: uint8(1)}, + {FiCode: uint16(453), FnRange: uint8(1)}, {FiCode: uint16(455), Fflags: uint8(2), FnRange: uint8(1)}, {FiCode: uint16(456), FnRange: uint8(1)}, + {FiCode: uint16(458), Fflags: uint8(2), FnRange: uint8(1)}, {FiCode: uint16(459), Fflags: uint8(1), FnRange: uint8(18)}, {FiCode: uint16(478), Fflags: uint8(1), FnRange: uint8(18)}, + {FiCode: uint16(497), Fflags: uint8(2), FnRange: uint8(1)}, {FiCode: uint16(498), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(502), Fflags: uint8(122), FnRange: uint8(1)}, + {FiCode: uint16(503), Fflags: uint8(134), FnRange: uint8(1)}, {FiCode: uint16(504), Fflags: uint8(1), FnRange: uint8(40)}, {FiCode: uint16(544), Fflags: uint8(110), FnRange: uint8(1)}, + {FiCode: uint16(546), Fflags: uint8(1), FnRange: uint8(18)}, {FiCode: uint16(570), Fflags: uint8(70), FnRange: uint8(1)}, {FiCode: uint16(571), FnRange: uint8(1)}, + {FiCode: uint16(573), Fflags: uint8(108), FnRange: uint8(1)}, {FiCode: uint16(574), Fflags: uint8(68), FnRange: uint8(1)}, {FiCode: uint16(577), FnRange: uint8(1)}, + {FiCode: uint16(579), Fflags: uint8(106), FnRange: uint8(1)}, {FiCode: uint16(580), Fflags: uint8(28), FnRange: uint8(1)}, {FiCode: uint16(581), Fflags: uint8(30), FnRange: uint8(1)}, + {FiCode: uint16(582), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(837), Fflags: uint8(36), FnRange: uint8(1)}, {FiCode: uint16(880), Fflags: uint8(1), FnRange: uint8(4)}, + {FiCode: uint16(886), FnRange: uint8(1)}, {FiCode: uint16(902), Fflags: uint8(18), FnRange: uint8(1)}, {FiCode: uint16(904), Fflags: uint8(16), FnRange: uint8(3)}, + {FiCode: uint16(908), Fflags: uint8(26), FnRange: uint8(1)}, {FiCode: uint16(910), Fflags: uint8(24), FnRange: uint8(2)}, {FiCode: uint16(913), Fflags: uint8(14), FnRange: uint8(17)}, + {FiCode: uint16(931), Fflags: uint8(14), FnRange: uint8(9)}, {FiCode: uint16(962), FnRange: uint8(1)}, {FiCode: uint16(975), Fflags: uint8(4), FnRange: uint8(1)}, + {FiCode: uint16(976), Fflags: uint8(140), FnRange: uint8(1)}, {FiCode: uint16(977), Fflags: uint8(142), FnRange: uint8(1)}, {FiCode: uint16(981), Fflags: uint8(146), FnRange: uint8(1)}, + {FiCode: uint16(982), Fflags: uint8(144), FnRange: uint8(1)}, {FiCode: uint16(984), Fflags: uint8(1), FnRange: uint8(24)}, {FiCode: uint16(1008), Fflags: uint8(136), FnRange: uint8(1)}, + {FiCode: uint16(1009), Fflags: uint8(138), FnRange: uint8(1)}, {FiCode: uint16(1012), Fflags: uint8(130), FnRange: uint8(1)}, {FiCode: uint16(1013), Fflags: uint8(128), FnRange: uint8(1)}, + {FiCode: uint16(1015), FnRange: uint8(1)}, {FiCode: uint16(1017), Fflags: uint8(152), FnRange: uint8(1)}, {FiCode: uint16(1018), FnRange: uint8(1)}, + {FiCode: uint16(1021), Fflags: uint8(110), FnRange: uint8(3)}, {FiCode: uint16(1024), Fflags: uint8(34), FnRange: uint8(16)}, {FiCode: uint16(1040), Fflags: uint8(14), FnRange: uint8(32)}, + {FiCode: uint16(1120), Fflags: uint8(1), FnRange: uint8(34)}, {FiCode: uint16(1162), Fflags: uint8(1), FnRange: uint8(54)}, {FiCode: uint16(1216), Fflags: uint8(6), FnRange: uint8(1)}, + {FiCode: uint16(1217), Fflags: uint8(1), FnRange: uint8(14)}, {FiCode: uint16(1232), Fflags: uint8(1), FnRange: uint8(88)}, {FiCode: uint16(1329), Fflags: uint8(22), FnRange: uint8(38)}, + {FiCode: uint16(4256), Fflags: uint8(66), FnRange: uint8(38)}, {FiCode: uint16(4295), Fflags: uint8(66), FnRange: uint8(1)}, {FiCode: uint16(4301), Fflags: uint8(66), FnRange: uint8(1)}, + {FiCode: uint16(7680), Fflags: uint8(1), FnRange: uint8(150)}, {FiCode: uint16(7835), Fflags: uint8(132), FnRange: uint8(1)}, {FiCode: uint16(7838), Fflags: uint8(96), FnRange: uint8(1)}, + {FiCode: uint16(7840), Fflags: uint8(1), FnRange: uint8(96)}, {FiCode: uint16(7944), Fflags: uint8(150), FnRange: uint8(8)}, {FiCode: uint16(7960), Fflags: uint8(150), FnRange: uint8(6)}, + {FiCode: uint16(7976), Fflags: uint8(150), FnRange: uint8(8)}, {FiCode: uint16(7992), Fflags: uint8(150), FnRange: uint8(8)}, {FiCode: uint16(8008), Fflags: uint8(150), FnRange: uint8(6)}, + {FiCode: uint16(8025), Fflags: uint8(151), FnRange: uint8(8)}, {FiCode: uint16(8040), Fflags: uint8(150), FnRange: uint8(8)}, {FiCode: uint16(8072), Fflags: uint8(150), FnRange: uint8(8)}, + {FiCode: uint16(8088), Fflags: uint8(150), FnRange: uint8(8)}, {FiCode: uint16(8104), Fflags: uint8(150), FnRange: uint8(8)}, {FiCode: uint16(8120), Fflags: uint8(150), FnRange: uint8(2)}, + {FiCode: uint16(8122), Fflags: uint8(126), FnRange: uint8(2)}, {FiCode: uint16(8124), Fflags: uint8(148), FnRange: uint8(1)}, {FiCode: uint16(8126), Fflags: uint8(100), FnRange: uint8(1)}, + {FiCode: uint16(8136), Fflags: uint8(124), FnRange: uint8(4)}, {FiCode: uint16(8140), Fflags: uint8(148), FnRange: uint8(1)}, {FiCode: uint16(8152), Fflags: uint8(150), FnRange: uint8(2)}, + {FiCode: uint16(8154), Fflags: uint8(120), FnRange: uint8(2)}, {FiCode: uint16(8168), Fflags: uint8(150), FnRange: uint8(2)}, {FiCode: uint16(8170), Fflags: uint8(118), FnRange: uint8(2)}, + {FiCode: uint16(8172), Fflags: uint8(152), FnRange: uint8(1)}, {FiCode: uint16(8184), Fflags: uint8(112), FnRange: uint8(2)}, {FiCode: uint16(8186), Fflags: uint8(114), FnRange: uint8(2)}, + {FiCode: uint16(8188), Fflags: uint8(148), FnRange: uint8(1)}, {FiCode: uint16(8486), Fflags: uint8(98), FnRange: uint8(1)}, {FiCode: uint16(8490), Fflags: uint8(92), FnRange: uint8(1)}, + {FiCode: uint16(8491), Fflags: uint8(94), FnRange: uint8(1)}, {FiCode: uint16(8498), Fflags: uint8(12), FnRange: uint8(1)}, {FiCode: uint16(8544), Fflags: uint8(8), FnRange: uint8(16)}, + {FiCode: uint16(8579), FnRange: uint8(1)}, {FiCode: uint16(9398), Fflags: uint8(10), FnRange: uint8(26)}, {FiCode: uint16(11264), Fflags: uint8(22), FnRange: uint8(47)}, + {FiCode: uint16(11360), FnRange: uint8(1)}, {FiCode: uint16(11362), Fflags: uint8(88), FnRange: uint8(1)}, {FiCode: uint16(11363), Fflags: uint8(102), FnRange: uint8(1)}, + {FiCode: uint16(11364), Fflags: uint8(90), FnRange: uint8(1)}, {FiCode: uint16(11367), Fflags: uint8(1), FnRange: uint8(6)}, {FiCode: uint16(11373), Fflags: uint8(84), FnRange: uint8(1)}, + {FiCode: uint16(11374), Fflags: uint8(86), FnRange: uint8(1)}, {FiCode: uint16(11375), Fflags: uint8(80), FnRange: uint8(1)}, {FiCode: uint16(11376), Fflags: uint8(82), FnRange: uint8(1)}, + {FiCode: uint16(11378), FnRange: uint8(1)}, {FiCode: uint16(11381), FnRange: uint8(1)}, {FiCode: uint16(11390), Fflags: uint8(78), FnRange: uint8(2)}, + {FiCode: uint16(11392), Fflags: uint8(1), FnRange: uint8(100)}, {FiCode: uint16(11499), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(11506), FnRange: uint8(1)}, + {FiCode: uint16(42560), Fflags: uint8(1), FnRange: uint8(46)}, {FiCode: uint16(42624), Fflags: uint8(1), FnRange: uint8(24)}, {FiCode: uint16(42786), Fflags: uint8(1), FnRange: uint8(14)}, + {FiCode: uint16(42802), Fflags: uint8(1), FnRange: uint8(62)}, {FiCode: uint16(42873), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42877), Fflags: uint8(76), FnRange: uint8(1)}, + {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, + {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, + {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, +} /* sqlite3.c:237234:5 */ +var aiOff = [77]uint16{ + uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), + uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), + uint16(79), uint16(80), uint16(116), uint16(202), uint16(203), uint16(205), uint16(206), uint16(207), + uint16(209), uint16(210), uint16(211), uint16(213), uint16(214), uint16(217), uint16(218), uint16(219), + uint16(775), uint16(7264), uint16(10792), uint16(10795), uint16(23228), uint16(23256), uint16(30204), uint16(54721), + uint16(54753), uint16(54754), uint16(54756), uint16(54787), uint16(54793), uint16(54809), uint16(57153), uint16(57274), + uint16(57921), uint16(58019), uint16(58363), uint16(61722), uint16(65268), uint16(65341), uint16(65373), uint16(65406), + uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), + uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), + uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), +} /* sqlite3.c:237291:31 */ + +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ + *(*U8)(unsafe.Pointer(aArray)) = U8(1) + switch int32(*(*uint8)(unsafe.Pointer(zCat))) { + case 'C': + switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) { + case 'c': + *(*U8)(unsafe.Pointer(aArray + 1)) = U8(1) + break + case 'f': + *(*U8)(unsafe.Pointer(aArray + 2)) = U8(1) + break + case 'n': + *(*U8)(unsafe.Pointer(aArray + 3)) = U8(1) + break + case 's': + *(*U8)(unsafe.Pointer(aArray + 4)) = U8(1) + break + case 'o': + *(*U8)(unsafe.Pointer(aArray + 31)) = U8(1) + break + case '*': + *(*U8)(unsafe.Pointer(aArray + 1)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 2)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 3)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 4)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 31)) = U8(1) + break + default: + return 1 + } + break + + case 'L': + switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) { + case 'l': + *(*U8)(unsafe.Pointer(aArray + 5)) = U8(1) + break + case 'm': + *(*U8)(unsafe.Pointer(aArray + 6)) = U8(1) + break + case 'o': + *(*U8)(unsafe.Pointer(aArray + 7)) = U8(1) + break + case 't': + *(*U8)(unsafe.Pointer(aArray + 8)) = U8(1) + break + case 'u': + *(*U8)(unsafe.Pointer(aArray + 9)) = U8(1) + break + case 'C': + *(*U8)(unsafe.Pointer(aArray + 30)) = U8(1) + break + case '*': + *(*U8)(unsafe.Pointer(aArray + 5)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 6)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 7)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 8)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 9)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 30)) = U8(1) + break + default: + return 1 + } + break + + case 'M': + switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) { + case 'c': + *(*U8)(unsafe.Pointer(aArray + 10)) = U8(1) + break + case 'e': + *(*U8)(unsafe.Pointer(aArray + 11)) = U8(1) + break + case 'n': + *(*U8)(unsafe.Pointer(aArray + 12)) = U8(1) + break + case '*': + *(*U8)(unsafe.Pointer(aArray + 10)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 11)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 12)) = U8(1) + break + default: + return 1 + } + break + + case 'N': + switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) { + case 'd': + *(*U8)(unsafe.Pointer(aArray + 13)) = U8(1) + break + case 'l': + *(*U8)(unsafe.Pointer(aArray + 14)) = U8(1) + break + case 'o': + *(*U8)(unsafe.Pointer(aArray + 15)) = U8(1) + break + case '*': + *(*U8)(unsafe.Pointer(aArray + 13)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 14)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 15)) = U8(1) + break + default: + return 1 + } + break + + case 'P': + switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) { + case 'c': + *(*U8)(unsafe.Pointer(aArray + 16)) = U8(1) + break + case 'd': + *(*U8)(unsafe.Pointer(aArray + 17)) = U8(1) + break + case 'e': + *(*U8)(unsafe.Pointer(aArray + 18)) = U8(1) + break + case 'f': + *(*U8)(unsafe.Pointer(aArray + 19)) = U8(1) + break + case 'i': + *(*U8)(unsafe.Pointer(aArray + 20)) = U8(1) + break + case 'o': + *(*U8)(unsafe.Pointer(aArray + 21)) = U8(1) + break + case 's': + *(*U8)(unsafe.Pointer(aArray + 22)) = U8(1) + break + case '*': + *(*U8)(unsafe.Pointer(aArray + 16)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 17)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 18)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 19)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 20)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 21)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 22)) = U8(1) + break + default: + return 1 + } + break + + case 'S': + switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) { + case 'c': + *(*U8)(unsafe.Pointer(aArray + 23)) = U8(1) + break + case 'k': + *(*U8)(unsafe.Pointer(aArray + 24)) = U8(1) + break + case 'm': + *(*U8)(unsafe.Pointer(aArray + 25)) = U8(1) + break + case 'o': + *(*U8)(unsafe.Pointer(aArray + 26)) = U8(1) + break + case '*': + *(*U8)(unsafe.Pointer(aArray + 23)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 24)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 25)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 26)) = U8(1) + break + default: + return 1 + } + break + + case 'Z': + switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) { + case 'l': + *(*U8)(unsafe.Pointer(aArray + 27)) = U8(1) + break + case 'p': + *(*U8)(unsafe.Pointer(aArray + 28)) = U8(1) + break + case 's': + *(*U8)(unsafe.Pointer(aArray + 29)) = U8(1) + break + case '*': + *(*U8)(unsafe.Pointer(aArray + 27)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 28)) = U8(1) + *(*U8)(unsafe.Pointer(aArray + 29)) = U8(1) + break + default: + return 1 + } + break + + } + return 0 +} + +var aFts5UnicodeBlock = [17]U16{ + U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), + U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), +} /* sqlite3.c:237466:12 */ +var aFts5UnicodeMap = [1765]U16{ + U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), + U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), + U16(94), U16(95), U16(96), U16(97), U16(123), U16(124), U16(125), U16(126), U16(127), U16(160), + U16(161), U16(162), U16(166), U16(167), U16(168), U16(169), U16(170), U16(171), U16(172), U16(173), + U16(174), U16(175), U16(176), U16(177), U16(178), U16(180), U16(181), U16(182), U16(184), U16(185), + U16(186), U16(187), U16(188), U16(191), U16(192), U16(215), U16(216), U16(223), U16(247), U16(248), + U16(256), U16(312), U16(313), U16(329), U16(330), U16(377), U16(383), U16(385), U16(387), U16(388), + U16(391), U16(394), U16(396), U16(398), U16(402), U16(403), U16(405), U16(406), U16(409), U16(412), + U16(414), U16(415), U16(417), U16(418), U16(423), U16(427), U16(428), U16(431), U16(434), U16(436), + U16(437), U16(440), U16(442), U16(443), U16(444), U16(446), U16(448), U16(452), U16(453), U16(454), + U16(455), U16(456), U16(457), U16(458), U16(459), U16(460), U16(461), U16(477), U16(478), U16(496), + U16(497), U16(498), U16(499), U16(500), U16(503), U16(505), U16(506), U16(564), U16(570), U16(572), + U16(573), U16(575), U16(577), U16(580), U16(583), U16(584), U16(592), U16(660), U16(661), U16(688), + U16(706), U16(710), U16(722), U16(736), U16(741), U16(748), U16(749), U16(750), U16(751), U16(768), + U16(880), U16(884), U16(885), U16(886), U16(890), U16(891), U16(894), U16(900), U16(902), U16(903), + U16(904), U16(908), U16(910), U16(912), U16(913), U16(931), U16(940), U16(975), U16(977), U16(978), + U16(981), U16(984), U16(1008), U16(1012), U16(1014), U16(1015), U16(1018), U16(1020), U16(1021), U16(1072), + U16(1120), U16(1154), U16(1155), U16(1160), U16(1162), U16(1217), U16(1231), U16(1232), U16(1329), U16(1369), + U16(1370), U16(1377), U16(1417), U16(1418), U16(1423), U16(1425), U16(1470), U16(1471), U16(1472), U16(1473), + U16(1475), U16(1476), U16(1478), U16(1479), U16(1488), U16(1520), U16(1523), U16(1536), U16(1542), U16(1545), + U16(1547), U16(1548), U16(1550), U16(1552), U16(1563), U16(1566), U16(1568), U16(1600), U16(1601), U16(1611), + U16(1632), U16(1642), U16(1646), U16(1648), U16(1649), U16(1748), U16(1749), U16(1750), U16(1757), U16(1758), + U16(1759), U16(1765), U16(1767), U16(1769), U16(1770), U16(1774), U16(1776), U16(1786), U16(1789), U16(1791), + U16(1792), U16(1807), U16(1808), U16(1809), U16(1810), U16(1840), U16(1869), U16(1958), U16(1969), U16(1984), + U16(1994), U16(2027), U16(2036), U16(2038), U16(2039), U16(2042), U16(2048), U16(2070), U16(2074), U16(2075), + U16(2084), U16(2085), U16(2088), U16(2089), U16(2096), U16(2112), U16(2137), U16(2142), U16(2208), U16(2210), + U16(2276), U16(2304), U16(2307), U16(2308), U16(2362), U16(2363), U16(2364), U16(2365), U16(2366), U16(2369), + U16(2377), U16(2381), U16(2382), U16(2384), U16(2385), U16(2392), U16(2402), U16(2404), U16(2406), U16(2416), + U16(2417), U16(2418), U16(2425), U16(2433), U16(2434), U16(2437), U16(2447), U16(2451), U16(2474), U16(2482), + U16(2486), U16(2492), U16(2493), U16(2494), U16(2497), U16(2503), U16(2507), U16(2509), U16(2510), U16(2519), + U16(2524), U16(2527), U16(2530), U16(2534), U16(2544), U16(2546), U16(2548), U16(2554), U16(2555), U16(2561), + U16(2563), U16(2565), U16(2575), U16(2579), U16(2602), U16(2610), U16(2613), U16(2616), U16(2620), U16(2622), + U16(2625), U16(2631), U16(2635), U16(2641), U16(2649), U16(2654), U16(2662), U16(2672), U16(2674), U16(2677), + U16(2689), U16(2691), U16(2693), U16(2703), U16(2707), U16(2730), U16(2738), U16(2741), U16(2748), U16(2749), + U16(2750), U16(2753), U16(2759), U16(2761), U16(2763), U16(2765), U16(2768), U16(2784), U16(2786), U16(2790), + U16(2800), U16(2801), U16(2817), U16(2818), U16(2821), U16(2831), U16(2835), U16(2858), U16(2866), U16(2869), + U16(2876), U16(2877), U16(2878), U16(2879), U16(2880), U16(2881), U16(2887), U16(2891), U16(2893), U16(2902), + U16(2903), U16(2908), U16(2911), U16(2914), U16(2918), U16(2928), U16(2929), U16(2930), U16(2946), U16(2947), + U16(2949), U16(2958), U16(2962), U16(2969), U16(2972), U16(2974), U16(2979), U16(2984), U16(2990), U16(3006), + U16(3008), U16(3009), U16(3014), U16(3018), U16(3021), U16(3024), U16(3031), U16(3046), U16(3056), U16(3059), + U16(3065), U16(3066), U16(3073), U16(3077), U16(3086), U16(3090), U16(3114), U16(3125), U16(3133), U16(3134), + U16(3137), U16(3142), U16(3146), U16(3157), U16(3160), U16(3168), U16(3170), U16(3174), U16(3192), U16(3199), + U16(3202), U16(3205), U16(3214), U16(3218), U16(3242), U16(3253), U16(3260), U16(3261), U16(3262), U16(3263), + U16(3264), U16(3270), U16(3271), U16(3274), U16(3276), U16(3285), U16(3294), U16(3296), U16(3298), U16(3302), + U16(3313), U16(3330), U16(3333), U16(3342), U16(3346), U16(3389), U16(3390), U16(3393), U16(3398), U16(3402), + U16(3405), U16(3406), U16(3415), U16(3424), U16(3426), U16(3430), U16(3440), U16(3449), U16(3450), U16(3458), + U16(3461), U16(3482), U16(3507), U16(3517), U16(3520), U16(3530), U16(3535), U16(3538), U16(3542), U16(3544), + U16(3570), U16(3572), U16(3585), U16(3633), U16(3634), U16(3636), U16(3647), U16(3648), U16(3654), U16(3655), + U16(3663), U16(3664), U16(3674), U16(3713), U16(3716), U16(3719), U16(3722), U16(3725), U16(3732), U16(3737), + U16(3745), U16(3749), U16(3751), U16(3754), U16(3757), U16(3761), U16(3762), U16(3764), U16(3771), U16(3773), + U16(3776), U16(3782), U16(3784), U16(3792), U16(3804), U16(3840), U16(3841), U16(3844), U16(3859), U16(3860), + U16(3861), U16(3864), U16(3866), U16(3872), U16(3882), U16(3892), U16(3893), U16(3894), U16(3895), U16(3896), + U16(3897), U16(3898), U16(3899), U16(3900), U16(3901), U16(3902), U16(3904), U16(3913), U16(3953), U16(3967), + U16(3968), U16(3973), U16(3974), U16(3976), U16(3981), U16(3993), U16(4030), U16(4038), U16(4039), U16(4046), + U16(4048), U16(4053), U16(4057), U16(4096), U16(4139), U16(4141), U16(4145), U16(4146), U16(4152), U16(4153), + U16(4155), U16(4157), U16(4159), U16(4160), U16(4170), U16(4176), U16(4182), U16(4184), U16(4186), U16(4190), + U16(4193), U16(4194), U16(4197), U16(4199), U16(4206), U16(4209), U16(4213), U16(4226), U16(4227), U16(4229), + U16(4231), U16(4237), U16(4238), U16(4239), U16(4240), U16(4250), U16(4253), U16(4254), U16(4256), U16(4295), + U16(4301), U16(4304), U16(4347), U16(4348), U16(4349), U16(4682), U16(4688), U16(4696), U16(4698), U16(4704), + U16(4746), U16(4752), U16(4786), U16(4792), U16(4800), U16(4802), U16(4808), U16(4824), U16(4882), U16(4888), + U16(4957), U16(4960), U16(4969), U16(4992), U16(5008), U16(5024), U16(5120), U16(5121), U16(5741), U16(5743), + U16(5760), U16(5761), U16(5787), U16(5788), U16(5792), U16(5867), U16(5870), U16(5888), U16(5902), U16(5906), + U16(5920), U16(5938), U16(5941), U16(5952), U16(5970), U16(5984), U16(5998), U16(6002), U16(6016), U16(6068), + U16(6070), U16(6071), U16(6078), U16(6086), U16(6087), U16(6089), U16(6100), U16(6103), U16(6104), U16(6107), + U16(6108), U16(6109), U16(6112), U16(6128), U16(6144), U16(6150), U16(6151), U16(6155), U16(6158), U16(6160), + U16(6176), U16(6211), U16(6212), U16(6272), U16(6313), U16(6314), U16(6320), U16(6400), U16(6432), U16(6435), + U16(6439), U16(6441), U16(6448), U16(6450), U16(6451), U16(6457), U16(6464), U16(6468), U16(6470), U16(6480), + U16(6512), U16(6528), U16(6576), U16(6593), U16(6600), U16(6608), U16(6618), U16(6622), U16(6656), U16(6679), + U16(6681), U16(6686), U16(6688), U16(6741), U16(6742), U16(6743), U16(6744), U16(6752), U16(6753), U16(6754), + U16(6755), U16(6757), U16(6765), U16(6771), U16(6783), U16(6784), U16(6800), U16(6816), U16(6823), U16(6824), + U16(6912), U16(6916), U16(6917), U16(6964), U16(6965), U16(6966), U16(6971), U16(6972), U16(6973), U16(6978), + U16(6979), U16(6981), U16(6992), U16(7002), U16(7009), U16(7019), U16(7028), U16(7040), U16(7042), U16(7043), + U16(7073), U16(7074), U16(7078), U16(7080), U16(7082), U16(7083), U16(7084), U16(7086), U16(7088), U16(7098), + U16(7142), U16(7143), U16(7144), U16(7146), U16(7149), U16(7150), U16(7151), U16(7154), U16(7164), U16(7168), + U16(7204), U16(7212), U16(7220), U16(7222), U16(7227), U16(7232), U16(7245), U16(7248), U16(7258), U16(7288), + U16(7294), U16(7360), U16(7376), U16(7379), U16(7380), U16(7393), U16(7394), U16(7401), U16(7405), U16(7406), + U16(7410), U16(7412), U16(7413), U16(7424), U16(7468), U16(7531), U16(7544), U16(7545), U16(7579), U16(7616), + U16(7676), U16(7680), U16(7830), U16(7838), U16(7936), U16(7944), U16(7952), U16(7960), U16(7968), U16(7976), + U16(7984), U16(7992), U16(8000), U16(8008), U16(8016), U16(8025), U16(8027), U16(8029), U16(8031), U16(8033), + U16(8040), U16(8048), U16(8064), U16(8072), U16(8080), U16(8088), U16(8096), U16(8104), U16(8112), U16(8118), + U16(8120), U16(8124), U16(8125), U16(8126), U16(8127), U16(8130), U16(8134), U16(8136), U16(8140), U16(8141), + U16(8144), U16(8150), U16(8152), U16(8157), U16(8160), U16(8168), U16(8173), U16(8178), U16(8182), U16(8184), + U16(8188), U16(8189), U16(8192), U16(8203), U16(8208), U16(8214), U16(8216), U16(8217), U16(8218), U16(8219), + U16(8221), U16(8222), U16(8223), U16(8224), U16(8232), U16(8233), U16(8234), U16(8239), U16(8240), U16(8249), + U16(8250), U16(8251), U16(8255), U16(8257), U16(8260), U16(8261), U16(8262), U16(8263), U16(8274), U16(8275), + U16(8276), U16(8277), U16(8287), U16(8288), U16(8298), U16(8304), U16(8305), U16(8308), U16(8314), U16(8317), + U16(8318), U16(8319), U16(8320), U16(8330), U16(8333), U16(8334), U16(8336), U16(8352), U16(8400), U16(8413), + U16(8417), U16(8418), U16(8421), U16(8448), U16(8450), U16(8451), U16(8455), U16(8456), U16(8458), U16(8459), + U16(8462), U16(8464), U16(8467), U16(8468), U16(8469), U16(8470), U16(8472), U16(8473), U16(8478), U16(8484), + U16(8485), U16(8486), U16(8487), U16(8488), U16(8489), U16(8490), U16(8494), U16(8495), U16(8496), U16(8500), + U16(8501), U16(8505), U16(8506), U16(8508), U16(8510), U16(8512), U16(8517), U16(8519), U16(8522), U16(8523), + U16(8524), U16(8526), U16(8527), U16(8528), U16(8544), U16(8579), U16(8581), U16(8585), U16(8592), U16(8597), + U16(8602), U16(8604), U16(8608), U16(8609), U16(8611), U16(8612), U16(8614), U16(8615), U16(8622), U16(8623), + U16(8654), U16(8656), U16(8658), U16(8659), U16(8660), U16(8661), U16(8692), U16(8960), U16(8968), U16(8972), + U16(8992), U16(8994), U16(9001), U16(9002), U16(9003), U16(9084), U16(9085), U16(9115), U16(9140), U16(9180), + U16(9186), U16(9216), U16(9280), U16(9312), U16(9372), U16(9450), U16(9472), U16(9655), U16(9656), U16(9665), + U16(9666), U16(9720), U16(9728), U16(9839), U16(9840), U16(9985), U16(10088), U16(10089), U16(10090), U16(10091), + U16(10092), U16(10093), U16(10094), U16(10095), U16(10096), U16(10097), U16(10098), U16(10099), U16(10100), U16(10101), + U16(10102), U16(10132), U16(10176), U16(10181), U16(10182), U16(10183), U16(10214), U16(10215), U16(10216), U16(10217), + U16(10218), U16(10219), U16(10220), U16(10221), U16(10222), U16(10223), U16(10224), U16(10240), U16(10496), U16(10627), + U16(10628), U16(10629), U16(10630), U16(10631), U16(10632), U16(10633), U16(10634), U16(10635), U16(10636), U16(10637), + U16(10638), U16(10639), U16(10640), U16(10641), U16(10642), U16(10643), U16(10644), U16(10645), U16(10646), U16(10647), + U16(10648), U16(10649), U16(10712), U16(10713), U16(10714), U16(10715), U16(10716), U16(10748), U16(10749), U16(10750), + U16(11008), U16(11056), U16(11077), U16(11079), U16(11088), U16(11264), U16(11312), U16(11360), U16(11363), U16(11365), + U16(11367), U16(11374), U16(11377), U16(11378), U16(11380), U16(11381), U16(11383), U16(11388), U16(11390), U16(11393), + U16(11394), U16(11492), U16(11493), U16(11499), U16(11503), U16(11506), U16(11513), U16(11517), U16(11518), U16(11520), + U16(11559), U16(11565), U16(11568), U16(11631), U16(11632), U16(11647), U16(11648), U16(11680), U16(11688), U16(11696), + U16(11704), U16(11712), U16(11720), U16(11728), U16(11736), U16(11744), U16(11776), U16(11778), U16(11779), U16(11780), + U16(11781), U16(11782), U16(11785), U16(11786), U16(11787), U16(11788), U16(11789), U16(11790), U16(11799), U16(11800), + U16(11802), U16(11803), U16(11804), U16(11805), U16(11806), U16(11808), U16(11809), U16(11810), U16(11811), U16(11812), + U16(11813), U16(11814), U16(11815), U16(11816), U16(11817), U16(11818), U16(11823), U16(11824), U16(11834), U16(11904), + U16(11931), U16(12032), U16(12272), U16(12288), U16(12289), U16(12292), U16(12293), U16(12294), U16(12295), U16(12296), + U16(12297), U16(12298), U16(12299), U16(12300), U16(12301), U16(12302), U16(12303), U16(12304), U16(12305), U16(12306), + U16(12308), U16(12309), U16(12310), U16(12311), U16(12312), U16(12313), U16(12314), U16(12315), U16(12316), U16(12317), + U16(12318), U16(12320), U16(12321), U16(12330), U16(12334), U16(12336), U16(12337), U16(12342), U16(12344), U16(12347), + U16(12348), U16(12349), U16(12350), U16(12353), U16(12441), U16(12443), U16(12445), U16(12447), U16(12448), U16(12449), + U16(12539), U16(12540), U16(12543), U16(12549), U16(12593), U16(12688), U16(12690), U16(12694), U16(12704), U16(12736), + U16(12784), U16(12800), U16(12832), U16(12842), U16(12872), U16(12880), U16(12881), U16(12896), U16(12928), U16(12938), + U16(12977), U16(12992), U16(13056), U16(13312), U16(19893), U16(19904), U16(19968), U16(40908), U16(40960), U16(40981), + U16(40982), U16(42128), U16(42192), U16(42232), U16(42238), U16(42240), U16(42508), U16(42509), U16(42512), U16(42528), + U16(42538), U16(42560), U16(42606), U16(42607), U16(42608), U16(42611), U16(42612), U16(42622), U16(42623), U16(42624), + U16(42655), U16(42656), U16(42726), U16(42736), U16(42738), U16(42752), U16(42775), U16(42784), U16(42786), U16(42800), + U16(42802), U16(42864), U16(42865), U16(42873), U16(42878), U16(42888), U16(42889), U16(42891), U16(42896), U16(42912), + U16(43000), U16(43002), U16(43003), U16(43010), U16(43011), U16(43014), U16(43015), U16(43019), U16(43020), U16(43043), + U16(43045), U16(43047), U16(43048), U16(43056), U16(43062), U16(43064), U16(43065), U16(43072), U16(43124), U16(43136), + U16(43138), U16(43188), U16(43204), U16(43214), U16(43216), U16(43232), U16(43250), U16(43256), U16(43259), U16(43264), + U16(43274), U16(43302), U16(43310), U16(43312), U16(43335), U16(43346), U16(43359), U16(43360), U16(43392), U16(43395), + U16(43396), U16(43443), U16(43444), U16(43446), U16(43450), U16(43452), U16(43453), U16(43457), U16(43471), U16(43472), + U16(43486), U16(43520), U16(43561), U16(43567), U16(43569), U16(43571), U16(43573), U16(43584), U16(43587), U16(43588), + U16(43596), U16(43597), U16(43600), U16(43612), U16(43616), U16(43632), U16(43633), U16(43639), U16(43642), U16(43643), + U16(43648), U16(43696), U16(43697), U16(43698), U16(43701), U16(43703), U16(43705), U16(43710), U16(43712), U16(43713), + U16(43714), U16(43739), U16(43741), U16(43742), U16(43744), U16(43755), U16(43756), U16(43758), U16(43760), U16(43762), + U16(43763), U16(43765), U16(43766), U16(43777), U16(43785), U16(43793), U16(43808), U16(43816), U16(43968), U16(44003), + U16(44005), U16(44006), U16(44008), U16(44009), U16(44011), U16(44012), U16(44013), U16(44016), U16(44032), U16(55203), + U16(55216), U16(55243), U16(55296), U16(56191), U16(56319), U16(57343), U16(57344), U16(63743), U16(63744), U16(64112), + U16(64256), U16(64275), U16(64285), U16(64286), U16(64287), U16(64297), U16(64298), U16(64312), U16(64318), U16(64320), + U16(64323), U16(64326), U16(64434), U16(64467), U16(64830), U16(64831), U16(64848), U16(64914), U16(65008), U16(65020), + U16(65021), U16(65024), U16(65040), U16(65047), U16(65048), U16(65049), U16(65056), U16(65072), U16(65073), U16(65075), + U16(65077), U16(65078), U16(65079), U16(65080), U16(65081), U16(65082), U16(65083), U16(65084), U16(65085), U16(65086), + U16(65087), U16(65088), U16(65089), U16(65090), U16(65091), U16(65092), U16(65093), U16(65095), U16(65096), U16(65097), + U16(65101), U16(65104), U16(65108), U16(65112), U16(65113), U16(65114), U16(65115), U16(65116), U16(65117), U16(65118), + U16(65119), U16(65122), U16(65123), U16(65124), U16(65128), U16(65129), U16(65130), U16(65136), U16(65142), U16(65279), + U16(65281), U16(65284), U16(65285), U16(65288), U16(65289), U16(65290), U16(65291), U16(65292), U16(65293), U16(65294), + U16(65296), U16(65306), U16(65308), U16(65311), U16(65313), U16(65339), U16(65340), U16(65341), U16(65342), U16(65343), + U16(65344), U16(65345), U16(65371), U16(65372), U16(65373), U16(65374), U16(65375), U16(65376), U16(65377), U16(65378), + U16(65379), U16(65380), U16(65382), U16(65392), U16(65393), U16(65438), U16(65440), U16(65474), U16(65482), U16(65490), + U16(65498), U16(65504), U16(65506), U16(65507), U16(65508), U16(65509), U16(65512), U16(65513), U16(65517), U16(65529), + U16(65532), U16(0), U16(13), U16(40), U16(60), U16(63), U16(80), U16(128), U16(256), U16(263), + U16(311), U16(320), U16(373), U16(377), U16(394), U16(400), U16(464), U16(509), U16(640), U16(672), + U16(768), U16(800), U16(816), U16(833), U16(834), U16(842), U16(896), U16(927), U16(928), U16(968), + U16(976), U16(977), U16(1024), U16(1064), U16(1104), U16(1184), U16(2048), U16(2056), U16(2058), U16(2103), + U16(2108), U16(2111), U16(2135), U16(2136), U16(2304), U16(2326), U16(2335), U16(2336), U16(2367), U16(2432), + U16(2494), U16(2560), U16(2561), U16(2565), U16(2572), U16(2576), U16(2581), U16(2585), U16(2616), U16(2623), + U16(2624), U16(2640), U16(2656), U16(2685), U16(2687), U16(2816), U16(2873), U16(2880), U16(2904), U16(2912), + U16(2936), U16(3072), U16(3680), U16(4096), U16(4097), U16(4098), U16(4099), U16(4152), U16(4167), U16(4178), + U16(4198), U16(4224), U16(4226), U16(4227), U16(4272), U16(4275), U16(4279), U16(4281), U16(4283), U16(4285), + U16(4286), U16(4304), U16(4336), U16(4352), U16(4355), U16(4391), U16(4396), U16(4397), U16(4406), U16(4416), + U16(4480), U16(4482), U16(4483), U16(4531), U16(4534), U16(4543), U16(4545), U16(4549), U16(4560), U16(5760), + U16(5803), U16(5804), U16(5805), U16(5806), U16(5808), U16(5814), U16(5815), U16(5824), U16(8192), U16(9216), + U16(9328), U16(12288), U16(26624), U16(28416), U16(28496), U16(28497), U16(28559), U16(28563), U16(45056), U16(53248), + U16(53504), U16(53545), U16(53605), U16(53607), U16(53610), U16(53613), U16(53619), U16(53627), U16(53635), U16(53637), + U16(53644), U16(53674), U16(53678), U16(53760), U16(53826), U16(53829), U16(54016), U16(54112), U16(54272), U16(54298), + U16(54324), U16(54350), U16(54358), U16(54376), U16(54402), U16(54428), U16(54430), U16(54434), U16(54437), U16(54441), + U16(54446), U16(54454), U16(54459), U16(54461), U16(54469), U16(54480), U16(54506), U16(54532), U16(54535), U16(54541), + U16(54550), U16(54558), U16(54584), U16(54587), U16(54592), U16(54598), U16(54602), U16(54610), U16(54636), U16(54662), + U16(54688), U16(54714), U16(54740), U16(54766), U16(54792), U16(54818), U16(54844), U16(54870), U16(54896), U16(54922), + U16(54952), U16(54977), U16(54978), U16(55003), U16(55004), U16(55010), U16(55035), U16(55036), U16(55061), U16(55062), + U16(55068), U16(55093), U16(55094), U16(55119), U16(55120), U16(55126), U16(55151), U16(55152), U16(55177), U16(55178), + U16(55184), U16(55209), U16(55210), U16(55235), U16(55236), U16(55242), U16(55246), U16(60928), U16(60933), U16(60961), + U16(60964), U16(60967), U16(60969), U16(60980), U16(60985), U16(60987), U16(60994), U16(60999), U16(61001), U16(61003), + U16(61005), U16(61009), U16(61012), U16(61015), U16(61017), U16(61019), U16(61021), U16(61023), U16(61025), U16(61028), + U16(61031), U16(61036), U16(61044), U16(61049), U16(61054), U16(61056), U16(61067), U16(61089), U16(61093), U16(61099), + U16(61168), U16(61440), U16(61488), U16(61600), U16(61617), U16(61633), U16(61649), U16(61696), U16(61712), U16(61744), + U16(61808), U16(61926), U16(61968), U16(62016), U16(62032), U16(62208), U16(62256), U16(62263), U16(62336), U16(62368), + U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), + U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), + U16(1), U16(32), U16(256), U16(0), U16(65533), +} /* sqlite3.c:237470:12 */ +var aFts5UnicodeData = [1765]U16{ + U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), + U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), + U16(56), U16(48), U16(56), U16(837), U16(54), U16(57), U16(50), U16(57), U16(1057), U16(61), + U16(53), U16(151), U16(58), U16(53), U16(56), U16(58), U16(39), U16(52), U16(57), U16(34), + U16(58), U16(56), U16(58), U16(57), U16(79), U16(56), U16(37), U16(85), U16(56), U16(47), + U16(39), U16(51), U16(111), U16(53), U16(745), U16(57), U16(233), U16(773), U16(57), U16(261), + U16(1822), U16(37), U16(542), U16(37), U16(1534), U16(222), U16(69), U16(73), U16(37), U16(126), + U16(126), U16(73), U16(69), U16(137), U16(37), U16(73), U16(37), U16(105), U16(101), U16(73), + U16(37), U16(73), U16(37), U16(190), U16(158), U16(37), U16(126), U16(126), U16(73), U16(37), + U16(126), U16(94), U16(37), U16(39), U16(94), U16(69), U16(135), U16(41), U16(40), U16(37), + U16(41), U16(40), U16(37), U16(41), U16(40), U16(37), U16(542), U16(37), U16(606), U16(37), + U16(41), U16(40), U16(37), U16(126), U16(73), U16(37), U16(1886), U16(197), U16(73), U16(37), + U16(73), U16(69), U16(126), U16(105), U16(37), U16(286), U16(2181), U16(39), U16(869), U16(582), + U16(152), U16(390), U16(472), U16(166), U16(248), U16(38), U16(56), U16(38), U16(568), U16(3596), + U16(158), U16(38), U16(56), U16(94), U16(38), U16(101), U16(53), U16(88), U16(41), U16(53), + U16(105), U16(41), U16(73), U16(37), U16(553), U16(297), U16(1125), U16(94), U16(37), U16(105), + U16(101), U16(798), U16(133), U16(94), U16(57), U16(126), U16(94), U16(37), U16(1641), U16(1541), + U16(1118), U16(58), U16(172), U16(75), U16(1790), U16(478), U16(37), U16(2846), U16(1225), U16(38), + U16(213), U16(1253), U16(53), U16(49), U16(55), U16(1452), U16(49), U16(44), U16(53), U16(76), + U16(53), U16(76), U16(53), U16(44), U16(871), U16(103), U16(85), U16(162), U16(121), U16(85), + U16(55), U16(85), U16(90), U16(364), U16(53), U16(85), U16(1031), U16(38), U16(327), U16(684), + U16(333), U16(149), U16(71), U16(44), U16(3175), U16(53), U16(39), U16(236), U16(34), U16(58), + U16(204), U16(70), U16(76), U16(58), U16(140), U16(71), U16(333), U16(103), U16(90), U16(39), + U16(469), U16(34), U16(39), U16(44), U16(967), U16(876), U16(2855), U16(364), U16(39), U16(333), + U16(1063), U16(300), U16(70), U16(58), U16(117), U16(38), U16(711), U16(140), U16(38), U16(300), + U16(38), U16(108), U16(38), U16(172), U16(501), U16(807), U16(108), U16(53), U16(39), U16(359), + U16(876), U16(108), U16(42), U16(1735), U16(44), U16(42), U16(44), U16(39), U16(106), U16(268), + U16(138), U16(44), U16(74), U16(39), U16(236), U16(327), U16(76), U16(85), U16(333), U16(53), + U16(38), U16(199), U16(231), U16(44), U16(74), U16(263), U16(71), U16(711), U16(231), U16(39), + U16(135), U16(44), U16(39), U16(106), U16(140), U16(74), U16(74), U16(44), U16(39), U16(42), + U16(71), U16(103), U16(76), U16(333), U16(71), U16(87), U16(207), U16(58), U16(55), U16(76), + U16(42), U16(199), U16(71), U16(711), U16(231), U16(71), U16(71), U16(71), U16(44), U16(106), + U16(76), U16(76), U16(108), U16(44), U16(135), U16(39), U16(333), U16(76), U16(103), U16(44), + U16(76), U16(42), U16(295), U16(103), U16(711), U16(231), U16(71), U16(167), U16(44), U16(39), + U16(106), U16(172), U16(76), U16(42), U16(74), U16(44), U16(39), U16(71), U16(76), U16(333), + U16(53), U16(55), U16(44), U16(74), U16(263), U16(71), U16(711), U16(231), U16(71), U16(167), + U16(44), U16(39), U16(42), U16(44), U16(42), U16(140), U16(74), U16(74), U16(44), U16(44), + U16(42), U16(71), U16(103), U16(76), U16(333), U16(58), U16(39), U16(207), U16(44), U16(39), + U16(199), U16(103), U16(135), U16(71), U16(39), U16(71), U16(71), U16(103), U16(391), U16(74), + U16(44), U16(74), U16(106), U16(106), U16(44), U16(39), U16(42), U16(333), U16(111), U16(218), + U16(55), U16(58), U16(106), U16(263), U16(103), U16(743), U16(327), U16(167), U16(39), U16(108), + U16(138), U16(108), U16(140), U16(76), U16(71), U16(71), U16(76), U16(333), U16(239), U16(58), + U16(74), U16(263), U16(103), U16(743), U16(327), U16(167), U16(44), U16(39), U16(42), U16(44), + U16(170), U16(44), U16(74), U16(74), U16(76), U16(74), U16(39), U16(71), U16(76), U16(333), + U16(71), U16(74), U16(263), U16(103), U16(1319), U16(39), U16(106), U16(140), U16(106), U16(106), + U16(44), U16(39), U16(42), U16(71), U16(76), U16(333), U16(207), U16(58), U16(199), U16(74), + U16(583), U16(775), U16(295), U16(39), U16(231), U16(44), U16(106), U16(108), U16(44), U16(266), + U16(74), U16(53), U16(1543), U16(44), U16(71), U16(236), U16(55), U16(199), U16(38), U16(268), + U16(53), U16(333), U16(85), U16(71), U16(39), U16(71), U16(39), U16(39), U16(135), U16(231), + U16(103), U16(39), U16(39), U16(71), U16(135), U16(44), U16(71), U16(204), U16(76), U16(39), + U16(167), U16(38), U16(204), U16(333), U16(135), U16(39), U16(122), U16(501), U16(58), U16(53), + U16(122), U16(76), U16(218), U16(333), U16(335), U16(58), U16(44), U16(58), U16(44), U16(58), + U16(44), U16(54), U16(50), U16(54), U16(50), U16(74), U16(263), U16(1159), U16(460), U16(42), + U16(172), U16(53), U16(76), U16(167), U16(364), U16(1164), U16(282), U16(44), U16(218), U16(90), + U16(181), U16(154), U16(85), U16(1383), U16(74), U16(140), U16(42), U16(204), U16(42), U16(76), + U16(74), U16(76), U16(39), U16(333), U16(213), U16(199), U16(74), U16(76), U16(135), U16(108), + U16(39), U16(106), U16(71), U16(234), U16(103), U16(140), U16(423), U16(44), U16(74), U16(76), + U16(202), U16(44), U16(39), U16(42), U16(333), U16(106), U16(44), U16(90), U16(1225), U16(41), + U16(41), U16(1383), U16(53), U16(38), U16(10631), U16(135), U16(231), U16(39), U16(135), U16(1319), + U16(135), U16(1063), U16(135), U16(231), U16(39), U16(135), U16(487), U16(1831), U16(135), U16(2151), + U16(108), U16(309), U16(655), U16(519), U16(346), U16(2727), U16(49), U16(19847), U16(85), U16(551), + U16(61), U16(839), U16(54), U16(50), U16(2407), U16(117), U16(110), U16(423), U16(135), U16(108), + U16(583), U16(108), U16(85), U16(583), U16(76), U16(423), U16(103), U16(76), U16(1671), U16(76), + U16(42), U16(236), U16(266), U16(44), U16(74), U16(364), U16(117), U16(38), U16(117), U16(55), + U16(39), U16(44), U16(333), U16(335), U16(213), U16(49), U16(149), U16(108), U16(61), U16(333), + U16(1127), U16(38), U16(1671), U16(1319), U16(44), U16(39), U16(2247), U16(935), U16(108), U16(138), + U16(76), U16(106), U16(74), U16(44), U16(202), U16(108), U16(58), U16(85), U16(333), U16(967), + U16(167), U16(1415), U16(554), U16(231), U16(74), U16(333), U16(47), U16(1114), U16(743), U16(76), + U16(106), U16(85), U16(1703), U16(42), U16(44), U16(42), U16(236), U16(44), U16(42), U16(44), + U16(74), U16(268), U16(202), U16(332), U16(44), U16(333), U16(333), U16(245), U16(38), U16(213), + U16(140), U16(42), U16(1511), U16(44), U16(42), U16(172), U16(42), U16(44), U16(170), U16(44), + U16(74), U16(231), U16(333), U16(245), U16(346), U16(300), U16(314), U16(76), U16(42), U16(967), + U16(42), U16(140), U16(74), U16(76), U16(42), U16(44), U16(74), U16(71), U16(333), U16(1415), + U16(44), U16(42), U16(76), U16(106), U16(44), U16(42), U16(108), U16(74), U16(149), U16(1159), + U16(266), U16(268), U16(74), U16(76), U16(181), U16(333), U16(103), U16(333), U16(967), U16(198), + U16(85), U16(277), U16(108), U16(53), U16(428), U16(42), U16(236), U16(135), U16(44), U16(135), + U16(74), U16(44), U16(71), U16(1413), U16(2022), U16(421), U16(38), U16(1093), U16(1190), U16(1260), + U16(140), U16(4830), U16(261), U16(3166), U16(261), U16(265), U16(197), U16(201), U16(261), U16(265), + U16(261), U16(265), U16(197), U16(201), U16(261), U16(41), U16(41), U16(41), U16(94), U16(229), + U16(265), U16(453), U16(261), U16(264), U16(261), U16(264), U16(261), U16(264), U16(165), U16(69), + U16(137), U16(40), U16(56), U16(37), U16(120), U16(101), U16(69), U16(137), U16(40), U16(120), + U16(133), U16(69), U16(137), U16(120), U16(261), U16(169), U16(120), U16(101), U16(69), U16(137), + U16(40), U16(88), U16(381), U16(162), U16(209), U16(85), U16(52), U16(51), U16(54), U16(84), + U16(51), U16(54), U16(52), U16(277), U16(59), U16(60), U16(162), U16(61), U16(309), U16(52), + U16(51), U16(149), U16(80), U16(117), U16(57), U16(54), U16(50), U16(373), U16(57), U16(53), + U16(48), U16(341), U16(61), U16(162), U16(194), U16(47), U16(38), U16(207), U16(121), U16(54), + U16(50), U16(38), U16(335), U16(121), U16(54), U16(50), U16(422), U16(855), U16(428), U16(139), + U16(44), U16(107), U16(396), U16(90), U16(41), U16(154), U16(41), U16(90), U16(37), U16(105), + U16(69), U16(105), U16(37), U16(58), U16(41), U16(90), U16(57), U16(169), U16(218), U16(41), + U16(58), U16(41), U16(58), U16(41), U16(58), U16(137), U16(58), U16(37), U16(137), U16(37), + U16(135), U16(37), U16(90), U16(69), U16(73), U16(185), U16(94), U16(101), U16(58), U16(57), + U16(90), U16(37), U16(58), U16(527), U16(1134), U16(94), U16(142), U16(47), U16(185), U16(186), + U16(89), U16(154), U16(57), U16(90), U16(57), U16(90), U16(57), U16(250), U16(57), U16(1018), + U16(89), U16(90), U16(57), U16(58), U16(57), U16(1018), U16(8601), U16(282), U16(153), U16(666), + U16(89), U16(250), U16(54), U16(50), U16(2618), U16(57), U16(986), U16(825), U16(1306), U16(217), + U16(602), U16(1274), U16(378), U16(1935), U16(2522), U16(719), U16(5882), U16(57), U16(314), U16(57), + U16(1754), U16(281), U16(3578), U16(57), U16(4634), U16(3322), U16(54), U16(50), U16(54), U16(50), + U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), + U16(975), U16(1434), U16(185), U16(54), U16(50), U16(1017), U16(54), U16(50), U16(54), U16(50), + U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(537), U16(8218), U16(4217), U16(54), + U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), + U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), + U16(50), U16(2041), U16(54), U16(50), U16(54), U16(50), U16(1049), U16(54), U16(50), U16(8281), + U16(1562), U16(697), U16(90), U16(217), U16(346), U16(1513), U16(1509), U16(126), U16(73), U16(69), + U16(254), U16(105), U16(37), U16(94), U16(37), U16(94), U16(165), U16(70), U16(105), U16(37), + U16(3166), U16(37), U16(218), U16(158), U16(108), U16(94), U16(149), U16(47), U16(85), U16(1221), + U16(37), U16(37), U16(1799), U16(38), U16(53), U16(44), U16(743), U16(231), U16(231), U16(231), + U16(231), U16(231), U16(231), U16(231), U16(231), U16(1036), U16(85), U16(52), U16(51), U16(52), + U16(51), U16(117), U16(52), U16(51), U16(53), U16(52), U16(51), U16(309), U16(49), U16(85), + U16(49), U16(53), U16(52), U16(51), U16(85), U16(52), U16(51), U16(54), U16(50), U16(54), + U16(50), U16(54), U16(50), U16(54), U16(50), U16(181), U16(38), U16(341), U16(81), U16(858), + U16(2874), U16(6874), U16(410), U16(61), U16(117), U16(58), U16(38), U16(39), U16(46), U16(54), + U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(90), + U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(49), U16(54), + U16(82), U16(58), U16(302), U16(140), U16(74), U16(49), U16(166), U16(90), U16(110), U16(38), + U16(39), U16(53), U16(90), U16(2759), U16(76), U16(88), U16(70), U16(39), U16(49), U16(2887), + U16(53), U16(102), U16(39), U16(1319), U16(3015), U16(90), U16(143), U16(346), U16(871), U16(1178), + U16(519), U16(1018), U16(335), U16(986), U16(271), U16(58), U16(495), U16(1050), U16(335), U16(1274), + U16(495), U16(2042), U16(8218), U16(39), U16(39), U16(2074), U16(39), U16(39), U16(679), U16(38), + U16(36583), U16(1786), U16(1287), U16(198), U16(85), U16(8583), U16(38), U16(117), U16(519), U16(333), + U16(71), U16(1502), U16(39), U16(44), U16(107), U16(53), U16(332), U16(53), U16(38), U16(798), + U16(44), U16(2247), U16(334), U16(76), U16(213), U16(760), U16(294), U16(88), U16(478), U16(69), + U16(2014), U16(38), U16(261), U16(190), U16(350), U16(38), U16(88), U16(158), U16(158), U16(382), + U16(70), U16(37), U16(231), U16(44), U16(103), U16(44), U16(135), U16(44), U16(743), U16(74), + U16(76), U16(42), U16(154), U16(207), U16(90), U16(55), U16(58), U16(1671), U16(149), U16(74), + U16(1607), U16(522), U16(44), U16(85), U16(333), U16(588), U16(199), U16(117), U16(39), U16(333), + U16(903), U16(268), U16(85), U16(743), U16(364), U16(74), U16(53), U16(935), U16(108), U16(42), + U16(1511), U16(44), U16(74), U16(140), U16(74), U16(44), U16(138), U16(437), U16(38), U16(333), + U16(85), U16(1319), U16(204), U16(74), U16(76), U16(74), U16(76), U16(103), U16(44), U16(263), + U16(44), U16(42), U16(333), U16(149), U16(519), U16(38), U16(199), U16(122), U16(39), U16(42), + U16(1543), U16(44), U16(39), U16(108), U16(71), U16(76), U16(167), U16(76), U16(39), U16(44), + U16(39), U16(71), U16(38), U16(85), U16(359), U16(42), U16(76), U16(74), U16(85), U16(39), + U16(70), U16(42), U16(44), U16(199), U16(199), U16(199), U16(231), U16(231), U16(1127), U16(74), + U16(44), U16(74), U16(44), U16(74), U16(53), U16(42), U16(44), U16(333), U16(39), U16(39), + U16(743), U16(1575), U16(36), U16(68), U16(68), U16(36), U16(63), U16(63), U16(11719), U16(3399), + U16(229), U16(165), U16(39), U16(44), U16(327), U16(57), U16(423), U16(167), U16(39), U16(71), + U16(71), U16(3463), U16(536), U16(11623), U16(54), U16(50), U16(2055), U16(1735), U16(391), U16(55), + U16(58), U16(524), U16(245), U16(54), U16(50), U16(53), U16(236), U16(53), U16(81), U16(80), + U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), + U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), U16(85), U16(54), U16(50), U16(149), + U16(112), U16(117), U16(149), U16(49), U16(54), U16(50), U16(54), U16(50), U16(54), U16(50), + U16(117), U16(57), U16(49), U16(121), U16(53), U16(55), U16(85), U16(167), U16(4327), U16(34), + U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), + U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), U16(56), U16(48), + U16(56), U16(837), U16(54), U16(57), U16(50), U16(57), U16(54), U16(50), U16(53), U16(54), + U16(50), U16(85), U16(327), U16(38), U16(1447), U16(70), U16(999), U16(199), U16(199), U16(199), + U16(103), U16(87), U16(57), U16(56), U16(58), U16(87), U16(58), U16(153), U16(90), U16(98), + U16(90), U16(391), U16(839), U16(615), U16(71), U16(487), U16(455), U16(3943), U16(117), U16(1455), + U16(314), U16(1710), U16(143), U16(570), U16(47), U16(410), U16(1466), U16(44), U16(935), U16(1575), + U16(999), U16(143), U16(551), U16(46), U16(263), U16(46), U16(967), U16(53), U16(1159), U16(263), + U16(53), U16(174), U16(1289), U16(1285), U16(2503), U16(333), U16(199), U16(39), U16(1415), U16(71), + U16(39), U16(743), U16(53), U16(271), U16(711), U16(207), U16(53), U16(839), U16(53), U16(1799), + U16(71), U16(39), U16(108), U16(76), U16(140), U16(135), U16(103), U16(871), U16(108), U16(44), + U16(271), U16(309), U16(935), U16(79), U16(53), U16(1735), U16(245), U16(711), U16(271), U16(615), + U16(271), U16(2343), U16(1007), U16(42), U16(44), U16(42), U16(1703), U16(492), U16(245), U16(655), + U16(333), U16(76), U16(42), U16(1447), U16(106), U16(140), U16(74), U16(76), U16(85), U16(34), + U16(149), U16(807), U16(333), U16(108), U16(1159), U16(172), U16(42), U16(268), U16(333), U16(149), + U16(76), U16(42), U16(1543), U16(106), U16(300), U16(74), U16(135), U16(149), U16(333), U16(1383), + U16(44), U16(42), U16(44), U16(74), U16(204), U16(42), U16(44), U16(333), U16(28135), U16(3182), + U16(149), U16(34279), U16(18215), U16(2215), U16(39), U16(1482), U16(140), U16(422), U16(71), U16(7898), + U16(1274), U16(1946), U16(74), U16(108), U16(122), U16(202), U16(258), U16(268), U16(90), U16(236), + U16(986), U16(140), U16(1562), U16(2138), U16(108), U16(58), U16(2810), U16(591), U16(841), U16(837), + U16(841), U16(229), U16(581), U16(841), U16(837), U16(41), U16(73), U16(41), U16(73), U16(137), + U16(265), U16(133), U16(37), U16(229), U16(357), U16(841), U16(837), U16(73), U16(137), U16(265), + U16(233), U16(837), U16(73), U16(137), U16(169), U16(41), U16(233), U16(837), U16(841), U16(837), + U16(841), U16(837), U16(841), U16(837), U16(841), U16(837), U16(841), U16(837), U16(841), U16(901), + U16(809), U16(57), U16(805), U16(57), U16(197), U16(809), U16(57), U16(805), U16(57), U16(197), + U16(809), U16(57), U16(805), U16(57), U16(197), U16(809), U16(57), U16(805), U16(57), U16(197), + U16(809), U16(57), U16(805), U16(57), U16(197), U16(94), U16(1613), U16(135), U16(871), U16(71), + U16(39), U16(39), U16(327), U16(135), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), + U16(103), U16(71), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(71), U16(39), + U16(135), U16(231), U16(135), U16(135), U16(39), U16(327), U16(551), U16(103), U16(167), U16(551), + U16(89), U16(1434), U16(3226), U16(506), U16(474), U16(506), U16(506), U16(367), U16(1018), U16(1946), + U16(1402), U16(954), U16(1402), U16(314), U16(90), U16(1082), U16(218), U16(2266), U16(666), U16(1210), + U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), + U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), + U16(34), U16(3074), U16(7692), U16(63), U16(63), +} /* sqlite3.c:237649:12 */ + +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ + var iRes int32 = -1 + var iHi int32 + var iLo int32 + var ret int32 + var iKey U16 + + if iCode >= U32(int32(1)<<20) { + return 0 + } + iLo = int32(aFts5UnicodeBlock[iCode>>16]) + iHi = int32(aFts5UnicodeBlock[U32(1)+iCode>>16]) + iKey = U16(iCode & U32(0xFFFF)) + for iHi > iLo { + var iTest int32 = (iHi + iLo) / 2 + + if int32(iKey) >= int32(aFts5UnicodeMap[iTest]) { + iRes = iTest + iLo = iTest + 1 + } else { + iHi = iTest + } + } + + if iRes < 0 { + return 0 + } + if int32(iKey) >= int32(aFts5UnicodeMap[iRes])+int32(aFts5UnicodeData[iRes])>>5 { + return 0 + } + ret = int32(aFts5UnicodeData[iRes]) & 0x1F + if ret != 30 { + return ret + } + if (int32(iKey)-int32(aFts5UnicodeMap[iRes]))&0x01 != 0 { + return 5 + } + return 9 +} + +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ + var i int32 = 0 + var iTbl int32 = 0 + for i < 128 { + var bToken int32 = int32(*(*U8)(unsafe.Pointer(aArray + uintptr(int32(aFts5UnicodeData[iTbl])&0x1F)))) + var n int32 = int32(aFts5UnicodeData[iTbl])>>5 + i + for ; i < 128 && i < n; i++ { + *(*U8)(unsafe.Pointer(aAscii + uintptr(i))) = U8(bToken) + } + iTbl++ + } + *(*U8)(unsafe.Pointer(aAscii)) = U8(0) // 0x00 is never a token character +} + +// 2015 May 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Routines for varint serialization and deserialization. + +// #include "fts5Int.h" + +// This is a copy of the sqlite3GetVarint32() routine from the SQLite core. +// Except, this version does handle the single byte case that the core +// version depends on being handled before its function is called. +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var a U32 + var b U32 + + // The 1-byte case. Overwhelmingly the most common. + a = U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0 (unmasked) + if !(a&U32(0x80) != 0) { + // Values between 0 and 127 + *(*U32)(unsafe.Pointer(v)) = a + return 1 + } + + // The 2-byte case + p++ + b = U32(*(*uint8)(unsafe.Pointer(p))) + // b: p1 (unmasked) + if !(b&U32(0x80) != 0) { + // Values between 128 and 16383 + a = a & U32(0x7f) + a = a << 7 + *(*U32)(unsafe.Pointer(v)) = a | b + return 2 + } + + // The 3-byte case + p++ + a = a << 14 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0<<14 | p2 (unmasked) + if !(a&U32(0x80) != 0) { + // Values between 16384 and 2097151 + a = a & U32(int32(0x7f)<<14|0x7f) + b = b & U32(0x7f) + b = b << 7 + *(*U32)(unsafe.Pointer(v)) = a | b + return 3 + } + + /* A 32-bit varint is used to store size information in btrees. + ** Objects are rarely larger than 2MiB limit of a 3-byte varint. + ** A 3-byte varint is sufficient, for example, to record the size + ** of a 1048569-byte BLOB or string. + ** + ** We only unroll the first 1-, 2-, and 3- byte cases. The very + ** rare larger cases can be handled by the slower 64-bit varint + ** routine. + */ + { + // var v64 U64 at bp, 8 + + var n U8 + p -= uintptr(2) + n = sqlite3Fts5GetVarint(tls, p, bp) + *(*U32)(unsafe.Pointer(v)) = U32(*(*U64)(unsafe.Pointer(bp))) & U32(0x7FFFFFFF) + + return int32(n) + + } + return int32(0) +} + +// Bitmasks used by sqlite3GetVarint(). These precomputed constants +// are defined here rather than simply putting the constant expressions +// inline in order to work around bugs in the RVT compiler. +// +// SLOT_2_0 A mask for (0x7f<<14) | 0x7f +// +// SLOT_4_2_0 A mask for (0x7f<<28) | SLOT_2_0 + +// Read a 64-bit variable-length integer from memory starting at p[0]. +// Return the number of bytes read. The value is stored in *v. +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ + var a U32 + var b U32 + var s U32 + + a = U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0 (unmasked) + if !(a&U32(0x80) != 0) { + *(*U64)(unsafe.Pointer(v)) = U64(a) + return U8(1) + } + + p++ + b = U32(*(*uint8)(unsafe.Pointer(p))) + // b: p1 (unmasked) + if !(b&U32(0x80) != 0) { + a = a & U32(0x7f) + a = a << 7 + a = a | b + *(*U64)(unsafe.Pointer(v)) = U64(a) + return U8(2) + } + + // Verify that constants are precomputed correctly + + p++ + a = a << 14 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0<<14 | p2 (unmasked) + if !(a&U32(0x80) != 0) { + a = a & U32(SLOT_2_0) + b = b & U32(0x7f) + b = b << 7 + a = a | b + *(*U64)(unsafe.Pointer(v)) = U64(a) + return U8(3) + } + + // CSE1 from below + a = a & U32(SLOT_2_0) + p++ + b = b << 14 + b = b | U32(*(*uint8)(unsafe.Pointer(p))) + // b: p1<<14 | p3 (unmasked) + if !(b&U32(0x80) != 0) { + b = b & U32(SLOT_2_0) + // moved CSE1 up + // a &= (0x7f<<14)|(0x7f); + a = a << 7 + a = a | b + *(*U64)(unsafe.Pointer(v)) = U64(a) + return U8(4) + } + + // a: p0<<14 | p2 (masked) + // b: p1<<14 | p3 (unmasked) + // 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) + // moved CSE1 up + // a &= (0x7f<<14)|(0x7f); + b = b & U32(SLOT_2_0) + s = a + // s: p0<<14 | p2 (masked) + + p++ + a = a << 14 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p0<<28 | p2<<14 | p4 (unmasked) + if !(a&U32(0x80) != 0) { + // we can skip these cause they were (effectively) done above in calc'ing s + // a &= (0x7f<<28)|(0x7f<<14)|(0x7f); + // b &= (0x7f<<14)|(0x7f); + b = b << 7 + a = a | b + s = s >> 18 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(5) + } + + // 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) + s = s << 7 + s = s | b + // s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) + + p++ + b = b << 14 + b = b | U32(*(*uint8)(unsafe.Pointer(p))) + // b: p1<<28 | p3<<14 | p5 (unmasked) + if !(b&U32(0x80) != 0) { + // we can skip this cause it was (effectively) done above in calc'ing s + // b &= (0x7f<<28)|(0x7f<<14)|(0x7f); + a = a & U32(SLOT_2_0) + a = a << 7 + a = a | b + s = s >> 18 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(6) + } + + p++ + a = a << 14 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p2<<28 | p4<<14 | p6 (unmasked) + if !(a&U32(0x80) != 0) { + a = a & SLOT_4_2_0 + b = b & U32(SLOT_2_0) + b = b << 7 + a = a | b + s = s >> 11 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(7) + } + + // CSE2 from below + a = a & U32(SLOT_2_0) + p++ + b = b << 14 + b = b | U32(*(*uint8)(unsafe.Pointer(p))) + // b: p3<<28 | p5<<14 | p7 (unmasked) + if !(b&U32(0x80) != 0) { + b = b & SLOT_4_2_0 + // moved CSE2 up + // a &= (0x7f<<14)|(0x7f); + a = a << 7 + a = a | b + s = s >> 4 + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + return U8(8) + } + + p++ + a = a << 15 + a = a | U32(*(*uint8)(unsafe.Pointer(p))) + // a: p4<<29 | p6<<15 | p8 (unmasked) + + // moved CSE2 up + // a &= (0x7f<<29)|(0x7f<<15)|(0xff); + b = b & U32(SLOT_2_0) + b = b << 8 + a = a | b + + s = s << 4 + b = U32(*(*uint8)(unsafe.Pointer(p + libc.UintptrFromInt32(-4)))) + b = b & U32(0x7f) + b = b >> 3 + s = s | b + + *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) + + return U8(9) +} + +// The variable-length integer encoding is as follows: +// +// KEY: +// A = 0xxxxxxx 7 bits of data and one flag bit +// B = 1xxxxxxx 7 bits of data and one flag bit +// C = xxxxxxxx 8 bits of data +// +// 7 bits - A +// 14 bits - BA +// 21 bits - BBA +// 28 bits - BBBA +// 35 bits - BBBBA +// 42 bits - BBBBBA +// 49 bits - BBBBBBA +// 56 bits - BBBBBBBA +// 64 bits - BBBBBBBBC + +// Write a 64-bit variable-length integer to memory starting at p[0]. +// The length of data write will be between 1 and 9 bytes. The number +// of bytes written is returned. +// +// A variable-length integer consists of the lower 7 bits of each byte +// for all bytes that have the 8th bit set and one byte with the 8th +// bit clear. Except, if we get to the 9th byte, it stores the full +// 8 bits and is the last byte. +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ + bp := tls.Alloc(10) + defer tls.Free(10) + + var i int32 + var j int32 + var n int32 + // var buf [10]U8 at bp, 10 + + if v&(U64(uint64(0xff000000))<<32) != 0 { + *(*uint8)(unsafe.Pointer(p + 8)) = U8(v) + v >>= 8 + for i = 7; i >= 0; i-- { + *(*uint8)(unsafe.Pointer(p + uintptr(i))) = U8(v&uint64(0x7f) | uint64(0x80)) + v >>= 7 + } + return 9 + } + n = 0 + for __ccgo := true; __ccgo; __ccgo = v != uint64(0) { + *(*U8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&n, 1)))) = U8(v&uint64(0x7f) | uint64(0x80)) + v >>= 7 + } + *(*U8)(unsafe.Pointer(bp)) &= U8(0x7f) + + i = 0 + j = n - 1 +__1: + if !(j >= 0) { + goto __3 + } + { + *(*uint8)(unsafe.Pointer(p + uintptr(i))) = *(*U8)(unsafe.Pointer(bp + uintptr(j))) + + } + goto __2 +__2: + j-- + i++ + goto __1 + goto __3 +__3: + ; + return n +} + +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ + if v <= uint64(0x7f) { + *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) + return 1 + } + if v <= uint64(0x3fff) { + *(*uint8)(unsafe.Pointer(p)) = uint8(v>>7&uint64(0x7f) | uint64(0x80)) + *(*uint8)(unsafe.Pointer(p + 1)) = uint8(v & uint64(0x7f)) + return 2 + } + return fts5PutVarint64(tls, p, v) +} + +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ + + if iVal < U32(int32(1)<<14) { + return 2 + } + if iVal < U32(int32(1)<<21) { + return 3 + } + if iVal < U32(int32(1)<<28) { + return 4 + } + return 5 +} + +// 2015 May 08 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This is an SQLite virtual table module implementing direct access to an +// existing FTS5 index. The module may create several different types of +// tables: +// +// col: +// CREATE TABLE vocab(term, col, doc, cnt, PRIMARY KEY(term, col)); +// +// One row for each term/column combination. The value of $doc is set to +// the number of fts5 rows that contain at least one instance of term +// $term within column $col. Field $cnt is set to the total number of +// instances of term $term in column $col (in any row of the fts5 table). +// +// row: +// CREATE TABLE vocab(term, doc, cnt, PRIMARY KEY(term)); +// +// One row for each term in the database. The value of $doc is set to +// the number of fts5 rows that contain at least one instance of term +// $term. Field $cnt is set to the total number of instances of term +// $term in the database. +// +// instance: +// CREATE TABLE vocab(term, doc, col, offset, PRIMARY KEY()); +// +// One row for each term instance in the database. + +// #include "fts5Int.h" + +type Fts5VocabTable1 = struct { + Fbase Sqlite3_vtab + FzFts5Tbl uintptr + FzFts5Db uintptr + Fdb uintptr + FpGlobal uintptr + FeType int32 + FbBusy uint32 +} /* sqlite3.c:238262:9 */ + +// 2015 May 08 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This is an SQLite virtual table module implementing direct access to an +// existing FTS5 index. The module may create several different types of +// tables: +// +// col: +// CREATE TABLE vocab(term, col, doc, cnt, PRIMARY KEY(term, col)); +// +// One row for each term/column combination. The value of $doc is set to +// the number of fts5 rows that contain at least one instance of term +// $term within column $col. Field $cnt is set to the total number of +// instances of term $term in column $col (in any row of the fts5 table). +// +// row: +// CREATE TABLE vocab(term, doc, cnt, PRIMARY KEY(term)); +// +// One row for each term in the database. The value of $doc is set to +// the number of fts5 rows that contain at least one instance of term +// $term. Field $cnt is set to the total number of instances of term +// $term in the database. +// +// instance: +// CREATE TABLE vocab(term, doc, col, offset, PRIMARY KEY()); +// +// One row for each term instance in the database. + +// #include "fts5Int.h" + +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ +type Fts5VocabCursor1 = struct { + Fbase Sqlite3_vtab_cursor + FpStmt uintptr + FpFts5 uintptr + FbEof int32 + F__ccgo_pad1 [4]byte + FpIter uintptr + FpStruct uintptr + FnLeTerm int32 + F__ccgo_pad2 [4]byte + FzLeTerm uintptr + FiCol int32 + F__ccgo_pad3 [4]byte + FaCnt uintptr + FaDoc uintptr + Frowid I64 + Fterm Fts5Buffer + FiInstPos I64 + FiInstOff int32 + F__ccgo_pad4 [4]byte +} /* sqlite3.c:238263:9 */ + +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ + +// Bits for the mask used as the idxNum value by xBestIndex/xFilter. + +// Translate a string containing an fts5vocab table type to an +// FTS5_VOCAB_XXX constant. If successful, set *peType to the output +// value and return SQLITE_OK. Otherwise, set *pzErr to an error message +// and return SQLITE_ERROR. +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ + bp := tls.Alloc(12) + defer tls.Free(12) + + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK + var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) + if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { + sqlite3Fts5Dequote(tls, zCopy) + if Xsqlite3_stricmp(tls, zCopy, ts+37140) == 0 { + *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL + } else if Xsqlite3_stricmp(tls, zCopy, ts+37144) == 0 { + *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW + } else if Xsqlite3_stricmp(tls, zCopy, ts+37148) == 0 { + *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37157, libc.VaList(bp, zCopy)) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR + } + Xsqlite3_free(tls, zCopy) + } + + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) +} + +// The xDisconnect() virtual table method. +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ + var pTab uintptr = pVtab + Xsqlite3_free(tls, pTab) + return SQLITE_OK +} + +// The xDestroy() virtual table method. +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ + var pTab uintptr = pVtab + Xsqlite3_free(tls, pTab) + return SQLITE_OK +} + +// This function is the implementation of both the xConnect and xCreate +// methods of the FTS3 virtual table. +// +// The argv[] array contains the following: +// +// argv[0] -> module name ("fts5vocab") +// argv[1] -> database name +// argv[2] -> table name +// +// then: +// +// argv[3] -> name of fts5 table +// argv[4] -> type of fts5vocab table +// +// or, for tables in the TEMP schema only. +// +// argv[3] -> name of fts5 tables database +// argv[4] -> name of fts5 table +// argv[5] -> type of fts5vocab table +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ + bp := tls.Alloc(36) + defer tls.Free(36) + + *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ + ts + 37191, + ts + 37231, + ts + 37266, + } + + var pRet uintptr = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code + var bDb int32 + + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23165, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + + if argc != 5 && bDb == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37309, 0) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR + } else { + var nByte int32 // Bytes of space to allocate + var zDb uintptr + if bDb != 0 { + zDb = *(*uintptr)(unsafe.Pointer(argv + 3*8)) + } else { + zDb = *(*uintptr)(unsafe.Pointer(argv + 1*8)) + } + var zTab uintptr + if bDb != 0 { + zTab = *(*uintptr)(unsafe.Pointer(argv + 4*8)) + } else { + zTab = *(*uintptr)(unsafe.Pointer(argv + 3*8)) + } + var zType uintptr + if bDb != 0 { + zType = *(*uintptr)(unsafe.Pointer(argv + 5*8)) + } else { + zType = *(*uintptr)(unsafe.Pointer(argv + 4*8)) + } + var nDb int32 = int32(libc.Xstrlen(tls, zDb)) + 1 + var nTab int32 = int32(libc.Xstrlen(tls, zTab)) + 1 + *(*int32)(unsafe.Pointer(bp /* eType */)) = 0 + + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = fts5VocabTableType(tls, zType, pzErr, bp) + if *(*int32)(unsafe.Pointer(bp + 32)) == SQLITE_OK { + + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_declare_vtab(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 + uintptr(*(*int32)(unsafe.Pointer(bp /* eType */)))*8))) + } + + nByte = int32(uint64(unsafe.Sizeof(Fts5VocabTable{})) + uint64(nDb) + uint64(nTab)) + pRet = sqlite3Fts5MallocZero(tls, bp+32, int64(nByte)) + if pRet != 0 { + (*Fts5VocabTable)(unsafe.Pointer(pRet)).FpGlobal = pAux + (*Fts5VocabTable)(unsafe.Pointer(pRet)).FeType = *(*int32)(unsafe.Pointer(bp /* eType */)) + (*Fts5VocabTable)(unsafe.Pointer(pRet)).Fdb = db + (*Fts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl = pRet + 1*64 + (*Fts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db = (*Fts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl + uintptr(nTab) + libc.Xmemcpy(tls, (*Fts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl, zTab, uint64(nTab)) + libc.Xmemcpy(tls, (*Fts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db, zDb, uint64(nDb)) + sqlite3Fts5Dequote(tls, (*Fts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl) + sqlite3Fts5Dequote(tls, (*Fts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db) + } + } + + *(*uintptr)(unsafe.Pointer(ppVTab)) = pRet + return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) +} + +// The xConnect() and xCreate() methods for the virtual table. All the +// work is done in function fts5VocabInitVtab(). +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238460:12: */ + return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) +} + +// Implementation of the xBestIndex method. +// +// Only constraints of the form: +// +// term <= ? +// term == ? +// term >= ? +// +// are interpreted. Less-than and less-than-or-equal are treated +// identically, as are greater-than and greater-than-or-equal. +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ + var i int32 + var iTermEq int32 = -1 + var iTermGe int32 = -1 + var iTermLe int32 = -1 + var idxNum int32 = 0 + var nArg int32 = 0 + + _ = pUnused + + for i = 0; i < (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FnConstraint; i++ { + var p uintptr = (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraint + uintptr(i)*12 + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable) == 0 { + continue + } + if (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn == 0 { // term column + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { + iTermEq = i + } + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_LE { + iTermLe = i + } + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_LT { + iTermLe = i + } + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_GE { + iTermGe = i + } + if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_GT { + iTermGe = i + } + } + } + + if iTermEq >= 0 { + idxNum = idxNum | FTS5_VOCAB_TERM_EQ + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(iTermEq)*8)).FargvIndex = libc.PreIncInt32(&nArg, 1) + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = float64(100) + } else { + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = float64(1000000) + if iTermGe >= 0 { + idxNum = idxNum | FTS5_VOCAB_TERM_GE + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(iTermGe)*8)).FargvIndex = libc.PreIncInt32(&nArg, 1) + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost / float64(2) + } + if iTermLe >= 0 { + idxNum = idxNum | FTS5_VOCAB_TERM_LE + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(iTermLe)*8)).FargvIndex = libc.PreIncInt32(&nArg, 1) + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost / float64(2) + } + } + + // This virtual table always delivers results in ascending order of + // the "term" column (column 0). So if the user has requested this + // specifically - "ORDER BY term" or "ORDER BY term ASC" - set the + // sqlite3_index_info.orderByConsumed flag to tell the core the results + // are already in sorted order. + if (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FnOrderBy == 1 && + (*sqlite3_index_orderby)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaOrderBy)).FiColumn == 0 && + int32((*sqlite3_index_orderby)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaOrderBy)).Fdesc) == 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).ForderByConsumed = 1 + } + + (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FidxNum = idxNum + return SQLITE_OK +} + +// Implementation of xOpen method. +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ + bp := tls.Alloc(80) + defer tls.Free(80) + + var pTab uintptr = pVTab + var pFts5 uintptr = uintptr(0) + var pCsr uintptr = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) + var zSql uintptr = uintptr(0) + + if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { + (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, + ts+37342, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + return SQLITE_ERROR + } + zSql = sqlite3Fts5Mprintf(tls, bp+64, + ts+37373, + libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + if zSql != 0 { + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) + } + Xsqlite3_free(tls, zSql) + + if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_ERROR { + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK + } + + (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy = uint32(1) + if *(*uintptr)(unsafe.Pointer(bp + 72)) != 0 && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) == SQLITE_ROW { + var iId I64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)), 0) + pFts5 = sqlite3Fts5TableFromCsrid(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FpGlobal, iId) + } + (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy = uint32(0) + + if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { + if pFts5 == uintptr(0) { + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) + *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) + if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { + (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, + ts+37424, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + } + } else { + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = sqlite3Fts5FlushToDisk(tls, pFts5) + } + } + + if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { + var nByte I64 = I64(uint64((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pFts5)).FpConfig)).FnCol)*uint64(unsafe.Sizeof(I64(0)))*uint64(2) + uint64(unsafe.Sizeof(Fts5VocabCursor{}))) + pCsr = sqlite3Fts5MallocZero(tls, bp+64, nByte) + } + + if pCsr != 0 { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5 = pFts5 + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt = pCsr + 1*128 + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt + uintptr((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pFts5)).FpConfig)).FnCol)*8 + } else { + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) + } + + *(*uintptr)(unsafe.Pointer(ppCsr)) = pCsr + return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) +} + +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) + sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) + sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct = uintptr(0) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter = uintptr(0) + Xsqlite3_free(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = -1 + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = uintptr(0) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof = 0 +} + +// Close the cursor. For additional information see the documentation +// on the xClose method of the virtual table interface. +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ + var pCsr uintptr = pCursor + fts5VocabResetCursor(tls, pCsr) + sqlite3Fts5BufferFree(tls, pCsr+96) + Xsqlite3_finalize(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStmt) + Xsqlite3_free(tls, pCsr) + return SQLITE_OK +} + +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = SQLITE_OK + + if (*Fts5IndexIter)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter)).FbEof != 0 { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof = 1 + } else { + var zTerm uintptr + // var nTerm int32 at bp, 4 + + zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp) + if (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm >= 0 { + var nCmp int32 = func() int32 { + if *(*int32)(unsafe.Pointer(bp)) < (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm { + return *(*int32)(unsafe.Pointer(bp)) + } + return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm + }() + var bCmp int32 = libc.Xmemcmp(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm, zTerm, uint64(nCmp)) + if bCmp < 0 || bCmp == 0 && (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm < *(*int32)(unsafe.Pointer(bp)) { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof = 1 + } + } + + sqlite3Fts5BufferSet(tls, bp+4, pCsr+96, *(*int32)(unsafe.Pointer(bp /* nTerm */)), zTerm) + } + return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) +} + +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ + var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail + var rc int32 = SQLITE_OK + var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter + var pp uintptr = pCsr + 112 + var po uintptr = pCsr + 120 + + for eDetail == FTS5_DETAIL_NONE || + sqlite3Fts5PoslistNext64(tls, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FpData, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData, po, pp) != 0 { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiInstPos = int64(0) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiInstOff = 0 + + rc = sqlite3Fts5IterNextScan(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) + if rc == SQLITE_OK { + rc = fts5VocabInstanceNewTerm(tls, pCsr) + if (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof != 0 || eDetail == FTS5_DETAIL_NONE { + break + } + } + if rc != 0 { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof = 1 + break + } + } + + return rc +} + +// Advance the cursor to the next row in the table. +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) + + var pCsr uintptr = pCursor + var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab + var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FnCol + // var rc int32 at bp+4, 4 + + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3Fts5StructureTest(tls, (*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpIndex, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) + if *(*int32)(unsafe.Pointer(bp + 4)) != SQLITE_OK { + return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) + } + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid++ + + if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType == FTS5_VOCAB_INSTANCE { + return fts5VocabInstanceNext(tls, pCsr) + } + + if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType == FTS5_VOCAB_COL { + for (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol++; (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol < nCol; (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol++ { + if *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc + uintptr((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol)*8)) != 0 { + break + } + } + } + + if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType != FTS5_VOCAB_COL || (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol >= nCol { + if (*Fts5IndexIter)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter)).FbEof != 0 { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof = 1 + } else { + var zTerm uintptr + // var nTerm int32 at bp, 4 + + zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp) + + if (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm >= 0 { + var nCmp int32 = func() int32 { + if *(*int32)(unsafe.Pointer(bp)) < (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm { + return *(*int32)(unsafe.Pointer(bp)) + } + return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm + }() + var bCmp int32 = libc.Xmemcmp(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm, zTerm, uint64(nCmp)) + if bCmp < 0 || bCmp == 0 && (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm < *(*int32)(unsafe.Pointer(bp)) { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof = 1 + return SQLITE_OK + } + } + + sqlite3Fts5BufferSet(tls, bp+4, pCsr+96, *(*int32)(unsafe.Pointer(bp /* nTerm */)), zTerm) + libc.Xmemset(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt, 0, uint64(nCol)*uint64(unsafe.Sizeof(I64(0)))) + libc.Xmemset(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc, 0, uint64(nCol)*uint64(unsafe.Sizeof(I64(0)))) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol = 0 + + for *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { + var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail + var pPos uintptr + var nPos int32 // Position list + *(*I64)(unsafe.Pointer(bp + 16 /* iPos */)) = int64(0) // 64-bit position read from poslist + *(*int32)(unsafe.Pointer(bp + 8 /* iOff */)) = 0 // Current offset within position list + + pPos = (*Fts5IndexIter)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter)).FpData + nPos = (*Fts5IndexIter)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter)).FnData + + switch (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType { + case FTS5_VOCAB_ROW: + if eDetail == FTS5_DETAIL_FULL { + for 0 == sqlite3Fts5PoslistNext64(tls, pPos, nPos, bp+8, bp+16) { + *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt))++ + } + } + *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc))++ + break + fallthrough + + case FTS5_VOCAB_COL: + if eDetail == FTS5_DETAIL_FULL { + var iCol int32 = -1 + for 0 == sqlite3Fts5PoslistNext64(tls, pPos, nPos, bp+8, bp+16) { + var ii int32 = int32(*(*I64)(unsafe.Pointer(bp + 16)) >> 32) + if iCol != ii { + if ii >= nCol { + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + break + } + *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc + uintptr(ii)*8))++ + iCol = ii + } + *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt + uintptr(ii)*8))++ + } + } else if eDetail == FTS5_DETAIL_COLUMNS { + for 0 == sqlite3Fts5PoslistNext64(tls, pPos, nPos, bp+8, bp+16) { + + if *(*I64)(unsafe.Pointer(bp + 16)) >= I64(nCol) { + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + break + } + *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc + uintptr(*(*I64)(unsafe.Pointer(bp + 16 /* iPos */)))*8))++ + } + } else { + + *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc))++ + } + break + fallthrough + + default: + + break + } + + if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3Fts5IterNextScan(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) + } + if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType == FTS5_VOCAB_INSTANCE { + break + } + + if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { + zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp) + if *(*int32)(unsafe.Pointer(bp)) != (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Fterm.Fn || + *(*int32)(unsafe.Pointer(bp)) > 0 && libc.Xmemcmp(tls, zTerm, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Fterm.Fp, uint64(*(*int32)(unsafe.Pointer(bp)))) != 0 { + break + } + if (*Fts5IndexIter)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter)).FbEof != 0 { + break + } + } + } + } + } + + if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK && (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof == 0 && (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType == FTS5_VOCAB_COL { + for ; (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol < nCol && *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc + uintptr((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol)*8)) == int64(0); (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol++ { + } + if (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol == nCol { + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 + } + } + return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) +} + +// This is the xFilter implementation for the virtual table. +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ + var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab + var pCsr uintptr = pCursor + var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType + var rc int32 = SQLITE_OK + + var iVal int32 = 0 + var f int32 = FTS5INDEX_QUERY_SCAN + var zTerm uintptr = uintptr(0) + var nTerm int32 = 0 + + var pEq uintptr = uintptr(0) + var pGe uintptr = uintptr(0) + var pLe uintptr = uintptr(0) + + _ = zUnused + _ = nUnused + + fts5VocabResetCursor(tls, pCsr) + if idxNum&FTS5_VOCAB_TERM_EQ != 0 { + pEq = *(*uintptr)(unsafe.Pointer(apVal + uintptr(libc.PostIncInt32(&iVal, 1))*8)) + } + if idxNum&FTS5_VOCAB_TERM_GE != 0 { + pGe = *(*uintptr)(unsafe.Pointer(apVal + uintptr(libc.PostIncInt32(&iVal, 1))*8)) + } + if idxNum&FTS5_VOCAB_TERM_LE != 0 { + pLe = *(*uintptr)(unsafe.Pointer(apVal + uintptr(libc.PostIncInt32(&iVal, 1))*8)) + } + + if pEq != 0 { + zTerm = Xsqlite3_value_text(tls, pEq) + nTerm = Xsqlite3_value_bytes(tls, pEq) + f = 0 + } else { + if pGe != 0 { + zTerm = Xsqlite3_value_text(tls, pGe) + nTerm = Xsqlite3_value_bytes(tls, pGe) + } + if pLe != 0 { + var zCopy uintptr = Xsqlite3_value_text(tls, pLe) + if zCopy == uintptr(0) { + zCopy = ts + 1525 /* "" */ + } + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) + if (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm == uintptr(0) { + rc = SQLITE_NOMEM + } else { + libc.Xmemcpy(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm, zCopy, uint64((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1)) + } + } + } + + if rc == SQLITE_OK { + var pIndex uintptr = (*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpIndex + rc = sqlite3Fts5IndexQuery(tls, pIndex, zTerm, nTerm, f, uintptr(0), pCsr+32) + if rc == SQLITE_OK { + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct = sqlite3Fts5StructureRef(tls, pIndex) + } + } + if rc == SQLITE_OK && eType == FTS5_VOCAB_INSTANCE { + rc = fts5VocabInstanceNewTerm(tls, pCsr) + } + if rc == SQLITE_OK && !((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof != 0) && + (eType != FTS5_VOCAB_INSTANCE || + (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail != FTS5_DETAIL_NONE) { + rc = fts5VocabNextMethod(tls, pCursor) + } + + return rc +} + +// This is the xEof method of the virtual table. SQLite calls this +// routine to find out if it has reached the end of a result set. +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ + var pCsr uintptr = pCursor + return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof +} + +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ + var pCsr uintptr = pCursor + var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail + var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType + var iVal I64 = int64(0) + + if iCol == 0 { + Xsqlite3_result_text(tls, + pCtx, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Fterm.Fp, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Fterm.Fn, libc.UintptrFromInt32(-1)) + } else if eType == FTS5_VOCAB_COL { + + if iCol == 1 { + if eDetail != FTS5_DETAIL_NONE { + var z uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FazCol + uintptr((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol)*8)) + Xsqlite3_result_text(tls, pCtx, z, -1, uintptr(0)) + } + } else if iCol == 2 { + iVal = *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc + uintptr((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol)*8)) + } else { + iVal = *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt + uintptr((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol)*8)) + } + } else if eType == FTS5_VOCAB_ROW { + + if iCol == 1 { + iVal = *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc)) + } else { + iVal = *(*I64)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt)) + } + } else { + + switch iCol { + case 1: + Xsqlite3_result_int64(tls, pCtx, (*Fts5IndexIter)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter)).FiRowid) + break + fallthrough + case 2: + { + var ii int32 = -1 + if eDetail == FTS5_DETAIL_FULL { + ii = int32((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiInstPos >> 32) + } else if eDetail == FTS5_DETAIL_COLUMNS { + ii = int32((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiInstPos) + } + if ii >= 0 && ii < (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FnCol { + var z uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FazCol + uintptr(ii)*8)) + Xsqlite3_result_text(tls, pCtx, z, -1, uintptr(0)) + } + break + + } + fallthrough + default: + { + + if eDetail == FTS5_DETAIL_FULL { + var ii int32 = int32((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiInstPos & int64(0x7FFFFFFF)) + Xsqlite3_result_int(tls, pCtx, ii) + } + break + + } + } + } + + if iVal > int64(0) { + Xsqlite3_result_int64(tls, pCtx, iVal) + } + return SQLITE_OK +} + +// This is the xRowid method. The SQLite core calls this routine to +// retrieve the rowid for the current row of the result set. The +// rowid should be written to *pRowid. +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ + var pCsr uintptr = pCursor + *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid + return SQLITE_OK +} + +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ + var p uintptr = pGlobal + + return Xsqlite3_create_module_v2(tls, db, ts+37450, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) +} + +var fts5Vocab = Sqlite3_module{ + /* iVersion */ FiVersion: 2, + /* xCreate */ FxCreate: 0, + /* xConnect */ FxConnect: 0, + /* xBestIndex */ FxBestIndex: 0, + /* xDisconnect */ FxDisconnect: 0, + /* xDestroy */ FxDestroy: 0, + /* xOpen */ FxOpen: 0, + /* xClose */ FxClose: 0, + /* xFilter */ FxFilter: 0, + /* xNext */ FxNext: 0, + /* xEof */ FxEof: 0, + /* xColumn */ FxColumn: 0, + /* xRowid */ FxRowid: 0, +} /* sqlite3.c:238981:31 */ + +//************* End of fts5.c *********************************************** +//************* Begin file stmt.c ******************************************* +// 2017-05-31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file demonstrates an eponymous virtual table that returns information +// about all prepared statements for the database connection. +// +// Usage example: +// +// .load ./stmt +// .mode line +// .header on +// SELECT * FROM stmt; + +//************* End of stmt.c *********************************************** +// Return the source-id for this library +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37460 /* "2022-03-12 13:37..." */ +} + +//************************* End of sqlite3.c ***************************** + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32, int32) int32 + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, int32) int32 + }{libc.Xaccess})) // sqlite3.c:35176:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Size_t) uintptr + }{libc.Xgetcwd})) // sqlite3.c:35179:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{libc.Xstat})) // sqlite3.c:35182:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, uintptr) int32 + }{libc.Xfstat})) // sqlite3.c:35195:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, X__off64_t) int32 + }{libc.Xftruncate})) // sqlite3.c:35199:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, int32, uintptr) int32 + }{libc.Xfcntl})) // sqlite3.c:35202:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t + }{libc.Xread})) // sqlite3.c:35205:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t + }{libc.Xwrite})) // sqlite3.c:35222:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, X__mode_t) int32 + }{libc.Xfchmod})) // sqlite3.c:35241:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{libc.Xunlink})) // sqlite3.c:35251:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{openDirectory})) // sqlite3.c:35254:25: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, X__mode_t) int32 + }{libc.Xmkdir})) // sqlite3.c:35257:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) int32 + }{libc.Xrmdir})) // sqlite3.c:35260:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32 + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr + }{libc.Xmmap})) // sqlite3.c:35278:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Size_t) int32 + }{libc.Xmunmap})) // sqlite3.c:35285:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 584 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr + }{libc.Xmremap})) // sqlite3.c:35292:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t + }{libc.Xreadlink})) // sqlite3.c:35306:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr) uintptr + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: +} + +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-11.2.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" +var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go index 854f4b22..22cee605 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -2141,7 +2141,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2248,8 +2248,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3738,7 +3738,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -5537,7 +5537,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -5562,7 +5562,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -5581,12 +5581,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -5615,7 +5615,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5723,7 +5723,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5829,7 +5829,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5935,7 +5935,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -6010,7 +6010,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -6075,7 +6075,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6100,7 +6100,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -6116,7 +6116,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -6139,7 +6139,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6313,7 +6313,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -6472,7 +6472,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -6489,12 +6489,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -6528,7 +6528,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6548,7 +6548,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -6568,7 +6568,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6612,7 +6612,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -6649,7 +6649,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -6669,13 +6669,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6705,7 +6705,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -6718,7 +6718,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -6739,13 +6739,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6755,13 +6755,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6963,7 +6963,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -7165,7 +7165,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7219,7 +7219,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -7251,22 +7251,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -7286,7 +7286,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -7300,7 +7300,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7921,7 +7921,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7929,7 +7929,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -9693,13 +9693,13 @@ type Max_align_t = struct { // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -9710,7 +9710,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -9733,12 +9733,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // The SQLITE_WITHIN(P,S,E) macro checks to see if pointer P points to // something between S (inclusive) and E (exclusive). @@ -9754,7 +9754,7 @@ type Uptr = U64 /* sqlite3.c:14289:15 */ // using C-preprocessor macros. If that is unsuccessful, or if // -DSQLITE_BYTEORDER=0 is set, then byte-order is determined // at run-time. -var Xsqlite3one int32 = 1 /* sqlite3.c:14335:13 */ +var Xsqlite3one int32 = 1 /* sqlite3.c:14339:13 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -9777,7 +9777,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -9919,13 +9919,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -9933,7 +9933,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -9945,7 +9945,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -9955,7 +9955,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -9969,7 +9969,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -9980,7 +9980,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -9991,7 +9991,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -10001,7 +10001,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -10011,9 +10011,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -10028,7 +10028,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr uint8 @@ -10048,7 +10048,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -10070,7 +10070,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -10087,17 +10087,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -10112,17 +10112,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -10153,7 +10153,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -10163,7 +10163,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -10176,7 +10176,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -10195,10 +10195,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -10209,7 +10209,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -10220,9 +10220,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -10304,14 +10304,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -10330,21 +10330,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -10354,9 +10354,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -10367,9 +10367,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -10377,7 +10377,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -10402,14 +10402,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -10420,9 +10420,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -10448,15 +10448,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -10486,7 +10486,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -10495,14 +10495,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -10518,7 +10518,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -10528,7 +10528,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -10546,7 +10546,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -10559,7 +10559,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -10577,7 +10577,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -10591,7 +10591,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -10600,7 +10600,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -10610,9 +10610,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -10641,9 +10641,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -10677,7 +10677,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -10685,14 +10685,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -10703,7 +10703,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -10730,7 +10730,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -10801,7 +10801,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -10819,7 +10819,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -10890,7 +10890,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -10915,7 +10915,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -10954,7 +10954,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -10965,9 +10965,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -11071,11 +11071,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -11087,7 +11087,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -11115,7 +11115,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -11124,11 +11124,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -11193,7 +11193,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -11211,10 +11211,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -11290,7 +11290,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -11341,7 +11341,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -11435,7 +11435,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -11448,7 +11448,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -11513,7 +11513,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11536,7 +11536,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11558,7 +11558,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11584,7 +11584,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11608,7 +11608,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11634,7 +11634,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -11658,7 +11658,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -11786,9 +11786,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1039, ts + 1053, ts + 1066, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -11855,10 +11855,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -11922,7 +11922,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -11982,12 +11982,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -12005,21 +12005,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -12035,7 +12035,7 @@ var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 1079)) /* sqlite3.c:219 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_NUMERIC), uint8(SQLITE_AFF_BLOB), @@ -12043,7 +12043,7 @@ var Xsqlite3StdTypeAffinity = [6]uint8{ uint8(SQLITE_AFF_INTEGER), uint8(SQLITE_AFF_REAL), uint8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]uint8{ uint8(0), uint8(SQLITE_BLOB), @@ -12051,7 +12051,7 @@ var Xsqlite3StdTypeMap = [6]uint8{ uint8(SQLITE_INTEGER), uint8(SQLITE_FLOAT), uint8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1086, ts + 1090, @@ -12059,7 +12059,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1099, ts + 1107, ts + 1112, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -12104,10 +12104,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -12130,10 +12130,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -12145,7 +12145,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -12199,7 +12199,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -12264,7 +12264,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -12278,7 +12278,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -12290,13 +12290,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12307,7 +12307,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]uint8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12315,7 +12315,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12330,7 +12330,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -12342,20 +12342,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -12370,7 +12370,7 @@ var statMutex = [10]uint8{ uint8(1), // SQLITE_STATUS_PAGECACHE_SIZE uint8(0), // SQLITE_STATUS_SCRATCH_SIZE uint8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -12380,7 +12380,7 @@ var statMutex = [10]uint8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -12394,7 +12394,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -12402,14 +12402,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -12420,12 +12420,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -12443,7 +12443,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -12459,7 +12459,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -12469,7 +12469,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -12481,7 +12481,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -13067,14 +13067,14 @@ type DateTime1 = struct { FtzSet uint8 FisError uint8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -13101,7 +13101,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -13158,7 +13158,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -13174,7 +13174,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -13248,7 +13248,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13301,7 +13301,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = uint8(1) } @@ -13310,7 +13310,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -13366,7 +13366,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13417,7 +13417,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1) @@ -13432,7 +13432,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(1) if r >= 0.0 && r < 5373484.5 { @@ -13455,7 +13455,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13484,12 +13484,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -13534,7 +13534,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -13553,13 +13553,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0) @@ -13589,7 +13589,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -13614,7 +13614,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -13654,7 +13654,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0) @@ -13682,7 +13682,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1197 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1204 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]uint8)(unsafe.Pointer(ts + 1211 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -13706,7 +13706,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -14032,7 +14032,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -14073,7 +14073,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14089,7 +14089,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -14104,7 +14104,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -14153,7 +14153,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14181,7 +14181,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -14233,7 +14233,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -14377,7 +14377,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -14386,7 +14386,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -14395,7 +14395,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -14404,7 +14404,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -14417,7 +14417,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1343}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1352}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1365}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1383}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -14469,7 +14469,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -14478,27 +14478,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -14508,27 +14508,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -14541,7 +14541,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -14550,7 +14550,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14558,7 +14558,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -14570,7 +14570,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -14579,23 +14579,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -14603,14 +14603,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -14618,7 +14618,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -14632,7 +14632,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -14642,14 +14642,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*uint8)(unsafe.Pointer(zPathOut)) = uint8(0) return (*struct { @@ -14657,7 +14657,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -14665,25 +14665,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -14700,13 +14700,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14715,7 +14715,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14740,7 +14740,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -14760,7 +14760,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -14770,7 +14770,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -14780,11 +14780,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -14806,7 +14806,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -14826,7 +14826,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14849,7 +14849,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14894,7 +14894,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -14925,8 +14925,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -14936,7 +14936,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -14945,14 +14945,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -15050,7 +15050,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15073,7 +15073,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -15082,7 +15082,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -15098,7 +15098,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15120,18 +15120,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -15140,7 +15140,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15155,7 +15155,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -15289,7 +15289,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -15323,7 +15323,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -15333,7 +15333,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15346,7 +15346,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -15357,7 +15357,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -15366,7 +15366,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -15375,7 +15375,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -15390,7 +15390,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -15429,40 +15429,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -15475,11 +15475,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -15542,7 +15542,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -15555,22 +15555,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -15586,7 +15586,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -15614,7 +15614,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -15631,7 +15631,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -15650,7 +15650,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -15673,12 +15673,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+24, 0) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -15686,7 +15686,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15701,7 +15701,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15714,7 +15714,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -15725,7 +15725,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -15772,7 +15772,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -15801,7 +15801,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15811,7 +15811,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15819,27 +15819,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -15858,7 +15858,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -15869,7 +15869,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -15887,14 +15887,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -15920,7 +15920,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -15928,7 +15928,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -15989,7 +15989,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15999,7 +15999,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -16007,7 +16007,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -16017,7 +16017,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -16029,7 +16029,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -16060,7 +16060,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16070,7 +16070,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -16108,7 +16108,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -16128,7 +16128,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -16152,7 +16152,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -16166,7 +16166,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -16180,7 +16180,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -16198,7 +16198,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -16211,7 +16211,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -16227,7 +16227,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -16248,7 +16248,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+432, int32(0), 0) @@ -16264,7 +16264,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -16283,7 +16283,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -16312,7 +16312,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -16323,18 +16323,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 1484)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 1517)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: uint8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: uint8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -16361,7 +16361,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: uint8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: uint8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: uint8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -16372,7 +16372,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -16387,7 +16387,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -16402,7 +16402,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:2 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -16414,21 +16414,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -16442,7 +16442,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -16464,7 +16464,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -17953,7 +17953,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29902:29 */ // End of function @@ -17961,7 +17961,7 @@ var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 1561)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -17988,7 +17988,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -18003,7 +18003,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -18057,7 +18057,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -18073,7 +18073,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sq // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) @@ -18083,7 +18083,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -18095,14 +18095,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -18116,7 +18116,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*uint8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = uint8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -18128,7 +18128,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -18146,10 +18146,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -18161,7 +18161,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -18169,7 +18169,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -18177,7 +18177,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -18186,7 +18186,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -18208,7 +18208,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -18219,7 +18219,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -18237,7 +18237,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -18259,7 +18259,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -18271,7 +18271,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -18291,7 +18291,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -18315,7 +18315,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -18330,7 +18330,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -18352,7 +18352,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -18370,7 +18370,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -18382,7 +18382,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -18437,7 +18437,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -18481,10 +18481,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -18563,16 +18563,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -18580,7 +18580,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -18602,7 +18602,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -18671,7 +18671,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -18698,7 +18698,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -18725,7 +18725,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -19050,7 +19050,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -19084,7 +19084,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -19116,7 +19116,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -19137,7 +19137,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -19497,7 +19497,7 @@ type Double_t = float64 /* math.h:153:16 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -19509,7 +19509,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19529,7 +19529,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -19541,7 +19541,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { @@ -19556,7 +19556,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -19566,7 +19566,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -19578,7 +19578,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -19589,7 +19589,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -19609,7 +19609,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -19636,7 +19636,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -19667,7 +19667,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -19692,7 +19692,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote uint8 var i int32 var j int32 @@ -19724,7 +19724,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*uint8)(unsafe.Pointer(z + uintptr(j))) = uint8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -19744,7 +19744,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -19762,7 +19762,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -19777,7 +19777,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -19789,7 +19789,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -19815,7 +19815,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -19839,7 +19839,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -19855,7 +19855,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -19898,7 +19898,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -20278,7 +20278,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -20319,7 +20319,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -20348,7 +20348,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -20470,7 +20470,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20503,7 +20503,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20565,7 +20565,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20578,7 +20578,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -20621,7 +20621,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -20667,7 +20667,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -20690,7 +20690,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -20843,7 +20843,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20911,7 +20911,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -20919,12 +20919,12 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ return uint32(*(*U8)(unsafe.Pointer(p)))<<24 | uint32(int32(*(*U8)(unsafe.Pointer(p + 1)))<<16) | uint32(int32(*(*U8)(unsafe.Pointer(p + 2)))<<8) | uint32(*(*U8)(unsafe.Pointer(p + 3))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ *(*uint8)(unsafe.Pointer(p)) = U8(v >> 24) *(*uint8)(unsafe.Pointer(p + 1)) = U8(v >> 16) *(*uint8)(unsafe.Pointer(p + 2)) = U8(v >> 8) @@ -20934,7 +20934,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -20944,7 +20944,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -20962,7 +20962,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20983,7 +20983,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1535) @@ -21002,7 +21002,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -21019,21 +21019,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023: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:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043: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:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -21047,7 +21047,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -21078,11 +21078,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -21100,11 +21100,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -21125,7 +21125,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -21177,7 +21177,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -21216,7 +21216,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21235,7 +21235,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -21274,7 +21274,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -21285,7 +21285,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -21302,7 +21302,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -21317,7 +21317,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -21354,7 +21354,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -21398,7 +21398,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -21427,11 +21427,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -21460,7 +21460,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -21478,7 +21478,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -21527,7 +21527,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -21717,7 +21717,7 @@ var azName = [185]uintptr{ ts + 3189, ts + 3194, ts + 3202, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -23315,7 +23315,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -23348,7 +23348,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -23364,10 +23364,10 @@ type unixShmNode = struct { F__ccgo_pad2 [4]byte FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -23385,18 +23385,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -23422,16 +23422,16 @@ type unixFile = struct { FpMapRegion uintptr FsectorSize int32 FdeviceCharacteristics int32 -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -23456,7 +23456,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -23471,7 +23471,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -23539,14 +23539,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3410, FpCurrent: 0}, {FzName: ts + 3416}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { return 0 } @@ -23557,7 +23557,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -23594,7 +23594,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -23610,7 +23610,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -23648,7 +23648,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -23715,14 +23715,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -23732,7 +23732,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, int64(sz)) @@ -23748,7 +23748,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -23797,7 +23797,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -23898,12 +23898,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -23921,7 +23921,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -23955,7 +23955,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3217, func() uintptr { @@ -23969,19 +23969,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -23991,7 +23991,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -24025,7 +24025,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -24084,7 +24084,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -24101,7 +24101,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -24137,7 +24137,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -24203,7 +24203,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -24255,7 +24255,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24502,7 +24502,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -24523,7 +24523,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -24657,7 +24657,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -24670,11 +24670,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -24684,7 +24684,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -24734,26 +24734,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -24794,7 +24794,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -24830,7 +24830,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -24872,7 +24872,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -24907,7 +24907,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -25006,7 +25006,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -25044,7 +25044,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -25099,7 +25099,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -25125,13 +25125,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -25188,7 +25188,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -25234,7 +25234,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -25261,7 +25261,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3329, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3329, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -25277,7 +25277,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -25296,7 +25296,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3617, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -25308,7 +25308,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -25319,7 +25319,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -25334,7 +25334,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { // If the file was just truncated to a size smaller than the currently @@ -25350,7 +25350,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -25381,7 +25381,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -25426,7 +25426,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38696) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3248, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38705) } } @@ -25441,7 +25441,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -25452,7 +25452,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25563,7 +25563,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -25584,7 +25584,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -25601,7 +25601,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -25611,7 +25611,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -25623,7 +25623,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25655,7 +25655,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25696,7 +25696,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size // Page size must be a power of 2 @@ -25710,7 +25710,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -25727,7 +25727,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -25742,7 +25742,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -25786,7 +25786,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3248, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -25833,7 +25833,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -25929,7 +25929,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3212, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3212, zShm, 39446) goto shm_open_err __10: ; @@ -25997,7 +25997,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -26100,7 +26100,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3283, zFile, 39590) goto shmpage_out __14: ; @@ -26148,7 +26148,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3370, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -26206,7 +26206,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -26220,7 +26220,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -26327,7 +26327,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -26340,7 +26340,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -26383,7 +26383,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39895:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -26406,7 +26406,7 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39886:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13: */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39920:13: */ var zErr uintptr = ts + 3370 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping @@ -26440,7 +26440,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39976) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39985) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -26465,7 +26465,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39911:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40003:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:40012:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26502,7 +26502,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:4000 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -26529,7 +26529,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -26590,33 +26590,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -26629,7 +26629,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -26639,7 +26639,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26696,7 +26696,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -26719,7 +26719,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -26737,17 +26737,17 @@ var azTempDirs = [6]uintptr{ ts + 3680, ts + 3689, ts + 1547, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3694) azTempDirs[1] = libc.Xgetenv(tls, ts+3708) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26774,7 +26774,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -26818,7 +26818,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26869,7 +26869,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -26905,7 +26905,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -26979,7 +26979,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(528) defer tls.Free(528) @@ -27177,7 +27177,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3212, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3212, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -27277,7 +27277,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27288,7 +27288,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3322, zPath, 41141) } return rc } @@ -27298,9 +27298,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3739, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -27317,7 +27317,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -27339,7 +27339,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -27362,7 +27362,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -27373,7 +27373,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3230, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3230, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = uint8('/') @@ -27382,7 +27382,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*uint8)(unsafe.Pointer(zOut + uintptr(iOff))) = uint8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3614, libc.VaList(bp, zPath)) @@ -27433,7 +27433,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -27459,7 +27459,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3410, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3410, zIn, 41322) } } else { bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000)) @@ -27473,20 +27473,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3401, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3401, zIn, 41340) } else { if int32(*(*uint8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint64(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint64(n)) @@ -27558,7 +27558,7 @@ type Dl_serinfo = struct { } } /* dlfcn.h:196:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -27568,7 +27568,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27582,7 +27582,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -27608,13 +27608,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27649,7 +27649,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -27662,7 +27662,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -27685,7 +27685,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -27699,12 +27699,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27720,7 +27720,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -27902,7 +27902,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -27940,14 +27940,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3763, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3773, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3653, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -27989,15 +27989,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -28011,9 +28011,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -28023,13 +28023,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -28046,7 +28046,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -28062,21 +28062,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -28114,7 +28114,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -28131,7 +28131,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -28153,7 +28153,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -28184,7 +28184,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -28199,14 +28199,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -28215,7 +28215,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -28259,7 +28259,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28288,13 +28288,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -28308,7 +28308,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -28319,7 +28319,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -28394,7 +28394,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -28405,7 +28405,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28415,7 +28415,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -28424,21 +28424,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -28446,7 +28446,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -28454,19 +28454,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -28474,7 +28474,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28497,7 +28497,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -28588,7 +28588,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28683,7 +28683,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -28705,7 +28705,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -28718,7 +28718,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -28747,7 +28747,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -28761,7 +28761,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -28898,7 +28898,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -28937,7 +28937,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -28952,7 +28952,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -28989,7 +28989,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -29152,7 +29152,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -29214,7 +29214,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -29226,7 +29226,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -29251,7 +29251,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -29264,7 +29264,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -29272,7 +29272,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -29286,7 +29286,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -29303,7 +29303,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -29350,7 +29350,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -29378,7 +29378,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -29429,7 +29429,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29449,7 +29449,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -29465,7 +29465,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -29478,7 +29478,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -29487,7 +29487,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -29500,7 +29500,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -29515,7 +29515,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -29527,7 +29527,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -29536,7 +29536,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -29546,7 +29546,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -29555,7 +29555,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -29574,7 +29574,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -29608,19 +29608,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -29659,7 +29659,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -29702,7 +29702,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -29714,17 +29714,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -29732,7 +29732,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -29744,7 +29744,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -29761,20 +29761,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -29889,7 +29889,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -29975,7 +29975,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -29985,12 +29985,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -29998,9 +29998,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -30017,10 +30017,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -30038,7 +30038,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -30071,7 +30071,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -30116,7 +30116,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -30149,7 +30149,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -30179,7 +30179,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -30193,7 +30193,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -30231,7 +30231,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -30248,13 +30248,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -30272,7 +30272,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -30288,7 +30288,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -30329,7 +30329,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -30346,7 +30346,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -30364,7 +30364,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -30385,7 +30385,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -30433,7 +30433,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -30471,7 +30471,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -30480,7 +30480,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -30530,7 +30530,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -30553,7 +30553,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30568,7 +30568,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -30583,7 +30583,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -30701,7 +30701,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -30730,7 +30730,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -30741,7 +30741,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -30755,7 +30755,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30780,7 +30780,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -30811,7 +30811,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -30824,7 +30824,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30847,7 +30847,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30867,16 +30867,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -30887,7 +30887,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -30985,7 +30985,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -30998,13 +30998,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -31024,7 +31024,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -31043,7 +31043,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -31054,7 +31054,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -31077,7 +31077,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -31107,7 +31107,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -31142,7 +31142,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -31178,7 +31178,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31209,7 +31209,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -31240,7 +31240,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -31273,7 +31273,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -31306,7 +31306,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -31491,7 +31491,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -32260,7 +32260,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -32293,11 +32293,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -32320,7 +32320,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -32342,7 +32342,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32359,7 +32359,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32376,7 +32376,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -32403,7 +32403,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -32437,7 +32437,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -32471,7 +32471,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -32530,7 +32530,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -32559,7 +32559,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32594,7 +32594,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -32609,7 +32609,7 @@ var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -32719,7 +32719,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32829,7 +32829,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32889,21 +32889,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -32920,7 +32920,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -32949,7 +32949,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -33041,7 +33041,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -33066,7 +33066,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -33130,7 +33130,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -33257,7 +33257,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -33289,7 +33289,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -33334,7 +33334,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -33568,7 +33568,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33734,7 +33734,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33769,7 +33769,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -33801,7 +33801,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -33869,7 +33869,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -34004,39 +34004,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -34045,25 +34051,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -34072,10 +34078,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -34093,7 +34099,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -34102,24 +34108,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*uint8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -34127,14 +34133,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3845, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -34154,7 +34160,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34208,7 +34214,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -34235,7 +34241,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -34266,7 +34272,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -34297,7 +34303,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -34345,7 +34351,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34376,7 +34382,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34430,7 +34436,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34498,7 +34504,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -34607,18 +34613,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34634,13 +34640,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -34693,7 +34699,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -34757,7 +34763,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -34785,7 +34791,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -34822,7 +34828,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34891,7 +34897,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -34900,7 +34906,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -34931,7 +34937,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint64(N)) @@ -34954,7 +34960,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -34971,7 +34977,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -35016,7 +35022,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -35043,7 +35049,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -35062,7 +35068,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -35092,7 +35098,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -35102,7 +35108,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -35115,7 +35121,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35153,7 +35159,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -35202,7 +35208,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -35239,7 +35245,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -35353,7 +35359,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -35385,7 +35391,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -35465,7 +35471,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -35489,7 +35495,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -35520,7 +35526,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -35546,7 +35552,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -35608,7 +35614,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -35655,7 +35661,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -35781,7 +35787,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -36100,7 +36106,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -36138,7 +36144,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -36249,7 +36255,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -36375,7 +36381,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -36524,7 +36530,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -36586,7 +36592,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -36599,7 +36605,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -36645,7 +36651,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -36717,7 +36723,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -36737,7 +36743,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -36775,7 +36781,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -36784,7 +36790,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -36800,7 +36806,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -36821,7 +36827,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -36833,13 +36839,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -36868,7 +36874,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -36950,7 +36956,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -37010,7 +37016,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -37060,7 +37066,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -37134,7 +37140,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37222,7 +37228,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -37263,7 +37269,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -37293,7 +37299,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37363,7 +37369,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -37386,7 +37392,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -37422,7 +37428,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37612,7 +37618,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -37669,7 +37675,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -37713,13 +37719,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -37728,7 +37734,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -37741,7 +37747,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -37751,7 +37757,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -37763,7 +37769,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -37803,7 +37809,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -37841,7 +37847,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -37902,30 +37908,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -37933,7 +37939,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -37960,7 +37966,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -38022,7 +38028,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -38082,21 +38088,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -38108,7 +38114,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -38134,7 +38140,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -38204,14 +38210,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -38226,7 +38232,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -38238,12 +38244,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -38255,7 +38261,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -38283,13 +38289,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -38299,7 +38305,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -38316,7 +38322,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -38352,7 +38358,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -38382,7 +38388,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -38422,7 +38428,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -38433,7 +38439,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38445,7 +38451,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -38465,7 +38471,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -38477,7 +38483,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -39056,7 +39062,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -39068,18 +39074,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -39087,7 +39093,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -39109,7 +39115,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -39140,7 +39146,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -39186,7 +39192,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -39194,13 +39200,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -39218,7 +39224,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -39250,7 +39256,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -39265,7 +39271,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -39289,7 +39295,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -39312,7 +39318,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -39354,7 +39360,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39365,7 +39371,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39374,7 +39380,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -39385,7 +39391,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -39397,12 +39403,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -39414,12 +39420,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -39433,7 +39439,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -39456,14 +39462,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -39481,7 +39487,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -39524,7 +39530,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -39565,7 +39571,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -39584,7 +39590,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -39699,7 +39705,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -39903,7 +39909,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -39929,7 +39935,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40001,7 +40007,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -40015,7 +40021,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -40062,7 +40068,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -40108,7 +40114,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -40154,10 +40160,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -40172,7 +40178,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -40256,7 +40262,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -40268,7 +40274,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -40287,7 +40293,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -40338,7 +40344,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -40469,7 +40475,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -40630,7 +40636,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40649,7 +40655,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40721,7 +40727,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -40790,7 +40796,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40870,7 +40876,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -40915,7 +40921,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -41181,7 +41187,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -41398,7 +41404,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -41472,7 +41478,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -41560,7 +41566,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -41574,7 +41580,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41641,7 +41647,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -41657,7 +41663,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -41674,7 +41680,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -41692,7 +41698,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -41724,7 +41730,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -41744,7 +41750,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -41781,7 +41787,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -41793,7 +41799,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -41824,7 +41830,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41878,12 +41884,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -41891,7 +41897,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -41913,7 +41919,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41938,7 +41944,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41992,7 +41998,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -42225,7 +42231,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -42290,7 +42296,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -42334,7 +42340,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -42365,7 +42371,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -42399,14 +42405,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -42425,16 +42431,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -42464,7 +42470,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -42480,13 +42486,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -43007,7 +43013,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -43016,7 +43022,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -43025,7 +43031,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -43135,7 +43141,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -43231,7 +43237,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -43245,7 +43251,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -43254,7 +43260,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -43275,7 +43281,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -43303,7 +43309,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -43334,7 +43340,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -43357,7 +43363,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -43372,13 +43378,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -43390,7 +43396,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -43401,11 +43407,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -43428,7 +43434,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -43454,14 +43460,14 @@ var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3984)) /* sqlite3.c:66152:1 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -43478,7 +43484,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -43535,7 +43541,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -43586,7 +43592,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -43621,7 +43627,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -43645,7 +43651,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43664,7 +43670,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -43711,7 +43717,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -43731,20 +43737,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -43766,7 +43772,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -43803,7 +43809,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -43844,7 +43850,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43865,7 +43871,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -43884,7 +43890,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -43894,7 +43900,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -43907,7 +43913,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -43924,7 +43930,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43964,7 +43970,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -43972,12 +43978,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -43990,7 +43996,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -44012,7 +44018,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -44024,7 +44030,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -44049,7 +44055,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44072,7 +44078,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -44091,7 +44097,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -44099,7 +44105,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -44130,7 +44136,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44151,7 +44157,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -44161,7 +44167,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -44179,7 +44185,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -44206,7 +44212,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -44236,7 +44242,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -44246,7 +44252,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44323,7 +44329,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -44354,7 +44360,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell) + 1))))), pInfo) @@ -44370,7 +44376,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -44411,7 +44417,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -44428,7 +44434,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -44445,7 +44451,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -44463,7 +44469,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -44508,7 +44514,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -44518,7 +44524,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -44531,7 +44537,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -44540,14 +44546,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -44557,7 +44563,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -44619,7 +44625,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -44630,7 +44636,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -44665,7 +44671,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -44690,7 +44696,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -44719,7 +44725,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -44734,14 +44740,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -44757,7 +44763,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44782,7 +44788,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -44797,7 +44803,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -44848,7 +44854,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -44872,12 +44878,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -44888,11 +44894,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -44905,7 +44911,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -44913,7 +44919,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -44923,10 +44929,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -44960,7 +44966,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -45011,7 +45017,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -45019,7 +45025,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -45051,12 +45057,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -45068,11 +45074,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -45083,7 +45089,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -45091,7 +45097,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -45113,14 +45119,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -45133,7 +45139,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -45142,21 +45148,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -45174,7 +45180,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -45197,7 +45203,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -45209,7 +45215,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -45236,7 +45242,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45254,7 +45260,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -45266,11 +45272,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -45286,7 +45292,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45296,7 +45302,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -45327,7 +45333,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -45351,18 +45357,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -45374,13 +45380,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -45395,7 +45401,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -45415,7 +45421,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -45440,7 +45446,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -45861,7 +45867,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -45893,7 +45899,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -45926,7 +45932,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -45935,7 +45941,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -45985,7 +45991,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46002,7 +46008,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -46014,7 +46020,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46029,7 +46035,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -46056,7 +46062,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46090,7 +46096,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -46103,7 +46109,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -46117,7 +46123,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -46133,7 +46139,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -46157,7 +46163,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -46177,7 +46183,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -46210,7 +46216,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -46235,7 +46241,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46404,7 +46410,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -46481,7 +46487,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -46494,7 +46500,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -46534,7 +46540,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -46576,7 +46582,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -46840,7 +46846,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46892,14 +46898,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -46927,7 +46933,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -46944,7 +46950,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -46959,7 +46965,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -46970,7 +46976,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -47040,7 +47046,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -47062,7 +47068,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -47137,7 +47143,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -47161,7 +47167,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47175,7 +47181,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -47196,7 +47202,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -47219,7 +47225,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -47250,7 +47256,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -47300,7 +47306,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47323,7 +47329,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -47379,7 +47385,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -47408,7 +47414,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -47443,7 +47449,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -47472,7 +47478,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47494,7 +47500,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47560,7 +47566,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -47584,7 +47590,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47652,7 +47658,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -47665,7 +47671,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -47703,7 +47709,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -47711,7 +47717,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -47726,7 +47732,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -47736,13 +47742,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -47783,7 +47789,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -47792,7 +47798,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -47801,26 +47807,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -47833,7 +47839,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -47850,7 +47856,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -47872,7 +47878,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47940,7 +47946,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -47982,7 +47988,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47993,7 +47999,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -48004,7 +48010,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -48061,7 +48067,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -48121,7 +48127,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -48141,7 +48147,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -48149,7 +48155,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -48162,7 +48168,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -48189,7 +48195,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -48220,7 +48226,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -48231,11 +48237,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -48252,7 +48258,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -48282,7 +48288,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -48361,7 +48367,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -48382,7 +48388,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -48404,7 +48410,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -48425,7 +48431,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -48446,7 +48452,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -48465,7 +48471,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -48514,7 +48520,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48629,7 +48635,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -48758,7 +48764,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -48862,7 +48868,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -48911,7 +48917,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -48978,7 +48984,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -48988,7 +48994,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -49027,7 +49033,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -49064,7 +49070,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -49097,7 +49103,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -49137,7 +49143,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -49191,7 +49197,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -49225,7 +49231,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -49292,7 +49298,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -49373,7 +49379,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -49415,7 +49421,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -49460,7 +49466,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -49574,7 +49580,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -49749,7 +49755,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -49770,7 +49776,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -49840,7 +49846,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -49857,7 +49863,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -49938,14 +49944,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -49957,7 +49963,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -49972,7 +49978,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -49992,7 +49998,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -50024,7 +50030,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -50206,7 +50212,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -50224,7 +50230,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -50260,7 +50266,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50421,7 +50427,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -50498,11 +50504,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -50519,7 +50525,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -50527,7 +50533,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -50546,7 +50552,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -50577,12 +50583,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -50590,7 +50596,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -50640,7 +50646,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50678,7 +50684,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -50705,7 +50711,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -50757,7 +50763,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -50791,7 +50797,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -50931,7 +50937,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -50944,7 +50950,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -51042,7 +51048,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -51122,7 +51128,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -51424,7 +51430,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -51452,7 +51458,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -51631,7 +51637,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -51705,7 +51711,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -51778,7 +51784,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -51815,7 +51821,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -51899,7 +51905,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -52152,7 +52158,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -52374,7 +52380,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52425,13 +52431,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -52445,7 +52451,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -52564,7 +52570,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -52606,7 +52612,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52620,7 +52626,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -52644,7 +52650,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -52691,7 +52697,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -52763,7 +52769,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -52891,7 +52897,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -52954,7 +52960,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -53002,13 +53008,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) @@ -53116,7 +53122,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53143,7 +53149,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -53166,7 +53172,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -53248,7 +53254,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53276,11 +53282,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -53389,7 +53395,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -53466,7 +53472,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -53496,7 +53502,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -53539,7 +53545,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -53602,7 +53608,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -53612,7 +53618,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -53628,7 +53634,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -53642,7 +53648,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -53746,7 +53752,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53769,7 +53775,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -53791,7 +53797,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -53801,7 +53807,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -53873,7 +53879,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -53899,7 +53905,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53918,7 +53924,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -53944,7 +53950,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -54007,12 +54013,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54039,13 +54045,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -54056,7 +54062,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54078,7 +54084,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -54105,7 +54111,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -54189,7 +54195,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -54201,7 +54207,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -54240,7 +54246,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -54629,7 +54635,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -54863,7 +54869,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -54874,14 +54880,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -54895,7 +54901,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -54911,7 +54917,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -54934,7 +54940,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -54948,7 +54954,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -54961,7 +54967,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -54985,7 +54991,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -55025,7 +55031,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -55033,7 +55039,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -55065,29 +55071,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -55127,7 +55133,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -55159,7 +55165,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -55169,7 +55175,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4805, 0) return SQLITE_ERROR @@ -55183,7 +55189,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -55243,14 +55249,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55312,7 +55318,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55327,7 +55333,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -55337,7 +55343,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -55575,7 +55581,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -55633,13 +55639,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -55653,7 +55659,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -55674,7 +55680,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -55689,7 +55695,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -55703,7 +55709,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -55797,7 +55803,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -55835,7 +55841,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -55855,7 +55861,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -55911,7 +55917,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -55929,7 +55935,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -55944,7 +55950,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -55969,7 +55975,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -55991,7 +55997,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -56013,7 +56019,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -56039,7 +56045,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -56069,7 +56075,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -56091,7 +56097,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -56110,7 +56116,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -56129,7 +56135,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -56139,7 +56145,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -56151,8 +56157,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -56163,7 +56169,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56172,7 +56178,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -56193,7 +56199,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56203,7 +56209,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -56221,7 +56227,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -56234,7 +56240,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -56255,7 +56261,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -56264,7 +56270,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -56279,7 +56285,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -56296,7 +56302,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56323,7 +56329,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -56377,7 +56383,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -56394,7 +56400,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -56402,13 +56408,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -56423,7 +56429,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -56431,7 +56437,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -56441,14 +56447,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -56468,7 +56475,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -56481,7 +56488,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -56498,7 +56505,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -56514,13 +56521,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -56536,7 +56543,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -56558,7 +56565,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) @@ -56579,7 +56586,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -56692,11 +56699,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -56711,7 +56718,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56736,7 +56743,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -56781,7 +56788,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -56797,7 +56804,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -56814,7 +56821,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -56825,7 +56832,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -56881,7 +56888,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -57027,7 +57034,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -57275,7 +57282,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -57298,7 +57305,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57366,7 +57373,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -57411,7 +57418,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -57421,7 +57428,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57442,7 +57449,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -57457,14 +57464,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -57480,7 +57487,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -57495,14 +57502,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -57513,14 +57520,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -57540,7 +57547,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -57564,12 +57571,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -57579,7 +57586,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -57592,7 +57599,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -57623,7 +57630,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -57676,7 +57683,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -57685,7 +57692,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -57708,26 +57715,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -57740,7 +57747,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -57788,7 +57795,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -57802,7 +57809,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -57834,7 +57841,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) @@ -57844,7 +57851,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -57860,7 +57867,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -57884,7 +57891,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -57895,7 +57902,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -57906,7 +57913,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -57917,7 +57924,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -57952,14 +57959,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) @@ -57971,7 +57978,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -57984,12 +57991,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 10, 0x400) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 10, 0x400) } @@ -58012,7 +58019,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -58141,7 +58148,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -58172,7 +58179,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -58188,7 +58195,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -58232,23 +58239,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -58257,7 +58264,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -58272,7 +58279,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -58283,26 +58290,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -58363,7 +58370,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -58378,18 +58385,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -58405,7 +58412,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -58429,7 +58436,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -58446,7 +58453,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -58493,7 +58500,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -58509,7 +58516,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -58530,7 +58537,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -58544,11 +58551,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -58711,7 +58718,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -58719,7 +58726,7 @@ var encnames = [4]uintptr{ts + 4959, ts + 4961, ts + 4963, ts + 4968} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -58746,7 +58753,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -58765,7 +58772,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -58780,7 +58787,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -58788,7 +58795,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -58798,7 +58805,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -58842,7 +58849,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -58854,7 +58861,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -58953,7 +58960,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -58982,7 +58989,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -59071,7 +59078,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -59086,7 +59093,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -59103,7 +59110,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -59136,7 +59143,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -59245,11 +59252,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4973, ts + 4978, ts + 4985, ts + 4988, ts + 4991, ts + 4994, ts + 4997, ts + 5000, ts + 5008, ts + 5011, ts + 5018, ts + 5026, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -59283,7 +59290,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -59299,7 +59306,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -59323,7 +59330,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -59354,7 +59361,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59379,7 +59386,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -59398,7 +59405,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -59626,7 +59633,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -59644,7 +59651,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -59687,7 +59694,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -59702,7 +59709,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -59725,7 +59732,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59929,7 +59936,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -59939,7 +59946,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -59968,7 +59975,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60020,7 +60027,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -60044,7 +60051,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -60069,7 +60076,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -60090,7 +60097,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -60113,7 +60120,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60126,7 +60133,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -60138,7 +60145,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60156,7 +60163,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -60175,7 +60182,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -60250,10 +60257,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -60263,7 +60270,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -60312,7 +60319,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60363,7 +60370,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60390,7 +60397,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -60493,7 +60500,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -60507,7 +60514,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -60525,7 +60532,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60586,7 +60593,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -60629,7 +60636,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -60642,7 +60649,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -60682,7 +60689,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -60728,7 +60735,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -60822,7 +60829,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -60885,7 +60892,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -60927,7 +60934,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -60992,7 +60999,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -61027,7 +61034,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -61088,7 +61095,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -61099,7 +61106,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61204,7 +61211,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -61228,7 +61235,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -61266,7 +61273,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -61320,7 +61327,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -61405,7 +61412,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -61417,7 +61424,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -61433,7 +61440,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -61447,7 +61454,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -61455,7 +61462,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 11, 0x800) } @@ -61475,7 +61482,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 14, 0xc000) @@ -61483,12 +61490,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -61498,7 +61505,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -61518,7 +61525,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -61534,7 +61541,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61565,7 +61572,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -61581,7 +61588,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -61598,7 +61605,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -61650,7 +61657,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -61676,7 +61683,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc000>>14)) != 0) } @@ -61684,7 +61691,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5200, 0) return 1 @@ -61694,7 +61701,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5245, 0) return 1 @@ -61706,7 +61713,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61739,7 +61746,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -61749,7 +61756,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -61769,7 +61776,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -61791,7 +61798,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -61813,7 +61820,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -61836,11 +61843,11 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, func() uint8 { if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { return uint8(SQLITE_UTF16BE) @@ -61849,19 +61856,19 @@ func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85 }()) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -61871,7 +61878,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -61884,11 +61891,11 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, func() uint8 { if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { return uint8(SQLITE_UTF16BE) @@ -61897,18 +61904,18 @@ func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:8 }()) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -61977,20 +61984,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -62016,7 +62023,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -62031,7 +62038,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -62045,7 +62052,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -62058,12 +62065,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -62072,18 +62079,18 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), func() uint8 { @@ -62094,22 +62101,22 @@ func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { }(), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -62117,19 +62124,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = func() uint8 { @@ -62146,7 +62153,7 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, func() uint8 { if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { @@ -62156,27 +62163,27 @@ func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDe }(), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -62186,7 +62193,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -62200,7 +62207,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5285, int64(-1), @@ -62208,7 +62215,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -62218,7 +62225,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -62228,7 +62235,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -62255,7 +62262,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -62422,14 +62429,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -62469,7 +62476,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -62482,7 +62489,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -62499,14 +62506,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -62564,13 +62571,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -62579,7 +62586,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -62602,7 +62609,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -62622,7 +62629,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -62640,7 +62647,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -62663,7 +62670,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -62743,13 +62750,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -62759,7 +62766,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -62768,19 +62775,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -62815,7 +62822,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -62832,7 +62839,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -62842,43 +62849,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -62888,13 +62895,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -62914,7 +62921,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -62946,11 +62953,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -62959,44 +62966,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -63013,13 +63020,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -63027,7 +63034,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5318, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -63061,7 +63068,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -63087,16 +63094,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63107,11 +63114,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63122,7 +63129,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63132,7 +63139,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63145,11 +63152,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = func() uint8 { @@ -63162,7 +63169,7 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, func() uint8 { if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 { return uint8(SQLITE_UTF16BE) @@ -63171,7 +63178,7 @@ func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, }()) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -63220,7 +63227,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -63231,7 +63238,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -63248,7 +63255,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -63260,7 +63267,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -63271,19 +63278,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -63306,7 +63313,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -63327,7 +63334,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -63336,7 +63343,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x100 >> 8) } @@ -63345,7 +63352,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x3000 >> 12) } @@ -63353,7 +63360,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -63362,7 +63369,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -63375,7 +63382,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63401,7 +63408,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -63416,7 +63423,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -63431,7 +63438,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -63444,7 +63451,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -63458,7 +63465,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -63550,7 +63557,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63569,7 +63576,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63581,7 +63588,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -63593,7 +63600,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -63607,7 +63614,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -63748,7 +63755,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63793,7 +63800,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -64016,7 +64023,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -64087,7 +64094,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -64109,7 +64116,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64155,7 +64162,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -64187,7 +64194,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sql // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -64199,7 +64206,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, uint8(affinity), enc) } @@ -64207,7 +64214,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -64243,7 +64250,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -64257,13 +64264,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -64279,7 +64286,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -64303,7 +64310,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -64313,11 +64320,11 @@ var azTypes = [5]uintptr{ ts + 1112, ts + 1090, ts + 1535, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -66427,6 +66434,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -69446,7 +69457,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -69482,10 +69513,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -69493,13 +69524,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -69508,14 +69539,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -69523,12 +69554,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -69543,7 +69574,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -69561,13 +69592,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -69584,38 +69615,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -69625,27 +69656,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -69654,63 +69685,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -69718,55 +69749,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = uint8(0) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = uint8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -69781,20 +69812,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -69804,15 +69835,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -69847,81 +69878,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf >> 0) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -69929,45 +69960,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -69992,14 +70023,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*uint8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -70007,30 +70038,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -70094,31 +70125,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*uint8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -70147,13 +70178,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -70163,77 +70194,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -70242,79 +70273,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -70323,22 +70354,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -70347,37 +70378,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -70392,7 +70423,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -70405,13 +70436,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -70430,20 +70461,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -70464,17 +70495,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5485, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -70485,16 +70516,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) @@ -70502,14 +70533,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -70517,121 +70548,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5536, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5558, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -70644,36 +70650,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -70681,48 +70712,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -70743,18 +70774,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -70762,43 +70793,43 @@ __519: ts+5612, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -70814,7 +70845,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -70856,66 +70887,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x200>>9)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -70923,16 +70954,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -70952,20 +70983,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 14, 0xc000) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -71012,37 +71043,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 14, 0xc000) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -71132,13 +71163,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -71147,11 +71178,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc000>>14) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -71163,24 +71194,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -71192,32 +71223,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -71237,10 +71268,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -71259,10 +71290,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 7, 0x80) @@ -71317,7 +71348,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -71325,11 +71356,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1534 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x10>>4) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -71338,71 +71369,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 7, 0x80) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 5, 0x20) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -71421,19 +71452,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -71448,10 +71479,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -71475,10 +71506,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -71603,7 +71634,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -71613,10 +71644,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -71625,29 +71656,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -71658,53 +71689,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -71729,97 +71760,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -71877,10 +71908,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -71889,60 +71920,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -71965,18 +71996,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -71988,10 +72019,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -72086,10 +72117,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; __99: // jump, in3 @@ -72102,15 +72133,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -72120,62 +72151,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -72183,31 +72214,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -72261,7 +72292,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -72271,14 +72302,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; __103: // jump, in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -72299,25 +72330,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -72375,89 +72406,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 6, 0x40) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -72466,36 +72497,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -72550,56 +72581,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -72611,13 +72642,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -72628,13 +72659,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -72647,7 +72678,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -72673,10 +72704,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -72726,28 +72757,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -72759,13 +72790,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -72774,28 +72805,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -72835,16 +72866,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -72867,10 +72898,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -72920,29 +72951,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -72963,20 +72994,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -72987,36 +73018,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -73025,6 +73056,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -73032,11 +73067,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -73069,39 +73104,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -73117,29 +73152,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -73184,32 +73219,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -73292,18 +73327,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -73343,10 +73378,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -73356,10 +73391,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -73376,10 +73411,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -73402,17 +73437,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -73443,31 +73478,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5827) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5827) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -73514,25 +73549,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -73544,17 +73579,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -73568,16 +73603,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -73631,15 +73666,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -73653,19 +73688,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -73673,22 +73708,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -73724,13 +73759,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -73738,21 +73773,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -73778,23 +73813,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -73810,21 +73845,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -73845,10 +73880,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -73862,10 +73897,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -73886,15 +73921,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 14, 0xc000) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5844 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -73906,11 +73941,11 @@ __751: ts+5858, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -73920,38 +73955,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -73964,10 +73999,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -74039,22 +74074,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -74072,15 +74107,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -74099,18 +74134,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -74145,35 +74180,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -74208,37 +74243,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5901, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -74246,7 +74281,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -74255,10 +74290,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -74266,10 +74301,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -74291,24 +74326,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -74359,21 +74394,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -74390,25 +74425,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -74424,35 +74459,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -74469,11 +74504,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -74506,7 +74541,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -74516,10 +74551,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -74534,16 +74569,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -74556,17 +74591,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -74613,10 +74648,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -74644,75 +74679,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -74748,32 +74783,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -74795,32 +74830,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -74843,17 +74878,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -74863,18 +74898,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -74886,11 +74921,11 @@ __830: return ts + 5995 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -74898,29 +74933,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -74928,18 +74963,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -74949,10 +74984,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -74974,10 +75009,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -74993,17 +75028,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -75025,13 +75060,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 14, 0xc000) -__845: +__849: ; goto __8 @@ -75074,25 +75109,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+6002, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -75108,16 +75143,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -75137,17 +75172,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -75161,10 +75196,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -75179,11 +75214,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -75191,10 +75226,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -75203,18 +75238,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -75232,10 +75267,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -75280,27 +75315,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -75308,10 +75343,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -75335,11 +75370,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -75348,40 +75383,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -75395,10 +75430,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -75413,21 +75448,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -75445,27 +75480,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 14, 0xc000) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -75499,43 +75534,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -75544,41 +75579,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -75603,16 +75638,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -75672,24 +75707,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -75700,38 +75735,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -75770,16 +75805,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -75829,67 +75864,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6031, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -75934,25 +75969,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3614, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -75961,46 +75996,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -76031,11 +76066,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6069, ts + 6078, ts + 6085, - ts + 6091} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6091} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -76066,7 +76101,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -76087,7 +76122,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -76104,7 +76139,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -76180,7 +76215,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -76501,7 +76536,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -76510,11 +76545,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -76533,14 +76568,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76599,14 +76634,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -76616,7 +76651,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -76632,7 +76667,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -76641,7 +76676,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -76828,7 +76863,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -76979,7 +77014,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -76993,10 +77028,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -77007,18 +77042,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -77031,26 +77066,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -77060,10 +77095,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -77094,11 +77129,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -77115,7 +77150,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77219,7 +77254,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -77259,7 +77294,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -77274,7 +77309,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -77315,7 +77350,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77361,7 +77396,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77384,7 +77419,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77404,7 +77439,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -77416,7 +77451,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77466,7 +77501,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -77526,7 +77561,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -77545,7 +77580,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -77641,7 +77676,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -77652,7 +77687,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -77672,7 +77707,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77691,14 +77726,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -77724,7 +77759,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -77749,7 +77784,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -77761,7 +77796,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -77778,7 +77813,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -77807,7 +77842,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -77826,7 +77861,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -77846,7 +77881,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -77870,7 +77905,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -77883,7 +77918,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -77922,7 +77957,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -77940,7 +77975,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -77997,7 +78032,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -78012,7 +78047,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -78041,7 +78076,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -78057,7 +78092,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -78080,7 +78115,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -78135,7 +78170,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78211,7 +78246,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -78222,7 +78257,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -78286,7 +78321,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78402,7 +78437,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -78448,7 +78483,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -78456,7 +78491,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -78479,7 +78514,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -78513,7 +78548,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -78540,7 +78575,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -78548,7 +78583,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78608,7 +78643,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -78678,7 +78713,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -78735,7 +78770,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -78751,7 +78786,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -78778,7 +78813,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78815,7 +78850,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -78831,7 +78866,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78882,7 +78917,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -78963,7 +78998,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79038,7 +79073,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -79083,7 +79118,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79125,7 +79160,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -79144,7 +79179,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79179,7 +79214,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79271,7 +79306,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -79318,23 +79353,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -79381,7 +79416,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -79391,7 +79426,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -79429,7 +79464,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -79495,7 +79530,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -79523,7 +79558,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -79533,14 +79568,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -79555,7 +79590,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -79567,7 +79602,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -79595,20 +79630,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -79637,7 +79672,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -79685,7 +79720,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -79727,7 +79762,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -79736,7 +79771,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -79765,7 +79800,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -79775,7 +79810,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -79817,7 +79852,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -79866,7 +79901,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -79897,13 +79932,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -79915,7 +79950,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79923,7 +79958,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79958,14 +79993,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -79998,7 +80033,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -80044,7 +80079,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -80061,7 +80096,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0xc0>>6) != ENAME_TAB { @@ -80087,7 +80122,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -80106,7 +80141,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -80156,7 +80191,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -80871,7 +80906,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -80920,7 +80955,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -80942,7 +80977,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80968,7 +81003,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -81449,7 +81484,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -81484,7 +81519,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -81528,7 +81563,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81551,7 +81586,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -81688,7 +81723,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81734,7 +81769,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -81745,7 +81780,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -81777,7 +81812,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81854,7 +81889,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -82153,7 +82188,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82194,7 +82229,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82251,7 +82286,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -82285,7 +82320,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -82321,7 +82356,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return uint8(SQLITE_AFF_INTEGER) } @@ -82342,7 +82377,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -82385,7 +82420,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -82397,7 +82432,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82408,7 +82443,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -82419,7 +82454,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -82444,7 +82479,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -82516,7 +82551,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -82526,7 +82561,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -82535,7 +82570,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:102726:21: */ var aff1 uint8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -82560,7 +82595,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { / // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:102748:13: */ var aff uint8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -82578,7 +82613,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:10272 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:102771:20: */ var aff uint8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -82591,7 +82626,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) i // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, uint8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -82607,7 +82642,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -82630,7 +82665,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -82640,7 +82675,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -82667,7 +82702,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -82675,7 +82710,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -82705,7 +82740,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -82739,7 +82774,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -82787,7 +82822,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -82811,7 +82846,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -82840,7 +82875,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82928,7 +82963,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82950,7 +82985,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -82958,7 +82993,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -82967,7 +83002,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -82987,7 +83022,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83014,7 +83049,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -83024,7 +83059,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83051,7 +83086,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83099,7 +83134,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83114,7 +83149,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -83137,7 +83172,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -83155,7 +83190,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -83183,7 +83218,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -83235,7 +83270,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -83254,7 +83289,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83291,7 +83326,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83323,7 +83358,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83391,7 +83426,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -83421,7 +83456,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -83435,13 +83470,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -83453,7 +83488,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -83495,7 +83530,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -83517,7 +83552,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -83536,7 +83571,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -83553,7 +83588,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83663,7 +83698,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -83685,7 +83720,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -83695,14 +83730,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -83735,7 +83770,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -83743,7 +83778,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -83812,7 +83847,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -83865,7 +83900,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -83894,7 +83929,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83960,9 +83995,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -83979,7 +84014,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -83998,7 +84033,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -84021,7 +84056,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84118,7 +84153,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -84145,7 +84180,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -84171,7 +84206,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -84186,7 +84221,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84198,7 +84233,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -84210,7 +84245,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -84218,7 +84253,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -84235,7 +84270,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -84247,7 +84282,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6646) == 0 { return U32(EP_IsTrue) } @@ -84260,7 +84295,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -84274,7 +84309,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -84291,7 +84326,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -84337,7 +84372,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -84412,7 +84447,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -84436,7 +84471,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -84451,7 +84486,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -84459,12 +84494,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -84506,7 +84541,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -84542,7 +84577,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -84551,7 +84586,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -84603,7 +84638,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -84642,7 +84677,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -84695,7 +84730,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int3 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7592) == 0 { return 1 } @@ -84713,7 +84748,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -84771,7 +84806,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -84783,7 +84818,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -84872,7 +84907,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85090,7 +85125,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -85122,7 +85157,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85141,7 +85176,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -85169,7 +85204,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -85364,7 +85399,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -85487,7 +85522,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -85524,7 +85559,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85905,7 +85940,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85925,7 +85960,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -85971,7 +86006,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -85986,7 +86021,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -86005,7 +86040,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86056,7 +86091,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -86070,14 +86105,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -86096,7 +86131,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -86120,7 +86155,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -86128,7 +86163,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -86253,7 +86288,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -87322,7 +87357,7 @@ __3: return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -87339,7 +87374,7 @@ var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -87408,7 +87443,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -87433,7 +87468,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -87454,7 +87489,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -87467,7 +87502,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -87493,7 +87528,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -87575,7 +87610,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -87638,7 +87673,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87868,7 +87903,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88116,7 +88151,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -88136,7 +88171,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88190,7 +88225,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -88294,7 +88329,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -88321,7 +88356,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -88332,7 +88367,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -88458,7 +88493,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -88481,7 +88516,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -88590,7 +88625,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -88624,7 +88659,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -88642,7 +88677,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -88667,7 +88702,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -88705,7 +88740,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -88721,7 +88756,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -88761,7 +88796,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -88810,7 +88845,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -88843,7 +88878,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -88856,7 +88891,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88873,7 +88908,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88891,7 +88926,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -89082,7 +89117,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -89108,7 +89143,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -89133,7 +89168,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -89142,7 +89177,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -89152,7 +89187,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -89170,7 +89205,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -89188,7 +89223,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -89222,7 +89257,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89241,7 +89276,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89265,7 +89300,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -89281,7 +89316,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -89294,7 +89329,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -89479,7 +89514,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89494,7 +89529,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -89640,7 +89675,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89757,7 +89792,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89785,7 +89820,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -89914,7 +89949,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -89926,7 +89961,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -89945,7 +89980,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -89957,7 +89992,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -89968,7 +90003,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -90009,7 +90044,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -90019,7 +90054,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -90051,7 +90086,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -90073,7 +90108,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -90096,7 +90131,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -90112,7 +90147,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -90135,7 +90170,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -90151,7 +90186,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -90173,7 +90208,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -90195,7 +90230,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -90219,7 +90254,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -90236,7 +90271,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -90250,34 +90285,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10807, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -90291,7 +90324,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90311,7 +90344,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10807, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10815, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -90361,7 +90394,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*uint8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = uint8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10813, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10821, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10805 /* " " */ @@ -90397,7 +90430,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -90495,7 +90528,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -90524,7 +90557,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -90563,7 +90596,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -90906,7 +90939,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -90917,7 +90950,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -90957,7 +90990,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -91091,7 +91124,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -91124,7 +91157,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -91238,7 +91271,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -91310,7 +91343,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -91350,7 +91383,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -91376,7 +91409,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10818, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10826, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -91396,7 +91429,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -91474,10 +91507,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10825, + Xsqlite3ErrorMsg(tls, pParse, ts+10833, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10853 /* "PRIMARY KEY" */ + return ts + 10861 /* "PRIMARY KEY" */ } return ts + 6078 /* "UNIQUE" */ }(), @@ -91490,7 +91523,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10865, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10873, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -91510,11 +91543,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10913, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10921, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11034, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11042, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -91629,16 +91662,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11052}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11073}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11093}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11112}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11131}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11060}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11081}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11101}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11139}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -91794,7 +91827,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -91835,7 +91868,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11154, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11162, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -91847,10 +91880,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11207, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11215, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -91871,10 +91904,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11225 /* "sqlite_stat1" */, FzCols: ts + 11238 /* "tbl,idx,stat" */}, - {FzName: ts + 11251 /* "sqlite_stat4" */, FzCols: ts + 11264 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11292 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11233 /* "sqlite_stat1" */, FzCols: ts + 11246 /* "tbl,idx,stat" */}, + {FzName: ts + 11259 /* "sqlite_stat4" */, FzCols: ts + 11272 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11300 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -91901,14 +91934,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -91919,12 +91952,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -91933,7 +91966,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -91948,7 +91981,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -91958,7 +91991,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -91973,7 +92006,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -92008,7 +92041,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -92103,7 +92136,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11305} /* sqlite3.c:111534:22 */ + FzName: ts + 11313} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -92114,7 +92147,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -92136,7 +92169,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -92154,7 +92187,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -92297,7 +92330,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -92349,7 +92382,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -92421,7 +92454,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11315} /* sqlite3.c:111824:22 */ + FzName: ts + 11323} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -92440,7 +92473,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -92474,7 +92507,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11325, + Xsqlite3_str_appendf(tls, bp+24, ts+11333, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -92484,7 +92517,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11330, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11338, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -92527,7 +92560,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11336, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11344, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -92541,9 +92574,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11342} /* sqlite3.c:111958:22 */ + FzName: ts + 11350} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -92552,7 +92585,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -92588,7 +92621,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11351, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11359, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -92606,7 +92639,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11225, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11233, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -92839,7 +92872,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -92901,7 +92934,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11361, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11369, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -92912,7 +92945,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -92920,7 +92953,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -92945,7 +92978,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -92954,9 +92987,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11365) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11373) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11369) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11377) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -92972,7 +93005,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93035,16 +93068,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -93073,15 +93106,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 13, 0x2000) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 9, 0x200) for *(*uint8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11373, z) == 0 { + if Xsqlite3_strglob(tls, ts+11381, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 13, 0x2000) - } else if Xsqlite3_strglob(tls, ts+11384, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11392, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11394, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11402, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 9, 0x200) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -93103,7 +93136,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93165,7 +93198,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -93182,7 +93215,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -93240,7 +93273,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -93261,7 +93294,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93397,15 +93430,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11251, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11259, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11406, - ts+11460, + ts+11414, + ts+11468, zDb) } return rc @@ -93429,7 +93462,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93457,10 +93490,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11225, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11233, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11512, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11520, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -93536,7 +93569,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -93550,7 +93583,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6332, zName) == 0) } @@ -93568,7 +93601,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -93635,7 +93668,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11553, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11561, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -93648,7 +93681,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11556, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11564, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -93662,7 +93695,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11593, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11601, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -93733,7 +93766,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11623, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11631, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -93750,7 +93783,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11652, 0) + ts+11660, 0) rc = SQLITE_ERROR __23: ; @@ -93826,7 +93859,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11720, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11728, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -93861,7 +93894,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93914,14 +93947,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11748, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11756, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11769, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11777, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -93929,7 +93962,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11803, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -93966,7 +93999,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -94045,7 +94078,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -94053,12 +94086,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11817} /* sqlite3.c:113383:24 */ + FzName: ts + 11825} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -94066,10 +94099,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11831} /* sqlite3.c:113403:24 */ + FzName: ts + 11839} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94081,7 +94114,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11845, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11853, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -94089,7 +94122,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -94114,7 +94147,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11869, + ts+11877, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -94150,7 +94183,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -94186,7 +94219,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -94201,15 +94234,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -94299,7 +94332,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -94312,8 +94345,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11915, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11923, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -94324,7 +94357,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94339,11 +94372,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11944, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11952, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11950, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11958, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -94358,7 +94391,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -94407,7 +94440,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -94429,7 +94462,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11977, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11985, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -94441,7 +94474,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -94450,7 +94483,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -94465,7 +94498,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -94499,7 +94532,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -94511,7 +94544,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -94535,7 +94568,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -94688,7 +94721,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -94739,7 +94772,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -94763,14 +94796,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12025) + ts+12033) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+5844) } @@ -94796,11 +94829,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12011+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12019+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5844) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11992+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12000+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12025) + ts+12033) } } } @@ -94815,7 +94848,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -94836,7 +94869,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12044, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12052, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -94855,9 +94888,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12052 /* "no such view" */ + zMsg = ts + 12060 /* "no such view" */ } else { - zMsg = ts + 12065 /* "no such table" */ + zMsg = ts + 12073 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6527, libc.VaList(bp, zMsg, zDbase, zName)) @@ -94878,7 +94911,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -94892,13 +94925,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5844+7) == 0 { - return ts + 12011 /* "sqlite_schema" */ + return ts + 12019 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12025+7) == 0 { - return ts + 11992 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12033+7) == 0 { + return ts + 12000 /* "sqlite_temp_sche..." */ } } return zName @@ -94914,7 +94947,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -94941,7 +94974,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -94957,7 +94990,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -94989,7 +95022,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -95015,7 +95048,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -95036,7 +95069,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -95058,14 +95091,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -95088,7 +95121,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -95105,7 +95138,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -95124,7 +95157,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -95143,7 +95176,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -95193,7 +95226,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -95230,7 +95263,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -95243,7 +95276,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -95265,7 +95298,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -95278,7 +95311,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5844) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -95291,7 +95324,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -95327,7 +95360,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -95351,7 +95384,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95360,13 +95393,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12079, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12087, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12096, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12104, libc.VaList(bp, pName1)) return -1 } } else { @@ -95378,7 +95411,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -95392,7 +95425,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95413,7 +95446,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8019, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12116, + Xsqlite3ErrorMsg(tls, pParse, ts+12124, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -95423,7 +95456,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -95434,7 +95467,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -95454,7 +95487,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -95501,7 +95534,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -95531,7 +95564,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -95554,7 +95587,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -95582,7 +95615,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 /* "sqlite_temp_mast..." */ + return ts + 12033 /* "sqlite_temp_mast..." */ } return ts + 5844 /* "sqlite_master" */ }()) @@ -95602,7 +95635,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12158, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12166, 0) return __4: ; @@ -95649,7 +95682,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -95689,7 +95722,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12199, + Xsqlite3ErrorMsg(tls, pParse, ts+12207, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10376 /* "view" */ @@ -95709,7 +95742,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12220, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12228, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -95812,8 +95845,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -95823,10 +95856,10 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12255, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12263, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -95845,12 +95878,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12272, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12280, 0) } else { } @@ -95871,7 +95904,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12255 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12263 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -95883,7 +95916,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12255, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12263, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -95895,7 +95928,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -95917,7 +95950,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -95929,13 +95962,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12329, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12337, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12336, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12344, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -95975,7 +96008,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12346, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12354, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -96014,7 +96047,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -96061,7 +96094,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96135,7 +96168,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* s // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -96147,11 +96180,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12372, + Xsqlite3ErrorMsg(tls, pParse, ts+12380, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12417, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12425, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -96188,7 +96221,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -96197,12 +96230,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12458, 0) + ts+12466, 0) } } @@ -96222,7 +96255,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96247,7 +96280,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12510, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12518, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -96336,7 +96369,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12551, 0) + ts+12559, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -96353,7 +96386,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -96383,7 +96416,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -96418,7 +96451,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96438,7 +96471,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12607, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12615, 0) goto generated_done __2: ; @@ -96451,13 +96484,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12650, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12658, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12666, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -96490,7 +96523,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12665, + Xsqlite3ErrorMsg(tls, pParse, ts+12673, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -96513,7 +96546,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -96527,7 +96560,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -96562,7 +96595,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -96598,7 +96631,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -96633,12 +96666,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1534 /* "" */ - zSep2 = ts + 12696 /* "," */ + zSep2 = ts + 12704 /* "," */ zEnd = ts + 4908 /* ")" */ } else { - zSep = ts + 12698 /* "\n " */ - zSep2 = ts + 12702 /* ",\n " */ - zEnd = ts + 12707 /* "\n)" */ + zSep = ts + 12706 /* "\n " */ + zSep2 = ts + 12710 /* ",\n " */ + zEnd = ts + 12715 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -96646,7 +96679,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12710, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12718, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*uint8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = uint8('(') @@ -96686,15 +96719,15 @@ __6: var azType1 = [5]uintptr{ ts + 1534, - ts + 12724, - ts + 12730, - ts + 12735, - ts + 12740, -} /* sqlite3.c:115999:23 */ + ts + 12732, + ts + 12738, + ts + 12743, + ts + 12748, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -96723,7 +96756,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -96752,7 +96785,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -96772,7 +96805,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -96792,7 +96825,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -96825,7 +96858,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -96864,7 +96897,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -97027,7 +97060,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -97060,7 +97093,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -97104,7 +97137,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -97141,7 +97174,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -97197,10 +97230,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12746, + ts+12754, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12779, + Xsqlite3ErrorMsg(tls, pParse, ts+12787, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -97220,11 +97253,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12806, 0) + ts+12814, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12856, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12864, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -97268,7 +97301,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12888, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12896, 0) return } } @@ -97302,11 +97335,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8761 /* "table" */ - zType2 = ts + 12932 /* "TABLE" */ + zType2 = ts + 12940 /* "TABLE" */ } else { // A view zType = ts + 10376 /* "view" */ - zType2 = ts + 12938 /* "VIEW" */ + zType2 = ts + 12946 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -97331,6 +97364,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -97387,7 +97425,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12943, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12951, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -97395,7 +97433,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12958, + ts+12966, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -97413,14 +97451,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13056, + ts+13064, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13098, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13106, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -97457,7 +97495,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -97478,7 +97516,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13132, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13140, 0) goto create_view_fail __1: ; @@ -97575,7 +97613,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97615,7 +97653,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13168, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13176, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -97690,7 +97728,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -97720,7 +97758,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -97746,14 +97784,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13198, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13206, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -97767,7 +97805,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13213, + ts+13221, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -97776,7 +97814,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -97822,7 +97860,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -97831,17 +97869,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]uint8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13280, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13288, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11177, + ts+11185, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -97874,7 +97912,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13294, + ts+13302, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -97886,7 +97924,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13339, + ts+13347, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -97905,7 +97943,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -97916,7 +97954,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3237, 4) == 0 { return 0 @@ -97937,7 +97975,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -98005,7 +98043,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -98067,7 +98105,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13406, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13414, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -98077,14 +98115,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13434, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13442, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13468, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13476, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -98099,7 +98137,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11369, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11377, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -98125,7 +98163,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -98164,7 +98202,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13500, + ts+13508, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -98177,7 +98215,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13563, 0) + ts+13571, 0) goto fk_end goto __7 __6: @@ -98262,7 +98300,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13657, + ts+13665, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -98348,7 +98386,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -98373,7 +98411,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98485,7 +98523,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -98510,7 +98548,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98519,12 +98557,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x4>>2)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13703, + Xsqlite3ErrorMsg(tls, pParse, ts+13711, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13731 /* "FIRST" */ + return ts + 13739 /* "FIRST" */ } - return ts + 13737 /* "LAST" */ + return ts + 13745 /* "LAST" */ }())) return 1 } @@ -98543,7 +98581,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -98683,7 +98721,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13742, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13750, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -98704,7 +98742,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13748, + ts+13756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -98736,21 +98774,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13798, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13826, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13834, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13851, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, 0) goto exit_create_index __17: ; @@ -98777,7 +98815,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13742, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13750, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -98792,7 +98830,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13885, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13893, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -98804,7 +98842,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13919, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13927, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -98833,7 +98871,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13943, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13951, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -98862,7 +98900,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -98908,7 +98946,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13742) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13750) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -99026,7 +99064,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13966, 0) + ts+13974, 0) goto exit_create_index __56: ; @@ -99256,7 +99294,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14027, libc.VaList(bp+48, 0)) + ts+14035, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -99312,8 +99350,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14069, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14077, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -99370,12 +99408,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14086, + zStmt = Xsqlite3MPrintf(tls, db, ts+14094, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1534 /* "" */ } - return ts + 14106 /* " UNIQUE" */ + return ts + 14114 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -99387,7 +99425,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14114, + ts+14122, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -99403,7 +99441,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14173, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14181, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -99499,7 +99537,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -99543,11 +99581,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -99582,7 +99620,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14200, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14208, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -99597,7 +99635,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14218, libc.VaList(bp+8, 0)) + ts+14226, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -99608,7 +99646,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -99638,9 +99676,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14291, + ts+14299, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11365, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11373, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -99666,7 +99704,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -99693,7 +99731,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99724,7 +99762,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -99738,7 +99776,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -99776,7 +99814,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99791,7 +99829,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14351, + Xsqlite3ErrorMsg(tls, pParse, ts+14359, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -99858,7 +99896,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -99897,7 +99935,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -99929,7 +99967,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -99992,7 +100030,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100003,12 +100041,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14387, + Xsqlite3ErrorMsg(tls, pParse, ts+14395, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14423 /* "ON" */ + return ts + 14431 /* "ON" */ } - return ts + 14426 /* "USING" */ + return ts + 14434 /* "USING" */ }())) goto append_from_error __1: @@ -100056,7 +100094,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -100078,7 +100116,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -100095,7 +100133,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -100119,7 +100157,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -100130,14 +100168,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14432, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14440, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -100165,7 +100203,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -100173,9 +100211,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14438 + return ts + 14446 } - return ts + 14447 + return ts + 14455 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -100187,7 +100225,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -100200,11 +100238,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14432, ts + 14454, ts + 14438} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14440, ts + 14462, ts + 14446} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100216,7 +100254,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14462, 0) + ts+14470, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -100230,13 +100268,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14546, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14554, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -100405,7 +100443,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -100420,7 +100458,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -100437,7 +100475,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -100479,7 +100517,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100539,14 +100577,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14563, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -100592,7 +100630,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100612,7 +100650,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -100620,7 +100658,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -100630,7 +100668,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100649,7 +100687,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14601, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14609, libc.VaList(bp, zName)) } } } @@ -100673,7 +100711,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -100703,7 +100741,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -100739,7 +100777,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -100754,7 +100792,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -100765,7 +100803,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -100789,7 +100827,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -100834,7 +100872,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -100850,7 +100888,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -100870,7 +100908,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100892,7 +100930,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14631, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14639, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -100916,7 +100954,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -100957,7 +100995,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -100993,7 +101031,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -101005,7 +101043,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -101043,7 +101081,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -101123,7 +101161,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -101158,7 +101196,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -101205,7 +101243,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -101223,7 +101261,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -101244,7 +101282,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -101263,16 +101301,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14670, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14691, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14699, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -101281,7 +101319,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -101313,7 +101351,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -101864,7 +101902,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14729) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14737) __61: ; @@ -101919,7 +101957,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -102009,7 +102047,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11225) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11233) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -102056,7 +102094,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102145,7 +102183,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -102201,7 +102239,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -102229,7 +102267,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -102239,14 +102277,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -102276,7 +102314,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -102287,18 +102325,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6142, ts + 6137, ts + 7892, ts + 7887, ts + 6132} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102347,7 +102385,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -102359,7 +102397,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) return } iVal = -iVal @@ -102401,7 +102439,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -102516,7 +102554,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -102553,7 +102591,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -102661,7 +102699,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102699,7 +102737,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14759, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14767, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -102715,7 +102753,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -102732,7 +102770,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102753,7 +102791,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -102782,7 +102820,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102806,7 +102844,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -102824,7 +102862,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102839,7 +102877,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102848,7 +102886,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -102863,20 +102901,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -102916,7 +102954,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -103102,13 +103140,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -103126,7 +103164,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -103149,7 +103187,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14764, -1) + Xsqlite3_result_error(tls, context, ts+14772, -1) return } if argc == 3 { @@ -103161,7 +103199,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14797, -1) + ts+14805, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -103189,7 +103227,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -103199,7 +103237,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -103210,7 +103248,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -103221,7 +103259,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103233,7 +103271,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -103248,7 +103286,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -103263,11 +103301,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]uint8{ uint8('0'), uint8('1'), uint8('2'), uint8('3'), uint8('4'), uint8('5'), uint8('6'), uint8('7'), uint8('8'), uint8('9'), uint8('A'), uint8('B'), uint8('C'), uint8('D'), uint8('E'), uint8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -103289,7 +103327,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14842, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14850, libc.VaList(bp+8, r1)) } } break @@ -103326,7 +103364,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14849, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14857, libc.VaList(bp+24, zArg)) break } @@ -103348,7 +103386,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -103371,7 +103409,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103385,7 +103423,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -103423,7 +103461,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -103461,7 +103499,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -103480,7 +103518,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -103569,7 +103607,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -103672,8 +103710,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -103682,7 +103720,7 @@ var azOne = [1]uintptr{uintptr(ts + 10805 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103720,7 +103758,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14852, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14860, 4, uintptr(0)) } } @@ -103733,10 +103771,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -103748,7 +103786,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11977, -1) + Xsqlite3_result_error(tls, context, ts+11985, -1) return } @@ -103772,11 +103810,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -103786,7 +103824,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -103808,7 +103846,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -103831,12 +103869,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14742, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -103845,7 +103883,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -103853,7 +103891,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -103867,14 +103905,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -103888,7 +103926,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -103899,7 +103937,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -103909,7 +103947,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -103947,7 +103985,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -103960,11 +103998,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -103980,9 +104018,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -104047,7 +104085,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -104089,7 +104127,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -104097,7 +104135,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -104115,8 +104153,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14857, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14865, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -104126,7 +104164,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -104136,14 +104174,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14863, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14863, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14871, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14863, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14871, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -104161,7 +104199,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -104217,7 +104255,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -104246,11 +104284,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -104260,7 +104298,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -104317,18 +104355,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -104349,7 +104387,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -104375,13 +104413,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -104409,7 +104447,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -104420,109 +104458,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14868}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14888}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14901}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14919}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14876}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14896}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14909}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14927}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14928}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14936}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14951}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14977}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15002}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15011}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15022}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15029}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15043}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15060}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15060}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15060}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15064}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15068}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15075}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15083}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15103}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15110}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15133}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15139}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15145}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15149}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15156}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15163}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15181}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15213}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15230}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15248}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14936}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14944}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14959}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14985}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15010}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15019}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15037}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15057}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15063}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15068}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15068}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15068}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15072}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15072}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15076}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15083}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15098}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15104}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15118}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15131}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15135}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15141}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15153}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15157}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15171}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15182}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15189}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15204}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15238}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15256}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15287}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15294}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15304}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15308}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15314}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15318}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15264}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15312}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15316}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15322}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15326}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15332}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15337}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14863}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15342}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15351}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15345}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15350}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15359}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15364}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15370}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15376}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15383}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15398}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15408}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15412}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15422}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15437}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15378}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15384}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15391}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15406}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15410}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15416}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15430}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15435}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15441}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15445}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15466}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15472}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15478}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15449}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15453}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15458}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15463}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15486}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15491}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15499}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15502}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15342}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15507}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15499}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15510}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15515}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -104697,7 +104735,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -104808,7 +104846,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15511, + ts+15519, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -104843,7 +104881,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -104973,7 +105011,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -105000,7 +105038,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -105041,7 +105079,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -105165,7 +105203,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -105175,7 +105213,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -105189,7 +105227,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -105222,7 +105260,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -105285,7 +105323,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -105309,7 +105347,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -105333,7 +105371,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -105368,7 +105406,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -105570,7 +105608,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -105629,7 +105667,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -105697,7 +105735,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -105899,7 +105937,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -105920,7 +105958,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -105980,7 +106018,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -106022,7 +106060,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -106101,7 +106139,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -106159,7 +106197,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -106195,7 +106233,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -106208,7 +106246,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -106321,7 +106359,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -106375,7 +106413,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -106415,7 +106453,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -106429,7 +106467,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -106437,7 +106475,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -106448,7 +106486,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -106479,16 +106517,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -106589,7 +106627,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -106771,7 +106809,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -106861,7 +106902,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15556, + ts+15564, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -106886,7 +106927,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15597, + Xsqlite3ErrorMsg(tls, pParse, ts+15605, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -107058,7 +107099,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15629, + ts+15637, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -107068,7 +107109,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15681, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15689, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -107124,7 +107165,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15706, + Xsqlite3ErrorMsg(tls, pParse, ts+15714, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -107132,7 +107173,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15752, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15760, 0) goto insert_cleanup __57: ; @@ -107616,7 +107657,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15773) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15781) __123: ; @@ -107640,7 +107681,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -107667,7 +107708,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -107701,7 +107742,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -107712,7 +107753,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -107720,12 +107761,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -107738,7 +107779,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -107844,7 +107885,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -107961,7 +108002,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -108702,7 +108743,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -108719,7 +108760,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -108822,7 +108863,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -108900,7 +108941,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -108958,7 +108999,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -108979,18 +109020,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -109344,7 +109379,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -109365,7 +109400,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -109554,7 +109589,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -109888,7 +109923,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -109902,7 +109937,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -109946,7 +109981,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11977, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11985, 0) __3: ; return SQLITE_ERROR @@ -109956,7 +109991,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15787 /* "sqlite3_extensio..." */ + zEntry = ts + 15795 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -109976,7 +110011,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11938, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11946, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -110022,7 +110057,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15810, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15818, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -110036,7 +110071,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15819, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15827, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -110060,7 +110095,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15823, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15831, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -110078,7 +110113,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15829, libc.VaList(bp+16, zEntry, zFile)) + ts+15837, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -110105,7 +110140,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15872, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15880, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -110145,7 +110180,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15904, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15912, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -110155,10 +110190,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15941, -} /* sqlite3.c:129386:21 */ + ts + 15949, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -110169,7 +110204,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -110180,7 +110215,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -110200,15 +110235,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -110218,7 +110253,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -110259,7 +110294,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -110278,7 +110313,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -110293,7 +110328,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -110324,7 +110359,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15944, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15952, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -110370,67 +110405,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 5008, - ts + 15983, + ts + 15991, ts + 8761, - ts + 15987, - ts + 15992, ts + 15995, - ts + 16005, - ts + 16015, - ts + 16021, - ts + 16025, - ts + 16030, - ts + 16035, + ts + 16000, + ts + 16003, + ts + 16013, + ts + 16023, + ts + 16029, + ts + 16033, + ts + 16038, ts + 16043, - ts + 16054, - ts + 16057, + ts + 16051, + ts + 16062, + ts + 16065, - ts + 16064, - ts + 16025, - ts + 16030, - ts + 16071, - ts + 16076, + ts + 16072, + ts + 16033, + ts + 16038, ts + 16079, - ts + 16086, - ts + 16021, - ts + 16025, - ts + 16092, - ts + 16097, - ts + 16102, - ts + 16025, - ts + 16106, - ts + 16030, + ts + 16084, + ts + 16087, + ts + 16094, + ts + 16029, + ts + 16033, + ts + 16100, + ts + 16105, + ts + 16110, + ts + 16033, ts + 16114, - ts + 16118, - ts + 16123, - ts + 11369, - ts + 11365, - ts + 16129, - ts + 16134, - ts + 16139, - ts + 15983, - ts + 16025, - ts + 16144, - ts + 16151, - ts + 16158, - ts + 8761, + ts + 16038, + ts + 16122, + ts + 16126, + ts + 16131, + ts + 11377, + ts + 11373, + ts + 16137, + ts + 16142, + ts + 16147, + ts + 15991, + ts + 16033, + ts + 16152, + ts + 16159, ts + 16166, + ts + 8761, + ts + 16174, ts + 5011, - ts + 16172, + ts + 16180, - ts + 15983, - ts + 16025, - ts + 16177, - ts + 16182, - ts + 15379, - ts + 16187, + ts + 15991, + ts + 16033, + ts + 16185, + ts + 16190, + ts + 15387, + ts + 16195, - ts + 16200, - ts + 16209, - ts + 16216, + ts + 16208, + ts + 16217, + ts + 16224, - ts + 16227, -} /* sqlite3.c:129831:19 */ + ts + 16235, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -110441,247 +110476,247 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16235, + { /* zName: */ FzName: ts + 16243, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16250, + { /* zName: */ FzName: ts + 16258, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16265, + { /* zName: */ FzName: ts + 16273, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16277, + { /* zName: */ FzName: ts + 16285, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16293, + { /* zName: */ FzName: ts + 16301, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16216, + { /* zName: */ FzName: ts + 16224, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16306, + { /* zName: */ FzName: ts + 16314, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16318, + { /* zName: */ FzName: ts + 16326, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16338, + { /* zName: */ FzName: ts + 16346, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16354, + { /* zName: */ FzName: ts + 16362, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16375, + { /* zName: */ FzName: ts + 16383, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16390, + { /* zName: */ FzName: ts + 16398, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16406, + { /* zName: */ FzName: ts + 16414, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16420, + { /* zName: */ FzName: ts + 16428, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16433, + { /* zName: */ FzName: ts + 16441, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16447, + { /* zName: */ FzName: ts + 16455, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16466, + { /* zName: */ FzName: ts + 16474, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16485, + { /* zName: */ FzName: ts + 16493, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16508, + { /* zName: */ FzName: ts + 16516, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16517, + { /* zName: */ FzName: ts + 16525, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16535, + { /* zName: */ FzName: ts + 16543, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16552, + { /* zName: */ FzName: ts + 16560, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16565, + { /* zName: */ FzName: ts + 16573, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16580, + { /* zName: */ FzName: ts + 16588, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16598, + { /* zName: */ FzName: ts + 16606, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16608, + { /* zName: */ FzName: ts + 16616, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16638, + { /* zName: */ FzName: ts + 16646, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16663, + { /* zName: */ FzName: ts + 16671, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16682, + { /* zName: */ FzName: ts + 16690, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16693, + { /* zName: */ FzName: ts + 16701, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16704, + { /* zName: */ FzName: ts + 16712, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16716, + { /* zName: */ FzName: ts + 16724, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16732, + { /* zName: */ FzName: ts + 16740, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16745, + { /* zName: */ FzName: ts + 16753, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16764, + { /* zName: */ FzName: ts + 16772, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16783, + { /* zName: */ FzName: ts + 16791, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16796, + { /* zName: */ FzName: ts + 16804, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16811, + { /* zName: */ FzName: ts + 16819, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16821, + { /* zName: */ FzName: ts + 16829, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16833, + { /* zName: */ FzName: ts + 16841, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16842, + { /* zName: */ FzName: ts + 16850, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16853, + { /* zName: */ FzName: ts + 16861, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16863, + { /* zName: */ FzName: ts + 16871, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16875, + { /* zName: */ FzName: ts + 16883, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16886, + { /* zName: */ FzName: ts + 16894, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16898, + { /* zName: */ FzName: ts + 16906, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16915, + { /* zName: */ FzName: ts + 16923, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16934, + { /* zName: */ FzName: ts + 16942, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16960, + { /* zName: */ FzName: ts + 16968, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16975, + { /* zName: */ FzName: ts + 16983, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16989, + { /* zName: */ FzName: ts + 16997, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 17008, + { /* zName: */ FzName: ts + 17016, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17022, + { /* zName: */ FzName: ts + 17030, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17038, + { /* zName: */ FzName: ts + 17046, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17050, + { /* zName: */ FzName: ts + 17058, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17061, + { /* zName: */ FzName: ts + 17069, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17072, + { /* zName: */ FzName: ts + 17080, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17084, + { /* zName: */ FzName: ts + 17092, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17095, + { /* zName: */ FzName: ts + 17103, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17116, + { /* zName: */ FzName: ts + 17124, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17124, + { /* zName: */ FzName: ts + 17132, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17139, + { /* zName: */ FzName: ts + 17147, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17152, + { /* zName: */ FzName: ts + 17160, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17171, + { /* zName: */ FzName: ts + 17179, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17186, + { /* zName: */ FzName: ts + 17194, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -110697,7 +110732,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -110714,13 +110749,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17202)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17210)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -110729,12 +110764,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17227) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17235) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17237) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17245) { return PAGER_LOCKINGMODE_NORMAL } } @@ -110745,15 +110780,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7905) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17244) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17252) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17249) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17257) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -110768,12 +110803,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '2' { return int32(*(*uint8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16177) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16185) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17261) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17269) == 0 { return 2 } else { return 0 @@ -110783,13 +110818,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17268, 0) + ts+17276, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -110802,7 +110837,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -110816,7 +110851,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -110850,7 +110885,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -110860,7 +110895,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -110869,7 +110904,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -110885,23 +110920,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17330 /* "SET NULL" */ + zName = ts + 17338 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17339 /* "SET DEFAULT" */ + zName = ts + 17347 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17351 /* "CASCADE" */ + zName = ts + 17359 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17359 /* "RESTRICT" */ + zName = ts + 17367 /* "RESTRICT" */ break default: - zName = ts + 17368 /* "NO ACTION" */ + zName = ts + 17376 /* "NO ACTION" */ break } return zName @@ -110910,7 +110945,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -110919,11 +110954,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17378, ts + 17385, ts + 17393, ts + 17397, ts + 17261, ts + 17406, -} /* sqlite3.c:130656:15 */ + ts + 17386, ts + 17393, ts + 17401, ts + 17405, ts + 17269, ts + 17414, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -110950,7 +110985,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -110965,13 +111000,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17410 /* "w" */ + zType = ts + 17418 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17412 /* "a" */ + zType = ts + 17420 /* "a" */ } else { zType = ts + 7415 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17414, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17422, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -110979,15 +111014,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17421, ts + 17426, ts + 17434 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17429, ts + 17434, ts + 17442 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -111009,7 +111044,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -111256,7 +111291,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17442, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17450, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -111899,7 +111934,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17446) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17454) == 0) { goto __64 } b = 2 @@ -111988,7 +112023,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17237 /* "normal" */ + zRet = ts + 17245 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -112029,7 +112064,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17227 /* "exclusive" */ + zRet = ts + 17235 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -112394,7 +112429,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17451, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17459, 0) goto pragma_out __126: ; @@ -112440,7 +112475,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17476, 0) + ts+17484, 0) goto __133 __132: if !(iDb != 1) { @@ -112496,7 +112531,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17529) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17537) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -112610,9 +112645,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17535 /* "issisii" */ + return ts + 17543 /* "issisii" */ } - return ts + 17543 /* "issisi" */ + return ts + 17551 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -112697,7 +112732,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17550, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17558, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -112750,13 +112785,13 @@ __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12650 /* "virtual" */ + zType = ts + 12658 /* "virtual" */ goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17566 /* "shadow" */ + zType = ts + 17574 /* "shadow" */ goto __183 __182: zType = ts + 8761 /* "table" */ @@ -112766,7 +112801,7 @@ __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17573, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17581, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -112836,7 +112871,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17580, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17588, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -112846,7 +112881,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17585, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17593, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -112883,8 +112918,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17590, ts + 17592, ts + 16054} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17594, + *(*[3]uintptr)(unsafe.Pointer(bp + 528 /* azOrigin */)) = [3]uintptr{ts + 17598, ts + 17600, ts + 16062} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17602, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -112918,7 +112953,7 @@ __199: __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17600, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17608, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -112941,7 +112976,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17604, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17612, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -113060,7 +113095,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17607, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17615, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -113068,7 +113103,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17616)) + ts+17624)) goto __227 __227: j2++ @@ -113269,7 +113304,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17621, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17629, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560 /* aiCols */))) @@ -113535,7 +113570,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17625, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17633, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -113637,7 +113672,7 @@ __304: goto __305 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17649, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17657, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) != COLTYPE_ANY) { @@ -113659,7 +113694,7 @@ __305: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17669, + zErr = Xsqlite3MPrintf(tls, db, ts+17677, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -113703,7 +113738,7 @@ __313: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17691, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17699, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -113737,9 +113772,9 @@ __318: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17721) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17729) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17726) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17734) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -113779,7 +113814,7 @@ __322: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17747) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17755) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __319: @@ -113801,7 +113836,7 @@ __314: if !!(isQuick != 0) { goto __324 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17774) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17782) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __325: @@ -113852,7 +113887,7 @@ __266: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17803 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17811 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __329: @@ -113935,7 +113970,7 @@ __336: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __338 } - Xsqlite3ErrorMsg(tls, pParse, ts+17806, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17814, libc.VaList(bp+416, zRight)) __338: ; __333: @@ -114047,19 +114082,19 @@ __48: if !(zRight != 0) { goto __345 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17244) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17252) == 0) { goto __346 } eMode2 = SQLITE_CHECKPOINT_FULL goto __347 __346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17831) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17839) == 0) { goto __348 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __349 __348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17397) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17405) == 0) { goto __350 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -114246,7 +114281,7 @@ __365: __367: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17839, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17847, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __368 @@ -114397,9 +114432,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -114410,16 +114445,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -114428,27 +114463,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17857, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17862, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17868, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17877, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17886, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17902}, - {FzName: ts + 17909}, + {FzName: ts + 17865, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17870, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17876, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17885, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17894, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17902, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17910}, + {FzName: ts + 17917}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -114460,24 +114495,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -114494,7 +114529,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]uint8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17915) + Xsqlite3_str_appendall(tls, bp+32, ts+17923) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -114502,7 +114537,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17930, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17938, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -114515,16 +114550,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17937, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17945, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17943) + Xsqlite3_str_appendall(tls, bp+32, ts+17951) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17955) + Xsqlite3_str_appendall(tls, bp+32, ts+17963) j++ } Xsqlite3_str_append(tls, bp+32, ts+4908, 1) @@ -114551,7 +114586,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -114563,7 +114598,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114628,7 +114663,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -114641,7 +114676,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -114652,7 +114687,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -114660,7 +114695,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -114676,7 +114711,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -114722,13 +114757,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17970) + Xsqlite3_str_appendall(tls, bp+32, ts+17978) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17978, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17986, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17982, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17990, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -114744,14 +114779,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -114763,7 +114798,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -114781,12 +114816,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -114819,7 +114854,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114830,12 +114865,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17986, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+17994, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -114844,25 +114879,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4959 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+18014, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18022, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18045, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18053, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18053, - ts + 18060, - ts + 18072, -} /* sqlite3.c:133149:23 */ + ts + 18061, + ts + 18068, + ts + 18080, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -114884,7 +114919,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -114929,7 +114964,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 7, 0x80) @@ -114967,13 +115002,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18083) + corruptSchema(tls, pData, argv, ts+18091) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14069) + corruptSchema(tls, pData, argv, ts+14077) } } } @@ -114986,7 +115021,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -115019,13 +115054,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8761 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7825 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18096 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18104 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -115138,7 +115173,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11652) + ts+11660) rc = SQLITE_ERROR goto initone_error_out __13: @@ -115178,7 +115213,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18168) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18176) rc = SQLITE_ERROR goto initone_error_out __17: @@ -115200,7 +115235,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18192, + ts+18200, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -115287,7 +115322,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -115319,7 +115354,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -115338,7 +115373,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -115391,7 +115426,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -115418,7 +115453,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -115474,7 +115509,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -115497,7 +115532,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) @@ -115510,7 +115545,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -115592,7 +115627,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18226, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18234, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -115619,7 +115654,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18256, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18264, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -115716,13 +115751,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -115751,7 +115786,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115790,14 +115825,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -115810,7 +115845,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -115827,7 +115862,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115840,7 +115875,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -115880,21 +115915,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -115928,7 +115963,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -115949,7 +115984,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115979,7 +116014,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -115997,19 +116032,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -116038,7 +116073,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -116049,7 +116084,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -116099,14 +116134,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -116128,7 +116163,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -116171,18 +116206,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18275, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18283, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18319, 0) + ts+18327, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18374)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18382)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -116195,11 +116230,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -116233,7 +116268,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -116261,7 +116296,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -116306,7 +116341,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -116330,7 +116365,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -116365,7 +116400,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116397,7 +116432,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18408, libc.VaList(bp, 0)) + ts+18416, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -116421,7 +116456,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18458, 0) + ts+18466, 0) return 1 } @@ -116456,7 +116491,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18513, libc.VaList(bp+8, zName)) + ts+18521, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -116479,11 +116514,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -116492,7 +116527,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -116505,7 +116540,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -116648,7 +116683,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -116696,7 +116731,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116777,7 +116812,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -116805,7 +116840,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -117161,7 +117196,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) if p != 0 { @@ -117179,7 +117214,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -117190,7 +117225,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -117210,7 +117245,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -117244,20 +117279,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18577 /* "UNION ALL" */ + z = ts + 18585 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18587 /* "INTERSECT" */ + z = ts + 18595 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18597 /* "EXCEPT" */ + z = ts + 18605 /* "EXCEPT" */ break default: - z = ts + 18604 /* "UNION" */ + z = ts + 18612 /* "UNION" */ break } return z @@ -117271,11 +117306,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18610, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18618, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -117288,7 +117323,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -117467,7 +117502,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -117545,7 +117580,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1099 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16166 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16174 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -117591,7 +117626,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -117648,7 +117683,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -117700,13 +117735,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16166 /* "rowid" */ + zCol = ts + 16174 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -117716,7 +117751,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -117748,7 +117783,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -117809,7 +117844,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16166 /* "rowid" */ + zName = ts + 16174 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -117822,7 +117857,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18633, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18641, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -117837,7 +117872,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18642, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18650, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -117880,7 +117915,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -117949,7 +117984,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -117984,7 +118019,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -118016,7 +118051,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -118073,7 +118108,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -118097,7 +118132,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -118166,7 +118201,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -118202,7 +118237,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18658, 0) return __1: ; @@ -118312,7 +118347,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18699, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18707, 0) goto end_of_recursive_query __15: ; @@ -118334,7 +118369,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18741, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18749, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -118377,7 +118412,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18747, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18755, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -118407,7 +118442,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -118427,11 +118462,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18762, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18770, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1534 /* "" */ } - return ts + 18785 /* "S" */ + return ts + 18793 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -118447,7 +118482,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -118483,7 +118518,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -118583,8 +118618,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18787, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18802, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18795, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) __8: ; @@ -118633,7 +118668,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18577, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18585, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -118709,7 +118744,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -118781,7 +118816,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18821, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18829, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -118946,15 +118981,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18842, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18850, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18888, + ts+18896, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -118977,7 +119012,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -119173,7 +119208,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -119380,7 +119415,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18970, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18978, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -119388,7 +119423,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18981, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18989, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -119402,7 +119437,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18986, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18994, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -119523,14 +119558,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -119543,7 +119578,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -119626,7 +119661,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -119636,7 +119671,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -119679,7 +119714,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -119695,7 +119730,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -119727,7 +119762,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -119760,7 +119795,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -119770,7 +119805,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -119797,7 +119832,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -119967,7 +120002,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -120392,7 +120427,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -120400,7 +120435,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -120442,7 +120477,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -120477,7 +120512,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -120531,7 +120566,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -120598,7 +120633,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -120651,7 +120686,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -120722,7 +120757,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -120810,7 +120845,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -120826,12 +120861,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15060) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15068) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15064) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15072) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -120860,7 +120895,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -120900,7 +120935,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -120911,7 +120946,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18992, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19000, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -120939,7 +120974,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -121018,12 +121053,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2000>>13)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19010, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19018, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -121037,7 +121072,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -121072,7 +121107,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -121105,7 +121140,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -121188,7 +121223,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4000>>14)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19033, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19041, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) @@ -121215,7 +121250,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 10, 0x400) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19053, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19061, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -121231,7 +121266,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19096 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19104 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -121257,7 +121292,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19119, + Xsqlite3ErrorMsg(tls, pParse, ts+19127, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -121268,9 +121303,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19157 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19165 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19191 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19199 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -121287,7 +121322,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -121303,7 +121338,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121318,7 +121353,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19229, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19237, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -121357,7 +121392,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -121445,7 +121480,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19241, + Xsqlite3ErrorMsg(tls, pParse, ts+19249, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -121464,7 +121499,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19280, + Xsqlite3ErrorMsg(tls, pParse, ts+19288, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -121472,7 +121507,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x200>>9)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19311, + Xsqlite3ErrorMsg(tls, pParse, ts+19319, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -121637,7 +121672,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11938, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11946, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -121653,7 +121688,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19344, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19352, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -121673,9 +121708,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19353, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19361, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19371, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19379, 0) } } } @@ -121685,7 +121720,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19391, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19399, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -121706,7 +121741,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -121744,7 +121779,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -121792,7 +121827,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -121821,7 +121856,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -121846,7 +121881,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121874,13 +121909,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19422, 0) + ts+19430, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19473, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19481, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -121896,7 +121931,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -121935,7 +121970,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -122076,17 +122111,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19506, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19514, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19518 /* " USING COVERING ..." */ + return ts + 19526 /* " USING COVERING ..." */ } return ts + 1534 /* "" */ }(), @@ -122108,7 +122143,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -122154,7 +122189,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -122172,7 +122207,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -122213,7 +122248,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -122230,7 +122265,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -122431,7 +122466,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19541, + ts+19549, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -122517,7 +122552,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19595, + Xsqlite3ErrorMsg(tls, pParse, ts+19603, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -122757,7 +122792,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19635, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19643, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 11, 0x800) @@ -122820,7 +122855,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19650, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19658, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -123342,9 +123377,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19666 /* "DISTINCT" */ + return ts + 19674 /* "DISTINCT" */ } - return ts + 19675 /* "GROUP BY" */ + return ts + 19683 /* "GROUP BY" */ }()) groupBySort = 1 @@ -123757,7 +123792,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19666) + explainTempTable(tls, pParse, ts+19674) __141: ; @@ -123769,9 +123804,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19684 /* "RIGHT PART OF OR..." */ + return ts + 19692 /* "RIGHT PART OF OR..." */ } - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -123827,7 +123862,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -123851,12 +123886,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123927,7 +123962,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19716, 0) + ts+19724, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -123987,7 +124022,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -124059,7 +124094,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -124090,7 +124125,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -124119,7 +124154,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -124157,7 +124192,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -124187,7 +124222,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19789, 0) goto trigger_cleanup __3: ; @@ -124248,7 +124283,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19827, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19835, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -124266,7 +124301,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19843, 0) goto trigger_orphan_error __11: ; @@ -124281,7 +124316,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19827, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19835, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -124297,7 +124332,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19876, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19884, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -124314,7 +124349,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19902, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19910, 0) goto trigger_cleanup __18: ; @@ -124324,12 +124359,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19940, + Xsqlite3ErrorMsg(tls, pParse, ts+19948, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19977 /* "BEFORE" */ + return ts + 19985 /* "BEFORE" */ } - return ts + 19984 /* "AFTER" */ + return ts + 19992 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -124338,7 +124373,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19990, libc.VaList(bp+24, pTableName+8)) + ts+19998, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -124368,7 +124403,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }(), uintptr(0), zDb) != 0) { @@ -124464,7 +124499,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -124504,7 +124539,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19827, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19835, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -124541,13 +124576,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20036, + ts+20044, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20111, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20119, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -124588,7 +124623,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -124606,7 +124641,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -124623,10 +124658,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -124647,7 +124685,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124679,7 +124717,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124708,7 +124746,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -124727,7 +124765,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -124747,7 +124785,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124813,7 +124851,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20140, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20148, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -124831,12 +124869,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -124854,7 +124892,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12025 + return ts + 12033 } return ts + 5844 }() @@ -124869,7 +124907,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20160, + ts+20168, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -124877,7 +124915,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -124908,7 +124946,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -124925,7 +124963,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124988,12 +125026,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20222, + ts+20230, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20270 /* "DELETE" */ + return ts + 20278 /* "DELETE" */ } - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ }())) __15: ; @@ -125052,7 +125090,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -125077,7 +125115,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -125089,7 +125127,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20284, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20292, 0) return 1 } @@ -125098,7 +125136,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -125139,7 +125177,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -125207,7 +125245,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -125294,7 +125332,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -125307,7 +125345,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -125364,7 +125402,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20326, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20334, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -125413,7 +125451,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -125442,7 +125480,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -125502,7 +125540,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -125550,7 +125588,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -125607,7 +125645,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125637,7 +125675,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -125658,7 +125696,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -125670,7 +125708,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -125714,7 +125752,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -125797,7 +125835,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -126078,7 +126116,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20340, + ts+20348, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -126110,7 +126148,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20376, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20384, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -127151,7 +127189,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20395) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20403) __169: ; @@ -127187,7 +127225,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127360,7 +127398,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -127373,14 +127411,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -127393,7 +127431,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -127419,7 +127457,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -127539,10 +127577,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*uint8)(unsafe.Pointer(bp + 216)) = uint8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20408, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20416, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20412, libc.VaList(bp+8, bp+216)) + ts+20420, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -127561,7 +127599,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -127583,7 +127621,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -127599,7 +127637,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -127633,7 +127671,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12079, -1) + ts+12087, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -127679,7 +127717,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127701,7 +127739,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20489, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20493, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20497, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -127719,7 +127757,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -127763,7 +127801,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -127820,7 +127858,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -127851,14 +127889,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20493) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20501) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20533) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20541) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -127869,7 +127907,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20576) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __5: ; @@ -127914,7 +127952,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20594, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20602, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -127935,7 +127973,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20625) goto end_of_vacuum __8: ; @@ -127951,7 +127989,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14432) + rc = execSql(tls, db, pzErrMsg, ts+14440) if !(rc != SQLITE_OK) { goto __9 } @@ -128003,7 +128041,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20644, + ts+20652, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -128013,7 +128051,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20752, + ts+20760, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -128028,7 +128066,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20806, + ts+20814, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -128045,7 +128083,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20957, + ts+20965, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -128158,7 +128196,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -128166,7 +128204,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -128206,7 +128244,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -128220,18 +128258,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -128252,7 +128290,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -128270,14 +128308,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -128287,7 +128325,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -128308,7 +128346,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -128345,7 +128383,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -128376,7 +128414,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -128402,7 +128440,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -128422,7 +128460,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128432,7 +128470,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12306, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12314, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -128448,7 +128486,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -128483,7 +128521,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -128494,7 +128532,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -128529,7 +128567,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21087, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21095, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -128541,7 +128579,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21111, + ts+21119, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -128551,7 +128589,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21210, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21218, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -128578,7 +128616,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -128586,7 +128624,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -128600,7 +128638,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -128621,7 +128659,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21237, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -128661,7 +128699,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21271, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21279, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -128675,7 +128713,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21301 /* "vtable construct..." */ + var zFormat uintptr = ts + 21309 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -128696,7 +128734,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16057, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16065, zType+uintptr(i), 6) && (i == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -128736,7 +128774,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -128755,7 +128793,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21347, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21355, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -128772,7 +128810,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -128792,7 +128830,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -128804,7 +128842,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128823,7 +128861,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21347, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -128844,7 +128882,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -128860,7 +128898,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -128934,7 +128972,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -128979,7 +129017,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -129009,7 +129047,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -129031,14 +129069,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -129049,7 +129087,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -129110,7 +129148,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -129158,7 +129196,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129225,7 +129263,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -129264,7 +129302,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129309,7 +129347,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -129326,19 +129364,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -129347,7 +129385,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -129375,7 +129413,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -129439,7 +129477,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -129479,23 +129517,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -129525,9 +129563,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -129554,9 +129592,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -129566,9 +129604,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -129588,9 +129626,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -129603,9 +129641,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -129620,24 +129658,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -129659,7 +129697,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129685,7 +129723,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -129707,7 +129745,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -129729,13 +129767,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21366 /* "" */ + return ts + 21374 /* "" */ } if i == -1 { - return ts + 16166 /* "rowid" */ + return ts + 16174 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -129746,19 +129784,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -129769,11 +129807,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21379, 1) + Xsqlite3_str_append(tls, pStr, ts+21387, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12696, 1) + Xsqlite3_str_append(tls, pStr, ts+12704, 1) } Xsqlite3_str_append(tls, pStr, ts+4959, 1) } @@ -129794,7 +129832,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129807,27 +129845,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21381, 2) + Xsqlite3_str_append(tls, pStr, ts+21389, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21373, 5) + Xsqlite3_str_append(tls, pStr, ts+21381, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21384 /* "%s=?" */ + return ts + 21392 /* "%s=?" */ } - return ts + 21389 /* "ANY(%s)" */ + return ts + 21397 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21397) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21405) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21399) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21407) } Xsqlite3_str_append(tls, pStr, ts+4908, 1) } @@ -129839,7 +129877,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -129874,11 +129912,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21401, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21409, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21407 /* "SEARCH" */ + return ts + 21415 /* "SEARCH" */ } - return ts + 21414 /* "SCAN" */ + return ts + 21422 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -129888,30 +129926,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10853 /* "PRIMARY KEY" */ + zFmt = ts + 10861 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21419 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21427 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21452 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21460 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21477 /* "COVERING INDEX %..." */ + zFmt = ts + 21485 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21495 /* "INDEX %s" */ + zFmt = ts + 21503 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21504, 7) + Xsqlite3_str_append(tls, bp+64, ts+21512, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp uint8 - var zRowid uintptr = ts + 16166 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21512, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16174 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21520, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = uint8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21543, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21551, libc.VaList(bp+32, zRowid)) cRangeOp = uint8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = uint8('>') @@ -129919,9 +129957,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = uint8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21553, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21561, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21558, + Xsqlite3_str_appendf(tls, bp+64, ts+21566, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -129940,7 +129978,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -129958,22 +129996,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21585, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21593, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21606, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21614, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21373, 5) + Xsqlite3_str_append(tls, bp+24, ts+21381, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21384, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21392, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4908, 1) @@ -130023,7 +130061,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -130056,7 +130094,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -130089,7 +130127,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -130127,7 +130165,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -130202,7 +130240,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130395,7 +130433,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -130432,6 +130470,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -130515,7 +130554,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -130556,7 +130595,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -130584,10 +130623,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -130604,7 +130643,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -130624,7 +130663,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -130646,7 +130685,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -130711,7 +130750,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -130757,7 +130796,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -130767,6 +130806,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -130799,7 +130841,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -130870,7 +130912,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -130932,53 +130973,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -130986,8 +131026,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -131623,6 +131663,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -131637,7 +131685,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -131654,7 +131704,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21614, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21622, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -131673,7 +131723,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21629, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21637, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -132021,24 +132071,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -132060,7 +132110,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -132102,14 +132152,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -132129,7 +132179,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -132156,7 +132206,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132328,7 +132378,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132433,18 +132483,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 16015, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15337, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14863, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21638, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16023, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15345, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14871, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21646, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -132452,7 +132502,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -132461,7 +132511,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -132492,7 +132542,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -132625,7 +132675,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -132944,7 +132994,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 uint8 var aff2 uint8 var pColl uintptr @@ -132973,7 +133023,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -133008,7 +133058,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -133046,7 +133096,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -133087,7 +133137,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -133150,7 +133200,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21645, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21653, 0) return } } @@ -133334,7 +133384,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21686 /* "NOCASE" */ + return ts + 21694 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -133455,7 +133505,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -133478,7 +133528,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -133502,7 +133552,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -133554,7 +133604,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -133604,7 +133654,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -133617,7 +133667,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -133677,7 +133727,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -133707,7 +133757,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -133717,14 +133767,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -133741,7 +133791,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -133753,7 +133803,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133778,7 +133828,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21693, + Xsqlite3ErrorMsg(tls, pParse, ts+21701, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -133837,7 +133887,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -133867,16 +133917,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -133886,7 +133936,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -133911,7 +133961,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x20>>5) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -133932,7 +133982,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x20>>5) != 0) { @@ -133953,14 +134003,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -133979,19 +134029,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x80 >> 7) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{}))) } @@ -134001,7 +134051,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -134078,7 +134128,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -134098,14 +134148,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -134116,7 +134166,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -134220,7 +134270,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -134242,7 +134292,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -134297,7 +134347,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -134327,7 +134377,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -134348,7 +134398,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -134369,7 +134419,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -134439,7 +134489,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -134456,7 +134506,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -134499,7 +134549,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -134533,7 +134583,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -134619,7 +134669,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21729, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21737, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -134700,7 +134750,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21755 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21763 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -134891,7 +134941,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -134967,7 +135017,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -134991,7 +135046,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -135217,7 +135272,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -135244,7 +135299,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135282,7 +135337,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -135421,7 +135476,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -135434,7 +135489,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -135478,7 +135533,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -135593,7 +135648,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>7)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -135901,7 +135956,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -135910,7 +135965,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -135930,7 +135985,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) @@ -135947,13 +136002,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -135974,7 +136029,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -136000,7 +136055,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -136044,7 +136099,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -136103,7 +136158,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -136192,7 +136247,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -136299,7 +136354,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -136402,7 +136457,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -136470,7 +136525,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -136830,7 +136885,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -136872,7 +136927,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -136947,7 +137002,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -137232,7 +137287,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -137256,7 +137311,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -137358,7 +137413,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137431,7 +137486,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21766, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21774, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -137480,7 +137535,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -137503,7 +137558,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -137526,7 +137581,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -137552,7 +137607,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -137581,7 +137636,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -137717,7 +137772,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -137842,7 +137897,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -137894,7 +137949,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21792, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21800, 0) rc = SQLITE_OK } else { goto __3 @@ -137930,7 +137985,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -138298,7 +138353,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x10 >> 4) } @@ -138306,7 +138361,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -138353,7 +138408,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -138668,7 +138723,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21827, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21835, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -138760,7 +138815,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -138867,7 +138922,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -138878,7 +138933,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -138924,7 +138979,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -138999,7 +139054,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -139111,7 +139166,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -139175,7 +139230,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21845, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21853, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -139255,7 +139310,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21873, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21881, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -139796,7 +139851,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -140013,6 +140068,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -140194,7 +140251,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -140203,7 +140260,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -140219,13 +140276,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140235,7 +140292,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140253,9 +140310,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -140318,10 +140375,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21891, -1) + pCtx, ts+21899, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140331,7 +140388,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -140344,7 +140401,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -140358,7 +140415,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140371,7 +140428,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140384,7 +140441,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -140394,7 +140451,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -140402,7 +140459,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -140420,7 +140477,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -140430,7 +140487,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -140438,7 +140495,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -140452,13 +140509,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -140467,14 +140524,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21947, -1) + pCtx, ts+21955, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -140482,7 +140539,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -140508,10 +140565,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -140526,7 +140583,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -140540,7 +140597,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140548,7 +140605,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -140564,17 +140621,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 21992)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22003)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22014)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22019)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22032)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22042)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22048)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22059)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22069)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22081)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22000)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22011)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22022)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22027)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22040)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22050)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22056)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22067)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22077)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22089)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22094 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -140583,7 +140640,7 @@ var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22086 /* "lag" */)) /* sqlite3.c: // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -140591,7 +140648,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -140606,7 +140663,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -140625,9 +140682,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140638,7 +140695,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22090, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22098, libc.VaList(bp, zName)) } return p } @@ -140658,7 +140715,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -140682,12 +140739,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22109, 0) + ts+22117, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22180, 0) + ts+22188, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -140726,16 +140783,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -140834,7 +140891,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -140858,7 +140915,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -140890,7 +140947,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -140936,7 +140993,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -140944,14 +141001,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22243, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22251, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -140961,12 +141018,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -141142,7 +141202,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -141153,7 +141213,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -141168,7 +141228,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -141181,7 +141241,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -141193,7 +141253,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -141226,7 +141286,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22269, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22277, 0) goto windowAllocErr __2: ; @@ -141262,7 +141322,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -141281,7 +141341,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141292,15 +141352,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22301 /* "PARTITION clause" */ + zErr = ts + 22309 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22318 /* "ORDER BY clause" */ + zErr = ts + 22326 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22334 /* "frame specificat..." */ + zErr = ts + 22342 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22354, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22362, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -141315,7 +141375,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -141323,7 +141383,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22387, 0) + ts+22395, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -141334,7 +141394,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -141354,7 +141414,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -141394,7 +141454,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -141470,7 +141530,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -141499,17 +141559,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22434, - ts + 22487, - ts + 21891, - ts + 22538, - ts + 22590, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22442, + ts + 22495, + ts + 21899, + ts + 22546, + ts + 22598, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -141534,19 +141594,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -141582,7 +141642,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -141689,7 +141749,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -141725,7 +141785,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -141832,7 +141892,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -141915,7 +141975,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -141950,7 +142010,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -141975,7 +142035,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -142012,7 +142072,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -142135,7 +142195,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -142283,7 +142343,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -142314,7 +142374,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142339,7 +142399,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142687,7 +142747,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -143084,17 +143144,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -143104,7 +143164,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -143123,19 +143183,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22640, + Xsqlite3ErrorMsg(tls, pParse, ts+22648, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } - return ts + 22682 /* "LIMIT" */ + return ts + 22690 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22688, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22696, 0) } } @@ -143143,7 +143203,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -143155,7 +143215,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -143193,7 +143253,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -143207,14 +143267,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22722, + Xsqlite3ErrorMsg(tls, pParse, ts+22730, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -143282,7 +143342,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -143551,7 +143611,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -143779,7 +143839,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -143839,7 +143899,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -143882,7 +143942,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -143942,7 +144002,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -144144,7 +144204,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -144166,9 +144226,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -144177,9 +144237,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -144189,7 +144249,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -144204,7 +144264,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -144363,7 +144423,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -144371,7 +144431,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -144394,7 +144454,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -144434,7 +144494,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -144445,7 +144505,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -144455,7 +144515,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22760, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22768, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -144464,7 +144524,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -144887,7 +144947,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -145294,7 +145354,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -145306,7 +145366,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -145451,21 +145511,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16166, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16174, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16079, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16087, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22782, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22790, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -146201,7 +146261,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22809) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22817) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -146352,7 +146412,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -146847,21 +146907,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+22842, 0) + ts+22850, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22937, 0) + ts+22945, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23021, 0) + ts+23029, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -147301,7 +147361,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -147311,9 +147371,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22818, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22826, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23106, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23114, 0) } //*********** End %syntax_error code ***************************************** @@ -147321,7 +147381,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -147351,7 +147411,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -147405,7 +147465,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -147456,7 +147516,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -147542,7 +147602,7 @@ var zKWText = [666]uint8{ uint8('W'), uint8('S'), uint8('U'), uint8('N'), uint8('B'), uint8('O'), uint8('U'), uint8('N'), uint8('D'), uint8('E'), uint8('D'), uint8('U'), uint8('N'), uint8('I'), uint8('O'), uint8('N'), uint8('U'), uint8('S'), uint8('I'), uint8('N'), uint8('G'), uint8('V'), uint8('A'), uint8('C'), uint8('U'), uint8('U'), uint8('M'), uint8('V'), uint8('I'), uint8('E'), uint8('W'), uint8('I'), uint8('N'), uint8('D'), uint8('O'), uint8('W'), uint8('B'), uint8('Y'), uint8('I'), uint8('N'), uint8('I'), uint8('T'), uint8('I'), uint8('A'), uint8('L'), uint8('L'), uint8('Y'), uint8('P'), uint8('R'), uint8('I'), uint8('M'), uint8('A'), uint8('R'), uint8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -147555,7 +147615,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -147572,7 +147632,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -147587,7 +147647,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -147603,7 +147663,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -147636,7 +147696,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -147769,7 +147829,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -147947,7 +148007,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147956,7 +148016,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -147965,11 +148025,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -147992,13 +148052,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -148048,7 +148108,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148065,7 +148125,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148079,7 +148139,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -148092,7 +148152,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -148454,7 +148514,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -148524,7 +148584,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23123, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23131, libc.VaList(bp, bp+2464)) break } } @@ -148547,7 +148607,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3614, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23148, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23156, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -148644,7 +148704,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -148747,7 +148807,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23159, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23167, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -148760,11 +148820,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19827, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19835, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23166, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23174, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23171, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23179, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -148777,9 +148837,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23181, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23189, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23185, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23193, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -148821,12 +148881,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -148858,7 +148918,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -148870,11 +148930,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -148887,14 +148947,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -148907,14 +148967,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -148945,7 +149005,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -149071,7 +149131,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -149110,7 +149170,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -149118,7 +149178,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -149388,7 +149448,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -149486,13 +149546,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149511,7 +149571,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -149540,7 +149600,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -149619,11 +149679,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -149645,7 +149705,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -149658,7 +149718,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -149672,7 +149732,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -149688,39 +149748,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -149735,7 +149795,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -149750,7 +149810,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -149777,7 +149837,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -149793,14 +149853,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -149824,7 +149884,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23193, 0) + ts+23201, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -149837,7 +149897,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -149874,11 +149934,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -149888,7 +149948,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -149998,7 +150058,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -150048,24 +150108,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23261 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23269 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23275 /* "abort due to ROL..." */ + zErr = ts + 23283 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23297 /* "another row avai..." */ + zErr = ts + 23305 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23319 /* "no more rows ava..." */ + zErr = ts + 23327 /* "no more rows ava..." */ break } @@ -150083,36 +150143,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23342, - ts + 23355, + ts + 23350, + ts + 23363, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23371, - ts + 23396, - ts + 23410, - ts + 23429, + ts + 23379, + ts + 23404, + ts + 23418, + ts + 23437, ts + 1470, - ts + 23454, - ts + 23491, - ts + 23503, - ts + 23518, - ts + 23551, - ts + 23569, - ts + 23594, - ts + 23623, + ts + 23462, + ts + 23499, + ts + 23511, + ts + 23526, + ts + 23559, + ts + 23577, + ts + 23602, + ts + 23631, /* SQLITE_EMPTY */ uintptr(0), ts + 5799, ts + 5285, - ts + 23640, - ts + 23658, - ts + 23676, + ts + 23648, + ts + 23666, + ts + 23684, /* SQLITE_NOLFS */ uintptr(0), - ts + 23710, + ts + 23718, /* SQLITE_FORMAT */ uintptr(0), - ts + 23731, - ts + 23757, - ts + 23780, - ts + 23801, -} /* sqlite3.c:169926:20 */ + ts + 23739, + ts + 23765, + ts + 23788, + ts + 23809, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -150121,7 +150181,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -150144,8 +150204,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -150154,7 +150214,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -150172,7 +150232,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -150185,7 +150245,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -150201,7 +150261,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -150215,7 +150275,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ libc.AtomicStoreNInt32(db+432, int32(1), 0) } @@ -150223,7 +150283,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -150233,7 +150293,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -150296,7 +150356,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23817, 0) + ts+23825, 0) return SQLITE_BUSY } else { @@ -150343,7 +150403,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -150385,22 +150445,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -150425,7 +150485,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150434,7 +150494,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23880, libc.VaList(bp, zName)) + ts+23888, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -150449,7 +150509,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -150475,7 +150535,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150493,7 +150553,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -150514,7 +150574,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150532,7 +150592,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150545,7 +150605,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150558,7 +150618,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150571,7 +150631,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -150583,7 +150643,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -150599,7 +150659,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -150617,7 +150677,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -150630,7 +150690,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -150641,7 +150701,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150670,7 +150730,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23931, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23939, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -150691,7 +150751,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -150715,7 +150775,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -150757,19 +150817,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -150791,7 +150851,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150803,7 +150863,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -150832,18 +150892,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150851,9 +150911,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -150861,7 +150921,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -150871,13 +150931,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -150895,7 +150955,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint }() } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -150905,7 +150965,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23952, 0) + ts+23960, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -150958,7 +151018,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -150970,7 +151030,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -151017,7 +151077,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -151050,7 +151110,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24020, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24028, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -151098,10 +151158,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24026, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24034, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24036, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24044, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -151223,7 +151283,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24064, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24072, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -151234,17 +151294,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24068, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24076, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24068 /* "cache" */ + zModeType = ts + 24076 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24074, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24082, zOpt, uint64(4)) == 0) { goto __32 } @@ -151283,7 +151343,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24079, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24087, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -151291,7 +151351,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24099, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24107, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -151334,7 +151394,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24123, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24131, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -151355,24 +151415,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24139, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24146, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24147, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24154, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24154, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24157, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24160, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17261, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24162, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24165, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24168, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17269, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*uint8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -151388,7 +151448,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -151540,10 +151600,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21686, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21694, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24164, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24172, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -151572,7 +151632,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -151629,7 +151689,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6332 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23166 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23174 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -151728,17 +151788,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -151749,7 +151809,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24170 /* "\x00\x00" */ + zFilename = ts + 24178 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, func() uint8 { @@ -151780,12 +151840,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -151797,7 +151857,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -151820,7 +151880,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -151831,7 +151891,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -151842,7 +151902,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -151850,7 +151910,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -151863,28 +151923,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24173, + Xsqlite3_log(tls, iErr, ts+24181, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24198) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24206) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24218) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24226) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24225) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24233) } // This is a convenience routine that makes sure that all thread-specific @@ -151892,12 +151952,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -152063,7 +152123,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24242, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24250, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -152081,7 +152141,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -152096,7 +152156,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -152109,7 +152169,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -152154,7 +152214,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -152613,7 +152673,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -152622,7 +152682,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+uint64(1)) return p + uintptr(n) + uintptr(1) @@ -152635,7 +152695,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -152666,7 +152726,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -152683,7 +152743,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -152692,7 +152752,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -152709,7 +152769,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -152719,7 +152779,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -152740,14 +152800,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -152760,7 +152820,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -152769,7 +152829,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -152784,7 +152844,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152795,7 +152855,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -152806,7 +152866,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152829,7 +152889,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -152872,7 +152932,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -152893,7 +152953,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -152902,7 +152962,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152914,7 +152974,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24270, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24278, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -152932,7 +152992,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -152977,11 +153037,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -152994,7 +153054,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -153004,13 +153064,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -153034,7 +153094,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -153077,7 +153137,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24278 /* "database is dead..." */ + return ts + 24286 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -153089,7 +153149,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -153115,7 +153175,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153219,7 +153279,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -153824,7 +153884,7 @@ var jsonIsSpace = [256]uint8{ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -153836,10 +153896,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]uint8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -153847,9 +153907,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -153862,9 +153922,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -153872,8 +153932,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24301, ts + 24307, -} /* sqlite3.c:193131:19 */ + ts + 6132, ts + 6646, ts + 6651, ts + 6142, ts + 6137, ts + 7892, ts + 24309, ts + 24315, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -153887,7 +153947,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]uint8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -153895,7 +153955,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -153903,7 +153963,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -153911,7 +153971,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -153919,7 +153979,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -153952,7 +154012,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -153964,7 +154024,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -153977,7 +154037,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -153986,7 +154046,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c uint8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -154001,7 +154061,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -154052,7 +154112,7 @@ __10: *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0' + int32(c)>>4) - c = uint8(*(*uint8)(unsafe.Pointer(ts + 24314 + uintptr(int32(c)&0xf)))) + c = uint8(*(*uint8)(unsafe.Pointer(ts + 24322 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -154072,11 +154132,11 @@ __4: var aSpecial = [32]uint8{ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8('b'), uint8('t'), uint8('n'), uint8(0), uint8('f'), uint8('r'), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -154109,7 +154169,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24331, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24339, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -154120,7 +154180,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -154147,7 +154207,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -154156,7 +154216,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -154166,7 +154226,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -154174,7 +154234,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -154276,7 +154336,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -154291,14 +154351,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z)))))<<12 + @@ -154309,7 +154369,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154590,7 +154650,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -154612,7 +154672,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -154627,7 +154687,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -154643,7 +154703,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c uint8 var j U32 var iThis int32 @@ -154870,7 +154930,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -154895,7 +154955,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24360, -1) + Xsqlite3_result_error(tls, pCtx, ts+24368, -1) } } jsonParseReset(tls, pParse) @@ -154906,7 +154966,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -154937,7 +154997,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) @@ -154957,7 +155017,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -155014,7 +155074,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -155037,7 +155097,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -155212,7 +155272,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*uint8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -155223,7 +155283,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24375, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24383, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -155236,11 +155296,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24379, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24387, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -155251,7 +155311,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155303,18 +155363,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24405, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24413, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -155345,7 +155405,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155362,7 +155422,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155385,7 +155445,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -155435,7 +155495,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155469,11 +155529,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24448, uint32(2)) + jsonAppendRaw(tls, bp, ts+24456, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4949, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24451, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24459, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -155529,7 +155589,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -155602,7 +155662,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -155634,7 +155694,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -155646,14 +155706,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24454, -1) + ts+24462, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, uint8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24505, -1) + Xsqlite3_result_error(tls, ctx, ts+24513, -1) jsonReset(tls, bp) return } @@ -155673,7 +155733,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155742,7 +155802,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155761,7 +155821,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15270) + jsonWrongNumArgs(tls, ctx, ts+15278) return __2: ; @@ -155825,7 +155885,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -155850,9 +155910,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24539 /* "set" */ + return ts + 24547 /* "set" */ } - return ts + 24543 /* "insert" */ + return ts + 24551 /* "insert" */ }()) return __2: @@ -155923,7 +155983,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -155947,7 +156007,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -155961,7 +156021,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -155977,7 +156037,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -156002,16 +156062,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24550, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24558, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -156019,7 +156079,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -156061,7 +156121,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -156083,7 +156143,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -156107,16 +156167,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24553, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24561, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -156136,16 +156196,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -156160,7 +156220,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24556) + ts+24564) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -156173,13 +156233,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -156193,7 +156253,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -156204,7 +156264,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -156217,7 +156277,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -156226,13 +156286,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -156283,7 +156343,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -156300,19 +156360,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24639, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24647, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -156401,10 +156461,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24639, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24647, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24644, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24652, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -156428,7 +156488,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24650 /* "$" */ + zRoot = ts + 24658 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -156446,7 +156506,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -156456,7 +156516,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156531,7 +156591,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156560,7 +156620,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24360, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24368, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -156636,7 +156696,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -156650,36 +156710,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24652}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24657}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24668}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24686}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24699}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24702}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24706}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24718}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24730}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24741}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24752}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24764}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24777}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24796}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24807}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24824}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24660}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24665}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24676}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24694}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24707}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24710}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24714}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24726}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24738}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24749}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24760}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24772}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24785}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24804}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24815}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24832}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -156695,9 +156755,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24842 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24852 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24850 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24860 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -156744,7 +156804,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -156758,7 +156818,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -156779,9 +156839,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -156789,23 +156849,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -156814,20 +156874,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -156835,17 +156895,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -156871,28 +156931,28 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = U32(*(*U8)(unsafe.Pointer(p)))<<24 + U32(*(*U8)(unsafe.Pointer(p + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(p + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(p + 3)))<<0 } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ return I64(U64(*(*U8)(unsafe.Pointer(p)))<<56 + U64(*(*U8)(unsafe.Pointer(p + 1)))<<48 + U64(*(*U8)(unsafe.Pointer(p + 2)))<<40 + U64(*(*U8)(unsafe.Pointer(p + 3)))<<32 + U64(*(*U8)(unsafe.Pointer(p + 4)))<<24 + U64(*(*U8)(unsafe.Pointer(p + 5)))<<16 + U64(*(*U8)(unsafe.Pointer(p + 6)))<<8 + U64(*(*U8)(unsafe.Pointer(p + 7)))<<0) } // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ var i U32 // p is always 4-byte aligned @@ -156904,7 +156964,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 40 & int64(0xFF)) @@ -156917,7 +156977,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -156925,20 +156985,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -156946,7 +157006,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -156955,7 +157015,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -156970,7 +157030,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -156986,7 +157046,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -156995,7 +157055,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -157027,11 +157087,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24862, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24870, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24870, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24878, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -157105,7 +157165,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -157116,7 +157176,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -157129,7 +157189,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -157146,7 +157206,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -157170,7 +157230,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -157196,19 +157256,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -157224,23 +157284,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -157262,13 +157322,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -157276,7 +157336,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24875, + ts+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -157295,7 +157355,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -157313,7 +157373,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -157343,7 +157403,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -157359,7 +157419,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -157376,7 +157436,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -157488,7 +157548,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157586,7 +157646,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157641,7 +157701,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -157657,7 +157717,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -157676,7 +157736,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -157693,7 +157753,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -157713,7 +157773,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -157724,7 +157784,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -157741,7 +157801,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -157775,7 +157835,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -157811,7 +157871,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -157859,7 +157919,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -157952,7 +158012,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -157968,7 +158028,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157983,7 +158043,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -158044,7 +158104,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -158065,12 +158125,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24957) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24965) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -158097,7 +158157,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -158240,7 +158300,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -158347,7 +158407,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -158390,7 +158450,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -158411,7 +158471,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -158450,7 +158510,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -158465,7 +158525,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -158478,7 +158538,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -158553,7 +158613,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -158609,7 +158669,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -158645,7 +158705,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -158653,7 +158713,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -158675,7 +158735,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -158723,7 +158783,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -158779,7 +158839,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -158878,7 +158938,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -158912,7 +158972,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -159147,7 +159207,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -159182,7 +159242,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159232,7 +159292,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -159263,7 +159323,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -159292,7 +159352,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -159407,7 +159467,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -159437,7 +159497,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -159468,7 +159528,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -159479,7 +159539,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -159568,7 +159628,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -159582,7 +159642,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -159607,7 +159667,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -159615,7 +159675,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24971, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24979, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -159627,12 +159687,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24991, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24999, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25023, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25031, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -159646,7 +159706,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -159875,7 +159935,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -159884,7 +159944,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -159892,7 +159952,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -159900,7 +159960,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25060, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25068, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -159921,7 +159981,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -159934,11 +159994,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25205 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25213 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -159946,7 +160006,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11225, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11233, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -159978,7 +160038,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -159989,8 +160049,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25261, ts + 5011, ts + 16166, -} /* sqlite3.c:199185:21 */ + ts + 25269, ts + 5011, ts + 16174, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -160014,9 +160074,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -160033,19 +160093,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25266, + ts+25274, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25328, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25336, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25333, + ts+25341, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25397, + ts+25405, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25467, + ts+25475, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -160076,7 +160136,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25516 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25524 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -160088,7 +160148,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25624, + ts+25632, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -160096,18 +160156,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25669, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25677, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12696, 1) + Xsqlite3_str_append(tls, p, ts+12704, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25696, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25704, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25718, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25726, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25726, 0) + Xsqlite3_str_appendf(tls, p, ts+25734, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -160123,24 +160183,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25742, - ts + 25795, + ts + 25750, + ts + 25803, - ts + 25840, - ts + 25892, - ts + 25946, + ts + 25848, + ts + 25900, + ts + 25954, - ts + 25991, - ts + 26049, - ts + 26104, -} /* sqlite3.c:199232:21 */ + ts + 25999, + ts + 26057, + ts + 26112, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160171,7 +160231,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160179,7 +160239,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26151, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26159, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -160191,7 +160251,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26171, + ts+26179, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -160199,7 +160259,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26228, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26236, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -160209,7 +160269,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160224,7 +160284,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -160250,10 +160310,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26263, - ts + 26306, - ts + 26341, - ts + 26377, + ts + 26271, + ts + 26314, + ts + 26349, + ts + 26385, } // Aux columns counted by a u8 @@ -160290,7 +160350,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26414, + Xsqlite3_str_appendf(tls, pSql, ts+26422, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -160302,7 +160362,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26438, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26446, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -160325,7 +160385,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -160424,7 +160484,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26455, ts + 26466} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -160440,7 +160500,7 @@ var azFormat = [2]uintptr{ts + 26447, ts + 26458} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -160484,11 +160544,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10805, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26468, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26476, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26474, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26482, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26478, 1) + Xsqlite3_str_append(tls, pOut, ts+26486, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -160503,11 +160563,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26480, -1) + Xsqlite3_result_error(tls, ctx, ts+26488, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -160535,15 +160595,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -160556,7 +160616,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160584,7 +160644,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160596,7 +160656,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26513, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26521, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4013 /* "\n" */ @@ -160624,7 +160684,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -160632,7 +160692,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26520, + ts+26528, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -160651,7 +160711,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26565, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26573, libc.VaList(bp+16, iNode)) } } @@ -160668,15 +160728,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26597, - ts + 26651, + ts + 26605, + ts + 26659, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -160691,23 +160751,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26699, + rtreeCheckAppendMsg(tls, pCheck, ts+26707, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26761, + ts+26769, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26744 /* "%_rowid" */ + return ts + 26752 /* "%_rowid" */ } - return ts + 26752 /* "%_parent" */ + return ts + 26760 /* "%_parent" */ }(), iKey, iVal)) } } @@ -160724,7 +160784,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -160750,7 +160810,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26819, libc.VaList(bp, i, iCell, iNode)) + ts+26827, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -160770,7 +160830,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26867, libc.VaList(bp+24, i, iCell, iNode)) + ts+26875, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -160782,7 +160842,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -160793,14 +160853,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26934, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26942, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26968, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26976, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -160808,7 +160868,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26998, + ts+27006, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -160836,20 +160896,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27053, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27061, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27084, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27092, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -160859,7 +160919,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -160879,13 +160939,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14432, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14440, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27151, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27159, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -160895,12 +160955,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24971, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24979, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27179, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27187, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -160915,8 +160975,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27210, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27217, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27218, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27225, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -160926,7 +160986,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27225, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27233, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -160966,13 +161026,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27229, -1) + ts+27237, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -160990,7 +161050,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17803 /* "ok" */ + return ts + 17811 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -161029,7 +161089,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -161055,7 +161115,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -161077,7 +161137,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -161094,7 +161154,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -161104,10 +161164,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -161117,7 +161177,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -161126,7 +161186,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:200274:13: // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161198,7 +161258,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -161340,7 +161400,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161409,7 +161469,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161422,7 +161482,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161431,11 +161491,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27280, 1) + Xsqlite3_str_append(tls, x, ts+27288, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27282, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27290, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27293, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27301, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161445,7 +161505,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -161459,19 +161519,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep uint8 = uint8('\'') - Xsqlite3_str_appendf(tls, x, ts+27304, 0) + Xsqlite3_str_appendf(tls, x, ts+27312, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27322, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = uint8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27338, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27346, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27342, 0) + Xsqlite3_str_appendf(tls, x, ts+27350, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -161491,7 +161551,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -161524,7 +161584,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -161544,7 +161604,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -161563,7 +161623,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -161599,7 +161659,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -161619,7 +161679,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161664,7 +161724,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -161805,7 +161865,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -161818,13 +161878,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -161858,7 +161918,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -161885,7 +161945,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -161926,7 +161986,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -161964,7 +162024,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -161996,10 +162056,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -162010,20 +162070,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -162057,7 +162117,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -162069,7 +162129,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -162099,7 +162159,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -162129,7 +162189,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -162164,7 +162224,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -162194,7 +162254,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162430,7 +162490,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -162446,7 +162506,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -162456,7 +162516,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -162496,7 +162556,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27355, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27363, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -162505,7 +162565,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27377, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27385, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -162513,7 +162573,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26444, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26452, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -162571,12 +162631,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -162590,7 +162650,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -162757,7 +162817,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -162783,7 +162843,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16166 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16174 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -162793,7 +162853,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27381 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27389 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -162801,14 +162861,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27387 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27395 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -162873,7 +162933,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -162940,7 +163000,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27396, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27404, 0) __4: ; goto geopoly_update_end @@ -163084,15 +163144,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27436) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27444) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27452) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27460) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -163125,9 +163185,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -163157,7 +163217,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27467, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27475, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -163169,26 +163229,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27475 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27488 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27501 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27514 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27452 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27526 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27436 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27549 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27563 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27576 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27590 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27606 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27483 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27496 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27509 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27522 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27460 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27534 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27444 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27557 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27571 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27584 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27598 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27614 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27618 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27626 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -163196,30 +163256,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27637, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27645, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27647, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27655, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27658, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27666, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27381, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27389, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27669, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27677, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -163233,7 +163293,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -163242,7 +163302,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -163263,7 +163323,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -163291,13 +163351,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24957, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24965, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163317,7 +163377,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -163773,7 +163833,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -164174,7 +164234,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164239,7 +164299,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -164301,7 +164361,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -164333,9 +164393,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -164350,16 +164410,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -164367,9 +164427,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -164388,16 +164448,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -164416,7 +164476,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -164439,7 +164499,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -164459,7 +164519,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164549,7 +164609,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -164574,7 +164634,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -164591,7 +164651,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) return } @@ -164602,7 +164662,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27679, -1) + Xsqlite3_result_error(tls, context, ts+27687, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -164617,7 +164677,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164635,7 +164695,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164659,7 +164719,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -164674,7 +164734,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -164692,7 +164752,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -164722,7 +164782,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -164736,7 +164796,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -164745,7 +164805,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27700, uintptr(0), uintptr(0), p+64) + ts+27708, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -164817,7 +164877,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -164829,7 +164889,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24870, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24878, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -164847,7 +164907,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164857,9 +164917,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27871, libc.VaList(bp, func() uintptr { + ts+27879, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28021 /* "AND rootpage!=0 ..." */ + return ts + 28029 /* "AND rootpage!=0 ..." */ } return ts + 1534 /* "" */ }()))) @@ -164867,7 +164927,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28062) + ts+28070) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -164882,7 +164942,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -164908,7 +164968,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -164934,7 +164994,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -164951,7 +165011,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -164974,7 +165034,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -164997,7 +165057,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -165047,7 +165107,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165068,7 +165128,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+28187, libc.VaList(bp, zTab))) + ts+28195, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -165086,7 +165146,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+28306, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28314, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -165104,7 +165164,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28327, libc.VaList(bp+16, zIdx))) + ts+28335, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -165128,7 +165188,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28378, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28386, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -165167,7 +165227,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -165177,7 +165237,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -165192,7 +165252,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -165225,7 +165285,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -165242,7 +165302,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19353, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19361, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -165255,18 +165315,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28456, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28464, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28475, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28483, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28480, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28488, zName) { bRbuRowid = 1 } } @@ -165278,12 +165338,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28490, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28498, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28519 /* "may not have" */ + return ts + 28527 /* "may not have" */ } - return ts + 28532 /* "requires" */ + return ts + 28540 /* "requires" */ }())) } @@ -165292,7 +165352,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28541, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28549, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -165306,7 +165366,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28563, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28571, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -165347,7 +165407,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165356,8 +165416,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+28590, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14543 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28598, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14551 /* ", " */ } return zList } @@ -165366,7 +165426,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -165378,7 +165438,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+28599, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28607, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -165408,7 +165468,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -165417,25 +165477,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28612, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28620, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28644, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28652, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+28667) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28673, ts+28680, ts+4908) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+28675) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28681, ts+28688, ts+4908) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28688, + ts+28696, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28730, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28738, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -165467,7 +165527,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -165498,7 +165558,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -165535,7 +165595,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ __7: ; goto __5 @@ -165544,13 +165604,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28758, + zLhs = rbuMPrintf(tls, p, ts+28766, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28779, + zOrder = rbuMPrintf(tls, p, ts+28787, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28815, + zSelect = rbuMPrintf(tls, p, ts+28823, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ iCol++ goto __1 __2: @@ -165569,7 +165629,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28842, + Xsqlite3_mprintf(tls, ts+28850, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -165596,8 +165656,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28890, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14543 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28898, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14551 /* ", " */ goto __15 __15: iCol++ @@ -165609,7 +165669,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28897, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28905, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -165648,7 +165708,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -165666,7 +165726,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -165678,7 +165738,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28909, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28917, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1534 /* "" */ } else { @@ -165692,37 +165752,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28750 /* "_rowid_" */ + zCol = ts + 28758 /* "_rowid_" */ } else { - zCol = ts + 28480 /* "rbu_rowid" */ + zCol = ts + 28488 /* "rbu_rowid" */ } zType = ts + 1099 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+28931, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28939, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28667 + return ts + 28675 } return ts + 1534 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28951, + zImpPK = Xsqlite3_mprintf(tls, ts+28959, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28972, + zImpCols = Xsqlite3_mprintf(tls, ts+28980, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29005, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29013, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14543 /* ", " */ - zAnd = ts + 21373 /* " AND " */ + zCom = ts + 14551 /* ", " */ + zAnd = ts + 21381 /* " AND " */ nBind++ } @@ -165759,7 +165819,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -165770,11 +165830,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29029, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29037, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29041, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29049, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14543 /* ", " */ + zS = ts + 14551 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -165783,7 +165843,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29050, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29058, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -165797,24 +165857,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29065, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29073, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1534 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29079, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29087, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21381 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29091, libc.VaList(bp+40, zList)) + ts+29099, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1534 /* "" */ @@ -165822,8 +165882,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29141, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21373 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21381 /* " AND " */ } } } @@ -165835,9 +165895,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29154, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29162, 0) } // Return a nul-terminated string containing the comma separated list of @@ -165855,7 +165915,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -165870,17 +165930,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29141, + zList = rbuMPrintf(tls, p, ts+29149, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29180, + zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29210, + zList = rbuMPrintf(tls, p, ts+29218, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } } @@ -165901,7 +165961,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -165931,26 +165991,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29247 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29255 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28399, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28407, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16054) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16062) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp+8, zIdx))) } break } @@ -165963,15 +166023,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28667 /* " DESC" */ + zDesc = ts + 28675 /* " DESC" */ } else { zDesc = ts + 1534 /* "" */ } - z = rbuMPrintf(tls, p, ts+29260, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14543 /* ", " */ + z = rbuMPrintf(tls, p, ts+29268, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14551 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29271, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29279, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -165994,7 +166054,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -166011,7 +166071,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29275) + ts+29283) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -166020,7 +166080,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28427, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28435, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -166030,23 +166090,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29325, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29333, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29347, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29355, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28667 /* " DESC" */ + return ts + 28675 /* " DESC" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29357, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29365, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29372, + ts+29380, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) } @@ -166070,7 +166130,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -166092,32 +166152,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29434 /* "PRIMARY KEY " */ + zPk = ts + 29442 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29447, + zSql = rbuMPrintf(tls, p, ts+29455, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29474 /* " NOT NULL" */ + return ts + 29482 /* " NOT NULL" */ } return ts + 1534 /* "" */ }())) - zComma = ts + 14543 /* ", " */ + zComma = ts + 14551 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29484, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29492, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29491, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29499, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) @@ -166134,7 +166194,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -166144,12 +166204,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29538, + ts+29546, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -166171,7 +166231,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -166181,7 +166241,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29595) + ts+29603) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -166279,7 +166339,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -166291,7 +166351,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29661, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29669, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -166315,7 +166375,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29681, + ts+29689, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, 0, 0)) @@ -166324,14 +166384,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+29746, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29754, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+29782, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29790, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -166348,7 +166408,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29816, + ts+29824, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -166356,9 +166416,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }() } return ts + 1534 /* "" */ @@ -166367,21 +166427,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29887, + ts+29895, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29948, + ts+29956, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29877 /* "AND" */ + return ts + 29885 /* "AND" */ } - return ts + 29881 /* "WHERE" */ + return ts + 29889 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -166419,17 +166479,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1534 } - return ts + 30107 + return ts + 30115 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+30116, + ts+30124, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30152 /* ", _rowid_" */ + return ts + 30160 /* ", _rowid_" */ } return ts + 1534 /* "" */ }(), zBindings))) @@ -166441,28 +166501,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30162, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30170, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30190 /* ", rbu_rowid" */ + zRbuRowid = ts + 30198 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30202, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30210, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30278 /* ", 0 AS rbu_rowid" */ + return ts + 30286 /* ", 0 AS rbu_rowid" */ } return ts + 1534 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30295, + ts+30303, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -166470,7 +166530,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30594, + ts+30602, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -166484,9 +166544,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30693 /* ",_rowid_ " */ + zRbuRowid = ts + 30701 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30703 /* ",rbu_rowid" */ + zRbuRowid = ts + 30711 /* ",rbu_rowid" */ } } @@ -166499,20 +166559,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28750, 0) + zOrder = rbuMPrintf(tls, p, ts+28758, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14543, ts+1534) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1534, ts+14551, ts+1534) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+30714, + ts+30722, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30762 /* "0 AS " */ + return ts + 30770 /* "0 AS " */ } return ts + 1534 /* "" */ }(), @@ -166525,7 +166585,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19707 /* "ORDER BY" */ + return ts + 19715 /* "ORDER BY" */ } return ts + 1534 /* "" */ }(), zOrder, @@ -166554,7 +166614,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -166605,9 +166665,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1534 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30107 /* "rbu_imp_" */ + zPrefix = ts + 30115 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30768, + zUpdate = Xsqlite3_mprintf(tls, ts+30776, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -166620,7 +166680,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166643,7 +166703,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -166659,7 +166719,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -166675,7 +166735,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30798, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30806, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -166743,7 +166803,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -166755,21 +166815,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30828, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30836, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30855, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30863, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+48, ts+3237, uint64(4)) } else { libc.Xmemcpy(tls, p+48, ts+6332, uint64(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30873, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30881, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -166809,11 +166869,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30939, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30947, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24020, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24028, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*uint8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -166825,13 +166885,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30971, + zTarget = Xsqlite3_mprintf(tls, ts+30979, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6332), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ } - return ts + 31003 /* "&" */ + return ts + 31011 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1534 /* "" */ @@ -166850,21 +166910,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31005, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31013, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31020, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31028, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31037, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31045, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -166872,7 +166932,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6332, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -166883,7 +166943,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31081, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31089, 0) } } @@ -166905,7 +166965,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -166913,7 +166973,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -166946,7 +167006,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -166954,7 +167014,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31053, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31061, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166988,7 +167048,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31099, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31107, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -167038,7 +167098,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -167424,7 +167484,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31173) + ts+31181) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -167437,7 +167497,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31195, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31203, libc.VaList(bp, iCookie+1)) } } } @@ -167445,7 +167505,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -167462,7 +167522,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31222, + ts+31230, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -167500,16 +167560,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31380, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31388, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31395, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31403, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -167519,18 +167579,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31415, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31423, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31440) + ts+31448) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167544,12 +167604,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31548) + ts+31556) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+31613) + ts+31621) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -167561,7 +167621,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31657, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31665, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -167569,7 +167629,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167583,8 +167643,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17139) - rbuCopyPragma(tls, p, ts+16250) + rbuCopyPragma(tls, p, ts+17147) + rbuCopyPragma(tls, p, ts+16258) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -167595,7 +167655,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31682, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31690, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -167621,10 +167681,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -167712,7 +167772,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -167730,7 +167790,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -167745,7 +167805,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31710, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31718, 0) } if rc == SQLITE_OK { @@ -167760,11 +167820,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31159, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31167, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -167779,7 +167839,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -167788,7 +167848,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]uint8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31735, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31743, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -167800,7 +167860,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -167810,7 +167870,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167827,7 +167887,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31746, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31754, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -167859,7 +167919,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167870,7 +167930,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31818, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31826, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -167878,7 +167938,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31832) + ts+31840) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -167890,7 +167950,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31889) + ts+31897) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -167901,7 +167961,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167973,7 +168033,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31963, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31971, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -167995,12 +168055,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31995, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32003, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32027 /* "vacuum" */ + return ts + 32035 /* "vacuum" */ } - return ts + 32034 /* "update" */ + return ts + 32042 /* "update" */ }())) } } @@ -168008,7 +168068,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14432, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14440, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -168022,14 +168082,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16853) - rbuCopyPragma(tls, p, ts+16265) + rbuCopyPragma(tls, p, ts+16861) + rbuCopyPragma(tls, p, ts+16273) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32041, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32049, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -168039,7 +168099,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6332, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32057, uintptr(0), uintptr(0), p+64) + db, ts+32065, uintptr(0), uintptr(0), p+64) } } @@ -168074,7 +168134,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -168085,7 +168145,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -168093,13 +168153,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32081, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32089, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -168108,7 +168168,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -168124,12 +168184,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30107, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30115, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -168142,13 +168202,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -168162,7 +168222,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -168174,7 +168234,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32089, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32097, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -168207,13 +168267,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -168246,7 +168306,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168264,7 +168324,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -168273,7 +168333,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168292,19 +168352,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14455, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14432 /* "BEGIN" */ + zBegin = ts + 14440 /* "BEGIN" */ } else { - zBegin = ts + 32041 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32049 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32041, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32049, uintptr(0), uintptr(0), uintptr(0)) } } @@ -168371,7 +168431,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -168388,7 +168448,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -168406,7 +168466,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -168428,7 +168488,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -168453,7 +168513,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -168468,7 +168528,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -168500,7 +168560,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -168509,20 +168569,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168586,7 +168646,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -168625,7 +168685,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -168639,7 +168699,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -168653,7 +168713,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -168673,7 +168733,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168693,7 +168753,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -168701,7 +168761,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -168709,7 +168769,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168736,7 +168796,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32116, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32124, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -168761,7 +168821,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32139, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32147, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -168772,7 +168832,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168780,7 +168840,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -168788,7 +168848,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -168821,7 +168881,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168878,13 +168938,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -168907,7 +168967,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -168949,7 +169009,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32150, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32158, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -168993,10 +169053,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -169005,7 +169065,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169050,7 +169110,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -169058,7 +169118,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -169068,7 +169128,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -169076,7 +169136,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -169084,7 +169144,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -169093,7 +169153,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -169102,7 +169162,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -169110,7 +169170,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -169118,13 +169178,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -169138,7 +169198,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -169199,17 +169259,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -169292,7 +169352,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -169363,7 +169423,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -169373,16 +169433,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -169396,13 +169456,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -169410,13 +169470,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -169426,13 +169486,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -169445,7 +169505,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -169453,7 +169513,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -169475,7 +169535,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -169563,7 +169623,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -169574,7 +169634,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -169597,14 +169657,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -169614,7 +169674,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -169627,7 +169687,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169693,7 +169753,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169719,7 +169779,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169762,7 +169822,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -169801,7 +169861,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -169840,7 +169900,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -169867,7 +169927,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -169942,7 +170002,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -170030,7 +170090,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -170094,7 +170154,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170111,13 +170171,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11225, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11233, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32161, 0) + ts+32169, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1534, 0) } else { @@ -170130,7 +170190,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32282, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32290, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -170225,7 +170285,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170242,7 +170302,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11225, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -170261,15 +170321,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170285,7 +170345,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170301,21 +170361,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -170429,7 +170489,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -170725,7 +170785,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -170760,7 +170820,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170795,25 +170855,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170833,24 +170893,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -170858,13 +170918,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -170880,7 +170940,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170890,9 +170950,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32311, + zRet = Xsqlite3_mprintf(tls, ts+32319, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ if zRet == uintptr(0) { break } @@ -170902,7 +170962,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -170915,9 +170975,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32345, + ts+32353, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32386 /* " OR " */ + zSep = ts + 32394 /* " OR " */ if zRet == uintptr(0) { break } @@ -170932,18 +170992,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32391, + ts+32399, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170971,7 +171031,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -170983,7 +171043,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32469, + ts+32477, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -171008,7 +171068,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171121,7 +171181,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32522, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32530, 0) __16: ; rc = SQLITE_SCHEMA @@ -171181,7 +171241,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -171217,7 +171277,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -171239,7 +171299,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171277,7 +171337,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -171289,7 +171349,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -171340,7 +171400,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -171385,7 +171445,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -171408,7 +171468,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -171419,7 +171479,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -171430,7 +171490,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -171443,7 +171503,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr)) @@ -171457,7 +171517,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171474,7 +171534,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -171495,7 +171555,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171555,7 +171615,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171661,7 +171721,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171718,7 +171778,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -171726,10 +171786,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11225, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11233, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32549, libc.VaList(bp, zDb)) + ts+32557, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -171738,18 +171798,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1534 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32659, bp+24) + sessionAppendStr(tls, bp+8, ts+32667, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1547, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+32674, bp+24) + sessionAppendStr(tls, bp+8, ts+32682, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+32682, bp+24) + sessionAppendStr(tls, bp+8, ts+32690, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -171769,7 +171829,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -171847,7 +171907,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -171868,7 +171928,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -171890,7 +171950,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32688, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32696, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -171988,7 +172048,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32708, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32716, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -171998,7 +172058,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -172010,7 +172070,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -172018,7 +172078,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -172030,7 +172090,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -172038,7 +172098,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -172050,7 +172110,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -172063,7 +172123,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -172077,12 +172137,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -172108,12 +172168,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -172146,28 +172206,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -172185,7 +172245,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172218,7 +172278,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172243,7 +172303,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -172279,7 +172339,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -172297,7 +172357,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -172322,7 +172382,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -172364,7 +172424,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172383,7 +172443,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -172410,7 +172470,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172452,7 +172512,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172472,7 +172532,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -172507,7 +172567,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -172564,13 +172624,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -172640,7 +172700,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -172671,7 +172731,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172691,14 +172751,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -172712,7 +172772,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -172731,7 +172791,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -172753,7 +172813,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -172777,7 +172837,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -172794,7 +172854,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -172806,7 +172866,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -172823,7 +172883,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -173059,7 +173119,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -173110,7 +173170,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -173125,7 +173185,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -173147,9 +173207,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -173171,9 +173231,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -173181,7 +173241,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173242,7 +173302,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11225) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11233) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -173254,24 +173314,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32726, bp+16) + sessionAppendStr(tls, bp, ts+32734, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32739, bp+16) + sessionAppendStr(tls, bp, ts+32747, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32745, bp+16) + sessionAppendStr(tls, bp, ts+32753, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14543 /* ", " */ + zSep = ts + 14551 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1534 /* "" */ - sessionAppendStr(tls, bp, ts+32674, bp+16) + sessionAppendStr(tls, bp, ts+32682, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -173279,13 +173339,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32750, bp+16) + ts+32758, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32682, bp+16) + sessionAppendStr(tls, bp, ts+32690, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } @@ -173315,7 +173375,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -173343,7 +173403,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173353,34 +173413,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32825, bp+16) + sessionAppendStr(tls, bp, ts+32833, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32674, bp+16) + sessionAppendStr(tls, bp, ts+32682, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32745, bp+16) + sessionAppendStr(tls, bp, ts+32753, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21373 /* " AND " */ + zSep = ts + 21381 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32843, bp+16) + sessionAppendStr(tls, bp, ts+32851, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32386, bp+16) + sessionAppendStr(tls, bp, ts+32394, bp+16) zSep = ts + 1534 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32682, bp+16) + sessionAppendStr(tls, bp, ts+32690, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32851 /* "AND " */ + zSep = ts + 32859 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4908, bp+16) @@ -173405,7 +173465,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6332, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -173417,7 +173477,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173425,19 +173485,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32856, bp+16) + sessionAppendStr(tls, bp, ts+32864, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21379, bp+16) + sessionAppendStr(tls, bp, ts+21387, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14543, bp+16) + sessionAppendStr(tls, bp, ts+14551, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32874, bp+16) + sessionAppendStr(tls, bp, ts+32882, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32885, bp+16) + sessionAppendStr(tls, bp, ts+32893, bp+16) } sessionAppendStr(tls, bp, ts+4908, bp+16) @@ -173448,7 +173508,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -173456,24 +173516,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11225, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11233, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32889) + ts+32897) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33002) + ts+33010) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -173500,7 +173560,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173521,7 +173581,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -173545,7 +173605,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173589,7 +173649,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173661,7 +173721,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -173761,7 +173821,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -173896,7 +173956,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173918,7 +173978,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33146, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33154, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -173934,7 +173994,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33167, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33175, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -173943,7 +174003,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -173997,7 +174057,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -174015,10 +174075,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33186, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33194, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33212, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33220, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -174088,20 +174148,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33242, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33250, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33286, + ts+33294, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33357, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33365, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11225) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11233) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -174159,14 +174219,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33417, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33425, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33471, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33447, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33479, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) } } @@ -174188,7 +174248,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174206,7 +174266,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174214,7 +174274,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174229,7 +174289,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -174237,7 +174297,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -174409,7 +174469,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -174540,7 +174600,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -174594,7 +174654,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -174609,7 +174669,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174627,12 +174687,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174649,12 +174709,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -174662,7 +174722,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174686,7 +174746,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174713,7 +174773,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -174754,7 +174814,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -174816,7 +174876,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -174954,7 +175014,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -174969,7 +175029,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174984,7 +175044,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175000,7 +175060,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175016,7 +175076,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -175024,7 +175084,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -175112,7 +175172,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -175174,13 +175234,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -175218,14 +175278,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -175240,7 +175300,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -175251,7 +175311,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -175261,19 +175321,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -175306,7 +175366,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -175317,16 +175377,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -175341,7 +175401,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -175352,7 +175412,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -175369,7 +175429,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -175378,7 +175438,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -175397,7 +175457,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -175408,7 +175468,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -175424,7 +175484,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -175433,7 +175493,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -175445,9 +175505,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -175457,25 +175517,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -175483,17 +175543,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -175598,7 +175658,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -175671,7 +175731,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -175686,23 +175746,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -175739,9 +175799,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -175750,9 +175810,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -175762,7 +175822,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -175781,7 +175841,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -175797,7 +175857,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -175855,7 +175915,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -175863,7 +175923,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -175876,7 +175936,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -175900,7 +175960,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -175924,7 +175984,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -175935,7 +175995,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -175945,7 +176005,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33499, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33507, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -175954,7 +176014,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -176003,7 +176063,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -176036,7 +176096,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -176048,7 +176108,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176258,7 +176318,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176268,14 +176328,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33535, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -176304,7 +176364,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176359,7 +176419,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -176422,7 +176482,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -176473,11 +176533,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -176520,7 +176580,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{}))) @@ -176553,12 +176613,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -176567,7 +176627,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -176575,7 +176635,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33558, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33566, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -176583,7 +176643,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176638,7 +176698,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -176649,7 +176709,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33565 /* "wrong number of ..." */ + var zErr uintptr = ts + 33573 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -176698,19 +176758,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -176734,7 +176794,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -176763,7 +176823,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -176821,7 +176881,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -176830,7 +176890,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -176853,7 +176913,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33615 /* "wrong number of ..." */ + var zErr uintptr = ts + 33623 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -177045,17 +177105,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -177066,7 +177126,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -177160,7 +177220,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -177228,18 +177288,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33663, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33671, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33679, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33681, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33689, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -177264,7 +177324,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -177279,7 +177339,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -177305,7 +177365,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -177317,21 +177377,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -177349,7 +177409,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -177361,7 +177421,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -177379,7 +177439,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -177395,26 +177455,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177476,14 +177536,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -177495,7 +177555,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -177507,9 +177567,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177526,7 +177586,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -177547,7 +177607,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -177572,7 +177632,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -177597,13 +177657,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177612,7 +177672,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177658,7 +177718,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -177690,18 +177750,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { @@ -177714,7 +177774,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(p))) != 0 { p++ @@ -177725,11 +177785,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*uint8)(unsafe.Pointer(p))) { case 'n': @@ -177818,7 +177878,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q uint8 var iIn int32 = 1 var iOut int32 = 0 @@ -177863,7 +177923,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote uint8 // Quote character (if any ) quote = *(*uint8)(unsafe.Pointer(z)) @@ -177876,11 +177936,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -177908,13 +177968,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33686, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33694, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -177941,14 +178001,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*uint8)(unsafe.Pointer(p))) < '0' || int32(*(*uint8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33693, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33701, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33724, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33732, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177959,7 +178019,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33757, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33765, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -177972,7 +178032,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33794, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33802, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -177981,7 +178041,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33811, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -178000,7 +178060,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33836, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33844, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -178015,14 +178075,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33870, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33878, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33878, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33886, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*uint8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33910, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33918, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -178030,9 +178090,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33916, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33924, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33930, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33938, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -178040,9 +178100,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33968, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33976, zCmd, nCmd) == 0 { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || int32(*(*uint8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33987, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -178053,25 +178113,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5026, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7905, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17244}, - {FzName: ts + 34014, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17252}, + {FzName: ts + 34022, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34022, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34030, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34053, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34061, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -178089,7 +178149,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -178123,20 +178183,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+22014) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16166) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34081, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22022) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16174) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34111) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34119) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34121, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34129, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -178146,7 +178206,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -178154,13 +178214,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34152, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34160, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34157, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34165, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34164, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34172, libc.VaList(bp+16, i)) } } } @@ -178179,7 +178239,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -178208,8 +178268,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22014) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34172, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22022) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34180, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -178243,7 +178303,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34201, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34209, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -178284,19 +178344,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33870 /* "content" */ + zTail = ts + 33878 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34221 /* "docsize" */ + zTail = ts + 34229 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34229, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34237, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16166, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16174, -1) } // Formulate the zContentExprlist text @@ -178312,7 +178372,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -178337,7 +178397,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -178345,18 +178405,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34240, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34248, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1534 } - return ts + 14543 + return ts + 14551 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34256, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34264, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34263, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22014)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34271, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22022)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -178387,7 +178447,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -178401,7 +178461,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -178428,7 +178488,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178492,13 +178552,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34289) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34297) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -178508,7 +178568,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34294) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34302) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -178518,7 +178578,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34303) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34311) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -178531,7 +178591,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34313) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34321) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -178541,7 +178601,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34323) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34331) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -178557,7 +178617,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22014) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22022) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -178580,11 +178640,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34335 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34343 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -178607,7 +178667,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34367) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34375) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -178622,7 +178682,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34375, + ts+34383, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -178657,7 +178717,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -178676,9 +178736,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -178690,12 +178750,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178757,7 +178817,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34440, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34448, 0) return FTS5_EOF } } @@ -178770,20 +178830,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34460, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34468, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34491, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34499, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34494, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34502, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29877, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29885, uint64(3)) == 0 { tok = FTS5_AND } break @@ -178795,15 +178855,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -178881,7 +178941,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -178956,7 +179016,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -178968,7 +179028,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -178976,7 +179036,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -179017,7 +179077,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -179039,7 +179099,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -179203,7 +179263,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -179428,11 +179488,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -179440,7 +179500,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -179452,9 +179512,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -179471,7 +179531,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -179673,7 +179733,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -179693,7 +179753,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179720,7 +179780,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179777,7 +179837,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179843,7 +179903,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -179859,7 +179919,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -179868,7 +179928,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -179894,7 +179954,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -179913,7 +179973,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -179981,7 +180041,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -180040,7 +180100,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -180059,7 +180119,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -180077,7 +180137,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -180093,7 +180153,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -180119,7 +180179,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -180169,7 +180229,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -180181,7 +180241,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -180211,7 +180271,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -180227,7 +180287,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -180280,7 +180340,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -180342,7 +180402,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -180374,7 +180434,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -180390,15 +180450,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180408,7 +180468,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -180433,7 +180493,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -180445,7 +180505,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -180505,12 +180565,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180579,12 +180639,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -180595,12 +180655,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -180617,7 +180677,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180675,7 +180735,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180770,17 +180830,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34498, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34506, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33527, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33535, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180792,7 +180852,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c uint8 = *(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34503, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34511, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -180811,7 +180871,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -180849,7 +180909,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -180871,7 +180931,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180889,7 +180949,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20376, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20384, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -180910,7 +180970,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -180925,7 +180985,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -180949,7 +181009,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -180977,21 +181037,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34532, 0) + ts+34540, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -181042,7 +181102,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte)) @@ -181062,7 +181122,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -181105,7 +181165,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181165,12 +181225,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34585, + ts+34593, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34635 /* "phrase" */ + return ts + 34643 /* "phrase" */ } - return ts + 34498 /* "NEAR" */ + return ts + 34506 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -181193,7 +181253,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -181239,7 +181299,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -181252,7 +181312,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -181262,7 +181322,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -181271,7 +181331,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -181292,7 +181352,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -181316,12 +181376,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -181331,7 +181391,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -181366,7 +181426,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -181394,7 +181454,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -181405,7 +181465,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -181455,12 +181515,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -181511,7 +181571,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -181527,14 +181587,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -181562,7 +181622,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -181571,7 +181631,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -181585,7 +181645,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181594,7 +181654,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -181605,7 +181665,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -181635,7 +181695,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -181684,7 +181744,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -181843,7 +181903,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181889,7 +181949,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -181931,7 +181991,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -181965,20 +182025,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -182204,7 +182264,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -182412,14 +182472,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -182427,17 +182487,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -182451,18 +182511,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -182484,18 +182544,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -182512,9 +182572,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -182522,38 +182582,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -182561,7 +182621,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -182579,7 +182639,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -182603,7 +182663,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182614,7 +182674,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -182626,7 +182686,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -182653,7 +182713,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34642, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34650, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -182699,11 +182759,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -182715,7 +182775,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -182730,7 +182790,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182741,7 +182801,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+34648, + ts+34656, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -182758,7 +182818,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182769,7 +182829,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34699, + ts+34707, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -182783,7 +182843,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182793,7 +182853,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+34748, + ts+34756, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -182805,7 +182865,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -182816,22 +182876,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -182842,7 +182902,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -182884,7 +182944,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182977,7 +183037,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -182997,7 +183057,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -183020,7 +183080,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183048,7 +183108,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183057,7 +183117,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+34788, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34796, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -183081,7 +183141,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -183098,7 +183158,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -183112,7 +183172,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183165,14 +183225,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -183215,7 +183275,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -183264,7 +183324,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183300,7 +183360,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -183321,7 +183381,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -183334,7 +183394,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -183342,11 +183402,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -183367,7 +183427,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183429,7 +183489,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -183452,12 +183512,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -183467,7 +183527,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -183509,16 +183569,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -183548,7 +183608,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183577,7 +183637,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183622,7 +183682,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -183654,7 +183714,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183688,7 +183748,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -183710,7 +183770,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -183751,7 +183811,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183810,7 +183870,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -183860,7 +183920,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -183868,7 +183928,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183897,7 +183957,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -184002,7 +184062,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -184127,7 +184187,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -184227,7 +184287,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -184255,7 +184315,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -184489,7 +184549,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184497,7 +184557,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+34811, + ts+34819, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -184508,7 +184568,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -184578,7 +184638,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -184634,7 +184694,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -184649,7 +184709,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -184701,7 +184761,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -184731,7 +184791,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -184781,7 +184841,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -184792,7 +184852,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -184815,7 +184875,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -184855,7 +184915,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -184866,7 +184926,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184905,7 +184965,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184930,12 +184990,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -184954,7 +185014,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -184971,21 +185031,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -184995,7 +185055,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185021,7 +185081,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185101,7 +185161,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -185157,7 +185217,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -185208,7 +185268,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185269,7 +185329,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185277,7 +185337,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -185297,7 +185357,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -185305,7 +185365,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185321,7 +185381,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -185383,7 +185443,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -185405,7 +185465,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -185450,7 +185510,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -185653,7 +185713,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -185686,7 +185746,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -185694,13 +185754,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -185719,7 +185779,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -185732,7 +185792,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -185774,7 +185834,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -185787,7 +185847,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -185797,7 +185857,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -185818,7 +185878,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) @@ -185837,7 +185897,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -185859,7 +185919,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -185892,7 +185952,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -185902,7 +185962,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -185915,7 +185975,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185931,7 +185991,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -185991,7 +186051,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -186027,14 +186087,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -186110,7 +186170,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -186139,7 +186199,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186168,7 +186228,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -186192,7 +186252,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186213,7 +186273,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+34895, + ts+34903, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -186232,7 +186292,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186301,13 +186361,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -186466,7 +186526,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186516,7 +186576,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -186533,7 +186593,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186550,7 +186610,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -186559,14 +186619,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186591,7 +186651,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -186769,7 +186829,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -186778,7 +186838,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -186839,7 +186899,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186873,7 +186933,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186898,12 +186958,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -186930,7 +186990,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186962,7 +187022,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -186972,13 +187032,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186995,7 +187055,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187051,11 +187111,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -187066,7 +187126,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -187079,7 +187139,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -187244,7 +187304,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -187391,7 +187451,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -187411,7 +187471,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -187422,7 +187482,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -187433,7 +187493,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -187452,7 +187512,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187463,13 +187523,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34952, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34960, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24870, ts+34960, 0, pzErr) + pConfig, ts+24878, ts+34968, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11365, - ts+34995, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11373, + ts+35003, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -187486,7 +187546,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -187507,7 +187567,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -187534,7 +187594,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -187556,7 +187616,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -187580,7 +187640,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187663,7 +187723,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -187671,7 +187731,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187691,14 +187751,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187716,7 +187776,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -187729,7 +187789,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -187751,7 +187811,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -187759,7 +187819,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -187768,7 +187828,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187781,7 +187841,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34642, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34650, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -187790,7 +187850,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -187804,7 +187864,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -187824,7 +187884,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -187843,7 +187903,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187902,7 +187962,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -187918,7 +187978,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35039, + ts+35047, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -188071,7 +188131,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -188130,7 +188190,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35125) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35133) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -188161,13 +188221,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -188200,7 +188260,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -188222,7 +188282,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -188230,9 +188290,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -188261,35 +188321,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -188323,21 +188383,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -188347,13 +188407,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -188371,7 +188431,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188429,11 +188489,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -188442,14 +188502,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -188520,7 +188580,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188541,7 +188601,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR } @@ -188682,7 +188742,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -188693,7 +188753,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -188719,7 +188779,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -188732,11 +188792,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -188779,7 +188839,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -188796,7 +188856,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188806,7 +188866,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -188840,7 +188900,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -188860,7 +188920,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -188889,7 +188949,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -188948,7 +189008,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188976,7 +189036,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -189005,11 +189065,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35169, + ts+35177, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14543 /* ", " */ + return ts + 14551 /* ", " */ } return ts + 1534 /* "" */ }(), @@ -189021,9 +189081,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35224 /* "DESC" */ + return ts + 35232 /* "DESC" */ } - return ts + 35229 /* "ASC" */ + return ts + 35237 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -189043,7 +189103,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -189058,7 +189118,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189074,13 +189134,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35233, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35241, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+5008, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35239, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35247, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -189090,7 +189150,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -189103,7 +189163,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -189115,7 +189175,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35267, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35275, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -189147,7 +189207,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35277, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35285, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -189156,7 +189216,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -189179,21 +189239,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35298, libc.VaList(bp, z)) + ts+35306, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33681 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33689 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -189212,7 +189272,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189252,7 +189312,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35130, 0) + ts+35138, 0) return SQLITE_ERROR __1: ; @@ -189487,7 +189547,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35331, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35339, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -189533,7 +189593,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -189544,7 +189604,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -189558,7 +189618,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -189588,7 +189648,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189632,7 +189692,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -189654,7 +189714,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189662,29 +189722,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35367, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35375, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35378, 0) + ts+35386, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35458, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35466, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35466, 0) + ts+35474, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16833, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16841, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35522, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35530, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35528, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35536, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -189703,7 +189763,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -189713,7 +189773,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -189736,7 +189796,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -189758,7 +189818,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17378, z) { + 0 == Xsqlite3_stricmp(tls, ts+17386, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -189783,12 +189843,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35544, + ts+35552, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20277 /* "UPDATE" */ + return ts + 20285 /* "UPDATE" */ } - return ts + 35581 /* "DELETE from" */ + return ts + 35589 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -189838,7 +189898,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -189850,7 +189910,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -189859,7 +189919,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -189867,7 +189927,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -189875,46 +189935,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -189931,7 +189991,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -189988,7 +190048,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -190072,7 +190132,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -190082,7 +190142,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -190098,11 +190158,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -190114,7 +190174,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -190172,7 +190232,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190210,7 +190270,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -190232,7 +190292,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190254,7 +190314,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190277,7 +190337,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190310,7 +190370,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190391,10 +190451,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190430,7 +190490,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -190439,7 +190499,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -190449,7 +190509,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190462,7 +190522,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35593, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35601, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -190472,7 +190532,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -190494,7 +190554,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -190558,7 +190618,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -190598,7 +190658,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -190617,12 +190677,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -190630,7 +190690,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190639,7 +190699,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -190648,7 +190708,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -190657,7 +190717,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -190688,7 +190748,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -190717,7 +190777,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -190735,7 +190795,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -190751,7 +190811,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -190767,7 +190827,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35614, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35622, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -190786,7 +190846,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35636, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35644, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -190802,7 +190862,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -190828,28 +190888,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35667) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35675) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35680, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35688, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -190860,10 +190920,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35771, ts + 33870, ts + 24870, ts + 34221, ts + 11365, -} /* sqlite3.c:234311:21 */ + ts + 35779, ts + 33878, ts + 24878, ts + 34229, ts + 11373, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -190884,7 +190944,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35778, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35786, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -190902,13 +190962,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35778, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35786, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35783, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35791, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -190946,7 +191006,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -190955,7 +191015,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -190963,7 +191023,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -190974,20 +191034,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35798, - ts + 35866, - ts + 35935, + ts + 35806, + ts + 35874, + ts + 35943, - ts + 35968, - ts + 36007, - ts + 36047, - ts + 36086, - ts + 36127, + ts + 35976, + ts + 36015, + ts + 36055, + ts + 36094, + ts + 36135, - ts + 36166, + ts + 36174, - ts + 36208, - ts + 36248, + ts + 36216, + ts + 36256, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -191064,7 +191124,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -191086,79 +191146,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36271, + ts+36279, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36375, + ts+36383, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36413, + ts+36421, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36451, + ts+36459, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24870, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11365, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35771, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24878, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11373, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35779, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34221, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34229, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33870, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33878, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36493, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36501, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29523 /* " WITHOUT ROWID" */ + return ts + 29531 /* " WITHOUT ROWID" */ } return ts + 1534 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36523, + ts+36531, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -191171,7 +191231,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191200,27 +191260,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36567, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36575, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36590, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36598, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33870, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33878, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34221, ts+36596, 0, pzErr) + pConfig, ts+34229, ts+36604, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35771, ts+36628, 1, pzErr) + pConfig, ts+35779, ts+36636, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -191232,7 +191292,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -191251,12 +191311,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -191273,7 +191333,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -191342,7 +191402,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191369,7 +191429,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -191383,7 +191443,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -191407,7 +191467,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191448,7 +191508,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -191460,12 +191520,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36645, + ts+36653, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36695, + ts+36703, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -191475,12 +191535,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34367, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34375, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -191544,15 +191604,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -191563,7 +191623,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191585,7 +191645,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191617,7 +191677,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -191662,7 +191722,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -191670,7 +191730,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36724, + zSql = Xsqlite3_mprintf(tls, ts+36732, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -191697,13 +191757,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191769,7 +191829,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -191867,14 +191927,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33870, bp+48) + rc = fts5StorageCount(tls, p, ts+33878, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34221, bp+56) + rc = fts5StorageCount(tls, p, ts+34229, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -191894,7 +191954,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -191908,7 +191968,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -191918,7 +191978,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -191936,7 +191996,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191967,7 +192027,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -191985,7 +192045,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -192002,7 +192062,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -192016,12 +192076,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192076,13 +192136,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*uint8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -192092,12 +192152,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -192113,9 +192173,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36756) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36764) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36775) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -192132,7 +192192,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(aIn + uintptr(i))) @@ -192144,7 +192204,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -192225,7 +192285,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -192235,11 +192295,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -192294,7 +192354,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -192316,7 +192376,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -192326,7 +192386,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*uint8)(unsafe.Pointer(z)) != 0 { @@ -192346,7 +192406,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -192357,7 +192417,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36778 /* "L* N* Co" */ + var zCat uintptr = ts + 36786 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -192370,7 +192430,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36787) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36795) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -192381,18 +192441,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36798) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36806) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '2' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*uint8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36756) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36764) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36767) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36775) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36787) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36795) { // no-op } else { rc = SQLITE_ERROR @@ -192414,12 +192474,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -192675,7 +192735,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]uint8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -192684,10 +192744,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -192698,7 +192758,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192706,7 +192766,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36816 /* "unicode61" */ + var zBase uintptr = ts + 36824 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -192751,9 +192811,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -192763,15 +192823,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -192792,12 +192852,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -192807,7 +192867,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -192817,7 +192877,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -192835,14 +192895,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*uint8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -192857,13 +192917,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36826, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192871,11 +192931,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36829, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36837, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192883,7 +192943,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36839, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192891,7 +192951,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192899,11 +192959,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36845, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36853, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -192911,19 +192971,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36855, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36863, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36859, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36867, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36865, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36870, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192931,11 +192991,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36882, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36878, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36886, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -192943,7 +193003,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36881, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192951,11 +193011,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36885, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -192963,22 +193023,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36901, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -192986,34 +193030,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36909, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36885, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36913, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36908, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36911, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36915, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36901, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36923, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -193023,143 +193083,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36926, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36934, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36933, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36941, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36938, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36829, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36837, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36948, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36901, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36953, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36961, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15379, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15387, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36958, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36966, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36962, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36970, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36967, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36870, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36878, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36973, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36981, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36977, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36985, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36987, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36901, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36985, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36909, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36993, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37001, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37004, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37012, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36897, uint64(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37026, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36905, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37030, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37034, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36901, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37038, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37046, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36897, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36905, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36911, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36919, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -193169,22 +193229,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37057, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37062, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37070, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -193192,21 +193252,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37067, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37073, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36842, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36850, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37026, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37034, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -193214,7 +193274,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37087, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -193222,9 +193282,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37085, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -193234,18 +193294,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37091, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37099, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37095, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37103, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37098, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -193254,7 +193314,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37101, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -193271,7 +193331,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -193287,7 +193347,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193385,7 +193445,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -193406,20 +193466,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -193430,7 +193490,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37105) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37113) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -193450,7 +193510,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -193603,7 +193663,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -193617,27 +193677,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36816, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36824, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37120, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37128, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37126, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37134, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37133, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37141, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -193663,7 +193723,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -193686,7 +193746,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -193757,7 +193817,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -193776,7 +193836,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -193837,7 +193897,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -193895,7 +193955,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -193907,9 +193967,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*uint8)(unsafe.Pointer(zCat))) { case 'C': @@ -194106,7 +194166,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -194285,7 +194345,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -194464,9 +194524,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -194506,7 +194566,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -194538,7 +194598,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -194613,7 +194673,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -194789,7 +194849,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -194835,7 +194895,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -194848,7 +194908,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -194908,7 +194968,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -194948,7 +195008,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -194969,9 +195029,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -194979,7 +195039,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -194987,14 +195047,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37141) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37145) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37153) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37149) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37157) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37158, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37166, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -195004,14 +195064,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -195036,24 +195096,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 37192, - ts + 37232, - ts + 37267, + ts + 37200, + ts + 37240, + ts + 37275, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23166, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23174, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37310, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37318, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -195106,11 +195166,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -195124,7 +195184,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -195192,7 +195252,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -195205,11 +195265,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37343, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37351, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37374, + ts+37382, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -195233,7 +195293,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37425, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37433, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -195259,7 +195319,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -195273,7 +195333,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -195282,7 +195342,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195313,7 +195373,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -195342,7 +195402,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -195486,7 +195546,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -195560,12 +195620,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -195638,16 +195698,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37451, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37459, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -195664,7 +195724,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -195691,966 +195751,966 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37461 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37469 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off64_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, X__mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 584 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr - }{libc.Xmremap})) // sqlite3.c:35283:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmremap})) // sqlite3.c:35292:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_openbsd_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_openbsd_amd64.go index 88141012..8c256f45 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_openbsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_openbsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_openbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_openbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -1812,7 +1812,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -1920,8 +1920,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2847,7 +2847,7 @@ type X__float128 = float64 /* :47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -4784,7 +4784,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -4809,7 +4809,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -4828,12 +4828,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -4862,7 +4862,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -4970,7 +4970,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5076,7 +5076,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -5182,7 +5182,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -5257,7 +5257,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -5322,7 +5322,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -5347,7 +5347,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -5363,7 +5363,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -5386,7 +5386,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -5560,7 +5560,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -5719,7 +5719,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -5736,12 +5736,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -5775,7 +5775,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -5795,7 +5795,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -5815,7 +5815,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -5859,7 +5859,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -5896,7 +5896,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -5916,13 +5916,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -5952,7 +5952,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -5965,7 +5965,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -5986,13 +5986,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -6002,13 +6002,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6210,7 +6210,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -6412,7 +6412,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -6466,7 +6466,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -6498,22 +6498,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -6533,7 +6533,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -6547,7 +6547,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ // // END OF REGISTRATION API @@ -7168,7 +7168,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -7176,7 +7176,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -7977,13 +7977,13 @@ type Max_align_t = struct { // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -7994,7 +7994,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -8017,12 +8017,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -8045,7 +8045,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -8187,13 +8187,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -8201,7 +8201,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -8213,7 +8213,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -8223,7 +8223,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -8237,7 +8237,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -8248,7 +8248,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -8259,7 +8259,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -8269,7 +8269,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -8279,9 +8279,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -8296,7 +8296,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -8316,7 +8316,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -8338,7 +8338,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -8355,17 +8355,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -8380,17 +8380,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -8421,7 +8421,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -8431,7 +8431,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -8444,7 +8444,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -8463,10 +8463,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -8477,7 +8477,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -8488,9 +8488,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -8572,14 +8572,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -8598,21 +8598,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -8622,9 +8622,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -8635,9 +8635,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -8645,7 +8645,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -8670,14 +8670,14 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -8688,9 +8688,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -8716,15 +8716,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -8754,7 +8754,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -8763,14 +8763,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -8786,7 +8786,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -8796,7 +8796,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -8814,7 +8814,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -8827,7 +8827,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -8845,7 +8845,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -8859,7 +8859,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -8868,7 +8868,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -8878,9 +8878,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -8909,9 +8909,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -8945,7 +8945,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -8953,14 +8953,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -8971,7 +8971,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -8998,7 +8998,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -9069,7 +9069,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -9087,7 +9087,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -9158,7 +9158,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -9183,7 +9183,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -9222,7 +9222,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -9233,9 +9233,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -9339,11 +9339,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -9355,7 +9355,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -9383,7 +9383,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -9392,11 +9392,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -9461,7 +9461,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -9479,10 +9479,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -9558,7 +9558,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -9609,7 +9609,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -9703,7 +9703,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -9716,7 +9716,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -9781,7 +9781,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -9804,7 +9804,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -9826,7 +9826,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -9852,7 +9852,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -9876,7 +9876,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -9902,7 +9902,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -9926,7 +9926,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -10055,9 +10055,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1023, ts + 1037, ts + 1050, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -10124,10 +10124,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -10191,7 +10191,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -10250,12 +10250,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -10273,21 +10273,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1063)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1063)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -10303,7 +10303,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1063)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -10311,7 +10311,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -10319,7 +10319,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1070, ts + 1074, @@ -10327,7 +10327,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1083, ts + 1091, ts + 1096, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -10372,10 +10372,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -10398,10 +10398,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -10413,7 +10413,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -10467,7 +10467,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -10532,7 +10532,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -10546,7 +10546,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -10558,13 +10558,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -10575,7 +10575,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -10583,7 +10583,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -10598,7 +10598,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -10610,20 +10610,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -10638,7 +10638,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -10648,7 +10648,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -10662,7 +10662,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -10670,14 +10670,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -10688,12 +10688,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -10711,7 +10711,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -10727,7 +10727,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -10737,7 +10737,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -10749,7 +10749,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -11189,14 +11189,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -11223,7 +11223,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -11280,7 +11280,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -11296,7 +11296,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -11370,7 +11370,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -11423,7 +11423,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -11432,7 +11432,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -11488,7 +11488,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -11539,7 +11539,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -11554,7 +11554,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -11577,7 +11577,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -11606,12 +11606,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -11656,7 +11656,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -11675,13 +11675,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -11711,7 +11711,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -11736,7 +11736,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -11776,7 +11776,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -11804,7 +11804,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1181 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1188 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1195 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -11828,7 +11828,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -12154,7 +12154,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -12195,7 +12195,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -12211,7 +12211,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -12226,7 +12226,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -12275,7 +12275,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -12303,7 +12303,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -12355,7 +12355,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -12499,7 +12499,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -12508,7 +12508,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -12517,7 +12517,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -12526,7 +12526,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -12539,7 +12539,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1327}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1336}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1349}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1367}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1367}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -12591,7 +12591,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -12600,27 +12600,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -12630,27 +12630,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -12663,7 +12663,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -12672,7 +12672,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -12680,7 +12680,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -12692,7 +12692,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -12701,23 +12701,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -12725,18 +12725,18 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // No-op stubs to use when memory-mapped I/O is disabled -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24621:20: */ *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) return SQLITE_OK } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24625:20: */ return SQLITE_OK } // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -12750,7 +12750,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -12760,14 +12760,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -12775,7 +12775,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -12783,25 +12783,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -12818,13 +12818,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -12833,7 +12833,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -12858,7 +12858,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -12878,7 +12878,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -12888,7 +12888,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -12898,11 +12898,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -12924,7 +12924,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -12944,7 +12944,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -12967,7 +12967,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -13012,7 +13012,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -13043,8 +13043,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -13054,7 +13054,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -13063,14 +13063,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -13168,7 +13168,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13191,7 +13191,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ var p uintptr = pPrior p -= 8 @@ -13200,7 +13200,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ var p uintptr p = pPrior @@ -13216,7 +13216,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13238,18 +13238,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -13258,7 +13258,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13273,7 +13273,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -13407,7 +13407,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -13441,7 +13441,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -13451,7 +13451,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -13464,7 +13464,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -13475,7 +13475,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -13484,7 +13484,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -13493,7 +13493,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -13508,7 +13508,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -13547,40 +13547,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -13593,11 +13593,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -13660,7 +13660,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -13673,22 +13673,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -13704,7 +13704,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -13732,7 +13732,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -13749,7 +13749,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -13768,7 +13768,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -13791,12 +13791,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mem0)) + 24)) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -13804,7 +13804,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13819,7 +13819,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -13832,7 +13832,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -13843,7 +13843,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -13890,7 +13890,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13919,7 +13919,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -13929,7 +13929,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -13937,27 +13937,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -13976,7 +13976,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -13987,7 +13987,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -14005,14 +14005,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -14038,7 +14038,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -14046,7 +14046,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -14107,7 +14107,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14117,7 +14117,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -14125,7 +14125,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -14135,7 +14135,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -14147,7 +14147,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -14178,7 +14178,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -14188,7 +14188,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -14226,7 +14226,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -14246,7 +14246,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -14270,7 +14270,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -14284,7 +14284,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -14298,7 +14298,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -14316,7 +14316,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -14329,7 +14329,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -14345,7 +14345,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -14366,7 +14366,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) *(*int32)(unsafe.Pointer(db + 432)) = 0 @@ -14382,7 +14382,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -14401,7 +14401,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -14430,7 +14430,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -14441,18 +14441,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1468)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1501)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1468)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1501)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -14479,7 +14479,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -14490,7 +14490,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -14505,7 +14505,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -14520,7 +14520,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -14532,21 +14532,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -14560,7 +14560,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -14582,7 +14582,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -16075,7 +16075,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1545)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1545)) /* sqlite3.c:29902:29 */ // End of function @@ -16083,7 +16083,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1545)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -16110,7 +16110,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -16125,7 +16125,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -16179,7 +16179,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -16195,7 +16195,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) @@ -16205,7 +16205,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -16217,14 +16217,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -16238,7 +16238,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -16250,7 +16250,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -16268,10 +16268,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -16283,7 +16283,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -16291,7 +16291,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -16299,7 +16299,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -16308,7 +16308,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -16330,7 +16330,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -16341,7 +16341,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -16359,7 +16359,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -16381,7 +16381,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -16393,7 +16393,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -16413,7 +16413,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -16437,7 +16437,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -16452,7 +16452,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -16474,7 +16474,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -16492,7 +16492,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -16504,7 +16504,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -16559,7 +16559,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -16603,10 +16603,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -16685,16 +16685,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -16702,7 +16702,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31989:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31998:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -16724,7 +16724,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32013:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:32022:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -16793,7 +16793,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -16820,7 +16820,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -16847,7 +16847,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -17172,7 +17172,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -17206,7 +17206,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -17238,7 +17238,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -17259,7 +17259,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -17300,7 +17300,7 @@ type Float_t = X__float_t /* math.h:39:19 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -17312,7 +17312,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -17332,7 +17332,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -17344,7 +17344,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { @@ -17359,7 +17359,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -17369,7 +17369,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -17381,7 +17381,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -17392,7 +17392,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -17412,7 +17412,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -17439,7 +17439,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -17470,7 +17470,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -17495,7 +17495,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -17527,7 +17527,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -17547,7 +17547,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -17565,7 +17565,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -17580,7 +17580,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -17592,7 +17592,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -17618,7 +17618,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -17642,7 +17642,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -17658,7 +17658,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -17701,7 +17701,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -18081,7 +18081,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -18122,7 +18122,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -18151,7 +18151,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -18273,7 +18273,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18306,7 +18306,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -18368,7 +18368,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -18381,7 +18381,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -18424,7 +18424,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -18470,7 +18470,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -18493,7 +18493,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -18646,7 +18646,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18714,7 +18714,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -18722,12 +18722,12 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ return uint32(*(*U8)(unsafe.Pointer(p)))<<24 | uint32(int32(*(*U8)(unsafe.Pointer(p + 1)))<<16) | uint32(int32(*(*U8)(unsafe.Pointer(p + 2)))<<8) | uint32(*(*U8)(unsafe.Pointer(p + 3))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ *(*uint8)(unsafe.Pointer(p)) = U8(v >> 24) *(*uint8)(unsafe.Pointer(p + 1)) = U8(v >> 16) *(*uint8)(unsafe.Pointer(p + 2)) = U8(v >> 8) @@ -18737,7 +18737,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -18747,7 +18747,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -18765,7 +18765,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -18786,7 +18786,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1519) @@ -18805,7 +18805,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -18822,7 +18822,7 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB >= int64(0) { @@ -18840,7 +18840,7 @@ func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return 0 } -func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043:20: */ if iB == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { @@ -18855,7 +18855,7 @@ func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 return int32(0) } -func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ var iA I64 = *(*I64)(unsafe.Pointer(pA)) if iB > int64(0) { if iA > (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/iB { @@ -18887,7 +18887,7 @@ func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34 // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -18901,7 +18901,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -18932,11 +18932,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -18959,11 +18959,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -18984,7 +18984,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -19036,7 +19036,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -19075,7 +19075,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -19094,7 +19094,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -19133,7 +19133,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -19144,7 +19144,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -19161,7 +19161,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -19176,7 +19176,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -19213,7 +19213,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -19257,7 +19257,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -19286,11 +19286,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -19319,7 +19319,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -19337,7 +19337,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -19386,7 +19386,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -19576,7 +19576,7 @@ var azName = [185]uintptr{ ts + 3173, ts + 3178, ts + 3186, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -20429,7 +20429,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -20462,7 +20462,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34969:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34978:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -20478,10 +20478,10 @@ type unixShmNode = struct { F__ccgo_pad2 [4]byte FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34970:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34979:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -20500,18 +20500,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34971:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34980:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34972:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34981:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -20533,16 +20533,16 @@ type unixFile = struct { FsectorSize int32 FdeviceCharacteristics int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:34990:9 */ +} /* sqlite3.c:34999:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34990:25 */ +type UnixFile = unixFile /* sqlite3.c:34999:25 */ // This variable holds the process id (pid) from when the xRandomness() // 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:35051:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:35060:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -20565,7 +20565,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:35051:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35142:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:35151:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20580,7 +20580,7 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:35156:8 */ +} /* sqlite3.c:35165:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during @@ -20648,14 +20648,14 @@ var aSyscall = [29]unix_syscall{ {FzName: ts + 3394, FpCurrent: 0}, {FzName: ts + 3400}, -} /* sqlite3.c:35160:3 */ +} /* sqlite3.c:35169: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 // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35330:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:35339:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls) != 0 { return 0 } @@ -20666,7 +20666,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35344:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:35353:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -20703,7 +20703,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35387:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:35396:28: */ var i uint32 _ = pNotUsed @@ -20719,7 +20719,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35406:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:35415:19: */ var i int32 = -1 _ = p @@ -20757,7 +20757,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35447:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:35456:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -20824,14 +20824,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35509:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:35518:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35510:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:35519:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35523:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -20841,7 +20841,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:35514:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35610:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35619:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8)))(tls, h, sz) @@ -20857,7 +20857,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35635:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35644:12: */ switch posixError { case EACCES: @@ -20906,7 +20906,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35677:1 */ +} /* sqlite3.c:35686:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -21008,12 +21008,12 @@ type unixFileId = struct { Fdev Dev_t F__ccgo_pad1 [4]byte Fino U64 -} /* sqlite3.c:34969:9 */ +} /* sqlite3.c:34978:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35968:22 */ // All unixInodeInfo objects @@ -21031,7 +21031,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35959:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35994:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:36003:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -21065,7 +21065,7 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36059:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:36068:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8)))(tls, h) != 0 { unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3201, func() uintptr { @@ -21079,19 +21079,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36070:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:36079:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36086:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36084) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 36093) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -21101,7 +21101,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36077:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36105:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -21135,7 +21135,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36096:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36133:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:36142:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -21194,7 +21194,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36234:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -21211,7 +21211,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:36225:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36255:13: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -21247,7 +21247,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36246:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36279:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36288:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -21313,7 +21313,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36380:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:36389:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -21365,7 +21365,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36430:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36439:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -21612,7 +21612,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36666:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -21633,7 +21633,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36657:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36680:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36689:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -21767,7 +21767,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36840:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36849:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -21779,10 +21779,10 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36871:12: */ var pFile uintptr = id if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36868) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36877) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -21792,7 +21792,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36862:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36906:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -21842,26 +21842,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36897:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36949:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36958:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36954:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36963:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36958:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36967:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36975:12: */ return closeUnixFile(tls, id) } @@ -21902,7 +21902,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36966:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37011:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:37020:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -21938,7 +21938,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37052:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37061:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -21980,7 +21980,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37102:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:37111:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -22015,7 +22015,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37154:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -22114,7 +22114,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:37145:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38059:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38068:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -22152,7 +22152,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38108:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38117:12: */ var pFile uintptr = id var got int32 @@ -22192,7 +22192,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38184:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:38193:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -22218,13 +22218,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38230:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:38239:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+32) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38239:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:38248:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -22281,7 +22281,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38374:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:38383:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -22327,7 +22327,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38470:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:38479:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -22354,7 +22354,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38489), ts+3313, bp+8, 38489) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38498), ts+3313, bp+8, 38498) } // Make sure all writes to a particular file are committed to disk. @@ -22370,7 +22370,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38516:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -22389,7 +22389,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3601, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38530) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3601, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38539) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -22401,7 +22401,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38544) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38553) } else { rc = SQLITE_OK @@ -22412,7 +22412,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:38507 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38557:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38566:12: */ var pFile uintptr = id var rc int32 @@ -22427,7 +22427,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3232, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38575) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3232, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38584) } else { return SQLITE_OK @@ -22436,7 +22436,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:385 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38607:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38616:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -22467,7 +22467,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38645:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38654:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -22514,7 +22514,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38714:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38723:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -22525,7 +22525,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38733:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38742:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -22610,7 +22610,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38877:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -22631,7 +22631,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38868:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38984:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -22648,7 +22648,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38975:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38994:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:39003:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -22658,7 +22658,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39017:12: */ return libc.Xgetpagesize(tls) } @@ -22670,7 +22670,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:39008:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39107:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:39116:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -22702,7 +22702,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39139:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:39148:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -22743,7 +22743,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39233:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls) // System page size // Page size must be a power of 2 @@ -22757,7 +22757,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:39224:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39247:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -22774,7 +22774,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39255) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 39264) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -22789,7 +22789,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39238:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39272:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:39281:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -22833,7 +22833,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3232, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39312) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3232, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39321) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -22880,7 +22880,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39361:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:39370:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -22976,7 +22976,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39437), ts+3196, zShm, 39437) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 39446), ts+3196, zShm, 39446) goto shm_open_err __10: ; @@ -23044,7 +23044,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39503:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:39512:12: */ bp := tls.Alloc(132) defer tls.Free(132) @@ -23147,7 +23147,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3267, zFile, 39581) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3267, zFile, 39590) goto shmpage_out __14: ; @@ -23195,7 +23195,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3354, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39608) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3354, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39617) goto shmpage_out __20: ; @@ -23253,7 +23253,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39581:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -23267,7 +23267,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39572:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39678:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39687:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -23374,7 +23374,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39819:13: */ _ = fd // compiler-defined memory barrier @@ -23387,7 +23387,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39810:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39829:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39838:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -23439,7 +23439,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40040:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:40049:12: */ *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) return SQLITE_OK @@ -23453,7 +23453,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40071:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:40080:12: */ _ = fd _ = p _ = iOff @@ -23502,33 +23502,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40173:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40182:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40173:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40182:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:40173:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40183:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:40182:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40192:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40183:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40192:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:40183:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40193:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:40192:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:40202:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40193:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:40202:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:40202:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -23541,7 +23541,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:40193:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:40388:34 */ +type Finder_type = uintptr /* sqlite3.c:40397:34 */ // *************************************************************************** // @@ -23551,7 +23551,7 @@ type Finder_type = uintptr /* sqlite3.c:40388:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40401:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:40410:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -23607,7 +23607,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 40479) + robust_close(tls, pNew, h, 40488) h = -1 } unixLeaveMutex(tls) @@ -23630,7 +23630,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40564) + robust_close(tls, pNew, h, 40573) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -23648,17 +23648,17 @@ var azTempDirs = [6]uintptr{ ts + 3664, ts + 3673, ts + 1531, -} /* sqlite3.c:40576:19 */ +} /* sqlite3.c:40585:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40588:13: */ +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40597:13: */ azTempDirs[0] = libc.Xgetenv(tls, ts+3678) azTempDirs[1] = libc.Xgetenv(tls, ts+3692) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40606:19: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -23685,7 +23685,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40597:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40621:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40630:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -23729,7 +23729,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40671:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40680:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -23780,7 +23780,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40721:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40730:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -23816,7 +23816,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40760:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40769:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -23890,7 +23890,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40837:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40846:12: */ bp := tls.Alloc(528) defer tls.Free(528) @@ -24088,7 +24088,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40993), ts+3196, zName, 40993) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41002), ts+3196, zName, 41002) if !(rc == SQLITE_OK) { goto __20 } @@ -24188,7 +24188,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41116:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:41125:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -24199,7 +24199,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3306, zPath, 41132) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3306, zPath, 41141) } return rc } @@ -24209,9 +24209,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3723, zPath, 41142) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3723, zPath, 41151) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41144) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 41153) } else { rc = SQLITE_OK @@ -24228,7 +24228,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41164:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:41173:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -24250,7 +24250,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41193:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41202:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -24273,7 +24273,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:41 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41211:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:41220:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -24284,7 +24284,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, zOut, uint64(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41221), ts+3214, zPath, 41221) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41230), ts+3214, zPath, 41230) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -24293,7 +24293,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 41230) + return Xsqlite3CantopenError(tls, 41239) } Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3598, libc.VaList(bp, zPath)) @@ -24344,7 +24344,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41280:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:41289:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -24370,7 +24370,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41313), ts+3394, zIn, 41313) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41322), ts+3394, zIn, 41322) } } else { bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&Mode_t(0170000) == Mode_t(0120000)) @@ -24384,20 +24384,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 41325) + rc = Xsqlite3CantopenError(tls, 41334) } if rc == SQLITE_OK { nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, zDel, uint64(nOut-1))) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41331), ts+3385, zIn, 41331) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41340), ts+3385, zIn, 41340) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 41337) + rc = Xsqlite3CantopenError(tls, 41346) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint64(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint64(n)) @@ -24582,7 +24582,7 @@ type dl_info = struct { // Structure filled in by dladdr(). type Dl_info = dl_info /* dlfcn.h:64:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41372:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:41381:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -24592,7 +24592,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41384:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:41393:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24606,7 +24606,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:41394:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:41403: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 // returns a void* which is really a pointer to a function. So how do we @@ -24632,13 +24632,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41417:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:41426:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41431:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:41440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24673,7 +24673,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 41462) + robust_close(tls, uintptr(0), fd, 41471) } } @@ -24686,7 +24686,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41478:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:41487:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -24709,7 +24709,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41519:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:41528:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -24723,12 +24723,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41520:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:41529:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41551:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41560:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -24744,7 +24744,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41569:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41578:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -24926,7 +24926,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42774:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42783:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -24964,14 +24964,14 @@ var aVfs = [4]Sqlite3_vfs{ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3747, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3757, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3637, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42827:22 */ +} /* sqlite3.c:42836:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42905:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -25013,15 +25013,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42896:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -25035,9 +25035,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -25047,13 +25047,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -25070,7 +25070,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -25086,21 +25086,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -25138,7 +25138,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -25155,7 +25155,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -25177,7 +25177,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -25208,7 +25208,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -25223,14 +25223,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -25239,7 +25239,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -25283,7 +25283,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -25312,13 +25312,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -25332,7 +25332,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -25343,7 +25343,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -25418,7 +25418,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -25429,7 +25429,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25439,7 +25439,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -25448,21 +25448,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -25470,7 +25470,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -25478,19 +25478,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -25498,7 +25498,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25521,7 +25521,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -25612,7 +25612,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -25707,7 +25707,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -25729,7 +25729,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -25742,7 +25742,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -25771,7 +25771,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -25785,7 +25785,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -25922,7 +25922,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -25961,7 +25961,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -25976,7 +25976,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -26013,7 +26013,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -26176,7 +26176,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -26238,7 +26238,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -26250,7 +26250,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -26275,7 +26275,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -26288,7 +26288,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -26296,7 +26296,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -26310,7 +26310,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -26327,7 +26327,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -26374,7 +26374,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -26402,7 +26402,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -26453,7 +26453,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -26473,7 +26473,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -26489,7 +26489,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -26502,7 +26502,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -26511,7 +26511,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -26524,7 +26524,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -26539,7 +26539,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -26551,7 +26551,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -26560,7 +26560,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -26570,7 +26570,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -26579,7 +26579,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -26598,7 +26598,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -26632,19 +26632,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -26683,7 +26683,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -26726,7 +26726,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -26738,17 +26738,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -26756,7 +26756,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -26768,7 +26768,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -26785,20 +26785,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -26913,7 +26913,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -26999,7 +26999,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -27009,12 +27009,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -27022,9 +27022,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -27041,10 +27041,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -27062,7 +27062,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -27095,7 +27095,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -27140,7 +27140,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -27173,7 +27173,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -27203,7 +27203,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -27217,7 +27217,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -27255,7 +27255,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -27272,13 +27272,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -27296,7 +27296,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -27312,7 +27312,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -27353,7 +27353,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -27370,7 +27370,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -27388,7 +27388,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -27409,7 +27409,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -27457,7 +27457,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -27495,7 +27495,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -27504,7 +27504,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -27554,7 +27554,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -27577,7 +27577,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -27592,7 +27592,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -27607,7 +27607,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -27725,7 +27725,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -27754,7 +27754,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -27765,7 +27765,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -27779,7 +27779,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -27804,7 +27804,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -27835,7 +27835,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -27848,7 +27848,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -27871,7 +27871,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27891,16 +27891,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -27911,7 +27911,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -28009,7 +28009,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -28022,13 +28022,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -28048,7 +28048,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -28067,7 +28067,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -28078,7 +28078,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -28101,7 +28101,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -28131,7 +28131,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -28166,7 +28166,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -28202,7 +28202,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -28233,7 +28233,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -28264,7 +28264,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -28297,7 +28297,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -28330,7 +28330,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28515,7 +28515,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -29284,7 +29284,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -29317,11 +29317,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -29340,7 +29340,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -29362,7 +29362,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -29379,7 +29379,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -29396,7 +29396,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -29423,7 +29423,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -29457,7 +29457,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -29491,7 +29491,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -29550,7 +29550,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -29579,7 +29579,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -29614,7 +29614,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -29629,7 +29629,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -29739,7 +29739,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -29849,7 +29849,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -29909,21 +29909,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -29940,7 +29940,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -29969,7 +29969,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -30061,7 +30061,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -30086,7 +30086,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -30150,7 +30150,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -30277,7 +30277,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -30309,7 +30309,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -30354,7 +30354,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -30588,7 +30588,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -30754,7 +30754,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30789,7 +30789,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -30821,7 +30821,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -30889,7 +30889,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -31024,39 +31024,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -31065,25 +31071,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -31092,10 +31098,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -31113,7 +31119,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -31122,24 +31128,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -31147,14 +31153,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3829, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -31174,7 +31180,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -31228,7 +31234,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -31255,7 +31261,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -31286,7 +31292,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -31317,7 +31323,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -31365,7 +31371,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -31396,7 +31402,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31450,7 +31456,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31518,7 +31524,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -31627,28 +31633,28 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -31701,7 +31707,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -31765,7 +31771,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -31793,7 +31799,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -31830,7 +31836,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31899,7 +31905,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -31908,7 +31914,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -31939,7 +31945,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint64(N)) @@ -31962,7 +31968,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -31979,7 +31985,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -32024,7 +32030,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -32051,7 +32057,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -32064,7 +32070,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -32074,7 +32080,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -32087,7 +32093,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -32125,7 +32131,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -32174,7 +32180,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -32211,7 +32217,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -32325,7 +32331,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -32357,7 +32363,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32437,7 +32443,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -32461,7 +32467,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -32492,7 +32498,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -32518,7 +32524,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -32580,7 +32586,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -32627,7 +32633,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32753,7 +32759,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -33072,7 +33078,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -33110,7 +33116,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -33221,7 +33227,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -33347,7 +33353,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -33496,7 +33502,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -33558,7 +33564,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33571,7 +33577,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -33617,7 +33623,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -33689,7 +33695,7 @@ __14: } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -33698,7 +33704,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -33714,7 +33720,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -33735,7 +33741,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -33747,13 +33753,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -33782,7 +33788,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -33864,7 +33870,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -33924,7 +33930,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -33974,7 +33980,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -34048,7 +34054,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34136,7 +34142,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -34177,7 +34183,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -34207,7 +34213,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34277,7 +34283,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -34300,7 +34306,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -34336,7 +34342,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34526,7 +34532,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -34583,7 +34589,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -34627,13 +34633,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -34642,7 +34648,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -34655,7 +34661,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -34665,7 +34671,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -34677,7 +34683,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -34717,7 +34723,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -34755,7 +34761,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -34816,30 +34822,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -34847,7 +34853,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -34874,7 +34880,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34936,7 +34942,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -34996,21 +35002,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -35022,7 +35028,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -35048,7 +35054,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -35118,14 +35124,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -35140,7 +35146,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -35152,12 +35158,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -35169,7 +35175,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -35197,13 +35203,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -35213,7 +35219,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -35230,7 +35236,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -35266,7 +35272,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -35296,7 +35302,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -35336,7 +35342,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -35347,7 +35353,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -35359,7 +35365,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -35379,7 +35385,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -35391,7 +35397,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -35970,7 +35976,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -35982,18 +35988,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -36001,7 +36007,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -36023,7 +36029,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -36054,7 +36060,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -36100,7 +36106,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -36108,13 +36114,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -36132,7 +36138,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -36164,7 +36170,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -36179,7 +36185,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -36203,7 +36209,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -36226,7 +36232,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -36268,7 +36274,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -36279,7 +36285,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -36288,7 +36294,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -36299,7 +36305,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -36311,12 +36317,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -36328,12 +36334,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -36347,7 +36353,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -36370,14 +36376,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -36395,7 +36401,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -36438,7 +36444,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -36479,7 +36485,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -36498,7 +36504,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -36613,7 +36619,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -36817,7 +36823,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -36843,7 +36849,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36915,7 +36921,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -36929,7 +36935,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -36976,7 +36982,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -37022,7 +37028,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -37068,10 +37074,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -37086,7 +37092,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -37170,7 +37176,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -37182,7 +37188,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -37201,7 +37207,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -37252,7 +37258,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -37383,7 +37389,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -37544,7 +37550,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -37563,7 +37569,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37635,7 +37641,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -37704,7 +37710,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -37784,7 +37790,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -37829,7 +37835,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -38095,7 +38101,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -38312,7 +38318,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -38386,7 +38392,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -38474,7 +38480,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -38488,7 +38494,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -38555,7 +38561,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -38571,7 +38577,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -38588,7 +38594,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -38606,7 +38612,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -38638,7 +38644,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -38658,7 +38664,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -38695,7 +38701,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -38707,7 +38713,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -38738,7 +38744,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -38792,12 +38798,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -38805,7 +38811,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -38827,7 +38833,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -38852,7 +38858,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -38906,7 +38912,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -39139,7 +39145,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -39204,7 +39210,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -39248,7 +39254,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -39279,7 +39285,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -39313,14 +39319,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -39339,16 +39345,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -39378,7 +39384,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -39394,13 +39400,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -39921,7 +39927,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -39930,7 +39936,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -39939,7 +39945,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -40049,7 +40055,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -40145,7 +40151,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -40159,7 +40165,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -40168,7 +40174,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -40189,7 +40195,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -40217,7 +40223,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -40248,7 +40254,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -40271,7 +40277,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -40286,13 +40292,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -40304,7 +40310,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -40315,11 +40321,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -40342,7 +40348,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3968)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3968)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -40368,14 +40374,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3968)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -40392,7 +40398,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -40449,7 +40455,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -40500,7 +40506,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -40535,7 +40541,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -40559,7 +40565,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -40578,7 +40584,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -40625,7 +40631,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -40645,20 +40651,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -40680,7 +40686,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -40717,7 +40723,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -40758,7 +40764,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -40779,7 +40785,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -40798,7 +40804,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -40808,7 +40814,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -40821,7 +40827,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -40838,7 +40844,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40878,7 +40884,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -40886,12 +40892,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -40904,7 +40910,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -40926,7 +40932,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -40938,7 +40944,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -40963,7 +40969,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -40986,7 +40992,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -41005,7 +41011,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -41013,7 +41019,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -41044,7 +41050,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41065,7 +41071,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -41075,7 +41081,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -41093,7 +41099,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -41120,7 +41126,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -41150,7 +41156,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -41160,7 +41166,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41237,7 +41243,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -41268,7 +41274,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell) + 1))))), pInfo) @@ -41284,7 +41290,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -41325,7 +41331,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -41342,7 +41348,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41359,7 +41365,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -41377,7 +41383,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -41422,7 +41428,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -41432,7 +41438,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -41445,7 +41451,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -41454,14 +41460,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -41471,7 +41477,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -41533,7 +41539,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -41544,7 +41550,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -41579,7 +41585,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -41604,7 +41610,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -41633,7 +41639,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -41648,14 +41654,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -41671,7 +41677,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -41696,7 +41702,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -41711,7 +41717,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -41762,7 +41768,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -41786,12 +41792,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -41802,11 +41808,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -41819,7 +41825,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -41827,7 +41833,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -41837,10 +41843,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -41874,7 +41880,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -41925,7 +41931,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -41933,7 +41939,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -41965,12 +41971,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -41982,11 +41988,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -41997,7 +42003,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -42005,7 +42011,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -42027,14 +42033,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -42047,7 +42053,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -42056,21 +42062,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -42088,7 +42094,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -42111,7 +42117,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -42123,7 +42129,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -42150,7 +42156,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42168,7 +42174,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -42180,11 +42186,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -42200,7 +42206,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -42210,7 +42216,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -42241,7 +42247,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -42265,18 +42271,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -42288,13 +42294,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -42309,7 +42315,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -42329,7 +42335,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -42354,7 +42360,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -42775,7 +42781,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -42807,7 +42813,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -42840,7 +42846,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -42849,7 +42855,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -42899,7 +42905,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -42916,7 +42922,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -42932,7 +42938,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -42959,7 +42965,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -42993,7 +42999,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -43006,7 +43012,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -43020,7 +43026,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -43036,7 +43042,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -43060,7 +43066,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -43080,7 +43086,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -43113,7 +43119,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -43138,7 +43144,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -43307,7 +43313,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -43384,7 +43390,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -43397,7 +43403,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -43437,7 +43443,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -43479,7 +43485,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -43743,7 +43749,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43795,14 +43801,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -43830,7 +43836,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -43847,7 +43853,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -43862,7 +43868,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -43873,7 +43879,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -43943,7 +43949,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -43965,7 +43971,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -44040,7 +44046,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -44064,7 +44070,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -44078,7 +44084,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -44099,7 +44105,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -44122,7 +44128,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -44153,7 +44159,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -44203,7 +44209,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -44226,7 +44232,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -44282,7 +44288,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -44311,7 +44317,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -44346,7 +44352,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -44375,7 +44381,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44397,7 +44403,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -44463,7 +44469,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -44487,7 +44493,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -44555,7 +44561,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -44568,7 +44574,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -44606,7 +44612,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -44614,7 +44620,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -44629,7 +44635,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -44639,13 +44645,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -44686,7 +44692,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -44695,7 +44701,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -44704,26 +44710,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -44736,7 +44742,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -44753,7 +44759,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -44775,7 +44781,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -44843,7 +44849,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -44885,7 +44891,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -44896,7 +44902,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -44907,7 +44913,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -44964,7 +44970,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -45024,7 +45030,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -45044,7 +45050,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -45052,7 +45058,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -45065,7 +45071,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -45092,7 +45098,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -45123,7 +45129,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -45134,11 +45140,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -45155,7 +45161,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -45185,7 +45191,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -45264,7 +45270,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -45285,7 +45291,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -45307,7 +45313,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -45328,7 +45334,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -45349,7 +45355,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -45368,7 +45374,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -45417,7 +45423,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -45532,7 +45538,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -45661,7 +45667,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -45765,7 +45771,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -45814,7 +45820,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -45881,7 +45887,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -45891,7 +45897,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -45930,7 +45936,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -45967,7 +45973,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -46000,7 +46006,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -46040,7 +46046,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -46094,7 +46100,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -46128,7 +46134,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -46195,7 +46201,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -46276,7 +46282,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -46318,7 +46324,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -46363,7 +46369,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -46477,7 +46483,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -46652,7 +46658,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -46673,7 +46679,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -46743,7 +46749,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -46760,7 +46766,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -46841,14 +46847,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -46860,7 +46866,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -46875,7 +46881,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -46895,7 +46901,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -46927,7 +46933,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -47109,7 +47115,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -47127,7 +47133,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -47163,7 +47169,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47324,7 +47330,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -47401,11 +47407,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -47422,7 +47428,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -47430,7 +47436,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -47449,7 +47455,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -47480,12 +47486,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -47493,7 +47499,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -47543,7 +47549,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47581,7 +47587,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -47608,7 +47614,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -47660,7 +47666,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47694,7 +47700,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -47834,7 +47840,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -47847,7 +47853,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -47945,7 +47951,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -48025,7 +48031,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -48327,7 +48333,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -48355,7 +48361,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -48534,7 +48540,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -48608,7 +48614,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -48681,7 +48687,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -48718,7 +48724,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -48802,7 +48808,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -49055,7 +49061,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -49277,7 +49283,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -49328,13 +49334,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -49348,7 +49354,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -49467,7 +49473,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -49509,7 +49515,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49523,7 +49529,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -49547,7 +49553,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -49594,7 +49600,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -49666,7 +49672,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -49794,7 +49800,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -49857,7 +49863,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -49905,13 +49911,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) @@ -50019,7 +50025,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -50046,7 +50052,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -50069,7 +50075,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -50151,7 +50157,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -50179,11 +50185,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -50292,7 +50298,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -50369,7 +50375,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -50399,7 +50405,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -50442,7 +50448,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -50505,7 +50511,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -50515,7 +50521,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -50531,7 +50537,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -50545,7 +50551,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -50649,7 +50655,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -50672,7 +50678,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -50694,7 +50700,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -50704,7 +50710,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -50776,7 +50782,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -50802,7 +50808,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -50821,7 +50827,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -50847,7 +50853,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -50910,12 +50916,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -50942,13 +50948,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -50959,7 +50965,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -50981,7 +50987,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -51008,7 +51014,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -51092,7 +51098,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -51104,7 +51110,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -51143,7 +51149,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -51532,7 +51538,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -51766,7 +51772,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -51777,14 +51783,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -51798,7 +51804,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -51814,7 +51820,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -51837,7 +51843,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -51851,7 +51857,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -51864,7 +51870,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -51888,7 +51894,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -51928,7 +51934,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -51936,7 +51942,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -51968,29 +51974,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -52030,7 +52036,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -52062,7 +52068,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -52072,7 +52078,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4789, 0) return SQLITE_ERROR @@ -52086,7 +52092,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -52146,14 +52152,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52215,7 +52221,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -52230,7 +52236,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -52240,7 +52246,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -52478,7 +52484,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -52536,13 +52542,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -52556,7 +52562,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -52577,7 +52583,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -52592,7 +52598,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -52606,7 +52612,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -52700,7 +52706,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -52733,7 +52739,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -52753,7 +52759,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -52809,7 +52815,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -52827,7 +52833,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -52842,7 +52848,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -52867,7 +52873,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -52889,7 +52895,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -52911,7 +52917,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -52937,7 +52943,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -52967,7 +52973,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -52989,7 +52995,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -53008,7 +53014,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -53027,7 +53033,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -53037,7 +53043,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -53049,8 +53055,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -53061,7 +53067,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -53070,7 +53076,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -53091,7 +53097,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -53101,7 +53107,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -53119,7 +53125,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -53132,7 +53138,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -53153,7 +53159,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -53162,7 +53168,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -53177,7 +53183,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -53194,7 +53200,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -53221,7 +53227,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -53275,7 +53281,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -53292,7 +53298,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -53300,13 +53306,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -53321,7 +53327,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -53329,7 +53335,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -53339,14 +53345,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -53366,7 +53373,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -53379,7 +53386,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -53396,7 +53403,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -53412,13 +53419,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -53434,7 +53441,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -53456,7 +53463,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) @@ -53477,7 +53484,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -53590,11 +53597,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -53609,7 +53616,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -53634,7 +53641,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -53679,7 +53686,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -53695,7 +53702,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -53712,7 +53719,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -53723,7 +53730,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -53779,7 +53786,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -53925,7 +53932,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -54173,7 +54180,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -54196,7 +54203,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54264,7 +54271,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -54309,7 +54316,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -54319,7 +54326,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -54340,7 +54347,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -54355,14 +54362,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -54378,7 +54385,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -54393,14 +54400,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -54411,14 +54418,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -54438,7 +54445,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -54462,12 +54469,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -54477,7 +54484,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -54490,7 +54497,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -54521,7 +54528,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -54574,7 +54581,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -54583,7 +54590,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -54606,26 +54613,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -54638,7 +54645,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -54686,7 +54693,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -54700,7 +54707,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -54732,7 +54739,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) @@ -54742,7 +54749,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -54758,7 +54765,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -54782,7 +54789,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -54793,7 +54800,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -54804,7 +54811,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -54815,7 +54822,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -54850,14 +54857,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0))))) @@ -54869,7 +54876,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -54882,12 +54889,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } @@ -54910,7 +54917,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -55042,7 +55049,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -55073,7 +55080,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -55089,7 +55096,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -55133,23 +55140,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -55158,7 +55165,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -55173,7 +55180,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -55184,26 +55191,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -55264,7 +55271,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -55279,18 +55286,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -55306,7 +55313,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -55330,7 +55337,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -55347,7 +55354,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -55394,7 +55401,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -55410,7 +55417,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -55431,7 +55438,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -55445,11 +55452,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -55612,7 +55619,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4943, ts + 4945, ts + 4947, ts + 4952} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 4943, ts + 4945, ts + 4947, ts + 4952} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -55620,7 +55627,7 @@ var encnames = [4]uintptr{ts + 4943, ts + 4945, ts + 4947, ts + 4952} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -55647,7 +55654,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -55666,7 +55673,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -55681,7 +55688,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -55689,7 +55696,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -55699,7 +55706,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -55743,7 +55750,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -55755,7 +55762,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -55854,7 +55861,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -55883,7 +55890,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -55972,7 +55979,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -55987,7 +55994,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -56004,7 +56011,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -56037,7 +56044,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -56146,11 +56153,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 4957, ts + 4962, ts + 4969, ts + 4972, ts + 4975, ts + 4978, ts + 4981, ts + 4984, ts + 4992, ts + 4995, ts + 5002, ts + 5010, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -56184,7 +56191,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -56200,7 +56207,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -56224,7 +56231,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -56255,7 +56262,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -56280,7 +56287,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -56299,7 +56306,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -56527,7 +56534,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -56545,7 +56552,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -56588,7 +56595,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -56603,7 +56610,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -56626,7 +56633,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -56830,7 +56837,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -56840,7 +56847,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -56869,7 +56876,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56921,7 +56928,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -56945,7 +56952,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -56970,7 +56977,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -56991,7 +56998,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -57014,7 +57021,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -57027,7 +57034,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -57039,7 +57046,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -57057,7 +57064,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -57076,7 +57083,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -57151,10 +57158,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -57164,7 +57171,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -57213,7 +57220,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57264,7 +57271,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57291,7 +57298,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -57394,7 +57401,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -57408,7 +57415,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -57426,7 +57433,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -57487,7 +57494,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -57530,7 +57537,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -57543,7 +57550,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -57583,7 +57590,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -57629,7 +57636,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -57723,7 +57730,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -57786,7 +57793,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -57828,7 +57835,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -57893,7 +57900,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -57928,7 +57935,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -57989,7 +57996,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -58000,7 +58007,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -58105,7 +58112,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -58129,7 +58136,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -58167,7 +58174,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -58221,7 +58228,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -58306,7 +58313,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -58318,7 +58325,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -58334,7 +58341,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -58348,7 +58355,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -58356,7 +58363,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } @@ -58376,7 +58383,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) @@ -58384,12 +58391,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -58399,7 +58406,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -58419,7 +58426,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -58435,7 +58442,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -58466,7 +58473,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -58482,7 +58489,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -58499,7 +58506,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -58551,7 +58558,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -58577,7 +58584,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } @@ -58585,7 +58592,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5184, 0) return 1 @@ -58595,7 +58602,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+5229, 0) return 1 @@ -58607,7 +58614,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -58640,7 +58647,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -58650,7 +58657,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -58670,7 +58677,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -58692,7 +58699,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -58714,7 +58721,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -58737,27 +58744,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -58767,7 +58774,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -58780,26 +58787,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -58868,20 +58875,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -58907,7 +58914,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -58922,7 +58929,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -58936,7 +58943,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -58949,12 +58956,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -58963,39 +58970,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -59003,19 +59010,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -59027,32 +59034,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -59062,7 +59069,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -59076,7 +59083,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5269, int64(-1), @@ -59084,7 +59091,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -59094,7 +59101,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -59104,7 +59111,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -59131,7 +59138,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -59298,14 +59305,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -59345,7 +59352,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -59358,7 +59365,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -59375,14 +59382,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -59440,13 +59447,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -59455,7 +59462,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59478,7 +59485,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -59498,7 +59505,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -59516,7 +59523,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -59539,7 +59546,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -59619,13 +59626,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -59635,7 +59642,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -59644,19 +59651,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -59691,7 +59698,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -59708,7 +59715,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -59718,43 +59725,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -59764,13 +59771,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -59790,7 +59797,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -59822,11 +59829,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -59835,44 +59842,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -59889,13 +59896,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -59903,7 +59910,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+5302, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -59937,7 +59944,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -59963,16 +59970,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -59983,11 +59990,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -59998,7 +60005,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -60008,7 +60015,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -60021,11 +60028,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -60033,11 +60040,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -60086,7 +60093,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -60097,7 +60104,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -60114,7 +60121,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -60126,7 +60133,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -60137,19 +60144,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -60172,7 +60179,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -60193,7 +60200,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -60202,7 +60209,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } @@ -60211,7 +60218,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } @@ -60219,7 +60226,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -60228,7 +60235,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -60241,7 +60248,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60267,7 +60274,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -60282,7 +60289,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -60297,7 +60304,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -60310,7 +60317,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -60324,7 +60331,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -60416,7 +60423,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -60435,7 +60442,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -60447,7 +60454,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -60459,7 +60466,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -60473,7 +60480,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -60614,7 +60621,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60659,7 +60666,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -60882,7 +60889,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -60953,7 +60960,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -60975,7 +60982,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -61021,7 +61028,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -61053,7 +61060,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -61065,7 +61072,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -61073,7 +61080,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -61109,7 +61116,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -61123,13 +61130,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -61145,7 +61152,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -61169,7 +61176,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -61179,11 +61186,11 @@ var azTypes = [5]uintptr{ ts + 1096, ts + 1074, ts + 1519, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -63295,6 +63302,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -66319,7 +66330,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -66355,10 +66386,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -66366,13 +66397,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -66381,14 +66412,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -66396,12 +66427,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -66416,7 +66447,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -66434,13 +66465,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -66457,38 +66488,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -66498,27 +66529,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -66527,63 +66558,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -66591,55 +66622,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -66654,20 +66685,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -66677,15 +66708,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -66720,81 +66751,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -66802,45 +66833,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -66865,14 +66896,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -66880,30 +66911,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -66967,31 +66998,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -67020,13 +67051,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -67036,77 +67067,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -67115,79 +67146,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -67196,22 +67227,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -67220,37 +67251,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -67265,7 +67296,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -67278,13 +67309,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -67303,20 +67334,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -67337,17 +67368,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+5469, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -67358,16 +67389,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1))) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) @@ -67375,14 +67406,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -67390,121 +67421,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+5520, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+5542, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -67517,36 +67523,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -67554,48 +67585,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -67616,18 +67647,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -67635,43 +67666,43 @@ __519: ts+5596, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -67687,7 +67718,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -67729,66 +67760,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -67796,16 +67827,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -67825,20 +67856,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -67885,37 +67916,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -68005,13 +68036,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -68020,11 +68051,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -68036,24 +68067,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -68065,32 +68096,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -68110,10 +68141,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -68132,10 +68163,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -68190,7 +68221,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -68198,11 +68229,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1518 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -68211,71 +68242,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -68294,19 +68325,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -68321,10 +68352,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -68348,10 +68379,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -68476,7 +68507,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -68486,10 +68517,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -68498,29 +68529,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -68531,53 +68562,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -68602,97 +68633,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -68750,10 +68781,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -68762,60 +68793,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -68838,18 +68869,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -68861,10 +68892,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -68959,10 +68990,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; // Fall through into OP_NotFound /* no break */ @@ -68977,15 +69008,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -68995,62 +69026,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -69058,31 +69089,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -69136,7 +69167,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -69146,14 +69177,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; // Fall through into OP_NotExists /* no break */ @@ -69176,25 +69207,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -69252,89 +69283,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -69343,36 +69374,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -69427,56 +69458,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -69488,13 +69519,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -69505,13 +69536,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -69524,7 +69555,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -69550,10 +69581,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -69603,28 +69634,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -69636,13 +69667,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -69651,28 +69682,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -69712,16 +69743,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -69744,10 +69775,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -69797,29 +69828,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -69840,20 +69871,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -69864,36 +69895,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -69902,6 +69933,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -69909,11 +69944,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -69946,39 +69981,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -69994,29 +70029,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -70063,32 +70098,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -70171,18 +70206,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -70222,10 +70257,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -70235,10 +70270,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -70255,10 +70290,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -70281,17 +70316,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -70322,31 +70357,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+5811) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+5811) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -70393,25 +70428,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -70423,17 +70458,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -70447,16 +70482,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -70510,15 +70545,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -70532,19 +70567,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -70552,22 +70587,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -70603,13 +70638,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -70617,21 +70652,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -70657,23 +70692,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -70689,21 +70724,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -70724,10 +70759,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -70741,10 +70776,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -70765,15 +70800,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 5828 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -70785,11 +70820,11 @@ __751: ts+5842, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -70799,38 +70834,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -70843,10 +70878,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -70918,22 +70953,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -70951,15 +70986,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -70978,18 +71013,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -71024,35 +71059,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -71087,37 +71122,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+5885, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -71125,7 +71160,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -71134,10 +71169,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -71145,10 +71180,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -71170,24 +71205,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -71238,21 +71273,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -71269,25 +71304,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -71303,35 +71338,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -71348,11 +71383,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -71385,7 +71420,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -71395,10 +71430,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -71413,16 +71448,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -71435,17 +71470,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -71492,10 +71527,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -71525,75 +71560,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+3598, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -71629,32 +71664,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+3598, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -71676,32 +71711,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -71724,17 +71759,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -71744,18 +71779,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -71767,11 +71802,11 @@ __830: return ts + 5979 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -71779,29 +71814,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -71809,18 +71844,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -71830,10 +71865,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -71855,10 +71890,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -71874,17 +71909,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -71906,13 +71941,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -71955,25 +71990,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+5986, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -71989,16 +72024,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -72018,17 +72053,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -72042,10 +72077,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -72060,11 +72095,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -72072,10 +72107,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -72084,18 +72119,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -72113,10 +72148,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -72161,27 +72196,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -72189,10 +72224,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -72216,11 +72251,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -72229,40 +72264,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+3598, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -72276,10 +72311,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -72294,21 +72329,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -72326,27 +72361,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -72380,43 +72415,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -72425,41 +72460,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -72484,16 +72519,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -72553,24 +72588,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -72581,38 +72616,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+3598, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -72651,16 +72686,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -72710,67 +72745,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+6015, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -72815,25 +72850,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+3598, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -72842,46 +72877,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -72912,11 +72947,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 6053, ts + 6062, ts + 6069, - ts + 6075} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 6075} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -72947,7 +72982,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -72968,7 +73003,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -72985,7 +73020,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -73061,7 +73096,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -73382,7 +73417,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -73391,11 +73426,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -73414,14 +73449,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -73480,14 +73515,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -73497,7 +73532,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -73513,7 +73548,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -73522,7 +73557,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -73709,7 +73744,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -73860,7 +73895,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -73874,10 +73909,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -73888,18 +73923,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -73912,26 +73947,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -73941,10 +73976,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -73975,11 +74010,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -73996,7 +74031,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74100,7 +74135,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -74140,7 +74175,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -74155,7 +74190,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -74196,7 +74231,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74242,7 +74277,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74265,7 +74300,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -74285,7 +74320,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -74297,7 +74332,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74347,7 +74382,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -74407,7 +74442,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -74426,7 +74461,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -74522,7 +74557,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -74533,7 +74568,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -74553,7 +74588,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -74572,14 +74607,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -74605,7 +74640,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -74630,7 +74665,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -74642,7 +74677,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -74659,7 +74694,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -74688,7 +74723,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -74703,7 +74738,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -74727,7 +74762,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -74740,7 +74775,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -74779,7 +74814,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -74797,7 +74832,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -74854,7 +74889,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -74869,7 +74904,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -74898,7 +74933,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -74914,7 +74949,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -74937,7 +74972,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -74992,7 +75027,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -75068,7 +75103,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -75079,7 +75114,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -75143,7 +75178,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -75259,7 +75294,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -75305,7 +75340,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -75313,7 +75348,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -75336,7 +75371,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -75370,7 +75405,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -75397,7 +75432,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -75405,7 +75440,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -75465,7 +75500,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -75535,7 +75570,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -75592,7 +75627,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -75608,7 +75643,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -75635,7 +75670,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75672,7 +75707,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -75688,7 +75723,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75739,7 +75774,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -75820,7 +75855,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -75895,7 +75930,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -75940,7 +75975,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -75982,7 +76017,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -76001,7 +76036,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76036,7 +76071,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76128,7 +76163,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -76175,23 +76210,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -76238,7 +76273,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -76248,7 +76283,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -76286,7 +76321,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -76352,7 +76387,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -76380,7 +76415,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -76390,14 +76425,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -76412,7 +76447,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -76424,7 +76459,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -76452,20 +76487,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -76494,7 +76529,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -76542,7 +76577,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -76584,7 +76619,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -76593,7 +76628,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -76622,7 +76657,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -76632,7 +76667,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -76674,7 +76709,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -76723,7 +76758,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -76754,13 +76789,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -76772,7 +76807,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -76780,7 +76815,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -76815,14 +76850,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -76855,7 +76890,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -76901,7 +76936,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -76918,7 +76953,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { @@ -76944,7 +76979,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -76963,7 +76998,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -77013,7 +77048,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -77728,7 +77763,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -77777,7 +77812,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -77799,7 +77834,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77825,7 +77860,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -78307,7 +78342,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -78342,7 +78377,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -78386,7 +78421,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -78409,7 +78444,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -78546,7 +78581,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78592,7 +78627,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -78603,7 +78638,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -78635,7 +78670,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78712,7 +78747,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -79011,7 +79046,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -79052,7 +79087,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -79109,7 +79144,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -79143,7 +79178,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -79179,7 +79214,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -79200,7 +79235,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -79243,7 +79278,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -79255,7 +79290,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -79266,7 +79301,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -79277,7 +79312,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -79302,7 +79337,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -79374,7 +79409,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -79384,7 +79419,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -79393,7 +79428,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -79418,7 +79453,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -79436,7 +79471,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -79449,7 +79484,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -79465,7 +79500,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -79488,7 +79523,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -79498,7 +79533,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -79525,7 +79560,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -79533,7 +79568,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -79563,7 +79598,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -79597,7 +79632,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -79645,7 +79680,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -79669,7 +79704,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -79698,7 +79733,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -79786,7 +79821,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79808,7 +79843,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -79816,7 +79851,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -79825,7 +79860,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -79845,7 +79880,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79872,7 +79907,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -79882,7 +79917,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79909,7 +79944,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79957,7 +79992,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -79972,7 +80007,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -79995,7 +80030,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -80013,7 +80048,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -80041,7 +80076,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -80093,7 +80128,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -80112,7 +80147,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80149,7 +80184,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80181,7 +80216,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -80249,7 +80284,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -80279,7 +80314,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -80293,13 +80328,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -80311,7 +80346,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -80353,7 +80388,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -80375,7 +80410,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -80394,7 +80429,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -80411,7 +80446,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80521,7 +80556,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -80543,7 +80578,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -80553,14 +80588,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -80593,7 +80628,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -80601,7 +80636,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -80670,7 +80705,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -80723,7 +80758,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -80752,7 +80787,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80818,9 +80853,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -80837,7 +80872,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -80856,7 +80891,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -80879,7 +80914,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -80976,7 +81011,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -81003,7 +81038,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -81029,7 +81064,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -81044,7 +81079,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81056,7 +81091,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -81068,7 +81103,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -81076,7 +81111,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -81093,7 +81128,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -81105,7 +81140,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+6630) == 0 { return U32(EP_IsTrue) } @@ -81118,7 +81153,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -81132,7 +81167,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -81149,7 +81184,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -81195,7 +81230,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -81273,7 +81308,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -81297,7 +81332,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -81312,7 +81347,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -81320,12 +81355,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -81367,7 +81402,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -81403,7 +81438,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -81412,7 +81447,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81464,7 +81499,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -81503,7 +81538,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -81556,7 +81591,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+7576) == 0 { return 1 } @@ -81574,7 +81609,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -81632,7 +81667,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -81644,7 +81679,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -81733,7 +81768,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81951,7 +81986,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -81983,7 +82018,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82002,7 +82037,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -82030,7 +82065,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -82225,7 +82260,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -82348,7 +82383,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -82385,7 +82420,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82766,7 +82801,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82786,7 +82821,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -82832,7 +82867,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -82847,7 +82882,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -82866,7 +82901,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82917,7 +82952,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -82931,14 +82966,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -82957,7 +82992,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -82981,7 +83016,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -82989,7 +83024,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -83114,7 +83149,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -84185,7 +84220,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 7995)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 7995)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -84202,7 +84237,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 7995)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -84271,7 +84306,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -84296,7 +84331,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -84317,7 +84352,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -84330,7 +84365,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -84356,7 +84391,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -84438,7 +84473,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -84501,7 +84536,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84733,7 +84768,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -84983,7 +85018,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -85003,7 +85038,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85057,7 +85092,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -85161,7 +85196,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -85188,7 +85223,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -85199,7 +85234,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -85327,7 +85362,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -85350,7 +85385,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -85460,7 +85495,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -85494,7 +85529,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -85512,7 +85547,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -85537,7 +85572,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -85575,7 +85610,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -85591,7 +85626,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -85631,7 +85666,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -85680,7 +85715,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -85713,7 +85748,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -85726,7 +85761,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -85743,7 +85778,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -85761,7 +85796,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -85952,7 +85987,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -85978,7 +86013,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -86003,7 +86038,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -86012,7 +86047,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -86022,7 +86057,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -86040,7 +86075,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -86058,7 +86093,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -86092,7 +86127,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86111,7 +86146,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -86135,7 +86170,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -86151,7 +86186,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -86164,7 +86199,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -86349,7 +86384,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -86364,7 +86399,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -86510,7 +86545,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86627,7 +86662,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -86655,7 +86690,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -86784,7 +86819,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -86796,7 +86831,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -86815,7 +86850,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -86827,7 +86862,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -86838,7 +86873,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -86879,7 +86914,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -86889,7 +86924,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -86921,7 +86956,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -86943,7 +86978,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -86966,7 +87001,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -86982,7 +87017,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -87005,7 +87040,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -87021,7 +87056,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -87043,7 +87078,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -87065,7 +87100,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -87089,7 +87124,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -87106,7 +87141,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -87120,34 +87155,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+10791, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -87161,7 +87194,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -87181,7 +87214,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10791, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10799, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -87231,7 +87264,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10797, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10805, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 10789 /* " " */ @@ -87267,7 +87300,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -87365,7 +87398,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -87394,7 +87427,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -87433,7 +87466,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -87776,7 +87809,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -87787,7 +87820,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -87827,7 +87860,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -87961,7 +87994,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -87994,7 +88027,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -88108,7 +88141,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -88180,7 +88213,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -88220,7 +88253,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -88246,7 +88279,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10802, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10810, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -88266,7 +88299,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -88344,10 +88377,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10809, + Xsqlite3ErrorMsg(tls, pParse, ts+10817, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10837 /* "PRIMARY KEY" */ + return ts + 10845 /* "PRIMARY KEY" */ } return ts + 6062 /* "UNIQUE" */ }(), @@ -88360,7 +88393,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10849, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10857, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -88380,11 +88413,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10897, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10905, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11018, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11026, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -88499,16 +88532,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11036}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11057}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11077}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11096}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11115}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11044}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11065}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11085}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11104}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11123}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -88664,7 +88697,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -88705,7 +88738,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11138, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11146, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -88717,10 +88750,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11161, + ts+11169, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11191, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11199, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -88741,10 +88774,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11209 /* "sqlite_stat1" */, FzCols: ts + 11222 /* "tbl,idx,stat" */}, - {FzName: ts + 11235 /* "sqlite_stat4" */, FzCols: ts + 11248 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11276 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 11217 /* "sqlite_stat1" */, FzCols: ts + 11230 /* "tbl,idx,stat" */}, + {FzName: ts + 11243 /* "sqlite_stat4" */, FzCols: ts + 11256 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11284 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -88771,14 +88804,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -88789,12 +88822,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -88803,7 +88836,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -88818,7 +88851,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -88828,7 +88861,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -88843,7 +88876,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -88878,7 +88911,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -88973,7 +89006,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11289} /* sqlite3.c:111534:22 */ + FzName: ts + 11297} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -88984,7 +89017,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -89006,7 +89039,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -89024,7 +89057,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -89167,7 +89200,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -89219,7 +89252,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -89291,7 +89324,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11299} /* sqlite3.c:111824:22 */ + FzName: ts + 11307} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -89310,7 +89343,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -89344,7 +89377,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11309, + Xsqlite3_str_appendf(tls, bp+24, ts+11317, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -89354,7 +89387,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+11314, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11322, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -89397,7 +89430,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11320, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11328, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -89411,9 +89444,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11326} /* sqlite3.c:111958:22 */ + FzName: ts + 11334} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -89422,7 +89455,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -89458,7 +89491,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11335, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11343, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -89476,7 +89509,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11209, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11217, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -89709,7 +89742,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11345, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11353, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -89771,7 +89804,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11345, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11353, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -89782,7 +89815,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -89790,7 +89823,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -89815,7 +89848,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -89824,9 +89857,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11349) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11357) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11353) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11361) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -89842,7 +89875,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89905,16 +89938,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -89943,15 +89976,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11357, z) == 0 { + if Xsqlite3_strglob(tls, ts+11365, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11368, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11376, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11378, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11386, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -89973,7 +90006,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -90035,7 +90068,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -90052,7 +90085,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -90110,7 +90143,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -90131,7 +90164,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90267,15 +90300,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11235, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11243, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11390, - ts+11444, + ts+11398, + ts+11452, zDb) } return rc @@ -90299,7 +90332,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90327,10 +90360,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11209, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11217, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11496, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11504, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -90406,7 +90439,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -90420,7 +90453,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+6316, zName) == 0) } @@ -90438,7 +90471,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -90505,7 +90538,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11537, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11545, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -90518,7 +90551,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11540, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11548, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -90532,7 +90565,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11577, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11585, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -90603,7 +90636,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11607, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11615, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -90620,7 +90653,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11636, 0) + ts+11644, 0) rc = SQLITE_ERROR __23: ; @@ -90696,7 +90729,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11704, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11712, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -90731,7 +90764,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -90784,14 +90817,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11732, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11740, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11753, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11761, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -90799,7 +90832,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11779, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11787, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -90836,7 +90869,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -90915,7 +90948,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -90923,12 +90956,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11801} /* sqlite3.c:113383:24 */ + FzName: ts + 11809} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -90936,10 +90969,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 11815} /* sqlite3.c:113403:24 */ + FzName: ts + 11823} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90951,7 +90984,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11829, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11837, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -90959,7 +90992,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -90984,7 +91017,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11853, + ts+11861, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -91020,7 +91053,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -91056,7 +91089,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -91071,15 +91104,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -91169,7 +91202,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -91182,8 +91215,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11899, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11907, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -91194,7 +91227,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -91209,11 +91242,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11922, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11930, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11928, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11936, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11934, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11942, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -91228,7 +91261,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -91277,7 +91310,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -91299,7 +91332,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11961, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11969, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -91311,7 +91344,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -91320,7 +91353,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -91335,7 +91368,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -91369,7 +91402,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -91381,7 +91414,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -91405,7 +91438,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -91558,7 +91591,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -91609,7 +91642,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -91633,14 +91666,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8003, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11976+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11995+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11984+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12003+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5828+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12009) + ts+12017) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11995+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12003+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+5828) } @@ -91666,11 +91699,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8003, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11995+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12003+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5828) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11976+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11984+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12009) + ts+12017) } } } @@ -91685,7 +91718,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -91706,7 +91739,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12028, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12036, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -91725,9 +91758,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12036 /* "no such view" */ + zMsg = ts + 12044 /* "no such view" */ } else { - zMsg = ts + 12049 /* "no such table" */ + zMsg = ts + 12057 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+6511, libc.VaList(bp, zMsg, zDbase, zName)) @@ -91748,7 +91781,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -91762,13 +91795,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+8003, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5828+7) == 0 { - return ts + 11995 /* "sqlite_schema" */ + return ts + 12003 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12009+7) == 0 { - return ts + 11976 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12017+7) == 0 { + return ts + 11984 /* "sqlite_temp_sche..." */ } } return zName @@ -91784,7 +91817,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -91811,7 +91844,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -91827,7 +91860,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -91859,7 +91892,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -91885,7 +91918,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -91906,7 +91939,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -91928,14 +91961,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -91958,7 +91991,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -91975,7 +92008,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -91994,7 +92027,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -92013,7 +92046,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -92063,7 +92096,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -92100,7 +92133,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -92113,7 +92146,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -92135,7 +92168,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -92148,7 +92181,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5828) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -92161,7 +92194,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -92197,7 +92230,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -92221,7 +92254,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92230,13 +92263,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12063, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12071, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12080, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12088, libc.VaList(bp, pName1)) return -1 } } else { @@ -92248,7 +92281,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -92262,7 +92295,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92283,7 +92316,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8003, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12100, + Xsqlite3ErrorMsg(tls, pParse, ts+12108, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -92293,7 +92326,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -92304,7 +92337,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -92324,7 +92357,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -92371,7 +92404,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -92401,7 +92434,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -92424,7 +92457,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -92452,7 +92485,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12009 /* "sqlite_temp_mast..." */ + return ts + 12017 /* "sqlite_temp_mast..." */ } return ts + 5828 /* "sqlite_master" */ }()) @@ -92472,7 +92505,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12142, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12150, 0) return __4: ; @@ -92519,7 +92552,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12009 + return ts + 12017 } return ts + 5828 }(), uintptr(0), zDb) != 0) { @@ -92559,7 +92592,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12183, + Xsqlite3ErrorMsg(tls, pParse, ts+12191, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 10360 /* "view" */ @@ -92579,7 +92612,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12204, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12212, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -92682,8 +92715,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -92693,10 +92726,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12239, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12247, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -92715,12 +92748,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12256, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12264, 0) } else { } @@ -92741,7 +92774,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12239 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12247 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -92753,7 +92786,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12239, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12247, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -92765,7 +92798,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -92787,7 +92820,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12290, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12298, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -92799,13 +92832,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12313, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12321, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12320, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12328, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -92845,7 +92878,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12330, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12338, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -92884,7 +92917,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -92931,7 +92964,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -93005,7 +93038,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -93017,11 +93050,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12356, + Xsqlite3ErrorMsg(tls, pParse, ts+12364, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12401, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12409, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -93058,7 +93091,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -93067,12 +93100,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12442, 0) + ts+12450, 0) } } @@ -93092,7 +93125,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93117,7 +93150,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12494, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12502, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -93206,7 +93239,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12535, 0) + ts+12543, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -93223,7 +93256,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -93253,7 +93286,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -93288,7 +93321,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93308,7 +93341,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12591, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12599, 0) goto generated_done __2: ; @@ -93321,13 +93354,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12634, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12642, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12642, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12650, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -93360,7 +93393,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12649, + Xsqlite3ErrorMsg(tls, pParse, ts+12657, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -93383,7 +93416,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -93397,7 +93430,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -93432,7 +93465,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -93468,7 +93501,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -93503,12 +93536,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1518 /* "" */ - zSep2 = ts + 12680 /* "," */ + zSep2 = ts + 12688 /* "," */ zEnd = ts + 4892 /* ")" */ } else { - zSep = ts + 12682 /* "\n " */ - zSep2 = ts + 12686 /* ",\n " */ - zEnd = ts + 12691 /* "\n)" */ + zSep = ts + 12690 /* "\n " */ + zSep2 = ts + 12694 /* ",\n " */ + zEnd = ts + 12699 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -93516,7 +93549,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12694, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12702, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -93556,15 +93589,15 @@ __6: var azType1 = [5]uintptr{ ts + 1518, - ts + 12708, - ts + 12714, - ts + 12719, - ts + 12724, -} /* sqlite3.c:115999:23 */ + ts + 12716, + ts + 12722, + ts + 12727, + ts + 12732, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -93593,7 +93626,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -93622,7 +93655,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -93642,7 +93675,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -93662,7 +93695,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -93695,7 +93728,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -93734,7 +93767,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -93897,7 +93930,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -93930,7 +93963,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -93974,7 +94007,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -94011,7 +94044,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -94067,10 +94100,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12730, + ts+12738, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1518))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12763, + Xsqlite3ErrorMsg(tls, pParse, ts+12771, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -94090,11 +94123,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12790, 0) + ts+12798, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12848, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -94138,7 +94171,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12872, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12880, 0) return } } @@ -94172,11 +94205,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 8745 /* "table" */ - zType2 = ts + 12916 /* "TABLE" */ + zType2 = ts + 12924 /* "TABLE" */ } else { // A view zType = ts + 10360 /* "view" */ - zType2 = ts + 12922 /* "VIEW" */ + zType2 = ts + 12930 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -94201,6 +94234,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -94257,7 +94295,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12927, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12935, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -94265,7 +94303,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12942, + ts+12950, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -94283,14 +94321,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13040, + ts+13048, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13082, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13090, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -94327,7 +94365,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -94348,7 +94386,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13116, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13124, 0) goto create_view_fail __1: ; @@ -94445,7 +94483,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94485,7 +94523,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13152, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13160, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -94560,7 +94598,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -94590,7 +94628,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -94616,14 +94654,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13182, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13190, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -94637,7 +94675,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13197, + ts+13205, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -94646,7 +94684,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -94692,7 +94730,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -94701,17 +94739,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13264, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13272, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11161, + ts+11169, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -94744,7 +94782,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13278, + ts+13286, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -94756,7 +94794,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13323, + ts+13331, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -94775,7 +94813,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -94786,7 +94824,7 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8003, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3221, 4) == 0 { return 0 @@ -94807,7 +94845,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -94875,7 +94913,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12009 + return ts + 12017 } return ts + 5828 }() @@ -94937,7 +94975,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13390, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13398, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -94947,14 +94985,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13418, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13426, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13452, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13460, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -94969,7 +95007,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11353, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11361, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -94995,7 +95033,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -95034,7 +95072,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13484, + ts+13492, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -95047,7 +95085,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, 0) + ts+13555, 0) goto fk_end goto __7 __6: @@ -95132,7 +95170,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13641, + ts+13649, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -95218,7 +95256,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -95243,7 +95281,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -95355,7 +95393,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -95380,7 +95418,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95389,12 +95427,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13687, + Xsqlite3ErrorMsg(tls, pParse, ts+13695, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13715 /* "FIRST" */ + return ts + 13723 /* "FIRST" */ } - return ts + 13721 /* "LAST" */ + return ts + 13729 /* "LAST" */ }())) return 1 } @@ -95413,7 +95451,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -95553,7 +95591,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13726, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13734, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -95574,7 +95612,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13732, + ts+13740, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -95606,21 +95644,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13782, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13790, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13810, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13818, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13835, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13843, 0) goto exit_create_index __17: ; @@ -95647,7 +95685,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13726, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13734, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -95662,7 +95700,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13869, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13877, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -95674,7 +95712,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13903, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13911, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -95703,7 +95741,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13927, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13935, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -95732,7 +95770,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12009 + return ts + 12017 } return ts + 5828 }(), uintptr(0), zDb) != 0) { @@ -95778,7 +95816,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13726) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13734) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -95896,7 +95934,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13950, 0) + ts+13958, 0) goto exit_create_index __56: ; @@ -96126,7 +96164,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14011, libc.VaList(bp+48, 0)) + ts+14019, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -96182,8 +96220,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14053, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+14061, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -96240,12 +96278,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14070, + zStmt = Xsqlite3MPrintf(tls, db, ts+14078, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1518 /* "" */ } - return ts + 14090 /* " UNIQUE" */ + return ts + 14098 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -96257,7 +96295,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14098, + ts+14106, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -96273,7 +96311,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14157, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14165, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -96369,7 +96407,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -96413,11 +96451,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -96452,7 +96490,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14184, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14192, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -96467,7 +96505,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14202, libc.VaList(bp+8, 0)) + ts+14210, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -96478,7 +96516,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12009 + return ts + 12017 } return ts + 5828 }() @@ -96508,9 +96546,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14275, + ts+14283, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11349, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11357, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -96536,7 +96574,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -96563,7 +96601,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -96594,7 +96632,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -96608,7 +96646,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -96646,7 +96684,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96661,7 +96699,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14335, + Xsqlite3ErrorMsg(tls, pParse, ts+14343, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -96728,7 +96766,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -96767,7 +96805,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -96799,7 +96837,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -96862,7 +96900,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96873,12 +96911,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14371, + Xsqlite3ErrorMsg(tls, pParse, ts+14379, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14407 /* "ON" */ + return ts + 14415 /* "ON" */ } - return ts + 14410 /* "USING" */ + return ts + 14418 /* "USING" */ }())) goto append_from_error __1: @@ -96926,7 +96964,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -96948,7 +96986,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -96965,7 +97003,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -96989,7 +97027,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -97000,14 +97038,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14416, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14424, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -97035,7 +97073,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -97043,9 +97081,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14422 + return ts + 14430 } - return ts + 14431 + return ts + 14439 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -97057,7 +97095,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -97070,11 +97108,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14416, ts + 14438, ts + 14422} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 14424, ts + 14446, ts + 14430} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97086,7 +97124,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14446, 0) + ts+14454, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -97100,13 +97138,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11922, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11930, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14530, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14538, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -97275,7 +97313,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -97290,7 +97328,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -97307,7 +97345,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -97349,7 +97387,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97409,14 +97447,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14539, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14547, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -97462,7 +97500,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -97482,7 +97520,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -97490,7 +97528,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -97500,7 +97538,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97519,7 +97557,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14585, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14593, libc.VaList(bp, zName)) } } } @@ -97543,7 +97581,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -97573,7 +97611,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -97604,7 +97642,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -97619,7 +97657,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -97630,7 +97668,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -97654,7 +97692,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -97699,7 +97737,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -97715,7 +97753,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -97735,7 +97773,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97757,7 +97795,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14615, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14623, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -97781,7 +97819,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -97822,7 +97860,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -97858,7 +97896,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -97870,7 +97908,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -97908,7 +97946,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -97988,7 +98026,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -98023,7 +98061,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -98070,7 +98108,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -98088,7 +98126,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -98109,7 +98147,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -98128,16 +98166,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14646, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14654, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14675, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14683, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -98146,7 +98184,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -98178,7 +98216,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -98729,7 +98767,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14713) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14721) __61: ; @@ -98784,7 +98822,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -98874,7 +98912,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11209) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11217) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -98921,7 +98959,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99010,7 +99048,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -99066,7 +99104,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -99094,7 +99132,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -99104,14 +99142,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -99141,7 +99179,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -99152,18 +99190,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6126, ts + 6121, ts + 7876, ts + 7871, ts + 6116} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 6126, ts + 6121, ts + 7876, ts + 7871, ts + 6116} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -99212,7 +99250,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -99224,7 +99262,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14726, -1) + Xsqlite3_result_error(tls, context, ts+14734, -1) return } iVal = -iVal @@ -99266,7 +99304,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -99381,7 +99419,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -99418,7 +99456,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -99526,7 +99564,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -99564,7 +99602,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14743, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14751, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -99580,7 +99618,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -99597,7 +99635,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -99618,7 +99656,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -99647,7 +99685,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99671,7 +99709,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -99689,7 +99727,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -99704,7 +99742,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -99713,7 +99751,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -99728,20 +99766,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -99781,7 +99819,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -99967,13 +100005,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -99991,7 +100029,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -100014,7 +100052,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14748, -1) + Xsqlite3_result_error(tls, context, ts+14756, -1) return } if argc == 3 { @@ -100026,7 +100064,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14781, -1) + ts+14789, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -100054,7 +100092,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -100064,7 +100102,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -100075,7 +100113,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -100086,7 +100124,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100098,7 +100136,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -100113,7 +100151,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -100128,11 +100166,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -100154,7 +100192,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14826, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14834, libc.VaList(bp+8, r1)) } } break @@ -100191,7 +100229,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14833, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14841, libc.VaList(bp+24, zArg)) break } @@ -100213,7 +100251,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -100236,7 +100274,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100250,7 +100288,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -100288,7 +100326,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -100326,7 +100364,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -100345,7 +100383,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -100434,7 +100472,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -100537,8 +100575,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 10789 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 10789 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -100547,7 +100585,7 @@ var azOne = [1]uintptr{uintptr(ts + 10789 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100585,7 +100623,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14836, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14844, 4, uintptr(0)) } } @@ -100598,10 +100636,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100613,7 +100651,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11961, -1) + Xsqlite3_result_error(tls, context, ts+11969, -1) return } @@ -100637,11 +100675,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -100651,7 +100689,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -100673,7 +100711,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -100696,12 +100734,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14726, -1) + Xsqlite3_result_error(tls, context, ts+14734, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -100710,7 +100748,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -100718,7 +100756,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -100732,14 +100770,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -100753,7 +100791,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -100764,7 +100802,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -100774,7 +100812,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -100812,7 +100850,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -100825,11 +100863,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -100845,9 +100883,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -100912,7 +100950,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -100954,7 +100992,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -100962,7 +101000,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -100980,8 +101018,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14841, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14849, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -100991,7 +101029,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -101001,14 +101039,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14847, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14855, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14847, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14855, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14847, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14847, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14855, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14855, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -101026,7 +101064,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -101082,7 +101120,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -101111,11 +101149,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -101125,7 +101163,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -101182,18 +101220,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -101214,7 +101252,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -101240,13 +101278,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -101274,7 +101312,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -101285,109 +101323,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14852}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14872}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14885}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14903}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14860}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14880}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14893}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14911}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14912}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14920}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14920}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14935}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14961}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 14986}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 14995}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15006}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15013}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15027}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15027}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15033}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15033}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15039}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15039}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15044}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15044}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15044}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15048}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15048}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15048}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15052}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15059}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15067}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15074}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15080}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15087}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15094}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15102}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15117}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15123}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15129}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15133}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15140}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15158}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15165}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15197}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15208}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14920}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14928}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14928}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14943}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14969}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 14994}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15003}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15014}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15021}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15035}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15035}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15041}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15041}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15047}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15047}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15052}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15052}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15052}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15056}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15056}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15056}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15060}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15067}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15075}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15082}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15088}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15095}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15102}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15110}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15115}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15119}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15119}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15125}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15131}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15141}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15148}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15155}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15166}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15173}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15188}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15216}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15222}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15240}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15254}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15262}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15278}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15288}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15292}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15298}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15302}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15302}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15308}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15308}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15248}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15262}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15270}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15279}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15279}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15286}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15296}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15300}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15306}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15310}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15310}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15316}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15316}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15321}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14847}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14847}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15326}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15326}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15335}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15340}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15329}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14855}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14855}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15334}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15334}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15343}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15348}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15354}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15360}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15363}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15367}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15373}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15363}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15378}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15382}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15386}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15392}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15396}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15401}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15406}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15411}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15421}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15356}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15362}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15368}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15371}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15375}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15371}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15386}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15390}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15400}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15404}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15409}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15414}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15419}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15429}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15434}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15439}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15444}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15456}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15462}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15437}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15442}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15447}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15452}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15458}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15464}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15470}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15475}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15486}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15326}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15491}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15491}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15494}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15334}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15499}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -101562,7 +101600,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -101673,7 +101711,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15495, + ts+15503, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -101708,7 +101746,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -101838,7 +101876,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -101865,7 +101903,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -101906,7 +101944,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -102030,7 +102068,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -102040,7 +102078,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -102054,7 +102092,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -102087,7 +102125,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -102150,7 +102188,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -102174,7 +102212,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -102198,7 +102236,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -102233,7 +102271,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -102435,7 +102473,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102494,7 +102532,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -102562,7 +102600,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -102765,7 +102803,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -102786,7 +102824,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -102846,7 +102884,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -102888,7 +102926,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -102967,7 +103005,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -103025,7 +103063,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -103061,7 +103099,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -103074,7 +103112,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -103187,7 +103225,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -103241,7 +103279,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -103281,7 +103319,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -103295,7 +103333,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -103303,7 +103341,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -103314,7 +103352,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -103345,16 +103383,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -103455,7 +103493,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -103637,7 +103675,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -103727,7 +103768,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15540, + ts+15548, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -103752,7 +103793,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15581, + Xsqlite3ErrorMsg(tls, pParse, ts+15589, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -103924,7 +103965,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15613, + ts+15621, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -103934,7 +103975,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15665, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15673, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -103990,7 +104031,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15690, + Xsqlite3ErrorMsg(tls, pParse, ts+15698, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -103998,7 +104039,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15736, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15744, 0) goto insert_cleanup __57: ; @@ -104482,7 +104523,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15757) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15765) __123: ; @@ -104506,7 +104547,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -104533,7 +104574,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -104567,7 +104608,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -104578,7 +104619,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -104586,12 +104627,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -104604,7 +104645,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -104710,7 +104751,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -104828,7 +104869,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11922, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11930, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -105573,7 +105614,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -105590,7 +105631,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -105693,7 +105734,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -105771,7 +105812,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -105829,7 +105870,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -105850,18 +105891,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -106215,7 +106250,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -106236,7 +106271,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -106425,7 +106460,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -106759,7 +106794,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -106773,7 +106808,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -106817,7 +106852,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11961, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11969, 0) __3: ; return SQLITE_ERROR @@ -106827,7 +106862,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15771 /* "sqlite3_extensio..." */ + zEntry = ts + 15779 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -106847,7 +106882,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11922, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11930, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -106893,7 +106928,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15794, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15802, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -106907,7 +106942,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15803, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15811, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -106931,7 +106966,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15807, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15815, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -106949,7 +106984,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15813, libc.VaList(bp+16, zEntry, zFile)) + ts+15821, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -106976,7 +107011,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15856, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15864, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -107016,7 +107051,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15888, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15896, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -107026,10 +107061,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15925, -} /* sqlite3.c:129386:21 */ + ts + 15933, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -107040,7 +107075,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -107051,7 +107086,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -107071,15 +107106,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -107089,7 +107124,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -107130,7 +107165,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -107149,7 +107184,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -107164,7 +107199,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -107195,7 +107230,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15928, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15936, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -107241,67 +107276,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 4992, - ts + 15967, + ts + 15975, ts + 8745, - ts + 15971, - ts + 15976, ts + 15979, - ts + 15989, - ts + 15999, - ts + 16005, - ts + 16009, - ts + 16014, - ts + 16019, + ts + 15984, + ts + 15987, + ts + 15997, + ts + 16007, + ts + 16013, + ts + 16017, + ts + 16022, ts + 16027, - ts + 16038, - ts + 16041, + ts + 16035, + ts + 16046, + ts + 16049, - ts + 16048, - ts + 16009, - ts + 16014, - ts + 16055, - ts + 16060, + ts + 16056, + ts + 16017, + ts + 16022, ts + 16063, - ts + 16070, - ts + 16005, - ts + 16009, - ts + 16076, - ts + 16081, - ts + 16086, - ts + 16009, - ts + 16090, - ts + 16014, + ts + 16068, + ts + 16071, + ts + 16078, + ts + 16013, + ts + 16017, + ts + 16084, + ts + 16089, + ts + 16094, + ts + 16017, ts + 16098, - ts + 16102, - ts + 16107, - ts + 11353, - ts + 11349, - ts + 16113, - ts + 16118, - ts + 16123, - ts + 15967, - ts + 16009, - ts + 16128, - ts + 16135, - ts + 16142, - ts + 8745, + ts + 16022, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 11361, + ts + 11357, + ts + 16121, + ts + 16126, + ts + 16131, + ts + 15975, + ts + 16017, + ts + 16136, + ts + 16143, ts + 16150, + ts + 8745, + ts + 16158, ts + 4995, - ts + 16156, + ts + 16164, - ts + 15967, - ts + 16009, - ts + 16161, - ts + 16166, - ts + 15363, - ts + 16171, + ts + 15975, + ts + 16017, + ts + 16169, + ts + 16174, + ts + 15371, + ts + 16179, - ts + 16184, - ts + 16193, - ts + 16200, + ts + 16192, + ts + 16201, + ts + 16208, - ts + 16211, -} /* sqlite3.c:129831:19 */ + ts + 16219, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -107312,247 +107347,247 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16219, + { /* zName: */ FzName: ts + 16227, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16234, + { /* zName: */ FzName: ts + 16242, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16249, + { /* zName: */ FzName: ts + 16257, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16261, + { /* zName: */ FzName: ts + 16269, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16277, + { /* zName: */ FzName: ts + 16285, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16200, + { /* zName: */ FzName: ts + 16208, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16290, + { /* zName: */ FzName: ts + 16298, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16302, + { /* zName: */ FzName: ts + 16310, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16322, + { /* zName: */ FzName: ts + 16330, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16338, + { /* zName: */ FzName: ts + 16346, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16359, + { /* zName: */ FzName: ts + 16367, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16374, + { /* zName: */ FzName: ts + 16382, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16390, + { /* zName: */ FzName: ts + 16398, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16404, + { /* zName: */ FzName: ts + 16412, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16417, + { /* zName: */ FzName: ts + 16425, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16431, + { /* zName: */ FzName: ts + 16439, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16450, + { /* zName: */ FzName: ts + 16458, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16469, + { /* zName: */ FzName: ts + 16477, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16492, + { /* zName: */ FzName: ts + 16500, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16501, + { /* zName: */ FzName: ts + 16509, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16519, + { /* zName: */ FzName: ts + 16527, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16536, + { /* zName: */ FzName: ts + 16544, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16549, + { /* zName: */ FzName: ts + 16557, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16564, + { /* zName: */ FzName: ts + 16572, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16582, + { /* zName: */ FzName: ts + 16590, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16592, + { /* zName: */ FzName: ts + 16600, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16606, + { /* zName: */ FzName: ts + 16614, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16622, + { /* zName: */ FzName: ts + 16630, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16647, + { /* zName: */ FzName: ts + 16655, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16666, + { /* zName: */ FzName: ts + 16674, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16677, + { /* zName: */ FzName: ts + 16685, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16688, + { /* zName: */ FzName: ts + 16696, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16700, + { /* zName: */ FzName: ts + 16708, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16716, + { /* zName: */ FzName: ts + 16724, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16729, + { /* zName: */ FzName: ts + 16737, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16748, + { /* zName: */ FzName: ts + 16756, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16767, + { /* zName: */ FzName: ts + 16775, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16780, + { /* zName: */ FzName: ts + 16788, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16795, + { /* zName: */ FzName: ts + 16803, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16805, + { /* zName: */ FzName: ts + 16813, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16817, + { /* zName: */ FzName: ts + 16825, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16826, + { /* zName: */ FzName: ts + 16834, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16837, + { /* zName: */ FzName: ts + 16845, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16847, + { /* zName: */ FzName: ts + 16855, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16859, + { /* zName: */ FzName: ts + 16867, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16870, + { /* zName: */ FzName: ts + 16878, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16882, + { /* zName: */ FzName: ts + 16890, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16899, + { /* zName: */ FzName: ts + 16907, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16918, + { /* zName: */ FzName: ts + 16926, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16944, + { /* zName: */ FzName: ts + 16952, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16959, + { /* zName: */ FzName: ts + 16967, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16973, + { /* zName: */ FzName: ts + 16981, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 16992, + { /* zName: */ FzName: ts + 17000, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17006, + { /* zName: */ FzName: ts + 17014, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17022, + { /* zName: */ FzName: ts + 17030, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17034, + { /* zName: */ FzName: ts + 17042, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17045, + { /* zName: */ FzName: ts + 17053, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 17056, + { /* zName: */ FzName: ts + 17064, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 17068, + { /* zName: */ FzName: ts + 17076, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17079, + { /* zName: */ FzName: ts + 17087, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17100, + { /* zName: */ FzName: ts + 17108, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17108, + { /* zName: */ FzName: ts + 17116, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 17123, + { /* zName: */ FzName: ts + 17131, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 17136, + { /* zName: */ FzName: ts + 17144, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 17155, + { /* zName: */ FzName: ts + 17163, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17170, + { /* zName: */ FzName: ts + 17178, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -107568,7 +107603,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -107585,13 +107620,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17186)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17194)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -107600,12 +107635,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17211) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17219) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17221) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17229) { return PAGER_LOCKINGMODE_NORMAL } } @@ -107616,15 +107651,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+7889) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17228) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17236) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17233) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17241) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -107639,12 +107674,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16161) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16169) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17245) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17253) == 0 { return 2 } else { return 0 @@ -107654,13 +107689,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17252, 0) + ts+17260, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -107673,7 +107708,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -107687,7 +107722,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -107721,7 +107756,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -107731,7 +107766,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -107740,7 +107775,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -107756,23 +107791,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17314 /* "SET NULL" */ + zName = ts + 17322 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17323 /* "SET DEFAULT" */ + zName = ts + 17331 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17335 /* "CASCADE" */ + zName = ts + 17343 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17343 /* "RESTRICT" */ + zName = ts + 17351 /* "RESTRICT" */ break default: - zName = ts + 17352 /* "NO ACTION" */ + zName = ts + 17360 /* "NO ACTION" */ break } return zName @@ -107781,7 +107816,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -107790,11 +107825,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17362, ts + 17369, ts + 17377, ts + 17381, ts + 17245, ts + 17390, -} /* sqlite3.c:130656:15 */ + ts + 17370, ts + 17377, ts + 17385, ts + 17389, ts + 17253, ts + 17398, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -107821,7 +107856,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -107836,13 +107871,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17394 /* "w" */ + zType = ts + 17402 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17396 /* "a" */ + zType = ts + 17404 /* "a" */ } else { zType = ts + 7399 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17398, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17406, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -107850,15 +107885,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17405, ts + 17410, ts + 17418 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17413, ts + 17418, ts + 17426 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -107880,7 +107915,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(608) defer tls.Free(608) @@ -108125,7 +108160,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17426, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17434, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -108768,7 +108803,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17430) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17438) == 0) { goto __64 } b = 2 @@ -108857,7 +108892,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17221 /* "normal" */ + zRet = ts + 17229 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -108898,7 +108933,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17211 /* "exclusive" */ + zRet = ts + 17219 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -109226,7 +109261,7 @@ __116: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 504)) == 0) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+17435, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17443, 0) goto pragma_out __119: ; @@ -109272,7 +109307,7 @@ __123: goto __125 } Xsqlite3ErrorMsg(tls, pParse, - ts+17460, 0) + ts+17468, 0) goto __126 __125: if !(iDb != 1) { @@ -109328,7 +109363,7 @@ __132: __134: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17513) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17521) == 0) { goto __135 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -109442,9 +109477,9 @@ __148: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17519 /* "issisii" */ + return ts + 17527 /* "issisii" */ } - return ts + 17527 /* "issisi" */ + return ts + 17535 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -109529,7 +109564,7 @@ __163: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __164 } - zSql = Xsqlite3MPrintf(tls, db, ts+17534, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17542, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __165 } @@ -109582,13 +109617,13 @@ __171: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __173 } - zType = ts + 12634 /* "virtual" */ + zType = ts + 12642 /* "virtual" */ goto __174 __173: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __175 } - zType = ts + 17550 /* "shadow" */ + zType = ts + 17558 /* "shadow" */ goto __176 __175: zType = ts + 8745 /* "table" */ @@ -109598,7 +109633,7 @@ __174: ; __172: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17557, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17565, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -109668,7 +109703,7 @@ __183: goto __185 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17564, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17572, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -109678,7 +109713,7 @@ __183: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __186 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17569, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17577, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -109715,8 +109750,8 @@ __189: if !(pIdx1 != 0) { goto __191 } - *(*[3]uintptr)(unsafe.Pointer(bp + 520 /* azOrigin */)) = [3]uintptr{ts + 17574, ts + 17576, ts + 16038} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17578, + *(*[3]uintptr)(unsafe.Pointer(bp + 520 /* azOrigin */)) = [3]uintptr{ts + 17582, ts + 17584, ts + 16046} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17586, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -109750,7 +109785,7 @@ __192: __195: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17584, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17592, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -109773,7 +109808,7 @@ __196: goto __198 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17588, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17596, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __197 __197: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -109892,7 +109927,7 @@ __219: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __221 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17591, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17599, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -109900,7 +109935,7 @@ __219: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17600)) + ts+17608)) goto __220 __220: j2++ @@ -110101,7 +110136,7 @@ __249: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __250: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17605, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17613, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552 /* aiCols */))) @@ -110367,7 +110402,7 @@ __277: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17609, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17617, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -110469,7 +110504,7 @@ __297: goto __298 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17633, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17641, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { @@ -110491,7 +110526,7 @@ __298: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17653, + zErr = Xsqlite3MPrintf(tls, db, ts+17661, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -110535,7 +110570,7 @@ __306: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17675, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17683, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -110569,9 +110604,9 @@ __311: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 568))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17705) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17713) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17710) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17718) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -110611,7 +110646,7 @@ __315: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17731) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17739) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __312: @@ -110633,7 +110668,7 @@ __307: if !!(isQuick != 0) { goto __317 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17758) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17766) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __318: @@ -110684,7 +110719,7 @@ __259: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 560)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17787 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17795 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __322: @@ -110762,7 +110797,7 @@ __329: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __331 } - Xsqlite3ErrorMsg(tls, pParse, ts+17790, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17798, libc.VaList(bp+416, zRight)) __331: ; __326: @@ -110874,19 +110909,19 @@ __48: if !(zRight != 0) { goto __338 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17228) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17236) == 0) { goto __339 } eMode2 = SQLITE_CHECKPOINT_FULL goto __340 __339: - if !(Xsqlite3StrICmp(tls, zRight, ts+17815) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17823) == 0) { goto __341 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __342 __341: - if !(Xsqlite3StrICmp(tls, zRight, ts+17381) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17389) == 0) { goto __343 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -111073,7 +111108,7 @@ __358: __360: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17823, + zSubSql = Xsqlite3MPrintf(tls, db, ts+17831, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __361 @@ -111224,9 +111259,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -111237,16 +111272,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -111255,27 +111290,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17841, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17846, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17852, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17861, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17870, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17878, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17886}, - {FzName: ts + 17893}, + {FzName: ts + 17849, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17854, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17860, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17869, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17878, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17886, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17894}, + {FzName: ts + 17901}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -111287,24 +111322,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -111321,7 +111356,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17899) + Xsqlite3_str_appendall(tls, bp+32, ts+17907) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -111329,7 +111364,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17914, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17922, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -111342,16 +111377,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17921, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17929, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17927) + Xsqlite3_str_appendall(tls, bp+32, ts+17935) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17939) + Xsqlite3_str_appendall(tls, bp+32, ts+17947) j++ } Xsqlite3_str_append(tls, bp+32, ts+4892, 1) @@ -111378,7 +111413,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -111390,7 +111425,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -111455,7 +111490,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -111468,7 +111503,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -111479,7 +111514,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -111487,7 +111522,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -111503,7 +111538,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -111549,13 +111584,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+17954) + Xsqlite3_str_appendall(tls, bp+32, ts+17962) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17962, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17970, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17966, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17974, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -111571,14 +111606,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -111590,7 +111625,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -111608,12 +111643,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -111646,7 +111681,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -111657,12 +111692,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17970, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+17978, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -111671,25 +111706,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4943 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+17998, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18006, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18029, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18037, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 18037, - ts + 18044, - ts + 18056, -} /* sqlite3.c:133149:23 */ + ts + 18045, + ts + 18052, + ts + 18064, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -111711,7 +111746,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -111756,7 +111791,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14053) + corruptSchema(tls, pData, argv, ts+14061) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -111794,13 +111829,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18067) + corruptSchema(tls, pData, argv, ts+18075) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14053) + corruptSchema(tls, pData, argv, ts+14061) } } } @@ -111813,7 +111848,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -111846,13 +111881,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8745 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12009 + return ts + 12017 } return ts + 5828 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7809 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18080 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18088 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -111965,7 +112000,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11636) + ts+11644) rc = SQLITE_ERROR goto initone_error_out __13: @@ -112005,7 +112040,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18152) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18160) rc = SQLITE_ERROR goto initone_error_out __17: @@ -112027,7 +112062,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18176, + ts+18184, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -112114,7 +112149,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -112146,7 +112181,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -112165,7 +112200,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -112218,7 +112253,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -112245,7 +112280,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -112301,7 +112336,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -112324,7 +112359,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) @@ -112337,7 +112372,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -112419,7 +112454,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18210, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18218, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -112446,7 +112481,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18240, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18248, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -112543,13 +112578,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -112578,7 +112613,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -112617,14 +112652,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -112637,7 +112672,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -112654,7 +112689,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -112667,7 +112702,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -112702,21 +112737,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -112750,7 +112785,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -112771,7 +112806,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -112801,7 +112836,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -112819,19 +112854,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -112860,7 +112895,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -112871,7 +112906,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -112921,14 +112956,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -112950,7 +112985,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -112993,18 +113028,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18259, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18267, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18303, 0) + ts+18311, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18358)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18366)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -113017,11 +113052,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -113055,7 +113090,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -113083,7 +113118,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -113128,7 +113163,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -113152,7 +113187,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -113187,7 +113222,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -113219,7 +113254,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18392, libc.VaList(bp, 0)) + ts+18400, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -113243,7 +113278,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18442, 0) + ts+18450, 0) return 1 } @@ -113278,7 +113313,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18497, libc.VaList(bp+8, zName)) + ts+18505, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -113301,11 +113336,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -113314,7 +113349,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -113327,7 +113362,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -113470,7 +113505,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -113518,7 +113553,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -113599,7 +113634,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -113627,7 +113662,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113983,7 +114018,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra))) if p != 0 { @@ -114001,7 +114036,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -114012,7 +114047,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -114032,7 +114067,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -114066,20 +114101,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18561 /* "UNION ALL" */ + z = ts + 18569 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18571 /* "INTERSECT" */ + z = ts + 18579 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18581 /* "EXCEPT" */ + z = ts + 18589 /* "EXCEPT" */ break default: - z = ts + 18588 /* "UNION" */ + z = ts + 18596 /* "UNION" */ break } return z @@ -114093,11 +114128,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18594, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18602, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -114110,7 +114145,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -114289,7 +114324,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -114367,7 +114402,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1083 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16150 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 16158 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -114413,7 +114448,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -114470,7 +114505,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -114522,13 +114557,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16150 /* "rowid" */ + zCol = ts + 16158 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11922, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11930, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -114538,7 +114573,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18617, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18625, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -114570,7 +114605,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -114631,7 +114666,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16150 /* "rowid" */ + zName = ts + 16158 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -114644,7 +114679,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18617, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18625, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -114659,7 +114694,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18626, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18634, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -114702,7 +114737,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -114771,7 +114806,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -114806,7 +114841,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -114838,7 +114873,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114895,7 +114930,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -114919,7 +114954,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -114988,7 +115023,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -115024,7 +115059,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18634, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18642, 0) return __1: ; @@ -115134,7 +115169,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18683, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18691, 0) goto end_of_recursive_query __15: ; @@ -115156,7 +115191,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18725, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18733, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -115199,7 +115234,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18731, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18739, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -115229,7 +115264,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -115249,11 +115284,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18746, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18754, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1518 /* "" */ } - return ts + 18769 /* "S" */ + return ts + 18777 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -115269,7 +115304,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -115305,7 +115340,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -115405,8 +115440,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18771, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18786, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18779, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18794, 0) __8: ; @@ -115455,7 +115490,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18561, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18569, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -115531,7 +115566,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18805, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18813, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -115603,7 +115638,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18805, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18813, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -115768,15 +115803,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18826, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18834, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18872, + ts+18880, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -115799,7 +115834,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -115995,7 +116030,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -116202,7 +116237,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18954, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18962, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -116210,7 +116245,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18965, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18973, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -116224,7 +116259,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18970, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18978, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -116345,14 +116380,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -116365,7 +116400,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -116448,7 +116483,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -116458,7 +116493,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -116501,7 +116536,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -116517,7 +116552,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -116549,7 +116584,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -116582,7 +116617,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -116592,7 +116627,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -116619,7 +116654,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -116789,7 +116824,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -117214,7 +117249,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -117222,7 +117257,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -117264,7 +117299,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -117299,7 +117334,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -117353,7 +117388,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -117420,7 +117455,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -117473,7 +117508,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -117544,7 +117579,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -117632,7 +117667,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -117648,12 +117683,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15044) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15052) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15048) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15056) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -117682,7 +117717,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -117722,7 +117757,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -117733,7 +117768,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18976, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+18984, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -117761,7 +117796,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -117840,12 +117875,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18994, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19002, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -117859,7 +117894,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -117894,7 +117929,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -117927,7 +117962,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -118010,7 +118045,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19017, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19025, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -118037,7 +118072,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19037, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19045, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -118053,7 +118088,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19080 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19088 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -118079,7 +118114,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19103, + Xsqlite3ErrorMsg(tls, pParse, ts+19111, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -118090,9 +118125,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19141 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19149 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19183 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -118109,7 +118144,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -118125,7 +118160,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -118140,7 +118175,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19213, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19221, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -118179,7 +118214,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -118267,7 +118302,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19225, + Xsqlite3ErrorMsg(tls, pParse, ts+19233, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -118286,7 +118321,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19264, + Xsqlite3ErrorMsg(tls, pParse, ts+19272, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -118294,7 +118329,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19295, + Xsqlite3ErrorMsg(tls, pParse, ts+19303, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -118459,7 +118494,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11922, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11930, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -118475,7 +118510,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19328, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19336, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -118495,9 +118530,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19337, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19345, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19355, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19363, 0) } } } @@ -118507,7 +118542,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19375, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19383, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -118528,7 +118563,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -118566,7 +118601,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -118614,7 +118649,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -118643,7 +118678,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -118668,7 +118703,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -118696,13 +118731,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19406, 0) + ts+19414, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19457, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19465, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -118718,7 +118753,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -118757,7 +118792,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -118898,17 +118933,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19490, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19498, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19502 /* " USING COVERING ..." */ + return ts + 19510 /* " USING COVERING ..." */ } return ts + 1518 /* "" */ }(), @@ -118930,7 +118965,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -118976,7 +119011,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -118994,7 +119029,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -119035,7 +119070,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -119052,7 +119087,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -119253,7 +119288,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19525, + ts+19533, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -119339,7 +119374,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19579, + Xsqlite3ErrorMsg(tls, pParse, ts+19587, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -119579,7 +119614,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19619, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19627, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) @@ -119642,7 +119677,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19634, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19642, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -120164,9 +120199,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19650 /* "DISTINCT" */ + return ts + 19658 /* "DISTINCT" */ } - return ts + 19659 /* "GROUP BY" */ + return ts + 19667 /* "GROUP BY" */ }()) groupBySort = 1 @@ -120579,7 +120614,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19650) + explainTempTable(tls, pParse, ts+19658) __141: ; @@ -120591,9 +120626,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19668 /* "RIGHT PART OF OR..." */ + return ts + 19676 /* "RIGHT PART OF OR..." */ } - return ts + 19691 /* "ORDER BY" */ + return ts + 19699 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -120649,7 +120684,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -120673,12 +120708,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120749,7 +120784,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19700, 0) + ts+19708, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -120809,7 +120844,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -120881,7 +120916,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -120912,7 +120947,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -120941,7 +120976,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -120979,7 +121014,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -121009,7 +121044,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19765, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19773, 0) goto trigger_cleanup __3: ; @@ -121070,7 +121105,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19811, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19819, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -121088,7 +121123,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19819, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19827, 0) goto trigger_orphan_error __11: ; @@ -121103,7 +121138,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19811, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19819, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -121119,7 +121154,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19860, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19868, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -121136,7 +121171,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8003, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19886, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19894, 0) goto trigger_cleanup __18: ; @@ -121146,12 +121181,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19924, + Xsqlite3ErrorMsg(tls, pParse, ts+19932, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19961 /* "BEFORE" */ + return ts + 19969 /* "BEFORE" */ } - return ts + 19968 /* "AFTER" */ + return ts + 19976 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -121160,7 +121195,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19974, libc.VaList(bp+24, pTableName+8)) + ts+19982, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -121190,7 +121225,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12009 + return ts + 12017 } return ts + 5828 }(), uintptr(0), zDb) != 0) { @@ -121286,7 +121321,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -121326,7 +121361,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19811, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+19819, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -121363,13 +121398,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+20020, + ts+20028, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20095, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20103, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -121410,7 +121445,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -121428,7 +121463,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -121445,10 +121480,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1))) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -121469,7 +121507,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -121501,7 +121539,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -121530,7 +121568,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -121549,7 +121587,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -121569,7 +121607,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121635,7 +121673,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20124, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20132, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -121653,12 +121691,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -121676,7 +121714,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12009 + return ts + 12017 } return ts + 5828 }() @@ -121691,7 +121729,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20144, + ts+20152, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -121699,7 +121737,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -121730,7 +121768,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -121747,7 +121785,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -121810,12 +121848,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20206, + ts+20214, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20254 /* "DELETE" */ + return ts + 20262 /* "DELETE" */ } - return ts + 20261 /* "UPDATE" */ + return ts + 20269 /* "UPDATE" */ }())) __15: ; @@ -121874,7 +121912,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -121899,7 +121937,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -121911,7 +121949,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20268, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20276, 0) return 1 } @@ -121920,7 +121958,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -121961,7 +121999,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -122029,7 +122067,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -122116,7 +122154,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -122129,7 +122167,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -122186,7 +122224,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20310, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20318, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -122235,7 +122273,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -122264,7 +122302,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -122324,7 +122362,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -122372,7 +122410,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -122429,7 +122467,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122459,7 +122497,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -122480,7 +122518,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -122492,7 +122530,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -122536,7 +122574,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -122619,7 +122657,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -122900,7 +122938,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20324, + ts+20332, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -122932,7 +122970,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20360, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20368, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -123973,7 +124011,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20379) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20387) __169: ; @@ -124009,7 +124047,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124182,7 +124220,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -124195,14 +124233,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -124215,7 +124253,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -124241,7 +124279,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -124361,10 +124399,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 216)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20392, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20400, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20396, libc.VaList(bp+8, bp+216)) + ts+20404, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -124383,7 +124421,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -124405,7 +124443,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -124421,7 +124459,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -124455,7 +124493,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12063, -1) + ts+12071, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -124501,7 +124539,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124523,7 +124561,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20469, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20473, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20477, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20481, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -124541,7 +124579,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -124585,7 +124623,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -124642,7 +124680,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -124673,14 +124711,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20477) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20485) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20517) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20525) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -124691,7 +124729,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20560) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20568) return SQLITE_ERROR __5: ; @@ -124736,7 +124774,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20578, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20586, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -124757,7 +124795,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20601) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20609) goto end_of_vacuum __8: ; @@ -124773,7 +124811,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14416) + rc = execSql(tls, db, pzErrMsg, ts+14424) if !(rc != SQLITE_OK) { goto __9 } @@ -124825,7 +124863,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20628, + ts+20636, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -124835,7 +124873,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20736, + ts+20744, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -124850,7 +124888,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20790, + ts+20798, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -124867,7 +124905,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20941, + ts+20949, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -124980,7 +125018,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -124988,7 +125026,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -125028,7 +125066,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -125042,18 +125080,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -125074,7 +125112,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -125092,14 +125130,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -125109,7 +125147,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -125130,7 +125168,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -125167,7 +125205,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -125198,7 +125236,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -125224,7 +125262,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -125244,7 +125282,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125254,7 +125292,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12290, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12298, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -125270,7 +125308,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -125305,7 +125343,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -125316,7 +125354,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -125351,7 +125389,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21071, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21079, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -125363,7 +125401,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21095, + ts+21103, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -125373,7 +125411,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21194, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21202, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -125400,7 +125438,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -125408,7 +125446,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -125422,7 +125460,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -125443,7 +125481,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21213, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21221, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -125483,7 +125521,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21255, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21263, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3598, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -125497,7 +125535,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21285 /* "vtable construct..." */ + var zFormat uintptr = ts + 21293 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -125518,7 +125556,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16041, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16049, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -125558,7 +125596,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -125577,7 +125615,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21331, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21339, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -125594,7 +125632,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -125614,7 +125652,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -125626,7 +125664,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -125645,7 +125683,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21331, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21339, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -125666,7 +125704,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -125682,7 +125720,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -125756,7 +125794,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -125801,7 +125839,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -125831,7 +125869,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -125853,14 +125891,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -125871,7 +125909,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -125932,7 +125970,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -125980,7 +126018,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -126047,7 +126085,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -126086,7 +126124,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -126131,7 +126169,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -126148,19 +126186,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -126169,7 +126207,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -126197,7 +126235,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -126261,7 +126299,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -126301,23 +126339,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -126347,9 +126385,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -126376,9 +126414,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -126388,9 +126426,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -126410,9 +126448,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -126425,9 +126463,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -126442,24 +126480,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -126481,7 +126519,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -126507,7 +126545,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -126529,7 +126567,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -126551,13 +126589,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21350 /* "" */ + return ts + 21358 /* "" */ } if i == -1 { - return ts + 16150 /* "rowid" */ + return ts + 16158 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -126568,19 +126606,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21357, 5) + Xsqlite3_str_append(tls, pStr, ts+21365, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21363, 1) + Xsqlite3_str_append(tls, pStr, ts+21371, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12680, 1) + Xsqlite3_str_append(tls, pStr, ts+12688, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -126591,11 +126629,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21363, 1) + Xsqlite3_str_append(tls, pStr, ts+21371, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12680, 1) + Xsqlite3_str_append(tls, pStr, ts+12688, 1) } Xsqlite3_str_append(tls, pStr, ts+4943, 1) } @@ -126616,7 +126654,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -126629,27 +126667,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21365, 2) + Xsqlite3_str_append(tls, pStr, ts+21373, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21357, 5) + Xsqlite3_str_append(tls, pStr, ts+21365, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21368 /* "%s=?" */ + return ts + 21376 /* "%s=?" */ } - return ts + 21373 /* "ANY(%s)" */ + return ts + 21381 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21381) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21389) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21383) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21391) } Xsqlite3_str_append(tls, pStr, ts+4892, 1) } @@ -126661,7 +126699,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -126696,11 +126734,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21385, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21393, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21391 /* "SEARCH" */ + return ts + 21399 /* "SEARCH" */ } - return ts + 21398 /* "SCAN" */ + return ts + 21406 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -126710,30 +126748,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10837 /* "PRIMARY KEY" */ + zFmt = ts + 10845 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21403 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21411 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21436 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21444 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21461 /* "COVERING INDEX %..." */ + zFmt = ts + 21469 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21479 /* "INDEX %s" */ + zFmt = ts + 21487 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21488, 7) + Xsqlite3_str_append(tls, bp+64, ts+21496, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16150 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+21496, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16158 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+21504, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21527, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21535, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -126741,9 +126779,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21537, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21545, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21542, + Xsqlite3_str_appendf(tls, bp+64, ts+21550, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -126762,7 +126800,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -126780,22 +126818,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21569, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21577, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21368, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21376, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21590, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21598, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21357, 5) + Xsqlite3_str_append(tls, bp+24, ts+21365, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21368, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21376, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4892, 1) @@ -126845,7 +126883,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -126878,7 +126916,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -126911,7 +126949,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -126949,7 +126987,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -127024,7 +127062,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -127217,7 +127255,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -127254,6 +127292,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -127337,7 +127376,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -127378,7 +127417,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -127406,10 +127445,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -127426,7 +127465,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -127446,7 +127485,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -127468,7 +127507,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -127533,7 +127572,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -127579,7 +127618,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127589,6 +127628,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -127621,7 +127663,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -127692,7 +127734,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -127754,53 +127795,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -127808,8 +127848,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -128445,6 +128485,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -128459,7 +128507,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -128476,7 +128526,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21598, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21606, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -128495,7 +128545,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21613, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -128843,24 +128893,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -128882,7 +128932,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -128924,14 +128974,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -128951,7 +129001,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -128978,7 +129028,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129150,7 +129200,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129255,18 +129305,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 15999, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15321, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14847, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21622, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 16007, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15329, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14855, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21630, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -129274,7 +129324,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -129283,7 +129333,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -129314,7 +129364,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -129447,7 +129497,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -129766,7 +129816,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -129795,7 +129845,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -129830,7 +129880,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -129868,7 +129918,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -129909,7 +129959,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -129972,7 +130022,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21629, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21637, 0) return } } @@ -130156,7 +130206,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21670 /* "NOCASE" */ + return ts + 21678 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -130277,7 +130327,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -130300,7 +130350,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -130324,7 +130374,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -130376,7 +130426,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -130426,7 +130476,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -130439,7 +130489,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -130499,7 +130549,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -130529,7 +130579,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -130539,14 +130589,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -130563,7 +130613,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -130575,7 +130625,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -130600,7 +130650,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21677, + Xsqlite3ErrorMsg(tls, pParse, ts+21685, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -130659,7 +130709,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -130689,16 +130739,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -130708,7 +130758,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -130733,7 +130783,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -130754,7 +130804,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { @@ -130775,14 +130825,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -130801,19 +130851,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{}))) } @@ -130823,7 +130873,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -130900,7 +130950,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -130920,14 +130970,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -130938,7 +130988,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -131042,7 +131092,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -131064,7 +131114,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -131119,7 +131169,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -131149,7 +131199,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -131170,7 +131220,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -131191,7 +131241,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -131261,7 +131311,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -131278,7 +131328,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -131321,7 +131371,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -131355,7 +131405,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -131441,7 +131491,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21713, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21721, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -131522,7 +131572,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21739 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21747 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -131713,7 +131763,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -131789,7 +131839,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -131813,7 +131868,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -132039,7 +132094,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -132066,7 +132121,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132104,7 +132159,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -132243,7 +132298,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -132256,7 +132311,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -132300,7 +132355,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -132415,7 +132470,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -132723,7 +132778,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -132732,7 +132787,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -132752,7 +132807,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) @@ -132769,13 +132824,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -132796,7 +132851,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -132822,7 +132877,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -132866,7 +132921,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -132925,7 +132980,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -133014,7 +133069,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -133121,7 +133176,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -133224,7 +133279,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -133292,7 +133347,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -133652,7 +133707,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -133694,7 +133749,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -133769,7 +133824,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -134054,7 +134109,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -134078,7 +134133,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -134180,7 +134235,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21758, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -134253,7 +134308,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21750, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21758, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -134302,7 +134357,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -134325,7 +134380,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -134348,7 +134403,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -134374,7 +134429,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -134403,7 +134458,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -134539,7 +134594,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -134664,7 +134719,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -134716,7 +134771,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21776, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21784, 0) rc = SQLITE_OK } else { goto __3 @@ -134752,7 +134807,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -135120,7 +135175,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) } @@ -135128,7 +135183,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -135175,7 +135230,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -135490,7 +135545,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21811, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21819, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -135582,7 +135637,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -135689,7 +135744,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -135700,7 +135755,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -135746,7 +135801,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -135821,7 +135876,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -135933,7 +135988,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -135997,7 +136052,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21829, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21837, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -136077,7 +136132,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21857, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21865, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -136618,7 +136673,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -136835,6 +136890,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -137016,7 +137073,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -137025,7 +137082,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -137041,13 +137098,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -137057,7 +137114,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -137075,9 +137132,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -137140,10 +137197,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21875, -1) + pCtx, ts+21883, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -137153,7 +137210,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -137166,7 +137223,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -137180,7 +137237,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -137193,7 +137250,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -137206,7 +137263,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -137216,7 +137273,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -137224,7 +137281,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -137242,7 +137299,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -137252,7 +137309,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -137260,7 +137317,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -137274,13 +137331,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -137289,14 +137346,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21931, -1) + pCtx, ts+21939, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -137304,7 +137361,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -137330,10 +137387,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -137348,7 +137405,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -137362,7 +137419,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -137370,7 +137427,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -137386,17 +137443,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21976)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 21987)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 21998)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22003)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22016)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22026)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22032)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22043)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22053)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22065)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22070 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21984)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 21995)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22006)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22011)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22024)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22034)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22040)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22051)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22061)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22073)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22078 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -137405,7 +137462,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22070 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -137413,7 +137470,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -137428,7 +137485,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -137447,9 +137504,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -137460,7 +137517,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22074, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22082, libc.VaList(bp, zName)) } return p } @@ -137480,7 +137537,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -137504,12 +137561,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22093, 0) + ts+22101, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22164, 0) + ts+22172, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -137548,16 +137605,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -137657,7 +137714,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -137681,7 +137738,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -137713,7 +137770,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -137759,7 +137816,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -137767,14 +137824,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22227, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22235, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -137784,12 +137841,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -137965,7 +138025,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -137976,7 +138036,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -137991,7 +138051,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -138004,7 +138064,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -138016,7 +138076,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -138049,7 +138109,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22253, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22261, 0) goto windowAllocErr __2: ; @@ -138085,7 +138145,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -138104,7 +138164,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -138115,15 +138175,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22285 /* "PARTITION clause" */ + zErr = ts + 22293 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22302 /* "ORDER BY clause" */ + zErr = ts + 22310 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22318 /* "frame specificat..." */ + zErr = ts + 22326 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22338, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22346, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -138138,7 +138198,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -138146,7 +138206,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22371, 0) + ts+22379, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -138157,7 +138217,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -138177,7 +138237,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -138217,7 +138277,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -138293,7 +138353,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -138322,17 +138382,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22418, - ts + 22471, - ts + 21875, - ts + 22522, - ts + 22574, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 22426, + ts + 22479, + ts + 21883, + ts + 22530, + ts + 22582, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -138357,19 +138417,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -138405,7 +138465,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -138512,7 +138572,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -138548,7 +138608,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -138655,7 +138715,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -138738,7 +138798,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -138773,7 +138833,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -138798,7 +138858,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -138835,7 +138895,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -138958,7 +139018,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -139106,7 +139166,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -139137,7 +139197,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -139162,7 +139222,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -139510,7 +139570,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -139907,17 +139967,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -139927,7 +139987,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -139946,19 +140006,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22624, + Xsqlite3ErrorMsg(tls, pParse, ts+22632, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19691 /* "ORDER BY" */ + return ts + 19699 /* "ORDER BY" */ } - return ts + 22666 /* "LIMIT" */ + return ts + 22674 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22672, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22680, 0) } } @@ -139966,7 +140026,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -139978,7 +140038,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -140016,7 +140076,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -140030,14 +140090,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22706, + Xsqlite3ErrorMsg(tls, pParse, ts+22714, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -140105,7 +140165,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -140374,7 +140434,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -140602,7 +140662,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -140662,7 +140722,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -140705,7 +140765,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -140765,7 +140825,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -140967,7 +141027,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -140989,9 +141049,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -141000,9 +141060,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -141012,7 +141072,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -141027,7 +141087,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -141186,7 +141246,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -141194,7 +141254,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -141217,7 +141277,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -141257,7 +141317,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -141268,7 +141328,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -141278,7 +141338,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22744, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22752, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -141287,7 +141347,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -141710,7 +141770,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -142117,7 +142177,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -142129,7 +142189,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -142274,21 +142334,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16150, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16158, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22766, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22774, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16063, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16071, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22766, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22774, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -143024,7 +143084,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22793) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22801) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -143175,7 +143235,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22802, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+22810, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -143670,21 +143730,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+22826, 0) + ts+22834, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22921, 0) + ts+22929, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+23005, 0) + ts+23013, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -144124,7 +144184,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -144134,9 +144194,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22802, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22810, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23090, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23098, 0) } //*********** End %syntax_error code ***************************************** @@ -144144,7 +144204,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -144174,7 +144234,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -144228,7 +144288,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -144279,7 +144339,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -144365,7 +144425,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -144378,7 +144438,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -144395,7 +144455,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -144410,7 +144470,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -144426,7 +144486,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -144459,7 +144519,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -144592,7 +144652,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -144770,7 +144830,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -144779,7 +144839,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -144788,11 +144848,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -144815,13 +144875,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -144871,7 +144931,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -144888,7 +144948,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -144902,7 +144962,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -144915,7 +144975,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -145283,7 +145343,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -145353,7 +145413,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23107, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23115, libc.VaList(bp, bp+2464)) break } } @@ -145376,7 +145436,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3598, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23132, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23140, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -145473,7 +145533,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -145576,7 +145636,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23143, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23151, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -145589,11 +145649,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19811, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19819, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23150, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23158, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23155, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23163, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -145606,9 +145666,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23165, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23173, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23169, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23177, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -145650,12 +145710,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -145682,7 +145742,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -145694,11 +145754,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -145711,14 +145771,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -145731,14 +145791,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -145769,7 +145829,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -145895,7 +145955,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -145934,7 +145994,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -145942,7 +146002,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -146212,7 +146272,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -146310,13 +146370,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -146335,7 +146395,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -146364,7 +146424,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -146443,11 +146503,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -146469,7 +146529,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -146482,7 +146542,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -146496,7 +146556,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -146512,39 +146572,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -146559,7 +146619,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -146574,7 +146634,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -146601,7 +146661,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -146617,14 +146677,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -146648,7 +146708,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23177, 0) + ts+23185, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -146661,7 +146721,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -146698,11 +146758,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -146712,7 +146772,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -146822,7 +146882,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -146872,24 +146932,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 23245 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 23253 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23259 /* "abort due to ROL..." */ + zErr = ts + 23267 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23281 /* "another row avai..." */ + zErr = ts + 23289 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23303 /* "no more rows ava..." */ + zErr = ts + 23311 /* "no more rows ava..." */ break } @@ -146907,36 +146967,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 23326, - ts + 23339, + ts + 23334, + ts + 23347, /* SQLITE_INTERNAL */ uintptr(0), - ts + 23355, - ts + 23380, - ts + 23394, - ts + 23413, + ts + 23363, + ts + 23388, + ts + 23402, + ts + 23421, ts + 1454, - ts + 23438, - ts + 23475, - ts + 23487, - ts + 23502, - ts + 23535, - ts + 23553, - ts + 23578, - ts + 23607, + ts + 23446, + ts + 23483, + ts + 23495, + ts + 23510, + ts + 23543, + ts + 23561, + ts + 23586, + ts + 23615, /* SQLITE_EMPTY */ uintptr(0), ts + 5783, ts + 5269, - ts + 23624, - ts + 23642, - ts + 23660, + ts + 23632, + ts + 23650, + ts + 23668, /* SQLITE_NOLFS */ uintptr(0), - ts + 23694, + ts + 23702, /* SQLITE_FORMAT */ uintptr(0), - ts + 23715, - ts + 23741, - ts + 23764, - ts + 23785, -} /* sqlite3.c:169926:20 */ + ts + 23723, + ts + 23749, + ts + 23772, + ts + 23793, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -146945,7 +147005,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -146968,8 +147028,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -146978,7 +147038,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -146996,7 +147056,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -147009,7 +147069,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -147025,7 +147085,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -147039,7 +147099,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ *(*int32)(unsafe.Pointer(db + 432)) = 1 } @@ -147047,7 +147107,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -147057,7 +147117,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -147115,7 +147175,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23801, 0) + ts+23809, 0) return SQLITE_BUSY } else { @@ -147162,7 +147222,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -147204,22 +147264,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -147239,7 +147299,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -147248,7 +147308,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23864, libc.VaList(bp, zName)) + ts+23872, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -147263,7 +147323,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -147289,7 +147349,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -147307,7 +147367,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -147328,7 +147388,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -147346,7 +147406,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -147359,7 +147419,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -147372,7 +147432,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -147385,7 +147445,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -147397,7 +147457,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -147413,7 +147473,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -147431,7 +147491,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -147444,7 +147504,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -147455,7 +147515,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -147484,7 +147544,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23915, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23923, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -147505,7 +147565,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -147529,7 +147589,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -147571,19 +147631,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -147605,7 +147665,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -147617,7 +147677,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -147646,18 +147706,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -147665,9 +147725,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -147675,7 +147735,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -147685,13 +147745,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -147704,7 +147764,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -147714,7 +147774,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23936, 0) + ts+23944, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -147767,7 +147827,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -147779,7 +147839,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -147826,7 +147886,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -147859,7 +147919,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24004, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24012, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -147907,10 +147967,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24010, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24018, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24020, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24028, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -148032,7 +148092,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24048, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24056, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -148043,17 +148103,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24052, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24060, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24052 /* "cache" */ + zModeType = ts + 24060 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24058, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24066, zOpt, uint64(4)) == 0) { goto __32 } @@ -148092,7 +148152,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24063, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24071, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -148100,7 +148160,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24083, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24091, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -148143,7 +148203,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24107, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24115, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -148164,24 +148224,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 24123, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24130, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24131, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24138, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 24138, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24141, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24144, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17245, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24146, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24149, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24152, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17253, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -148197,7 +148257,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -148349,10 +148409,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21670, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21678, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+24148, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24156, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -148381,7 +148441,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -148438,7 +148498,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6316 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23150 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23158 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -148537,17 +148597,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -148558,7 +148618,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 24154 /* "\x00\x00" */ + zFilename = ts + 24162 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -148579,12 +148639,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148596,7 +148656,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -148614,7 +148674,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -148625,7 +148685,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -148636,7 +148696,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -148644,7 +148704,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -148657,28 +148717,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+24157, + Xsqlite3_log(tls, iErr, ts+24165, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24182) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24190) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24202) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24210) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24209) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24217) } // This is a convenience routine that makes sure that all thread-specific @@ -148686,12 +148746,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -148857,7 +148917,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24226, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24234, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -148875,7 +148935,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -148890,7 +148950,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -148903,7 +148963,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -148948,7 +149008,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -149407,7 +149467,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -149416,7 +149476,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+uint64(1)) return p + uintptr(n) + uintptr(1) @@ -149429,7 +149489,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -149460,7 +149520,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -149477,7 +149537,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -149486,7 +149546,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -149503,7 +149563,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -149513,7 +149573,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -149534,14 +149594,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -149554,7 +149614,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -149563,7 +149623,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -149578,7 +149638,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -149589,7 +149649,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -149600,7 +149660,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149623,7 +149683,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149666,7 +149726,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -149687,7 +149747,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -149696,7 +149756,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -149708,7 +149768,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24254, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24262, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -149726,7 +149786,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -149771,11 +149831,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -149788,7 +149848,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -149798,13 +149858,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -149828,7 +149888,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -149871,7 +149931,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24262 /* "database is dead..." */ + return ts + 24270 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -149883,7 +149943,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -149909,7 +149969,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -150013,7 +150073,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -150618,7 +150678,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -150630,10 +150690,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -150641,9 +150701,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -150656,9 +150716,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -150666,8 +150726,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6116, ts + 6630, ts + 6635, ts + 6126, ts + 6121, ts + 7876, ts + 24285, ts + 24291, -} /* sqlite3.c:193131:19 */ + ts + 6116, ts + 6630, ts + 6635, ts + 6126, ts + 6121, ts + 7876, ts + 24293, ts + 24299, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -150681,7 +150741,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -150689,7 +150749,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -150697,7 +150757,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -150705,7 +150765,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -150713,7 +150773,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -150746,7 +150806,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -150758,7 +150818,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -150771,7 +150831,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -150780,7 +150840,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -150795,7 +150855,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -150846,7 +150906,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24298 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24306 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -150866,11 +150926,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -150903,7 +150963,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24315, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24323, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -150914,7 +150974,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -150941,7 +151001,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -150950,7 +151010,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -150960,7 +151020,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -150968,7 +151028,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -151071,7 +151131,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -151086,14 +151146,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -151104,7 +151164,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -151385,7 +151445,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -151407,7 +151467,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -151422,7 +151482,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -151438,7 +151498,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -151665,7 +151725,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -151690,7 +151750,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24344, -1) + Xsqlite3_result_error(tls, pCtx, ts+24352, -1) } } jsonParseReset(tls, pParse) @@ -151701,7 +151761,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -151732,7 +151792,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))) @@ -151752,7 +151812,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -151809,7 +151869,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -151832,7 +151892,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -152007,7 +152067,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -152018,7 +152078,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24359, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24367, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -152031,11 +152091,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24363, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24371, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -152046,7 +152106,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -152098,18 +152158,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24389, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24397, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -152140,7 +152200,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -152157,7 +152217,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -152180,7 +152240,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -152230,7 +152290,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -152264,11 +152324,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24432, uint32(2)) + jsonAppendRaw(tls, bp, ts+24440, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4933, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24435, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24443, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -152324,7 +152384,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -152397,7 +152457,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -152429,7 +152489,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -152441,14 +152501,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24438, -1) + ts+24446, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24489, -1) + Xsqlite3_result_error(tls, ctx, ts+24497, -1) jsonReset(tls, bp) return } @@ -152468,7 +152528,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -152537,7 +152597,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -152556,7 +152616,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15254) + jsonWrongNumArgs(tls, ctx, ts+15262) return __2: ; @@ -152620,7 +152680,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -152645,9 +152705,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24523 /* "set" */ + return ts + 24531 /* "set" */ } - return ts + 24527 /* "insert" */ + return ts + 24535 /* "insert" */ }()) return __2: @@ -152718,7 +152778,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -152742,7 +152802,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -152756,7 +152816,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -152772,7 +152832,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -152797,16 +152857,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24534, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24542, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -152814,7 +152874,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -152856,7 +152916,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -152878,7 +152938,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -152902,16 +152962,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24537, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24545, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -152931,16 +152991,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -152955,7 +153015,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24540) + ts+24548) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -152968,13 +153028,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -152988,7 +153048,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -152999,7 +153059,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -153012,7 +153072,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -153021,13 +153081,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -153078,7 +153138,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -153095,19 +153155,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24623, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24631, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24628, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24636, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -153196,10 +153256,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+24623, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24631, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24628, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24636, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -153226,7 +153286,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24634 /* "$" */ + zRoot = ts + 24642 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -153244,7 +153304,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -153254,7 +153314,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -153329,7 +153389,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -153358,7 +153418,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24344, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24352, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -153434,7 +153494,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -153448,36 +153508,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24636}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24641}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24652}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24652}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24670}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24683}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24686}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24690}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24702}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24714}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24725}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24736}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24748}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24761}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24770}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24770}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24780}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24791}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24808}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24644}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24649}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24660}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24660}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24678}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24691}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24694}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24698}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24710}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24722}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24733}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24744}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24756}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24769}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24778}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24778}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24788}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24799}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24816}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -153493,9 +153553,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24826 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24836 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 24834 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24844 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -153542,7 +153602,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -153556,7 +153616,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -153577,9 +153637,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -153587,23 +153647,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -153612,20 +153672,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -153633,17 +153693,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -153669,28 +153729,28 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = U32(*(*U8)(unsafe.Pointer(p)))<<24 + U32(*(*U8)(unsafe.Pointer(p + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(p + 2)))<<8 + U32(*(*U8)(unsafe.Pointer(p + 3)))<<0 } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ return I64(U64(*(*U8)(unsafe.Pointer(p)))<<56 + U64(*(*U8)(unsafe.Pointer(p + 1)))<<48 + U64(*(*U8)(unsafe.Pointer(p + 2)))<<40 + U64(*(*U8)(unsafe.Pointer(p + 3)))<<32 + U64(*(*U8)(unsafe.Pointer(p + 4)))<<24 + U64(*(*U8)(unsafe.Pointer(p + 5)))<<16 + U64(*(*U8)(unsafe.Pointer(p + 6)))<<8 + U64(*(*U8)(unsafe.Pointer(p + 7)))<<0) } // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ var i U32 // p is always 4-byte aligned @@ -153702,7 +153762,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(p + 2)) = U8(i >> 40 & int64(0xFF)) @@ -153715,7 +153775,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -153723,20 +153783,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -153744,7 +153804,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -153753,7 +153813,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -153768,7 +153828,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -153784,7 +153844,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -153793,7 +153853,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -153825,11 +153885,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24846, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24854, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24854, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24862, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -153903,7 +153963,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -153914,7 +153974,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -153927,7 +153987,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -153944,7 +154004,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -153968,7 +154028,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -153994,19 +154054,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -154022,23 +154082,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -154060,13 +154120,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -154074,7 +154134,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24859, + ts+24867, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -154093,7 +154153,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -154111,7 +154171,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -154141,7 +154201,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -154157,7 +154217,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -154174,7 +154234,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -154286,7 +154346,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -154388,7 +154448,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -154444,7 +154504,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -154460,7 +154520,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -154479,7 +154539,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -154496,7 +154556,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -154516,7 +154576,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -154527,7 +154587,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -154544,7 +154604,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -154578,7 +154638,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -154614,7 +154674,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -154662,7 +154722,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -154755,7 +154815,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -154771,7 +154831,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -154786,7 +154846,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154847,7 +154907,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -154868,12 +154928,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24941) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24949) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -154900,7 +154960,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -155043,7 +155103,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -155150,7 +155210,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -155193,7 +155253,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -155214,7 +155274,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -155253,7 +155313,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -155268,7 +155328,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155281,7 +155341,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -155356,7 +155416,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -155412,7 +155472,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -155448,7 +155508,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -155456,7 +155516,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -155478,7 +155538,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -155526,7 +155586,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -155582,7 +155642,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -155681,7 +155741,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -155715,7 +155775,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -155950,7 +156010,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -155985,7 +156045,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -156035,7 +156095,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -156066,7 +156126,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -156095,7 +156155,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -156210,7 +156270,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -156240,7 +156300,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -156271,7 +156331,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -156282,7 +156342,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -156371,7 +156431,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -156385,7 +156445,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -156410,7 +156470,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -156418,7 +156478,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24955, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24963, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -156430,12 +156490,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24975, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24983, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25007, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25015, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -156449,7 +156509,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -156678,7 +156738,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -156687,7 +156747,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -156695,7 +156755,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -156703,7 +156763,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25044, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25052, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -156724,7 +156784,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -156737,11 +156797,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25189 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25197 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -156749,7 +156809,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11209, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11217, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -156781,7 +156841,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -156792,8 +156852,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 25245, ts + 4995, ts + 16150, -} /* sqlite3.c:199185:21 */ + ts + 25253, ts + 4995, ts + 16158, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -156817,9 +156877,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -156836,19 +156896,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25250, + ts+25258, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25312, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25320, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25317, + ts+25325, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25381, + ts+25389, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25451, + ts+25459, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -156879,7 +156939,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25500 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25508 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -156891,7 +156951,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25608, + ts+25616, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -156899,18 +156959,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25653, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25661, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12680, 1) + Xsqlite3_str_append(tls, p, ts+12688, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25680, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25688, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25702, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25710, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25710, 0) + Xsqlite3_str_appendf(tls, p, ts+25718, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -156926,24 +156986,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 25726, - ts + 25779, + ts + 25734, + ts + 25787, - ts + 25824, - ts + 25876, - ts + 25930, + ts + 25832, + ts + 25884, + ts + 25938, - ts + 25975, - ts + 26033, - ts + 26088, -} /* sqlite3.c:199232:21 */ + ts + 25983, + ts + 26041, + ts + 26096, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156974,7 +157034,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -156982,7 +157042,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26135, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26143, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -156994,7 +157054,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26155, + ts+26163, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -157002,7 +157062,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26212, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26220, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -157012,7 +157072,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157027,7 +157087,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -157053,10 +157113,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26247, - ts + 26290, - ts + 26325, - ts + 26361, + ts + 26255, + ts + 26298, + ts + 26333, + ts + 26369, } // Aux columns counted by a u8 @@ -157093,7 +157153,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26398, + Xsqlite3_str_appendf(tls, pSql, ts+26406, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -157105,7 +157165,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26422, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26430, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -157128,7 +157188,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26428, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26436, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -157227,7 +157287,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26431, ts + 26442} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 26439, ts + 26450} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -157243,7 +157303,7 @@ var azFormat = [2]uintptr{ts + 26431, ts + 26442} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -157287,11 +157347,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+10789, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26452, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26460, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26458, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26466, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26462, 1) + Xsqlite3_str_append(tls, pOut, ts+26470, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -157306,11 +157366,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26464, -1) + Xsqlite3_result_error(tls, ctx, ts+26472, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -157338,15 +157398,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -157359,7 +157419,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -157387,7 +157447,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -157399,7 +157459,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26497, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26505, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 3997 /* "\n" */ @@ -157427,7 +157487,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -157435,7 +157495,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26504, + ts+26512, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -157454,7 +157514,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26549, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26557, libc.VaList(bp+16, iNode)) } } @@ -157471,15 +157531,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26581, - ts + 26635, + ts + 26589, + ts + 26643, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -157494,23 +157554,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26683, + rtreeCheckAppendMsg(tls, pCheck, ts+26691, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26728 /* "%_rowid" */ + return ts + 26736 /* "%_rowid" */ } - return ts + 26736 /* "%_parent" */ + return ts + 26744 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26745, + ts+26753, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26728 /* "%_rowid" */ + return ts + 26736 /* "%_rowid" */ } - return ts + 26736 /* "%_parent" */ + return ts + 26744 /* "%_parent" */ }(), iKey, iVal)) } } @@ -157527,7 +157587,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -157553,7 +157613,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26803, libc.VaList(bp, i, iCell, iNode)) + ts+26811, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -157573,7 +157633,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26851, libc.VaList(bp+24, i, iCell, iNode)) + ts+26859, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -157585,7 +157645,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -157596,14 +157656,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26918, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26926, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26952, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26960, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -157611,7 +157671,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26982, + ts+26990, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -157639,20 +157699,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+27037, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27045, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+27068, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27076, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -157662,7 +157722,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -157682,13 +157742,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14416, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14424, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27135, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27143, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -157698,12 +157758,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+24955, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24963, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+27163, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27171, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -157718,8 +157778,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+27194, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27201, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27202, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27209, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -157729,7 +157789,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27209, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27217, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -157769,13 +157829,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27213, -1) + ts+27221, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -157793,7 +157853,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17787 /* "ok" */ + return ts + 17795 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -157832,7 +157892,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -157858,7 +157918,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -157880,7 +157940,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -157897,7 +157957,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -157907,10 +157967,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -157920,7 +157980,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -157929,7 +157989,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -158001,7 +158061,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -158143,7 +158203,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158212,7 +158272,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -158225,7 +158285,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -158234,11 +158294,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27264, 1) + Xsqlite3_str_append(tls, x, ts+27272, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27266, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27274, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27277, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27285, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -158248,7 +158308,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -158262,19 +158322,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27288, 0) + Xsqlite3_str_appendf(tls, x, ts+27296, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27306, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27314, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27314, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27322, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27322, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27330, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27326, 0) + Xsqlite3_str_appendf(tls, x, ts+27334, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -158294,7 +158354,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -158327,7 +158387,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -158347,7 +158407,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -158366,7 +158426,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -158402,7 +158462,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -158422,7 +158482,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158467,7 +158527,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158608,7 +158668,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -158621,13 +158681,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -158661,7 +158721,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -158688,7 +158748,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -158729,7 +158789,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -158767,7 +158827,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -158799,10 +158859,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -158813,20 +158873,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -158860,7 +158920,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -158872,7 +158932,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -158902,7 +158962,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -158932,7 +158992,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -158967,7 +159027,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -158997,7 +159057,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159233,7 +159293,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -159249,7 +159309,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -159259,7 +159319,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -159299,7 +159359,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27339, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27347, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -159308,7 +159368,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27361, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27369, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -159316,7 +159376,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26428, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26436, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -159374,12 +159434,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -159393,7 +159453,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -159560,7 +159620,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -159586,7 +159646,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16150 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16158 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -159596,7 +159656,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27365 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27373 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -159604,14 +159664,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27371 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27379 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159676,7 +159736,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -159743,7 +159803,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27380, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27388, 0) __4: ; goto geopoly_update_end @@ -159887,15 +159947,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27420) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27428) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27436) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27444) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -159928,9 +159988,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -159960,7 +160020,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27451, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27459, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -159972,26 +160032,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27459 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27472 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27485 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27498 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27436 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27510 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27420 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27533 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27547 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27560 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27574 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27590 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27467 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27480 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27493 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27506 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27444 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27518 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27428 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27541 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27555 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27568 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27582 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27598 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27602 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27610 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -159999,30 +160059,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27621, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27629, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27631, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27639, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27642, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27650, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27365, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27373, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27653, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27661, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -160036,7 +160096,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -160045,7 +160105,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -160066,7 +160126,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -160094,13 +160154,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24941, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24949, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -160120,7 +160180,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -160576,7 +160636,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -160977,7 +161037,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -161042,7 +161102,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -161104,7 +161164,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -161136,9 +161196,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -161153,16 +161213,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -161170,9 +161230,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -161191,16 +161251,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -161219,7 +161279,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -161242,7 +161302,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -161262,7 +161322,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -161352,7 +161412,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -161377,7 +161437,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -161394,7 +161454,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27663, -1) + Xsqlite3_result_error(tls, context, ts+27671, -1) return } @@ -161405,7 +161465,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27663, -1) + Xsqlite3_result_error(tls, context, ts+27671, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -161420,7 +161480,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161438,7 +161498,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161462,7 +161522,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -161477,7 +161537,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -161495,7 +161555,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -161525,7 +161585,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -161539,7 +161599,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -161548,7 +161608,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27684, uintptr(0), uintptr(0), p+64) + ts+27692, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -161620,7 +161680,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -161632,7 +161692,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24854, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+24862, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -161650,7 +161710,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161660,9 +161720,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+27855, libc.VaList(bp, func() uintptr { + ts+27863, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28005 /* "AND rootpage!=0 ..." */ + return ts + 28013 /* "AND rootpage!=0 ..." */ } return ts + 1518 /* "" */ }()))) @@ -161670,7 +161730,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28046) + ts+28054) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -161685,7 +161745,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -161711,7 +161771,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -161737,7 +161797,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -161754,7 +161814,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -161777,7 +161837,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -161800,7 +161860,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161850,7 +161910,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -161871,7 +161931,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+28171, libc.VaList(bp, zTab))) + ts+28179, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -161889,7 +161949,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+28290, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28298, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -161907,7 +161967,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28311, libc.VaList(bp+16, zIdx))) + ts+28319, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -161931,7 +161991,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+28362, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28370, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -161971,7 +162031,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161981,7 +162041,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+28383, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28391, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -161996,7 +162056,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+28411, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28419, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -162029,7 +162089,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -162046,7 +162106,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19337, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19345, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -162059,18 +162119,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28440, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28448, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28459, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28467, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28464, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28472, zName) { bRbuRowid = 1 } } @@ -162082,12 +162142,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28474, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28482, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28503 /* "may not have" */ + return ts + 28511 /* "may not have" */ } - return ts + 28516 /* "requires" */ + return ts + 28524 /* "requires" */ }())) } @@ -162096,7 +162156,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28525, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28533, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -162110,7 +162170,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28547, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28555, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -162151,7 +162211,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -162160,8 +162220,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+28574, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14527 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28582, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14535 /* ", " */ } return zList } @@ -162170,7 +162230,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -162182,7 +162242,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+28583, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28591, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -162212,7 +162272,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -162221,25 +162281,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28596, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28604, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28628, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28636, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14527, ts+28651) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28657, ts+28664, ts+4892) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14527, ts+1518) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14535, ts+28659) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28665, ts+28672, ts+4892) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14535, ts+1518) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28672, + ts+28680, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28714, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28722, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -162271,7 +162331,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -162302,7 +162362,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28411, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28419, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -162339,7 +162399,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28734 /* "_rowid_" */ + zCol = ts + 28742 /* "_rowid_" */ __7: ; goto __5 @@ -162348,13 +162408,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28742, + zLhs = rbuMPrintf(tls, p, ts+28750, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28763, + zOrder = rbuMPrintf(tls, p, ts+28771, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28799, + zSelect = rbuMPrintf(tls, p, ts+28807, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14527 /* ", " */ + zSep = ts + 14535 /* ", " */ iCol++ goto __1 __2: @@ -162373,7 +162433,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28826, + Xsqlite3_mprintf(tls, ts+28834, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -162400,8 +162460,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28874, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14527 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28882, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14535 /* ", " */ goto __15 __15: iCol++ @@ -162413,7 +162473,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28881, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28889, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -162452,7 +162512,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -162470,7 +162530,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28411, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28419, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -162482,7 +162542,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28893, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28901, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1518 /* "" */ } else { @@ -162496,37 +162556,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28734 /* "_rowid_" */ + zCol = ts + 28742 /* "_rowid_" */ } else { - zCol = ts + 28464 /* "rbu_rowid" */ + zCol = ts + 28472 /* "rbu_rowid" */ } zType = ts + 1083 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+28915, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28923, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28651 + return ts + 28659 } return ts + 1518 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28935, + zImpPK = Xsqlite3_mprintf(tls, ts+28943, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28956, + zImpCols = Xsqlite3_mprintf(tls, ts+28964, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+28989, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+28997, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14527 /* ", " */ - zAnd = ts + 21357 /* " AND " */ + zCom = ts + 14535 /* ", " */ + zAnd = ts + 21365 /* " AND " */ nBind++ } @@ -162563,7 +162623,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -162574,11 +162634,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29013, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29021, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29025, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29033, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14527 /* ", " */ + zS = ts + 14535 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -162587,7 +162647,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29034, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29042, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -162601,24 +162661,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29049, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29057, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1518 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29063, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21357 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29071, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21365 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+29075, libc.VaList(bp+40, zList)) + ts+29083, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1518 /* "" */ @@ -162626,8 +162686,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29125, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21357 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29133, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21365 /* " AND " */ } } } @@ -162639,9 +162699,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29138, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29146, 0) } // Return a nul-terminated string containing the comma separated list of @@ -162659,7 +162719,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -162674,17 +162734,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29125, + zList = rbuMPrintf(tls, p, ts+29133, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14527 /* ", " */ + zSep = ts + 14535 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29164, + zList = rbuMPrintf(tls, p, ts+29172, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14527 /* ", " */ + zSep = ts + 14535 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29194, + zList = rbuMPrintf(tls, p, ts+29202, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14527 /* ", " */ + zSep = ts + 14535 /* ", " */ } } } @@ -162705,7 +162765,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -162735,26 +162795,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 29231 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29239 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+28383, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28391, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16038) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16046) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+28411, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28419, libc.VaList(bp+8, zIdx))) } break } @@ -162767,15 +162827,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 28651 /* " DESC" */ + zDesc = ts + 28659 /* " DESC" */ } else { zDesc = ts + 1518 /* "" */ } - z = rbuMPrintf(tls, p, ts+29244, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14527 /* ", " */ + z = rbuMPrintf(tls, p, ts+29252, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14535 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29255, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29263, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -162798,7 +162858,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -162815,7 +162875,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29259) + ts+29267) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -162824,7 +162884,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28411, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28419, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -162834,23 +162894,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29309, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29317, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29331, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29339, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28651 /* " DESC" */ + return ts + 28659 /* " DESC" */ } return ts + 1518 /* "" */ }())) - zComma = ts + 14527 /* ", " */ + zComma = ts + 14535 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29341, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29349, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6316, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29356, + ts+29364, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6316, 0, 0)) } @@ -162874,7 +162934,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -162896,32 +162956,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29418 /* "PRIMARY KEY " */ + zPk = ts + 29426 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29431, + zSql = rbuMPrintf(tls, p, ts+29439, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29458 /* " NOT NULL" */ + return ts + 29466 /* " NOT NULL" */ } return ts + 1518 /* "" */ }())) - zComma = ts + 14527 /* ", " */ + zComma = ts + 14535 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29468, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29476, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6316, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29475, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29483, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29507 /* " WITHOUT ROWID" */ + return ts + 29515 /* " WITHOUT ROWID" */ } return ts + 1518 /* "" */ }())) @@ -162938,7 +162998,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -162948,12 +163008,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+29522, + ts+29530, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -162975,7 +163035,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -162985,7 +163045,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+29579) + ts+29587) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -163083,7 +163143,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -163095,7 +163155,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29645, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29653, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -163119,7 +163179,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6316, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6316, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29665, + ts+29673, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6316, 0, 0)) @@ -163128,14 +163188,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+29730, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29738, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+29766, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29774, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -163152,7 +163212,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29800, + ts+29808, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -163160,9 +163220,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29861 /* "AND" */ + return ts + 29869 /* "AND" */ } - return ts + 29865 /* "WHERE" */ + return ts + 29873 /* "WHERE" */ }() } return ts + 1518 /* "" */ @@ -163171,21 +163231,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29871, + ts+29879, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29932, + ts+29940, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29861 /* "AND" */ + return ts + 29869 /* "AND" */ } - return ts + 29865 /* "WHERE" */ + return ts + 29873 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -163223,17 +163283,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1518 } - return ts + 30091 + return ts + 30099 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+30100, + ts+30108, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30136 /* ", _rowid_" */ + return ts + 30144 /* ", _rowid_" */ } return ts + 1518 /* "" */ }(), zBindings))) @@ -163245,28 +163305,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30146, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30154, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1518 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30174 /* ", rbu_rowid" */ + zRbuRowid = ts + 30182 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30186, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30194, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30262 /* ", 0 AS rbu_rowid" */ + return ts + 30270 /* ", 0 AS rbu_rowid" */ } return ts + 1518 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30279, + ts+30287, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -163274,7 +163334,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30578, + ts+30586, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -163288,9 +163348,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30677 /* ",_rowid_ " */ + zRbuRowid = ts + 30685 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30687 /* ",rbu_rowid" */ + zRbuRowid = ts + 30695 /* ",rbu_rowid" */ } } @@ -163303,20 +163363,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28734, 0) + zOrder = rbuMPrintf(tls, p, ts+28742, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14527, ts+1518) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1518, ts+14535, ts+1518) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+30698, + ts+30706, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30746 /* "0 AS " */ + return ts + 30754 /* "0 AS " */ } return ts + 1518 /* "" */ }(), @@ -163329,7 +163389,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19691 /* "ORDER BY" */ + return ts + 19699 /* "ORDER BY" */ } return ts + 1518 /* "" */ }(), zOrder, @@ -163358,7 +163418,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -163409,9 +163469,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1518 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30091 /* "rbu_imp_" */ + zPrefix = ts + 30099 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30752, + zUpdate = Xsqlite3_mprintf(tls, ts+30760, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -163424,7 +163484,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -163447,7 +163507,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -163463,7 +163523,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -163479,7 +163539,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+30782, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30790, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -163547,7 +163607,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -163559,21 +163619,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6316, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6316) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30812, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30820, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30839, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30847, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+48, ts+3221, uint64(4)) } else { libc.Xmemcpy(tls, p+48, ts+6316, uint64(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30857, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30865, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -163613,11 +163673,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30923, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30931, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24004, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24012, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -163629,13 +163689,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30955, + zTarget = Xsqlite3_mprintf(tls, ts+30963, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6316), func() uintptr { if zExtra == uintptr(0) { return ts + 1518 /* "" */ } - return ts + 30987 /* "&" */ + return ts + 30995 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1518 /* "" */ @@ -163654,21 +163714,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30989, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+30997, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31004, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31012, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31021, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31029, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -163676,7 +163736,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6316, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31037, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31045, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -163687,7 +163747,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31065, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31073, 0) } } @@ -163709,7 +163769,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -163717,7 +163777,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163750,7 +163810,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -163758,7 +163818,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31037, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31045, uintptr(0), uintptr(0), uintptr(0)) } } @@ -163792,7 +163852,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31083, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31091, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -163842,7 +163902,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -164228,7 +164288,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+31157) + ts+31165) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -164241,7 +164301,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31179, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31187, libc.VaList(bp, iCookie+1)) } } } @@ -164249,7 +164309,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -164266,7 +164326,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+31206, + ts+31214, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -164304,16 +164364,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+31364, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31372, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31379, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31387, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -164323,18 +164383,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31399, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31407, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31424) + ts+31432) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -164348,12 +164408,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31532) + ts+31540) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+31597) + ts+31605) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -164365,7 +164425,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31641, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31649, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -164373,7 +164433,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -164387,8 +164447,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+17123) - rbuCopyPragma(tls, p, ts+16234) + rbuCopyPragma(tls, p, ts+17131) + rbuCopyPragma(tls, p, ts+16242) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -164399,7 +164459,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31666, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31674, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -164425,10 +164485,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14431, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14439, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14431, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14439, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -164516,7 +164576,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -164534,7 +164594,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -164549,7 +164609,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31694, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31702, 0) } if rc == SQLITE_OK { @@ -164564,11 +164624,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+31143, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31151, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -164583,7 +164643,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -164592,7 +164652,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31719, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31727, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -164604,7 +164664,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -164614,7 +164674,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -164631,7 +164691,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31730, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31738, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -164663,7 +164723,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164674,7 +164734,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31802, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31810, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -164682,7 +164742,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31816) + ts+31824) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -164694,7 +164754,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+31873) + ts+31881) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -164705,7 +164765,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -164777,7 +164837,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31947, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31955, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -164799,12 +164859,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31979, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31987, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32011 /* "vacuum" */ + return ts + 32019 /* "vacuum" */ } - return ts + 32018 /* "update" */ + return ts + 32026 /* "update" */ }())) } } @@ -164812,7 +164872,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14416, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14424, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -164826,14 +164886,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16837) - rbuCopyPragma(tls, p, ts+16249) + rbuCopyPragma(tls, p, ts+16845) + rbuCopyPragma(tls, p, ts+16257) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32025, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32033, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -164843,7 +164903,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+6316, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32041, uintptr(0), uintptr(0), p+64) + db, ts+32049, uintptr(0), uintptr(0), p+64) } } @@ -164878,7 +164938,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -164889,7 +164949,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -164897,13 +164957,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32065, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32073, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -164912,7 +164972,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -164928,12 +164988,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30091, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30099, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -164946,13 +165006,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14431, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14439, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -164966,7 +165026,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14431, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14439, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -164978,7 +165038,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32073, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32081, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -165011,13 +165071,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -165050,7 +165110,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165068,7 +165128,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -165077,7 +165137,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14431, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14439, uintptr(0), uintptr(0), uintptr(0)) } } @@ -165096,19 +165156,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14431, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14439, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14416 /* "BEGIN" */ + zBegin = ts + 14424 /* "BEGIN" */ } else { - zBegin = ts + 32025 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 32033 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32025, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32033, uintptr(0), uintptr(0), uintptr(0)) } } @@ -165175,7 +165235,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -165192,7 +165252,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -165210,7 +165270,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -165232,7 +165292,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -165257,7 +165317,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -165272,7 +165332,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -165304,7 +165364,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -165313,20 +165373,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -165390,7 +165450,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -165429,7 +165489,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -165443,7 +165503,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -165457,7 +165517,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -165477,7 +165537,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -165497,7 +165557,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -165505,7 +165565,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -165513,7 +165573,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -165540,7 +165600,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32100, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32108, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -165565,7 +165625,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+32123, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32131, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -165576,7 +165636,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -165584,7 +165644,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -165592,7 +165652,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -165625,7 +165685,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -165682,13 +165742,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -165711,7 +165771,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -165753,7 +165813,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32134, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32142, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -165797,10 +165857,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -165809,7 +165869,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -165854,7 +165914,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -165862,7 +165922,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -165872,7 +165932,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -165880,7 +165940,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -165888,7 +165948,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -165897,7 +165957,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -165906,7 +165966,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -165914,7 +165974,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -165922,13 +165982,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -165942,7 +166002,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -166003,17 +166063,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -166096,7 +166156,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -166167,7 +166227,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -166177,16 +166237,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -166200,13 +166260,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -166214,13 +166274,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -166230,13 +166290,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -166249,7 +166309,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -166257,7 +166317,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -166279,7 +166339,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166367,7 +166427,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -166378,7 +166438,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -166401,14 +166461,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -166418,7 +166478,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -166431,7 +166491,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -166497,7 +166557,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -166523,7 +166583,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -166566,7 +166626,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -166605,7 +166665,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -166644,7 +166704,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -166671,7 +166731,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -166746,7 +166806,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -166834,7 +166894,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -166898,7 +166958,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -166915,13 +166975,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11209, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11217, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+32145, 0) + ts+32153, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1518, 0) } else { @@ -166934,7 +166994,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32266, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32274, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -167029,7 +167089,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167046,7 +167106,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11209, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11217, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -167065,15 +167125,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167089,7 +167149,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167105,21 +167165,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -167233,7 +167293,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -167529,7 +167589,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -167564,7 +167624,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167599,25 +167659,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -167637,24 +167697,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -167662,13 +167722,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -167684,7 +167744,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -167694,9 +167754,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32295, + zRet = Xsqlite3_mprintf(tls, ts+32303, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21357 /* " AND " */ + zSep = ts + 21365 /* " AND " */ if zRet == uintptr(0) { break } @@ -167706,7 +167766,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -167719,9 +167779,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32329, + ts+32337, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32370 /* " OR " */ + zSep = ts + 32378 /* " OR " */ if zRet == uintptr(0) { break } @@ -167736,18 +167796,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32375, + ts+32383, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167775,7 +167835,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -167787,7 +167847,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32453, + ts+32461, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -167812,7 +167872,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -167925,7 +167985,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32506, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32514, 0) __16: ; rc = SQLITE_SCHEMA @@ -167985,7 +168045,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -168021,7 +168081,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -168043,7 +168103,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168081,7 +168141,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -168093,7 +168153,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -168144,7 +168204,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -168189,7 +168249,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -168212,7 +168272,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -168223,7 +168283,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -168234,7 +168294,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -168247,7 +168307,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr)) @@ -168261,7 +168321,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -168278,7 +168338,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -168299,7 +168359,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168359,7 +168419,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -168465,7 +168525,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -168522,7 +168582,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -168530,10 +168590,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11209, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11217, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32533, libc.VaList(bp, zDb)) + ts+32541, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -168542,18 +168602,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1518 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32643, bp+24) + sessionAppendStr(tls, bp+8, ts+32651, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1531, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+32658, bp+24) + sessionAppendStr(tls, bp+8, ts+32666, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+32666, bp+24) + sessionAppendStr(tls, bp+8, ts+32674, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21357 /* " AND " */ + zSep = ts + 21365 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -168573,7 +168633,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -168651,7 +168711,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -168672,7 +168732,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -168694,7 +168754,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32672, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32680, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -168792,7 +168852,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32692, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32700, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -168802,7 +168862,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -168814,7 +168874,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -168822,7 +168882,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -168834,7 +168894,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -168842,7 +168902,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -168854,7 +168914,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -168867,7 +168927,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -168881,12 +168941,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -168912,12 +168972,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -168950,28 +169010,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -168989,7 +169049,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169022,7 +169082,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169047,7 +169107,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -169083,7 +169143,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169101,7 +169161,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -169126,7 +169186,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -169168,7 +169228,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169187,7 +169247,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -169214,7 +169274,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169256,7 +169316,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169276,7 +169336,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -169311,7 +169371,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -169368,13 +169428,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -169444,7 +169504,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -169475,7 +169535,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169495,14 +169555,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -169516,7 +169576,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -169535,7 +169595,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -169557,7 +169617,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -169581,7 +169641,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -169598,7 +169658,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -169610,7 +169670,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -169627,7 +169687,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -169863,7 +169923,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -169914,7 +169974,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -169929,7 +169989,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -169951,9 +170011,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -169975,9 +170035,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -169985,7 +170045,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -170046,7 +170106,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11209) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11217) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -170058,24 +170118,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32710, bp+16) + sessionAppendStr(tls, bp, ts+32718, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32723, bp+16) + sessionAppendStr(tls, bp, ts+32731, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32729, bp+16) + sessionAppendStr(tls, bp, ts+32737, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14527 /* ", " */ + zSep = ts + 14535 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1518 /* "" */ - sessionAppendStr(tls, bp, ts+32658, bp+16) + sessionAppendStr(tls, bp, ts+32666, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -170083,13 +170143,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+32734, bp+16) + ts+32742, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32666, bp+16) + sessionAppendStr(tls, bp, ts+32674, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21357 /* " AND " */ + zSep = ts + 21365 /* " AND " */ } } @@ -170119,7 +170179,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -170147,7 +170207,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -170157,34 +170217,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32809, bp+16) + sessionAppendStr(tls, bp, ts+32817, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32658, bp+16) + sessionAppendStr(tls, bp, ts+32666, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32729, bp+16) + sessionAppendStr(tls, bp, ts+32737, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21357 /* " AND " */ + zSep = ts + 21365 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32827, bp+16) + sessionAppendStr(tls, bp, ts+32835, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32370, bp+16) + sessionAppendStr(tls, bp, ts+32378, bp+16) zSep = ts + 1518 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32666, bp+16) + sessionAppendStr(tls, bp, ts+32674, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32835 /* "AND " */ + zSep = ts + 32843 /* "AND " */ } } sessionAppendStr(tls, bp, ts+4892, bp+16) @@ -170209,7 +170269,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+6316, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -170221,7 +170281,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -170229,19 +170289,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32840, bp+16) + sessionAppendStr(tls, bp, ts+32848, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21363, bp+16) + sessionAppendStr(tls, bp, ts+21371, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14527, bp+16) + sessionAppendStr(tls, bp, ts+14535, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32858, bp+16) + sessionAppendStr(tls, bp, ts+32866, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32869, bp+16) + sessionAppendStr(tls, bp, ts+32877, bp+16) } sessionAppendStr(tls, bp, ts+4892, bp+16) @@ -170252,7 +170312,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -170260,24 +170320,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11209, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11217, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32873) + ts+32881) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32986) + ts+32994) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -170304,7 +170364,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170325,7 +170385,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -170349,7 +170409,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -170393,7 +170453,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -170465,7 +170525,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -170565,7 +170625,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -170700,7 +170760,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170722,7 +170782,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+33130, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33138, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -170738,7 +170798,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33151, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33159, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -170747,7 +170807,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -170801,7 +170861,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -170819,10 +170879,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+33170, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33178, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33196, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33204, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -170892,20 +170952,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33226, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33234, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33270, + ts+33278, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33341, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+33349, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11209) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11217) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -170963,14 +171023,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33401, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33409, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33431, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33439, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33455, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33431, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33463, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33439, uintptr(0), uintptr(0), uintptr(0)) } } @@ -170992,7 +171052,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171010,7 +171070,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -171018,7 +171078,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171033,7 +171093,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -171041,7 +171101,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -171213,7 +171273,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -171344,7 +171404,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -171398,7 +171458,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -171413,7 +171473,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171431,12 +171491,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171453,12 +171513,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -171466,7 +171526,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171490,7 +171550,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171517,7 +171577,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -171558,7 +171618,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -171620,7 +171680,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -171758,7 +171818,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -171773,7 +171833,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171788,7 +171848,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171804,7 +171864,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171820,7 +171880,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -171828,7 +171888,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -171916,7 +171976,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -171978,13 +172038,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -172022,14 +172082,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -172044,7 +172104,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -172055,7 +172115,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -172065,19 +172125,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -172110,7 +172170,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -172121,16 +172181,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -172145,7 +172205,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -172156,7 +172216,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -172173,7 +172233,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -172182,7 +172242,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -172201,7 +172261,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -172212,7 +172272,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -172228,7 +172288,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -172237,7 +172297,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -172249,9 +172309,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -172261,25 +172321,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -172287,17 +172347,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -172402,7 +172462,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -172475,7 +172535,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -172490,23 +172550,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -172543,9 +172603,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -172554,9 +172614,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -172566,7 +172626,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -172585,7 +172645,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -172601,7 +172661,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -172659,7 +172719,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -172667,7 +172727,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -172680,7 +172740,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -172704,7 +172764,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -172728,7 +172788,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -172739,7 +172799,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -172749,7 +172809,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33483, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33491, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -172758,7 +172818,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -172807,7 +172867,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -172840,7 +172900,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -172852,7 +172912,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173062,7 +173122,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173072,14 +173132,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33511, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33519, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -173108,7 +173168,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173163,7 +173223,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -173218,7 +173278,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -173261,11 +173321,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -173308,7 +173368,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{}))) @@ -173341,12 +173401,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -173355,7 +173415,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -173363,7 +173423,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33542, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33550, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -173371,7 +173431,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -173426,7 +173486,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -173437,7 +173497,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33549 /* "wrong number of ..." */ + var zErr uintptr = ts + 33557 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -173486,19 +173546,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -173522,7 +173582,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -173551,7 +173611,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -173609,7 +173669,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -173618,7 +173678,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -173641,7 +173701,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33599 /* "wrong number of ..." */ + var zErr uintptr = ts + 33607 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -173833,17 +173893,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -173854,7 +173914,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -173948,7 +174008,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -174016,18 +174076,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33647, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 33655, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 33663, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33665, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33673, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -174052,7 +174112,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -174067,7 +174127,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -174093,7 +174153,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -174105,21 +174165,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -174137,7 +174197,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -174149,7 +174209,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -174167,7 +174227,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -174183,26 +174243,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174264,14 +174324,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -174283,7 +174343,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -174295,9 +174355,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174314,7 +174374,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -174335,7 +174395,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -174360,7 +174420,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -174385,13 +174445,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174400,7 +174460,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174446,7 +174506,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -174478,18 +174538,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -174502,7 +174562,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -174513,11 +174573,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -174606,7 +174666,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -174651,7 +174711,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -174664,11 +174724,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -174696,13 +174756,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33670, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33678, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -174729,14 +174789,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33677, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33685, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33708, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33716, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -174747,7 +174807,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33741, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33749, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -174760,7 +174820,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33778, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33786, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -174769,7 +174829,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33787, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33795, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -174788,7 +174848,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33820, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33828, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -174803,14 +174863,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33854, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33862, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33862, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33870, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33894, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33902, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -174818,9 +174878,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33900, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33908, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33914, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33922, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -174828,9 +174888,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33952, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33960, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33963, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33971, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -174841,25 +174901,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5010, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 7889, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17228}, - {FzName: ts + 33998, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 17236}, + {FzName: ts + 34006, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34006, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34014, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34037, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34045, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -174877,7 +174937,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -174911,20 +174971,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+21998) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16150) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34065, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22006) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16158) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34073, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34095) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34103) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34105, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34113, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -174934,7 +174994,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -174942,13 +175002,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34136, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34144, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34141, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34149, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34148, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34156, libc.VaList(bp+16, i)) } } } @@ -174967,7 +175027,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -174996,8 +175056,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+21998) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34156, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22006) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34164, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -175031,7 +175091,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34185, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -175072,19 +175132,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33854 /* "content" */ + zTail = ts + 33862 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34205 /* "docsize" */ + zTail = ts + 34213 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34213, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34221, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16150, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16158, -1) } // Formulate the zContentExprlist text @@ -175100,7 +175160,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -175125,7 +175185,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -175133,18 +175193,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34224, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34232, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1518 } - return ts + 14527 + return ts + 14535 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34240, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34248, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34247, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+21998)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34255, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22006)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -175175,7 +175235,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -175189,7 +175249,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -175216,7 +175276,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175280,13 +175340,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34273) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34281) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -175296,7 +175356,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34278) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34286) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -175306,7 +175366,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34287) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34295) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -175319,7 +175379,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34297) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34305) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -175329,7 +175389,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34307) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34315) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -175345,7 +175405,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+21998) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22006) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -175368,11 +175428,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34319 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34327 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -175395,7 +175455,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34351) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34359) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -175410,7 +175470,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34359, + ts+34367, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -175445,7 +175505,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -175464,9 +175524,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -175478,12 +175538,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175545,7 +175605,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34424, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34432, 0) return FTS5_EOF } } @@ -175558,20 +175618,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34444, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34452, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34475, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34483, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34478, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34486, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29861, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29869, uint64(3)) == 0 { tok = FTS5_AND } break @@ -175583,15 +175643,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -175669,7 +175729,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -175744,7 +175804,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -175756,7 +175816,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -175764,7 +175824,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -175805,7 +175865,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -175827,7 +175887,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -175991,7 +176051,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -176216,11 +176276,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -176228,7 +176288,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -176240,9 +176300,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -176259,7 +176319,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -176461,7 +176521,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -176481,7 +176541,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176508,7 +176568,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -176565,7 +176625,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -176631,7 +176691,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -176647,7 +176707,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -176656,7 +176716,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -176682,7 +176742,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -176701,7 +176761,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -176769,7 +176829,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -176828,7 +176888,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -176847,7 +176907,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -176865,7 +176925,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -176881,7 +176941,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -176907,7 +176967,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -176957,7 +177017,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -176969,7 +177029,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -176999,7 +177059,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -177015,7 +177075,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -177068,7 +177128,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -177130,7 +177190,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -177162,7 +177222,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -177178,15 +177238,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177196,7 +177256,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -177221,7 +177281,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -177233,7 +177293,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -177293,12 +177353,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177367,12 +177427,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -177383,12 +177443,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -177405,7 +177465,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -177463,7 +177523,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -177558,17 +177618,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34482, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34490, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33511, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33519, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -177580,7 +177640,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34487, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34495, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -177599,7 +177659,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -177637,7 +177697,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -177659,7 +177719,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -177677,7 +177737,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20360, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20368, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -177698,7 +177758,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -177713,7 +177773,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -177737,7 +177797,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -177765,21 +177825,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34516, 0) + ts+34524, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -177830,7 +177890,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte)) @@ -177850,7 +177910,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -177893,7 +177953,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -177953,12 +178013,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34569, + ts+34577, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34619 /* "phrase" */ + return ts + 34627 /* "phrase" */ } - return ts + 34482 /* "NEAR" */ + return ts + 34490 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -177981,7 +178041,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -178027,7 +178087,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -178040,7 +178100,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -178050,7 +178110,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -178059,7 +178119,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -178080,7 +178140,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -178104,12 +178164,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -178119,7 +178179,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -178154,7 +178214,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -178182,7 +178242,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -178193,7 +178253,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -178243,12 +178303,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -178299,7 +178359,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -178315,14 +178375,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -178350,7 +178410,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -178359,7 +178419,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -178373,7 +178433,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -178382,7 +178442,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -178393,7 +178453,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -178423,7 +178483,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -178472,7 +178532,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -178631,7 +178691,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178677,7 +178737,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -178719,7 +178779,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -178753,20 +178813,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -178992,7 +179052,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -179200,14 +179260,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -179215,17 +179275,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -179239,18 +179299,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -179272,18 +179332,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -179300,9 +179360,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -179310,38 +179370,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -179349,7 +179409,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -179367,7 +179427,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -179391,7 +179451,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179402,7 +179462,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -179414,7 +179474,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -179441,7 +179501,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34626, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34634, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -179487,11 +179547,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -179503,7 +179563,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -179518,7 +179578,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179529,7 +179589,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+34632, + ts+34640, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -179546,7 +179606,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179557,7 +179617,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34683, + ts+34691, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -179571,7 +179631,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179581,7 +179641,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+34732, + ts+34740, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -179593,7 +179653,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -179604,22 +179664,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -179630,7 +179690,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -179672,7 +179732,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179765,7 +179825,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -179785,7 +179845,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -179808,7 +179868,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179836,7 +179896,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179845,7 +179905,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+34772, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34780, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -179869,7 +179929,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -179886,7 +179946,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -179900,7 +179960,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179953,14 +180013,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -180003,7 +180063,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -180052,7 +180112,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180088,7 +180148,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -180109,7 +180169,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -180122,7 +180182,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -180130,11 +180190,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -180155,7 +180215,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180217,7 +180277,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -180240,12 +180300,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -180255,7 +180315,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -180297,16 +180357,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -180336,7 +180396,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180365,7 +180425,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -180410,7 +180470,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -180442,7 +180502,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180476,7 +180536,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -180498,7 +180558,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -180539,7 +180599,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180598,7 +180658,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -180648,7 +180708,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -180656,7 +180716,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -180685,7 +180745,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -180790,7 +180850,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -180915,7 +180975,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -181015,7 +181075,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -181043,7 +181103,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -181277,7 +181337,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181285,7 +181345,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+34795, + ts+34803, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -181296,7 +181356,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -181366,7 +181426,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -181422,7 +181482,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -181437,7 +181497,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -181489,7 +181549,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -181519,7 +181579,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -181569,7 +181629,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -181580,7 +181640,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -181603,7 +181663,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -181643,7 +181703,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -181654,7 +181714,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181693,7 +181753,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181718,12 +181778,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -181742,7 +181802,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -181759,21 +181819,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -181783,7 +181843,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181809,7 +181869,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181889,7 +181949,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -181945,7 +182005,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -181996,7 +182056,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182057,7 +182117,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -182065,7 +182125,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -182085,7 +182145,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -182093,7 +182153,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -182109,7 +182169,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -182171,7 +182231,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -182193,7 +182253,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -182238,7 +182298,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -182441,7 +182501,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -182474,7 +182534,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -182482,13 +182542,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -182507,7 +182567,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -182520,7 +182580,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -182562,7 +182622,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -182575,7 +182635,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -182585,7 +182645,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -182606,7 +182666,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl))) @@ -182625,7 +182685,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -182647,7 +182707,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -182680,7 +182740,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -182690,7 +182750,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -182703,7 +182763,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182719,7 +182779,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -182779,7 +182839,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -182815,14 +182875,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -182898,7 +182958,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -182927,7 +182987,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182956,7 +183016,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -182980,7 +183040,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -183001,7 +183061,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+34879, + ts+34887, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -183020,7 +183080,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -183089,13 +183149,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -183254,7 +183314,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -183304,7 +183364,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -183321,7 +183381,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183338,7 +183398,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -183347,14 +183407,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183379,7 +183439,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -183557,7 +183617,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -183566,7 +183626,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -183627,7 +183687,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -183661,7 +183721,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183686,12 +183746,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -183718,7 +183778,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -183750,7 +183810,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -183760,13 +183820,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183783,7 +183843,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -183839,11 +183899,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -183854,7 +183914,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -183867,7 +183927,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -184032,7 +184092,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -184179,7 +184239,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -184199,7 +184259,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -184210,7 +184270,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -184221,7 +184281,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -184240,7 +184300,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -184251,13 +184311,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34936, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34944, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24854, ts+34944, 0, pzErr) + pConfig, ts+24862, ts+34952, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11349, - ts+34979, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11357, + ts+34987, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -184274,7 +184334,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -184295,7 +184355,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -184322,7 +184382,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -184344,7 +184404,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -184368,7 +184428,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -184451,7 +184511,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -184459,7 +184519,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -184479,14 +184539,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184504,7 +184564,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -184517,7 +184577,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -184539,7 +184599,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -184547,7 +184607,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -184556,7 +184616,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184569,7 +184629,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34626, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34634, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -184578,7 +184638,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -184592,7 +184652,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -184612,7 +184672,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -184631,7 +184691,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -184690,7 +184750,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -184706,7 +184766,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35023, + ts+35031, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -184859,7 +184919,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -184918,7 +184978,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35109) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35117) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -184949,13 +185009,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -184988,7 +185048,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -185010,7 +185070,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -185018,9 +185078,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -185049,35 +185109,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -185111,21 +185171,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -185135,13 +185195,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -185159,7 +185219,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -185217,11 +185277,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -185230,14 +185290,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -185308,7 +185368,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -185329,7 +185389,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35114, 0) + ts+35122, 0) return SQLITE_ERROR } @@ -185470,7 +185530,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -185481,7 +185541,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -185507,7 +185567,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -185520,11 +185580,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -185567,7 +185627,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -185584,7 +185644,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -185594,7 +185654,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -185628,7 +185688,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -185648,7 +185708,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -185677,7 +185737,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -185736,7 +185796,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -185764,7 +185824,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -185793,11 +185853,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35153, + ts+35161, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14527 /* ", " */ + return ts + 14535 /* ", " */ } return ts + 1518 /* "" */ }(), @@ -185809,9 +185869,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35208 /* "DESC" */ + return ts + 35216 /* "DESC" */ } - return ts + 35213 /* "ASC" */ + return ts + 35221 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -185831,7 +185891,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -185846,7 +185906,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -185862,13 +185922,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35217, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35225, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+4992, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35223, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35231, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -185878,7 +185938,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -185891,7 +185951,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -185903,7 +185963,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35251, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35259, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -185935,7 +185995,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35261, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35269, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -185944,7 +186004,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -185967,21 +186027,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35282, libc.VaList(bp, z)) + ts+35290, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33665 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33673 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -186000,7 +186060,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186040,7 +186100,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35114, 0) + ts+35122, 0) return SQLITE_ERROR __1: ; @@ -186275,7 +186335,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35315, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35323, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -186321,7 +186381,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -186332,7 +186392,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -186346,7 +186406,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -186376,7 +186436,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186420,7 +186480,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -186442,7 +186502,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186450,29 +186510,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35351, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35359, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35362, 0) + ts+35370, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35442, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35450, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35450, 0) + ts+35458, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16817, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16825, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35506, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35514, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35512, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35520, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -186491,7 +186551,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -186501,7 +186561,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -186524,7 +186584,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186546,7 +186606,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17362, z) { + 0 == Xsqlite3_stricmp(tls, ts+17370, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -186571,12 +186631,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35528, + ts+35536, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20261 /* "UPDATE" */ + return ts + 20269 /* "UPDATE" */ } - return ts + 35565 /* "DELETE from" */ + return ts + 35573 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -186626,7 +186686,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -186638,7 +186698,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -186647,7 +186707,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -186655,7 +186715,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -186663,46 +186723,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -186719,7 +186779,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186776,7 +186836,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -186860,7 +186920,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -186870,7 +186930,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -186886,11 +186946,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -186902,7 +186962,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186960,7 +187020,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186998,7 +187058,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -187020,7 +187080,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187042,7 +187102,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187065,7 +187125,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187098,7 +187158,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187179,10 +187239,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187218,7 +187278,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -187227,7 +187287,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -187237,7 +187297,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187250,7 +187310,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35577, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35585, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -187260,7 +187320,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -187282,7 +187342,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -187346,7 +187406,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -187386,7 +187446,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -187405,12 +187465,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -187418,7 +187478,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -187427,7 +187487,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -187436,7 +187496,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -187445,7 +187505,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -187476,7 +187536,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -187505,7 +187565,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -187523,7 +187583,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -187539,7 +187599,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187555,7 +187615,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35598, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35606, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -187574,7 +187634,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35620, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35628, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -187590,7 +187650,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -187616,28 +187676,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35651) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35659) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35664, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35672, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -187648,10 +187708,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 35755, ts + 33854, ts + 24854, ts + 34205, ts + 11349, -} /* sqlite3.c:234311:21 */ + ts + 35763, ts + 33862, ts + 24862, ts + 34213, ts + 11357, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -187672,7 +187732,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35762, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35770, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -187690,13 +187750,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35762, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35770, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35767, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35775, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -187734,7 +187794,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -187743,7 +187803,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -187751,7 +187811,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -187762,20 +187822,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35782, - ts + 35850, - ts + 35919, + ts + 35790, + ts + 35858, + ts + 35927, - ts + 35952, - ts + 35991, - ts + 36031, - ts + 36070, - ts + 36111, + ts + 35960, + ts + 35999, + ts + 36039, + ts + 36078, + ts + 36119, - ts + 36150, + ts + 36158, - ts + 36192, - ts + 36232, + ts + 36200, + ts + 36240, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -187852,7 +187912,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -187874,79 +187934,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36255, + ts+36263, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36359, + ts+36367, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36397, + ts+36405, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36435, + ts+36443, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+24854, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11349, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35755, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24862, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11357, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35763, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34205, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34213, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33854, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33862, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36477, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36485, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29507 /* " WITHOUT ROWID" */ + return ts + 29515 /* " WITHOUT ROWID" */ } return ts + 1518 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36507, + ts+36515, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -187959,7 +188019,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187988,27 +188048,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36551, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36559, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36574, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36582, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33854, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33862, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34205, ts+36580, 0, pzErr) + pConfig, ts+34213, ts+36588, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35755, ts+36612, 1, pzErr) + pConfig, ts+35763, ts+36620, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34351, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34359, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -188020,7 +188080,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -188039,12 +188099,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -188061,7 +188121,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -188130,7 +188190,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188157,7 +188217,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -188171,7 +188231,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -188195,7 +188255,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188236,7 +188296,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -188248,12 +188308,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36629, + ts+36637, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36679, + ts+36687, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -188263,12 +188323,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34351, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34359, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -188332,15 +188392,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -188351,7 +188411,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188373,7 +188433,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188405,7 +188465,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -188450,7 +188510,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -188458,7 +188518,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36708, + zSql = Xsqlite3_mprintf(tls, ts+36716, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -188485,13 +188545,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188557,7 +188617,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -188655,14 +188715,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33854, bp+48) + rc = fts5StorageCount(tls, p, ts+33862, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34205, bp+56) + rc = fts5StorageCount(tls, p, ts+34213, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -188682,7 +188742,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -188696,7 +188756,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -188706,7 +188766,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -188724,7 +188784,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188755,7 +188815,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -188773,7 +188833,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -188790,7 +188850,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -188804,12 +188864,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188864,13 +188924,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -188880,12 +188940,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -188901,9 +188961,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36740) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36748) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36751) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36759) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -188920,7 +188980,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -188932,7 +188992,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -189013,7 +189073,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -189023,11 +189083,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -189082,7 +189142,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -189104,7 +189164,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -189114,7 +189174,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -189134,7 +189194,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -189145,7 +189205,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36762 /* "L* N* Co" */ + var zCat uintptr = ts + 36770 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -189158,7 +189218,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36771) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36779) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -189169,18 +189229,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36782) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36790) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36740) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36748) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36751) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36759) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36771) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36779) { // no-op } else { rc = SQLITE_ERROR @@ -189202,12 +189262,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -189463,7 +189523,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -189472,10 +189532,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -189486,7 +189546,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189494,7 +189554,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36800 /* "unicode61" */ + var zBase uintptr = ts + 36808 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -189539,9 +189599,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -189551,15 +189611,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -189580,12 +189640,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -189595,7 +189655,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -189605,7 +189665,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -189623,14 +189683,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -189645,13 +189705,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36810, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36818, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -189659,11 +189719,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36813, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36821, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36818, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36826, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -189671,7 +189731,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36823, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36831, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -189679,7 +189739,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36826, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -189687,11 +189747,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36829, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36837, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36842, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -189699,19 +189759,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36839, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36847, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36843, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36851, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36849, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36857, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36854, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36862, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -189719,11 +189779,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36858, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36866, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36862, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36870, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -189731,7 +189791,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36865, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -189739,11 +189799,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36869, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36877, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36873, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36881, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -189751,22 +189811,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36877, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36881, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36885, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -189774,34 +189818,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36893, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36889, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36869, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36877, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36892, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36895, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36900, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36903, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36899, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36885, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36907, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -189811,143 +189871,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36902, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36910, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36869, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36877, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36910, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36918, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36917, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36925, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36930, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36818, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36826, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36927, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36935, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36813, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36821, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36932, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36937, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36945, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15363, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15371, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36942, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36950, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36895, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36903, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36954, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36810, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36818, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36951, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36959, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36854, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36862, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36957, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36965, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36961, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36969, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36963, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36971, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36877, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36885, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36969, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36977, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36885, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36893, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36977, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36985, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36869, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36877, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36983, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36991, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36869, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36877, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36996, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36810, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36818, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36881, uint64(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37002, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37010, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36889, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36877, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37018, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36885, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37030, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36810, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36818, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37028, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37036, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36881, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36889, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37034, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37042, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36895, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36903, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -189957,22 +190017,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37041, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37049, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37046, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37054, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -189980,21 +190040,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37051, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37059, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37057, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36826, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36834, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -190002,7 +190062,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37071, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -190010,9 +190070,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37069, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37077, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36810, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36818, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -190022,18 +190082,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37075, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37079, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37087, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37082, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37090, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -190042,7 +190102,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37085, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37093, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -190059,7 +190119,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -190075,7 +190135,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190173,7 +190233,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -190194,20 +190254,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -190218,7 +190278,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37089) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37097) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -190238,7 +190298,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -190391,7 +190451,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -190405,27 +190465,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36800, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36808, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 37104, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37112, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 37110, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37118, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 37117, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37125, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -190451,7 +190511,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -190474,7 +190534,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -190545,7 +190605,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -190564,7 +190624,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -190625,7 +190685,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -190683,7 +190743,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -190695,9 +190755,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -190894,7 +190954,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -191073,7 +191133,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -191252,9 +191312,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -191294,7 +191354,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -191326,7 +191386,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -191401,7 +191461,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -191577,7 +191637,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -191623,7 +191683,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -191636,7 +191696,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -191696,7 +191756,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -191736,7 +191796,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -191757,9 +191817,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -191767,7 +191827,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -191775,14 +191835,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+37125) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37133) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37129) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37137) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37133) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37141) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37142, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37150, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -191792,14 +191852,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -191824,24 +191884,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 37176, - ts + 37216, - ts + 37251, + ts + 37184, + ts + 37224, + ts + 37259, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23150, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+23158, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37294, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37302, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -191894,11 +191954,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -191912,7 +191972,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -191980,7 +192040,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -191993,11 +192053,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37327, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37335, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37358, + ts+37366, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -192021,7 +192081,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37409, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37417, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -192047,7 +192107,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -192061,7 +192121,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -192070,7 +192130,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192101,7 +192161,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -192130,7 +192190,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -192274,7 +192334,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -192348,12 +192408,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -192426,16 +192486,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37435, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37443, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -192452,7 +192512,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -192479,963 +192539,963 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 37445 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 37453 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:35161:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35164:21: + }{posixOpen})) // sqlite3.c:35170:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:35173:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:35167:21: + }{libc.Xaccess})) // sqlite3.c:35176:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:35170:21: + }{libc.Xgetcwd})) // sqlite3.c:35179:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:35173:21: + }{libc.Xstat})) // sqlite3.c:35182:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:35186:21: + }{libc.Xfstat})) // sqlite3.c:35195:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Off_t) int32 - }{libc.Xftruncate})) // sqlite3.c:35190:21: + }{libc.Xftruncate})) // sqlite3.c:35199:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:35193:21: + }{libc.Xfcntl})) // sqlite3.c:35202:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:35196:21: + }{libc.Xread})) // sqlite3.c:35205:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:35213:21: + }{libc.Xwrite})) // sqlite3.c:35222:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:35232:21: + }{libc.Xfchmod})) // sqlite3.c:35241:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:35242:21: + }{libc.Xunlink})) // sqlite3.c:35251:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:35245:25: + }{openDirectory})) // sqlite3.c:35254:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:35248:21: + }{libc.Xmkdir})) // sqlite3.c:35257:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:35251:21: + }{libc.Xrmdir})) // sqlite3.c:35260:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, Uid_t, Gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:35255:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35262:21: + }{libc.Xfchown})) // sqlite3.c:35264:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) Uid_t }{libc.Xgeteuid})) // sqlite3.c:35271:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, Off_t) uintptr - }{libc.Xmmap})) // sqlite3.c:35269:21: + }{libc.Xmmap})) // sqlite3.c:35278:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:35276:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35290:21: + }{libc.Xmunmap})) // sqlite3.c:35285:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:35299:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:35297:21: + }{libc.Xreadlink})) // sqlite3.c:35306:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:35304:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42833:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42833:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42835:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42835:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42836:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42836:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42837:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40193:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40183:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40173:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.Xlstat})) // sqlite3.c:35313:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDelete // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixAccess // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixFullPathname // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixDlOpen // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixDlError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88)) = unixDlSym // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96)) = unixDlClose // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104)) = unixRandomness // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixSleep // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixCurrentTime // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixGetLastError // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixCurrentTimeInt64 // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixSetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixGetSystemCall // sqlite3.c:42842:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixNextSystemCall // sqlite3.c:42842:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDelete // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixAccess // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixFullPathname // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixDlOpen // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixDlError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixDlSym // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264)) = unixDlClose // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272)) = unixRandomness // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280)) = unixSleep // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixCurrentTime // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixGetLastError // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixCurrentTimeInt64 // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixSetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixGetSystemCall // sqlite3.c:42844:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixNextSystemCall // sqlite3.c:42844:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376)) = unixOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384)) = unixDelete // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392)) = unixAccess // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400)) = unixFullPathname // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408)) = unixDlOpen // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416)) = unixDlError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424)) = unixDlSym // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432)) = unixDlClose // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440)) = unixRandomness // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448)) = unixSleep // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456)) = unixCurrentTime // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464)) = unixGetLastError // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472)) = unixCurrentTimeInt64 // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480)) = unixSetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488)) = unixGetSystemCall // sqlite3.c:42845:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496)) = unixNextSystemCall // sqlite3.c:42845:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544)) = unixOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552)) = unixDelete // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560)) = unixAccess // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568)) = unixFullPathname // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576)) = unixDlOpen // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584)) = unixDlError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592)) = unixDlSym // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600)) = unixDlClose // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608)) = unixRandomness // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616)) = unixSleep // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624)) = unixCurrentTime // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632)) = unixGetLastError // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640)) = unixCurrentTimeInt64 // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648)) = unixSetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656)) = unixGetSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664)) = unixNextSystemCall // sqlite3.c:42846:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = dotlockClose // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixRead // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixWrite // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixSync // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = dotlockLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = dotlockUnlock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = dotlockCheckReservedLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136)) = unixFetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40202:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = nolockClose // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixRead // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixWrite // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = unixTruncate // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixSync // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixFileSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = nolockLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = nolockUnlock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = nolockCheckReservedLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80)) = unixFileControl // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112)) = unixShmLock // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136)) = unixFetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40192:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixClose // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixRead // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixWrite // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixTruncate // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixSync // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixFileSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixUnlock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixCheckReservedLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80)) = unixFileControl // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88)) = unixSectorSize // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96)) = unixDeviceCharacteristics // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104)) = unixShmMap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112)) = unixShmLock // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120)) = unixShmBarrier // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128)) = unixShmUnmap // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136)) = unixFetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144)) = unixUnfetch // sqlite3.c:40182:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-11.1.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-11.1.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go index 10707350..b3d0b772 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -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 "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380100/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package sqlite3 @@ -15067,7 +15067,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab" + SQLITE_SOURCE_ID = "2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -15178,8 +15178,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.38.0" - SQLITE_VERSION_NUMBER = 3038000 + SQLITE_VERSION = "3.38.1" + SQLITE_VERSION_NUMBER = 3038001 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -22194,7 +22194,7 @@ type Va_list = X__builtin_va_list /* :50:27 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.38.0. By combining all the individual C code files into this +// version 3.38.1. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -24005,7 +24005,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:4689:32 */ // // The typedef is necessary to work around problems in certain // C++ compilers. -type Sqlite3_destructor_type = uintptr /* sqlite3.c:6054:14 */ +type Sqlite3_destructor_type = uintptr /* sqlite3.c:6058:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. @@ -24030,7 +24030,7 @@ type sqlite3_vtab = struct { // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface -type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7239:29 */ +type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte @@ -24049,12 +24049,12 @@ type sqlite3_index_info = struct { FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ -type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7240:35 */ -type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7241:9 */ +type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7244:35 */ +type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7245:9 */ -type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7241:36 */ +type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [4]byte @@ -24083,7 +24083,7 @@ type sqlite3_module = struct { FxShadowName uintptr } /* sqlite3.c:578:9 */ -type Sqlite3_module = sqlite3_module /* sqlite3.c:7242:31 */ +type Sqlite3_module = sqlite3_module /* sqlite3.c:7246:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -24191,7 +24191,7 @@ type sqlite3_index_constraint = struct { Fusable uint8 F__ccgo_pad1 [2]byte FiTermOffset int32 -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -24297,7 +24297,7 @@ type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info @@ -24403,7 +24403,7 @@ type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:7240:9 */ +} /* sqlite3.c:7244:9 */ // CAPI3REF: Mutex Methods Object // @@ -24478,7 +24478,7 @@ type sqlite3_mutex_methods = struct { FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr -} /* sqlite3.c:8106:9 */ +} /* sqlite3.c:8110:9 */ // CAPI3REF: Mutex Methods Object // @@ -24543,7 +24543,7 @@ type sqlite3_mutex_methods = struct { // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. -type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8106:38 */ +type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8110:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -24568,7 +24568,7 @@ type sqlite3_str = struct { FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:8370:9 */ +} /* sqlite3.c:8374:9 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} @@ -24584,7 +24584,7 @@ type sqlite3_str = struct { //
  • ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // -type Sqlite3_str = sqlite3_str /* sqlite3.c:8370:28 */ +type Sqlite3_str = sqlite3_str /* sqlite3.c:8374:28 */ // CAPI3REF: Custom Page Cache Object // @@ -24607,7 +24607,7 @@ type sqlite3_pcache_page = struct { // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. -type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8875:36 */ +type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:8879:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -24781,7 +24781,7 @@ type sqlite3_pcache_methods2 = struct { FxTruncate uintptr FxDestroy uintptr FxShrink uintptr -} /* sqlite3.c:9040:9 */ +} /* sqlite3.c:9044:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} @@ -24940,7 +24940,7 @@ type sqlite3_pcache_methods2 = struct { // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. -type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9040:40 */ +type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9044:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is @@ -24957,12 +24957,12 @@ type sqlite3_pcache_methods = struct { FxRekey uintptr FxTruncate uintptr FxDestroy uintptr -} /* sqlite3.c:9063:9 */ +} /* sqlite3.c:9067:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. -type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9063:39 */ +type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // @@ -24996,7 +24996,7 @@ type sqlite3_backup = struct { // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] -type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ +type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9093:31 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -25016,7 +25016,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9089:31 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ +type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10385:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} @@ -25036,7 +25036,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10381:9 */ // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. -type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10383:3 */ +type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10387:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -25080,7 +25080,7 @@ type sqlite3_rtree_geometry = struct { FaParam uintptr FpUser uintptr FxDelUser uintptr -} /* sqlite3.c:10712:9 */ +} /* sqlite3.c:10716:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // @@ -25117,7 +25117,7 @@ type sqlite3_rtree_geometry = struct { // // -type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10712:39 */ +type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 @@ -25137,13 +25137,13 @@ type sqlite3_rtree_query_info = struct { FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr -} /* sqlite3.c:10713:9 */ +} /* sqlite3.c:10717:9 */ -type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10713:41 */ +type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. -type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10721:18 */ +type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -25173,7 +25173,7 @@ type sqlite3_session = struct { FpNext uintptr FpTable uintptr Fhook SessionHook -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. @@ -25186,7 +25186,7 @@ type sqlite3_session = struct { // // An instance of this object is a [session] that can be used to // record changes to a database. -type Sqlite3_session = sqlite3_session /* sqlite3.c:10828:32 */ +type Sqlite3_session = sqlite3_session /* sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // @@ -25207,13 +25207,13 @@ type sqlite3_changeset_iter = struct { F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. -type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10836:39 */ +type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // @@ -25223,13 +25223,13 @@ type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr -} /* sqlite3.c:11688:9 */ +} /* sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] -type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ +type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -25431,7 +25431,7 @@ type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:11688:36 */ //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 */ +type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // @@ -25633,7 +25633,7 @@ type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12252:9 * //
  • The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // -type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12252:32 */ +type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). @@ -25687,7 +25687,7 @@ type Fts5ExtensionApi1 = struct { FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr -} /* sqlite3.c:12568:9 */ +} /* sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). @@ -25719,22 +25719,22 @@ type Fts5ExtensionApi1 = struct { // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. -type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12568:33 */ +type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr -} /* sqlite3.c:12570:9 */ +} /* sqlite3.c:12574:9 */ -type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12570:31 */ +type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12574:31 */ -type Fts5_extension_function = uintptr /* sqlite3.c:12572:14 */ +type Fts5_extension_function = uintptr /* sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr -} /* sqlite3.c:13031:9 */ +} /* sqlite3.c:13035:9 */ -type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13031:31 */ +type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13035:31 */ // Flags that may be passed as the third argument to xTokenize() @@ -25754,7 +25754,7 @@ type fts5_api = struct { FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr -} /* sqlite3.c:13067:9 */ +} /* sqlite3.c:13071:9 */ // Flags that may be passed as the third argument to xTokenize() @@ -25768,7 +25768,7 @@ type fts5_api = struct { // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API -type Fts5_api = fts5_api /* sqlite3.c:13067:25 */ +type Fts5_api = fts5_api /* sqlite3.c:13071:25 */ type Ssize_t = int64 /* corecrt.h:50:35 */ @@ -26793,7 +26793,7 @@ type Hash1 = struct { // used in SQLite. // Forward declarations of structures. -type Hash = Hash1 /* sqlite3.c:13740:21 */ +type Hash = Hash1 /* sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr @@ -26801,7 +26801,7 @@ type HashElem1 = struct { FpKey uintptr } /* sqlite3.c:578:9 */ -type HashElem = HashElem1 /* sqlite3.c:13741:25 */ +type HashElem = HashElem1 /* sqlite3.c:13745:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client @@ -27004,13 +27004,13 @@ func vswprintf(tls *libc.TLS, __stream uintptr, __count Size_t, __format uintptr // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... -type I64 = Sqlite_int64 /* sqlite3.c:14213:22 */ // 8-byte signed integer -type U64 = Sqlite_uint64 /* sqlite3.c:14214:23 */ // 8-byte unsigned integer -type U32 = uint32 /* sqlite3.c:14215:21 */ // 4-byte unsigned integer -type U16 = uint16 /* sqlite3.c:14216:21 */ // 2-byte unsigned integer -type I16 = int16 /* sqlite3.c:14217:20 */ // 2-byte signed integer -type U8 = uint8 /* sqlite3.c:14218:20 */ // 1-byte unsigned integer -type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer +type I64 = Sqlite_int64 /* sqlite3.c:14217:22 */ // 8-byte signed integer +type U64 = Sqlite_uint64 /* sqlite3.c:14218:23 */ // 8-byte unsigned integer +type U32 = uint32 /* sqlite3.c:14219:21 */ // 4-byte unsigned integer +type U16 = uint16 /* sqlite3.c:14220:21 */ // 2-byte unsigned integer +type I16 = int16 /* sqlite3.c:14221:20 */ // 2-byte signed integer +type U8 = uint8 /* sqlite3.c:14222:20 */ // 1-byte unsigned integer +type I8 = int8 /* sqlite3.c:14223:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -27021,7 +27021,7 @@ type I8 = int8 /* sqlite3.c:14219:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default +type TRowcnt = U32 /* sqlite3.c:14242:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -27044,12 +27044,12 @@ type TRowcnt = U32 /* sqlite3.c:14238:14 */ // 32-bit is the default // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 -type LogEst = int16 /* sqlite3.c:14264:20 */ +type LogEst = int16 /* sqlite3.c:14268:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer -type Uptr = U64 /* sqlite3.c:14289:15 */ +type Uptr = U64 /* sqlite3.c:14293:15 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. @@ -27072,7 +27072,7 @@ type BusyHandler1 = struct { // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. -type BusyHandler = BusyHandler1 /* sqlite3.c:14460:28 */ +type BusyHandler = BusyHandler1 /* sqlite3.c:14464:28 */ // Name of table that holds the database schema. // @@ -27214,13 +27214,13 @@ type AggInfo1 = struct { // cases the parameters are named as per the usual conventions. // Forward references to structures -type AggInfo = AggInfo1 /* sqlite3.c:14570:24 */ +type AggInfo = AggInfo1 /* sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr -} /* sqlite3.c:14571:9 */ +} /* sqlite3.c:14575:9 */ -type AuthContext = AuthContext1 /* sqlite3.c:14571:28 */ +type AuthContext = AuthContext1 /* sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr @@ -27228,7 +27228,7 @@ type AutoincInfo1 = struct { FregCtr int32 } /* sqlite3.c:578:9 */ -type AutoincInfo = AutoincInfo1 /* sqlite3.c:14572:28 */ +type AutoincInfo = AutoincInfo1 /* sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 @@ -27240,7 +27240,7 @@ type Bitvec1 = struct { } } /* sqlite3.c:578:9 */ -type Bitvec = Bitvec1 /* sqlite3.c:14573:23 */ +type Bitvec = Bitvec1 /* sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 @@ -27250,7 +27250,7 @@ type CollSeq1 = struct { FxDel uintptr } /* sqlite3.c:578:9 */ -type CollSeq = CollSeq1 /* sqlite3.c:14574:24 */ +type CollSeq = CollSeq1 /* sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ @@ -27264,7 +27264,7 @@ type Column1 = struct { F__ccgo_pad3 [6]byte } /* sqlite3.c:578:9 */ -type Column = Column1 /* sqlite3.c:14575:23 */ +type Column = Column1 /* sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr @@ -27275,7 +27275,7 @@ type Cte1 = struct { F__ccgo_pad1 [7]byte } /* sqlite3.c:578:9 */ -type Cte = Cte1 /* sqlite3.c:14576:20 */ +type Cte = Cte1 /* sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 @@ -27286,7 +27286,7 @@ type CteUse1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type CteUse = CteUse1 /* sqlite3.c:14577:23 */ +type CteUse = CteUse1 /* sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr @@ -27296,7 +27296,7 @@ type Db1 = struct { FpSchema uintptr } /* sqlite3.c:578:9 */ -type Db = Db1 /* sqlite3.c:14578:19 */ +type Db = Db1 /* sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker @@ -27306,9 +27306,9 @@ type DbFixer1 = struct { FzDb uintptr FzType uintptr FpName uintptr -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type DbFixer = DbFixer1 /* sqlite3.c:14579:24 */ +type DbFixer = DbFixer1 /* sqlite3.c:14583:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 @@ -27323,7 +27323,7 @@ type Schema1 = struct { Fcache_size int32 } /* sqlite3.c:578:9 */ -type Schema = Schema1 /* sqlite3.c:14580:23 */ +type Schema = Schema1 /* sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 @@ -27343,7 +27343,7 @@ type Expr1 = struct { Fy struct{ FpTab uintptr } } /* sqlite3.c:578:9 */ -type Expr = Expr1 /* sqlite3.c:14581:21 */ +type Expr = Expr1 /* sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 @@ -27365,7 +27365,7 @@ type ExprList1 = struct { } } /* sqlite3.c:578:9 */ -type ExprList = ExprList1 /* sqlite3.c:14582:25 */ +type ExprList = ExprList1 /* sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr @@ -27382,17 +27382,17 @@ type FKey1 = struct { F__ccgo_pad1 [4]byte FzCol uintptr } -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ -type FKey = FKey1 /* sqlite3.c:14583:21 */ +type FKey = FKey1 /* sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr -} /* sqlite3.c:14584:9 */ +} /* sqlite3.c:14588:9 */ -type FuncDestructor = FuncDestructor1 /* sqlite3.c:14584:31 */ +type FuncDestructor = FuncDestructor1 /* sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte @@ -27407,17 +27407,17 @@ type FuncDef1 = struct { Fu struct{ FpHash uintptr } } /* sqlite3.c:578:9 */ -type FuncDef = FuncDef1 /* sqlite3.c:14585:24 */ -type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14586:9 */ +type FuncDef = FuncDef1 /* sqlite3.c:14589:24 */ +type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14590:9 */ -type FuncDefHash = FuncDefHash1 /* sqlite3.c:14586:28 */ +type FuncDefHash = FuncDefHash1 /* sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type IdList = IdList1 /* sqlite3.c:14587:23 */ +type IdList = IdList1 /* sqlite3.c:14591:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr @@ -27448,7 +27448,7 @@ type Index1 = struct { FcolNotIdxed Bitmask } /* sqlite3.c:578:9 */ -type Index = Index1 /* sqlite3.c:14588:22 */ +type Index = Index1 /* sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 @@ -27458,7 +27458,7 @@ type IndexSample1 = struct { FanDLt uintptr } /* sqlite3.c:578:9 */ -type IndexSample = IndexSample1 /* sqlite3.c:14589:28 */ +type IndexSample = IndexSample1 /* sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 @@ -27471,7 +27471,7 @@ type KeyInfo1 = struct { FaColl [1]uintptr } /* sqlite3.c:578:9 */ -type KeyInfo = KeyInfo1 /* sqlite3.c:14591:24 */ +type KeyInfo = KeyInfo1 /* sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 @@ -27490,10 +27490,10 @@ type Lookaside1 = struct { FpEnd uintptr } /* sqlite3.c:578:9 */ -type Lookaside = Lookaside1 /* sqlite3.c:14592:26 */ +type Lookaside = Lookaside1 /* sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:578:9 */ -type LookasideSlot = LookasideSlot1 /* sqlite3.c:14593:30 */ +type LookasideSlot = LookasideSlot1 /* sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr @@ -27504,7 +27504,7 @@ type Module1 = struct { FpEpoTab uintptr } /* sqlite3.c:578:9 */ -type Module = Module1 /* sqlite3.c:14594:23 */ +type Module = Module1 /* sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr @@ -27515,9 +27515,9 @@ type NameContext1 = struct { FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr -} /* sqlite3.c:14595:9 */ +} /* sqlite3.c:14599:9 */ -type NameContext = NameContext1 /* sqlite3.c:14595:28 */ +type NameContext = NameContext1 /* sqlite3.c:14599:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr @@ -27599,14 +27599,14 @@ type Parse1 = struct { FpRename uintptr } /* sqlite3.c:578:9 */ -type Parse = Parse1 /* sqlite3.c:14596:22 */ +type Parse = Parse1 /* sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.c:578:9 */ -type ParseCleanup = ParseCleanup1 /* sqlite3.c:14597:29 */ +type ParseCleanup = ParseCleanup1 /* sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr @@ -27625,21 +27625,21 @@ type PreUpdate1 = struct { FpPk uintptr } /* sqlite3.c:578:9 */ -type PreUpdate = PreUpdate1 /* sqlite3.c:14598:26 */ +type PreUpdate = PreUpdate1 /* sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr -} /* sqlite3.c:14599:9 */ +} /* sqlite3.c:14603:9 */ -type PrintfArguments = PrintfArguments1 /* sqlite3.c:14599:32 */ +type PrintfArguments = PrintfArguments1 /* sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* sqlite3.c:578:9 */ -type RenameToken = RenameToken1 /* sqlite3.c:14600:28 */ +type RenameToken = RenameToken1 /* sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr @@ -27649,9 +27649,9 @@ type Returning1 = struct { FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:14601:9 */ +} /* sqlite3.c:14605:9 */ -type Returning = Returning1 /* sqlite3.c:14601:26 */ +type Returning = Returning1 /* sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr @@ -27662,9 +27662,9 @@ type RowSet1 = struct { FnFresh U16 FrsFlags U16 FiBatch int32 -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ -type RowSet = RowSet1 /* sqlite3.c:14602:23 */ +type RowSet = RowSet1 /* sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 @@ -27672,7 +27672,7 @@ type Savepoint1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Savepoint = Savepoint1 /* sqlite3.c:14603:26 */ +type Savepoint = Savepoint1 /* sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte @@ -27697,7 +27697,7 @@ type Select1 = struct { FpWinDefn uintptr } /* sqlite3.c:578:9 */ -type Select = Select1 /* sqlite3.c:14604:23 */ +type Select = Select1 /* sqlite3.c:14608:23 */ type SQLiteThread1 = struct { Ftid uintptr Fid uint32 @@ -27705,9 +27705,9 @@ type SQLiteThread1 = struct { FxTask uintptr FpIn uintptr FpResult uintptr -} /* sqlite3.c:14605:9 */ +} /* sqlite3.c:14609:9 */ -type SQLiteThread = SQLiteThread1 /* sqlite3.c:14605:29 */ +type SQLiteThread = SQLiteThread1 /* sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte @@ -27718,9 +27718,9 @@ type SelectDest1 = struct { F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr -} /* sqlite3.c:14606:9 */ +} /* sqlite3.c:14610:9 */ -type SelectDest = SelectDest1 /* sqlite3.c:14606:27 */ +type SelectDest = SelectDest1 /* sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr @@ -27746,15 +27746,15 @@ type SrcItem1 = struct { Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.c:578:9 */ -type SrcItem = SrcItem1 /* sqlite3.c:14607:24 */ +type SrcItem = SrcItem1 /* sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* sqlite3.c:578:9 */ -type SrcList = SrcList1 /* sqlite3.c:14608:24 */ -type StrAccum = sqlite3_str /* sqlite3.c:14609:28 */ // Internal alias for sqlite3_str +type SrcList = SrcList1 /* sqlite3.c:14612:24 */ +type StrAccum = sqlite3_str /* sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr @@ -27784,7 +27784,7 @@ type Table1 = struct { } /* sqlite3.c:578:9 */ // Internal alias for sqlite3_str -type Table = Table1 /* sqlite3.c:14610:22 */ +type Table = Table1 /* sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno @@ -27793,14 +27793,14 @@ type TableLock1 = struct { FzLockName uintptr } /* sqlite3.c:578:9 */ -type TableLock = TableLock1 /* sqlite3.c:14611:26 */ +type TableLock = TableLock1 /* sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type Token = Token1 /* sqlite3.c:14612:22 */ +type Token = Token1 /* sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr @@ -27816,7 +27816,7 @@ type Trigger1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type Trigger = Trigger1 /* sqlite3.c:14614:24 */ +type Trigger = Trigger1 /* sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr @@ -27826,7 +27826,7 @@ type TriggerPrg1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type TriggerPrg = TriggerPrg1 /* sqlite3.c:14615:27 */ +type TriggerPrg = TriggerPrg1 /* sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 @@ -27844,7 +27844,7 @@ type TriggerStep1 = struct { FpLast uintptr } /* sqlite3.c:578:9 */ -type TriggerStep = TriggerStep1 /* sqlite3.c:14616:28 */ +type TriggerStep = TriggerStep1 /* sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr @@ -27857,7 +27857,7 @@ type UnpackedRecord1 = struct { F__ccgo_pad1 [1]byte } /* sqlite3.c:578:9 */ -type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14617:31 */ +type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr @@ -27875,7 +27875,7 @@ type Upsert1 = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type Upsert = Upsert1 /* sqlite3.c:14618:23 */ +type Upsert = Upsert1 /* sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr @@ -27889,7 +27889,7 @@ type VTable1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type VTable = VTable1 /* sqlite3.c:14619:23 */ +type VTable = VTable1 /* sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr @@ -27898,7 +27898,7 @@ type VtabCtx1 = struct { F__ccgo_pad1 [4]byte } /* sqlite3.c:578:9 */ -type VtabCtx = VtabCtx1 /* sqlite3.c:14620:24 */ +type VtabCtx = VtabCtx1 /* sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr @@ -27908,9 +27908,9 @@ type Walker1 = struct { FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } -} /* sqlite3.c:14579:9 */ +} /* sqlite3.c:14583:9 */ -type Walker = Walker1 /* sqlite3.c:14621:23 */ +type Walker = Walker1 /* sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr @@ -27939,9 +27939,9 @@ type WhereInfo1 = struct { FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereInfo = WhereInfo1 /* sqlite3.c:14622:26 */ +type WhereInfo = WhereInfo1 /* sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr @@ -27975,7 +27975,7 @@ type Window1 = struct { F__ccgo_pad2 [3]byte } /* sqlite3.c:578:9 */ -type Window = Window1 /* sqlite3.c:14623:23 */ +type Window = Window1 /* sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 @@ -27983,14 +27983,14 @@ type With1 = struct { Fa [1]Cte } /* sqlite3.c:578:9 */ -type With = With1 /* sqlite3.c:14624:21 */ +type With = With1 /* sqlite3.c:14628:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. -type Bitmask = U64 /* sqlite3.c:14637:15 */ +type Bitmask = U64 /* sqlite3.c:14641:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". @@ -28001,7 +28001,7 @@ type Bitmask = U64 /* sqlite3.c:14637:15 */ // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. -type VList = int32 /* sqlite3.c:14660:13 */ +type VList = int32 /* sqlite3.c:14664:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque @@ -28028,7 +28028,7 @@ type VList = int32 /* sqlite3.c:14660:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = U32 /* sqlite3.c:14701:13 */ +type Pgno = U32 /* sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { @@ -28099,7 +28099,7 @@ type Pager1 = struct { } /* sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. -type Pager = Pager1 /* sqlite3.c:14706:22 */ +type Pager = Pager1 /* sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { @@ -28117,7 +28117,7 @@ type PgHdr2 = struct { } /* sqlite3.c:578:9 */ // Handle type for pages. -type DbPage = PgHdr2 /* sqlite3.c:14711:22 */ +type DbPage = PgHdr2 /* sqlite3.c:14715:22 */ // Functions to support testing and debugging. @@ -28188,7 +28188,7 @@ type Btree1 = struct { // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure -type Btree = Btree1 /* sqlite3.c:14954:22 */ +type Btree = Btree1 /* sqlite3.c:14958:22 */ type BtCursor1 = struct { FeState U8 FcurFlags U8 @@ -28213,7 +28213,7 @@ type BtCursor1 = struct { FapPage [19]uintptr } /* sqlite3.c:578:9 */ -type BtCursor = BtCursor1 /* sqlite3.c:14955:25 */ +type BtCursor = BtCursor1 /* sqlite3.c:14959:25 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr @@ -28252,7 +28252,7 @@ type BtShared1 = struct { F__ccgo_pad5 [4]byte } /* sqlite3.c:578:9 */ -type BtShared = BtShared1 /* sqlite3.c:14956:25 */ +type BtShared = BtShared1 /* sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 @@ -28263,9 +28263,9 @@ type BtreePayload1 = struct { FnData int32 FnZero int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:14957:9 */ +} /* sqlite3.c:14961:9 */ -type BtreePayload = BtreePayload1 /* sqlite3.c:14957:29 */ +type BtreePayload = BtreePayload1 /* sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** @@ -28369,11 +28369,11 @@ type Vdbe1 = struct { // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. -type Vdbe = Vdbe1 /* sqlite3.c:15359:21 */ +type Vdbe = Vdbe1 /* sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. -type Mem = sqlite3_value /* sqlite3.c:15365:30 */ +type Mem = sqlite3_value /* sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 @@ -28385,7 +28385,7 @@ type SubProgram1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type SubProgram = SubProgram1 /* sqlite3.c:15366:27 */ +type SubProgram = SubProgram1 /* sqlite3.c:15370:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded @@ -28413,7 +28413,7 @@ type p4union = struct { F__ccgo_pad2 [4]byte } /* sqlite3.c:578:9 */ -type VdbeOp = VdbeOp1 /* sqlite3.c:15412:23 */ +type VdbeOp = VdbeOp1 /* sqlite3.c:15416:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. @@ -28422,11 +28422,11 @@ type VdbeOpList1 = struct { Fp1 int8 Fp2 int8 Fp3 int8 -} /* sqlite3.c:15432:1 */ +} /* sqlite3.c:15436:1 */ -type VdbeOpList = VdbeOpList1 /* sqlite3.c:15438:27 */ +type VdbeOpList = VdbeOpList1 /* sqlite3.c:15442:27 */ -type RecordCompare = uintptr /* sqlite3.c:15853:13 */ +type RecordCompare = uintptr /* sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. @@ -28491,7 +28491,7 @@ type RecordCompare = uintptr /* sqlite3.c:15853:13 */ // This header file defines the interface that the sqlite page cache // subsystem. -type PgHdr = PgHdr2 /* sqlite3.c:15986:22 */ +type PgHdr = PgHdr2 /* sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr @@ -28509,10 +28509,10 @@ type PCache2 = struct { FpCache uintptr } /* sqlite3.c:578:9 */ -type PCache = PCache2 /* sqlite3.c:15987:23 */ +type PCache = PCache2 /* sqlite3.c:15991:23 */ // typedef for the authorization callback function. -type Sqlite3_xauth = uintptr /* sqlite3.c:16755:15 */ +type Sqlite3_xauth = uintptr /* sqlite3.c:16759:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() @@ -28588,7 +28588,7 @@ type sColMap = struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr -} /* sqlite3.c:14583:9 */ +} /* sqlite3.c:14587:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. @@ -28639,7 +28639,7 @@ type AggInfo_func = struct { // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). -type YnVar = I16 /* sqlite3.c:17975:13 */ +type YnVar = I16 /* sqlite3.c:17979:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: @@ -28733,7 +28733,7 @@ type IdList_item = struct { } /* sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. -type YDbMask = uint32 /* sqlite3.c:18754:24 */ +type YDbMask = uint32 /* sqlite3.c:18758:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. @@ -28746,7 +28746,7 @@ type InitData = struct { FnInitRow U32 FmxPage Pgno F__ccgo_pad1 [4]byte -} /* sqlite3.c:19115:3 */ +} /* sqlite3.c:19119:3 */ // Allowed values for mInitFlags @@ -28811,7 +28811,7 @@ type Sqlite3Config = struct { FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte -} /* sqlite3.c:19146:1 */ +} /* sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -28834,7 +28834,7 @@ type RefSrcList = struct { FpRef uintptr FnExclude I64 FaiExclude uintptr -} /* sqlite3.c:19246:5 */ +} /* sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -28856,7 +28856,7 @@ type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:19248:5 */ +} /* sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -28882,7 +28882,7 @@ type IdxExprTrans1 = struct { FiTabCol int32 FpWInfo uintptr Fdb uintptr -} /* sqlite3.c:19249:5 */ +} /* sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -28906,7 +28906,7 @@ type WindowRewrite1 = struct { FpSub uintptr FpTab uintptr FpSubSelect uintptr -} /* sqlite3.c:19252:5 */ +} /* sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -28932,7 +28932,7 @@ type WhereConst1 = struct { FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr -} /* sqlite3.c:19253:5 */ +} /* sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: @@ -28956,7 +28956,7 @@ type RenameCtx1 = struct { FiCol int32 FpTab uintptr FzOld uintptr -} /* sqlite3.c:19254:5 */ +} /* sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** @@ -29084,9 +29084,9 @@ var sqlite3azCompileOpt = [51]uintptr{ ts + 1029, ts + 1043, ts + 1056, -} /* sqlite3.c:20859:19 */ +} /* sqlite3.c:20868:19 */ -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21586:27: */ +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21595:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -29153,10 +29153,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21618:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21680:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21681:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21682:36 */ +} /* sqlite3.c:21627:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21689:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21690:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21691:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -29220,7 +29220,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21712:36 */ +} /* sqlite3.c:21721:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -29280,12 +29280,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21832:48 */ +} /* sqlite3.c:21841:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21903:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -29303,21 +29303,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21894:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21935:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21944:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21941:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21942:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21950:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21951:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21951:36 */ +var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* sqlite3.c:21960:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) /* sqlite3.c:21956:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) /* sqlite3.c:21965:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -29333,7 +29333,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) /* sqlite3.c:2195 // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21974:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21983:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -29341,7 +29341,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21975:27 */ +} /* sqlite3.c:21984:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -29349,7 +29349,7 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21983:27 */ +} /* sqlite3.c:21992:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1076, ts + 1080, @@ -29357,7 +29357,7 @@ var Xsqlite3StdType = [6]uintptr{ ts + 1089, ts + 1097, ts + 1102, -} /* sqlite3.c:21991:27 */ +} /* sqlite3.c:22000:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -29402,10 +29402,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:22065:23 */ +type Op = VdbeOp1 /* sqlite3.c:22074:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:22070:18 */ +type Bool = uint32 /* sqlite3.c:22079:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -29428,10 +29428,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:22073:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:22082:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -29443,7 +29443,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:22076:24 */ +type AuxData = AuxData1 /* sqlite3.c:22085:24 */ // Types of VDBE cursors @@ -29497,7 +29497,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:22094:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:22103:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -29562,7 +29562,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:22183:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:22192:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -29576,7 +29576,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22366:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22375:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -29588,13 +29588,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [6]byte FzName uintptr -} /* sqlite3.c:22371:9 */ +} /* sqlite3.c:22380:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22380:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -29605,7 +29605,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22371:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22388:9 */ +} /* sqlite3.c:22397:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -29613,7 +29613,7 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22397:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -29628,7 +29628,7 @@ type DblquoteStr = DblquoteStr1 /* sqlite3.c:22388:28 */ type ValueList1 = struct { FpCsr uintptr FpOut uintptr -} /* sqlite3.c:22516:9 */ +} /* sqlite3.c:22525:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the @@ -29640,20 +29640,20 @@ type ValueList1 = struct { // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. -type ValueList = ValueList1 /* sqlite3.c:22516:26 */ +type ValueList = ValueList1 /* sqlite3.c:22525:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22679:23 */ +type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:22688:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22683:9 */ +} /* sqlite3.c:22692:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22683:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22687:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22692:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22696:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -29668,7 +29668,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22693:19 */ +} /* sqlite3.c:22702:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -29678,7 +29678,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22725:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22734:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } @@ -29692,7 +29692,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22754:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { @@ -29700,14 +29700,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22745:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22756:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22765:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22770:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22779:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -29718,12 +29718,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22790:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22799:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22799) + return Xsqlite3MisuseError(tls, 22808) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -29741,7 +29741,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22815:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22824:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -29757,7 +29757,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22841:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -29767,7 +29767,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22832:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22844:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22853:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -29779,7 +29779,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22858:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22867:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -30180,14 +30180,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:23118:9 */ +} /* sqlite3.c:23127:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:23118:25 */ +type DateTime = DateTime1 /* sqlite3.c:23127:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -30214,7 +30214,7 @@ type DateTime = DateTime1 /* sqlite3.c:23118:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23162:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:23171:12: */ var ap Va_list _ = ap var cnt int32 @@ -30271,7 +30271,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23165:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:23174:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -30287,7 +30287,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23216:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23225:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -30361,7 +30361,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23252:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23261:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -30414,7 +30414,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23301:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -30423,7 +30423,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:23292:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23312:13: */ var Y int32 var M int32 var D int32 @@ -30479,7 +30479,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23303:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23353:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23362:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -30530,7 +30530,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23390:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23399:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -30545,7 +30545,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23415:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -30568,7 +30568,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23406: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23431:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23440:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30597,12 +30597,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23464:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23473:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23480:13: */ var Z int32 var A int32 var B int32 @@ -30647,7 +30647,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23471:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23509:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -30666,13 +30666,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23500:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23519:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23528:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23536:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -30702,7 +30702,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23527:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23567:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23576:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -30727,7 +30727,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:235 } // Assuming the input DateTime is UTC, move it to its localtime equivalent. -func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23617:12: */ +func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23626:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -30767,7 +30767,7 @@ func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* sqlite3.c:23 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min - (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec) + (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) @@ -30795,7 +30795,7 @@ var aXformType = [6]struct { {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1187 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1194 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1201 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, -} /* sqlite3.c:23681:3 */ +} /* sqlite3.c:23690:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -30819,7 +30819,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23714:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* sqlite3.c:23723:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -31145,7 +31145,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23989:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23998:12: */ var i int32 var n int32 var z uintptr @@ -31186,7 +31186,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24033:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24042:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -31202,7 +31202,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. -func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24051:13: */ +func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24060:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -31217,7 +31217,7 @@ func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24068:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24077:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -31266,7 +31266,7 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24115:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24124:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -31294,7 +31294,7 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24144:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24153:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -31346,7 +31346,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24195:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:24204:13: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -31490,7 +31490,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24302:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24311:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -31499,7 +31499,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24316:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24325:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -31508,7 +31508,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24330:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:24339:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -31517,7 +31517,7 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24390:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:24399:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -31530,7 +31530,7 @@ var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1333}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1342}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1355}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1373}} /* sqlite3.c:24391:18 */ + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1373}} /* sqlite3.c:24400:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -31582,7 +31582,7 @@ var aDateTimeFuncs = [9]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24503:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -31591,27 +31591,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:24494:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24500:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24509:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24504:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24513:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24508:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24517:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24511:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24520:20: */ if flags != 0 { return (*struct { @@ -31621,27 +31621,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24515:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24524:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24519:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24528:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24523:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24532:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24526:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24535:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -31654,7 +31654,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24539:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24548:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -31663,7 +31663,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24567:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24576:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -31671,7 +31671,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24580:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -31683,7 +31683,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24571: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24575:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24584:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -31692,23 +31692,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24580:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24589:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24583:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24592:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24586:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24595:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24589:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24598:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -31716,14 +31716,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24603:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24612:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24607:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24616:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -31731,7 +31731,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24625:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24634:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -31745,7 +31745,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:24642:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24651:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -31755,14 +31755,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24647:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24656:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24656:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24665:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -31770,7 +31770,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24667:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24676:21: */ // tag-20210611-1 return (*struct { @@ -31778,25 +31778,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24672:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24681:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24675:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24684:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24678:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24687:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24682:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24691:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -31813,13 +31813,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24693:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24702:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24696:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24705:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -31828,7 +31828,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24699:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24708:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -31853,7 +31853,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24717:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24726:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -31873,7 +31873,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24751:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -31883,7 +31883,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24742:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24763:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -31893,11 +31893,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24754:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24764:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24773:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24780:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -31919,7 +31919,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24771 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24804:13: */ if pVfs == uintptr(0) { // No-op @@ -31939,7 +31939,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24795:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24817:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24826:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -31962,7 +31962,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24845:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24854:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -32007,7 +32007,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24893:9 */ +} /* sqlite3.c:24902:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -32038,8 +32038,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24893:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24902:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24906:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -32049,7 +32049,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24897:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24919:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24928:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -32058,14 +32058,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24933:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24942:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24948:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -32167,7 +32167,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24939:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25148:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32187,13 +32187,13 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:25139:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25173:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:25182:13: */ libc.Xfree(tls, pPrior) } // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25197:12: */ return int32(libc.X_msize(tls, pPrior)) } @@ -32206,7 +32206,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:25188:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25211:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:25220:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32221,18 +32221,18 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25243:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:25252:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25250:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:25259:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25286:13: */ _ = NotUsed return } @@ -32241,7 +32241,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:25277:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25288:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:25297:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32256,7 +32256,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:25289:36 */ +} /* sqlite3.c:25298:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -32390,7 +32390,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27333:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -32424,7 +32424,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27324:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27379:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -32434,7 +32434,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27370:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -32447,7 +32447,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27386: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27404:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -32458,7 +32458,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27395:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27416:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -32467,7 +32467,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27407:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27427:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -32476,7 +32476,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27418:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27438:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -32491,7 +32491,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27429:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27453:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -32530,40 +32530,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27444:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27507:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27516:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27508:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27517:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27509:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27518:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27513:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27522:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27514:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27523:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27515:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27524:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27519:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27528:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27521:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27530:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -32576,11 +32576,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27522:38 */ +} /* sqlite3.c:27531:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27680:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27689:44: */ return Xsqlite3NoopMutex(tls) } @@ -63319,7 +63319,7 @@ type REGISTERWORDENUMPROCW = uintptr /* imm.h:186:15 */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28601:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28610:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -63332,22 +63332,22 @@ type Mem0Global = struct { FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:28623:19 */ +} /* sqlite3.c:28632:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28633:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28642:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28640:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28649:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28650:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28659:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -63363,7 +63363,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28673:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28682:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -63391,7 +63391,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:28698:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28707:17: */ if n < 0 { n = 0 } @@ -63408,7 +63408,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28698:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28715:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28724:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -63427,7 +63427,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28746:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -63450,12 +63450,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28737:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28758:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28767:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+24, 0) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28774:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -63463,7 +63463,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28765:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28784:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -63478,7 +63478,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28775:26: // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28786:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28795:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -63491,7 +63491,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28804:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -63502,7 +63502,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28795:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28815:13: */ var p uintptr var nFull int32 @@ -63549,7 +63549,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28806:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28864:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63578,7 +63578,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28855:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28889:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -63588,7 +63588,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28880:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28886:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28895:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -63596,27 +63596,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28897:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28906:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28908:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28917:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28912:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28921:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28919:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28928:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -63635,7 +63635,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28948:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28957:27: */ if p != 0 { return uint64((*struct { @@ -63646,7 +63646,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2894 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28966:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -63664,14 +63664,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28957:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28976:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28994:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -63697,7 +63697,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28985 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29031:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -63705,7 +63705,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:29022:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29030:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:29039:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -63766,7 +63766,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29089:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:29098:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -63776,7 +63776,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29096:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:29105:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -63784,7 +63784,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29116:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, n) @@ -63794,7 +63794,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:29107:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29119:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29128:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -63806,7 +63806,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29131:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29140:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -63837,7 +63837,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29163:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29172:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -63847,7 +63847,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:29170:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:29179:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -63885,7 +63885,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29226:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29235:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -63905,7 +63905,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:29242:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29251:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -63929,7 +63929,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29272:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:29281:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -63943,7 +63943,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29288:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:29297:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -63957,7 +63957,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:29301:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:29310:21: */ var zNew uintptr if z != 0 { @@ -63975,7 +63975,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29319:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:29328:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -63988,7 +63988,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29330:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:29339:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -64004,7 +64004,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29357:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -64025,7 +64025,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29348:21 // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29379:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+432, int32(0), 0) @@ -64041,7 +64041,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:29370:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29382:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29391:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -64060,7 +64060,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29403:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:29412:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -64089,7 +64089,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:29461:23 */ +type EtByte = uint8 /* sqlite3.c:29470:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -64100,18 +64100,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:29467:9 */ +} /* sqlite3.c:29476:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:29474:3 */ +type Et_info = et_info /* sqlite3.c:29483:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1474)) /* sqlite3.c:29487:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1507)) /* sqlite3.c:29488:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1474)) /* sqlite3.c:29496:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1507)) /* sqlite3.c:29497:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -64138,7 +64138,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:29489:22 */ +} /* sqlite3.c:29498:22 */ // Notes: // @@ -64149,7 +64149,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29526:21 */ +} /* sqlite3.c:29535:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -64164,7 +64164,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29549:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29558:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -64179,7 +64179,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29565:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29574:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -64191,21 +64191,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29575:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29584:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } 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:29579:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29588: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:29583:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29592:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -64219,7 +64219,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29583:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29597:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29606:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -64241,7 +64241,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29630:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29639:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -65730,7 +65730,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1551)) /* sqlite3.c:29893:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1551)) /* sqlite3.c:29902:29 */ // End of function @@ -65738,7 +65738,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1551)) /* sqlite3.c:29893:29 */ // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. -func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30346:21: */ +func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sqlite3.c:30355:21: */ var pParse uintptr var zText uintptr var zEnd uintptr @@ -65765,7 +65765,7 @@ func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* sq // If pExpr has a byte offset for the start of a token, record that as // as the error offset. -func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30367:21: */ +func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* sqlite3.c:30376:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } @@ -65780,7 +65780,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30382:20: */ +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:30391:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -65834,7 +65834,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlit } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30432:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:30441:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -65850,7 +65850,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30448:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30457:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) @@ -65860,7 +65860,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30460:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:30469:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -65872,14 +65872,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30477:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:30486:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30487:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30496:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -65893,7 +65893,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:3048 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30500:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30509:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -65905,7 +65905,7 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:305 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30514:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:30523:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) @@ -65923,10 +65923,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30532:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:30541:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30547:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -65938,7 +65938,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30538: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30559:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -65946,7 +65946,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30550:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30564:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -65954,7 +65954,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30555:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30569:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -65963,7 +65963,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30560:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30578:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -65985,7 +65985,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30569:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30593:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30602:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -65996,7 +65996,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30613:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -66014,7 +66014,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30604:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30619:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30628:21: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -66036,7 +66036,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30639:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30648:21: */ var ap Va_list _ = ap var z uintptr @@ -66048,7 +66048,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30652:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30661:17: */ bp := tls.Alloc(102) defer tls.Free(102) @@ -66068,7 +66068,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30676:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30685:17: */ var ap Va_list _ = ap var z uintptr @@ -66092,7 +66092,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30701:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30710:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -66107,7 +66107,7 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30716:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30725:17: */ var z uintptr var ap Va_list _ = ap @@ -66129,7 +66129,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30739:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30748:13: */ bp := tls.Alloc(242) defer tls.Free(242) @@ -66147,7 +66147,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30752:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30761:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -66159,7 +66159,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30793:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30802:17: */ var ap Va_list _ = ap ap = va @@ -66214,7 +66214,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31645:19 */ +} /* sqlite3.c:31654:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -66258,10 +66258,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31649:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31658:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31654:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31663:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -66340,16 +66340,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31745:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31754:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31746:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31755:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31753:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31762:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -66403,7 +66403,7 @@ type X_beginthreadex_proc_type = uintptr /* process.h:33:20 */ type X_tls_callback_type = uintptr /* process.h:61:16 */ // Thread procedure Win32 compatibility shim -func sqlite3ThreadProc(tls *libc.TLS, pArg uintptr) uint32 { /* sqlite3.c:31886:27: */ +func sqlite3ThreadProc(tls *libc.TLS, pArg uintptr) uint32 { /* sqlite3.c:31895:27: */ var p uintptr = pArg (*SQLiteThread)(unsafe.Pointer(p)).FpResult = (*struct { @@ -66415,7 +66415,7 @@ func sqlite3ThreadProc(tls *libc.TLS, pArg uintptr) uint32 { /* sqlite3.c:31886: } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31909:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31918:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -66453,7 +66453,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui // os_win.c // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:31947:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:31956:20: */ var rc DWORD var bRc WINBOOL _ = bRc @@ -66537,7 +66537,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:32092:28 */ +} /* sqlite3.c:32101:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -66564,7 +66564,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32195:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -66591,7 +66591,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:32186:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32222:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:32231:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -66916,7 +66916,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32417:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:32426:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -66950,7 +66950,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32455:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:32464:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -66982,7 +66982,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32509:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:32518:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -67003,7 +67003,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32530:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:32539:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -67117,7 +67117,7 @@ type Double_t = float64 /* math.h:363:16 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32631:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -67129,7 +67129,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32622:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32644:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -67149,7 +67149,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32635:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32666:20: */ if z == uintptr(0) { return 0 } @@ -67161,7 +67161,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32657:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32669:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32678:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { @@ -67176,7 +67176,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32685:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32694:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -67186,7 +67186,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32695:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32704:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -67198,7 +67198,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:326 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32718:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 @@ -67209,7 +67209,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32709:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32720:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32729:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -67229,7 +67229,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:327 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32740:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32749:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -67256,7 +67256,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32766:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32775:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -67287,7 +67287,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32797:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32806:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -67312,7 +67312,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32831:21: */ var quote int8 var i int32 var j int32 @@ -67344,7 +67344,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32822:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32853:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -67364,7 +67364,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32844:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32871:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -67382,7 +67382,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32862:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32885:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -67397,7 +67397,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32876 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32894:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32903:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -67409,7 +67409,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:32902:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32911:20: */ var a uintptr var b uintptr var c int32 @@ -67435,7 +67435,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:32921:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32930:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -67459,7 +67459,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32946:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -67475,7 +67475,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32937:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32953:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32962:24: */ var r float64 = 1.0 var i int32 @@ -67511,7 +67511,7 @@ var x = [9]float64{ 1.0e+064, 1.0e+128, 1.0e+256, -} /* sqlite3.c:32955:32 */ +} /* sqlite3.c:32964:32 */ // The string z[] is an text representation of a real number. // Convert this string to a double and write it into *pResult. @@ -67540,7 +67540,7 @@ var x = [9]float64{ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33018:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:33027:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -67920,7 +67920,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33217:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:33226:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -67961,7 +67961,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3321 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33250:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:33259:12: */ var c int32 = 0 var i int32 // 012345678901234567 @@ -67990,7 +67990,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33283:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:33292:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -68112,7 +68112,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33386:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:33395:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -68145,7 +68145,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33416:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:33425:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -68207,7 +68207,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33484:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -68220,7 +68220,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:33475:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33487:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:33496:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -68263,7 +68263,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33528:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33537:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -68309,7 +68309,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33552:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33561:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -68332,7 +68332,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:335 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33582:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33591:19: */ var a U32 var b U32 var s U32 @@ -68485,7 +68485,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33743:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33752:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -68553,7 +68553,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33874:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -68561,7 +68561,7 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33865:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33884:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -68571,7 +68571,7 @@ func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33875:20: */ return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33902:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -68582,7 +68582,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33893:21: // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33926:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -68592,7 +68592,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33917:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33935:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33944:21: */ var zBlob uintptr var i int32 @@ -68610,7 +68610,7 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33965:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -68631,7 +68631,7 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33956:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33986:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1525) @@ -68650,7 +68650,7 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33977 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33994:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:34003:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { @@ -68667,21 +68667,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34014:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34023: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:34034:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34043: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:34049:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:34058:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34084:20: */ if x >= 0 { return x } @@ -68695,7 +68695,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:34075:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34118:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:34127:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -68726,11 +68726,11 @@ var x1 = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:34119:30 */ +} /* sqlite3.c:34128:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34154:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -68748,11 +68748,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:34145:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34146:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:34155:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34168:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34177:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -68773,7 +68773,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:34 } // Convert a LogEst into an integer. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34191:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -68825,7 +68825,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:34182:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34228:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:34237:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -68864,7 +68864,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34266:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:34275:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -68883,7 +68883,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34282:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:34291:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -68922,7 +68922,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34328:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -68933,7 +68933,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:34319:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34340:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -68950,7 +68950,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:34331:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34360:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -68965,7 +68965,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:34351:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34368:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:34377:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -69002,7 +69002,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34402:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:34411:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -69046,7 +69046,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:344 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34443:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:34452:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -69075,11 +69075,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:34451:19 */ +var nullElement = HashElem{} /* sqlite3.c:34460:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34478:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:34487:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -69108,7 +69108,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34513:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:34522:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -69126,7 +69126,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34533:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34542:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -69175,7 +69175,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34579:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34588:27: */ return azName[i] } @@ -69365,7 +69365,7 @@ var azName = [185]uintptr{ ts + 3179, ts + 3184, ts + 3192, -} /* sqlite3.c:34580:20 */ +} /* sqlite3.c:34589:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -69499,7 +69499,7 @@ type winShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:43145:9 */ +} /* sqlite3.c:43154:9 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -69625,7 +69625,7 @@ type winShm = struct { // Some Microsoft compilers lack this definition. // Forward references to structures used for WAL -type WinShm = winShm /* sqlite3.c:43145:23 */ // A connection to shared-memory +type WinShm = winShm /* sqlite3.c:43154:23 */ // A connection to shared-memory type winShmNode = struct { Fmutex uintptr FzFilename uintptr @@ -69640,10 +69640,10 @@ type winShmNode = struct { FnRef int32 FpFirst uintptr FpNext uintptr -} /* sqlite3.c:43145:9 */ +} /* sqlite3.c:43154:9 */ // A connection to shared-memory -type WinShmNode = winShmNode /* sqlite3.c:43146:27 */ // A region of shared-memory +type WinShmNode = winShmNode /* sqlite3.c:43155:27 */ // A region of shared-memory // WinCE lacks native support for file locking so we have to fake it // with some code of our own. @@ -69669,7 +69669,7 @@ type winFile = struct { FpMapRegion uintptr FmmapSize Sqlite3_int64 FmmapSizeMax Sqlite3_int64 -} /* sqlite3.c:43145:9 */ +} /* sqlite3.c:43154:9 */ // A region of shared-memory @@ -69678,7 +69678,7 @@ type winFile = struct { // The winFile structure is a subclass of sqlite3_file* specific to the win32 // portability layer. -type WinFile = winFile /* sqlite3.c:43166:24 */ +type WinFile = winFile /* sqlite3.c:43175:24 */ // The winVfsAppData structure is used for the pAppData member for all of the // Win32 VFS variants. @@ -69687,11 +69687,11 @@ type winVfsAppData = struct { FpAppData uintptr FbNoLock WINBOOL F__ccgo_pad1 [4]byte -} /* sqlite3.c:43200:9 */ +} /* sqlite3.c:43209:9 */ // The winVfsAppData structure is used for the pAppData member for all of the // Win32 VFS variants. -type WinVfsAppData = winVfsAppData /* sqlite3.c:43200:30 */ +type WinVfsAppData = winVfsAppData /* sqlite3.c:43209:30 */ // Allowed values for winFile.ctrlFlags @@ -69710,7 +69710,7 @@ type WinVfsAppData = winVfsAppData /* sqlite3.c:43200:30 */ // // In order to facilitate testing on a WinNT system, the test fixture // can manually set this value to 1 to emulate Win98 behavior. -var sqlite3_os_type LONG = 0 /* sqlite3.c:43388:35 */ +var sqlite3_os_type LONG = 0 /* sqlite3.c:43397:35 */ // This function is not available on Windows CE or WinRT. @@ -69722,7 +69722,7 @@ type win_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:43409:8 */ +} /* sqlite3.c:43418:8 */ // This function is not available on Windows CE or WinRT. @@ -69895,7 +69895,7 @@ var aSyscall = [80]win_syscall{ {FzName: ts + 4407}, {FzName: ts + 4428, FpCurrent: 0}, -} /* sqlite3.c:43413:3 */ +} /* sqlite3.c:43422:3 */ // End of the overrideable system calls @@ -69903,7 +69903,7 @@ var aSyscall = [80]win_syscall{ // "win32" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func winSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:44070:12: */ +func winSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:44079:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -69940,7 +69940,7 @@ func winSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc S // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func winGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:44113:28: */ +func winGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:44122:28: */ var i uint32 _ = pNotUsed @@ -69956,7 +69956,7 @@ func winGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_sy // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func winNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:44132:19: */ +func winNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:44141:19: */ var i int32 = -1 _ = p @@ -69978,7 +69978,7 @@ func winNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sql // This function outputs the specified (ANSI) string to the Win32 debugger // (if available). -func Xsqlite3_win32_write_debug(tls *libc.TLS, zBuf uintptr, nBuf int32) { /* sqlite3.c:44240:17: */ +func Xsqlite3_win32_write_debug(tls *libc.TLS, zBuf uintptr, nBuf int32) { /* sqlite3.c:44249:17: */ bp := tls.Alloc(4092) defer tls.Free(4092) @@ -70006,11 +70006,11 @@ func Xsqlite3_win32_write_debug(tls *libc.TLS, zBuf uintptr, nBuf int32) { /* sq // The following routine suspends the current thread for at least ms // milliseconds. This is equivalent to the Win32 Sleep() interface. -func Xsqlite3_win32_sleep(tls *libc.TLS, milliseconds DWORD) { /* sqlite3.c:44286:17: */ +func Xsqlite3_win32_sleep(tls *libc.TLS, milliseconds DWORD) { /* sqlite3.c:44295:17: */ (*(*func(*libc.TLS, DWORD))(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 55*24 + 8)))(tls, milliseconds) } -func Xsqlite3Win32Wait(tls *libc.TLS, hObject HANDLE) DWORD { /* sqlite3.c:44301:22: */ +func Xsqlite3Win32Wait(tls *libc.TLS, hObject HANDLE) DWORD { /* sqlite3.c:44310:22: */ var rc DWORD for libc.AssignUint32(&rc, (*(*func(*libc.TLS, HANDLE, DWORD, WINBOOL) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 64*24 + 8)))(tls, hObject, INFINITE, TRUE)) == DWORD(0x000000C0) { @@ -70030,7 +70030,7 @@ func Xsqlite3Win32Wait(tls *libc.TLS, hObject HANDLE) DWORD { /* sqlite3.c:44301 // This function determines if the machine is running a version of Windows // based on the NT kernel. -func Xsqlite3_win32_is_nt(tls *libc.TLS) int32 { /* sqlite3.c:44335:16: */ +func Xsqlite3_win32_is_nt(tls *libc.TLS) int32 { /* sqlite3.c:44344:16: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -70053,7 +70053,7 @@ func Xsqlite3_win32_is_nt(tls *libc.TLS) int32 { /* sqlite3.c:44335:16: */ // Convert a UTF-8 string to Microsoft Unicode. // // Space to hold the returned string is obtained from sqlite3_malloc(). -func winUtf8ToUnicode(tls *libc.TLS, zText uintptr) LPWSTR { /* sqlite3.c:44580:15: */ +func winUtf8ToUnicode(tls *libc.TLS, zText uintptr) LPWSTR { /* sqlite3.c:44589:15: */ var nChar int32 var zWideText LPWSTR @@ -70077,7 +70077,7 @@ func winUtf8ToUnicode(tls *libc.TLS, zText uintptr) LPWSTR { /* sqlite3.c:44580: // Convert a Microsoft Unicode string to UTF-8. // // Space to hold the returned string is obtained from sqlite3_malloc(). -func winUnicodeToUtf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { /* sqlite3.c:44606:13: */ +func winUnicodeToUtf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { /* sqlite3.c:44615:13: */ var nByte int32 var zText uintptr @@ -70102,7 +70102,7 @@ func winUnicodeToUtf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { /* sqlite3.c:4 // code page. // // Space to hold the returned string is obtained from sqlite3_malloc(). -func winMbcsToUnicode(tls *libc.TLS, zText uintptr, useAnsi int32) LPWSTR { /* sqlite3.c:44633:15: */ +func winMbcsToUnicode(tls *libc.TLS, zText uintptr, useAnsi int32) LPWSTR { /* sqlite3.c:44642:15: */ var nByte int32 var zMbcsText LPWSTR var codepage int32 @@ -70134,7 +70134,7 @@ func winMbcsToUnicode(tls *libc.TLS, zText uintptr, useAnsi int32) LPWSTR { /* s // using the ANSI or OEM code page. // // Space to hold the returned string is obtained from sqlite3_malloc(). -func winUnicodeToMbcs(tls *libc.TLS, zWideText LPCWSTR, useAnsi int32) uintptr { /* sqlite3.c:44662:13: */ +func winUnicodeToMbcs(tls *libc.TLS, zWideText LPCWSTR, useAnsi int32) uintptr { /* sqlite3.c:44671:13: */ var nByte int32 var zText uintptr var codepage int32 @@ -70164,7 +70164,7 @@ func winUnicodeToMbcs(tls *libc.TLS, zWideText LPCWSTR, useAnsi int32) uintptr { // Convert a multi-byte character string to UTF-8. // // Space to hold the returned string is obtained from sqlite3_malloc(). -func winMbcsToUtf8(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44689:13: */ +func winMbcsToUtf8(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44698:13: */ var zTextUtf8 uintptr var zTmpWide LPWSTR @@ -70180,7 +70180,7 @@ func winMbcsToUtf8(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sql // Convert a UTF-8 string to a multi-byte character string. // // Space to hold the returned string is obtained from sqlite3_malloc(). -func winUtf8ToMbcs(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44707:13: */ +func winUtf8ToMbcs(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44716:13: */ var zTextMbcs uintptr var zTmpWide LPWSTR @@ -70194,7 +70194,7 @@ func winUtf8ToMbcs(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sql } // This is a public wrapper for the winUtf8ToUnicode() function. -func Xsqlite3_win32_utf8_to_unicode(tls *libc.TLS, zText uintptr) LPWSTR { /* sqlite3.c:44723:19: */ +func Xsqlite3_win32_utf8_to_unicode(tls *libc.TLS, zText uintptr) LPWSTR { /* sqlite3.c:44732:19: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -70202,7 +70202,7 @@ func Xsqlite3_win32_utf8_to_unicode(tls *libc.TLS, zText uintptr) LPWSTR { /* sq } // This is a public wrapper for the winUnicodeToUtf8() function. -func Xsqlite3_win32_unicode_to_utf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { /* sqlite3.c:44739:17: */ +func Xsqlite3_win32_unicode_to_utf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { /* sqlite3.c:44748:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -70210,7 +70210,7 @@ func Xsqlite3_win32_unicode_to_utf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { } // This is a public wrapper for the winMbcsToUtf8() function. -func Xsqlite3_win32_mbcs_to_utf8(tls *libc.TLS, zText uintptr) uintptr { /* sqlite3.c:44755:17: */ +func Xsqlite3_win32_mbcs_to_utf8(tls *libc.TLS, zText uintptr) uintptr { /* sqlite3.c:44764:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -70218,7 +70218,7 @@ func Xsqlite3_win32_mbcs_to_utf8(tls *libc.TLS, zText uintptr) uintptr { /* sqli } // This is a public wrapper for the winMbcsToUtf8() function. -func Xsqlite3_win32_mbcs_to_utf8_v2(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44771:17: */ +func Xsqlite3_win32_mbcs_to_utf8_v2(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44780:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -70226,7 +70226,7 @@ func Xsqlite3_win32_mbcs_to_utf8_v2(tls *libc.TLS, zText uintptr, useAnsi int32) } // This is a public wrapper for the winUtf8ToMbcs() function. -func Xsqlite3_win32_utf8_to_mbcs(tls *libc.TLS, zText uintptr) uintptr { /* sqlite3.c:44787:17: */ +func Xsqlite3_win32_utf8_to_mbcs(tls *libc.TLS, zText uintptr) uintptr { /* sqlite3.c:44796:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -70234,7 +70234,7 @@ func Xsqlite3_win32_utf8_to_mbcs(tls *libc.TLS, zText uintptr) uintptr { /* sqli } // This is a public wrapper for the winUtf8ToMbcs() function. -func Xsqlite3_win32_utf8_to_mbcs_v2(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44803:17: */ +func Xsqlite3_win32_utf8_to_mbcs_v2(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* sqlite3.c:44812:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -70243,7 +70243,7 @@ func Xsqlite3_win32_utf8_to_mbcs_v2(tls *libc.TLS, zText uintptr, useAnsi int32) // This function is the same as sqlite3_win32_set_directory (below); however, // it accepts a UTF-8 string. -func Xsqlite3_win32_set_directory8(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* sqlite3.c:44820:16: */ +func Xsqlite3_win32_set_directory8(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* sqlite3.c:44829:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -70275,7 +70275,7 @@ func Xsqlite3_win32_set_directory8(tls *libc.TLS, type1 uint32, zValue uintptr) // This function is the same as sqlite3_win32_set_directory (below); however, // it accepts a UTF-16 string. -func Xsqlite3_win32_set_directory16(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* sqlite3.c:44857:16: */ +func Xsqlite3_win32_set_directory16(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* sqlite3.c:44866:16: */ var rc int32 var zUtf8 uintptr = uintptr(0) if zValue != 0 { @@ -70296,14 +70296,14 @@ func Xsqlite3_win32_set_directory16(tls *libc.TLS, type1 uint32, zValue uintptr) // data directory or 2 in order to set the temporary directory. The zValue // argument is the name of the directory to use. The return value will be // SQLITE_OK if successful. -func Xsqlite3_win32_set_directory(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* sqlite3.c:44879:16: */ +func Xsqlite3_win32_set_directory(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* sqlite3.c:44888:16: */ return Xsqlite3_win32_set_directory16(tls, type1, zValue) } // The return value of winGetLastErrorMsg // is zero if the error message fits in the buffer, or non-zero // otherwise (if the message was truncated). -func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:44891:12: */ +func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:44900:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -70372,7 +70372,7 @@ func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr // will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN). // The two subsequent arguments should be the name of the OS function that // failed and the associated file-system path, if any. -func winLogErrorAtLine(tls *libc.TLS, errcode int32, lastErrno DWORD, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:44982:12: */ +func winLogErrorAtLine(tls *libc.TLS, errcode int32, lastErrno DWORD, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:44991:12: */ bp := tls.Alloc(540) defer tls.Free(540) @@ -70400,8 +70400,8 @@ func winLogErrorAtLine(tls *libc.TLS, errcode int32, lastErrno DWORD, zFunc uint // will be retried following a locking error - probably caused by // antivirus software. Also the initial delay before the first retry. // The delay increases linearly with each retry. -var winIoerrRetry int32 = SQLITE_WIN32_IOERR_RETRY /* sqlite3.c:45018:12 */ -var winIoerrRetryDelay int32 = SQLITE_WIN32_IOERR_RETRY_DELAY /* sqlite3.c:45019:12 */ +var winIoerrRetry int32 = SQLITE_WIN32_IOERR_RETRY /* sqlite3.c:45027:12 */ +var winIoerrRetryDelay int32 = SQLITE_WIN32_IOERR_RETRY_DELAY /* sqlite3.c:45028:12 */ // The "winIoerrCanRetry1" macro is used to determine if a particular I/O // error code obtained via GetLastError() is eligible to be retried. It @@ -70421,7 +70421,7 @@ var winIoerrRetryDelay int32 = SQLITE_WIN32_IOERR_RETRY_DELAY /* sqlite3.c:45019 // If a ReadFile() or WriteFile() error occurs, invoke this routine // to see if it should be retried. Return TRUE to retry. Return FALSE // to give up with an error. -func winRetryIoerr(tls *libc.TLS, pnRetry uintptr, pError uintptr) int32 { /* sqlite3.c:45052:12: */ +func winRetryIoerr(tls *libc.TLS, pnRetry uintptr, pError uintptr) int32 { /* sqlite3.c:45061:12: */ var e DWORD = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) if *(*int32)(unsafe.Pointer(pnRetry)) >= winIoerrRetry { if pError != 0 { @@ -70441,7 +70441,7 @@ func winRetryIoerr(tls *libc.TLS, pnRetry uintptr, pError uintptr) int32 { /* sq } // Log a I/O error retry episode. -func winLogIoerr(tls *libc.TLS, nRetry int32, lineno int32) { /* sqlite3.c:45081:13: */ +func winLogIoerr(tls *libc.TLS, nRetry int32, lineno int32) { /* sqlite3.c:45090:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -70456,7 +70456,7 @@ func winLogIoerr(tls *libc.TLS, nRetry int32, lineno int32) { /* sqlite3.c:45081 // corresponding section in "date.c" cannot use it. // Lock a file region. -func winLockFile(tls *libc.TLS, phFile LPHANDLE, flags DWORD, offsetLow DWORD, offsetHigh DWORD, numBytesLow DWORD, numBytesHigh DWORD) WINBOOL { /* sqlite3.c:45411:13: */ +func winLockFile(tls *libc.TLS, phFile LPHANDLE, flags DWORD, offsetLow DWORD, offsetHigh DWORD, numBytesLow DWORD, numBytesHigh DWORD) WINBOOL { /* sqlite3.c:45420:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -70475,7 +70475,7 @@ func winLockFile(tls *libc.TLS, phFile LPHANDLE, flags DWORD, offsetLow DWORD, o } // Unlock a file region. -func winUnlockFile(tls *libc.TLS, phFile LPHANDLE, offsetLow DWORD, offsetHigh DWORD, numBytesLow DWORD, numBytesHigh DWORD) WINBOOL { /* sqlite3.c:45443:13: */ +func winUnlockFile(tls *libc.TLS, phFile LPHANDLE, offsetLow DWORD, offsetHigh DWORD, numBytesLow DWORD, numBytesHigh DWORD) WINBOOL { /* sqlite3.c:45452:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -70504,7 +70504,7 @@ func winUnlockFile(tls *libc.TLS, phFile LPHANDLE, offsetLow DWORD, offsetHigh D // Move the current position of the file handle passed as the first // argument to offset iOffset within the file. If successful, return 0. // Otherwise, set pFile->lastErrno and return non-zero. -func winSeekFile(tls *libc.TLS, pFile uintptr, iOffset Sqlite3_int64) int32 { /* sqlite3.c:45488:12: */ +func winSeekFile(tls *libc.TLS, pFile uintptr, iOffset Sqlite3_int64) int32 { /* sqlite3.c:45497:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -70528,7 +70528,7 @@ func winSeekFile(tls *libc.TLS, pFile uintptr, iOffset Sqlite3_int64) int32 { /* if dwRet == libc.Uint32(libc.Uint32FromInt32(-1)) && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno - winLogErrorAtLine(tls, SQLITE_IOERR|int32(22)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4548, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45512) + winLogErrorAtLine(tls, SQLITE_IOERR|int32(22)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4548, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45521) return 1 } @@ -70544,7 +70544,7 @@ func winSeekFile(tls *libc.TLS, pFile uintptr, iOffset Sqlite3_int64) int32 { /* // the close fails, we pause for 100 milliseconds and try again. As // many as MX_CLOSE_ATTEMPT attempts to close the handle are made before // giving up and returning an error. -func winClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:45561:12: */ +func winClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:45570:12: */ var rc int32 var cnt int32 = 0 var pFile uintptr = id @@ -70562,13 +70562,13 @@ func winClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:45561:12: */ if rc != 0 { return SQLITE_OK } - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4560, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45608) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4560, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45617) } // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:45617:12: */ +func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:45626:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -70605,9 +70605,9 @@ func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_ } (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(1)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4569, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45676) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(1)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4569, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45685) } - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)), 45679) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)), 45688) if *(*DWORD)(unsafe.Pointer(bp + 32)) < DWORD(amt) { // Unread parts of the buffer must be zero-filled libc.Xmemset(tls, pBuf+uintptr(*(*DWORD)(unsafe.Pointer(bp + 32))), 0, uint64(DWORD(amt)-*(*DWORD)(unsafe.Pointer(bp + 32)))) @@ -70620,7 +70620,7 @@ func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_ // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:45697:12: */ +func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:45706:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -70670,19 +70670,19 @@ func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 if (*WinFile)(unsafe.Pointer(pFile)).FlastErrno == DWORD(39) || (*WinFile)(unsafe.Pointer(pFile)).FlastErrno == DWORD(112) { - return winLogErrorAtLine(tls, SQLITE_FULL, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4577, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45788) + return winLogErrorAtLine(tls, SQLITE_FULL, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4577, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45797) } - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(3)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4587, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45793) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(3)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4587, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45802) } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)), 45796) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)), 45805) } return SQLITE_OK } // Truncate an open file to a specified size -func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { /* sqlite3.c:45806:12: */ +func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { /* sqlite3.c:45815:12: */ var pFile uintptr = id // File handle object var rc int32 = SQLITE_OK // Return code for this function var lastErrno DWORD @@ -70724,10 +70724,10 @@ func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { /* sqli // SetEndOfFile() returns non-zero when successful, or zero when it fails. if winSeekFile(tls, pFile, nByte) != 0 { - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4597, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45859) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4597, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45868) } else if 0 == (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 53*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(1224) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4610, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45864) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4610, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45873) } if rc == SQLITE_OK && oldMmapSize > int64(0) { @@ -70742,7 +70742,7 @@ func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { /* sqli } // Make sure all writes to a particular file are committed to disk. -func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:45895:12: */ +func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:45904:12: */ // Used only when SQLITE_NO_SYNC is not defined. var rc WINBOOL // Used when SQLITE_NO_SYNC is not defined and by the assert() and/or @@ -70764,7 +70764,7 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:45895: } else { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4623, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45956) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4623, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45965) } } rc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 13*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) @@ -70775,13 +70775,13 @@ func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:45895: } else { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4632, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45971) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4632, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45980) } return int32(0) } // Determine the current size of a file in bytes -func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:45980:12: */ +func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:45989:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -70799,7 +70799,7 @@ func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c: if lowerBits == 0xffffffff && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(7)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4641, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46012) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(7)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4641, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46021) } } @@ -70821,7 +70821,7 @@ func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c: // Acquire a reader lock. // Different API routines are called depending on whether or not this // is Win9x or WinNT. -func winGetReadLock(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:46058:12: */ +func winGetReadLock(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:46067:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -70847,7 +70847,7 @@ func winGetReadLock(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:46058:12: } // Undo a readlock -func winUnlockReadLock(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:46093:12: */ +func winUnlockReadLock(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:46102:12: */ var res int32 var lastErrno DWORD @@ -70858,7 +70858,7 @@ func winUnlockReadLock(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:46093: } if res == 0 && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(158) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno - winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4653, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46107) + winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4653, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46116) } return res @@ -70888,7 +70888,7 @@ func winUnlockReadLock(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:46093: // erases all locks at once and returns us immediately to locking level 0. // It is not possible to lower the locking level one step at a time. You // must go straight to locking level 0. -func winLock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46140:12: */ +func winLock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46149:12: */ var rc int32 = SQLITE_OK // Return code from subroutines var res int32 = 1 // Result of a Windows lock call var newLocktype int32 // Set pFile->locktype to this value before exiting @@ -71008,7 +71008,7 @@ func winLock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:461 // This routine checks if there is a RESERVED lock held on the specified // file by this or any other process. If such a lock is held, return // non-zero, otherwise zero. -func winCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:46283:12: */ +func winCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:46292:12: */ var res int32 var pFile uintptr = id @@ -71037,7 +71037,7 @@ func winCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* // It is not possible for this routine to fail if the second argument // is NO_LOCK. If the second argument is SHARED_LOCK then this routine // might return SQLITE_IOERR; -func winUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46319:12: */ +func winUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46328:12: */ var type1 int32 var pFile uintptr = id var rc int32 = SQLITE_OK @@ -71048,7 +71048,7 @@ func winUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:4 if locktype == SHARED_LOCK && !(winGetReadLock(tls, pFile) != 0) { // This should never happen. We should always be able to // reacquire the read lock - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4671, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46333) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4671, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46342) } } if type1 >= RESERVED_LOCK { @@ -71082,19 +71082,19 @@ func winUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:4 // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func winNolockLock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46369:12: */ +func winNolockLock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46378:12: */ _ = id _ = locktype return SQLITE_OK } -func winNolockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:46375:12: */ +func winNolockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:46384:12: */ _ = id _ = pResOut return SQLITE_OK } -func winNolockUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46381:12: */ +func winNolockUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlite3.c:46390:12: */ _ = id _ = locktype return SQLITE_OK @@ -71108,7 +71108,7 @@ func winNolockUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* sqlit // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func winModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:46396:13: */ +func winModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:46405:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*WinFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -71119,7 +71119,7 @@ func winModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sql } // Control and query of the open file handle. -func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:46415:12: */ +func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:46424:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -71265,13 +71265,13 @@ func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { / // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func winSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:46550:12: */ +func winSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:46559:12: */ _ = id return SQLITE_DEFAULT_SECTOR_SIZE } // Return a vector of device characteristics. -func winDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:46558:12: */ +func winDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:46567:12: */ var p uintptr = id return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN | func() int32 { if int32((*WinFile)(unsafe.Pointer(p)).FctrlFlags)&WINFILE_PSOW != 0 { @@ -71285,7 +71285,7 @@ func winDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:46 // on allocation size granularity boundaries. // During sqlite3_os_init() we do a GetSystemInfo() // to get the granularity size. -var winSysInfo SYSTEM_INFO /* sqlite3.c:46570:20: */ +var winSysInfo SYSTEM_INFO /* sqlite3.c:46579:20: */ // Helper functions to obtain and relinquish the global mutex. The // global mutex is used to protect the winLockInfo objects used by @@ -71298,13 +71298,13 @@ var winSysInfo SYSTEM_INFO /* sqlite3.c:46570:20: */ // winShmEnterMutex() // assert( winShmMutexHeld() ); // winShmLeaveMutex() -var winBigLock uintptr = uintptr(0) /* sqlite3.c:46587:22 */ +var winBigLock uintptr = uintptr(0) /* sqlite3.c:46596:22 */ -func winShmEnterMutex(tls *libc.TLS) { /* sqlite3.c:46588:13: */ +func winShmEnterMutex(tls *libc.TLS) { /* sqlite3.c:46597:13: */ Xsqlite3_mutex_enter(tls, winBigLock) } -func winShmLeaveMutex(tls *libc.TLS) { /* sqlite3.c:46591:13: */ +func winShmLeaveMutex(tls *libc.TLS) { /* sqlite3.c:46600:13: */ Xsqlite3_mutex_leave(tls, winBigLock) } @@ -71332,17 +71332,17 @@ func winShmLeaveMutex(tls *libc.TLS) { /* sqlite3.c:46591:13: */ type ShmRegion = struct { FhMap HANDLE FpMap uintptr -} /* sqlite3.c:43145:9 */ +} /* sqlite3.c:43154:9 */ // A global array of all winShmNode objects. // // The winShmMutexHeld() must be true while reading or writing this list. -var winShmNodeList uintptr = uintptr(0) /* sqlite3.c:46652:19 */ +var winShmNodeList uintptr = uintptr(0) /* sqlite3.c:46661:19 */ // Constants used for locking // Apply advisory locks for all n bytes beginning at ofst. -func winShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, nByte int32) int32 { /* sqlite3.c:46690:12: */ +func winShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, nByte int32) int32 { /* sqlite3.c:46699:12: */ var rc int32 = 0 // Result code form Lock/UnlockFileEx() // Access to the winShmNode object is serialized by the caller @@ -71373,7 +71373,7 @@ func winShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func winShmPurge(tls *libc.TLS, pVfs uintptr, deleteFlag int32) { /* sqlite3.c:46738:13: */ +func winShmPurge(tls *libc.TLS, pVfs uintptr, deleteFlag int32) { /* sqlite3.c:46747:13: */ var pp uintptr var p uintptr @@ -71421,7 +71421,7 @@ func winShmPurge(tls *libc.TLS, pVfs uintptr, deleteFlag int32) { /* sqlite3.c:4 // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { /* sqlite3.c:46789:12: */ +func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { /* sqlite3.c:46798:12: */ var rc int32 = winShmSystemLock(tls, pShmNode, WINSHM_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK { @@ -71431,7 +71431,7 @@ func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { /* sqlite3.c:4 return SQLITE_READONLY | int32(5)<<8 } else if winTruncate(tls, pShmNode+16, int64(0)) != 0 { winShmSystemLock(tls, pShmNode, WINSHM_UNLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4681, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 46799) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4681, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 46808) } } @@ -71447,7 +71447,7 @@ func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { /* sqlite3.c:4 // When opening a new shared-memory file, if no other instances of that // file are currently open, in this process or in other processes, then // the file must be truncated to zero length or have its header cleared. -func winOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:46818:12: */ +func winOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:46827:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -71551,7 +71551,7 @@ __12: if !(rc != SQLITE_OK) { goto __13 } - rc = winLogErrorAtLine(tls, rc, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4721, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 46881) + rc = winLogErrorAtLine(tls, rc, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4721, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 46890) goto shm_open_err __13: ; @@ -71602,7 +71602,7 @@ shm_open_err: // Close a connection to shared-memory. Delete the underlying // storage if deleteFlag is true. -func winShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:46927:12: */ +func winShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:46936:12: */ var pDbFd uintptr // Database holding shared-memory var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file @@ -71641,7 +71641,7 @@ func winShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3 } // Change the lock state for a shared-memory segment. -func winShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:46968:12: */ +func winShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:46977:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*WinFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pX uintptr // For looping over all siblings @@ -71732,7 +71732,7 @@ func winShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func winShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:47077:13: */ +func winShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:47086:13: */ _ = fd // compiler-defined memory barrier winShmEnterMutex(tls) // Also mutex, for redundancy @@ -71756,7 +71756,7 @@ func winShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:47077:13: */ // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func winShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:47105:12: */ +func winShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:47114:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -71828,7 +71828,7 @@ __3: if !(rc != SQLITE_OK) { goto __6 } - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4732, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47148) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4732, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47157) goto shmpage_out __6: ; @@ -71851,7 +71851,7 @@ __8: if !(rc != SQLITE_OK) { goto __9 } - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4743, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47163) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4743, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47172) goto shmpage_out __9: ; @@ -71902,7 +71902,7 @@ __14: goto __15 } (*WinShmNode)(unsafe.Pointer(pShmNode)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, (*WinShmNode)(unsafe.Pointer(pShmNode)).FlastErrno, ts+4754, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47222) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, (*WinShmNode)(unsafe.Pointer(pShmNode)).FlastErrno, ts+4754, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47231) if !(hMap != 0) { goto __16 } @@ -71946,13 +71946,13 @@ __19: } // Cleans up the mapped region of the specified file, if any. -func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:47259:12: */ +func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:47268:12: */ if (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion != 0 { if !((*(*func(*libc.TLS, LPCVOID) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 59*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion) != 0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4765, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47271) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4765, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47280) } (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion = uintptr(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSize = int64(0) @@ -71961,7 +71961,7 @@ func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:47259:12: * if !((*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).FhMap) != 0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4779, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47282) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4779, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47291) } (*WinFile)(unsafe.Pointer(pFile)).FhMap = uintptr(0) } @@ -71983,7 +71983,7 @@ func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:47259:12: * // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { /* sqlite3.c:47308:12: */ +func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { /* sqlite3.c:47317:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -72020,7 +72020,7 @@ func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { /* sqli DWORD(*(*Sqlite3_int64)(unsafe.Pointer(bp))&int64(0xffffffff)), uintptr(0)) if (*WinFile)(unsafe.Pointer(pFd)).FhMap == uintptr(0) { (*WinFile)(unsafe.Pointer(pFd)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4793, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 47359) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4793, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 47368) // Log the error, but continue normal operation using xRead/xWrite return SQLITE_OK @@ -72031,7 +72031,7 @@ func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { /* sqli (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFd)).FhMap) (*WinFile)(unsafe.Pointer(pFd)).FhMap = uintptr(0) (*WinFile)(unsafe.Pointer(pFd)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4805, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 47377) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4805, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 47386) // Log the error, but continue normal operation using xRead/xWrite return SQLITE_OK @@ -72053,7 +72053,7 @@ func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { /* sqli // // If this function does return a pointer, the caller must eventually // release the reference by calling winUnfetch(). -func winFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:47406:12: */ +func winFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:47415:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -72083,7 +72083,7 @@ func winFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func winUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:47448:12: */ +func winUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:47457:12: */ var pFd uintptr = fd // The underlying database file // If p==0 (unmap the entire file) then there must be no outstanding @@ -72133,7 +72133,7 @@ var winIoMethod = Sqlite3_io_methods{ FxShmUnmap: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:47491:33 */ +} /* sqlite3.c:47500:33 */ // This vector defines all the methods that can operate on an // sqlite3_file for win32 without performing any locking. @@ -72157,16 +72157,16 @@ var winIoNolockMethod = Sqlite3_io_methods{ FxShmUnmap: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:47517:33 */ +} /* sqlite3.c:47526:33 */ var winAppData = WinVfsAppData{ FpMethod: 0, // bNoLock -} /* sqlite3.c:47539:22 */ +} /* sqlite3.c:47548:22 */ var winNolockAppData = WinVfsAppData{ FpMethod: 0, // pAppData FbNoLock: 1, // bNoLock -} /* sqlite3.c:47545:22 */ +} /* sqlite3.c:47554:22 */ // *************************************************************************** // @@ -72179,7 +72179,7 @@ var winNolockAppData = WinVfsAppData{ // operating system wants filenames in. Space to hold the result // is obtained from malloc and must be freed by the calling // function. -func winConvertFromUtf8Filename(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:47585:13: */ +func winConvertFromUtf8Filename(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:47594:13: */ var zConverted uintptr = uintptr(0) if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { zConverted = winUtf8ToUnicode(tls, zFilename) @@ -72193,7 +72193,7 @@ func winConvertFromUtf8Filename(tls *libc.TLS, zFilename uintptr) uintptr { /* s // This function returns non-zero if the specified UTF-8 string buffer // ends with a directory separator character or one was successfully // added to it. -func winMakeEndInDirSep(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:47604:12: */ +func winMakeEndInDirSep(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:47613:12: */ if zBuf != 0 { var nLen int32 = Xsqlite3Strlen30(tls, zBuf) if nLen > 0 { @@ -72211,7 +72211,7 @@ func winMakeEndInDirSep(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqli // Create a temporary file name and store the resulting pointer into pzBuf. // The pointer returned in pzBuf must be freed via sqlite3_free(). -func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlite3.c:47624:12: */ +func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlite3.c:47633:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -72252,7 +72252,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit if nDirLen > nDir { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4825, uintptr(0), 47665) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4825, uintptr(0), 47674) } Xsqlite3_snprintf(tls, nMax, zBuf, ts+4444, libc.VaList(bp, Xsqlite3_temp_directory)) } @@ -72268,7 +72268,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit Xsqlite3_free(tls, zWidePath) Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4841, uintptr(0), 47763) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4841, uintptr(0), 47772) } zMulti = winUnicodeToUtf8(tls, zWidePath) if zMulti != 0 { @@ -72292,7 +72292,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit if (*(*func(*libc.TLS, DWORD, LPSTR) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 31*24 + 8)))(tls, uint32(nMax), zMbcsPath) == DWORD(0) { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4857, uintptr(0), 47790) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4857, uintptr(0), 47799) } zUtf8 = winMbcsToUtf8(tls, zMbcsPath, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) if zUtf8 != 0 { @@ -72311,7 +72311,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit if !(winMakeEndInDirSep(tls, nDir+1, zBuf) != 0) { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4873, uintptr(0), 47814) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4873, uintptr(0), 47823) } // Check that the output buffer is large enough for the temporary file @@ -72327,7 +72327,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit if nLen+nPre+17 > nBuf { Xsqlite3_free(tls, zBuf) - return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4889, uintptr(0), 47832) + return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4889, uintptr(0), 47841) } Xsqlite3_snprintf(tls, nBuf-16-nLen, zBuf+uintptr(nLen), ts+4817, 0) @@ -72358,12 +72358,12 @@ __3: return SQLITE_OK } -var zChars = *(*[63]int8)(unsafe.Pointer(ts + 4905)) /* sqlite3.c:47625:15 */ +var zChars = *(*[63]int8)(unsafe.Pointer(ts + 4905)) /* sqlite3.c:47634:15 */ // Return TRUE if the named file is really a directory. Return false if // it is something other than a directory, or if there is any kind of memory // allocation failure. -func winIsDir(tls *libc.TLS, zConverted uintptr) int32 { /* sqlite3.c:47855:12: */ +func winIsDir(tls *libc.TLS, zConverted uintptr) int32 { /* sqlite3.c:47864:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -72391,7 +72391,7 @@ func winIsDir(tls *libc.TLS, zConverted uintptr) int32 { /* sqlite3.c:47855:12: } // Open a file. -func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:47890:12: */ +func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:47899:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -72547,7 +72547,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 } } } - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 8 /* cnt */)), 48121) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 8 /* cnt */)), 48130) if h == libc.UintptrFromInt64(int64(-1)) { Xsqlite3_free(tls, zConverted) @@ -72558,8 +72558,8 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 pOutFlags) } else { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = *(*DWORD)(unsafe.Pointer(bp + 12 /* lastErrno */)) - winLogErrorAtLine(tls, SQLITE_CANTOPEN, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4978, zUtf8Name, 48136) - return Xsqlite3CantopenError(tls, 48137) + winLogErrorAtLine(tls, SQLITE_CANTOPEN, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4978, zUtf8Name, 48145) + return Xsqlite3CantopenError(tls, 48146) } } @@ -72614,7 +72614,7 @@ func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32 // problem, we delay 100 milliseconds and try to delete again. Up // to MX_DELETION_ATTEMPTs deletion attempts are run before giving // up and returning an error. -func winDelete(tls *libc.TLS, pVfs uintptr, zFilename uintptr, syncDir int32) int32 { /* sqlite3.c:48213:12: */ +func winDelete(tls *libc.TLS, pVfs uintptr, zFilename uintptr, syncDir int32) int32 { /* sqlite3.c:48222:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -72685,9 +72685,9 @@ func winDelete(tls *libc.TLS, pVfs uintptr, zFilename uintptr, syncDir int32) in } } if rc != 0 && rc != SQLITE_IOERR|int32(23)<<8 { - rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, *(*DWORD)(unsafe.Pointer(bp + 4 /* lastErrno */)), ts+4991, zFilename, 48309) + rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, *(*DWORD)(unsafe.Pointer(bp + 4 /* lastErrno */)), ts+4991, zFilename, 48318) } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp /* cnt */)), 48311) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp /* cnt */)), 48320) } Xsqlite3_free(tls, zConverted) @@ -72695,7 +72695,7 @@ func winDelete(tls *libc.TLS, pVfs uintptr, zFilename uintptr, syncDir int32) in } // Check the existence and status of a file. -func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:48321:12: */ +func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:48330:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -72730,10 +72730,10 @@ func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pRes attr = (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp /* &sAttrData */)).FdwFileAttributes } } else { - winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* cnt */)), 48361) + winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* cnt */)), 48370) if *(*DWORD)(unsafe.Pointer(bp + 40)) != DWORD(2) && *(*DWORD)(unsafe.Pointer(bp + 40)) != DWORD(3) { Xsqlite3_free(tls, zConverted) - return winLogErrorAtLine(tls, SQLITE_IOERR|int32(13)<<8, *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)), ts+5001, zFilename, 48364) + return winLogErrorAtLine(tls, SQLITE_IOERR|int32(13)<<8, *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)), ts+5001, zFilename, 48373) } else { attr = libc.Uint32(libc.Uint32FromInt32(-1)) } @@ -72761,14 +72761,14 @@ func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pRes // Returns non-zero if the specified path name starts with the "long path" // prefix. -func winIsLongPathPrefix(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite3.c:48399:13: */ +func winIsLongPathPrefix(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite3.c:48408:13: */ return libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPathname))) == '\\' && int32(*(*int8)(unsafe.Pointer(zPathname + 1))) == '\\' && int32(*(*int8)(unsafe.Pointer(zPathname + 2))) == '?' && int32(*(*int8)(unsafe.Pointer(zPathname + 3))) == '\\') } // Returns non-zero if the specified path name starts with a drive letter // followed by a colon character. -func winIsDriveLetterAndColon(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite3.c:48410:13: */ +func winIsDriveLetterAndColon(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite3.c:48419:13: */ return libc.Bool32(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPathname)))])&0x02 != 0 && int32(*(*int8)(unsafe.Pointer(zPathname + 1))) == ':') } @@ -72776,7 +72776,7 @@ func winIsDriveLetterAndColon(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sql // non-zero is returned from this function, the calling function must simply // use the provided path name verbatim -OR- resolve it into a full path name // using the GetFullPathName Win32 API function (if available). -func winIsVerbatimPathname(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite3.c:48422:13: */ +func winIsVerbatimPathname(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite3.c:48431:13: */ // If the path name starts with a forward slash or a backslash, it is either // a legal UNC name, a volume relative path, or an absolute path name in the // "Unix" format on Windows. There is no easy way to differentiate between @@ -72802,7 +72802,7 @@ func winIsVerbatimPathname(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite // Turn a relative pathname into a full pathname. Write the full // pathname into zOut[]. zOut[] will be at least pVfs->mxPathname // bytes in size. -func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32, zFull uintptr) int32 { /* sqlite3.c:48458:12: */ +func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32, zFull uintptr) int32 { /* sqlite3.c:48467:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -72845,7 +72845,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 nByte = (*(*func(*libc.TLS, LPCWSTR, DWORD, LPWSTR, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls, zConverted, uint32(0), uintptr(0), uintptr(0)) if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) - return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5018, zRelative, 48581) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5018, zRelative, 48590) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(WCHAR(0)))) @@ -72857,7 +72857,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) Xsqlite3_free(tls, zTemp) - return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5035, zRelative, 48594) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5035, zRelative, 48603) } Xsqlite3_free(tls, zConverted) zOut = winUnicodeToUtf8(tls, zTemp) @@ -72867,7 +72867,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 nByte = (*(*func(*libc.TLS, LPCSTR, DWORD, LPSTR, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 24*24 + 8)))(tls, zConverted, uint32(0), uintptr(0), uintptr(0)) if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) - return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5052, zRelative, 48607) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5052, zRelative, 48616) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(int8(0)))) @@ -72879,7 +72879,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) Xsqlite3_free(tls, zTemp) - return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5069, zRelative, 48620) + return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5069, zRelative, 48629) } Xsqlite3_free(tls, zConverted) zOut = winMbcsToUtf8(tls, zTemp, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) @@ -72902,7 +72902,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 // Interfaces for opening a shared library, finding entry points // within the shared library, and closing the shared library. -func winDlOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr) uintptr { /* sqlite3.c:48643:13: */ +func winDlOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr) uintptr { /* sqlite3.c:48652:13: */ var h HANDLE var zConverted uintptr = winConvertFromUtf8Filename(tls, zFilename) _ = pVfs @@ -72920,12 +72920,12 @@ func winDlOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr) uintptr { /* sqli return h } -func winDlError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:48684:13: */ +func winDlError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:48693:13: */ _ = pVfs winGetLastErrorMsg(tls, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), nBuf, zBufOut) } -func winDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* sqlite3.c:48688:13: */ +func winDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* sqlite3.c:48697:13: */ var proc FARPROC _ = pVfs proc = (*(*func(*libc.TLS, HMODULE, LPCSTR) FARPROC)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, pH, zSym) @@ -72933,7 +72933,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:48696:13: */ +func winDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:48705:13: */ _ = pVfs (*(*func(*libc.TLS, HMODULE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, pHandle) @@ -72946,13 +72946,13 @@ type EntropyGatherer1 = struct { Fi int32 FnXor int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:48709:9 */ +} /* sqlite3.c:48718:9 */ // State information for the randomness gatherer. -type EntropyGatherer = EntropyGatherer1 /* sqlite3.c:48709:32 */ +type EntropyGatherer = EntropyGatherer1 /* sqlite3.c:48718:32 */ // Mix sz bytes of entropy into p. -func xorMemory(tls *libc.TLS, p uintptr, x uintptr, sz int32) { /* sqlite3.c:48719:13: */ +func xorMemory(tls *libc.TLS, p uintptr, x uintptr, sz int32) { /* sqlite3.c:48728:13: */ var j int32 var k int32 j = 0 @@ -72968,7 +72968,7 @@ func xorMemory(tls *libc.TLS, p uintptr, x uintptr, sz int32) { /* sqlite3.c:487 } // Write up to nBuf bytes of randomness into zBuf. -func winRandomness(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:48733:12: */ +func winRandomness(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:48742:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -73011,7 +73011,7 @@ func winRandomness(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int32 } // Sleep for a little while. Return the amount of time slept. -func winSleep(tls *libc.TLS, pVfs uintptr, microsec int32) int32 { /* sqlite3.c:48790:12: */ +func winSleep(tls *libc.TLS, pVfs uintptr, microsec int32) int32 { /* sqlite3.c:48799:12: */ Xsqlite3_win32_sleep(tls, uint32((microsec+999)/1000)) _ = pVfs return (microsec + 999) / 1000 * 1000 @@ -73029,7 +73029,7 @@ func winSleep(tls *libc.TLS, pVfs uintptr, microsec int32) int32 { /* sqlite3.c: // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func winCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, piNow uintptr) int32 { /* sqlite3.c:48815:12: */ +func winCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, piNow uintptr) int32 { /* sqlite3.c:48824:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73046,13 +73046,13 @@ func winCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, piNow uintptr) int32 { /* return SQLITE_OK } -var winFiletimeEpoch Sqlite3_int64 = int64(23058135) * int64(8640000) /* sqlite3.c:48820:30 */ -var max32BitValue Sqlite3_int64 = int64(2000000000) + int64(2000000000) + int64(294967296) /* sqlite3.c:48825:30 */ +var winFiletimeEpoch Sqlite3_int64 = int64(23058135) * int64(8640000) /* sqlite3.c:48829:30 */ +var max32BitValue Sqlite3_int64 = int64(2000000000) + int64(2000000000) + int64(294967296) /* sqlite3.c:48834:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func winCurrentTime(tls *libc.TLS, pVfs uintptr, prNow uintptr) int32 { /* sqlite3.c:48858:12: */ +func winCurrentTime(tls *libc.TLS, pVfs uintptr, prNow uintptr) int32 { /* sqlite3.c:48867:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73094,7 +73094,7 @@ func winCurrentTime(tls *libc.TLS, pVfs uintptr, prNow uintptr) int32 { /* sqlit // However if an error message is supplied, it will be incorporated // by sqlite into the error message available to the user using // sqlite3_errmsg(), possibly making IO errors easier to debug. -func winGetLastError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:48898:12: */ +func winGetLastError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:48907:12: */ var e DWORD = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) _ = pVfs if nBuf > 0 { @@ -73104,7 +73104,7 @@ func winGetLastError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int3 } // Initialize and deinitialize the operating system interface. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:48908:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:48917:16: */ // Double-check that the aSyscall[] array has been constructed // correctly. See ticket [bb3a86e890c8e96ab] @@ -73148,7 +73148,7 @@ var winVfs = Sqlite3_vfs{ FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall -} /* sqlite3.c:48909:22 */ +} /* sqlite3.c:48918:22 */ var winLongPathVfs = Sqlite3_vfs{ FiVersion: 3, // iVersion FszOsFile: int32(unsafe.Sizeof(WinFile{})), // szOsFile @@ -73171,7 +73171,7 @@ var winLongPathVfs = Sqlite3_vfs{ FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall -} /* sqlite3.c:48934:22 */ +} /* sqlite3.c:48943:22 */ var winNolockVfs = Sqlite3_vfs{ FiVersion: 3, // iVersion FszOsFile: int32(unsafe.Sizeof(WinFile{})), // szOsFile @@ -73194,7 +73194,7 @@ var winNolockVfs = Sqlite3_vfs{ FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall -} /* sqlite3.c:48959:22 */ +} /* sqlite3.c:48968:22 */ var winLongPathNolockVfs = Sqlite3_vfs{ FiVersion: 3, // iVersion FszOsFile: int32(unsafe.Sizeof(WinFile{})), // szOsFile @@ -73217,9 +73217,9 @@ var winLongPathNolockVfs = Sqlite3_vfs{ FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall -} /* sqlite3.c:48984:22 */ +} /* sqlite3.c:48993:22 */ -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:49043:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:49052:16: */ winBigLock = uintptr(0) @@ -73247,15 +73247,15 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:49043:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:49086:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:49095:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemFile = MemFile1 /* sqlite3.c:49087:24 */ +type MemFile = MemFile1 /* sqlite3.c:49096:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -73269,9 +73269,9 @@ type MemStore1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr -} /* sqlite3.c:49087:9 */ +} /* sqlite3.c:49096:9 */ -type MemStore = MemStore1 /* sqlite3.c:49088:25 */ +type MemStore = MemStore1 /* sqlite3.c:49097:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -73281,13 +73281,13 @@ type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr -} /* sqlite3.c:49158:8 */ +} /* sqlite3.c:49167:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:49161:3: */ +var memdb_g MemFS /* sqlite3.c:49170:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) @@ -73304,7 +73304,7 @@ var memdb_vfs = Sqlite3_vfs{ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:49197:20 */ +} /* sqlite3.c:49206:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -73320,21 +73320,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:49222:33 */ +} /* sqlite3.c:49231:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49255:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:49264:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49258:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:49267:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49279:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -73372,7 +73372,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49270:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49312:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49321:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -73389,7 +73389,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49334:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:49343:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -73411,7 +73411,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49354:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:49363:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -73442,7 +73442,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49391:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:49400:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -73457,14 +73457,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49408:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:49417:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49417:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:49426:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -73473,7 +73473,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49428:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:49437:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -73517,7 +73517,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49482:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:49491:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -73546,13 +73546,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49519:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:49528:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49528:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:49537:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -73566,7 +73566,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49547:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49556:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -73577,7 +73577,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49560:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49569:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -73652,7 +73652,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49657:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49666:12: */ _ = pVfs _ = zPath _ = flags @@ -73663,7 +73663,7 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49675:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73673,7 +73673,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49689:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49698:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -73682,21 +73682,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49698:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49707:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49705:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49714:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49712:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49721:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -73704,7 +73704,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49720:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49729:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -73712,19 +73712,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49728:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49737:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49741:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49750:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49744:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49753:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -73732,7 +73732,7 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49752:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49761:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -73755,7 +73755,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49768:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49777:26: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -73846,7 +73846,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49849:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49858:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -73941,7 +73941,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49934:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -73963,7 +73963,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49925:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50066:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -73976,7 +73976,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:50057 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50072:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50081:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -74005,7 +74005,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:50095:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50104:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -74019,7 +74019,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50111:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:50120:20: */ var h U32 var bin U32 var j uint32 @@ -74156,7 +74156,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50182:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:50191:21: */ if p == uintptr(0) { return } @@ -74195,7 +74195,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50228:21: */ if p == uintptr(0) { return } @@ -74210,7 +74210,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:50219:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50243:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -74247,7 +74247,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:50234:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50279:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:50288:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -74410,7 +74410,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50514:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:50523:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -74472,7 +74472,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50593:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -74484,7 +74484,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50584:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50605:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -74509,7 +74509,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50596:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50627:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -74522,7 +74522,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50618:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50637:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -74530,7 +74530,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50628:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50647:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -74544,7 +74544,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50638:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50652:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50661:20: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -74561,7 +74561,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50678:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50687:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -74608,7 +74608,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50722:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50731:36: */ var eCreate int32 var pRes uintptr @@ -74636,7 +74636,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50763:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50772:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -74687,7 +74687,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50819:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50828:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -74707,7 +74707,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50845:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50854:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -74723,7 +74723,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50877:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -74736,7 +74736,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50868:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50892:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -74745,7 +74745,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50883:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50904:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -74758,7 +74758,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50895:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50918:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -74773,7 +74773,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50909:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50938:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -74785,7 +74785,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50928:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50955:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -74794,7 +74794,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50945: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50956:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50966:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -74804,7 +74804,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50968:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -74813,7 +74813,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50979:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50989:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -74832,7 +74832,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51001:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:51011:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -74866,19 +74866,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51034:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51044:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51043:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51053:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51051:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51061:14: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -74917,7 +74917,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51088:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51098:14: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -74960,7 +74960,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5108 } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51123:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:51133:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -74972,17 +74972,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51137:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51147:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51144:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51154:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51151:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51161:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -74990,7 +74990,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51168:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:51178:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -75002,7 +75002,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51180:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:51190:20: */ var res int32 if mxPage != 0 { @@ -75019,20 +75019,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51197:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51207:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51206:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:51216:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51212:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -75147,7 +75147,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -75233,7 +75233,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:51329:24 */ +type PCache1 = PCache11 /* sqlite3.c:51339:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -75243,12 +75243,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:51330:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51331:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:51340:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:51341:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:51331:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:51341:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -75256,9 +75256,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:51329:9 */ +} /* sqlite3.c:51339:9 */ -type PGroup = PGroup1 /* sqlite3.c:51332:23 */ +type PGroup = PGroup1 /* sqlite3.c:51342:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -75275,10 +75275,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:51449:19 */ +} /* sqlite3.c:51459:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:51483:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -75296,7 +75296,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:51473:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51508:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:51518:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -75329,7 +75329,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51544:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -75374,7 +75374,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51534:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51587:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -75407,7 +75407,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51577:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51625:13: */ if p == uintptr(0) { return } @@ -75437,7 +75437,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51615:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51658:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -75451,7 +75451,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51648:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51665:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51675:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -75489,7 +75489,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51727:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -75506,13 +75506,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51717:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51739:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51749:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51757:21: */ pcache1Free(tls, p) } @@ -75530,7 +75530,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51747:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51768:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51778:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -75546,7 +75546,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51795:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -75587,7 +75587,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51785:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51836:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -75604,7 +75604,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51826:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51851:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51861:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -75622,7 +75622,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51879:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -75643,7 +75643,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51869:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51894:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51904:13: */ var h uint32 var iStop uint32 @@ -75691,7 +75691,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51955:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -75729,7 +75729,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51945:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:52008:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) @@ -75738,7 +75738,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51998:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52012:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:52022:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -75788,7 +75788,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52072:13: */ var pCache uintptr = p var n U32 @@ -75811,7 +75811,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:52062 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52097:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -75826,7 +75826,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:52087:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52114:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -75841,7 +75841,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:52104:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52122:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52132:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -75959,7 +75959,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52250:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52260:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -75988,7 +75988,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:52280:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52290:15: */ var pCache uintptr = p var pPage uintptr @@ -75999,7 +75999,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52295:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:52305:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -76013,7 +76013,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52326:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:52336:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -76038,7 +76038,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52361:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:52371:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -76069,7 +76069,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52401:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:52411:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -76082,7 +76082,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:524 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52426:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -76105,7 +76105,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:52416:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52439:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:52449:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76125,16 +76125,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:52440:40 */ +} /* sqlite3.c:52450:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52461:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:52471:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52477:30: */ return pcache1_g.Fmutex } @@ -76145,7 +76145,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:52467:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52481:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:52491:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -76243,7 +76243,7 @@ type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The @@ -76256,13 +76256,13 @@ type RowSetChunk = struct { FpRight uintptr FpLeft uintptr } -} /* sqlite3.c:14602:9 */ +} /* sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52671:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -76282,7 +76282,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52661: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52693:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -76301,7 +76301,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52683:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52713:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -76312,7 +76312,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52703:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52726:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -76335,7 +76335,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52716:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52741:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52751:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -76365,7 +76365,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52772:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52782:27: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -76400,7 +76400,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52817:27: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -76436,7 +76436,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52807:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52836:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52846:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76467,7 +76467,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52871:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52881:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -76498,7 +76498,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52917:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -76531,7 +76531,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52907 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52939:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52949:20: */ // Cannot be used with sqlite3RowSetText() @@ -76564,7 +76564,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52973:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52983:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -76749,7 +76749,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:53115:20 */ +type Wal = Wal1 /* sqlite3.c:53125:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -77518,7 +77518,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53636:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -77551,11 +77551,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53626:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53948:28 */ +} /* sqlite3.c:53958:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54251:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -77578,7 +77578,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54241:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54272:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -77600,7 +77600,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:54262:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54295:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:54305:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77617,7 +77617,7 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54314:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:54324:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77634,7 +77634,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54329:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54339:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -77661,7 +77661,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54357:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:54367:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -77695,7 +77695,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54400:12: */ _ = pPager @@ -77729,7 +77729,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54390:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54495:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:54505:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -77788,7 +77788,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54561:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -77817,7 +77817,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54551:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54584:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54594:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77852,7 +77852,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54605:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -77867,7 +77867,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54595:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54644:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -77977,7 +77977,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54634:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54752:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54762:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -78087,7 +78087,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54877:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -78147,21 +78147,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54945:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54955:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54954:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54964:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54973:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) @@ -78178,7 +78178,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54963:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54982:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54992:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -78207,7 +78207,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55024:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -78299,7 +78299,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55014:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55111:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:55121:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -78324,7 +78324,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55145:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:55155:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -78388,7 +78388,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55205:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:55215:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -78515,7 +78515,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55362:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -78547,7 +78547,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55352: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55386:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:55396:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -78592,7 +78592,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55433:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:55443:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -78826,7 +78826,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55680:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55690:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -78992,7 +78992,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55798:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55808:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79027,7 +79027,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55844:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -79059,7 +79059,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55834 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55878:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -79127,7 +79127,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55868:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55941:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55951:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -79262,39 +79262,45 @@ __9: __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) + if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { + goto __12 + } + (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) +__12: + ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) -__12: +__13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { - goto __14 + goto __15 } if !(needPagerReset != 0) { - goto __15 + goto __16 } pager_reset(tls, pPager) needPagerReset = 0 -__15: +__16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { - goto __16 + goto __17 } nPlayback++ - goto __17 -__16: + goto __18 +__17: if !(rc == SQLITE_DONE) { - goto __18 + goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - goto __14 - goto __19 -__18: + goto __15 + goto __20 +__19: if !(rc == SQLITE_IOERR|int32(2)<<8) { - goto __20 + goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was @@ -79303,25 +79309,25 @@ __18: // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback - goto __21 -__20: + goto __22 +__21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; - goto __13 -__13: - u++ - goto __12 goto __14 __14: + u++ + goto __13 + goto __15 +__15: ; goto __4 __5: @@ -79330,10 +79336,10 @@ __5: end_playback: if !(rc == SQLITE_OK) { - goto __22 + goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) -__22: +__23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the @@ -79351,7 +79357,7 @@ __22: (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { - goto __23 + goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in @@ -79360,24 +79366,24 @@ __22: zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) -__23: +__24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { - goto __24 + goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) -__24: +__25: ; if !(rc == SQLITE_OK) { - goto __25 + goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) -__25: +__26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { - goto __26 + goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. @@ -79385,14 +79391,14 @@ __25: libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) -__26: +__27: ; if !(isHot != 0 && nPlayback != 0) { - goto __27 + goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+5197, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) -__27: +__28: ; // The Pager.sectorSize variable may have been updated while rolling @@ -79412,7 +79418,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56171:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79466,7 +79472,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56158:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56234:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -79493,7 +79499,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56221: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56249:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:56262:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -79524,7 +79530,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56297:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -79555,7 +79561,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56284: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56316:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:56329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -79603,7 +79609,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56383:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56396:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -79634,7 +79640,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56416:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:56429:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79688,7 +79694,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56476:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56489:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79756,7 +79762,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56543:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56556:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -79865,18 +79871,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56655:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56668:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56663:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56676:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56683:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -79892,13 +79898,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56670:13: */ } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56686:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56699:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56707:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -79951,7 +79957,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56694:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56750:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56763:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -80015,7 +80021,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56810:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56823:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -80043,7 +80049,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56849:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56862:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -80080,7 +80086,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56893:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56906:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80149,7 +80155,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56961:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56974:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -80158,7 +80164,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56972:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56985:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -80189,7 +80195,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57022:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:57035:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint64(N)) @@ -80212,7 +80218,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57050:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:57063:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -80229,7 +80235,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57071:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:57084:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -80274,7 +80280,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57142:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:57155:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -80301,7 +80307,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57173:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57186:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -80320,7 +80326,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:571 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57195:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:57208:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -80350,7 +80356,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57252:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -80360,7 +80366,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57239:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57265:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -80373,7 +80379,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57252:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57279:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -80411,7 +80417,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57300:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:57313:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -80460,7 +80466,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57382:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -80497,7 +80503,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57369:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57408:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:57421:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -80611,7 +80617,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:57472:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -80643,7 +80649,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:57459:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57551:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57564:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80723,7 +80729,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57655:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -80747,7 +80753,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57642:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57681:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -80778,7 +80784,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57668:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57704:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57717:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -80804,7 +80810,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57731:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57744:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -80866,7 +80872,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:577 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57808:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57821:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -80913,7 +80919,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5780 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57857:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57870:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -81039,7 +81045,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57944) + rc = Xsqlite3CantopenError(tls, 57957) __12: ; if !(rc != SQLITE_OK) { @@ -81358,7 +81364,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58229:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:58242:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -81396,7 +81402,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58270:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:58283:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -81507,7 +81513,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58390:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58403:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81633,7 +81639,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 58474) + rc = Xsqlite3CantopenError(tls, 58487) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -81782,7 +81788,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58620:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -81844,7 +81850,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58607:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58671:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58684:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -81857,7 +81863,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58687) + return Xsqlite3CorruptError(tls, 58700) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -81903,7 +81909,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58719) + rc = Xsqlite3CorruptError(tls, 58732) goto pager_acquire_err __7: ; @@ -81975,7 +81981,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58773:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58786:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -81995,7 +82001,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58798) + return Xsqlite3CorruptError(tls, 58811) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -82033,7 +82039,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58842:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58855:12: */ _ = pgno _ = flags @@ -82042,7 +82048,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58858:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58871:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -82058,7 +82064,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58879:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58892:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -82079,7 +82085,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58915:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -82091,13 +82097,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58902: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58914:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58927:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58930:21: */ var pPager uintptr // Page1 is never memory mapped @@ -82126,7 +82132,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58917: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58949:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58962:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -82208,7 +82214,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5894 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59038:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:59051:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -82268,7 +82274,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59107:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59120:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -82318,7 +82324,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59177:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -82392,7 +82398,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59164:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59256:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59269:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82480,7 +82486,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5925 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59363:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -82521,7 +82527,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:59350:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59412:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -82551,7 +82557,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:59399:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59433:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:59446:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82621,7 +82627,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59516:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:59529:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -82644,7 +82650,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59539:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59552:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -82680,7 +82686,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59581:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59594:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82870,7 +82876,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59811:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59824:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -82927,7 +82933,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59877:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59890:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -82971,13 +82977,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59927:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59940:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59944:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59957:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -82986,7 +82992,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59955:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59968:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -82999,7 +83005,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59991:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:60004:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) @@ -83009,7 +83015,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60027:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -83021,7 +83027,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60028:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60041:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -83061,7 +83067,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:60074:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:60087:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -83099,7 +83105,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60116:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:60129:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -83160,30 +83166,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60197:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:60210:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60198:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:60211:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60205:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60218:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60214:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60227:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60222:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60235:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -83191,7 +83197,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60233:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60246:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -83218,7 +83224,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60263:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:60276:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -83280,7 +83286,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 60337) + return Xsqlite3CorruptError(tls, 60350) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -83340,21 +83346,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60401:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:60414:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60410:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60423:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60419:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60432:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -83366,7 +83372,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:60 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60433:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60446:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -83392,7 +83398,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60466:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:60479:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -83462,14 +83468,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60556:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60569:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60565:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60578:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -83484,7 +83490,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60578:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60591:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -83496,12 +83502,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60592:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60605:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60613:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -83513,7 +83519,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60600 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60615:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60628:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and @@ -83541,13 +83547,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60646:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60659:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60654:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60667:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -83557,7 +83563,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60664:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60677:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -83574,7 +83580,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6066 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60697:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -83610,7 +83616,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60684:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60729:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60742:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -83640,7 +83646,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60768:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60781:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83680,7 +83686,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60837:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -83691,7 +83697,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60850:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60863:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -83703,7 +83709,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60867:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60880:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -83723,7 +83729,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60889:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60902:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -83735,7 +83741,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60903:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60916:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -84314,7 +84320,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61231:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:61244:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -84326,18 +84332,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:61232:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:61245:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:61233:9 */ +} /* sqlite3.c:61246:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61246:28 */ // Candidate values for Wal.exclusiveMode. @@ -84345,7 +84351,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:61233:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:61488:13 */ +type Ht_slot = U16 /* sqlite3.c:61501:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -84367,7 +84373,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:61232:9 */ +} /* sqlite3.c:61245:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -84398,7 +84404,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61559:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61572:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -84444,7 +84450,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:61608:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61621: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) } @@ -84452,13 +84458,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61622:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61635:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61643:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -84476,7 +84482,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61630:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61656:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61669:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -84508,7 +84514,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61712:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -84523,7 +84529,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61699:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61736:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -84547,7 +84553,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61723:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61750:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61763:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 @@ -84570,7 +84576,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61781:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61794:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame @@ -84612,7 +84618,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61860:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61873:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -84623,7 +84629,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:61870:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61883:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -84632,7 +84638,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61876:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61889:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -84643,7 +84649,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:61886:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61899:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -84655,12 +84661,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61899:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61912:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61904:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61917:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -84672,12 +84678,12 @@ type WalHashLoc1 = struct { FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:61913:9 */ +} /* sqlite3.c:61926:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61926:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -84691,7 +84697,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61913:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61934:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61947:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) @@ -84714,14 +84720,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61964:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61977:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61979:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61992:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) @@ -84739,7 +84745,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62012:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -84782,7 +84788,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61999:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62061:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:62074:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -84823,7 +84829,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62101) + return Xsqlite3CorruptError(tls, 62114) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -84842,7 +84848,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62150:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62163:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -84957,7 +84963,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62233) + rc = Xsqlite3CantopenError(tls, 62246) goto finished __7: ; @@ -85161,7 +85167,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62373:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:62386:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -85187,7 +85193,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62401:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:62414:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -85259,7 +85265,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62504:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62517:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -85273,7 +85279,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:62 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62518:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:62531:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -85320,7 +85326,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62571:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62584:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -85366,7 +85372,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62628:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62641:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -85412,10 +85418,10 @@ type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr -} /* sqlite3.c:62634:3 */ +} /* sqlite3.c:62647:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62704:13: */ Xsqlite3_free(tls, p) } @@ -85430,7 +85436,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62691:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62708:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62721:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -85514,7 +85520,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62871:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62884:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -85526,7 +85532,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62908:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -85545,7 +85551,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62895:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62929:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -85596,7 +85602,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62916: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62963:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62976:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -85727,7 +85733,7 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 63047) + rc = Xsqlite3CorruptError(tls, 63060) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -85888,7 +85894,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63162:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -85907,7 +85913,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:63149:13 } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63166:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:63179:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -85979,7 +85985,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63247:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -86048,7 +86054,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63317:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63330:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86128,7 +86134,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 63396) + rc = Xsqlite3CantopenError(tls, 63409) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -86173,7 +86179,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63441:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63454:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -86439,7 +86445,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63638:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63651:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -86656,7 +86662,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63868:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63881:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -86730,7 +86736,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63939:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63952:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -86818,7 +86824,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64047:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64060:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -86832,7 +86838,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64063:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:64076:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -86899,7 +86905,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64133) + return Xsqlite3CorruptError(tls, 64146) } iKey = walNextHash(tls, iKey) } @@ -86915,7 +86921,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64167:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:64180:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -86932,7 +86938,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64200:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -86950,7 +86956,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:64187:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64208:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64221:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -86982,7 +86988,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64256:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64269:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -87002,7 +87008,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64278:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:64291:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -87039,7 +87045,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64318:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:64331:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) @@ -87051,7 +87057,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64332:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:64345:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -87082,7 +87088,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64369:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64382:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87136,12 +87142,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:64416:9 */ +} /* sqlite3.c:64429:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:64435:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -87149,7 +87155,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:64422:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64432:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64445:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -87171,7 +87177,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64457:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:64470:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -87196,7 +87202,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64483:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:64496:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -87250,7 +87256,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64532:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:64545:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -87483,7 +87489,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64770:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64783:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -87548,7 +87554,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64852) + rc = Xsqlite3CorruptError(tls, 64865) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -87592,7 +87598,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64908:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -87623,7 +87629,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64895 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64928:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64941:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -87657,14 +87663,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64970:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64983:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64979:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64992:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -87683,16 +87689,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64982:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64995:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65003:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:65016:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65014:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:65027:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -87722,7 +87728,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65038:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:65051:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -87738,13 +87744,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65057:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:65070:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65079:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:65092:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -88265,7 +88271,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:65337:24 */ +type MemPage = MemPage1 /* sqlite3.c:65350:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -88274,7 +88280,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:65338:23 */ +type BtLock = BtLock1 /* sqlite3.c:65351:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -88283,7 +88289,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:65339:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:65352:25 */ // Legal values for BtCursor.curFlags @@ -88393,7 +88399,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65796:9 */ +} /* sqlite3.c:65811:9 */ // Legal values for BtCursor.curFlags @@ -88489,7 +88495,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65811:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -88503,7 +88509,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65796:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65861:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -88512,7 +88518,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65846:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65875:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -88533,7 +88539,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65860:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65905:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -88561,7 +88567,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65890:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65939:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -88592,7 +88598,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65924:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65977:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -88615,7 +88621,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65962:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66020:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -88630,13 +88636,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66005:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66019:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66034:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66037:29: */ var i int32 var p uintptr @@ -88648,7 +88654,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66022:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -88659,11 +88665,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:66031:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66117:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66132:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66136:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -88686,7 +88692,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66121: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5336)) /* sqlite3.c:66152:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5336)) /* sqlite3.c:66167:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -88712,14 +88718,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5336)) /* sqlite3.c:66152:19 // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66207:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:66222:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66219:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:66234:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -88736,7 +88742,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66418:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:66433:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -88793,7 +88799,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66490:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:66505:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -88844,7 +88850,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66554:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66569:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 @@ -88879,7 +88885,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6655 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66598:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66613:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -88903,7 +88909,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66666:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -88922,7 +88928,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66651 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66673:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66688:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -88969,7 +88975,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66733:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66748:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -88989,20 +88995,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66755:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66770:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66764:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66779:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66772:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66787:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -89024,7 +89030,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6677 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66811:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -89061,7 +89067,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66796:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66853:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -89102,7 +89108,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66838: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66888:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66903:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -89123,7 +89129,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66905:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66920:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -89142,7 +89148,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66945:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -89152,7 +89158,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66930: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66942:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66957:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -89165,7 +89171,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66959) + rc = Xsqlite3CorruptError(tls, 66974) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -89182,7 +89188,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66978:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66993:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -89222,7 +89228,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67021:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:67036:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -89230,12 +89236,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67034:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:67049:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67050:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -89248,7 +89254,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:67035:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67053:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:67068:20: */ var rc int32 rc = func() int32 { @@ -89270,7 +89276,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67085:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:67100:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -89282,7 +89288,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67101:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:67116:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -89307,7 +89313,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:671 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67125:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:67140:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89330,7 +89336,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67140) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67155) return __2: ; @@ -89349,7 +89355,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67153) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67168) goto ptrmap_exit __4: ; @@ -89357,7 +89363,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67158) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67173) goto ptrmap_exit __5: ; @@ -89388,7 +89394,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67184:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:67199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89409,7 +89415,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 67203) + return Xsqlite3CorruptError(tls, 67218) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -89419,7 +89425,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67211) + return Xsqlite3CorruptError(tls, 67226) } return SQLITE_OK } @@ -89437,7 +89443,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67243:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67258:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -89464,7 +89470,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67278:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:67293:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -89494,7 +89500,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67306:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67321:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -89504,7 +89510,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67323:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67338:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -89581,7 +89587,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67405:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:67420:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -89612,7 +89618,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67442:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:67457:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(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) @@ -89628,7 +89634,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67462:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67477:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -89669,7 +89675,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:67510:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:67525:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -89686,7 +89692,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67548:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:67563:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89703,7 +89709,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67557) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67572) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -89721,7 +89727,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67579:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67594:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -89766,7 +89772,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67616) + return Xsqlite3CorruptError(tls, 67631) __2: ; if !(iFree != 0) { @@ -89776,7 +89782,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67619) + return Xsqlite3CorruptError(tls, 67634) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -89789,7 +89795,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67627) + return Xsqlite3CorruptError(tls, 67642) __6: ; if !(iFree2 != 0) { @@ -89798,14 +89804,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67630) + return Xsqlite3CorruptError(tls, 67645) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67632) + return Xsqlite3CorruptError(tls, 67647) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -89815,7 +89821,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67636) + return Xsqlite3CorruptError(tls, 67651) __11: ; __8: @@ -89877,7 +89883,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67665) + return Xsqlite3CorruptError(tls, 67680) __21: ; @@ -89888,7 +89894,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67671) + return Xsqlite3CorruptError(tls, 67686) __22: ; @@ -89923,7 +89929,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67690) + return Xsqlite3CorruptError(tls, 67705) __25: ; @@ -89948,7 +89954,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67715:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67730:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -89977,7 +89983,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67744) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67759) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -89992,14 +89998,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67758) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67765) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67780) } return uintptr(0) } @@ -90015,7 +90021,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67783:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67798:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -90040,7 +90046,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67812) + return Xsqlite3CorruptError(tls, 67827) } } @@ -90055,7 +90061,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67830) + return Xsqlite3CorruptError(tls, 67845) } else { return SQLITE_OK } @@ -90106,7 +90112,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67879:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67894:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -90130,12 +90136,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67908) + return Xsqlite3CorruptError(tls, 67923) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67913) + return Xsqlite3CorruptError(tls, 67928) } // At this point: @@ -90146,11 +90152,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67925) + return Xsqlite3CorruptError(tls, 67940) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67928) + return Xsqlite3CorruptError(tls, 67943) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -90163,7 +90169,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67941) + return Xsqlite3CorruptError(tls, 67956) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -90171,7 +90177,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 67962) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -90181,10 +90187,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67955) + return Xsqlite3CorruptError(tls, 67970) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67956) + return Xsqlite3CorruptError(tls, 67971) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -90218,7 +90224,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67986:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:68001:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -90269,7 +90275,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 68029) + return Xsqlite3CorruptError(tls, 68044) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -90277,7 +90283,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68039:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68054:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -90309,12 +90315,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 68080) + return Xsqlite3CorruptError(tls, 68095) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 68085) + return Xsqlite3CorruptError(tls, 68100) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -90326,11 +90332,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 68095) + return Xsqlite3CorruptError(tls, 68110) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 68099) + return Xsqlite3CorruptError(tls, 68114) } } @@ -90341,7 +90347,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68111) + return Xsqlite3CorruptError(tls, 68126) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -90349,7 +90355,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68136:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -90371,14 +90377,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68142) + return Xsqlite3CorruptError(tls, 68157) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68147) + return Xsqlite3CorruptError(tls, 68162) } } return SQLITE_OK @@ -90391,7 +90397,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68121 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68177:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -90400,21 +90406,21 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68179) + return Xsqlite3CorruptError(tls, 68194) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 68193) + return Xsqlite3CorruptError(tls, 68208) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -90432,7 +90438,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68162:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68230:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -90455,7 +90461,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first - (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize) + (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) @@ -90467,7 +90473,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:68215:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68252:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:68267:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -90494,7 +90500,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68276:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68291:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90512,7 +90518,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68298:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:68313:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -90524,11 +90530,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68312:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:68327:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68330:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -90544,7 +90550,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:68315:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68333:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:68348:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -90554,7 +90560,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 68348) + rc = Xsqlite3CorruptError(tls, 68363) goto getAndInitPage_error1 __1: ; @@ -90585,7 +90591,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 68369) + rc = Xsqlite3CorruptError(tls, 68384) goto getAndInitPage_error2 __5: ; @@ -90609,18 +90615,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68392:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68407:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68401:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68416:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68419:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -90632,13 +90638,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:68404:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68424:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:68439:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 68435) + return Xsqlite3CorruptError(tls, 68450) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -90653,7 +90659,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68468:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -90673,7 +90679,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:68453:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68475:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68490:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) @@ -90698,7 +90704,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:68 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68503:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:68518:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -91119,7 +91125,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68801:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68816:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -91151,7 +91157,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6880 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68855:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object @@ -91184,7 +91190,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68840:28 } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68892:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -91193,7 +91199,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68877:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68903:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -91243,7 +91249,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68888:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68954:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68969:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -91260,7 +91266,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68973:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68988:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -91272,7 +91278,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68988:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:69003:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -91287,7 +91293,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69007:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:69022:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -91314,7 +91320,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69040:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:69055:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -91348,7 +91354,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69072:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -91361,7 +91367,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:690 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69087:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69102:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -91375,7 +91381,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69103:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69118:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -91391,7 +91397,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69118:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:69133:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -91415,7 +91421,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69144:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:69159:20: */ var b int32 if p == uintptr(0) { return 0 @@ -91435,7 +91441,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69165:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:69180:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -91468,7 +91474,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69189:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69204:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -91493,7 +91499,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69245:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69260:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -91662,7 +91668,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 69370) + rc = Xsqlite3CorruptError(tls, 69385) goto page1_init_failed goto __19 __18: @@ -91739,7 +91745,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69470:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -91752,7 +91758,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:69455:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69487:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -91792,7 +91798,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69472:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69531:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -91834,7 +91840,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69516:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69560:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:69575:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -92098,7 +92104,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92150,14 +92156,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69740:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69785:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69800:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69791) + return Xsqlite3CorruptError(tls, 69806) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -92185,7 +92191,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69810) + return Xsqlite3CorruptError(tls, 69825) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -92202,7 +92208,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69828) + return Xsqlite3CorruptError(tls, 69843) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -92217,7 +92223,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69846:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69861:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -92228,7 +92234,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69863) + return Xsqlite3CorruptError(tls, 69878) } // Move page iDbPage from its current location to page number iFreePage @@ -92298,7 +92304,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69940:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69955:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -92320,7 +92326,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69961) + return Xsqlite3CorruptError(tls, 69976) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -92395,7 +92401,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70036:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:70051:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -92419,7 +92425,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70062:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70077:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -92433,7 +92439,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70076) + rc = Xsqlite3CorruptError(tls, 70091) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -92454,7 +92460,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7006 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70114:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -92477,7 +92483,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 70127) + return Xsqlite3CorruptError(tls, 70142) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -92508,7 +92514,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70154) + return Xsqlite3CorruptError(tls, 70169) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -92558,7 +92564,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70099:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70210:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:70225:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -92581,7 +92587,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70252:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -92637,7 +92643,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:70237:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70299:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:70314:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -92666,7 +92672,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70346:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -92701,7 +92707,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:70331:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70368:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:70383:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -92730,7 +92736,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70400:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70415:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92752,7 +92758,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:70 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70419:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:70434:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -92818,7 +92824,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70484:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:70499:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -92842,7 +92848,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70515:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:70530:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -92910,7 +92916,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70586:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70601:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -92923,7 +92929,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70618) + return Xsqlite3CorruptError(tls, 70633) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -92961,7 +92967,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70653:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70668:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -92969,7 +92975,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70666:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70681:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -92984,7 +92990,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70703:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } @@ -92994,13 +93000,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70688:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70700:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70715:21: */ libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70708:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70723:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -93041,7 +93047,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70784:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) @@ -93050,7 +93056,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70769:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70788:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70803:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -93059,26 +93065,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70799:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70814:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70810:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70825:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70814:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70829:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70839:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + (int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1 @@ -93091,7 +93097,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70824:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70842:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70857:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -93108,7 +93114,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70862:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70877:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -93130,7 +93136,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70887:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -93198,7 +93204,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70955:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70970:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -93240,7 +93246,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71005:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:71020:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -93251,7 +93257,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71025) + return Xsqlite3CorruptError(tls, 71040) } getCellInfo(tls, pCur) @@ -93262,7 +93268,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 71040) + return Xsqlite3CorruptError(tls, 71055) } // Check if data must be read/written to/from the btree page itself. @@ -93319,7 +93325,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71102) + return Xsqlite3CorruptError(tls, 71117) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -93379,7 +93385,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 71187) + return Xsqlite3CorruptError(tls, 71202) } return rc } @@ -93399,7 +93405,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71209:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71224:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -93407,7 +93413,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71222:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71237:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -93420,7 +93426,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:71236:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:71251:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -93447,7 +93453,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71265:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71280:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -93478,7 +93484,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71304:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:71319:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -93489,11 +93495,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71318:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:71333:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 71326) + return Xsqlite3CorruptError(tls, 71341) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -93510,7 +93516,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71382:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -93540,7 +93546,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:71367:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71408:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71423:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -93619,7 +93625,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 71464) + return Xsqlite3CorruptError(tls, 71479) __11: ; @@ -93640,7 +93646,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 71476) + return Xsqlite3CorruptError(tls, 71491) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -93662,7 +93668,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71509:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -93683,7 +93689,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71494:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71534:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -93704,7 +93710,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71519:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71542:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71557:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -93723,7 +93729,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71564:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:71579:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -93772,7 +93778,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71629:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71644:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93887,7 +93893,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71718) + return Xsqlite3CorruptError(tls, 71733) __21: ; goto __19 @@ -94016,7 +94022,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71797:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71812:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -94120,7 +94126,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71899) + rc = Xsqlite3CorruptError(tls, 71914) goto moveto_index_finish __13: ; @@ -94169,7 +94175,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71931) + rc = Xsqlite3CorruptError(tls, 71946) __20: ; goto moveto_index_finish @@ -94236,7 +94242,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71985:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -94246,7 +94252,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71970:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71983:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71998:20: */ var n I64 var i U8 @@ -94285,7 +94291,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72038:28: */ var rc int32 var idx int32 var pPage uintptr @@ -94322,7 +94328,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 72054) + return Xsqlite3CorruptError(tls, 72069) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -94355,7 +94361,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72023:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72083:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72098:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -94395,7 +94401,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72138:28: */ var rc int32 var pPage uintptr @@ -94449,7 +94455,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:72123:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72172:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:72187:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -94483,7 +94489,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72210:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:72225:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -94550,7 +94556,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72234) + return Xsqlite3CorruptError(tls, 72249) __1: ; if !(n > U32(0)) { @@ -94631,7 +94637,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 72290) + rc = Xsqlite3CorruptError(tls, 72305) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -94673,7 +94679,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 72319) + rc = Xsqlite3CorruptError(tls, 72334) goto end_allocate_page goto __23 __22: @@ -94718,7 +94724,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 72353) + rc = Xsqlite3CorruptError(tls, 72368) goto end_allocate_page __32: ; @@ -94832,7 +94838,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 72418) + rc = Xsqlite3CorruptError(tls, 72433) goto end_allocate_page __51: ; @@ -95007,7 +95013,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72532:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:72547:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -95028,7 +95034,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 72545) + return Xsqlite3CorruptError(tls, 72560) __1: ; if !(pMemPage != 0) { @@ -95098,7 +95104,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72592) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72607) goto freepage_out __10: ; @@ -95115,7 +95121,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72603) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72618) goto freepage_out __12: ; @@ -95196,14 +95202,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72666:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72681:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72675:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72690:28: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -95215,7 +95221,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72692) + return Xsqlite3CorruptError(tls, 72707) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -95230,7 +95236,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72724) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -95250,7 +95256,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72729) + rc = Xsqlite3CorruptError(tls, 72744) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -95282,7 +95288,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72770:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72785:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -95464,7 +95470,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72960:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72975:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -95482,7 +95488,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72988) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73003) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -95518,7 +95524,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73024:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:73039:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -95679,7 +95685,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:73199:9 */ +} /* sqlite3.c:73214:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -95756,11 +95762,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:73199:26 */ +type CellArray = CellArray1 /* sqlite3.c:73214:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73213:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:73228:13: */ for N > 0 { @@ -95777,7 +95783,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73246:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -95785,7 +95791,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73231 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73252:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -95804,7 +95810,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:73237: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73256:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:73271:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -95835,12 +95841,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 73289) + return Xsqlite3CorruptError(tls, 73304) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 73294) + return Xsqlite3CorruptError(tls, 73309) } pData -= uintptr(sz) @@ -95848,7 +95854,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 73300) + return Xsqlite3CorruptError(tls, 73315) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -95898,7 +95904,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73346:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73361:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -95936,7 +95942,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 73385) + Xsqlite3CorruptError(tls, 73400) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -95963,7 +95969,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73411:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:73426:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -96015,7 +96021,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73470:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:73485:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96049,7 +96055,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 73496) + return Xsqlite3CorruptError(tls, 73511) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -96189,7 +96195,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73599:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73614:12: */ bp := tls.Alloc(140) defer tls.Free(140) @@ -96202,7 +96208,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73609) + return Xsqlite3CorruptError(tls, 73624) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of @@ -96300,7 +96306,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73754:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73769:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -96380,7 +96386,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73836:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73851:12: */ bp := tls.Alloc(344) defer tls.Free(344) @@ -96682,7 +96688,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74032) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74047) goto balance_cleanup __25: ; @@ -96710,7 +96716,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74056) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74071) goto balance_cleanup __27: ; @@ -96889,7 +96895,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74157) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74172) goto balance_cleanup __55: ; @@ -96963,7 +96969,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74190) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74205) goto balance_cleanup __67: ; @@ -97036,7 +97042,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74232) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74247) goto balance_cleanup __75: ; @@ -97073,7 +97079,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74265) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74280) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -97157,7 +97163,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74311) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74326) goto balance_cleanup __92: ; @@ -97410,7 +97416,7 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74468) + *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74483) goto balance_cleanup __126: ; @@ -97632,7 +97638,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74633:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74648:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -97683,13 +97689,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74706:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74698) + return Xsqlite3CorruptError(tls, 74713) } } return SQLITE_OK @@ -97703,7 +97709,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74691: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74729:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -97822,7 +97828,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74714:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74840:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74855:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -97864,7 +97870,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74883:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97878,7 +97884,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74895) + return Xsqlite3CorruptError(tls, 74910) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -97902,7 +97908,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74914) + rc = Xsqlite3CorruptError(tls, 74929) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -97949,7 +97955,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74962:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74977:20: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -98021,7 +98027,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 75019) + return Xsqlite3CorruptError(tls, 75034) __4: ; __2: @@ -98149,7 +98155,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75119) + *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75134) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -98212,7 +98218,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 75155) + return Xsqlite3CorruptError(tls, 75170) __31: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -98260,13 +98266,13 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 75182) + return Xsqlite3CorruptError(tls, 75197) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 75185) + return Xsqlite3CorruptError(tls, 75200) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) @@ -98374,7 +98380,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75271:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:75286:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -98401,7 +98407,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75285) + return Xsqlite3CorruptError(tls, 75300) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -98424,7 +98430,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 75308) + return Xsqlite3CorruptError(tls, 75323) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -98506,7 +98512,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75381:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:75396:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -98534,11 +98540,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 75410) + return Xsqlite3CorruptError(tls, 75425) } pCell = (*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*iCellIdx)))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 75414) + return Xsqlite3CorruptError(tls, 75429) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must @@ -98647,7 +98653,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1))))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 75504) + return Xsqlite3CorruptError(tls, 75519) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -98724,7 +98730,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75578:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:75593:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -98754,7 +98760,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75612) + return Xsqlite3CorruptError(tls, 75627) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -98797,7 +98803,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75660) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75675) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) @@ -98860,7 +98866,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75723:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75738:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -98870,7 +98876,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75735:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75750:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -98886,7 +98892,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75750) + return Xsqlite3CorruptError(tls, 75765) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -98900,7 +98906,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75757) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75772) goto cleardatabasepage_out __3: ; @@ -99004,7 +99010,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75802:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75817:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -99027,7 +99033,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75828:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75843:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -99049,7 +99055,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75852:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75867:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -99059,7 +99065,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75861) + return Xsqlite3CorruptError(tls, 75876) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -99131,7 +99137,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:75937:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75952:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -99157,7 +99163,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75966:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75981:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -99176,7 +99182,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75996:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:76011:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -99202,7 +99208,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76028:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:76043:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -99265,12 +99271,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76097:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76112:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76105:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:76120:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -99297,13 +99303,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76135:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:76150:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76143:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:76158:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -99314,7 +99320,7 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76157:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76172:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -99336,7 +99342,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:76 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76177:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:76192:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -99363,7 +99369,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76206:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:76221:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -99447,7 +99453,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76310:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -99459,7 +99465,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:76295:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76305:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:76320:12: */ var j U32 var i U32 var x U32 @@ -99498,7 +99504,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76339:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:76354:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey @@ -99887,7 +99893,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76618:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76633:21: */ bp := tls.Alloc(248) defer tls.Free(248) @@ -100121,7 +100127,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76773:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76788:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -100132,14 +100138,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76786:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76801:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76810:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -100153,7 +100159,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76795: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76809:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76824:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -100169,7 +100175,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76828:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76843:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -100192,7 +100198,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7682 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76854:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76869:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -100206,7 +100212,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76870:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76885:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -100219,7 +100225,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76887:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76902:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -100243,7 +100249,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76917:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76932:20: */ var rc int32 rc = func() int32 { @@ -100283,7 +100289,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76965:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76980:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -100291,7 +100297,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:769 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76976:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76991:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -100323,29 +100329,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77011:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:77026:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77018:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77033:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77025:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:77040:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77031:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77046:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77040:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77055:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -100385,7 +100391,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77129:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:77144:14: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -100417,7 +100423,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77174:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -100427,7 +100433,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77159:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77171:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:77186:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+6157, 0) return SQLITE_ERROR @@ -100441,7 +100447,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77187:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:77202:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -100501,14 +100507,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77264:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:77279:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77273:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:77288:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100570,7 +100576,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77342:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:77357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100585,7 +100591,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77370:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -100595,7 +100601,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:77355:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77367:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:77382:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -100833,7 +100839,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77636:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -100891,13 +100897,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77621 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77675:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77690:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77689:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77704:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -100911,7 +100917,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77711:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77726:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -100932,7 +100938,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:77736:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77751:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -100947,7 +100953,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77766:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -100961,7 +100967,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77751: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77768:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77783:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -101055,7 +101061,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77926:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77941:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -101093,7 +101099,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78019:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:78034:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -101113,7 +101119,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78054:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:78069:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -101169,7 +101175,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78117:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:78132:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -101187,7 +101193,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78138:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78153:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -101202,7 +101208,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7813 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78155:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78170:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -101227,7 +101233,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78179:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78194:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -101249,7 +101255,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78210:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78225:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -101271,7 +101277,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78236:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:78251:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -101297,7 +101303,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:78286:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -101327,7 +101333,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78302:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:78317:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -101349,7 +101355,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78342:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -101368,7 +101374,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78327 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78365:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -101387,7 +101393,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:78350:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78386:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -101397,7 +101403,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:78371:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78398:28: */ if r <= float64(minInt) { return minInt @@ -101409,8 +101415,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:78383:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78395:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78396:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:78410:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:78411:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -101421,7 +101427,7 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78434:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101430,7 +101436,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78419:28: */ return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78439:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -101451,7 +101457,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:78424: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78463:31: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101461,7 +101467,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78448:31: return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78454:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:78469:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -101479,7 +101485,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78475:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:78490:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -101492,7 +101498,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78486:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78501:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -101513,7 +101519,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:784 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78515:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -101522,7 +101528,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78530:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78545:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -101537,7 +101543,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78549:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:78564:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -101554,7 +101560,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78564:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78579:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101581,7 +101587,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78597:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78612:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -101635,7 +101641,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78640:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78655:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -101652,7 +101658,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78675:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -101660,13 +101666,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78660:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78667:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78682:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78676:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78691:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -101681,7 +101687,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78706:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78721:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -101689,7 +101695,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78716:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78731:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -101699,14 +101705,15 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78726:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78741:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78732:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78747:21: */ + vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType @@ -101726,7 +101733,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78751:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78767:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -101739,7 +101746,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78778:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78794:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -101756,7 +101763,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78812:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -101772,13 +101779,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78796: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78852:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78868:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78857:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78873:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -101794,7 +101801,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78873:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78889:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -101816,7 +101823,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78896:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78912:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) @@ -101837,7 +101844,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78922:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78938:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -101950,11 +101957,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79031:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:79047:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79040) + return Xsqlite3CorruptError(tls, 79056) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -101969,7 +101976,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:79054:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:79070:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -101994,7 +102001,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79086:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79102:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -102039,7 +102046,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:790 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79129:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:79145:27: */ if !(pVal != 0) { return uintptr(0) } @@ -102055,7 +102062,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79147:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:79163:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -102072,7 +102079,7 @@ type ValueNewStat4Ctx = struct { FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:79160:1 */ +} /* sqlite3.c:79176:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -102083,7 +102090,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79194:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -102139,7 +102146,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:79178 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79240:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79256:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -102285,7 +102292,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79336:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:79352:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -102533,7 +102540,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79491:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79507:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -102556,7 +102563,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79520:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:79536:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102624,7 +102631,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79595:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79611:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -102669,7 +102676,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79640:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79656:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -102679,7 +102686,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79657:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79673:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102700,7 +102707,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79675) + return Xsqlite3CorruptError(tls, 79691) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -102715,14 +102722,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79681) + return Xsqlite3CorruptError(tls, 79697) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79687) + return Xsqlite3CorruptError(tls, 79703) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -102738,7 +102745,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79718:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -102753,14 +102760,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79702:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79720:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79736:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79749:21: */ if !(v != 0) { return } @@ -102771,14 +102778,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79733:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79744:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79760:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79747:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79763:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -102798,7 +102805,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79790:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79806:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -102822,12 +102829,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79817:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79833:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79824:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79840:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -102837,7 +102844,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79835:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79851:21: */ if p == uintptr(0) { return } @@ -102850,7 +102857,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79885:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79901:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -102881,7 +102888,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7988 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79938:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -102934,7 +102941,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79922 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79993:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80009:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -102943,7 +102950,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:79999:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:80015:20: */ var i int32 var pOp uintptr @@ -102966,26 +102973,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80038:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:80054:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80041:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:80057: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:80044:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:80060:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80050:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:80066:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80057:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:80073:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -102998,7 +103005,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80072:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:80088:21: */ var ap Va_list _ = ap var i int32 @@ -103046,7 +103053,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80095:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80111:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -103060,7 +103067,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80119:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:80135:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -103092,7 +103099,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80156:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:80172:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) @@ -103102,7 +103109,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80175:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80191:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -103118,7 +103125,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80199:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:80215:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -103142,7 +103149,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80243:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -103153,7 +103160,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:80227: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80241:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:80257:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -103164,7 +103171,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80252:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:80268:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 @@ -103175,7 +103182,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80271:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:80287:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -103210,14 +103217,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80309:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:80325:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80318:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:80334:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0)))) @@ -103229,7 +103236,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80333:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:80349:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -103242,12 +103249,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80355:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:80371:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80378:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } @@ -103270,7 +103277,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:80362:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80558:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:80574:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -103399,7 +103406,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80660:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80676:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -103430,7 +103437,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8066 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80717:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80733:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -103446,7 +103453,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80737:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80753:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -103490,23 +103497,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80813:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80829:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80816:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80832:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80819:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80835:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80822:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80838:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80841:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 @@ -103515,7 +103522,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80825 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80834:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80850:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -103530,7 +103537,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80851:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80867:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -103541,26 +103548,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80871:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80887:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80880:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80896:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80884:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80900: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:80888:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80904:13: */ switch p4type { case -16: @@ -103621,7 +103628,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80937:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80953:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { @@ -103636,18 +103643,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80955:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80971:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80963:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80979:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80970:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80986:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -103663,7 +103670,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80986:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:81002:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -103687,7 +103694,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81046:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:81062:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -103704,7 +103711,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81065:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:81081:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -103751,7 +103758,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81108:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:81124:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -103767,7 +103774,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81128:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:81144:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -103788,7 +103795,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81194:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:81210:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -103802,11 +103809,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:81197:17: */ +var dummy VdbeOp /* sqlite3.c:81213:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81398:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:81414:21: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -103969,7 +103976,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 6311, ts + 6313, ts + 6315, ts + 6320} /* sqlite3.c:81428:25 */ +var encnames = [4]uintptr{ts + 6311, ts + 6313, ts + 6315, ts + 6320} /* sqlite3.c:81444:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -103977,7 +103984,7 @@ var encnames = [4]uintptr{ts + 6311, ts + 6313, ts + 6315, ts + 6320} /* sqlite3 // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81523:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:81539:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { @@ -104004,7 +104011,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:815 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81570:21: */ var i int32 var db uintptr var aDb uintptr @@ -104023,7 +104030,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:81554:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81591:29: */ var i int32 var db uintptr var aDb uintptr @@ -104038,7 +104045,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81575:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81605:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -104046,7 +104053,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81589:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81631:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81647:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -104056,7 +104063,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81662:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -104100,7 +104107,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81646:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81724:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -104112,7 +104119,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81708:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81723:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81739:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -104211,7 +104218,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 @@ -104240,7 +104247,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81835:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81867:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81883:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -104329,7 +104336,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:82012:1 */ +} /* sqlite3.c:82028:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -104344,7 +104351,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82032:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:82048:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -104361,7 +104368,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82071:21: */ // There should be at least one opcode. @@ -104394,7 +104401,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:82055:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82108:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:82124:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -104503,11 +104510,11 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite var azColName = [12]uintptr{ ts + 6325, ts + 6330, ts + 6337, ts + 6340, ts + 6343, ts + 6346, ts + 6349, ts + 6352, ts + 6360, ts + 6363, ts + 6370, ts + 6378, -} /* sqlite3.c:82156:23 */ +} /* sqlite3.c:82172:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82233:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:82249:21: */ if pCx == uintptr(0) { return } @@ -104541,7 +104548,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82279:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -104557,7 +104564,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:82263:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82281:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:82297:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -104581,7 +104588,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82326:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -104612,7 +104619,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:82310:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82340:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:82356:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -104637,7 +104644,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82365:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:82381:20: */ var rc int32 var pColName uintptr @@ -104656,7 +104663,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82393:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:82409:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -104884,7 +104891,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:82428:23 */ +} /* sqlite3.c:82444:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -104902,7 +104909,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82689:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82705:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -104945,7 +104952,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:82735:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82751:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -104960,7 +104967,7 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82754:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82770:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { @@ -104983,7 +104990,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82797:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -105187,7 +105194,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82781:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:83007:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -105197,7 +105204,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82991: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83003:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83019:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -105226,7 +105233,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83069:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -105278,7 +105285,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83053:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83166:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -105302,7 +105309,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83150:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83176:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:83192:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -105327,7 +105334,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83204:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83220:21: */ var pSub uintptr var pNext uintptr @@ -105348,7 +105355,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83261:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -105371,7 +105378,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:83245:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83271:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83287:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -105384,7 +105391,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 83281) + return Xsqlite3CorruptError(tls, 83297) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -105396,7 +105403,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:832 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83313:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -105414,7 +105421,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83297:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83312:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83328:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) @@ -105433,7 +105440,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83333:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:83349:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -105508,10 +105515,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:83470:17 */ +} /* sqlite3.c:83486:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83490:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:83506:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -105521,7 +105528,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:83499:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:83515:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -105570,7 +105577,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83570:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:83586:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -105621,7 +105628,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83624:13: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83640:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -105648,7 +105655,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* s } } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83659:21: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* sqlite3.c:83675:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -105751,7 +105758,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83742:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83758:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -105765,7 +105772,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83765:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83781:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -105783,7 +105790,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83785:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83801:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -105844,7 +105851,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83982:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83998:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -105887,7 +105894,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84035:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -105900,7 +105907,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:84019:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84032:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:84048:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -105940,7 +105947,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84065:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:84081:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) @@ -105986,7 +105993,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84098:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:84114:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -106080,7 +106087,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84197:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:84213:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -106143,7 +106150,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84252:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:84268:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -106185,7 +106192,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84283)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84299)) return 0 // Corruption } @@ -106250,7 +106257,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84376)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -106285,7 +106292,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84390)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84406)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -106346,7 +106353,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84449:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84465:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -106357,7 +106364,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84466:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84482:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -106462,7 +106469,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84560:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:84576:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -106486,7 +106493,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84585)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84601)) return 0 // Corruption } nCmp = func() int32 { @@ -106524,7 +106531,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84624:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84640:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -106578,7 +106585,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84675:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84691:20: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -106663,7 +106670,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) - return Xsqlite3CorruptError(tls, 84740) + return Xsqlite3CorruptError(tls, 84756) } // Compare the key of the index entry that cursor pC is pointing to against @@ -106675,7 +106682,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84754:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84770:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -106691,7 +106698,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84773) + return Xsqlite3CorruptError(tls, 84789) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -106705,7 +106712,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84789:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84805:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange @@ -106713,7 +106720,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84815:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } @@ -106733,7 +106740,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84799:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84821:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84837:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) @@ -106741,12 +106748,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84831:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84847:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84854:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -106756,7 +106763,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84838: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84850:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84866:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 @@ -106776,7 +106783,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84872:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84888:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 @@ -106792,7 +106799,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84907:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -106823,7 +106830,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84891 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84922:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84938:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -106839,7 +106846,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84943:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84959:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -106856,7 +106863,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84962:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84978:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -106908,7 +106915,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84992:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -106934,7 +106941,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84976:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85071:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } @@ -106942,7 +106949,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85055:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85082:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+6552, 0) return 1 @@ -106952,7 +106959,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85066:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85090:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+6597, 0) return 1 @@ -106964,7 +106971,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85074:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85088:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:85104:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -106997,7 +107004,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85142:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -107007,7 +107014,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85135) + return Xsqlite3MisuseError(tls, 85151) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -107027,7 +107034,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85126: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85169:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -107049,7 +107056,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85153:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85174:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -107071,7 +107078,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85199:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85215:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -107094,27 +107101,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:851 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85212:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85228:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85215:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85231:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85218:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:85234:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85221:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85237:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85224:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:85240:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85227:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:85243:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -107124,7 +107131,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85231:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:85247:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -107137,26 +107144,26 @@ 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:85244:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85260:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85248:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85264:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85251:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85267:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85254:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:85270:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85262:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85278:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -107225,20 +107232,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:85263:19 */ +} /* sqlite3.c:85279:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85348:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85364:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85353:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:85369:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85359:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:85375:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -107264,7 +107271,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:853 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85398:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -107279,7 +107286,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:85382:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85398:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:85414:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -107293,7 +107300,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85417:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:85433:12: */ if xDel == uintptr(0) { // noop @@ -107306,12 +107313,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85433:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85449: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:85443:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:85459:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -107320,39 +107327,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85457:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:85473: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:85461:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85477:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85467:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:85483:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85473:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:85489:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85477:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:85493:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85481:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85497: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:85485:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:85501:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -107360,19 +107367,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85497:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:85513:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85503:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85519:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85512:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:85528:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -107384,32 +107391,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85529:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85545:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85538:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85554:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85547:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:85563:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85557:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:85573:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85561:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:85577:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85565:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:85581:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { @@ -107419,7 +107426,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85578:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:85594:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -107433,7 +107440,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85590:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85606:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+6637, int64(-1), @@ -107441,7 +107448,7 @@ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85 } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85598:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85614:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -107451,7 +107458,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:855 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85626:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -107461,7 +107468,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85610:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85640:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -107488,7 +107495,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85624:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85654:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85670:12: */ var db uintptr var rc int32 @@ -107655,14 +107662,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85804:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85795) + return Xsqlite3MisuseError(tls, 85811) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -107702,7 +107709,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85788:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85853:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -107715,7 +107722,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85837:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85852:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85868:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -107732,14 +107739,14 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85871:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85887:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). -func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85880:12: */ +func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* sqlite3.c:85896:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -107797,13 +107804,13 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85928:16: */ +func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85944:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. -func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85936:16: */ +func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* sqlite3.c:85952:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } @@ -107812,7 +107819,7 @@ func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { / // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85947:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85963:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -107835,7 +107842,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85967:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85983:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -107855,7 +107862,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85989:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:86005:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -107873,7 +107880,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86010:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:86026:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -107896,7 +107903,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86038:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:86054:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -107976,13 +107983,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86091:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86107:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86100:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86116:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -107992,7 +107999,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86109:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -108001,19 +108008,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8610 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86118:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:86134:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:86128:20 */ +} /* sqlite3.c:86144:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86158:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86174:12: */ var pVm uintptr var pOut uintptr @@ -108048,7 +108055,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:861 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86209:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -108065,7 +108072,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:86193:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86213:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86229:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -108075,43 +108082,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86223:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86239: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:86228:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86244: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:86233:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:86249: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:86238:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86254: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:86243:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:86259: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:86248:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86264: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:86253:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86269:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -108121,13 +108128,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86263:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86279: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:86269:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86285:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -108147,7 +108154,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86291:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:86307:19: */ var ret uintptr var p uintptr var n int32 @@ -108179,11 +108186,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86340:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86356:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86344:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86360:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -108192,44 +108199,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86363:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86367:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86379:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86395:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86383:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86399:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86393:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86409:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86397:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86413:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86407:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86423:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86411:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:86427:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -108246,13 +108253,13 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86449:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 86436) + return Xsqlite3MisuseError(tls, 86452) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { @@ -108260,7 +108267,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+6670, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 86444) + return Xsqlite3MisuseError(tls, 86460) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -108294,7 +108301,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:86433:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86476:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:86492:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -108320,16 +108327,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86512:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86528:16: */ return bindText(tls, pStmt, i, zData, int64(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:86524:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:86540:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86534:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:86550:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -108340,11 +108347,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:86544:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:86560: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:86547:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:86563:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -108355,7 +108362,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:86557:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:86573:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -108365,7 +108372,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:86566:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:86582:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -108378,11 +108385,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:86584:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86600:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86593:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:86609:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -108390,11 +108397,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86606:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:86622:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86616:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:86632:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -108443,7 +108450,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:86650:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:86666:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -108454,7 +108461,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:86664:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86680:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -108471,7 +108478,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86683:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86699:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -108483,7 +108490,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86694:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86710:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -108494,19 +108501,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86705:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86721:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } 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:86709:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86725:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86716:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86732:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -108529,7 +108536,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86743:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86759:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -108550,7 +108557,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86767:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86783:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -108559,7 +108566,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:867 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86775:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86791:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } @@ -108568,7 +108575,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86783:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86799:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } @@ -108576,7 +108583,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86806:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -108585,7 +108592,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86790 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86801:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86817:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -108598,7 +108605,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86822:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -108624,7 +108631,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86868:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -108639,7 +108646,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86852:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86866:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86882:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -108654,7 +108661,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86904:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86920:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -108667,7 +108674,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86923:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86939:16: */ var p uintptr var pMem uintptr var rc int32 @@ -108681,7 +108688,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86931) + rc = Xsqlite3MisuseError(tls, 86947) goto preupdate_old_out __1: ; @@ -108773,7 +108780,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86987:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87003:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -108792,7 +108799,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87005:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87021:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -108804,7 +108811,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87016:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:87032:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -108816,7 +108823,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87027:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:87043:16: */ var p uintptr var rc int32 var pMem uintptr @@ -108830,7 +108837,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87033) + rc = Xsqlite3MisuseError(tls, 87049) goto preupdate_new_out __1: ; @@ -108971,7 +108978,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87197:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:87213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -109016,7 +109023,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87240:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:87256:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -109239,7 +109246,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87603:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* sqlite3.c:87619:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -109310,7 +109317,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87679:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87695:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -109332,7 +109339,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87703:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87719:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109378,7 +109385,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87743:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87759:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -109410,7 +109417,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87782:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87798:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -109422,7 +109429,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87796:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87812:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -109430,7 +109437,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87826:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -109466,7 +109473,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87810:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87857:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -109480,13 +109487,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87841:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88016:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:88032:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88021:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:88037:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 @@ -109502,7 +109509,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. -func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88039:12: */ +func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:88055:12: */ var i int32 var mx int32 var h U64 = uint64(0) @@ -109526,7 +109533,7 @@ func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* sqlite3.c:880 } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88061:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:88077:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } @@ -109536,11 +109543,11 @@ var azTypes = [5]uintptr{ ts + 1102, ts + 1080, ts + 1525, -} /* sqlite3.c:88062:21 */ +} /* sqlite3.c:88078:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88076:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:88092:20: */ bp := tls.Alloc(976) defer tls.Free(976) @@ -111650,6 +111657,10 @@ __5: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 @@ -114669,7 +114680,27 @@ __70: // The VDBE cursor Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: + if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { + goto __354 + } + rc = Xsqlite3VdbeFinishMoveto(tls, pC) + if !(rc != 0) { + goto __355 + } + goto abort_due_to_error +__355: + ; +__354: + ; + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { + goto __356 + } + Xsqlite3VdbeMemSetNull(tls, pOut) + goto __357 +__356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) +__357: + ; __353: ; goto __8 @@ -114705,10 +114736,10 @@ __71: // PseudoTable input register // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { - goto __354 + goto __358 } goto abort_due_to_error -__354: +__358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -114716,13 +114747,13 @@ __354: aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __355 + goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { - goto __356 + goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { - goto __358 + goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record @@ -114731,14 +114762,14 @@ __354: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __359 -__358: + goto __363 +__362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__359: +__363: ; - goto __357 -__356: + goto __361 +__360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) @@ -114746,12 +114777,12 @@ __356: // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __360 + goto __364 } goto too_big -__360: +__364: ; -__357: +__361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { @@ -114766,7 +114797,7 @@ __357: (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __361 + goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain @@ -114784,13 +114815,13 @@ __357: // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { - goto __363 + goto __367 } goto op_column_corrupt -__363: +__367: ; - goto __362 -__361: + goto __366 +__365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. @@ -114807,38 +114838,38 @@ __361: // Conditional skipped goto op_column_read_header -__362: +__366: ; -__355: +__359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __364 + goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __366 + goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __368 + goto __372 } libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { - goto __370 + goto __374 } goto abort_due_to_error -__370: +__374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz - goto __369 -__368: + goto __373 +__372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow -__369: +__373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. @@ -114848,27 +114879,27 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__371: +__375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __374 + goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) - goto __375 -__374: + goto __379 +__378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) -__375: +__379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __372 -__372: + goto __376 +__376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { - goto __371 + goto __375 } - goto __373 -__373: + goto __377 +__377: ; // The record is corrupt if any of the following are true: @@ -114877,63 +114908,63 @@ __373: // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { - goto __376 + goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __377 + goto __381 } i2 = 0 zHdr = zEndHdr - goto __378 -__377: + goto __382 +__381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __379 + goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) -__379: +__383: ; goto op_column_corrupt -__378: +__382: ; -__376: +__380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { - goto __380 + goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) -__380: +__384: ; - goto __367 -__366: + goto __371 +__370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) -__367: +__371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { - goto __381 + goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { - goto __382 + goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __383 -__382: + goto __387 +__386: Xsqlite3VdbeMemSetNull(tls, pDest) -__383: +__387: ; goto op_column_out -__381: +__385: ; - goto __365 -__364: + goto __369 +__368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) -__365: +__369: ; // Extract the content for the p2+1-th column. Control can only @@ -114941,55 +114972,55 @@ __365: // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __384 + goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) -__384: +__388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { - goto __385 + goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { - goto __387 + goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __388 -__387: + goto __392 +__391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __389 + goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __391 + goto __395 } goto no_mem -__391: +__395: ; - goto __390 -__389: + goto __394 +__393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__390: +__394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] -__388: +__392: ; - goto __386 -__385: + goto __390 +__389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { - goto __392 + goto __396 } // Content is irrelevant for // 1. the typeof() function, @@ -115004,20 +115035,20 @@ __385: // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) - goto __393 -__392: + goto __397 +__396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __394 + goto __398 } goto abort_due_to_error -__394: +__398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__393: +__397: ; -__386: +__390: ; op_column_out: @@ -115027,15 +115058,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __395 + goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __396 -__395: - rc = Xsqlite3CorruptError(tls, 90286) + goto __400 +__399: + rc = Xsqlite3CorruptError(tls, 90310) goto abort_due_to_error -__396: +__400: ; // Opcode: TypeCheck P1 P2 P3 P4 * @@ -115070,81 +115101,81 @@ __72: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 -__397: +__401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __399 + goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __400 + goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __401 + goto __405 } - goto __398 -__401: + goto __402 +__405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __402 + goto __406 } pIn1 += 56 - goto __398 -__402: + goto __402 +__406: ; -__400: +__404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __403 + goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __405 - case COLTYPE_INTEGER: - goto __406 - case COLTYPE_INT: - goto __407 - case COLTYPE_TEXT: - goto __408 - case COLTYPE_REAL: goto __409 - default: + case COLTYPE_INTEGER: goto __410 - } - goto __404 -__405: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + case COLTYPE_INT: goto __411 - } - goto vdbe_type_error -__411: - ; - goto __404 - -__406: -__407: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + case COLTYPE_TEXT: goto __412 - } - goto vdbe_type_error -__412: - ; - goto __404 - -__408: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + case COLTYPE_REAL: goto __413 + default: + goto __414 + } + goto __408 +__409: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + goto __415 } goto vdbe_type_error -__413: +__415: ; - goto __404 + goto __408 -__409: +__410: +__411: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + goto __416 + } + goto vdbe_type_error +__416: + ; + goto __408 + +__412: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __417 + } + goto vdbe_type_error +__417: + ; + goto __408 + +__413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __414 + goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -115152,45 +115183,45 @@ __409: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __416 + goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __417 -__416: + goto __421 +__420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__417: +__421: ; - goto __415 -__414: + goto __419 +__418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __418 + goto __422 } goto vdbe_type_error -__418: +__422: ; -__415: +__419: ; - goto __404 + goto __408 -__410: +__414: // COLTYPE_ANY. Accept anything. - goto __404 + goto __408 -__404: +__408: ; -__403: +__407: ; pIn1 += 56 - goto __398 -__398: + goto __402 +__402: i3++ - goto __397 - goto __399 -__399: + goto __401 + goto __403 +__403: ; goto __8 @@ -115215,14 +115246,14 @@ __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__419: +__423: if !(1 != 0) { - goto __420 + goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __421 + goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal @@ -115230,30 +115261,30 @@ __419: // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __422 + goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __423 -__422: + goto __427 +__426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__423: +__427: ; -__421: +__425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __424 + goto __428 } - goto __420 -__424: + goto __424 +__428: ; pIn1 += 56 - goto __419 -__420: + goto __423 +__424: ; goto __8 @@ -115317,31 +115348,31 @@ __74: // Where to write next byte of the payload // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { - goto __425 + goto __429 } pRec = pData0 -__426: +__430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __429 + goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__429: +__433: ; zAffinity1++ pRec += 56 - goto __427 -__427: + goto __431 +__431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __426 + goto __430 } - goto __428 -__428: + goto __432 +__432: ; -__425: +__429: ; // Loop through the elements that will make up the record to figure @@ -115370,13 +115401,13 @@ __425: // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast -__430: +__434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __433 + goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __435 + goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while @@ -115386,77 +115417,77 @@ __430: // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __436 -__435: + goto __440 +__439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__436: +__440: ; nHdr++ - goto __434 -__433: + goto __438 +__437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __437 + goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { - goto __439 + goto __443 } uu = U64(^i4) - goto __440 -__439: + goto __444 +__443: uu = U64(i4) -__440: +__444: ; nHdr++ if !(uu <= uint64(127)) { - goto __441 + goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { - goto __443 + goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __444 -__443: + goto __448 +__447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__444: +__448: ; - goto __442 -__441: + goto __446 +__445: if !(uu <= uint64(32767)) { - goto __445 + goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __446 -__445: + goto __450 +__449: if !(uu <= uint64(8388607)) { - goto __447 + goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __448 -__447: + goto __452 +__451: if !(uu <= uint64(2147483647)) { - goto __449 + goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __450 -__449: + goto __454 +__453: if !(uu <= uint64(140737488355327)) { - goto __451 + goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __452 -__451: + goto __456 +__455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __453 + goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating @@ -115465,79 +115496,79 @@ __451: *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __454 -__453: + goto __458 +__457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__458: + ; +__456: + ; __454: ; __452: ; __450: ; -__448: - ; __446: ; -__442: - ; - goto __438 -__437: + goto __442 +__441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __455 + goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __456 -__455: + goto __460 +__459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __457 + goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __458 + goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __460 + goto __464 } goto no_mem -__460: +__464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __459 -__458: + goto __463 +__462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__459: +__463: ; -__457: +__461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__456: +__460: + ; +__442: ; __438: ; -__434: - ; if !(pRec == pData0) { - goto __461 + goto __465 } - goto __432 -__461: + goto __436 +__465: ; pRec -= 56 - goto __431 -__431: + goto __435 +__435: if 1 != 0 { - goto __430 + goto __434 } - goto __432 -__432: + goto __436 +__436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint @@ -115546,22 +115577,22 @@ __432: // itself. if !(nHdr <= 126) { - goto __462 + goto __466 } // The common case nHdr = nHdr + 1 - goto __463 -__462: + goto __467 +__466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __464 + goto __468 } nHdr++ -__464: +__468: ; -__463: +__467: ; nByte1 = I64(U64(nHdr) + nData) @@ -115570,37 +115601,37 @@ __463: // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __465 + goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __466 -__465: + goto __470 +__469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __467 + goto __471 } goto too_big -__467: +__471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __468 + goto __472 } goto no_mem -__468: +__472: ; -__466: +__470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __469 + goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) -__469: +__473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz @@ -115615,7 +115646,7 @@ __469: }()) pRec = pData0 -__470: +__474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. @@ -115628,13 +115659,13 @@ __470: // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content - goto __471 -__471: + goto __475 +__475: if libc.PreIncUintptr(&pRec, 56) <= pLast { - goto __470 + goto __474 } - goto __472 -__472: + goto __476 +__476: ; goto __8 @@ -115653,20 +115684,20 @@ __75: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __473 + goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __474 -__473: + goto __478 +__477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { - goto __475 + goto __479 } goto abort_due_to_error -__475: +__479: ; -__474: +__478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) @@ -115687,17 +115718,17 @@ __76: // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { - goto __476 + goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __478 + goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+6837, 0) rc = SQLITE_BUSY - goto __479 -__478: + goto __483 +__482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction @@ -115708,16 +115739,16 @@ __478: rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __480 + goto __484 } goto abort_due_to_error -__480: +__484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __481 + goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) @@ -115725,14 +115756,14 @@ __480: // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __482 + goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __483 -__482: + goto __487 +__486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__483: +__487: ; // Link the new savepoint into the database handle's list. @@ -115740,121 +115771,96 @@ __483: (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__481: +__485: ; -__479: +__483: ; - goto __477 -__476: + goto __481 +__480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__484: +__488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __486 + goto __490 } iSavepoint++ - goto __485 -__485: + goto __489 +__489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __484 - goto __486 -__486: + goto __488 + goto __490 +__490: ; if !!(pSavepoint != 0) { - goto __487 + goto __491 } Xsqlite3VdbeError(tls, p, ts+6888, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __488 -__487: + goto __492 +__491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __489 + goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+6910, 0) rc = SQLITE_BUSY - goto __490 -__489: + goto __494 +__493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __491 + goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __493 + goto __497 } goto vdbe_return -__493: +__497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __494 + goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__494: +__498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __495 + goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) + goto __500 +__499: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__500: + ; goto __496 __495: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__496: - ; - goto __492 -__491: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __497 - } - isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) - ii = 0 -__499: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __501 } - rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, - SQLITE_ABORT|int32(2)<<8, - libc.Bool32(isSchemaChange == 0)) - if !(rc != SQLITE_OK) { - goto __502 - } - goto abort_due_to_error -__502: - ; - goto __500 -__500: - ii++ - goto __499 - goto __501 -__501: - ; - goto __498 -__497: - ; - isSchemaChange = 0 -__498: - ; + isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, + SQLITE_ABORT|int32(2)<<8, + libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } @@ -115867,36 +115873,61 @@ __504: goto __503 goto __505 __505: + ; + goto __502 +__501: + ; + isSchemaChange = 0 +__502: + ; + ii = 0 +__507: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { + goto __509 + } + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __510 + } + goto abort_due_to_error +__510: + ; + goto __508 +__508: + ii++ + goto __507 + goto __509 +__509: ; if !(isSchemaChange != 0) { - goto __507 + goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__507: +__511: ; -__492: +__496: ; if !(rc != 0) { - goto __508 + goto __512 } goto abort_due_to_error -__508: +__512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. -__509: +__513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __510 + goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __509 -__510: + goto __513 +__514: ; // If it is a RELEASE, then destroy the savepoint being operated on @@ -115904,48 +115935,48 @@ __510: // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { - goto __511 + goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __513 + goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__513: +__517: ; - goto __512 -__511: + goto __516 +__515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__512: +__516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __514 + goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __515 + goto __519 } goto abort_due_to_error -__515: +__519: ; -__514: +__518: ; -__490: +__494: ; -__488: +__492: ; -__477: +__481: ; if !(rc != 0) { - goto __516 + goto __520 } goto abort_due_to_error -__516: +__520: ; goto __8 @@ -115966,18 +115997,18 @@ __77: // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __517 + goto __521 } if !(iRollback != 0) { - goto __519 + goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __520 -__519: + goto __524 +__523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. @@ -115985,43 +116016,43 @@ __519: ts+6964, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __522 -__521: + goto __526 +__525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __523 + goto __527 } goto vdbe_return - goto __524 -__523: + goto __528 +__527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__528: + ; +__526: + ; __524: ; -__522: - ; -__520: - ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __525 + goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__525: +__529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __526 + goto __530 } rc = SQLITE_DONE - goto __527 -__526: + goto __531 +__530: rc = SQLITE_ERROR -__527: +__531: ; goto vdbe_return - goto __518 -__517: + goto __522 +__521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { @@ -116037,7 +116068,7 @@ __517: rc = SQLITE_ERROR goto abort_due_to_error -__518: +__522: ; /*NOTREACHED*/ @@ -116079,66 +116110,66 @@ __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { - goto __528 + goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __529 + goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY - goto __530 -__529: + goto __534 +__533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT -__530: +__534: ; goto abort_due_to_error -__528: +__532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { - goto __531 + goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { - goto __532 + goto __536 } if !(rc&0xff == SQLITE_BUSY) { - goto __533 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__533: +__537: ; goto abort_due_to_error -__532: +__536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __534 + goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __535 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__535: +__539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __536 + goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__536: +__540: ; // Store the current value of the database handles deferred constraint @@ -116146,16 +116177,16 @@ __536: // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__534: +__538: ; -__531: +__535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __537 + goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the @@ -116175,20 +116206,20 @@ __531: // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { - goto __538 + goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__538: +__542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA -__537: +__541: ; if !(rc != 0) { - goto __539 + goto __543 } goto abort_due_to_error -__539: +__543: ; goto __8 @@ -116235,37 +116266,37 @@ __80: // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __540 + goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __541 -__540: + goto __545 +__544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __542 + goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__542: +__546: ; -__541: +__545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __543 + goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) -__543: +__547: ; if !(rc != 0) { - goto __544 + goto __548 } goto abort_due_to_error -__544: +__548: ; goto __8 @@ -116355,13 +116386,13 @@ __81: pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __545 + goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__545: +__549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen @@ -116370,11 +116401,11 @@ __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { - goto __546 + goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__546: +__550: ; nField1 = 0 @@ -116386,24 +116417,24 @@ __546: pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __547 + goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __549 + goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format -__549: +__553: ; - goto __548 -__547: + goto __552 +__551: wrFlag = 0 -__548: +__552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __550 + goto __554 } pIn2 = aMem + uintptr(p23)*56 @@ -116415,32 +116446,32 @@ __548: // If there were a failure, the prepared statement would have halted // before reaching this instruction. -__550: +__554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { - goto __551 + goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __552 -__551: + goto __556 +__555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __553 + goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__553: +__557: ; -__552: +__556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __554 + goto __558 } goto no_mem -__554: +__558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -116460,10 +116491,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __555 + goto __559 } goto abort_due_to_error -__555: +__559: ; goto __8 @@ -116482,10 +116513,10 @@ __84: // The new cursor pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __556 + goto __560 } goto no_mem -__556: +__560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -116540,7 +116571,7 @@ __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __557 + goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. @@ -116548,11 +116579,11 @@ __86: (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1524 /* "" */ -__557: +__561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __558 + goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is @@ -116561,71 +116592,71 @@ __557: (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __559 -__558: + goto __563 +__562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __560 + goto __564 } goto no_mem -__560: +__564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __561 + goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __562 + goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __563 + goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __565 + goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__565: +__569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __564 -__563: + goto __568 +__567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__564: +__568: ; -__562: +__566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __566 + goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__566: +__570: ; -__561: +__565: ; -__559: +__563: ; if !(rc != 0) { - goto __567 + goto __571 } goto abort_due_to_error -__567: +__571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -116644,19 +116675,19 @@ __87: pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __568 + goto __572 } goto no_mem -__568: +__572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __569 + goto __573 } goto abort_due_to_error -__569: +__573: ; goto __8 @@ -116671,10 +116702,10 @@ __88: pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __570 + goto __574 } goto jump_to_p2 -__570: +__574: ; goto __8 @@ -116698,10 +116729,10 @@ __89: pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __571 + goto __575 } goto no_mem -__571: +__575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -116826,7 +116857,7 @@ __94: // Only interested in == results (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __572 + goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors @@ -116836,10 +116867,10 @@ __94: // Only interested in == results pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __574 + goto __578 } applyNumericAffinity(tls, pIn3, 0) -__574: +__578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity @@ -116848,29 +116879,29 @@ __574: // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __575 + goto __579 } if !(int32(newType)&MEM_Real == 0) { - goto __576 + goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __577 + goto __581 } goto jump_to_p2 - goto __578 -__577: + goto __582 +__581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { - goto __579 + goto __583 } goto abort_due_to_error -__579: +__583: ; goto seek_not_found -__578: +__582: ; -__576: +__580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) @@ -116881,53 +116912,53 @@ __576: // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { - goto __580 + goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __582 + goto __586 } oc-- -__582: +__586: ; - goto __581 -__580: + goto __585 +__584: if !(c2 < 0) { - goto __583 + goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __584 + goto __588 } oc++ -__584: +__588: ; -__583: +__587: ; -__581: +__585: ; -__575: +__579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { - goto __585 + goto __589 } goto abort_due_to_error -__585: +__589: ; - goto __573 -__572: + goto __577 +__576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __586 + goto __590 } eqOnly = 1 -__586: +__590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -116952,97 +116983,97 @@ __586: (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { - goto __587 + goto __591 } goto abort_due_to_error -__587: +__591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { - goto __588 + goto __592 } goto seek_not_found -__588: +__592: ; -__573: +__577: ; if !(oc >= OP_SeekGE) { - goto __589 + goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { - goto __591 + goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __593 + goto __597 } if !(rc == SQLITE_DONE) { - goto __594 + goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __595 -__594: + goto __599 +__598: goto abort_due_to_error -__595: +__599: ; +__597: + ; + goto __596 +__595: + *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 +__596: + ; + goto __594 __593: - ; - goto __592 -__591: - *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 -__592: - ; - goto __590 -__589: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { - goto __596 + goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { - goto __598 + goto __602 } if !(rc == SQLITE_DONE) { - goto __599 + goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 - goto __600 -__599: + goto __604 +__603: goto abort_due_to_error +__604: + ; +__602: + ; + goto __601 __600: - ; -__598: - ; - goto __597 -__596: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__597: +__601: ; -__590: +__594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { - goto __601 + goto __605 } goto jump_to_p2 - goto __602 -__601: + goto __606 +__605: if !(eqOnly != 0) { - goto __603 + goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows -__603: +__607: ; -__602: +__606: ; goto __8 @@ -117100,10 +117131,10 @@ __95: pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __604 + goto __608 } goto __8 -__604: +__608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -117112,60 +117143,60 @@ __604: (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. -__605: +__609: if !(1 != 0) { - goto __606 + goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { - goto __607 + goto __611 } goto abort_due_to_error -__607: +__611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { - goto __608 + goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__608: +__612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { - goto __609 + goto __613 } goto jump_to_p2 - goto __606 -__609: + goto __610 +__613: ; if !(nStep <= 0) { - goto __610 + goto __614 } - goto __606 -__610: + goto __610 +__614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { - goto __611 + goto __615 } if !(rc == SQLITE_DONE) { - goto __612 + goto __616 } rc = SQLITE_OK goto seekscan_search_fail - goto __613 -__612: + goto __617 +__616: goto abort_due_to_error -__613: +__617: ; -__611: +__615: ; - goto __605 -__606: + goto __609 +__610: ; goto __8 @@ -117188,18 +117219,18 @@ __96: pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __614 + goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __615 -__614: + goto __619 +__618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __616 + goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__616: +__620: ; -__615: +__619: ; goto __8 @@ -117211,10 +117242,10 @@ __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __617 + goto __621 } goto jump_to_p2_and_check_for_interrupt -__617: +__621: ; goto __8 @@ -117309,10 +117340,10 @@ __98: pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __618 + goto __622 } goto __8 -__618: +__622: ; __99: // jump, in3 @@ -117325,15 +117356,15 @@ __101: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { - goto __619 + goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) - goto __620 -__619: + goto __624 +__623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { @@ -117343,62 +117374,62 @@ __619: }() if !(rc != 0) { - goto __621 + goto __625 } goto no_mem -__621: +__625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { - goto __622 + goto __626 } goto no_mem -__622: +__626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) -__620: +__624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __623 + goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 -__624: +__628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { - goto __626 + goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __627 + goto __631 } takeJump = 1 - goto __626 -__627: + goto __630 +__631: ; - goto __625 -__625: + goto __629 +__629: ii1++ - goto __624 - goto __626 -__626: + goto __628 + goto __630 +__630: ; -__623: +__627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { - goto __628 + goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) -__628: +__632: ; if !(rc != SQLITE_OK) { - goto __629 + goto __633 } goto abort_due_to_error -__629: +__633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) @@ -117406,31 +117437,31 @@ __629: (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __630 + goto __634 } if !(alreadyExists != 0) { - goto __632 + goto __636 } goto jump_to_p2 -__632: +__636: ; - goto __631 -__630: - ; - if !(takeJump != 0 || !(alreadyExists != 0)) { - goto __633 - } - goto jump_to_p2 -__633: - ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __634 - } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) + goto __635 __634: ; -__631: + if !(takeJump != 0 || !(alreadyExists != 0)) { + goto __637 + } + goto jump_to_p2 +__637: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { + goto __638 + } + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__638: + ; +__635: ; goto __8 @@ -117484,7 +117515,7 @@ __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __635 + goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted @@ -117494,14 +117525,14 @@ __102: *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { - goto __636 + goto __640 } goto jump_to_p2 -__636: +__640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey -__635: +__639: ; __103: // jump, in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -117522,25 +117553,25 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { - goto __637 + goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __638 + goto __642 } - rc = Xsqlite3CorruptError(tls, 92433) - goto __639 -__638: + rc = Xsqlite3CorruptError(tls, 92457) + goto __643 +__642: goto jump_to_p2 -__639: +__643: ; -__637: +__641: ; if !(rc != 0) { - goto __640 + goto __644 } goto abort_due_to_error -__640: +__644: ; goto __8 @@ -117598,89 +117629,89 @@ __105: // Root frame of VDBE // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { - goto __641 + goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { - goto __642 + goto __646 } goto abort_due_to_error -__642: +__646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { - goto __643 + goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 - goto __644 -__643: + goto __648 +__647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { - goto __645 + goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) - goto __646 -__645: + goto __650 +__649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 -__646: +__650: ; -__644: +__648: ; -__641: +__645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __647 + goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __648 - } - pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__650: - if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __652 } - goto __651 -__651: + pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__654: + if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { + goto __656 + } + goto __655 +__655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __650 - goto __652 -__652: + goto __654 + goto __656 +__656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __649 -__648: + goto __653 +__652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__649: +__653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __653 + goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error -__653: +__657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { - goto __654 + goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) -__654: +__658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) -__647: +__651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { - goto __655 + goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database @@ -117689,36 +117720,36 @@ __647: // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 -__656: +__660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero - goto __657 -__657: + goto __661 +__661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __656 + goto __660 } - goto __658 -__658: + goto __662 +__662: ; if !(rc != 0) { - goto __659 + goto __663 } goto abort_due_to_error -__659: +__663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { - goto __660 + goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error -__660: +__664: ; // EV: R-40812-03570 -__655: +__659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) @@ -117773,56 +117804,56 @@ __106: // Payload to be inserted (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __661 + goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __662 -__661: + goto __666 +__665: pTab1 = uintptr(0) zDb = uintptr(0) -__662: +__666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { - goto __663 + goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __664 + goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__664: +__668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __665 + goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) -__665: +__669: ; -__663: +__667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __666 + goto __670 } goto __8 -__666: +__670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __667 + goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__667: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __668 + goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey -__668: +__672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -117834,13 +117865,13 @@ __668: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __669 + goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __670 -__669: + goto __674 +__673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 -__670: +__674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, @@ -117851,13 +117882,13 @@ __670: // Invoke the update-hook if required. if !(rc != 0) { - goto __671 + goto __675 } goto abort_due_to_error -__671: +__675: ; if !(pTab1 != 0) { - goto __672 + goto __676 } (*struct { @@ -117870,7 +117901,7 @@ __671: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) -__672: +__676: ; goto __8 @@ -117896,10 +117927,10 @@ __107: // Rowid value to insert with } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __673 + goto __677 } goto abort_due_to_error -__673: +__677: ; goto __8 @@ -117949,28 +117980,28 @@ __108: // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __674 + goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __676 + goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__676: +__680: ; - goto __675 -__674: + goto __679 +__678: zDb1 = uintptr(0) pTab2 = uintptr(0) -__675: +__679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __677 + goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, @@ -117982,13 +118013,13 @@ __675: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__677: +__681: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __678 + goto __682 } goto __8 -__678: +__682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE @@ -117997,28 +118028,28 @@ __678: (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { - goto __679 + goto __683 } goto abort_due_to_error -__679: +__683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { - goto __680 + goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __681 + goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) -__681: +__685: ; -__680: +__684: ; goto __8 @@ -118058,16 +118089,16 @@ __110: rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { - goto __682 + goto __686 } goto abort_due_to_error -__682: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { - goto __683 + goto __687 } goto jump_to_p2 -__683: +__687: ; goto __8 @@ -118090,10 +118121,10 @@ __111: rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { - goto __684 + goto __688 } goto abort_due_to_error -__684: +__688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -118143,29 +118174,29 @@ __112: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __685 + goto __689 } goto too_big -__685: +__689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __686 + goto __690 } goto abort_due_to_error -__686: +__690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __687 + goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __688 + goto __692 } goto no_mem -__688: +__692: ; -__687: +__691: ; goto __8 @@ -118186,20 +118217,20 @@ __113: pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __689 + goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __690 -__689: + goto __694 +__693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __691 + goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __692 -__691: + goto __696 +__695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __693 + goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab @@ -118210,36 +118241,36 @@ __691: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __695 + goto __699 } goto abort_due_to_error -__695: +__699: ; - goto __694 -__693: + goto __698 +__697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { - goto __696 + goto __700 } goto abort_due_to_error -__696: +__700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __697 + goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__697: +__701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) +__698: + ; +__696: + ; __694: ; -__692: - ; -__690: - ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 @@ -118248,6 +118279,10 @@ __690: // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. + // + // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) + // just reset the cache for that cursor. This causes the row of + // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -118255,11 +118290,11 @@ __114: (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __698 + goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__698: +__702: ; goto __8 @@ -118292,39 +118327,39 @@ __116: *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __699 + goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __700 + goto __704 } goto __8 -__700: +__704: ; -__699: +__703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __701 + goto __705 } goto abort_due_to_error -__701: +__705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __702 + goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { - goto __703 + goto __707 } goto jump_to_p2 -__703: +__707: ; -__702: +__706: ; goto __8 @@ -118340,29 +118375,29 @@ __117: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { - goto __704 + goto __708 } goto abort_due_to_error -__704: +__708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { - goto __705 + goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __706 + goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 -__706: +__710: ; -__705: +__709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { - goto __707 + goto __711 } goto jump_to_p2 -__707: +__711: ; goto __8 @@ -118407,32 +118442,32 @@ __120: *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __708 + goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) - goto __709 -__708: + goto __713 +__712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__709: +__713: ; if !(rc != 0) { - goto __710 + goto __714 } goto abort_due_to_error -__710: +__714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { - goto __711 + goto __715 } goto jump_to_p2 -__711: +__715: ; goto __8 @@ -118515,18 +118550,18 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __712 + goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__712: +__716: ; if !(rc != SQLITE_DONE) { - goto __713 + goto __717 } goto abort_due_to_error -__713: +__717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) @@ -118566,10 +118601,10 @@ __124: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __714 + goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__714: +__718: ; rc = func() int32 { @@ -118579,10 +118614,10 @@ __714: return 0 }() if !(rc != 0) { - goto __715 + goto __719 } goto abort_due_to_error -__715: +__719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -118599,10 +118634,10 @@ __715: (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __716 + goto __720 } goto abort_due_to_error -__716: +__720: ; goto __8 @@ -118625,17 +118660,17 @@ __125: return 0 }() if !(rc != 0) { - goto __717 + goto __721 } goto abort_due_to_error -__717: +__721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { - goto __718 + goto __722 } goto abort_due_to_error -__718: +__722: ; goto __8 @@ -118666,31 +118701,31 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { - goto __719 - } - goto abort_due_to_error -__719: - ; - if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { - goto __720 - } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { - goto __722 - } - goto abort_due_to_error -__722: - ; - goto __721 -__720: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __723 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93485, ts+7179) goto abort_due_to_error __723: ; -__721: + if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { + goto __724 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __726 + } + goto abort_due_to_error +__726: + ; + goto __725 +__724: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __727 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93513, ts+7179) + goto abort_due_to_error +__727: + ; +__725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) @@ -118737,25 +118772,25 @@ __128: // Rowid that P1 current points to // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { - goto __724 + goto __728 } goto abort_due_to_error -__724: +__728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __725 + goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { - goto __727 + goto __731 } goto abort_due_to_error -__727: +__731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __728 + goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -118767,17 +118802,17 @@ __727: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __729 -__728: + goto __733 +__732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) +__733: + ; + goto __730 __729: - ; - goto __726 -__725: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__726: +__730: ; goto __8 @@ -118791,16 +118826,16 @@ __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __730 + goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { - goto __731 + goto __735 } goto abort_due_to_error -__731: +__735: ; -__730: +__734: ; goto __8 @@ -118854,15 +118889,15 @@ __133: (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __732 + goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) - goto __733 -__732: + goto __737 +__736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) -__733: +__737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -118876,19 +118911,19 @@ __733: // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __734 + goto __738 } - rc = Xsqlite3CorruptError(tls, 93689) + rc = Xsqlite3CorruptError(tls, 93717) goto abort_due_to_error -__734: +__738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { - goto __735 + goto __739 } goto abort_due_to_error -__735: +__739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) @@ -118896,22 +118931,22 @@ __735: // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __736 + goto __740 } res12 = -res12 - goto __737 -__736: + goto __741 +__740: ; res12++ -__737: +__741: ; if !(res12 > 0) { - goto __738 + goto __742 } goto jump_to_p2 -__738: +__742: ; goto __8 @@ -118947,13 +118982,13 @@ __134: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __739 + goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __740 -__739: + goto __744 +__743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. @@ -118961,21 +118996,21 @@ __739: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { - goto __741 + goto __745 } goto abort_due_to_error -__741: +__745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { - goto __742 + goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) -__742: +__746: ; -__740: +__744: ; goto __8 @@ -119001,23 +119036,23 @@ __135: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __743 + goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __744 + goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) -__744: +__748: ; -__743: +__747: ; if !(rc != 0) { - goto __745 + goto __749 } goto abort_due_to_error -__745: +__749: ; goto __8 @@ -119033,21 +119068,21 @@ __136: pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __746 + goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __747 -__746: + goto __751 +__750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { - goto __748 + goto __752 } goto abort_due_to_error -__748: +__752: ; -__747: +__751: ; goto __8 @@ -119068,10 +119103,10 @@ __137: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __749 + goto __753 } goto abort_due_to_error -__749: +__753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 @@ -119085,10 +119120,10 @@ __138: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __750 + goto __754 } goto abort_due_to_error -__750: +__754: ; goto __8 @@ -119109,15 +119144,15 @@ __139: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __751 + goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) - goto __752 -__751: + goto __756 +__755: zSchema = ts + 7196 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db @@ -119129,11 +119164,11 @@ __751: ts+7210, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __753 + goto __757 } rc = SQLITE_NOMEM - goto __754 -__753: + goto __758 +__757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK @@ -119143,38 +119178,38 @@ __753: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { - goto __755 + goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc -__755: +__759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { - goto __756 + goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93941) -__756: + rc = Xsqlite3CorruptError(tls, 93969) +__760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__754: +__758: ; -__752: +__756: ; if !(rc != 0) { - goto __757 + goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __758 + goto __762 } goto no_mem -__758: +__762: ; goto abort_due_to_error -__757: +__761: ; goto __8 @@ -119187,10 +119222,10 @@ __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __759 + goto __763 } goto abort_due_to_error -__759: +__763: ; goto __8 @@ -119262,22 +119297,22 @@ __144: // Register keeping track of errors remaining int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { - goto __760 + goto __764 } - goto __761 -__760: + goto __765 +__764: if !(z == uintptr(0)) { - goto __762 + goto __766 } goto no_mem - goto __763 -__762: + goto __767 +__766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__763: +__767: ; -__761: +__765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) @@ -119295,15 +119330,15 @@ __145: // in1, in2 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __764 + goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __765 + goto __769 } goto no_mem -__765: +__769: ; -__764: +__768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) @@ -119322,18 +119357,18 @@ __146: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { - goto __766 + goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __767 -__766: + goto __771 +__770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) -__767: +__771: ; goto check_for_interrupt @@ -119368,35 +119403,35 @@ __147: // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __768 + goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __769 + goto __773 } goto no_mem -__769: +__773: ; -__768: +__772: ; if !(iSet != 0) { - goto __770 + goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __771 + goto __775 } goto jump_to_p2 -__771: +__775: ; -__770: +__774: ; if !(iSet >= 0) { - goto __772 + goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__772: +__776: ; goto __8 @@ -119431,37 +119466,37 @@ __148: // Token identifying trigger // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __773 + goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__774: +__778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __776 + goto __780 } - goto __775 -__775: + goto __779 +__779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __774 - goto __776 -__776: + goto __778 + goto __780 +__780: ; if !(pFrame2 != 0) { - goto __777 + goto __781 } goto __8 -__777: +__781: ; -__773: +__777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __778 + goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+7253, 0) goto abort_due_to_error -__778: +__782: ; // Register pRt is used to store the memory required to save the state @@ -119469,7 +119504,7 @@ __778: // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __779 + goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory @@ -119478,10 +119513,10 @@ __778: nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __781 + goto __785 } nMem++ -__781: +__785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -119489,10 +119524,10 @@ __781: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __782 + goto __786 } goto no_mem -__782: +__786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -119514,24 +119549,24 @@ __782: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 -__783: +__787: if !(pMem2 != pEnd) { - goto __785 + goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db - goto __784 -__784: + goto __788 +__788: pMem2 += 56 - goto __783 - goto __785 -__785: + goto __787 + goto __789 +__789: ; - goto __780 -__779: + goto __784 +__783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__780: +__784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ @@ -119582,21 +119617,21 @@ __149: // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __786 + goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __787 -__786: + goto __791 +__790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __788 + goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __789 -__788: + goto __793 +__792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__789: +__793: ; -__787: +__791: ; goto __8 @@ -119613,25 +119648,25 @@ __787: // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __790 + goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __792 + goto __796 } goto jump_to_p2 -__792: +__796: ; - goto __791 -__790: + goto __795 +__794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __793 + goto __797 } goto jump_to_p2 -__793: +__797: ; -__791: +__795: ; goto __8 @@ -119647,35 +119682,35 @@ __791: // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __794 - } - pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__796: - if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __798 } - goto __797 -__797: + pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame +__800: + if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { + goto __802 + } + goto __801 +__801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __796 - goto __798 -__798: + goto __800 + goto __802 +__802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __795 -__794: + goto __799 +__798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__795: +__799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __799 + goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__799: +__803: ; goto __8 @@ -119692,11 +119727,11 @@ __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __800 + goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__800: +__804: ; goto __8 @@ -119729,7 +119764,7 @@ __154: } return int64(0) }()) != 0) { - goto __801 + goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then @@ -119739,10 +119774,10 @@ __154: // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __802 -__801: + goto __806 +__805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) -__802: +__806: ; goto __8 @@ -119757,16 +119792,16 @@ __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __803 + goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __804 + goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- -__804: +__808: ; goto jump_to_p2 -__803: +__807: ; goto __8 @@ -119779,17 +119814,17 @@ __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { - goto __805 + goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- -__805: +__809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __806 + goto __810 } goto jump_to_p2 -__806: +__810: ; goto __8 @@ -119836,10 +119871,10 @@ __158: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0))))) if !(pCtx == uintptr(0)) { - goto __807 + goto __811 } goto no_mem -__807: +__811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -119867,75 +119902,75 @@ __159: // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { - goto __808 + goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__809: +__813: if !(i5 >= 0) { - goto __811 + goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __810 -__810: + goto __814 +__814: i5-- - goto __809 - goto __811 -__811: + goto __813 + goto __815 +__815: ; -__808: +__812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __812 + goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) - goto __813 -__812: + goto __817 +__816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) -__813: +__817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __814 + goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __815 + goto __819 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__815: +__819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __816 + goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __817 + goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__817: +__821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__816: +__820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __818 + goto __822 } goto abort_due_to_error -__818: +__822: ; -__814: +__818: ; goto __8 @@ -119971,32 +120006,32 @@ __161: pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __819 + goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __820 -__819: + goto __824 +__823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__820: +__824: ; if !(rc != 0) { - goto __821 + goto __825 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error -__821: +__825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { - goto __822 + goto __826 } goto too_big -__822: +__826: ; goto __8 @@ -120018,32 +120053,32 @@ __162: // Write results here rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { - goto __823 + goto __827 } if !(rc != SQLITE_BUSY) { - goto __824 + goto __828 } goto abort_due_to_error -__824: +__828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 -__823: +__827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__825: +__829: if !(i6 < 3) { - goto __827 + goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) - goto __826 -__826: + goto __830 +__830: i6++ pMem5 += 56 - goto __825 - goto __827 -__827: + goto __829 + goto __831 +__831: ; goto __8 @@ -120066,17 +120101,17 @@ __163: // Name of database file for pPager pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __828 + goto __832 } eNew = eOld -__828: +__832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __829 + goto __833 } eNew = eOld -__829: +__833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) @@ -120086,18 +120121,18 @@ __829: if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __830 + goto __834 } eNew = eOld -__830: +__834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __831 + goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __832 + goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, @@ -120109,11 +120144,11 @@ __830: return ts + 7347 /* "out of" */ }())) goto abort_due_to_error - goto __833 -__832: + goto __837 +__836: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __834 + goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log @@ -120121,29 +120156,29 @@ __832: // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __836 + goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__836: +__840: ; - goto __835 -__834: + goto __839 +__838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __837 + goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__837: +__841: ; -__835: +__839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { - goto __838 + goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -120151,18 +120186,18 @@ __835: } return 1 }()) -__838: +__842: ; -__833: +__837: ; -__831: +__835: ; if !(rc != 0) { - goto __839 + goto __843 } eNew = eOld -__839: +__843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -120172,10 +120207,10 @@ __839: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __840 + goto __844 } goto abort_due_to_error -__840: +__844: ; goto __8 @@ -120197,10 +120232,10 @@ __164: return uintptr(0) }()) if !(rc != 0) { - goto __841 + goto __845 } goto abort_due_to_error -__841: +__845: ; goto __8 @@ -120216,17 +120251,17 @@ __165: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __842 + goto __846 } if !(rc != SQLITE_DONE) { - goto __843 + goto __847 } goto abort_due_to_error -__843: +__847: ; rc = SQLITE_OK goto jump_to_p2 -__842: +__846: ; goto __8 @@ -120248,13 +120283,13 @@ __842: __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __844 + goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __845 -__844: + goto __849 +__848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__845: +__849: ; goto __8 @@ -120297,25 +120332,25 @@ __168: __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __846 + goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __847 + goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __848 + goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+7354, libc.VaList(bp+144, z1)) -__848: +__852: ; goto abort_due_to_error -__847: +__851: ; -__846: +__850: ; goto __8 @@ -120331,16 +120366,16 @@ __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __849 + goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__849: +__853: ; if !(rc != 0) { - goto __850 + goto __854 } goto abort_due_to_error -__850: +__854: ; goto __8 @@ -120360,17 +120395,17 @@ __171: // Name of the virtual table zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { - goto __851 + goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) -__851: +__855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { - goto __852 + goto __856 } goto abort_due_to_error -__852: +__856: ; goto __8 @@ -120384,10 +120419,10 @@ __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __853 + goto __857 } goto abort_due_to_error -__853: +__857: ; goto __8 @@ -120402,11 +120437,11 @@ __173: *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __854 + goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error -__854: +__858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -120414,10 +120449,10 @@ __854: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __855 + goto __859 } goto abort_due_to_error -__855: +__859: ; // Initialize sqlite3_vtab_cursor base class @@ -120426,18 +120461,18 @@ __855: // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { - goto __856 + goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __857 -__856: + goto __861 +__860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem -__857: +__861: ; goto __8 @@ -120455,10 +120490,10 @@ __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __858 + goto __862 } goto no_mem -__858: +__862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -120503,27 +120538,27 @@ __175: // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__859: +__863: if !(i7 < nArg) { - goto __861 + goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __860 -__860: + goto __864 +__864: i7++ - goto __859 - goto __861 -__861: + goto __863 + goto __865 +__865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __862 + goto __866 } goto abort_due_to_error -__862: +__866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -120531,10 +120566,10 @@ __862: (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { - goto __863 + goto __867 } goto jump_to_p2 -__863: +__867: ; goto __8 @@ -120558,11 +120593,11 @@ __176: pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __864 + goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__864: +__868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -120571,40 +120606,40 @@ __864: (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __865 + goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __866 -__865: + goto __870 +__869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__866: +__870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { - goto __867 + goto __871 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError -__867: +__871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { - goto __868 + goto __872 } goto too_big -__868: +__872: ; if !(rc != 0) { - goto __869 + goto __873 } goto abort_due_to_error -__869: +__873: ; goto __8 @@ -120618,10 +120653,10 @@ __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __870 + goto __874 } goto __8 -__870: +__874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -120636,21 +120671,21 @@ __870: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __871 + goto __875 } goto abort_due_to_error -__871: +__875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { - goto __872 + goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt -__872: +__876: ; goto check_for_interrupt @@ -120668,27 +120703,27 @@ __178: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __873 + goto __877 } goto abort_due_to_error -__873: +__877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __874 + goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__874: +__878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { - goto __875 + goto __879 } goto abort_due_to_error -__875: +__879: ; goto __8 @@ -120722,43 +120757,43 @@ __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __876 + goto __880 } goto no_mem -__876: +__880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __877 + goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error -__877: +__881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __878 + goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__879: +__883: if !(i8 < nArg1) { - goto __881 + goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __880 -__880: + goto __884 +__884: i8++ - goto __879 - goto __881 -__881: + goto __883 + goto __885 +__885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -120767,41 +120802,41 @@ __881: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __882 + goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) -__882: +__886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __883 + goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __885 + goto __889 } rc = SQLITE_OK - goto __886 -__885: + goto __890 +__889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__886: +__890: ; - goto __884 -__883: + goto __888 +__887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__884: +__888: ; if !(rc != 0) { - goto __887 + goto __891 } goto abort_due_to_error -__887: +__891: ; -__878: +__882: ; goto __8 @@ -120826,16 +120861,16 @@ __181: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __888 + goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __889 + goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__889: +__893: ; -__888: +__892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -120895,24 +120930,24 @@ __183: // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __890 + goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__891: +__895: if !(i9 >= 0) { - goto __893 + goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __892 -__892: + goto __896 +__896: i9-- - goto __891 - goto __893 -__893: + goto __895 + goto __897 +__897: ; -__890: +__894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -120923,38 +120958,38 @@ __890: // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __894 + goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __895 + goto __899 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__895: +__899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __896 + goto __900 } goto abort_due_to_error -__896: +__900: ; -__894: +__898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { - goto __897 + goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { - goto __898 + goto __902 } goto too_big -__898: +__902: ; -__897: +__901: ; goto __8 @@ -120993,16 +121028,16 @@ __185: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __899 + goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 - goto __900 -__899: + goto __904 +__903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ -__900: +__904: ; goto __8 @@ -121052,67 +121087,67 @@ __187: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __901 + goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __902 + goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __903 -__902: + goto __907 +__906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __904 + goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+7383, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __905 -__904: + goto __909 +__908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__909: + ; +__907: + ; __905: ; -__903: - ; -__901: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __906 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __907 - } - goto __8 -__907: - ; - i10 = 1 -__908: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __910 } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 + goto __8 __911: ; - goto __909 -__909: + i10 = 1 +__912: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __914 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __915 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__915: + ; + goto __913 +__913: i10++ - goto __908 - goto __910 -__910: + goto __912 + goto __914 +__914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__906: +__910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ @@ -121157,25 +121192,25 @@ __7: // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __912 + goto __916 } rc = SQLITE_NOMEM - goto __913 -__912: + goto __917 +__916: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __914 + goto __918 } - rc = Xsqlite3CorruptError(tls, 95878) -__914: + rc = Xsqlite3CorruptError(tls, 95906) +__918: ; -__913: +__917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __915 + goto __919 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__915: +__919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -121184,46 +121219,46 @@ __915: libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __916 + goto __920 } Xsqlite3OomFault(tls, db) -__916: +__920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __917 + goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 -__917: +__921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __918 + goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__918: +__922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: -__919: +__923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __920 + goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __921 + goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__921: +__925: ; - goto __919 -__920: + goto __923 +__924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -121254,11 +121289,11 @@ abort_due_to_interrupt: } var azType = [4]uintptr{ts + 7421, ts + 7430, ts + 7437, - ts + 7443} /* sqlite3.c:88521:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89745:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89748:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90233:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91488:20 */ + ts + 7443} /* sqlite3.c:88537:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89761:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89764:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:90257:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:91512:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -121289,7 +121324,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95983:9 */ +} /* sqlite3.c:96011:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -121310,7 +121345,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:96011:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -121327,7 +121362,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95983:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96013:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:96041:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -121403,7 +121438,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96081:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:96109:16: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -121724,7 +121759,7 @@ __38: return rc } -var iLn int32 = 0 /* sqlite3.c:96224:24 */ +var iLn int32 = 0 /* sqlite3.c:96252:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -121733,11 +121768,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:96225:31 */ +} /* sqlite3.c:96253:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96316:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96344:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -121756,14 +121791,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9631 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96337:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:96365:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96349) + return Xsqlite3MisuseError(tls, 96377) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -121822,14 +121857,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96412:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96440:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96419:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:96447:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -121839,7 +121874,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96429:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:96457:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -121855,7 +121890,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9642 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96444:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:96472:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -121864,7 +121899,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 96449) + return Xsqlite3MisuseError(tls, 96477) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -122051,7 +122086,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -122202,7 +122237,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:96638:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:96666:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -122216,10 +122251,10 @@ type PmaReader1 = struct { F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:96639:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:96667:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte @@ -122230,18 +122265,18 @@ type PmaWriter1 = struct { F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:96640:9 */ +} /* sqlite3.c:96668:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:96640:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:96668:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:96641:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:96669:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -122254,26 +122289,26 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:96642:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:96670:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:96643:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:96671:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:96644:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:96672:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -122283,10 +122318,10 @@ type IncrMerger1 = struct { FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile -} /* sqlite3.c:22073:9 */ +} /* sqlite3.c:22082:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:96673:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -122317,11 +122352,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:96645:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:96772:13 */ +type SorterCompare = uintptr /* sqlite3.c:96800:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96975:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -122338,7 +122373,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96947:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96964:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96992:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122442,7 +122477,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97058:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:97086:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -122482,7 +122517,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97091:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:97119:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -122497,7 +122532,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97108:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:97136:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -122538,7 +122573,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97183:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122584,7 +122619,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:97155 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97202:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:97230:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122607,7 +122642,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97235:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97263:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -122627,7 +122662,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97262:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97290:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -122639,7 +122674,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97281:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97309:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122689,7 +122724,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97323:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:97351:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -122749,7 +122784,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97342:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:97370:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -122768,7 +122803,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97406:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:97434:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -122864,7 +122899,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97512:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:97540:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -122875,7 +122910,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97525:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:97553:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -122895,7 +122930,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97591:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97619:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122914,14 +122949,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:975 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97612:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:97640:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97625:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:97653:12: */ var rc int32 = rcin var i int32 @@ -122947,7 +122982,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97655:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:97683:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -122972,7 +123007,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:976 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97706:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -122984,7 +123019,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:97678:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97720:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -123001,7 +123036,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97692:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97709:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:97737:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -123030,7 +123065,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97742:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:97770:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) @@ -123049,7 +123084,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97764:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:97792:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte @@ -123069,7 +123104,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97783:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:97811:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -123093,7 +123128,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97810:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97838:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -123106,7 +123141,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97824:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97852:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -123145,7 +123180,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97866:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97894:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -123163,7 +123198,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97880:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97908:12: */ bp := tls.Alloc(512) defer tls.Free(512) @@ -123220,7 +123255,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97931:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97959:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -123235,7 +123270,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97953:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97981:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -123264,7 +123299,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97986:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:98014:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -123280,7 +123315,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98033:13: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -123303,7 +123338,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:98005 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98026:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:98054:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -123358,7 +123393,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98090:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:98118:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -123434,7 +123469,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98161:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98189:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -123445,7 +123480,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98175:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98203:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -123509,7 +123544,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:981 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98245:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:98273:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -123625,7 +123660,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98385:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -123671,7 +123706,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98357:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98399:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98427:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -123679,7 +123714,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98437:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -123702,7 +123737,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98409 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98461:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -123736,7 +123771,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:98433:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98472:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:98500:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -123763,7 +123798,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98525:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -123771,7 +123806,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:98497 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98510:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:98538:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -123831,7 +123866,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98592:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:98620:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -123901,7 +123936,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98668:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98696:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -123958,7 +123993,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98735:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:98763:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -123974,7 +124009,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98756:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:98784:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -124001,7 +124036,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98786:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98814:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124038,7 +124073,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98853:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -124054,7 +124089,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98825:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98843:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98871:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124105,7 +124140,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98899:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -124186,7 +124221,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98978:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:99006:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -124261,7 +124296,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99060:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:99088:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -124306,7 +124341,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99112:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:99140:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -124348,7 +124383,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99150:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:99178:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -124367,7 +124402,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99177:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:99205:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -124402,7 +124437,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99210:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:99238:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -124494,7 +124529,7 @@ type MemJournal1 = struct { F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -124541,23 +124576,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:99703:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:99731:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:99704:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:99732:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:99703:9 */ +} /* sqlite3.c:99731:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:99705:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:99733:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99760:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99788:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -124604,7 +124639,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99835:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -124614,7 +124649,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99807:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99847:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -124652,7 +124687,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99819:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99861:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99889:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -124718,7 +124753,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99934:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99962:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -124746,7 +124781,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99992:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -124756,14 +124791,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99964:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99976:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:100004:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99984:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:100012:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -124778,7 +124813,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99993:40 */ +} /* sqlite3.c:100021:40 */ // Open a journal file. // @@ -124790,7 +124825,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100027:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:100055:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -124818,20 +124853,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100063:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:100091:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100102:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100130:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100110:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:100138:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -124860,7 +124895,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:10011 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100140:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:100168:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -124908,7 +124943,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100179:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100207:28: */ var rc int32 for 1 != 0 { @@ -124950,7 +124985,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100211:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100239:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -124959,7 +124994,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100219:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100247:20: */ var i int32 var pItem uintptr if p != 0 { @@ -124988,7 +125023,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100234:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:100262:21: */ _ = pWalker _ = p // No-op @@ -124998,7 +125033,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100246:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100274:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -125040,7 +125075,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100279:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100307:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -125089,7 +125124,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100317:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100345:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -125120,13 +125155,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100340:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:100368:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100345:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:100373:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -125138,7 +125173,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100360:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100388:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -125146,7 +125181,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100369:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:100397:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -125181,14 +125216,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100410:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100438:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100414:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:100442:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -125221,7 +125256,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100443:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:100471:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -125267,7 +125302,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100500:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:100528:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -125284,7 +125319,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100517:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:100545:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { @@ -125310,7 +125345,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100546:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:100574:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -125329,7 +125364,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100564:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:100592:24: */ var n int32 var pExTab uintptr @@ -125379,7 +125414,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:10 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100613:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100641:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -126094,7 +126129,7 @@ __88: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101059:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:101087:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 @@ -126143,7 +126178,7 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101103:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* sqlite3.c:101131:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -126165,7 +126200,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101159:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -126191,7 +126226,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101131:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101152:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101180:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -126672,7 +126707,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101610:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:101638:12: */ var i int32 // Loop counter _ = pParse @@ -126707,7 +126742,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101652:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:101680:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -126751,7 +126786,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101699:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* sqlite3.c:101727:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -126774,7 +126809,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101727:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:101755:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -126911,7 +126946,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101840:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101868:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -126957,7 +126992,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101874:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101902:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -126968,7 +127003,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101887:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101915:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -127000,7 +127035,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101918:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101946:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -127077,7 +127112,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101981:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102009:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -127376,7 +127411,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102269:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:102297:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -127417,7 +127452,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102308:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:102336:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -127474,7 +127509,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102364:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:102392:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -127508,7 +127543,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102398:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:102426:20: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -127544,7 +127579,7 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102458:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:102486:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -127565,7 +127600,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102479:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102507:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -127608,7 +127643,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1024 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102532:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:102560:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -127620,7 +127655,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:102548:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:102576:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -127631,7 +127666,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102562:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102590:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -127642,7 +127677,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102575:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102603:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -127667,7 +127702,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102604:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102632:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -127739,7 +127774,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102677:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102705:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -127749,7 +127784,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102687:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:102715:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -127758,7 +127793,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102698:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:102726:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -127783,7 +127818,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102748:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -127801,7 +127836,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:102720 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102743:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:102771:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -127814,7 +127849,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102758:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:102786:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -127830,7 +127865,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102780:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102808:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -127853,7 +127888,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102808:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102836:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -127863,7 +127898,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102819:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102847:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -127890,7 +127925,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102855:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102883:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -127898,7 +127933,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102865:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102893:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -127928,7 +127963,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102894:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102922:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -127962,7 +127997,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102930:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102958:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -128010,7 +128045,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102986:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103014:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -128034,7 +128069,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103014:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:103042:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -128063,7 +128098,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103052:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:103080:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -128151,7 +128186,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103147:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:103175:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128173,7 +128208,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103168:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103196:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -128181,7 +128216,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103175:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:103203:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -128190,7 +128225,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103183:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:103211:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -128210,7 +128245,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103233:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -128237,7 +128272,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:103205:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103225:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103253:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -128247,7 +128282,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103235:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103263:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -128274,7 +128309,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103274:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:103302:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -128322,7 +128357,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103322:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:103350:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -128337,7 +128372,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103339:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:103367:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -128360,7 +128395,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103369:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103397:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -128378,7 +128413,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103394:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:103422:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -128406,7 +128441,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103424:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:103452:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -128458,7 +128493,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103471:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:103499:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -128477,7 +128512,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103492:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:103520:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128514,7 +128549,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103532:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:103560:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128546,7 +128581,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103571:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:103599:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -128614,7 +128649,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103641:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103669:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -128644,7 +128679,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103682:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103710:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -128658,13 +128693,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:103 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103697:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103725:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103705:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:103733:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -128676,7 +128711,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103747:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } @@ -128718,7 +128753,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103719:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103759:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103787:12: */ var nSize int32 // Only one flag value allowed @@ -128740,7 +128775,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103790:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103818:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) @@ -128759,7 +128794,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103811:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103839:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -128776,7 +128811,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103830:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103858:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128886,7 +128921,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103940:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103968:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -128908,7 +128943,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103968:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103996:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) @@ -128918,14 +128953,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103979:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:104007:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:104010:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -128958,7 +128993,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103982:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104011:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104039:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -128966,7 +129001,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:104015:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104043:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -129035,7 +129070,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104070:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:104098:24: */ var pNew uintptr var i int32 var nByte int32 @@ -129088,7 +129123,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:104114:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:104142:23: */ var pNew uintptr var i int32 @@ -129117,7 +129152,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:104138:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:104166:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129183,9 +129218,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:104209:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:104237:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104210:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104238:41: */ var pItem uintptr var pList uintptr @@ -129202,7 +129237,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104229:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104257:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -129221,7 +129256,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104251:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104279:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -129244,7 +129279,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104280:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104308:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -129341,7 +129376,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104342:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:104370:21: */ var pItem uintptr if p == uintptr(0) { return @@ -129368,7 +129403,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104380:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:104408:21: */ if pList != 0 { var pItem uintptr @@ -129394,7 +129429,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104415:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:104443:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -129409,7 +129444,7 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104437:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:104465:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -129421,7 +129456,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104453:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104481:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -129433,7 +129468,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:104464:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:104492:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -129441,7 +129476,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104472:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:104500:20: */ var i int32 var m U32 = U32(0) @@ -129458,7 +129493,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1044 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104491:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:104519:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -129470,7 +129505,7 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505:20: */ +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104533:20: */ if Xsqlite3StrICmp(tls, zIn, ts+7998) == 0 { return U32(EP_IsTrue) } @@ -129483,7 +129518,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:104505 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104517:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104545:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -129497,7 +129532,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104534:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:104562:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -129514,7 +129549,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104556:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:104584:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -129560,7 +129595,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104597:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104625:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -129635,7 +129670,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:104669:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:104697:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -129659,7 +129694,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104690:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104718:20: */ return exprIsConst(tls, p, 1, 0) } @@ -129674,7 +129709,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10469 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104707:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104735:20: */ return exprIsConst(tls, p, 2, 0) } @@ -129682,12 +129717,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104717:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:104745:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104725:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:104753:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 @@ -129729,7 +129764,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104769:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:104797:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -129765,7 +129800,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104801:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104829:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -129774,7 +129809,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104830:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104858:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -129826,7 +129861,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104904:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -129865,7 +129900,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104876 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104913:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104941:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -129918,7 +129953,7 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: */ +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104977:20: */ if Xsqlite3StrICmp(tls, z, ts+8944) == 0 { return 1 } @@ -129936,7 +129971,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104949:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104964:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104992:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -129994,7 +130029,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10496 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105009:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:105037:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -130006,7 +130041,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105026:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105054:12: */ var pLHS uintptr var res int32 @@ -130095,7 +130130,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:105 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105119:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:105147:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -130313,7 +130348,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105342:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:105370:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -130345,7 +130380,7 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105374:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:105402:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -130364,7 +130399,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105393:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:105421:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { @@ -130392,7 +130427,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105427:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:105455:21: */ bp := tls.Alloc(65) defer tls.Free(65) @@ -130587,7 +130622,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105622:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:105650:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -130710,7 +130745,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105744:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:105772:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { @@ -130747,7 +130782,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105785:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:105813:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -131128,7 +131163,7 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106043:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:106071:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -131148,7 +131183,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106061:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:106089:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -131194,7 +131229,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106099:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:106127:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -131209,7 +131244,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106124:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:106152:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -131228,7 +131263,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106150:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:106178:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -131279,7 +131314,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106208:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:106236:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -131293,14 +131328,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106229:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:106257:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106238:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106266:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -131319,7 +131354,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:106 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106257:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:106285:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -131343,7 +131378,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106315:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -131351,7 +131386,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:106287:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106297:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:106325:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -131476,7 +131511,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106413:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:106441:20: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -132545,7 +132580,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9363)) /* sqlite3.c:106480:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9363)) /* sqlite3.c:106508:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -132562,7 +132597,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9363)) /* sqlite3.c:106480:29 */ // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107187:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:107215:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -132631,7 +132666,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107244:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:107272:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -132656,7 +132691,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107272:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107300:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -132677,7 +132712,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107296:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107324:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -132690,7 +132725,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107309:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:107337:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -132716,7 +132751,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107337:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:107365:20: */ var pItem uintptr var i int32 var j int32 @@ -132798,7 +132833,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107412:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:107440:13: */ bp := tls.Alloc(220) defer tls.Free(220) @@ -132861,7 +132896,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107484:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107512:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -133091,7 +133126,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107626:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107654:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -133339,7 +133374,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107798:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107826:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -133359,7 +133394,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107820:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107848:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -133413,7 +133448,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107876:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107904:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -133517,7 +133552,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107972:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108000:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -133544,7 +133579,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107991:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:108019:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -133555,7 +133590,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108004:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:108032:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -133681,7 +133716,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108101:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:108129:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -133704,7 +133739,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108133:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108161:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -133813,7 +133848,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108242:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:108270:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -133847,7 +133882,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108280:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108308:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -133865,7 +133900,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108301:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:108329:20: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -133890,7 +133925,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108336:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108364:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -133928,7 +133963,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108356:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108384:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -133944,7 +133979,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108373:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108401:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -133984,7 +134019,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108410:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:108438:20: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -134033,7 +134068,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108452:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108480:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -134066,7 +134101,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108488:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:108516:21: */ libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -134079,7 +134114,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108499:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108527:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -134096,7 +134131,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108515:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:108543:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -134114,7 +134149,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108532:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108560:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -134305,7 +134340,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108670:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:108698:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -134331,7 +134366,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108688:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:108716:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -134356,7 +134391,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108701:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108729:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } @@ -134365,7 +134400,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1087 // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108712:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:108740:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { @@ -134375,7 +134410,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108724:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:108752:20: */ var i int32 var n int32 if nReg == 1 { @@ -134393,7 +134428,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:108738:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:108766:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -134411,7 +134446,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108758:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108786:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -134445,7 +134480,7 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108818:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108846:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -134464,7 +134499,7 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108840:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108868:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -134488,7 +134523,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108877:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108905:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -134504,7 +134539,7 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108898:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108926:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -134517,7 +134552,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108911:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108939:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -134702,7 +134737,7 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109080:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:109108:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -134717,7 +134752,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109100:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:109128:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -134863,7 +134898,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109265:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:109293:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -134980,7 +135015,7 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109348:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:109376:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -135008,7 +135043,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109378:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:109406:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -135137,7 +135172,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:109521:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -135149,7 +135184,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:109493:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109556:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:109584:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -135168,7 +135203,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109582:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109610:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -135180,7 +135215,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109596:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109624:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -135191,7 +135226,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109609:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:109637:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -135232,7 +135267,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109644:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:109672:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -135242,7 +135277,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109659:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109687:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -135274,7 +135309,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109692:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:109720:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -135296,7 +135331,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109708:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:109736:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -135319,7 +135354,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109727:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:109755:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -135335,7 +135370,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109745:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:109773:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -135358,7 +135393,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109774:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:109802:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -135374,7 +135409,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109793:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109821:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -135396,7 +135431,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109819:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109847:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -135418,7 +135453,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109840:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109868:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -135442,7 +135477,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109865:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109893:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -135459,7 +135494,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109890:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109918:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -135473,34 +135508,32 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109912:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109940:12: */ var rc int32 + Xsqlite3ParseObjectInit(tls, p, db) + if zSql == uintptr(0) { + return SQLITE_NOMEM + } + if Xsqlite3_strnicmp(tls, zSql, ts+12159, 7) != 0 { + return Xsqlite3CorruptError(tls, 109954) + } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() - - // Parse the SQL statement passed as the first argument. If no error - // occurs and the parse does not result in a new table, index or - // trigger object, the database must be corrupt. - Xsqlite3ParseObjectInit(tls, p, db) (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) - if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql) - } else { - rc = SQLITE_NOMEM - } + rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && - (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109935) + ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { + rc = Xsqlite3CorruptError(tls, 109965) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -135514,7 +135547,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109963:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109993:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -135534,7 +135567,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+12159, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+12167, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -135584,7 +135617,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+12165, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+12173, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 12157 /* " " */ @@ -135620,7 +135653,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110070:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:110100:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -135718,7 +135751,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:11 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110166:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:110196:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -135747,7 +135780,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110227:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -135786,7 +135819,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:110197:13: // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110238:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110268:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -136129,7 +136162,7 @@ __44: } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110405:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110435:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -136140,7 +136173,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110419:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:110449:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -136180,7 +136213,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110463:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110493:13: */ bp := tls.Alloc(544) defer tls.Free(544) @@ -136314,7 +136347,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110606:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:110636:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } @@ -136347,7 +136380,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110640:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110670:13: */ bp := tls.Alloc(488) defer tls.Free(488) @@ -136461,7 +136494,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110753:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110783:13: */ bp := tls.Alloc(464) defer tls.Free(464) @@ -136533,7 +136566,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110828:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110858:13: */ bp := tls.Alloc(432) defer tls.Free(432) @@ -136573,7 +136606,7 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110856) + rc = Xsqlite3CorruptError(tls, 110886) goto drop_column_done __2: ; @@ -136599,7 +136632,7 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+12170, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+12178, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -136619,7 +136652,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110893:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110923:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -136697,10 +136730,10 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+12177, + Xsqlite3ErrorMsg(tls, pParse, ts+12185, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 12205 /* "PRIMARY KEY" */ + return ts + 12213 /* "PRIMARY KEY" */ } return ts + 7430 /* "UNIQUE" */ }(), @@ -136713,7 +136746,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+12217, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+12225, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -136733,11 +136766,11 @@ __9: renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+12265, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12273, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+12386, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+12394, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -136852,16 +136885,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111035:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:111065:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12404}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12425}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12445}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12464}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12483}} /* sqlite3.c:111036:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12412}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12433}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12453}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12472}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12491}} /* sqlite3.c:111066:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -137017,7 +137050,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111214:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:111244:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -137058,7 +137091,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+12506, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+12514, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -137070,10 +137103,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+12529, + ts+12537, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+12559, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+12567, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) @@ -137094,10 +137127,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 12577 /* "sqlite_stat1" */, FzCols: ts + 12590 /* "tbl,idx,stat" */}, - {FzName: ts + 12603 /* "sqlite_stat4" */, FzCols: ts + 12616 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 12644 /* "sqlite_stat3" */}, -} /* sqlite3.c:111224:5 */ + {FzName: ts + 12585 /* "sqlite_stat1" */, FzCols: ts + 12598 /* "tbl,idx,stat" */}, + {FzName: ts + 12611 /* "sqlite_stat4" */, FzCols: ts + 12624 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 12652 /* "sqlite_stat3" */}, +} /* sqlite3.c:111254:5 */ // Recommended number of samples for sqlite_stat4 @@ -137124,14 +137157,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:111312:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:111342:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -137142,12 +137175,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:111312:9 */ +} /* sqlite3.c:111342:9 */ -type StatSample = StatSample1 /* sqlite3.c:111313:27 */ +type StatSample = StatSample1 /* sqlite3.c:111343:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111384:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -137156,7 +137189,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:111354:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111366:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:111396:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -137171,7 +137204,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111382:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:111412:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) @@ -137181,7 +137214,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111395:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:111425:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -137196,7 +137229,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111443:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -137231,7 +137264,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:111413:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111448:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111478:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -137326,7 +137359,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 12657} /* sqlite3.c:111534:22 */ + FzName: ts + 12665} /* sqlite3.c:111564:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -137337,7 +137370,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111558:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111588:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -137359,7 +137392,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111582:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:111612:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -137377,7 +137410,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111605:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:111635:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -137520,7 +137553,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111697:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:111727:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -137572,7 +137605,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111749:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111779:13: */ var i int32 // The three function arguments @@ -137644,7 +137677,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 12667} /* sqlite3.c:111824:22 */ + FzName: ts + 12675} /* sqlite3.c:111854:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -137663,7 +137696,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111861:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111891:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -137697,7 +137730,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+12677, + Xsqlite3_str_appendf(tls, bp+24, ts+12685, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -137707,7 +137740,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24, ts+12682, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+12690, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -137750,7 +137783,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+12688, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+12696, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- @@ -137764,9 +137797,9 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 12694} /* sqlite3.c:111958:22 */ + FzName: ts + 12702} /* sqlite3.c:111988:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111970:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:112000:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -137775,7 +137808,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112011:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:112041:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -137811,7 +137844,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+12703, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+12711, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -137829,7 +137862,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+12577, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+12585, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -138062,7 +138095,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12713, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12721, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -138124,7 +138157,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12713, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12721, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -138135,7 +138168,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112373:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112403:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -138143,7 +138176,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11237 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112383:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:112413:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr @@ -138168,7 +138201,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112410:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:112440:13: */ var iDb int32 var iStatCur int32 @@ -138177,9 +138210,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+12717) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+12725) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12721) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12729) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -138195,7 +138228,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112441:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:112471:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -138258,16 +138291,16 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:112493:9 */ +} /* sqlite3.c:112523:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:112493:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:112523:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112504:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:112534:13: */ var z uintptr = zIntArray var c int32 var i int32 @@ -138296,15 +138329,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+12725, z) == 0 { + if Xsqlite3_strglob(tls, ts+12733, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+12736, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+12744, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+12746, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+12754, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -138326,7 +138359,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112577:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:112607:12: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -138388,7 +138421,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112640:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:112670:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -138405,7 +138438,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112695:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 @@ -138463,7 +138496,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:112665:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112724:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112754:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -138484,7 +138517,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112749:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:112779:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -138620,15 +138653,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112870:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112900:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+12603, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+12611, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+12758, - ts+12812, + ts+12766, + ts+12820, zDb) } return rc @@ -138652,7 +138685,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1128 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112908:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112938:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -138680,10 +138713,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+12577, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+12585, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+12864, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+12872, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -138759,7 +138792,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113016:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:113046:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -138773,7 +138806,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113033:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:113063:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+7684, zName) == 0) } @@ -138791,7 +138824,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113055:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113085:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -138858,7 +138891,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+12905, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+12913, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -138871,7 +138904,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12908, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12916, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -138885,7 +138918,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12945, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12953, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -138956,7 +138989,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12975, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12983, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -138973,7 +139006,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+13004, 0) + ts+13012, 0) rc = SQLITE_ERROR __23: ; @@ -139049,7 +139082,7 @@ __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+13072, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+13080, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -139084,7 +139117,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113248:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:113278:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -139137,14 +139170,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13100, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13108, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13121, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13129, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -139152,7 +139185,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13147, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13155, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -139189,7 +139222,7 @@ detach_error: // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113310:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113340:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -139268,7 +139301,7 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113382:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:113412:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } @@ -139276,12 +139309,12 @@ var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 13169} /* sqlite3.c:113383:24 */ + FzName: ts + 13177} /* sqlite3.c:113413:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113402:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:113432:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } @@ -139289,10 +139322,10 @@ var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse - FzName: ts + 13183} /* sqlite3.c:113403:24 */ + FzName: ts + 13191} /* sqlite3.c:113433:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113421:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113451:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -139304,7 +139337,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+13197, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+13205, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -139312,7 +139345,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:113 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113438:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:113468:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -139337,7 +139370,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+13221, + ts+13229, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -139373,7 +139406,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113481:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:113511:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -139409,7 +139442,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113519:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:113549:20: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -139424,15 +139457,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113533:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:113563:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113539:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:113569:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113548:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:113578:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -139522,7 +139555,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113652:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:113682:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -139535,8 +139568,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113672:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+13267, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113702:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+13275, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -139547,7 +139580,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11367 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113686:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:113716:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -139562,11 +139595,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+13290, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+13298, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+13296, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+13304, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+13302, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+13310, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -139581,7 +139614,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113722:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:113752:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -139630,7 +139663,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113779:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:113809:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -139652,7 +139685,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+13329, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13337, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -139664,7 +139697,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113828:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113858:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -139673,7 +139706,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113843:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113873:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -139688,7 +139721,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1138 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113902:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113932:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -139722,7 +139755,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113938:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113968:21: */ if iDb == 1 { return } @@ -139734,7 +139767,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113984:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -139758,7 +139791,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113954:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114023:21: */ var db uintptr var v uintptr @@ -139911,7 +139944,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113993:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114164:21: */ +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:114194:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -139962,7 +139995,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114219:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:114249:22: */ var p uintptr = uintptr(0) var i int32 @@ -139986,14 +140019,14 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9371, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13344+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13363+7) == 0 || + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13352+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13371+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7196+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+13377) + ts+13385) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13363+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13371+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+7196) } @@ -140019,11 +140052,11 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9371, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13363+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13371+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+7196) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13344+7) == 0 { + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13352+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+13377) + ts+13385) } } } @@ -140038,7 +140071,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114297:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:114327:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -140059,7 +140092,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+13396, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+13404, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -140078,9 +140111,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 13404 /* "no such view" */ + zMsg = ts + 13412 /* "no such view" */ } else { - zMsg = ts + 13417 /* "no such table" */ + zMsg = ts + 13425 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+7879, libc.VaList(bp, zMsg, zDbase, zName)) @@ -140101,7 +140134,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114360:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:114390:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -140115,13 +140148,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114380:27: */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:114410:27: */ if Xsqlite3_strnicmp(tls, zName, ts+9371, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7196+7) == 0 { - return ts + 13363 /* "sqlite_schema" */ + return ts + 13371 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13377+7) == 0 { - return ts + 13344 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13385+7) == 0 { + return ts + 13352 /* "sqlite_temp_sche..." */ } } return zName @@ -140137,7 +140170,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114404:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:114434:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -140164,7 +140197,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114424:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:114454:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -140180,7 +140213,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1144 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114444:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:114474:21: */ var pIndex uintptr var pHash uintptr @@ -140212,7 +140245,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114477:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114507:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -140238,7 +140271,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:114 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114504:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:114534:21: */ var i int32 if iDb >= 0 { @@ -140259,7 +140292,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114528:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:114558:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -140281,14 +140314,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114552:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:114582:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114561:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:114591:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) @@ -140311,7 +140344,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114587:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:114617:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -140328,7 +140361,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114598:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:114628:21: */ var nColl I64 var n I64 var zNew uintptr @@ -140347,7 +140380,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114623:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:114653:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -140366,7 +140399,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1146 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114638:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114668:21: */ var i int32 var pCol uintptr @@ -140416,7 +140449,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114676:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114706:29: */ var pIndex uintptr var pNext uintptr @@ -140453,7 +140486,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11467 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114733:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:114763:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -140466,7 +140499,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114745:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:114775:21: */ var p uintptr var pDb uintptr @@ -140488,7 +140521,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114773:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:114803:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -140501,7 +140534,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114788:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:114818:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+7196) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) @@ -140514,7 +140547,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114803:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114833:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -140550,7 +140583,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114823:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:114853:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -140574,7 +140607,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114848:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114878:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140583,13 +140616,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13431, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13439, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13448, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+13456, libc.VaList(bp, pName1)) return -1 } } else { @@ -140601,7 +140634,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114881:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114911:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -140615,7 +140648,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1148 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114903:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -140636,7 +140669,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+9371, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13468, + Xsqlite3ErrorMsg(tls, pParse, ts+13476, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -140646,7 +140679,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114941:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114971:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -140657,7 +140690,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114953:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114983:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -140677,7 +140710,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114973:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115003:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -140724,7 +140757,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115021:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:115051:20: */ var i int32 var n I16 @@ -140754,7 +140787,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115047:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:115077:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -140777,7 +140810,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11504 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115072:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:115102:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -140805,7 +140838,7 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13377 /* "sqlite_temp_mast..." */ + return ts + 13385 /* "sqlite_temp_mast..." */ } return ts + 7196 /* "sqlite_master" */ }()) @@ -140825,7 +140858,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+13510, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13518, 0) return __4: ; @@ -140872,7 +140905,7 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 13377 + return ts + 13385 } return ts + 7196 }(), uintptr(0), zDb) != 0) { @@ -140912,7 +140945,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13551, + Xsqlite3ErrorMsg(tls, pParse, ts+13559, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 11728 /* "view" */ @@ -140932,7 +140965,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13572, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13580, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -141035,8 +141068,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:115119:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115198:23 */ +} /* sqlite3.c:115149:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:115228:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -141046,10 +141079,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115283:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:115313:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+13607, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+13615, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -141068,12 +141101,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115307:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:115337:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13624, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13632, 0) } else { } @@ -141094,7 +141127,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 13607 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 13615 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -141106,7 +141139,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+13607, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+13615, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -141118,7 +141151,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115355:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:115385:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -141140,7 +141173,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+13658, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13666, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -141152,13 +141185,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+13681, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+13689, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+13688, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+13696, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- @@ -141198,7 +141231,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13698, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+13706, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -141237,7 +141270,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115468:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:115498:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -141284,7 +141317,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115515:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:115545:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -141358,7 +141391,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115592:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115622:21: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -141370,11 +141403,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+13724, + Xsqlite3ErrorMsg(tls, pParse, ts+13732, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13769, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13777, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. @@ -141411,7 +141444,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115681:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -141420,12 +141453,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:115651:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115662:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:115692:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+13810, 0) + ts+13818, 0) } } @@ -141445,7 +141478,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115692:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:115722:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -141470,7 +141503,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+13862, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+13870, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -141559,7 +141592,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+13903, 0) + ts+13911, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -141576,7 +141609,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115769:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:115799:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141606,7 +141639,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115803:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:115833:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -141641,7 +141674,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115836:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115866:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -141661,7 +141694,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+13959, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13967, 0) goto generated_done __2: ; @@ -141674,13 +141707,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+14002, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+14010, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+14010, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+14018, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -141713,7 +141746,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+14017, + Xsqlite3ErrorMsg(tls, pParse, ts+14025, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -141736,7 +141769,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115904:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115934:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -141750,7 +141783,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115920:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115950:12: */ var n int32 n = 0 __1: @@ -141785,7 +141818,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115941:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115971:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -141821,7 +141854,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115969:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115999:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -141856,12 +141889,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1524 /* "" */ - zSep2 = ts + 14048 /* "," */ + zSep2 = ts + 14056 /* "," */ zEnd = ts + 6260 /* ")" */ } else { - zSep = ts + 14050 /* "\n " */ - zSep2 = ts + 14054 /* ",\n " */ - zEnd = ts + 14059 /* "\n)" */ + zSep = ts + 14058 /* "\n " */ + zSep2 = ts + 14062 /* ",\n " */ + zEnd = ts + 14067 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -141869,7 +141902,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+14062, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+14070, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') @@ -141909,15 +141942,15 @@ __6: var azType1 = [5]uintptr{ ts + 1524, - ts + 14076, - ts + 14082, - ts + 14087, - ts + 14092, -} /* sqlite3.c:115999:23 */ + ts + 14084, + ts + 14090, + ts + 14095, + ts + 14100, +} /* sqlite3.c:116029:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116037:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:116067:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -141946,7 +141979,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116064:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:116094:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -141975,7 +142008,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116108:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -141995,7 +142028,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116078:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116094:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:116124:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -142015,7 +142048,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116116:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:116146:12: */ var i int32 var j int32 @@ -142048,7 +142081,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116155:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116185:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -142087,7 +142120,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1161 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116195:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116225:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -142250,7 +142283,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116355:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:116385:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -142283,7 +142316,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116378:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:116408:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -142327,7 +142360,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116414:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:116444:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -142364,7 +142397,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116475:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:116505:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -142420,10 +142453,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+14098, + ts+14106, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1524))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+14131, + Xsqlite3ErrorMsg(tls, pParse, ts+14139, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -142443,11 +142476,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+14158, 0) + ts+14166, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14208, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14216, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -142491,7 +142524,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14240, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14248, 0) return } } @@ -142525,11 +142558,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 10113 /* "table" */ - zType2 = ts + 14284 /* "TABLE" */ + zType2 = ts + 14292 /* "TABLE" */ } else { // A view zType = ts + 11728 /* "view" */ - zType2 = ts + 14290 /* "VIEW" */ + zType2 = ts + 14298 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -142554,6 +142587,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results + if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR + (*Parse)(unsafe.Pointer(pParse)).FnErr++ + return + } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -142610,7 +142648,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+14295, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+14303, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -142618,7 +142656,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+14310, + ts+14318, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -142636,14 +142674,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+14408, + ts+14416, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14450, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14458, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -142680,7 +142718,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116812:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:116847:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -142701,7 +142739,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14484, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14492, 0) goto create_view_fail __1: ; @@ -142798,7 +142836,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116904:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116939:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -142838,7 +142876,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14520, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14528, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -142913,7 +142951,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117032:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117067:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -142943,7 +142981,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:117 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117066:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:117101:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -142969,14 +143007,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117096:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:117131:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+14550, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14558, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -142990,7 +143028,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+14565, + ts+14573, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -142999,7 +143037,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117126:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:117161:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -143045,7 +143083,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117175:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:117210:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -143054,17 +143092,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+14632, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+14640, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+12529, + ts+12537, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117198:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:117233:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -143097,7 +143135,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+14646, + ts+14654, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -143109,7 +143147,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+14691, + ts+14699, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -143128,7 +143166,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117271:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:117306:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -143139,9 +143177,9 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117287:12: */ +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:117322:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9371, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+14758, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+14766, 4) == 0 { return 0 } if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+8367, 10) == 0 { @@ -143160,7 +143198,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117306:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:117341:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -143228,7 +143266,7 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13377 + return ts + 13385 } return ts + 7196 }() @@ -143290,7 +143328,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+14763, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14771, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -143300,14 +143338,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+14791, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+14825, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14833, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -143322,7 +143360,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+12721, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+12729, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -143348,7 +143386,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117426:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:117461:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -143387,7 +143425,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+14857, + ts+14865, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -143400,7 +143438,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+14920, 0) + ts+14928, 0) goto fk_end goto __7 __6: @@ -143485,7 +143523,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+15014, + ts+15022, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -143571,7 +143609,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117558:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:117593:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -143596,7 +143634,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117581:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:117616:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -143708,7 +143746,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117687:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:117722:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -143733,7 +143771,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117720:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:117755:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -143742,12 +143780,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+15060, + Xsqlite3ErrorMsg(tls, pParse, ts+15068, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 15088 /* "FIRST" */ + return ts + 15096 /* "FIRST" */ } - return ts + 15094 /* "LAST" */ + return ts + 15102 /* "LAST" */ }())) return 1 } @@ -143766,7 +143804,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117748:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:117783:21: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -143906,7 +143944,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+15099, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+15107, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -143927,7 +143965,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+15105, + ts+15113, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -143959,21 +143997,21 @@ __6: pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+15155, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15163, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+15183, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15191, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+15208, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15216, 0) goto exit_create_index __17: ; @@ -144000,7 +144038,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+15099, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+15107, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -144015,7 +144053,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+15242, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15250, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -144027,7 +144065,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+15276, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15284, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -144056,7 +144094,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+15300, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+15308, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -144085,7 +144123,7 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13377 + return ts + 13385 } return ts + 7196 }(), uintptr(0), zDb) != 0) { @@ -144131,7 +144169,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+15099) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+15107) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -144249,7 +144287,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+15323, 0) + ts+15331, 0) goto exit_create_index __56: ; @@ -144479,7 +144517,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+15384, libc.VaList(bp+48, 0)) + ts+15392, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -144535,8 +144573,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+15426, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118204) + Xsqlite3ErrorMsg(tls, pParse, ts+15434, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118239) goto exit_create_index __101: ; @@ -144593,12 +144631,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+15443, + zStmt = Xsqlite3MPrintf(tls, db, ts+15451, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1524 /* "" */ } - return ts + 15463 /* " UNIQUE" */ + return ts + 15471 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -144610,7 +144648,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+15471, + ts+15479, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -144626,7 +144664,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+15530, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+15538, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -144722,7 +144760,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118394:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -144766,11 +144804,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:118359:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118361:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:118396:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118403:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:118438:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -144805,7 +144843,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+15557, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+15565, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -144820,7 +144858,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+15575, libc.VaList(bp+8, 0)) + ts+15583, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -144831,7 +144869,7 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13377 + return ts + 13385 } return ts + 7196 }() @@ -144861,9 +144899,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+15648, + ts+15656, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+12717, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+12725, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -144889,7 +144927,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118485:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118520:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -144916,7 +144954,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118515:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:118550:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -144947,7 +144985,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118543:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118578:21: */ var i int32 if pList == uintptr(0) { return @@ -144961,7 +144999,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118557:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:118592:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -144999,7 +145037,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118598:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:118633:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145014,7 +145052,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+15708, + Xsqlite3ErrorMsg(tls, pParse, ts+15716, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -145081,7 +145119,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118687:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:118722:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -145120,7 +145158,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118732:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:118767:21: */ var i int32 var pItem uintptr @@ -145152,7 +145190,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118750:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:118785:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -145215,7 +145253,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118784:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:118819:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145226,12 +145264,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15752, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 15780 /* "ON" */ + return ts + 15788 /* "ON" */ } - return ts + 15783 /* "USING" */ + return ts + 15791 /* "USING" */ }())) goto append_from_error __1: @@ -145279,7 +145317,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118835:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118870:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -145301,7 +145339,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118861:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118896:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -145318,7 +145356,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118880:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118915:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 @@ -145342,7 +145380,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118908:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118943:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -145353,14 +145391,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11890 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118921:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118956:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+15789, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+15797, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -145388,7 +145426,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118957:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118992:21: */ var v uintptr var isRollback int32 @@ -145396,9 +145434,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 15795 + return ts + 15803 } - return ts + 15804 + return ts + 15812 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -145410,7 +145448,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118979:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:119014:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -145423,11 +145461,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 15789, ts + 15811, ts + 15795} /* sqlite3.c:118984:23 */ +var az = [3]uintptr{ts + 15797, ts + 15819, ts + 15803} /* sqlite3.c:119019:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118999:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:119034:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145439,7 +145477,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+15819, 0) + ts+15827, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -145453,13 +145491,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119004:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:119039:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119034:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:119069:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13290, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13298, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+15903, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+15911, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -145628,7 +145666,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119206:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:119241:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -145643,7 +145681,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119225:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:119260:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -145660,7 +145698,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119246:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:119281:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -145702,7 +145740,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119278:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:119313:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145762,14 +145800,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+15912, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15920, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119338:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:119373:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -145815,7 +145853,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119382:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:119417:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -145835,7 +145873,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119446:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -145843,7 +145881,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119411:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119421:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:119456:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -145853,7 +145891,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119433:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:119468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145872,7 +145910,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+15958, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15966, libc.VaList(bp, zName)) } } } @@ -145896,7 +145934,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119480:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:119515:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -145926,7 +145964,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119515:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:119550:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -145957,7 +145995,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119544:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:119579:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -145972,7 +146010,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119548:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:119583:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -145983,7 +146021,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119571:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:119606:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -146007,7 +146045,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119599:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:119634:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) @@ -146052,7 +146090,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119651:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:119686:24: */ var pColl uintptr if zName != 0 { @@ -146068,7 +146106,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119673:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:119708:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -146088,7 +146126,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119696:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:119731:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -146110,7 +146148,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+15988, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+15996, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -146134,7 +146172,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119747:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:119782:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -146175,7 +146213,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119790:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:119825:12: */ var match int32 // Wrong number of arguments means "no match" @@ -146211,7 +146249,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119826:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:119861:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { @@ -146223,7 +146261,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119843:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119878:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -146261,7 +146299,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119888:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119923:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -146341,7 +146379,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:120015:21: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -146376,7 +146414,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119980:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120012:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:120047:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -146423,7 +146461,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120063:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:120098:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -146441,7 +146479,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. -func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120082:21: */ +func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* sqlite3.c:120117:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) @@ -146462,7 +146500,7 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120104:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:120139:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -146481,16 +146519,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120123:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:120158:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+16019, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16027, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+16048, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+16056, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -146499,7 +146537,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120144:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:120179:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -146531,7 +146569,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120283:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:120318:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -147082,7 +147120,7 @@ __60: if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16086) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16094) __61: ; @@ -147137,7 +147175,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120731:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:120766:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -147227,7 +147265,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12577) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12585) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -147274,7 +147312,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120883:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120918:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -147363,7 +147401,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120948:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120983:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -147419,7 +147457,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121010:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:121045:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -147447,7 +147485,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121044:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:121079:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 @@ -147457,14 +147495,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121057:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:121092:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121101:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -147494,7 +147532,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121096:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121131:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -147505,18 +147543,18 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 7494, ts + 7489, ts + 9244, ts + 9239, ts + 7484} /* sqlite3.c:121101:21 */ +var azType2 = [5]uintptr{ts + 7494, ts + 7489, ts + 9244, ts + 9239, ts + 7484} /* sqlite3.c:121136:21 */ // subtype(X) // // Return the subtype of X -func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121121:13: */ +func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121156:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121133:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121168:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -147565,7 +147603,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121210:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -147577,7 +147615,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+16099, -1) + Xsqlite3_result_error(tls, context, ts+16107, -1) return } iVal = -iVal @@ -147619,7 +147657,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121224:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121259:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -147734,7 +147772,7 @@ endInstrOOM: } // Implementation of the printf() (a.k.a. format()) SQL function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121292:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121327:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -147771,7 +147809,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121328:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121363:13: */ var z uintptr var z2 uintptr var len int32 @@ -147879,7 +147917,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121423:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121458:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -147917,7 +147955,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+16116, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+16124, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -147933,7 +147971,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121464:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:121499:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -147950,7 +147988,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121485:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121520:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -147971,7 +148009,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:121504:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121539:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -148000,7 +148038,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121537:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121572:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -148024,7 +148062,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121563:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121598:13: */ var n Sqlite3_int64 var p uintptr @@ -148042,7 +148080,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121587:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121622:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -148057,7 +148095,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121607:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121642:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -148066,7 +148104,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121621:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121656:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -148081,20 +148119,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:121636:1 */ +} /* sqlite3.c:121671:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121656:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:121691:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121659:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:121694:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121662:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:121697:33 */ // Possible error returns from patternMatch() @@ -148134,7 +148172,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121709:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:121744:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -148320,13 +148358,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121842:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:121877:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121850:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121885:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -148344,7 +148382,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121876:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121911:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -148367,7 +148405,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+16121, -1) + Xsqlite3_result_error(tls, context, ts+16129, -1) return } if argc == 3 { @@ -148379,7 +148417,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+16154, -1) + ts+16162, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -148407,7 +148445,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121947:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121982:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { @@ -148417,7 +148455,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121963:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121998:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -148428,7 +148466,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121979:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:122014:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -148439,7 +148477,7 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121995:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122030:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -148451,7 +148489,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122011:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122046:13: */ var zOptName uintptr _ = argc @@ -148466,7 +148504,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122035:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122070:13: */ var n int32 _ = argc @@ -148481,11 +148519,11 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:122053:19 */ +} /* sqlite3.c:122088:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. -func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122062:21: */ +func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite3.c:122097:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -148507,7 +148545,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+16199, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+16207, libc.VaList(bp+8, r1)) } } break @@ -148544,7 +148582,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+16206, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+16214, libc.VaList(bp+24, zArg)) break } @@ -148566,7 +148604,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* sqlite // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122131:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122166:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -148589,7 +148627,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122150:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122185:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -148603,7 +148641,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122165:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122200:13: */ var z uintptr var zOut uintptr var i int32 @@ -148641,7 +148679,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122206:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122241:13: */ var i int32 var n int32 var pBlob uintptr @@ -148679,7 +148717,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122234:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122269:13: */ var n I64 var rc int32 @@ -148698,7 +148736,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122257:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122292:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -148787,7 +148825,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122350:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122385:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -148890,8 +148928,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122372:27 */ -var azOne = [1]uintptr{uintptr(ts + 12157 /* " " */)} /* sqlite3.c:122373:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:122407:27 */ +var azOne = [1]uintptr{uintptr(ts + 12157 /* " " */)} /* sqlite3.c:122408:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -148900,7 +148938,7 @@ var azOne = [1]uintptr{uintptr(ts + 12157 /* " " */)} /* sqlite3.c:122373:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122463:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122498:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -148938,7 +148976,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+16209, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+16217, 4, uintptr(0)) } } @@ -148951,10 +148989,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:122471:30 */ +} /* sqlite3.c:122506:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122516:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122551:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -148966,7 +149004,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+13329, -1) + Xsqlite3_result_error(tls, context, ts+13337, -1) return } @@ -148990,11 +149028,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:122547:9 */ +} /* sqlite3.c:122582:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:122582:23 */ // Routines used to compute the sum, average, and total. // @@ -149004,7 +149042,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:122547:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122566:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122601:13: */ var p uintptr var type1 int32 @@ -149026,7 +149064,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:122588:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122623:13: */ var p uintptr var type1 int32 @@ -149049,12 +149087,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122648:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+16099, -1) + Xsqlite3_result_error(tls, context, ts+16107, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -149063,7 +149101,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122613:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122661:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -149071,7 +149109,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122626:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122668:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -149085,14 +149123,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122633:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122644:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:122679:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:122644:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:122679:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122655:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122690:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -149106,7 +149144,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122706:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -149117,7 +149155,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122671:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122677:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:122712:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -149127,7 +149165,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122695:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:122730:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -149165,7 +149203,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122733:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:122768:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -149178,11 +149216,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122744:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122779:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122750:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122785:13: */ minMaxValueFinalize(tls, context, 0) } @@ -149198,9 +149236,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:122775:3 */ +} /* sqlite3.c:122810:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122777:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122812:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -149265,7 +149303,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:122848:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122883:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -149307,7 +149345,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122929:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -149315,7 +149353,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122894:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122940:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -149333,8 +149371,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122905:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122929:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+16214, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122964:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+16222, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -149344,7 +149382,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122942:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122977:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -149354,14 +149392,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+16220, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+16228, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+16220, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+16228, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16220, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16220, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16228, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16228, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -149379,7 +149417,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122975:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:123010:20: */ var pDef uintptr var nExpr int32 @@ -149435,7 +149473,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. -func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123046:13: */ +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123081:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: @@ -149464,11 +149502,11 @@ func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. -func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123073:15: */ +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123108:15: */ return libc.Xceil(tls, x) } -func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123109:15: */ return libc.Xfloor(tls, x) } @@ -149478,7 +149516,7 @@ func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123074:15: */ // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B -func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123084:13: */ +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123119:13: */ var x float64 var b float64 var ans float64 @@ -149535,18 +149573,18 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // Functions to converts degrees to radians and radians to degrees. -func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123134:15: */ +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123169:15: */ return x * (float64(3.14159265358979323846) / 180.0) } -func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123135:15: */ +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:123170:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power -func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123142:13: */ +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123177:13: */ var type0 int32 var v0 float64 var ans float64 @@ -149567,7 +149605,7 @@ func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power -func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123164:13: */ +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123199:13: */ var type0 int32 var type1 int32 var v0 float64 @@ -149593,13 +149631,13 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } // Implementation of 0-argument pi() function. -func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123187:13: */ +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123222:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123201:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:123236:13: */ var type0 int32 var x float64 _ = argc @@ -149627,7 +149665,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123258:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -149638,109 +149676,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:123223:21: * var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 16225}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 16245}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 16258}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 16276}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 16233}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 16253}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 16266}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 16284}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16285}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16293}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16293}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16308}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16334}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16359}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16368}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16379}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16386}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16400}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16400}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16406}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16406}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 16412}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 16412}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16417}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 16417}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16421}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 16421}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 16421}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16425}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16432}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 16440}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16447}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16453}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16460}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16467}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16475}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16480}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16484}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16484}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16490}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16496}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16502}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16506}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16513}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16520}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16531}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16538}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16553}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16570}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16581}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16587}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16605}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16293}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16301}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16301}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16316}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16342}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16367}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16376}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16387}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16394}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16408}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16408}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16414}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16414}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 16420}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 16420}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16425}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16425}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 16425}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16429}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 16429}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 16429}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16433}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16440}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 16448}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16455}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16461}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16475}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16483}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16488}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16492}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16492}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16498}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16504}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16510}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16514}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16521}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16528}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16539}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16546}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16561}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16578}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16589}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16595}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16613}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16627}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16635}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16644}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16644}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16651}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16651}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16661}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16665}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16671}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16675}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16675}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16681}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16681}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16621}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16635}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16643}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16652}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16652}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16659}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16659}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16669}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16673}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16679}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16683}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16683}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16689}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16689}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16694}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16220}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16220}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16699}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16699}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16708}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16713}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16702}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16228}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16228}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16707}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16707}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16716}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16721}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16727}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16733}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16736}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16740}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16746}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16736}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16751}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16755}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16759}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16765}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16769}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16774}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16779}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16784}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16790}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16794}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16729}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16735}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16741}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16744}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16748}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16754}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16744}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16759}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16763}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16767}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16773}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16777}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16782}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16787}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16792}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16798}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16802}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16807}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16812}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16817}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16823}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16829}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16835}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16840}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16806}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16810}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16815}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16820}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16825}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16831}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16837}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16843}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16848}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16856}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16859}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16699}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 16864}} /* sqlite3.c:123234:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16856}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16864}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16867}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16707}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 16872}} /* sqlite3.c:123269:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -149915,7 +149953,7 @@ var aBuiltinFunc = [101]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123587:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:123622:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -150026,7 +150064,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+16868, + ts+16876, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -150061,7 +150099,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123724:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:123759:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -150191,7 +150229,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123877:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123912:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -150218,7 +150256,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123909:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123944:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -150259,7 +150297,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123957:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123992:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -150383,7 +150421,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124086:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:124121:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -150393,7 +150431,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124098:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124133:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -150407,7 +150445,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:124 // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. -func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124114:21: */ +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:124149:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { @@ -150440,7 +150478,7 @@ func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqli // then the equivalent of "DELETE FROM " is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124145:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:124180:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -150503,7 +150541,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124208:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124243:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom @@ -150527,7 +150565,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124235:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:124270:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol @@ -150551,7 +150589,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124264:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:124299:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -150586,7 +150624,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124297:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124332:21: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -150788,7 +150826,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124500:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:124535:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150847,7 +150885,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124550:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:124585:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -150915,7 +150953,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124618:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:124653:16: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -151117,7 +151155,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124810:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:124845:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -151138,7 +151176,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124842:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:124877:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -151198,7 +151236,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124908:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124943:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -151240,7 +151278,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124955:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124990:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -151319,7 +151357,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125034:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:125069:21: */ var i int32 var j int32 var zColAff uintptr @@ -151377,7 +151415,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125095:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125130:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -151413,7 +151451,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125132:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125167:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) @@ -151426,7 +151464,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125148:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:125183:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -151539,7 +151577,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125272:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:125307:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -151593,7 +151631,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125323:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125358:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -151633,7 +151671,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:125337:22 */ +var iLn1 int32 = 0 /* sqlite3.c:125372:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -151647,7 +151685,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125338:29 */ +} /* sqlite3.c:125373:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -151655,7 +151693,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125384:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:125419:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -151666,7 +151704,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125432:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -151697,16 +151735,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125397:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:125404:22 */ +var iLn2 int32 = 0 /* sqlite3.c:125439:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:125405:29 */ +} /* sqlite3.c:125440:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125434:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:125469:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -151807,7 +151845,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1254 // transfer values form intermediate table into
  • // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125553:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:125588:21: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -151989,7 +152027,10 @@ __8: // very fast and which reduce fragmentation of indices. // // This is the 2nd template. - if !(pColumn == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { + if !(pColumn == uintptr(0) && + pSelect != uintptr(0) && + pTrigger == uintptr(0) && + xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } @@ -152079,7 +152120,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+16913, + ts+16921, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -152104,7 +152145,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+16954, + Xsqlite3ErrorMsg(tls, pParse, ts+16962, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -152276,7 +152317,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+16986, + ts+16994, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -152286,7 +152327,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+17038, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+17046, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -152342,7 +152383,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+17063, + Xsqlite3ErrorMsg(tls, pParse, ts+17071, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -152350,7 +152391,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+17109, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17117, 0) goto insert_cleanup __57: ; @@ -152834,7 +152875,7 @@ __122: if !(regRowCount != 0) { goto __123 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+17130) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+17138) __123: ; @@ -152858,7 +152899,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126308:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:126347:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -152885,7 +152926,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126337:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:126376:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -152919,7 +152960,7 @@ type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:126370:9 */ +} /* sqlite3.c:126409:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -152930,7 +152971,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:126370:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:126409:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -152938,12 +152979,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } -} /* sqlite3.c:126371:9 */ +} /* sqlite3.c:126410:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:126371:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:126410:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126395:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126434:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix @@ -152956,7 +152997,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126407:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:126446:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -153062,7 +153103,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126514:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:126553:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -153179,7 +153220,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+13290, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+13298, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -153920,7 +153961,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127372:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:127411:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -153937,7 +153978,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127400:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:127439:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -154040,7 +154081,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127488:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:127527:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -154118,7 +154159,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127567:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:127606:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -154176,7 +154217,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127628:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:127667:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -154197,18 +154238,12 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint var regData int32 var regRowid int32 // Registers holding data and rowid - if pSelect == uintptr(0) { - return 0 // Must be of the form INSERT INTO ... SELECT ... - } if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } - if Xsqlite3TriggerList(tls, pParse, pDest) != 0 { - return 0 // tab1 must not have triggers - } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } @@ -154562,7 +154597,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128044:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128078:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -154583,7 +154618,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 128057) + return Xsqlite3MisuseError(tls, 128091) __1: ; if !(zSql == uintptr(0)) { @@ -154772,7 +154807,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128538:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:128572:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -155106,7 +155141,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, -} /* sqlite3.c:128984:35 */ +} /* sqlite3.c:129018:35 */ // True if x is the directory separator character @@ -155120,7 +155155,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129368:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129402:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -155164,7 +155199,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+13329, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+13337, 0) __3: ; return SQLITE_ERROR @@ -155174,7 +155209,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 17144 /* "sqlite3_extensio..." */ + zEntry = ts + 17152 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -155194,7 +155229,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+13290, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+13298, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -155240,7 +155275,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+17167, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+17175, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/' || int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '\\')) { @@ -155254,7 +155289,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+17176, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+17184, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -155278,7 +155313,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+17180, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+17188, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -155296,7 +155331,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+17186, libc.VaList(bp+16, zEntry, zFile)) + ts+17194, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -155323,7 +155358,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+17229, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+17237, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -155363,7 +155398,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+17261, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+17269, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -155373,10 +155408,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 17298, -} /* sqlite3.c:129386:21 */ + ts + 17306, +} /* sqlite3.c:129420:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129519:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:129553:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -155387,7 +155422,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129571:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -155398,7 +155433,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129537:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129550:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:129584:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -155418,15 +155453,15 @@ type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr -} /* sqlite3.c:129570:9 */ +} /* sqlite3.c:129604:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129570:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:129604:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129608:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -155436,7 +155471,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:129574:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129596:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129630:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -155477,7 +155512,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129643:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:129677:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -155496,7 +155531,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129702:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -155511,7 +155546,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:129668:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129724:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -155542,7 +155577,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+17302, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+17310, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -155588,67 +155623,67 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:129690 // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 6360, - ts + 17341, + ts + 17349, ts + 10113, - ts + 17345, - ts + 17350, ts + 17353, - ts + 17363, - ts + 17373, - ts + 17379, - ts + 17383, - ts + 17388, - ts + 17393, + ts + 17358, + ts + 17361, + ts + 17371, + ts + 17381, + ts + 17387, + ts + 17391, + ts + 17396, ts + 17401, - ts + 17412, - ts + 17415, + ts + 17409, + ts + 17420, + ts + 17423, - ts + 17422, - ts + 17383, - ts + 17388, - ts + 17429, - ts + 17434, + ts + 17430, + ts + 17391, + ts + 17396, ts + 17437, - ts + 17444, - ts + 17379, - ts + 17383, - ts + 17450, - ts + 17455, - ts + 17460, - ts + 17383, - ts + 17464, - ts + 17388, + ts + 17442, + ts + 17445, + ts + 17452, + ts + 17387, + ts + 17391, + ts + 17458, + ts + 17463, + ts + 17468, + ts + 17391, ts + 17472, - ts + 17476, - ts + 17481, - ts + 12721, - ts + 12717, - ts + 17487, - ts + 17492, - ts + 17497, - ts + 17341, - ts + 17383, - ts + 17502, - ts + 17509, - ts + 17516, - ts + 10113, + ts + 17396, + ts + 17480, + ts + 17484, + ts + 17489, + ts + 12729, + ts + 12725, + ts + 17495, + ts + 17500, + ts + 17505, + ts + 17349, + ts + 17391, + ts + 17510, + ts + 17517, ts + 17524, + ts + 10113, + ts + 17532, ts + 6363, - ts + 17530, + ts + 17538, - ts + 17341, - ts + 17383, - ts + 17535, - ts + 17540, - ts + 16736, - ts + 17545, + ts + 17349, + ts + 17391, + ts + 17543, + ts + 17548, + ts + 16744, + ts + 17553, - ts + 17558, - ts + 17567, - ts + 17574, + ts + 17566, + ts + 17575, + ts + 17582, - ts + 17585, -} /* sqlite3.c:129831:19 */ + ts + 17593, +} /* sqlite3.c:129865:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -155659,250 +155694,250 @@ type PragmaName1 = struct { FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 -} /* sqlite3.c:129896:9 */ +} /* sqlite3.c:129930:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:129903:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129937:3 */ var aPragmaName = [67]PragmaName{ - { /* zName: */ FzName: ts + 17593, + { /* zName: */ FzName: ts + 17601, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17608, + { /* zName: */ FzName: ts + 17616, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 17623, + { /* zName: */ FzName: ts + 17631, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17635, + { /* zName: */ FzName: ts + 17643, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 17651, + { /* zName: */ FzName: ts + 17659, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 17574, + { /* zName: */ FzName: ts + 17582, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17664, + { /* zName: */ FzName: ts + 17672, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17676, + { /* zName: */ FzName: ts + 17684, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 17696, + { /* zName: */ FzName: ts + 17704, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 17712, + { /* zName: */ FzName: ts + 17720, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 17733, + { /* zName: */ FzName: ts + 17741, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 17748, + { /* zName: */ FzName: ts + 17756, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17764, + { /* zName: */ FzName: ts + 17772, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 17778, + { /* zName: */ FzName: ts + 17786, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATA_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17799, + { /* zName: */ FzName: ts + 17807, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 17812, + { /* zName: */ FzName: ts + 17820, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 17826, + { /* zName: */ FzName: ts + 17834, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 17845, + { /* zName: */ FzName: ts + 17853, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 17864, + { /* zName: */ FzName: ts + 17872, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 17887, + { /* zName: */ FzName: ts + 17895, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 17896, + { /* zName: */ FzName: ts + 17904, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 17914, + { /* zName: */ FzName: ts + 17922, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 17931, + { /* zName: */ FzName: ts + 17939, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 17944, + { /* zName: */ FzName: ts + 17952, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 17959, + { /* zName: */ FzName: ts + 17967, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 17977, + { /* zName: */ FzName: ts + 17985, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 17987, + { /* zName: */ FzName: ts + 17995, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 18001, + { /* zName: */ FzName: ts + 18009, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 18017, + { /* zName: */ FzName: ts + 18025, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 18042, + { /* zName: */ FzName: ts + 18050, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 18061, + { /* zName: */ FzName: ts + 18069, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 18072, + { /* zName: */ FzName: ts + 18080, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 18083, + { /* zName: */ FzName: ts + 18091, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 18095, + { /* zName: */ FzName: ts + 18103, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 18111, + { /* zName: */ FzName: ts + 18119, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 18124, + { /* zName: */ FzName: ts + 18132, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 18143, + { /* zName: */ FzName: ts + 18151, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 18162, + { /* zName: */ FzName: ts + 18170, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 18175, + { /* zName: */ FzName: ts + 18183, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 18190, + { /* zName: */ FzName: ts + 18198, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 18200, + { /* zName: */ FzName: ts + 18208, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 18212, + { /* zName: */ FzName: ts + 18220, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 18221, + { /* zName: */ FzName: ts + 18229, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 18232, + { /* zName: */ FzName: ts + 18240, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 18242, + { /* zName: */ FzName: ts + 18250, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 18254, + { /* zName: */ FzName: ts + 18262, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 18265, + { /* zName: */ FzName: ts + 18273, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 18277, + { /* zName: */ FzName: ts + 18285, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 18294, + { /* zName: */ FzName: ts + 18302, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 18313, + { /* zName: */ FzName: ts + 18321, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 18339, + { /* zName: */ FzName: ts + 18347, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 18354, + { /* zName: */ FzName: ts + 18362, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 18368, + { /* zName: */ FzName: ts + 18376, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 18387, + { /* zName: */ FzName: ts + 18395, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 18401, + { /* zName: */ FzName: ts + 18409, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 18417, + { /* zName: */ FzName: ts + 18425, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 18429, + { /* zName: */ FzName: ts + 18437, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 18440, + { /* zName: */ FzName: ts + 18448, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 18451, + { /* zName: */ FzName: ts + 18459, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 18463, + { /* zName: */ FzName: ts + 18471, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 18474, + { /* zName: */ FzName: ts + 18482, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 18495, + { /* zName: */ FzName: ts + 18503, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 18503, + { /* zName: */ FzName: ts + 18511, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 18518, + { /* zName: */ FzName: ts + 18526, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 18531, + { /* zName: */ FzName: ts + 18539, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 18550, + { /* zName: */ FzName: ts + 18558, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 18565, + { /* zName: */ FzName: ts + 18573, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:129904:25 */ +} /* sqlite3.c:129938:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -155918,7 +155953,7 @@ var aPragmaName = [67]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130438:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:130472:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -155935,13 +155970,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 18581)) /* sqlite3.c:130440:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130441:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130442:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130443:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 18589)) /* sqlite3.c:130474:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:130475:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:130476:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:130477:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130463:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130497:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -155950,12 +155985,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:130 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130510:12: */ if z != 0 { if 0 == Xsqlite3StrICmp(tls, z, ts+4968) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+18606) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18614) { return PAGER_LOCKINGMODE_NORMAL } } @@ -155966,15 +156001,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130476:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130525:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+9257) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+18613) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18621) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+18618) { + if 0 == Xsqlite3StrICmp(tls, z, ts+18626) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -155989,12 +156024,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130491:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130541:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+17535) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17543) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+18630) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+18638) == 0 { return 2 } else { return 0 @@ -156004,13 +156039,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:130507:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130525:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130559:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+18637, 0) + ts+18645, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -156023,7 +156058,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130549:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:130583:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -156037,7 +156072,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130564:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:130598:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -156071,7 +156106,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130617:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value @@ -156081,7 +156116,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:130583: } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130591:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:130625:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -156090,7 +156125,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130641:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -156106,23 +156141,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:130607:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130669:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 18699 /* "SET NULL" */ + zName = ts + 18707 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 18708 /* "SET DEFAULT" */ + zName = ts + 18716 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 18720 /* "CASCADE" */ + zName = ts + 18728 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 18728 /* "RESTRICT" */ + zName = ts + 18736 /* "RESTRICT" */ break default: - zName = ts + 18737 /* "NO ACTION" */ + zName = ts + 18745 /* "NO ACTION" */ break } return zName @@ -156131,7 +156166,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:130635:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130655:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:130689:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -156140,11 +156175,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 18747, ts + 18754, ts + 18762, ts + 18766, ts + 18630, ts + 18775, -} /* sqlite3.c:130656:15 */ + ts + 18755, ts + 18762, ts + 18770, ts + 18774, ts + 18638, ts + 18783, +} /* sqlite3.c:130690:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130711:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -156171,7 +156206,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:130677:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130698:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:130732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -156186,13 +156221,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 18779 /* "w" */ + zType = ts + 18787 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 18781 /* "a" */ + zType = ts + 18789 /* "a" */ } else { zType = ts + 8767 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18783, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18791, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -156200,15 +156235,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130706:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 18790, ts + 18795, ts + 18803 /* "utf16be" */} /* sqlite3.c:130713:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:130740:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 18798, ts + 18803, ts + 18811 /* "utf16be" */} /* sqlite3.c:130747:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130750:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:130784:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -156230,7 +156265,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1307 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130774:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:130808:21: */ bp := tls.Alloc(624) defer tls.Free(624) @@ -156479,7 +156514,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+18811, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+18819, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -157136,7 +157171,7 @@ __18: if !(zRight != 0) { goto __64 } - if !(Xsqlite3_stricmp(tls, zRight, ts+18815) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+18823) == 0) { goto __65 } b = 2 @@ -157225,7 +157260,7 @@ __72: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 18606 /* "normal" */ + zRet = ts + 18614 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -157631,7 +157666,7 @@ __124: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 520)) == 0) { goto __127 } - Xsqlite3ErrorMsg(tls, pParse, ts+18820, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18828, 0) goto pragma_out __127: ; @@ -157684,7 +157719,7 @@ __131: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 524)) == 0) { goto __134 } - Xsqlite3ErrorMsg(tls, pParse, ts+18820, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18828, 0) goto pragma_out __134: ; @@ -157722,7 +157757,7 @@ __137: goto __139 } Xsqlite3ErrorMsg(tls, pParse, - ts+18845, 0) + ts+18853, 0) goto __140 __139: if !(iDb != 1) { @@ -157778,7 +157813,7 @@ __146: __148: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+18898) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+18906) == 0) { goto __149 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -157892,9 +157927,9 @@ __162: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 18904 /* "issisii" */ + return ts + 18912 /* "issisii" */ } - return ts + 18912 /* "issisi" */ + return ts + 18920 /* "issisi" */ }(), libc.VaList(bp+32, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -157979,7 +158014,7 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __178 } - zSql = Xsqlite3MPrintf(tls, db, ts+18919, libc.VaList(bp+88, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+18927, libc.VaList(bp+88, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __179 } @@ -158032,13 +158067,13 @@ __185: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __187 } - zType = ts + 14002 /* "virtual" */ + zType = ts + 14010 /* "virtual" */ goto __188 __187: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __189 } - zType = ts + 18935 /* "shadow" */ + zType = ts + 18943 /* "shadow" */ goto __190 __189: zType = ts + 10113 /* "table" */ @@ -158048,7 +158083,7 @@ __188: ; __186: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18942, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18950, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -158118,7 +158153,7 @@ __197: goto __199 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18949, libc.VaList(bp+144, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18957, libc.VaList(bp+144, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -158128,7 +158163,7 @@ __197: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __200 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18954, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18962, libc.VaList(bp+168, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -158165,8 +158200,8 @@ __203: if !(pIdx1 != 0) { goto __205 } - *(*[3]uintptr)(unsafe.Pointer(bp + 536 /* azOrigin */)) = [3]uintptr{ts + 18959, ts + 18961, ts + 17412} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18963, + *(*[3]uintptr)(unsafe.Pointer(bp + 536 /* azOrigin */)) = [3]uintptr{ts + 18967, ts + 18969, ts + 17420} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18971, libc.VaList(bp+192, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -158200,7 +158235,7 @@ __206: __209: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18969, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18977, libc.VaList(bp+232, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -158223,7 +158258,7 @@ __210: goto __212 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18973, libc.VaList(bp+256, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18981, libc.VaList(bp+256, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __211 __211: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -158342,7 +158377,7 @@ __233: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __235 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18976, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18984, libc.VaList(bp+288, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -158350,7 +158385,7 @@ __233: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+18985)) + ts+18993)) goto __234 __234: j2++ @@ -158551,7 +158586,7 @@ __263: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __264: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18990, libc.VaList(bp+352, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18998, libc.VaList(bp+352, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 568 /* aiCols */))) @@ -158817,7 +158852,7 @@ __291: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+18994, libc.VaList(bp+368, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+19002, libc.VaList(bp+368, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -158919,7 +158954,7 @@ __311: goto __312 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+19018, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+19026, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { @@ -158941,7 +158976,7 @@ __312: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+19038, + zErr = Xsqlite3MPrintf(tls, db, ts+19046, libc.VaList(bp+392, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -158985,7 +159020,7 @@ __320: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+19060, + zErr1 = Xsqlite3MPrintf(tls, db, ts+19068, libc.VaList(bp+416, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -159019,9 +159054,9 @@ __325: // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+19090) + Xsqlite3VdbeLoadString(tls, v, 3, ts+19098) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+19095) + Xsqlite3VdbeLoadString(tls, v, 4, ts+19103) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -159061,7 +159096,7 @@ __329: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+19116) + Xsqlite3VdbeLoadString(tls, v, 3, ts+19124) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __326: @@ -159083,7 +159118,7 @@ __321: if !!(isQuick != 0) { goto __331 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+19143) + Xsqlite3VdbeLoadString(tls, v, 2, ts+19151) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __332: @@ -159134,7 +159169,7 @@ __273: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 19172 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 19180 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __336: @@ -159212,7 +159247,7 @@ __343: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __345 } - Xsqlite3ErrorMsg(tls, pParse, ts+19175, libc.VaList(bp+424, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+19183, libc.VaList(bp+424, zRight)) __345: ; __340: @@ -159324,19 +159359,19 @@ __49: if !(zRight != 0) { goto __352 } - if !(Xsqlite3StrICmp(tls, zRight, ts+18613) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+18621) == 0) { goto __353 } eMode2 = SQLITE_CHECKPOINT_FULL goto __354 __353: - if !(Xsqlite3StrICmp(tls, zRight, ts+19200) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+19208) == 0) { goto __355 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __356 __355: - if !(Xsqlite3StrICmp(tls, zRight, ts+18766) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+18774) == 0) { goto __357 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -159523,7 +159558,7 @@ __372: __374: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+19208, + zSubSql = Xsqlite3MPrintf(tls, db, ts+19216, libc.VaList(bp+432, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __375 @@ -159674,9 +159709,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:132349:18 */ +} /* sqlite3.c:132383:18 */ -var iLn3 int32 = 0 /* sqlite3.c:130903:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130937:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -159687,16 +159722,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:130904:29 */ -var iLn4 int32 = 0 /* sqlite3.c:131172:26 */ +} /* sqlite3.c:130938:29 */ +var iLn4 int32 = 0 /* sqlite3.c:131206:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:131173:33 */ -var iLn5 int32 = 0 /* sqlite3.c:132299:24 */ +} /* sqlite3.c:131207:33 */ +var iLn5 int32 = 0 /* sqlite3.c:132333:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -159705,27 +159740,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:132300:31 */ +} /* sqlite3.c:132334:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 19226, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 19231, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 19237, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 19246, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 19255, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 19263, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 19271}, - {FzName: ts + 19278}, + {FzName: ts + 19234, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 19239, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 19245, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 19254, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 19263, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 19271, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 19279}, + {FzName: ts + 19286}, {}, -} /* sqlite3.c:132352:7 */ +} /* sqlite3.c:132386:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:132432:31 */ +} /* sqlite3.c:132466:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:132447:31 */ +} /* sqlite3.c:132481:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -159737,24 +159772,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte -} /* sqlite3.c:132807:9 */ +} /* sqlite3.c:132841:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:132807:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:132841:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:132808:9 */ +} /* sqlite3.c:132842:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132808:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:132842:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132826:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:132860:12: */ bp := tls.Alloc(264) defer tls.Free(264) @@ -159771,7 +159806,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+19284) + Xsqlite3_str_appendall(tls, bp+32, ts+19292) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -159779,7 +159814,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+19299, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+19307, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -159792,16 +159827,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+19306, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+19314, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+19312) + Xsqlite3_str_appendall(tls, bp+32, ts+19320) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+19324) + Xsqlite3_str_appendall(tls, bp+32, ts+19332) j++ } Xsqlite3_str_append(tls, bp+32, ts+6260, 1) @@ -159828,7 +159863,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132888:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132922:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -159840,7 +159875,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:132 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132901:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132935:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -159905,7 +159940,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132938:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132972:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -159918,7 +159953,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132983:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -159929,7 +159964,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132949:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132994:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -159937,7 +159972,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132960:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132968:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133002:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -159953,7 +159988,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132986:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:133020:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -159999,13 +160034,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+19339) + Xsqlite3_str_appendall(tls, bp+32, ts+19347) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+19347, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+19355, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+19351, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+19359, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -160021,14 +160056,14 @@ __3: } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133036:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:133070:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133044:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:133078:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -160040,7 +160075,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133062:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:133096:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -160058,12 +160093,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:133069:29 */ +} /* sqlite3.c:133103:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133101:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:133135:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -160096,7 +160131,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133138:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:133172:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -160107,12 +160142,12 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+19355, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+19363, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133161) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133195) } else { var z uintptr var zObj uintptr @@ -160121,25 +160156,25 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 6311 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+19383, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+19391, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+19414, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+19422, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133168) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133202) } } var azAlterType = [3]uintptr{ - ts + 19422, - ts + 19429, - ts + 19441, -} /* sqlite3.c:133149:23 */ + ts + 19430, + ts + 19437, + ts + 19449, +} /* sqlite3.c:133183:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133177:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:133211:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -160161,7 +160196,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133211:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:133245:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -160206,7 +160241,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+15426) + corruptSchema(tls, pData, argv, ts+15434) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -160244,13 +160279,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+19452) + corruptSchema(tls, pData, argv, ts+19460) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+15426) + corruptSchema(tls, pData, argv, ts+15434) } } } @@ -160263,7 +160298,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133314:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:133348:20: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -160296,13 +160331,13 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 10113 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13377 + return ts + 13385 } return ts + 7196 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 9177 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 19465 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 19473 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb @@ -160415,7 +160450,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+13004) + ts+13012) rc = SQLITE_ERROR goto initone_error_out __13: @@ -160455,7 +160490,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+19537) + Xsqlite3SetString(tls, pzErrMsg, db, ts+19545) rc = SQLITE_ERROR goto initone_error_out __17: @@ -160477,7 +160512,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+19561, + ts+19569, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -160564,7 +160599,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133553:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:133587:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -160596,7 +160631,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133585:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:133619:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -160615,7 +160650,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1335 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133641:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160668,7 +160703,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133607:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133657:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:133691:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -160695,7 +160730,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133687:21: */ +func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:133721:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) @@ -160751,7 +160786,7 @@ func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1336 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133742:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:133776:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -160774,7 +160809,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. -func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133772:21: */ +func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sqlite3.c:133806:21: */ libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) @@ -160787,7 +160822,7 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* sql } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133785:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133819:12: */ bp := tls.Alloc(424) defer tls.Free(424) @@ -160869,7 +160904,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+19595, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+19603, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -160896,7 +160931,7 @@ __3: if !(nBytes > mxLen) { goto __11 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+19625, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+19633, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: @@ -160993,13 +161028,13 @@ end_prepare: return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133928:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133962:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133945) + return Xsqlite3MisuseError(tls, 133979) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -161028,7 +161063,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134009:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161067,14 +161102,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133975:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134014:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134048:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134026:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134060:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -161087,7 +161122,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:134044:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134078:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -161104,7 +161139,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134072:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134106:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -161117,7 +161152,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 134093) + return Xsqlite3MisuseError(tls, 134127) } if nBytes >= 0 { var sz int32 @@ -161152,21 +161187,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134130:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134164:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134142:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134176:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), 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:134154:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:134188:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -161200,7 +161235,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:134195:9 */ +} /* sqlite3.c:134229:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -161221,7 +161256,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:134195:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:134229:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -161251,7 +161286,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -161269,19 +161304,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:134221:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:134255:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:134221:9 */ +} /* sqlite3.c:134255:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134251:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:134285:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -161310,7 +161345,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134280:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:134314:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -161321,7 +161356,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134294:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:134328:23: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -161371,14 +161406,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134352:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:134386:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134393:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -161400,7 +161435,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134359:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134381:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:134415:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -161443,18 +161478,18 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+19644, libc.VaList(bp, pA, pB, zSp, pC)) + ts+19652, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+19688, 0) + ts+19696, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 19743)) /* sqlite3.c:134386:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 19751)) /* sqlite3.c:134420:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -161467,11 +161502,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:134391:5 */ +} /* sqlite3.c:134425:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134442:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:134476:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -161505,7 +161540,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134461:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:134495:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -161533,7 +161568,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134499:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:134533:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -161578,7 +161613,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134561:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134595:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -161602,7 +161637,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134621:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { @@ -161637,7 +161672,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:134587 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134624:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:134658:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -161669,7 +161704,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19777, libc.VaList(bp, 0)) + ts+19785, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -161693,7 +161728,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19827, 0) + ts+19835, 0) return 1 } @@ -161728,7 +161763,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+19882, libc.VaList(bp+8, zName)) + ts+19890, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -161751,11 +161786,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134716:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:134750:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134730:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:134764:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -161764,7 +161799,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134751:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:134785:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -161777,7 +161812,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134772:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:134806:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -161920,7 +161955,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134914:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:134948:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -161968,7 +162003,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134968:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:135002:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -162049,7 +162084,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135052:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:135086:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -162077,7 +162112,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135174:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:135208:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -162433,7 +162468,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135568:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:135602:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra)) if p != 0 { @@ -162451,7 +162486,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135622:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -162462,7 +162497,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:135588:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135633:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -162482,7 +162517,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:135599: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135631:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:135665:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -162516,20 +162551,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135692:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 19946 /* "UNION ALL" */ + z = ts + 19954 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 19956 /* "INTERSECT" */ + z = ts + 19964 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 19966 /* "EXCEPT" */ + z = ts + 19974 /* "EXCEPT" */ break default: - z = ts + 19973 /* "UNION" */ + z = ts + 19981 /* "UNION" */ break } return z @@ -162543,11 +162578,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:135658 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135680:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:135714:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19979, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19987, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -162560,7 +162595,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135706:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:135740:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -162739,7 +162774,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135934:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135968:19: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -162817,7 +162852,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1089 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 17524 /* "rowid" */ + *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 17532 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -162863,7 +162898,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136085:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:136119:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -162920,7 +162955,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136152:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136186:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -162972,13 +163007,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 17524 /* "rowid" */ + zCol = ts + 17532 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+13290, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+13298, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) @@ -162988,7 +163023,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+20002, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+20010, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -163020,7 +163055,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136245:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:136279:20: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -163081,7 +163116,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 17524 /* "rowid" */ + zName = ts + 17532 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -163094,7 +163129,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+20002, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+20010, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -163109,7 +163144,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+20011, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+20019, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -163152,7 +163187,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136352:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:136386:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -163221,7 +163256,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136407:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:136441:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -163256,7 +163291,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136440:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:136474:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -163288,7 +163323,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13644 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136476:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:136510:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -163345,7 +163380,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136533:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:136567:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -163369,7 +163404,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136559:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:136593:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -163438,7 +163473,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136625:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:136659:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -163474,7 +163509,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+20019, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20027, 0) return __1: ; @@ -163584,7 +163619,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+20068, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20076, 0) goto end_of_recursive_query __15: ; @@ -163606,7 +163641,7 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20110, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20118, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -163649,7 +163684,7 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20116, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20124, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -163679,7 +163714,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136801:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -163699,11 +163734,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20131, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20139, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1524 /* "" */ } - return ts + 20154 /* "S" */ + return ts + 20162 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -163719,7 +163754,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136872:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -163755,7 +163790,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:136838:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136874:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136908:12: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -163855,8 +163890,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20156, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20171, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20164, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20179, 0) __8: ; @@ -163905,7 +163940,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19946, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19954, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -163981,7 +164016,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20190, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20198, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -164053,7 +164088,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20190, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20198, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -164218,15 +164253,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137230:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137264:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20211, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20219, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+20257, + ts+20265, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -164249,7 +164284,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137260:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:137294:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -164445,7 +164480,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137468:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137502:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -164652,7 +164687,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20339, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20347, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -164660,7 +164695,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20350, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20358, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -164674,7 +164709,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20355, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20363, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -164795,14 +164830,14 @@ type SubstContext1 = struct { FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr -} /* sqlite3.c:137793:9 */ +} /* sqlite3.c:137827:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:137833:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -164815,7 +164850,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:137799:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137818:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:137852:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -164898,7 +164933,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:137903:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:137937:13: */ var i int32 if pList == uintptr(0) { return @@ -164908,7 +164943,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137913:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:137947:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -164951,7 +164986,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137948:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137982:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -164967,7 +165002,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137957:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137991:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -164999,7 +165034,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137986:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:138020:13: */ var i int32 var pItem uintptr i = 0 @@ -165032,7 +165067,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138012:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:138046:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -165042,7 +165077,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138024:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138058:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) @@ -165069,7 +165104,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138053:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:138087:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -165239,7 +165274,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138224:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:138258:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -165664,7 +165699,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:138682:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -165672,7 +165707,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:138648:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138666:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:138700:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -165714,7 +165749,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138714:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:138748:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -165749,7 +165784,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138745:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:138779:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -165803,7 +165838,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138794:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138828:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -165870,7 +165905,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138865:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:138899:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -165923,7 +165958,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138916:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:138950:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -165994,7 +166029,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138994:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:139028:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -166082,7 +166117,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139098:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:139132:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -166098,12 +166133,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+16417) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+16425) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+16421) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+16429) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -166132,7 +166167,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139153:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:139187:14: */ var pTab uintptr var pExpr uintptr @@ -166172,7 +166207,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139191:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139225:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166183,7 +166218,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+20361, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+20369, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -166211,7 +166246,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139233:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139267:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -166290,12 +166325,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139298:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139332:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20379, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20387, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -166309,7 +166344,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139317:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:139351:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -166344,7 +166379,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139356:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:139390:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -166377,7 +166412,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139387:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:139421:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -166460,7 +166495,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20402, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) + Xsqlite3ErrorMsg(tls, pParse, ts+20410, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 96)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -166487,7 +166522,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+20422, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+20430, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -166503,7 +166538,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20465 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20473 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -166529,7 +166564,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+20488, + Xsqlite3ErrorMsg(tls, pParse, ts+20496, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -166540,9 +166575,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20526 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20534 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20560 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 20568 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -166559,7 +166594,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139571:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139605:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -166575,7 +166610,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139590:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:139624:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -166590,7 +166625,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+20598, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+20606, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -166629,7 +166664,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139642:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:139676:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -166717,7 +166752,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+20610, + Xsqlite3ErrorMsg(tls, pParse, ts+20618, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -166736,7 +166771,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+20649, + Xsqlite3ErrorMsg(tls, pParse, ts+20657, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -166744,7 +166779,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+20680, + Xsqlite3ErrorMsg(tls, pParse, ts+20688, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -166909,7 +166944,7 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+13290, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+13298, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { @@ -166925,7 +166960,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20713, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+20721, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -166945,9 +166980,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+20722, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20730, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+20740, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20748, 0) } } } @@ -166957,7 +166992,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+20760, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20768, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -166978,7 +167013,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139969:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140003:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -167016,7 +167051,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139999:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:140033:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -167064,7 +167099,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140034:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:140068:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -167093,7 +167128,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140058:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:140092:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -167118,7 +167153,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140082:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140116:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167146,13 +167181,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+20791, 0) + ts+20799, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20842, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20850, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -167168,7 +167203,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140128:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:140162:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -167207,7 +167242,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140151:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:140185:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -167348,17 +167383,17 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140253:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:140287:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20875, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20883, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 20887 /* " USING COVERING ..." */ + return ts + 20895 /* " USING COVERING ..." */ } return ts + 1524 /* "" */ }(), @@ -167380,7 +167415,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140282:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:140316:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) // This routine is called before the HAVING clause of the current @@ -167426,7 +167461,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140326:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:140360:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -167444,7 +167479,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1403 // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140346:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:140380:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -167485,7 +167520,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140415:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -167502,7 +167537,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:140381:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140489:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:140523:20: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -167703,7 +167738,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+20910, + ts+20918, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -167789,7 +167824,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+20964, + Xsqlite3ErrorMsg(tls, pParse, ts+20972, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -168029,7 +168064,7 @@ __36: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21004, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21012, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 4, 0x10) @@ -168092,7 +168127,7 @@ __45: __46: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21019, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21027, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { @@ -168614,9 +168649,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 21035 /* "DISTINCT" */ + return ts + 21043 /* "DISTINCT" */ } - return ts + 21044 /* "GROUP BY" */ + return ts + 21052 /* "GROUP BY" */ }()) groupBySort = 1 @@ -169029,7 +169064,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+21035) + explainTempTable(tls, pParse, ts+21043) __141: ; @@ -169041,9 +169076,9 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 21053 /* "RIGHT PART OF OR..." */ + return ts + 21061 /* "RIGHT PART OF OR..." */ } - return ts + 21076 /* "ORDER BY" */ + return ts + 21084 /* "ORDER BY" */ }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) @@ -169099,7 +169134,7 @@ type TabResult1 = struct { FnData U32 Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:141752:9 */ +} /* sqlite3.c:141786:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -169123,12 +169158,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:141760:3 */ +type TabResult = TabResult1 /* sqlite3.c:141794:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141767:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:141801:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -169199,7 +169234,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+21085, 0) + ts+21093, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -169259,7 +169294,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141841:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:141875:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -169331,7 +169366,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141944:17: */ if azResult != 0 { var i int32 var n int32 @@ -169362,7 +169397,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:141910: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141945:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141979:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -169391,7 +169426,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141976:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:142010:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -169429,7 +169464,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142032:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:142066:21: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -169459,7 +169494,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+21150, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21158, 0) goto trigger_cleanup __3: ; @@ -169520,7 +169555,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+21196, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+21204, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -169538,7 +169573,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+21204, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21212, 0) goto trigger_orphan_error __11: ; @@ -169553,7 +169588,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+21196, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+21204, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -169569,7 +169604,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+21245, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21253, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -169586,7 +169621,7 @@ __14: if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9371, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+21271, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21279, 0) goto trigger_cleanup __18: ; @@ -169596,12 +169631,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+21309, + Xsqlite3ErrorMsg(tls, pParse, ts+21317, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 21346 /* "BEFORE" */ + return ts + 21354 /* "BEFORE" */ } - return ts + 21353 /* "AFTER" */ + return ts + 21361 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -169610,7 +169645,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+21359, libc.VaList(bp+24, pTableName+8)) + ts+21367, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -169640,7 +169675,7 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 13377 + return ts + 13385 } return ts + 7196 }(), uintptr(0), zDb) != 0) { @@ -169736,7 +169771,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142239:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:142273:21: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -169776,7 +169811,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+21196, bp+40) + Xsqlite3FixInit(tls, bp+56, pParse, iDb, ts+21204, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -169813,13 +169848,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+21405, + ts+21413, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+21480, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+21488, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -169860,7 +169895,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142327:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142361:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -169878,7 +169913,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142341:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142375:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -169895,10 +169930,13 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142365:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142399:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return uintptr(0) + } pTriggerStep = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))+uint64((*Token)(unsafe.Pointer(pName)).Fn)+uint64(1)) if pTriggerStep != 0 { var z uintptr = pTriggerStep + 1*96 @@ -169919,7 +169957,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142397:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142432:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -169951,7 +169989,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142442:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142477:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -169980,7 +170018,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142482:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:142517:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -169999,7 +170037,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142509:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:142544:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -170019,7 +170057,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142527:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:142562:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170085,7 +170123,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+21509, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+21517, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -170103,12 +170141,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142569:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:142604:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142577:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:142612:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -170126,7 +170164,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 13377 + return ts + 13385 } return ts + 7196 }() @@ -170141,7 +170179,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+21529, + ts+21537, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -170149,7 +170187,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142615:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:142650:21: */ var pTrigger uintptr var pHash uintptr @@ -170180,7 +170218,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142649:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:142684:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -170197,7 +170235,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142664:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:142699:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170260,12 +170298,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+21591, + ts+21599, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 21639 /* "DELETE" */ + return ts + 21647 /* "DELETE" */ } - return ts + 21646 /* "UPDATE" */ + return ts + 21654 /* "UPDATE" */ }())) __15: ; @@ -170324,7 +170362,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142738:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:142773:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -170349,7 +170387,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142769:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:142804:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -170361,7 +170399,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+21653, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21661, 0) return 1 } @@ -170370,7 +170408,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142789:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:142824:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -170411,7 +170449,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142832:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:142867:13: */ bp := tls.Alloc(304) defer tls.Free(304) @@ -170479,7 +170517,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142908:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:142943:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -170566,7 +170604,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143012:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:143047:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -170579,7 +170617,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143028:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143063:19: */ bp := tls.Alloc(472) defer tls.Free(472) @@ -170636,7 +170674,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+21695, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+21703, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -170685,7 +170723,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143142:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:143177:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -170714,7 +170752,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143177:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143212:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -170774,7 +170812,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143249:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:143284:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -170822,7 +170860,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143319:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:143354:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -170879,7 +170917,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143417:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:143452:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170909,7 +170947,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143450:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143485:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -170930,7 +170968,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143480:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:143515:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -170942,7 +170980,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143496:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:143531:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -170986,7 +171024,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143540:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:143575:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -171069,7 +171107,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143637:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:143672:21: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -171350,7 +171388,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+21709, + ts+21717, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -171382,7 +171420,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+21745, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21753, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -172423,7 +172461,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+21764) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+21772) __169: ; @@ -172459,7 +172497,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144529:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:144564:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172632,7 +172670,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144752:29: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -172645,14 +172683,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144717:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144729:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144764:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144737:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144772:23: */ if p == uintptr(0) { return uintptr(0) } @@ -172665,7 +172703,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144751:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:144786:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -172691,7 +172729,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144786:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:144821:20: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -172811,10 +172849,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 216)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+21777, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+21785, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+21781, libc.VaList(bp+8, bp+216)) + ts+21789, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -172833,7 +172871,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144913:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:144948:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -172855,7 +172893,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144929:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:144964:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -172871,7 +172909,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144949:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144984:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -172905,7 +172943,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+13431, -1) + ts+13439, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -172951,7 +172989,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145046:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:145081:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -172973,7 +173011,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+21854, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21858, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+21862, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+21866, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -172991,7 +173029,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145076:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:145111:12: */ var z uintptr var ap Va_list _ = ap @@ -173035,7 +173073,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145119:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:145154:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -173092,7 +173130,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145157:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:145192:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -173123,14 +173161,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21862) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21870) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21902) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21910) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -173141,7 +173179,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+21945) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21953) return SQLITE_ERROR __5: ; @@ -173186,7 +173224,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+21963, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+21971, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -173207,7 +173245,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+21986) + Xsqlite3SetString(tls, pzErrMsg, db, ts+21994) goto end_of_vacuum __8: ; @@ -173223,7 +173261,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+15789) + rc = execSql(tls, db, pzErrMsg, ts+15797) if !(rc != SQLITE_OK) { goto __9 } @@ -173275,7 +173313,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+22013, + ts+22021, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -173285,7 +173323,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+22121, + ts+22129, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -173300,7 +173338,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+22175, + ts+22183, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -173317,7 +173355,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+22326, + ts+22334, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -173430,7 +173468,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:145350:32 */ +} /* sqlite3.c:145385:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -173438,7 +173476,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145462:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:145497:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -173478,7 +173516,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145510:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145545:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -173492,18 +173530,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145531:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:145566:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145546:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:145581:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145563:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:145598:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { @@ -173524,7 +173562,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145585:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145620:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -173542,14 +173580,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145605:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145640:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145615:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:145650:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -173559,7 +173597,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145661:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -173580,7 +173618,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:145626:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145652:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:145687:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -173617,7 +173655,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145695:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145730:21: */ var ppVTab uintptr for ppVTab = p + 64 + 16; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 40 { @@ -173648,7 +173686,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145768:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -173674,7 +173712,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:145733:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145764:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:145799:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -173694,7 +173732,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1457 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145782:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:145817:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -173704,7 +173742,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+13658, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13666, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -173720,7 +173758,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145808:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:145843:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -173755,7 +173793,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145892:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -173766,7 +173804,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145857:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145870:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:145905:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -173801,7 +173839,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+22456, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+22464, libc.VaList(bp, pParse+256)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -173813,7 +173851,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+22480, + ts+22488, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -173823,7 +173861,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+22579, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+22587, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -173850,7 +173888,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145988:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -173858,7 +173896,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145953:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145963:21: */ +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145998:21: */ var pArg uintptr = pParse + 368 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz @@ -173872,7 +173910,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145979:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:146014:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -173893,7 +173931,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+22598, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+22606, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -173933,7 +173971,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22640, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22648, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+4444, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) @@ -173947,7 +173985,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 22670 /* "vtable construct..." */ + var zFormat uintptr = ts + 22678 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -173968,7 +174006,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+17415, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+17423, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -174008,7 +174046,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146115:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:146150:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -174027,7 +174065,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+22716, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+22724, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) @@ -174044,7 +174082,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146186:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -174064,7 +174102,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146151:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146209:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -174076,7 +174114,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:146174 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146188:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:146223:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174095,7 +174133,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22716, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+22724, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -174116,7 +174154,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146229:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:146264:16: */ bp := tls.Alloc(416) defer tls.Free(416) @@ -174132,7 +174170,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 146246) + return Xsqlite3MisuseError(tls, 146281) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -174206,7 +174244,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146322:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:146357:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -174251,7 +174289,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146366:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:146401:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -174281,7 +174319,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14636 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146394:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:146429:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -174303,14 +174341,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146416:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146451:20: */ callFinaliser(tls, db, int32(uintptr(0)+136)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146460:20: */ callFinaliser(tls, db, int32(uintptr(0)+128)) return SQLITE_OK } @@ -174321,7 +174359,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146425:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146438:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:146473:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -174382,7 +174420,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146498:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:146533:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -174430,7 +174468,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146546:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:146581:24: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174497,7 +174535,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146616:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:146651:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -174536,7 +174574,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146650:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:146685:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174581,7 +174619,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146688:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:146723:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -174598,19 +174636,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146707:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:146742:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:146708:30 */ +} /* sqlite3.c:146743:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146725:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:146760:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -174619,7 +174657,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 146736) + rc = Xsqlite3MisuseError(tls, 146771) } else { ap = va @@ -174647,7 +174685,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 146754) + rc = Xsqlite3MisuseError(tls, 146789) break } @@ -174711,7 +174749,7 @@ type WhereClause1 = struct { FnBase int32 Fa uintptr FaStatic [8]WhereTerm -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ //************* End of vtab.c *********************************************** //************* Begin file wherecode.c ************************************** @@ -174751,23 +174789,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:146814:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:146849:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146815:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:146850:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:146816:9 */ +} /* sqlite3.c:146851:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146816:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146817:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:146851:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:146852:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146817:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:146852:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -174797,9 +174835,9 @@ type WhereLevel1 = struct { } FpWLoop uintptr FnotReady Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:146818:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:146853:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -174826,9 +174864,9 @@ type WhereLoop1 = struct { FaLTerm uintptr FpNextLoop uintptr FaLTermSpace [3]uintptr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:146819:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:146854:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -174838,9 +174876,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:146820:9 */ +} /* sqlite3.c:146855:9 */ -type WherePath = WherePath1 /* sqlite3.c:146820:26 */ +type WherePath = WherePath1 /* sqlite3.c:146855:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -174860,9 +174898,9 @@ type WhereTerm1 = struct { } FprereqRight Bitmask FprereqAll Bitmask -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:146821:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:146856:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -174875,9 +174913,9 @@ type WhereLoopBuilder1 = struct { F__ccgo_pad1 [2]byte FiPlanLimit uint32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146822:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:146857:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -174892,24 +174930,24 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:146823:9 */ +} /* sqlite3.c:146858:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:146823:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:146858:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst F__ccgo_pad1 [4]byte -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:146824:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:146859:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [6]byte Fa [3]WhereOrCost -} /* sqlite3.c:146822:9 */ +} /* sqlite3.c:146857:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:146825:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:146860:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -174931,7 +174969,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:146865:7 */ +} /* sqlite3.c:146900:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -174957,7 +174995,7 @@ type WhereExprMod1 = struct { FpNext uintptr FpExpr uintptr Forig Expr -} /* sqlite3.c:14622:9 */ +} /* sqlite3.c:14626:9 */ // Allowed values for WhereLoopBuider.bldFlags @@ -174979,7 +175017,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:147262:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -175001,13 +175039,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:147227:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147421:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:147456:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 22735 /* "" */ + return ts + 22743 /* "" */ } if i == -1 { - return ts + 17524 /* "rowid" */ + return ts + 17532 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -175018,19 +175056,19 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147436:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:147471:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+22742, 5) + Xsqlite3_str_append(tls, pStr, ts+22750, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+22748, 1) + Xsqlite3_str_append(tls, pStr, ts+22756, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+14048, 1) + Xsqlite3_str_append(tls, pStr, ts+14056, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -175041,11 +175079,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+22748, 1) + Xsqlite3_str_append(tls, pStr, ts+22756, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+14048, 1) + Xsqlite3_str_append(tls, pStr, ts+14056, 1) } Xsqlite3_str_append(tls, pStr, ts+6311, 1) } @@ -175066,7 +175104,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147480:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:147515:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -175079,27 +175117,27 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+22750, 2) + Xsqlite3_str_append(tls, pStr, ts+22758, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+22742, 5) + Xsqlite3_str_append(tls, pStr, ts+22750, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 22753 /* "%s=?" */ + return ts + 22761 /* "%s=?" */ } - return ts + 22758 /* "ANY(%s)" */ + return ts + 22766 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+22766) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+22774) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+22768) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+22776) } Xsqlite3_str_append(tls, pStr, ts+6260, 1) } @@ -175111,7 +175149,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147514:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:147549:20: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -175146,11 +175184,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+22770, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+22778, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 22776 /* "SEARCH" */ + return ts + 22784 /* "SEARCH" */ } - return ts + 22783 /* "SCAN" */ + return ts + 22791 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -175160,30 +175198,30 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 12205 /* "PRIMARY KEY" */ + zFmt = ts + 12213 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 22788 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 22796 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 22821 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 22829 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 22846 /* "COVERING INDEX %..." */ + zFmt = ts + 22854 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 22864 /* "INDEX %s" */ + zFmt = ts + 22872 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+22873, 7) + Xsqlite3_str_append(tls, bp+64, ts+22881, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 17524 /* "rowid" */ - Xsqlite3_str_appendf(tls, bp+64, ts+22881, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 17532 /* "rowid" */ + Xsqlite3_str_appendf(tls, bp+64, ts+22889, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+22912, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+22920, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') @@ -175191,9 +175229,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+22922, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+22930, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+22927, + Xsqlite3_str_appendf(tls, bp+64, ts+22935, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16 /* &.idxStr */)))) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -175212,7 +175250,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147626:20: */ +func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintptr, pLevel uintptr) int32 { /* sqlite3.c:147661:20: */ bp := tls.Alloc(156) defer tls.Free(156) @@ -175230,22 +175268,22 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+22954, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+22962, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+22753, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+22761, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+22975, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+22983, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+22742, 5) + Xsqlite3_str_append(tls, bp+24, ts+22750, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+22753, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+22761, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+6260, 1) @@ -175295,7 +175333,7 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147739:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:147774:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -175328,7 +175366,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147777:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:147812:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -175361,7 +175399,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147814:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:147849:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -175399,7 +175437,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147860:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:147895:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -175474,7 +175512,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147949:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:147984:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175667,7 +175705,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148145:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:148180:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -175704,6 +175742,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in }(), iIdxCur) j = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrSkip = Xsqlite3VdbeAddOp4Int(tls, v, func() int32 { if bRev != 0 { return OP_SeekLT @@ -175787,7 +175826,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148522:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:148558:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -175828,7 +175867,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148566:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:148602:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -175856,10 +175895,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148606:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:148642:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148611:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:148647:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -175876,7 +175915,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148627:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148663:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -175896,7 +175935,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148649:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:148685:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -175918,7 +175957,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148674:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:148710:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -175983,7 +176022,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148738:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:148774:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -176029,7 +176068,7 @@ __3: // WhereLevel.regFilter set. If an inner-loop Bloom filter is checked, // then clear the WhereLevel.regFilter value to prevent the Bloom filter // from being checked a second time when the inner loop is evaluated. -func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148774:29: */ +func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, addrNxt int32, notReady Bitmask) { /* sqlite3.c:148810:29: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -176039,6 +176078,9 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue } + if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FnSkip != 0 { + continue + } // ,--- Because sqlite3ConstructBloomFilter() has will not have set // vvvvv--' pLevel->regFilter if this were true. if (*WhereLoop)(unsafe.Pointer(pLoop)).Fprereq¬Ready != 0 { @@ -176071,7 +176113,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148821:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:148858:24: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -176142,7 +176184,6 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iReg int32 // P3 Value for OP_VFilter var addrNotFound int32 var nConstraint int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm) - var iIn int32 // Counter for IN constraints iReg = Xsqlite3GetTempRange(tls, pParse, nConstraint+2) addrNotFound = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk @@ -176204,53 +176245,52 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI }() (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) - if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_ABLE) != 0 { - iIn = *(*int32)(unsafe.Pointer(pLevel + 64)) - } else { - iIn = 0 - } - for j = nConstraint - 1; j >= 0; j-- { - var bIn int32 // True to generate byte code to loop over RHS IN values + for j = 0; j < nConstraint; j++ { pTerm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(j)*8)) + if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { + disableTerm(tls, pLevel, pTerm) + continue + } if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_IN != 0 && func() uint32 { if j <= 31 { return uint32(uint32(1)) << j } return uint32(0) - }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) { - bIn = 1 - } else { - bIn = 0 - } - if bIn != 0 { - iIn-- - } - if j < 16 && int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 8)))>>j&1 != 0 { - disableTerm(tls, pLevel, pTerm) - } else if bIn != 0 && Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) == 1 { + }()&*(*U32)(unsafe.Pointer(pLoop + 24 + 24)) == uint32(0) && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var pCompare uintptr // The comparison operator var pRight uintptr // RHS of the comparison var pOp uintptr // Opcode to access the value of the IN constraint + var iIn int32 // IN loop corresponding to the j-th constraint // Reload the constraint value into reg[iReg+j+2]. The same value // was loaded into the same register prior to the OP_VFilter, but // the xFilter implementation might have changed the datatype or // encoding of the value in the register, so it *must* be reloaded. - - if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - + for iIn = 0; iIn < *(*int32)(unsafe.Pointer(pLevel + 64 /* &.u */ /* &.in */ /* &.nIn */)); iIn++ { pOp = Xsqlite3VdbeGetOp(tls, v, *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLevel + 64 + 8)) + uintptr(iIn)*20 + 4 /* &.addrInTop */))) + if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iReg+j+2 || + int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 == iReg+j+2 { - Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + Xsqlite3VdbeAddOp3(tls, v, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode), (*VdbeOp)(unsafe.Pointer(pOp)).Fp1, (*VdbeOp)(unsafe.Pointer(pOp)).Fp2, (*VdbeOp)(unsafe.Pointer(pOp)).Fp3) + break + } } // Generate code that will continue to the next row if // the IN constraint is not satisfied pCompare = Xsqlite3PExpr(tls, pParse, TK_EQ, uintptr(0), uintptr(0)) + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { + var iFld int32 = *(*int32)(unsafe.Pointer(pTerm + 32 + 4 /* &.iField */)) + var pLeft uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft - if pCompare != 0 { - (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + if iFld > 0 { + + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(iFld-1)*32)).FpExpr + } else { + (*Expr)(unsafe.Pointer(pCompare)).FpLeft = pLeft + } (*Expr)(unsafe.Pointer(pCompare)).FpRight = libc.AssignUintptr(&pRight, Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0))) if pRight != 0 { (*Expr)(unsafe.Pointer(pRight)).FiTable = iReg + j + 2 @@ -176258,8 +176298,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pParse, pCompare, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont, SQLITE_JUMPIFNULL) } (*Expr)(unsafe.Pointer(pCompare)).FpLeft = uintptr(0) - Xsqlite3ExprDelete(tls, db, pCompare) } + Xsqlite3ExprDelete(tls, db, pCompare) } } @@ -176895,6 +176935,14 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // the initialization of the right-hand operand of the vector comparison // might not occur, or might occur only in an OR branch that is not // taken. dbsqlfuzz 80a9fade844b4fb43564efc972bcb2c68270f5d1. + // + // 2022-03-03: Do not push down expressions that involve subqueries. + // The subquery might get coded as a subroutine. Any table-references + // in the subquery might be resolved to index-references for the index on + // the OR branch in which the subroutine is coded. But if the subroutine + // is invoked from a different OR branch that uses a different index, such + // index-references will not work. tag-20220303a + // https://sqlite.org/forum/forumpost/36937b197273d403 if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1 { var iTerm int32 for iTerm = 0; iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm; iTerm++ { @@ -176909,7 +176957,9 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0 { continue } - + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { + continue + } // tag-20220303a pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) } @@ -176926,7 +176976,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22983, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22991, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -176945,7 +176995,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+22998, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+23006, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -177293,24 +177343,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:149198:21 */ +} /* sqlite3.c:149238:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:149208:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149918:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149919:21 */ +} /* sqlite3.c:149248:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:149966:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:149967:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150128:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150176:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150136:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150184:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -177332,7 +177382,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150160:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:150208:12: */ var pTerm uintptr var idx int32 @@ -177374,14 +177424,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150202:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:150250:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150214:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:150262:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -177401,7 +177451,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150285:12: */ var c U16 if op == TK_IN { @@ -177428,7 +177478,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:150237:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150275:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:150323:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -177600,7 +177650,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150454:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:150502:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -177705,18 +177755,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [7]byte -} /* sqlite3.c:150462:18 */ +} /* sqlite3.c:150510:18 */ var aOp = [4]Op2{ - {FzOp: ts + 17373, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 16694, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 16220, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 23007, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:150465:7 */ + {FzOp: ts + 17381, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 16702, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 16228, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 23015, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:150513:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150566:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:150614:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pDerived + 52)) = *(*int32)(unsafe.Pointer(pBase + 52)) @@ -177724,7 +177774,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150576:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:150624:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++ @@ -177733,7 +177783,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150587:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:150635:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -177764,7 +177814,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // xy --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150617:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:150665:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -177897,7 +177947,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150744:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150792:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -178216,7 +178266,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151018:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:151066:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -178245,7 +178295,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151041:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:151089:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -178280,7 +178330,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151078:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:151126:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -178318,7 +178368,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151102:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:151150:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -178359,7 +178409,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151150:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:151198:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -178422,7 +178472,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+23014, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23022, 0) return } } @@ -178606,7 +178656,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 23055 /* "NOCASE" */ + return ts + 23063 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -178727,7 +178777,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 40)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151367:21 */ // ************************************************************************** // @@ -178750,7 +178800,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:151319:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151615:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:151663:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -178774,7 +178824,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s // (example: "LIMIT 5 OFFSET 10") then the expression codes as a // TK_INTEGER so that it will be available to sqlite3_vtab_rhs_value(). // If not, then it codes as a TK_REGISTER expression. -func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151639:13: */ +func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iCsr int32, eMatchOp int32) { /* sqlite3.c:151687:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178826,7 +178876,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // LIMIT and OFFSET terms are ignored by most of the planner code. They // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. -func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151692:21: */ +func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c:151740:21: */ if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && @@ -178876,7 +178926,7 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { /* sqlite3.c } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151738:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:151786:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -178889,7 +178939,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151804:21: */ var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb if (*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 0 { @@ -178949,7 +178999,7 @@ func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:151756: // computations done by this routine are broken out into a separate // "no-inline" function to avoid the stack push overhead in the // common case where it is not needed. -func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151824:32: */ +func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151872:32: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_IF_NULL_ROW { mask = Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -178979,7 +179029,7 @@ func sqlite3WhereExprUsageFull(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitma return mask } -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151850:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151898:24: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0) { @@ -178989,14 +179039,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return sqlite3WhereExprUsageFull(tls, pMaskSet, p) } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151859:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:151907:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151862:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:151910:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -179013,7 +179063,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151882:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:151930:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -179025,7 +179075,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151899:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:151947:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179050,7 +179100,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+23062, + Xsqlite3ErrorMsg(tls, pParse, ts+23070, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -179109,7 +179159,7 @@ type HiddenIndexInfo1 = struct { FmHandleIn U32 F__ccgo_pad1 [4]byte FaRhs [1]uintptr -} /* sqlite3.c:151971:9 */ +} /* sqlite3.c:152019:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -179139,16 +179189,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:151971:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:152019:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:151989:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:152037:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:151997:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152045:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -179158,7 +179208,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152009:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152057:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -179183,7 +179233,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152036:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152084:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -179204,7 +179254,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152059:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:152107:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x4>>2) != 0) { @@ -179225,14 +179275,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152078:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152126:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152087:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152135:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -179251,19 +179301,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152108:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:152156:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152124:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152172:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152131:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:152179:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+8, pSrc+8, uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint64(unsafe.Sizeof(WhereOrCost{}))) } @@ -179273,7 +179323,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1521 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152143:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:152191:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -179350,7 +179400,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152180:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:152228:24: */ var i int32 if *(*int32)(unsafe.Pointer(pMaskSet + 8)) == iCursor { @@ -179370,14 +179420,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152204:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:152252:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152213:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:152261:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -179388,7 +179438,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152274:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -179492,7 +179542,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152226:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152328:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:152376:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -179514,7 +179564,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152352:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:152400:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -179569,7 +179619,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X Y" where Y is a column in another table if no terms of // the form "X " exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152416:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:152464:26: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -179599,7 +179649,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152450:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152498:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8)) @@ -179620,7 +179670,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152480:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:152528:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -179641,7 +179691,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152503:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:152551:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -179711,7 +179761,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152615:15: */ if int32(N) <= 10 { return int16(0) } @@ -179728,7 +179778,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:152567:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152583:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:152631:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -179771,7 +179821,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152667:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:152715:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -179805,7 +179855,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152701:29: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:152749:29: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -179891,7 +179941,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+23098, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+23106, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -179972,7 +180022,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 23124 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 23132 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -180163,7 +180213,7 @@ end_auto_index_create: // This routine may only be called if it has previously been determined that // the loop would benefit from a Bloom filter, and the WHERE_BLOOMFILTER bit // is set. -func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152936:29: */ +func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) { /* sqlite3.c:152984:29: */ var addrOnce int32 // Address of opening OP_Once var addrTop int32 // Address of OP_Rewind var addrCont int32 // Jump here to skip a row @@ -180239,7 +180289,12 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL break } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { + var pTabItem uintptr pLevel = pWInfo + 864 + uintptr(iLevel)*96 + pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112 + if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT != 0 { + continue + } pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if pLoop == uintptr(0) { continue @@ -180263,7 +180318,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to freeIndexInfo(). -func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153046:27: */ +func allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:153097:27: */ var i int32 var j int32 var nTerm int32 @@ -180489,7 +180544,7 @@ __6: // Free an sqlite3_index_info structure allocated by allocateIndexInfo() // and possibly modified by xBestIndex methods. -func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153245:13: */ +func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:153296:13: */ var pHidden uintptr var i int32 @@ -180516,7 +180571,7 @@ func freeIndexInfo(tls *libc.TLS, db uintptr, pIdxInfo uintptr) { /* sqlite3.c:1 // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153275:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:153326:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180554,7 +180609,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153314:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:153365:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -180693,7 +180748,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153506:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:153557:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -180706,7 +180761,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153523:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:153574:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -180750,7 +180805,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153570:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:153621:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -180865,7 +180920,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x>0)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 16 /* &.idxStr */))) @@ -181173,7 +181228,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154152:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -181182,7 +181237,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154101: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154110:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:154161:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -181202,7 +181257,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154126:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:154177:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) @@ -181219,13 +181274,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154145:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:154196:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154153:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154204:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -181246,7 +181301,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:154 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154226:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -181272,7 +181327,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154175:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154203:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:154254:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -181316,7 +181371,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154241:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:154292:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -181375,7 +181430,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154282:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:154333:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -181464,7 +181519,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154370:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:154421:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -181571,7 +181626,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154507:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:154558:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181674,7 +181729,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154586:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:154637:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -181742,7 +181797,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154660:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:154711:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -182102,7 +182157,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155060:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:155111:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -182144,7 +182199,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155094:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:155145:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -182219,7 +182274,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155158:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:155209:12: */ bp := tls.Alloc(158) defer tls.Free(158) @@ -182504,7 +182559,7 @@ __3: } // Return true if pTerm is a virtual table LIMIT or OFFSET term. -func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: */ +func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155467:12: */ return libc.Bool32(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) >= SQLITE_INDEX_CONSTRAINT_LIMIT && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeMatchOp) <= SQLITE_INDEX_CONSTRAINT_OFFSET) @@ -182528,7 +182583,7 @@ func isLimitTerm(tls *libc.TLS, pTerm uintptr) int32 { /* sqlite3.c:155416:12: * // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155442:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr, pbRetryLimit uintptr) int32 { /* sqlite3.c:155493:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182630,7 +182685,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23135, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23143, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -182703,7 +182758,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+23135, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23143, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -182752,7 +182807,7 @@ __6: // 2. Else, if the column has an alternative collation, return that. // // 3. Otherwise, return "BINARY". -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155634:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:155685:23: */ var pHidden uintptr = pIdxInfo + 1*96 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -182775,7 +182830,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Return true if constraint iCons is really an IN(...) constraint, or // false otherwise. If iCons is an IN(...) constraint, set (if bHandle!=0) // or clear (if bHandle==0) the flag to handle it using an iterator. -func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155654:16: */ +func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int32) int32 { /* sqlite3.c:155705:16: */ var pHidden uintptr = pIdxInfo + 1*96 var m U32 = func() uint32 { if iCons <= 31 { @@ -182798,7 +182853,7 @@ func Xsqlite3_vtab_in(tls *libc.TLS, pIdxInfo uintptr, iCons int32, bHandle int3 // // If possible, set (*ppVal) to point to an object containing the value // on the right-hand-side of constraint iCons. -func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155674:16: */ +func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal uintptr) int32 { /* sqlite3.c:155725:16: */ var pH uintptr = pIdxInfo + 1*96 var pVal uintptr = uintptr(0) var rc int32 = SQLITE_OK @@ -182824,7 +182879,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal } // Return true if ORDER BY clause may be handled as DISTINCT. -func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155708:16: */ +func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3.c:155758:16: */ var pHidden uintptr = pIdxInfo + 1*96 return (*HiddenIndexInfo)(unsafe.Pointer(pHidden)).FeDistinct @@ -182853,7 +182908,7 @@ func Xsqlite3_vtab_distinct(tls *libc.TLS, pIdxInfo uintptr) int32 { /* sqlite3. // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155741:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155807:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -182989,7 +183044,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155872:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:155938:12: */ bp := tls.Alloc(712) defer tls.Free(712) @@ -183114,7 +183169,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155998:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156064:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -183166,7 +183221,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+23161, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+23169, 0) rc = SQLITE_OK } else { goto __3 @@ -183202,7 +183257,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156076:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:156142:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -183570,7 +183625,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156421:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:156487:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x8 >> 3) } @@ -183578,7 +183633,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156444:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:156510:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -183625,7 +183680,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156497:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:156563:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -183940,7 +183995,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+23196, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23204, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -184032,7 +184087,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156955:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -184139,7 +184194,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:156889: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:156980:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157046:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -184150,7 +184205,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:157059:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -184196,7 +184251,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:156993:1 // SELECT DISTINCT v1, v3 FROM t1 // LEFT JOIN t2 // LEFT JOIN t3 ON (t1.ipk=t3.ipk) -func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157054:32: */ +func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:157120:32: */ var i int32 var tabUsed Bitmask @@ -184271,7 +184326,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask // appropriate, and if so sets the WHERE_BLOOMFILTER flag on the // WhereLoop. The implementation of the Bloom filter comes further // down where the code for each WhereLoop is generated. -func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157133:29: */ +func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157199:29: */ var i int32 var nSearch LogEst @@ -184383,7 +184438,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { /* sqlite3 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157257:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:157323:26: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -184447,7 +184502,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+23214, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -184527,7 +184582,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+23242, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+23250, 0) goto __5 __4: // Assign a bit from the bitmask to every term in the FROM clause. @@ -185068,7 +185123,7 @@ __78: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157823:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:157889:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -185285,6 +185340,8 @@ __4: var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(x)*2))) + } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Offset { + // Do not need to translate the column number } else { x = int32(Xsqlite3StorageColumnToTable(tls, pTab, int16(x))) @@ -185466,7 +185523,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158261:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158331:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -185475,7 +185532,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158271:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158341:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -185491,13 +185548,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:158280:1 */ +} /* sqlite3.c:158350:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158292:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158362:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -185507,7 +185564,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158373:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -185525,9 +185582,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158303:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:158320:1 */ +} /* sqlite3.c:158390:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158324:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158394:13: */ var p uintptr var fVal float64 var iVal I64 @@ -185590,10 +185647,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+23260, -1) + pCtx, ts+23268, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158435:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -185603,7 +185660,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158365:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158377:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158447:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -185616,7 +185673,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158463:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -185630,7 +185687,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158393: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158411:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158481:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -185643,7 +185700,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158497:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -185656,7 +185713,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158427:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158442:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158512:13: */ var p uintptr _ = nArg _ = apArg @@ -185666,7 +185723,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158455:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158525:13: */ var p uintptr _ = nArg _ = apArg @@ -185674,7 +185731,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158536:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -185692,7 +185749,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158466:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158487:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158557:13: */ var p uintptr _ = nArg _ = apArg @@ -185702,7 +185759,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158500:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158570:13: */ var p uintptr _ = nArg _ = apArg @@ -185710,7 +185767,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158511:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158581:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -185724,13 +185781,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:158524:1 */ +} /* sqlite3.c:158594:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158536:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158606:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -185739,14 +185796,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+23316, -1) + pCtx, ts+23324, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158556:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158626:13: */ var p uintptr _ = nArg _ = apArg @@ -185754,7 +185811,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158567:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -185780,10 +185837,10 @@ type LastValueCtx = struct { FpVal uintptr FnVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158594:1 */ +} /* sqlite3.c:158664:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158602:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158672:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -185798,7 +185855,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:158620:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:158690:13: */ var p uintptr _ = nArg _ = apArg @@ -185812,7 +185869,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158707:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -185820,7 +185877,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158637:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158714:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -185836,17 +185893,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:158644:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 23361)) /* sqlite3.c:158662:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 23372)) /* sqlite3.c:158663:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 23383)) /* sqlite3.c:158664:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 23388)) /* sqlite3.c:158665:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 23401)) /* sqlite3.c:158666:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 23411)) /* sqlite3.c:158667:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 23417)) /* sqlite3.c:158668:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 23428)) /* sqlite3.c:158669:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 23438)) /* sqlite3.c:158670:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 23450)) /* sqlite3.c:158671:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 23455 /* "lag" */)) /* sqlite3.c:158672:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 23369)) /* sqlite3.c:158732:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 23380)) /* sqlite3.c:158733:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 23391)) /* sqlite3.c:158734:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 23396)) /* sqlite3.c:158735:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 23409)) /* sqlite3.c:158736:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 23419)) /* sqlite3.c:158737:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 23425)) /* sqlite3.c:158738:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 23436)) /* sqlite3.c:158739:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 23446)) /* sqlite3.c:158740:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 23458)) /* sqlite3.c:158741:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 23463 /* "lag" */)) /* sqlite3.c:158742:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -185855,7 +185912,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 23455 /* "lag" */)) /* sqlite3.c:1 // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158683:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:158753:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -185863,7 +185920,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158763:13: */ _ = p /*no-op*/ } @@ -185878,7 +185935,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:158693:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158724:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:158794:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint64(unsafe.Sizeof(aWindowFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } @@ -185897,9 +185954,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158725:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:158795:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158745:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:158815:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185910,7 +185967,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+23459, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+23467, libc.VaList(bp, zName)) } return p } @@ -185930,7 +185987,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158773:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:158843:21: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -185954,12 +186011,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+23478, 0) + ts+23486, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+23549, 0) + ts+23557, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -185998,16 +186055,16 @@ type WindowUpdate = struct { FeStart int32 FeEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:158808:7 */ +} /* sqlite3.c:158878:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:158848:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:158918:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158862:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:158932:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -186106,7 +186163,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:158944:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:159014:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -186130,7 +186187,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:158971:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:159041:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -186162,7 +186219,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159005:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:159075:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186208,7 +186265,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159047:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159117:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -186216,14 +186273,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159056:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:159126:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+23612, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+23620, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -186233,12 +186290,15 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159072:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:159142:20: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 = SQLITE_OK - if (*Select)(unsafe.Pointer(p)).FpWin != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) { + if (*Select)(unsafe.Pointer(p)).FpWin != 0 && + (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) && + (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_WinRewrite) == U32(0) && + !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSub uintptr = uintptr(0) // The subquery @@ -186414,7 +186474,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159231:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159306:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -186425,7 +186485,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:159 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159242:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159317:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -186440,7 +186500,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159259:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:159334:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -186453,7 +186513,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159274:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:159349:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -186465,7 +186525,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159286:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:159361:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -186498,7 +186558,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+23638, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23646, 0) goto windowAllocErr __2: ; @@ -186534,7 +186594,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159358:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:159433:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -186553,7 +186613,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159385:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:159460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186564,15 +186624,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 23670 /* "PARTITION clause" */ + zErr = ts + 23678 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 23687 /* "ORDER BY clause" */ + zErr = ts + 23695 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 23703 /* "frame specificat..." */ + zErr = ts + 23711 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+23723, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+23731, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -186587,7 +186647,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159419:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:159494:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 64)) = pWin @@ -186595,7 +186655,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+23756, 0) + ts+23764, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -186606,7 +186666,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159442:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:159517:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -186626,7 +186686,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159464:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:159539:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -186666,7 +186726,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159498:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:159573:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -186742,7 +186802,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159585:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:159660:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) @@ -186771,17 +186831,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 23803, - ts + 23856, - ts + 23260, - ts + 23907, - ts + 23959, -} /* sqlite3.c:159586:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159593:14 */ + ts + 23811, + ts + 23864, + ts + 23268, + ts + 23915, + ts + 23967, +} /* sqlite3.c:159661:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:159668:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159632:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:159707:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32)) @@ -186806,19 +186866,19 @@ type WindowCodeArg1 = struct { Fcurrent WindowCsrAndReg Fend WindowCsrAndReg F__ccgo_pad1 [4]byte -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159639:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:159714:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:159639:9 */ +} /* sqlite3.c:159714:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159640:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:159715:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159724:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:159799:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -186854,7 +186914,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159761:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:159836:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -186961,7 +187021,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159953:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -186997,7 +187057,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:159878: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159992:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -187104,7 +187164,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:159917:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160098:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -187187,7 +187247,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:160023:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160100:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:160175:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -187222,7 +187282,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160207:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -187247,7 +187307,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:160132: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160158:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:160233:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -187284,7 +187344,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160204:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:160279:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -187407,7 +187467,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160337:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:160412:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -187555,7 +187615,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160486:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:160561:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -187586,7 +187646,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160519:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:160594:23: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187611,7 +187671,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160541:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:160616:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187959,7 +188019,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160888:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:160963:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -188356,17 +188416,17 @@ type TrigEvent = struct { Fa int32 F__ccgo_pad1 [4]byte Fb uintptr -} /* sqlite3.c:161288:1 */ +} /* sqlite3.c:161363:1 */ type FrameBound = struct { FeType int32 F__ccgo_pad1 [4]byte FpExpr uintptr -} /* sqlite3.c:161290:1 */ +} /* sqlite3.c:161365:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161371:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -188376,7 +188436,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:161296:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161329:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:161404:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -188395,19 +188455,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24009, + Xsqlite3ErrorMsg(tls, pParse, ts+24017, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 21076 /* "ORDER BY" */ + return ts + 21084 /* "ORDER BY" */ } - return ts + 24051 /* "LIMIT" */ + return ts + 24059 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+24057, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24065, 0) } } @@ -188415,7 +188475,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161360:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:161435:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -188427,7 +188487,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui } // Construct a new Expr object from a single token -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161372:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:161447:15: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp)) = t @@ -188465,7 +188525,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161408:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:161483:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -188479,14 +188539,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161422:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:161497:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24091, + Xsqlite3ErrorMsg(tls, pParse, ts+24099, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -188554,7 +188614,7 @@ type YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Fyyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:161714:3 */ +} /* sqlite3.c:161789:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -188823,7 +188883,7 @@ var yy_action = [2070]uint16{ /* 2040 */ uint16(29), uint16(921), uint16(390), uint16(1176), uint16(172), uint16(139), uint16(1175), uint16(1235), uint16(261), uint16(1235), /* 2050 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(262), uint16(1235), uint16(1235), /* 2060 */ uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1235), uint16(1593), uint16(1592), -} /* sqlite3.c:161808:27 */ +} /* sqlite3.c:161883:27 */ var yy_lookahead = [2255]uint16{ /* 0 */ uint16(193), uint16(223), uint16(193), uint16(225), uint16(193), uint16(193), uint16(193), uint16(274), uint16(275), uint16(276), /* 10 */ uint16(193), uint16(233), uint16(219), uint16(193), uint16(274), uint16(275), uint16(276), uint16(206), uint16(206), uint16(19), @@ -189051,7 +189111,7 @@ var yy_lookahead = [2255]uint16{ /* 2230 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2240 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), /* 2250 */ uint16(319), uint16(319), uint16(319), uint16(319), uint16(319), -} /* sqlite3.c:162017:25 */ +} /* sqlite3.c:162092:25 */ var yy_shift_ofst = [574]uint16{ /* 0 */ uint16(1648), uint16(1477), uint16(1272), uint16(322), uint16(322), uint16(262), uint16(1319), uint16(1478), uint16(1491), uint16(1662), /* 10 */ uint16(1662), uint16(1662), uint16(317), uint16(0), uint16(0), uint16(214), uint16(1093), uint16(1662), uint16(1662), uint16(1662), @@ -189111,7 +189171,7 @@ var yy_shift_ofst = [574]uint16{ /* 550 */ uint16(2005), uint16(2006), uint16(2007), uint16(2008), uint16(2009), uint16(2001), uint16(2020), uint16(2012), uint16(2013), uint16(2014), /* 560 */ uint16(2015), uint16(2017), uint16(2018), uint16(2011), uint16(1906), uint16(1907), uint16(1916), uint16(1927), uint16(1928), uint16(2019), /* 570 */ uint16(2022), uint16(2027), uint16(2042), uint16(2045), -} /* sqlite3.c:162248:33 */ +} /* sqlite3.c:162323:33 */ var yy_reduce_ofst = [409]int16{ /* 0 */ int16(-125), int16(733), int16(789), int16(241), int16(293), int16(-123), int16(-193), int16(-191), int16(-183), int16(-187), /* 10 */ int16(-180), int16(83), int16(133), int16(-207), int16(-198), int16(-267), int16(-175), int16(-6), int16(166), int16(313), @@ -189154,7 +189214,7 @@ var yy_reduce_ofst = [409]int16{ /* 380 */ int16(1641), int16(1602), int16(1676), int16(1642), int16(1646), int16(1644), int16(1650), int16(1654), int16(1683), int16(1694), /* 390 */ int16(1707), int16(1711), int16(1712), int16(1714), int16(1643), int16(1647), int16(1652), int16(1698), int16(1695), int16(1696), /* 400 */ int16(1697), int16(1699), int16(1700), int16(1689), int16(1691), int16(1701), int16(1702), int16(1704), int16(1715), -} /* sqlite3.c:162311:20 */ +} /* sqlite3.c:162386:20 */ var yy_default = [574]uint16{ /* 0 */ uint16(1637), uint16(1637), uint16(1637), uint16(1466), uint16(1233), uint16(1344), uint16(1233), uint16(1233), uint16(1233), uint16(1466), /* 10 */ uint16(1466), uint16(1466), uint16(1233), uint16(1374), uint16(1374), uint16(1519), uint16(1266), uint16(1233), uint16(1233), uint16(1233), @@ -189214,7 +189274,7 @@ var yy_default = [574]uint16{ /* 550 */ uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), uint16(1233), /* 560 */ uint16(1233), uint16(1233), uint16(1233), uint16(1610), uint16(1325), uint16(1416), uint16(1233), uint16(1415), uint16(1419), uint16(1255), /* 570 */ uint16(1233), uint16(1245), uint16(1233), uint16(1233), -} /* sqlite3.c:162354:27 */ +} /* sqlite3.c:162429:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -189416,7 +189476,7 @@ var yyFallback = [185]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:162431:25 */ +} /* sqlite3.c:162506:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -189438,9 +189498,9 @@ type yyStackEntry = struct { Fmajor uint16 F__ccgo_pad1 [4]byte Fminor YYMINORTYPE -} /* sqlite3.c:162636:1 */ +} /* sqlite3.c:162711:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:162643:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:162718:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -189449,9 +189509,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:162647:1 */ +} /* sqlite3.c:162722:1 */ -type YyParser = yyParser /* sqlite3.c:162666:25 */ +type YyParser = yyParser /* sqlite3.c:162741:25 */ // #include @@ -189461,7 +189521,7 @@ type YyParser = yyParser /* sqlite3.c:162666:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163481:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:163556:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */ @@ -189476,7 +189536,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163539:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:163614:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -189635,7 +189695,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163739:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24) @@ -189643,7 +189703,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:163664:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163757:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 { yy_pop_parser_stack(tls, pParser) @@ -189666,7 +189726,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:163682:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163762:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:163837:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -189706,7 +189766,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163827:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:163902:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -189717,7 +189777,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163931:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 { @@ -189727,7 +189787,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+24129, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24137, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -189736,7 +189796,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163856:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163899:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:163974:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -190159,7 +190219,7 @@ var yyRuleInfoLhs = [402]uint16{ uint16(303), // (399) anylist ::= anylist LP anylist RP uint16(303), // (400) anylist ::= anylist ANY uint16(266), // (401) with ::= -} /* sqlite3.c:163940:25 */ +} /* sqlite3.c:164015:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -190566,7 +190626,7 @@ var yyRuleInfoNRhs = [402]int8{ int8(-4), // (399) anylist ::= anylist LP anylist RP int8(-2), // (400) anylist ::= anylist ANY int8(0), // (401) with ::= -} /* sqlite3.c:164347:26 */ +} /* sqlite3.c:164422:26 */ // Forward Declaration @@ -190578,7 +190638,7 @@ var yyRuleInfoNRhs = [402]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164764:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:164839:21: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -190723,21 +190783,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17524, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17532, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+24151, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+24159, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17437, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+17445, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+24151, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+24159, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -191473,7 +191533,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+24178) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+24186) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8)), uintptr(0), uintptr(0), uintptr(0)) } @@ -191624,7 +191684,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24187, libc.VaList(bp+32, bp+112)) + Xsqlite3ErrorMsg(tls, pParse, ts+24195, libc.VaList(bp+32, bp+112)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -192119,21 +192179,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+24211, 0) + ts+24219, 0) } break case uint32(269): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+24306, 0) + ts+24314, 0) } break case uint32(270): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+24390, 0) + ts+24398, 0) } break case uint32(271): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -192573,7 +192633,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166320:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166395:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -192583,9 +192643,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+24187, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+24195, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+24475, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+24483, 0) } //*********** End %syntax_error code ***************************************** @@ -192593,7 +192653,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166419:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -192623,7 +192683,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:166344:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166385:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:166460:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -192677,7 +192737,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166602:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:166677:20: */ return int32(yyFallback[iToken]) } @@ -192728,7 +192788,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:166674:28 */ +} /* sqlite3.c:166749:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -192814,7 +192874,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:166790:19 */ +} /* sqlite3.c:166865:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -192827,7 +192887,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:166830:28 */ +} /* sqlite3.c:166905:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -192844,7 +192904,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:166845:28 */ +} /* sqlite3.c:166920:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -192859,7 +192919,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:166860:28 */ +} /* sqlite3.c:166935:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -192875,7 +192935,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:166876:33 */ +} /* sqlite3.c:166951:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -192908,7 +192968,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:166891:28 */ +} /* sqlite3.c:166966:28 */ // Hash table decoded: // 0: INSERT @@ -193041,7 +193101,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167055:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:167130:12: */ var i int32 var j int32 var zKW uintptr @@ -193219,7 +193279,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:167229:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:167304:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193228,7 +193288,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167235:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:167310:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -193237,11 +193297,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167241:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:167316:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167242:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:167317:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -193264,13 +193324,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167289:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:167364:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167371:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -193320,7 +193380,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:167296:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167420:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -193337,7 +193397,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:167345: return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167353:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167428:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -193351,7 +193411,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167360:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:167435:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -193364,7 +193424,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167372:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:167447:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -193726,7 +193786,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq } // Run the parser on the given SQL string. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167666:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* sqlite3.c:167741:20: */ bp := tls.Alloc(2480) defer tls.Free(2480) @@ -193796,7 +193856,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464 /* &x */)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+24492, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+24500, libc.VaList(bp, bp+2464)) break } } @@ -193819,7 +193879,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+4444, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+24517, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+24525, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -193916,7 +193976,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { /* s // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168133:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -194019,7 +194079,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+24528, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+24536, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -194032,11 +194092,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+21196, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+21204, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+24535, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+24543, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+24540, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+24548, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -194049,9 +194109,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168058: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+24550, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+24558, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+24554, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+24562, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -194093,12 +194153,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:168066:19 */ +} /* sqlite3.c:168141:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168223:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:168298:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -194125,7 +194185,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16822 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168375:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168450:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -194137,11 +194197,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:168402:12 */ +} /* sqlite3.c:168477:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168524:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -194154,14 +194214,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:168449:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168462:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:168537:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168543:16: */ return SQLITE_THREADSAFE } @@ -194174,14 +194234,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:168468:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168499:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:168574:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168583:17 */ // Initialize SQLite. // @@ -194212,7 +194272,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:168508:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168616:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -194338,7 +194398,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:168541:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168791:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -194377,7 +194437,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:168716:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168770:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168845:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -194385,7 +194445,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 168776) + return Xsqlite3MisuseError(tls, 168851) } ap = va @@ -194655,7 +194715,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169088:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:169163:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -194753,13 +194813,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169188:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169263:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169202:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169277:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -194778,7 +194838,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169226:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169301:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -194807,7 +194867,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1692 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169255:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:169330:16: */ var ap Va_list _ = ap var rc int32 @@ -194886,11 +194946,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:169278:9 */ +} /* sqlite3.c:169353:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169330:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169405:12: */ var rc int32 var n int32 _ = NotUsed @@ -194912,7 +194972,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169353:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169428:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -194925,7 +194985,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169443:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -194939,7 +194999,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:169368:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169382:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:169457:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -194955,39 +195015,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169399:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:169474:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169412:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:169487:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169427:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169502:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169436:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169511:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169443:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:169518:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169452:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169527:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169536:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -195002,7 +195062,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:169461:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169553:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 64)) @@ -195017,7 +195077,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:169478 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169570:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -195044,7 +195104,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:169495:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169601:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -195060,14 +195120,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169526:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169540:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:169615:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169547) + return Xsqlite3MisuseError(tls, 169622) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -195091,7 +195151,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+24562, 0) + ts+24570, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -195104,7 +195164,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169594:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:169669:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -195141,11 +195201,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169629:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169704:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169705:16: */ return sqlite3Close(tls, db, 1) } @@ -195155,7 +195215,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169630:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169641:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:169716:21: */ var i uintptr // Hash table iterator var j int32 @@ -195265,7 +195325,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169764:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:169839:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -195315,24 +195375,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: */ - var zErr uintptr = ts + 24630 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:170000:27: */ + var zErr uintptr = ts + 24638 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 24644 /* "abort due to ROL..." */ + zErr = ts + 24652 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 24666 /* "another row avai..." */ + zErr = ts + 24674 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 24688 /* "no more rows ava..." */ + zErr = ts + 24696 /* "no more rows ava..." */ break } @@ -195350,36 +195410,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169925:27: * } var aMsg = [29]uintptr{ - ts + 24711, - ts + 24724, + ts + 24719, + ts + 24732, /* SQLITE_INTERNAL */ uintptr(0), - ts + 24740, - ts + 24765, - ts + 24779, - ts + 24798, + ts + 24748, + ts + 24773, + ts + 24787, + ts + 24806, ts + 1460, - ts + 24823, - ts + 24860, - ts + 24872, - ts + 24887, - ts + 24920, - ts + 24938, - ts + 24963, - ts + 24992, + ts + 24831, + ts + 24868, + ts + 24880, + ts + 24895, + ts + 24928, + ts + 24946, + ts + 24971, + ts + 25000, /* SQLITE_EMPTY */ uintptr(0), ts + 7151, ts + 6637, - ts + 25009, - ts + 25027, - ts + 25045, + ts + 25017, + ts + 25035, + ts + 25053, /* SQLITE_NOLFS */ uintptr(0), - ts + 25079, + ts + 25087, /* SQLITE_FORMAT */ uintptr(0), - ts + 25100, - ts + 25126, - ts + 25149, - ts + 25170, -} /* sqlite3.c:169926:20 */ + ts + 25108, + ts + 25134, + ts + 25157, + ts + 25178, +} /* sqlite3.c:170001:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -195388,7 +195448,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:169995:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:170070:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -195411,8 +195471,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170002:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170004:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:170077:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:170079:19 */ // Invoke the given busy handler. // @@ -195421,7 +195481,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170047:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:170122:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -195439,7 +195499,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:17 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170063:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:170138:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -195452,7 +195512,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170086:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:170161:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -195468,7 +195528,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170117:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:170192:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -195482,7 +195542,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170209:17: */ libc.AtomicStoreNInt32(db+432, int32(1), 0) } @@ -195490,7 +195550,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:170134:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170151:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:170226:20: */ var p uintptr var extraFlags int32 @@ -195500,7 +195560,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 170176) + return Xsqlite3MisuseError(tls, 170251) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -195558,7 +195618,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+25186, 0) + ts+25194, 0) return SQLITE_BUSY } else { @@ -195605,7 +195665,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170285:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:170360:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -195647,22 +195707,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170336:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170411:16: */ 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:170349:16: */ +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:170424: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:170363:16: */ +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:170438:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170380:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:170455:16: */ var rc int32 var zFunc8 uintptr @@ -195682,7 +195742,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170416:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:170491:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195691,7 +195751,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+25249, libc.VaList(bp, zName)) + ts+25257, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -195706,7 +195766,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170442:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:170517:16: */ var rc int32 var zCopy uintptr @@ -195732,7 +195792,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170475:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:170550:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -195750,7 +195810,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170496:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:170571:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -195771,7 +195831,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170526:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:170601:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -195789,7 +195849,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170556:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170631:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -195802,7 +195862,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170581:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170656:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -195815,7 +195875,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170606:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170681:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -195828,7 +195888,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170632:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170707:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -195840,7 +195900,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170652:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:170727:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -195856,7 +195916,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170683:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:170758:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -195874,7 +195934,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170709:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:170784:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -195887,7 +195947,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170730:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:170805:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -195898,7 +195958,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170757:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170832:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -195927,7 +195987,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+25300, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+25308, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -195948,7 +196008,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170821:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:170896:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -195972,7 +196032,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170848:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:170923:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -196014,19 +196074,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170894:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170969:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170990:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170921)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 170996)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -196048,7 +196108,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170915:23 } // Return the byte offset of the most recent error -func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170941:16: */ +func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171016:16: */ var iOffset int32 = -1 if db != 0 && Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FerrCode != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -196060,7 +196120,7 @@ func Xsqlite3_error_offset(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17094 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:171031:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -196089,18 +196149,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:170956: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:170957:20 */ +} /* sqlite3.c:171032:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:170960:20 */ +} /* sqlite3.c:171035:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171073:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171000) + return Xsqlite3MisuseError(tls, 171075) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -196108,9 +196168,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170998:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171007:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171082:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 171009) + return Xsqlite3MisuseError(tls, 171084) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -196118,7 +196178,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:171016:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:171091:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -196128,13 +196188,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:17101 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171025:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:171100:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171033:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171108:12: */ var pColl uintptr var enc2 int32 @@ -196147,7 +196207,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 171057) + return Xsqlite3MisuseError(tls, 171132) } // Check if this call is removing or replacing an existing collation @@ -196157,7 +196217,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+25321, 0) + ts+25329, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -196210,7 +196270,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:171110:18 */ +} /* sqlite3.c:171185:18 */ // Make sure the hard limits are set to reasonable values @@ -196222,7 +196282,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171173:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:171248:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -196269,7 +196329,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171245:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:171320:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -196302,7 +196362,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+25389, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+25397, uint64(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -196350,10 +196410,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+25395, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+25403, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25405, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25413, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -196475,7 +196535,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+25433, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+25441, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -196486,17 +196546,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+25437, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+25445, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 25437 /* "cache" */ + zModeType = ts + 25445 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+25443, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+25451, zOpt, uint64(4)) == 0) { goto __32 } @@ -196504,7 +196564,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 25448 /* "access" */ + zModeType = ts + 25456 /* "access" */ __32: ; @@ -196535,7 +196595,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25455, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25463, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -196543,7 +196603,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25475, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25483, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -196586,7 +196646,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25499, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+25507, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -196607,24 +196667,24 @@ type OpenMode = struct { Fz uintptr Fmode int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:171387:9 */ +} /* sqlite3.c:171462:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 25515, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 25522, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 25523, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 25530, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:171396:34 */ +} /* sqlite3.c:171471:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 25530, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 25533, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 25536, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 18630, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 25538, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 25541, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 25544, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 18638, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:171408:34 */ +} /* sqlite3.c:171483:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171482:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171557:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -196640,7 +196700,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171500:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:171575:12: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -196792,10 +196852,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+23055, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+23063, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+25540, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+25548, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -196824,7 +196884,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 171713) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 171788) // IMP: R-18321-05872 goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -196881,7 +196941,7 @@ __22: // database it is OFF. This matches the pager layer defaults. (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 7684 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 24535 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 24543 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -196980,17 +197040,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171835:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171910:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171842:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:171917:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171855:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:171930:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -197001,7 +197061,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 25546 /* "\x00\x00" */ + zFilename = ts + 25554 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -197022,12 +197082,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171894:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171969:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171907:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:171982:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -197039,7 +197099,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:171932:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:172007:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -197057,7 +197117,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:171962:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:172037:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -197068,7 +197128,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:171983:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:172058:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -197079,7 +197139,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172080:16: */ return SQLITE_OK } @@ -197087,7 +197147,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:172005:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172016:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172091:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -197100,28 +197160,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:172 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172037:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:172112:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+25549, + Xsqlite3_log(tls, iErr, ts+25557, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172042:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172117:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+25574) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+25582) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172046:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172121:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+25594) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+25602) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172050:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172125:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+25601) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+25609) } // This is a convenience routine that makes sure that all thread-specific @@ -197129,12 +197189,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:172 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172081:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:172156:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172089:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:172164:16: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -197300,7 +197360,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+25618, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+25626, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -197318,7 +197378,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172282:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -197333,7 +197393,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:172207:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172223:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:172298:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -197346,7 +197406,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172236:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:172311:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -197391,7 +197451,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172286:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:172361:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -197850,7 +197910,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172857:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -197859,7 +197919,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:172782:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172793:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:172868:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+uint64(1)) return p + uintptr(n) + uintptr(1) @@ -197872,7 +197932,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1727 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172808:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:172883:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -197903,7 +197963,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172919:17: */ if p == uintptr(0) { return } @@ -197920,7 +197980,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:172844:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172862:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:172937:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -197929,7 +197989,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172871:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:172946:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -197946,7 +198006,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172885:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:172960:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -197956,7 +198016,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172894:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:172969:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -197977,14 +198037,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172917:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172992:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172921:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:172996:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -197997,7 +198057,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:172931:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:173006:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -198006,7 +198066,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172944:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173019:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -198021,7 +198081,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:172953:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:173028:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -198032,7 +198092,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:172969:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:173044:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -198043,7 +198103,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:172986:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:173061:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -198066,7 +198126,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173022:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:173097:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -198109,7 +198169,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173078:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:173153:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -198130,7 +198190,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173109:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173184:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -198139,7 +198199,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:173 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173122:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:173197:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -198151,7 +198211,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+25646, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+25654, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -198169,7 +198229,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173155:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:173230:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -198214,11 +198274,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173207:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:173282:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173325:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -198231,7 +198291,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173250:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173340:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 832 { @@ -198241,13 +198301,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:173265:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:173280:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:173355:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173363:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -198271,7 +198331,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:173288:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173315:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:173390:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -198314,7 +198374,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 25654 /* "database is dead..." */ + return ts + 25662 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -198326,7 +198386,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173365:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:173440:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -198352,7 +198412,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173468:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -198456,7 +198516,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:173393 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173492:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:173567:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -199061,7 +199121,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193069:19 */ +} /* sqlite3.c:193144:19 */ // Objects type JsonString1 = struct { @@ -199073,10 +199133,10 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:193096:9 */ +} /* sqlite3.c:193171:9 */ // Objects -type JsonString = JsonString1 /* sqlite3.c:193096:27 */ +type JsonString = JsonString1 /* sqlite3.c:193171:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -199084,9 +199144,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:193097:9 */ +} /* sqlite3.c:193172:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:193097:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:193172:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -199099,9 +199159,9 @@ type JsonParse1 = struct { FnJson int32 FiHold U32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:193098:9 */ +} /* sqlite3.c:193173:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:193173:26 */ // JSON type values @@ -199109,8 +199169,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:193098:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 7484, ts + 7998, ts + 8003, ts + 7494, ts + 7489, ts + 9244, ts + 25677, ts + 25683, -} /* sqlite3.c:193131:19 */ + ts + 7484, ts + 7998, ts + 8003, ts + 7494, ts + 7489, ts + 9244, ts + 25685, ts + 25691, +} /* sqlite3.c:193206:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -199124,7 +199184,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193267:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -199132,7 +199192,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:193192:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193276:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -199140,7 +199200,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:193201:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193286:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -199148,7 +199208,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193211:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193294:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -199156,7 +199216,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:193219:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193303:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -199189,7 +199249,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:193228:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193255:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193330:13: */ if N == U32(0) { return } @@ -199201,7 +199261,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193264:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:193339:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -199214,7 +199274,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193350:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -199223,7 +199283,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:193275:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193358:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -199238,7 +199298,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:193283:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193295:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:193370:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -199289,7 +199349,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 25690 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 25698 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -199309,11 +199369,11 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:193306:25 */ +} /* sqlite3.c:193381:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193338:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:193413:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { @@ -199346,7 +199406,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+25707, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+25715, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -199357,7 +199417,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193453:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -199384,7 +199444,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:193378:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193476:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -199393,7 +199453,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:193401:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193484:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -199403,7 +199463,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193409:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193496:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -199411,7 +199471,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:193421:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193431:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:193506:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -199513,7 +199573,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193520:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193595:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -199528,14 +199588,14 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193537:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:193612:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193625:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -199546,7 +199606,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:193550:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193566:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:193641:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -199827,7 +199887,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193739:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193814:26: */ var nNew U32 var pNew uintptr @@ -199849,7 +199909,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193766:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:193841:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -199864,7 +199924,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193863:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -199880,7 +199940,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:193788:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193802:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:193877:12: */ var c int8 var j U32 var iThis int32 @@ -200107,7 +200167,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:193963:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:194038:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -200132,7 +200192,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+25736, -1) + Xsqlite3_result_error(tls, pCtx, ts+25744, -1) } } jsonParseReset(tls, pParse) @@ -200143,7 +200203,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:193996:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:194071:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -200174,7 +200234,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194023:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:194098:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+24, Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode))) @@ -200194,7 +200254,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194049:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:194124:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -200251,7 +200311,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194111:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:194186:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -200274,7 +200334,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194134:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194209:17: */ var i U32 var j U32 var nKey U32 @@ -200449,7 +200509,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194286:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:194361:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -200460,7 +200520,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+25751, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+25759, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -200473,11 +200533,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194312:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194387:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+25755, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+25763, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -200488,7 +200548,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:194 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194326:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:194401:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -200540,18 +200600,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194363:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:194438:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+25781, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+25789, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194451:13: */ var i int32 var n int32 @@ -200582,7 +200642,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:194376:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194465:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194540:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -200599,7 +200659,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194484:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194559:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -200622,7 +200682,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194511:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194586:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -200672,7 +200732,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // // Abbreviated JSON path expressions are allows if JSON_ABPATH, for // compatibility with PG. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194571:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194646:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -200706,11 +200766,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // [NUMBER] ==> $[NUMBER] // Not PG. Purely for convenience jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+25824, uint32(2)) + jsonAppendRaw(tls, bp, ts+25832, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+6301, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+25827, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+25835, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -200766,7 +200826,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194654:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:194729:17: */ var i U32 var j U32 var iRoot U32 @@ -200839,7 +200899,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194736:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194811:13: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -200871,7 +200931,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194768:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -200883,14 +200943,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+25830, -1) + ts+25838, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+25881, -1) + Xsqlite3_result_error(tls, ctx, ts+25889, -1) jsonReset(tls, bp) return } @@ -200910,7 +200970,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194810:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194885:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -200979,7 +201039,7 @@ remove_done: // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194843:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194918:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -200998,7 +201058,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+16627) + jsonWrongNumArgs(tls, ctx, ts+16635) return __2: ; @@ -201062,7 +201122,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194895:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194970:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -201087,9 +201147,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 25915 /* "set" */ + return ts + 25923 /* "set" */ } - return ts + 25919 /* "insert" */ + return ts + 25927 /* "insert" */ }()) return __2: @@ -201160,7 +201220,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. json_type() raises an // error if either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194948:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195023:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -201184,7 +201244,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194976:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -201198,7 +201258,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:194996:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195071:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -201214,7 +201274,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195015:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195090:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -201239,16 +201299,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25926, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25934, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195037:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195112:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195115:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -201256,7 +201316,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195040:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195051:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195126:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -201298,7 +201358,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195099:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:195174:13: */ var pStr uintptr var z uintptr var n U32 @@ -201320,7 +201380,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195124:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:195199:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -201344,16 +201404,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+25929, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+25937, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195145:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195220:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195148:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:195223:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -201373,16 +201433,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:195158:9 */ +} /* sqlite3.c:195233:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195158:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:195233:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195173:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:195248:12: */ var pNew uintptr var rc int32 @@ -201397,7 +201457,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+25932) + ts+25940) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -201410,13 +201470,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195215:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195290:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195221:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195296:12: */ var pCur uintptr _ = p @@ -201430,7 +201490,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195233:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195308:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -201441,7 +201501,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195319:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+48) @@ -201454,7 +201514,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:195244:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195332:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -201463,13 +201523,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195257:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195266:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195341:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195347:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags)&JNODE_LABEL != 0 { @@ -201520,7 +201580,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195272:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195316:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:195391:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -201537,19 +201597,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+26015, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+26023, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+26020, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+26028, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195346:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195421:12: */ bp := tls.Alloc(296) defer tls.Free(296) @@ -201638,10 +201698,10 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24, ts+26015, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+26023, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+26020, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+26028, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } jsonResult(tls, bp+24) @@ -201665,7 +201725,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 26026 /* "$" */ + zRoot = ts + 26034 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -201683,7 +201743,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195447:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:195522:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -201693,7 +201753,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195458:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195533:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -201768,7 +201828,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195517:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195592:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -201797,7 +201857,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+25736, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+25744, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -201873,7 +201933,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195598:23 */ +} /* sqlite3.c:195673:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -201887,36 +201947,36 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:195626:23 */ +} /* sqlite3.c:195701:23 */ // Register JSON functions. -func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195658:21: */ +func Xsqlite3RegisterJsonFunctions(tls *libc.TLS) { /* sqlite3.c:195733:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aJsonFunc)), int32(uint64(unsafe.Sizeof(aJsonFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aJsonFunc = [19]FuncDef{ - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26028}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26033}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26044}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26044}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26062}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 26075}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 26078}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26082}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26094}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26106}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26117}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26128}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26140}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 26153}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26162}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26162}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26172}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 26183}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 26200}} /* sqlite3.c:195660:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26036}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26041}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26052}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26052}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26070}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 26083}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 26086}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26090}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26102}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26114}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26125}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26136}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26148}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 26161}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26170}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26170}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 26180}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 26191}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 26208}} /* sqlite3.c:195735:18 */ // Register the JSON table-valued functions -func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195697:20: */ +func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:195772:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aMod))/uint64(unsafe.Sizeof(struct { @@ -201932,9 +201992,9 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 26218 /* "json_each" */, FpModule: 0}, - {FzName: ts + 26228 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:195702:5 */ // In the SQLite core + {FzName: ts + 26226 /* "json_each" */, FpModule: 0}, + {FzName: ts + 26236 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:195777:5 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -201981,7 +202041,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ // In the SQLite core @@ -201995,7 +202055,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:195825:22 */ +type Rtree = Rtree1 /* sqlite3.c:195900:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -202016,9 +202076,9 @@ type RtreeCursor1 = struct { FaNode [5]uintptr FanQueue [41]U32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:195826:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:195901:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -202026,23 +202086,23 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:195825:9 */ +} /* sqlite3.c:195900:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:195827:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:195902:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:195828:9 */ +} /* sqlite3.c:195903:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:195828:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:195903:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195829:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:195904:32 */ type RtreeMatchArg1 = struct { FiSize U32 F__ccgo_pad1 [4]byte @@ -202051,20 +202111,20 @@ type RtreeMatchArg1 = struct { F__ccgo_pad2 [4]byte FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195830:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:195905:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:195830:9 */ +} /* sqlite3.c:195905:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195831:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195828:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:195906:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:195903:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:195832:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:195907:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -202072,17 +202132,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [5]byte -} /* sqlite3.c:195826:9 */ +} /* sqlite3.c:195901:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195833:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:195908:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:195930:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:195931:17 */ +type RtreeDValue = float64 /* sqlite3.c:196005:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:196006:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -202109,16 +202169,16 @@ type RtreeValue = float32 /* sqlite3.c:195931:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196215:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:196290:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196218:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:196293:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = U32(libc.X_byteswap_ulong(tls, uint32(*(*U32)(unsafe.Pointer(p))))) } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196310:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -202131,12 +202191,12 @@ func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:196235:12: */ // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196267:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:196342:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196271:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:196346:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -202149,7 +202209,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196369:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = i @@ -202160,7 +202220,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:196294:12: } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196394:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -202168,20 +202228,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:196319:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196329:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:196404:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196338:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:196413:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196346:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:196421:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 192 + uintptr(nodeHash(tls, iNode))*8)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -202189,7 +202249,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196355:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196430:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -202198,7 +202258,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196366:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:196441:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 192 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8 @@ -202213,7 +202273,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196382:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:196457:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(RtreeNode{}))+uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) if pNode != 0 { @@ -202229,7 +202289,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196475:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -202238,7 +202298,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196400:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196411:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:196486:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -202270,11 +202330,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+26238, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+26246, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+26246, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+26254, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -202348,7 +202408,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196524:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:196599:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -202359,7 +202419,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196542:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:196617:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -202372,7 +202432,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196557:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196632:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -202389,7 +202449,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196581:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196656:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -202413,7 +202473,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196607:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196682:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -202439,19 +202499,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196636:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:196711:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196648:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:196723:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196662:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:196737:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -202467,23 +202527,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196693:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196768:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196706:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196781:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196719:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196794:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196802:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -202505,13 +202565,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:196727:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196751:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196826:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196834:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -202519,7 +202579,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+26251, + ts+26259, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -202538,7 +202598,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:196759:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196787:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:196862:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -202556,7 +202616,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196883:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -202586,7 +202646,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:196808:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196911:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -202602,7 +202662,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196836:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196929:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -202619,7 +202679,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:196854:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196909:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:196984:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -202731,7 +202791,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:196985:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197060:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -202829,7 +202889,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197042:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:197117:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -202884,7 +202944,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197072:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:197147:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -202900,7 +202960,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197095:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:197170:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -202919,7 +202979,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197115:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:197190:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -202936,7 +202996,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197129:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:197204:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24)) @@ -202956,7 +203016,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197150:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:197225:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 64 } @@ -202967,7 +203027,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197157:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:197232:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -202984,7 +203044,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197173:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197248:25: */ var i int32 var j int32 var pNew uintptr @@ -203018,7 +203078,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197208:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:197283:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -203054,7 +203114,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197351:13: */ var i int32 var j int32 var k int32 @@ -203102,7 +203162,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:197276:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197399:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -203195,7 +203255,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:197324:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197480:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -203211,7 +203271,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:197405:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197423:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:197498:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -203226,7 +203286,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197437:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197512:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -203287,7 +203347,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197491:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:197566:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -203308,12 +203368,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197517:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:197592:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+26333) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+26341) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -203340,7 +203400,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197547:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197622:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -203483,7 +203543,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197700:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197775:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -203590,7 +203650,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197789:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197864:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -203633,7 +203693,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197819:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:197894:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for __ccgo := true; __ccgo; __ccgo = ii >= 0 { @@ -203654,7 +203714,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197832:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:197907:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for __ccgo := true; __ccgo; __ccgo = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -203693,7 +203753,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197853:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197928:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -203708,7 +203768,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197871:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:197946:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -203721,7 +203781,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197880:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:197955:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -203796,7 +203856,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197912:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:197987:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -203852,7 +203912,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:197972:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:198047:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -203888,7 +203948,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the _rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198010:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:198085:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -203896,7 +203956,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the _parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198020:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:198095:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -203918,7 +203978,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198047:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:198122:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -203966,7 +204026,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198113:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:198188:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -204022,7 +204082,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198172:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:198247:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -204121,7 +204181,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198270:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198345:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -204155,7 +204215,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198294:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198369:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -204390,7 +204450,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198442:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:198517:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -204425,7 +204485,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198477:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:198552:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -204475,7 +204535,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198527:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198602:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -204506,7 +204566,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198554:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:198629:12: */ var pParent uintptr var rc int32 @@ -204535,7 +204595,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198585:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198660:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -204650,7 +204710,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198690:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:198765:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -204680,7 +204740,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198725:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:198800:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -204711,7 +204771,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198754:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:198829:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -204722,7 +204782,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198767:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:198842:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -204811,7 +204871,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198939:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -204825,7 +204885,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198864:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198947:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -204850,7 +204910,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:198872:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198895:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:198970:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -204858,7 +204918,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+26347, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+26355, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { @@ -204870,12 +204930,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+26367, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+26375, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+26399, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+26407, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -204889,7 +204949,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198933:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199008:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -205118,7 +205178,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199081:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199156:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -205127,7 +205187,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199092:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:199167:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -205135,7 +205195,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1990 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199102:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:199177:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -205143,7 +205203,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+26436, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+26444, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -205164,7 +205224,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE ; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199135:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:199210:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -205177,11 +205237,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199150:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:199225:12: */ bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 26581 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 26589 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 8 @@ -205189,7 +205249,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+12577, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+12585, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -205221,7 +205281,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199259:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName1))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -205232,8 +205292,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:199184:1 } var azName1 = [3]uintptr{ - ts + 26637, ts + 6363, ts + 17524, -} /* sqlite3.c:199185:21 */ + ts + 26645, ts + 6363, ts + 17532, +} /* sqlite3.c:199260:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -205257,9 +205317,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:199195:23 */ +} /* sqlite3.c:199270:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199222:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:199297:12: */ bp := tls.Alloc(232) defer tls.Free(232) @@ -205276,19 +205336,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+26642, + ts+26650, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+26704, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+26712, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+26709, + ts+26717, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+26773, + ts+26781, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+26843, + ts+26851, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -205319,7 +205379,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 26892 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 26900 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -205331,7 +205391,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+27000, + ts+27008, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -205339,18 +205399,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+27045, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+27053, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+14048, 1) + Xsqlite3_str_append(tls, p, ts+14056, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+27072, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+27080, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+27094, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+27102, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+27102, 0) + Xsqlite3_str_appendf(tls, p, ts+27110, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -205366,24 +205426,24 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var azSql = [8]uintptr{ - ts + 27118, - ts + 27171, + ts + 27126, + ts + 27179, - ts + 27216, - ts + 27268, - ts + 27322, + ts + 27224, + ts + 27276, + ts + 27330, - ts + 27367, - ts + 27425, - ts + 27480, -} /* sqlite3.c:199232:21 */ + ts + 27375, + ts + 27433, + ts + 27488, +} /* sqlite3.c:199307:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199355:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:199430:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205414,7 +205474,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199385:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:199460:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -205422,7 +205482,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+27527, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+27535, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -205434,7 +205494,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+27547, + ts+27555, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { @@ -205442,7 +205502,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+27604, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+27612, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -205452,7 +205512,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199503:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -205467,7 +205527,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:199428:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199442:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199517:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -205493,10 +205553,10 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 27639, - ts + 27682, - ts + 27717, - ts + 27753, + ts + 27647, + ts + 27690, + ts + 27725, + ts + 27761, } // Aux columns counted by a u8 @@ -205533,7 +205593,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27790, + Xsqlite3_str_appendf(tls, pSql, ts+27798, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -205545,7 +205605,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27814, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+27822, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -205568,7 +205628,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+27820, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27828, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -205667,7 +205727,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 27823, ts + 27834} /* sqlite3.c:199508:25 */ +var azFormat = [2]uintptr{ts + 27831, ts + 27842} /* sqlite3.c:199583:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -205683,7 +205743,7 @@ var azFormat = [2]uintptr{ts + 27823, ts + 27834} /* sqlite3.c:199508:25 */ // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // *2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199579:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199654:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -205727,11 +205787,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+12157, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+27844, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+27852, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+27850, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+27858, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+27854, 1) + Xsqlite3_str_append(tls, pOut, ts+27862, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -205746,11 +205806,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199631:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:199706:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+27856, -1) + Xsqlite3_result_error(tls, ctx, ts+27864, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -205778,15 +205838,15 @@ type RtreeCheck1 = struct { FzReport uintptr FnErr int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:199652:9 */ +} /* sqlite3.c:199727:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:199652:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:199727:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199674:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:199749:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -205799,7 +205859,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199687:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199762:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -205827,7 +205887,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199716:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:199791:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -205839,7 +205899,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+27889, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+27897, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 5365 /* "\n" */ @@ -205867,7 +205927,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199750:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:199825:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -205875,7 +205935,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+27896, + ts+27904, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -205894,7 +205954,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+27941, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+27949, libc.VaList(bp+16, iNode)) } } @@ -205911,15 +205971,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199794:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:199869:13: */ bp := tls.Alloc(96) defer tls.Free(96) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 27973, - ts + 28027, + ts + 27981, + ts + 28035, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -205934,23 +205994,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+28075, + rtreeCheckAppendMsg(tls, pCheck, ts+28083, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 28120 /* "%_rowid" */ + return ts + 28128 /* "%_rowid" */ } - return ts + 28128 /* "%_parent" */ + return ts + 28136 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+28137, + ts+28145, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 28120 /* "%_rowid" */ + return ts + 28128 /* "%_rowid" */ } - return ts + 28128 /* "%_parent" */ + return ts + 28136 /* "%_parent" */ }(), iKey, iVal)) } } @@ -205967,7 +206027,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199846:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:199921:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -205993,7 +206053,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+28195, libc.VaList(bp, i, iCell, iNode)) + ts+28203, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -206013,7 +206073,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+28243, libc.VaList(bp+24, i, iCell, iNode)) + ts+28251, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -206025,7 +206085,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199892:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:199967:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -206036,14 +206096,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+28310, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+28318, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+28344, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+28352, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -206051,7 +206111,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+28374, + ts+28382, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -206079,20 +206139,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:199955:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:200030:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+28429, + pCount = rtreeCheckPrepare(tls, pCheck, ts+28437, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+28460, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+28468, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -206102,7 +206162,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:199979:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:200054:12: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -206122,13 +206182,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+15789, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+15797, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+28527, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+28535, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -206138,12 +206198,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32, ts+26347, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+26355, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32, ts+28555, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+28563, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -206158,8 +206218,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32, ts+28586, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+28593, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+28594, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+28601, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -206169,7 +206229,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+28601, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+28609, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -206209,13 +206269,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200086:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:200161:13: */ bp := tls.Alloc(8) defer tls.Free(8) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+28605, -1) + ts+28613, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -206233,7 +206293,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 19172 /* "ok" */ + return ts + 19180 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -206272,7 +206332,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:200207:15 */ +type GeoCoord = float32 /* sqlite3.c:200282:15 */ // Internal representation of a polygon. // @@ -206298,7 +206358,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:200231:9 */ +} /* sqlite3.c:200306:9 */ // Internal representation of a polygon. // @@ -206320,7 +206380,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:200231:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:200306:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -206337,7 +206397,7 @@ type GeoParse1 = struct { FnErr int32 F__ccgo_pad1 [4]byte Fa uintptr -} /* sqlite3.c:200254:9 */ +} /* sqlite3.c:200329:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -206347,10 +206407,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:200254:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:200329:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200339:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -206360,7 +206420,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:200264:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200349:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -206369,7 +206429,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:200274:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200282:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:200357:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -206441,7 +206501,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200340:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:200415:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -206583,7 +206643,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200417:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:200492:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -206652,7 +206712,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200478:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200553:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -206665,7 +206725,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200497:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200572:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -206674,11 +206734,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+28656, 1) + Xsqlite3_str_append(tls, x, ts+28664, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+28658, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+28666, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+28669, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+28677, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -206688,7 +206748,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG . // Additional arguments are added as attributes to the . -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200523:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200598:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -206702,19 +206762,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+28680, 0) + Xsqlite3_str_appendf(tls, x, ts+28688, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+28698, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+28706, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+28706, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+28714, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+28714, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+28722, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+28718, 0) + Xsqlite3_str_appendf(tls, x, ts+28726, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -206734,7 +206794,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200570:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200645:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -206767,7 +206827,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200681:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -206787,7 +206847,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:200606:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200628:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200703:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -206806,7 +206866,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200653:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200728:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -206842,7 +206902,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200756:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -206862,7 +206922,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:200681:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200702:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200777:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -206907,7 +206967,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200745:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:200820:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -207048,7 +207108,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200816:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200891:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -207061,13 +207121,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:200832:9 */ +} /* sqlite3.c:200907:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:200832:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:200907:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200842:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200917:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -207101,7 +207161,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200940:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -207128,7 +207188,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:200865:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200895:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:200970:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -207169,7 +207229,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200926:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201001:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) @@ -207207,7 +207267,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200969:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201044:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -207239,10 +207299,10 @@ type GeoEvent1 = struct { F__ccgo_pad1 [4]byte FpSeg uintptr FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:200989:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:201064:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -207253,20 +207313,20 @@ type GeoSegment1 = struct { Fidx uint32 F__ccgo_pad2 [4]byte FpNext uintptr -} /* sqlite3.c:200989:9 */ +} /* sqlite3.c:201064:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:200990:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:201065:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:200991:9 */ +} /* sqlite3.c:201066:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:200991:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:201066:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201016:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:201091:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -207300,7 +207360,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201060:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:201135:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -207312,7 +207372,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201078:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201153:17: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -207342,7 +207402,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201100:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:201175:17: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -207372,7 +207432,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201125:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:201200:19: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -207407,7 +207467,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201150:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:201225:19: */ bp := tls.Alloc(400) defer tls.Free(400) @@ -207437,7 +207497,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201176:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:201251:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -207673,7 +207733,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201299:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201374:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -207689,7 +207749,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201321:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:201396:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -207699,7 +207759,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201340:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:201415:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -207739,7 +207799,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+28731, 0) + Xsqlite3_str_appendf(tls, pSql, ts+28739, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -207748,7 +207808,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+28753, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+28761, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -207756,7 +207816,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+27820, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27828, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -207814,12 +207874,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201424:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201499:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201437:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:201512:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -207833,7 +207893,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201460:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:201535:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -208000,7 +208060,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201592:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:201667:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -208026,7 +208086,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 17524 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 17532 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -208036,7 +208096,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28757 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28765 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -208044,14 +208104,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28763 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 28771 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201644:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:201719:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -208116,7 +208176,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201699:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:201774:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -208183,7 +208243,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+28772, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+28780, 0) __4: ; goto geopoly_update_end @@ -208327,15 +208387,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201836:12: */ - if Xsqlite3_stricmp(tls, zName, ts+28812) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:201911:12: */ + if Xsqlite3_stricmp(tls, zName, ts+28820) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+28828) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+28836) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -208368,9 +208428,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:201857:23 */ +} /* sqlite3.c:201932:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201959:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { @@ -208400,7 +208460,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201884 uintptr(0), aAgg[i].FxStep, aAgg[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+28843, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28851, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -208412,26 +208472,26 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28851 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28864 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28877 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 28890 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28828 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 28902 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28812 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 28925 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28939 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28952 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28966 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28982 /* "geopoly_ccw" */}, -} /* sqlite3.c:201891:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28859 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28872 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28885 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 28898 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28836 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 28910 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 28820 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 28933 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28947 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 28960 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 28974 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 28990 /* "geopoly_ccw" */}, +} /* sqlite3.c:201966:5 */ var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 28994 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:201909:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 29002 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:201984:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -208439,30 +208499,30 @@ var aAgg = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:202019:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+29013, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29021, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+29023, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29031, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+29034, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+29042, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+28757, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+28765, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+29045, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+29053, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -208476,7 +208536,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:201944:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:202058:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -208485,7 +208545,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:201983:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:202067:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -208506,7 +208566,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:201992:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202015:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:202090:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -208534,13 +208594,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+26333, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+26341, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202053:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:202128:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -208560,7 +208620,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202077:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:202152:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -209016,7 +209076,7 @@ type sqlite3rbu = struct { FnRbu int32 F__ccgo_pad6 [4]byte FpRbuFd uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -209417,7 +209477,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203382:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -209482,7 +209542,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:203307:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -209544,7 +209604,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:203738:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:203813:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -209576,9 +209636,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:203739:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:203814:27 */ type RbuState1 = struct { FeStage int32 F__ccgo_pad1 [4]byte @@ -209593,16 +209653,16 @@ type RbuState1 = struct { F__ccgo_pad3 [4]byte FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:203740:9 */ +} /* sqlite3.c:203815:9 */ -type RbuState = RbuState1 /* sqlite3.c:203740:25 */ +type RbuState = RbuState1 /* sqlite3.c:203815:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:203741:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:203816:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -209610,9 +209670,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:203742:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:203817:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -209631,16 +209691,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type Rbu_file = rbu_file /* sqlite3.c:203743:25 */ +type Rbu_file = rbu_file /* sqlite3.c:203818:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:203307:9 */ +} /* sqlite3.c:203382:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203819:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -209659,7 +209719,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:203744:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204034:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:204109:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -209682,7 +209742,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:204035:28 */ +} /* sqlite3.c:204110:28 */ // Apply a delta. // @@ -209702,7 +209762,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204115:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:204190:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -209792,7 +209852,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204201:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:204276:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -209817,7 +209877,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204223:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:204298:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -209834,7 +209894,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+29055, -1) + Xsqlite3_result_error(tls, context, ts+29063, -1) return } @@ -209845,7 +209905,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+29055, -1) + Xsqlite3_result_error(tls, context, ts+29063, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -209860,7 +209920,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204276:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204351:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -209878,7 +209938,7 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204298:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204373:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -209902,7 +209962,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204321:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:204396:12: */ var rc int32 if zSql == uintptr(0) { @@ -209917,7 +209977,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204418:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) @@ -209935,7 +209995,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204343:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204363:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204438:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -209965,7 +210025,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2043 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204470:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -209979,7 +210039,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:204395:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204411:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204486:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -209988,7 +210048,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29076, uintptr(0), uintptr(0), p+64) + ts+29084, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -210060,7 +210120,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204491:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:204566:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -210072,7 +210132,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+26246, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+26254, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -210090,7 +210150,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204527:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204602:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -210100,9 +210160,9 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, - ts+29247, libc.VaList(bp, func() uintptr { + ts+29255, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 29397 /* "AND rootpage!=0 ..." */ + return ts + 29405 /* "AND rootpage!=0 ..." */ } return ts + 1524 /* "" */ }()))) @@ -210110,7 +210170,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+29438) + ts+29446) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -210125,7 +210185,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204562:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:204637:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -210151,7 +210211,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204587:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:204662:12: */ var ap Va_list _ = ap var zSql uintptr @@ -210177,7 +210237,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204614:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:204689:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -210194,7 +210254,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204634:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:204709:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0))) + uint64(3)*uint64(unsafe.Sizeof(U8(0)))) * uint64(nCol)) var azNew uintptr @@ -210217,7 +210277,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204659:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:204734:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -210240,7 +210300,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204759:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -210290,7 +210350,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:204684: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204732:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:204807:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -210311,7 +210371,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+64, Xsqlite3_mprintf(tls, - ts+29563, libc.VaList(bp, zTab))) + ts+29571, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -210329,7 +210389,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*8, p+64, - Xsqlite3_mprintf(tls, ts+29682, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+29690, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -210347,7 +210407,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+29703, libc.VaList(bp+16, zIdx))) + ts+29711, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -210371,7 +210431,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*8, p+64, - Xsqlite3_mprintf(tls, ts+29754, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+29762, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -210410,7 +210470,7 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204818:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:204893:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -210420,7 +210480,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+64, - Xsqlite3_mprintf(tls, ts+29775, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29783, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -210435,7 +210495,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint64(unsafe.Sizeof(U8(0)))*uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+29803, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+29811, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { @@ -210468,7 +210528,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204872:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:204947:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -210485,7 +210545,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+56, pIter+108) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+20722, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+20730, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -210498,18 +210558,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // of the input table. Ignore any input table columns that begin with // "rbu_". (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+29832, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+29840, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+29851, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+29859, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+29856, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+29864, zName) { bRbuRowid = 1 } } @@ -210521,12 +210581,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+29866, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+29874, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 29895 /* "may not have" */ + return ts + 29903 /* "may not have" */ } - return ts + 29908 /* "requires" */ + return ts + 29916 /* "requires" */ }())) } @@ -210535,7 +210595,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+29917, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29925, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) @@ -210549,7 +210609,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29939, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29947, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) @@ -210590,7 +210650,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:204982:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205057:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -210599,8 +210659,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29966, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 15900 /* ", " */ + zList = rbuMPrintf(tls, p, ts+29974, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 15908 /* ", " */ } return zList } @@ -210609,7 +210669,7 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205003:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:205078:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -210621,7 +210681,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+29975, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+29983, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -210651,7 +210711,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205048:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:205123:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -210660,25 +210720,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+29988, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+29996, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+30020, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+30028, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15900, ts+30043) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+30049, ts+30056, ts+6260) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15900, ts+1524) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15908, ts+30051) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+30057, ts+30064, ts+6260) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15908, ts+1524) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+30064, + ts+30072, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+30106, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+30114, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -210710,7 +210770,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205115:13: */ +func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205190:13: */ bp := tls.Alloc(192) defer tls.Free(192) @@ -210741,7 +210801,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* s *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+29803, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+29811, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -210778,7 +210838,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 30126 /* "_rowid_" */ + zCol = ts + 30134 /* "_rowid_" */ __7: ; goto __5 @@ -210787,13 +210847,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+30134, + zLhs = rbuMPrintf(tls, p, ts+30142, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+30155, + zOrder = rbuMPrintf(tls, p, ts+30163, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+30191, + zSelect = rbuMPrintf(tls, p, ts+30199, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 15900 /* ", " */ + zSep = ts + 15908 /* ", " */ iCol++ goto __1 __2: @@ -210812,7 +210872,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+30218, + Xsqlite3_mprintf(tls, ts+30226, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184)))) { goto __13 @@ -210839,8 +210899,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+30266, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 15900 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+30274, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 15908 /* ", " */ goto __15 __15: iCol++ @@ -210852,7 +210912,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+30273, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+30281, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -210891,7 +210951,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205230:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:205305:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -210909,7 +210969,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+29803, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+29811, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -210921,7 +210981,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+30285, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+30293, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 1524 /* "" */ } else { @@ -210935,37 +210995,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 30126 /* "_rowid_" */ + zCol = ts + 30134 /* "_rowid_" */ } else { - zCol = ts + 29856 /* "rbu_rowid" */ + zCol = ts + 29864 /* "rbu_rowid" */ } zType = ts + 1089 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+30307, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+30315, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 30043 + return ts + 30051 } return ts + 1524 }() - zImpPK = Xsqlite3_mprintf(tls, ts+30327, + zImpPK = Xsqlite3_mprintf(tls, ts+30335, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+30348, + zImpCols = Xsqlite3_mprintf(tls, ts+30356, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+30381, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+30389, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 15900 /* ", " */ - zAnd = ts + 22742 /* " AND " */ + zCom = ts + 15908 /* ", " */ + zAnd = ts + 22750 /* " AND " */ nBind++ } @@ -211002,7 +211062,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205342:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:205417:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -211013,11 +211073,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+30405, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+30413, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+30417, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+30425, libc.VaList(bp+32, zList, zS)) } - zS = ts + 15900 /* ", " */ + zS = ts + 15908 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -211026,7 +211086,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+30426, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+30434, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -211040,24 +211100,24 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205383:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205458:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+30441, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+30449, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1524 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+30455, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 22742 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+30463, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 22750 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+30467, libc.VaList(bp+40, zList)) + ts+30475, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1524 /* "" */ @@ -211065,8 +211125,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+30517, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 22742 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+30525, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 22750 /* " AND " */ } } } @@ -211078,9 +211138,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205499:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30530, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30538, 0) } // Return a nul-terminated string containing the comma separated list of @@ -211098,7 +211158,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:205424:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205447:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:205522:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -211113,17 +211173,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+30517, + zList = rbuMPrintf(tls, p, ts+30525, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 15900 /* ", " */ + zSep = ts + 15908 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+30556, + zList = rbuMPrintf(tls, p, ts+30564, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 15900 /* ", " */ + zSep = ts + 15908 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+30586, + zList = rbuMPrintf(tls, p, ts+30594, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 15900 /* ", " */ + zSep = ts + 15908 /* ", " */ } } } @@ -211144,7 +211204,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205501:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:205576:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -211174,26 +211234,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205528:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205603:13: */ bp := tls.Alloc(72) defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 30623 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 30631 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+64, - Xsqlite3_mprintf(tls, ts+29775, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+29783, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+17412) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+17420) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64, p+64, - Xsqlite3_mprintf(tls, ts+29803, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+29811, libc.VaList(bp+8, zIdx))) } break } @@ -211206,15 +211266,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 3) != 0 { - zDesc = ts + 30043 /* " DESC" */ + zDesc = ts + 30051 /* " DESC" */ } else { zDesc = ts + 1524 /* "" */ } - z = rbuMPrintf(tls, p, ts+30636, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 15900 /* ", " */ + z = rbuMPrintf(tls, p, ts+30644, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 15908 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+30647, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+30655, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z @@ -211237,7 +211297,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205587:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205662:13: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -211254,7 +211314,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+30651) + ts+30659) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -211263,7 +211323,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+29803, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+29811, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -211273,23 +211333,23 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+30701, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+30709, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+30723, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+30731, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 30043 /* " DESC" */ + return ts + 30051 /* " DESC" */ } return ts + 1524 /* "" */ }())) - zComma = ts + 15900 /* ", " */ + zComma = ts + 15908 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+30733, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+30741, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7684, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30748, + ts+30756, libc.VaList(bp+120, zCols, zPk)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7684, 0, 0)) } @@ -211313,7 +211373,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205661:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:205736:13: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -211335,32 +211395,32 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 30810 /* "PRIMARY KEY " */ + zPk = ts + 30818 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+30823, + zSql = rbuMPrintf(tls, p, ts+30831, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 30850 /* " NOT NULL" */ + return ts + 30858 /* " NOT NULL" */ } return ts + 1524 /* "" */ }())) - zComma = ts + 15900 /* ", " */ + zComma = ts + 15908 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+30860, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+30868, libc.VaList(bp+88, zSql, zPk)) } } Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7684, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30867, + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30875, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 30899 /* " WITHOUT ROWID" */ + return ts + 30907 /* " WITHOUT ROWID" */ } return ts + 1524 /* "" */ }())) @@ -211377,7 +211437,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205717:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:205792:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -211387,12 +211447,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, - ts+30914, + ts+30922, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205735:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205810:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -211414,7 +211474,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205765:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:205840:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -211424,7 +211484,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, - ts+30971) + ts+30979) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -211522,7 +211582,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205865:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:205940:12: */ bp := tls.Alloc(628) defer tls.Free(628) @@ -211534,7 +211594,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+31037, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+31045, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -211558,7 +211618,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7684, 0, 1)) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7684, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31057, + ts+31065, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7684, 0, 0)) @@ -211567,14 +211627,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, - Xsqlite3_mprintf(tls, ts+31122, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+31130, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, - Xsqlite3_mprintf(tls, ts+31158, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+31166, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -211591,7 +211651,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+31192, + ts+31200, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -211599,9 +211659,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 31253 /* "AND" */ + return ts + 31261 /* "AND" */ } - return ts + 31257 /* "WHERE" */ + return ts + 31265 /* "WHERE" */ }() } return ts + 1524 /* "" */ @@ -211610,21 +211670,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+31263, + ts+31271, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+31324, + ts+31332, libc.VaList(bp+264, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 31253 /* "AND" */ + return ts + 31261 /* "AND" */ } - return ts + 31257 /* "WHERE" */ + return ts + 31265 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -211662,17 +211722,17 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1524 } - return ts + 31483 + return ts + 31491 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, - ts+31492, + ts+31500, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 31528 /* ", _rowid_" */ + return ts + 31536 /* ", _rowid_" */ } return ts + 1524 /* "" */ }(), zBindings))) @@ -211684,28 +211744,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+31538, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+31546, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { var zRbuRowid uintptr = ts + 1524 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 31566 /* ", rbu_rowid" */ + zRbuRowid = ts + 31574 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31578, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+31586, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 31654 /* ", 0 AS rbu_rowid" */ + return ts + 31662 /* ", 0 AS rbu_rowid" */ } return ts + 1524 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31671, + ts+31679, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -211713,7 +211773,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+31970, + ts+31978, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -211727,9 +211787,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 32069 /* ",_rowid_ " */ + zRbuRowid = ts + 32077 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 32079 /* ",rbu_rowid" */ + zRbuRowid = ts + 32087 /* ",rbu_rowid" */ } } @@ -211742,20 +211802,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+30126, 0) + zOrder = rbuMPrintf(tls, p, ts+30134, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15900, ts+1524) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1524, ts+15908, ts+1524) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+32090, + ts+32098, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32138 /* "0 AS " */ + return ts + 32146 /* "0 AS " */ } return ts + 1524 /* "" */ }(), @@ -211768,7 +211828,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 21076 /* "ORDER BY" */ + return ts + 21084 /* "ORDER BY" */ } return ts + 1524 /* "" */ }(), zOrder, @@ -211797,7 +211857,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206132:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:206207:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -211848,9 +211908,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1524 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 31483 /* "rbu_imp_" */ + zPrefix = ts + 31491 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+32144, + zUpdate = Xsqlite3_mprintf(tls, ts+32152, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) @@ -211863,7 +211923,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206200:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:206275:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -211886,7 +211946,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -211902,7 +211962,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:206221:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206314:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -211918,7 +211978,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ } *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+64, - Xsqlite3_mprintf(tls, ts+32174, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+32182, libc.VaList(bp, p+48))) for *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -211986,7 +212046,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:206239:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206320:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:206395:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -211998,21 +212058,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7684, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7684) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+32204, libc.VaList(bp, zFile, zFile)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+32212, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32231, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, ts+14758, uint64(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32239, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, ts+14766, uint64(4)) } else { libc.Xmemcpy(tls, p+48, ts+7684, uint64(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32249, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32257, libc.VaList(bp+24, p+48)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 @@ -212052,11 +212112,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32315, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32323, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+25389, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+25397, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -212068,13 +212128,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+32347, + zTarget = Xsqlite3_mprintf(tls, ts+32355, libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+7684), func() uintptr { if zExtra == uintptr(0) { return ts + 1524 /* "" */ } - return ts + 32379 /* "&" */ + return ts + 32387 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1524 /* "" */ @@ -212093,21 +212153,21 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+32381, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32389, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+32396, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+32404, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+32413, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+32421, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } @@ -212115,7 +212175,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+7684, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32429, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32437, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. @@ -212126,7 +212186,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32457, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32465, 0) } } @@ -212148,7 +212208,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206501:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:206576:13: */ } // Return the current wal-index header checksum for the target database @@ -212156,7 +212216,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2065 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206597:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -212189,7 +212249,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:206522:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206551:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:206626:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -212197,7 +212257,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32429, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32437, uintptr(0), uintptr(0), uintptr(0)) } } @@ -212231,7 +212291,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32475, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32483, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -212281,7 +212341,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206635:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:206710:12: */ var mReq U32 = U32(int32(1)<dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207135:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -212667,7 +212727,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // var pStmt uintptr at bp+8, 8 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+64, - ts+32549) + ts+32557) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -212680,7 +212740,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32571, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32579, libc.VaList(bp, iCookie+1)) } } } @@ -212688,7 +212748,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:207060:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207166:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -212705,7 +212765,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+64, Xsqlite3_mprintf(tls, - ts+32598, + ts+32606, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -212743,16 +212803,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:207091: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207152:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207227:13: */ bp := tls.Alloc(32) defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+64, - Xsqlite3_mprintf(tls, ts+32756, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+32764, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32771, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32779, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -212762,18 +212822,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:207 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207247:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32791, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32799, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32816) + ts+32824) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -212787,12 +212847,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+32924) + ts+32932) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, - ts+32989) + ts+32997) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -212804,7 +212864,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33033, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33041, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -212812,7 +212872,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:207172:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207299:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -212826,8 +212886,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+18518) - rbuCopyPragma(tls, p, ts+17608) + rbuCopyPragma(tls, p, ts+18526) + rbuCopyPragma(tls, p, ts+17616) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -212838,7 +212898,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+33058, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+33066, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -212864,10 +212924,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15804, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15812, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15804, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15812, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -212955,7 +213015,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207224:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207353:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:207428:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -212973,7 +213033,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207444:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 80 @@ -212988,7 +213048,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33086, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33094, 0) } if rc == SQLITE_OK { @@ -213003,11 +213063,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:207369 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207477:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+32535, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+32543, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -213022,7 +213082,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:207402:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207493:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -213031,7 +213091,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // var zRnd [64]int8 at bp+12, 64 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+33111, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+33119, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) @@ -213043,7 +213103,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207418:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207513:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -213053,7 +213113,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:207438:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207450:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:207525:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -213070,7 +213130,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+33122, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+33130, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { @@ -213102,7 +213162,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207575:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -213113,7 +213173,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+33194, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+33202, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) @@ -213121,7 +213181,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+33208) + ts+33216) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -213133,7 +213193,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, - ts+33265) + ts+33273) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -213144,7 +213204,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:207500:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207541:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207616:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -213216,7 +213276,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33339, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33347, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -213238,12 +213298,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33371, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33379, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 33403 /* "vacuum" */ + return ts + 33411 /* "vacuum" */ } - return ts + 33410 /* "update" */ + return ts + 33418 /* "update" */ }())) } } @@ -213251,7 +213311,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15789, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15797, uintptr(0), uintptr(0), p+64) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -213265,14 +213325,14 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+18232) - rbuCopyPragma(tls, p, ts+17623) + rbuCopyPragma(tls, p, ts+18240) + rbuCopyPragma(tls, p, ts+17631) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+33417, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+33425, uintptr(0), uintptr(0), p+64) } // Check if the main database is a zipvfs db. If it is, set the upper @@ -213282,7 +213342,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) var frc int32 = Xsqlite3_file_control(tls, db, ts+7684, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+33433, uintptr(0), uintptr(0), p+64) + db, ts+33441, uintptr(0), uintptr(0), p+64) } } @@ -213317,7 +213377,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207780:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -213328,7 +213388,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:207705:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207718:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:207793:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -213336,13 +213396,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207730:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:207805:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+33457, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+33465, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -213351,7 +213411,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207748:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:207823:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -213367,12 +213427,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207837:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); Size_t(i) < nErrmsg-uint64(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+31483, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+31491, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -213385,13 +213445,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:207762:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207780:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:207855:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15804, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15812, uintptr(0), uintptr(0), p+64) } // Sync the db file if currently doing an incremental checkpoint @@ -213405,7 +213465,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15804, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15812, uintptr(0), uintptr(0), p+64) } // Close any open statement handles. @@ -213417,7 +213477,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+33465, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+33473, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -213450,13 +213510,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207843:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207918:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207851:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:207926:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -213489,7 +213549,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207961:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -213507,7 +213567,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207886:16: return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207989:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -213516,7 +213576,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15804, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15812, uintptr(0), uintptr(0), uintptr(0)) } } @@ -213535,19 +213595,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15804, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15812, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 15789 /* "BEGIN" */ + zBegin = ts + 15797 /* "BEGIN" */ } else { - zBegin = ts + 33417 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 33425 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33417, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+33425, uintptr(0), uintptr(0), uintptr(0)) } } @@ -213614,7 +213674,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:207914 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208082:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -213631,7 +213691,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:208007:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208023:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:208098:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 360)) += nDiff @@ -213649,7 +213709,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208116:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -213671,7 +213731,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:208041:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208138:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 88 { @@ -213696,7 +213756,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:208063:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208084:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:208159:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -213711,7 +213771,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208174:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -213743,7 +213803,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208099:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208207:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -213752,20 +213812,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:208132:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208143:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:208218:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208150:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:208225:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208158:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208233:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -213829,7 +213889,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208224:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:208299:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -213868,7 +213928,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208267:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:208342:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -213882,7 +213942,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208279:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:208354:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -213896,7 +213956,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208293:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:208368:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -213916,7 +213976,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208314:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208389:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -213936,7 +213996,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208336:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:208411:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -213944,7 +214004,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208344:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:208419:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -213952,7 +214012,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208352:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:208427:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -213979,7 +214039,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33492, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+33500, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -214004,7 +214064,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+33515, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+33523, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -214015,7 +214075,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208483:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -214023,7 +214083,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208408: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208416:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:208491:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -214031,7 +214091,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208424:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:208499:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -214064,7 +214124,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208462:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:208537:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -214121,13 +214181,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208520:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:208595:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208528:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:208603:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -214150,7 +214210,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208547:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:208622:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -214192,7 +214252,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+33526, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+33534, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -214236,10 +214296,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:208554:29 */ +} /* sqlite3.c:208629:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208645:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:208720:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -214248,7 +214308,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208654:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:208729:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -214293,7 +214353,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208702:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:208777:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -214301,7 +214361,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208716:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:208791:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -214311,7 +214371,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208726:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:208801:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -214319,7 +214379,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208734:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:208809:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -214327,7 +214387,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208746:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:208821:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -214336,7 +214396,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208756:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:208831:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -214345,7 +214405,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208765:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:208840:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -214353,7 +214413,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208773:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:208848:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -214361,13 +214421,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208781:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:208856:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208864:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -214381,7 +214441,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:208789 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208803:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:208878:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -214442,17 +214502,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:208806:22 */ +} /* sqlite3.c:208881:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208881:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:208956:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208888:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:208963:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -214535,7 +214595,7 @@ type SessionTable1 = struct { FnEntry int32 FnChange int32 FapChange uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ //************************************************************************ @@ -214606,7 +214666,7 @@ type SessionTable1 = struct { // #include // #include -type SessionTable = SessionTable1 /* sqlite3.c:210232:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:210308:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -214616,16 +214676,16 @@ type SessionChange1 = struct { F__ccgo_pad2 [4]byte FaRecord uintptr FpNext uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:210233:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:210309:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:210234:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:210310:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -214639,13 +214699,13 @@ type SessionInput1 = struct { FpIn uintptr FbEof int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:10836:9 */ +} /* sqlite3.c:10840:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:210235:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:210311:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210248:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:210324:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -214653,13 +214713,13 @@ type SessionHook1 = struct { FxNew uintptr FxCount uintptr FxDepth uintptr -} /* sqlite3.c:10828:9 */ +} /* sqlite3.c:10832:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:210250:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:210326:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210528:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:210604:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -214669,13 +214729,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210535:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:210611:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210543:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:210619:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -214688,7 +214748,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210554:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210630:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -214696,7 +214756,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:210 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210564:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:210640:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -214718,7 +214778,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210588:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:210664:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -214806,7 +214866,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210664:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:210740:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) += I64(Xsqlite3_msize(tls, pRet)) @@ -214817,7 +214877,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210675:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:210751:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 56)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -214840,14 +214900,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210701:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:210777:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210710:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:210786:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -214857,7 +214917,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210720:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:210796:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -214870,7 +214930,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210735:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:210811:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -214936,7 +214996,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210876:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -214962,7 +215022,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:210800:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210818:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:210894:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -215005,7 +215065,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210867:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:210943:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -215044,7 +215104,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210910:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:210986:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -215083,7 +215143,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:210956:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:211032:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -215110,7 +215170,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:210990:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:211066:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -215185,7 +215245,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211067:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:211143:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -215273,7 +215333,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211146:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:211222:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -215337,7 +215397,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211212:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:211288:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -215354,13 +215414,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+12577, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+12585, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+33537, 0) + ts+33545, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1524, 0) } else { @@ -215373,7 +215433,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+33658, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+33666, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -215468,7 +215528,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211345:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:211421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -215485,7 +215545,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+12577, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+12585, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -215504,15 +215564,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:211380:9 */ +} /* sqlite3.c:211456:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211380:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:211456:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211385:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211461:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -215528,7 +215588,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211395:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:211471:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -215544,21 +215604,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211405:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211481:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211409:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211485:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211414:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:211490:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -215672,7 +215732,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211520:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:211596:13: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -215968,7 +216028,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211669:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:211745:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -216003,7 +216063,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211709:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:211785:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -216038,25 +216098,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211747:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211823:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211750:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211826:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211753:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211829:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211756:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211832:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211764:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:211840:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -216076,24 +216136,24 @@ type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:211774:9 */ +} /* sqlite3.c:211850:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211774:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:211850:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211783:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211859:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211788:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:211864:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211869:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -216101,13 +216161,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211793:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211797:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:211873:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211805:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:211881:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -216123,7 +216183,7 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211816:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211892:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -216133,9 +216193,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+33687, + zRet = Xsqlite3_mprintf(tls, ts+33695, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 22742 /* " AND " */ + zSep = ts + 22750 /* " AND " */ if zRet == uintptr(0) { break } @@ -216145,7 +216205,7 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211839:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:211915:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -216158,9 +216218,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+33721, + ts+33729, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 33762 /* " OR " */ + zSep = ts + 33770 /* " OR " */ if zRet == uintptr(0) { break } @@ -216175,18 +216235,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211870:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:211946:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+33767, + ts+33775, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211886:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:211962:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -216214,7 +216274,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211917:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:211993:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -216226,7 +216286,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+33845, + ts+33853, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -216251,7 +216311,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:211957:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:212033:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -216364,7 +216424,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+33898, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+33906, 0) __16: ; rc = SQLITE_SCHEMA @@ -216424,7 +216484,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212052:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:212128:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -216460,7 +216520,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212090:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:212166:13: */ var pNext uintptr var pTab uintptr @@ -216482,7 +216542,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212114:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:212190:17: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -216520,7 +216580,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2121 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212146:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:212222:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -216532,7 +216592,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212164:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:212240:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -216583,7 +216643,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212217:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:212293:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -216628,7 +216688,7 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212260:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:212336:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -216651,7 +216711,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212282:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:212358:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -216662,7 +216722,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212295:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:212371:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 8)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -216673,7 +216733,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212308:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:212384:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint64(nBlob)) *(*int32)(unsafe.Pointer(p + 8)) += nBlob @@ -216686,7 +216746,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212328:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212404:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint64(nStr)) @@ -216700,7 +216760,7 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212348:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:212424:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -216717,7 +216777,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212367:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:212443:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -216738,7 +216798,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212392:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:212468:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -216798,7 +216858,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212454:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:212530:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -216904,7 +216964,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212554:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:212630:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -216961,7 +217021,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212609:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:212685:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -216969,10 +217029,10 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+12577, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+12585, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+33925, libc.VaList(bp, zDb)) + ts+33933, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } @@ -216981,18 +217041,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1524 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+34035, bp+24) + sessionAppendStr(tls, bp+8, ts+34043, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1537, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+34050, bp+24) + sessionAppendStr(tls, bp+8, ts+34058, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+34058, bp+24) + sessionAppendStr(tls, bp+8, ts+34066, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 22742 /* " AND " */ + zSep = ts + 22750 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -217012,7 +217072,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212666:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:212742:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -217090,7 +217150,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212737:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:212813:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -217111,7 +217171,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212760:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212836:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -217133,7 +217193,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+34064, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+34072, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -217231,7 +217291,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+34084, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34092, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -217241,7 +217301,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212889:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:212965:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -217253,7 +217313,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212907:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212983:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -217261,7 +217321,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212919:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212995:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -217273,7 +217333,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:212935:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:213011:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -217281,7 +217341,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:212947:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:213023:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -217293,7 +217353,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:212961:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:213037:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -217306,7 +217366,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:212976:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:213052:16: */ var ret int32 = 0 var pTab uintptr @@ -217320,12 +217380,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:212992:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213068:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:212999:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:213075:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -217351,12 +217411,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213025:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:213101:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213032:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:213108:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -217389,28 +217449,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213070:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:213146:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213077:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:213153:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213090:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213166:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213097:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:213173:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213187:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -217428,7 +217488,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:213111:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213131:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:213207:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -217461,7 +217521,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213159:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:213235:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -217486,7 +217546,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213185:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:213261:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -217522,7 +217582,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213226:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213302:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -217540,7 +217600,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 213244) + rc = Xsqlite3CorruptError(tls, 213320) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -217565,7 +217625,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 213264) + rc = Xsqlite3CorruptError(tls, 213340) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -217607,7 +217667,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213302:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:213378:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -217626,7 +217686,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 213318) + rc = Xsqlite3CorruptError(tls, 213394) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -217653,7 +217713,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213345:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:213421:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -217695,7 +217755,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213389:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213465:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -217715,7 +217775,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+72, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213406) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 213482) } } @@ -217750,7 +217810,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213438:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:213514:12: */ var i int32 var op U8 @@ -217807,13 +217867,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213492)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213568)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213498)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213574)) } if paRec != 0 { @@ -217883,7 +217943,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213542)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 213618)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -217914,7 +217974,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213571:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:213647:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -217934,14 +217994,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213594:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213670:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213603:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:213679:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -217955,7 +218015,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213623:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:213699:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -217974,7 +218034,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213646:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213722:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -217996,7 +218056,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213674:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213750:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -218020,7 +218080,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213708:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:213784:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -218037,7 +218097,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:213807:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -218049,7 +218109,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213749:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:213825:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -218066,7 +218126,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213764:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213840:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -218302,7 +218362,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213891) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 213967) goto finished_invert __6: ; @@ -218353,7 +218413,7 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213923:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:213999:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -218368,7 +218428,7 @@ func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintpt } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213942:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214018:16: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -218390,9 +218450,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:213962:9 */ +} /* sqlite3.c:214038:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:213962:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:214038:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -218414,9 +218474,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad3 [6]byte -} /* sqlite3.c:213969:9 */ +} /* sqlite3.c:214045:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:214045:32 */ // Number of prepared UPDATE statements to cache. @@ -218424,7 +218484,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:213969:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:213998:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:214074:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -218485,7 +218545,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+12577) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+12585) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM @@ -218497,24 +218557,24 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+34102, bp+16) + sessionAppendStr(tls, bp, ts+34110, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+34115, bp+16) + sessionAppendStr(tls, bp, ts+34123, bp+16) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+34121, bp+16) + sessionAppendStr(tls, bp, ts+34129, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 15900 /* ", " */ + zSep = ts + 15908 /* ", " */ } } // Create the WHERE clause part of the UPDATE zSep = ts + 1524 /* "" */ - sessionAppendStr(tls, bp, ts+34050, bp+16) + sessionAppendStr(tls, bp, ts+34058, bp+16) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { sessionAppendStr(tls, bp, zSep, bp+16) @@ -218522,13 +218582,13 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, sessionAppendStr(tls, bp, - ts+34126, bp+16) + ts+34134, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+34058, bp+16) + sessionAppendStr(tls, bp, ts+34066, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 22742 /* " AND " */ + zSep = ts + 22750 /* " AND " */ } } @@ -218558,7 +218618,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214213:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -218586,7 +218646,7 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:214137:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214167:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214243:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -218596,34 +218656,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+34201, bp+16) + sessionAppendStr(tls, bp, ts+34209, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+34050, bp+16) + sessionAppendStr(tls, bp, ts+34058, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+34121, bp+16) + sessionAppendStr(tls, bp, ts+34129, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 22742 /* " AND " */ + zSep = ts + 22750 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+34219, bp+16) + sessionAppendStr(tls, bp, ts+34227, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+33762, bp+16) + sessionAppendStr(tls, bp, ts+33770, bp+16) zSep = ts + 1524 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+34058, bp+16) + sessionAppendStr(tls, bp, ts+34066, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 34227 /* "AND " */ + zSep = ts + 34235 /* "AND " */ } } sessionAppendStr(tls, bp, ts+6260, bp+16) @@ -218648,7 +218708,7 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214232:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214308:12: */ return sessionSelectStmt(tls, db, ts+7684, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } @@ -218660,7 +218720,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214250:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:214326:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -218668,19 +218728,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+34232, bp+16) + sessionAppendStr(tls, bp, ts+34240, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+22748, bp+16) + sessionAppendStr(tls, bp, ts+22756, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+15900, bp+16) + sessionAppendStr(tls, bp, ts+15908, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+34250, bp+16) + sessionAppendStr(tls, bp, ts+34258, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+34261, bp+16) + sessionAppendStr(tls, bp, ts+34269, bp+16) } sessionAppendStr(tls, bp, ts+6260, bp+16) @@ -218691,7 +218751,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214280:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:214356:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -218699,24 +218759,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214290:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+12577, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:214366:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+12585, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+34265) + ts+34273) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+34378) + ts+34386) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214313:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:214389:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -218743,7 +218803,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214346:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:214422:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -218764,7 +218824,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 214369) + rc = Xsqlite3CorruptError(tls, 214445) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -218788,7 +218848,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214395:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:214471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -218832,7 +218892,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214430:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:214506:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -218904,7 +218964,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214504:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:214580:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -219004,7 +219064,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214602:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:214678:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -219139,7 +219199,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214735:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214811:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -219161,7 +219221,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+34522, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34530, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -219177,7 +219237,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+34543, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34551, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -219186,7 +219246,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214792:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:214868:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -219240,7 +219300,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214848:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:214924:12: */ bp := tls.Alloc(368) defer tls.Free(368) @@ -219258,10 +219318,10 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+34562, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34570, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+34588, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34596, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+184, 4 @@ -219331,20 +219391,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+34618, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+34626, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 184)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+34662, + ts+34670, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 184)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192)), uint64(*(*int32)(unsafe.Pointer(bp + 184)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+34733, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + ts+34741, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+12577) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+12585) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -219402,14 +219462,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+34793, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34801, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+34823, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+34831, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+34847, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+34823, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34855, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+34831, uintptr(0), uintptr(0), uintptr(0)) } } @@ -219431,7 +219491,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215046:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215122:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -219449,7 +219509,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215079:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215155:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -219457,7 +219517,7 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215104:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:215180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -219472,7 +219532,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215131:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:215207:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -219480,7 +219540,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215165:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:215241:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -219652,7 +219712,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215347:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:215423:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -219783,7 +219843,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215470:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215546:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -219837,7 +219897,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215521:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215597:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -219852,7 +219912,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215538:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:215614:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -219870,12 +219930,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215554:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:215630:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215565:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:215641:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -219892,12 +219952,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215584:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215660:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215595:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:215671:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -219905,7 +219965,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2155 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215605:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215681:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -219929,7 +219989,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215634:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215710:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -219956,7 +220016,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215673:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:215749:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -219997,7 +220057,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215722:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:215798:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -220059,7 +220119,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215790:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215866:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -220197,7 +220257,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215922:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:215998:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -220212,7 +220272,7 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:215939:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:216015:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -220227,7 +220287,7 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:215956:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:216032:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -220243,7 +220303,7 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:215975:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:216051:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -220259,7 +220319,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:216072:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -220267,7 +220327,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:215996:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216006:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:216082:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -220355,7 +220415,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -220417,13 +220477,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:216737:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:216813:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:216738:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:216814:27 */ // ************************************************************************* // @@ -220461,14 +220521,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:216758:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:216834:27 */ // // End of interface to code in fts5_config.c. @@ -220483,7 +220543,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_config.c. @@ -220494,7 +220554,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216884:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:216960:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -220504,19 +220564,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [6]byte FiPos I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216920:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:216996:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:216939:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:217015:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:216939:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:217015:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:216961:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:217037:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:216961:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:217037:28 */ // // End of interface to code in fts5_buffer.c. @@ -220549,7 +220609,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_buffer.c. @@ -220560,16 +220620,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:216975:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:217051:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:216976:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:217052:30 */ // // End of interface to code in fts5_varint.c. @@ -220584,7 +220644,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:217178:9 */ +} /* sqlite3.c:217254:9 */ // // End of interface to code in fts5_varint.c. @@ -220595,7 +220655,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:217178:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:217254:26 */ // // End of interface to code in fts5.c. @@ -220612,7 +220672,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5.c. @@ -220621,7 +220681,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:217204:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:217280:25 */ // // End of interface to code in fts5_hash.c. @@ -220640,7 +220700,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:217260:9 */ +} /* sqlite3.c:217336:9 */ // // End of interface to code in fts5_hash.c. @@ -220651,7 +220711,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:217260:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:217336:28 */ // // End of interface to code in fts5_storage.c. @@ -220667,7 +220727,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // // End of interface to code in fts5_storage.c. @@ -220676,7 +220736,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:217303:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:217379:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -220688,9 +220748,9 @@ type Fts5ExprNode1 = struct { FnChild int32 F__ccgo_pad2 [4]byte FapChild [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217304:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:217380:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -220700,25 +220760,25 @@ type Fts5Parse1 = struct { FpExpr uintptr FbPhraseToAnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217305:9 */ +} /* sqlite3.c:217381:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:217305:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:217381:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:217306:9 */ +} /* sqlite3.c:217382:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:217306:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:217382:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 F__ccgo_pad1 [4]byte FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217307:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:217383:31 */ type Fts5ExprNearset1 = struct { FnNear int32 F__ccgo_pad1 [4]byte @@ -220726,17 +220786,17 @@ type Fts5ExprNearset1 = struct { FnPhrase int32 F__ccgo_pad2 [4]byte FapPhrase [1]uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217308:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:217384:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:217356:9 */ +} /* sqlite3.c:217432:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217356:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:217432:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -220841,7 +220901,7 @@ type Fts5YYMINORTYPE = struct { F__ccgo_pad1 [0]uint64 Ffts5yyinit int32 F__ccgo_pad2 [12]byte -} /* sqlite3.c:217632:3 */ +} /* sqlite3.c:217708:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -220914,7 +220974,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:217725:31 */ +} /* sqlite3.c:217801:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -220929,23 +220989,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:217738:29 */ +} /* sqlite3.c:217814:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:217756:28 */ +} /* sqlite3.c:217832:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:217765:26 */ +} /* sqlite3.c:217841:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:217769:31 */ +} /* sqlite3.c:217845:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -220982,9 +221042,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [6]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:217812:1 */ +} /* sqlite3.c:217888:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217819:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:217895:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -220993,9 +221053,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:217823:1 */ +} /* sqlite3.c:217899:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:217918:29 */ // #include @@ -221005,7 +221065,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:217842:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:217991:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:218067:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */ @@ -221024,7 +221084,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218030:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:218106:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -221040,7 +221100,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218049:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:218125:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -221098,7 +221158,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218108:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:218184:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24) @@ -221106,7 +221166,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2181 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218202:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 { fts5yy_pop_parser_stack(tls, pParser) @@ -221119,7 +221179,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:218126:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218143:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:218219:13: */ if p == uintptr(0) { return } @@ -221143,7 +221203,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218206:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:218282:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -221167,7 +221227,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218271:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:218347:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -221178,7 +221238,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218300:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218376:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 { @@ -221188,7 +221248,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+34875, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34883, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -221197,7 +221257,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218343:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:218419:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -221246,7 +221306,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:218384:29 */ +} /* sqlite3.c:218460:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -221279,7 +221339,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:218417:26 */ +} /* sqlite3.c:218493:26 */ // Forward Declaration @@ -221291,7 +221351,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218460:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:218536:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -221501,7 +221561,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218678:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:218754:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -221511,14 +221571,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+34903, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+34911, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218776:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -221547,7 +221607,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:218700:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218741:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:218817:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -221602,7 +221662,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:218958:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:219034:12: */ _ = iToken return 0 } @@ -221650,7 +221710,7 @@ type CInstIter1 = struct { FiStart int32 FiEnd int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:219004:9 */ +} /* sqlite3.c:219080:9 */ // 2014 May 31 // @@ -221686,11 +221746,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:219004:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:219080:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219097:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -221733,7 +221793,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219021 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219052:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:219128:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{}))) @@ -221766,12 +221826,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:219078:9 */ +} /* sqlite3.c:219154:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:219154:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -221780,7 +221840,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:219078:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219101:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:219177:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -221788,7 +221848,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34934, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+34942, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -221796,7 +221856,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219116:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -221851,7 +221911,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219170:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219246:13: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -221862,7 +221922,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 34941 /* "wrong number of ..." */ + var zErr uintptr = ts + 34949 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -221911,19 +221971,19 @@ type Fts5SFinder1 = struct { F__ccgo_pad1 [4]byte FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:219219:9 */ +} /* sqlite3.c:219295:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219219:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:219295:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219233:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:219309:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -221947,7 +222007,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219252:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:219328:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -221976,7 +222036,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219285:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:219361:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -222034,7 +222094,7 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219410:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet @@ -222043,7 +222103,7 @@ func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:219334: } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219342:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219418:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -222066,7 +222126,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 34991 /* "wrong number of ..." */ + var zErr uintptr = ts + 34999 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -222258,17 +222318,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:219500:9 */ +} /* sqlite3.c:219576:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219500:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:219576:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219512:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:219588:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -222279,7 +222339,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219528:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:219604:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -222373,7 +222433,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219601:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:219677:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -222441,18 +222501,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219657:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:219733:12: */ bp := tls.Alloc(96) defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 35039, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) - }{fts5SnippetFunction}))}, {FzFunc: ts + 35047, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) + }{fts5SnippetFunction}))}, + {FzFunc: ts + 35055, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 35057, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 35065, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -222477,7 +222537,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:219658:3 */ +} /* sqlite3.c:219734:3 */ // 2014 May 31 // @@ -222492,7 +222552,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219700:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:219776:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -222518,7 +222578,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219724:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:219800:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -222530,21 +222590,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 8)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219729:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:219805:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219736:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:219812:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219745:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:219821:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -222562,7 +222622,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219763:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:219839:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -222574,7 +222634,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219781:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219857:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -222592,7 +222652,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219802:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:219878:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -222608,26 +222668,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219820:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219896:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219829:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:219905:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219838:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:219914:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219848:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:219924:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -222689,14 +222749,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219891:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:219967:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+12, pIter+24) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219898:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:219974:12: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -222708,7 +222768,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219915:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:219991:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -222720,9 +222780,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219921:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:219997:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:219932:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:220008:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -222739,7 +222799,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:219943:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220019:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -222760,7 +222820,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:219964:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:220040:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -222785,7 +222845,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219992:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:220068:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -222810,13 +222870,13 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:216961:9 */ +} /* sqlite3.c:217037:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220010:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:220086:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220022:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:220098:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -222825,7 +222885,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:22002 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220028:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:220104:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -222871,7 +222931,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220153:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint64(unsafe.Sizeof([512]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))); i++ { @@ -222903,18 +222963,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:220077:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220119:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220195:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220123:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:220199:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220132:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220208:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -222927,7 +222987,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220145:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220221:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -222938,11 +222998,11 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220152:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:220228:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220158:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220234:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': @@ -223031,7 +223091,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220310:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -223076,7 +223136,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:220234:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220279:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:220355:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -223089,11 +223149,11 @@ type Fts5Enum1 = struct { FzName uintptr FeVal int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:220290:1 */ +} /* sqlite3.c:220366:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:220294:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:220370:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220296:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:220372:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -223121,13 +223181,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220325:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220401:12: */ bp := tls.Alloc(112) defer tls.Free(112) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+35062, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35070, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -223154,14 +223214,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35069, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35077, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+35100, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+35108, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -223172,7 +223232,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35133, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35141, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -223185,7 +223245,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+35170, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35178, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, int64(uint64(unsafe.Sizeof(uintptr(0)))*uint64(nArg))) @@ -223194,7 +223254,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35179, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35187, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -223213,7 +223273,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35212, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35220, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -223228,14 +223288,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+35246, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35254, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35254, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35262, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+35286, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+35294, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -223243,9 +223303,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+35292, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35300, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35306, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35314, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -223253,9 +223313,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+35344, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+35352, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35355, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35363, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -223266,25 +223326,25 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+6378, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 9257, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 18613}, - {FzName: ts + 35390, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 18621}, + {FzName: ts + 35398, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+48, zArg, pConfig+92)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35398, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35406, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35429, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35437, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220489:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:220565:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -223302,7 +223362,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220509:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:220585:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -223336,20 +223396,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220549:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:220625:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+23383) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+17524) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35457, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+23391) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+17532) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35465, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+35487) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+35495) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35497, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35505, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -223359,7 +223419,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220577:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220653:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -223367,13 +223427,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35528, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35536, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35533, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35541, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35540, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+35548, libc.VaList(bp+16, i)) } } } @@ -223392,7 +223452,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22057 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220610:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:220686:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -223421,8 +223481,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+23383) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35548, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+23391) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35556, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -223456,7 +223516,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35577, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35585, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -223497,19 +223557,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 35246 /* "content" */ + zTail = ts + 35254 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 35597 /* "docsize" */ + zTail = ts + 35605 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+35605, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+35613, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+17524, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+17532, -1) } // Formulate the zContentExprlist text @@ -223525,7 +223585,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220810:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -223550,7 +223610,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:220734 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220761:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:220837:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -223558,18 +223618,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35616, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35624, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1524 } - return ts + 15900 + return ts + 15908 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35632, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35640, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35639, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+23383)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+35647, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+23391)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -223600,7 +223660,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220807:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:220883:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -223614,7 +223674,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220826:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:220902:19: */ var p uintptr = pIn for 1 != 0 { @@ -223641,7 +223701,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:22082 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220853:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:220929:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -223705,13 +223765,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220912:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:220988:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+35665) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+35673) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -223721,7 +223781,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35670) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35678) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -223731,7 +223791,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35679) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35687) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -223744,7 +223804,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35689) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35697) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -223754,7 +223814,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35699) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+35707) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -223770,7 +223830,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+23383) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+23391) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 8 @@ -223793,11 +223853,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221006:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:221082:12: */ bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 35711 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 35719 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -223820,7 +223880,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+35743) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+35751) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 @@ -223835,7 +223895,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35751, + ts+35759, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -223870,7 +223930,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 May 31 // @@ -223889,9 +223949,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221084:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:221160:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221191:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:221267:13: */ var ap Va_list _ = ap ap = va @@ -223903,12 +223963,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221202:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:221278:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221209:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:221285:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -223970,7 +224030,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+35816, 0) + sqlite3Fts5ParseError(tls, pParse, ts+35824, 0) return FTS5_EOF } } @@ -223983,20 +224043,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+35836, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+35844, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35867, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35875, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35870, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+35878, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31253, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31261, uint64(3)) == 0 { tok = FTS5_AND } break @@ -224008,15 +224068,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221273:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:221349:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221274:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221350:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221276:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:221352:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -224094,7 +224154,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221357:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:221433:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -224169,7 +224229,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221503:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -224181,7 +224241,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221427:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221517:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -224189,7 +224249,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:221441:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221449:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:221525:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -224230,7 +224290,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221489:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:221565:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -224252,7 +224312,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221514:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:221590:12: */ bp := tls.Alloc(136) defer tls.Free(136) @@ -224416,7 +224476,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221597:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:221673:12: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -224641,11 +224701,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:221681:9 */ +} /* sqlite3.c:221757:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221681:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:221757:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221692:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221768:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+12, p+24) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -224653,7 +224713,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2216 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221700:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:221776:12: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -224665,9 +224725,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:221711:9 */ +} /* sqlite3.c:221787:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221787:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -224684,7 +224744,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:221711:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221735:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:221811:12: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -224886,7 +224946,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221834:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:221910:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -224906,7 +224966,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221860:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:221936:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -224933,7 +224993,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221890:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221966:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -224990,7 +225050,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:221949:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222025:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -225056,7 +225116,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222011:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:222087:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -225072,7 +225132,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222102:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -225081,7 +225141,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222026:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222111:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -225107,7 +225167,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222035 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222065:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:222141:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -225126,7 +225186,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222086:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222162:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -225194,7 +225254,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222156:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222232:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32 var rc int32 = SQLITE_OK @@ -225253,7 +225313,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222221:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222297:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -225272,7 +225332,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222249:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222325:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)) + 32)).FpIter @@ -225290,7 +225350,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222273:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:222349:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var i int32 @@ -225306,7 +225366,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222292:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222368:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -225332,7 +225392,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222324:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:222400:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -225382,7 +225442,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222376:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222452:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -225394,7 +225454,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222391:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222467:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 48 + 1*8)) @@ -225424,7 +225484,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222419:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:222495:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 48 /* &.apChild */)), bFromValid, iFrom) @@ -225440,7 +225500,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222440:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222516:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -225493,7 +225553,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222485:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:222561:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -225555,7 +225615,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222544:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:222620:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -225587,7 +225647,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222575:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:222651:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -225603,15 +225663,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222589:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222665:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222593:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222669:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222597:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:222673:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -225621,7 +225681,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222682:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -225646,7 +225706,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222606:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222631:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222707:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 32)).FbFirst = U8(1) } @@ -225658,7 +225718,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222645:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:222721:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -225718,12 +225778,12 @@ type TokenCtx1 = struct { FpPhrase uintptr Frc int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:222705:9 */ +} /* sqlite3.c:222781:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:222705:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:222781:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222714:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222790:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -225792,12 +225852,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222779:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:222855:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222786:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:222862:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -225808,12 +225868,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222797:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:222873:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222802:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:222878:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -225830,7 +225890,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222821:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:222897:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -225888,7 +225948,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222875:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:222951:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -225983,17 +226043,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:222971:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:223047:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35874, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+35882, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+34903, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+34911, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:222979:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:223055:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -226005,7 +226065,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+35879, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+35887, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -226024,7 +226084,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223014:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:223090:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -226062,7 +226122,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223055:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:223131:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -226084,7 +226144,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223078:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:223154:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -226102,7 +226162,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+21745, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+21753, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -226123,7 +226183,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223118:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:223194:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint64(unsafe.Sizeof(int32(0)))) @@ -226138,7 +226198,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223135:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:223211:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -226162,7 +226222,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223161:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:223237:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -226190,21 +226250,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223199:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:223275:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+35908, 0) + ts+35916, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223291:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -226255,7 +226315,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:223215:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223248:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:223324:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+48+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8, pSub+48, uint64(nByte)) @@ -226275,7 +226335,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223270:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:223346:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm var ii int32 var nByte int32 @@ -226318,7 +226378,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223324:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:223400:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -226378,12 +226438,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+32)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+35961, + ts+35969, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 36011 /* "phrase" */ + return ts + 36019 /* "phrase" */ } - return ts + 35874 /* "NEAR" */ + return ts + 35882 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -226406,7 +226466,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223406:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:223482:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -226452,7 +226512,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223843:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:223919:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -226465,7 +226525,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223880:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:223956:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -226475,7 +226535,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223887:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:223963:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -226484,7 +226544,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223896:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:223972:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -226505,7 +226565,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:223925:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:224001:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase)) if pRet != 0 { @@ -226529,12 +226589,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:223947:1 */ +} /* sqlite3.c:224023:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:223952:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:224028:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:223957:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224033:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -226544,7 +226604,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:223965:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:224041:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -226579,7 +226639,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224000:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:224076:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -226607,7 +226667,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224106:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24)))).Fposlist.Fn = 0 } else { @@ -226618,7 +226678,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:224030:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224041:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:224117:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -226668,12 +226728,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224085:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:224161:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224092:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:224168:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -226724,7 +226784,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 August 11 // @@ -226740,14 +226800,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224145:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:224221:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224211:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:224287:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -226775,7 +226835,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224317:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -226784,7 +226844,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224241:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224328:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -226798,7 +226858,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:224252:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224266:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:224342:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -226807,7 +226867,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224275:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:224351:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -226818,7 +226878,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224364:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -226848,7 +226908,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:224288:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:224392:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -226897,7 +226957,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224367:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:224443:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -227056,7 +227116,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224520:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:224596:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -227102,7 +227162,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224566:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:224642:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -227144,7 +227204,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224613:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:224689:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -227178,20 +227238,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224651:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:224727:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+24) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224658:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:224734:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224663:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224739:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224667:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:224743:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*48 @@ -227417,7 +227477,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:224942:9 */ +} /* sqlite3.c:225018:9 */ // 2014 May 31 // @@ -227625,14 +227685,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:224942:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:225018:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:224943:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:225019:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -227640,17 +227700,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:224943:9 */ +} /* sqlite3.c:225019:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:224944:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:225020:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:224945:9 */ +} /* sqlite3.c:225021:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:224945:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:225021:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -227664,18 +227724,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:224946:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:225022:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:224947:9 */ +} /* sqlite3.c:225023:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:224947:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:225023:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -227697,18 +227757,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:224948:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:225024:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:224949:9 */ +} /* sqlite3.c:225025:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:224949:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:225025:32 */ type Fts5SegWriter1 = struct { FiSegid int32 F__ccgo_pad1 [4]byte @@ -227725,9 +227785,9 @@ type Fts5SegWriter1 = struct { Fbtterm Fts5Buffer FiBtPage int32 F__ccgo_pad3 [4]byte -} /* sqlite3.c:224950:9 */ +} /* sqlite3.c:225026:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:224950:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:225026:30 */ type Fts5Structure1 = struct { FnRef int32 F__ccgo_pad1 [4]byte @@ -227735,38 +227795,38 @@ type Fts5Structure1 = struct { FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:224951:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:225027:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:224952:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:225028:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:224953:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:225029:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:224946:9 */ +} /* sqlite3.c:225022:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:225063:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:225139:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225242:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:225318:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225323:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -227774,7 +227834,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:225247:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225257:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:225333:13: */ return sqlite3Fts5MallocZero(tls, p+52, nByte) } @@ -227792,7 +227852,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225289:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:225365:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -227816,7 +227876,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225298:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225374:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -227827,7 +227887,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:225 } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225383:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -227839,7 +227899,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:225307 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225321:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225397:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -227866,7 +227926,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+36018, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+36026, iRowid, 0, p+56) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -227912,11 +227972,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225395:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:225471:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225399:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:225475:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -227928,7 +227988,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225411:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:225487:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -227943,7 +228003,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225433:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:225509:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -227954,7 +228014,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, - ts+36024, + ts+36032, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -227971,7 +228031,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225457:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:225533:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -227982,7 +228042,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+36075, + ts+36083, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -227996,7 +228056,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225478:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:225554:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -228006,7 +228066,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+88, Xsqlite3_mprintf(tls, - ts+36124, + ts+36132, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -228018,7 +228078,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225576:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -228029,22 +228089,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225500: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225511:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:225587:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225515:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225591:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225519:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:225595:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225524:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:225600:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -228055,7 +228115,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225537:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:225613:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint64(unsafe.Sizeof(Fts5Structure{})) + uint64((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint64(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -228097,7 +228157,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225579:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:225655:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -228190,7 +228250,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225671:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:225747:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -228210,7 +228270,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225696:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:225772:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 24 + uintptr(iLvl)*16 var aNew uintptr @@ -228233,7 +228293,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225725:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225801:22: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -228261,7 +228321,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -228270,7 +228330,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+112, - Xsqlite3_mprintf(tls, ts+36164, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+36172, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -228294,7 +228354,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:225749:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225856:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -228311,7 +228371,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225780:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225895:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -228325,7 +228385,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:225819:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225862:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:225938:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -228378,14 +228438,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225917:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:225993:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:225926:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:226002:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 24 + uintptr(iPromote)*16 @@ -228428,7 +228488,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:225969:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:226045:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -228477,7 +228537,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -228513,7 +228573,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226020:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226052:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226128:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -228534,7 +228594,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226072:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226148:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -228547,7 +228607,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226087:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226163:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*32) @@ -228555,11 +228615,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22608 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226096:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226172:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226100:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226176:13: */ var i int32 // Advance each level to the last entry on the last page @@ -228580,7 +228640,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226199:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -228642,7 +228702,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:226123:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226172:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:226248:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*32 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -228665,12 +228725,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226195:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226271:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226278:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -228680,7 +228740,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:226202:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226212:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:226288:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -228722,16 +228782,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226259:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226335:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226262:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:226338:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226269:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226345:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -228761,7 +228821,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226307:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:226383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -228790,7 +228850,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226328:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226404:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -228835,7 +228895,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226357:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226433:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -228867,7 +228927,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226390:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:226466:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -228901,7 +228961,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226423:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226499:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -228923,7 +228983,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226441:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:226517:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -228964,7 +229024,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226490:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226566:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -229023,7 +229083,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226543:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226619:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -229073,7 +229133,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226599:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226675:12: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -229081,7 +229141,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226609:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:226685:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -229110,7 +229170,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226643:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226719:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -229215,7 +229275,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226715:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:226791:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -229340,7 +229400,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226846:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226922:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -229440,7 +229500,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:226935:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227011:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -229468,7 +229528,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:226969:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:227045:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -229702,7 +229762,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227171:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -229710,7 +229770,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, - ts+36187, + ts+36195, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -229721,7 +229781,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:227095:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227114:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:227190:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -229791,7 +229851,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227197:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:227273:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -229847,7 +229907,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227332:13: */ sqlite3Fts5BufferFree(tls, pIter+88) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -229862,7 +229922,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227256:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227360:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:227436:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -229914,7 +229974,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227414:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:227490:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -229944,7 +230004,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227452:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:227528:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -229994,7 +230054,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227582:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -230005,7 +230065,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227506:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227517:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:227593:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -230028,7 +230088,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227545:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:227621:12: */ var pNew uintptr = pIter + 96 + uintptr(iChanged)*120 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -230068,7 +230128,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227664:13: */ var pSeg uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -230079,7 +230139,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227588:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227601:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:227677:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -230118,7 +230178,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227639:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:227715:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -230143,12 +230203,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227667:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:227743:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227671:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:227747:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -230167,7 +230227,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227693:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227769:13: */ _ = pUnused if nChunk > 0 { @@ -230184,21 +230244,21 @@ type PoslistCallbackCtx1 = struct { FpColset uintptr FeState int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:227705:9 */ +} /* sqlite3.c:227781:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227705:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:227781:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:227712:9 */ +} /* sqlite3.c:227788:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227712:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:227788:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227723:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:227799:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -230208,7 +230268,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227731:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227807:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -230234,7 +230294,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227754:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227830:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -230314,7 +230374,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227806:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:227882:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -230370,7 +230430,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227856:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:227932:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -230421,7 +230481,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227901:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:227977:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -230482,7 +230542,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227961:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228037:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -230490,7 +230550,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227971:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228047:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -230510,7 +230570,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:227996:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228072:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -230518,7 +230578,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228006:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228082:13: */ sqlite3Fts5BufferZero(tls, pIter+32) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+32) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -230534,7 +230594,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228024:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228100:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -230596,7 +230656,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228064:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:228140:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -230618,7 +230678,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228089:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:228165:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -230663,7 +230723,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228133:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:228209:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -230866,7 +230926,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228239:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:228315:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -230899,7 +230959,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228279:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:228355:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -230907,13 +230967,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228292:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:228368:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228300:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:228376:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -230932,7 +230992,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228319:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228395:17: */ var p uintptr = pIter + 96 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -230945,7 +231005,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228334:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:228410:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -230987,7 +231047,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228467:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -231000,7 +231060,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:228391:13: */ // // Buffer (pNew/) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228406:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:228482:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -231010,7 +231070,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228414:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:228490:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -231031,7 +231091,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228440:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:228516:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(unsafe.Sizeof(Fts5DlidxWriter{}))*uint64(nLvl)) @@ -231050,7 +231110,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228466:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:228542:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -231072,7 +231132,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228490:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228566:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -231105,7 +231165,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228519:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228595:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+52, pWriter+96, nTerm, pTerm) @@ -231115,7 +231175,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228535:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228611:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -231128,7 +231188,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228551:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:228627:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -231144,7 +231204,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228565:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228641:13: */ var i int32 var bDone int32 = 0 @@ -231204,7 +231264,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228625:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:228701:13: */ var pPage uintptr = pWriter + 8 var iRowid I64 @@ -231240,14 +231300,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228626:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:228702:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228671:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:228747:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 8 var pPgidx uintptr = pWriter + 8 + 24 @@ -231323,7 +231383,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228752:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:228828:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 8 @@ -231352,7 +231412,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228785:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:228861:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -231381,7 +231441,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228819:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:228895:13: */ var i int32 var pLeaf uintptr = pWriter + 8 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -231405,7 +231465,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228847:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:228923:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -231426,7 +231486,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, - ts+36271, + ts+36279, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -231445,7 +231505,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228894:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:228970:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -231514,13 +231574,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:228960:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:229036:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:228972:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:229048:13: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -231679,7 +231739,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229122:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:229198:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -231729,7 +231789,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229181:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:229257:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -231746,7 +231806,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229202:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:229278:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -231763,7 +231823,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229296:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -231772,14 +231832,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229220:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:229226:9 */ +} /* sqlite3.c:229302:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229226:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:229302:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229237:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:229313:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -231804,7 +231864,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229334:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -231982,7 +232042,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:229258:13: */ } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229488:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -231991,7 +232051,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:229412:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229421:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:229497:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -232052,7 +232112,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229483:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229559:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -232086,7 +232146,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229517:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:229593:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -232111,12 +232171,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229539:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:229615:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+52, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229549:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:229625:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -232143,7 +232203,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229643:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -232175,7 +232235,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:229567:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229596:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:229672:13: */ libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -232185,13 +232245,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229635:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:229711:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229641:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:229717:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -232208,7 +232268,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229656:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229732:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -232264,11 +232324,11 @@ type PrefixMerger1 = struct { F__ccgo_pad1 [4]byte FaPos uintptr FpNext uintptr -} /* sqlite3.c:229699:9 */ +} /* sqlite3.c:229775:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:229699:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:229775:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229708:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229784:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -232279,7 +232339,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229722:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:229798:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -232292,7 +232352,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229741:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:229817:13: */ bp := tls.Alloc(1072) defer tls.Free(1072) @@ -232457,7 +232517,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229885:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:229961:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -232604,7 +232664,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230022:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:230098:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -232624,7 +232684,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230122:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -232635,7 +232695,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230046: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230059:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230135:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -232646,7 +232706,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230072:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230148:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -232665,7 +232725,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23007 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230089:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230165:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -232676,13 +232736,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+36328, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+36336, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+26246, ts+36336, 0, pzErr) + pConfig, ts+26254, ts+36344, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+12717, - ts+36371, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+12725, + ts+36379, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -232699,7 +232759,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230206:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -232720,7 +232780,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230130 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230153:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:230229:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -232747,7 +232807,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230180:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:230256:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -232769,7 +232829,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230202:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:230278:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -232793,7 +232853,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230238:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:230314:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -232876,7 +232936,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230326:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230402:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -232884,7 +232944,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230336:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:230412:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -232904,14 +232964,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230360:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:230436:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230369:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:230445:19: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -232929,7 +232989,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230380:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:230456:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -232942,7 +233002,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2303 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230395:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:230471:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -232964,7 +233024,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230419:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:230495:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -232972,7 +233032,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230505:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -232981,7 +233041,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230429 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230440:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:230516:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -232994,7 +233054,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+36018, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+36026, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */))) @@ -233003,7 +233063,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230460:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230536:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -233017,7 +233077,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230477:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:230553:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -233037,7 +233097,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230695:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:230771:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -233056,7 +233116,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230716:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:230792:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -233115,7 +233175,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit sqlite3Fts5BufferFree(tls, bp+32) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230766:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:230842:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -233131,7 +233191,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+36415, + ts+36423, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -233284,7 +233344,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230911:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:230987:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -233343,7 +233403,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+96+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*120, uintptr(0), bp+16) - sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+36501) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+36509) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16)).Fn, bp+32, bp+40) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 40)) & int64(0x7FFFFFFF)) @@ -233374,13 +233434,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231474:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:231550:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231500:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231576:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -233413,7 +233473,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ // 2014 Jun 09 // @@ -233435,7 +233495,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231537:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:231613:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -233443,9 +233503,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231538:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:231614:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -233474,35 +233534,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231539:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:231615:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:231540:9 */ +} /* sqlite3.c:231616:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231540:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:231616:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231541:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:231617:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:216737:9 */ +} /* sqlite3.c:216813:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231618:36 */ // NOTES ON TRANSACTIONS: // @@ -233536,21 +233596,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:231542:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:231575:1 */ +} /* sqlite3.c:231651:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:231632:1 */ +} /* sqlite3.c:231708:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231816:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:231892:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231899:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -233560,13 +233620,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:231823:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231835:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231911:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231919:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -233584,7 +233644,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231843 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231863:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231939:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -233642,11 +233702,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:231929:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232005: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:231939:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:232015:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -233655,14 +233715,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:231965:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:232041:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 80)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:231976:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:232052:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -233733,7 +233793,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232054:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:232130:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -233754,7 +233814,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+36506, 0) + ts+36514, 0) return SQLITE_ERROR } @@ -233895,7 +233955,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232265:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -233906,7 +233966,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232189 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232200:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:232276:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -233932,7 +233992,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232302:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -233945,11 +234005,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232226:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232238:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232314:13: */ *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232323:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -233992,7 +234052,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:232247 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232367:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -234009,7 +234069,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232291 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232383:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -234019,7 +234079,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: rc = Xsqlite3_step(tls, (*Fts5Sorter)(unsafe.Pointer(pSorter)).FpStmt) if rc == SQLITE_DONE { rc = SQLITE_OK - *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF + *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_EOF | FTS5CSR_REQUIRE_CONTENT } else if rc == SQLITE_ROW { var a uintptr var aBlob uintptr @@ -234053,7 +234113,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232307:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232426:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -234073,7 +234133,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:232350:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232373:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:232449:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -234102,7 +234162,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232481:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -234161,7 +234221,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232405: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232458:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:232534:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -234189,7 +234249,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232487:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232563:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -234218,11 +234278,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+36545, + ts+36553, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 15900 /* ", " */ + return ts + 15908 /* ", " */ } return ts + 1524 /* "" */ }(), @@ -234234,9 +234294,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 36600 /* "DESC" */ + return ts + 36608 /* "DESC" */ } - return ts + 36605 /* "ASC" */ + return ts + 36613 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -234256,7 +234316,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232539:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:232615:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -234271,7 +234331,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232556:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:232632:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -234287,13 +234347,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+36609, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+36617, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+6360, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36615, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36623, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -234303,7 +234363,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232591:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:232667:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -234316,7 +234376,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232603:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:232679:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -234328,7 +234388,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+36643, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+36651, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -234360,7 +234420,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36653, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+36661, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -234369,7 +234429,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2326 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232654:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:232730:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -234392,21 +234452,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 80)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+36674, libc.VaList(bp, z)) + ts+36682, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 35057 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 35065 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232691:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:232767:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -234425,7 +234485,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232712:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:232788:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -234465,7 +234525,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+36506, 0) + ts+36514, 0) return SQLITE_ERROR __1: ; @@ -234700,7 +234760,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+36707, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+36715, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -234746,7 +234806,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232981:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -234757,7 +234817,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:232905:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232989:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -234771,7 +234831,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:232913:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:232931:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233007:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -234801,7 +234861,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:232962:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:233038:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -234845,7 +234905,7 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233001:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:233077:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -234867,7 +234927,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233024:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:233100:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -234875,29 +234935,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+36743, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+36751, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+36754, 0) + ts+36762, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+36834, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36842, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+36842, 0) + ts+36850, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+18212, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+18220, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+36898, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36906, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+36904, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+36912, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -234916,7 +234976,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233080:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:233156:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if eType1 == SQLITE_INTEGER { @@ -234926,7 +234986,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233093:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:233169:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -234949,7 +235009,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns ( and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233123:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:233199:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -234971,7 +235031,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+18747, z) { + 0 == Xsqlite3_stricmp(tls, ts+18755, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*8))) @@ -234996,12 +235056,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+36920, + ts+36928, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 21646 /* "UPDATE" */ + return ts + 21654 /* "UPDATE" */ } - return ts + 36957 /* "DELETE from" */ + return ts + 36965 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -235051,7 +235111,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233325:12: */ var rc int32 var pTab uintptr = pVtab @@ -235063,7 +235123,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233249:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233339:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -235072,7 +235132,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233263:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233350:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -235080,7 +235140,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233284:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233360:12: */ var rc int32 var pTab uintptr = pVtab @@ -235088,46 +235148,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23328 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233294:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:233370:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233299:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233375:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233304:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233380:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233314:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:233390:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233320:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:233396:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233333:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:233409:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233338:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:233414:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233343:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:233419:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -235144,7 +235204,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233366:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:233442:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -235201,7 +235261,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233494:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -235285,7 +235345,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233418 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233492:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:233568:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -235295,7 +235355,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233502:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233578:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -235311,11 +235371,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233531:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:233607:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233535:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233611:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -235327,7 +235387,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233552:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -235385,7 +235445,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233605:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:233681:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -235423,7 +235483,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233640:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:233716:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -235445,7 +235505,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233660:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:233736:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -235467,7 +235527,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233682:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:233758:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -235490,7 +235550,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233701:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:233777:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -235523,7 +235583,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233731:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:233807:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -235604,10 +235664,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:233781:31 */ +} /* sqlite3.c:233857:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233807:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:233883:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -235643,7 +235703,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233844:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233920:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -235652,7 +235712,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233857:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233933:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -235662,7 +235722,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233865:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:233941:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -235675,7 +235735,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+36969, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+36977, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -235685,7 +235745,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233894:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:233970:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -235707,7 +235767,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233921:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:233997:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -235771,7 +235831,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233978:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:234054:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -235811,7 +235871,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234031:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:234107:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -235830,12 +235890,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234056:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:234132:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234064:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:234140:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -235843,7 +235903,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234074:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234150:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -235852,7 +235912,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234085:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234161:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -235861,7 +235921,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234096:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:234172:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -235870,7 +235930,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234107:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:234183:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -235901,7 +235961,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234146:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:234222:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -235930,7 +235990,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234181:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:234257:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -235948,7 +236008,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234202:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:234278:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -235964,7 +236024,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234223:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:234299:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -235980,7 +236040,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36990, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36998, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -235999,7 +236059,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 16 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37012, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37020, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -236015,7 +236075,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234336:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -236041,28 +236101,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:234260:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234280:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:234356:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+37043) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+37051) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234296:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:234372:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+37056, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+37064, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234386:12: */ var i uint32 for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(azName2))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -236073,10 +236133,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:234310:12 } var azName2 = [5]uintptr{ - ts + 37147, ts + 35246, ts + 26246, ts + 35597, ts + 12717, -} /* sqlite3.c:234311:21 */ + ts + 37155, ts + 35254, ts + 26254, ts + 35605, ts + 12725, +} /* sqlite3.c:234387:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234397:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -236097,7 +236157,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+37154, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+37162, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -236115,13 +236175,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234321:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+37154, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+37162, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+37159, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+37167, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -236159,7 +236219,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:234322:31 */ +} /* sqlite3.c:234398:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -236168,7 +236228,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234506:20: */ return fts5Init(tls, db) } @@ -236176,7 +236236,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:234430:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234488:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:234564:12: */ bp := tls.Alloc(216) defer tls.Free(216) @@ -236187,20 +236247,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 37174, - ts + 37242, - ts + 37311, + ts + 37182, + ts + 37250, + ts + 37319, - ts + 37344, - ts + 37383, - ts + 37423, - ts + 37462, - ts + 37503, + ts + 37352, + ts + 37391, + ts + 37431, + ts + 37470, + ts + 37511, - ts + 37542, + ts + 37550, - ts + 37584, - ts + 37624, + ts + 37592, + ts + 37632, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -236277,7 +236337,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234591:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:234667:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -236299,79 +236359,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234619:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:234695:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37647, + ts+37655, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37751, + ts+37759, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37789, + ts+37797, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234643:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:234719:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+37827, + ts+37835, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234657:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:234733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp, ts+26246, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+12717, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+37147, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+26254, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+12725, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+37155, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+35597, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35605, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+35246, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35254, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234677:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:234753:12: */ bp := tls.Alloc(72) defer tls.Free(72) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37869, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+37877, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 30899 /* " WITHOUT ROWID" */ + return ts + 30907 /* " WITHOUT ROWID" */ } return ts + 1524 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+37899, + ts+37907, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -236384,7 +236444,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234712:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:234788:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -236413,27 +236473,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37943, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+37951, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37966, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+37974, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+35246, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+35254, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35597, ts+37972, 0, pzErr) + pConfig, ts+35605, ts+37980, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+37147, ts+38004, 1, pzErr) + pConfig, ts+37155, ts+38012, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35743, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35751, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -236445,7 +236505,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234778:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234854:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -236464,12 +236524,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:234793:9 */ +} /* sqlite3.c:234869:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234793:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:234869:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234803:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:234879:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -236486,7 +236546,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234826:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234902:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -236555,7 +236615,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234895:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:234971:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -236582,7 +236642,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:234925:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:235001:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+24, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -236596,7 +236656,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235017:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -236620,7 +236680,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:234941 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:234963:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:235039:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -236661,7 +236721,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235004:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -236673,12 +236733,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+38021, + ts+38029, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+38071, + ts+38079, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -236688,12 +236748,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35743, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+35751, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235035:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235111:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -236757,15 +236817,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235090:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235166:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235094:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:235170:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235098:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235174:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -236776,7 +236836,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2350 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235111:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:235187:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -236798,7 +236858,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235132:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:235208:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -236830,7 +236890,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235167:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:235243:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -236875,7 +236935,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235210:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:235286:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -236883,7 +236943,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+38100, + zSql = Xsqlite3_mprintf(tls, ts+38108, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -236910,13 +236970,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:235238:9 */ +} /* sqlite3.c:235314:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235238:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:235314:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235252:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:235328:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -236982,7 +237042,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235322:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:235398:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -237080,14 +237140,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+35246, bp+48) + rc = fts5StorageCount(tls, p, ts+35254, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+35597, bp+56) + rc = fts5StorageCount(tls, p, ts+35605, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -237107,7 +237167,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235430:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:235506:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -237121,7 +237181,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235454:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:235530:13: */ if *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(eStmt)*8)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -237131,7 +237191,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235471:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:235547:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -237149,7 +237209,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235492:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:235568:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -237180,7 +237240,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235521:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:235597:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -237198,7 +237258,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235539:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:235615:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -237215,7 +237275,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235556:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235632:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -237229,12 +237289,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23555 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235570:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:235646:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235575:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:235651:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -237289,13 +237349,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:235628:22 */ +} /* sqlite3.c:235704:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235639:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:235715:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235639:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:235715:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235644:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:235720:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -237305,12 +237365,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235660:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235736:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235667:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235743:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -237326,9 +237386,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38132) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38140) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38143) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38151) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -237345,7 +237405,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235708:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:235784:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -237357,7 +237417,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235720:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235796:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -237438,7 +237498,7 @@ type Unicode61Tokenizer1 = struct { F__ccgo_pad1 [4]byte FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:235835:9 */ +} /* sqlite3.c:235911:9 */ // ************************************************************************* // @@ -237448,11 +237508,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235835:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:235911:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235852:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:235928:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -237507,7 +237567,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235902:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:235978:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -237529,7 +237589,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236002:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -237539,7 +237599,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:235926:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:235936:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:236012:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -237559,7 +237619,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235954:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236030:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -237570,7 +237630,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 38154 /* "L* N* Co" */ + var zCat uintptr = ts + 38162 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -237583,7 +237643,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38163) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38171) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -237594,18 +237654,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38174) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38182) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38132) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38140) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38143) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38151) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38163) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38171) { // no-op } else { rc = SQLITE_ERROR @@ -237627,12 +237687,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236034:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:236110:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 160 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236041:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236117:12: */ var p uintptr var rc int32 var a uintptr @@ -237888,7 +237948,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:236153:9 */ +} /* sqlite3.c:236229:9 */ // ************************************************************************* // @@ -237897,10 +237957,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236153:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:236229:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236239:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -237911,7 +237971,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:236163:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236176:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236252:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -237919,7 +237979,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 38192 /* "unicode61" */ + var zBase uintptr = ts + 38200 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -237964,9 +238024,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:236212:9 */ +} /* sqlite3.c:236288:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:236212:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:236288:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -237976,15 +238036,15 @@ type PorterRule1 = struct { FzOutput uintptr FnOutput int32 F__ccgo_pad2 [4]byte -} /* sqlite3.c:236219:9 */ +} /* sqlite3.c:236295:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:236219:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:236295:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236254:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:236330:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236260:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:236336:12: */ var i int32 var bCons int32 = bPrevCons @@ -238005,12 +238065,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236277:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236353:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236282:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236358:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -238020,7 +238080,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236292:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236368:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -238030,7 +238090,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236302:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236378:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -238048,14 +238108,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236319:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236395:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236326:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:236402:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -238070,13 +238130,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236342:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236418:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38202, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38210, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -238084,11 +238144,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38205, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38213, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38210, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38218, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -238096,7 +238156,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38215, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38223, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -238104,7 +238164,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38218, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38226, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -238112,11 +238172,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38221, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38229, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38226, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38234, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -238124,19 +238184,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38231, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38239, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38235, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38243, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38241, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38249, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38246, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38254, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -238144,11 +238204,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38250, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38258, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38254, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38262, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -238156,7 +238216,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38257, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38265, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -238164,11 +238224,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38261, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38269, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38265, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38273, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -238176,22 +238236,6 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38269, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38273, aBuf+uintptr(nBuf-3), uint64(3)) { - if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 - } - } - break - - case 'z': if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38277, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 @@ -238199,34 +238243,50 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli } break + case 'v': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38281, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + + case 'z': + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38285, aBuf+uintptr(nBuf-3), uint64(3)) { + if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + } + } + break + } return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236476:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236552:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38281, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38261, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38289, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38269, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38284, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38287, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38292, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38295, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38291, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38277, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38299, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+38285, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -238236,143 +238296,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236510:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236586:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38294, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38302, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38261, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38269, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38302, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38310, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38309, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38317, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38314, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38322, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38210, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38218, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38319, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38327, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38205, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38213, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38324, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38332, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38277, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38285, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38329, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38337, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+16736, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+16744, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38334, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38342, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38287, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38295, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38338, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38346, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38202, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38210, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38343, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38351, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38246, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38254, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38349, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38357, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38353, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38361, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38355, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38363, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38269, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38277, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38361, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38369, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38277, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38285, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38369, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38377, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38261, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38269, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38375, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38383, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38261, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38269, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38380, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38388, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38202, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38210, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38386, aBuf+uintptr(nBuf-7), uint64(7)) { - if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38273, uint64(3)) - *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 - } } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38394, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38402, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38281, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38406, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38402, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38269, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38410, uint64(3)) + *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 + } + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+38414, aBuf+uintptr(nBuf-7), uint64(7)) { + if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+38277, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38414, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38422, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38202, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38210, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38420, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38428, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38273, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38281, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38426, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+38434, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38287, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+38295, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -238382,22 +238442,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236657:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236733:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38433, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38441, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38218, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+38226, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38438, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+38446, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -238405,21 +238465,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38443, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38451, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38218, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38226, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38449, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38457, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38218, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38226, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38402, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38410, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -238427,7 +238487,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38455, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38463, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -238435,9 +238495,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38461, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+38469, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38202, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+38210, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -238447,18 +238507,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236723:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:236799:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38467, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38475, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38471, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+38479, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38474, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+38482, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -238467,7 +238527,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38477, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+38485, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -238484,7 +238544,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236760:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:236836:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -238500,7 +238560,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236778:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:236854:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -238598,7 +238658,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236847:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236923:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -238619,20 +238679,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236867:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:236943:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236867:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:236943:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236875:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:236951:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236882:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:236958:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -238643,7 +238703,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38481) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+38489) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -238663,7 +238723,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236920:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:236996:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -238816,7 +238876,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:236980:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:237056:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -238830,27 +238890,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:236994:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:237070:12: */ bp := tls.Alloc(128) defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 38192, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38200, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 38496, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38504, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 38502, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38510, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 38509, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 38517, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -238876,7 +238936,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:236995:3 */ +} /* sqlite3.c:237071:3 */ // 2012-05-25 // @@ -238899,7 +238959,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237050:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:237126:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -238970,7 +239030,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237117:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:237193:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -238989,7 +239049,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237136:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:237212:12: */ var ret int32 = c @@ -239050,7 +239110,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:237154:16 */ +} /* sqlite3.c:237230:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -239108,7 +239168,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:237158:5 */ +} /* sqlite3.c:237234:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -239120,9 +239180,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:237215:31 */ +} /* sqlite3.c:237291:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237272:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:237348:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -239319,7 +239379,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:237390:12 */ +} /* sqlite3.c:237466:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -239498,7 +239558,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:237394:12 */ +} /* sqlite3.c:237470:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -239677,9 +239737,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:237573:12 */ +} /* sqlite3.c:237649:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237753:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:237829:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -239719,7 +239779,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237784:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:237860:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -239751,7 +239811,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237822:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:237898:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -239826,7 +239886,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237900:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:237976:11: */ var a U32 var b U32 var s U32 @@ -240002,7 +240062,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238094:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238170:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -240048,7 +240108,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238119:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:238195:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -240061,7 +240121,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238133:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:238209:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -240121,7 +240181,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:238186:9 */ +} /* sqlite3.c:238262:9 */ // 2015 May 08 // @@ -240161,7 +240221,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238186:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:238262:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -240182,9 +240242,9 @@ type Fts5VocabCursor1 = struct { FiInstPos I64 FiInstOff int32 F__ccgo_pad4 [4]byte -} /* sqlite3.c:238187:9 */ +} /* sqlite3.c:238263:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238263:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -240192,7 +240252,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:238187:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238247:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:238323:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -240200,14 +240260,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+38517) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+38525) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+38521) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+38529) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+38525) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+38533) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38534, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38542, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -240217,14 +240277,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238276:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238352:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238285:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:238361:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -240249,24 +240309,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238312:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238388:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{ - ts + 38568, - ts + 38608, - ts + 38643, + ts + 38576, + ts + 38616, + ts + 38651, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+24535, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, ts+24543, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38686, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+38694, 0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -240319,11 +240379,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238374:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238450: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:238384:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:238460:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -240337,7 +240397,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238407:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:238483:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -240405,7 +240465,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238469:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:238545:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -240418,11 +240478,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+38719, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+38727, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+38750, + ts+38758, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72, uintptr(0)) @@ -240446,7 +240506,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+38801, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+38809, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -240472,7 +240532,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238613:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -240486,7 +240546,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:238537:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238553:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238629:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+96) @@ -240495,7 +240555,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238562:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238638:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -240526,7 +240586,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238584:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238660:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -240555,7 +240615,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:238 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238616:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238692:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -240699,7 +240759,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238744:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:238820:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -240773,12 +240833,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238818:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:238894:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238823:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:238899:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -240851,16 +240911,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238895:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:238971:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238904:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:238980:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+38827, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+38835, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -240877,7 +240937,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:238905:31 */ +} /* sqlite3.c:238981:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -240904,1056 +240964,1056 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239245:23: */ - return ts + 38837 /* "2022-02-22 18:58..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:239321:23: */ + return ts + 38845 /* "2022-03-12 13:37..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21681:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21682:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21680:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201910:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201910:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111037:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111038:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111039:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111040:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111041:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123237:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123238:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123239:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123240:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123244:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123247:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123248:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123254:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123255:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123257:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123258:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123259:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123261:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123264:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123265:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123266:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123267:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123268:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123269:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123270:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123272:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123274:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123276:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123278:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123279:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123280:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123281:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123282:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123283:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123284:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123285:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123286:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123288:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123289:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123291:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123292:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123293:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123294:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123296:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123300:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123301:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123302:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123303:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123304:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123305:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123306:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123307:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123308:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123309:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123310:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123311:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123312:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123313:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123314:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123317:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123319:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123321:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123321:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123324:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123324:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123329:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123329:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123330:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123330:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123338:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123338:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123339:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123339:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123340:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123340:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123342:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123344:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123345:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123346:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123347:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123348:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123349:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123349:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123350:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123350:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123351:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123351:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123352:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123352:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123353:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123353:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123354:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123354:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123355:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123355:5: - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123356:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123356:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123357:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123357:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123358:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123358:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123359:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123359:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123360:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123360:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123361:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123361:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123362:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123362:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123364:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123364:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123365:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123365:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123366:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123366:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123368:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123369:5: - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123373:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123374:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123375:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24393:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24393:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24394:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24394:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24395:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24396:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24397:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201892:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201893:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201894:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201895:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201896:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201897:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201898:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201899:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201900:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201901:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201902:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201903:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195661:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195662:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195663:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195664:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195665:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195666:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195667:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195668:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195669:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195670:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195671:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195672:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195673:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195674:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195675:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195676:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195677:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195682:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195685:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195685:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195703:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195704:31: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) WINBOOL }{libc.XAreFileApisANSI})) // sqlite3.c:43415:32: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21690:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21691:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21689:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 0)) = geopolyBBoxStep // sqlite3.c:201985:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = geopolyBBoxFinal // sqlite3.c:201985:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24)) = renameColumnFunc // sqlite3.c:111067:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableFunc // sqlite3.c:111068:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168)) = renameTableTest // sqlite3.c:111069:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240)) = dropColumnFunc // sqlite3.c:111070:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312)) = renameQuotefixFunc // sqlite3.c:111071:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24)) = versionFunc // sqlite3.c:123272:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:123273:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168)) = versionFunc // sqlite3.c:123274:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240)) = versionFunc // sqlite3.c:123275:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312)) = soundexFunc // sqlite3.c:123279:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384)) = loadExt // sqlite3.c:123282:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = loadExt // sqlite3.c:123283:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528)) = compileoptionusedFunc // sqlite3.c:123289:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600)) = compileoptiongetFunc // sqlite3.c:123290:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672)) = versionFunc // sqlite3.c:123292:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744)) = versionFunc // sqlite3.c:123293:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816)) = versionFunc // sqlite3.c:123294:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888)) = versionFunc // sqlite3.c:123297:12: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960)) = trimFunc // sqlite3.c:123299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032)) = trimFunc // sqlite3.c:123300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104)) = trimFunc // sqlite3.c:123301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = trimFunc // sqlite3.c:123302:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248)) = trimFunc // sqlite3.c:123303:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320)) = trimFunc // sqlite3.c:123304:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1392)) = minmaxFunc // sqlite3.c:123305:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = minmaxStep // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1544)) = minMaxFinalize // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1552)) = minMaxValue // sqlite3.c:123307:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1608)) = minmaxFunc // sqlite3.c:123309:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752)) = minmaxStep // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1760)) = minMaxFinalize // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1768)) = minMaxValue // sqlite3.c:123311:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824)) = typeofFunc // sqlite3.c:123313:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = subtypeFunc // sqlite3.c:123314:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968)) = lengthFunc // sqlite3.c:123315:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040)) = instrFunc // sqlite3.c:123316:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112)) = printfFunc // sqlite3.c:123317:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = printfFunc // sqlite3.c:123318:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = unicodeFunc // sqlite3.c:123319:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328)) = charFunc // sqlite3.c:123320:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400)) = absFunc // sqlite3.c:123321:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472)) = roundFunc // sqlite3.c:123323:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = roundFunc // sqlite3.c:123324:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc // sqlite3.c:123326:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc // sqlite3.c:123327:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc // sqlite3.c:123328:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc // sqlite3.c:123329:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc // sqlite3.c:123330:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob // sqlite3.c:123331:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc // sqlite3.c:123332:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc // sqlite3.c:123333:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc // sqlite3.c:123334:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc // sqlite3.c:123335:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc // sqlite3.c:123336:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid // sqlite3.c:123337:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes // sqlite3.c:123338:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes // sqlite3.c:123339:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc // sqlite3.c:123340:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc // sqlite3.c:123341:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc // sqlite3.c:123342:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc // sqlite3.c:123343:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc // sqlite3.c:123344:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc // sqlite3.c:123345:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse // sqlite3.c:123346:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse // sqlite3.c:123347:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse // sqlite3.c:123348:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse // sqlite3.c:123349:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse // sqlite3.c:123352:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse // sqlite3.c:123354:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue // sqlite3.c:123356:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse // sqlite3.c:123356:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:123359:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc // sqlite3.c:123359:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123364:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc // sqlite3.c:123364:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:123365:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc // sqlite3.c:123365:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil // sqlite3.c:123373:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc // sqlite3.c:123373:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil // sqlite3.c:123374:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc // sqlite3.c:123374:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor // sqlite3.c:123375:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc // sqlite3.c:123375:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc // sqlite3.c:123377:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc // sqlite3.c:123379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc // sqlite3.c:123380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc // sqlite3.c:123381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc // sqlite3.c:123382:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc // sqlite3.c:123383:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp // sqlite3.c:123384:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func // sqlite3.c:123384:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow // sqlite3.c:123385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func // sqlite3.c:123385:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow // sqlite3.c:123386:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func // sqlite3.c:123386:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod // sqlite3.c:123387:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func // sqlite3.c:123387:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos // sqlite3.c:123388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func // sqlite3.c:123388:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin // sqlite3.c:123389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func // sqlite3.c:123389:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan // sqlite3.c:123390:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func // sqlite3.c:123390:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 // sqlite3.c:123391:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func // sqlite3.c:123391:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos // sqlite3.c:123392:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func // sqlite3.c:123392:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin // sqlite3.c:123393:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func // sqlite3.c:123393:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan // sqlite3.c:123394:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func // sqlite3.c:123394:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh // sqlite3.c:123395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func // sqlite3.c:123395:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh // sqlite3.c:123396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func // sqlite3.c:123396:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh // sqlite3.c:123397:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func // sqlite3.c:123397:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh // sqlite3.c:123399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func // sqlite3.c:123399:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh // sqlite3.c:123400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func // sqlite3.c:123400:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh // sqlite3.c:123401:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func // sqlite3.c:123401:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt // sqlite3.c:123403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func // sqlite3.c:123403:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad // sqlite3.c:123404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func // sqlite3.c:123404:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func // sqlite3.c:123405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc // sqlite3.c:123406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc // sqlite3.c:123408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc // sqlite3.c:123409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc // sqlite3.c:123410:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc // sqlite3.c:24402:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24403:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = unixepochFunc // sqlite3.c:24403:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24404:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168)) = dateFunc // sqlite3.c:24404:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240)) = timeFunc // sqlite3.c:24405:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312)) = datetimeFunc // sqlite3.c:24406:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 368 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384)) = strftimeFunc // sqlite3.c:24407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456)) = ctimeFunc // sqlite3.c:24408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528)) = ctimestampFunc // sqlite3.c:24409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 600)) = cdateFunc // sqlite3.c:24410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 0)) = geopolyAreaFunc // sqlite3.c:201967:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 24)) = geopolyBlobFunc // sqlite3.c:201968:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 48)) = geopolyJsonFunc // sqlite3.c:201969:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 72)) = geopolySvgFunc // sqlite3.c:201970:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 96)) = geopolyWithinFunc // sqlite3.c:201971:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 120)) = geopolyContainsPointFunc // sqlite3.c:201972:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 144)) = geopolyOverlapFunc // sqlite3.c:201973:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 168)) = geopolyDebugFunc // sqlite3.c:201974:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 192)) = geopolyBBoxFunc // sqlite3.c:201975:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 216)) = geopolyXformFunc // sqlite3.c:201976:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 240)) = geopolyRegularFunc // sqlite3.c:201977:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 264)) = geopolyCcwFunc // sqlite3.c:201978:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 24)) = jsonRemoveFunc // sqlite3.c:195736:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 96)) = jsonArrayFunc // sqlite3.c:195737:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 168)) = jsonArrayLengthFunc // sqlite3.c:195738:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 240)) = jsonArrayLengthFunc // sqlite3.c:195739:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 312)) = jsonExtractFunc // sqlite3.c:195740:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 384)) = jsonExtractFunc // sqlite3.c:195741:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 456)) = jsonExtractFunc // sqlite3.c:195742:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 528)) = jsonSetFunc // sqlite3.c:195743:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 600)) = jsonObjectFunc // sqlite3.c:195744:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 672)) = jsonPatchFunc // sqlite3.c:195745:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 744)) = jsonQuoteFunc // sqlite3.c:195746:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 816)) = jsonRemoveFunc // sqlite3.c:195747:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 888)) = jsonReplaceFunc // sqlite3.c:195748:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 960)) = jsonSetFunc // sqlite3.c:195749:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1032)) = jsonTypeFunc // sqlite3.c:195750:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1104)) = jsonTypeFunc // sqlite3.c:195751:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1176)) = jsonValidFunc // sqlite3.c:195752:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1248)) = jsonArrayStep // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1256)) = jsonArrayFinal // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1264)) = jsonArrayValue // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1272)) = jsonGroupInverse // sqlite3.c:195757:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1320)) = jsonObjectStep // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1328)) = jsonObjectFinal // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1336)) = jsonObjectValue // sqlite3.c:195760:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aJsonFunc)) + 1344)) = jsonGroupInverse // sqlite3.c:195760:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:195778:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:195779:31: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) WINBOOL }{libc.XAreFileApisANSI})) // sqlite3.c:43424:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE) WINBOOL - }{libc.XCloseHandle})) // sqlite3.c:43440:32: + }{libc.XCloseHandle})) // sqlite3.c:43449:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE) HANDLE - }{libc.XCreateFileA})) // sqlite3.c:43445:32: + }{libc.XCreateFileA})) // sqlite3.c:43454:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE) HANDLE - }{libc.XCreateFileW})) // sqlite3.c:43454:32: + }{libc.XCreateFileW})) // sqlite3.c:43463:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWORD, DWORD, LPCSTR) HANDLE - }{libc.XCreateFileMappingA})) // sqlite3.c:43465:32: + }{libc.XCreateFileMappingA})) // sqlite3.c:43474:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWORD, DWORD, LPCWSTR) HANDLE - }{libc.XCreateFileMappingW})) // sqlite3.c:43475:32: + }{libc.XCreateFileMappingW})) // sqlite3.c:43484:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPSECURITY_ATTRIBUTES, WINBOOL, LPCWSTR) HANDLE - }{libc.XCreateMutexW})) // sqlite3.c:43484:32: + }{libc.XCreateMutexW})) // sqlite3.c:43493:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 224 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCSTR) WINBOOL - }{libc.XDeleteFileA})) // sqlite3.c:43493:32: + }{libc.XDeleteFileA})) // sqlite3.c:43502:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 248 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCWSTR) WINBOOL - }{libc.XDeleteFileW})) // sqlite3.c:43501:32: + }{libc.XDeleteFileW})) // sqlite3.c:43510:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 320 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE) WINBOOL - }{libc.XFlushFileBuffers})) // sqlite3.c:43526:32: + }{libc.XFlushFileBuffers})) // sqlite3.c:43535:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, DWORD, LPCVOID, DWORD, DWORD, LPSTR, DWORD, uintptr) DWORD - }{libc.XFormatMessageA})) // sqlite3.c:43531:32: + }{libc.XFormatMessageA})) // sqlite3.c:43540:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 368 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, DWORD, LPCVOID, DWORD, DWORD, LPWSTR, DWORD, uintptr) DWORD - }{libc.XFormatMessageW})) // sqlite3.c:43540:32: + }{libc.XFormatMessageW})) // sqlite3.c:43549:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HMODULE) WINBOOL - }{libc.XFreeLibrary})) // sqlite3.c:43549:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) DWORD }{libc.XGetCurrentProcessId})) // sqlite3.c:43556:32: + }{libc.XFreeLibrary})) // sqlite3.c:43558:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) DWORD }{libc.XGetCurrentProcessId})) // sqlite3.c:43565:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD) WINBOOL - }{libc.XGetDiskFreeSpaceA})) // sqlite3.c:43561:32: + }{libc.XGetDiskFreeSpaceA})) // sqlite3.c:43570:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCWSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD) WINBOOL - }{libc.XGetDiskFreeSpaceW})) // sqlite3.c:43570:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPCSTR) DWORD }{libc.XGetFileAttributesA})) // sqlite3.c:43579:32: + }{libc.XGetDiskFreeSpaceW})) // sqlite3.c:43579:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPCSTR) DWORD }{libc.XGetFileAttributesA})) // sqlite3.c:43588:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCWSTR) DWORD - }{libc.XGetFileAttributesW})) // sqlite3.c:43587:32: + }{libc.XGetFileAttributesW})) // sqlite3.c:43596:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCWSTR, GET_FILEEX_INFO_LEVELS, LPVOID) WINBOOL - }{libc.XGetFileAttributesExW})) // sqlite3.c:43595:32: + }{libc.XGetFileAttributesExW})) // sqlite3.c:43604:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, LPDWORD) DWORD - }{libc.XGetFileSize})) // sqlite3.c:43604:32: + }{libc.XGetFileSize})) // sqlite3.c:43613:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 584 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCSTR, DWORD, LPSTR, uintptr) DWORD - }{libc.XGetFullPathNameA})) // sqlite3.c:43612:32: + }{libc.XGetFullPathNameA})) // sqlite3.c:43621:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCWSTR, DWORD, LPWSTR, uintptr) DWORD - }{libc.XGetFullPathNameW})) // sqlite3.c:43621:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) DWORD }{libc.XGetLastError})) // sqlite3.c:43629:32: + }{libc.XGetFullPathNameW})) // sqlite3.c:43630:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) DWORD }{libc.XGetLastError})) // sqlite3.c:43638:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HMODULE, LPCSTR) FARPROC - }{libc.XGetProcAddress})) // sqlite3.c:43640:32: + }{libc.XGetProcAddress})) // sqlite3.c:43649:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 680 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPSYSTEM_INFO) - }{libc.XGetSystemInfo})) // sqlite3.c:43650:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 704 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPSYSTEMTIME) }{libc.XGetSystemTime})) // sqlite3.c:43657:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 728 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPFILETIME) }{libc.XGetSystemTimeAsFileTime})) // sqlite3.c:43662:32: + }{libc.XGetSystemInfo})) // sqlite3.c:43659:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 704 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPSYSTEMTIME) }{libc.XGetSystemTime})) // sqlite3.c:43666:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 728 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPFILETIME) }{libc.XGetSystemTimeAsFileTime})) // sqlite3.c:43671:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 752 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, DWORD, LPSTR) DWORD - }{libc.XGetTempPathA})) // sqlite3.c:43671:32: + }{libc.XGetTempPathA})) // sqlite3.c:43680:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 776 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, DWORD, LPWSTR) DWORD - }{libc.XGetTempPathW})) // sqlite3.c:43679:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 800 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) DWORD }{libc.XGetTickCount})) // sqlite3.c:43687:32: + }{libc.XGetTempPathW})) // sqlite3.c:43688:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 800 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) DWORD }{libc.XGetTickCount})) // sqlite3.c:43696:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 824 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPOSVERSIONINFOA) WINBOOL - }{libc.XGetVersionExA})) // sqlite3.c:43695:32: + }{libc.XGetVersionExA})) // sqlite3.c:43704:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 848 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPOSVERSIONINFOW) WINBOOL - }{libc.XGetVersionExW})) // sqlite3.c:43705:32: + }{libc.XGetVersionExW})) // sqlite3.c:43714:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 872 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, SIZE_T) LPVOID - }{libc.XHeapAlloc})) // sqlite3.c:43713:32: + }{libc.XHeapAlloc})) // sqlite3.c:43722:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 896 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, DWORD, SIZE_T, SIZE_T) HANDLE - }{libc.XHeapCreate})) // sqlite3.c:43719:32: + }{libc.XHeapCreate})) // sqlite3.c:43728:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 920 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE) WINBOOL - }{libc.XHeapDestroy})) // sqlite3.c:43728:32: + }{libc.XHeapDestroy})) // sqlite3.c:43737:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 944 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, LPVOID) WINBOOL - }{libc.XHeapFree})) // sqlite3.c:43735:32: + }{libc.XHeapFree})) // sqlite3.c:43744:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 968 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, LPVOID, SIZE_T) LPVOID - }{libc.XHeapReAlloc})) // sqlite3.c:43739:32: + }{libc.XHeapReAlloc})) // sqlite3.c:43748:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 992 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, LPCVOID) SIZE_T - }{libc.XHeapSize})) // sqlite3.c:43744:32: + }{libc.XHeapSize})) // sqlite3.c:43753:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1016 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, LPCVOID) WINBOOL - }{libc.XHeapValidate})) // sqlite3.c:43750:32: + }{libc.XHeapValidate})) // sqlite3.c:43759:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1040 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD) SIZE_T - }{libc.XHeapCompact})) // sqlite3.c:43759:32: + }{libc.XHeapCompact})) // sqlite3.c:43768:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1064 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCSTR) HMODULE - }{libc.XLoadLibraryA})) // sqlite3.c:43767:32: + }{libc.XLoadLibraryA})) // sqlite3.c:43776:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1088 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCWSTR) HMODULE - }{libc.XLoadLibraryW})) // sqlite3.c:43776:32: + }{libc.XLoadLibraryW})) // sqlite3.c:43785:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1112 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HLOCAL) HLOCAL - }{libc.XLocalFree})) // sqlite3.c:43784:32: + }{libc.XLocalFree})) // sqlite3.c:43793:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1136 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, DWORD) WINBOOL - }{libc.XLockFile})) // sqlite3.c:43792:32: + }{libc.XLockFile})) // sqlite3.c:43801:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1160 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED) WINBOOL - }{libc.XLockFileEx})) // sqlite3.c:43803:32: + }{libc.XLockFileEx})) // sqlite3.c:43812:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1184 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, SIZE_T) LPVOID - }{libc.XMapViewOfFile})) // sqlite3.c:43815:32: + }{libc.XMapViewOfFile})) // sqlite3.c:43824:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1208 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, UINT, DWORD, LPCCH, int32, LPWSTR, int32) int32 - }{libc.XMultiByteToWideChar})) // sqlite3.c:43823:32: + }{libc.XMultiByteToWideChar})) // sqlite3.c:43832:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1232 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) WINBOOL - }{libc.XQueryPerformanceCounter})) // sqlite3.c:43828:32: + }{libc.XQueryPerformanceCounter})) // sqlite3.c:43837:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED) WINBOOL - }{libc.XReadFile})) // sqlite3.c:43833:32: + }{libc.XReadFile})) // sqlite3.c:43842:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1280 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE) WINBOOL - }{libc.XSetEndOfFile})) // sqlite3.c:43838:32: + }{libc.XSetEndOfFile})) // sqlite3.c:43847:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, LONG, PLONG, DWORD) DWORD - }{libc.XSetFilePointer})) // sqlite3.c:43843:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1328 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, DWORD) }{libc.XSleep})) // sqlite3.c:43852:32: + }{libc.XSetFilePointer})) // sqlite3.c:43852:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1328 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, DWORD) }{libc.XSleep})) // sqlite3.c:43861:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1352 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, LPFILETIME) WINBOOL - }{libc.XSystemTimeToFileTime})) // sqlite3.c:43859:32: + }{libc.XSystemTimeToFileTime})) // sqlite3.c:43868:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1376 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, DWORD) WINBOOL - }{libc.XUnlockFile})) // sqlite3.c:43865:32: + }{libc.XUnlockFile})) // sqlite3.c:43874:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1400 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, LPOVERLAPPED) WINBOOL - }{libc.XUnlockFileEx})) // sqlite3.c:43876:32: + }{libc.XUnlockFileEx})) // sqlite3.c:43885:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1424 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCVOID) WINBOOL - }{libc.XUnmapViewOfFile})) // sqlite3.c:43885:32: + }{libc.XUnmapViewOfFile})) // sqlite3.c:43894:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1448 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, UINT, DWORD, LPCWCH, int32, LPSTR, int32, LPCCH, LPBOOL) int32 - }{libc.XWideCharToMultiByte})) // sqlite3.c:43892:32: + }{libc.XWideCharToMultiByte})) // sqlite3.c:43901:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1472 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED) WINBOOL - }{libc.XWriteFile})) // sqlite3.c:43897:32: + }{libc.XWriteFile})) // sqlite3.c:43906:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1520 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD) DWORD - }{libc.XWaitForSingleObject})) // sqlite3.c:43912:32: + }{libc.XWaitForSingleObject})) // sqlite3.c:43921:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1544 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, HANDLE, DWORD, WINBOOL) DWORD - }{libc.XWaitForSingleObjectEx})) // sqlite3.c:43921:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1736 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPCSTR) }{libc.XOutputDebugStringA})) // sqlite3.c:43992:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1760 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPCWSTR) }{libc.XOutputDebugStringW})) // sqlite3.c:44000:32: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1784 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) HANDLE }{libc.XGetProcessHeap})) // sqlite3.c:44007:32: + }{libc.XWaitForSingleObjectEx})) // sqlite3.c:43930:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1736 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPCSTR) }{libc.XOutputDebugStringA})) // sqlite3.c:44001:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1760 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPCWSTR) }{libc.XOutputDebugStringW})) // sqlite3.c:44009:32: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1784 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) HANDLE }{libc.XGetProcessHeap})) // sqlite3.c:44016:32: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1904 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, LPCVOID, SIZE_T) WINBOOL - }{libc.XFlushViewOfFile})) // sqlite3.c:44054:33: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158726:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158726:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158727:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158727:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158728:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158728:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158729:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158729:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158730:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158730:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158731:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158731:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158732:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158732:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158733:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158733:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158734:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158734:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158735:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158735:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158736:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158736:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158737:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158737:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158738:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158738:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158739:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158739:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158740:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158740:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113408:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25290:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25291:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25292:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25293:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25294:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25295:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25296:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52444:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52445:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52446:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52447:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52448:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52449:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52450:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52451:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52452:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113388:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234324:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234325:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234326:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234327:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234328:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234329:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234330:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234331:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234332:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234333:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234334:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234335:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234336:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234337:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234338:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234339:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234340:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234341:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234342:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234343:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234344:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234345:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234346:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238907:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238908:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238909:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238910:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238911:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238912:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238913:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238914:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238915:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238916:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238917:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238918:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201859:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201860:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201861:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201862:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201863:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201864:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201865:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201866:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201867:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201868:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201869:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201870:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201871:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201872:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201873:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201874:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201875:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201876:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201877:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201878:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201881:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195601:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195602:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195603:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195605:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195606:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195607:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195608:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195609:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195610:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195611:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195629:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195630:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195631:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195633:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195634:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195636:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195637:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195638:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195639:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49224:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49225:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49227:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49228:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49229:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49230:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49231:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49235:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49240:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49241:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49204:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49207:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49209:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49210:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49211:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49212:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49213:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49215:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133072:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133073:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133074:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133076:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133077:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133078:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133079:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133081:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133082:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208556:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208557:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208558:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208559:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208560:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208561:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208562:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208563:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208564:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208565:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208566:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208567:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208568:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208569:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208570:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208571:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199198:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199199:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199203:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199204:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199206:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199207:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199209:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199210:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199212:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199213:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199215:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199216:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199219:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233784:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233785:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233786:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233787:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233788:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233789:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233790:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233791:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233792:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233793:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233794:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233795:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233796:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233797:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233798:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233799:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233800:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233801:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:99995:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:99996:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:99997:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:99998:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:99999:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100000:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27523:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27524:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27525:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27526:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27527:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27528:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27529:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128985:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:128987:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:128991:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:128992:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:128993:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:128994:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:128995:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:128996:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:128997:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:128998:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:128999:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129000:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129001:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129002:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129003:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129004:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129005:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129006:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129007:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129008:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129009:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129010:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129011:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129012:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129013:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129014:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129015:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129016:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129017:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129018:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129019:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129020:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129021:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129022:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129023:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129024:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129025:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129026:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129027:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129028:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129029:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129030:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129031:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129032:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129033:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129034:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129035:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129036:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129037:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129038:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129039:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129040:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129041:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129042:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129043:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129044:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129046:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129050:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129051:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129052:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129053:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129054:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129055:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129057:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129058:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129059:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129060:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129061:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129063:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129064:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129065:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129066:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129067:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129068:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129069:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129070:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129071:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129072:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129073:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129074:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129075:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129076:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129077:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129078:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129079:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129080:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129081:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129082:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129083:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129084:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129085:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129086:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129087:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129088:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129090:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129094:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129095:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129101:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129102:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129103:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129104:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129105:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129106:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129107:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129108:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129109:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129110:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129111:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129112:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129113:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129114:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129115:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129129:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129130:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129131:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129136:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129141:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129142:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129143:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129144:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129145:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129146:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129147:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129148:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129149:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129150:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129158:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129159:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129160:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129164:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129165:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129166:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129167:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129168:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129169:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129170:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129171:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129172:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129177:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129178:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129179:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129180:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129181:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129182:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129187:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129188:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129189:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129190:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129191:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129196:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129197:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129199:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129200:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129202:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129203:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129208:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129209:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129210:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129211:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129212:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129213:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129214:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129215:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129217:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129219:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129224:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129225:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129226:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129232:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129235:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129236:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129237:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129238:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129239:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129240:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129241:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129242:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129243:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129244:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129245:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129246:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129247:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129249:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129250:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129251:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129252:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129253:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129254:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129255:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129256:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129257:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129258:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129259:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129260:3: + }{libc.XFlushViewOfFile})) // sqlite3.c:44063:33: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberStepFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40)) = row_numberValueFunc // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48)) = noopStepFunc // sqlite3.c:158796:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:158796:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = dense_rankStepFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112)) = dense_rankValueFunc // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120)) = noopStepFunc // sqlite3.c:158797:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:158797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168)) = rankStepFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = rankValueFunc // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192)) = noopStepFunc // sqlite3.c:158798:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:158798:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240)) = percent_rankStepFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = percent_rankValueFunc // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = percent_rankInvFunc // sqlite3.c:158799:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:158799:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312)) = cume_distStepFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328)) = cume_distValueFunc // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = cume_distInvFunc // sqlite3.c:158800:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:158800:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = ntileStepFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400)) = ntileValueFunc // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408)) = ntileInvFunc // sqlite3.c:158801:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:158801:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = last_valueStepFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = last_valueFinalizeFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472)) = last_valueValueFunc // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480)) = last_valueInvFunc // sqlite3.c:158802:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:158802:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528)) = nth_valueStepFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = nth_valueFinalizeFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552)) = noopStepFunc // sqlite3.c:158803:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:158803:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600)) = first_valueStepFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608)) = first_valueFinalizeFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616)) = noopValueFunc // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624)) = noopStepFunc // sqlite3.c:158804:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:158804:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672)) = noopStepFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688)) = noopValueFunc // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696)) = noopStepFunc // sqlite3.c:158805:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158805:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744)) = noopStepFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760)) = noopValueFunc // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768)) = noopStepFunc // sqlite3.c:158806:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158806:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816)) = noopStepFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832)) = noopValueFunc // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840)) = noopStepFunc // sqlite3.c:158807:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:158807:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888)) = noopStepFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904)) = noopValueFunc // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912)) = noopStepFunc // sqlite3.c:158808:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158808:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960)) = noopStepFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976)) = noopValueFunc // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984)) = noopStepFunc // sqlite3.c:158809:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158809:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032)) = noopStepFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048)) = noopValueFunc // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056)) = noopStepFunc // sqlite3.c:158810:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:158810:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24)) = attachFunc // sqlite3.c:113438:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:25299:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemFree // sqlite3.c:25300:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRealloc // sqlite3.c:25301:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemSize // sqlite3.c:25302:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32)) = sqlite3MemRoundup // sqlite3.c:25303:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40)) = sqlite3MemInit // sqlite3.c:25304:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48)) = sqlite3MemShutdown // sqlite3.c:25305:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Init // sqlite3.c:52453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Shutdown // sqlite3.c:52454:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Create // sqlite3.c:52455:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Cachesize // sqlite3.c:52456:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Pagecount // sqlite3.c:52457:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56)) = pcache1Fetch // sqlite3.c:52458:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64)) = pcache1Unpin // sqlite3.c:52459:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72)) = pcache1Rekey // sqlite3.c:52460:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80)) = pcache1Truncate // sqlite3.c:52461:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88)) = pcache1Destroy // sqlite3.c:52462:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96)) = pcache1Shrink // sqlite3.c:52463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24)) = detachFunc // sqlite3.c:113418:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5CreateMethod // sqlite3.c:234400:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5ConnectMethod // sqlite3.c:234401:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5BestIndexMethod // sqlite3.c:234402:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5DisconnectMethod // sqlite3.c:234403:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5DestroyMethod // sqlite3.c:234404:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5OpenMethod // sqlite3.c:234405:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5CloseMethod // sqlite3.c:234406:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5FilterMethod // sqlite3.c:234407:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5NextMethod // sqlite3.c:234408:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5EofMethod // sqlite3.c:234409:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5ColumnMethod // sqlite3.c:234410:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96)) = fts5RowidMethod // sqlite3.c:234411:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104)) = fts5UpdateMethod // sqlite3.c:234412:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112)) = fts5BeginMethod // sqlite3.c:234413:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120)) = fts5SyncMethod // sqlite3.c:234414:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128)) = fts5CommitMethod // sqlite3.c:234415:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136)) = fts5RollbackMethod // sqlite3.c:234416:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144)) = fts5FindFunctionMethod // sqlite3.c:234417:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152)) = fts5RenameMethod // sqlite3.c:234418:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160)) = fts5SavepointMethod // sqlite3.c:234419:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168)) = fts5ReleaseMethod // sqlite3.c:234420:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176)) = fts5RollbackToMethod // sqlite3.c:234421:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184)) = fts5ShadowName // sqlite3.c:234422:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabCreateMethod // sqlite3.c:238983:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabConnectMethod // sqlite3.c:238984:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabBestIndexMethod // sqlite3.c:238985:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabDisconnectMethod // sqlite3.c:238986:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabDestroyMethod // sqlite3.c:238987:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabOpenMethod // sqlite3.c:238988:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56)) = fts5VocabCloseMethod // sqlite3.c:238989:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64)) = fts5VocabFilterMethod // sqlite3.c:238990:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72)) = fts5VocabNextMethod // sqlite3.c:238991:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80)) = fts5VocabEofMethod // sqlite3.c:238992:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88)) = fts5VocabColumnMethod // sqlite3.c:238993:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96)) = fts5VocabRowidMethod // sqlite3.c:238994:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyCreate // sqlite3.c:201934:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = geopolyConnect // sqlite3.c:201935:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = geopolyBestIndex // sqlite3.c:201936:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = rtreeDisconnect // sqlite3.c:201937:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeDestroy // sqlite3.c:201938:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeOpen // sqlite3.c:201939:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeClose // sqlite3.c:201940:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = geopolyFilter // sqlite3.c:201941:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = rtreeNext // sqlite3.c:201942:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeEof // sqlite3.c:201943:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88)) = geopolyColumn // sqlite3.c:201944:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96)) = rtreeRowid // sqlite3.c:201945:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104)) = geopolyUpdate // sqlite3.c:201946:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:201947:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120)) = rtreeEndTransaction // sqlite3.c:201948:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128)) = rtreeEndTransaction // sqlite3.c:201949:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136)) = rtreeEndTransaction // sqlite3.c:201950:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144)) = geopolyFindFunction // sqlite3.c:201951:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152)) = rtreeRename // sqlite3.c:201952:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160)) = rtreeSavepoint // sqlite3.c:201953:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184)) = rtreeShadowName // sqlite3.c:201956:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachConnect // sqlite3.c:195676:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195678:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachOpenEach // sqlite3.c:195680:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56)) = jsonEachClose // sqlite3.c:195681:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64)) = jsonEachFilter // sqlite3.c:195682:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72)) = jsonEachNext // sqlite3.c:195683:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80)) = jsonEachEof // sqlite3.c:195684:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88)) = jsonEachColumn // sqlite3.c:195685:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96)) = jsonEachRowid // sqlite3.c:195686:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachConnect // sqlite3.c:195704:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachBestIndex // sqlite3.c:195705:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachDisconnect // sqlite3.c:195706:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachOpenTree // sqlite3.c:195708:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56)) = jsonEachClose // sqlite3.c:195709:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64)) = jsonEachFilter // sqlite3.c:195710:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72)) = jsonEachNext // sqlite3.c:195711:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80)) = jsonEachEof // sqlite3.c:195712:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88)) = jsonEachColumn // sqlite3.c:195713:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96)) = jsonEachRowid // sqlite3.c:195714:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbClose // sqlite3.c:49233:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbRead // sqlite3.c:49234:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbWrite // sqlite3.c:49235:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbTruncate // sqlite3.c:49236:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbSync // sqlite3.c:49237:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbFileSize // sqlite3.c:49238:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56)) = memdbLock // sqlite3.c:49239:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64)) = memdbLock // sqlite3.c:49240:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80)) = memdbFileControl // sqlite3.c:49242:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96)) = memdbDeviceCharacteristics // sqlite3.c:49244:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136)) = memdbFetch // sqlite3.c:49249:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144)) = memdbUnfetch // sqlite3.c:49250:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbOpen // sqlite3.c:49213:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbAccess // sqlite3.c:49215:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64)) = memdbFullPathname // sqlite3.c:49216:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbDlOpen // sqlite3.c:49217:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80)) = memdbDlError // sqlite3.c:49218:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88)) = memdbDlSym // sqlite3.c:49219:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96)) = memdbDlClose // sqlite3.c:49220:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104)) = memdbRandomness // sqlite3.c:49221:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112)) = memdbSleep // sqlite3.c:49222:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128)) = memdbGetLastError // sqlite3.c:49224:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136)) = memdbCurrentTimeInt64 // sqlite3.c:49225:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabConnect // sqlite3.c:133106:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabBestIndex // sqlite3.c:133107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabDisconnect // sqlite3.c:133108:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabOpen // sqlite3.c:133110:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56)) = pragmaVtabClose // sqlite3.c:133111:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64)) = pragmaVtabFilter // sqlite3.c:133112:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72)) = pragmaVtabNext // sqlite3.c:133113:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80)) = pragmaVtabEof // sqlite3.c:133114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88)) = pragmaVtabColumn // sqlite3.c:133115:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96)) = pragmaVtabRowid // sqlite3.c:133116:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsClose // sqlite3.c:208631:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsRead // sqlite3.c:208632:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsWrite // sqlite3.c:208633:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsTruncate // sqlite3.c:208634:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsSync // sqlite3.c:208635:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsFileSize // sqlite3.c:208636:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsLock // sqlite3.c:208637:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsUnlock // sqlite3.c:208638:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72)) = rbuVfsCheckReservedLock // sqlite3.c:208639:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80)) = rbuVfsFileControl // sqlite3.c:208640:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88)) = rbuVfsSectorSize // sqlite3.c:208641:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96)) = rbuVfsDeviceCharacteristics // sqlite3.c:208642:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104)) = rbuVfsShmMap // sqlite3.c:208643:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock // sqlite3.c:208644:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier // sqlite3.c:208645:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap // sqlite3.c:208646:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate // sqlite3.c:199272:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect // sqlite3.c:199273:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex // sqlite3.c:199274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeDisconnect // sqlite3.c:199275:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeDestroy // sqlite3.c:199276:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeOpen // sqlite3.c:199277:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeClose // sqlite3.c:199278:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeFilter // sqlite3.c:199279:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72)) = rtreeNext // sqlite3.c:199280:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeEof // sqlite3.c:199281:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88)) = rtreeColumn // sqlite3.c:199282:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96)) = rtreeRowid // sqlite3.c:199283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104)) = rtreeUpdate // sqlite3.c:199284:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112)) = rtreeBeginTransaction // sqlite3.c:199285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120)) = rtreeEndTransaction // sqlite3.c:199286:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128)) = rtreeEndTransaction // sqlite3.c:199287:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136)) = rtreeEndTransaction // sqlite3.c:199288:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152)) = rtreeRename // sqlite3.c:199290:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160)) = rtreeSavepoint // sqlite3.c:199291:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184)) = rtreeShadowName // sqlite3.c:199294:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiUserData // sqlite3.c:233859:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnCount // sqlite3.c:233860:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiRowCount // sqlite3.c:233861:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiColumnTotalSize // sqlite3.c:233862:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiTokenize // sqlite3.c:233863:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiPhraseCount // sqlite3.c:233864:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiPhraseSize // sqlite3.c:233865:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiInstCount // sqlite3.c:233866:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiInst // sqlite3.c:233867:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80)) = fts5ApiRowid // sqlite3.c:233868:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88)) = fts5ApiColumnText // sqlite3.c:233869:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96)) = fts5ApiColumnSize // sqlite3.c:233870:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104)) = fts5ApiQueryPhrase // sqlite3.c:233871:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112)) = fts5ApiSetAuxdata // sqlite3.c:233872:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120)) = fts5ApiGetAuxdata // sqlite3.c:233873:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128)) = fts5ApiPhraseFirst // sqlite3.c:233874:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136)) = fts5ApiPhraseNext // sqlite3.c:233875:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144)) = fts5ApiPhraseFirstColumn // sqlite3.c:233876:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152)) = fts5ApiPhraseNextColumn // sqlite3.c:233877:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlClose // sqlite3.c:100023:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlRead // sqlite3.c:100024:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlWrite // sqlite3.c:100025:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32)) = memjrnlTruncate // sqlite3.c:100026:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40)) = memjrnlSync // sqlite3.c:100027:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48)) = memjrnlFileSize // sqlite3.c:100028:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27532:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexEnd // sqlite3.c:27533:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexAlloc // sqlite3.c:27534:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexFree // sqlite3.c:27535:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32)) = noopMutexEnter // sqlite3.c:27536:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40)) = noopMutexTry // sqlite3.c:27537:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48)) = noopMutexLeave // sqlite3.c:27538:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:129019:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_aggregate_count // sqlite3.c:129021:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_blob // sqlite3.c:129025:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_double // sqlite3.c:129026:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_int // sqlite3.c:129027:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_int64 // sqlite3.c:129028:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_null // sqlite3.c:129029:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_bind_parameter_count // sqlite3.c:129030:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_bind_parameter_index // sqlite3.c:129031:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_bind_parameter_name // sqlite3.c:129032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_bind_text // sqlite3.c:129033:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_bind_text16 // sqlite3.c:129034:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_bind_value // sqlite3.c:129035:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_busy_handler // sqlite3.c:129036:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_busy_timeout // sqlite3.c:129037:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_changes // sqlite3.c:129038:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_close // sqlite3.c:129039:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_collation_needed // sqlite3.c:129040:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_collation_needed16 // sqlite3.c:129041:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_blob // sqlite3.c:129042:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_column_bytes // sqlite3.c:129043:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_column_bytes16 // sqlite3.c:129044:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_column_count // sqlite3.c:129045:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_column_database_name // sqlite3.c:129046:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_column_database_name16 // sqlite3.c:129047:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_column_decltype // sqlite3.c:129048:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_column_decltype16 // sqlite3.c:129049:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_column_double // sqlite3.c:129050:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_column_int // sqlite3.c:129051:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_column_int64 // sqlite3.c:129052:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_column_name // sqlite3.c:129053:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_column_name16 // sqlite3.c:129054:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_column_origin_name // sqlite3.c:129055:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_column_origin_name16 // sqlite3.c:129056:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_column_table_name // sqlite3.c:129057:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_column_table_name16 // sqlite3.c:129058:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_column_text // sqlite3.c:129059:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_column_text16 // sqlite3.c:129060:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_column_type // sqlite3.c:129061:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_column_value // sqlite3.c:129062:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_commit_hook // sqlite3.c:129063:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_complete // sqlite3.c:129064:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_complete16 // sqlite3.c:129065:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_create_collation // sqlite3.c:129066:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_create_collation16 // sqlite3.c:129067:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_create_function // sqlite3.c:129068:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_create_function16 // sqlite3.c:129069:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_create_module // sqlite3.c:129070:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_data_count // sqlite3.c:129071:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_db_handle // sqlite3.c:129072:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_declare_vtab // sqlite3.c:129073:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_enable_shared_cache // sqlite3.c:129074:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_errcode // sqlite3.c:129075:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_errmsg // sqlite3.c:129076:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_errmsg16 // sqlite3.c:129077:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_exec // sqlite3.c:129078:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_expired // sqlite3.c:129080:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_finalize // sqlite3.c:129084:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_free // sqlite3.c:129085:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_free_table // sqlite3.c:129086:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_get_autocommit // sqlite3.c:129087:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_get_auxdata // sqlite3.c:129088:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_get_table // sqlite3.c:129089:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_interrupt // sqlite3.c:129091:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_last_insert_rowid // sqlite3.c:129092:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_libversion // sqlite3.c:129093:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_libversion_number // sqlite3.c:129094:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_malloc // sqlite3.c:129095:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_mprintf // sqlite3.c:129096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_open // sqlite3.c:129097:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_open16 // sqlite3.c:129098:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_prepare // sqlite3.c:129099:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_prepare16 // sqlite3.c:129100:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_profile // sqlite3.c:129101:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_progress_handler // sqlite3.c:129102:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_realloc // sqlite3.c:129103:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_reset // sqlite3.c:129104:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_result_blob // sqlite3.c:129105:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_result_double // sqlite3.c:129106:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_result_error // sqlite3.c:129107:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_result_error16 // sqlite3.c:129108:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_result_int // sqlite3.c:129109:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_result_int64 // sqlite3.c:129110:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_result_null // sqlite3.c:129111:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_result_text // sqlite3.c:129112:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_result_text16 // sqlite3.c:129113:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_result_text16be // sqlite3.c:129114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_result_text16le // sqlite3.c:129115:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_result_value // sqlite3.c:129116:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_rollback_hook // sqlite3.c:129117:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_set_authorizer // sqlite3.c:129118:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_set_auxdata // sqlite3.c:129119:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_snprintf // sqlite3.c:129120:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_step // sqlite3.c:129121:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_table_column_metadata // sqlite3.c:129122:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_thread_cleanup // sqlite3.c:129124:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_total_changes // sqlite3.c:129128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_trace // sqlite3.c:129129:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_transfer_bindings // sqlite3.c:129131:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_update_hook // sqlite3.c:129135:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_user_data // sqlite3.c:129136:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816)) = Xsqlite3_value_blob // sqlite3.c:129137:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_value_bytes // sqlite3.c:129138:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_bytes16 // sqlite3.c:129139:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_value_double // sqlite3.c:129140:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_value_int // sqlite3.c:129141:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_value_int64 // sqlite3.c:129142:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_value_numeric_type // sqlite3.c:129143:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_value_text // sqlite3.c:129144:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_value_text16 // sqlite3.c:129145:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_value_text16be // sqlite3.c:129146:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_value_text16le // sqlite3.c:129147:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_value_type // sqlite3.c:129148:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_vmprintf // sqlite3.c:129149:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_overload_function // sqlite3.c:129158:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_prepare_v2 // sqlite3.c:129163:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_prepare16_v2 // sqlite3.c:129164:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_clear_bindings // sqlite3.c:129165:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_create_module_v2 // sqlite3.c:129170:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960)) = Xsqlite3_bind_zeroblob // sqlite3.c:129175:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_blob_bytes // sqlite3.c:129176:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_blob_close // sqlite3.c:129177:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_blob_open // sqlite3.c:129178:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_blob_read // sqlite3.c:129179:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_blob_write // sqlite3.c:129180:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_create_collation_v2 // sqlite3.c:129181:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_file_control // sqlite3.c:129182:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024)) = Xsqlite3_memory_highwater // sqlite3.c:129183:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032)) = Xsqlite3_memory_used // sqlite3.c:129184:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040)) = Xsqlite3_mutex_alloc // sqlite3.c:129192:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048)) = Xsqlite3_mutex_enter // sqlite3.c:129193:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_mutex_free // sqlite3.c:129194:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = Xsqlite3_mutex_leave // sqlite3.c:129195:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072)) = Xsqlite3_mutex_try // sqlite3.c:129196:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080)) = Xsqlite3_open_v2 // sqlite3.c:129198:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088)) = Xsqlite3_release_memory // sqlite3.c:129199:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096)) = Xsqlite3_result_error_nomem // sqlite3.c:129200:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104)) = Xsqlite3_result_error_toobig // sqlite3.c:129201:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112)) = Xsqlite3_sleep // sqlite3.c:129202:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120)) = Xsqlite3_soft_heap_limit // sqlite3.c:129203:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128)) = Xsqlite3_vfs_find // sqlite3.c:129204:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136)) = Xsqlite3_vfs_register // sqlite3.c:129205:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144)) = Xsqlite3_vfs_unregister // sqlite3.c:129206:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152)) = Xsqlite3_threadsafe // sqlite3.c:129211:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160)) = Xsqlite3_result_zeroblob // sqlite3.c:129212:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168)) = Xsqlite3_result_error_code // sqlite3.c:129213:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176)) = Xsqlite3_test_control // sqlite3.c:129214:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184)) = Xsqlite3_randomness // sqlite3.c:129215:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192)) = Xsqlite3_context_db_handle // sqlite3.c:129216:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200)) = Xsqlite3_extended_result_codes // sqlite3.c:129221:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208)) = Xsqlite3_limit // sqlite3.c:129222:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216)) = Xsqlite3_next_stmt // sqlite3.c:129223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224)) = Xsqlite3_sql // sqlite3.c:129224:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232)) = Xsqlite3_status // sqlite3.c:129225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240)) = Xsqlite3_backup_finish // sqlite3.c:129230:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248)) = Xsqlite3_backup_init // sqlite3.c:129231:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256)) = Xsqlite3_backup_pagecount // sqlite3.c:129232:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264)) = Xsqlite3_backup_remaining // sqlite3.c:129233:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272)) = Xsqlite3_backup_step // sqlite3.c:129234:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280)) = Xsqlite3_compileoption_get // sqlite3.c:129236:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288)) = Xsqlite3_compileoption_used // sqlite3.c:129237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296)) = Xsqlite3_create_function_v2 // sqlite3.c:129242:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304)) = Xsqlite3_db_config // sqlite3.c:129243:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312)) = Xsqlite3_db_mutex // sqlite3.c:129244:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320)) = Xsqlite3_db_status // sqlite3.c:129245:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328)) = Xsqlite3_extended_errcode // sqlite3.c:129246:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336)) = Xsqlite3_log // sqlite3.c:129247:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:129248:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352)) = Xsqlite3_sourceid // sqlite3.c:129249:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360)) = Xsqlite3_stmt_status // sqlite3.c:129250:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368)) = Xsqlite3_strnicmp // sqlite3.c:129251:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376)) = Xsqlite3_unlock_notify // sqlite3.c:129253:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:129258:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392)) = Xsqlite3_wal_checkpoint // sqlite3.c:129259:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400)) = Xsqlite3_wal_hook // sqlite3.c:129260:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408)) = Xsqlite3_blob_reopen // sqlite3.c:129266:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416)) = Xsqlite3_vtab_config // sqlite3.c:129267:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424)) = Xsqlite3_vtab_on_conflict // sqlite3.c:129268:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432)) = Xsqlite3_close_v2 // sqlite3.c:129269:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440)) = Xsqlite3_db_filename // sqlite3.c:129270:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448)) = Xsqlite3_db_readonly // sqlite3.c:129271:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456)) = Xsqlite3_db_release_memory // sqlite3.c:129272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464)) = Xsqlite3_errstr // sqlite3.c:129273:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472)) = Xsqlite3_stmt_busy // sqlite3.c:129274:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480)) = Xsqlite3_stmt_readonly // sqlite3.c:129275:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488)) = Xsqlite3_stricmp // sqlite3.c:129276:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496)) = Xsqlite3_uri_boolean // sqlite3.c:129277:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504)) = Xsqlite3_uri_int64 // sqlite3.c:129278:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512)) = Xsqlite3_uri_parameter // sqlite3.c:129279:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520)) = Xsqlite3_vsnprintf // sqlite3.c:129280:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:129281:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536)) = Xsqlite3_auto_extension // sqlite3.c:129283:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544)) = Xsqlite3_bind_blob64 // sqlite3.c:129284:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552)) = Xsqlite3_bind_text64 // sqlite3.c:129285:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560)) = Xsqlite3_cancel_auto_extension // sqlite3.c:129286:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568)) = Xsqlite3_load_extension // sqlite3.c:129287:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576)) = Xsqlite3_malloc64 // sqlite3.c:129288:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584)) = Xsqlite3_msize // sqlite3.c:129289:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592)) = Xsqlite3_realloc64 // sqlite3.c:129290:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600)) = Xsqlite3_reset_auto_extension // sqlite3.c:129291:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608)) = Xsqlite3_result_blob64 // sqlite3.c:129292:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616)) = Xsqlite3_result_text64 // sqlite3.c:129293:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624)) = Xsqlite3_strglob // sqlite3.c:129294:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:129262:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129263:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129264:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129265:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129267:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129268:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129270:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129271:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129272:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129274:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129276:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129277:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129279:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129281:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129282:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129283:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129284:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129285:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129287:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129288:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129289:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129291:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129292:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129293:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129294:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129295:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129296:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129297:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129298:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129299:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129300:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129301:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129302:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129303:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129304:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129306:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129314:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129315:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129318:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129323:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129324:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129325:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129326:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129327:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129329:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129330:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129331:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129333:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129335:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129336:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129338:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129340:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129341:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129342:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129343:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129344:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129345:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168413:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168419:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168427:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168429:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111963:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111539:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111829:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208813:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208814:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208815:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208816:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208819:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208820:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208821:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208822:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208827:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208828:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208829:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208830:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winAppData)) + 0 /* .pMethod */)) = uintptr(unsafe.Pointer(&winIoMethod)) // sqlite3.c:47540:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 8)) = winClose // sqlite3.c:47493:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 16)) = winRead // sqlite3.c:47494:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 24)) = winWrite // sqlite3.c:47495:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 32)) = winTruncate // sqlite3.c:47496:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 40)) = winSync // sqlite3.c:47497:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 48)) = winFileSize // sqlite3.c:47498:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 56)) = winLock // sqlite3.c:47499:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 64)) = winUnlock // sqlite3.c:47500:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 72)) = winCheckReservedLock // sqlite3.c:47501:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 80)) = winFileControl // sqlite3.c:47502:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 88)) = winSectorSize // sqlite3.c:47503:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 96)) = winDeviceCharacteristics // sqlite3.c:47504:3: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 104)) = winShmMap // sqlite3.c:47505:3: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 112)) = winShmLock // sqlite3.c:47506:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 120)) = winShmBarrier // sqlite3.c:47507:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 128)) = winShmUnmap // sqlite3.c:47508:3: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 136)) = winFetch // sqlite3.c:47509:3: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 144)) = winUnfetch // sqlite3.c:47510:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 8)) = winClose // sqlite3.c:47519:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 16)) = winRead // sqlite3.c:47520:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 24)) = winWrite // sqlite3.c:47521:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 32)) = winTruncate // sqlite3.c:47522:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 40)) = winSync // sqlite3.c:47523:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 48)) = winFileSize // sqlite3.c:47524:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 56)) = winNolockLock // sqlite3.c:47525:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 64)) = winNolockUnlock // sqlite3.c:47526:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 72)) = winNolockCheckReservedLock // sqlite3.c:47527:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 80)) = winFileControl // sqlite3.c:47528:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 88)) = winSectorSize // sqlite3.c:47529:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 96)) = winDeviceCharacteristics // sqlite3.c:47530:3: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 104)) = winShmMap // sqlite3.c:47531:3: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 112)) = winShmLock // sqlite3.c:47532:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 120)) = winShmBarrier // sqlite3.c:47533:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 128)) = winShmUnmap // sqlite3.c:47534:3: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 136)) = winFetch // sqlite3.c:47535:3: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 144)) = winUnfetch // sqlite3.c:47536:3: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winNolockAppData)) // sqlite3.c:48990:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 40)) = winOpen // sqlite3.c:48991:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 48)) = winDelete // sqlite3.c:48992:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 56)) = winAccess // sqlite3.c:48993:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 64)) = winFullPathname // sqlite3.c:48994:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 72)) = winDlOpen // sqlite3.c:48995:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 80)) = winDlError // sqlite3.c:48996:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 88)) = winDlSym // sqlite3.c:48997:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 96)) = winDlClose // sqlite3.c:48998:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 104)) = winRandomness // sqlite3.c:48999:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 112)) = winSleep // sqlite3.c:49000:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 120)) = winCurrentTime // sqlite3.c:49001:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 128)) = winGetLastError // sqlite3.c:49002:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:49003:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 144)) = winSetSystemCall // sqlite3.c:49004:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 152)) = winGetSystemCall // sqlite3.c:49005:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 160)) = winNextSystemCall // sqlite3.c:49006:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winAppData)) // sqlite3.c:48940:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 40)) = winOpen // sqlite3.c:48941:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 48)) = winDelete // sqlite3.c:48942:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 56)) = winAccess // sqlite3.c:48943:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 64)) = winFullPathname // sqlite3.c:48944:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 72)) = winDlOpen // sqlite3.c:48945:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 80)) = winDlError // sqlite3.c:48946:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 88)) = winDlSym // sqlite3.c:48947:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 96)) = winDlClose // sqlite3.c:48948:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 104)) = winRandomness // sqlite3.c:48949:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 112)) = winSleep // sqlite3.c:48950:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 120)) = winCurrentTime // sqlite3.c:48951:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 128)) = winGetLastError // sqlite3.c:48952:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:48953:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 144)) = winSetSystemCall // sqlite3.c:48954:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 152)) = winGetSystemCall // sqlite3.c:48955:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 160)) = winNextSystemCall // sqlite3.c:48956:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockAppData)) + 0 /* .pMethod */)) = uintptr(unsafe.Pointer(&winIoNolockMethod)) // sqlite3.c:47546:3: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winNolockAppData)) // sqlite3.c:48965:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 40)) = winOpen // sqlite3.c:48966:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 48)) = winDelete // sqlite3.c:48967:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 56)) = winAccess // sqlite3.c:48968:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 64)) = winFullPathname // sqlite3.c:48969:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 72)) = winDlOpen // sqlite3.c:48970:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 80)) = winDlError // sqlite3.c:48971:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 88)) = winDlSym // sqlite3.c:48972:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 96)) = winDlClose // sqlite3.c:48973:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 104)) = winRandomness // sqlite3.c:48974:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 112)) = winSleep // sqlite3.c:48975:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 120)) = winCurrentTime // sqlite3.c:48976:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 128)) = winGetLastError // sqlite3.c:48977:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:48978:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 144)) = winSetSystemCall // sqlite3.c:48979:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 152)) = winGetSystemCall // sqlite3.c:48980:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 160)) = winNextSystemCall // sqlite3.c:48981:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winAppData)) // sqlite3.c:48915:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 40)) = winOpen // sqlite3.c:48916:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 48)) = winDelete // sqlite3.c:48917:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 56)) = winAccess // sqlite3.c:48918:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 64)) = winFullPathname // sqlite3.c:48919:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 72)) = winDlOpen // sqlite3.c:48920:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 80)) = winDlError // sqlite3.c:48921:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 88)) = winDlSym // sqlite3.c:48922:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 96)) = winDlClose // sqlite3.c:48923:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 104)) = winRandomness // sqlite3.c:48924:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 112)) = winSleep // sqlite3.c:48925:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 120)) = winCurrentTime // sqlite3.c:48926:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 128)) = winGetLastError // sqlite3.c:48927:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:48928:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 144)) = winSetSystemCall // sqlite3.c:48929:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 152)) = winGetSystemCall // sqlite3.c:48930:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 160)) = winNextSystemCall // sqlite3.c:48931:5: + }{Xsqlite3_value_dup})) // sqlite3.c:129296:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640)) = Xsqlite3_value_free // sqlite3.c:129297:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648)) = Xsqlite3_result_zeroblob64 // sqlite3.c:129298:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:129299:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664)) = Xsqlite3_value_subtype // sqlite3.c:129301:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672)) = Xsqlite3_result_subtype // sqlite3.c:129302:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680)) = Xsqlite3_status64 // sqlite3.c:129304:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688)) = Xsqlite3_strlike // sqlite3.c:129305:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696)) = Xsqlite3_db_cacheflush // sqlite3.c:129306:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704)) = Xsqlite3_system_errno // sqlite3.c:129308:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712)) = Xsqlite3_trace_v2 // sqlite3.c:129310:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720)) = Xsqlite3_expanded_sql // sqlite3.c:129311:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:129313:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736)) = Xsqlite3_prepare_v3 // sqlite3.c:129315:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744)) = Xsqlite3_prepare16_v3 // sqlite3.c:129316:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752)) = Xsqlite3_bind_pointer // sqlite3.c:129317:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760)) = Xsqlite3_result_pointer // sqlite3.c:129318:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768)) = Xsqlite3_value_pointer // sqlite3.c:129319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776)) = Xsqlite3_vtab_nochange // sqlite3.c:129321:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784)) = Xsqlite3_value_nochange // sqlite3.c:129322:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792)) = Xsqlite3_vtab_collation // sqlite3.c:129323:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800)) = Xsqlite3_keyword_count // sqlite3.c:129325:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808)) = Xsqlite3_keyword_name // sqlite3.c:129326:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816)) = Xsqlite3_keyword_check // sqlite3.c:129327:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824)) = Xsqlite3_str_new // sqlite3.c:129328:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832)) = Xsqlite3_str_finish // sqlite3.c:129329:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840)) = Xsqlite3_str_appendf // sqlite3.c:129330:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848)) = Xsqlite3_str_vappendf // sqlite3.c:129331:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856)) = Xsqlite3_str_append // sqlite3.c:129332:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864)) = Xsqlite3_str_appendall // sqlite3.c:129333:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872)) = Xsqlite3_str_appendchar // sqlite3.c:129334:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880)) = Xsqlite3_str_reset // sqlite3.c:129335:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888)) = Xsqlite3_str_errcode // sqlite3.c:129336:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896)) = Xsqlite3_str_length // sqlite3.c:129337:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904)) = Xsqlite3_str_value // sqlite3.c:129338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912)) = Xsqlite3_create_window_function // sqlite3.c:129340:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928)) = Xsqlite3_stmt_isexplain // sqlite3.c:129348:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936)) = Xsqlite3_value_frombind // sqlite3.c:129349:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944)) = Xsqlite3_drop_modules // sqlite3.c:129352:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:129357:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960)) = Xsqlite3_uri_key // sqlite3.c:129358:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968)) = Xsqlite3_filename_database // sqlite3.c:129359:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976)) = Xsqlite3_filename_journal // sqlite3.c:129360:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984)) = Xsqlite3_filename_wal // sqlite3.c:129361:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992)) = Xsqlite3_create_filename // sqlite3.c:129363:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000)) = Xsqlite3_free_filename // sqlite3.c:129364:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008)) = Xsqlite3_database_file_object // sqlite3.c:129365:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016)) = Xsqlite3_txn_state // sqlite3.c:129367:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2024)) = Xsqlite3_changes64 // sqlite3.c:129369:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2032)) = Xsqlite3_total_changes64 // sqlite3.c:129370:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2040)) = Xsqlite3_autovacuum_pages // sqlite3.c:129372:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2048)) = Xsqlite3_error_offset // sqlite3.c:129374:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2056)) = Xsqlite3_vtab_rhs_value // sqlite3.c:129375:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2064)) = Xsqlite3_vtab_distinct // sqlite3.c:129376:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2072)) = Xsqlite3_vtab_in // sqlite3.c:129377:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2080)) = Xsqlite3_vtab_in_first // sqlite3.c:129378:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2088)) = Xsqlite3_vtab_in_next // sqlite3.c:129379:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:168488:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:168494:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:168502:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3JsonTableFunctions // sqlite3.c:168504:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24)) = statGet // sqlite3.c:111993:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24)) = statInit // sqlite3.c:111569:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24)) = statPush // sqlite3.c:111859:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsOpen // sqlite3.c:208888:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDelete // sqlite3.c:208889:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsAccess // sqlite3.c:208890:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsFullPathname // sqlite3.c:208891:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72)) = rbuVfsDlOpen // sqlite3.c:208894:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80)) = rbuVfsDlError // sqlite3.c:208895:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88)) = rbuVfsDlSym // sqlite3.c:208896:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96)) = rbuVfsDlClose // sqlite3.c:208897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104)) = rbuVfsRandomness // sqlite3.c:208902:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112)) = rbuVfsSleep // sqlite3.c:208903:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120)) = rbuVfsCurrentTime // sqlite3.c:208904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError // sqlite3.c:208905:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winAppData)) + 0 /* .pMethod */)) = uintptr(unsafe.Pointer(&winIoMethod)) // sqlite3.c:47549:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 8)) = winClose // sqlite3.c:47502:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 16)) = winRead // sqlite3.c:47503:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 24)) = winWrite // sqlite3.c:47504:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 32)) = winTruncate // sqlite3.c:47505:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 40)) = winSync // sqlite3.c:47506:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 48)) = winFileSize // sqlite3.c:47507:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 56)) = winLock // sqlite3.c:47508:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 64)) = winUnlock // sqlite3.c:47509:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 72)) = winCheckReservedLock // sqlite3.c:47510:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 80)) = winFileControl // sqlite3.c:47511:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 88)) = winSectorSize // sqlite3.c:47512:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 96)) = winDeviceCharacteristics // sqlite3.c:47513:3: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 104)) = winShmMap // sqlite3.c:47514:3: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 112)) = winShmLock // sqlite3.c:47515:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 120)) = winShmBarrier // sqlite3.c:47516:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 128)) = winShmUnmap // sqlite3.c:47517:3: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 136)) = winFetch // sqlite3.c:47518:3: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoMethod)) + 144)) = winUnfetch // sqlite3.c:47519:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 8)) = winClose // sqlite3.c:47528:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 16)) = winRead // sqlite3.c:47529:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 24)) = winWrite // sqlite3.c:47530:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 32)) = winTruncate // sqlite3.c:47531:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 40)) = winSync // sqlite3.c:47532:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 48)) = winFileSize // sqlite3.c:47533:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 56)) = winNolockLock // sqlite3.c:47534:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 64)) = winNolockUnlock // sqlite3.c:47535:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 72)) = winNolockCheckReservedLock // sqlite3.c:47536:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 80)) = winFileControl // sqlite3.c:47537:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 88)) = winSectorSize // sqlite3.c:47538:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 96)) = winDeviceCharacteristics // sqlite3.c:47539:3: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 104)) = winShmMap // sqlite3.c:47540:3: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 112)) = winShmLock // sqlite3.c:47541:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 120)) = winShmBarrier // sqlite3.c:47542:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 128)) = winShmUnmap // sqlite3.c:47543:3: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 136)) = winFetch // sqlite3.c:47544:3: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winIoNolockMethod)) + 144)) = winUnfetch // sqlite3.c:47545:3: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winNolockAppData)) // sqlite3.c:48999:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 40)) = winOpen // sqlite3.c:49000:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 48)) = winDelete // sqlite3.c:49001:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 56)) = winAccess // sqlite3.c:49002:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 64)) = winFullPathname // sqlite3.c:49003:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 72)) = winDlOpen // sqlite3.c:49004:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 80)) = winDlError // sqlite3.c:49005:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 88)) = winDlSym // sqlite3.c:49006:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 96)) = winDlClose // sqlite3.c:49007:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 104)) = winRandomness // sqlite3.c:49008:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 112)) = winSleep // sqlite3.c:49009:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 120)) = winCurrentTime // sqlite3.c:49010:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 128)) = winGetLastError // sqlite3.c:49011:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:49012:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 144)) = winSetSystemCall // sqlite3.c:49013:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 152)) = winGetSystemCall // sqlite3.c:49014:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathNolockVfs)) + 160)) = winNextSystemCall // sqlite3.c:49015:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winAppData)) // sqlite3.c:48949:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 40)) = winOpen // sqlite3.c:48950:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 48)) = winDelete // sqlite3.c:48951:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 56)) = winAccess // sqlite3.c:48952:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 64)) = winFullPathname // sqlite3.c:48953:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 72)) = winDlOpen // sqlite3.c:48954:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 80)) = winDlError // sqlite3.c:48955:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 88)) = winDlSym // sqlite3.c:48956:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 96)) = winDlClose // sqlite3.c:48957:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 104)) = winRandomness // sqlite3.c:48958:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 112)) = winSleep // sqlite3.c:48959:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 120)) = winCurrentTime // sqlite3.c:48960:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 128)) = winGetLastError // sqlite3.c:48961:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:48962:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 144)) = winSetSystemCall // sqlite3.c:48963:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 152)) = winGetSystemCall // sqlite3.c:48964:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winLongPathVfs)) + 160)) = winNextSystemCall // sqlite3.c:48965:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockAppData)) + 0 /* .pMethod */)) = uintptr(unsafe.Pointer(&winIoNolockMethod)) // sqlite3.c:47555:3: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winNolockAppData)) // sqlite3.c:48974:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 40)) = winOpen // sqlite3.c:48975:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 48)) = winDelete // sqlite3.c:48976:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 56)) = winAccess // sqlite3.c:48977:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 64)) = winFullPathname // sqlite3.c:48978:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 72)) = winDlOpen // sqlite3.c:48979:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 80)) = winDlError // sqlite3.c:48980:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 88)) = winDlSym // sqlite3.c:48981:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 96)) = winDlClose // sqlite3.c:48982:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 104)) = winRandomness // sqlite3.c:48983:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 112)) = winSleep // sqlite3.c:48984:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 120)) = winCurrentTime // sqlite3.c:48985:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 128)) = winGetLastError // sqlite3.c:48986:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:48987:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 144)) = winSetSystemCall // sqlite3.c:48988:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 152)) = winGetSystemCall // sqlite3.c:48989:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winNolockVfs)) + 160)) = winNextSystemCall // sqlite3.c:48990:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&winAppData)) // sqlite3.c:48924:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 40)) = winOpen // sqlite3.c:48925:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 48)) = winDelete // sqlite3.c:48926:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 56)) = winAccess // sqlite3.c:48927:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 64)) = winFullPathname // sqlite3.c:48928:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 72)) = winDlOpen // sqlite3.c:48929:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 80)) = winDlError // sqlite3.c:48930:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 88)) = winDlSym // sqlite3.c:48931:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 96)) = winDlClose // sqlite3.c:48932:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 104)) = winRandomness // sqlite3.c:48933:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 112)) = winSleep // sqlite3.c:48934:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 120)) = winCurrentTime // sqlite3.c:48935:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 128)) = winGetLastError // sqlite3.c:48936:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 136)) = winCurrentTimeInt64 // sqlite3.c:48937:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 144)) = winSetSystemCall // sqlite3.c:48938:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 152)) = winGetSystemCall // sqlite3.c:48939:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&winVfs)) + 160)) = winNextSystemCall // sqlite3.c:48940:5: } -var ts1 = "3.38.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=msvc-1900\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00AreFileApisANSI\x00CharLowerW\x00CharUpperW\x00CloseHandle\x00CreateFileA\x00CreateFileW\x00CreateFileMappingA\x00CreateFileMappingW\x00CreateMutexW\x00DeleteFileA\x00DeleteFileW\x00FileTimeToLocalFileTime\x00FileTimeToSystemTime\x00FlushFileBuffers\x00FormatMessageA\x00FormatMessageW\x00FreeLibrary\x00GetCurrentProcessId\x00GetDiskFreeSpaceA\x00GetDiskFreeSpaceW\x00GetFileAttributesA\x00GetFileAttributesW\x00GetFileAttributesExW\x00GetFileSize\x00GetFullPathNameA\x00GetFullPathNameW\x00GetLastError\x00GetProcAddressA\x00GetSystemInfo\x00GetSystemTime\x00GetSystemTimeAsFileTime\x00GetTempPathA\x00GetTempPathW\x00GetTickCount\x00GetVersionExA\x00GetVersionExW\x00HeapAlloc\x00HeapCreate\x00HeapDestroy\x00HeapFree\x00HeapReAlloc\x00HeapSize\x00HeapValidate\x00HeapCompact\x00LoadLibraryA\x00LoadLibraryW\x00LocalFree\x00LockFile\x00LockFileEx\x00MapViewOfFile\x00MultiByteToWideChar\x00QueryPerformanceCounter\x00ReadFile\x00SetEndOfFile\x00SetFilePointer\x00Sleep\x00SystemTimeToFileTime\x00UnlockFile\x00UnlockFileEx\x00UnmapViewOfFile\x00WideCharToMultiByte\x00WriteFile\x00CreateEventExW\x00WaitForSingleObject\x00WaitForSingleObjectEx\x00SetFilePointerEx\x00GetFileInformationByHandleEx\x00MapViewOfFileFromApp\x00CreateFile2\x00LoadPackagedLibrary\x00GetTickCount64\x00GetNativeSystemInfo\x00OutputDebugStringA\x00OutputDebugStringW\x00GetProcessHeap\x00CreateFileMappingFromApp\x00InterlockedCompareExchange\x00UuidCreate\x00UuidCreateSequential\x00FlushViewOfFile\x00%s\x00OsError 0x%lx (%lu)\x00os_win.c:%d: (%lu) %s(%s) - %s\x00delayed %dms for lock/sharing conflict at line %d\x00winSeekFile\x00winClose\x00winRead\x00winWrite1\x00winWrite2\x00winTruncate1\x00winTruncate2\x00winSync1\x00winSync2\x00winFileSize\x00winUnlockReadLock\x00winUnlock\x00winLockSharedMemory\x00%s-shm\x00readonly_shm\x00winOpenShm\x00winShmMap1\x00winShmMap2\x00winShmMap3\x00winUnmapfile1\x00winUnmapfile2\x00winMapfile1\x00winMapfile2\x00etilqs_\x00winGetTempname1\x00winGetTempname2\x00winGetTempname3\x00winGetTempname4\x00winGetTempname5\x00abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\x00exclusive\x00winOpen\x00psow\x00winDelete\x00winAccess\x00%s%c%s\x00winFullPathname1\x00winFullPathname2\x00winFullPathname3\x00winFullPathname4\x00win32\x00win32-longpath\x00win32-none\x00win32-longpath-none\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00stat\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00dll\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_store_directory\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00access\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab\x00" +var ts1 = "3.38.1\x00ATOMIC_INTRINSICS=1\x00COMPILER=msvc-1900\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00AreFileApisANSI\x00CharLowerW\x00CharUpperW\x00CloseHandle\x00CreateFileA\x00CreateFileW\x00CreateFileMappingA\x00CreateFileMappingW\x00CreateMutexW\x00DeleteFileA\x00DeleteFileW\x00FileTimeToLocalFileTime\x00FileTimeToSystemTime\x00FlushFileBuffers\x00FormatMessageA\x00FormatMessageW\x00FreeLibrary\x00GetCurrentProcessId\x00GetDiskFreeSpaceA\x00GetDiskFreeSpaceW\x00GetFileAttributesA\x00GetFileAttributesW\x00GetFileAttributesExW\x00GetFileSize\x00GetFullPathNameA\x00GetFullPathNameW\x00GetLastError\x00GetProcAddressA\x00GetSystemInfo\x00GetSystemTime\x00GetSystemTimeAsFileTime\x00GetTempPathA\x00GetTempPathW\x00GetTickCount\x00GetVersionExA\x00GetVersionExW\x00HeapAlloc\x00HeapCreate\x00HeapDestroy\x00HeapFree\x00HeapReAlloc\x00HeapSize\x00HeapValidate\x00HeapCompact\x00LoadLibraryA\x00LoadLibraryW\x00LocalFree\x00LockFile\x00LockFileEx\x00MapViewOfFile\x00MultiByteToWideChar\x00QueryPerformanceCounter\x00ReadFile\x00SetEndOfFile\x00SetFilePointer\x00Sleep\x00SystemTimeToFileTime\x00UnlockFile\x00UnlockFileEx\x00UnmapViewOfFile\x00WideCharToMultiByte\x00WriteFile\x00CreateEventExW\x00WaitForSingleObject\x00WaitForSingleObjectEx\x00SetFilePointerEx\x00GetFileInformationByHandleEx\x00MapViewOfFileFromApp\x00CreateFile2\x00LoadPackagedLibrary\x00GetTickCount64\x00GetNativeSystemInfo\x00OutputDebugStringA\x00OutputDebugStringW\x00GetProcessHeap\x00CreateFileMappingFromApp\x00InterlockedCompareExchange\x00UuidCreate\x00UuidCreateSequential\x00FlushViewOfFile\x00%s\x00OsError 0x%lx (%lu)\x00os_win.c:%d: (%lu) %s(%s) - %s\x00delayed %dms for lock/sharing conflict at line %d\x00winSeekFile\x00winClose\x00winRead\x00winWrite1\x00winWrite2\x00winTruncate1\x00winTruncate2\x00winSync1\x00winSync2\x00winFileSize\x00winUnlockReadLock\x00winUnlock\x00winLockSharedMemory\x00%s-shm\x00readonly_shm\x00winOpenShm\x00winShmMap1\x00winShmMap2\x00winShmMap3\x00winUnmapfile1\x00winUnmapfile2\x00winMapfile1\x00winMapfile2\x00etilqs_\x00winGetTempname1\x00winGetTempname2\x00winGetTempname3\x00winGetTempname4\x00winGetTempname5\x00abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\x00exclusive\x00winOpen\x00psow\x00winDelete\x00winAccess\x00%s%c%s\x00winFullPathname1\x00winFullPathname2\x00winFullPathname3\x00winFullPathname4\x00win32\x00win32-longpath\x00win32-none\x00win32-longpath-none\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00stat\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00dll\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_store_directory\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00access\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/sqlite/sqlite.go b/vendor/modernc.org/sqlite/sqlite.go index a484a2d0..f8c696f6 100644 --- a/vendor/modernc.org/sqlite/sqlite.go +++ b/vendor/modernc.org/sqlite/sqlite.go @@ -491,20 +491,7 @@ func (s *stmt) exec(ctx context.Context, args []driver.NamedValue) (r driver.Res var pstmt uintptr var done int32 if ctx != nil && ctx.Done() != nil { - donech := make(chan struct{}) - - go func() { - select { - case <-ctx.Done(): - atomic.AddInt32(&done, 1) - s.c.interrupt(s.c.db) - case <-donech: - } - }() - - defer func() { - close(donech) - }() + defer interruptOnDone(ctx, s.c, &done)() } for psql := s.psql; *(*byte)(unsafe.Pointer(psql)) != 0 && atomic.LoadInt32(&done) == 0; { @@ -588,20 +575,7 @@ func (s *stmt) query(ctx context.Context, args []driver.NamedValue) (r driver.Ro var pstmt uintptr var done int32 if ctx != nil && ctx.Done() != nil { - donech := make(chan struct{}) - - go func() { - select { - case <-ctx.Done(): - atomic.AddInt32(&done, 1) - s.c.interrupt(s.c.db) - case <-donech: - } - }() - - defer func() { - close(donech) - }() + defer interruptOnDone(ctx, s.c, &done)() } var allocs []uintptr @@ -718,19 +692,7 @@ func (t *tx) exec(ctx context.Context, sql string) (err error) { //TODO use t.conn.ExecContext() instead if ctx != nil && ctx.Done() != nil { - donech := make(chan struct{}) - - go func() { - select { - case <-ctx.Done(): - t.c.interrupt(t.c.db) - case <-donech: - } - }() - - defer func() { - close(donech) - }() + defer interruptOnDone(ctx, t.c, nil)() } if rc := sqlite3.Xsqlite3_exec(t.c.tls, t.c.db, psql, 0, 0, 0); rc != sqlite3.SQLITE_OK { @@ -740,6 +702,43 @@ func (t *tx) exec(ctx context.Context, sql string) (err error) { return nil } +// interruptOnDone sets up a goroutine to interrupt the provided db when the +// context is canceled, and returns a function the caller must defer so it +// doesn't interrupt after the caller finishes. +func interruptOnDone( + ctx context.Context, + c *conn, + done *int32, +) func() { + if done == nil { + var d int32 + done = &d + } + + donech := make(chan struct{}) + + go func() { + select { + case <-ctx.Done(): + // don't call interrupt if we were already done: it indicates that this + // call to exec is no longer running and we would be interrupting + // nothing, or even possibly an unrelated later call to exec. + if atomic.AddInt32(done, 1) == 1 { + c.interrupt(c.db) + } + case <-donech: + } + }() + + // the caller is expected to defer this function + return func() { + // set the done flag so that a context cancellation right after the caller + // returns doesn't trigger a call to interrupt for some other statement. + atomic.AddInt32(done, 1) + close(donech) + } +} + type conn struct { db uintptr // *sqlite3.Xsqlite3 tls *libc.TLS diff --git a/vendor/modules.txt b/vendor/modules.txt index 67275499..02564492 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -437,7 +437,7 @@ github.com/yaegashi/msgraph.go/msauth # github.com/zfjagann/golang-ring v0.0.0-20210116075443-7c86fdb43134 ## explicit github.com/zfjagann/golang-ring -# go.mau.fi/libsignal v0.0.0-20220308120827-0d87a03fd7c7 +# go.mau.fi/libsignal v0.0.0-20220315232917-871a40435d3b ## explicit; go 1.17 go.mau.fi/libsignal/cipher go.mau.fi/libsignal/ecc @@ -465,7 +465,7 @@ go.mau.fi/libsignal/util/errorhelper go.mau.fi/libsignal/util/keyhelper go.mau.fi/libsignal/util/medium go.mau.fi/libsignal/util/optional -# go.mau.fi/whatsmeow v0.0.0-20220312175208-0c4681a6ff52 +# go.mau.fi/whatsmeow v0.0.0-20220319105109-ee347f8c0a14 ## explicit; go 1.17 go.mau.fi/whatsmeow go.mau.fi/whatsmeow/appstate @@ -496,7 +496,7 @@ go.uber.org/zap/internal/bufferpool go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore -# golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 +# golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd ## explicit; go 1.17 golang.org/x/crypto/acme golang.org/x/crypto/acme/autocert @@ -668,13 +668,13 @@ layeh.com/gumble/gumbleutil # lukechampine.com/uint128 v1.1.1 ## explicit; go 1.12 lukechampine.com/uint128 -# modernc.org/cc/v3 v3.35.22 +# modernc.org/cc/v3 v3.35.24 ## explicit; go 1.15 modernc.org/cc/v3 -# modernc.org/ccgo/v3 v3.15.14 +# modernc.org/ccgo/v3 v3.15.17 ## explicit; go 1.16 modernc.org/ccgo/v3/lib -# modernc.org/libc v1.14.6 +# modernc.org/libc v1.14.11 ## explicit; go 1.16 modernc.org/libc modernc.org/libc/errno @@ -705,13 +705,13 @@ modernc.org/libc/wctype # modernc.org/mathutil v1.4.1 ## explicit; go 1.13 modernc.org/mathutil -# modernc.org/memory v1.0.5 -## explicit; go 1.15 +# modernc.org/memory v1.0.6 +## explicit; go 1.16 modernc.org/memory # modernc.org/opt v0.1.1 ## explicit; go 1.13 modernc.org/opt -# modernc.org/sqlite v1.14.8 +# modernc.org/sqlite v1.15.2 ## explicit; go 1.16 modernc.org/sqlite modernc.org/sqlite/lib